(window.webpackJsonp=window.webpackJsonp||[]).push([[191,5,6,7,8,10,17],{"+NIl":function(I,J,P){(function(L){L(P("VrN/"))})(function(L){"use strict";L.defineMode("stex",function(u,S){"use strict";function R(f,b){f.cmdState.push(b)}function h(f){return f.cmdState.length>0?f.cmdState[f.cmdState.length-1]:null}function o(f){var b=f.cmdState.pop();b&&b.closeBracket()}function C(f){for(var b=f.cmdState,v=b.length-1;v>=0;v--){var m=b[v];if(m.name=="DEFAULT")continue;return m}return{styleIdentifier:function(){return null}}}function c(f,b,v){return function(){this.name=f,this.bracketNo=0,this.style=b,this.styles=v,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var a={};a.importmodule=c("importmodule","tag",["string","builtin"]),a.documentclass=c("documentclass","tag",["","atom"]),a.usepackage=c("usepackage","tag",["atom"]),a.begin=c("begin","tag",["atom"]),a.end=c("end","tag",["atom"]),a.label=c("label","tag",["atom"]),a.ref=c("ref","tag",["atom"]),a.eqref=c("eqref","tag",["atom"]),a.cite=c("cite","tag",["atom"]),a.bibitem=c("bibitem","tag",["atom"]),a.Bibitem=c("Bibitem","tag",["atom"]),a.RBibitem=c("RBibitem","tag",["atom"]),a.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function i(f,b){f.f=b}function r(f,b){var v;if(f.match(/^\\[a-zA-Z@]+/)){var m=f.current().slice(1);return v=a.hasOwnProperty(m)?a[m]:a.DEFAULT,v=new v,R(b,v),i(b,p),v.style}if(f.match(/^\\[$&%#{}_]/))return"tag";if(f.match(/^\\[,;!\/\\]/))return"tag";if(f.match("\\["))return i(b,function(d,g){return l(d,g,"\\]")}),"keyword";if(f.match("\\("))return i(b,function(d,g){return l(d,g,"\\)")}),"keyword";if(f.match("$$"))return i(b,function(d,g){return l(d,g,"$$")}),"keyword";if(f.match("$"))return i(b,function(d,g){return l(d,g,"$")}),"keyword";var n=f.next();if(n=="%")return f.skipToEnd(),"comment";if(n=="}"||n=="]"){if(v=h(b),v)v.closeBracket(n),i(b,p);else return"error";return"bracket"}else return n=="{"||n=="["?(v=a.DEFAULT,v=new v,R(b,v),"bracket"):/\d/.test(n)?(f.eatWhile(/[\w.%]/),"atom"):(f.eatWhile(/[\w\-_]/),v=C(b),v.name=="begin"&&(v.argument=f.current()),v.styleIdentifier())}function l(f,b,v){if(f.eatSpace())return null;if(v&&f.match(v))return i(b,r),"keyword";if(f.match(/^\\[a-zA-Z@]+/))return"tag";if(f.match(/^[a-zA-Z]+/))return"variable-2";if(f.match(/^\\[$&%#{}_]/))return"tag";if(f.match(/^\\[,;!\/]/))return"tag";if(f.match(/^[\^_&]/))return"tag";if(f.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(f.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var m=f.next();return m=="{"||m=="}"||m=="["||m=="]"||m=="("||m==")"?"bracket":m=="%"?(f.skipToEnd(),"comment"):"error"}function p(f,b){var v=f.peek(),m;return v=="{"||v=="["?(m=h(b),m.openBracket(v),f.eat(v),i(b,r),"bracket"):/[ \t\r]/.test(v)?(f.eat(v),null):(i(b,r),o(b),r(f,b))}return{startState:function(){var f=S.inMathMode?function(b,v){return l(b,v)}:r;return{cmdState:[],f}},copyState:function(f){return{cmdState:f.cmdState.slice(),f:f.f}},token:function(f,b){return b.f(f,b)},blankLine:function(f){f.f=r,f.cmdState.length=0},lineComment:"%"}}),L.defineMIME("text/x-stex","stex"),L.defineMIME("text/x-latex","stex")})},"19Vz":function(I,J,P){(function(L){L(P("VrN/"))})(function(L){L.defineOption("placeholder","",function(c,a,i){var r=i&&i!=L.Init;if(a&&!r)c.on("blur",h),c.on("change",o),c.on("swapDoc",o),L.on(c.getInputField(),"compositionupdate",c.state.placeholderCompose=function(){R(c)}),o(c);else if(!a&&r){c.off("blur",h),c.off("change",o),c.off("swapDoc",o),L.off(c.getInputField(),"compositionupdate",c.state.placeholderCompose),u(c);var l=c.getWrapperElement();l.className=l.className.replace(" CodeMirror-empty","")}a&&!c.hasFocus()&&h(c)});function u(c){c.state.placeholder&&(c.state.placeholder.parentNode.removeChild(c.state.placeholder),c.state.placeholder=null)}function S(c){u(c);var a=c.state.placeholder=document.createElement("pre");a.style.cssText="height: 0; overflow: visible",a.style.direction=c.getOption("direction"),a.className="CodeMirror-placeholder CodeMirror-line-like";var i=c.getOption("placeholder");typeof i=="string"&&(i=document.createTextNode(i)),a.appendChild(i),c.display.lineSpace.insertBefore(a,c.display.lineSpace.firstChild)}function R(c){setTimeout(function(){var a=!1,i=c.getInputField();i.nodeName=="TEXTAREA"?a=!i.value:c.lineCount()==1&&(a=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),a?S(c):u(c)},20)}function h(c){C(c)&&S(c)}function o(c){var a=c.getWrapperElement(),i=C(c);a.className=a.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?S(c):u(c)}function C(c){return c.lineCount()===1&&c.getLine(0)===""}})},"1T2W":function(I,J,P){I.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"1eCo":function(I,J,P){(function(L){L(P("VrN/"))})(function(L){"use strict";var u={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},S={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};L.defineMode("xml",function(R,h){var o=R.indentUnit,C={},c=h.htmlMode?u:S;for(var a in c)C[a]=c[a];for(var a in h)C[a]=h[a];var i,r;function l(_,N){function j(H){return N.tokenize=H,H(_,N)}var k=_.next();if(k=="<")return _.eat("!")?_.eat("[")?_.match("CDATA[")?j(b("atom","]]>")):null:_.match("--")?j(b("comment","-->")):_.match("DOCTYPE",!0,!0)?(_.eatWhile(/[\w\._\-]/),j(v(1))):null:_.eat("?")?(_.eatWhile(/[\w\._\-]/),N.tokenize=b("meta","?>"),"meta"):(i=_.eat("/")?"closeTag":"openTag",N.tokenize=p,"tag bracket");if(k=="&"){var z;return _.eat("#")?_.eat("x")?z=_.eatWhile(/[a-fA-F\d]/)&&_.eat(";"):z=_.eatWhile(/[\d]/)&&_.eat(";"):z=_.eatWhile(/[\w\.\-:]/)&&_.eat(";"),z?"atom":"error"}else return _.eatWhile(/[^&<]/),null}l.isInText=!0;function p(_,N){var j=_.next();if(j==">"||j=="/"&&_.eat(">"))return N.tokenize=l,i=j==">"?"endTag":"selfcloseTag","tag bracket";if(j=="=")return i="equals",null;if(j=="<"){N.tokenize=l,N.state=g,N.tagName=N.tagStart=null;var k=N.tokenize(_,N);return k?k+" tag error":"tag error"}else return/[\'\"]/.test(j)?(N.tokenize=f(j),N.stringStartCol=_.column(),N.tokenize(_,N)):(_.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(_){var N=function(j,k){for(;!j.eol();)if(j.next()==_){k.tokenize=p;break}return"string"};return N.isInAttribute=!0,N}function b(_,N){return function(j,k){for(;!j.eol();){if(j.match(N)){k.tokenize=l;break}j.next()}return _}}function v(_){return function(N,j){for(var k;(k=N.next())!=null;){if(k=="<")return j.tokenize=v(_+1),j.tokenize(N,j);if(k==">")if(_==1){j.tokenize=l;break}else return j.tokenize=v(_-1),j.tokenize(N,j)}return"meta"}}function m(_,N,j){this.prev=_.context,this.tagName=N,this.indent=_.indented,this.startOfLine=j,(C.doNotIndent.hasOwnProperty(N)||_.context&&_.context.noIndent)&&(this.noIndent=!0)}function n(_){_.context&&(_.context=_.context.prev)}function d(_,N){for(var j;;){if(!_.context)return;if(j=_.context.tagName,!C.contextGrabbers.hasOwnProperty(j)||!C.contextGrabbers[j].hasOwnProperty(N))return;n(_)}}function g(_,N,j){return _=="openTag"?(j.tagStart=N.column(),T):_=="closeTag"?y:g}function T(_,N,j){return _=="word"?(j.tagName=N.current(),r="tag",A):C.allowMissingTagName&&_=="endTag"?(r="tag bracket",A(_,N,j)):(r="error",T)}function y(_,N,j){if(_=="word"){var k=N.current();return j.context&&j.context.tagName!=k&&C.implicitlyClosed.hasOwnProperty(j.context.tagName)&&n(j),j.context&&j.context.tagName==k||C.matchClosing===!1?(r="tag",s):(r="tag error",M)}else return C.allowMissingTagName&&_=="endTag"?(r="tag bracket",s(_,N,j)):(r="error",M)}function s(_,N,j){return _!="endTag"?(r="error",s):(n(j),g)}function M(_,N,j){return r="error",s(_,N,j)}function A(_,N,j){if(_=="word")return r="attribute",x;if(_=="endTag"||_=="selfcloseTag"){var k=j.tagName,z=j.tagStart;return j.tagName=j.tagStart=null,_=="selfcloseTag"||C.autoSelfClosers.hasOwnProperty(k)?d(j,k):(d(j,k),j.context=new m(j,k,z==j.indented)),g}return r="error",A}function x(_,N,j){return _=="equals"?E:(C.allowMissing||(r="error"),A(_,N,j))}function E(_,N,j){return _=="string"?w:_=="word"&&C.allowUnquoted?(r="string",A):(r="error",A(_,N,j))}function w(_,N,j){return _=="string"?w:A(_,N,j)}return{startState:function(_){var N={tokenize:l,state:g,indented:_||0,tagName:null,tagStart:null,context:null};return _!=null&&(N.baseIndent=_),N},token:function(_,N){if(!N.tagName&&_.sol()&&(N.indented=_.indentation()),_.eatSpace())return null;i=null;var j=N.tokenize(_,N);return(j||i)&&j!="comment"&&(r=null,N.state=N.state(i||j,_,N),r&&(j=r=="error"?j+" error":r)),j},indent:function(_,N,j){var k=_.context;if(_.tokenize.isInAttribute)return _.tagStart==_.indented?_.stringStartCol+1:_.indented+o;if(k&&k.noIndent)return L.Pass;if(_.tokenize!=p&&_.tokenize!=l)return j?j.match(/^(\s*)/)[0].length:0;if(_.tagName)return C.multilineTagIndentPastTag!==!1?_.tagStart+_.tagName.length+2:_.tagStart+o*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/$/,blockCommentStart:"",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(_){_.state==E&&(_.state=A)},xmlCurrentTag:function(_){return _.tagName?{name:_.tagName,close:_.type=="closeTag"}:null},xmlCurrentContext:function(_){for(var N=[],j=_.context;j;j=j.prev)j.tagName&&N.push(j.tagName);return N.reverse()}}}),L.defineMIME("text/xml","xml"),L.defineMIME("application/xml","xml"),L.mimeModes.hasOwnProperty("text/html")||L.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("MlIO"))})(this,function(L){return function(){var u=L,S=u.lib,R=S.Hasher,h=u.x64,o=h.Word,C=h.WordArray,c=u.algo;function a(){return o.create.apply(o,arguments)}var i=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],r=[];(function(){for(var p=0;p<80;p++)r[p]=a()})();var l=c.SHA512=R.extend({_doReset:function(){this._hash=new C.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.init(1541459225,327033209)])},_doProcessBlock:function(p,f){for(var b=this._hash.words,v=b[0],m=b[1],n=b[2],d=b[3],g=b[4],T=b[5],y=b[6],s=b[7],M=v.high,A=v.low,x=m.high,E=m.low,w=n.high,_=n.low,N=d.high,j=d.low,k=g.high,z=g.low,H=T.high,F=T.low,G=y.high,B=y.low,W=s.high,K=s.low,q=M,re=A,ee=x,Ce=E,xe=w,he=_,ke=N,_e=j,de=k,ce=z,ae=H,Se=F,te=G,ue=B,Oe=W,le=K,Q=0;Q<80;Q++){var Y,Z,be=r[Q];if(Q<16)Z=be.high=p[f+Q*2]|0,Y=be.low=p[f+Q*2+1]|0;else{var ge=r[Q-15],De=ge.high,Qe=ge.low,Ze=(De>>>1|Qe<<31)^(De>>>8|Qe<<24)^De>>>7,nt=(Qe>>>1|De<<31)^(Qe>>>8|De<<24)^(Qe>>>7|De<<25),tt=r[Q-2],lt=tt.high,st=tt.low,je=(lt>>>19|st<<13)^(lt<<3|st>>>29)^lt>>>6,Re=(st>>>19|lt<<13)^(st<<3|lt>>>29)^(st>>>6|lt<<26),et=r[Q-7],ct=et.high,$e=et.low,qe=r[Q-16],Ue=qe.high,Me=qe.low;Y=nt+$e,Z=Ze+ct+(Y>>>0>>0?1:0),Y=Y+Re,Z=Z+je+(Y>>>0>>0?1:0),Y=Y+Me,Z=Z+Ue+(Y>>>0>>0?1:0),be.high=Z,be.low=Y}var Ie=de&ae^~de&te,ye=ce&Se^~ce&ue,Te=q&ee^q&xe^ee&xe,Ae=re&Ce^re&he^Ce&he,Pe=(q>>>28|re<<4)^(q<<30|re>>>2)^(q<<25|re>>>7),Xe=(re>>>28|q<<4)^(re<<30|q>>>2)^(re<<25|q>>>7),rt=(de>>>14|ce<<18)^(de>>>18|ce<<14)^(de<<23|ce>>>9),ft=(ce>>>14|de<<18)^(ce>>>18|de<<14)^(ce<<23|de>>>9),St=i[Q],Pt=St.high,dt=St.low,At=le+ft,Ot=Oe+rt+(At>>>0>>0?1:0),At=At+ye,Ot=Ot+Ie+(At>>>0>>0?1:0),At=At+dt,Ot=Ot+Pt+(At>>>0
>>0?1:0),At=At+Y,Ot=Ot+Z+(At>>>0>>0?1:0),bt=Xe+Ae,Vt=Pe+Te+(bt>>>0>>0?1:0);Oe=te,le=ue,te=ae,ue=Se,ae=de,Se=ce,ce=_e+At|0,de=ke+Ot+(ce>>>0<_e>>>0?1:0)|0,ke=xe,_e=he,xe=ee,he=Ce,ee=q,Ce=re,re=At+bt|0,q=Ot+Vt+(re>>>0>>0?1:0)|0}A=v.low=A+re,v.high=M+q+(A>>>0>>0?1:0),E=m.low=E+Ce,m.high=x+ee+(E>>>0>>0?1:0),_=n.low=_+he,n.high=w+xe+(_>>>0>>0?1:0),j=d.low=j+_e,d.high=N+ke+(j>>>0<_e>>>0?1:0),z=g.low=z+ce,g.high=k+de+(z>>>0>>0?1:0),F=T.low=F+Se,T.high=H+ae+(F>>>0>>0?1:0),B=y.low=B+ue,y.high=G+te+(B>>>0>>0?1:0),K=s.low=K+le,s.high=W+Oe+(K>>>0>>0?1:0)},_doFinalize:function(){var p=this._data,f=p.words,b=this._nDataBytes*8,v=p.sigBytes*8;f[v>>>5]|=128<<24-v%32,f[(v+128>>>10<<5)+30]=Math.floor(b/4294967296),f[(v+128>>>10<<5)+31]=b,p.sigBytes=f.length*4,this._process();var m=this._hash.toX32();return m},clone:function(){var p=R.clone.call(this);return p._hash=this._hash.clone(),p},blockSize:1024/32});u.SHA512=R._createHelper(l),u.HmacSHA512=R._createHmacHelper(l)}(),L.SHA512})},"3y9D":function(I,J,P){(function(L,u){I.exports=J=u(P("Ib8C"))})(this,function(L){return function(){var u=L,S=u.lib,R=S.WordArray,h=S.Hasher,o=u.algo,C=[],c=o.SHA1=h.extend({_doReset:function(){this._hash=new R.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,i){for(var r=this._hash.words,l=r[0],p=r[1],f=r[2],b=r[3],v=r[4],m=0;m<80;m++){if(m<16)C[m]=a[i+m]|0;else{var n=C[m-3]^C[m-8]^C[m-14]^C[m-16];C[m]=n<<1|n>>>31}var d=(l<<5|l>>>27)+v+C[m];m<20?d+=(p&f|~p&b)+1518500249:m<40?d+=(p^f^b)+1859775393:m<60?d+=(p&f|p&b|f&b)-1894007588:d+=(p^f^b)-899497514,v=b,b=f,f=p<<30|p>>>2,p=l,l=d}r[0]=r[0]+l|0,r[1]=r[1]+p|0,r[2]=r[2]+f|0,r[3]=r[3]+b|0,r[4]=r[4]+v|0},_doFinalize:function(){var a=this._data,i=a.words,r=this._nDataBytes*8,l=a.sigBytes*8;return i[l>>>5]|=128<<24-l%32,i[(l+64>>>9<<4)+14]=Math.floor(r/4294967296),i[(l+64>>>9<<4)+15]=r,a.sigBytes=i.length*4,this._process(),this._hash},clone:function(){var a=h.clone.call(this);return a._hash=this._hash.clone(),a}});u.SHA1=h._createHelper(c),u.HmacSHA1=h._createHmacHelper(c)}(),L.SHA1})},4:function(I,J){},"5hvy":function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("MlIO"))})(this,function(L){return function(u){var S=L,R=S.lib,h=R.WordArray,o=R.Hasher,C=S.x64,c=C.Word,a=S.algo,i=[],r=[],l=[];(function(){for(var b=1,v=0,m=0;m<24;m++){i[b+5*v]=(m+1)*(m+2)/2%64;var n=v%5,d=(2*b+3*v)%5;b=n,v=d}for(var b=0;b<5;b++)for(var v=0;v<5;v++)r[b+5*v]=v+(2*b+3*v)%5*5;for(var g=1,T=0;T<24;T++){for(var y=0,s=0,M=0;M<7;M++){if(g&1){var A=(1<>>24)&16711935|(g<<24|g>>>8)&4278255360,T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360;var y=m[d];y.high^=T,y.low^=g}for(var s=0;s<24;s++){for(var M=0;M<5;M++){for(var A=0,x=0,E=0;E<5;E++){var y=m[M+5*E];A^=y.high,x^=y.low}var w=p[M];w.high=A,w.low=x}for(var M=0;M<5;M++)for(var _=p[(M+4)%5],N=p[(M+1)%5],j=N.high,k=N.low,A=_.high^(j<<1|k>>>31),x=_.low^(k<<1|j>>>31),E=0;E<5;E++){var y=m[M+5*E];y.high^=A,y.low^=x}for(var z=1;z<25;z++){var A,x,y=m[z],H=y.high,F=y.low,G=i[z];G<32?(A=H<>>32-G,x=F<>>32-G):(A=F<>>64-G,x=H<>>64-G);var B=p[r[z]];B.high=A,B.low=x}var W=p[0],K=m[0];W.high=K.high,W.low=K.low;for(var M=0;M<5;M++)for(var E=0;E<5;E++){var z=M+5*E,y=m[z],q=p[z],re=p[(M+1)%5+5*E],ee=p[(M+2)%5+5*E];y.high=q.high^~re.high&ee.high,y.low=q.low^~re.low&ee.low}var y=m[0],Ce=l[s];y.high^=Ce.high,y.low^=Ce.low}},_doFinalize:function(){var b=this._data,v=b.words,m=this._nDataBytes*8,n=b.sigBytes*8,d=this.blockSize*32;v[n>>>5]|=1<<24-n%32,v[(u.ceil((n+1)/d)*d>>>5)-1]|=128,b.sigBytes=v.length*4,this._process();for(var g=this._state,T=this.cfg.outputLength/8,y=T/8,s=[],M=0;M>>24)&16711935|(x<<24|x>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,s.push(E),s.push(x)}return new h.init(s,T)},clone:function(){for(var b=o.clone.call(this),v=b._state=this._state.slice(0),m=0;m<25;m++)v[m]=v[m].clone();return b}});S.SHA3=o._createHelper(f),S.HmacSHA3=o._createHmacHelper(f)}(Math),L.SHA3})},"5nXd":function(I,J,P){var L=P("MFOe"),u=L.slice,S=L.pluck,R=L.each,h=L.bind,o=L.create,C=L.isList,c=L.isFunction,a=L.isObject;I.exports={createStore:l};var i={version:"2.0.12",enabled:!1,get:function(p,f){var b=this.storage.read(this._namespacePrefix+p);return this._deserialize(b,f)},set:function(p,f){return f===void 0?this.remove(p):(this.storage.write(this._namespacePrefix+p,this._serialize(f)),f)},remove:function(p){this.storage.remove(this._namespacePrefix+p)},each:function(p){var f=this;this.storage.each(function(b,v){p.call(f,f._deserialize(b),(v||"").replace(f._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(p){return this._namespacePrefix=="__storejs_"+p+"_"},createStore:function(){return l.apply(this,arguments)},addPlugin:function(p){this._addPlugin(p)},namespace:function(p){return l(this.storage,this.plugins,p)}};function r(){var p=typeof console=="undefined"?null:console;if(!p)return;var f=p.warn?p.warn:p.log;f.apply(p,arguments)}function l(p,f,b){b||(b=""),p&&!C(p)&&(p=[p]),f&&!C(f)&&(f=[f]);var v=b?"__storejs_"+b+"_":"",m=b?new RegExp("^"+v):null,n=/^[a-zA-Z0-9_\-]*$/;if(!n.test(b))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var d={_namespacePrefix:v,_namespaceRegexp:m,_testStorage:function(T){try{var y="__storejs__test__";T.write(y,y);var s=T.read(y)===y;return T.remove(y),s}catch(M){return!1}},_assignPluginFnProp:function(T,y){var s=this[y];this[y]=function(){var A=u(arguments,0),x=this;function E(){return s?(R(arguments,function(_,N){A[N]=_}),s.apply(x,A)):void 0}var w=[E].concat(A);return T.apply(x,w)}},_serialize:function(T){return JSON.stringify(T)},_deserialize:function(T,y){if(!T)return y;var s="";try{s=JSON.parse(T)}catch(M){s=T}return s!==void 0?s:y},_addStorage:function(T){if(this.enabled)return;this._testStorage(T)&&(this.storage=T,this.enabled=!0)},_addPlugin:function(T){var y=this;if(C(T)){R(T,function(A){y._addPlugin(A)});return}var s=S(this.plugins,function(A){return T===A});if(s)return;if(this.plugins.push(T),!c(T))throw new Error("Plugins must be function values that return objects");var M=T.call(this);if(!a(M))throw new Error("Plugins must return an object of function properties");R(M,function(A,x){if(!c(A))throw new Error("Bad plugin property: "+x+" from plugin "+T.name+". Plugins should only return functions.");y._assignPluginFnProp(A,x)})},addStorage:function(T){r("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(T)}},g=o(d,i,{plugins:[]});return g.raw={},R(g,function(T,y){c(T)&&(g.raw[y]=h(g,T))}),R(p,function(T){g._addStorage(T)}),R(f,function(T){g._addPlugin(T)}),g}},"6+eU":function(I,J,P){"use strict";P.d(J,"a",function(){return s});var L=P("wx14"),u=P("rePB"),S=P("VTBJ"),R=P("1OyB"),h=P("vuIU"),o=P("Ji7U"),C=P("LK+K"),c=P("q1tI"),a=P.n(c),i=P("TSYQ"),r=P.n(i),l=function(A){var x,E="".concat(A.rootPrefixCls,"-item"),w=r()(E,"".concat(E,"-").concat(A.page),(x={},Object(u.a)(x,"".concat(E,"-active"),A.active),Object(u.a)(x,A.className,!!A.className),Object(u.a)(x,"".concat(E,"-disabled"),!A.page),x)),_=function(){A.onClick(A.page)},N=function(k){A.onKeyPress(k,A.onClick,A.page)};return a.a.createElement("li",{title:A.showTitle?A.page:null,className:w,onClick:_,onKeyPress:N,tabIndex:"0"},A.itemRender(A.page,"page",a.a.createElement("a",{rel:"nofollow"},A.page)))},p=l,f={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},b=function(M){Object(o.a)(x,M);var A=Object(C.a)(x);function x(){var E;Object(R.a)(this,x);for(var w=arguments.length,_=new Array(w),N=0;N=0||j.relatedTarget.className.indexOf("".concat(F,"-next"))>=0))return;E.setState({goInputText:""}),H(E.getValidValue())},E.go=function(j){var k=E.state.goInputText;if(k==="")return;(j.keyCode===f.ENTER||j.type==="click")&&(E.setState({goInputText:""}),E.props.quickGo(E.getValidValue()))},E}return Object(h.a)(x,[{key:"getValidValue",value:function(){var w=this.state,_=w.goInputText,N=w.current;return!_||isNaN(_)?N:Number(_)}},{key:"getPageSizeOptions",value:function(){var w=this.props,_=w.pageSize,N=w.pageSizeOptions;return N.some(function(j){return j.toString()===_.toString()})?N:N.concat([_.toString()]).sort(function(j,k){var z=isNaN(Number(j))?0:Number(j),H=isNaN(Number(k))?0:Number(k);return z-H})}},{key:"render",value:function(){var w=this,_=this.props,N=_.pageSize,j=_.locale,k=_.rootPrefixCls,z=_.changeSize,H=_.quickGo,F=_.goButton,G=_.selectComponentClass,B=_.buildOptionText,W=_.selectPrefixCls,K=_.disabled,q=this.state.goInputText,re="".concat(k,"-options"),ee=G,Ce=null,xe=null,he=null;if(!z&&!H)return null;var ke=this.getPageSizeOptions();if(z&&ee){var _e=ke.map(function(de,ce){return a.a.createElement(ee.Option,{key:ce,value:de.toString()},(B||w.buildOptionText)(de))});Ce=a.a.createElement(ee,{disabled:K,prefixCls:W,showSearch:!1,className:"".concat(re,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(N||ke[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ce){return ce.parentNode}},_e)}return H&&(F&&(he=typeof F=="boolean"?a.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:K,className:"".concat(re,"-quick-jumper-button")},j.jump_to_confirm):a.a.createElement("span",{onClick:this.go,onKeyUp:this.go},F)),xe=a.a.createElement("div",{className:"".concat(re,"-quick-jumper")},j.jump_to,a.a.createElement("input",{disabled:K,type:"text",value:q,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),j.page,he)),a.a.createElement("li",{className:"".concat(re)},Ce,xe)}}]),x}(a.a.Component);b.defaultProps={pageSizeOptions:["10","20","50","100"]};var v=b,m=P("N2Kk");function n(){}function d(M){return typeof M=="number"&&isFinite(M)&&Math.floor(M)===M}function g(M,A,x){return x}function T(M,A,x){var E=typeof M=="undefined"?A.pageSize:M;return Math.floor((x.total-1)/E)+1}var y=function(M){Object(o.a)(x,M);var A=Object(C.a)(x);function x(E){var w;Object(R.a)(this,x),w=A.call(this,E),w.getJumpPrevPage=function(){return Math.max(1,w.state.current-(w.props.showLessItems?3:5))},w.getJumpNextPage=function(){return Math.min(T(void 0,w.state,w.props),w.state.current+(w.props.showLessItems?3:5))},w.getItemIcon=function(z,H){var F=w.props.prefixCls,G=z||a.a.createElement("button",{type:"button","aria-label":H,className:"".concat(F,"-item-link")});return typeof z=="function"&&(G=a.a.createElement(z,Object(S.a)({},w.props))),G},w.savePaginationNode=function(z){w.paginationNode=z},w.isValid=function(z){return d(z)&&z!==w.state.current},w.shouldDisplayQuickJumper=function(){var z=w.props,H=z.showQuickJumper,F=z.pageSize,G=z.total;return G<=F?!1:H},w.handleKeyDown=function(z){(z.keyCode===f.ARROW_UP||z.keyCode===f.ARROW_DOWN)&&z.preventDefault()},w.handleKeyUp=function(z){var H=w.getValidValue(z),F=w.state.currentInputValue;H!==F&&w.setState({currentInputValue:H}),z.keyCode===f.ENTER?w.handleChange(H):z.keyCode===f.ARROW_UP?w.handleChange(H-1):z.keyCode===f.ARROW_DOWN&&w.handleChange(H+1)},w.changePageSize=function(z){var H=w.state.current,F=T(z,w.state,w.props);H=H>F?F:H,F===0&&(H=w.state.current),typeof z=="number"&&("pageSize"in w.props||w.setState({pageSize:z}),"current"in w.props||w.setState({current:H,currentInputValue:H})),w.props.onShowSizeChange(H,z),"onChange"in w.props&&w.props.onChange&&w.props.onChange(H,z)},w.handleChange=function(z){var H=w.props.disabled,F=z;if(w.isValid(F)&&!H){var G=T(void 0,w.state,w.props);F>G?F=G:F<1&&(F=1),"current"in w.props||w.setState({current:F,currentInputValue:F});var B=w.state.pageSize;return w.props.onChange(F,B),F}return w.state.current},w.prev=function(){w.hasPrev()&&w.handleChange(w.state.current-1)},w.next=function(){w.hasNext()&&w.handleChange(w.state.current+1)},w.jumpPrev=function(){w.handleChange(w.getJumpPrevPage())},w.jumpNext=function(){w.handleChange(w.getJumpNextPage())},w.hasPrev=function(){return w.state.current>1},w.hasNext=function(){return w.state.current2?F-2:0),B=2;B=N?k=N:k=Number(_),k}},{key:"getShowSizeChanger",value:function(){var w=this.props,_=w.showSizeChanger,N=w.total,j=w.totalBoundaryShowSizeChanger;return typeof _!="undefined"?_:N>j}},{key:"renderPrev",value:function(w){var _=this.props,N=_.prevIcon,j=_.itemRender,k=j(w,"prev",this.getItemIcon(N,"prev page")),z=!this.hasPrev();return Object(c.isValidElement)(k)?Object(c.cloneElement)(k,{disabled:z}):k}},{key:"renderNext",value:function(w){var _=this.props,N=_.nextIcon,j=_.itemRender,k=j(w,"next",this.getItemIcon(N,"next page")),z=!this.hasNext();return Object(c.isValidElement)(k)?Object(c.cloneElement)(k,{disabled:z}):k}},{key:"render",value:function(){var w=this,_=this.props,N=_.prefixCls,j=_.className,k=_.style,z=_.disabled,H=_.hideOnSinglePage,F=_.total,G=_.locale,B=_.showQuickJumper,W=_.showLessItems,K=_.showTitle,q=_.showTotal,re=_.simple,ee=_.itemRender,Ce=_.showPrevNextJumpers,xe=_.jumpPrevIcon,he=_.jumpNextIcon,ke=_.selectComponentClass,_e=_.selectPrefixCls,de=_.pageSizeOptions,ce=this.state,ae=ce.current,Se=ce.pageSize,te=ce.currentInputValue;if(H===!0&&F<=Se)return null;var ue=T(void 0,this.state,this.props),Oe=[],le=null,Q=null,Y=null,Z=null,be=null,ge=B&&B.goButton,De=W?1:2,Qe=ae-1>0?ae-1:0,Ze=ae+1=De*2&&ae!==1+2&&(Oe[0]=Object(c.cloneElement)(Oe[0],{className:"".concat(N,"-item-after-jump-prev")}),Oe.unshift(le)),ue-ae>=De*2&&ae!==ue-2&&(Oe[Oe.length-1]=Object(c.cloneElement)(Oe[Oe.length-1],{className:"".concat(N,"-item-before-jump-next")}),Oe.push(Q)),et!==1&&Oe.unshift(Y),ct!==ue&&Oe.push(Z)}var Ue=null;q&&(Ue=a.a.createElement("li",{className:"".concat(N,"-total-text")},q(F,[F===0?0:(ae-1)*Se+1,ae*Se>F?F:ae*Se])));var Me=!this.hasPrev()||!ue,Ie=!this.hasNext()||!ue;return a.a.createElement("ul",Object(L.a)({className:r()(N,j,Object(u.a)({},"".concat(N,"-disabled"),z)),style:k,unselectable:"unselectable",ref:this.savePaginationNode},nt),Ue,a.a.createElement("li",{title:K?G.prev_page:null,onClick:this.prev,tabIndex:Me?null:0,onKeyPress:this.runIfEnterPrev,className:r()("".concat(N,"-prev"),Object(u.a)({},"".concat(N,"-disabled"),Me)),"aria-disabled":Me},this.renderPrev(Qe)),Oe,a.a.createElement("li",{title:K?G.next_page:null,onClick:this.next,tabIndex:Ie?null:0,onKeyPress:this.runIfEnterNext,className:r()("".concat(N,"-next"),Object(u.a)({},"".concat(N,"-disabled"),Ie)),"aria-disabled":Ie},this.renderNext(Ze)),a.a.createElement(v,{disabled:z,locale:G,rootPrefixCls:N,selectComponentClass:ke,selectPrefixCls:_e,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:ae,pageSize:Se,pageSizeOptions:de,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ge}))}}],[{key:"getDerivedStateFromProps",value:function(w,_){var N={};if("current"in w&&(N.current=w.current,w.current!==_.current&&(N.currentInputValue=N.current)),"pageSize"in w&&w.pageSize!==_.pageSize){var j=_.current,k=T(w.pageSize,_,w);j=j>k?k:j,"current"in w||(N.current=j,N.currentInputValue=j),N.pageSize=w.pageSize}return N}}]),x}(a.a.Component);y.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:n,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:n,locale:m.a,style:{},itemRender:g,totalBoundaryShowSizeChanger:50};var s=y},"6RRn":function(I,J,P){"use strict";var L=P("wCXF"),u=P("n6Qo");P.d(J,"b",function(){return u.a});var S=P("IBYe"),R=P("6eGT"),h=P("hW8S");P.d(J,"a",function(){return h.a}),J.c=L.b},"6eGT":function(I,J,P){"use strict";function L(u){return null}J.a=L},"7Cbv":function(I,J,P){"use strict";var L=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),u=new Uint8Array(16);function S(){if(!L)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return L(u)}var R=/^(?:[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 h(p){return typeof p=="string"&&R.test(p)}for(var o=h,C=[],c=0;c<256;++c)C.push((c+256).toString(16).substr(1));function a(p){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,b=(C[p[f+0]]+C[p[f+1]]+C[p[f+2]]+C[p[f+3]]+"-"+C[p[f+4]]+C[p[f+5]]+"-"+C[p[f+6]]+C[p[f+7]]+"-"+C[p[f+8]]+C[p[f+9]]+"-"+C[p[f+10]]+C[p[f+11]]+C[p[f+12]]+C[p[f+13]]+C[p[f+14]]+C[p[f+15]]).toLowerCase();if(!o(b))throw TypeError("Stringified UUID is invalid");return b}var i=a;function r(p,f,b){p=p||{};var v=p.random||(p.rng||S)();if(v[6]=v[6]&15|64,v[8]=v[8]&63|128,f){b=b||0;for(var m=0;m<16;++m)f[b+m]=v[m];return f}return i(v)}var l=J.a=r},"7ahc":function(I,J,P){"use strict";P.d(J,"a",function(){return T});var L=P("k1fw"),u=P("0Owb"),S=P("+L6B"),R=P("2/Rp"),h=P("y8nQ"),o=P("Vl3Y"),C=P("tJVT"),c=P("OaEy"),a=P("2fM7"),i=P("q1tI"),r=P.n(i),l=P("VrN/"),p=P.n(l),f=P("p77/"),b=P.n(f),v=P("c5Ni"),m=P.n(v),n=a.a.Option,d={labelCol:{span:4},wrapperCol:{span:20}},g={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};J.b=function(y){var s=y.callback,M=y.onCancel,A=Object(i.useState)("python"),x=Object(C.a)(A,2),E=x[0],w=x[1];function _(j){w(g[j][1])}function N(j){s(j)}return r.a.createElement(o.a,Object(u.a)({},d,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:N}),r.a.createElement(o.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},r.a.createElement(a.a,{onChange:_},Object.keys(g).map(function(j){return r.a.createElement(n,{key:j,value:j},g[j][0])}))),r.a.createElement(o.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},r.a.createElement(T,{mode:E})),r.a.createElement("div",{className:"flex-container flex-end"},r.a.createElement(R.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),r.a.createElement(R.a,{type:"ghost",onClick:M},"\u53D6\u6D88")))};function T(y){var s=y.value,M=y.onChange,A=y.mode,x=y.options,E=x===void 0?{}:x,w=Object(i.useRef)(),_=Object(i.useState)(),N=Object(C.a)(_,2),j=N[0],k=N[1];return Object(i.useEffect)(function(){if(j){function z(H){var F=H.getValue();M&&M(F)}return j.on("change",z),function(){j.off("change",z)}}},[j,M]),Object(i.useEffect)(function(){j&&j.setOption("mode",A)},[j,A]),Object(i.useEffect)(function(){j&&((s!==j.getValue()||s==="")&&setTimeout(function(){j.setValue(s||" ")},300))},[j,s]),Object(i.useEffect)(function(){if(w.current&&!j){var z=p.a.fromTextArea(w.current,Object(L.a)({mode:A,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},E));k(z)}},[w.current,j]),r.a.createElement("div",{className:"my-codemirror-container"},r.a.createElement("textarea",{ref:w}))}},"815F":function(I,J,P){"use strict";P.d(J,"e",function(){return C}),P.d(J,"c",function(){return a}),P.d(J,"d",function(){return i}),P.d(J,"a",function(){return l}),P.d(J,"f",function(){return p}),P.d(J,"b",function(){return f});var L=P("KQm4"),u=P("VTBJ"),S=P("Ff2n"),R=P("Zm9Q"),h=P("Kwbf"),o=P("OZM5");function C(b,v){return b!=null?b:v}function c(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],v=new Map;function m(n){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(g){var T=g.key,y=g.children;Object(h.a)(T!=null,"Tree node must have a certain key: [".concat(d).concat(T,"]"));var s=String(T);Object(h.a)(!v.has(s)||T===null||T===void 0,"Same 'key' exist in the Tree: ".concat(s)),v.set(s,!0),m(y,"".concat(d).concat(s," > "))})}m(b)}function a(b){function v(m){var n=Object(R.a)(m);return n.map(function(d){if(!Object(o.i)(d))return Object(h.a)(!d,"Tree/TreeNode can only accept TreeNode as children."),null;var g=d.key,T=d.props,y=T.children,s=Object(S.a)(T,["children"]),M=Object(u.a)({key:g},s),A=v(y);return A.length&&(M.children=A),M}).filter(function(d){return d})}return v(b)}function i(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],m=new Set(v===!0?[]:v),n=[];function d(g){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return g.map(function(y,s){var M=Object(o.h)(T?T.pos:"0",s),A=C(y.key,M),x=Object(u.a)(Object(u.a)({},y),{},{parent:T,pos:M,children:null,data:y,isStart:[].concat(Object(L.a)(T?T.isStart:[]),[s===0]),isEnd:[].concat(Object(L.a)(T?T.isEnd:[]),[s===g.length-1])});return n.push(x),v===!0||m.has(A)?x.children=d(y.children||[],x):x.children=[],x})}return d(b),n}function r(b,v,m){var n;m?typeof m=="string"?n=function(T){return T[m]}:typeof m=="function"&&(n=function(T){return m(T)}):n=function(T,y){return C(T.key,y)};function d(g,T,y){var s=g?g.children:b,M=g?Object(o.h)(y.pos,T):"0";if(g){var A=n(g,M),x={node:g,index:T,pos:M,key:A,parentPos:y.node?y.pos:null,level:y.level+1};v(x)}s&&s.forEach(function(E,w){d(E,w,{node:g,pos:M,level:y?y.level+1:-1})})}d(null)}function l(b){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=v.initWrapper,n=v.processEntity,d=v.onProcessFinished,g=arguments.length>2?arguments[2]:void 0,T={},y={},s={posEntities:T,keyEntities:y};return m&&(s=m(s)||s),r(b,function(M){var A=M.node,x=M.index,E=M.pos,w=M.key,_=M.parentPos,N=M.level,j={node:A,index:x,key:w,pos:E,level:N},k=C(w,E);T[E]=j,y[k]=j,j.parent=T[_],j.parent&&(j.parent.children=j.parent.children||[],j.parent.children.push(j)),n&&n(j,s)},g),d&&d(s),s}function p(b,v){var m=v.expandedKeys,n=v.selectedKeys,d=v.loadedKeys,g=v.loadingKeys,T=v.checkedKeys,y=v.halfCheckedKeys,s=v.dragOverNodeKey,M=v.dropPosition,A=v.keyEntities,x=A[b],E={eventKey:b,expanded:m.indexOf(b)!==-1,selected:n.indexOf(b)!==-1,loaded:d.indexOf(b)!==-1,loading:g.indexOf(b)!==-1,checked:T.indexOf(b)!==-1,halfChecked:y.indexOf(b)!==-1,pos:String(x?x.pos:""),dragOver:s===b&&M===0,dragOverGapTop:s===b&&M===-1,dragOverGapBottom:s===b&&M===1};return E}function f(b){var v=b.data,m=b.expanded,n=b.selected,d=b.checked,g=b.loaded,T=b.loading,y=b.halfChecked,s=b.dragOver,M=b.dragOverGapTop,A=b.dragOverGapBottom,x=b.pos,E=b.active,w=Object(u.a)(Object(u.a)({},v),{},{expanded:m,selected:n,checked:d,loaded:g,loading:T,halfChecked:y,dragOver:s,dragOverGapTop:M,dragOverGapBottom:A,pos:x,active:E});return"props"in w||Object.defineProperty(w,"props",{get:function(){return Object(h.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),b}}),w}},"8EBN":function(I,J,P){(function(L){L(P("VrN/"))})(function(L){"use strict";L.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 u=0;u-1&&R.substring(C+1,R.length);if(c)return L.findModeByExtension(c)},L.findModeByName=function(R){R=R.toLowerCase();for(var h=0;h=ne.length?me.slice(ne.length):me}).join(` `)}var m=[],n=["
    "],d=new f.a.Renderer,g=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function T(){m.length=0,n=["
      "]}var y={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function s(se,V,X,ne){if(V>=se.length||se[V].level<=X)return V;var me=se[V];ne.push("
    • "+me.text+""),V++;var ie=[];return V=s(se,V,me.level,ie),ie.length>0&&(ne.push("
        "),ie.forEach(function(ze){ne.push(ze)}),ne.push("
      ")),ne.push("
    • "),V=s(se,V,X,ne),V}function M(){return s(m,0,0,n),n.push("
    "),n.join("")}var A={heading:function(V){var X=g.exec(V);if(X)return{type:"heading",raw:X[0],depth:X[1].length,text:X[2]}},fences:function(V){var X=this.rules.block.fences.exec(V);if(X){var ne=X[0],me=v(ne,X[3]||""),ie=X[2]?X[2].trim():X[2];if(["latex","katex","math"].indexOf(ie)>=0){var ze=w(),pt=me;me=ze,_[ze]={type:"block",expression:pt}}return{type:"code",raw:ne,lang:ie,text:me}}}},x=/(?:\${2})([^\n`]+?)(?:\${2})/gi,E=0,w=function(){return"__special_katext_id_".concat(E++,"__")},_={};function N(){return _}function j(){E=0,_={}}function k(se){return se=se.replace(x,function(V,X){var ne=w();return _[ne]={type:"inline",expression:X},ne}),se}var z=d.listitem;d.listitem=function(se){return z(k(se))};var H=d.paragraph;d.paragraph=function(se){return H(k(se))};var F=d.tablecell;d.tablecell=function(se,V){return F(k(se),V)},d.code=function(se,V,X){var ne=(V||"").match(/\S*/)[0];return ne?["latex","katex","math"].indexOf(ne)>=0?"

    ".concat(se,"

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

    ",M()),T()),Mr=Mr.replace(/(__special_katext_id_\d+__)/g,function(xi,gn){var On=En[gn],ui=On.type,ci=On.expression;return Object(re.renderToString)(An(ci)||"",{displayMode:ui==="block",throwOnError:!1,output:"html"})}),Mr=Mr.replace(/▁/g,"\u2581\u2581\u2581"),j(),ze){var Fr=document.createElement("div");return Fr.innerHTML=Mr,Fr.innerText}return setTimeout(function(){return on()},500),Mr},[Zr]),qr=Object(i.useRef)();y.WebkitLineClamp=pt,pt&&(Xt=Object(h.a)(Object(h.a)({},Xt),y));function Oi(Yr){var cr=Yr.target;if(cr.tagName.toUpperCase()==="IMG"){if(It){var en=cr.getAttribute("src");vr(en),li("image")}}else if(cr.tagName.toUpperCase()==="A"){var Mr=cr.getAttribute("href");if(Mr.indexOf("office")>-1)Yr.preventDefault(),vr(Mr),li("office");else if(Mr.indexOf("application/pdf")>-1)Yr.preventDefault(),vr(Mr),li("pdf");else if(Mr.indexOf("type=text")>-1)Yr.preventDefault(),vr(Mr),li("html");else if(Mr.startsWith("#")){Yr.preventDefault();var En=document.getElementById(Mr.replace("#",""));En&&En.scrollIntoView(!0)}}}var on=function(){var cr,en=(cr=qr.current)===null||cr===void 0?void 0:cr.querySelectorAll("video");en==null||en.forEach(function(Mr){if(Mr.oncontextmenu=function(){return!1},Mr.src.indexOf(".m3u8")>-1&&!Mr.canPlayType("application/vnd.apple.mpegurl")){if(K.a.isSupported()){var En=new K.a;En.loadSource(Mr.src),En.attachMedia(Mr)}}})};Object(i.useEffect)(function(){if(qr.current&&Fn&&(Fn.match(hn)&&window.PR.prettyPrint()),qr.current)return qr.current.addEventListener("click",Oi),function(){qr.current.removeEventListener("click",Oi),j(),T()}},[Fn,qr.current,Oi]);var Zn=function(cr){if(!me)return;cr.target.nodeName==="IMG"?(Zt.current.style.display="flex",Zt.current.style.width=cr.target.clientWidth+"px",Zt.current.style.height=cr.target.clientHeight+"px",Zt.current.style.top=cr.target.offsetTop+"px",Zt.current.style.left=cr.target.offsetLeft+"px",Hr.current.src=cr.target.getAttribute("src")):Zt.current.style.display="none"};return r.a.createElement("div",{style:{position:"relative"}},r.a.createElement("div",{ref:qr,style:Object(h.a)({},Xt),className:"".concat(ie||""," markdown-body ").concat(rn.a.mdBody),onMouseOver:Zn,dangerouslySetInnerHTML:{__html:Fn}}),r.a.createElement("div",{ref:Zt,className:rn.a.button},r.a.createElement(u.a,null,r.a.createElement(R.a,{onClick:function(){return Ki()}},"\u88C1\u526A"),r.a.createElement(R.a,{onClick:function(){return Ui()}},"\u7F16\u8F91"))),r.a.createElement("img",{ref:Hr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),r.a.createElement(ee.a,{close:!0,data:tr,hasMask:gt,type:tr!=null&&tr.length?mn:"",style:Object(h.a)({},an),onClose:function(){return vr("")}}))}},"9OqN":function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("OLod"))})(this,function(L){return L.mode.CTR=function(){var u=L.lib.BlockCipherMode.extend(),S=u.Encryptor=u.extend({processBlock:function(R,h){var o=this._cipher,C=o.blockSize,c=this._iv,a=this._counter;c&&(a=this._counter=c.slice(0),this._iv=void 0);var i=a.slice(0);o.encryptBlock(i,0),a[C-1]=a[C-1]+1|0;for(var r=0;r-1?"."+tt.split(".").pop():"");K===null&&(je="testsets/".concat(st).concat(tt.indexOf(".")>-1?"."+tt.split(".").pop():"")),nt.multipartUpload(je,new Blob([Ze.file],{type:Ze.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:tt+""},url:ke==null?void 0:ke.callback_url,host:ke==null?void 0:ke.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(x.e)(lt)}}).then(function(Re){if(Re.data.status===0){ue.current=ue.current+1;var et=te.current.map(function($e){var qe,Ue;if($e.name===((qe=Re.data)===null||qe===void 0||((Ue=qe.data)===null||Ue===void 0)?void 0:Ue.file_name)){var Me,Ie,ye,Te=Object(C.a)({},$e);if((Me=Re.data)!==null&&Me!==void 0&&(Ie=Me.data)!==null&&Ie!==void 0&&(ye=Ie.file_name)!==null&&ye!==void 0&&ye.includes(".in")){var Ae,Pe,Xe,rt,ft,St;Te.in_object_key=(Ae=Re.data)===null||Ae===void 0||((Pe=Ae.data)===null||Pe===void 0)?void 0:Pe.object,Te.in_object_size=(Xe=Re.data)===null||Xe===void 0||((rt=Xe.data)===null||rt===void 0)?void 0:rt.size,Te.input=(ft=Re.data)===null||ft===void 0||((St=ft.data)===null||St===void 0)?void 0:St.file_name,Te.in_file=Ze}else{var Pt,dt,At,Ot,bt,Vt;Te.out_object_key=(Pt=Re.data)===null||Pt===void 0||((dt=Pt.data)===null||dt===void 0)?void 0:dt.object,Te.out_object_size=(At=Re.data)===null||At===void 0||((Ot=At.data)===null||Ot===void 0)?void 0:Ot.size,Te.output=(bt=Re.data)===null||bt===void 0||((Vt=bt.data)===null||Vt===void 0)?void 0:Vt.file_name,Te.out_file=Ze}return Te}return $e});if(te.current=Object(l.a)(et),Ce(Object(l.a)(et)),ue.current>0&&ue.current===ee.length){Se(!1);var ct=N(et);ct=ct.filter(function($e){var qe,Ue;return!!((qe=$e[0])!==null&&qe!==void 0&&qe.name&&(Ue=$e[1])!==null&&Ue!==void 0&&Ue.name)}),ct=ct.map(function($e){return Object(C.a)(Object(C.a)(Object(C.a)({},$e[0]),$e[1]),{},{is_file:!0})}),G(ct),F()}}})},be=function(){if(ee.length===0){a.b.warn("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}Se(!0);var Ze=N(ee);if(Ze.some(function(nt){var tt,lt;return!((tt=nt[0])!==null&&tt!==void 0&&tt.name&&(lt=nt[1])!==null&<!==void 0&<.name)})){o.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u4E0A\u4F20\u7684\u6D4B\u8BD5\u7528\u4F8B\u4E2D\u5B58\u5728\u672A\u914D\u5BF9\u7684\u6587\u4EF6\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4EC5\u4FDD\u5B58\u5DF2\u914D\u5BF9\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF1F",onOk:function(){var nt=Object(i.a)(v.a.mark(function lt(){return v.a.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:ee.map(function(){var Re=Object(i.a)(v.a.mark(function et(ct){return v.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:Z(ct);case 1:case"end":return qe.stop()}},et)}));return function(et){return Re.apply(this,arguments)}}());case 1:case"end":return je.stop()}},lt)}));function tt(){return nt.apply(this,arguments)}return tt}(),onCancel:function(){Se(!1)}});return}ee.map(function(){var nt=Object(i.a)(v.a.mark(function tt(lt){return v.a.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:Z(lt);case 1:case"end":return je.stop()}},tt)}));return function(tt){return nt.apply(this,arguments)}}())},ge={name:"file",fileList:ee,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:function(Ze){if(ee!=null&&ee.some(function(tt){return tt.name===Ze.name}))return a.b.info("".concat(Ze.name,"\u6587\u4EF6\u5DF2\u5B58\u5728")),!1;if(Ze.size/1024/1024>100)return a.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(Ze.name))return a.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var nt={name:Ze.name,uid:Ze.uid,file:Ze,percent:0};return ee.push(nt),te.current=Object(l.a)(ee),Ce(Object(l.a)(ee)),!1}},De=N(ee);return console.log(ee,De,"fileList"),n.a.createElement(o.a,{visible:B,wrapClassName:W,onOk:be,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:ae},onCancel:Oe,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},n.a.createElement("div",{className:g.a.wrap},ee.length?n.a.createElement("div",null,n.a.createElement(f.a,ge,n.a.createElement(R.a,{className:g.a.btnS},"\u4E0A\u4F20\u6587\u4EF6")),n.a.createElement(k,{data:De,onRemove:Y})):n.a.createElement("div",{className:g.a.noData},n.a.createElement("img",{src:y.a,alt:""}),n.a.createElement(f.a,ge,n.a.createElement(R.a,{className:g.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),n.a.createElement("div",{className:g.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",n.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",n.a.createElement("br",null),"2\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",n.a.createElement("br",null),"3\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002")))},k=function(H){var F=H.data,G=F===void 0?[]:F,B=H.onRemove,W=H.width,K=W===void 0?"auto":W,q=H.showScore,re=q===void 0?!1:q,ee=H.disabled,Ce=ee===void 0?!1:ee,xe=H.inputChange,he=function(ce){var ae=document.createElement("a");document.body.appendChild(ae);var Se=URL.createObjectURL(ce.file);ae.href=Se,ae.download=ce.name,ae.click(),URL.revokeObjectURL(Se),document.body.removeChild(ae)},ke=function(ce,ae){Object(w.w)(ce,ae)},_e=function(ce,ae){o.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:n.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){B(ce,ae)},onCancel:function(){}})};return G.length?n.a.createElement("div",{style:{width:K}},n.a.createElement("div",{className:g.a.head},n.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),n.a.createElement("div",{style:{width:re?"25%":"35%"}},"\u8F93\u5165"),n.a.createElement("div",{style:{width:re?"25%":"35%"}},"\u8F93\u51FA"),re&&n.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),n.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),G.map(function(de,ce){var ae,Se,te,ue;return n.a.createElement("div",{key:ce,className:g.a.list},n.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",ce+1),n.a.createElement("div",{className:g.a.info,style:{width:re?"25%":"35%"}},n.a.createElement("span",{title:de.input||((ae=de[0])===null||ae===void 0?void 0:ae.name),onClick:function(){de.input?de.input_file_url?ke(de.input_file_url,de.input):he(de.in_file):he(de[0])}},de.input||((Se=de[0])===null||Se===void 0?void 0:Se.name))),n.a.createElement("div",{className:g.a.info,style:{width:re?"25%":"35%"}},n.a.createElement("span",{title:de.output||((te=de[1])===null||te===void 0?void 0:te.name),onClick:function(){de.input?de.output_file_url?ke(de.output_file_url,de.output):he(de.out_file):he(de[1])}},de.output||((ue=de[1])===null||ue===void 0?void 0:ue.name))),re&&n.a.createElement("div",{style:{width:"20%"}},n.a.createElement(u.a,{disabled:Ce,style:{width:"70%"},onChange:function(le){return xe(le,ce)},value:de.score}),n.a.createElement("span",null,"\xA0%")),n.a.createElement("div",{onClick:function(){return _e(de,ce)},style:{width:"10%"}},n.a.createElement("span",{className:g.a.del},"\u5220\u9664")))})):n.a.createElement(n.a.Fragment,null)};J.b=j},BU3w:function(I,J,P){"use strict";P.d(J,"a",function(){return o});var L=P("MNnm"),u="rc-util-key";function S(C){if(C.attachTo)return C.attachTo;var c=document.querySelector("head");return c||document.body}function R(C){var c,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(L.a)())return null;var i=document.createElement("style");if((c=a.csp)===null||c===void 0?void 0:c.nonce){var r;i.nonce=(r=a.csp)===null||r===void 0?void 0:r.nonce}i.innerHTML=C;var l=S(a),p=l.firstChild;return a.prepend&&l.prepend?l.prepend(i):a.prepend&&p?l.insertBefore(i,p):l.appendChild(i),i}var h=new Map;function o(C,c){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=S(a);if(!h.has(i)){var r=R("",a),l=r.parentNode;h.set(i,l),l.removeChild(r)}var p=Array.from(h.get(i).children).find(function(n){return n.tagName==="STYLE"&&n[u]===c});if(p){var f,b;if(((f=a.csp)===null||f===void 0?void 0:f.nonce)&&p.nonce!==((b=a.csp)===null||b===void 0?void 0:b.nonce)){var v;p.nonce=(v=a.csp)===null||v===void 0?void 0:v.nonce}return p.innerHTML!==C&&(p.innerHTML=C),p}var m=R(C,a);return m[u]=c,m}},Bd2K:function(I,J,P){(function(L){L(P("VrN/"),P("osHv"))})(function(L){L.defineOption("autoCloseTags",!1,function(a,i,r){if(r!=L.Init&&r&&a.removeKeyMap("autoCloseTags"),!i)return;var l={name:"autoCloseTags"};(typeof i!="object"||i.whenClosing!==!1)&&(l["'/'"]=function(p){return o(p)}),(typeof i!="object"||i.whenOpening!==!1)&&(l["'>'"]=function(p){return R(p)}),a.addKeyMap(l)});var u=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],S=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function R(a){if(a.getOption("disableInput"))return L.Pass;for(var i=a.listSelections(),r=[],l=a.getOption("autoCloseTags"),p=0;pf.ch&&(d=d.slice(0,d.length-b.end+f.ch));var s=d.toLowerCase();if(!d||b.type=="string"&&(b.end!=f.ch||!/[\"\']/.test(b.string.charAt(b.string.length-1))||b.string.length==1)||b.type=="tag"&&n.close||b.string.indexOf("/")==f.ch-b.start-1||T&&C(T,s)>-1||c(a,v.mode.xmlCurrentContext&&v.mode.xmlCurrentContext(m)||[],d,f,!0))return L.Pass;var M=typeof l=="object"&&l.emptyTags;if(M&&C(M,d)>-1){r[p]={text:"/>",newPos:L.Pos(f.line,f.ch+2)};continue}var A=y&&C(y,s)>-1;r[p]={indent:A,text:">"+(A?` `:"")+"",newPos:A?L.Pos(f.line+1,0):L.Pos(f.line,f.ch+1)}}for(var x=typeof l=="object"&&l.dontIndentOnAutoClose,p=i.length-1;p>=0;p--){var E=r[p];a.replaceRange(E.text,i[p].head,i[p].anchor,"+insert");var w=a.listSelections().slice(0);w[p]={head:E.newPos,anchor:E.newPos},a.setSelections(w),!x&&E.indent&&(a.indentLine(E.newPos.line,null,!0),a.indentLine(E.newPos.line+1,null,!0))}}function h(a,i){for(var r=a.listSelections(),l=[],p=i?"/":""&&(T+=">"),l[v]=T}if(a.replaceSelections(l),r=a.listSelections(),!b)for(var v=0;v=0&&i[m]==r;m--)++v;l=b.to;for(var m=1;m0){for(var i=0;i1&&arguments[1]!==void 0?arguments[1]:"",i=[],r=0;r=0;i--){var r=S().key(i);a(R(r),r)}}function C(a){return S().removeItem(a)}function c(){return S().clear()}},D1Df:function(I,J,P){"use strict";function L(k){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?L=function(H){return typeof H}:L=function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},L(k)}function u(){return u=Object.assign||function(k){for(var z=1;z=0)continue;if(!Object.prototype.propertyIsEnumerable.call(k,F))continue;H[F]=k[F]}}return H}function o(k,z){if(k==null)return{};var H={},F=Object.keys(k),G,B;for(B=0;B=0)continue;H[G]=k[G]}return H}function C(k,z){if(!(k instanceof z))throw new TypeError("Cannot call a class as a function")}function c(k,z){for(var H=0;H>6),z+=String.fromCharCode(128|F&63)):F<55296||F>=57344?(z+=String.fromCharCode(224|F>>12),z+=String.fromCharCode(128|F>>6&63),z+=String.fromCharCode(128|F&63)):(H++,F=65536+((F&1023)<<10|k.charCodeAt(H)&1023),z+=String.fromCharCode(240|F>>18),z+=String.fromCharCode(128|F>>12&63),z+=String.fromCharCode(128|F>>6&63),z+=String.fromCharCode(128|F&63))}return z}var T={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},y={},s=4,M=.1;function A(k){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,H=[];return k.forEach(function(F,G){var B=null;F.forEach(function(W,K){if(!W&&B!==null){H.push("M".concat(B+z," ").concat(G+z,"h").concat(K-B,"v1H").concat(B+z,"z")),B=null;return}if(K===F.length-1){if(!W)return;B===null?H.push("M".concat(K+z,",").concat(G+z," h1v1H").concat(K+z,"z")):H.push("M".concat(B+z,",").concat(G+z," h").concat(K+1-B,"v1H").concat(B+z,"z"));return}W&&B===null&&(B=K)})}),H.join("")}function x(k,z){return k.slice().map(function(H,F){return F=z.y+z.h?H:H.map(function(G,B){return B=z.x+z.w?G:!1})})}function E(k,z){var H=k.imageSettings,F=k.size,G=k.includeMargin;if(H==null)return null;var B=G?s:0,W=z.length+B*2,K=Math.floor(F*M),q=W/F,re=(H.width||K)*q,ee=(H.height||K)*q,Ce=H.x==null?z.length/2-re/2:H.x*q,xe=H.y==null?z.length/2-ee/2:H.y*q,he=null;if(H.excavate){var ke=Math.floor(Ce),_e=Math.floor(xe),de=Math.ceil(re+Ce-ke),ce=Math.ceil(ee+xe-_e);he={x:ke,y:_e,w:de,h:ce}}return{x:Ce,y:xe,h:ee,w:re,excavation:he}}var w=function(){try{new Path2D().addPath(new Path2D)}catch(k){return!1}return!0}(),_=function(k){p(z,k);function z(){var H,F;C(this,z);for(var G=arguments.length,B=new Array(G),W=0;WUe.length)&&(Me=Ue.length);for(var Ie=0,ye=new Array(Me);Ie=Ue.length?{done:!0}:{done:!1,value:Ue[ye++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return Ie=Ue[Symbol.iterator](),Ie.next.bind(Ie)}function o(Ue,Me){return Me={exports:{}},Ue(Me,Me.exports),Me.exports}var C=o(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 Ie(ye){Ue.exports.defaults=ye}Ue.exports={defaults:Me(),getDefaults:Me,changeDefaults:Ie}}),c=C.defaults,a=C.getDefaults,i=C.changeDefaults,r=/[&<>"']/,l=/[&<>"']/g,p=/[<>"']|&(?!#?\w+;)/,f=/[<>"']|&(?!#?\w+;)/g,b={"&":"&","<":"<",">":">",'"':""","'":"'"},v=function(Me){return b[Me]};function m(Ue,Me){if(Me){if(r.test(Ue))return Ue.replace(l,v)}else if(p.test(Ue))return Ue.replace(f,v);return Ue}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function d(Ue){return Ue.replace(n,function(Me,Ie){return Ie=Ie.toLowerCase(),Ie==="colon"?":":Ie.charAt(0)==="#"?Ie.charAt(1)==="x"?String.fromCharCode(parseInt(Ie.substring(2),16)):String.fromCharCode(+Ie.substring(1)):""})}var g=/(^|[^\[])\^/g;function T(Ue,Me){Ue=Ue.source||Ue,Me=Me||"";var Ie={replace:function(Te,Ae){return Ae=Ae.source||Ae,Ae=Ae.replace(g,"$1"),Ue=Ue.replace(Te,Ae),Ie},getRegex:function(){return new RegExp(Ue,Me)}};return Ie}var y=/[^\w:]/g,s=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function M(Ue,Me,Ie){if(Ue){var ye;try{ye=decodeURIComponent(d(Ie)).replace(y,"").toLowerCase()}catch(Te){return null}if(ye.indexOf("javascript:")===0||ye.indexOf("vbscript:")===0||ye.indexOf("data:")===0)return null}Me&&!s.test(Ie)&&(Ie=_(Me,Ie));try{Ie=encodeURI(Ie).replace(/%25/g,"%")}catch(Te){return null}return Ie}var A={},x=/^[^:]+:\/*[^/]*$/,E=/^([^:]+:)[\s\S]*$/,w=/^([^:]+:\/*[^/]*)[\s\S]*$/;function _(Ue,Me){A[" "+Ue]||(x.test(Ue)?A[" "+Ue]=Ue+"/":A[" "+Ue]=z(Ue,"/",!0)),Ue=A[" "+Ue];var Ie=Ue.indexOf(":")===-1;return Me.substring(0,2)==="//"?Ie?Me:Ue.replace(E,"$1")+Me:Me.charAt(0)==="/"?Ie?Me:Ue.replace(w,"$1")+Me:Ue+Me}var N={exec:function(){}};function j(Ue){for(var Me=1,Ie,ye;Me=0&&Xe[ft]==="\\";)rt=!rt;return rt?"|":" |"}),ye=Ie.split(/ \|/),Te=0;if(ye.length>Me)ye.splice(Me);else for(;ye.length=ye.length?Te.slice(ye.length):Te}).join(` `)}var xe=function(){function Ue(Ie){this.options=Ie||B}var Me=Ue.prototype;return Me.space=function(ye){var Te=this.rules.block.newline.exec(ye);if(Te)return Te[0].length>1?{type:"space",raw:Te[0]}:{raw:` `}},Me.code=function(ye,Te){var Ae=this.rules.block.code.exec(ye);if(Ae){var Pe=Te[Te.length-1];if(Pe&&Pe.type==="paragraph")return{raw:Ae[0],text:Ae[0].trimRight()};var Xe=Ae[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ae[0],codeBlockStyle:"indented",text:this.options.pedantic?Xe:W(Xe,` `)}}},Me.fences=function(ye){var Te=this.rules.block.fences.exec(ye);if(Te){var Ae=Te[0],Pe=Ce(Ae,Te[3]||"");return{type:"code",raw:Ae,lang:Te[2]?Te[2].trim():Te[2],text:Pe}}},Me.heading=function(ye){var Te=this.rules.block.heading.exec(ye);if(Te)return{type:"heading",raw:Te[0],depth:Te[1].length,text:Te[2]}},Me.nptable=function(ye){var Te=this.rules.block.nptable.exec(ye);if(Te){var Ae={type:"table",header:K(Te[1].replace(/^ *| *\| *$/g,"")),align:Te[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Te[3]?Te[3].replace(/\n$/,"").split(` `):[],raw:Te[0]};if(Ae.header.length===Ae.align.length){var Pe=Ae.align.length,Xe;for(Xe=0;Xe ?/gm,"");return{type:"blockquote",raw:Te[0],text:Ae}}},Me.list=function(ye){var Te=this.rules.block.list.exec(ye);if(Te){for(var Ae=Te[0],Pe=Te[2],Xe=Pe.length>1,rt=Pe[Pe.length-1]===")",ft={type:"list",raw:Ae,ordered:Xe,start:Xe?+Pe.slice(0,-1):"",loose:!1,items:[]},St=Te[0].match(this.rules.block.item),Pt=!1,dt,At,Ot,bt,Vt,ir,Qt,dr=St.length,Nt=0;Nt1||this.options.smartLists&&Ot!==Pe)&&(bt=St.slice(Nt+1).join(` `),ft.raw=ft.raw.substring(0,ft.raw.length-bt.length),Nt=dr-1)),Vt=Pt||/\n\n(?!\s*$)/.test(dt),Nt!==dr-1&&(Pt=dt.charAt(dt.length-1)===` `,Vt||(Vt=Pt)),Vt&&(ft.loose=!0),ir=/^\[[ xX]\] /.test(dt),Qt=void 0,ir&&(Qt=dt[1]!==" ",dt=dt.replace(/^\[[ xX]\] +/,"")),ft.items.push({type:"list_item",raw:Ae,task:ir,checked:Qt,loose:Vt,text:dt});return ft}},Me.html=function(ye){var Te=this.rules.block.html.exec(ye);if(Te)return{type:this.options.sanitize?"paragraph":"html",raw:Te[0],pre:!this.options.sanitizer&&(Te[1]==="pre"||Te[1]==="script"||Te[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Te[0]):q(Te[0]):Te[0]}},Me.def=function(ye){var Te=this.rules.block.def.exec(ye);if(Te){Te[3]&&(Te[3]=Te[3].substring(1,Te[3].length-1));var Ae=Te[1].toLowerCase().replace(/\s+/g," ");return{tag:Ae,raw:Te[0],href:Te[2],title:Te[3]}}},Me.table=function(ye){var Te=this.rules.block.table.exec(ye);if(Te){var Ae={type:"table",header:K(Te[1].replace(/^ *| *\| *$/g,"")),align:Te[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Te[3]?Te[3].replace(/\n$/,"").split(` `):[]};if(Ae.header.length===Ae.align.length){Ae.raw=Te[0];var Pe=Ae.align.length,Xe;for(Xe=0;Xe/i.test(Pe[0])&&(Te=!1),!Ae&&/^<(pre|code|kbd|script)(\s|>)/i.test(Pe[0])?Ae=!0:Ae&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Pe[0])&&(Ae=!1),{type:this.options.sanitize?"text":"html",raw:Pe[0],inLink:Te,inRawBlock:Ae,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Pe[0]):q(Pe[0]):Pe[0]}},Me.link=function(ye){var Te=this.rules.inline.link.exec(ye);if(Te){var Ae=re(Te[2],"()");if(Ae>-1){var Pe=Te[0].indexOf("!")===0?5:4,Xe=Pe+Te[1].length+Ae;Te[2]=Te[2].substring(0,Ae),Te[0]=Te[0].substring(0,Xe).trim(),Te[3]=""}var rt=Te[2],ft="";if(this.options.pedantic){var St=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(rt);St?(rt=St[1],ft=St[3]):ft=""}else ft=Te[3]?Te[3].slice(1,-1):"";rt=rt.trim().replace(/^<([\s\S]*)>$/,"$1");var Pt=ee(Te,{href:rt&&rt.replace(this.rules.inline._escapes,"$1"),title:ft&&ft.replace(this.rules.inline._escapes,"$1")},Te[0]);return Pt}},Me.reflink=function(ye,Te){var Ae;if((Ae=this.rules.inline.reflink.exec(ye))||(Ae=this.rules.inline.nolink.exec(ye))){var Pe=(Ae[2]||Ae[1]).replace(/\s+/g," ");if(Pe=Te[Pe.toLowerCase()],!Pe||!Pe.href){var Xe=Ae[0].charAt(0);return{type:"text",raw:Xe,text:Xe}}var rt=ee(Ae,Pe,Ae[0]);return rt}},Me.strong=function(ye,Te,Ae){Ae===void 0&&(Ae="");var Pe=this.rules.inline.strong.start.exec(ye);if(Pe&&(!Pe[1]||Pe[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){Te=Te.slice(-1*ye.length);var Xe=Pe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Xe.lastIndex=0;for(var rt;(Pe=Xe.exec(Te))!=null;)if(rt=this.rules.inline.strong.middle.exec(Te.slice(0,Pe.index+3)),rt)return{type:"strong",raw:ye.slice(0,rt[0].length),text:ye.slice(2,rt[0].length-2)}}},Me.em=function(ye,Te,Ae){Ae===void 0&&(Ae="");var Pe=this.rules.inline.em.start.exec(ye);if(Pe&&(!Pe[1]||Pe[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){Te=Te.slice(-1*ye.length);var Xe=Pe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Xe.lastIndex=0;for(var rt;(Pe=Xe.exec(Te))!=null;)if(rt=this.rules.inline.em.middle.exec(Te.slice(0,Pe.index+2)),rt)return{type:"em",raw:ye.slice(0,rt[0].length),text:ye.slice(1,rt[0].length-1)}}},Me.codespan=function(ye){var Te=this.rules.inline.code.exec(ye);if(Te){var Ae=Te[2].replace(/\n/g," "),Pe=/[^ ]/.test(Ae),Xe=Ae.startsWith(" ")&&Ae.endsWith(" ");return Pe&&Xe&&(Ae=Ae.substring(1,Ae.length-1)),Ae=q(Ae,!0),{type:"codespan",raw:Te[0],text:Ae}}},Me.br=function(ye){var Te=this.rules.inline.br.exec(ye);if(Te)return{type:"br",raw:Te[0]}},Me.del=function(ye){var Te=this.rules.inline.del.exec(ye);if(Te)return{type:"del",raw:Te[0],text:Te[1]}},Me.autolink=function(ye,Te){var Ae=this.rules.inline.autolink.exec(ye);if(Ae){var Pe,Xe;return Ae[2]==="@"?(Pe=q(this.options.mangle?Te(Ae[1]):Ae[1]),Xe="mailto:"+Pe):(Pe=q(Ae[1]),Xe=Pe),{type:"link",raw:Ae[0],text:Pe,href:Xe,tokens:[{type:"text",raw:Pe,text:Pe}]}}},Me.url=function(ye,Te){var Ae;if(Ae=this.rules.inline.url.exec(ye)){var Pe,Xe;if(Ae[2]==="@")Pe=q(this.options.mangle?Te(Ae[0]):Ae[0]),Xe="mailto:"+Pe;else{var rt;do rt=Ae[0],Ae[0]=this.rules.inline._backpedal.exec(Ae[0])[0];while(rt!==Ae[0]);Pe=q(Ae[0]),Ae[1]==="www."?Xe="http://"+Pe:Xe=Pe}return{type:"link",raw:Ae[0],text:Pe,href:Xe,tokens:[{type:"text",raw:Pe,text:Pe}]}}},Me.inlineText=function(ye,Te,Ae){var Pe=this.rules.inline.text.exec(ye);if(Pe){var Xe;return Te?Xe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Pe[0]):q(Pe[0]):Pe[0]:Xe=q(this.options.smartypants?Ae(Pe[0]):Pe[0]),{type:"text",raw:Pe[0],text:Xe}}},Ue}(),he=G.noopTest,ke=G.edit,_e=G.merge,de={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:he,table:he,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};de._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,de._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,de.def=ke(de.def).replace("label",de._label).replace("title",de._title).getRegex(),de.bullet=/(?:[*+-]|\d{1,9}[.)])/,de.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,de.item=ke(de.item,"gm").replace(/bull/g,de.bullet).getRegex(),de.list=ke(de.list).replace(/bull/g,de.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+de.def.source+")").getRegex(),de._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",de._comment=//,de.html=ke(de.html,"i").replace("comment",de._comment).replace("tag",de._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),de.paragraph=ke(de._paragraph).replace("hr",de.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",de._tag).getRegex(),de.blockquote=ke(de.blockquote).replace("paragraph",de.paragraph).getRegex(),de.normal=_e({},de),de.gfm=_e({},de.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*|$)"}),de.gfm.nptable=ke(de.gfm.nptable).replace("hr",de.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",de._tag).getRegex(),de.gfm.table=ke(de.gfm.table).replace("hr",de.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",de._tag).getRegex(),de.pedantic=_e({},de.normal,{html:ke(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",de._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:he,paragraph:ke(de.normal._paragraph).replace("hr",de.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",de.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ce={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:he,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:he,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",ce.punctuation=ke(ce.punctuation).replace(/punctuation/g,ce._punctuation).getRegex(),ce._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ce._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ce.em.start=ke(ce.em.start).replace(/punctuation/g,ce._punctuation).getRegex(),ce.em.middle=ke(ce.em.middle).replace(/punctuation/g,ce._punctuation).replace(/overlapSkip/g,ce._overlapSkip).getRegex(),ce.em.endAst=ke(ce.em.endAst,"g").replace(/punctuation/g,ce._punctuation).getRegex(),ce.em.endUnd=ke(ce.em.endUnd,"g").replace(/punctuation/g,ce._punctuation).getRegex(),ce.strong.start=ke(ce.strong.start).replace(/punctuation/g,ce._punctuation).getRegex(),ce.strong.middle=ke(ce.strong.middle).replace(/punctuation/g,ce._punctuation).replace(/blockSkip/g,ce._blockSkip).getRegex(),ce.strong.endAst=ke(ce.strong.endAst,"g").replace(/punctuation/g,ce._punctuation).getRegex(),ce.strong.endUnd=ke(ce.strong.endUnd,"g").replace(/punctuation/g,ce._punctuation).getRegex(),ce.blockSkip=ke(ce._blockSkip,"g").getRegex(),ce.overlapSkip=ke(ce._overlapSkip,"g").getRegex(),ce._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ce._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ce._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,ce.autolink=ke(ce.autolink).replace("scheme",ce._scheme).replace("email",ce._email).getRegex(),ce._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ce.tag=ke(ce.tag).replace("comment",de._comment).replace("attribute",ce._attribute).getRegex(),ce._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ce._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ce._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ce.link=ke(ce.link).replace("label",ce._label).replace("href",ce._href).replace("title",ce._title).getRegex(),ce.reflink=ke(ce.reflink).replace("label",ce._label).getRegex(),ce.reflinkSearch=ke(ce.reflinkSearch,"g").replace("reflink",ce.reflink).replace("nolink",ce.nolink).getRegex(),ce.normal=_e({},ce),ce.pedantic=_e({},ce.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:ke(/^!?\[(label)\]\((.*?)\)/).replace("label",ce._label).getRegex(),reflink:ke(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ce._label).getRegex()}),ce.gfm=_e({},ce.normal,{escape:ke(ce.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(ye="x"+ye.toString(16)),Me+="&#"+ye+";";return Me}var Q=function(){function Ue(Ie){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ie||Se,this.options.tokenizer=this.options.tokenizer||new xe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ye={block:te.normal,inline:ue.normal};this.options.pedantic?(ye.block=te.pedantic,ye.inline=ue.pedantic):this.options.gfm&&(ye.block=te.gfm,this.options.breaks?ye.inline=ue.breaks:ye.inline=ue.gfm),this.tokenizer.rules=ye}Ue.lex=function(ye,Te){var Ae=new Ue(Te);return Ae.lex(ye)};var Me=Ue.prototype;return Me.lex=function(ye){return ye=ye.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(ye,this.tokens,!0),this.inline(this.tokens),this.tokens},Me.blockTokens=function(ye,Te,Ae){Te===void 0&&(Te=[]),Ae===void 0&&(Ae=!0),ye=ye.replace(/^ +$/gm,"");for(var Pe,Xe,rt,ft;ye;){if(Pe=this.tokenizer.space(ye)){ye=ye.substring(Pe.raw.length),Pe.type&&Te.push(Pe);continue}if(Pe=this.tokenizer.code(ye,Te)){ye=ye.substring(Pe.raw.length),Pe.type?Te.push(Pe):(ft=Te[Te.length-1],ft.raw+=` `+Pe.raw,ft.text+=` `+Pe.text);continue}if(Pe=this.tokenizer.fences(ye)){ye=ye.substring(Pe.raw.length),Te.push(Pe);continue}if(Pe=this.tokenizer.heading(ye)){ye=ye.substring(Pe.raw.length),Te.push(Pe);continue}if(Pe=this.tokenizer.nptable(ye)){ye=ye.substring(Pe.raw.length),Te.push(Pe);continue}if(Pe=this.tokenizer.hr(ye)){ye=ye.substring(Pe.raw.length),Te.push(Pe);continue}if(Pe=this.tokenizer.blockquote(ye)){ye=ye.substring(Pe.raw.length),Pe.tokens=this.blockTokens(Pe.text,[],Ae),Te.push(Pe);continue}if(Pe=this.tokenizer.list(ye)){for(ye=ye.substring(Pe.raw.length),rt=Pe.items.length,Xe=0;Xe0)for(;(St=this.tokenizer.rules.inline.reflinkSearch.exec(ft))!=null;)Pt.includes(St[0].slice(St[0].lastIndexOf("[")+1,-1))&&(ft=ft.slice(0,St.index)+"["+"a".repeat(St[0].length-2)+"]"+ft.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(St=this.tokenizer.rules.inline.blockSkip.exec(ft))!=null;)ft=ft.slice(0,St.index)+"["+"a".repeat(St[0].length-2)+"]"+ft.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ye;){if(rt=this.tokenizer.escape(ye)){ye=ye.substring(rt.raw.length),Te.push(rt);continue}if(rt=this.tokenizer.tag(ye,Ae,Pe)){ye=ye.substring(rt.raw.length),Ae=rt.inLink,Pe=rt.inRawBlock,Te.push(rt);continue}if(rt=this.tokenizer.link(ye)){ye=ye.substring(rt.raw.length),rt.type==="link"&&(rt.tokens=this.inlineTokens(rt.text,[],!0,Pe)),Te.push(rt);continue}if(rt=this.tokenizer.reflink(ye,this.tokens.links)){ye=ye.substring(rt.raw.length),rt.type==="link"&&(rt.tokens=this.inlineTokens(rt.text,[],!0,Pe)),Te.push(rt);continue}if(rt=this.tokenizer.strong(ye,ft,Xe)){ye=ye.substring(rt.raw.length),rt.tokens=this.inlineTokens(rt.text,[],Ae,Pe),Te.push(rt);continue}if(rt=this.tokenizer.em(ye,ft,Xe)){ye=ye.substring(rt.raw.length),rt.tokens=this.inlineTokens(rt.text,[],Ae,Pe),Te.push(rt);continue}if(rt=this.tokenizer.codespan(ye)){ye=ye.substring(rt.raw.length),Te.push(rt);continue}if(rt=this.tokenizer.br(ye)){ye=ye.substring(rt.raw.length),Te.push(rt);continue}if(rt=this.tokenizer.del(ye)){ye=ye.substring(rt.raw.length),rt.tokens=this.inlineTokens(rt.text,[],Ae,Pe),Te.push(rt);continue}if(rt=this.tokenizer.autolink(ye,le)){ye=ye.substring(rt.raw.length),Te.push(rt);continue}if(!Ae&&(rt=this.tokenizer.url(ye,le))){ye=ye.substring(rt.raw.length),Te.push(rt);continue}if(rt=this.tokenizer.inlineText(ye,Pe,Oe)){ye=ye.substring(rt.raw.length),Xe=rt.raw.slice(-1),Te.push(rt);continue}if(ye){var dt="Infinite loop on byte: "+ye.charCodeAt(0);if(this.options.silent){console.error(dt);break}else throw new Error(dt)}}return Te},u(Ue,null,[{key:"rules",get:function(){return{block:te,inline:ue}}}]),Ue}(),Y=C.defaults,Z=G.cleanUrl,be=G.escape,ge=function(){function Ue(Ie){this.options=Ie||Y}var Me=Ue.prototype;return Me.code=function(ye,Te,Ae){var Pe=(Te||"").match(/\S*/)[0];if(this.options.highlight){var Xe=this.options.highlight(ye,Pe);Xe!=null&&Xe!==ye&&(Ae=!0,ye=Xe)}return Pe?'
    '+(Ae?ye:be(ye,!0))+`
    `:"
    "+(Ae?ye:be(ye,!0))+`
    `},Me.blockquote=function(ye){return`
    `+ye+`
    `},Me.html=function(ye){return ye},Me.heading=function(ye,Te,Ae,Pe){return this.options.headerIds?"'+ye+" `:""+ye+" `},Me.hr=function(){return this.options.xhtml?`
    `:`
    `},Me.list=function(ye,Te,Ae){var Pe=Te?"ol":"ul",Xe=Te&&Ae!==1?' start="'+Ae+'"':"";return"<"+Pe+Xe+`> `+ye+" `},Me.listitem=function(ye){return"
  • "+ye+`
  • `},Me.checkbox=function(ye){return" "},Me.paragraph=function(ye){return"

    "+ye+`

    `},Me.table=function(ye,Te){return Te&&(Te=""+Te+""),` `+ye+` `+Te+`
    `},Me.tablerow=function(ye){return` `+ye+` `},Me.tablecell=function(ye,Te){var Ae=Te.header?"th":"td",Pe=Te.align?"<"+Ae+' align="'+Te.align+'">':"<"+Ae+">";return Pe+ye+" `},Me.strong=function(ye){return""+ye+""},Me.em=function(ye){return""+ye+""},Me.codespan=function(ye){return""+ye+""},Me.br=function(){return this.options.xhtml?"
    ":"
    "},Me.del=function(ye){return""+ye+""},Me.link=function(ye,Te,Ae){if(ye=Z(this.options.sanitize,this.options.baseUrl,ye),ye===null)return Ae;var Pe='",Pe},Me.image=function(ye,Te,Ae){if(ye=Z(this.options.sanitize,this.options.baseUrl,ye),ye===null)return Ae;var Pe=''+Ae+'":">",Pe},Me.text=function(ye){return ye},Ue}(),De=function(){function Ue(){}var Me=Ue.prototype;return Me.strong=function(ye){return ye},Me.em=function(ye){return ye},Me.codespan=function(ye){return ye},Me.del=function(ye){return ye},Me.html=function(ye){return ye},Me.text=function(ye){return ye},Me.link=function(ye,Te,Ae){return""+Ae},Me.image=function(ye,Te,Ae){return""+Ae},Me.br=function(){return""},Ue}(),Qe=function(){function Ue(){this.seen={}}var Me=Ue.prototype;return Me.slug=function(ye){var Te=ye.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Te)){var Ae=Te;do this.seen[Ae]++,Te=Ae+"-"+this.seen[Ae];while(this.seen.hasOwnProperty(Te))}return this.seen[Te]=0,Te},Ue}(),Ze=C.defaults,nt=G.unescape,tt=function(){function Ue(Ie){this.options=Ie||Ze,this.options.renderer=this.options.renderer||new ge,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new De,this.slugger=new Qe}Ue.parse=function(ye,Te){var Ae=new Ue(Te);return Ae.parse(ye)};var Me=Ue.prototype;return Me.parse=function(ye,Te){Te===void 0&&(Te=!0);var Ae="",Pe,Xe,rt,ft,St,Pt,dt,At,Ot,bt,Vt,ir,Qt,dr,Nt,br,ur,wt,hr=ye.length;for(Pe=0;Pe0&&Nt.tokens[0].type==="text"?(Nt.tokens[0].text=wt+" "+Nt.tokens[0].text,Nt.tokens[0].tokens&&Nt.tokens[0].tokens.length>0&&Nt.tokens[0].tokens[0].type==="text"&&(Nt.tokens[0].tokens[0].text=wt+" "+Nt.tokens[0].tokens[0].text)):Nt.tokens.unshift({type:"text",text:wt}):dr+=wt),dr+=this.parse(Nt.tokens,Qt),Ot+=this.renderer.listitem(dr,ur,br);Ae+=this.renderer.list(Ot,Vt,ir);continue}case"html":{Ae+=this.renderer.html(bt.text);continue}case"paragraph":{Ae+=this.renderer.paragraph(this.parseInline(bt.tokens));continue}case"text":{for(Ot=bt.tokens?this.parseInline(bt.tokens):bt.text;Pe+1An error occurred:

    "+je(rt.message+"",!0)+"
    ";throw rt}}$e.options=$e.setOptions=function(Ue){return lt($e.defaults,Ue),et($e.defaults),$e},$e.getDefaults=Re,$e.defaults=ct,$e.use=function(Ue){var Me=lt({},Ue);if(Ue.renderer&&function(){var ye=$e.defaults.renderer||new ge,Te=function(Xe){var rt=ye[Xe];ye[Xe]=function(){for(var ft=arguments.length,St=new Array(ft),Pt=0;Pt=0;p--){if(!S(l[p]))continue;var f=l[p].split("="),b=unescape(f[0]),v=unescape(f[1]);r(v,b)}}function C(r,l){if(!r)return;R.cookie=escape(r)+"="+escape(l)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function c(r){if(!r||!i(r))return;R.cookie=escape(r)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function a(){o(function(r,l){c(l)})}function i(r){return new RegExp("(?:^|;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(R.cookie)}},E4JC:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("ETIr"),P("cv67"),P("K3mO"),P("OLod"))})(this,function(L){return function(){var u=L,S=u.lib,R=S.StreamCipher,h=u.algo,o=[],C=[],c=[],a=h.Rabbit=R.extend({_doReset:function(){for(var r=this._key.words,l=this.cfg.iv,p=0;p<4;p++)r[p]=(r[p]<<8|r[p]>>>24)&16711935|(r[p]<<24|r[p]>>>8)&4278255360;var f=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],b=this._C=[r[2]<<16|r[2]>>>16,r[0]&4294901760|r[1]&65535,r[3]<<16|r[3]>>>16,r[1]&4294901760|r[2]&65535,r[0]<<16|r[0]>>>16,r[2]&4294901760|r[3]&65535,r[1]<<16|r[1]>>>16,r[3]&4294901760|r[0]&65535];this._b=0;for(var p=0;p<4;p++)i.call(this);for(var p=0;p<8;p++)b[p]^=f[p+4&7];if(l){var v=l.words,m=v[0],n=v[1],d=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,g=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,T=d>>>16|g&4294901760,y=g<<16|d&65535;b[0]^=d,b[1]^=T,b[2]^=g,b[3]^=y,b[4]^=d,b[5]^=T,b[6]^=g,b[7]^=y;for(var p=0;p<4;p++)i.call(this)}},_doProcessBlock:function(r,l){var p=this._X;i.call(this),o[0]=p[0]^p[5]>>>16^p[3]<<16,o[1]=p[2]^p[7]>>>16^p[5]<<16,o[2]=p[4]^p[1]>>>16^p[7]<<16,o[3]=p[6]^p[3]>>>16^p[1]<<16;for(var f=0;f<4;f++)o[f]=(o[f]<<8|o[f]>>>24)&16711935|(o[f]<<24|o[f]>>>8)&4278255360,r[l+f]^=o[f]},blockSize:128/32,ivSize:64/32});function i(){for(var r=this._X,l=this._C,p=0;p<8;p++)C[p]=l[p];l[0]=l[0]+1295307597+this._b|0,l[1]=l[1]+3545052371+(l[0]>>>0>>0?1:0)|0,l[2]=l[2]+886263092+(l[1]>>>0>>0?1:0)|0,l[3]=l[3]+1295307597+(l[2]>>>0>>0?1:0)|0,l[4]=l[4]+3545052371+(l[3]>>>0>>0?1:0)|0,l[5]=l[5]+886263092+(l[4]>>>0>>0?1:0)|0,l[6]=l[6]+1295307597+(l[5]>>>0>>0?1:0)|0,l[7]=l[7]+3545052371+(l[6]>>>0>>0?1:0)|0,this._b=l[7]>>>0>>0?1:0;for(var p=0;p<8;p++){var f=r[p]+l[p],b=f&65535,v=f>>>16,m=((b*b>>>17)+b*v>>>15)+v*v,n=((f&4294901760)*f|0)+((f&65535)*f|0);c[p]=m^n}r[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,r[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,r[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,r[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,r[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,r[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,r[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,r[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}u.Rabbit=R._createHelper(a)}(),L.Rabbit})},ELLl:function(I,J,P){(function(L){L(P("VrN/"))})(function(L){var u={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},S=L.Pos;L.defineOption("autoCloseBrackets",!1,function(b,v,m){m&&m!=L.Init&&(b.removeKeyMap(h),b.state.closeBrackets=null),v&&(o(R(v,"pairs")),b.state.closeBrackets=v,b.addKeyMap(h))});function R(b,v){return v=="pairs"&&typeof b=="string"?b:typeof b=="object"&&b[v]!=null?b[v]:u[v]}var h={Backspace:a,Enter:i};function o(b){for(var v=0;v=0;d--){var T=n[d].head;b.replaceRange("",S(T.line,T.ch-1),S(T.line,T.ch+1),"+delete")}}function i(b){var v=c(b),m=v&&R(v,"explode");if(!m||b.getOption("disableInput"))return L.Pass;for(var n=b.listSelections(),d=0;d0;return{anchor:new S(b.anchor.line,b.anchor.ch+(v?-1:1)),head:new S(b.head.line,b.head.ch+(v?1:-1))}}function l(b,v){var m=c(b);if(!m||b.getOption("disableInput"))return L.Pass;var n=R(m,"pairs"),d=n.indexOf(v);if(d==-1)return L.Pass;for(var g=R(m,"closeBefore"),T=R(m,"triples"),y=n.charAt(d+1)==v,s=b.listSelections(),M=d%2==0,A,x=0;x=0&&b.getRange(w,S(w.line,w.ch+3))==v+v+v?_="skipThree":_="skip";else if(y&&w.ch>1&&T.indexOf(v)>=0&&b.getRange(S(w.line,w.ch-2),w)==v+v){if(w.ch>2&&/\bstring/.test(b.getTokenTypeAt(S(w.line,w.ch-2))))return L.Pass;_="addFour"}else if(y){var j=w.ch==0?" ":b.getRange(S(w.line,w.ch-1),w);if(!L.isWordChar(N)&&j!=v&&!L.isWordChar(j))_="both";else return L.Pass}else if(M&&(N.length===0||/\s/.test(N)||g.indexOf(N)>-1))_="both";else return L.Pass;if(!A)A=_;else if(A!=_)return L.Pass}var k=d%2?n.charAt(d-1):v,z=d%2?v:n.charAt(d+1);b.operation(function(){if(A=="skip")b.execCommand("goCharRight");else if(A=="skipThree")for(var H=0;H<3;H++)b.execCommand("goCharRight");else if(A=="surround"){for(var F=b.getSelections(),H=0;H>>24)&16711935|(A<<24|A>>>8)&4278255360}var x=this._hash.words,E=l.words,w=p.words,_=c.words,N=a.words,j=i.words,k=r.words,z,H,F,G,B,W,K,q,re,ee;W=z=x[0],K=H=x[1],q=F=x[2],re=G=x[3],ee=B=x[4];for(var Ce,s=0;s<80;s+=1)Ce=z+T[y+_[s]]|0,s<16?Ce+=b(H,F,G)+E[0]:s<32?Ce+=v(H,F,G)+E[1]:s<48?Ce+=m(H,F,G)+E[2]:s<64?Ce+=n(H,F,G)+E[3]:Ce+=d(H,F,G)+E[4],Ce=Ce|0,Ce=g(Ce,j[s]),Ce=Ce+B|0,z=B,B=G,G=g(F,10),F=H,H=Ce,Ce=W+T[y+N[s]]|0,s<16?Ce+=d(K,q,re)+w[0]:s<32?Ce+=n(K,q,re)+w[1]:s<48?Ce+=m(K,q,re)+w[2]:s<64?Ce+=v(K,q,re)+w[3]:Ce+=b(K,q,re)+w[4],Ce=Ce|0,Ce=g(Ce,k[s]),Ce=Ce+ee|0,W=ee,ee=re,re=g(q,10),q=K,K=Ce;Ce=x[1]+F+re|0,x[1]=x[2]+G+ee|0,x[2]=x[3]+B+W|0,x[3]=x[4]+z+K|0,x[4]=x[0]+H+q|0,x[0]=Ce},_doFinalize:function(){var T=this._data,y=T.words,s=this._nDataBytes*8,M=T.sigBytes*8;y[M>>>5]|=128<<24-M%32,y[(M+64>>>9<<4)+14]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,T.sigBytes=(y.length+1)*4,this._process();for(var A=this._hash,x=A.words,E=0;E<5;E++){var w=x[E];x[E]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}return A},clone:function(){var T=o.clone.call(this);return T._hash=this._hash.clone(),T}});function b(T,y,s){return T^y^s}function v(T,y,s){return T&y|~T&s}function m(T,y,s){return(T|~y)^s}function n(T,y,s){return T&s|y&~s}function d(T,y,s){return T^(y|~s)}function g(T,y){return T<>>32-y}S.RIPEMD160=o._createHelper(f),S.HmacRIPEMD160=o._createHmacHelper(f)}(Math),L.RIPEMD160})},ETIr:function(I,J,P){(function(L,u){I.exports=J=u(P("Ib8C"))})(this,function(L){return function(){var u=L,S=u.lib,R=S.WordArray,h=u.enc,o=h.Base64={stringify:function(c){var a=c.words,i=c.sigBytes,r=this._map;c.clamp();for(var l=[],p=0;p>>2]>>>24-p%4*8&255,b=a[p+1>>>2]>>>24-(p+1)%4*8&255,v=a[p+2>>>2]>>>24-(p+2)%4*8&255,m=f<<16|b<<8|v,n=0;n<4&&p+n*.75>>6*(3-n)&63));var d=r.charAt(64);if(d)for(;l.length%4;)l.push(d);return l.join("")},parse:function(c){var a=c.length,i=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var l=0;l>>6-p%4*2,v=f|b;r[l>>>2]|=v<<24-l%4*8,l++}return R.create(r,l)}}(),L.enc.Base64})},"F+F2":function(I,J,P){(function(L,u){I.exports=J=u(P("Ib8C"))})(this,function(L){return function(){if(typeof ArrayBuffer!="function")return;var u=L,S=u.lib,R=S.WordArray,h=R.init,o=R.init=function(C){if(C instanceof ArrayBuffer&&(C=new Uint8Array(C)),(C instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&C instanceof Uint8ClampedArray||C instanceof Int16Array||C instanceof Uint16Array||C instanceof Int32Array||C instanceof Uint32Array||C instanceof Float32Array||C instanceof Float64Array)&&(C=new Uint8Array(C.buffer,C.byteOffset,C.byteLength)),C instanceof Uint8Array){for(var c=C.byteLength,a=[],i=0;i>>2]|=C[i]<<24-i%4*8;h.call(this,a,c)}else h.apply(this,arguments)};o.prototype=R}(),L.lib.WordArray})},GRuw:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("lPiR"))})(this,function(L){return function(){var u=L,S=u.lib,R=S.WordArray,h=u.algo,o=h.SHA256,C=h.SHA224=o.extend({_doReset:function(){this._hash=new R.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var c=o._doFinalize.call(this);return c.sigBytes-=4,c}});u.SHA224=o._createHelper(C),u.HmacSHA224=o._createHmacHelper(C)}(),L.SHA224})},GfqC:function(I,J,P){"use strict";var L=P("q1tI"),u=P.n(L),S=P("TSYQ"),R=P.n(S);function h(G,B){var W="cannot "+G.method+" "+G.action+" "+B.status+"'",K=new Error(W);return K.status=B.status,K.method=G.method,K.url=G.action,K}function o(G){var B=G.responseText||G.response;if(!B)return B;try{return JSON.parse(B)}catch(W){return B}}function C(G){var B=new XMLHttpRequest;G.onProgress&&B.upload&&(B.upload.onprogress=function(re){re.total>0&&(re.percent=re.loaded/re.total*100),G.onProgress(re)});var W=new FormData;G.data&&Object.keys(G.data).forEach(function(q){var re=G.data[q];if(Array.isArray(re)){re.forEach(function(ee){W.append(q+"[]",ee)});return}W.append(q,G.data[q])}),G.file instanceof Blob?W.append(G.filename,G.file,G.file.name):W.append(G.filename,G.file),B.onerror=function(re){G.onError(re)},B.onload=function(){return B.status<200||B.status>=300?G.onError(h(G,B),o(B)):G.onSuccess(o(B),B)},B.open(G.method,G.action,!0),G.withCredentials&&"withCredentials"in B&&(B.withCredentials=!0);var K=G.headers||{};return K["X-Requested-With"]!==null&&B.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(K).forEach(function(q){K[q]!==null&&B.setRequestHeader(q,K[q])}),B.send(W),{abort:function(){B.abort()}}}var c=+new Date,a=0;function i(){return"rc-upload-"+c+"-"+ ++a}function r(G,B){return G.indexOf(B,G.length-B.length)!==-1}var l=function(G,B){if(G&&B){var W=Array.isArray(B)?B:B.split(","),K=G.name||"",q=G.type||"",re=q.replace(/\/.*$/,"");return W.some(function(ee){var Ce=ee.trim();return Ce.charAt(0)==="."?r(K.toLowerCase(),Ce.toLowerCase()):/\/\*$/.test(Ce)?re===Ce.replace(/\/.*$/,""):q===Ce})}return!0};function p(G,B){var W=G.createReader(),K=[];function q(){W.readEntries(function(re){var ee=Array.prototype.slice.apply(re);K=K.concat(ee);var Ce=!ee.length;Ce?B(K):q()})}q()}var f=function(B,W,K){var q=function re(ee,Ce){Ce=Ce||"",ee.isFile?ee.file(function(xe){K(xe)&&(ee.fullPath&&!xe.webkitRelativePath&&(Object.defineProperties(xe,{webkitRelativePath:{writable:!0}}),xe.webkitRelativePath=ee.fullPath.replace(/^\//,""),Object.defineProperties(xe,{webkitRelativePath:{writable:!1}})),W([xe]))}):ee.isDirectory&&p(ee,function(xe){xe.forEach(function(he){re(he,""+Ce+ee.name+"/")})})};B.forEach(function(re){q(re.webkitGetAsEntry())})},b=f,v=Object.assign||function(G){for(var B=1;B=0)continue;if(!Object.prototype.hasOwnProperty.call(G,K))continue;W[K]=G[K]}return W}function T(G,B){if(!(G instanceof B))throw new TypeError("Cannot call a class as a function")}function y(G,B){if(!G)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:G}function s(G,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);G.prototype=Object.create(B&&B.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(G,B):G.__proto__=B)}var M=function(B){return Object.keys(B).reduce(function(W,K){return(K.substr(0,5)==="data-"||K.substr(0,5)==="aria-"||K==="role")&&(W[K]=B[K]),W},{})},A=function(G){s(B,G);function B(){var W,K,q,re;T(this,B);for(var ee=arguments.length,Ce=Array(ee),xe=0;xe=7&&this.setupTypeNumber(c),this.dataCache==null&&(this.dataCache=o.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,a)},C.setupPositionProbePattern=function(c,a){for(var i=-1;i<=7;i++){if(c+i<=-1||this.moduleCount<=c+i)continue;for(var r=-1;r<=7;r++){if(a+r<=-1||this.moduleCount<=a+r)continue;0<=i&&i<=6&&(r==0||r==6)||0<=r&&r<=6&&(i==0||i==6)||2<=i&&i<=4&&2<=r&&r<=4?this.modules[c+i][a+r]=!0:this.modules[c+i][a+r]=!1}}},C.getBestMaskPattern=function(){for(var c=0,a=0,i=0;i<8;i++){this.makeImpl(!0,i);var r=R.getLostPoint(this);(i==0||c>r)&&(c=r,a=i)}return a},C.createMovieClip=function(c,a,i){var r=c.createEmptyMovieClip(a,i),l=1;this.make();for(var p=0;p>i&1)==1;this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=r}for(var i=0;i<18;i++){var r=!c&&(a>>i&1)==1;this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=r}},C.setupTypeInfo=function(c,a){for(var i=this.errorCorrectLevel<<3|a,r=R.getBCHTypeInfo(i),l=0;l<15;l++){var p=!c&&(r>>l&1)==1;l<6?this.modules[l][8]=p:l<8?this.modules[l+1][8]=p:this.modules[this.moduleCount-15+l][8]=p}for(var l=0;l<15;l++){var p=!c&&(r>>l&1)==1;l<8?this.modules[8][this.moduleCount-l-1]=p:l<9?this.modules[8][15-l-1+1]=p:this.modules[8][15-l-1]=p}this.modules[this.moduleCount-8][8]=!c},C.mapData=function(c,a){for(var i=-1,r=this.moduleCount-1,l=7,p=0,f=this.moduleCount-1;f>0;f-=2)for(f==6&&f--;;){for(var b=0;b<2;b++)if(this.modules[r][f-b]==null){var v=!1;p>>l&1)==1);var m=R.getMask(a,r,f-b);m&&(v=!v),this.modules[r][f-b]=v,l--,l==-1&&(p++,l=7)}if(r+=i,r<0||this.moduleCount<=r){r-=i,i=-i;break}}},o.PAD0=236,o.PAD1=17,o.createData=function(c,a,i){for(var r=u.getRSBlocks(c,a),l=new S,p=0;pb*8)throw new Error("code length overflow. ("+l.getLengthInBits()+">"+b*8+")");for(l.getLengthInBits()+4<=b*8&&l.put(0,4);l.getLengthInBits()%8!=0;)l.putBit(!1);for(;!(l.getLengthInBits()>=b*8);){if(l.put(o.PAD0,8),l.getLengthInBits()>=b*8)break;l.put(o.PAD1,8)}return o.createBytes(l,r)},o.createBytes=function(c,a){for(var i=0,r=0,l=0,p=new Array(a.length),f=new Array(a.length),b=0;b=0?T.get(y):0}}for(var s=0,n=0;n>>2]>>>24-M%4*8&255;g[y+M>>>2]|=A<<24-(y+M)%4*8}else for(var x=0;x>>2]=T[x>>>2];return this.sigBytes+=s,this},clamp:function(){var d=this.words,g=this.sigBytes;d[g>>>2]&=4294967295<<32-g%4*8,d.length=S.ceil(g/4)},clone:function(){var d=i.clone.call(this);return d.words=this.words.slice(0),d},random:function(d){for(var g=[],T=0;T>>2]>>>24-s%4*8&255;y.push((M>>>4).toString(16)),y.push((M&15).toString(16))}return y.join("")},parse:function(d){for(var g=d.length,T=[],y=0;y>>3]|=parseInt(d.substr(y,2),16)<<24-y%8*4;return new r.init(T,g/2)}},f=l.Latin1={stringify:function(d){for(var g=d.words,T=d.sigBytes,y=[],s=0;s>>2]>>>24-s%4*8&255;y.push(String.fromCharCode(M))}return y.join("")},parse:function(d){for(var g=d.length,T=[],y=0;y>>2]|=(d.charCodeAt(y)&255)<<24-y%4*8;return new r.init(T,g)}},b=l.Utf8={stringify:function(d){try{return decodeURIComponent(escape(f.stringify(d)))}catch(g){throw new Error("Malformed UTF-8 data")}},parse:function(d){return f.parse(unescape(encodeURIComponent(d)))}},v=a.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(d){typeof d=="string"&&(d=b.parse(d)),this._data.concat(d),this._nDataBytes+=d.sigBytes},_process:function(d){var g,T=this._data,y=T.words,s=T.sigBytes,M=this.blockSize,A=M*4,x=s/A;d?x=S.ceil(x):x=S.max((x|0)-this._minBufferSize,0);var E=x*M,w=S.min(E*4,s);if(E){for(var _=0;_=0;)C^=h.G15<=0;)C^=h.G18<>>=1;return C},getPatternPosition:function(o){return h.PATTERN_POSITION_TABLE[o-1]},getMask:function(o,C,c){switch(o){case R.PATTERN000:return(C+c)%2==0;case R.PATTERN001:return C%2==0;case R.PATTERN010:return c%3==0;case R.PATTERN011:return(C+c)%3==0;case R.PATTERN100:return(Math.floor(C/2)+Math.floor(c/3))%2==0;case R.PATTERN101:return C*c%2+C*c%3==0;case R.PATTERN110:return(C*c%2+C*c%3)%2==0;case R.PATTERN111:return(C*c%3+(C+c)%2)%2==0;default:throw new Error("bad maskPattern:"+o)}},getErrorCorrectPolynomial:function(o){for(var C=new u([1],0),c=0;c5&&(c+=3+r-5)}for(var a=0;a>>6)+a(128|z&63):a(224|z>>>12&15)+a(128|z>>>6&63)+a(128|z&63)}else{var z=65536+(k.charCodeAt(0)-55296)*1024+(k.charCodeAt(1)-56320);return a(240|z>>>18&7)+a(128|z>>>12&63)+a(128|z>>>6&63)+a(128|z&63)}},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,l=function(k){return k.replace(r,i)},p=function(k){var z=[0,2,1][k.length%3],H=k.charCodeAt(0)<<16|(k.length>1?k.charCodeAt(1):0)<<8|(k.length>2?k.charCodeAt(2):0),F=[C.charAt(H>>>18),C.charAt(H>>>12&63),z>=2?"=":C.charAt(H>>>6&63),z>=1?"=":C.charAt(H&63)];return F.join("")},f=R.btoa&&typeof R.btoa=="function"?function(k){return R.btoa(k)}:function(k){if(k.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return k.replace(/[\s\S]{1,3}/g,p)},b=function(k){return f(l(String(k)))},v=function(k){return k.replace(/[+\/]/g,function(z){return z=="+"?"-":"_"}).replace(/=/g,"")},m=function(k,z){return z?v(b(k)):b(k)},n=function(k){return m(k,!0)},d;R.Uint8Array&&(d=function(k,z){for(var H="",F=0,G=k.length;F>>18)+C.charAt(q>>>12&63)+(typeof W!="undefined"?C.charAt(q>>>6&63):"=")+(typeof K!="undefined"?C.charAt(q&63):"=")}return z?v(H):H});var g=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,T=function(k){switch(k.length){case 4:var z=(7&k.charCodeAt(0))<<18|(63&k.charCodeAt(1))<<12|(63&k.charCodeAt(2))<<6|63&k.charCodeAt(3),H=z-65536;return a((H>>>10)+55296)+a((H&1023)+56320);case 3:return a((15&k.charCodeAt(0))<<12|(63&k.charCodeAt(1))<<6|63&k.charCodeAt(2));default:return a((31&k.charCodeAt(0))<<6|63&k.charCodeAt(1))}},y=function(k){return k.replace(g,T)},s=function(k){var z=k.length,H=z%4,F=(z>0?c[k.charAt(0)]<<18:0)|(z>1?c[k.charAt(1)]<<12:0)|(z>2?c[k.charAt(2)]<<6:0)|(z>3?c[k.charAt(3)]:0),G=[a(F>>>16),a(F>>>8&255),a(F&255)];return G.length-=[0,0,2,1][H],G.join("")},M=R.atob&&typeof R.atob=="function"?function(k){return R.atob(k)}:function(k){return k.replace(/\S{1,4}/g,s)},A=function(k){return M(String(k).replace(/[^A-Za-z0-9\+\/]/g,""))},x=function(k){return y(M(k))},E=function(k){return String(k).replace(/[-_]/g,function(z){return z=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},w=function(k){return x(E(k))},_;R.Uint8Array&&(_=function(k){return Uint8Array.from(A(E(k)),function(z){return z.charCodeAt(0)})});var N=function(){var k=R.Base64;return R.Base64=h,k};if(R.Base64={VERSION:o,atob:A,btoa:f,fromBase64:w,toBase64:m,utob:l,encode:m,encodeURI:n,btou:y,decode:w,noConflict:N,fromUint8Array:d,toUint8Array:_},typeof Object.defineProperty=="function"){var j=function(k){return{value:k,enumerable:!1,writable:!0,configurable:!0}};R.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",j(function(){return w(this)})),Object.defineProperty(String.prototype,"toBase64",j(function(k){return m(this,k)})),Object.defineProperty(String.prototype,"toBase64URI",j(function(){return m(this,!0)}))}}return R.Meteor&&(Base64=R.Base64),I.exports?I.exports.Base64=R.Base64:!(u=[],S=function(){return R.Base64}.apply(J,u),S!==void 0&&(I.exports=S)),{Base64:R.Base64}})}).call(this,P("IyRk"))},K3mO:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("3y9D"),P("WYAk"))})(this,function(L){return function(){var u=L,S=u.lib,R=S.Base,h=S.WordArray,o=u.algo,C=o.MD5,c=o.EvpKDF=R.extend({cfg:R.extend({keySize:128/32,hasher:C,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,i){for(var r,l=this.cfg,p=l.hasher.create(),f=h.create(),b=f.words,v=l.keySize,m=l.iterations;b.lengthke)){de.next=7;break}return S.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(ke/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),de.abrupt("return",!1);case 7:return H.push({name:he.name,file:he}),F(Object(R.a)(H)),j.onChange(H),de.abrupt("return",!1);case 11:case"end":return de.stop()}},xe)}));function Ce(xe){return ee.apply(this,arguments)}return Ce}()},re=function(){var ee=Object(c.a)(l.a.mark(function Ce(xe,he){var ke,_e,de,ce,ae,Se,te,ue,Oe;return l.a.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return he.file_name=xe.name,te=xe.name,Q.next=4,Object(b.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(ue=Q.sent,ue.data=JSON.parse(s(ue.data)),!((ue==null?void 0:ue.status)!==0)){Q.next=12;break}return H[H.findIndex(function(Y){return Y.name===te})].status="error",H[H.findIndex(function(Y){return Y.name===te})].file.status="error",j.onChange(H),S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),Q.abrupt("return");case 12:return W=new T.a({endpoint:ue==null||((ke=ue.data)===null||ke===void 0)?void 0:ke.end_point,region:ue==null||((_e=ue.data)===null||_e===void 0)?void 0:_e.region,accessKeyId:ue==null||((de=ue.data)===null||de===void 0)?void 0:de.access_key_id,accessKeySecret:ue==null||((ce=ue.data)===null||ce===void 0)?void 0:ce.access_key_secret,bucket:ue==null||((ae=ue.data)===null||ae===void 0)?void 0:ae.bucket,stsToken:ue==null||((Se=ue.data)===null||Se===void 0)?void 0:Se.security_token}),console.log(xe,"file"),K(W),Oe=Object(n.a)(),Q.abrupt("return",new Promise(function(Y,Z){try{var be;W.multipartUpload("".concat(j.identifier,"/").concat(Oe).concat(te.indexOf(".")>-1?"."+te.split(".").pop():""),new Blob([xe.file],{type:xe.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(De,Qe,Ze){try{console.log("\u8FDB\u5EA6",De,Qe,Ze);var nt=H.findIndex(function(tt){return tt.name===te});H[nt].file.percent=De*100,H[nt].tempCheckpoint=Qe,F(Object(R.a)(H))}catch(tt){}},checkpoint:H[H.findIndex(function(ge){return ge.name===te})].tempCheckpoint,callback:{customValue:{id:te+""},url:ue==null||((be=ue.data)===null||be===void 0)?void 0:be.callback_url,host:ue==null?void 0:ue.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(b.e)(he)}}).then(function(ge){var De,Qe=H.findIndex(function(st){return st.name===te}),Ze="done";if(((De=ge.data)===null||De===void 0?void 0:De.status)===0){var nt;xe.response=(nt=ge.data)===null||nt===void 0?void 0:nt.data;var tt=H.findIndex(function(st){return st.name===te});H[tt].status="done",H[tt].file.status="done"}else{var lt;S.b.warn((lt=ge.data)===null||lt===void 0?void 0:lt.message),Ze="error"}H[Qe].status=Ze,H[Qe].file.status=Ze,j.onChange(H),Y(ge==null?void 0:ge.data)}).catch(function(ge){H[H.findIndex(function(De){return De.name===te})].status="error",H[H.findIndex(function(De){return De.name===te})].file.status="error",S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),F(Object(R.a)(H)),j.onChange(H),Z(ge),console.log("err:",ge)})}catch(ge){}}));case 17:case"end":return Q.stop()}},Ce)}));return function(xe,he){return ee.apply(this,arguments)}}();return Object(p.useEffect)(function(){H.every(function(ee){return ee==="done"||ee==="error"})&&j.onComplete(H)},[H]),Object(p.useEffect)(function(){if(N){var ee;(ee=W)===null||ee===void 0||ee.cancel()}},[N]),Object(p.useEffect)(function(){j.uploading&&H.map(function(){var ee=Object(c.a)(l.a.mark(function Ce(xe){var he,ke;return l.a.wrap(function(de){for(;;)switch(de.prev=de.next){case 0:if(!((!xe.status||xe.status==="error")&&!N)){de.next=6;break}return xe.status="uploading",xe.file.status="uploading",de.next=5,re(xe,{login:_==null||((he=_.userInfo)===null||he===void 0)?void 0:he.login,container_type:j.container_type,container_id:j.container_id,description:j.description});case 5:ke=de.sent;case 6:case"end":return de.stop()}},Ce)}));return function(Ce){return ee.apply(this,arguments)}}())},[j.uploading]),f.a.createElement(y,Object(L.a)({},q,{height:j.height,className:j.className}),f.a.createElement("p",{className:"ant-upload-hint"},j.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};J.b=Object(d.a)(function(E){var w=E.loading,_=E.globalSetting,N=E.user;return{globalSetting:_,loading:w.models.competitions,user:N}})(x)},KmYQ:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("OLod"))})(this,function(L){return L.pad.ZeroPadding={pad:function(u,S){var R=S*4;u.clamp(),u.sigBytes+=R-(u.sigBytes%R||R)},unpad:function(u){for(var S=u.words,R=u.sigBytes-1,R=u.sigBytes-1;R>=0;R--)if(S[R>>>2]>>>24-R%4*8&255){u.sigBytes=R+1;break}}},L.pad.ZeroPadding})},L9qf:function(I,J,P){I.exports={flex_box_center:"flex_box_center___3J7Qj",flex_space_between:"flex_space_between___3P3xx",flex_box_vertical_center:"flex_box_vertical_center___3QrMz",flex_box_center_end:"flex_box_center_end___37g4V",flex_box_column:"flex_box_column___2PxMN",wrap:"wrap___1xDeN",in:"in___364z1",btns:"btns___8vHXH",customModal:"customModal___2Vkln"}},LdHM:function(I,J,P){"use strict";P.d(J,"b",function(){return g}),P.d(J,"a",function(){return y});var L=P("1OyB"),u=P("vuIU"),S=P("Ji7U"),R=P("LK+K"),h=P("q1tI"),o=P("rePB"),C=P("Ff2n"),c=P("ODXe"),a=P("4IlW"),i=P("bX4T"),r=P("YrtM"),l=P("TSYQ"),p=P.n(l),f=P("+nKL"),b=P("8OUc"),v=function(K,q){var re=K.prefixCls,ee=K.id,Ce=K.flattenOptions,xe=K.childrenAsData,he=K.values,ke=K.searchValue,_e=K.multiple,de=K.defaultActiveFirstOption,ce=K.height,ae=K.itemHeight,Se=K.notFoundContent,te=K.open,ue=K.menuItemSelectedIcon,Oe=K.virtual,le=K.onSelect,Q=K.onToggleOpen,Y=K.onActiveValue,Z=K.onScroll,be=K.onMouseEnter,ge="".concat(re,"-item"),De=Object(r.a)(function(){return Ce},[te,Ce],function(qe,Ue){return Ue[0]&&qe[1]!==Ue[1]}),Qe=h.useRef(null),Ze=function(Ue){Ue.preventDefault()},nt=function(Ue){Qe.current&&Qe.current.scrollTo({index:Ue})},tt=function(Ue){for(var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ie=De.length,ye=0;ye1&&arguments[1]!==void 0?arguments[1]:!1;return Object(M.a)(W).map(function(q,re){if(!h.isValidElement(q)||!q.type)return null;var ee=q.type.isSelectOptGroup,Ce=q.key,xe=q.props,he=xe.children,ke=Object(C.a)(xe,["children"]);return K||!ee?A(q):Object(s.a)(Object(s.a)({key:"__RC_SELECT_GRP__".concat(Ce===null?re:Ce,"__"),label:Ce},ke),{},{options:x(he)})}).filter(function(q){return q})}var E=P("2Qr1"),w=P("qNPg"),_=P("U8pU"),N=P("Kwbf"),j=P("WKfj");function k(W){var K=W.mode,q=W.options,re=W.children,ee=W.backfill,Ce=W.allowClear,xe=W.placeholder,he=W.getInputElement,ke=W.showSearch,_e=W.onSearch,de=W.defaultOpen,ce=W.autoFocus,ae=W.labelInValue,Se=W.value,te=W.inputValue,ue=W.optionLabelProp,Oe=K==="multiple"||K==="tags",le=ke!==void 0?ke:Oe||K==="combobox",Q=q||x(re);if(Object(N.a)(K!=="tags"||Q.every(function(ge){return!ge.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),K==="tags"||K==="combobox"){var Y=Q.some(function(ge){return ge.options?ge.options.some(function(De){return typeof("value"in De?De.value:De.key)=="number"}):typeof("value"in ge?ge.value:ge.key)=="number"});Object(N.a)(!Y,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(N.a)(K!=="combobox"||!ue,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(N.a)(K==="combobox"||!ee,"`backfill` only works with `combobox` mode."),Object(N.a)(K==="combobox"||!he,"`getInputElement` only work with `combobox` mode."),Object(N.b)(K!=="combobox"||!he||!Ce||!xe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),_e&&!le&&K!=="combobox"&&K!=="tags"&&Object(N.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(N.b)(!de||ce,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Se!=null){var Z=Object(j.d)(Se);Object(N.a)(!ae||Z.every(function(ge){return Object(_.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(N.a)(!Oe||Array.isArray(Se),"`value` should be array when `mode` is `multiple` or `tags`")}if(re){var be=null;Object(M.a)(re).some(function(ge){if(!h.isValidElement(ge)||!ge.type)return!1;var De=ge.type;if(De.isSelectOption)return!1;if(De.isSelectOptGroup){var Qe=Object(M.a)(ge.props.children).every(function(Ze){return!h.isValidElement(Ze)||!ge.type||Ze.type.isSelectOption?!0:(be=Ze.type,!1)});return!Qe}return be=De,!0}),be&&Object(N.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(be.displayName||be.name||be,"`.")),Object(N.a)(te===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var z=k,H=Object(w.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:x,flattenOptions:E.d,getLabeledValue:E.e,filterOptions:E.b,isValueDisabled:E.g,findValueOption:E.c,warningProps:z,fillOptionsWithMissingValue:E.a}),F=function(W){Object(S.a)(q,W);var K=Object(R.a)(q);function q(){var re;return Object(L.a)(this,q),re=K.apply(this,arguments),re.selectRef=h.createRef(),re.focus=function(){re.selectRef.current.focus()},re.blur=function(){re.selectRef.current.blur()},re}return Object(u.a)(q,[{key:"render",value:function(){return h.createElement(H,Object.assign({ref:this.selectRef},this.props))}}]),q}(h.Component);F.Option=g,F.OptGroup=y;var G=F,B=J.c=G},M8RZ:function(I,J,P){"use strict";P.d(J,"a",function(){return a});var L=P("fWQN"),u=P("mtLc"),S=P("yKVA"),R=P("879j"),h=P("q1tI"),o=P.n(h),C=P("i8i4"),c=P.n(C),a=function(i){Object(S.a)(l,i);var r=Object(R.a)(l);function l(p){var f;Object(L.a)(this,l),f=r.call(this,p);var b=window.document;return f.node=b.createElement("div"),b.body.appendChild(f.node),f}return Object(u.a)(l,[{key:"render",value:function(){var f=this.props.children;return Object(C.createPortal)(f,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),l}(o.a.Component)},MFOe:function(I,J,P){(function(L){var u=o(),S=C(),R=c(),h=typeof window!="undefined"?window:L;I.exports={assign:u,create:S,trim:R,bind:a,slice:i,each:r,map:l,pluck:p,isList:f,isFunction:b,isObject:v,Global:h};function o(){return Object.assign?Object.assign:function(n,d,g,T){for(var y=1;y=0;v-=1){var m=c.get(v)||new Set;m.forEach(function(n){var d=n.parent,g=n.node;if(i(g)||!n.parent||b.has(n.parent.key))return;if(i(n.parent.node)){b.add(d.key);return}var T=!0,y=!1;(d.children||[]).filter(function(s){return!i(s.node)}).forEach(function(s){var M=s.key,A=r.has(M);T&&!A&&(T=!1),!y&&(A||l.has(M))&&(y=!0)}),T&&r.add(d.key),y&&l.add(d.key),b.add(d.key)})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(u(l,r))}}function h(C,c,a,i,r){for(var l=new Set(C),p=new Set(c),f=0;f<=i;f+=1){var b=a.get(f)||new Set;b.forEach(function(d){var g=d.key,T=d.node,y=d.children,s=y===void 0?[]:y;!l.has(g)&&!p.has(g)&&!r(T)&&s.filter(function(M){return!r(M.node)}).forEach(function(M){l.delete(M.key)})})}p=new Set;for(var v=new Set,m=i;m>=0;m-=1){var n=a.get(m)||new Set;n.forEach(function(d){var g=d.parent,T=d.node;if(r(T)||!d.parent||v.has(d.parent.key))return;if(r(d.parent.node)){v.add(g.key);return}var y=!0,s=!1;(g.children||[]).filter(function(M){return!r(M.node)}).forEach(function(M){var A=M.key,x=l.has(A);y&&!x&&(y=!1),!s&&(x||p.has(A))&&(s=!0)}),y||l.delete(g.key),s&&p.add(g.key),v.add(g.key)})}return{checkedKeys:Array.from(l),halfCheckedKeys:Array.from(u(p,l))}}function o(C,c,a,i){var r=[],l;i?l=i:l=S;var p=new Set(C.filter(function(m){var n=!!a[m];return n||r.push(m),n})),f=new Map,b=0;Object.keys(a).forEach(function(m){var n=a[m],d=n.level,g=f.get(d);g||(g=new Set,f.set(d,g)),g.add(n),b=Math.max(b,d)}),Object(L.a)(!r.length,"Tree missing follow keys: ".concat(r.slice(0,100).map(function(m){return"'".concat(m,"'")}).join(", ")));var v;return c===!0?v=R(p,f,b,l):v=h(p,c.halfCheckedKeys,f,b,l),v}},OLod:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("K3mO"))})(this,function(L){L.lib.Cipher||function(u){var S=L,R=S.lib,h=R.Base,o=R.WordArray,C=R.BufferedBlockAlgorithm,c=S.enc,a=c.Utf8,i=c.Base64,r=S.algo,l=r.EvpKDF,p=R.Cipher=C.extend({cfg:h.extend(),createEncryptor:function(w,_){return this.create(this._ENC_XFORM_MODE,w,_)},createDecryptor:function(w,_){return this.create(this._DEC_XFORM_MODE,w,_)},init:function(w,_,N){this.cfg=this.cfg.extend(N),this._xformMode=w,this._key=_,this.reset()},reset:function(){C.reset.call(this),this._doReset()},process:function(w){return this._append(w),this._process()},finalize:function(w){w&&this._append(w);var _=this._doFinalize();return _},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function w(_){return typeof _=="string"?E:M}return function(_){return{encrypt:function(N,j,k){return w(j).encrypt(_,N,j,k)},decrypt:function(N,j,k){return w(j).decrypt(_,N,j,k)}}}}()}),f=R.StreamCipher=p.extend({_doFinalize:function(){var w=this._process(!0);return w},blockSize:1}),b=S.mode={},v=R.BlockCipherMode=h.extend({createEncryptor:function(w,_){return this.Encryptor.create(w,_)},createDecryptor:function(w,_){return this.Decryptor.create(w,_)},init:function(w,_){this._cipher=w,this._iv=_}}),m=b.CBC=function(){var w=v.extend();w.Encryptor=w.extend({processBlock:function(N,j){var k=this._cipher,z=k.blockSize;_.call(this,N,j,z),k.encryptBlock(N,j),this._prevBlock=N.slice(j,j+z)}}),w.Decryptor=w.extend({processBlock:function(N,j){var k=this._cipher,z=k.blockSize,H=N.slice(j,j+z);k.decryptBlock(N,j),_.call(this,N,j,z),this._prevBlock=H}});function _(N,j,k){var z,H=this._iv;H?(z=H,this._iv=u):z=this._prevBlock;for(var F=0;F>>2]&255;w.sigBytes-=_}},g=R.BlockCipher=p.extend({cfg:p.cfg.extend({mode:m,padding:d}),reset:function(){var w;p.reset.call(this);var _=this.cfg,N=_.iv,j=_.mode;this._xformMode==this._ENC_XFORM_MODE?w=j.createEncryptor:(w=j.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==w?this._mode.init(this,N&&N.words):(this._mode=w.call(j,this,N&&N.words),this._mode.__creator=w)},_doProcessBlock:function(w,_){this._mode.processBlock(w,_)},_doFinalize:function(){var w,_=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(_.pad(this._data,this.blockSize),w=this._process(!0)):(w=this._process(!0),_.unpad(w)),w},blockSize:128/32}),T=R.CipherParams=h.extend({init:function(w){this.mixIn(w)},toString:function(w){return(w||this.formatter).stringify(this)}}),y=S.format={},s=y.OpenSSL={stringify:function(w){var _,N=w.ciphertext,j=w.salt;return j?_=o.create([1398893684,1701076831]).concat(j).concat(N):_=N,_.toString(i)},parse:function(w){var _,N=i.parse(w),j=N.words;return j[0]==1398893684&&j[1]==1701076831&&(_=o.create(j.slice(2,4)),j.splice(0,4),N.sigBytes-=16),T.create({ciphertext:N,salt:_})}},M=R.SerializableCipher=h.extend({cfg:h.extend({format:s}),encrypt:function(w,_,N,j){j=this.cfg.extend(j);var k=w.createEncryptor(N,j),z=k.finalize(_),H=k.cfg;return T.create({ciphertext:z,key:N,iv:H.iv,algorithm:w,mode:H.mode,padding:H.padding,blockSize:w.blockSize,formatter:j.format})},decrypt:function(w,_,N,j){j=this.cfg.extend(j),_=this._parse(_,j.format);var k=w.createDecryptor(N,j).finalize(_.ciphertext);return k},_parse:function(w,_){return typeof w=="string"?_.parse(w,this):w}}),A=S.kdf={},x=A.OpenSSL={execute:function(w,_,N,j){j||(j=o.random(64/8));var k=l.create({keySize:_+N}).compute(w,j),z=o.create(k.words.slice(_),N*4);return k.sigBytes=_*4,T.create({key:k,iv:z,salt:j})}},E=R.PasswordBasedCipher=M.extend({cfg:M.cfg.extend({kdf:x}),encrypt:function(w,_,N,j){j=this.cfg.extend(j);var k=j.kdf.execute(N,w.keySize,w.ivSize);j.iv=k.iv;var z=M.encrypt.call(this,w,_,k.key,j);return z.mixIn(k),z},decrypt:function(w,_,N,j){j=this.cfg.extend(j),_=this._parse(_,j.format);var k=j.kdf.execute(N,w.keySize,w.ivSize,_.salt);j.iv=k.iv;var z=M.decrypt.call(this,w,_,k.key,j);return z}})}()})},OZM5:function(I,J,P){"use strict";P.d(J,"b",function(){return i}),P.d(J,"a",function(){return r}),P.d(J,"k",function(){return l}),P.d(J,"h",function(){return p}),P.d(J,"i",function(){return f}),P.d(J,"g",function(){return b}),P.d(J,"c",function(){return v}),P.d(J,"d",function(){return m}),P.d(J,"j",function(){return g}),P.d(J,"e",function(){return T}),P.d(J,"f",function(){return y});var L=P("KQm4"),u=P("U8pU"),S=P("Ff2n"),R=P("q1tI"),h=P.n(R),o=P("Kwbf"),C=P("WaYH"),c=.25,a=2;function i(s,M){var A=s.slice(),x=A.indexOf(M);return x>=0&&A.splice(x,1),A}function r(s,M){var A=s.slice();return A.indexOf(M)===-1&&A.push(M),A}function l(s){return s.split("-")}function p(s,M){return"".concat(s,"-").concat(M)}function f(s){return s&&s.type&&s.type.isTreeNode}function b(s,M){var A=[s],x=M[s];function E(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];w.forEach(function(_){var N=_.key,j=_.children;A.push(N),E(j)})}return E(x.children),A}function v(s,M){var A=s.clientY,x=M.selectHandle.getBoundingClientRect(),E=x.top,w=x.bottom,_=x.height,N=Math.max(_*c,a);return A<=E+N?-1:A>=w-N?1:0}function m(s,M){if(!s)return;var A=M.multiple;return A?s.slice():s.length?[s[0]]:s}var n=function(M){return M};function d(s,M){if(!s)return[];var A=M||{},x=A.processProps,E=x===void 0?n:x,w=Array.isArray(s)?s:[s];return w.map(function(_){var N=_.children,j=Object(S.a)(_,["children"]),k=d(N,M);return h.a.createElement(C.a,Object.assign({},E(j)),k)})}function g(s){if(!s)return null;var M;if(Array.isArray(s))M={checkedKeys:s,halfCheckedKeys:void 0};else if(Object(u.a)(s)==="object")M={checkedKeys:s.checked||void 0,halfCheckedKeys:s.halfChecked||void 0};else return Object(o.a)(!1,"`checkedKeys` is not an array or an object"),null;return M}function T(s,M){var A=new Set;function x(E){if(A.has(E))return;var w=M[E];if(!w)return;A.add(E);var _=w.parent,N=w.node;if(N.disabled)return;_&&x(_.key)}return(s||[]).forEach(function(E){x(E)}),Object(L.a)(A)}function y(s){var M={};return Object.keys(s).forEach(function(A){(A.startsWith("data-")||A.startsWith("aria-"))&&(M[A]=s[A])}),M}},Ot1p:function(I,J,P){"use strict";var L=P("2qtc"),u=P("kLXV"),S=P("rAM+"),R=P("miYZ"),h=P("tsqr"),o=P("9og8"),C=P("tJVT"),c=P("jrin"),a=P("WmNS"),i=P.n(a),r=P("q1tI"),l=P.n(r),p=P("VrN/"),f=P.n(p),b=P("bdgK"),v=P("p77/"),m=P("Bd2K"),n=P("ELLl"),d=P("19Vz"),g=P("lZu9"),T=P("+NIl"),y=P("kSUc"),s=P("9Bee"),M=function(dt){var At=dt.value,Ot=At===void 0?"":At,bt=dt.className,Vt=dt.showTextOnly,ir=dt.showLines,Qt=dt.style,dr=Qt===void 0?{}:Qt,Nt=Object(r.useMemo)(function(){return""},[Ot]);return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{dangerouslySetInnerHTML:{__html:Nt}}))},A=P("Q9mQ"),x=P("diRs"),E=P("0Owb"),w=P("dejd"),_=P("C+DQ"),N=P("D1Df"),j=P.n(N),k=P("1vsH"),z=P("m3rI"),H=[{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 F(dt){var At=dt.onActionCallback,Ot=dt.title,bt=dt.icon,Vt=dt.actionName,ir=dt.className,Qt=ir===void 0?"":ir,dr=dt.children;function Nt(){At(Vt)}return l.a.createElement("a",{title:Ot,className:Qt,onClick:Nt},l.a.createElement("i",{className:"md-iconfont ".concat(bt)}),dr)}var G=function(dt){var At=dt.watch,Ot=dt.showNullButton,bt=dt.onActionCallback,Vt=dt.fullScreen,ir=dt.insertTemp,Qt=dt.hidetoolBar,dr=dt.uuid,Nt=dt.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(k.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(k.E)("_educoder_session"),"&key=").concat(dr,"&api=").concat(encodeURIComponent(z.a.PROXY_SERVER)));var br=[].concat(H,[{title:"".concat(At?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(At?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return l.a.createElement("ul",{className:"markdown-toolbar-container"},!Qt&&br.map(function(ur,wt){return l.a.createElement("li",{key:wt},ur.actionName?l.a.createElement(F,Object(E.a)({},ur,{onActionCallback:bt})):l.a.createElement("span",{className:"v-line"}))}),Ot?l.a.createElement("li",null,l.a.createElement(F,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:bt},l.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,ir&&l.a.createElement("li",null,l.a.createElement(F,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(ir),onActionCallback:bt},l.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),l.a.createElement("li",null,l.a.createElement(x.a,{title:"\u6253\u5F00\u624B\u673A\u626B\u4E00\u626B",content:l.a.createElement("div",null,l.a.createElement(j.a,{size:150,fgColor:"#000",value:"https://test2.educoder.net/upload.html?_educoder_session_login=".concat(Object(k.E)("_educoder_session_login"),"&_educoder_session=").concat(Object(k.E)("_educoder_session"),"&key=").concat(dr,"&api=").concat(encodeURIComponent(z.a.PROXY_SERVER))}))},l.a.createElement("span",{className:"fill-tip",onMouseOver:function(){return Nt(!0)}},"\u624B\u673A\u4E0A\u4F20\u6587\u4EF6"))),l.a.createElement("li",{className:"btn-full-screen"},l.a.createElement(F,{icon:"".concat(Vt?"icon-shrink":"icon-enlarge"),title:Vt?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:bt})))},B=P("M8RZ"),W=P("+L6B"),K=P("2/Rp"),q=P("y8nQ"),re=P("Vl3Y"),ee=P("5NDa"),Ce=P("5rEg"),xe={labelCol:{span:4},wrapperCol:{span:20}},he=function(dt){var At=dt.callback,Ot=dt.onCancel;function bt(Vt){At(Vt)}return l.a.createElement(re.a,Object(E.a)({},xe,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:bt}),l.a.createElement(re.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},l.a.createElement(Ce.a,null)),l.a.createElement(re.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},l.a.createElement(Ce.a,null)),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(K.a,{type:"ghost",onClick:Ot},"\u53D6\u6D88")))},ke=P("7ahc"),_e=P("k1fw"),de=P("HmJG"),ce=P("BjJ7"),ae=re.a.useForm,Se={width:280,marginRight:10},te={labelCol:{span:5},wrapperCol:{span:19}},ue=function(dt){var At=dt.callback,Ot=dt.onCancel,bt=ae(),Vt=Object(C.a)(bt,1),ir=Vt[0],Qt=Object(r.useRef)();function dr(ur){At(Object(_e.a)(Object(_e.a)({},ur),{},{name:Qt.current}))}function Nt(ur,wt){ir.setFieldsValue({src:"/api/attachments/".concat(ur.id,"?type=").concat(ur.content_type),type:wt.type})}function br(ur){var wt=ur.target.files[0];Qt.current=wt.name,le(wt,Nt)}return l.a.createElement(re.a,Object(E.a)({form:ir},te,{className:"upload-image-panel",onFinish:dr}),l.a.createElement(re.a.Item,{label:"\u6587\u4EF6\u5730\u5740",required:!0},l.a.createElement("div",{className:"flex-container"},l.a.createElement(re.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5730\u5740"}]},l.a.createElement(Ce.a,{style:Se})),l.a.createElement(Oe,{onFileChange:br}))),l.a.createElement(re.a.Item,{label:"\u6587\u4EF6\u63CF\u8FF0",name:"alt"},l.a.createElement(Ce.a,{style:{width:264}})),l.a.createElement(re.a.Item,{style:{textAlign:"right"}},l.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(K.a,{type:"ghost",onClick:Ot},"\u53D6\u6D88")))};function Oe(dt){var At=dt.onFileChange;return l.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",l.a.createElement("input",{type:"file",onChange:At}))}function le(dt,At){if(!dt)throw new String("\u6CA1\u6709\u6587\u4EF6");var Ot=new FormData;Ot.append("editormd-image-file",dt),Ot.append("file_param_name","editormd-image-file"),Ot.append("byxhr","true");var bt=new window.XMLHttpRequest;bt.withCredentials=!0,bt.addEventListener("load",function(Vt){At(JSON.parse(Vt.target.responseText),dt)},!1),bt.addEventListener("error",function(Vt){console.error(Vt)},!1),bt.open("POST","".concat(ce.a,"/api/attachments.json")),bt.send(Ot)}var Q=P("giR+"),Y=P("fyUT"),Z=P("7Kak"),be=P("9yH6"),ge=be.a.Group,De={margin:"0 8px"},Qe=function(dt){var At=dt.callback,Ot=dt.onCancel;function bt(Vt){At(Vt)}return l.a.createElement(re.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:bt},l.a.createElement("div",{className:"flex-container"},l.a.createElement("span",{style:De},"\u5355\u5143\u683C\u6570\uFF1A"),l.a.createElement("span",{style:De},"\u884C\u6570"),l.a.createElement(re.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},l.a.createElement(Y.a,null)),l.a.createElement("span",{style:De},"\u5217\u6570"),l.a.createElement(re.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},l.a.createElement(Y.a,null))),l.a.createElement("div",{className:"flex-container",style:{marginTop:12}},l.a.createElement("span",{style:De},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),l.a.createElement(re.a.Item,{name:"align"},l.a.createElement(ge,null,l.a.createElement(be.a,{value:"default"},l.a.createElement("i",{className:"fa fa-align-justify"})),l.a.createElement(be.a,{value:"left"},l.a.createElement("i",{className:"fa fa-align-left"})),l.a.createElement(be.a,{value:"center"},l.a.createElement("i",{className:"fa fa-align-center"})),l.a.createElement(be.a,{value:"right"},l.a.createElement("i",{className:"fa fa-align-right"}))))),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(K.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(K.a,{type:"ghost",onClick:Ot},"\u53D6\u6D88")))},Ze=P("ErOA"),nt=P("7Cbv"),tt="link",lt="upload-image",st="code-block",je="add-table",Re="------------",et={default:Re,left:":".concat(Re),center:":".concat(Re,":"),right:"".concat(Re,":")},ct=P("9VGf"),$e,qe;function Ue(){}var Me=0,Ie=1e4,ye="\u2581",Te=` **\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 Ae(dt){return/^\d+$/.test(dt)?"".concat(dt,"px"):dt}var Pe=navigator.platform.toUpperCase().indexOf("MAC")>=0,Xe=Pe?"Cmd":"Ctrl",rt=["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"],ft=($e={},Object(c.a)($e,Xe+"-B","bold"),Object(c.a)($e,Xe+"-I","italic"),$e),St=(qe={},Object(c.a)(qe,tt,"\u6DFB\u52A0\u94FE\u63A5"),Object(c.a)(qe,st,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(c.a)(qe,lt,"\u6DFB\u52A0\u6587\u4EF6"),Object(c.a)(qe,je,"\u6DFB\u52A0\u8868\u683C"),qe),Pt=J.a=function(dt){var At=dt.defaultValue,Ot=At===void 0?"":At,bt=dt.onChange,Vt=dt.width,ir=Vt===void 0?"100%":Vt,Qt=dt.height,dr=Qt===void 0?400:Qt,Nt=dt.miniToolbar,br=Nt===void 0?!1:Nt,ur=dt.isFocus,wt=ur===void 0?!1:ur,hr=dt.watch,Qr=dt.insertTemp,Gr=dt.mode,Lr=Gr===void 0?"markdown":Gr,si=dt.id,Tt=si===void 0?"markdown-editor-id":si,Dt=dt.showResizeBar,Ct=Dt===void 0?!1:Dt,Rr=dt.noStorage,jr=Rr===void 0?!1:Rr,$t=dt.showNullButton,jt=$t===void 0?!1:$t,Ur=dt.hidetoolBar,_n=Ur===void 0?!1:Ur,Vr=dt.fullScreen,vt=Vr===void 0?!1:Vr,Ft=dt.onBlur,rn=dt.onCMBeforeChange,hn=dt.onFullScreen,An=dt.className,Rn=An===void 0?"":An,se=dt.disablePaste,V=se===void 0?!1:se,X=dt.placeholder,ne=X===void 0?"":X,me=dt.values,ie=me===void 0?"":me,ze=Object(r.useState)(null),pt=Object(C.a)(ze,2),ot=pt[0],It=pt[1],gt=Object(r.useState)(Ot),Ht=Object(C.a)(gt,2),Xt=Ht[0],Sr=Ht[1],an=Object(r.useState)(hr),Zr=Object(C.a)(an,2),Zt=Zr[0],Hr=Zr[1],fr=Object(r.useState)(vt),Jt=Object(C.a)(fr,2),tr=Jt[0],vr=Jt[1],Xr=Object(r.useState)(""),ln=Object(C.a)(Xr,2),mn=ln[0],li=ln[1],Ki=Object(r.useState)(0),Ui=Object(C.a)(Ki,2),Fn=Ui[0],qr=Ui[1],Oi=Object(r.useState)(dr),on=Object(C.a)(Oi,2),Zn=on[0],Yr=on[1],cr=Object(r.useState)(!1),en=Object(C.a)(cr,2),Mr=en[0],En=en[1],Fr=Object(r.useRef)(Object(nt.a)()),xi=Object(r.useRef)(!1),gn=Object(r.useRef)(),On=Object(r.useRef)(),ui=Object(r.useRef)(),ci=Object(r.useRef)(),qn=Object(r.useRef)(),Ei=function(){var Bt=Object(o.a)(i.a.mark(function ar(){var Kt,xr;return i.a.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:return Br.next=2,Object(Ze.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Fr.current}});case 2:xr=Br.sent,xr!=null&&(Kt=xr.attachments)!==null&&Kt!==void 0&&Kt.length&&(console.log("cm:",ot,On),xr.attachments.map(function(Or){Or.content_type.indexOf("image")>-1?ot.replaceSelection("![,](/api/attachments/".concat(Or.id,"?type=").concat(Or.content_type,")")):Or.content_type.indexOf("video")>-1?ot.replaceSelection('')):Or.content_type.indexOf("pdf")>-1?ot.replaceSelection('
    ').concat(Or.name,"")):ot.replaceSelection("[".concat(Or.name,"](").concat(z.a.API_SERVER,"/api/attachments/").concat(Or.id,"?type=").concat(Or.content_type,")"))}));case 4:case"end":return Br.stop()}},ar)}));return function(){return Bt.apply(this,arguments)}}();Object(r.useEffect)(function(){Sr(ie),ot==null||ot.setValue(ie)},[ie]),Object(r.useEffect)(function(){hn==null||hn(tr)},[tr]),Object(r.useEffect)(function(){if(On.current){var Bt=f.a.fromTextArea(On.current,{mode:Lr,lineNumbers:!br,lineWrapping:!0,value:Ot,autoCloseTags:!0,autoCloseBrackets:!0});wt&&Bt.focus();function ar(Kt,xr){if(V){xr.preventDefault();return}var Dr=xr.clipboardData;if(Dr){var Br=Dr.types.toString(),Or=Dr.items;if(Br==="Files"||Dr.types.indexOf("Files")>-1){if(xr.preventDefault(),Lr=="stex")return;try{var un,Pn=Or[1];((un=Or[0])===null||un===void 0?void 0:un.kind)==="file"&&(Pn=Or[0]);var Er=Pn.getAsFile(),Ri=Er.name.split(".").pop();le(Er,function(Gt){if(Gt.id){var or,sr,vn;(Er==null||((or=Er.type)===null||or===void 0)?void 0:or.indexOf("image"))>-1?Bt.replaceSelection("![,](/api/attachments/".concat(Gt.id,"?type=").concat(Gt.content_type,")")):(Er==null||((sr=Er.type)===null||sr===void 0)?void 0:sr.indexOf("video"))>-1?Bt.replaceSelection('')):(Er==null||((vn=Er.type)===null||vn===void 0)?void 0:vn.indexOf("pdf"))>-1?Bt.replaceSelection('').concat(Er.name,"")):rt.includes(Ri)?Bt.replaceSelection('').concat(Er.name,"")):Bt.replaceSelection("[".concat(Er.name,"](").concat(z.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(Gt.content_type,")"))}else(Gt==null?void 0:Gt.status)===401&&(document.location.href="/user/login")})}catch(Gt){h.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Bt.on("paste",ar),Bt.on("dragleave",function(Kt,xr){ui.current.classList.remove("mouse-hover-md")}),Bt.on("dragover",function(Kt,xr){ui.current.classList.add("mouse-hover-md")}),Bt.on("drop",function(Kt,xr){ui.current.classList.add("mouse-hover-md");var Dr;if(Dr=xr.dataTransfer.files,Dr.length>0){xr.preventDefault(),xr.stopPropagation();for(var Br=function(Pn){var Er=Dr[Pn],Ri=Er.name.split(".").pop();le(Er,function(Gt){if(Gt.id){var or,sr,vn;(Er==null||((or=Er.type)===null||or===void 0)?void 0:or.indexOf("image"))>-1?Bt.replaceSelection("![,](/api/attachments/".concat(Gt.id,"?type=").concat(Gt.content_type,")")):(Er==null||((sr=Er.type)===null||sr===void 0)?void 0:sr.indexOf("video"))>-1?Bt.replaceSelection('')):(Er==null||((vn=Er.type)===null||vn===void 0)?void 0:vn.indexOf("pdf"))>-1?Bt.replaceSelection('').concat(Er.name,"")):rt.includes(Ri)?Bt.replaceSelection('').concat(Er.name,"")):Bt.replaceSelection("[".concat(Er.name,"](").concat(z.a.API_SERVER,"/api/attachments/").concat(Gt.id,"?type=").concat(Gt.content_type,")"))}else(Gt==null?void 0:Gt.status)===401&&(document.location.href="/user/login")})},Or=0;Or0||Or.target.offsetWidth>0)&&(Yn(),ot.setSize("100%","100%"),ot.refresh())}}catch(un){Dr.e(un)}finally{Dr.f()}});return Kt.observe(On.current.parentElement),Kt}if(ot){var ar=Bt();return function(){ar.unobserve(On.current.parentElement)}}},[ot,Yn]),Object(r.useEffect)(function(){if(ot){for(var Bt=[],ar=function(){var Or=xr[Kt];Dr=Object(C.a)(Or,2);var un=Dr[0],Pn=Dr[1],Er=Object(c.a)({},un,function(){Ai(Pn)});Bt.push(Er),ot.addKeyMap(Er)},Kt=0,xr=Object.entries(ft);Kt0){var Bt=new Date().getTime(),ar=window.sessionStorage.getItem(Tt);Bt>=Fn+Ie&&(!ar||ar!==Xt)&&(window.sessionStorage.setItem(Tt,Xt),En(!0))}},Ie),Object(r.useEffect)(function(){Hr(hr)},[ot,hr]),Object(r.useEffect)(function(){ot&&(wt&&ot.focus())},[ot,wt]),Object(r.useEffect)(function(){if(Zt&&ot){var Bt=ot.getScrollerElement();function ar(Kt){var xr=Kt.target;if(qn.current){var Dr=xr.scrollTop/xr.scrollHeight;qn.current.scrollTop=qn.current.scrollHeight*Dr}}return Bt.addEventListener("scroll",ar),function(){Bt.removeEventListener("scroll",ar)}}},[ot,Zt]),Object(r.useEffect)(function(){if(ot&&rn){function Bt(ar,Kt){rn(ar,Kt)}return ot.on("beforeChange",Bt),function(){ot.off("beforeChange",Bt)}}},[ot,rn]),Object(r.useEffect)(function(){if(ot&&Ft){function Bt(){Ft(ot.getValue())}return ot.on("blur",Bt),function(){ot.off("blur",Bt)}}},[ot,Ft]),Object(r.useEffect)(function(){if(ot){function Bt(ar){var Kt=ar.getValue();Sr(Kt),qr(new Date().getTime()),ar.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),bt&&bt(Kt)}return ot.on("change",Bt),function(){ot.off("change",Bt)}}},[ot,bt]),Object(r.useEffect)(function(){ot&&(Ot==null?(ot.setValue(""),Sr("")):Ot!==ot.getValue()&&(ot.setValue(Ot),Sr(Ot),ot.setCursor(ot.lineCount(),0)))},[ot,Ot]);var Ai=Object(r.useCallback)(function(Bt){var ar=ot.getCursor(),Kt=ot.getSelection(),xr=Kt.split(` `);switch(Bt){case"bold":return ot.replaceSelection("**"+Kt+"**"),Kt===""&&ot.setCursor(ar.line,ar.ch+2),ot.focus();case"italic":return ot.replaceSelection("*"+Kt+"*"),Kt===""&&ot.setCursor(ar.line,ar.ch+1),ot.focus();case"code":return ot.replaceSelection("`"+Kt+"`"),Kt===""&&ot.setCursor(ar.line,ar.ch+1),ot.focus();case"inline-latex":return ot.replaceSelection("`$$"+Kt+"$$`"),Kt===""&&ot.setCursor(ar.line,ar.ch+3),ot.focus();case"latex":return ot.replaceSelection("```latex\n"+Kt+"\n```"),ot.setCursor(ar.line+1,Kt.length+1),ot.focus();case"line-break":return ot.replaceSelection(`
    `),ot.focus();case"list-ul":return Kt===""?ot.replaceSelection("- "+Kt):ot.replaceSelection(xr.map(function(Dr){return Dr===""?"":"- ".concat(Dr)}).join(` `)),ot.focus();case"list-ol":return Kt===""?ot.replaceSelection("1. "+Kt):ot.replaceSelection(xr.map(function(Dr,Br){return Dr===""?"":"".concat(Br+1,". ").concat(Dr)}).join(` `)),ot.focus();case"add-null-ch":return Kt===""&&ot.setCursor(ar.line,ar.ch+1),ot.replaceSelection(ye),ot.focus();case"inster-template-1":return Kt===""&&ot.setCursor(ar.line,ar.ch),ot.replaceSelection(Te),ot.focus();case"eraser":return ot.setValue(""),ot.focus();case"trigger-watch":return Hr(!Zt),ot.focus();case"trigger-full-screen":return vr(!tr),ot.focus();case tt:li(tt);return;case st:li(st);return;case lt:li(lt);return;case je:li(je);return;default:throw new Error}},[ot,Zt,tr]),zn=Object(r.useCallback)(function(Bt){li("");switch(mn){case tt:var ar=Bt.title,Kt=Bt.link;return ot.replaceSelection("[".concat(ar,"](").concat(Kt,")")),ot.focus();case st:var xr=Bt.language,Dr=Bt.content;return ot.replaceSelection(["```"+xr,Dr,"```"].join(` `)),ot.focus();case lt:var Br=Bt.src,Or=Bt.alt,un=Bt.name;return Br.indexOf("type=image")>-1?ot.replaceSelection("![ ".concat(Or||""," ]( ").concat(Br,' "').concat(Or||"",'" )')):Br.indexOf("type=application/pdf")>-1?ot.replaceSelection('').concat(un,"")):ot.replaceSelection('').concat(un,"")),ot.focus();case je:for(var Pn=Bt.row,Er=Bt.col,Ri=Bt.align,Gt=` `,or=0;or300&&(un=300);var Pn=dr+un+"px";Yr(Pn)}}return Bt.addEventListener("mousedown",xr),document.addEventListener("mousemove",Br),document.addEventListener("mouseup",Dr),function(){Bt.removeEventListener("mousedown",xr),document.removeEventListener("mousemove",Br),document.removeEventListener("mouseup",Dr)}}},[ot,ci]),Object(r.useEffect)(function(){Yr(dr)},[dr]);var ei=Ae(ir),$r=Ae(Zn),$i={width:ei,height:$r},ta=Object(r.useMemo)(function(){if(Fn){var Bt=new Date(Fn),ar=Bt.getHours(),Kt=Bt.getMinutes(),xr=Bt.getSeconds();return ar=ar<10?"0"+ar:ar,Kt=Kt<10?"0"+Kt:Kt,xr=xr<10?"0"+xr:xr,"".concat(ar,":").concat(Kt,":").concat(xr)}return 0},[Fn]);function Ni(){window.sessionStorage.removeItem(Tt),En(!1),qr(0)}function Ji(){En(!1),qr(0),ot.setValue(window.sessionStorage.getItem(Tt))}function Gi(Bt,ar){var Kt=ot.getValue();Kt=Kt.replace(Bt,ar),Sr(Kt),ot==null||ot.setValue(Kt)}return l.a.createElement(r.Fragment,null,l.a.createElement("div",{className:"markdown-editor-wrapper",ref:ui},l.a.createElement("div",{className:"markdown-editor-container ".concat(Rn," ").concat(Zt?"on-preview":""," ").concat(br?"mini":""," ").concat(tr?"full-screen":""),style:$i},l.a.createElement(G,{insertTemp:Qr,watch:Zt,fullScreen:tr,showNullButton:jt,onActionCallback:Ai,hidetoolBar:_n,uuid:Fr.current,setOpenPhones:function(){xi.current=!0}}),l.a.createElement("div",{className:"markdown-editor-body"},l.a.createElement("div",{className:"codemirror-container"},l.a.createElement("textarea",{ref:On,placeholder:ne})),Zt?l.a.createElement("div",{ref:qn,className:"preview-container"},Lr==="stex"&&l.a.createElement(M,{value:Xt}),Lr!=="stex"&&l.a.createElement(s.a,{edit:!0,value:Xt,replaces:Gi})):null))),Ct?l.a.createElement("a",{ref:ci,className:"editor-resize"}):null,l.a.createElement(B.a,null,St[mn]?l.a.createElement(u.a,{centered:!0,title:St[mn],visible:!0,onCancel:pi,footer:null},fi):null))}},PD8m:function(I,J){I.exports={name:"memoryStorage",read:L,write:u,each:S,remove:R,clearAll:h};var P={};function L(o){return P[o]}function u(o,C){P[o]=C}function S(o){for(var C in P)P.hasOwnProperty(C)&&o(P[C],C)}function R(o){delete P[o]}function h(o){P={}}},PVpz:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("ETIr"),P("cv67"),P("K3mO"),P("OLod"))})(this,function(L){return function(){var u=L,S=u.lib,R=S.StreamCipher,h=u.algo,o=[],C=[],c=[],a=h.RabbitLegacy=R.extend({_doReset:function(){var r=this._key.words,l=this.cfg.iv,p=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],f=this._C=[r[2]<<16|r[2]>>>16,r[0]&4294901760|r[1]&65535,r[3]<<16|r[3]>>>16,r[1]&4294901760|r[2]&65535,r[0]<<16|r[0]>>>16,r[2]&4294901760|r[3]&65535,r[1]<<16|r[1]>>>16,r[3]&4294901760|r[0]&65535];this._b=0;for(var b=0;b<4;b++)i.call(this);for(var b=0;b<8;b++)f[b]^=p[b+4&7];if(l){var v=l.words,m=v[0],n=v[1],d=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,g=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,T=d>>>16|g&4294901760,y=g<<16|d&65535;f[0]^=d,f[1]^=T,f[2]^=g,f[3]^=y,f[4]^=d,f[5]^=T,f[6]^=g,f[7]^=y;for(var b=0;b<4;b++)i.call(this)}},_doProcessBlock:function(r,l){var p=this._X;i.call(this),o[0]=p[0]^p[5]>>>16^p[3]<<16,o[1]=p[2]^p[7]>>>16^p[5]<<16,o[2]=p[4]^p[1]>>>16^p[7]<<16,o[3]=p[6]^p[3]>>>16^p[1]<<16;for(var f=0;f<4;f++)o[f]=(o[f]<<8|o[f]>>>24)&16711935|(o[f]<<24|o[f]>>>8)&4278255360,r[l+f]^=o[f]},blockSize:128/32,ivSize:64/32});function i(){for(var r=this._X,l=this._C,p=0;p<8;p++)C[p]=l[p];l[0]=l[0]+1295307597+this._b|0,l[1]=l[1]+3545052371+(l[0]>>>0>>0?1:0)|0,l[2]=l[2]+886263092+(l[1]>>>0>>0?1:0)|0,l[3]=l[3]+1295307597+(l[2]>>>0>>0?1:0)|0,l[4]=l[4]+3545052371+(l[3]>>>0>>0?1:0)|0,l[5]=l[5]+886263092+(l[4]>>>0>>0?1:0)|0,l[6]=l[6]+1295307597+(l[5]>>>0>>0?1:0)|0,l[7]=l[7]+3545052371+(l[6]>>>0>>0?1:0)|0,this._b=l[7]>>>0>>0?1:0;for(var p=0;p<8;p++){var f=r[p]+l[p],b=f&65535,v=f>>>16,m=((b*b>>>17)+b*v>>>15)+v*v,n=((f&4294901760)*f|0)+((f&65535)*f|0);c[p]=m^n}r[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,r[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,r[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,r[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,r[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,r[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,r[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,r[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}u.RabbitLegacy=R._createHelper(a)}(),L.RabbitLegacy})},RELg:function(I,J,P){var L=P("MFOe"),u=L.Global;I.exports={name:"oldIE-userDataStorage",write:C,read:c,each:a,remove:i,clearAll:r};var S="storejs",R=u.document,h=f(),o=(u.navigator?u.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function C(b,v){if(o)return;var m=p(b);h(function(n){n.setAttribute(m,v),n.save(S)})}function c(b){if(o)return;var v=p(b),m=null;return h(function(n){m=n.getAttribute(v)}),m}function a(b){h(function(v){for(var m=v.XMLDocument.documentElement.attributes,n=m.length-1;n>=0;n--){var d=m[n];b(v.getAttribute(d.name),d.name)}})}function i(b){var v=p(b);h(function(m){m.removeAttribute(v),m.save(S)})}function r(){h(function(b){var v=b.XMLDocument.documentElement.attributes;b.load(S);for(var m=v.length-1;m>=0;m--)b.removeAttribute(v[m].name);b.save(S)})}var l=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function p(b){return b.replace(/^\d/,"___$&").replace(l,"___")}function f(){if(!R||!R.documentElement||!R.documentElement.addBehavior)return null;var b="script",v,m,n;try{m=new ActiveXObject("htmlfile"),m.open(),m.write("<"+b+">document.w=window'),m.close(),v=m.w.frames[0].document,n=v.createElement("div")}catch(d){n=R.createElement("div"),v=R.body}return function(d){var g=[].slice.call(arguments,0);g.unshift(n),v.appendChild(n),n.addBehavior("#default#userData"),n.load(S),d.apply(this,g),v.removeChild(n);return}}},S6kV:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("OLod"))})(this,function(L){return L.mode.OFB=function(){var u=L.lib.BlockCipherMode.extend(),S=u.Encryptor=u.extend({processBlock:function(R,h){var o=this._cipher,C=o.blockSize,c=this._iv,a=this._keystream;c&&(a=this._keystream=c.slice(0),this._iv=void 0),o.encryptBlock(a,0);for(var i=0;i|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function B(le){for(var Q=0,Y=!1,Z=!1,be=0,ge=le.length;be122||(ye<65||Ie>90||et.push([Math.max(65,Ie)|32,Math.min(ye,90)|32]),ye<97||Ie>122||et.push([Math.max(97,Ie)&~32,Math.min(ye,122)&~32]))}}et.sort(function(Xe,rt){return Xe[0]-rt[0]||rt[1]-Xe[1]});for(var Te=[],Ae=[],qe=0;qePe[0]&&(Pe[1]+1>Pe[0]&&$e.push("-"),$e.push(nt(Pe[1])))}return $e.push("]"),$e.join("")}function lt(je){for(var Re=je.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),et=Re.length,ct=[],$e=0,qe=0;$e=2&&Ie==="["?Re[$e]=tt(Ue):Ie!=="\\"&&(Re[$e]=Ue.replace(/[a-zA-Z]/g,function(Ae){var Pe=Ae.charCodeAt(0);return"["+String.fromCharCode(Pe&~32,Pe|32)+"]"}))}return Re.join("")}for(var st=[],be=0,ge=le.length;be=0;)Y[st.charAt(je)]=lt;var Re=lt[1],et=""+Re;Ze.hasOwnProperty(et)||(Qe.push(Re),Ze[et]=null)}Qe.push(/[\0-\uffff]/),Z=B(Qe)})();var be=Q.length,ge=function(De){for(var Qe=De.sourceCode,Ze=De.basePos,nt=De.sourceNode,tt=[Ze,_],lt=0,st=Qe.match(Z)||[],je={},Re=0,et=st.length;Re=5&&$e.substring(0,5)==="lang-",Ue&&!(qe&&typeof qe[1]=="string")&&(Ue=!1,$e=k),Ue||(je[ct]=$e)}var ye=lt;if(lt+=ct.length,!Ue)tt.push(Ze+ye,$e);else{var Te=qe[1],Ae=ct.indexOf(Te),Pe=Ae+Te.length;qe[2]&&(Pe=ct.length-qe[2].length,Ae=Pe-Te.length);var Xe=$e.substring(5);K(nt,Ze+ye,ct.substring(0,Ae),ge,tt),K(nt,Ze+ye+Ae,Te,ce(Xe,Te),tt),K(nt,Ze+ye+Pe,ct.substring(Pe),ge,tt)}}De.decorations=tt};return ge}function Ce(le){var Q=[],Y=[];le.tripleQuotedStrings?Q.push([s,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):le.multiLineStrings?Q.push([s,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Q.push([s,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),le.verbatimStrings&&Y.push([s,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Z=le.hashComments;Z&&(le.cStyleComments?(Z>1?Q.push([A,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Q.push([A,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Y.push([s,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Q.push([A,/^#[^\r\n]*/,null,"#"])),le.cStyleComments&&(Y.push([A,/^\/\/[^\r\n]*/,null]),Y.push([A,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var be=le.regexLiterals;if(be){var ge=be>1?"":` \r`,De=ge?".":"[\\S\\s]",Qe="/(?=[^/*"+ge+"])(?:[^/\\x5B\\x5C"+ge+"]|\\x5C"+De+"|\\x5B(?:[^\\x5C\\x5D"+ge+"]|\\x5C"+De+")*(?:\\x5D|$))+/";Y.push(["lang-regex",RegExp("^"+G+"("+Qe+")")])}var Ze=le.types;Ze&&Y.push([x,Ze]);var nt=(""+le.keywords).replace(/^ | $/g,"");nt.length&&Y.push([M,new RegExp("^(?:"+nt.replace(/[\s,]+/g,"|")+")\\b"),null]),Q.push([_,/^\s+/,null,` \r \xA0`]);var tt="^.[^\\s\\w.$@'\"`/\\\\]*";return le.regexLiterals&&(tt+="(?!s*/)"),Y.push([E,/^@[a-z_$][a-z_$@0-9]*/i,null],[x,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[_,/^[a-z_$][a-z_$@0-9]*/i,null],[E,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[_,/^\\[\s\S]?/,null],[w,new RegExp(tt),null]),ee(Q,Y)}var xe=Ce({keywords:T,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function he(le,Q,Y){for(var Z=/(?:^|\s)nocode(?:\s|$)/,be=/\r\n?|\n/,ge=le.ownerDocument,De=ge.createElement("li");le.firstChild;)De.appendChild(le.firstChild);var Qe=[De];function Ze(Re){var et=Re.nodeType;if(et==1&&!Z.test(Re.className))if(Re.nodeName==="br")nt(Re),Re.parentNode&&Re.parentNode.removeChild(Re);else for(var ct=Re.firstChild;ct;ct=ct.nextSibling)Ze(ct);else if((et==3||et==4)&&Y){var $e=Re.nodeValue,qe=$e.match(be);if(qe){var Ue=$e.substring(0,qe.index);Re.nodeValue=Ue;var Me=$e.substring(qe.index+qe[0].length);if(Me){var Ie=Re.parentNode;Ie.insertBefore(ge.createTextNode(Me),Re.nextSibling)}nt(Re),Ue||Re.parentNode.removeChild(Re)}}}function nt(Re){for(;!Re.nextSibling;)if(Re=Re.parentNode,!Re)return;function et(qe,Ue){var Me=Ue?qe.cloneNode(!1):qe,Ie=qe.parentNode;if(Ie){var ye=et(Ie,1),Te=qe.nextSibling;ye.appendChild(Me);for(var Ae=Te;Ae;Ae=Te)Te=Ae.nextSibling,ye.appendChild(Ae)}return Me}for(var ct=et(Re.nextSibling,0),$e;($e=ct.parentNode)&&$e.nodeType===1;)ct=$e;Qe.push(ct)}for(var tt=0;tt=Ie&&(Ze+=2),ge>=ye&&(lt+=2)}}finally{$e&&($e.style.display=qe)}}var _e={};function de(le,Q){for(var Y=Q.length;--Y>=0;){var Z=Q[Y];_e.hasOwnProperty(Z)?c.console&&console.warn("cannot override language handler %s",Z):_e[Z]=le}}function ce(le,Q){return le&&_e.hasOwnProperty(le)||(le=/^\s*]*(?:>|$)/],[A,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[w,/^(?:<[%?]|[%?]>)/],["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"]),de(ee([[_,/^[\s]+/,null,` \r `],[H,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[N,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[z,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[w,/^[=<>\/]+/],["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"]),de(ee([],[[H,/^[\s\S]+/]]),["uq.val"]),de(Ce({keywords:l,hashComments:!0,cStyleComments:!0,types:y}),["c","cc","cpp","cxx","cyc","m"]),de(Ce({keywords:"null,true,false"}),["json"]),de(Ce({keywords:f,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:y}),["cs"]),de(Ce({keywords:p,cStyleComments:!0}),["java"]),de(Ce({keywords:g,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),de(Ce({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),de(Ce({keywords:m,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),de(Ce({keywords:d,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),de(Ce({keywords:v,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),de(Ce({keywords:b,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),de(ee([],[[s,/^[\s\S]+/]]),["regex"]);function ae(le){var Q=le.langExtension;try{var Y=W(le.sourceNode,le.pre),Z=Y.sourceCode;le.sourceCode=Z,le.spans=Y.spans,le.basePos=0,ce(Q,Z)(le),ke(le)}catch(be){c.console&&console.log(be&&be.stack||be)}}function Se(le,Q,Y){var Z=Y||!1,be=Q||null,ge=document.createElement("div");ge.innerHTML="
    "+le+"
    ",ge=ge.firstChild,Z&&he(ge,Z,!0);var De={langExtension:be,numberLines:Z,sourceNode:ge,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return ae(De),ge.innerHTML}function te(le,Q){var Y=Q||document.body,Z=Y.ownerDocument||document;function be(Me){return Y.getElementsByTagName(Me)}for(var ge=[be("pre"),be("code"),be("xmp")],De=[],Qe=0;Qe=15&&(l=!1,a=!0);var s=d&&(i||l&&(y==null||y<12.11)),M=S||C&&c>=9;function A(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var x=function(e,t){var D=e.className,O=A(t).exec(D);if(O){var U=D.slice(O.index+O[0].length);e.className=D.slice(0,O.index)+(U?O[1]+U:"")}};function E(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function w(e,t){return E(e).appendChild(t)}function _(e,t,D,O){var U=document.createElement(e);if(D&&(U.className=D),O&&(U.style.cssText=O),typeof t=="string")U.appendChild(document.createTextNode(t));else if(t)for(var $=0;$=t)return oe+(t-$);oe+=fe-$,oe+=D-oe%D,$=fe+1}}var q=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};q.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},q.prototype.set=function(e,t){this.f=t;var D=+new Date+e;(!this.id||D=t)return O+Math.min(oe,t-U);if(U+=$-O,U+=D-U%D,O=$+1,U>=t)return O}}var de=[""];function ce(e){for(;de.length<=e;)de.push(ae(de)+" ");return de[e]}function ae(e){return e[e.length-1]}function Se(e,t){for(var D=[],O=0;O"\x80"&&(e.toUpperCase()!=e.toLowerCase()||le.test(e))}function Y(e,t){return t?t.source.indexOf("\\w")>-1&&Q(e)?!0:t.test(e):Q(e)}function Z(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var be=/[\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&&be.test(e)}function De(e,t,D){for(;(D<0?t>0:tD?-1:1;;){if(t==D)return t;var U=(t+D)/2,$=O<0?Math.ceil(U):Math.floor(U);if($==t)return e($)?t:D;e($)?D=$:t=$+O}}function Ze(e,t,D,O){if(!e)return O(t,D,"ltr",0);for(var U=!1,$=0;$t||t==D&&oe.to==t)&&(O(Math.max(oe.from,t),Math.min(oe.to,D),oe.level==1?"rtl":"ltr",$),U=!0)}U||O(t,D,"ltr")}var nt=null;function tt(e,t,D){var O;nt=null;for(var U=0;Ut)return U;$.to==t&&($.from!=$.to&&D=="before"?O=U:nt=U),$.from==t&&($.from!=$.to&&D!="before"?O=U:nt=U)}return O!=null?O:nt}var lt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function D(Ee){return Ee<=247?e.charAt(Ee):1424<=Ee&&Ee<=1524?"R":1536<=Ee&&Ee<=1785?t.charAt(Ee-1536):1774<=Ee&&Ee<=2220?"r":8192<=Ee&&Ee<=8203?"w":Ee==8204?"b":"L"}var O=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,U=/[stwN]/,$=/[LRr]/,oe=/[Lb1n]/,fe=/[1n]/;function pe(Ee,We,Ke){this.level=Ee,this.from=We,this.to=Ke}return function(Ee,We){var Ke=We=="ltr"?"L":"R";if(Ee.length==0||We=="ltr"&&!O.test(Ee))return!1;for(var ut=Ee.length,at=[],mt=0;mt-1&&(O[t]=U.slice(0,$).concat(U.slice($+1)))}}}function $e(e,t){var D=et(e,t);if(!D.length)return;for(var O=Array.prototype.slice.call(arguments,2),U=0;U0}function Ie(e){e.prototype.on=function(t,D){Re(this,t,D)},e.prototype.off=function(t,D){ct(this,t,D)}}function ye(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Te(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ae(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Pe(e){ye(e),Te(e)}function Xe(e){return e.target||e.srcElement}function rt(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),d&&e.ctrlKey&&t==1&&(t=3),t}var ft=function(){if(C&&c<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}(),St;function Pt(e){if(St==null){var t=_("span","\u200B");w(e,_("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(St=t.offsetWidth<=1&&t.offsetHeight>2&&!(C&&c<8))}var D=St?_("span","\u200B"):_("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return D.setAttribute("cm-text",""),D}var dt;function At(e){if(dt!=null)return dt;var t=w(e,document.createTextNode("A\u062EA")),D=j(t,0,1).getBoundingClientRect(),O=j(t,1,2).getBoundingClientRect();return E(e),!D||D.left==D.right?!1:dt=O.right-D.right<3}var Ot=` b`.split(/\n/).length!=3?function(e){for(var t=0,D=[],O=e.length;t<=O;){var U=e.indexOf(` `,t);U==-1&&(U=e.length);var $=e.slice(t,e.charAt(U-1)=="\r"?U-1:U),oe=$.indexOf("\r");oe!=-1?(D.push($.slice(0,oe)),t+=oe+1):(D.push($),t=U+1)}return D}:function(e){return e.split(/\r\n?|\n/)},bt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(D){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Vt=function(){var e=_("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),ir=null;function Qt(e){if(ir!=null)return ir;var t=w(e,_("span","x")),D=t.getBoundingClientRect(),O=j(t,0,1).getBoundingClientRect();return ir=Math.abs(D.left-O.left)>1}var dr={},Nt={};function br(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),dr[e]=t}function ur(e,t){Nt[e]=t}function wt(e){if(typeof e=="string"&&Nt.hasOwnProperty(e))e=Nt[e];else if(e&&typeof e.name=="string"&&Nt.hasOwnProperty(e.name)){var t=Nt[e.name];typeof t=="string"&&(t={name:t}),e=Oe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return wt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return wt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function hr(e,t){t=wt(t);var D=dr[t.name];if(!D)return hr(e,"text/plain");var O=D(e,t);if(Qr.hasOwnProperty(t.name)){var U=Qr[t.name];for(var $ in U){if(!U.hasOwnProperty($))continue;O.hasOwnProperty($)&&(O["_"+$]=O[$]),O[$]=U[$]}}if(O.name=t.name,t.helperType&&(O.helperType=t.helperType),t.modeProps)for(var oe in t.modeProps)O[oe]=t.modeProps[oe];return O}var Qr={};function Gr(e,t){var D=Qr.hasOwnProperty(e)?Qr[e]:Qr[e]={};W(t,D)}function Lr(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var D={};for(var O in t){var U=t[O];U instanceof Array&&(U=U.concat([])),D[O]=U}return D}function si(e,t){for(var D;e.innerMode&&!(D=e.innerMode(t),!D||D.mode==e);)t=D.state,e=D.mode;return D||{mode:e,state:t}}function Tt(e,t,D){return e.startState?e.startState(t,D):!0}var Dt=function(e,t,D){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=D};Dt.prototype.eol=function(){return this.pos>=this.string.length},Dt.prototype.sol=function(){return this.pos==this.lineStart},Dt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Dt.prototype.next=function(){if(this.post},Dt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Dt.prototype.skipToEnd=function(){this.pos=this.string.length},Dt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Dt.prototype.backUp=function(e){this.pos-=e},Dt.prototype.column=function(){return this.lastColumnPos0?null:($&&t!==!1&&(this.pos+=$[0].length),$)}},Dt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Dt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Dt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Dt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ct(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var D=e;!D.lines;)for(var O=0;;++O){var U=D.children[O],$=U.chunkSize();if(t<$){D=U;break}t-=$}return D.lines[t]}function Rr(e,t,D){var O=[],U=t.line;return e.iter(t.line,D.line+1,function($){var oe=$.text;U==D.line&&(oe=oe.slice(0,D.ch)),U==t.line&&(oe=oe.slice(t.ch)),O.push(oe),++U}),O}function jr(e,t,D){var O=[];return e.iter(t,D,function(U){O.push(U.text)}),O}function $t(e,t){var D=t-e.height;if(D)for(var O=e;O;O=O.parent)O.height+=D}function jt(e){if(e.parent==null)return null;for(var t=e.parent,D=re(t.lines,e),O=t.parent;O;t=O,O=O.parent)for(var U=0;!(O.children[U]==t);++U)D+=O.children[U].chunkSize();return D+t.first}function Ur(e,t){var D=e.first;e:do{for(var O=0;O=e.first&&tD?vt(D,Ct(e,D).text.length):X(t,Ct(e,t.line).text.length)}function X(e,t){var D=e.ch;return D==null||D>t?vt(e.line,t):D<0?vt(e.line,0):e}function ne(e,t){for(var D=[],O=0;Othis.maxLookAhead&&(this.maxLookAhead=e),t},ie.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ie.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ie.fromSaved=function(e,t,D){return t instanceof me?new ie(e,Lr(e.mode,t.state),D,t.lookAhead):new ie(e,Lr(e.mode,t),D)},ie.prototype.save=function(e){var t=e!==!1?Lr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new me(t,this.maxLookAhead):t};function ze(e,t,D,O){var U=[e.state.modeGen],$={};Zr(e,t.text,e.doc.mode,D,function(Ee,We){return U.push(Ee,We)},$,O);for(var oe=D.state,fe=function(Ee){D.baseTokens=U;var We=e.state.overlays[Ee],Ke=1,ut=0;D.state=!0,Zr(e,t.text,We.mode,D,function(at,mt){for(var yt=Ke;utat&&U.splice(Ke,1,at,U[Ke+1],_t),Ke+=2,ut=Math.min(at,_t)}if(!mt)return;if(We.opaque)U.splice(yt,Ke-yt,at,"overlay "+mt),Ke=yt+2;else for(;yte.options.maxHighlightLength&&Lr(e.doc.mode,O.state),$=ze(e,t,O);U&&(O.state=U),t.stateAfter=O.save(!U),t.styles=$.styles,$.classes?t.styleClasses=$.classes:t.styleClasses&&(t.styleClasses=null),D===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ot(e,t,D){var O=e.doc,U=e.display;if(!O.mode.startState)return new ie(O,!0,t);var $=Zt(e,t,D),oe=$>O.first&&Ct(O,$-1).stateAfter,fe=oe?ie.fromSaved(O,oe,$):new ie(O,Tt(O.mode),$);return O.iter($,t,function(pe){It(e,pe.text,fe);var Ee=fe.line;pe.stateAfter=Ee==t-1||Ee%5==0||Ee>=U.viewFrom&&Eet.start)return $}throw new Error("Mode "+e.name+" failed to advance stream.")}var Xt=function(e,t,D){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=D};function Sr(e,t,D,O){var U=e.doc,$=U.mode,oe;t=V(U,t);var fe=Ct(U,t.line),pe=ot(e,t.line,D),Ee=new Dt(fe.text,e.options.tabSize,pe),We;for(O&&(We=[]);(O||Ee.pose.options.maxHighlightLength?(fe=!1,oe&&It(e,t,O,We.pos),We.pos=t.length,Ke=null):Ke=an(Ht(D,We,O.state,ut),$),ut){var at=ut[0].name;at&&(Ke="m-"+(Ke?at+" "+Ke:at))}if(!fe||Ee!=Ke){for(;peoe;--fe){if(fe<=$.first)return $.first;var pe=Ct($,fe-1),Ee=pe.stateAfter;if(Ee&&(!D||fe+(Ee instanceof me?Ee.lookAhead:0)<=$.modeFrontier))return fe;var We=K(pe.text,null,e.options.tabSize);(U==null||O>We)&&(U=fe-1,O=We)}return U}function Hr(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontierD;O--){var U=Ct(e,O).stateAfter;if(U&&(!(U instanceof me)||O+U.lookAhead=t:$.to>t);(O||(O=[])).push(new Xr(oe,$.from,pe?null:$.to))}}return O}function Ui(e,t,D){var O;if(e)for(var U=0;U=t:$.to>t);if(fe||$.from==t&&oe.type=="bookmark"&&(!D||$.marker.insertLeft)){var pe=$.from==null||(oe.inclusiveLeft?$.from<=t:$.from0&&fe)for(var Wt=0;Wt0)continue;var We=[pe,1],Ke=Ft(Ee.from,fe.from),ut=Ft(Ee.to,fe.to);(Ke<0||!oe.inclusiveLeft&&!Ke)&&We.push({from:Ee.from,to:fe.from}),(ut>0||!oe.inclusiveRight&&!ut)&&We.push({from:fe.to,to:Ee.to}),U.splice.apply(U,We),pe+=We.length-3}return U}function on(e){var t=e.markedSpans;if(!t)return;for(var D=0;Dt)&&(!O||en(O,$.marker)<0)&&(O=$.marker)}return O}function gn(e,t,D,O,U){var $=Ct(e,t),oe=Jt&&$.markedSpans;if(oe)for(var fe=0;fe=0&&Ke<=0||We<=0&&Ke>=0)continue;if(We<=0&&(pe.marker.inclusiveRight&&U.inclusiveLeft?Ft(Ee.to,D)>=0:Ft(Ee.to,D)>0)||We>=0&&(pe.marker.inclusiveRight&&U.inclusiveLeft?Ft(Ee.from,O)<=0:Ft(Ee.from,O)<0))return!0}}function On(e){for(var t;t=En(e);)e=t.find(-1,!0).line;return e}function ui(e){for(var t;t=Fr(e);)e=t.find(1,!0).line;return e}function ci(e){for(var t,D;t=Fr(e);)e=t.find(1,!0).line,(D||(D=[])).push(e);return D}function qn(e,t){var D=Ct(e,t),O=On(D);return D==O?t:jt(O)}function Ei(e,t){if(t>e.lastLine())return t;var D=Ct(e,t),O;if(!Yn(e,D))return t;for(;O=Fr(D);)D=O.find(1,!0).line;return jt(D)+1}function Yn(e,t){var D=Jt&&t.markedSpans;if(D)for(var O=void 0,U=0;Ut.maxLineLength&&(t.maxLineLength=U,t.maxLine=O)})}var ei=function(e,t,D){this.text=e,Zn(this,t),this.height=D?D(this):1};ei.prototype.lineNo=function(){return jt(this)},Ie(ei);function $r(e,t,D,O){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),on(e),Zn(e,D);var U=O?O(e):1;U!=e.height&&$t(e,U)}function $i(e){e.parent=null,on(e)}var ta={},Ni={};function Ji(e,t){if(!e||/^\s*$/.test(e))return null;var D=t.addModeClass?Ni:ta;return D[e]||(D[e]=e.replace(/\S+/g,"cm-$&"))}function Gi(e,t){var D=N("span",null,null,a?"padding-right: .1px":null),O={pre:N("pre",[D],"CodeMirror-line"),content:D,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var U=0;U<=(t.rest?t.rest.length:0);U++){var $=U?t.rest[U-1]:t.line,oe=void 0;O.pos=0,O.addToken=ar,At(e.display.measure)&&(oe=st($,e.doc.direction))&&(O.addToken=xr(O.addToken,oe)),O.map=[];var fe=t!=e.display.externalMeasured&&jt($);Br($,O,pt(e,$,fe)),$.styleClasses&&($.styleClasses.bgClass&&(O.bgClass=F($.styleClasses.bgClass,O.bgClass||"")),$.styleClasses.textClass&&(O.textClass=F($.styleClasses.textClass,O.textClass||""))),O.map.length==0&&O.map.push(0,0,O.content.appendChild(Pt(e.display.measure))),U==0?(t.measure.map=O.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(O.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(a){var pe=O.content.lastChild;(/\bcm-tab\b/.test(pe.className)||pe.querySelector&&pe.querySelector(".cm-tab"))&&(O.content.className="cm-tab-wrap-hack")}return $e(e,"renderLine",e,t.line,O.pre),O.pre.className&&(O.textClass=F(O.pre.className,O.textClass||"")),O}function Bt(e){var t=_("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function ar(e,t,D,O,U,$,oe){if(!t)return;var fe=e.splitSpaces?Kt(t,e.trailingSpace):t,pe=e.cm.state.specialChars,Ee=!1,We;if(!pe.test(t))e.col+=t.length,We=document.createTextNode(fe),e.map.push(e.pos,e.pos+t.length,We),C&&c<9&&(Ee=!0),e.pos+=t.length;else{We=document.createDocumentFragment();for(var Ke=0;;){pe.lastIndex=Ke;var ut=pe.exec(t),at=ut?ut.index-Ke:t.length-Ke;if(at){var mt=document.createTextNode(fe.slice(Ke,Ke+at));C&&c<9?We.appendChild(_("span",[mt])):We.appendChild(mt),e.map.push(e.pos,e.pos+at,mt),e.col+=at,e.pos+=at}if(!ut)break;Ke+=at+1;var yt=void 0;if(ut[0]==" "){var _t=e.cm.options.tabSize,kt=_t-e.col%_t;yt=We.appendChild(_("span",ce(kt),"cm-tab")),yt.setAttribute("role","presentation"),yt.setAttribute("cm-text"," "),e.col+=kt}else ut[0]=="\r"||ut[0]==` `?(yt=We.appendChild(_("span",ut[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),yt.setAttribute("cm-text",ut[0]),e.col+=1):(yt=e.cm.options.specialCharPlaceholder(ut[0]),yt.setAttribute("cm-text",ut[0]),C&&c<9?We.appendChild(_("span",[yt])):We.appendChild(yt),e.col+=1);e.map.push(e.pos,e.pos+1,yt),e.pos++}}if(e.trailingSpace=fe.charCodeAt(t.length-1)==32,D||O||U||Ee||$||oe){var Ut=D||"";O&&(Ut+=O),U&&(Ut+=U);var Lt=_("span",[We],Ut,$);if(oe)for(var Wt in oe)oe.hasOwnProperty(Wt)&&Wt!="style"&&Wt!="class"&&Lt.setAttribute(Wt,oe[Wt]);return e.content.appendChild(Lt)}e.content.appendChild(We)}function Kt(e,t){if(e.length>1&&!/ /.test(e))return e;for(var D=t,O="",U=0;UEe&&Ke.from<=Ee);ut++);if(Ke.to>=We)return e(D,O,U,$,oe,fe,pe);e(D,O.slice(0,Ke.to-Ee),U,$,null,fe,pe),$=null,O=O.slice(Ke.to-Ee),Ee=Ke.to}}}function Dr(e,t,D,O){var U=!O&&D.widgetNode;U&&e.map.push(e.pos,e.pos+t,U),!O&&e.cm.display.input.needsContentAttribute&&(U||(U=e.content.appendChild(document.createElement("span"))),U.setAttribute("cm-marker",D.id)),U&&(e.cm.display.input.setUneditable(U),e.content.appendChild(U)),e.pos+=t,e.trailingSpace=!1}function Br(e,t,D){var O=e.markedSpans,U=e.text,$=0;if(!O){for(var oe=1;oepe||kr.collapsed&&er.to==pe&&er.from==pe)){if(er.to!=null&&er.to!=pe&&at>er.to&&(at=er.to,yt=""),kr.className&&(mt+=" "+kr.className),kr.css&&(ut=(ut?ut+";":"")+kr.css),kr.startStyle&&er.from==pe&&(_t+=" "+kr.startStyle),kr.endStyle&&er.to==at&&(Wt||(Wt=[])).push(kr.endStyle,er.to),kr.title&&((Ut||(Ut={})).title=kr.title),kr.attributes)for(var Tn in kr.attributes)(Ut||(Ut={}))[Tn]=kr.attributes[Tn];kr.collapsed&&(!kt||en(kt.marker,kr)<0)&&(kt=er)}else er.from>pe&&at>er.from&&(at=er.from)}if(Wt)for(var di=0;di=fe)break;for(var ji=Math.min(fe,at);;){if(We){var Mi=pe+We.length;if(!kt){var Jn=Mi>ji?We.slice(0,ji-pe):We;t.addToken(t,Jn,Ke?Ke+mt:mt,_t,pe+Jn.length==at?yt:"",ut,Ut)}if(Mi>=ji){We=We.slice(ji-pe),pe=ji;break}pe=Mi,_t=""}We=U.slice($,$=D[Ee++]),Ke=Ji(D[Ee++],t.cm.options)}}}function Or(e,t,D){this.line=t,this.rest=ci(t),this.size=this.rest?jt(ae(this.rest))-D+1:1,this.node=this.text=null,this.hidden=Yn(e,t)}function un(e,t,D){for(var O=[],U,$=t;$2&&$.push((pe.bottom+Ee.top)/2-D.top)}}$.push(D.bottom-D.top)}}function we(e,t,D){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var O=0;OD)return{map:e.measure.maps[U],cache:e.measure.caches[U],before:!0}}function Be(e,t){t=On(t);var D=jt(t),O=e.display.externalMeasured=new Or(e.doc,t,D);O.lineN=D;var U=O.built=Gi(e,O);return O.text=U.pre,w(e.display.lineMeasure,U.pre),O}function He(e,t,D,O){return it(e,Ve(e,t),D,O)}function Ye(e,t){if(t>=e.display.viewFrom&&t=D.lineN&&tt)&&($=pe-fe,U=$-1,t>=pe&&(oe="right")),U!=null){if(O=e[Ee+2],fe==pe&&D==(O.insertLeft?"left":"right")&&(oe=D),D=="left"&&U==0)for(;Ee&&e[Ee-2]==e[Ee-3]&&e[Ee-1].insertLeft;)O=e[(Ee-=3)+2],oe="left";if(D=="right"&&U==pe-fe)for(;Ee=0&&!((D=e[U]).left!=D.right);U--);return D}function Rt(e,t,D,O){var U=Et(t.map,D,O),$=U.node,oe=U.start,fe=U.end,pe=U.collapse,Ee;if($.nodeType==3){for(var We=0;We<4;We++){for(;oe&&ge(t.line.text.charAt(U.coverStart+oe));)--oe;for(;U.coverStart+fe0&&(pe=O="right");var Ke;e.options.lineWrapping&&(Ke=$.getClientRects()).length>1?Ee=Ke[O=="right"?Ke.length-1:0]:Ee=$.getBoundingClientRect()}if(C&&c<9&&!oe&&(!Ee||!Ee.left&&!Ee.right)){var ut=$.parentNode.getClientRects()[0];ut?Ee={left:ut.left,right:ut.left+ti(e.display),top:ut.top,bottom:ut.bottom}:Ee=ht}for(var at=Ee.top-t.rect.top,mt=Ee.bottom-t.rect.top,yt=(at+mt)/2,_t=t.view.measure.heights,kt=0;kt<_t.length-1&&!(yt<_t[kt]);kt++);var Ut=kt?_t[kt-1]:0,Lt=_t[kt],Wt={left:(pe=="right"?Ee.right:Ee.left)-t.rect.left,right:(pe=="left"?Ee.left:Ee.right)-t.rect.left,top:Ut,bottom:Lt};return!Ee.left&&!Ee.right&&(Wt.bogus=!0),e.options.singleCursorHeightPerLine||(Wt.rtop=at,Wt.rbottom=mt),Wt}function Yt(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Qt(e))return t;var D=screen.logicalXDPI/screen.deviceXDPI,O=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*D,right:t.right*D,top:t.top*O,bottom:t.bottom*O}}function gr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=O.text.length?(pe=O.text.length,Ee="before"):pe<=0&&(pe=0,Ee="after"),!fe)return oe(Ee=="before"?pe-1:pe,Ee=="before");function We(mt,yt,_t){var kt=fe[yt],Ut=kt.level==1;return oe(_t?mt-1:mt,Ut!=_t)}var Ke=tt(fe,pe,Ee),ut=nt,at=We(pe,Ke,Ee=="before");return ut!=null&&(at.other=We(pe,ut,Ee!="before")),at}function nr(e,t){var D=0;t=V(e.doc,t),e.options.lineWrapping||(D=ti(e.display)*t.ch);var O=Ct(e.doc,t.line),U=zn(O)+Xi(e.display);return{left:D,right:D,top:U,bottom:U+O.height}}function qt(e,t,D,O,U){var $=vt(e,t,D);return $.xRel=U,O&&($.outside=O),$}function Nr(e,t,D){var O=e.doc;if(D+=e.display.viewOffset,D<0)return qt(O.first,0,null,-1,-1);var U=Ur(O,D),$=O.first+O.size-1;if(U>$)return qt(O.first+O.size-1,Ct(O,$).text.length,null,1,1);t<0&&(t=0);for(var oe=Ct(O,U);;){var fe=Ln(e,oe,U,t,D),pe=xi(oe,fe.ch+(fe.xRel>0||fe.outside>0?1:0));if(!pe)return fe;var Ee=pe.find(1);if(Ee.line==U)return Ee;oe=Ct(O,U=Ee.line)}}function Kr(e,t,D,O){O-=Cr(t);var U=t.text.length,$=Qe(function(oe){return it(e,D,oe-1).bottom<=O},U,0);return U=Qe(function(oe){return it(e,D,oe).top>O},$,U),{begin:$,end:U}}function zt(e,t,D,O){D||(D=Ve(e,t));var U=zr(e,t,it(e,D,O),"line").top;return Kr(e,t,D,U)}function Jr(e,t,D,O){return e.bottom<=D?!1:e.top>D?!0:(O?e.left:e.right)>t}function Ln(e,t,D,O,U){U-=zn(t);var $=Ve(e,t),oe=Cr(t),fe=0,pe=t.text.length,Ee=!0,We=st(t,e.doc.direction);if(We){var Ke=(e.options.lineWrapping?yn:nn)(e,t,D,$,We,O,U);Ee=Ke.level!=1,fe=Ee?Ke.from:Ke.to-1,pe=Ee?Ke.to:Ke.from-1}var ut=null,at=null,mt=Qe(function(lr){var er=it(e,$,lr);return er.top+=oe,er.bottom+=oe,Jr(er,O,U,!1)?(er.top<=U&&er.left<=O&&(ut=lr,at=er),!0):!1},fe,pe),yt,_t,kt=!1;if(at){var Ut=O-at.left=Wt.bottom?1:0}return mt=De(t.text,mt,1),qt(D,mt,_t,kt,O-yt)}function nn(e,t,D,O,U,$,oe){var fe=Qe(function(Ke){var ut=U[Ke],at=ut.level!=1;return Jr(Ir(e,vt(D,at?ut.to:ut.from,at?"before":"after"),"line",t,O),$,oe,!0)},0,U.length-1),pe=U[fe];if(fe>0){var Ee=pe.level!=1,We=Ir(e,vt(D,Ee?pe.from:pe.to,Ee?"after":"before"),"line",t,O);Jr(We,$,oe,!0)&&We.top>oe&&(pe=U[fe-1])}return pe}function yn(e,t,D,O,U,$,oe){var fe=Kr(e,t,O,oe),pe=fe.begin,Ee=fe.end;/\s/.test(t.text.charAt(Ee-1))&&Ee--;for(var We=null,Ke=null,ut=0;ut=Ee||at.to<=pe)continue;var mt=at.level!=1,yt=it(e,O,mt?Math.min(Ee,at.to)-1:Math.max(pe,at.from)).right,_t=yt<$?$-yt+1e9:yt-$;(!We||Ke>_t)&&(We=at,Ke=_t)}return We||(We=U[U.length-1]),We.fromEe&&(We={from:We.from,to:Ee,level:We.level}),We}var fn;function Wn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(fn==null){fn=_("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)fn.appendChild(document.createTextNode("x")),fn.appendChild(_("br"));fn.appendChild(document.createTextNode("x"))}w(e.measure,fn);var D=fn.offsetHeight/50;return D>3&&(e.cachedTextHeight=D),E(e.measure),D||1}function ti(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=_("span","xxxxxxxxxx"),D=_("pre",[t],"CodeMirror-line-like");w(e.measure,D);var O=t.getBoundingClientRect(),U=(O.right-O.left)/10;return U>2&&(e.cachedCharWidth=U),U||10}function In(e){for(var t=e.display,D={},O={},U=t.gutters.clientLeft,$=t.gutters.firstChild,oe=0;$;$=$.nextSibling,++oe){var fe=e.display.gutterSpecs[oe].className;D[fe]=$.offsetLeft+$.clientLeft+U,O[fe]=$.clientWidth}return{fixedPos:vi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:D,gutterWidth:O,wrapperWidth:t.wrapper.clientWidth}}function vi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Fi(e){var t=Wn(e.display),D=e.options.lineWrapping,O=D&&Math.max(5,e.display.scroller.clientWidth/ti(e.display)-3);return function(U){if(Yn(e.doc,U))return 0;var $=0;if(U.widgets)for(var oe=0;oe0&&(Ee=Ct(e.doc,pe.line).text).length==pe.ch){var We=K(Ee,Ee.length,e.options.tabSize)-Ee.length;pe=vt(pe.line,Math.max(0,Math.round(($-Ge(e.display).left)/ti(e.display))-We))}return pe}function Sn(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var D=e.display.view,O=0;Ot)&&(U.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=U.viewTo)Jt&&qn(e.doc,t)U.viewFrom?Mn(e):(U.viewFrom+=O,U.viewTo+=O);else if(t<=U.viewFrom&&D>=U.viewTo)Mn(e);else if(t<=U.viewFrom){var $=Bi(e,D,D+O,1);$?(U.view=U.view.slice($.index),U.viewFrom=$.lineN,U.viewTo+=O):Mn(e)}else if(D>=U.viewTo){var oe=Bi(e,t,t,-1);oe?(U.view=U.view.slice(0,oe.index),U.viewTo=oe.lineN):Mn(e)}else{var fe=Bi(e,t,t,-1),pe=Bi(e,D,D+O,1);fe&&pe?(U.view=U.view.slice(0,fe.index).concat(un(e,fe.lineN,pe.lineN)).concat(U.view.slice(pe.index)),U.viewTo+=O):Mn(e)}var Ee=U.externalMeasured;Ee&&(D=U.lineN&&t=O.viewTo)return;var $=O.view[Sn(e,t)];if($.node==null)return;var oe=$.changes||($.changes=[]);re(oe,D)==-1&&oe.push(D)}function Mn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Bi(e,t,D,O){var U=Sn(e,t),$,oe=e.display.view;if(!Jt||D==e.doc.first+e.doc.size)return{index:U,lineN:D};for(var fe=e.display.viewFrom,pe=0;pe0){if(U==oe.length-1)return null;$=fe+oe[U].size-t,U++}else $=fe-t;t+=$,D+=$}for(;qn(e.doc,D)!=D;){if(U==(O<0?0:oe.length-1))return null;D+=O*oe[U-(O<0?1:0)].size,U+=O}return{index:U,lineN:D}}function ra(e,t,D){var O=e.display,U=O.view;U.length==0||t>=O.viewTo||D<=O.viewFrom?(O.view=un(e,t,D),O.viewFrom=t):(O.viewFrom>t?O.view=un(e,t,O.viewFrom).concat(O.view):O.viewFromD&&(O.view=O.view.slice(0,Sn(e,D)))),O.viewTo=D}function na(e){for(var t=e.display.view,D=0,O=0;O=e.display.viewTo||fe.to().line0?t.blinker=setInterval(function(){e.hasFocus()||va(e),t.cursorDiv.style.visibility=(D=!D)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function To(e){e.state.focused||(e.display.input.focus(),aa(e))}function eo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,va(e))},100)}function aa(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||($e(e,"focus",e,t),e.state.focused=!0,H(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),a&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ni(e)}function va(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&($e(e,"blur",e,t),e.state.focused=!1,x(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Pa(e){for(var t=e.display,D=t.lineDiv.offsetTop,O=0;O.005||We<-.005)&&($t(U.line,oe),to(U.line),U.rest))for(var Ke=0;Kee.display.sizerWidth){var ut=Math.ceil(fe/ti(e.display));ut>e.display.maxLineLength&&(e.display.maxLineLength=ut,e.display.maxLine=U.line,e.display.maxLineChanged=!0)}}}function to(e){if(e.widgets)for(var t=0;t=oe&&($=Ur(t,zn(Ct(t,pe))-e.wrapper.clientHeight),oe=pe)}return{from:$,to:Math.max(oe,$+1)}}function Xo(e,t){if(qe(e,"scrollCursorIntoView"))return;var D=e.display,O=D.sizer.getBoundingClientRect(),U=null;if(t.top+O.top<0?U=!0:t.bottom+O.top>(window.innerHeight||document.documentElement.clientHeight)&&(U=!1),U!=null&&!b){var $=_("div","\u200B",null,`position: absolute; top: `+(t.top-D.viewOffset-Xi(e.display))+`px; height: `+(t.bottom-t.top+Je(e)+D.barHeight)+`px; left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild($),$.scrollIntoView(U),e.display.lineSpace.removeChild($)}}function Yo(e,t,D,O){O==null&&(O=0);var U;!e.options.lineWrapping&&t==D&&(t=t.ch?vt(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,D=t.sticky=="before"?vt(t.line,t.ch+1,"before"):t);for(var $=0;$<5;$++){var oe=!1,fe=Ir(e,t),pe=!D||D==t?fe:Ir(e,D);U={left:Math.min(fe.left,pe.left),top:Math.min(fe.top,pe.top)-O,right:Math.max(fe.left,pe.left),bottom:Math.max(fe.bottom,pe.bottom)+O};var Ee=ro(e,U),We=e.doc.scrollTop,Ke=e.doc.scrollLeft;if(Ee.scrollTop!=null&&(xa(e,Ee.scrollTop),Math.abs(e.doc.scrollTop-We)>1&&(oe=!0)),Ee.scrollLeft!=null&&(Wi(e,Ee.scrollLeft),Math.abs(e.doc.scrollLeft-Ke)>1&&(oe=!0)),!oe)break}return U}function _o(e,t){var D=ro(e,t);D.scrollTop!=null&&xa(e,D.scrollTop),D.scrollLeft!=null&&Wi(e,D.scrollLeft)}function ro(e,t){var D=e.display,O=Wn(e.display);t.top<0&&(t.top=0);var U=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:D.scroller.scrollTop,$=ve(e),oe={};t.bottom-t.top>$&&(t.bottom=t.top+$);var fe=e.doc.height+Ne(D),pe=t.topfe-O;if(t.topU+$){var We=Math.min(t.top,(Ee?fe:t.bottom)-$);We!=U&&(oe.scrollTop=We)}var Ke=e.options.fixedGutter?0:D.gutters.offsetWidth,ut=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:D.scroller.scrollLeft-Ke,at=Fe(e)-D.gutters.offsetWidth,mt=t.right-t.left>at;return mt&&(t.right=t.left+at),t.left<10?oe.scrollLeft=0:t.leftat+ut-3&&(oe.scrollLeft=t.right+(mt?0:10)-at),oe}function no(e,t){if(t==null)return;Na(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function ya(e){Na(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ba(e,t,D){(t!=null||D!=null)&&Na(e),t!=null&&(e.curOp.scrollLeft=t),D!=null&&(e.curOp.scrollTop=D)}function $o(e,t){Na(e),e.curOp.scrollToPos=t}function Na(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var D=nr(e,t.from),O=nr(e,t.to);Oa(e,D,O,t.margin)}}function Oa(e,t,D,O){var U=ro(e,{left:Math.min(t.left,D.left),top:Math.min(t.top,D.top)-O,right:Math.max(t.right,D.right),bottom:Math.max(t.bottom,D.bottom)+O});ba(e,U.scrollLeft,U.scrollTop)}function xa(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;S||Da(e,{top:t}),Ea(e,t,!0),S&&Da(e),Ra(e,100)}function Ea(e,t,D){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!D)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function Wi(e,t,D,O){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(D?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!O)return;e.doc.scrollLeft=t,Wr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ca(e){var t=e.display,D=t.gutters.offsetWidth,O=Math.round(e.doc.height+Ne(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?D:0,docHeight:O,scrollHeight:O+Je(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:D}}var oa=function(e,t,D){this.cm=D;var O=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),U=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");O.tabIndex=U.tabIndex=-1,e(O),e(U),Re(O,"scroll",function(){O.clientHeight&&t(O.scrollTop,"vertical")}),Re(U,"scroll",function(){U.clientWidth&&t(U.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,C&&c<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};oa.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,D=e.scrollHeight>e.clientHeight+1,O=e.nativeBarWidth;if(D){this.vert.style.display="block",this.vert.style.bottom=t?O+"px":"0";var U=e.viewHeight-(t?O:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+U)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=D?O+"px":"0",this.horiz.style.left=e.barLeft+"px";var $=e.viewWidth-e.barLeft-(D?O:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+$)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(O==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:D?O:0,bottom:t?O:0}},oa.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},oa.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},oa.prototype.zeroWidthHack=function(){var e=d&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new q,this.disableVert=new q},oa.prototype.enableZeroWidthBar=function(e,t,D){e.style.pointerEvents="auto";function O(){var U=e.getBoundingClientRect(),$=D=="vert"?document.elementFromPoint(U.right-1,(U.top+U.bottom)/2):document.elementFromPoint((U.right+U.left)/2,U.bottom-1);$!=e?e.style.pointerEvents="none":t.set(1e3,O)}t.set(1e3,O)},oa.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Aa=function(){};Aa.prototype.update=function(){return{bottom:0,right:0}},Aa.prototype.setScrollLeft=function(){},Aa.prototype.setScrollTop=function(){},Aa.prototype.clear=function(){};function da(e,t){t||(t=ca(e));var D=e.display.barWidth,O=e.display.barHeight;ja(e,t);for(var U=0;U<4&&D!=e.display.barWidth||O!=e.display.barHeight;U++)D!=e.display.barWidth&&e.options.lineWrapping&&Pa(e),ja(e,ca(e)),D=e.display.barWidth,O=e.display.barHeight}function ja(e,t){var D=e.display,O=D.scrollbars.update(t);D.sizer.style.paddingRight=(D.barWidth=O.right)+"px",D.sizer.style.paddingBottom=(D.barHeight=O.bottom)+"px",D.heightForcer.style.borderBottom=O.bottom+"px solid transparent",O.right&&O.bottom?(D.scrollbarFiller.style.display="block",D.scrollbarFiller.style.height=O.bottom+"px",D.scrollbarFiller.style.width=O.right+"px"):D.scrollbarFiller.style.display="",O.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(D.gutterFiller.style.display="block",D.gutterFiller.style.height=O.bottom+"px",D.gutterFiller.style.width=t.gutterWidth+"px"):D.gutterFiller.style.display=""}var io={native:oa,null:Aa};function Ua(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&x(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new io[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Re(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,D){D=="horizontal"?Wi(e,t):xa(e,t)},e),e.display.scrollbars.addClass&&H(e.display.wrapper,e.display.scrollbars.addClass)}var ao=0;function sa(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:++ao},Er(e.curOp)}function ha(e){var t=e.curOp;t&&Gt(t,function(D){for(var O=0;O=D.viewTo)||D.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Hi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&fa(e.cm,e.update)}function Zo(e){var t=e.cm,D=t.display;e.updatedDisplay&&Pa(t),e.barMeasure=ca(t),D.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=He(t,D.maxLine,D.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(D.scroller.clientWidth,D.sizer.offsetLeft+e.adjustWidthTo+Je(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,D.sizer.offsetLeft+e.adjustWidthTo-Fe(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=D.input.prepareSelection())}function oo(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var D=+new Date+e.options.workTime,O=ot(e,t.highlightFrontier),U=[];t.iter(O.line,Math.min(t.first+t.size,e.display.viewTo+500),function($){if(O.line>=e.display.viewFrom){var oe=$.styles,fe=$.text.length>e.options.maxHighlightLength?Lr(t.mode,O.state):null,pe=ze(e,$,O,!0);fe&&(O.state=fe),$.styles=pe.styles;var Ee=$.styleClasses,We=pe.classes;We?$.styleClasses=We:Ee&&($.styleClasses=null);for(var Ke=!oe||oe.length!=$.styles.length||Ee!=We&&(!Ee||!We||Ee.bgClass!=We.bgClass||Ee.textClass!=We.textClass),ut=0;!Ke&&utD)return Ra(e,e.options.workDelay),!0}),t.highlightFrontier=O.line,t.modeFrontier=Math.max(t.modeFrontier,O.line),U.length&&Ci(e,function(){for(var $=0;$=D.viewFrom&&t.visible.to<=D.viewTo&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo)&&D.renderedView==D.view&&na(e)==0)return!1;ii(e)&&(Mn(e),t.dims=In(e));var U=O.first+O.size,$=Math.max(t.visible.from-e.options.viewportMargin,O.first),oe=Math.min(U,t.visible.to+e.options.viewportMargin);D.viewFrom<$&&$-D.viewFrom<20&&($=Math.max(O.first,D.viewFrom)),D.viewTo>oe&&D.viewTo-oe<20&&(oe=Math.min(U,D.viewTo)),Jt&&($=qn(e.doc,$),oe=Ei(e.doc,oe));var fe=$!=D.viewFrom||oe!=D.viewTo||D.lastWrapHeight!=t.wrapperHeight||D.lastWrapWidth!=t.wrapperWidth;ra(e,$,oe),D.viewOffset=zn(Ct(e.doc,D.viewFrom)),e.display.mover.style.top=D.viewOffset+"px";var pe=na(e);if(!fe&&pe==0&&!t.force&&D.renderedView==D.view&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo))return!1;var Ee=Ro(e);return pe>4&&(D.lineDiv.style.display="none"),ko(e,D.updateLineNumbers,t.dims),pe>4&&(D.lineDiv.style.display=""),D.renderedView=D.view,Do(Ee),E(D.cursorDiv),E(D.selectionDiv),D.gutters.style.height=D.sizer.style.minHeight=0,fe&&(D.lastWrapHeight=t.wrapperHeight,D.lastWrapWidth=t.wrapperWidth,Ra(e,400)),D.updateLineNumbers=null,!0}function Fa(e,t){for(var D=t.viewport,O=!0;;O=!1){if(!O||!e.options.lineWrapping||t.oldDisplayWidth==Fe(e)){if(D&&D.top!=null&&(D={top:Math.min(e.doc.height+Ne(e.display)-ve(e),D.top)}),t.visible=Ia(e.display,e.doc,D),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else O&&(t.visible=Ia(e.display,e.doc,D));if(!fa(e,t))break;Pa(e);var U=ca(e);pn(e),da(e,U),cn(e,U),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Da(e,t){var D=new Hi(e,t);if(fa(e,D)){Pa(e),Fa(e,D);var O=ca(e);pn(e),da(e,O),cn(e,O),D.finish()}}function ko(e,t,D){var O=e.display,U=e.options.lineNumbers,$=O.lineDiv,oe=$.firstChild;function fe(mt){var yt=mt.nextSibling;return a&&d&&e.display.currentWheelTarget==mt?mt.style.display="none":mt.parentNode.removeChild(mt),yt}for(var pe=O.view,Ee=O.viewFrom,We=0;We-1&&(at=!1),Di(e,Ke,Ee,D)),at&&(E(Ke.lineNumber),Ke.lineNumber.appendChild(document.createTextNode(Vr(e.options,Ee)))),oe=Ke.node.nextSibling}Ee+=Ke.size}for(;oe;)oe=fe(oe)}function Ba(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function cn(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Je(e)+"px"}function Wr(e){var t=e.display,D=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var O=vi(t)-t.scroller.scrollLeft+e.doc.scrollLeft,U=t.gutters.offsetWidth,$=O+"px",oe=0;oeoe.clientWidth,pe=oe.scrollHeight>oe.clientHeight;if(!(O&&fe||U&&pe))return;if(U&&d&&a){e:for(var Ee=t.target,We=$.view;Ee!=oe;Ee=Ee.parentNode)for(var Ke=0;Ke=0&&Ft(e,O.to())<=0)return D}return-1};var sn=function(e,t){this.anchor=e,this.head=t};sn.prototype.from=function(){return Rn(this.anchor,this.head)},sn.prototype.to=function(){return An(this.anchor,this.head)},sn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function zi(e,t,D){var O=e&&e.options.selectionsMayTouch,U=t[D];t.sort(function(ut,at){return Ft(ut.from(),at.from())}),D=re(t,U);for(var $=1;$0:pe>=0){var Ee=Rn(fe.from(),oe.from()),We=An(fe.to(),oe.to()),Ke=fe.empty()?oe.from()==oe.head:fe.from()==fe.head;$<=D&&--D,t.splice(--$,2,new sn(Ke?We:Ee,Ke?Ee:We))}}return new Ti(t,D)}function Zi(e,t){return new Ti([new sn(e,t||e)],0)}function qi(e){return e.text?vt(e.from.line+e.text.length-1,ae(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function uo(e,t){if(Ft(e,t.from)<0)return e;if(Ft(e,t.to)<=0)return qi(t);var D=e.line+t.text.length-(t.to.line-t.from.line)-1,O=e.ch;return e.line==t.to.line&&(O+=qi(t).ch-t.to.ch),vt(D,O)}function Ha(e,t){for(var D=[],O=0;O1&&e.remove(fe.line+1,mt-1),e.insert(fe.line+1,kt)}sr(e,"change",e,t)}function Ca(e,t,D){function O(U,$,oe){if(U.linked)for(var fe=0;fe1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ae(e.done)}function xs(e,t,D,O){var U=e.history;U.undone.length=0;var $=+new Date,oe,fe;if((U.lastOp==O||U.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&U.lastModTime>$-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(oe=ml(U,U.lastOp==O)))fe=ae(oe.changes),Ft(t.from,t.to)==0&&Ft(t.from,fe.to)==0?fe.to=qi(t):oe.changes.push(rs(e,t));else{var pe=ae(U.done);for((!pe||!pe.ranges)&&Io(e.sel,U.done),oe={changes:[rs(e,t)],generation:U.generation},U.done.push(oe);U.done.length>U.undoDepth;)U.done.shift(),U.done[0].ranges||U.done.shift()}U.done.push(D),U.generation=++U.maxGeneration,U.lastModTime=U.lastSelTime=$,U.lastOp=U.lastSelOp=O,U.lastOrigin=U.lastSelOrigin=t.origin,fe||$e(e,"historyAdded")}function gl(e,t,D,O){var U=t.charAt(0);return U=="*"||U=="+"&&D.ranges.length==O.ranges.length&&D.somethingSelected()==O.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,t,D,O){var U=e.history,$=O&&O.origin;D==U.lastSelOp||$&&U.lastSelOrigin==$&&(U.lastModTime==U.lastSelTime&&U.lastOrigin==$||gl(e,$,ae(U.done),t))?U.done[U.done.length-1]=t:Io(t,U.done),U.lastSelTime=+new Date,U.lastSelOrigin=$,U.lastSelOp=D,O&&O.clearRedo!==!1&&bs(U.undone)}function Io(e,t){var D=ae(t);D&&D.ranges&&D.equals(e)||t.push(e)}function Es(e,t,D,O){var U=t["spans_"+e.id],$=0;e.iter(Math.max(e.first,D),Math.min(e.first+e.size,O),function(oe){oe.markedSpans&&((U||(U=t["spans_"+e.id]={}))[$]=oe.markedSpans),++$})}function yl(e){if(!e)return null;for(var t,D=0;D-1&&(ae(fe)[Ke]=Ee[Ke],delete Ee[Ke]))}}return O}function ns(e,t,D,O){if(O){var U=e.anchor;if(D){var $=Ft(t,U)<0;$!=Ft(D,U)<0?(U=t,t=D):$!=Ft(t,D)<0&&(t=D)}return new sn(U,t)}else return new sn(D||t,t)}function No(e,t,D,O,U){U==null&&(U=e.cm&&(e.cm.display.shift||e.extend)),yi(e,new Ti([ns(e.sel.primary(),t,D,U)],0),O)}function Cs(e,t,D){for(var O=[],U=e.cm&&(e.cm.display.shift||e.extend),$=0;$=t.ch:fe.to>t.ch))){if(U&&($e(pe,"beforeCursorEnter"),pe.explicitlyCleared))if($.markedSpans){--oe;continue}else break;if(!pe.atomic)continue;if(D){var Ke=pe.find(O<0?1:-1),ut=void 0;if((O<0?We:Ee)&&(Ke=Rs(e,Ke,-O,Ke&&Ke.line==t.line?$:null)),Ke&&Ke.line==t.line&&(ut=Ft(Ke,D))&&(O<0?ut<0:ut>0))return Ka(e,Ke,t,O,U)}var at=pe.find(O<0?-1:1);return(O<0?Ee:We)&&(at=Rs(e,at,O,at.line==t.line?$:null)),at?Ka(e,at,t,O,U):null}}return t}function Uo(e,t,D,O,U){var $=O||1,oe=Ka(e,t,D,$,U)||!U&&Ka(e,t,D,$,!0)||Ka(e,t,D,-$,U)||!U&&Ka(e,t,D,-$,!0);return oe||(e.cantEdit=!0,vt(e.first,0))}function Rs(e,t,D,O){return D<0&&t.ch==0?t.line>e.first?V(e,vt(t.line-1)):null:D>0&&t.ch==(O||Ct(e,t.line)).text.length?t.line=0;--U)Ls(e,{from:O[U].from,to:O[U].to,text:U?[""]:t.text,origin:t.origin});else Ls(e,t)}function Ls(e,t){if(t.text.length==1&&t.text[0]==""&&Ft(t.from,t.to)==0)return;var D=Ha(e,t);xs(e,t,D,e.cm?e.cm.curOp.id:NaN),ho(e,t,D,Fn(e,t));var O=[];Ca(e,function(U,$){!$&&re(O,U.history)==-1&&(Ns(U.history,t),O.push(U.history)),ho(U,t,null,Fn(U,t))})}function Fo(e,t,D){var O=e.cm&&e.cm.state.suppressEdits;if(O&&!D)return;for(var U=e.history,$,oe=e.sel,fe=t=="undo"?U.done:U.undone,pe=t=="undo"?U.undone:U.done,Ee=0;Ee=0;--at){var mt=ut(at);if(mt)return mt.v}}function Ms(e,t){if(t==0)return;if(e.first+=t,e.sel=new Ti(Se(e.sel.ranges,function(U){return new sn(vt(U.anchor.line+t,U.anchor.ch),vt(U.head.line+t,U.head.ch))}),e.sel.primIndex),e.cm){bn(e.cm,e.first,e.first-t,t);for(var D=e.cm.display,O=D.viewFrom;Oe.lastLine())return;if(t.from.line$&&(t={from:t.from,to:vt($,Ct(e,$).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Rr(e,t.from,t.to),D||(D=Ha(e,t)),e.cm?El(e.cm,t,O):ts(e,t,O),jo(e,D,xe),e.cantEdit&&Uo(e,vt(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,t,D){var O=e.doc,U=e.display,$=t.from,oe=t.to,fe=!1,pe=$.line;e.options.lineWrapping||(pe=jt(On(Ct(O,$.line))),O.iter(pe,oe.line+1,function(at){if(at==U.maxLine)return fe=!0,!0})),O.sel.contains(t.from,t.to)>-1&&Ue(e),ts(O,t,D,Fi(e)),e.options.lineWrapping||(O.iter(pe,$.line+t.text.length,function(at){var mt=fi(at);mt>U.maxLineLength&&(U.maxLine=at,U.maxLineLength=mt,U.maxLineChanged=!0,fe=!1)}),fe&&(e.curOp.updateMaxLine=!0)),Hr(O,$.line),Ra(e,400);var Ee=t.text.length-(oe.line-$.line)-1;t.full?bn(e):$.line==oe.line&&t.text.length==1&&!gs(e.doc,t)?Nn(e,$.line,"text"):bn(e,$.line,oe.line+1,Ee);var We=Me(e,"changes"),Ke=Me(e,"change");if(Ke||We){var ut={from:$,to:oe,text:t.text,removed:t.removed,origin:t.origin};Ke&&sr(e,"change",e,ut),We&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(ut)}e.display.selForContextMenu=null}function Va(e,t,D,O,U){var $;O||(O=D),Ft(O,D)<0&&($=[O,D],D=$[0],O=$[1]),typeof t=="string"&&(t=e.splitLines(t)),Ga(e,{from:D,to:O,text:t,origin:U})}function Ps(e,t,D,O){D1||!(this.children[0]instanceof po))){var fe=[];this.collapse(fe),this.children=[new po(fe)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var oe=U.lines.length%25+25,fe=oe;fe10);e.parent.maybeSpill()},iterN:function(e,t,D){for(var O=0;Oe.display.maxLineLength&&(e.display.maxLine=Ee,e.display.maxLineLength=We,e.display.maxLineChanged=!0)}O!=null&&e&&this.collapsed&&bn(e,O,U+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Os(e.doc)),e&&sr(e,"markerCleared",e,this,O,U),t&&ha(e),this.parent&&this.parent.clear()},Sa.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var D,O,U=0;U0||oe==0&&$.clearWhenEmpty!==!1)return $;if($.replacedWith&&($.collapsed=!0,$.widgetNode=N("span",[$.replacedWith],"CodeMirror-widget"),O.handleMouseEvents||$.widgetNode.setAttribute("cm-ignore-events","true"),O.insertLeft&&($.widgetNode.insertLeft=!0)),$.collapsed){if(gn(e,t.line,t,D,$)||t.line!=D.line&&gn(e,D.line,t,D,$))throw new Error("Inserting collapsed marker partially overlapping an existing one");vr()}$.addToHistory&&xs(e,{from:t,to:D,origin:"markText"},e.sel,NaN);var fe=t.line,pe=e.cm,Ee;if(e.iter(fe,D.line+1,function(Ke){pe&&$.collapsed&&!pe.options.lineWrapping&&On(Ke)==pe.display.maxLine&&(Ee=!0),$.collapsed&&fe!=t.line&&$t(Ke,0),li(Ke,new Xr($,fe==t.line?t.ch:null,fe==D.line?D.ch:null)),++fe}),$.collapsed&&e.iter(t.line,D.line+1,function(Ke){Yn(e,Ke)&&$t(Ke,0)}),$.clearOnEnter&&Re($,"beforeCursorEnter",function(){return $.clear()}),$.readOnly&&(tr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),$.collapsed&&($.id=++Us,$.atomic=!0),pe){if(Ee&&(pe.curOp.updateMaxLine=!0),$.collapsed)bn(pe,t.line,D.line+1);else if($.className||$.startStyle||$.endStyle||$.css||$.attributes||$.title)for(var We=t.line;We<=D.line;We++)Nn(pe,We,"text");$.atomic&&Os(pe.doc),sr(pe,"markerAdded",pe,$)}return $}var vo=function(e,t){this.markers=e,this.primary=t;for(var D=0;D=0;pe--)Ga(this,O[pe]);fe?Ts(this,fe):this.cm&&ya(this.cm)}),undo:Vn(function(){Fo(this,"undo")}),redo:Vn(function(){Fo(this,"redo")}),undoSelection:Vn(function(){Fo(this,"undo",!0)}),redoSelection:Vn(function(){Fo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,D=0,O=0;O=e.ch)&&t.push(U.marker.parent||U.marker)}return t},findMarks:function(e,t,D){e=V(this,e),t=V(this,t);var O=[],U=e.line;return this.iter(e.line,t.line+1,function($){var oe=$.markedSpans;if(oe)for(var fe=0;fe=pe.to||pe.from==null&&U!=e.line||pe.from!=null&&U==t.line&&pe.from>=t.ch)&&(!D||D(pe.marker))&&O.push(pe.marker.parent||pe.marker)}++U}),O},getAllMarks:function(){var e=[];return this.iter(function(t){var D=t.markedSpans;if(D)for(var O=0;Oe)return t=e,!0;e-=$,++D}),V(this,vt(D,t))},indexFromPos:function(e){e=V(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var We=e.dataTransfer.getData("Text");if(We){var Ke;if(t.state.draggingText&&!t.state.draggingText.copy&&(Ke=t.listSelections()),jo(t.doc,Zi(D,D)),Ke)for(var ut=0;ut=0;fe--)Va(e.doc,"",O[fe].from,O[fe].to,"+delete");ya(e)})}function as(e,t,D){var O=De(e.text,t+D,D);return O<0||O>e.text.length?null:O}function os(e,t,D){var O=as(e,t.ch,D);return O==null?null:new vt(t.line,O,D<0?"after":"before")}function ss(e,t,D,O,U){if(e){t.doc.direction=="rtl"&&(U=-U);var $=st(D,t.doc.direction);if($){var oe=U<0?ae($):$[0],fe=U<0==(oe.level==1),pe=fe?"after":"before",Ee;if(oe.level>0||t.doc.direction=="rtl"){var We=Ve(t,D);Ee=U<0?D.text.length-1:0;var Ke=it(t,We,Ee).top;Ee=Qe(function(ut){return it(t,We,ut).top==Ke},U<0==(oe.level==1)?oe.from:oe.to-1,Ee),pe=="before"&&(Ee=as(D,Ee,1))}else Ee=U<0?oe.to:oe.from;return new vt(O,Ee,pe)}}return new vt(O,U<0?D.text.length:0,U<0?"before":"after")}function Il(e,t,D,O){var U=st(t,e.doc.direction);if(!U)return os(t,D,O);D.ch>=t.text.length?(D.ch=t.text.length,D.sticky="before"):D.ch<=0&&(D.ch=0,D.sticky="after");var $=tt(U,D.ch,D.sticky),oe=U[$];if(e.doc.direction=="ltr"&&oe.level%2==0&&(O>0?oe.to>D.ch:oe.from=oe.from&&ut>=We.begin)){var at=Ke?"before":"after";return new vt(D.line,ut,at)}}var mt=function(kt,Ut,Lt){for(var Wt=function(Tn,di){return di?new vt(D.line,fe(Tn,1),"before"):new vt(D.line,Tn,"after")};kt>=0&&kt0==(lr.level!=1),kr=er?Lt.begin:fe(Lt.end,-1);if(lr.from<=kr&&kr0?We.end:fe(We.begin,-1);return _t!=null&&!(O>0&&_t==t.text.length)&&(yt=mt(O>0?0:U.length-1,O,Ee(_t)),yt)?yt:null}var xo={selectAll:Ds,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),xe)},killLine:function(e){return $a(e,function(t){if(t.empty()){var D=Ct(e.doc,t.head.line).text.length;return t.head.ch==D&&t.head.line0)U=new vt(U.line,U.ch+1),e.replaceRange($.charAt(U.ch-1)+$.charAt(U.ch-2),vt(U.line,U.ch-2),U,"+transpose");else if(U.line>e.doc.first){var oe=Ct(e.doc,U.line-1).text;oe&&(U=new vt(U.line,1),e.replaceRange($.charAt(0)+e.doc.lineSeparator()+oe.charAt(oe.length-1),vt(U.line-1,oe.length-1),U,"+transpose"))}}D.push(new sn(U,U))}e.setSelections(D)})},newlineAndIndent:function(e){return Ci(e,function(){for(var t=e.listSelections(),D=t.length-1;D>=0;D--)e.replaceRange(e.doc.lineSeparator(),t[D].anchor,t[D].head,"+input");t=e.listSelections();for(var O=0;Oe&&Ft(t,this.pos)==0&&D==this.button};var wo,Co;function Hl(e,t){var D=+new Date;return Co&&Co.compare(D,e,t)?(wo=Co=null,"triple"):wo&&wo.compare(D,e,t)?(Co=new us(D,e,t),wo=null,"double"):(wo=new us(D,e,t),Co=null,"single")}function tl(e){var t=this,D=t.display;if(qe(t,e)||D.activeTouch&&D.input.supportsTouch())return;if(D.input.ensurePolled(),D.shift=e.shiftKey,$n(D,e)){a||(D.scroller.draggable=!1,setTimeout(function(){return D.scroller.draggable=!0},100));return}if(cs(t,e))return;var O=ri(t,e),U=rt(e),$=O?Hl(O,U):"single";if(window.focus(),U==1&&t.state.selectingText&&t.state.selectingText(e),O&&zl(t,U,O,$,e))return;U==1?O?Gl(t,O,$,e):Xe(e)==D.scroller&&ye(e):U==2?(O&&No(t.doc,O),setTimeout(function(){return D.input.focus()},20)):U==3&&(M?t.display.input.onContextMenu(e):eo(t))}function zl(e,t,D,O,U){var $="Click";return O=="double"?$="Double"+$:O=="triple"&&($="Triple"+$),$=(t==1?"Left":t==2?"Middle":"Right")+$,Eo(e,Gs($,U),U,function(oe){if(typeof oe=="string"&&(oe=xo[oe]),!oe)return!1;var fe=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),fe=oe(e,D)!=Ce}finally{e.state.suppressEdits=!1}return fe})}function Kl(e,t,D){var O=e.getOption("configureMouse"),U=O?O(e,t,D):{};if(U.unit==null){var $=g?D.shiftKey&&D.metaKey:D.altKey;U.unit=$?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(U.extend==null||e.doc.extend)&&(U.extend=e.doc.extend||D.shiftKey),U.addNew==null&&(U.addNew=d?D.metaKey:D.ctrlKey),U.moveOnDrag==null&&(U.moveOnDrag=!(d?D.altKey:D.ctrlKey)),U}function Gl(e,t,D,O){C?setTimeout(B(To,e),0):e.curOp.focus=z();var U=Kl(e,D,O),$=e.doc.sel,oe;e.options.dragDrop&&ft&&!e.isReadOnly()&&D=="single"&&(oe=$.contains(t))>-1&&(Ft((oe=$.ranges[oe]).from(),t)<0||t.xRel>0)&&(Ft(oe.to(),t)>0||t.xRel<0)?Vl(e,O,t,U):Xl(e,O,t,U)}function Vl(e,t,D,O){var U=e.display,$=!1,oe=Gn(e,function(Ee){a&&(U.scroller.draggable=!1),e.state.draggingText=!1,ct(U.wrapper.ownerDocument,"mouseup",oe),ct(U.wrapper.ownerDocument,"mousemove",fe),ct(U.scroller,"dragstart",pe),ct(U.scroller,"drop",oe),$||(ye(Ee),O.addNew||No(e.doc,D,null,null,O.extend),a&&!p||C&&c==9?setTimeout(function(){U.wrapper.ownerDocument.body.focus({preventScroll:!0}),U.input.focus()},20):U.input.focus())}),fe=function(Ee){$=$||Math.abs(t.clientX-Ee.clientX)+Math.abs(t.clientY-Ee.clientY)>=10},pe=function(){return $=!0};a&&(U.scroller.draggable=!0),e.state.draggingText=oe,oe.copy=!O.moveOnDrag,U.scroller.dragDrop&&U.scroller.dragDrop(),Re(U.wrapper.ownerDocument,"mouseup",oe),Re(U.wrapper.ownerDocument,"mousemove",fe),Re(U.scroller,"dragstart",pe),Re(U.scroller,"drop",oe),eo(e),setTimeout(function(){return U.input.focus()},20)}function rl(e,t,D){if(D=="char")return new sn(t,t);if(D=="word")return e.findWordAt(t);if(D=="line")return new sn(vt(t.line,0),V(e.doc,vt(t.line+1,0)));var O=D(e,t);return new sn(O.from,O.to)}function Xl(e,t,D,O){var U=e.display,$=e.doc;ye(t);var oe,fe,pe=$.sel,Ee=pe.ranges;if(O.addNew&&!O.extend?(fe=$.sel.contains(D),fe>-1?oe=Ee[fe]:oe=new sn(D,D)):(oe=$.sel.primary(),fe=$.sel.primIndex),O.unit=="rectangle")O.addNew||(oe=new sn(D,D)),D=ri(e,t,!0,!0),fe=-1;else{var We=rl(e,D,O.unit);O.extend?oe=ns(oe,We.anchor,We.head,O.extend):oe=We}O.addNew?fe==-1?(fe=Ee.length,yi($,zi(e,Ee.concat([oe]),fe),{scroll:!1,origin:"*mouse"})):Ee.length>1&&Ee[fe].empty()&&O.unit=="char"&&!O.extend?(yi($,zi(e,Ee.slice(0,fe).concat(Ee.slice(fe+1)),0),{scroll:!1,origin:"*mouse"}),pe=$.sel):is($,fe,oe,he):(fe=0,yi($,new Ti([oe],0),he),pe=$.sel);var Ke=D;function ut(Lt){if(Ft(Ke,Lt)==0)return;if(Ke=Lt,O.unit=="rectangle"){for(var Wt=[],lr=e.options.tabSize,er=K(Ct($,D.line).text,D.ch,lr),kr=K(Ct($,Lt.line).text,Lt.ch,lr),Tn=Math.min(er,kr),di=Math.max(er,kr),Un=Math.min(D.line,Lt.line),ji=Math.min(e.lastLine(),Math.max(D.line,Lt.line));Un<=ji;Un++){var Mi=Ct($,Un).text,Jn=_e(Mi,Tn,lr);Tn==di?Wt.push(new sn(vt(Un,Jn),vt(Un,Jn))):Mi.length>Jn&&Wt.push(new sn(vt(Un,Jn),vt(Un,_e(Mi,di,lr))))}Wt.length||Wt.push(new sn(D,D)),yi($,zi(e,pe.ranges.slice(0,fe).concat(Wt),fe),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Lt)}else{var Pi=oe,gi=rl(e,Lt,O.unit),oi=Pi.anchor,Qn;Ft(gi.anchor,oi)>0?(Qn=gi.head,oi=Rn(Pi.from(),gi.anchor)):(Qn=gi.anchor,oi=An(Pi.to(),gi.head));var Hn=pe.ranges.slice(0);Hn[fe]=Yl(e,new sn(V($,oi),Qn)),yi($,zi(e,Hn,fe),he)}}var at=U.wrapper.getBoundingClientRect(),mt=0;function yt(Lt){var Wt=++mt,lr=ri(e,Lt,!0,O.unit=="rectangle");if(!lr)return;if(Ft(lr,Ke)!=0){e.curOp.focus=z(),ut(lr);var er=Ia(U,$);(lr.line>=er.to||lr.lineat.bottom?20:0;kr&&setTimeout(Gn(e,function(){if(mt!=Wt)return;U.scroller.scrollTop+=kr,yt(Lt)}),50)}}function _t(Lt){e.state.selectingText=!1,mt=Infinity,Lt&&(ye(Lt),U.input.focus()),ct(U.wrapper.ownerDocument,"mousemove",kt),ct(U.wrapper.ownerDocument,"mouseup",Ut),$.history.lastSelOrigin=null}var kt=Gn(e,function(Lt){Lt.buttons===0||!rt(Lt)?_t(Lt):yt(Lt)}),Ut=Gn(e,_t);e.state.selectingText=Ut,Re(U.wrapper.ownerDocument,"mousemove",kt),Re(U.wrapper.ownerDocument,"mouseup",Ut)}function Yl(e,t){var D=t.anchor,O=t.head,U=Ct(e.doc,D.line);if(Ft(D,O)==0&&D.sticky==O.sticky)return t;var $=st(U);if(!$)return t;var oe=tt($,D.ch,D.sticky),fe=$[oe];if(fe.from!=D.ch&&fe.to!=D.ch)return t;var pe=oe+(fe.from==D.ch==(fe.level!=1)?0:1);if(pe==0||pe==$.length)return t;var Ee;if(O.line!=D.line)Ee=(O.line-D.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var We=tt($,O.ch,O.sticky),Ke=We-oe||(O.ch-D.ch)*(fe.level==1?-1:1);We==pe-1||We==pe?Ee=Ke<0:Ee=Ke>0}var ut=$[pe+(Ee?-1:0)],at=Ee==(ut.level==1),mt=at?ut.from:ut.to,yt=at?"after":"before";return D.ch==mt&&D.sticky==yt?t:new sn(new vt(D.line,mt,yt),O)}function nl(e,t,D,O){var U,$;if(t.touches)U=t.touches[0].clientX,$=t.touches[0].clientY;else try{U=t.clientX,$=t.clientY}catch(ut){return!1}if(U>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;O&&ye(t);var oe=e.display,fe=oe.lineDiv.getBoundingClientRect();if($>fe.bottom||!Me(e,D))return Ae(t);$-=fe.top-oe.viewOffset;for(var pe=0;pe=U){var We=Ur(e.doc,$),Ke=e.display.gutterSpecs[pe];return $e(e,D,e,We,Ke.className,t),Ae(t)}}}function cs(e,t){return nl(e,t,"gutterClick",!0)}function il(e,t){if($n(e.display,t)||$l(e,t))return;if(qe(e,t,"contextmenu"))return;M||e.display.input.onContextMenu(t)}function $l(e,t){return Me(e,"gutterContextMenu")?nl(e,t,"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-"),wr(e)}var Ja={toString:function(){return"CodeMirror.Init"}},ol={},zo={};function Jl(e){var t=e.optionHandlers;function D(O,U,$,oe){e.defaults[O]=U,$&&(t[O]=oe?function(fe,pe,Ee){Ee!=Ja&&$(fe,pe,Ee)}:$)}e.defineOption=D,e.Init=Ja,D("value","",function(O,U){return O.setValue(U)},!0),D("mode",null,function(O,U){O.doc.modeOption=U,pa(O)},!0),D("indentUnit",2,pa,!0),D("indentWithTabs",!1),D("smartIndent",!0),D("tabSize",4,function(O){co(O),wr(O),bn(O)},!0),D("lineSeparator",null,function(O,U){if(O.doc.lineSep=U,!U)return;var $=[],oe=O.doc.first;O.doc.iter(function(pe){for(var Ee=0;;){var We=pe.text.indexOf(U,Ee);if(We==-1)break;Ee=We+U.length,$.push(vt(oe,We))}oe++});for(var fe=$.length-1;fe>=0;fe--)Va(O.doc,U,$[fe],vt($[fe].line,$[fe].ch+U.length))}),D("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(O,U,$){O.state.specialChars=new RegExp(U.source+(U.test(" ")?"":"| "),"g"),$!=Ja&&O.refresh()}),D("specialCharPlaceholder",Bt,function(O){return O.refresh()},!0),D("electricChars",!0),D("inputStyle",n?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),D("spellcheck",!1,function(O,U){return O.getInputField().spellcheck=U},!0),D("autocorrect",!1,function(O,U){return O.getInputField().autocorrect=U},!0),D("autocapitalize",!1,function(O,U){return O.getInputField().autocapitalize=U},!0),D("rtlMoveVisually",!T),D("wholeLineUpdateBefore",!0),D("theme","default",function(O){al(O),Qi(O)},!0),D("keyMap","default",function(O,U,$){var oe=Wo(U),fe=$!=Ja&&Wo($);fe&&fe.detach&&fe.detach(O,oe),oe.attach&&oe.attach(O,fe||null)}),D("extraKeys",null),D("configureMouse",null),D("lineWrapping",!1,Zl,!0),D("gutters",[],function(O,U){O.display.gutterSpecs=Si(U,O.options.lineNumbers),Qi(O)},!0),D("fixedGutter",!0,function(O,U){O.display.gutters.style.left=U?vi(O.display)+"px":"0",O.refresh()},!0),D("coverGutterNextToScrollbar",!1,function(O){return da(O)},!0),D("scrollbarStyle","native",function(O){Ua(O),da(O),O.display.scrollbars.setScrollTop(O.doc.scrollTop),O.display.scrollbars.setScrollLeft(O.doc.scrollLeft)},!0),D("lineNumbers",!1,function(O,U){O.display.gutterSpecs=Si(O.options.gutters,U),Qi(O)},!0),D("firstLineNumber",1,Qi,!0),D("lineNumberFormatter",function(O){return O},Qi,!0),D("showCursorWhenSelecting",!1,pn,!0),D("resetSelectionOnContextMenu",!0),D("lineWiseCopyCut",!0),D("pasteLinesPerSelection",!0),D("selectionsMayTouch",!1),D("readOnly",!1,function(O,U){U=="nocursor"&&(va(O),O.display.input.blur()),O.display.input.readOnlyChanged(U)}),D("screenReaderLabel",null,function(O,U){U=U===""?null:U,O.display.input.screenReaderLabelChanged(U)}),D("disableInput",!1,function(O,U){U||O.display.input.reset()},!0),D("dragDrop",!0,Ql),D("allowDropFileTypes",null),D("cursorBlinkRate",530),D("cursorScrollMargin",0),D("cursorHeight",1,pn,!0),D("singleCursorHeightPerLine",!0,pn,!0),D("workTime",100),D("workDelay",100),D("flattenSpans",!0,co,!0),D("addModeClass",!1,co,!0),D("pollInterval",100),D("undoDepth",200,function(O,U){return O.doc.history.undoDepth=U}),D("historyEventDelay",1250),D("viewportMargin",10,function(O){return O.refresh()},!0),D("maxHighlightLength",1e4,co,!0),D("moveInputWithCursor",!0,function(O,U){U||O.display.input.resetPosition()}),D("tabindex",null,function(O,U){return O.display.input.getField().tabIndex=U||""}),D("autofocus",null),D("direction","ltr",function(O,U){return O.doc.setDirection(U)},!0),D("phrases",null)}function Ql(e,t,D){var O=D&&D!=Ja;if(!t!=!O){var U=e.display.dragFunctions,$=t?Re:ct;$(e.display.scroller,"dragstart",U.start),$(e.display.scroller,"dragenter",U.enter),$(e.display.scroller,"dragover",U.over),$(e.display.scroller,"dragleave",U.leave),$(e.display.scroller,"drop",U.drop)}}function Zl(e){e.options.lineWrapping?(H(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(x(e.display.wrapper,"CodeMirror-wrap"),pi(e)),wi(e),bn(e),wr(e),setTimeout(function(){return da(e)},100)}function jn(e,t){var D=this;if(!(this instanceof jn))return new jn(e,t);this.options=t=t?W(t):{},W(ol,t,!1);var O=t.value;typeof O=="string"?O=new Li(O,t.mode,null,t.lineSeparator,t.direction):t.mode&&(O.modeOption=t.mode),this.doc=O;var U=new jn.inputStyles[t.inputStyle](this),$=this.display=new ka(e,O,U,t);$.wrapper.CodeMirror=this,al(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ua(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 q,keySeq:null,specialChars:null},t.autofocus&&!n&&$.input.focus(),C&&c<11&&setTimeout(function(){return D.display.input.reset(!0)},20),ql(this),Dl(),sa(this),this.curOp.forceUpdate=!0,vs(this,O),t.autofocus&&!n||this.hasFocus()?setTimeout(function(){D.hasFocus()&&!D.state.focused&&aa(D)},20):va(this);for(var oe in zo)zo.hasOwnProperty(oe)&&zo[oe](this,t[oe],Ja);ii(this),t.finishInit&&t.finishInit(this);for(var fe=0;fe20*20}Re(t.scroller,"touchstart",function(pe){if(!qe(e,pe)&&!$(pe)&&!cs(e,pe)){t.input.ensurePolled(),clearTimeout(D);var Ee=+new Date;t.activeTouch={start:Ee,moved:!1,prev:Ee-O.end<=300?O:null},pe.touches.length==1&&(t.activeTouch.left=pe.touches[0].pageX,t.activeTouch.top=pe.touches[0].pageY)}}),Re(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Re(t.scroller,"touchend",function(pe){var Ee=t.activeTouch;if(Ee&&!$n(t,pe)&&Ee.left!=null&&!Ee.moved&&new Date-Ee.start<300){var We=e.coordsChar(t.activeTouch,"page"),Ke;!Ee.prev||oe(Ee,Ee.prev)?Ke=new sn(We,We):!Ee.prev.prev||oe(Ee,Ee.prev.prev)?Ke=e.findWordAt(We):Ke=new sn(vt(We.line,0),V(e.doc,vt(We.line+1,0))),e.setSelection(Ke.anchor,Ke.head),e.focus(),ye(pe)}U()}),Re(t.scroller,"touchcancel",U),Re(t.scroller,"scroll",function(){t.scroller.clientHeight&&(xa(e,t.scroller.scrollTop),Wi(e,t.scroller.scrollLeft,!0),$e(e,"scroll",e))}),Re(t.scroller,"mousewheel",function(pe){return lo(e,pe)}),Re(t.scroller,"DOMMouseScroll",function(pe){return lo(e,pe)}),Re(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(pe){qe(e,pe)||Pe(pe)},over:function(pe){qe(e,pe)||(Rl(e,pe),Pe(pe))},start:function(pe){return Al(e,pe)},drop:Gn(e,Ol),leave:function(pe){qe(e,pe)||Ws(e)}};var fe=t.input.getField();Re(fe,"keyup",function(pe){return Zs.call(e,pe)}),Re(fe,"keydown",Gn(e,Qs)),Re(fe,"keypress",Gn(e,el)),Re(fe,"focus",function(pe){return aa(e,pe)}),Re(fe,"blur",function(pe){return va(e,pe)})}var ds=[];jn.defineInitHook=function(e){return ds.push(e)};function So(e,t,D,O){var U=e.doc,$;D==null&&(D="add"),D=="smart"&&(U.mode.indent?$=ot(e,t).state:D="prev");var oe=e.options.tabSize,fe=Ct(U,t),pe=K(fe.text,null,oe);fe.stateAfter&&(fe.stateAfter=null);var Ee=fe.text.match(/^\s*/)[0],We;if(!O&&!/\S/.test(fe.text))We=0,D="not";else if(D=="smart"&&(We=U.mode.indent($,fe.text.slice(Ee.length),fe.text),We==Ce||We>150)){if(!O)return;D="prev"}D=="prev"?t>U.first?We=K(Ct(U,t-1).text,null,oe):We=0:D=="add"?We=pe+e.options.indentUnit:D=="subtract"?We=pe-e.options.indentUnit:typeof D=="number"&&(We=pe+D),We=Math.max(0,We);var Ke="",ut=0;if(e.options.indentWithTabs)for(var at=Math.floor(We/oe);at;--at)ut+=oe,Ke+=" ";if(utoe,pe=Ot(t),Ee=null;if(fe&&O.ranges.length>1)if(ea&&ea.text.join(` `)==t){if(O.ranges.length%ea.text.length==0){Ee=[];for(var We=0;We=0;ut--){var at=O.ranges[ut],mt=at.from(),yt=at.to();at.empty()&&(D&&D>0?mt=vt(mt.line,mt.ch-D):e.state.overwrite&&!fe?yt=vt(yt.line,Math.min(Ct($,yt.line).text.length,yt.ch+ae(pe).length)):fe&&ea&&ea.lineWise&&ea.text.join(` `)==pe.join(` `)&&(mt=yt=vt(mt.line,0)));var _t={from:mt,to:yt,text:Ee?Ee[ut%Ee.length]:pe,origin:U||(fe?"paste":e.state.cutIncoming>oe?"cut":"+input")};Ga(e.doc,_t),sr(e,"inputRead",e,_t)}t&&!fe&&ll(e,t),ya(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ke),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,t){var D=e.clipboardData&&e.clipboardData.getData("Text");if(D)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Ci(t,function(){return hs(t,D,0,null,"paste")}),!0}function ll(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var D=e.doc.sel,O=D.ranges.length-1;O>=0;O--){var U=D.ranges[O];if(U.head.ch>100||O&&D.ranges[O-1].head.line==U.head.line)continue;var $=e.getModeAt(U.head),oe=!1;if($.electricChars){for(var fe=0;fe<$.electricChars.length;fe++)if(t.indexOf($.electricChars.charAt(fe))>-1){oe=So(e,U.head.line,"smart");break}}else $.electricInput&&($.electricInput.test(Ct(e.doc,U.head.line).text.slice(0,U.head.ch))&&(oe=So(e,U.head.line,"smart")));oe&&sr(e,"electricInput",e,U.head.line)}}function ul(e){for(var t=[],D=[],O=0;O$&&(So(this,fe.head.line,O,!0),$=fe.head.line,oe==this.doc.sel.primIndex&&ya(this));else{var pe=fe.from(),Ee=fe.to(),We=Math.max($,pe.line);$=Math.min(this.lastLine(),Ee.line-(Ee.ch?0:1))+1;for(var Ke=We;Ke<$;++Ke)So(this,Ke,O);var ut=this.doc.sel.ranges;pe.ch==0&&U.length==ut.length&&ut[oe].from().ch>0&&is(this.doc,oe,new sn(pe,ut[oe].to()),xe)}}}),getTokenAt:function(O,U){return Sr(this,O,U)},getLineTokens:function(O,U){return Sr(this,vt(O),U,!0)},getTokenTypeAt:function(O){O=V(this.doc,O);var U=pt(this,Ct(this.doc,O.line)),$=0,oe=(U.length-1)/2,fe=O.ch,pe;if(fe==0)pe=U[2];else for(;;){var Ee=$+oe>>1;if((Ee?U[Ee*2-1]:0)>=fe)oe=Ee;else if(U[Ee*2+1]pe&&(O=pe,oe=!0),fe=Ct(this.doc,O)}else fe=O;return zr(this,fe,{top:0,left:0},U||"page",$||oe).top+(oe?this.doc.height-zn(fe):0)},defaultTextHeight:function(){return Wn(this.display)},defaultCharWidth:function(){return ti(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(O,U,$,oe,fe){var pe=this.display;O=Ir(this,V(this.doc,O));var Ee=O.bottom,We=O.left;if(U.style.position="absolute",U.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(U),pe.sizer.appendChild(U),oe=="over")Ee=O.top;else if(oe=="above"||oe=="near"){var Ke=Math.max(pe.wrapper.clientHeight,this.doc.height),ut=Math.max(pe.sizer.clientWidth,pe.lineSpace.clientWidth);(oe=="above"||O.bottom+U.offsetHeight>Ke)&&O.top>U.offsetHeight?Ee=O.top-U.offsetHeight:O.bottom+U.offsetHeight<=Ke&&(Ee=O.bottom),We+U.offsetWidth>ut&&(We=ut-U.offsetWidth)}U.style.top=Ee+"px",U.style.left=U.style.right="",fe=="right"?(We=pe.sizer.clientWidth-U.offsetWidth,U.style.right="0px"):(fe=="left"?We=0:fe=="middle"&&(We=(pe.sizer.clientWidth-U.offsetWidth)/2),U.style.left=We+"px"),$&&_o(this,{left:We,top:Ee,right:We+U.offsetWidth,bottom:Ee+U.offsetHeight})},triggerOnKeyDown:mi(Qs),triggerOnKeyPress:mi(el),triggerOnKeyUp:Zs,triggerOnMouseDown:mi(tl),execCommand:function(O){if(xo.hasOwnProperty(O))return xo[O].call(null,this)},triggerElectric:mi(function(O){ll(this,O)}),findPosH:function(O,U,$,oe){var fe=1;U<0&&(fe=-1,U=-U);for(var pe=V(this.doc,O),Ee=0;Ee0&&We($.charAt(oe-1));)--oe;for(;fe<$.length&&We($.charAt(fe));)++fe}return new sn(vt(O.line,oe),vt(O.line,fe))},toggleOverwrite:function(O){if(O!=null&&O==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?H(this.display.cursorDiv,"CodeMirror-overwrite"):x(this.display.cursorDiv,"CodeMirror-overwrite"),$e(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==z()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:mi(function(O,U){ba(this,O,U)}),getScrollInfo:function(){var O=this.display.scroller;return{left:O.scrollLeft,top:O.scrollTop,height:O.scrollHeight-Je(this)-this.display.barHeight,width:O.scrollWidth-Je(this)-this.display.barWidth,clientHeight:ve(this),clientWidth:Fe(this)}},scrollIntoView:mi(function(O,U){O==null?(O={from:this.doc.sel.primary().head,to:null},U==null&&(U=this.options.cursorScrollMargin)):typeof O=="number"?O={from:vt(O,0),to:null}:O.from==null&&(O={from:O,to:null}),O.to||(O.to=O.from),O.margin=U||0,O.from.line!=null?$o(this,O):Oa(this,O.from,O.to,O.margin)}),setSize:mi(function(O,U){var $=this,oe=function(pe){return typeof pe=="number"||/^\d+$/.test(String(pe))?pe+"px":pe};O!=null&&(this.display.wrapper.style.width=oe(O)),U!=null&&(this.display.wrapper.style.height=oe(U)),this.options.lineWrapping&&yr(this);var fe=this.display.viewFrom;this.doc.iter(fe,this.display.viewTo,function(pe){if(pe.widgets){for(var Ee=0;Ee.5||this.options.lineWrapping)&&wi(this),$e(this,"refresh",this)}),swapDoc:mi(function(O){var U=this.doc;return U.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,O),wr(this),this.display.input.reset(),ba(this,O.scrollLeft,O.scrollTop),this.curOp.forceScroll=!0,sr(this,"swapDoc",this,U),U}),phrase:function(O){var U=this.options.phrases;return U&&Object.prototype.hasOwnProperty.call(U,O)?U[O]:O},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ie(e),e.registerHelper=function(O,U,$){D.hasOwnProperty(O)||(D[O]=e[O]={_global:[]}),D[O][U]=$},e.registerGlobalHelper=function(O,U,$,oe){e.registerHelper(O,U,oe),D[O]._global.push({pred:$,val:oe})}}function fs(e,t,D,O,U){var $=t,oe=D,fe=Ct(e,t.line),pe=U&&e.direction=="rtl"?-D:D;function Ee(){var Ut=t.line+pe;return Ut=e.first+e.size?!1:(t=new vt(Ut,t.ch,t.sticky),fe=Ct(e,Ut))}function We(Ut){var Lt;if(O=="codepoint"){var Wt=fe.text.charCodeAt(t.ch+(O>0?0:-1));isNaN(Wt)?Lt=null:Lt=new vt(t.line,Math.max(0,Math.min(fe.text.length,t.ch+D*(Wt>=55296&&Wt<56320?2:1))),-D)}else U?Lt=Il(e.cm,fe,t,D):Lt=os(fe,t,D);if(Lt==null)if(!Ut&&Ee())t=ss(U,e.cm,fe,t.line,pe);else return!1;else t=Lt;return!0}if(O=="char"||O=="codepoint")We();else if(O=="column")We(!0);else if(O=="word"||O=="group")for(var Ke=null,ut=O=="group",at=e.cm&&e.cm.getHelper(t,"wordChars"),mt=!0;!(D<0&&!We(!mt));mt=!1){var yt=fe.text.charAt(t.ch)||` `,_t=Y(yt,at)?"w":ut&&yt==` `?"n":!ut||/\s/.test(yt)?null:"p";if(ut&&!mt&&!_t&&(_t="s"),Ke&&Ke!=_t){D<0&&(D=1,We(),t.sticky="after");break}if(_t&&(Ke=_t),D>0&&!We(!mt))break}var kt=Uo(e,t,$,oe,!0);return rn($,kt)&&(kt.hitSide=!0),kt}function hl(e,t,D,O){var U=e.doc,$=t.left,oe;if(O=="page"){var fe=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),pe=Math.max(fe-.5*Wn(e.display),3);oe=(D>0?t.bottom:t.top)+D*pe}else O=="line"&&(oe=D>0?t.bottom+3:t.top-3);for(var Ee;!(Ee=Nr(e,$,oe),!Ee.outside);){if(D<0?oe<=0:oe>=U.height){Ee.hitSide=!0;break}oe+=D*5}return Ee}var xn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new q,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};xn.prototype.init=function(e){var t=this,D=this,O=D.cm,U=D.div=e.lineDiv;cl(U,O.options.spellcheck,O.options.autocorrect,O.options.autocapitalize);function $(fe){for(var pe=fe.target;pe;pe=pe.parentNode){if(pe==U)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(pe.className))break}return!1}Re(U,"paste",function(fe){if(!$(fe)||qe(O,fe)||sl(fe,O))return;c<=11&&setTimeout(Gn(O,function(){return t.updateFromDOM()}),20)}),Re(U,"compositionstart",function(fe){t.composing={data:fe.data,done:!1}}),Re(U,"compositionupdate",function(fe){t.composing||(t.composing={data:fe.data,done:!1})}),Re(U,"compositionend",function(fe){t.composing&&(fe.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Re(U,"touchstart",function(){return D.forceCompositionEnd()}),Re(U,"input",function(){t.composing||t.readFromDOMSoon()});function oe(fe){if(!$(fe)||qe(O,fe))return;if(O.somethingSelected())Ko({lineWise:!1,text:O.getSelections()}),fe.type=="cut"&&O.replaceSelection("",null,"cut");else if(O.options.lineWiseCopyCut){var pe=ul(O);Ko({lineWise:!0,text:pe.text}),fe.type=="cut"&&O.operation(function(){O.setSelections(pe.ranges,0,xe),O.replaceSelection("",null,"cut")})}else return;if(fe.clipboardData){fe.clipboardData.clearData();var Ee=ea.text.join(` `);if(fe.clipboardData.setData("Text",Ee),fe.clipboardData.getData("Text")==Ee){fe.preventDefault();return}}var We=dl(),Ke=We.firstChild;O.display.lineSpace.insertBefore(We,O.display.lineSpace.firstChild),Ke.value=ea.text.join(` `);var ut=document.activeElement;G(Ke),setTimeout(function(){O.display.lineSpace.removeChild(We),ut.focus(),ut==U&&D.showPrimarySelection()},50)}Re(U,"copy",oe),Re(U,"cut",oe)},xn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},xn.prototype.prepareSelection=function(){var e=Yi(this.cm,!1);return e.focus=document.activeElement==this.div,e},xn.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},xn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},xn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,D=t.doc.sel.primary(),O=D.from(),U=D.to();if(t.display.viewTo==t.display.viewFrom||O.line>=t.display.viewTo||U.line=t.display.viewFrom&&fl(t,O)||{node:fe[0].measure.map[2],offset:0},Ee=U.linee.firstLine()&&(O=vt(O.line-1,Ct(e.doc,O.line-1).length)),U.ch==Ct(e.doc,U.line).text.length&&U.linet.viewTo-1)return!1;var $,oe,fe;O.line==t.viewFrom||($=Sn(e,O.line))==0?(oe=jt(t.view[0].line),fe=t.view[0].node):(oe=jt(t.view[$].line),fe=t.view[$-1].node.nextSibling);var pe=Sn(e,U.line),Ee,We;if(pe==t.view.length-1?(Ee=t.viewTo-1,We=t.lineDiv.lastChild):(Ee=jt(t.view[pe+1].line)-1,We=t.view[pe+1].node.previousSibling),!fe)return!1;for(var Ke=e.doc.splitLines(ru(e,fe,We,oe,Ee)),ut=Rr(e.doc,vt(oe,0),vt(Ee,Ct(e.doc,Ee).text.length));Ke.length>1&&ut.length>1;)if(ae(Ke)==ae(ut))Ke.pop(),ut.pop(),Ee--;else if(Ke[0]==ut[0])Ke.shift(),ut.shift(),oe++;else break;for(var at=0,mt=0,yt=Ke[0],_t=ut[0],kt=Math.min(yt.length,_t.length);atO.ch&&Ut.charCodeAt(Ut.length-mt-1)==Lt.charCodeAt(Lt.length-mt-1);)at--,mt++;Ke[Ke.length-1]=Ut.slice(0,Ut.length-mt).replace(/^\u200b+/,""),Ke[0]=Ke[0].slice(at).replace(/\u200b+$/,"");var lr=vt(oe,at),er=vt(Ee,ut.length?ae(ut).length-mt:0);if(Ke.length>1||Ke[0]||Ft(lr,er))return Va(e.doc,Ke,lr,er,"+input"),!0},xn.prototype.ensurePolled=function(){this.forceCompositionEnd()},xn.prototype.reset=function(){this.forceCompositionEnd()},xn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},xn.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)},xn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ci(this.cm,function(){return bn(e.cm)})},xn.prototype.setUneditable=function(e){e.contentEditable="false"},xn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Gn(this.cm,hs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},xn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},xn.prototype.onContextMenu=function(){},xn.prototype.resetPosition=function(){},xn.prototype.needsContentAttribute=!0;function fl(e,t){var D=Ye(e,t.line);if(!D||D.hidden)return null;var O=Ct(e.doc,t.line),U=we(D,O,t.line),$=st(O,e.doc.direction),oe="left";if($){var fe=tt($,t.ch);oe=fe%2?"right":"left"}var pe=Et(U.map,t.ch,oe);return pe.offset=pe.collapse=="right"?pe.end:pe.start,pe}function tu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Qa(e,t){return t&&(e.bad=!0),e}function ru(e,t,D,O,U){var $="",oe=!1,fe=e.doc.lineSeparator(),pe=!1;function Ee(at){return function(mt){return mt.id==at}}function We(){oe&&($+=fe,pe&&($+=fe),oe=pe=!1)}function Ke(at){at&&(We(),$+=at)}function ut(at){if(at.nodeType==1){var mt=at.getAttribute("cm-text");if(mt){Ke(mt);return}var yt=at.getAttribute("cm-marker"),_t;if(yt){var kt=e.findMarks(vt(O,0),vt(U+1,0),Ee(+yt));kt.length&&(_t=kt[0].find(0))&&Ke(Rr(e.doc,_t.from,_t.to).join(fe));return}if(at.getAttribute("contenteditable")=="false")return;var Ut=/^(pre|div|p|li|table|br)$/i.test(at.nodeName);if(!/^br$/i.test(at.nodeName)&&at.textContent.length==0)return;Ut&&We();for(var Lt=0;Lt=9&&t.hasSelection&&(t.hasSelection=null),D.poll()}),Re(U,"paste",function(oe){if(qe(O,oe)||sl(oe,O))return;O.state.pasteIncoming=+new Date,D.fastPoll()});function $(oe){if(qe(O,oe))return;if(O.somethingSelected())Ko({lineWise:!1,text:O.getSelections()});else if(O.options.lineWiseCopyCut){var fe=ul(O);Ko({lineWise:!0,text:fe.text}),oe.type=="cut"?O.setSelections(fe.ranges,null,xe):(D.prevInput="",U.value=fe.text.join(` `),G(U))}else return;oe.type=="cut"&&(O.state.cutIncoming=+new Date)}Re(U,"cut",$),Re(U,"copy",$),Re(e.scroller,"paste",function(oe){if($n(e,oe)||qe(O,oe))return;if(!U.dispatchEvent){O.state.pasteIncoming=+new Date,D.focus();return}var fe=new Event("paste");fe.clipboardData=oe.clipboardData,U.dispatchEvent(fe)}),Re(e.lineSpace,"selectstart",function(oe){$n(e,oe)||ye(oe)}),Re(U,"compositionstart",function(){var oe=O.getCursor("from");D.composing&&D.composing.range.clear(),D.composing={start:oe,range:O.markText(oe,O.getCursor("to"),{className:"CodeMirror-composing"})}}),Re(U,"compositionend",function(){D.composing&&(D.poll(),D.composing.range.clear(),D.composing=null)})},Xn.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},Xn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Xn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,D=e.doc,O=Yi(e);if(e.options.moveInputWithCursor){var U=Ir(e,D.sel.primary().head,"div"),$=t.wrapper.getBoundingClientRect(),oe=t.lineDiv.getBoundingClientRect();O.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,U.top+oe.top-$.top)),O.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,U.left+oe.left-$.left))}return O},Xn.prototype.showSelection=function(e){var t=this.cm,D=t.display;w(D.cursorDiv,e.cursors),w(D.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Xn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var D=t.getSelection();this.textarea.value=D,t.state.focused&&G(this.textarea),C&&c>=9&&(this.hasSelection=D)}else e||(this.prevInput=this.textarea.value="",C&&c>=9&&(this.hasSelection=null))},Xn.prototype.getField=function(){return this.textarea},Xn.prototype.supportsTouch=function(){return!1},Xn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||z()!=this.textarea))try{this.textarea.focus()}catch(e){}},Xn.prototype.blur=function(){this.textarea.blur()},Xn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Xn.prototype.receivedFocus=function(){this.slowPoll()},Xn.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()})},Xn.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function D(){var O=t.poll();!O&&!e?(e=!0,t.polling.set(60,D)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,D)},Xn.prototype.poll=function(){var e=this,t=this.cm,D=this.textarea,O=this.prevInput;if(this.contextMenuPending||!t.state.focused||bt(D)&&!O&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var U=D.value;if(U==O&&!t.somethingSelected())return!1;if(C&&c>=9&&this.hasSelection===U||d&&/[\uf700-\uf7ff]/.test(U))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var $=U.charCodeAt(0);if($==8203&&!O&&(O="\u200B"),$==8666)return this.reset(),this.cm.execCommand("undo")}for(var oe=0,fe=Math.min(O.length,U.length);oe1e3||U.indexOf(` `)>-1?D.value=e.prevInput="":e.prevInput=U,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Xn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Xn.prototype.onKeyPress=function(){C&&c>=9&&(this.hasSelection=null),this.fastPoll()},Xn.prototype.onContextMenu=function(e){var t=this,D=t.cm,O=D.display,U=t.textarea;t.contextMenuPending&&t.contextMenuPending();var $=ri(D,e),oe=O.scroller.scrollTop;if(!$||l)return;var fe=D.options.resetSelectionOnContextMenu;fe&&D.doc.sel.contains($)==-1&&Gn(D,yi)(D.doc,Zi($),xe);var pe=U.style.cssText,Ee=t.wrapper.style.cssText,We=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",U.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-We.top-5)+"px; left: "+(e.clientX-We.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 Ke;a&&(Ke=window.scrollY),O.input.focus(),a&&window.scrollTo(null,Ke),O.input.reset(),D.somethingSelected()||(U.value=t.prevInput=" "),t.contextMenuPending=at,O.selForContextMenu=D.doc.sel,clearTimeout(O.detectingSelectAll);function ut(){if(U.selectionStart!=null){var yt=D.somethingSelected(),_t="\u200B"+(yt?U.value:"");U.value="\u21DA",U.value=_t,t.prevInput=yt?"":"\u200B",U.selectionStart=1,U.selectionEnd=_t.length,O.selForContextMenu=D.doc.sel}}function at(){if(t.contextMenuPending!=at)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=Ee,U.style.cssText=pe,C&&c<9&&O.scrollbars.setScrollTop(O.scroller.scrollTop=oe),U.selectionStart!=null){(!C||C&&c<9)&&ut();var yt=0,_t=function(){O.selForContextMenu==D.doc.sel&&U.selectionStart==0&&U.selectionEnd>0&&t.prevInput=="\u200B"?Gn(D,Ds)(D):yt++<10?O.detectingSelectAll=setTimeout(_t,500):(O.selForContextMenu=null,O.input.reset())};O.detectingSelectAll=setTimeout(_t,200)}}if(C&&c>=9&&ut(),M){Pe(e);var mt=function(){ct(window,"mouseup",mt),setTimeout(at,20)};Re(window,"mouseup",mt)}else setTimeout(at,50)},Xn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Xn.prototype.setUneditable=function(){},Xn.prototype.needsContentAttribute=!1;function iu(e,t){if(t=t?W(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var D=z();t.autofocus=D==e||e.getAttribute("autofocus")!=null&&D==document.body}function O(){e.value=fe.getValue()}var U;if(e.form&&(Re(e.form,"submit",O),!t.leaveSubmitMethodAlone)){var $=e.form;U=$.submit;try{var oe=$.submit=function(){O(),$.submit=U,$.submit(),$.submit=oe}}catch(pe){}}t.finishInit=function(pe){pe.save=O,pe.getTextArea=function(){return e},pe.toTextArea=function(){pe.toTextArea=isNaN,O(),e.parentNode.removeChild(pe.getWrapperElement()),e.style.display="",e.form&&(ct(e.form,"submit",O),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=U))}},e.style.display="none";var fe=jn(function(pe){return e.parentNode.insertBefore(pe,e.nextSibling)},t);return fe}function au(e){e.off=ct,e.on=Re,e.wheelEventPixels=so,e.Doc=Li,e.splitLines=Ot,e.countColumn=K,e.findColumn=_e,e.isWordChar=Q,e.Pass=Ce,e.signal=$e,e.Line=ei,e.changeEnd=qi,e.scrollbarModel=io,e.Pos=vt,e.cmpPos=Ft,e.modes=dr,e.mimeModes=Nt,e.resolveMode=wt,e.getMode=hr,e.modeExtensions=Qr,e.extendMode=Gr,e.copyState=Lr,e.startState=Tt,e.innerMode=si,e.commands=xo,e.keyMap=ma,e.keyName=Vs,e.isModifierKey=Ks,e.lookupKey=Ya,e.normalizeKeyMap=Pl,e.StringStream=Dt,e.SharedTextMarker=vo,e.TextMarker=Sa,e.LineWidget=go,e.e_preventDefault=ye,e.e_stopPropagation=Te,e.e_stop=Pe,e.addClass=H,e.contains=k,e.rmClass=x,e.keyNames=Ta}Jl(jn),eu(jn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Vo in Li.prototype)Li.prototype.hasOwnProperty(Vo)&&re(ou,Vo)<0&&(jn.prototype[Vo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Li.prototype[Vo]));return Ie(Li),jn.inputStyles={textarea:Xn,contenteditable:xn},jn.defineMode=function(e){!jn.defaults.mode&&e!="null"&&(jn.defaults.mode=e),br.apply(this,arguments)},jn.defineMIME=ur,jn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),jn.defineMIME("text/plain","null"),jn.defineExtension=function(e,t){jn.prototype[e]=t},jn.defineDocExtension=function(e,t){Li.prototype[e]=t},jn.fromTextArea=iu,au(jn),jn.version="5.58.2",jn})},WYAk:function(I,J,P){(function(L,u){I.exports=J=u(P("Ib8C"))})(this,function(L){(function(){var u=L,S=u.lib,R=S.Base,h=u.enc,o=h.Utf8,C=u.algo,c=C.HMAC=R.extend({init:function(a,i){a=this._hasher=new a.init,typeof i=="string"&&(i=o.parse(i));var r=a.blockSize,l=r*4;i.sigBytes>l&&(i=a.finalize(i)),i.clamp();for(var p=this._oKey=i.clone(),f=this._iKey=i.clone(),b=p.words,v=f.words,m=0;m1&&arguments[1]!==void 0?arguments[1]:!1,ke=xe.getAttribute("id")||xe.getAttribute("data-reactid")||xe.getAttribute("name");if(he&&z[ke])return z[ke];var _e=window.getComputedStyle(xe),de=_e.getPropertyValue("box-sizing")||_e.getPropertyValue("-moz-box-sizing")||_e.getPropertyValue("-webkit-box-sizing"),ce=parseFloat(_e.getPropertyValue("padding-bottom"))+parseFloat(_e.getPropertyValue("padding-top")),ae=parseFloat(_e.getPropertyValue("border-bottom-width"))+parseFloat(_e.getPropertyValue("border-top-width")),Se=k.map(function(ue){return"".concat(ue,":").concat(_e.getPropertyValue(ue))}).join(";"),te={sizingStyle:Se,paddingSize:ce,borderSize:ae,boxSizing:de};return he&&ke&&(z[ke]=te),te}function G(xe){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,_e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;H||(H=document.createElement("textarea"),H.setAttribute("tab-index","-1"),H.setAttribute("aria-hidden","true"),document.body.appendChild(H)),xe.getAttribute("wrap")?H.setAttribute("wrap",xe.getAttribute("wrap")):H.removeAttribute("wrap");var de=F(xe,he),ce=de.paddingSize,ae=de.borderSize,Se=de.boxSizing,te=de.sizingStyle;H.setAttribute("style","".concat(te,";").concat(j)),H.value=xe.value||xe.placeholder||"";var ue=Number.MIN_SAFE_INTEGER,Oe=Number.MAX_SAFE_INTEGER,le=H.scrollHeight,Q;if(Se==="border-box"?le+=ae:Se==="content-box"&&(le-=ce),ke!==null||_e!==null){H.value=" ";var Y=H.scrollHeight-ce;ke!==null&&(ue=Y*ke,Se==="border-box"&&(ue=ue+ce+ae),le=Math.max(ue,le)),_e!==null&&(Oe=Y*_e,Se==="border-box"&&(Oe=Oe+ce+ae),Q=le>Oe?"":"hidden",le=Math.min(Oe,le))}return{height:le,minHeight:ue,maxHeight:Oe,overflowY:Q,resize:"none"}}var B=P("Gytx"),W=P.n(B),K;(function(xe){xe[xe.NONE=0]="NONE",xe[xe.RESIZING=1]="RESIZING",xe[xe.RESIZED=2]="RESIZED"})(K||(K={}));var q=function(xe){Object(R.a)(ke,xe);var he=Object(h.a)(ke);function ke(_e){var de;return Object(u.a)(this,ke),de=he.call(this,_e),de.nextFrameActionId=void 0,de.resizeFrameId=void 0,de.textArea=void 0,de.saveTextArea=function(ce){de.textArea=ce},de.handleResize=function(ce){var ae=de.state.resizeStatus,Se=de.props,te=Se.autoSize,ue=Se.onResize;if(ae!==K.NONE)return;typeof ue=="function"&&ue(ce),te&&de.resizeOnNextFrame()},de.resizeOnNextFrame=function(){cancelAnimationFrame(de.nextFrameActionId),de.nextFrameActionId=requestAnimationFrame(de.resizeTextarea)},de.resizeTextarea=function(){var ce=de.props.autoSize;if(!ce||!de.textArea)return;var ae=ce.minRows,Se=ce.maxRows,te=G(de.textArea,!1,ae,Se);de.setState({textareaStyles:te,resizeStatus:K.RESIZING},function(){cancelAnimationFrame(de.resizeFrameId),de.resizeFrameId=requestAnimationFrame(function(){de.setState({resizeStatus:K.RESIZED},function(){de.resizeFrameId=requestAnimationFrame(function(){de.setState({resizeStatus:K.NONE}),de.fixFirefoxAutoScroll()})})})})},de.renderTextArea=function(){var ce=de.props,ae=ce.prefixCls,Se=ae===void 0?"rc-textarea":ae,te=ce.autoSize,ue=ce.onResize,Oe=ce.className,le=ce.disabled,Q=de.state,Y=Q.textareaStyles,Z=Q.resizeStatus,be=Object(w.a)(de.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ge=N()(Se,Oe,Object(c.a)({},"".concat(Se,"-disabled"),le));"value"in be&&(be.value=be.value||"");var De=Object(C.a)(Object(C.a)(Object(C.a)({},de.props.style),Y),Z===K.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return o.createElement(E,{onResize:de.handleResize,disabled:!(te||ue)},o.createElement("textarea",Object(L.a)({},be,{className:ge,style:De,ref:de.saveTextArea})))},de.state={textareaStyles:{},resizeStatus:K.NONE},de}return Object(S.a)(ke,[{key:"componentDidUpdate",value:function(de){(de.value!==this.props.value||!W()(de.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 de=this.textArea.selectionStart,ce=this.textArea.selectionEnd;this.textArea.setSelectionRange(de,ce)}}catch(ae){}}},{key:"render",value:function(){return this.renderTextArea()}}]),ke}(o.Component),re=q,ee=function(xe){Object(R.a)(ke,xe);var he=Object(h.a)(ke);function ke(_e){var de;Object(u.a)(this,ke),de=he.call(this,_e),de.resizableTextArea=void 0,de.focus=function(){de.resizableTextArea.textArea.focus()},de.saveTextArea=function(ae){de.resizableTextArea=ae},de.handleChange=function(ae){var Se=de.props.onChange;de.setValue(ae.target.value,function(){de.resizableTextArea.resizeTextarea()}),Se&&Se(ae)},de.handleKeyDown=function(ae){var Se=de.props,te=Se.onPressEnter,ue=Se.onKeyDown;ae.keyCode===13&&te&&te(ae),ue&&ue(ae)};var ce=typeof _e.value=="undefined"||_e.value===null?_e.defaultValue:_e.value;return de.state={value:ce},de}return Object(S.a)(ke,[{key:"setValue",value:function(de,ce){"value"in this.props||this.setState({value:de},ce)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return o.createElement(re,Object(L.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(de){return"value"in de?{value:de.value}:null}}]),ke}(o.Component),Ce=J.default=ee},ZD9Y:function(I,J,P){"use strict";var L=P("BoS7"),u=P("Sdc0"),S=P("OaEy"),R=P("2fM7"),h=P("q1tI"),o=P.n(h),C=P("lOMy"),c=P.n(C),a=R.a.Option;J.a=function(i){var r=i.onFontSizeChange,l=i.cmFontSize,p=i.cmCodeMode,f=i.onCodeModeChange,b=i.onTabToSpace,v=i.className,m=v===void 0?"":v,n=i.tabToSpace,d=i.children;return o.a.createElement("div",{className:"tpi-code-setting ".concat(m)},o.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),o.a.createElement("section",null,o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),o.a.createElement(R.a,{bordered:!1,size:"small",value:p,onChange:f},o.a.createElement(a,{value:"vs"},"\u767D\u8272\u80CC\u666F"),o.a.createElement(a,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),o.a.createElement(R.a,{bordered:!1,size:"small",value:l,onChange:r},o.a.createElement(a,{value:12},"12px"),o.a.createElement(a,{value:14},"14px"),o.a.createElement(a,{value:16},"16px"),o.a.createElement(a,{value:18},"18px"),o.a.createElement(a,{value:20},"20px"),o.a.createElement(a,{value:22},"22px"))),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"Tab\u8F6C\u6362"),o.a.createElement(u.a,{checked:n,onChange:b}))),o.a.createElement("h3",null,"\u5FEB\u6377\u952E"),o.a.createElement("section",null,o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),o.a.createElement("span",null,"Ctrl + S")),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),o.a.createElement("span",null,"F1 / Alt + F1")),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),o.a.createElement("span",null,"Ctrl + ]/[")),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),o.a.createElement("span",null,"Ctrl + Shift + \\")),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),o.a.createElement("span",null,"Home")),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),o.a.createElement("span",null,"End"))),d)}},ZW9T:function(I,J,P){"use strict";P.d(J,"a",function(){return T});var L=P("k1fw"),u=P("miYZ"),S=P("tsqr"),R=P("rAM+"),h=P("tJVT"),o=P("PpiC"),C=P("q1tI"),c=P.n(C),a=P("bdgK");function i(y,s,M,A,x){var E=s.getWordUntilPosition(M),w={startLineNumber:M.lineNumber,endLineNumber:M.lineNumber,startColumn:E.startColumn,endColumn:E.endColumn},_=A.map(function(N){return{label:N,kind:y.languages.CompletionItemKind.Keyword,insertText:N,insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:w}});return x.map(function(N){_.push(Object(L.a)(Object(L.a)({},N),{},{range:w}))}),_}var r=function(y){var s={label:"ifelse",kind:y.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet},M=["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"];y.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(w,_){var N=i(y,w,_,M,[s]);return{suggestions:N}}});var A=["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"];y.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(w,_){var N=[{label:"print",kind:y.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(` `),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet}],j=i(y,w,_,A,N);return{suggestions:j}}});var x=["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"];y.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(w,_){var N=[s,{label:"main",kind:y.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(` `),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:y.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(` `),insertTextRules:y.languages.CompletionItemInsertTextRule.InsertAsSnippet}],j=i(y,w,_,x,N);return{suggestions:j}}})},l="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",p=P("LvDl");function f(y){return/^\d+$/.test(y)?"".concat(y,"px"):y}function b(){}var v=!1,m={"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 n(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=y;if(Array.isArray(y)){for(var M=0;M0||ft.target.offsetWidth>0)&&Oe.current.instance.layout()}}catch(St){Xe.e(St)}finally{Xe.f()}}),Ae.observe(ue.current)),Ae}function Ze(){S.b.warn(decodeURIComponent(l))}var nt=function(){var Pe=Oe.current.instance;if(E!=null&&Pe&&ge){var Xe=Pe.getModel();Xe&&E!==Xe.getValue()&&(v=!0,Xe.setValue(E),Pe.layout(),v=!1)}};Object(C.useEffect)(function(){le.current&&clearTimeout(le.current),le.current=setTimeout(function(){nt()},500)},[E,ge,Oe.current]);function tt(){var Ae=Oe.current.instance;if(Ae){var Pe=Ae.getSelection(),Xe=Oe.current.pastePos||{},rt=new d.Range(Xe.startLineNumber||Pe.endLineNumber,Xe.startColumn||Pe.endColumn,Xe.endLineNumber||Pe.endLineNumber,Xe.endColumn||Pe.endColumn);setTimeout(function(){Ae.executeEdits("",[{range:rt,text:""}])},300)}}function lt(Ae){(window.navigator.platform.match("Mac")?Ae.metaKey:Ae.ctrlKey)&&Ae.keyCode==83&&(Ae.preventDefault(),K())}var st=function(){if(re&&Oe.current.instance){var Pe=Oe.current.instance.getContentHeight();ye(Pe0||ke.target.offsetWidth>0)&&re.layout()}}catch(_e){xe.e(_e)}finally{xe.f()}}),ee.observe(k.current)),ee}Object(C.useEffect)(function(){k.current&&P.e(27).then(P.t.bind(null,"M/lh",7)).then(function(re){d=re;var ee=d.editor.createDiffEditor(k.current,Object(L.a)(Object(L.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},j),{},{wordWrap:!0}));G(ee);var Ce=B(ee);return function(){ee.dispose();var xe=ee.getModel();xe&&xe.dispose(),Ce.unobserve(k.current)}})},[]),Object(C.useEffect)(function(){F&&F.setModel({original:d.editor.createModel(E,_),modified:d.editor.createModel(w,_)})},[E,w,_,F]);var W=f(M),K=f(x),q={width:W,height:K};return c.a.createElement("div",{className:"my-diff-editor",ref:k,style:q})}},ZpRC:function(I,J,P){"use strict";function L(r){return typeof r=="object"&&r!=null&&r.nodeType===1}function u(r,l){return(!l||r!=="hidden")&&r!=="visible"&&r!=="clip"}function S(r,l){if(r.clientHeightl||v>r&&m=l&&n>=p?v-r-f:m>l&&np?m-l+b:0}var h=function(r,l){var p=window,f=l.scrollMode,b=l.block,v=l.inline,m=l.boundary,n=l.skipOverflowHiddenElements,d=typeof m=="function"?m:function(Y){return Y!==m};if(!L(r))throw new TypeError("Invalid target");for(var g=document.scrollingElement||document.documentElement,T=[],y=r;L(y)&&d(y);){if((y=y.parentElement)===g){T.push(y);break}y!=null&&y===document.body&&S(y)&&!S(document.documentElement)||y!=null&&S(y,n)&&T.push(y)}for(var s=p.visualViewport?p.visualViewport.width:innerWidth,M=p.visualViewport?p.visualViewport.height:innerHeight,A=window.scrollX||pageXOffset,x=window.scrollY||pageYOffset,E=r.getBoundingClientRect(),w=E.height,_=E.width,N=E.top,j=E.right,k=E.bottom,z=E.left,H=b==="start"||b==="nearest"?N:b==="end"?k:N+w/2,F=v==="center"?z+_/2:v==="end"?j:z,G=[],B=0;B=0&&z>=0&&k<=M&&j<=s&&N>=ee&&k<=xe&&z>=he&&j<=Ce)return G;var ke=getComputedStyle(W),_e=parseInt(ke.borderLeftWidth,10),de=parseInt(ke.borderTopWidth,10),ce=parseInt(ke.borderRightWidth,10),ae=parseInt(ke.borderBottomWidth,10),Se=0,te=0,ue="offsetWidth"in W?W.offsetWidth-W.clientWidth-_e-ce:0,Oe="offsetHeight"in W?W.offsetHeight-W.clientHeight-de-ae:0;if(g===W)Se=b==="start"?H:b==="end"?H-M:b==="nearest"?R(x,x+M,M,de,ae,x+H,x+H+w,w):H-M/2,te=v==="start"?F:v==="center"?F-s/2:v==="end"?F-s:R(A,A+s,s,_e,ce,A+F,A+F+_,_),Se=Math.max(0,Se+x),te=Math.max(0,te+A);else{Se=b==="start"?H-ee-de:b==="end"?H-xe+ae+Oe:b==="nearest"?R(ee,xe,q,de,ae+Oe,H,H+w,w):H-(ee+q/2)+Oe/2,te=v==="start"?F-he-_e:v==="center"?F-(he+re/2)+ue/2:v==="end"?F-Ce+ce+ue:R(he,Ce,re,_e,ce+ue,F,F+_,_);var le=W.scrollLeft,Q=W.scrollTop;H+=Q-(Se=Math.max(0,Math.min(Q+Se,W.scrollHeight-q+Oe))),F+=le-(te=Math.max(0,Math.min(le+te,W.scrollWidth-re+ue)))}G.push({el:W,top:Se,left:te})}return G};function o(r){return r===Object(r)&&Object.keys(r).length!==0}function C(r,l){l===void 0&&(l="auto");var p="scrollBehavior"in document.body.style;r.forEach(function(f){var b=f.el,v=f.top,m=f.left;b.scroll&&p?b.scroll({top:v,left:m,behavior:l}):(b.scrollTop=v,b.scrollLeft=m)})}function c(r){return r===!1?{block:"end",inline:"nearest"}:o(r)?r:{block:"start",inline:"nearest"}}function a(r,l){var p=!r.ownerDocument.documentElement.contains(r);if(o(l)&&typeof l.behavior=="function")return l.behavior(p?[]:h(r,l));if(p)return;var f=c(l);return C(h(r,f),f.behavior)}var i=J.a=a},Zss7:function(I,J,P){var L;(function(u){var S=/^\s+/,R=/\s+$/,h=0,o=u.round,C=u.min,c=u.max,a=u.random;function i(ae,Se){if(ae=ae||"",Se=Se||{},ae instanceof i)return ae;if(!(this instanceof i))return new i(ae,Se);var te=r(ae);this._originalInput=ae,this._r=te.r,this._g=te.g,this._b=te.b,this._a=te.a,this._roundA=o(100*this._a)/100,this._format=Se.format||te.format,this._gradientType=Se.gradientType,this._r<1&&(this._r=o(this._r)),this._g<1&&(this._g=o(this._g)),this._b<1&&(this._b=o(this._b)),this._ok=te.ok,this._tc_id=h++}i.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 ae=this.toRgb();return(ae.r*299+ae.g*587+ae.b*114)/1e3},getLuminance:function(){var ae=this.toRgb(),Se,te,ue,Oe,le,Q;return Se=ae.r/255,te=ae.g/255,ue=ae.b/255,Se<=.03928?Oe=Se/12.92:Oe=u.pow((Se+.055)/1.055,2.4),te<=.03928?le=te/12.92:le=u.pow((te+.055)/1.055,2.4),ue<=.03928?Q=ue/12.92:Q=u.pow((ue+.055)/1.055,2.4),.2126*Oe+.7152*le+.0722*Q},setAlpha:function(ae){return this._a=G(ae),this._roundA=o(100*this._a)/100,this},toHsv:function(){var ae=b(this._r,this._g,this._b);return{h:ae.h*360,s:ae.s,v:ae.v,a:this._a}},toHsvString:function(){var ae=b(this._r,this._g,this._b),Se=o(ae.h*360),te=o(ae.s*100),ue=o(ae.v*100);return this._a==1?"hsv("+Se+", "+te+"%, "+ue+"%)":"hsva("+Se+", "+te+"%, "+ue+"%, "+this._roundA+")"},toHsl:function(){var ae=p(this._r,this._g,this._b);return{h:ae.h*360,s:ae.s,l:ae.l,a:this._a}},toHslString:function(){var ae=p(this._r,this._g,this._b),Se=o(ae.h*360),te=o(ae.s*100),ue=o(ae.l*100);return this._a==1?"hsl("+Se+", "+te+"%, "+ue+"%)":"hsla("+Se+", "+te+"%, "+ue+"%, "+this._roundA+")"},toHex:function(ae){return m(this._r,this._g,this._b,ae)},toHexString:function(ae){return"#"+this.toHex(ae)},toHex8:function(ae){return n(this._r,this._g,this._b,this._a,ae)},toHex8String:function(ae){return"#"+this.toHex8(ae)},toRgb:function(){return{r:o(this._r),g:o(this._g),b:o(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+o(this._r)+", "+o(this._g)+", "+o(this._b)+")":"rgba("+o(this._r)+", "+o(this._g)+", "+o(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:o(B(this._r,255)*100)+"%",g:o(B(this._g,255)*100)+"%",b:o(B(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+o(B(this._r,255)*100)+"%, "+o(B(this._g,255)*100)+"%, "+o(B(this._b,255)*100)+"%)":"rgba("+o(B(this._r,255)*100)+"%, "+o(B(this._g,255)*100)+"%, "+o(B(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:H[m(this._r,this._g,this._b,!0)]||!1},toFilter:function(ae){var Se="#"+d(this._r,this._g,this._b,this._a),te=Se,ue=this._gradientType?"GradientType = 1, ":"";if(ae){var Oe=i(ae);te="#"+d(Oe._r,Oe._g,Oe._b,Oe._a)}return"progid:DXImageTransform.Microsoft.gradient("+ue+"startColorstr="+Se+",endColorstr="+te+")"},toString:function(ae){var Se=!!ae;ae=ae||this._format;var te=!1,ue=this._a<1&&this._a>=0,Oe=!Se&&ue&&(ae==="hex"||ae==="hex6"||ae==="hex3"||ae==="hex4"||ae==="hex8"||ae==="name");return Oe?ae==="name"&&this._a===0?this.toName():this.toRgbString():(ae==="rgb"&&(te=this.toRgbString()),ae==="prgb"&&(te=this.toPercentageRgbString()),(ae==="hex"||ae==="hex6")&&(te=this.toHexString()),ae==="hex3"&&(te=this.toHexString(!0)),ae==="hex4"&&(te=this.toHex8String(!0)),ae==="hex8"&&(te=this.toHex8String()),ae==="name"&&(te=this.toName()),ae==="hsl"&&(te=this.toHslString()),ae==="hsv"&&(te=this.toHsvString()),te||this.toHexString())},clone:function(){return i(this.toString())},_applyModification:function(ae,Se){var te=ae.apply(null,[this].concat([].slice.call(Se)));return this._r=te._r,this._g=te._g,this._b=te._b,this.setAlpha(te._a),this},lighten:function(){return this._applyModification(s,arguments)},brighten:function(){return this._applyModification(M,arguments)},darken:function(){return this._applyModification(A,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(T,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(x,arguments)},_applyCombination:function(ae,Se){return ae.apply(null,[this].concat([].slice.call(Se)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(k,arguments)},splitcomplement:function(){return this._applyCombination(N,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(_,arguments)}},i.fromRatio=function(ae,Se){if(typeof ae=="object"){var te={};for(var ue in ae)ae.hasOwnProperty(ue)&&(ue==="a"?te[ue]=ae[ue]:te[ue]=Ce(ae[ue]));ae=te}return i(ae,Se)};function r(ae){var Se={r:0,g:0,b:0},te=1,ue=null,Oe=null,le=null,Q=!1,Y=!1;return typeof ae=="string"&&(ae=de(ae)),typeof ae=="object"&&(_e(ae.r)&&_e(ae.g)&&_e(ae.b)?(Se=l(ae.r,ae.g,ae.b),Q=!0,Y=String(ae.r).substr(-1)==="%"?"prgb":"rgb"):_e(ae.h)&&_e(ae.s)&&_e(ae.v)?(ue=Ce(ae.s),Oe=Ce(ae.v),Se=v(ae.h,ue,Oe),Q=!0,Y="hsv"):_e(ae.h)&&_e(ae.s)&&_e(ae.l)&&(ue=Ce(ae.s),le=Ce(ae.l),Se=f(ae.h,ue,le),Q=!0,Y="hsl"),ae.hasOwnProperty("a")&&(te=ae.a)),te=G(te),{ok:Q,format:ae.format||Y,r:C(255,c(Se.r,0)),g:C(255,c(Se.g,0)),b:C(255,c(Se.b,0)),a:te}}function l(ae,Se,te){return{r:B(ae,255)*255,g:B(Se,255)*255,b:B(te,255)*255}}function p(ae,Se,te){ae=B(ae,255),Se=B(Se,255),te=B(te,255);var ue=c(ae,Se,te),Oe=C(ae,Se,te),le,Q,Y=(ue+Oe)/2;if(ue==Oe)le=Q=0;else{var Z=ue-Oe;Q=Y>.5?Z/(2-ue-Oe):Z/(ue+Oe);switch(ue){case ae:le=(Se-te)/Z+(Se1&&(De-=1),De<1/6?be+(ge-be)*6*De:De<1/2?ge:De<2/3?be+(ge-be)*(2/3-De)*6:be}if(Se===0)ue=Oe=le=te;else{var Y=te<.5?te*(1+Se):te+Se-te*Se,Z=2*te-Y;ue=Q(Z,Y,ae+1/3),Oe=Q(Z,Y,ae),le=Q(Z,Y,ae-1/3)}return{r:ue*255,g:Oe*255,b:le*255}}function b(ae,Se,te){ae=B(ae,255),Se=B(Se,255),te=B(te,255);var ue=c(ae,Se,te),Oe=C(ae,Se,te),le,Q,Y=ue,Z=ue-Oe;if(Q=ue===0?0:Z/ue,ue==Oe)le=0;else{switch(ue){case ae:le=(Se-te)/Z+(Se>1)+720)%360;--Se;)ue.h=(ue.h+Oe)%360,le.push(i(ue));return le}function k(ae,Se){Se=Se||6;for(var te=i(ae).toHsv(),ue=te.h,Oe=te.s,le=te.v,Q=[],Y=1/Se;Se--;)Q.push(i({h:ue,s:Oe,v:le})),le=(le+Y)%1;return Q}i.mix=function(ae,Se,te){te=te===0?0:te||50;var ue=i(ae).toRgb(),Oe=i(Se).toRgb(),le=te/100,Q={r:(Oe.r-ue.r)*le+ue.r,g:(Oe.g-ue.g)*le+ue.g,b:(Oe.b-ue.b)*le+ue.b,a:(Oe.a-ue.a)*le+ue.a};return i(Q)},i.readability=function(ae,Se){var te=i(ae),ue=i(Se);return(u.max(te.getLuminance(),ue.getLuminance())+.05)/(u.min(te.getLuminance(),ue.getLuminance())+.05)},i.isReadable=function(ae,Se,te){var ue=i.readability(ae,Se),Oe,le;le=!1,Oe=ce(te);switch(Oe.level+Oe.size){case"AAsmall":case"AAAlarge":le=ue>=4.5;break;case"AAlarge":le=ue>=3;break;case"AAAsmall":le=ue>=7;break}return le},i.mostReadable=function(ae,Se,te){var ue=null,Oe=0,le,Q,Y,Z;te=te||{},Q=te.includeFallbackColors,Y=te.level,Z=te.size;for(var be=0;beOe&&(Oe=le,ue=i(Se[be]));return i.isReadable(ae,ue,{level:Y,size:Z})||!Q?ue:(te.includeFallbackColors=!1,i.mostReadable(ae,["#fff","#000"],te))};var z=i.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"},H=i.hexNames=F(z);function F(ae){var Se={};for(var te in ae)ae.hasOwnProperty(te)&&(Se[ae[te]]=te);return Se}function G(ae){return ae=parseFloat(ae),(isNaN(ae)||ae<0||ae>1)&&(ae=1),ae}function B(ae,Se){q(ae)&&(ae="100%");var te=re(ae);return ae=C(Se,c(0,parseFloat(ae))),te&&(ae=parseInt(ae*Se,10)/100),u.abs(ae-Se)<1e-6?1:ae%Se/parseFloat(Se)}function W(ae){return C(1,c(0,ae))}function K(ae){return parseInt(ae,16)}function q(ae){return typeof ae=="string"&&ae.indexOf(".")!=-1&&parseFloat(ae)===1}function re(ae){return typeof ae=="string"&&ae.indexOf("%")!=-1}function ee(ae){return ae.length==1?"0"+ae:""+ae}function Ce(ae){return ae<=1&&(ae=ae*100+"%"),ae}function xe(ae){return u.round(parseFloat(ae)*255).toString(16)}function he(ae){return K(ae)/255}var ke=function(){var ae="[-\\+]?\\d+%?",Se="[-\\+]?\\d*\\.\\d+%?",te="(?:"+Se+")|(?:"+ae+")",ue="[\\s|\\(]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")\\s*\\)?",Oe="[\\s|\\(]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")[,|\\s]+("+te+")\\s*\\)?";return{CSS_UNIT:new RegExp(te),rgb:new RegExp("rgb"+ue),rgba:new RegExp("rgba"+Oe),hsl:new RegExp("hsl"+ue),hsla:new RegExp("hsla"+Oe),hsv:new RegExp("hsv"+ue),hsva:new RegExp("hsva"+Oe),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 _e(ae){return!!ke.CSS_UNIT.exec(ae)}function de(ae){ae=ae.replace(S,"").replace(R,"").toLowerCase();var Se=!1;if(z[ae])ae=z[ae],Se=!0;else if(ae=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var te;return(te=ke.rgb.exec(ae))?{r:te[1],g:te[2],b:te[3]}:(te=ke.rgba.exec(ae))?{r:te[1],g:te[2],b:te[3],a:te[4]}:(te=ke.hsl.exec(ae))?{h:te[1],s:te[2],l:te[3]}:(te=ke.hsla.exec(ae))?{h:te[1],s:te[2],l:te[3],a:te[4]}:(te=ke.hsv.exec(ae))?{h:te[1],s:te[2],v:te[3]}:(te=ke.hsva.exec(ae))?{h:te[1],s:te[2],v:te[3],a:te[4]}:(te=ke.hex8.exec(ae))?{r:K(te[1]),g:K(te[2]),b:K(te[3]),a:he(te[4]),format:Se?"name":"hex8"}:(te=ke.hex6.exec(ae))?{r:K(te[1]),g:K(te[2]),b:K(te[3]),format:Se?"name":"hex"}:(te=ke.hex4.exec(ae))?{r:K(te[1]+""+te[1]),g:K(te[2]+""+te[2]),b:K(te[3]+""+te[3]),a:he(te[4]+""+te[4]),format:Se?"name":"hex8"}:(te=ke.hex3.exec(ae))?{r:K(te[1]+""+te[1]),g:K(te[2]+""+te[2]),b:K(te[3]+""+te[3]),format:Se?"name":"hex"}:!1}function ce(ae){var Se,te;return ae=ae||{level:"AA",size:"small"},Se=(ae.level||"AA").toUpperCase(),te=(ae.size||"small").toLowerCase(),Se!=="AA"&&Se!=="AAA"&&(Se="AA"),te!=="small"&&te!=="large"&&(te="small"),{level:Se,size:te}}I.exports?I.exports=i:!(L=function(){return i}.call(J,P,J,I),L!==void 0&&(I.exports=L))})(Math)},aRTE:function(I,J){I.exports={L:1,M:0,Q:3,H:2}},bCnd:function(I,J,P){"use strict";P.d(J,"b",function(){return R}),P.d(J,"a",function(){return h});var L=P("je13"),u=P.n(L),S=!1;function R(o,C){var c=u.a.get("__ec");c||(c={}),c[o]=C,u.a.set("__ec",c)}function h(o,C){var c=u.a.get("__ec");return c?c[o]===void 0?C:c[o]:C}},bQjk:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("OLod"))})(this,function(L){return function(u){var S=L,R=S.lib,h=R.CipherParams,o=S.enc,C=o.Hex,c=S.format,a=c.Hex={stringify:function(i){return i.ciphertext.toString(C)},parse:function(i){var r=C.parse(i);return h.create({ciphertext:r})}}}(),L.format.Hex})},bT9E:function(I,J,P){"use strict";P.d(J,"a",function(){return u});var L=P("VTBJ");function u(S,R){var h=Object(L.a)({},S);return Array.isArray(R)&&R.forEach(function(o){delete h[o]}),h}},biw7:function(I,J,P){"use strict";var L=P("q1tI"),u=P.n(L),S=L.createContext(null);J.a=S},c5Ni:function(I,J,P){},cDPC:function(I,J,P){"use strict";var L=P("tJVT"),u=P("q1tI"),S=P.n(u),R=P("i3hx"),h=P.n(R);J.a=function(o){var C=o.defaultX,c=C===void 0?"40%":C,a=o.leftChild,i=o.rightChild,r=o.className,l=o.hideResize,p=l===void 0?!1:l,f=Object(u.useState)(c),b=Object(L.a)(f,2),v=b[0],m=b[1],n=Object(u.useRef)();function d(){n.current=!0}Object(u.useEffect)(function(){function y(M){n.current&&m(M.pageX)}function s(){n.current=!1}return window.addEventListener("mousemove",y),window.addEventListener("mouseup",s),function(){window.removeEventListener("mousemove",y),window.removeEventListener("mouseup",s)}},[]);var g=typeof v=="number"&&v!==.01?"".concat(v,"px"):c,T="calc(100% - ".concat(p?"0px":"4px"," - ").concat(g,")");return S.a.createElement("div",{className:"split-panel-container ".concat(r)},S.a.createElement("section",{style:{width:g,display:v===.01?"none":""}},a),S.a.createElement("section",{className:"resize-x-bar",onMouseDown:d},S.a.createElement("a",{className:"btn-resize"},S.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},S.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),S.a.createElement("section",{style:{width:T}},i))}},cv67:function(I,J,P){(function(L,u){I.exports=J=u(P("Ib8C"))})(this,function(L){return function(u){var S=L,R=S.lib,h=R.WordArray,o=R.Hasher,C=S.algo,c=[];(function(){for(var f=0;f<64;f++)c[f]=u.abs(u.sin(f+1))*4294967296|0})();var a=C.MD5=o.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(f,b){for(var v=0;v<16;v++){var m=b+v,n=f[m];f[m]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360}var d=this._hash.words,g=f[b+0],T=f[b+1],y=f[b+2],s=f[b+3],M=f[b+4],A=f[b+5],x=f[b+6],E=f[b+7],w=f[b+8],_=f[b+9],N=f[b+10],j=f[b+11],k=f[b+12],z=f[b+13],H=f[b+14],F=f[b+15],G=d[0],B=d[1],W=d[2],K=d[3];G=i(G,B,W,K,g,7,c[0]),K=i(K,G,B,W,T,12,c[1]),W=i(W,K,G,B,y,17,c[2]),B=i(B,W,K,G,s,22,c[3]),G=i(G,B,W,K,M,7,c[4]),K=i(K,G,B,W,A,12,c[5]),W=i(W,K,G,B,x,17,c[6]),B=i(B,W,K,G,E,22,c[7]),G=i(G,B,W,K,w,7,c[8]),K=i(K,G,B,W,_,12,c[9]),W=i(W,K,G,B,N,17,c[10]),B=i(B,W,K,G,j,22,c[11]),G=i(G,B,W,K,k,7,c[12]),K=i(K,G,B,W,z,12,c[13]),W=i(W,K,G,B,H,17,c[14]),B=i(B,W,K,G,F,22,c[15]),G=r(G,B,W,K,T,5,c[16]),K=r(K,G,B,W,x,9,c[17]),W=r(W,K,G,B,j,14,c[18]),B=r(B,W,K,G,g,20,c[19]),G=r(G,B,W,K,A,5,c[20]),K=r(K,G,B,W,N,9,c[21]),W=r(W,K,G,B,F,14,c[22]),B=r(B,W,K,G,M,20,c[23]),G=r(G,B,W,K,_,5,c[24]),K=r(K,G,B,W,H,9,c[25]),W=r(W,K,G,B,s,14,c[26]),B=r(B,W,K,G,w,20,c[27]),G=r(G,B,W,K,z,5,c[28]),K=r(K,G,B,W,y,9,c[29]),W=r(W,K,G,B,E,14,c[30]),B=r(B,W,K,G,k,20,c[31]),G=l(G,B,W,K,A,4,c[32]),K=l(K,G,B,W,w,11,c[33]),W=l(W,K,G,B,j,16,c[34]),B=l(B,W,K,G,H,23,c[35]),G=l(G,B,W,K,T,4,c[36]),K=l(K,G,B,W,M,11,c[37]),W=l(W,K,G,B,E,16,c[38]),B=l(B,W,K,G,N,23,c[39]),G=l(G,B,W,K,z,4,c[40]),K=l(K,G,B,W,g,11,c[41]),W=l(W,K,G,B,s,16,c[42]),B=l(B,W,K,G,x,23,c[43]),G=l(G,B,W,K,_,4,c[44]),K=l(K,G,B,W,k,11,c[45]),W=l(W,K,G,B,F,16,c[46]),B=l(B,W,K,G,y,23,c[47]),G=p(G,B,W,K,g,6,c[48]),K=p(K,G,B,W,E,10,c[49]),W=p(W,K,G,B,H,15,c[50]),B=p(B,W,K,G,A,21,c[51]),G=p(G,B,W,K,k,6,c[52]),K=p(K,G,B,W,s,10,c[53]),W=p(W,K,G,B,N,15,c[54]),B=p(B,W,K,G,T,21,c[55]),G=p(G,B,W,K,w,6,c[56]),K=p(K,G,B,W,F,10,c[57]),W=p(W,K,G,B,x,15,c[58]),B=p(B,W,K,G,z,21,c[59]),G=p(G,B,W,K,M,6,c[60]),K=p(K,G,B,W,j,10,c[61]),W=p(W,K,G,B,y,15,c[62]),B=p(B,W,K,G,_,21,c[63]),d[0]=d[0]+G|0,d[1]=d[1]+B|0,d[2]=d[2]+W|0,d[3]=d[3]+K|0},_doFinalize:function(){var f=this._data,b=f.words,v=this._nDataBytes*8,m=f.sigBytes*8;b[m>>>5]|=128<<24-m%32;var n=u.floor(v/4294967296),d=v;b[(m+64>>>9<<4)+15]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,b[(m+64>>>9<<4)+14]=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,f.sigBytes=(b.length+1)*4,this._process();for(var g=this._hash,T=g.words,y=0;y<4;y++){var s=T[y];T[y]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360}return g},clone:function(){var f=o.clone.call(this);return f._hash=this._hash.clone(),f}});function i(f,b,v,m,n,d,g){var T=f+(b&v|~b&m)+n+g;return(T<>>32-d)+b}function r(f,b,v,m,n,d,g){var T=f+(b&m|v&~m)+n+g;return(T<>>32-d)+b}function l(f,b,v,m,n,d,g){var T=f+(b^v^m)+n+g;return(T<>>32-d)+b}function p(f,b,v,m,n,d,g){var T=f+(v^(b|~m))+n+g;return(T<>>32-d)+b}S.MD5=o._createHelper(a),S.HmacMD5=o._createHmacHelper(a)}(Math),L.MD5})},dQei:function(I,J){for(var P={glog:function(u){if(u<1)throw new Error("glog("+u+")");return P.LOG_TABLE[u]},gexp:function(u){for(;u<0;)u+=255;for(;u>=256;)u-=255;return P.EXP_TABLE[u]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},L=0;L<8;L++)P.EXP_TABLE[L]=1<1?re-1:0),Ce=1;Ce1?B-1:0),K=1;K=0)return parseInt(G.slice(G.indexOf("e-")+2),10);var B=0;return G.indexOf(".")>=0&&(B=G.length-G.indexOf(".")-1),B},k.getInputDisplayValue=function(F){var G=F||k.state,B=G.focused,W=G.inputValue,K=G.value,q;B?q=W:q=k.toPrecisionAsStep(K),q==null&&(q="");var re=k.formatWrapper(q);return s(k.props.decimalSeparator)&&(re=re.toString().replace(".",k.props.decimalSeparator)),re},k.recordCursorPosition=function(){try{k.cursorStart=k.input.selectionStart,k.cursorEnd=k.input.selectionEnd,k.currentValue=k.input.value,k.cursorBefore=k.input.value.substring(0,k.cursorStart),k.cursorAfter=k.input.value.substring(k.cursorEnd)}catch(F){}},k.restoreByAfter=function(F){if(F===void 0)return!1;var G=k.input.value,B=G.lastIndexOf(F);if(B===-1)return!1;var W=k.cursorBefore.length;return k.lastKeyCode===l.a.DELETE&&k.cursorBefore.charAt(W-1)===F[0]?(k.fixCaret(W,W),!0):B+F.length===G.length?(k.fixCaret(B,B),!0):!1},k.partRestoreByAfter=function(F){return F===void 0?!1:Array.prototype.some.call(F,function(G,B){var W=F.substring(B);return k.restoreByAfter(W)})},k.isNotCompleteNumber=function(F){return isNaN(F)||F===""||F===null||F&&F.toString().indexOf(".")===F.toString().length-1},k.stop=function(){k.autoStepTimer&&clearTimeout(k.autoStepTimer)},k.down=function(F,G,B){k.pressingUpOrDown=!0,k.step("down",F,G,B)},k.up=function(F,G,B){k.pressingUpOrDown=!0,k.step("up",F,G,B)},k.saveInput=function(F){k.input=F};var z=j.value;z===void 0&&(z=j.defaultValue),k.state={focused:j.autoFocus};var H=k.getValidValue(k.toNumber(z));return k.state=f(f({},k.state),{},{inputValue:k.toPrecisionAsStep(H),value:H}),k}return Object(R.a)(N,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(k){var z=this.props,H=z.value,F=z.onChange,G=z.max,B=z.min,W=this.state.focused;if(k){if(!M(k.value,H)||!M(k.max,G)||!M(k.min,B)){var K=W?H:this.getValidValue(H),q;this.pressingUpOrDown?q=K:this.inputting?q=this.rawInput:q=this.toPrecisionAsStep(K),this.setState({value:K,inputValue:q})}var re="value"in this.props?H:this.state.value;"max"in this.props&&k.max!==G&&typeof re=="number"&&re>G&&F&&F(G),"min"in this.props&&k.min!==B&&typeof re=="number"&&re1&&arguments[1]!==void 0?arguments[1]:this.props.min,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,F=parseFloat(k);return isNaN(F)?k:(FH&&(F=H),F)}},{key:"setValue",value:function(k,z){var H=this.props.precision,F=this.isNotCompleteNumber(parseFloat(k))?null:parseFloat(k),G=this.state.value,B=G===void 0?null:G,W=this.state.inputValue,K=W===void 0?null:W,q=typeof F=="number"?F.toFixed(H):"".concat(F),re=F!==B||q!=="".concat(K);return"value"in this.props?(K=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:K},z)):this.setState({value:F,inputValue:this.toPrecisionAsStep(k)},z),re&&this.props.onChange(F),F}},{key:"getMaxPrecision",value:function(k){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,H=this.props,F=H.precision,G=H.step;if(s(F))return F;var B=this.getPrecision(z),W=this.getPrecision(G),K=this.getPrecision(k);return k?Math.max(K,B+W):B+W}},{key:"getPrecisionFactor",value:function(k){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,H=this.getMaxPrecision(k,z);return Math.pow(10,H)}},{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(k){return this.props.formatter?this.props.formatter(k):k}},{key:"toPrecisionAsStep",value:function(k){if(this.isNotCompleteNumber(k)||k==="")return k;var z=Math.abs(this.getMaxPrecision(k));return isNaN(z)?k.toString():Number(k).toFixed(z)}},{key:"toNumber",value:function(k){var z=this.props.precision,H=this.state.focused,F=k&&k.length>16&&H;return this.isNotCompleteNumber(k)||F?k:s(z)?Math.round(k*Math.pow(10,z))/Math.pow(10,z):Number(k)}},{key:"upStep",value:function(k,z){var H=this.props.step,F=this.getPrecisionFactor(k,z),G=Math.abs(this.getMaxPrecision(k,z)),B=((F*k+F*H*z)/F).toFixed(G);return this.toNumber(B)}},{key:"downStep",value:function(k,z){var H=this.props.step,F=this.getPrecisionFactor(k,z),G=Math.abs(this.getMaxPrecision(k,z)),B=((F*k-F*H*z)/F).toFixed(G);return this.toNumber(B)}},{key:"step",value:function(k,z){var H=this,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,G=arguments.length>3?arguments[3]:void 0;this.stop(),z&&(z.persist(),z.preventDefault());var B=this.props;if(B.disabled)return;var W=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(W))return;var K=this["".concat(k,"Step")](W,F),q=K>B.max||KB.max?K=B.max:K=ee),qe=(lt||lt===0)&&(isNaN(lt)||Number(lt)<=Ce),Ue=$e||F||G,Me=qe||F||G,Ie=r()("".concat(H,"-handler"),"".concat(H,"-handler-up"),Object(u.a)({},"".concat(H,"-handler-up-disabled"),Ue)),ye=r()("".concat(H,"-handler"),"".concat(H,"-handler-down"),Object(u.a)({},"".concat(H,"-handler-down-disabled"),Me)),Te=B?{onTouchStart:Ue?m:this.up,onTouchEnd:this.stop}:{onMouseDown:Ue?m:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ae=B?{onTouchStart:Me?m:this.down,onTouchEnd:this.stop}:{onMouseDown:Me?m:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return a.a.createElement("div",{className:je,style:xe,title:he,onMouseEnter:ke,onMouseLeave:_e,onMouseOver:de,onMouseOut:ce,onFocus:function(){return null},onBlur:function(){return null}},a.a.createElement("div",{className:"".concat(H,"-handler-wrap")},a.a.createElement("span",Object.assign({unselectable:"on"},Te,{role:"button","aria-label":"Increase Value","aria-disabled":Ue,className:Ie}),K||a.a.createElement("span",{unselectable:"on",className:"".concat(H,"-handler-up-inner"),onClick:n})),a.a.createElement("span",Object.assign({unselectable:"on"},Ae,{role:"button","aria-label":"Decrease Value","aria-disabled":Me,className:ye}),q||a.a.createElement("span",{unselectable:"on",className:"".concat(H,"-handler-down-inner"),onClick:n}))),a.a.createElement("div",{className:"".concat(H,"-input-wrap")},a.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ce,"aria-valuemax":ee,"aria-valuenow":lt,required:ae,type:ue,placeholder:Oe,onPaste:Qe,onClick:Se,onMouseUp:this.onMouseUp,className:"".concat(H,"-input"),tabIndex:te,autoComplete:W,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:et?this.onKeyDown:m,onKeyUp:et?this.onKeyUp:m,autoFocus:ge,maxLength:be,readOnly:G,disabled:F,max:ee,min:Ce,step:Z,name:De,title:he,id:le,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ct),pattern:Y,inputMode:Q,onInput:Ze},Re))))}}]),N}(a.a.Component);A.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:y,min:-y,step:1,style:{},onChange:m,onKeyDown:m,onPressEnter:m,onFocus:m,onBlur:m,parser:d,required:!1,autoComplete:"off"};var x=A,E=J.a=x},e7zE:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("3y9D"),P("WYAk"))})(this,function(L){return function(){var u=L,S=u.lib,R=S.Base,h=S.WordArray,o=u.algo,C=o.SHA1,c=o.HMAC,a=o.PBKDF2=R.extend({cfg:R.extend({keySize:128/32,hasher:C,iterations:1}),init:function(i){this.cfg=this.cfg.extend(i)},compute:function(i,r){for(var l=this.cfg,p=c.create(l.hasher,i),f=h.create(),b=h.create([1]),v=f.words,m=b.words,n=l.keySize,d=l.iterations;v.length=ee&&K<0||B.scrollTop<=0&&K>0))||re&&(!de||de&&(B.scrollLeft>=Ce&&W<0||B.scrollLeft<=0&&W>0))?F(G,B.parentNode,W,K):!1};function A(F){var G=x();return function(){var W=Object(o.a)(F),K;if(G){var q=Object(o.a)(this).constructor;K=Reflect.construct(W,arguments,q)}else K=W.apply(this,arguments);return Object(h.a)(this,K)}}function x(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(F){return!1}}var E={},w=function(F){Object(R.a)(B,F);var G=A(B);function B(W){var K;return Object(u.a)(this,B),K=G.call(this,W),K.domFocus=function(){K.dom&&K.dom.focus()},K.removeStartHandler=function(q){if(q.touches.length>1)return;K.startPos={x:q.touches[0].clientX,y:q.touches[0].clientY}},K.removeMoveHandler=function(q){if(q.changedTouches.length>1)return;var re=q.currentTarget,ee=q.changedTouches[0].clientX-K.startPos.x,Ce=q.changedTouches[0].clientY-K.startPos.y;(re===K.maskDom||re===K.handlerDom||re===K.contentDom&&M(re,q.target,ee,Ce))&&q.cancelable&&q.preventDefault()},K.transitionEnd=function(q){var re=q.target;g(re,n,K.transitionEnd),re.style.transition=""},K.onKeyDown=function(q){if(q.keyCode===f.a.ESC){var re=K.props.onClose;q.stopPropagation(),re&&re(q)}},K.onWrapperTransitionEnd=function(q){var re=K.props,ee=re.open,Ce=re.afterVisibleChange;q.target===K.contentWrapper&&q.propertyName.match(/transform$/)&&(K.dom.style.transition="",!ee&&K.getCurrentDrawerSome()&&(document.body.style.overflowX="",K.maskDom&&(K.maskDom.style.left="",K.maskDom.style.width="")),Ce&&Ce(!!ee))},K.openLevelTransition=function(){var q=K.props,re=q.open,ee=q.width,Ce=q.height,xe=K.getHorizontalBoolAndPlacementName(),he=xe.isHorizontal,ke=xe.placementName,_e=K.contentDom?K.contentDom.getBoundingClientRect()[he?"width":"height"]:0,de=(he?ee:Ce)||_e;K.setLevelAndScrolling(re,ke,de)},K.setLevelTransform=function(q,re,ee,Ce){var xe=K.props,he=xe.placement,ke=xe.levelMove,_e=xe.duration,de=xe.ease,ce=xe.showMask;K.levelDom.forEach(function(ae){ae.style.transition="transform ".concat(_e," ").concat(de),d(ae,n,K.transitionEnd);var Se=q?ee:0;if(ke){var te=T(ke,{target:ae,open:q});Se=q?te[0]:te[1]||0}var ue=typeof Se=="number"?"".concat(Se,"px"):Se,Oe=he==="left"||he==="top"?ue:"-".concat(ue);Oe=ce&&he==="right"&&Ce?"calc(".concat(Oe," + ").concat(Ce,"px)"):Oe,ae.style.transform=Se?"".concat(re,"(").concat(Oe,")"):""})},K.setLevelAndScrolling=function(q,re,ee){var Ce=K.props.onChange;if(!s){var xe=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(p.a)(!0):0;K.setLevelTransform(q,re,ee,xe),K.toggleScrollingToDrawerAndBody(xe)}Ce&&Ce(q)},K.toggleScrollingToDrawerAndBody=function(q){var re=K.props,ee=re.getOpenCount,Ce=re.getContainer,xe=re.showMask,he=re.open,ke=Ce&&Ce(),_e=ee&&ee();if(ke&&ke.parentNode===document.body&&xe){var de=["touchstart"],ce=[document.body,K.maskDom,K.handlerDom,K.contentDom];he&&document.body.style.overflow!=="hidden"?(q&&K.addScrollingEffect(q),_e===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",ce.forEach(function(ae,Se){if(!ae)return;d(ae,de[Se]||"touchmove",Se?K.removeMoveHandler:K.removeStartHandler,K.passive)})):K.getCurrentDrawerSome()&&(_e||(document.body.style.overflow=""),document.body.style.touchAction="",q&&K.remScrollingEffect(q),ce.forEach(function(ae,Se){if(!ae)return;g(ae,de[Se]||"touchmove",Se?K.removeMoveHandler:K.removeStartHandler,K.passive)}))}},K.addScrollingEffect=function(q){var re=K.props,ee=re.placement,Ce=re.duration,xe=re.ease,he=re.getOpenCount,ke=re.switchScrollingEffect,_e=he&&he();_e===1&&ke();var de="width ".concat(Ce," ").concat(xe),ce="transform ".concat(Ce," ").concat(xe);K.dom.style.transition="none";switch(ee){case"right":K.dom.style.transform="translateX(-".concat(q,"px)");break;case"top":case"bottom":K.dom.style.width="calc(100% - ".concat(q,"px)"),K.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(K.timeout),K.timeout=setTimeout(function(){K.dom&&(K.dom.style.transition="".concat(ce,",").concat(de),K.dom.style.width="",K.dom.style.transform="")})},K.remScrollingEffect=function(q){var re=K.props,ee=re.placement,Ce=re.duration,xe=re.ease,he=re.getOpenCount,ke=re.switchScrollingEffect,_e=he&&he();_e||ke(!0),m&&(document.body.style.overflowX="hidden"),K.dom.style.transition="none";var de,ce="width ".concat(Ce," ").concat(xe),ae="transform ".concat(Ce," ").concat(xe);switch(ee){case"left":{K.dom.style.width="100%",ce="width 0s ".concat(xe," ").concat(Ce);break}case"right":{K.dom.style.transform="translateX(".concat(q,"px)"),K.dom.style.width="100%",ce="width 0s ".concat(xe," ").concat(Ce),K.maskDom&&(K.maskDom.style.left="-".concat(q,"px"),K.maskDom.style.width="calc(100% + ".concat(q,"px)"));break}case"top":case"bottom":{K.dom.style.width="calc(100% + ".concat(q,"px)"),K.dom.style.height="100%",K.dom.style.transform="translateZ(0)",de="height 0s ".concat(xe," ").concat(Ce);break}default:break}clearTimeout(K.timeout),K.timeout=setTimeout(function(){K.dom&&(K.dom.style.transition="".concat(ae,",").concat(de?"".concat(de,","):"").concat(ce),K.dom.style.transform="",K.dom.style.width="",K.dom.style.height="")})},K.getCurrentDrawerSome=function(){return!Object.keys(E).some(function(q){return E[q]})},K.getLevelDom=function(q){var re=q.level,ee=q.getContainer;if(s)return;var Ce=ee&&ee(),xe=Ce?Ce.parentNode:null;if(K.levelDom=[],re==="all"){var he=xe?Array.prototype.slice.call(xe.children):[];he.forEach(function(ke){ke.nodeName!=="SCRIPT"&&ke.nodeName!=="STYLE"&&ke.nodeName!=="LINK"&&ke!==Ce&&K.levelDom.push(ke)})}else re&&b(re).forEach(function(ke){document.querySelectorAll(ke).forEach(function(_e){K.levelDom.push(_e)})})},K.getHorizontalBoolAndPlacementName=function(){var q=K.props.placement,re=q==="left"||q==="right",ee="translate".concat(re?"X":"Y");return{isHorizontal:re,placementName:ee}},K.state={_self:Object(i.a)(K)},K}return Object(S.a)(B,[{key:"componentDidMount",value:function(){var K=this;if(!s){var q=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return q=!0,null}}))}catch(he){}this.passive=q?{passive:!1}:!1}var re=this.props,ee=re.open,Ce=re.getContainer,xe=Ce&&Ce();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),ee&&(xe&&xe.parentNode===document.body&&(E[this.drawerId]=ee),this.openLevelTransition(),this.forceUpdate(function(){K.domFocus()}))}},{key:"componentDidUpdate",value:function(K){var q=this.props,re=q.open,ee=q.getContainer,Ce=ee&&ee();re!==K.open&&(re&&this.domFocus(),Ce&&Ce.parentNode===document.body&&(E[this.drawerId]=!!re),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var K=this.props,q=K.getOpenCount,re=K.open,ee=K.switchScrollingEffect,Ce=typeof q=="function"&&q();delete E[this.drawerId],re&&(this.setLevelTransform(!1),document.body.style.touchAction=""),Ce||(document.body.style.overflow="",ee(!0))}},{key:"render",value:function(){var K,q=this,re=this.props,ee=re.className,Ce=re.children,xe=re.style,he=re.width,ke=re.height,_e=re.defaultOpen,de=re.open,ce=re.prefixCls,ae=re.placement,Se=re.level,te=re.levelMove,ue=re.ease,Oe=re.duration,le=re.getContainer,Q=re.handler,Y=re.onChange,Z=re.afterVisibleChange,be=re.showMask,ge=re.maskClosable,De=re.maskStyle,Qe=re.onClose,Ze=re.onHandleClick,nt=re.keyboard,tt=re.getOpenCount,lt=re.switchScrollingEffect,st=Object(L.a)(re,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),je=this.dom?de:!1,Re=l()(ce,(K={},Object(a.a)(K,"".concat(ce,"-").concat(ae),!0),Object(a.a)(K,"".concat(ce,"-open"),je),Object(a.a)(K,ee||"",!!ee),Object(a.a)(K,"no-mask",!be),K)),et=this.getHorizontalBoolAndPlacementName(),ct=et.placementName,$e=ae==="left"||ae==="top"?"-100%":"100%",qe=je?"":"".concat(ct,"(").concat($e,")"),Ue=Q&&c.cloneElement(Q,{onClick:function(Ie){Q.props.onClick&&Q.props.onClick(),Ze&&Ze(Ie)},ref:function(Ie){q.handlerDom=Ie}});return c.createElement("div",Object.assign({},st,{tabIndex:-1,className:Re,style:xe,ref:function(Ie){q.dom=Ie},onKeyDown:je&&nt?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),be&&c.createElement("div",{className:"".concat(ce,"-mask"),onClick:ge?Qe:void 0,style:De,ref:function(Ie){q.maskDom=Ie}}),c.createElement("div",{className:"".concat(ce,"-content-wrapper"),style:{transform:qe,msTransform:qe,width:y(he)?"".concat(he,"px"):he,height:y(ke)?"".concat(ke,"px"):ke},ref:function(Ie){q.contentWrapper=Ie}},c.createElement("div",{className:"".concat(ce,"-content"),ref:function(Ie){q.contentDom=Ie},onTouchStart:je&&be?this.removeStartHandler:void 0,onTouchMove:je&&be?this.removeMoveHandler:void 0},Ce),Ue))}}],[{key:"getDerivedStateFromProps",value:function(K,q){var re=q.prevProps,ee=q._self,Ce={prevProps:K};if(re!==void 0){var xe=K.placement,he=K.level;xe!==re.placement&&(ee.contentDom=null),he!==re.level&&ee.getLevelDom(K)}return Ce}}]),B}(c.Component);w.defaultProps={switchScrollingEffect:function(){}};var _=w;function N(F){var G=j();return function(){var W=Object(o.a)(F),K;if(G){var q=Object(o.a)(this).constructor;K=Reflect.construct(W,arguments,q)}else K=W.apply(this,arguments);return Object(h.a)(this,K)}}function j(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(F){return!1}}var k=function(F){Object(R.a)(B,F);var G=N(B);function B(W){var K;Object(u.a)(this,B),K=G.call(this,W),K.onHandleClick=function(re){var ee=K.props,Ce=ee.onHandleClick,xe=ee.open;if(Ce&&Ce(re),typeof xe=="undefined"){var he=K.state.open;K.setState({open:!he})}},K.onClose=function(re){var ee=K.props,Ce=ee.onClose,xe=ee.open;Ce&&Ce(re),typeof xe=="undefined"&&K.setState({open:!1})};var q=typeof W.open!="undefined"?W.open:!!W.defaultOpen;return K.state={open:q},"onMaskClick"in W&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),K}return Object(S.a)(B,[{key:"render",value:function(){var K=this,q=this.props,re=q.defaultOpen,ee=q.getContainer,Ce=q.wrapperClassName,xe=q.forceRender,he=q.handler,ke=Object(L.a)(q,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),_e=this.state.open;if(!ee)return c.createElement("div",{className:Ce,ref:function(ae){K.dom=ae}},c.createElement(_,Object.assign({},ke,{open:_e,handler:he,getContainer:function(){return K.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var de=!!he||xe;return c.createElement(C.a,{visible:_e,forceRender:de,getContainer:ee,wrapperClassName:Ce},function(ce){var ae=ce.visible,Se=ce.afterClose,te=Object(L.a)(ce,["visible","afterClose"]);return c.createElement(_,Object.assign({},ke,te,{open:ae!==void 0?ae:_e,afterVisibleChange:Se!==void 0?Se:ke.afterVisibleChange,handler:he,onClose:K.onClose,onHandleClick:K.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(K,q){var re=q.prevProps,ee={prevProps:K};return typeof re!="undefined"&&K.open!==re.open&&(ee.open=K.open),ee}}]),B}(c.Component);k.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:c.createElement("div",{className:"drawer-handle"},c.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var z=k,H=J.a=z},fyJ8:function(I,J,P){"use strict";var L=P("rePB"),u=P("VTBJ"),S=P("Ff2n"),R=P("U8pU"),h=P("q1tI"),o=P.n(h),C=P("TSYQ"),c=P.n(C),a=P("c+Xe"),i=P("sR1s");function r(v){return v&&Object(R.a)(v)==="object"&&!Array.isArray(v)&&!h.isValidElement(v)}function l(v){return typeof v=="string"?!0:Object(a.c)(v)}function p(v,m){var n,d=v.prefixCls,g=v.className,T=v.record,y=v.index,s=v.dataIndex,M=v.render,A=v.children,x=v.component,E=x===void 0?"td":x,w=v.colSpan,_=v.rowSpan,N=v.fixLeft,j=v.fixRight,k=v.firstFixLeft,z=v.lastFixLeft,H=v.firstFixRight,F=v.lastFixRight,G=v.appendNode,B=v.additionalProps,W=B===void 0?{}:B,K=v.ellipsis,q=v.align,re=v.rowType,ee=v.isSticky,Ce="".concat(d,"-cell"),xe,he;if(A)he=A;else{var ke=Object(i.b)(T,s);if(he=ke,M){var _e=M(ke,T,y);r(_e)?(he=_e.children,xe=_e.props):he=_e}}Object(R.a)(he)==="object"&&!Array.isArray(he)&&!h.isValidElement(he)&&(he=null),K&&(z||H)&&(he=h.createElement("span",{className:"".concat(Ce,"-content")},he));var de=xe||{},ce=de.colSpan,ae=de.rowSpan,Se=de.style,te=de.className,ue=Object(S.a)(de,["colSpan","rowSpan","style","className"]),Oe=ce!==void 0?ce:w,le=ae!==void 0?ae:_;if(Oe===0||le===0)return null;var Q={},Y=typeof N=="number",Z=typeof j=="number";Y&&(Q.position="sticky",Q.left=N),Z&&(Q.position="sticky",Q.right=j);var be={};q&&(be.textAlign=q);var ge,De=K===!0?{showTitle:!0}:K;De&&(De.showTitle||re==="header")&&(typeof he=="string"||typeof he=="number"?ge=he.toString():h.isValidElement(he)&&typeof he.props.children=="string"&&(ge=he.props.children));var Qe=Object(u.a)(Object(u.a)(Object(u.a)({title:ge},ue),W),{},{colSpan:Oe&&Oe!==1?Oe:null,rowSpan:le&&le!==1?le:null,className:c()(Ce,g,(n={},Object(L.a)(n,"".concat(Ce,"-fix-left"),Y),Object(L.a)(n,"".concat(Ce,"-fix-left-first"),k),Object(L.a)(n,"".concat(Ce,"-fix-left-last"),z),Object(L.a)(n,"".concat(Ce,"-fix-right"),Z),Object(L.a)(n,"".concat(Ce,"-fix-right-first"),H),Object(L.a)(n,"".concat(Ce,"-fix-right-last"),F),Object(L.a)(n,"".concat(Ce,"-ellipsis"),K),Object(L.a)(n,"".concat(Ce,"-with-append"),G),Object(L.a)(n,"".concat(Ce,"-fix-sticky"),(Y||Z)&&ee),n),W.className,te),style:Object(u.a)(Object(u.a)(Object(u.a)(Object(u.a)({},W.style),be),Q),Se),ref:l(E)?m:null});return h.createElement(E,Object.assign({},Qe),G,he)}var f=h.forwardRef(p);f.displayName="Cell";var b=h.memo(f,function(v,m){return m.shouldCellUpdate?!m.shouldCellUpdate(m.record,v.record):!1});J.a=b},gRFJ:function(I,J,P){I.exports=[P("rdUC"),P("ynwM"),P("RELg"),P("DlR+"),P("CrYA"),P("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(I){return I<10?"0"+I:I}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(I){return rx_escapable.lastIndex=0,rx_escapable.test(I)?'"'+I.replace(rx_escapable,function(J){var P=meta[J];return typeof P=="string"?P:"\\u"+("0000"+J.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+I+'"'}function str(I,J){var P,L,u,S,R=gap,h,o=J[I];o&&typeof o=="object"&&typeof o.toJSON=="function"&&(o=o.toJSON(I)),typeof rep=="function"&&(o=rep.call(J,I,o));switch(typeof o){case"string":return quote(o);case"number":return isFinite(o)?String(o):"null";case"boolean":case"null":return String(o);case"object":if(!o)return"null";if(gap+=indent,h=[],Object.prototype.toString.apply(o)==="[object Array]"){for(S=o.length,P=0;PH.length)&&(F=H.length);for(var G=0,B=new Array(F);G=0)continue;if(!Object.prototype.propertyIsEnumerable.call(H,B))continue;G[B]=H[B]}}return G}function b(H,F){if(H==null)return{};var G={},B=Object.keys(H),W,K;for(K=0;K=0)continue;G[W]=H[W]}return G}var v=function(F){var G=F.className,B=F.percent,W=F.prefixCls,K=F.strokeColor,q=F.strokeLinecap,re=F.strokeWidth,ee=F.style,Ce=F.trailColor,xe=F.trailWidth,he=F.transition,ke=f(F,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete ke.gapPosition;var _e=Array.isArray(B)?B:[B],de=Array.isArray(K)?K:[K],ce=o(_e),ae=c(ce,1),Se=ae[0],te=re/2,ue=100-re/2,Oe="M ".concat(q==="round"?te:0,",").concat(te,` L `).concat(q==="round"?ue:100,",").concat(te),le="0 0 100 ".concat(re),Q=0;return u.a.createElement("svg",C({className:R()("".concat(W,"-line"),G),viewBox:le,preserveAspectRatio:"none",style:ee},ke),u.a.createElement("path",{className:"".concat(W,"-line-trail"),d:Oe,strokeLinecap:q,stroke:Ce,strokeWidth:xe||re,fillOpacity:"0"}),_e.map(function(Y,Z){var be={strokeDasharray:"".concat(Y,"px, 100px"),strokeDashoffset:"-".concat(Q,"px"),transition:he||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ge=de[Z]||de[de.length-1];return Q+=Y,u.a.createElement("path",{key:Z,className:"".concat(W,"-line-path"),d:Oe,strokeLinecap:q,stroke:ge,strokeWidth:re,fillOpacity:"0",ref:Se[Z],style:be})}))};v.defaultProps=h;var m=v;function n(){return n=Object.assign||function(H){for(var F=1;FH.length)&&(F=H.length);for(var G=0,B=new Array(F);G=0)continue;if(!Object.prototype.propertyIsEnumerable.call(H,B))continue;G[B]=H[B]}}return G}function x(H,F){if(H==null)return{};var G={},B=Object.keys(H),W,K;for(K=0;K=0)continue;G[W]=H[W]}return G}var E=0;function w(H){return+H.replace("%","")}function _(H){return Array.isArray(H)?H:[H]}function N(H,F,G,B){var W=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,K=arguments.length>5?arguments[5]:void 0,q=50-B/2,re=0,ee=-q,Ce=0,xe=-2*q;switch(K){case"left":re=-q,ee=0,Ce=2*q,xe=0;break;case"right":re=q,ee=0,Ce=-2*q,xe=0;break;case"bottom":ee=q,xe=2*q;break;default:}var he="M 50,50 m ".concat(re,",").concat(ee,` a `).concat(q,",").concat(q," 0 1 1 ").concat(Ce,",").concat(-xe,` a `).concat(q,",").concat(q," 0 1 1 ").concat(-Ce,",").concat(xe),ke=Math.PI*2*q,_e={stroke:G,strokeDasharray:"".concat(F/100*(ke-W),"px ").concat(ke,"px"),strokeDashoffset:"-".concat(W/2+H/100*(ke-W),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:he,pathStyle:_e}}var j=function(F){var G=F.prefixCls,B=F.strokeWidth,W=F.trailWidth,K=F.gapDegree,q=F.gapPosition,re=F.trailColor,ee=F.strokeLinecap,Ce=F.style,xe=F.className,he=F.strokeColor,ke=F.percent,_e=A(F,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),de=Object(L.useMemo)(function(){return E+=1,E},[]),ce=N(0,100,re,B,K,q),ae=ce.pathString,Se=ce.pathStyle,te=_(ke),ue=_(he),Oe=ue.find(function(be){return Object.prototype.toString.call(be)==="[object Object]"}),le=o(te),Q=d(le,1),Y=Q[0],Z=function(){var ge=0;return te.map(function(De,Qe){var Ze=ue[Qe]||ue[ue.length-1],nt=Object.prototype.toString.call(Ze)==="[object Object]"?"url(#".concat(G,"-gradient-").concat(de,")"):"",tt=N(ge,De,Ze,B,K,q);return ge+=De,u.a.createElement("path",{key:Qe,className:"".concat(G,"-circle-path"),d:tt.pathString,stroke:nt,strokeLinecap:ee,strokeWidth:B,opacity:De===0?0:1,fillOpacity:"0",style:tt.pathStyle,ref:Y[Qe]})})};return u.a.createElement("svg",n({className:R()("".concat(G,"-circle"),xe),viewBox:"0 0 100 100",style:Ce},_e),Oe&&u.a.createElement("defs",null,u.a.createElement("linearGradient",{id:"".concat(G,"-gradient-").concat(de),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Oe).sort(function(be,ge){return w(be)-w(ge)}).map(function(be,ge){return u.a.createElement("stop",{key:ge,offset:be,stopColor:Oe[be]})}))),u.a.createElement("path",{className:"".concat(G,"-circle-trail"),d:ae,stroke:re,strokeLinecap:ee,strokeWidth:W||B,fillOpacity:"0",style:Se}),Z().reverse())};j.defaultProps=h;var k=j,z={Line:m,Circle:k}},hW8S:function(I,J,P){"use strict";P.d(J,"a",function(){return R}),P.d(J,"c",function(){return h}),P.d(J,"b",function(){return o});var L=P("VTBJ"),u=P("Ff2n"),S=P("Kwbf"),R="RC_TABLE_INTERNAL_COL_DEFINE";function h(C){var c=C.expandable,a=Object(u.a)(C,["expandable"]);return"expandable"in C?Object(L.a)(Object(L.a)({},a),c):a}function o(C){return Object.keys(C).reduce(function(c,a){return(a.substr(0,5)==="data-"||a.substr(0,5)==="aria-")&&(c[a]=C[a]),c},{})}},i3hx:function(I,J,P){},jO9C:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("OLod"))})(this,function(L){return L.pad.Iso97971={pad:function(u,S){u.concat(L.lib.WordArray.create([2147483648],1)),L.pad.ZeroPadding.pad(u,S)},unpad:function(u){L.pad.ZeroPadding.unpad(u),u.sigBytes--}},L.pad.Iso97971})},je13:function(I,J,P){var L=P("5nXd"),u=P("gRFJ"),S=[P("uQRt")];I.exports=L.createStore(u,S)},k3GJ:function(I,J,P){"use strict";P.d(J,"a",function(){return Dn});var L=P("rePB"),u=P("ODXe"),S=P("Ff2n"),R=P("VTBJ"),h=P("q1tI"),o=P("TSYQ"),C=P.n(o),c=P("Zm9Q"),a=P("6cGi"),i=P("KQm4"),r=P("xEkU"),l=P.n(r),p=P("t23M");function f(Ne){var Ge=Object(h.useRef)(),Je=Object(h.useRef)(!1);function Fe(){for(var ve=arguments.length,Le=new Array(ve),we=0;weit&&(xt=it-Et),Object(h.useMemo)(function(){if(!Le.length)return[0,0];for(var Rt=Le.length,Yt=Rt,gr=0;grVe+xt){Yt=gr-1;break}}for(var wr=0,Ar=Rt-1;Ar>=0;Ar-=1){var _r=Ne.get(Le[Ar].key)||T;if(_r[Ye]1&&arguments[1]!==void 0?arguments[1]:!1,Fe=Ge&&typeof Ge.getBoundingClientRect=="function"&&Ge.getBoundingClientRect().width;if(Fe){if(Je){var ve=getComputedStyle(Ge),Le=ve.marginLeft,we=ve.marginRight;Fe+=+Le.replace("px","")+ +we.replace("px","")}Fe=+Fe.toFixed(6)}return Fe||0},ge=function(Ge,Je,Fe){Ge&&Object(H.a)(Ge.style)==="object"&&(Ge.style[Je]=Fe)},De=function(){return te.any},Qe=P("bdgK"),Ze=P("i8i4"),nt=P.n(Ze),tt=P("wgJM"),lt=P("l4aY"),st=P("m+aA"),je=P("c+Xe"),Re=P("zT1h"),et=P("QC+M");function ct(Ne,Ge,Je){return Je?Ne[0]===Ge[0]:Ne[0]===Ge[0]&&Ne[1]===Ge[1]}function $e(Ne,Ge,Je){var Fe=Ne[Ge]||{};return Object(R.a)(Object(R.a)({},Fe),Je)}function qe(Ne,Ge,Je,Fe){for(var ve=Je.points,Le=Object.keys(Ne),we=0;we1&&arguments[1]!==void 0?arguments[1]:2;Ge();var Le=Object(tt.a)(function(){ve<=1?Fe({isCanceled:function(){return Le!==Ne.current}}):Je(Fe,ve-1)});Ne.current=Le}return h.useEffect(function(){return function(){Ge()}},[]),[Je,Ge]},si=[Nt,br,ur,wt],Tt=!1,Dt=!0;function Ct(Ne){return Ne===ur||Ne===wt}var Rr=function(Ne,Ge){var Je=h.useState(dr),Fe=Object(u.a)(Je,2),ve=Fe[0],Le=Fe[1],we=Lr(),Be=Object(u.a)(we,2),He=Be[0],Ye=Be[1];function Ve(){Le(Nt)}return Gr(function(){if(ve!==dr&&ve!==wt){var it=si.indexOf(ve),ht=si[it+1],Et=Ge(ve);Et===Tt?Le(ht):He(function(xt){function Rt(){if(xt.isCanceled())return;Le(ht)}Et===!0?Rt():Promise.resolve(Et).then(Rt)})}},[Ne,ve]),h.useEffect(function(){return function(){Ye()}},[]),[Ve,ve]},jr=function(Ne){var Ge=Object(h.useRef)(),Je=Object(h.useRef)(Ne);Je.current=Ne;var Fe=h.useCallback(function(we){Je.current(we)},[]);function ve(we){we&&(we.removeEventListener(At,Fe),we.removeEventListener(dt,Fe))}function Le(we){Ge.current&&Ge.current!==we&&ve(Ge.current),we&&we!==Ge.current&&(we.addEventListener(At,Fe),we.addEventListener(dt,Fe),Ge.current=we)}return h.useEffect(function(){return function(){ve(Ge.current)}},[]),[Le,ve]};function $t(Ne,Ge,Je,Fe){var ve=Fe.motionEnter,Le=ve===void 0?!0:ve,we=Fe.motionAppear,Be=we===void 0?!0:we,He=Fe.motionLeave,Ye=He===void 0?!0:He,Ve=Fe.motionDeadline,it=Fe.motionLeaveImmediately,ht=Fe.onAppearPrepare,Et=Fe.onEnterPrepare,xt=Fe.onLeavePrepare,Rt=Fe.onAppearStart,Yt=Fe.onEnterStart,gr=Fe.onLeaveStart,yr=Fe.onAppearActive,wr=Fe.onEnterActive,Ar=Fe.onLeaveActive,_r=Fe.onAppearEnd,Cr=Fe.onEnterEnd,zr=Fe.onLeaveEnd,Pr=Fe.onVisibleChanged,kn=hr(),Ir=Object(u.a)(kn,2),nr=Ir[0],qt=Ir[1],Nr=hr(bt),Kr=Object(u.a)(Nr,2),zt=Kr[0],Jr=Kr[1],Ln=hr(null),nn=Object(u.a)(Ln,2),yn=nn[0],fn=nn[1],Wn=Object(h.useRef)(!1),ti=Object(h.useRef)(null),In=Object(h.useRef)(!1),vi=Object(h.useRef)(null);function Fi(){var Cn=Je();return Cn||vi.current}var wi=Object(h.useRef)(!1);function ri(Cn){var dn=Fi();if(Cn&&!Cn.deadline&&Cn.target!==dn)return;var ni;zt===Vt&&wi.current?ni=_r==null?void 0:_r(dn,Cn):zt===ir&&wi.current?ni=Cr==null?void 0:Cr(dn,Cn):zt===Qt&&wi.current&&(ni=zr==null?void 0:zr(dn,Cn)),ni!==!1&&!In.current&&(Jr(bt),fn(null))}var Sn=jr(ri),bn=Object(u.a)(Sn,1),Nn=bn[0],Mn=h.useMemo(function(){var Cn,dn,ni;switch(zt){case"appear":return Cn={},Object(L.a)(Cn,Nt,ht),Object(L.a)(Cn,br,Rt),Object(L.a)(Cn,ur,yr),Cn;case"enter":return dn={},Object(L.a)(dn,Nt,Et),Object(L.a)(dn,br,Yt),Object(L.a)(dn,ur,wr),dn;case"leave":return ni={},Object(L.a)(ni,Nt,xt),Object(L.a)(ni,br,gr),Object(L.a)(ni,ur,Ar),ni;default:return{}}},[zt]),Bi=Rr(zt,function(Cn){if(Cn===Nt){var dn=Mn[Nt];return dn?dn(Fi()):Tt}if(pn in Mn){var ni;fn(((ni=Mn[pn])===null||ni===void 0?void 0:ni.call(Mn,Fi(),null))||null)}return pn===ur&&(Nn(Fi()),Ve>0&&(clearTimeout(ti.current),ti.current=setTimeout(function(){ri({deadline:!0})},Ve))),Dt}),ra=Object(u.a)(Bi,2),na=ra[0],pn=ra[1],Yi=Ct(pn);wi.current=Yi,Gr(function(){qt(Ge);var Cn=Wn.current;if(Wn.current=!0,!Ne)return;var dn;!Cn&&Ge&&Be&&(dn=Vt),Cn&&Ge&&Le&&(dn=ir),(Cn&&!Ge&&Ye||!Cn&&it&&!Ge&&Ye)&&(dn=Qt),dn&&(Jr(dn),na())},[Ge]),Object(h.useEffect)(function(){(zt===Vt&&!Be||zt===ir&&!Le||zt===Qt&&!Ye)&&Jr(bt)},[Be,Le,Ye]),Object(h.useEffect)(function(){return function(){clearTimeout(ti.current),In.current=!0}},[]),Object(h.useEffect)(function(){nr!==void 0&&zt===bt&&(Pr==null||Pr(nr))},[nr,zt]);var ia=yn;return Mn[Nt]&&pn===br&&(ia=Object(R.a)({transition:"none"},ia)),[zt,pn,ia,nr!=null?nr:Ge]}var jt=function(Ne){Object(E.a)(Je,Ne);var Ge=Object(w.a)(Je);function Je(){return Object(M.a)(this,Je),Ge.apply(this,arguments)}return Object(A.a)(Je,[{key:"render",value:function(){return this.props.children}}]),Je}(h.Component),Ur=jt;function _n(Ne){var Ge=Ne;Object(H.a)(Ne)==="object"&&(Ge=Ne.transitionSupport);function Je(ve){return!!(ve.motionName&&Ge)}var Fe=h.forwardRef(function(ve,Le){var we=ve.visible,Be=we===void 0?!0:we,He=ve.removeOnLeave,Ye=He===void 0?!0:He,Ve=ve.forceRender,it=ve.children,ht=ve.motionName,Et=ve.leavedClassName,xt=ve.eventProps,Rt=Je(ve),Yt=Object(h.useRef)(),gr=Object(h.useRef)();function yr(){try{return Object(st.a)(Yt.current||gr.current)}catch(Jr){return null}}var wr=$t(Rt,Be,yr,ve),Ar=Object(u.a)(wr,4),_r=Ar[0],Cr=Ar[1],zr=Ar[2],Pr=Ar[3],kn=h.useRef(Pr);Pr&&(kn.current=!0);var Ir=Object(h.useRef)(Le);Ir.current=Le;var nr=h.useCallback(function(Jr){Yt.current=Jr,Object(je.b)(Ir.current,Jr)},[]),qt,Nr=Object(R.a)(Object(R.a)({},xt),{},{visible:Be});if(!it)qt=null;else if(_r===bt||!Je(ve))Pr?qt=it(Object(R.a)({},Nr),nr):!Ye&&kn.current?qt=it(Object(R.a)(Object(R.a)({},Nr),{},{className:Et}),nr):Ve?qt=it(Object(R.a)(Object(R.a)({},Nr),{},{style:{display:"none"}}),nr):qt=null;else{var Kr,zt;Cr===Nt?zt="prepare":Ct(Cr)?zt="active":Cr===br&&(zt="start"),qt=it(Object(R.a)(Object(R.a)({},Nr),{},{className:C()(Ot(ht,_r),(Kr={},Object(L.a)(Kr,Ot(ht,"".concat(_r,"-").concat(zt)),zt),Object(L.a)(Kr,ht,typeof ht=="string"),Kr)),style:zr}),nr)}return h.createElement(Ur,{ref:gr},qt)});return Fe.displayName="CSSMotion",Fe}var Vr=_n(Pt),vt="add",Ft="keep",rn="remove",hn="removed";function An(Ne){var Ge;return Ne&&Object(H.a)(Ne)==="object"&&"key"in Ne?Ge=Ne:Ge={key:Ne},Object(R.a)(Object(R.a)({},Ge),{},{key:String(Ge.key)})}function Rn(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Ne.map(An)}function se(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Je=[],Fe=0,ve=Ge.length,Le=Rn(Ne),we=Rn(Ge);Le.forEach(function(Ye){for(var Ve=!1,it=Fe;it1});return He.forEach(function(Ye){Je=Je.filter(function(Ve){var it=Ve.key,ht=Ve.status;return it!==Ye||ht!==rn}),Je.forEach(function(Ve){Ve.key===Ye&&(Ve.status=Ft)})}),Je}var V=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function X(Ne){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Vr,Je=function(Fe){Object(E.a)(Le,Fe);var ve=Object(w.a)(Le);function Le(){var we;return Object(M.a)(this,Le),we=ve.apply(this,arguments),we.state={keyEntities:[]},we.removeKey=function(Be){we.setState(function(He){var Ye=He.keyEntities;return{keyEntities:Ye.map(function(Ve){return Ve.key!==Be?Ve:Object(R.a)(Object(R.a)({},Ve),{},{status:hn})})}})},we}return Object(A.a)(Le,[{key:"render",value:function(){var Be=this,He=this.state.keyEntities,Ye=this.props,Ve=Ye.component,it=Ye.children,ht=Ye.onVisibleChanged,Et=Object(S.a)(Ye,["component","children","onVisibleChanged"]),xt=Ve||h.Fragment,Rt={};return V.forEach(function(Yt){Rt[Yt]=Et[Yt],delete Et[Yt]}),delete Et.keys,h.createElement(xt,Et,He.map(function(Yt){var gr=Yt.status,yr=Object(S.a)(Yt,["status"]),wr=gr===vt||gr===Ft;return h.createElement(Ge,Object(s.a)({},Rt,{key:yr.key,visible:wr,eventProps:yr,onVisibleChanged:function(_r){ht==null||ht(_r,{key:yr.key}),_r||Be.removeKey(yr.key)}}),it)}))}}],[{key:"getDerivedStateFromProps",value:function(Be,He){var Ye=Be.keys,Ve=He.keyEntities,it=Rn(Ye),ht=se(Ve,it);return{keyEntities:ht.filter(function(Et){var xt=Ve.find(function(Rt){var Yt=Rt.key;return Et.key===Yt});return!(xt&&xt.status===hn&&Et.status===rn)})}}}]),Le}(h.Component);return Je.defaultProps={component:"div"},Je}var ne=X(Pt),me=Vr;function ie(Ne){var Ge=Ne.prefixCls,Je=Ne.motion,Fe=Ne.animation,ve=Ne.transitionName;return Je||(Fe?{motionName:"".concat(Ge,"-").concat(Fe)}:ve?{motionName:ve}:null)}function ze(Ne){var Ge=Ne.prefixCls,Je=Ne.visible,Fe=Ne.zIndex,ve=Ne.mask,Le=Ne.maskMotion,we=Ne.maskAnimation,Be=Ne.maskTransitionName;if(!ve)return null;var He={};return(Le||Be||we)&&(He=Object(R.a)({motionAppear:!0},ie({motion:Le,prefixCls:Ge,transitionName:Be,animation:we}))),h.createElement(me,Object(s.a)({},He,{visible:Je,removeOnLeave:!0}),function(Ye){var Ve=Ye.className;return h.createElement("div",{style:{zIndex:Fe},className:C()("".concat(Ge,"-mask"),Ve)})})}var pt=P("9mu1"),ot=P("o0o1"),It=P.n(ot),gt=P("HaE+"),Ht=["measure","align",null,"motion"],Xt=function(Ne,Ge){var Je=Object(h.useState)(null),Fe=Object(u.a)(Je,2),ve=Fe[0],Le=Fe[1],we=Object(h.useRef)(),Be=Object(h.useRef)(!1);function He(it){Be.current||Le(it)}function Ye(){tt.a.cancel(we.current)}function Ve(it){Ye(),we.current=Object(tt.a)(function(){He(function(ht){switch(ve){case"align":return"motion";case"motion":return"stable";default:}return ht}),it==null||it()})}return Object(h.useEffect)(function(){He("measure")},[Ne]),Object(h.useEffect)(function(){switch(ve){case"measure":Ge();break;default:}ve&&(we.current=Object(tt.a)(Object(gt.a)(It.a.mark(function it(){var ht,Et;return It.a.wrap(function(Rt){for(;;)switch(Rt.prev=Rt.next){case 0:ht=Ht.indexOf(ve),Et=Ht[ht+1],Et&&ht!==-1&&He(Et);case 3:case"end":return Rt.stop()}},it)}))))},[ve]),Object(h.useEffect)(function(){return function(){Be.current=!0,Ye()}},[]),[ve,Ve]},Sr=function(Ne){var Ge=h.useState({width:0,height:0}),Je=Object(u.a)(Ge,2),Fe=Je[0],ve=Je[1];function Le(Be){ve({width:Be.offsetWidth,height:Be.offsetHeight})}var we=h.useMemo(function(){var Be={};if(Ne){var He=Fe.width,Ye=Fe.height;Ne.indexOf("height")!==-1&&Ye?Be.height=Ye:Ne.indexOf("minHeight")!==-1&&Ye&&(Be.minHeight=Ye),Ne.indexOf("width")!==-1&&He?Be.width=He:Ne.indexOf("minWidth")!==-1&&He&&(Be.minWidth=He)}return Be},[Ne,Fe]);return[we,Le]},an=h.forwardRef(function(Ne,Ge){var Je=Ne.visible,Fe=Ne.prefixCls,ve=Ne.className,Le=Ne.style,we=Ne.children,Be=Ne.zIndex,He=Ne.stretch,Ye=Ne.destroyPopupOnHide,Ve=Ne.forceRender,it=Ne.align,ht=Ne.point,Et=Ne.getRootDomNode,xt=Ne.getClassNameFromAlign,Rt=Ne.onAlign,Yt=Ne.onMouseEnter,gr=Ne.onMouseLeave,yr=Ne.onMouseDown,wr=Ne.onTouchStart,Ar=Object(h.useRef)(),_r=Object(h.useRef)(),Cr=Object(h.useState)(),zr=Object(u.a)(Cr,2),Pr=zr[0],kn=zr[1],Ir=Sr(He),nr=Object(u.a)(Ir,2),qt=nr[0],Nr=nr[1];function Kr(){He&&Nr(Et())}var zt=Xt(Je,Kr),Jr=Object(u.a)(zt,2),Ln=Jr[0],nn=Jr[1],yn=Object(h.useRef)();function fn(){return ht||Et}function Wn(){var Sn;(Sn=Ar.current)===null||Sn===void 0||Sn.forceAlign()}function ti(Sn,bn){var Nn=xt(bn);Pr!==Nn&&kn(Nn),Ln==="align"&&(Pr!==Nn?Promise.resolve().then(function(){Wn()}):nn(function(){var Mn;(Mn=yn.current)===null||Mn===void 0||Mn.call(yn)}),Rt==null||Rt(Sn,bn))}var In=Object(R.a)({},ie(Ne));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(Sn){var bn=In[Sn];In[Sn]=function(Nn,Mn){return nn(),bn==null?void 0:bn(Nn,Mn)}});function vi(){return new Promise(function(Sn){yn.current=Sn})}h.useEffect(function(){!In.motionName&&Ln==="motion"&&nn()},[In.motionName,Ln]),h.useImperativeHandle(Ge,function(){return{forceAlign:Wn,getElement:function(){return _r.current}}});var Fi=Object(R.a)(Object(R.a)({},qt),{},{zIndex:Be,opacity:Ln==="motion"||Ln==="stable"||!Je?void 0:0,pointerEvents:Ln==="stable"?void 0:"none"},Le),wi=!0;(it==null?void 0:it.points)&&(Ln==="align"||Ln==="stable")&&(wi=!1);var ri=we;return h.Children.count(we)>1&&(ri=h.createElement("div",{className:"".concat(Fe,"-content")},we)),h.createElement(me,Object(s.a)({visible:Je,ref:_r,leavedClassName:"".concat(Fe,"-hidden")},In,{onAppearPrepare:vi,onEnterPrepare:vi,removeOnLeave:Ye,forceRender:Ve}),function(Sn,bn){var Nn=Sn.className,Mn=Sn.style,Bi=C()(Fe,ve,Pr,Nn);return h.createElement(pt.a,{target:fn(),key:"popup",ref:Ar,monitorWindowResize:!0,disabled:wi,align:it,onAlign:ti},h.createElement("div",{ref:bn,className:Bi,onMouseEnter:Yt,onMouseLeave:gr,onMouseDownCapture:yr,onTouchStartCapture:wr,style:Object(R.a)(Object(R.a)({},Mn),Fi)},ri))})});an.displayName="PopupInner";var Zr=an,Zt=h.forwardRef(function(Ne,Ge){var Je=Ne.prefixCls,Fe=Ne.visible,ve=Ne.zIndex,Le=Ne.children,we=Ne.mobile;we=we===void 0?{}:we;var Be=we.popupClassName,He=we.popupStyle,Ye=we.popupMotion,Ve=Ye===void 0?{}:Ye,it=we.popupRender,ht=h.useRef();h.useImperativeHandle(Ge,function(){return{forceAlign:function(){},getElement:function(){return ht.current}}});var Et=Object(R.a)({zIndex:ve},He),xt=Le;return h.Children.count(Le)>1&&(xt=h.createElement("div",{className:"".concat(Je,"-content")},Le)),it&&(xt=it(xt)),h.createElement(me,Object(s.a)({visible:Fe,ref:ht,removeOnLeave:!0},Ve),function(Rt,Yt){var gr=Rt.className,yr=Rt.style,wr=C()(Je,Be,gr);return h.createElement("div",{ref:Yt,className:wr,style:Object(R.a)(Object(R.a)({},yr),Et)},xt)})});Zt.displayName="MobilePopupInner";var Hr=Zt,fr=["visible","mobile"],Jt=h.forwardRef(function(Ne,Ge){var Je=Ne.visible,Fe=Ne.mobile,ve=Object(S.a)(Ne,fr),Le=Object(h.useState)(Je),we=Object(u.a)(Le,2),Be=we[0],He=we[1],Ye=Object(h.useState)(!1),Ve=Object(u.a)(Ye,2),it=Ve[0],ht=Ve[1],Et=Object(R.a)(Object(R.a)({},ve),{},{visible:Be});Object(h.useEffect)(function(){He(Je),Je&&Fe&&ht(Ue())},[Je,Fe]);var xt=it?h.createElement(Hr,Object(s.a)({},Et,{mobile:Fe,ref:Ge})):h.createElement(Zr,Object(s.a)({},Et,{ref:Ge}));return h.createElement("div",null,h.createElement(ze,Et),xt)});Jt.displayName="Popup";var tr=Jt,vr=h.createContext(null),Xr=vr;function ln(){}function mn(){return""}function li(Ne){return Ne?Ne.ownerDocument:window.document}var Ki=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Ui(Ne){var Ge=function(Je){Object(E.a)(ve,Je);var Fe=Object(w.a)(ve);function ve(Le){var we;Object(M.a)(this,ve),we=Fe.call(this,Le),we.popupRef=h.createRef(),we.triggerRef=h.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(He){var Ye=we.props.mouseEnterDelay;we.fireEvents("onMouseEnter",He),we.delaySetPopupVisible(!0,Ye,Ye?null:He)},we.onMouseMove=function(He){we.fireEvents("onMouseMove",He),we.setPoint(He)},we.onMouseLeave=function(He){we.fireEvents("onMouseLeave",He),we.delaySetPopupVisible(!1,we.props.mouseLeaveDelay)},we.onPopupMouseEnter=function(){we.clearDelayTimer()},we.onPopupMouseLeave=function(He){var Ye;if(He.relatedTarget&&!He.relatedTarget.setTimeout&&Object(lt.a)((Ye=we.popupRef.current)===null||Ye===void 0?void 0:Ye.getElement(),He.relatedTarget))return;we.delaySetPopupVisible(!1,we.props.mouseLeaveDelay)},we.onFocus=function(He){we.fireEvents("onFocus",He),we.clearDelayTimer(),we.isFocusToShow()&&(we.focusTime=Date.now(),we.delaySetPopupVisible(!0,we.props.focusDelay))},we.onMouseDown=function(He){we.fireEvents("onMouseDown",He),we.preClickTime=Date.now()},we.onTouchStart=function(He){we.fireEvents("onTouchStart",He),we.preTouchTime=Date.now()},we.onBlur=function(He){we.fireEvents("onBlur",He),we.clearDelayTimer(),we.isBlurToHide()&&we.delaySetPopupVisible(!1,we.props.blurDelay)},we.onContextMenu=function(He){He.preventDefault(),we.fireEvents("onContextMenu",He),we.setPopupVisible(!0,He)},we.onContextMenuClose=function(){we.isContextMenuToShow()&&we.close()},we.onClick=function(He){if(we.fireEvents("onClick",He),we.focusTime){var Ye;if(we.preClickTime&&we.preTouchTime?Ye=Math.min(we.preClickTime,we.preTouchTime):we.preClickTime?Ye=we.preClickTime:we.preTouchTime&&(Ye=we.preTouchTime),Math.abs(Ye-we.focusTime)<20)return;we.focusTime=0}we.preClickTime=0,we.preTouchTime=0,we.isClickToShow()&&(we.isClickToHide()||we.isBlurToHide())&&He&&He.preventDefault&&He.preventDefault();var Ve=!we.state.popupVisible;(we.isClickToHide()&&!Ve||Ve&&we.isClickToShow())&&we.setPopupVisible(!we.state.popupVisible,He)},we.onPopupMouseDown=function(){if(we.hasPopupMouseDown=!0,clearTimeout(we.mouseDownTimeout),we.mouseDownTimeout=window.setTimeout(function(){we.hasPopupMouseDown=!1},0),we.context){var He;(He=we.context).onPopupMouseDown.apply(He,arguments)}},we.onDocumentClick=function(He){if(we.props.mask&&!we.props.maskClosable)return;var Ye=He.target,Ve=we.getRootDomNode(),it=we.getPopupDomNode();(!Object(lt.a)(Ve,Ye)||we.isContextMenuOnly())&&!Object(lt.a)(it,Ye)&&!we.hasPopupMouseDown&&we.close()},we.getRootDomNode=function(){var He=we.props.getTriggerDOMNode;if(He)return He(we.triggerRef.current);try{var Ye=Object(st.a)(we.triggerRef.current);if(Ye)return Ye}catch(Ve){}return nt.a.findDOMNode(Object(x.a)(we))},we.getPopupClassNameFromAlign=function(He){var Ye=[],Ve=we.props,it=Ve.popupPlacement,ht=Ve.builtinPlacements,Et=Ve.prefixCls,xt=Ve.alignPoint,Rt=Ve.getPopupClassNameFromAlign;return it&&ht&&Ye.push(qe(ht,Et,He,xt)),Rt&&Ye.push(Rt(He)),Ye.join(" ")},we.getComponent=function(){var He=we.props,Ye=He.prefixCls,Ve=He.destroyPopupOnHide,it=He.popupClassName,ht=He.onPopupAlign,Et=He.popupMotion,xt=He.popupAnimation,Rt=He.popupTransitionName,Yt=He.popupStyle,gr=He.mask,yr=He.maskAnimation,wr=He.maskTransitionName,Ar=He.maskMotion,_r=He.zIndex,Cr=He.popup,zr=He.stretch,Pr=He.alignPoint,kn=He.mobile,Ir=He.forceRender,nr=we.state,qt=nr.popupVisible,Nr=nr.point,Kr=we.getPopupAlign(),zt={};return we.isMouseEnterToShow()&&(zt.onMouseEnter=we.onPopupMouseEnter),we.isMouseLeaveToHide()&&(zt.onMouseLeave=we.onPopupMouseLeave),zt.onMouseDown=we.onPopupMouseDown,zt.onTouchStart=we.onPopupMouseDown,h.createElement(tr,Object(s.a)({prefixCls:Ye,destroyPopupOnHide:Ve,visible:qt,point:Pr&&Nr,className:it,align:Kr,onAlign:ht,animation:xt,getClassNameFromAlign:we.getPopupClassNameFromAlign},zt,{stretch:zr,getRootDomNode:we.getRootDomNode,style:Yt,mask:gr,zIndex:_r,transitionName:Rt,maskAnimation:yr,maskTransitionName:wr,maskMotion:Ar,ref:we.popupRef,motion:Et,mobile:kn,forceRender:Ir}),typeof Cr=="function"?Cr():Cr)},we.attachParent=function(He){tt.a.cancel(we.attachId);var Ye=we.props,Ve=Ye.getPopupContainer,it=Ye.getDocument,ht=we.getRootDomNode(),Et;Ve?(ht||Ve.length===0)&&(Et=Ve(ht)):Et=it(we.getRootDomNode()).body,Et?Et.appendChild(He):we.attachId=Object(tt.a)(function(){we.attachParent(He)})},we.getContainer=function(){var He=we.props.getDocument,Ye=He(we.getRootDomNode()).createElement("div");return Ye.style.position="absolute",Ye.style.top="0",Ye.style.left="0",Ye.style.width="100%",we.attachParent(Ye),Ye},we.setPoint=function(He){var Ye=we.props.alignPoint;if(!Ye||!He)return;we.setState({point:{pageX:He.pageX,pageY:He.pageY}})},we.handlePortalUpdate=function(){we.state.prevPopupVisible!==we.state.popupVisible&&we.props.afterPopupVisibleChange(we.state.popupVisible)},we.triggerContextValue={onPopupMouseDown:we.onPopupMouseDown};var Be;return"popupVisible"in Le?Be=!!Le.popupVisible:Be=!!Le.defaultPopupVisible,we.state={prevPopupVisible:Be,popupVisible:Be},Ki.forEach(function(He){we["fire".concat(He)]=function(Ye){we.fireEvents(He,Ye)}}),we}return Object(A.a)(ve,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var we=this.props,Be=this.state;if(Be.popupVisible){var He;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(He=we.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Re.a)(He,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(He=He||we.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Re.a)(He,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(He=He||we.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Re.a)(He,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Re.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),tt.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,Be=we.popupPlacement,He=we.popupAlign,Ye=we.builtinPlacements;return Be&&Ye?$e(Ye,Be,He):He}},{key:"setPopupVisible",value:function(we,Be){var He=this.props.alignPoint,Ye=this.state.popupVisible;this.clearDelayTimer(),Ye!==we&&("popupVisible"in this.props||this.setState({popupVisible:we,prevPopupVisible:Ye}),this.props.onPopupVisibleChange(we)),He&&Be&&we&&this.setPoint(Be)}},{key:"delaySetPopupVisible",value:function(we,Be,He){var Ye=this,Ve=Be*1e3;if(this.clearDelayTimer(),Ve){var it=He?{pageX:He.pageX,pageY:He.pageY}:null;this.delayTimer=window.setTimeout(function(){Ye.setPopupVisible(we,it),Ye.clearDelayTimer()},Ve)}else this.setPopupVisible(we,He)}},{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 Be=this.props.children.props,He=this.props;return Be[we]&&He[we]?this["fire".concat(we)]:Be[we]||He[we]}},{key:"isClickToShow",value:function(){var we=this.props,Be=we.action,He=we.showAction;return Be.indexOf("click")!==-1||He.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,Be=we.action,He=we.showAction;return Be.indexOf("contextMenu")!==-1||He.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var we=this.props,Be=we.action,He=we.hideAction;return Be.indexOf("click")!==-1||He.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var we=this.props,Be=we.action,He=we.showAction;return Be.indexOf("hover")!==-1||He.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var we=this.props,Be=we.action,He=we.hideAction;return Be.indexOf("hover")!==-1||He.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var we=this.props,Be=we.action,He=we.showAction;return Be.indexOf("focus")!==-1||He.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var we=this.props,Be=we.action,He=we.hideAction;return Be.indexOf("focus")!==-1||He.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,Be){var He=this.props.children.props[we];He&&He(Be);var Ye=this.props[we];Ye&&Ye(Be)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var we=this.state.popupVisible,Be=this.props,He=Be.children,Ye=Be.forceRender,Ve=Be.alignPoint,it=Be.className,ht=Be.autoDestroy,Et=h.Children.only(He),xt={key:"trigger"};this.isContextMenuToShow()?xt.onContextMenu=this.onContextMenu:xt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(xt.onClick=this.onClick,xt.onMouseDown=this.onMouseDown,xt.onTouchStart=this.onTouchStart):(xt.onClick=this.createTwoChains("onClick"),xt.onMouseDown=this.createTwoChains("onMouseDown"),xt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(xt.onMouseEnter=this.onMouseEnter,Ve&&(xt.onMouseMove=this.onMouseMove)):xt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?xt.onMouseLeave=this.onMouseLeave:xt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(xt.onFocus=this.onFocus,xt.onBlur=this.onBlur):(xt.onFocus=this.createTwoChains("onFocus"),xt.onBlur=this.createTwoChains("onBlur"));var Rt=C()(Et&&Et.props&&Et.props.className,it);Rt&&(xt.className=Rt);var Yt=Object(R.a)({},xt);Object(je.c)(Et)&&(Yt.ref=Object(je.a)(this.triggerRef,Et.ref));var gr=h.cloneElement(Et,Yt),yr;return(we||this.popupRef.current||Ye)&&(yr=h.createElement(Ne,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!we&&ht&&(yr=null),h.createElement(Xr.Provider,{value:this.triggerContextValue},gr,yr)}}],[{key:"getDerivedStateFromProps",value:function(we,Be){var He=we.popupVisible,Ye={};return He!==void 0&&Be.popupVisible!==He&&(Ye.popupVisible=He,Ye.prevPopupVisible=Be.popupVisible),Ye}}]),ve}(h.Component);return Ge.contextType=Xr,Ge.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:mn,getDocument:li,onPopupVisibleChange:ln,afterPopupVisibleChange:ln,onPopupAlign:ln,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 Fn=Ui(et.a),qr={adjustX:1,adjustY:1},Oi={topLeft:{points:["bl","tl"],overflow:qr,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:qr,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:qr,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:qr,offset:[4,0]}},on={topLeft:{points:["bl","tl"],overflow:qr,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:qr,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:qr,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:qr,offset:[4,0]}},Zn=Oi,Yr=0,cr={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},en=function(Ge,Je,Fe){var ve=le(Je),Le=Ge.getState();Ge.setState({defaultActiveFirst:Object(R.a)(Object(R.a)({},Le.defaultActiveFirst),{},Object(L.a)({},ve,Fe))})},Mr=function(Ne){Object(E.a)(Je,Ne);var Ge=Object(w.a)(Je);function Je(Fe){var ve;Object(M.a)(this,Je),ve=Ge.call(this,Fe),ve.onDestroy=function(Ve){ve.props.onDestroy(Ve)},ve.onKeyDown=function(Ve){var it=Ve.keyCode,ht=ve.menuInstance,Et=ve.props.store,xt=ve.getVisible();if(it===v.a.ENTER)return ve.onTitleClick(Ve),en(Et,ve.props.eventKey,!0),!0;if(it===v.a.RIGHT)return xt?ht.onKeyDown(Ve):(ve.triggerOpenChange(!0),en(Et,ve.props.eventKey,!0)),!0;if(it===v.a.LEFT){var Rt;if(xt)Rt=ht.onKeyDown(Ve);else return;return Rt||(ve.triggerOpenChange(!1),Rt=!0),Rt}return xt&&(it===v.a.UP||it===v.a.DOWN)?ht.onKeyDown(Ve):void 0},ve.onOpenChange=function(Ve){ve.props.onOpenChange(Ve)},ve.onPopupVisibleChange=function(Ve){ve.triggerOpenChange(Ve,Ve?"mouseenter":"mouseleave")},ve.onMouseEnter=function(Ve){var it=ve.props,ht=it.eventKey,Et=it.onMouseEnter,xt=it.store;en(xt,ve.props.eventKey,!1),Et({key:ht,domEvent:Ve})},ve.onMouseLeave=function(Ve){var it=ve.props,ht=it.parentMenu,Et=it.eventKey,xt=it.onMouseLeave;ht.subMenuInstance=Object(x.a)(ve),xt({key:Et,domEvent:Ve})},ve.onTitleMouseEnter=function(Ve){var it=ve.props,ht=it.eventKey,Et=it.onItemHover,xt=it.onTitleMouseEnter;Et({key:ht,hover:!0}),xt({key:ht,domEvent:Ve})},ve.onTitleMouseLeave=function(Ve){var it=ve.props,ht=it.parentMenu,Et=it.eventKey,xt=it.onItemHover,Rt=it.onTitleMouseLeave;ht.subMenuInstance=Object(x.a)(ve),xt({key:Et,hover:!1}),Rt({key:Et,domEvent:Ve})},ve.onTitleClick=function(Ve){var it=Object(x.a)(ve),ht=it.props;if(ht.onTitleClick({key:ht.eventKey,domEvent:Ve}),ht.triggerSubMenuAction==="hover")return;ve.triggerOpenChange(!ve.getVisible(),"click"),en(ht.store,ve.props.eventKey,!1)},ve.onSubMenuClick=function(Ve){typeof ve.props.onClick=="function"&&ve.props.onClick(ve.addKeyPath(Ve))},ve.onSelect=function(Ve){ve.props.onSelect(Ve)},ve.onDeselect=function(Ve){ve.props.onDeselect(Ve)},ve.getPrefixCls=function(){return"".concat(ve.props.rootPrefixCls,"-submenu")},ve.getActiveClassName=function(){return"".concat(ve.getPrefixCls(),"-active")},ve.getDisabledClassName=function(){return"".concat(ve.getPrefixCls(),"-disabled")},ve.getSelectedClassName=function(){return"".concat(ve.getPrefixCls(),"-selected")},ve.getOpenClassName=function(){return"".concat(ve.props.rootPrefixCls,"-submenu-open")},ve.getVisible=function(){return ve.state.isOpen},ve.getMode=function(){return ve.state.mode},ve.saveMenuInstance=function(Ve){ve.menuInstance=Ve},ve.addKeyPath=function(Ve){return Object(R.a)(Object(R.a)({},Ve),{},{keyPath:(Ve.keyPath||[]).concat(ve.props.eventKey)})},ve.triggerOpenChange=function(Ve,it){var ht=ve.props.eventKey,Et=function(){ve.onOpenChange({key:ht,item:Object(x.a)(ve),trigger:it,open:Ve})};it==="mouseenter"?ve.mouseenterTimeout=setTimeout(function(){Et()},0):Et()},ve.isChildrenSelected=function(){var Ve={find:!1};return Y(ve.props.children,ve.props.selectedKeys,Ve),Ve.find},ve.isInlineMode=function(){return ve.getMode()==="inline"},ve.adjustWidth=function(){if(!ve.subMenuTitle||!ve.menuInstance)return;var Ve=Ze.findDOMNode(ve.menuInstance);if(Ve.offsetWidth>=ve.subMenuTitle.offsetWidth)return;Ve.style.minWidth="".concat(ve.subMenuTitle.offsetWidth,"px")},ve.saveSubMenuTitle=function(Ve){ve.subMenuTitle=Ve},ve.getBaseProps=function(){var Ve=Object(x.a)(ve),it=Ve.props,ht=ve.getMode();return{mode:ht==="horizontal"?"vertical":ht,visible:ve.getVisible(),level:it.level+1,inlineIndent:it.inlineIndent,focusable:!1,onClick:ve.onSubMenuClick,onSelect:ve.onSelect,onDeselect:ve.onDeselect,onDestroy:ve.onDestroy,selectedKeys:it.selectedKeys,eventKey:"".concat(it.eventKey,"-menu-"),openKeys:it.openKeys,motion:it.motion,onOpenChange:ve.onOpenChange,subMenuOpenDelay:it.subMenuOpenDelay,parentMenu:Object(x.a)(ve),subMenuCloseDelay:it.subMenuCloseDelay,forceSubMenuRender:it.forceSubMenuRender,triggerSubMenuAction:it.triggerSubMenuAction,builtinPlacements:it.builtinPlacements,defaultActiveFirst:it.store.getState().defaultActiveFirst[le(it.eventKey)],multiple:it.multiple,prefixCls:it.rootPrefixCls,id:ve.internalMenuId,manualRef:ve.saveMenuInstance,itemIcon:it.itemIcon,expandIcon:it.expandIcon,direction:it.direction}},ve.getMotion=function(Ve,it){var ht=Object(x.a)(ve),Et=ht.haveRendered,xt=ve.props,Rt=xt.motion,Yt=xt.rootPrefixCls,gr=Object(R.a)(Object(R.a)({},Rt),{},{leavedClassName:"".concat(Yt,"-hidden"),removeOnLeave:!1,motionAppear:Et||!it||Ve!=="inline"});return gr};var Le=Fe.store,we=Fe.eventKey,Be=Le.getState(),He=Be.defaultActiveFirst;ve.isRootMenu=!1;var Ye=!1;return He&&(Ye=He[we]),en(Le,we,Ye),ve.state={mode:Fe.mode,isOpen:Fe.isOpen},ve}return Object(A.a)(Je,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ve=this,Le=this.props,we=Le.mode,Be=Le.parentMenu,He=Le.manualRef,Ye=Le.isOpen,Ve=function(){ve.setState({mode:we,isOpen:Ye})},it=Ye!==this.state.isOpen,ht=we!==this.state.mode;if((ht||it)&&(tt.a.cancel(this.updateStateRaf),ht?this.updateStateRaf=Object(tt.a)(Ve):Ve()),He&&He(this),we!=="horizontal"||!(Be==null?void 0:Be.isRootMenu)||!Ye)return;this.minWidthTimeout=setTimeout(function(){return ve.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var ve=this.props,Le=ve.onDestroy,we=ve.eventKey;Le&&Le(we),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),tt.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(ve,Le){var we=this.getBaseProps();return h.createElement(pi,Object(s.a)({},we,{id:this.internalMenuId,className:ve,style:Le}),this.props.children)}},{key:"renderChildren",value:function(){var ve=this,Le=this.getBaseProps(),we=Le.mode,Be=Le.visible,He=Le.forceSubMenuRender,Ye=Le.direction,Ve=this.getMotion(we,Be);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Be||He,!this.haveOpened)return h.createElement("div",null);var it=C()("".concat(Le.prefixCls,"-sub"),Object(L.a)({},"".concat(Le.prefixCls,"-rtl"),Ye==="rtl"));return this.isInlineMode()?h.createElement(me,Object(s.a)({visible:Le.visible,forceRender:He},Ve),function(ht){var Et=ht.className,xt=ht.style,Rt=C()(it,Et);return ve.renderPopupMenu(Rt,xt)}):this.renderPopupMenu(it)}},{key:"render",value:function(){var ve,Le,we,Be=Object(R.a)({},this.props),He=this.getVisible(),Ye=this.getPrefixCls(),Ve=this.isInlineMode(),it=this.getMode(),ht=C()(Ye,"".concat(Ye,"-").concat(it),(ve={},Object(L.a)(ve,Be.className,!!Be.className),Object(L.a)(ve,this.getOpenClassName(),He),Object(L.a)(ve,this.getActiveClassName(),Be.active||He&&!Ve),Object(L.a)(ve,this.getDisabledClassName(),Be.disabled),Object(L.a)(ve,this.getSelectedClassName(),this.isChildrenSelected()),ve));this.internalMenuId||(Be.eventKey?this.internalMenuId="".concat(Be.eventKey,"$Menu"):(Yr+=1,this.internalMenuId="$__$".concat(Yr,"$Menu")));var Et={},xt={},Rt={};Be.disabled||(Et={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},xt={onClick:this.onTitleClick},Rt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Yt={},gr=Be.direction,yr=gr==="rtl";Ve&&(yr?Yt.paddingRight=Be.inlineIndent*Be.level:Yt.paddingLeft=Be.inlineIndent*Be.level);var wr={};this.getVisible()&&(wr={"aria-owns":this.internalMenuId});var Ar=null;it!=="horizontal"&&(Ar=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Ar=h.createElement(this.props.expandIcon,Object(R.a)({},this.props))));var _r=h.createElement("div",Object(s.a)({ref:this.saveSubMenuTitle,style:Yt,className:"".concat(Ye,"-title"),role:"button"},Rt,xt,{"aria-expanded":He},wr,{"aria-haspopup":"true",title:typeof Be.title=="string"?Be.title:void 0}),Be.title,Ar||h.createElement("i",{className:"".concat(Ye,"-arrow")})),Cr=this.renderChildren(),zr=((Le=Be.parentMenu)===null||Le===void 0?void 0:Le.isRootMenu)?Be.parentMenu.props.getPopupContainer:function(fn){return fn.parentNode},Pr=cr[it],kn=Be.popupOffset?{offset:Be.popupOffset}:{},Ir=C()((we={},Object(L.a)(we,Be.popupClassName,Be.popupClassName&&!Ve),Object(L.a)(we,"".concat(Ye,"-rtl"),yr),we)),nr=Be.disabled,qt=Be.triggerSubMenuAction,Nr=Be.subMenuOpenDelay,Kr=Be.forceSubMenuRender,zt=Be.subMenuCloseDelay,Jr=Be.builtinPlacements;Z.forEach(function(fn){return delete Be[fn]}),delete Be.onClick;var Ln=yr?Object(R.a)(Object(R.a)({},on),Jr):Object(R.a)(Object(R.a)({},Oi),Jr);delete Be.direction;var nn=this.getBaseProps(),yn=Ve?null:this.getMotion(nn.mode,nn.visible);return h.createElement("li",Object(s.a)({},Be,Et,{className:ht,role:"menuitem"}),h.createElement(Fn,{prefixCls:Ye,popupClassName:C()("".concat(Ye,"-popup"),Ir),getPopupContainer:zr,builtinPlacements:Ln,popupPlacement:Pr,popupVisible:Ve?!1:He,popupAlign:kn,popup:Ve?null:Cr,action:nr||Ve?[]:[qt],mouseEnterDelay:Nr,mouseLeaveDelay:zt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Kr,popupMotion:yn},_r),Ve?Cr:null)}}]),Je}(h.Component);Mr.defaultProps={onMouseEnter:ue,onMouseLeave:ue,onTitleMouseEnter:ue,onTitleMouseLeave:ue,onTitleClick:ue,manualRef:ue,mode:"vertical",title:""};var En=Object(_.b)(function(Ne,Ge){var Je=Ne.openKeys,Fe=Ne.activeKey,ve=Ne.selectedKeys,Le=Ge.eventKey,we=Ge.subMenuKey;return{isOpen:Je.indexOf(Le)>-1,active:Fe[we]===Le,selectedKeys:ve}})(Mr);En.isSubMenu=!0;var Fr=En,xi="menuitem-overflowed",gn=.5,On=function(Ne){Object(E.a)(Je,Ne);var Ge=Object(w.a)(Je);function Je(){var Fe;return Object(M.a)(this,Je),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=h.createRef(),Fe.getMenuItemNodes=function(){var ve=Fe.props.prefixCls,Le=Fe.childRef.current;return Le?[].slice.call(Le.children).filter(function(we){return we.className.split(" ").indexOf("".concat(ve,"-overflowed-submenu"))<0}):[]},Fe.getOverflowedSubMenuItem=function(ve,Le,we){var Be=Fe.props,He=Be.overflowedIndicator,Ye=Be.level,Ve=Be.mode,it=Be.prefixCls,ht=Be.theme;if(Ye!==1||Ve!=="horizontal")return null;var Et=Fe.props.children[0],xt=Et.props,Rt=xt.children,Yt=xt.title,gr=xt.style,yr=Object(S.a)(xt,["children","title","style"]),wr=Object(R.a)({},gr),Ar="".concat(ve,"-overflowed-indicator"),_r="".concat(ve,"-overflowed-indicator");Le.length===0&&we!==!0?wr=Object(R.a)(Object(R.a)({},wr),{},{display:"none"}):we&&(wr=Object(R.a)(Object(R.a)({},wr),{},{visibility:"hidden",position:"absolute"}),Ar="".concat(Ar,"-placeholder"),_r="".concat(_r,"-placeholder"));var Cr=ht?"".concat(it,"-").concat(ht):"",zr={};return Z.forEach(function(Pr){yr[Pr]!==void 0&&(zr[Pr]=yr[Pr])}),h.createElement(Fr,Object(s.a)({title:He,className:"".concat(it,"-overflowed-submenu"),popupClassName:Cr},zr,{key:Ar,eventKey:_r,disabled:!1,style:wr}),Le)},Fe.setChildrenWidthAndResize=function(){if(Fe.props.mode!=="horizontal")return;var ve=Fe.childRef.current;if(!ve)return;var Le=ve.children;if(!Le||Le.length===0)return;var we=ve.children[Le.length-1];ge(we,"display","inline-block");var Be=Fe.getMenuItemNodes(),He=Be.filter(function(Ye){return Ye.className.split(" ").indexOf(xi)>=0});He.forEach(function(Ye){ge(Ye,"display","inline-block")}),Fe.menuItemSizes=Be.map(function(Ye){return be(Ye,!0)}),He.forEach(function(Ye){ge(Ye,"display","none")}),Fe.overflowedIndicatorWidth=be(ve.children[ve.children.length-1],!0),Fe.originalTotalWidth=Fe.menuItemSizes.reduce(function(Ye,Ve){return Ye+Ve},0),Fe.handleResize(),ge(we,"display","none")},Fe.handleResize=function(){if(Fe.props.mode!=="horizontal")return;var ve=Fe.childRef.current;if(!ve)return;var Le=be(ve);Fe.overflowedItems=[];var we=0,Be;Fe.originalTotalWidth>Le+gn&&(Be=-1,Fe.menuItemSizes.forEach(function(He){we+=He,we+Fe.overflowedIndicatorWidth<=Le&&(Be+=1)})),Fe.setState({lastVisibleIndex:Be})},Fe}return Object(A.a)(Je,[{key:"componentDidMount",value:function(){var ve=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Le=this.childRef.current;if(!Le)return;this.resizeObserver=new Qe.default(function(we){we.forEach(function(){var Be=ve.cancelFrameId;cancelAnimationFrame(Be),ve.cancelFrameId=requestAnimationFrame(ve.setChildrenWidthAndResize)})}),[].slice.call(Le.children).concat(Le).forEach(function(we){ve.resizeObserver.observe(we)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){ve.resizeObserver.disconnect(),[].slice.call(Le.children).concat(Le).forEach(function(we){ve.resizeObserver.observe(we)}),ve.setChildrenWidthAndResize()}),this.mutationObserver.observe(Le,{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(ve){var Le=this,we=this.state.lastVisibleIndex;return(ve||[]).reduce(function(Be,He,Ye){var Ve=He;if(Le.props.mode==="horizontal"){var it=Le.getOverflowedSubMenuItem(He.props.eventKey,[]);we!==void 0&&Le.props.className.indexOf("".concat(Le.props.prefixCls,"-root"))!==-1&&(Ye>we&&(Ve=h.cloneElement(He,{style:{display:"none"},eventKey:"".concat(He.props.eventKey,"-hidden"),className:"".concat(xi)})),Ye===we+1&&(Le.overflowedItems=ve.slice(we+1).map(function(Et){return h.cloneElement(Et,{key:Et.props.eventKey,mode:"vertical-left"})}),it=Le.getOverflowedSubMenuItem(He.props.eventKey,Le.overflowedItems)));var ht=[].concat(Object(i.a)(Be),[it,Ve]);return Ye===ve.length-1&&ht.push(Le.getOverflowedSubMenuItem(He.props.eventKey,[],!0)),ht}return[].concat(Object(i.a)(Be),[Ve])},[])}},{key:"render",value:function(){var ve=this.props,Le=ve.visible,we=ve.prefixCls,Be=ve.overflowedIndicator,He=ve.mode,Ye=ve.level,Ve=ve.tag,it=ve.children,ht=ve.theme,Et=Object(S.a)(ve,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),xt=Ve;return h.createElement(xt,Object(s.a)({ref:this.childRef},Et),this.renderChildren(it))}}]),Je}(h.Component);On.defaultProps={tag:"div",className:""};var ui=On;function ci(Ne){return Ne.length?Ne.every(function(Ge){return!!Ge.props.disabled}):!0}function qn(Ne,Ge,Je){var Fe=Ne.getState();Ne.setState({activeKey:Object(R.a)(Object(R.a)({},Fe.activeKey),{},Object(L.a)({},Ge,Je))})}function Ei(Ne){return Ne.eventKey||"0-menu-"}function Yn(Ne,Ge){var Je=Ge,Fe=Ne.children,ve=Ne.eventKey;if(Je){var Le;if(Q(Fe,function(we,Be){we&&we.props&&!we.props.disabled&&Je===Oe(we,ve,Be)&&(Le=!0)}),Le)return Je}return Je=null,Ne.defaultActiveFirst&&Q(Fe,function(we,Be){!Je&&we&&!we.props.disabled&&(Je=Oe(we,ve,Be))}),Je}function Ai(Ne){if(!Ne)return;var Ge=this.instanceArray.indexOf(Ne);Ge!==-1?this.instanceArray[Ge]=Ne:this.instanceArray.push(Ne)}var zn=function(Ne){Object(E.a)(Je,Ne);var Ge=Object(w.a)(Je);function Je(Fe){var ve;return Object(M.a)(this,Je),ve=Ge.call(this,Fe),ve.onKeyDown=function(Le,we){var Be=Le.keyCode,He;if(ve.getFlatInstanceArray().forEach(function(Ve){Ve&&Ve.props.active&&Ve.onKeyDown&&(He=Ve.onKeyDown(Le))}),He)return 1;var Ye=null;return(Be===v.a.UP||Be===v.a.DOWN)&&(Ye=ve.step(Be===v.a.UP?-1:1)),Ye?(Le.preventDefault(),qn(ve.props.store,Ei(ve.props),Ye.props.eventKey),typeof we=="function"&&we(Ye),1):void 0},ve.onItemHover=function(Le){var we=Le.key,Be=Le.hover;qn(ve.props.store,Ei(ve.props),Be?we:null)},ve.onDeselect=function(Le){ve.props.onDeselect(Le)},ve.onSelect=function(Le){ve.props.onSelect(Le)},ve.onClick=function(Le){ve.props.onClick(Le)},ve.onOpenChange=function(Le){ve.props.onOpenChange(Le)},ve.onDestroy=function(Le){ve.props.onDestroy(Le)},ve.getFlatInstanceArray=function(){return ve.instanceArray},ve.step=function(Le){var we=ve.getFlatInstanceArray(),Be=ve.props.store.getState().activeKey[Ei(ve.props)],He=we.length;if(!He)return null;Le<0&&(we=we.concat().reverse());var Ye=-1;if(we.every(function(Et,xt){return Et&&Et.props.eventKey===Be?(Ye=xt,!1):!0}),!ve.props.defaultActiveFirst&&Ye!==-1&&ci(we.slice(Ye,He-1)))return;var Ve=(Ye+1)%He,it=Ve;do{var ht=we[it];if(!ht||ht.props.disabled)it=(it+1)%He;else return ht}while(it!==Ve);return null},ve.renderCommonMenuItem=function(Le,we,Be){var He=ve.props.store.getState(),Ye=Object(x.a)(ve),Ve=Ye.props,it=Oe(Le,Ve.eventKey,we),ht=Le.props;if(!ht||typeof Le.type=="string")return Le;var Et=it===He.activeKey,xt=Object(R.a)(Object(R.a)({mode:ht.mode||Ve.mode,level:Ve.level,inlineIndent:Ve.inlineIndent,renderMenuItem:ve.renderMenuItem,rootPrefixCls:Ve.prefixCls,index:we,parentMenu:Ve.parentMenu,manualRef:ht.disabled?void 0:Object(j.a)(Le.ref,Ai.bind(Object(x.a)(ve))),eventKey:it,active:!ht.disabled&&Et,multiple:Ve.multiple,onClick:function(Yt){(ht.onClick||ue)(Yt),ve.onClick(Yt)},onItemHover:ve.onItemHover,motion:Ve.motion,subMenuOpenDelay:Ve.subMenuOpenDelay,subMenuCloseDelay:Ve.subMenuCloseDelay,forceSubMenuRender:Ve.forceSubMenuRender,onOpenChange:ve.onOpenChange,onDeselect:ve.onDeselect,onSelect:ve.onSelect,builtinPlacements:Ve.builtinPlacements,itemIcon:ht.itemIcon||ve.props.itemIcon,expandIcon:ht.expandIcon||ve.props.expandIcon},Be),{},{direction:Ve.direction});return(Ve.mode==="inline"||De())&&(xt.triggerSubMenuAction="click"),h.cloneElement(Le,Object(R.a)(Object(R.a)({},xt),{},{key:it||we}))},ve.renderMenuItem=function(Le,we,Be){if(!Le)return null;var He=ve.props.store.getState(),Ye={openKeys:He.openKeys,selectedKeys:He.selectedKeys,triggerSubMenuAction:ve.props.triggerSubMenuAction,subMenuKey:Be};return ve.renderCommonMenuItem(Le,we,Ye)},Fe.store.setState({activeKey:Object(R.a)(Object(R.a)({},Fe.store.getState().activeKey),{},Object(L.a)({},Fe.eventKey,Yn(Fe,Fe.activeKey)))}),ve.instanceArray=[],ve}return Object(A.a)(Je,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(ve){return this.props.visible||ve.visible||this.props.className!==ve.className||!z()(this.props.style,ve.style)}},{key:"componentDidUpdate",value:function(ve){var Le=this.props,we="activeKey"in Le?Le.activeKey:Le.store.getState().activeKey[Ei(Le)],Be=Yn(Le,we);if(Be!==we)qn(Le.store,Ei(Le),Be);else if("activeKey"in ve){var He=Yn(ve,ve.activeKey);Be!==He&&qn(Le.store,Ei(Le),Be)}}},{key:"render",value:function(){var ve=this,Le=Object(s.a)({},this.props);this.instanceArray=[];var we=C()(Le.prefixCls,Le.className,"".concat(Le.prefixCls,"-").concat(Le.mode)),Be={className:we,role:Le.role||"menu"};Le.id&&(Be.id=Le.id),Le.focusable&&(Be.tabIndex=0,Be.onKeyDown=this.onKeyDown);var He=Le.prefixCls,Ye=Le.eventKey,Ve=Le.visible,it=Le.level,ht=Le.mode,Et=Le.overflowedIndicator,xt=Le.theme;return Z.forEach(function(Rt){return delete Le[Rt]}),delete Le.onClick,h.createElement(ui,Object(s.a)({},Le,{prefixCls:He,mode:ht,tag:"ul",level:it,theme:xt,visible:Ve,overflowedIndicator:Et},Be),Object(c.a)(Le.children).map(function(Rt,Yt){return ve.renderMenuItem(Rt,Yt,Ye||"0-menu-")}))}}]),Je}(h.Component);zn.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:ue};var fi=Object(_.b)()(zn),pi=fi,ei=P("Kwbf");function $r(Ne,Ge,Je){var Fe=Ne.prefixCls,ve=Ne.motion,Le=Ne.defaultMotions,we=Le===void 0?{}:Le,Be=Ne.openAnimation,He=Ne.openTransitionName,Ye=Ge.switchingModeFromInline;if(ve)return ve;if(Object(H.a)(Be)==="object"&&Be)Object(ei.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Be=="string")return{motionName:"".concat(Fe,"-open-").concat(Be)};if(He)return{motionName:He};var Ve=we[Je];return Ve||(Ye?null:we.other)}var $i=function(Ne){Object(E.a)(Je,Ne);var Ge=Object(w.a)(Je);function Je(Fe){var ve;Object(M.a)(this,Je),ve=Ge.call(this,Fe),ve.onSelect=function(Be){var He=Object(x.a)(ve),Ye=He.props;if(Ye.selectable){var Ve=ve.store.getState(),it=Ve.selectedKeys,ht=Be.key;Ye.multiple?it=it.concat([ht]):it=[ht],"selectedKeys"in Ye||ve.store.setState({selectedKeys:it}),Ye.onSelect(Object(R.a)(Object(R.a)({},Be),{},{selectedKeys:it}))}},ve.onClick=function(Be){var He=ve.getRealMenuMode(),Ye=Object(x.a)(ve),Ve=Ye.store,it=Ye.props.onOpenChange;He!=="inline"&&!("openKeys"in ve.props)&&(Ve.setState({openKeys:[]}),it([])),ve.props.onClick(Be)},ve.onKeyDown=function(Be,He){ve.innerMenu.getWrappedInstance().onKeyDown(Be,He)},ve.onOpenChange=function(Be){var He=Object(x.a)(ve),Ye=He.props,Ve=ve.store.getState().openKeys.concat(),it=!1,ht=function(xt){var Rt=!1;if(xt.open)Rt=Ve.indexOf(xt.key)===-1,Rt&&Ve.push(xt.key);else{var Yt=Ve.indexOf(xt.key);Rt=Yt!==-1,Rt&&Ve.splice(Yt,1)}it=it||Rt};Array.isArray(Be)?Be.forEach(ht):ht(Be),it&&("openKeys"in ve.props||ve.store.setState({openKeys:Ve}),Ye.onOpenChange(Ve))},ve.onDeselect=function(Be){var He=Object(x.a)(ve),Ye=He.props;if(Ye.selectable){var Ve=ve.store.getState().selectedKeys.concat(),it=Be.key,ht=Ve.indexOf(it);ht!==-1&&Ve.splice(ht,1),"selectedKeys"in Ye||ve.store.setState({selectedKeys:Ve}),Ye.onDeselect(Object(R.a)(Object(R.a)({},Be),{},{selectedKeys:Ve}))}},ve.onMouseEnter=function(Be){ve.restoreModeVerticalFromInline();var He=ve.props.onMouseEnter;He&&He(Be)},ve.onTransitionEnd=function(Be){var He=Be.propertyName==="width"&&Be.target===Be.currentTarget,Ye=Be.target.className,Ve=Object.prototype.toString.call(Ye)==="[object SVGAnimatedString]"?Ye.animVal:Ye,it=Be.propertyName==="font-size"&&Ve.indexOf("anticon")>=0;(He||it)&&ve.restoreModeVerticalFromInline()},ve.setInnerMenu=function(Be){ve.innerMenu=Be},ve.isRootMenu=!0;var Le=Fe.defaultSelectedKeys,we=Fe.defaultOpenKeys;return"selectedKeys"in Fe&&(Le=Fe.selectedKeys||[]),"openKeys"in Fe&&(we=Fe.openKeys||[]),ve.store=Object(_.c)({selectedKeys:Le,openKeys:we,activeKey:{"0-menu-":Yn(Fe,Fe.activeKey)}}),ve.state={switchingModeFromInline:!1,prevProps:Fe,inlineOpenKeys:[],store:ve.store},ve}return Object(A.a)(Je,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(ve){var Le=this.props,we=Le.siderCollapsed,Be=Le.inlineCollapsed,He=Le.onOpenChange;(!ve.inlineCollapsed&&Be||!ve.siderCollapsed&&we)&&He([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var ve=this.props.collapsedWidth,Le=this.store,we=this.prevOpenKeys,Be=this.getInlineCollapsed()&&(ve===0||ve==="0"||ve==="0px");Be?(this.prevOpenKeys=Le.getState().openKeys.concat(),this.store.setState({openKeys:[]})):we&&(this.store.setState({openKeys:we}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var ve=this.props.mode,Le=this.state.switchingModeFromInline,we=this.getInlineCollapsed();return Le&&we?"inline":we?"vertical":ve}},{key:"getInlineCollapsed",value:function(){var ve=this.props,Le=ve.inlineCollapsed,we=ve.siderCollapsed;return we!==void 0?we:Le}},{key:"restoreModeVerticalFromInline",value:function(){var ve=this.state.switchingModeFromInline;ve&&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 ve=Object(R.a)({},Object(N.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Le=this.getRealMenuMode();return ve.className+=" ".concat(ve.prefixCls,"-root"),ve.direction==="rtl"&&(ve.className+=" ".concat(ve.prefixCls,"-rtl")),ve=Object(R.a)(Object(R.a)({},ve),{},{mode:Le,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:$r(this.props,this.state,Le)}),delete ve.openAnimation,delete ve.openTransitionName,h.createElement(_.a,{store:this.store},h.createElement(pi,Object(s.a)({},ve,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(ve,Le){var we=Le.prevProps,Be=Le.store,He=Be.getState(),Ye={},Ve={prevProps:ve};return we.mode==="inline"&&ve.mode!=="inline"&&(Ve.switchingModeFromInline=!0),"openKeys"in ve?Ye.openKeys=ve.openKeys||[]:((ve.inlineCollapsed&&!we.inlineCollapsed||ve.siderCollapsed&&!we.siderCollapsed)&&(Ve.switchingModeFromInline=!0,Ve.inlineOpenKeys=He.openKeys,Ye.openKeys=[]),(!ve.inlineCollapsed&&we.inlineCollapsed||!ve.siderCollapsed&&we.siderCollapsed)&&(Ye.openKeys=Le.inlineOpenKeys,Ve.inlineOpenKeys=[])),Object.keys(Ye).length&&Be.setState(Ye),Ve}}]),Je}(h.Component);$i.defaultProps={selectable:!0,onClick:ue,onSelect:ue,onOpenChange:ue,onDeselect:ue,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:h.createElement("span",null,"\xB7\xB7\xB7")};var ta=$i,Ni=function(Ne){Object(E.a)(Je,Ne);var Ge=Object(w.a)(Je);function Je(){var Fe;return Object(M.a)(this,Je),Fe=Ge.apply(this,arguments),Fe.onKeyDown=function(ve){var Le=ve.keyCode;return Le===v.a.ENTER?(Fe.onClick(ve),!0):void 0},Fe.onMouseLeave=function(ve){var Le=Fe.props,we=Le.eventKey,Be=Le.onItemHover,He=Le.onMouseLeave;Be({key:we,hover:!1}),He({key:we,domEvent:ve})},Fe.onMouseEnter=function(ve){var Le=Fe.props,we=Le.eventKey,Be=Le.onItemHover,He=Le.onMouseEnter;Be({key:we,hover:!0}),He({key:we,domEvent:ve})},Fe.onClick=function(ve){var Le=Fe.props,we=Le.eventKey,Be=Le.multiple,He=Le.onClick,Ye=Le.onSelect,Ve=Le.onDeselect,it=Le.isSelected,ht={key:we,keyPath:[we],item:Object(x.a)(Fe),domEvent:ve};He(ht),Be?it?Ve(ht):Ye(ht):it||Ye(ht)},Fe.saveNode=function(ve){Fe.node=ve},Fe}return Object(A.a)(Je,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var ve=this.props;ve.onDestroy&&ve.onDestroy(ve.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 ve,Le=Object(R.a)({},this.props),we=C()(this.getPrefixCls(),Le.className,(ve={},Object(L.a)(ve,this.getActiveClassName(),!Le.disabled&&Le.active),Object(L.a)(ve,this.getSelectedClassName(),Le.isSelected),Object(L.a)(ve,this.getDisabledClassName(),Le.disabled),ve)),Be=Object(R.a)(Object(R.a)({},Le.attribute),{},{title:typeof Le.title=="string"?Le.title:void 0,className:we,role:Le.role||"menuitem","aria-disabled":Le.disabled});Le.role==="option"?Be=Object(R.a)(Object(R.a)({},Be),{},{role:"option","aria-selected":Le.isSelected}):(Le.role===null||Le.role==="none")&&(Be.role="none");var He={onClick:Le.disabled?null:this.onClick,onMouseLeave:Le.disabled?null:this.onMouseLeave,onMouseEnter:Le.disabled?null:this.onMouseEnter},Ye=Object(R.a)({},Le.style);Le.mode==="inline"&&(Le.direction==="rtl"?Ye.paddingRight=Le.inlineIndent*Le.level:Ye.paddingLeft=Le.inlineIndent*Le.level),Z.forEach(function(it){return delete Le[it]}),delete Le.direction;var Ve=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Ve=h.createElement(this.props.itemIcon,this.props)),h.createElement("li",Object(s.a)({},Object(N.a)(Le,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Be,He,{style:Ye,ref:this.saveNode}),Le.children,Ve)}}]),Je}(h.Component);Ni.isMenuItem=!0,Ni.defaultProps={onSelect:ue,onMouseEnter:ue,onMouseLeave:ue,manualRef:ue};var Ji=Object(_.b)(function(Ne,Ge){var Je=Ne.activeKey,Fe=Ne.selectedKeys,ve=Ge.eventKey,Le=Ge.subMenuKey;return{active:Je[Le]===ve,isSelected:Array.isArray(Fe)?Fe.indexOf(ve)!==-1:Fe===ve}})(Ni),Gi=Ji,Bt=function(Ne){Object(E.a)(Je,Ne);var Ge=Object(w.a)(Je);function Je(){var Fe;return Object(M.a)(this,Je),Fe=Ge.apply(this,arguments),Fe.renderInnerMenuItem=function(ve){var Le=Fe.props,we=Le.renderMenuItem,Be=Le.index;return we(ve,Be,Fe.props.subMenuKey)},Fe}return Object(A.a)(Je,[{key:"render",value:function(){var ve=Object(s.a)({},this.props),Le=ve.className,we=Le===void 0?"":Le,Be=ve.rootPrefixCls,He="".concat(Be,"-item-group-title"),Ye="".concat(Be,"-item-group-list"),Ve=ve.title,it=ve.children;return Z.forEach(function(ht){return delete ve[ht]}),delete ve.direction,h.createElement("li",Object(s.a)({},ve,{onClick:function(Et){return Et.stopPropagation()},className:"".concat(we," ").concat(Be,"-item-group")}),h.createElement("div",{className:He,title:typeof Ve=="string"?Ve:void 0},Ve),h.createElement("ul",{className:Ye},h.Children.map(it,this.renderInnerMenuItem)))}}]),Je}(h.Component);Bt.isMenuItemGroup=!0,Bt.defaultProps={disabled:!0};var ar=Bt,Kt=function(Ge){var Je=Ge.className,Fe=Ge.rootPrefixCls,ve=Ge.style;return h.createElement("li",{className:"".concat(Je," ").concat(Fe,"-item-divider"),style:ve})};Kt.defaultProps={disabled:!0,className:"",style:{}};var xr=Kt,Dr=ta,Br=P("eDIo");function Or(Ne,Ge){var Je=Ne.prefixCls,Fe=Ne.editable,ve=Ne.locale,Le=Ne.style;return!Fe||Fe.showAdd===!1?null:h.createElement("button",{ref:Ge,type:"button",className:"".concat(Je,"-nav-add"),style:Le,"aria-label":(ve==null?void 0:ve.addAriaLabel)||"Add tab",onClick:function(Be){Fe.onEdit("add",{event:Be})}},Fe.addIcon||"+")}var un=h.forwardRef(Or);function Pn(Ne,Ge){var Je=Ne.prefixCls,Fe=Ne.id,ve=Ne.tabs,Le=Ne.locale,we=Ne.mobile,Be=Ne.moreIcon,He=Be===void 0?"More":Be,Ye=Ne.moreTransitionName,Ve=Ne.style,it=Ne.className,ht=Ne.editable,Et=Ne.tabBarGutter,xt=Ne.rtl,Rt=Ne.onTabClick,Yt=Object(h.useState)(!1),gr=Object(u.a)(Yt,2),yr=gr[0],wr=gr[1],Ar=Object(h.useState)(null),_r=Object(u.a)(Ar,2),Cr=_r[0],zr=_r[1],Pr="".concat(Fe,"-more-popup"),kn="".concat(Je,"-dropdown"),Ir=Cr!==null?"".concat(Pr,"-").concat(Cr):null,nr=Le==null?void 0:Le.dropdownAriaLabel,qt=h.createElement(Dr,{onClick:function(yn){var fn=yn.key,Wn=yn.domEvent;Rt(fn,Wn),wr(!1)},id:Pr,tabIndex:-1,role:"listbox","aria-activedescendant":Ir,selectedKeys:[Cr],"aria-label":nr!==void 0?nr:"expanded dropdown"},ve.map(function(nn){return h.createElement(Gi,{key:nn.key,id:"".concat(Pr,"-").concat(nn.key),role:"option","aria-controls":Fe&&"".concat(Fe,"-panel-").concat(nn.key),disabled:nn.disabled},nn.tab)}));function Nr(nn){for(var yn=ve.filter(function(vi){return!vi.disabled}),fn=yn.findIndex(function(vi){return vi.key===Cr})||0,Wn=yn.length,ti=0;tiJr?(Kr=qt,Pr.current="x"):(Kr=Nr,Pr.current="y");var Ln=Date.now();Ln-Cr.current>100&&(zr.current=!1),(Ge(-Kr,-Kr)||zr.current)&&(nr.preventDefault(),zr.current=!0),Cr.current=Ln}var Ir=Object(h.useRef)(null);Ir.current={onTouchStart:wr,onTouchMove:Ar,onTouchEnd:_r,onWheel:kn},h.useEffect(function(){function nr(zt){Ir.current.onTouchStart(zt)}function qt(zt){Ir.current.onTouchMove(zt)}function Nr(zt){Ir.current.onTouchEnd(zt)}function Kr(zt){Ir.current.onWheel(zt)}return document.addEventListener("touchmove",qt,{passive:!1}),document.addEventListener("touchend",Nr,{passive:!1}),Ne.current.addEventListener("touchstart",nr,{passive:!1}),Ne.current.addEventListener("wheel",Kr),function(){document.removeEventListener("touchmove",qt),document.removeEventListener("touchend",Nr)}},[])}function rr(){var Ne=Object(h.useRef)(new Map);function Ge(Fe){return Ne.current.has(Fe)||Ne.current.set(Fe,h.createRef()),Ne.current.get(Fe)}function Je(Fe){Ne.current.delete(Fe)}return[Ge,Je]}function Mt(Ne,Ge){var Je=h.useRef(Ne),Fe=h.useState({}),ve=Object(u.a)(Fe,2),Le=ve[1];function we(Be){var He=typeof Be=="function"?Be(Je.current):Be;He!==Je.current&&Ge(He,Je.current),Je.current=He,Le({})}return[Je.current,we]}var pr=function(Ge){var Je=Ge.position,Fe=Ge.prefixCls,ve=Ge.extra;if(!ve)return null;var Le,we=ve;return Je==="right"&&(Le=we.right||!we.left&&we||null),Je==="left"&&(Le=we.left||null),Le?h.createElement("div",{className:"".concat(Fe,"-extra-content")},Le):null};function mr(Ne,Ge){var Je,Fe=h.useContext(Ri),ve=Fe.prefixCls,Le=Fe.tabs,we=Ne.className,Be=Ne.style,He=Ne.id,Ye=Ne.animated,Ve=Ne.activeKey,it=Ne.rtl,ht=Ne.extra,Et=Ne.editable,xt=Ne.locale,Rt=Ne.tabPosition,Yt=Ne.tabBarGutter,gr=Ne.children,yr=Ne.onTabClick,wr=Ne.onTabScroll,Ar=Object(h.useRef)(),_r=Object(h.useRef)(),Cr=Object(h.useRef)(),zr=Object(h.useRef)(),Pr=rr(),kn=Object(u.a)(Pr,2),Ir=kn[0],nr=kn[1],qt=Rt==="top"||Rt==="bottom",Nr=Mt(0,function(cn,Wr){qt&&wr&&wr({direction:cn>Wr?"left":"right"})}),Kr=Object(u.a)(Nr,2),zt=Kr[0],Jr=Kr[1],Ln=Mt(0,function(cn,Wr){!qt&&wr&&wr({direction:cn>Wr?"top":"bottom"})}),nn=Object(u.a)(Ln,2),yn=nn[0],fn=nn[1],Wn=Object(h.useState)(0),ti=Object(u.a)(Wn,2),In=ti[0],vi=ti[1],Fi=Object(h.useState)(0),wi=Object(u.a)(Fi,2),ri=wi[0],Sn=wi[1],bn=Object(h.useState)(0),Nn=Object(u.a)(bn,2),Mn=Nn[0],Bi=Nn[1],ra=Object(h.useState)(0),na=Object(u.a)(ra,2),pn=na[0],Yi=na[1],ia=Object(h.useState)(null),Cn=Object(u.a)(ia,2),dn=Cn[0],ni=Cn[1],To=Object(h.useState)(null),eo=Object(u.a)(To,2),aa=eo[0],va=eo[1],Pa=Object(h.useState)(0),to=Object(u.a)(Pa,2),Ia=to[0],Xo=to[1],Yo=Object(h.useState)(0),_o=Object(u.a)(Yo,2),ro=_o[0],no=_o[1],ya=b(new Map),ba=Object(u.a)(ya,2),$o=ba[0],Na=ba[1],Oa=g(Le,$o,In),xa="".concat(ve,"-nav-operations-hidden"),Ea=0,Wi=0;qt?it?(Ea=0,Wi=Math.max(0,In-dn)):(Ea=Math.min(0,dn-In),Wi=0):(Ea=Math.min(0,aa-ri),Wi=0);function ca(cn){return cnWi?[Wi,!1]:[cn,!0]}var oa=Object(h.useRef)(),Aa=Object(h.useState)(),da=Object(u.a)(Aa,2),ja=da[0],io=da[1];function Ua(){io(Date.now())}function ao(){window.clearTimeout(oa.current)}Vi(Ar,function(cn,Wr){var ii=!1;function Si(wa,Qi){wa(function(ka){var la=ca(ka+Qi),ai=Object(u.a)(la,2),Wa=ai[0],so=ai[1];return ii=so,Wa})}if(qt){if(dn>=In)return ii;Si(Jr,cn)}else{if(aa>=ri)return ii;Si(fn,Wr)}return ao(),Ua(),ii}),Object(h.useEffect)(function(){return ao(),ja&&(oa.current=window.setTimeout(function(){io(0)},100)),ao},[ja]);function sa(){var cn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ve,Wr=Oa.get(cn);if(!Wr)return;if(qt){var ii=zt;it?Wr.rightzt+dn&&(ii=Wr.right+Wr.width-dn):Wr.left<-zt?ii=-Wr.left:Wr.left+Wr.width>-zt+dn&&(ii=-(Wr.left+Wr.width-dn)),fn(0),Jr(ca(ii)[0])}else{var Si=yn;Wr.top<-yn?Si=-Wr.top:Wr.top+Wr.height>-yn+aa&&(Si=-(Wr.top+Wr.height-aa)),Jr(0),fn(ca(Si)[0])}}var ha=y(Oa,{width:dn,height:aa,left:zt,top:yn},{width:Mn,height:pn},{width:Ia,height:ro},Object(R.a)(Object(R.a)({},Ne),{},{tabs:Le})),Oo=Object(u.a)(ha,2),Jo=Oo[0],Qo=Oo[1],Zo=Le.map(function(cn){var Wr=cn.key;return h.createElement(n,{id:He,prefixCls:ve,key:Wr,rtl:it,tab:cn,closable:cn.closable,editable:Et,active:Wr===Ve,tabPosition:Rt,tabBarGutter:Yt,renderWrapper:gr,removeAriaLabel:xt==null?void 0:xt.removeAriaLabel,ref:Ir(Wr),onClick:function(Si){yr(Wr,Si)},onRemove:function(){nr(Wr)},onFocus:function(){sa(Wr),Ua(),it||(Ar.current.scrollLeft=0),Ar.current.scrollTop=0}})}),oo=f(function(){var cn,Wr,ii,Si,wa,Qi,ka,la,ai,Wa=((cn=Ar.current)===null||cn===void 0?void 0:cn.offsetWidth)||0,so=((Wr=Ar.current)===null||Wr===void 0?void 0:Wr.offsetHeight)||0,lo=((ii=zr.current)===null||ii===void 0?void 0:ii.offsetWidth)||0,Ti=((Si=zr.current)===null||Si===void 0?void 0:Si.offsetHeight)||0,sn=((wa=Cr.current)===null||wa===void 0?void 0:wa.offsetWidth)||0,zi=((Qi=Cr.current)===null||Qi===void 0?void 0:Qi.offsetHeight)||0;ni(Wa),va(so),Xo(lo),no(Ti);var Zi=(((ka=_r.current)===null||ka===void 0?void 0:ka.offsetWidth)||0)-lo,qi=(((la=_r.current)===null||la===void 0?void 0:la.offsetHeight)||0)-Ti;vi(Zi),Sn(qi);var uo=(ai=Cr.current)===null||ai===void 0?void 0:ai.className.includes(xa);Bi(Zi-(uo?0:sn)),Yi(qi-(uo?0:zi)),Na(function(){var Ha=new Map;return Le.forEach(function(Lo){var Mo=Lo.key,pa=Ir(Mo).current;pa&&Ha.set(Mo,{width:pa.offsetWidth,height:pa.offsetHeight,left:pa.offsetLeft,top:pa.offsetTop})}),Ha})}),qo=Le.slice(0,Jo),Ci=Le.slice(Qo+1),Gn=[].concat(Object(i.a)(qo),Object(i.a)(Ci)),mi=Object(h.useState)(),Vn=Object(u.a)(mi,2),Ra=Vn[0],es=Vn[1],Hi=Oa.get(Ve),Ao=Object(h.useRef)();function Ro(){l.a.cancel(Ao.current)}Object(h.useEffect)(function(){var cn={};return Hi&&(qt?(it?cn.right=Hi.right:cn.left=Hi.left,cn.width=Hi.width):(cn.top=Hi.top,cn.height=Hi.height)),Ro(),Ao.current=l()(function(){es(cn)}),Ro},[Hi,qt,it]),Object(h.useEffect)(function(){sa()},[Ve,Hi,Oa,qt]),Object(h.useEffect)(function(){oo()},[it,Yt,Ve,Le.map(function(cn){return cn.key}).join("_")]);var Do=!!Gn.length,fa="".concat(ve,"-nav-wrap"),Fa,Da,ko,Ba;return qt?it?(Da=zt>0,Fa=zt+dn>>7)^(M<<14|M>>>18)^M>>>3,x=i[s-2],E=(x<<15|x>>>17)^(x<<13|x>>>19)^x>>>10;i[s]=A+i[s-7]+E+i[s-16]}var w=d&g^~d&T,_=b&v^b&m^v&m,N=(b<<30|b>>>2)^(b<<19|b>>>13)^(b<<10|b>>>22),j=(d<<26|d>>>6)^(d<<21|d>>>11)^(d<<7|d>>>25),k=y+j+w+a[s]+i[s],z=N+_;y=T,T=g,g=d,d=n+k|0,n=m,m=v,v=b,b=k+z|0}f[0]=f[0]+b|0,f[1]=f[1]+v|0,f[2]=f[2]+m|0,f[3]=f[3]+n|0,f[4]=f[4]+d|0,f[5]=f[5]+g|0,f[6]=f[6]+T|0,f[7]=f[7]+y|0},_doFinalize:function(){var l=this._data,p=l.words,f=this._nDataBytes*8,b=l.sigBytes*8;return p[b>>>5]|=128<<24-b%32,p[(b+64>>>9<<4)+14]=u.floor(f/4294967296),p[(b+64>>>9<<4)+15]=f,l.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var l=o.clone.call(this);return l._hash=this._hash.clone(),l}});S.SHA256=o._createHelper(r),S.HmacSHA256=o._createHmacHelper(r)}(Math),L.SHA256})},lZu9:function(I,J,P){(function(L){L(P("VrN/"),P("1eCo"),P("8EBN"))})(function(L){"use strict";L.defineMode("markdown",function(u,S){var R=L.getMode(u,"text/html"),h=R.name=="null";function o(B){if(L.findModeByName){var W=L.findModeByName(B);W&&(B=W.mime||W.mimes[0])}var K=L.getMode(u,B);return K.name=="null"?null:K}S.highlightFormatting===void 0&&(S.highlightFormatting=!1),S.maxBlockquoteDepth===void 0&&(S.maxBlockquoteDepth=0),S.taskLists===void 0&&(S.taskLists=!1),S.strikethrough===void 0&&(S.strikethrough=!1),S.emoji===void 0&&(S.emoji=!1),S.fencedCodeBlockHighlighting===void 0&&(S.fencedCodeBlockHighlighting=!0),S.fencedCodeBlockDefaultMode===void 0&&(S.fencedCodeBlockDefaultMode="text/plain"),S.xml===void 0&&(S.xml=!0),S.tokenTypeOverrides===void 0&&(S.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 c in C)C.hasOwnProperty(c)&&S.tokenTypeOverrides[c]&&(C[c]=S.tokenTypeOverrides[c]);var a=/^([*\-_])(?:\s*\1){2,}\s*$/,i=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,r=/^\[(x| )\](?=\s)/i,l=S.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,p=/^ {0,3}(?:\={1,}|-{2,})\s*$/,f=/^[^#!\[\]*_\\<>` "'(~:]+/,b=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,v=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,n=" ";function d(B,W,K){return W.f=W.inline=K,K(B,W)}function g(B,W,K){return W.f=W.block=K,K(B,W)}function T(B){return!B||!/\S/.test(B.string)}function y(B){if(B.linkTitle=!1,B.linkHref=!1,B.linkText=!1,B.em=!1,B.strong=!1,B.strikethrough=!1,B.quote=0,B.indentedCode=!1,B.f==M){var W=h;if(!W){var K=L.innerMode(R,B.htmlState);W=K.mode.name=="xml"&&K.state.tagStart===null&&!K.state.context&&K.state.tokenize.isInText}W&&(B.f=w,B.block=s,B.htmlState=null)}return B.trailingSpace=0,B.trailingSpaceNewLine=!1,B.prevLine=B.thisLine,B.thisLine={stream:null},null}function s(B,W){var K=B.column()===W.indentation,q=T(W.prevLine.stream),re=W.indentedCode,ee=W.prevLine.hr,Ce=W.list!==!1,xe=(W.listStack[W.listStack.length-1]||0)+3;W.indentedCode=!1;var he=W.indentation;if(W.indentationDiff===null&&(W.indentationDiff=W.indentation,Ce)){for(W.list=null;he=4&&(re||W.prevLine.fencedCodeEnd||W.prevLine.header||q))return B.skipToEnd(),W.indentedCode=!0,C.code;if(B.eatSpace())return null;if(K&&W.indentation<=xe&&(de=B.match(l))&&de[1].length<=6)return W.quote=0,W.header=de[1].length,W.thisLine.header=!0,S.highlightFormatting&&(W.formatting="header"),W.f=W.inline,x(W);if(W.indentation<=xe&&B.eat(">"))return W.quote=K?1:W.quote+1,S.highlightFormatting&&(W.formatting="quote"),B.eatSpace(),x(W);if(!_e&&!W.setext&&K&&W.indentation<=xe&&(de=B.match(i))){var ce=de[1]?"ol":"ul";return W.indentation=he+B.current().length,W.list=!0,W.quote=0,W.listStack.push(W.indentation),W.em=!1,W.strong=!1,W.code=!1,W.strikethrough=!1,S.taskLists&&B.match(r,!1)&&(W.taskList=!0),W.f=W.inline,S.highlightFormatting&&(W.formatting=["list","list-"+ce]),x(W)}else{if(K&&W.indentation<=xe&&(de=B.match(b,!0)))return W.quote=0,W.fencedEndRE=new RegExp(de[1]+"+ *$"),W.localMode=S.fencedCodeBlockHighlighting&&o(de[2]||S.fencedCodeBlockDefaultMode),W.localMode&&(W.localState=L.startState(W.localMode)),W.f=W.block=A,S.highlightFormatting&&(W.formatting="code-block"),W.code=-1,x(W);if(W.setext||(!ke||!Ce)&&!W.quote&&W.list===!1&&!W.code&&!_e&&!v.test(B.string)&&(de=B.lookAhead(1))&&(de=de.match(p)))return W.setext?(W.header=W.setext,W.setext=0,B.skipToEnd(),S.highlightFormatting&&(W.formatting="header")):(W.header=de[0].charAt(0)=="="?1:2,W.setext=W.header),W.thisLine.header=!0,W.f=W.inline,x(W);if(_e)return B.skipToEnd(),W.hr=!0,W.thisLine.hr=!0,C.hr;if(B.peek()==="[")return d(B,W,z)}return d(B,W,W.inline)}function M(B,W){var K=R.token(B,W.htmlState);if(!h){var q=L.innerMode(R,W.htmlState);(q.mode.name=="xml"&&q.state.tagStart===null&&!q.state.context&&q.state.tokenize.isInText||W.md_inside&&B.current().indexOf(">")>-1)&&(W.f=w,W.block=s,W.htmlState=null)}return K}function A(B,W){var K=W.listStack[W.listStack.length-1]||0,q=W.indentation=B.quote?W.push(C.formatting+"-"+B.formatting[K]+"-"+B.quote):W.push("error"))}if(B.taskOpen)return W.push("meta"),W.length?W.join(" "):null;if(B.taskClosed)return W.push("property"),W.length?W.join(" "):null;if(B.linkHref?W.push(C.linkHref,"url"):(B.strong&&W.push(C.strong),B.em&&W.push(C.em),B.strikethrough&&W.push(C.strikethrough),B.emoji&&W.push(C.emoji),B.linkText&&W.push(C.linkText),B.code&&W.push(C.code),B.image&&W.push(C.image),B.imageAltText&&W.push(C.imageAltText,"link"),B.imageMarker&&W.push(C.imageMarker)),B.header&&W.push(C.header,C.header+"-"+B.header),B.quote&&(W.push(C.quote),!S.maxBlockquoteDepth||S.maxBlockquoteDepth>=B.quote?W.push(C.quote+"-"+B.quote):W.push(C.quote+"-"+S.maxBlockquoteDepth)),B.list!==!1){var q=(B.listStack.length-1)%3;q?q===1?W.push(C.list2):W.push(C.list3):W.push(C.list1)}return B.trailingSpaceNewLine?W.push("trailing-space-new-line"):B.trailingSpace&&W.push("trailing-space-"+(B.trailingSpace%2?"a":"b")),W.length?W.join(" "):null}function E(B,W){return B.match(f,!0)?x(W):void 0}function w(B,W){var K=W.text(B,W);if(typeof K!="undefined")return K;if(W.list)return W.list=null,x(W);if(W.taskList){var q=B.match(r,!0)[1]===" ";return q?W.taskOpen=!0:W.taskClosed=!0,S.highlightFormatting&&(W.formatting="task"),W.taskList=!1,x(W)}if(W.taskOpen=!1,W.taskClosed=!1,W.header&&B.match(/^#+$/,!0))return S.highlightFormatting&&(W.formatting="header"),x(W);var re=B.next();if(W.linkTitle){W.linkTitle=!1;var ee=re;re==="("&&(ee=")"),ee=(ee+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ce="^\\s*(?:[^"+ee+"\\\\]+|\\\\\\\\|\\\\.)"+ee;if(B.match(new RegExp(Ce),!0))return C.linkHref}if(re==="`"){var xe=W.formatting;S.highlightFormatting&&(W.formatting="code"),B.eatWhile("`");var he=B.current().length;if(W.code==0&&(!W.quote||he==1))return W.code=he,x(W);if(he==W.code){var ke=x(W);return W.code=0,ke}else return W.formatting=xe,x(W)}else if(W.code)return x(W);if(re==="\\"&&(B.next(),S.highlightFormatting)){var _e=x(W),de=C.formatting+"-escape";return _e?_e+" "+de:de}if(re==="!"&&B.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return W.imageMarker=!0,W.image=!0,S.highlightFormatting&&(W.formatting="image"),x(W);if(re==="["&&W.imageMarker&&B.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return W.imageMarker=!1,W.imageAltText=!0,S.highlightFormatting&&(W.formatting="image"),x(W);if(re==="]"&&W.imageAltText){S.highlightFormatting&&(W.formatting="image");var _e=x(W);return W.imageAltText=!1,W.image=!1,W.inline=W.f=N,_e}if(re==="["&&!W.image)return W.linkText&&B.match(/^.*?\]/)||(W.linkText=!0,S.highlightFormatting&&(W.formatting="link")),x(W);if(re==="]"&&W.linkText){S.highlightFormatting&&(W.formatting="link");var _e=x(W);return W.linkText=!1,W.inline=W.f=B.match(/\(.*?\)| ?\[.*?\]/,!1)?N:w,_e}if(re==="<"&&B.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){W.f=W.inline=_,S.highlightFormatting&&(W.formatting="link");var _e=x(W);return _e?_e+=" ":_e="",_e+C.linkInline}if(re==="<"&&B.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){W.f=W.inline=_,S.highlightFormatting&&(W.formatting="link");var _e=x(W);return _e?_e+=" ":_e="",_e+C.linkEmail}if(S.xml&&re==="<"&&B.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ce=B.string.indexOf(">",B.pos);if(ce!=-1){var ae=B.string.substring(B.start,ce);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ae)&&(W.md_inside=!0)}return B.backUp(1),W.htmlState=L.startState(R),g(B,W,M)}if(S.xml&&re==="<"&&B.match(/^\/\w*?>/))return W.md_inside=!1,"tag";if(re==="*"||re==="_"){for(var Se=1,te=B.pos==1?" ":B.string.charAt(B.pos-2);Se<3&&B.eat(re);)Se++;var ue=B.peek()||" ",Oe=!/\s/.test(ue)&&(!m.test(ue)||/\s/.test(te)||m.test(te)),le=!/\s/.test(te)&&(!m.test(te)||/\s/.test(ue)||m.test(ue)),Q=null,Y=null;if(Se%2&&(!W.em&&Oe&&(re==="*"||!le||m.test(te))?Q=!0:W.em==re&&le&&(re==="*"||!Oe||m.test(ue))&&(Q=!1)),Se>1&&(!W.strong&&Oe&&(re==="*"||!le||m.test(te))?Y=!0:W.strong==re&&le&&(re==="*"||!Oe||m.test(ue))&&(Y=!1)),Y!=null||Q!=null){S.highlightFormatting&&(W.formatting=Q==null?"strong":Y==null?"em":"strong em"),Q===!0&&(W.em=re),Y===!0&&(W.strong=re);var ke=x(W);return Q===!1&&(W.em=!1),Y===!1&&(W.strong=!1),ke}}else if(re===" "&&(B.eat("*")||B.eat("_"))){if(B.peek()===" ")return x(W);B.backUp(1)}if(S.strikethrough){if(re==="~"&&B.eatWhile(re)){if(W.strikethrough){S.highlightFormatting&&(W.formatting="strikethrough");var ke=x(W);return W.strikethrough=!1,ke}else if(B.match(/^[^\s]/,!1))return W.strikethrough=!0,S.highlightFormatting&&(W.formatting="strikethrough"),x(W)}else if(re===" "&&B.match(/^~~/,!0)){if(B.peek()===" ")return x(W);B.backUp(2)}}if(S.emoji&&re===":"&&B.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){W.emoji=!0,S.highlightFormatting&&(W.formatting="emoji");var Z=x(W);return W.emoji=!1,Z}return re===" "&&(B.match(/^ +$/,!1)?W.trailingSpace++:W.trailingSpace&&(W.trailingSpaceNewLine=!0)),x(W)}function _(B,W){var K=B.next();if(K===">"){W.f=W.inline=w,S.highlightFormatting&&(W.formatting="link");var q=x(W);return q?q+=" ":q="",q+C.linkInline}return B.match(/^[^>]+/,!0),C.linkInline}function N(B,W){if(B.eatSpace())return null;var K=B.next();return K==="("||K==="["?(W.f=W.inline=k(K==="("?")":"]"),S.highlightFormatting&&(W.formatting="link-string"),W.linkHref=!0,x(W)):"error"}var j={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function k(B){return function(W,K){var q=W.next();if(q===B){K.f=K.inline=w,S.highlightFormatting&&(K.formatting="link-string");var re=x(K);return K.linkHref=!1,re}return W.match(j[B]),K.linkHref=!0,x(K)}}function z(B,W){return B.match(/^([^\]\\]|\\.)*\]:/,!1)?(W.f=H,B.next(),S.highlightFormatting&&(W.formatting="link"),W.linkText=!0,x(W)):d(B,W,w)}function H(B,W){if(B.match(/^\]:/,!0)){W.f=W.inline=F,S.highlightFormatting&&(W.formatting="link");var K=x(W);return W.linkText=!1,K}return B.match(/^([^\]\\]|\\.)+/,!0),C.linkText}function F(B,W){return B.eatSpace()?null:(B.match(/^[^\s]+/,!0),B.peek()===void 0?W.linkTitle=!0:B.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),W.f=W.inline=w,C.linkHref+" url")}var G={startState:function(){return{f:s,prevLine:{stream:null},thisLine:{stream:null},block:s,htmlState:null,indentation:0,inline:w,text:E,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(B){return{f:B.f,prevLine:B.prevLine,thisLine:B.thisLine,block:B.block,htmlState:B.htmlState&&L.copyState(R,B.htmlState),indentation:B.indentation,localMode:B.localMode,localState:B.localMode?L.copyState(B.localMode,B.localState):null,inline:B.inline,text:B.text,formatting:!1,linkText:B.linkText,linkTitle:B.linkTitle,linkHref:B.linkHref,code:B.code,em:B.em,strong:B.strong,strikethrough:B.strikethrough,emoji:B.emoji,header:B.header,setext:B.setext,hr:B.hr,taskList:B.taskList,list:B.list,listStack:B.listStack.slice(0),quote:B.quote,indentedCode:B.indentedCode,trailingSpace:B.trailingSpace,trailingSpaceNewLine:B.trailingSpaceNewLine,md_inside:B.md_inside,fencedEndRE:B.fencedEndRE}},token:function(B,W){if(W.formatting=!1,B!=W.thisLine.stream){if(W.header=0,W.hr=!1,B.match(/^\s*$/,!0))return y(W),null;if(W.prevLine=W.thisLine,W.thisLine={stream:B},W.taskList=!1,W.trailingSpace=0,W.trailingSpaceNewLine=!1,!W.localState&&(W.f=W.block,W.f!=M)){var K=B.match(/^\s*/,!0)[0].replace(/\t/g,n).length;if(W.indentation=K,W.indentationDiff=null,K>0)return null}}return W.f(B,W)},innerMode:function(B){return B.block==M?{state:B.htmlState,mode:R}:B.localState?{state:B.localState,mode:B.localMode}:{state:B,mode:G}},indent:function(B,W,K){return B.block==M&&R.indent?R.indent(B.htmlState,W,K):B.localState&&B.localMode.indent?B.localMode.indent(B.localState,W,K):L.Pass},blankLine:y,getType:x,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return G},"xml"),L.defineMIME("text/markdown","markdown"),L.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(I){if(!0)module.exports=I();else var J})(function(){var define,module,exports;return function(){function I(J,P,L){function u(h,o){if(!P[h]){if(!J[h]){var C=typeof require=="function"&&require;if(!o&&C)return require(h,!0);if(S)return S(h,!0);var c=new Error("Cannot find module '"+h+"'");throw c.code="MODULE_NOT_FOUND",c}var a=P[h]={exports:{}};J[h][0].call(a.exports,function(i){var r=J[h][1][i];return u(r||i)},a,a.exports,I,J,P,L)}return P[h].exports}for(var S=typeof require=="function"&&require,R=0;R0&&p(N).to(k),z=this._divideParts(E,w),H=z.length,F=!1,G=function(ke,_e){var de=this;return new h.default(function(ae,Se){var te,ue,Oe,le;return C.default.async(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(Y.prev=0,ke.isCancel()){Y.next=18;break}return te=z[_e-1],ue={stream:ke._createStream(x,te.start,te.end),size:te.end-te.start},Y.next=6,C.default.awrap(ke._uploadPart(j,_,_e,ue));case 6:if(Oe=Y.sent,!(!ke.isCancel()&&!F)){Y.next=15;break}if(s.doneParts.push({number:_e,etag:Oe.res.headers.etag}),!M.progress){Y.next=12;break}return Y.next=12,C.default.awrap(M.progress(N.length/H,s,Oe.res));case 12:ae({number:_e,etag:Oe.res.headers.etag}),Y.next=16;break;case 15:ae();case 16:Y.next=19;break;case 18:ae();case 19:Y.next=30;break;case 21:Y.prev=21,Y.t0=Y.catch(0),le=new Error,le.name=Y.t0.name,le.message=Y.t0.message,le.stack=Y.t0.stack,le.partNum=_e,p(Y.t0).to(le),Se(le);case 30:case"end":return Y.stop()}},null,de,[[0,21]])})},B=(0,S.default)(new Array(H),function(he,ke){return ke+1}),W=k.map(function(he){return he.number}),K=B.filter(function(he){return W.indexOf(he)<0}),q=5,re=M.parallel||q,xe.next=17,C.default.awrap(this._parallel(K,re,function(he){return new h.default(function(ke,_e){G(A,he).then(function(de){de&&k.push(de),ke()}).catch(function(de){_e(de)})})}));case 17:if(ee=xe.sent,F=!0,!this.isCancel()){xe.next=22;break}throw G=null,this._makeCancelEvent();case 22:if(!(ee&&ee.length>0)){xe.next=25;break}throw ee[0].message="Failed to upload some parts with error: "+ee[0].toString()+" part_num: "+ee[0].partNum,ee[0];case 25:return xe.next=27,C.default.awrap(this.completeMultipartUpload(j,_,k,M));case 27:return xe.abrupt("return",xe.sent);case 28:case"end":return xe.stop()}},null,this)},n._getFileSize=function(s){return C.default.async(function(A){for(;;)switch(A.prev=A.next){case 0:if(!a.buffer(s)){A.next=4;break}return A.abrupt("return",s.length);case 4:if(!(b(s)||m(s))){A.next=6;break}return A.abrupt("return",s.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return A.stop()}},null,this)};var d=I("stream"),g=d.Readable;function T(y,s){if(!(this instanceof T))return new T(y,s);g.call(this,s),this.file=y,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}i.inherits(T,g),T.prototype.readFileAndPush=function(s){if(this.fileBuffer)for(var M=!0;M&&this.fileBuffer&&this.startthis.fileBuffer.length?this.fileBuffer.length:x,this.start=x,M=this.push(this.fileBuffer.slice(A,x))}},T.prototype._read=function(s){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 M=16*1024;s=s||M;var A=this;this.reader.onload=function(E){A.fileBuffer=L.from(new Uint8Array(E.target.result)),A.file=null,A.readFileAndPush(s)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(s)},n._createStream=function(s,M,A){if(b(s)||m(s))return new T(s.slice(M,A));throw new Error("_createStream requires File/Blob.")},n._getPartSize=function(s,M){var A=10*1e3,x=1024*1024;return M?Math.max(Math.ceil(s/A),M):x},n._divideParts=function(s,M){for(var A=Math.ceil(s/M),x=[],E=0;E255)throw new Error("ID is composed of 255 bytes at most");if(s.prefix===""||s.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(s.status))throw new Error("Status must be Enabled or Disabled");if(s.transition){if(!["IA","Archive"].includes(s.transition.storageClass))throw new Error("StorageClass must be IA or Archive");g(s.transition,"Transition")}if(s.expiration){if(!s.expiration.expiredObjectDeleteMarker)g(s.expiration,"Expiration");else if(s.expiration.days||s.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(s.abortMultipartUpload&&g(s.abortMultipartUpload,"AbortMultipartUpload"),!s.expiration&&!s.abortMultipartUpload&&!s.transition&&!s.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(s.tag){if(s.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");T(s.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(I,J,P){"use strict";var L=I("babel-runtime/regenerator"),u=S(L);function S(a){return a&&a.__esModule?a:{default:a}}var R=I("../utils/checkBucketName"),h=R.checkBucketName,o=I("../utils/obj2xml"),C=o.obj2xml,c=P;c.putBucketVersioning=function(i,r){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p,f,b;return u.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:if(h(i),["Enabled","Suspended"].includes(r)){m.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return p=this._bucketRequestParams("PUT",i,"versioning",l),f={VersioningConfiguration:{Status:r}},p.mime="xml",p.content=C(f,{headers:!0}),m.next=9,u.default.awrap(this.request(p));case 9:return b=m.sent,m.abrupt("return",{res:b.res,status:b.status});case 11:case"end":return m.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(I,J,P){"use strict";var L=I("babel-runtime/regenerator"),u=S(L);function S(r){return r&&r.__esModule?r:{default:r}}var R=I("../utils/checkBucketName"),h=R.checkBucketName,o=I("../utils/obj2xml"),C=o.obj2xml,c=I("../utils/isArray"),a=c.isArray,i=P;i.putBucketWebsite=function(l){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=arguments[2],b,v,m,n,d;return u.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:if(h(l),b=this._bucketRequestParams("PUT",l,"website",f),v={Suffix:p.index||"index.html"},m={IndexDocument:v},n={WebsiteConfiguration:m},p.supportSubDir&&(v.SupportSubDir=p.supportSubDir),p.type&&(v.Type=p.type),p.error&&(m.ErrorDocument={Key:p.error}),!(p.routingRules!==void 0)){T.next=12;break}if(a(p.routingRules)){T.next=11;break}throw new Error("RoutingRules must be Array");case 11:m.RoutingRules={RoutingRule:p.routingRules};case 12:return n=C(n),b.content=n,b.mime="xml",b.successStatuses=[200],T.next=18,u.default.awrap(this.request(b));case 18:return d=T.sent,T.abrupt("return",{res:d.res});case 20:case"end":return T.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(I,J,P){(function(L){"use strict";var u=I("babel-runtime/core-js/object/keys"),S=o(u),R=I("babel-runtime/core-js/json/stringify"),h=o(R);function o(C){return C&&C.__esModule?C:{default:C}}P.encodeCallback=function(c,a){if(c.headers=c.headers||{},!Object.prototype.hasOwnProperty.call(c.headers,"x-oss-callback")&&a.callback){var i={callbackUrl:encodeURI(a.callback.url),callbackBody:a.callback.body};a.callback.host&&(i.callbackHost=a.callback.host),a.callback.contentType&&(i.callbackBodyType=a.callback.contentType);var r=L.from((0,h.default)(i)).toString("base64");if(c.headers["x-oss-callback"]=r,a.callback.customValue){var l={};(0,S.default)(a.callback.customValue).forEach(function(p){l["x:"+p]=a.callback.customValue[p]}),c.headers["x-oss-callback-var"]=L.from((0,h.default)(l)).toString("base64")}}}}).call(this,I("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(I,J,P){"use strict";var L=I("babel-runtime/core-js/object/assign"),u=S(L);function S(i){return i&&i.__esModule?i:{default:i}}var R=I("humanize-ms"),h=I("url"),o=I("../utils/checkBucketName"),C=o.checkBucketName;function c(i,r){var l=h.parse(i);if(l.protocol||(l=h.parse("http"+(r?"s":"")+"://"+i)),l.protocol!=="http:"&&l.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return l}function a(i,r,l){var p=l?"https://":"http://",f=r?"-internal.aliyuncs.com":".aliyuncs.com",b="vpc100-oss-cn-";return i.substr(0,b.length)===b&&(f=".aliyuncs.com"),h.parse(p+i+f)}J.exports=function(i){if(!i||!i.accessKeyId||!i.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");i.bucket&&C(i.bucket);var r=(0,u.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},i);if(r.accessKeyId=r.accessKeyId.trim(),r.accessKeySecret=r.accessKeySecret.trim(),r.timeout&&(r.timeout=R(r.timeout)),r.endpoint)r.endpoint=c(r.endpoint,r.secure);else if(r.region)r.endpoint=a(r.region,r.internal,r.secure);else throw new Error("require options.endpoint or options.region");return r.inited=!0,r}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(I,J,P){"use strict";var L=I("merge-descriptors"),u=P;L(u,I("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(I,J,P){"use strict";var L=I("babel-runtime/regenerator"),u=S(L);function S(r){return r&&r.__esModule?r:{default:r}}var R=I("../utils/checkBucketName"),h=R.checkBucketName,o=I("querystring"),C=I("js-base64"),c=C.Base64.encode,a=P;a.processObjectSave=function(l,p,f,b){var v,m,n,d;return u.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return i(l,"sourceObject"),i(p,"targetObject"),i(f,"process"),p=this._objectName(p),b&&h(b),v=this._objectRequestParams("POST",l,{subres:"x-oss-process"}),m=b?",b_"+c(b):"",p=c(p),n={"x-oss-process":f+"|sys/saveas,o_"+p+m},v.content=o.stringify(n),T.next=12,u.default.awrap(this.request(v));case 12:return d=T.sent,T.abrupt("return",{res:d.res,status:d.res.status});case 14:case"end":return T.stop()}},null,this)};function i(r,l){if(!r)throw new Error(l+" is required");if(typeof r!="string")throw new Error(l+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(I,J,P){"use strict";var L=I("babel-runtime/regenerator"),u=S(L);function S(a){return a&&a.__esModule?a:{default:a}}var R=I("copy-to"),h=I("./callback"),o=I("./utils/deepCopy"),C=o.deepCopy,c=P;c.listUploads=function(i,r){var l,p,f,b;return u.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return r=r||{},l={},R(r).to(l),l.subres="uploads",p=this._objectRequestParams("GET","",l),p.query=i,p.xmlResponse=!0,p.successStatuses=[200],m.next=10,u.default.awrap(this.request(p));case 10:return f=m.sent,b=f.data.Upload||[],Array.isArray(b)||(b=[b]),b=b.map(function(n){return{name:n.Key,uploadId:n.UploadId,initiated:n.Initiated}}),m.abrupt("return",{res:f.res,uploads:b,bucket:f.data.Bucket,nextKeyMarker:f.data.NextKeyMarker,nextUploadIdMarker:f.data.NextUploadIdMarker,isTruncated:f.data.IsTruncated==="true"});case 15:case"end":return m.stop()}},null,this)},c.listParts=function(i,r,l,p){var f,b,v;return u.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return p=p||{},f={},R(p).to(f),f.subres={uploadId:r},b=this._objectRequestParams("GET",i,f),b.query=l,b.xmlResponse=!0,b.successStatuses=[200],n.next=10,u.default.awrap(this.request(b));case 10:return v=n.sent,n.abrupt("return",{res:v.res,uploadId:v.data.UploadId,bucket:v.data.Bucket,name:v.data.Key,partNumberMarker:v.data.PartNumberMarker,nextPartNumberMarker:v.data.NextPartNumberMarker,maxParts:v.data.MaxParts,isTruncated:v.data.IsTruncated,parts:v.data.Part||[]});case 12:case"end":return n.stop()}},null,this)},c.abortMultipartUpload=function(i,r,l){var p,f,b;return u.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return this._stop(),l=l||{},p={},R(l).to(p),p.subres={uploadId:r},f=this._objectRequestParams("DELETE",i,p),f.successStatuses=[204],m.next=9,u.default.awrap(this.request(f));case 9:return b=m.sent,m.abrupt("return",{res:b.res});case 11:case"end":return m.stop()}},null,this)},c.initMultipartUpload=function(i,r){var l,p,f;return u.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return r=r||{},l={},R(r).to(l),l.headers=l.headers||{},this._convertMetaToHeaders(r.meta,l.headers),l.subres="uploads",p=this._objectRequestParams("POST",i,l),p.mime=r.mime,p.xmlResponse=!0,p.successStatuses=[200],v.next=12,u.default.awrap(this.request(p));case 12:return f=v.sent,v.abrupt("return",{res:f.res,bucket:f.data.Bucket,name:f.data.Key,uploadId:f.data.UploadId});case 14:case"end":return v.stop()}},null,this)},c.uploadPart=function(i,r,l,p,f,b,v){var m;return u.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return m={stream:this._createStream(p,f,b),size:b-f},d.next=3,u.default.awrap(this._uploadPart(i,r,l,m,v));case 3:return d.abrupt("return",d.sent);case 4:case"end":return d.stop()}},null,this)},c.completeMultipartUpload=function(i,r,l,p){var f,b,v,m,n,d,g,T;return u.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:for(f=l.concat().sort(function(M,A){return M.number-A.number}).filter(function(M,A,x){return!A||M.number!==x[A-1].number}),b=` `,v=0;v `,b+=""+m.number+` `,b+=""+m.etag+` `,b+=` `;return b+="",p=p||{},n={},n=C(p),n.headers&&delete n.headers["x-oss-server-side-encryption"],n.subres={uploadId:r},d=this._objectRequestParams("POST",i,n),h.encodeCallback(d,n),d.mime="xml",d.content=b,d.headers&&d.headers["x-oss-callback"]||(d.xmlResponse=!0),d.successStatuses=[200],s.next=17,u.default.awrap(this.request(d));case 17:return g=s.sent,T={res:g.res,bucket:d.bucket,name:i,etag:g.res.headers.etag},d.headers&&d.headers["x-oss-callback"]&&(T.data=JSON.parse(g.data.toString())),s.abrupt("return",T);case 21:case"end":return s.stop()}},null,this)},c._uploadPart=function(i,r,l,p,f){var b,v,m;return u.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return f=f||{},b={},R(f).to(b),b.headers={"Content-Length":p.size},b.subres={partNumber:l,uploadId:r},v=this._objectRequestParams("PUT",i,b),v.mime=b.mime,v.stream=p.stream,v.successStatuses=[200],d.next=11,u.default.awrap(this.request(v));case 11:if(m=d.sent,m.res.headers.etag){d.next=14;break}throw new Error(`Please set the etag of expose-headers in OSS https://help.aliyun.com/document_detail/32069.html`);case 14:return p.stream=null,v.stream=null,d.abrupt("return",{name:i,etag:m.res.headers.etag,res:m.res});case 17:case"end":return d.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(I,J,P){"use strict";var L=I("babel-runtime/regenerator"),u=C(L),S=I("babel-runtime/core-js/object/keys"),R=C(S),h=I("babel-runtime/helpers/typeof"),o=C(h);function C(r){return r&&r.__esModule?r:{default:r}}var c=I("../utils/checkBucketName"),a=c.checkBucketName,i=P;i.copy=function(l,p,f,b){var v,m,n;return u.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return(typeof f=="undefined"?"undefined":(0,o.default)(f))==="object"&&(b=f),b=b||{},b.headers=b.headers||{},(0,R.default)(b.headers).forEach(function(T){b.headers["x-oss-copy-source-"+T.toLowerCase()]=b.headers[T]}),b.meta&&(b.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(b.meta,b.headers),p=this._getSourceName(p,f),b.versionId&&(p=p+"?versionId="+b.versionId),b.headers["x-oss-copy-source"]=p,v=this._objectRequestParams("PUT",l,b),v.xmlResponse=!0,v.successStatuses=[200,304],g.next=14,u.default.awrap(this.request(v));case 14:return m=g.sent,n=m.data,n&&(n={etag:n.ETag,lastModified:n.LastModified}),g.abrupt("return",{data:n,res:m.res});case 18:case"end":return g.stop()}},null,this)},i._getSourceName=function(l,p){return typeof p=="string"?l=this._objectName(l):l[0]!=="/"?p=this.options.bucket:(p=l.replace(/\/(.+?)(\/.*)/,"$1"),l=l.replace(/(\/.+?\/)(.*)/,"$2")),a(p),l=encodeURI(l),l="/"+p+"/"+l,l}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(I,J,P){"use strict";var L=I("babel-runtime/regenerator"),u=h(L),S=I("babel-runtime/core-js/object/assign"),R=h(S);function h(C){return C&&C.__esModule?C:{default:C}}var o=P;o.delete=function(c){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r;return u.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return a.subres=(0,R.default)({},a.subres),a.versionId&&(a.subres.versionId=a.versionId),i=this._objectRequestParams("DELETE",c,a),i.successStatuses=[204],p.next=6,u.default.awrap(this.request(i));case 6:return r=p.sent,p.abrupt("return",{res:r.res});case 8:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(I,J,P){"use strict";var L=I("babel-runtime/regenerator"),u=h(L),S=I("babel-runtime/core-js/object/assign"),R=h(S);function h(i){return i&&i.__esModule?i:{default:i}}var o=I("utility"),C=I("../utils/obj2xml"),c=C.obj2xml,a=P;a.deleteMulti=function(r){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p,f,b,v,m,n,d,g,T,y,s,M;return u.default.async(function(x){for(;;)switch(x.prev=x.next){case 0:if(p=[],!(!r||!r.length)){x.next=3;break}throw new Error("names is required");case 3:for(f=0;f1&&arguments[1]!==void 0?arguments[1]:{},i,r;return u.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return a.subres=(0,R.default)({tagging:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),c=this._objectName(c),i=this._objectRequestParams("DELETE",c,a),i.successStatuses=[204],p.next=7,u.default.awrap(this.request(i));case 7:return r=p.sent,p.abrupt("return",{status:r.status,res:r.res});case 9:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(I,J,P){"use strict";var L=I("babel-runtime/regenerator"),u=h(L),S=I("babel-runtime/core-js/object/assign"),R=h(S);function h(a){return a&&a.__esModule?a:{default:a}}var o=I("fs"),C=I("is-type-of"),c=P;c.get=function(i,r){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p,f,b,v;return u.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return p=null,f=!1,C.writableStream(r)?p=r:C.string(r)?(p=o.createWriteStream(r),f=!0):l=r,l=l||{},l.subres=(0,R.default)({},l.subres),l.versionId&&(l.subres.versionId=l.versionId),l.process&&(l.subres["x-oss-process"]=l.process),b=void 0,n.prev=8,v=this._objectRequestParams("GET",i,l),v.writeStream=p,v.successStatuses=[200,206,304],n.next=14,u.default.awrap(this.request(v));case 14:b=n.sent,f&&p.destroy(),n.next=25;break;case 18:if(n.prev=18,n.t0=n.catch(8),!f){n.next=24;break}return p.destroy(),n.next=24,u.default.awrap(this._deleteFileSafe(r));case 24:throw n.t0;case 25:return n.abrupt("return",{res:b.res,content:b.data});case 26:case"end":return n.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(I,J,P){"use strict";var L=I("babel-runtime/regenerator"),u=h(L),S=I("babel-runtime/core-js/object/assign"),R=h(S);function h(C){return C&&C.__esModule?C:{default:C}}var o=P;o.getACL=function(c){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r;return u.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return a.subres=(0,R.default)({acl:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),c=this._objectName(c),i=this._objectRequestParams("GET",c,a),i.successStatuses=[200],i.xmlResponse=!0,p.next=8,u.default.awrap(this.request(i));case 8:return r=p.sent,p.abrupt("return",{acl:r.data.AccessControlList.Grant,owner:{id:r.data.Owner.ID,displayName:r.data.Owner.DisplayName},res:r.res});case 10:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(I,J,P){"use strict";var L=I("babel-runtime/core-js/object/keys"),u=C(L),S=I("babel-runtime/regenerator"),R=C(S),h=I("babel-runtime/core-js/object/assign"),o=C(h);function C(v){return v&&v.__esModule?v:{default:v}}var c=P,a=I("../utils/isObject"),i=a.isObject,r=I("../utils/isArray"),l=r.isArray;c.getBucketVersions=p,c.listObjectVersions=p;function p(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,d,g,T,y,s;return R.default.async(function(A){for(;;)switch(A.prev=A.next){case 0:if(!(v.versionIdMarker&&v.keyMarker===void 0)){A.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return m.subres=(0,o.default)({versions:""},m.subres),m.versionId&&(m.subres.versionId=m.versionId),n=this._objectRequestParams("GET","",m),n.xmlResponse=!0,n.successStatuses=[200],n.query=b(v),A.next=10,R.default.awrap(this.request(n));case 10:return d=A.sent,g=d.data.Version||[],T=d.data.DeleteMarker||[],y=this,g&&(Array.isArray(g)||(g=[g]),g=g.map(function(x){return{name:x.Key,url:y._objectUrl(x.Key),lastModified:x.LastModified,isLatest:x.IsLatest==="true",versionId:x.VersionId,etag:x.ETag,type:x.Type,size:Number(x.Size),storageClass:x.StorageClass,owner:{id:x.Owner.ID,displayName:x.Owner.DisplayName}}})),T&&(l(T)||(T=[T]),T=T.map(function(x){return{name:x.Key,lastModified:x.LastModified,versionId:x.VersionId,owner:{id:x.Owner.ID,displayName:x.Owner.DisplayName}}})),s=d.data.CommonPrefixes||null,s&&(l(s)||(s=[s]),s=s.map(function(x){return x.Prefix})),A.abrupt("return",{res:d.res,objects:g,deleteMarker:T,prefixes:s,nextMarker:d.data.NextMarker||null,NextVersionIdMarker:d.data.NextVersionIdMarker||null,isTruncated:d.data.IsTruncated==="true"});case 19:case"end":return A.stop()}},null,this)}function f(v){return v.replace(/([A-Z])/g,"-$1").toLowerCase()}function b(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m={};return i(v)&&(0,u.default)(v).forEach(function(n){m[f(n)]=v[n]}),m}},{"../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(I,J,P){"use strict";var L=I("babel-runtime/regenerator"),u=h(L),S=I("babel-runtime/core-js/object/assign"),R=h(S);function h(C){return C&&C.__esModule?C:{default:C}}var o=P;o.getObjectMeta=function(c,a){var i,r;return u.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return a=a||{},c=this._objectName(c),a.subres=(0,R.default)({objectMeta:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),i=this._objectRequestParams("HEAD",c,a),i.successStatuses=[200],p.next=8,u.default.awrap(this.request(i));case 8:return r=p.sent,p.abrupt("return",{status:r.status,res:r.res});case 10:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(I,J,P){"use strict";var L=I("babel-runtime/regenerator"),u=h(L),S=I("babel-runtime/core-js/object/assign"),R=h(S);function h(a){return a&&a.__esModule?a:{default:a}}var o=P,C=I("../utils/isObject"),c=C.isObject;o.getObjectTagging=function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,p,f,b,v;return u.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return r.subres=(0,R.default)({tagging:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),i=this._objectName(i),l=this._objectRequestParams("GET",i,r),l.successStatuses=[200],n.next=7,u.default.awrap(this.request(l));case 7:return p=n.sent,n.next=10,u.default.awrap(this.parseXML(p.data));case 10:return f=n.sent,b=f.TagSet.Tag,b=b&&c(b)?[b]:b||[],v={},b.forEach(function(d){v[d.Key]=d.Value}),n.abrupt("return",{status:p.status,res:p.res,tag:v});case 16:case"end":return n.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(I,J,P){"use strict";var L=I("babel-runtime/regenerator"),u=h(L),S=I("babel-runtime/core-js/object/assign"),R=h(S);function h(C){return C&&C.__esModule?C:{default:C}}var o=P;o.getSymlink=function(c){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r,l;return u.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return a.subres=(0,R.default)({symlink:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),c=this._objectName(c),i=this._objectRequestParams("GET",c,a),i.successStatuses=[200],f.next=7,u.default.awrap(this.request(i));case 7:return r=f.sent,l=r.res.headers["x-oss-symlink-target"],f.abrupt("return",{targetName:decodeURIComponent(l),res:r.res});case 10:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(I,J,P){"use strict";var L=I("babel-runtime/regenerator"),u=C(L),S=I("babel-runtime/core-js/object/keys"),R=C(S),h=I("babel-runtime/core-js/object/assign"),o=C(h);function C(a){return a&&a.__esModule?a:{default:a}}var c=P;c.head=function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,p,f;return u.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return r.subres=(0,o.default)({},r.subres),r.versionId&&(r.subres.versionId=r.versionId),l=this._objectRequestParams("HEAD",i,r),l.successStatuses=[200,304],v.next=6,u.default.awrap(this.request(l));case 6:return p=v.sent,f={meta:null,res:p.res,status:p.status},p.status===200&&(0,R.default)(p.headers).forEach(function(m){m.indexOf("x-oss-meta-")===0&&(f.meta||(f.meta={}),f.meta[m.substring(11)]=p.headers[m])}),v.abrupt("return",f);case 10:case"end":return v.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(I,J,P){"use strict";var L=I("babel-runtime/regenerator"),u=h(L),S=I("babel-runtime/core-js/object/assign"),R=h(S);function h(C){return C&&C.__esModule?C:{default:C}}var o=P;o.putACL=function(c,a,i){var r,l;return u.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return i=i||{},i.subres=(0,R.default)({acl:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),i.headers=i.headers||{},i.headers["x-oss-object-acl"]=a,c=this._objectName(c),r=this._objectRequestParams("PUT",c,i),r.successStatuses=[200],f.next=10,u.default.awrap(this.request(r));case 10:return l=f.sent,f.abrupt("return",{res:l.res});case 12:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(I,J,P){"use strict";var L=I("babel-runtime/regenerator"),u=C(L),S=I("babel-runtime/core-js/object/keys"),R=C(S),h=I("babel-runtime/core-js/object/assign"),o=C(h);function C(p){return p&&p.__esModule?p:{default:p}}var c=I("../utils/obj2xml"),a=c.obj2xml,i=I("../utils/checkObjectTag"),r=i.checkObjectTag,l=P;l.putObjectTagging=function(f,b){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},m,n,d;return u.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return r(b),v.subres=(0,o.default)({tagging:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),f=this._objectName(f),m=this._objectRequestParams("PUT",f,v),m.successStatuses=[200],b=(0,R.default)(b).map(function(y){return{Key:y,Value:b[y]}}),n={Tagging:{TagSet:{Tag:b}}},m.mime="xml",m.content=a(n),T.next=12,u.default.awrap(this.request(m));case 12:return d=T.sent,T.abrupt("return",{res:d.res,status:d.status});case 14:case"end":return T.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(I,J,P){"use strict";var L=I("babel-runtime/regenerator"),u=h(L),S=I("babel-runtime/core-js/object/assign"),R=h(S);function h(C){return C&&C.__esModule?C:{default:C}}var o=P;o.putSymlink=function(c,a,i){var r,l;return u.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return i=i||{},i.headers=i.headers||{},a=this._escape(this._objectName(a)),this._convertMetaToHeaders(i.meta,i.headers),i.headers["x-oss-symlink-target"]=a,i.subres=(0,R.default)({symlink:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),i.storageClass&&(i.headers["x-oss-storage-class"]=i.storageClass),c=this._objectName(c),r=this._objectRequestParams("PUT",c,i),r.successStatuses=[200],f.next=13,u.default.awrap(this.request(r));case 13:return l=f.sent,f.abrupt("return",{res:l.res});case 15:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(I,J,P){"use strict";var L=I("babel-runtime/regenerator"),u=h(L),S=I("babel-runtime/core-js/promise"),R=h(S);function h(C){return C&&C.__esModule?C:{default:C}}var o=P;o._parallelNode=function(c,a,i,r){var l,p,f,b,v,m,n,d;return u.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:l=this,p=[],f=[],b=c.length/a,v=c.length%a,m=v===0?b:(c.length-v)/a+1,n=1,d=0;case 8:if(!(d0){m=!0,n<=0&&l(p);return}n+=1,T(s.value,f(g))}d=!1}y()})},o.cancel=function(c){this.options.cancelFlag=!0,c&&this.abortMultipartUpload(c.name,c.uploadId,c.options)},o.isCancel=function(){return this.options.cancelFlag},o.resetCancelFlag=function(){this.options.cancelFlag=!1},o._stop=function(){this.options.cancelFlag=!0},o._makeCancelEvent=function(){var c={status:0,name:"cancel"};return c}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(I,J,P){(function(L){"use strict";var u=I("babel-runtime/core-js/json/stringify"),S=o(u),R=I("babel-runtime/core-js/object/keys"),h=o(R);function o(a){return a&&a.__esModule?a:{default:a}}var C=I("./../../shims/crypto/crypto.js"),c=I("is-type-of");P.buildCanonicalizedResource=function(i,r){var l=""+i,p="?";if(c.string(r)&&r.trim()!=="")l+=p+r;else if(c.array(r))r.sort(),l+=p+r.join("&");else if(r){var f=function(m,n){return m[0]>n[0]?1:m[0]1&&arguments[1]!==void 0?arguments[1]:{},l=arguments[2],p=arguments[3],f={},b=r.subResource,v=b===void 0?{}:b;if(r.process){var m="x-oss-process";v[m]=r.process}if(r.trafficLimit){var n="x-oss-traffic-limit";v[n]=r.trafficLimit}if(r.response&&(0,h.default)(r.response).forEach(function(y){var s="response-"+y.toLowerCase();v[s]=r.response[y]}),(0,h.default)(r).forEach(function(y){var s=y.toLowerCase(),M=r[y];s.indexOf("x-oss-")===0?f[s]=M:(s.indexOf("content-md5")===0||s.indexOf("content-type")===0)&&(f[y]=M)}),Object.prototype.hasOwnProperty.call(r,"security-token")&&(v["security-token"]=r["security-token"]),Object.prototype.hasOwnProperty.call(r,"callback")){var d={callbackUrl:encodeURI(r.callback.url),callbackBody:r.callback.body};if(r.callback.host&&(d.callbackHost=r.callback.host),r.callback.contentType&&(d.callbackBodyType=r.callback.contentType),v.callback=L.from((0,S.default)(d)).toString("base64"),r.callback.customValue){var g={};(0,h.default)(r.callback.customValue).forEach(function(y){g["x:"+y]=r.callback.customValue[y]}),v["callback-var"]=L.from((0,S.default)(g)).toString("base64")}}var T=this.buildCanonicalString(r.method,l,{headers:f,parameters:v},p.toString());return{Signature:this.computeSignature(i,T),subResource:v}}}).call(this,I("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(I,J,P){"use strict";Object.defineProperty(P,"__esModule",{value:!0}),P.checkBucketName=void 0,P.checkBucketName=function(L,u){var S=u?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!S.test(L))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(I,J,P){"use strict";var L=I("babel-runtime/core-js/object/entries"),u=S(L);function S(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(P,"__esModule",{value:!0}),P.checkObjectTag=void 0;var R=I("./checkValid"),h=R.checkValid,o=I("./isObject"),C=o.isObject,c=[{validator:function(l){if(typeof l!="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 (/)"}],a={key:[].concat(c,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(c,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function i(r){if(!C(r))throw new Error("tag must be Object");var l=(0,u.default)(r);if(l.length>10)throw new Error("maximum of 10 tags for a object");var p=["key","value"];l.forEach(function(f){f.forEach(function(b,v){h(b,a[p[v]])})})}P.checkObjectTag=i},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(I,J,P){"use strict";Object.defineProperty(P,"__esModule",{value:!0}),P.checkValid=void 0;function L(u,S){S.forEach(function(R){if(R.validator)R.validator(u);else if(R.pattern&&!R.pattern.test(u))throw new Error(R.msg)})}P.checkValid=L},{}],38:[function(I,J,P){(function(L){"use strict";var u=I("babel-runtime/core-js/object/assign"),S=R(u);function R(f){return f&&f.__esModule?f:{default:f}}Object.defineProperty(P,"__esModule",{value:!0}),P.createRequest=void 0;var h=I("./../../../shims/crypto/crypto.js"),o=I("debug")("ali-oss"),C=I("mime"),c=I("dateformat"),a=I("copy-to"),i=I("path");function r(f,b){return f[b]||f[b.toLowerCase()]}function l(f,b){delete f[b],delete f[b.toLowerCase()]}function p(f){var b=new Date;this.options.amendTimeSkewed&&(b=+new Date+this.options.amendTimeSkewed);var v={"x-oss-date":c(b,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(v["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,S.default)(v,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(v["x-oss-security-token"]=this.options.stsToken),a(f.headers).to(v),r(v,"Content-Type")||(f.mime&&f.mime.indexOf("/")>0?v["Content-Type"]=f.mime:v["Content-Type"]=C.getType(f.mime||i.extname(f.object||""))),r(v,"Content-Type")||l(v,"Content-Type"),f.content&&(v["Content-Md5"]=h.createHash("md5").update(L.from(f.content,"utf8")).digest("base64"),v["Content-Length"]||(v["Content-Length"]=f.content.length));var m=this._getResource(f);v.authorization=this.authorization(f.method,m,f.subres,v);var n=this._getReqUrl(f);o("request %s %s, with headers %j, !!stream: %s",f.method,n,v,!!f.stream);var d=f.timeout||this.options.timeout,g={method:f.method,content:f.content,stream:f.stream,headers:v,timeout:d,writeStream:f.writeStream,customResponse:f.customResponse,ctx:f.ctx||this.ctx};return this.agent&&(g.agent=this.agent),this.httpsAgent&&(g.httpsAgent=this.httpsAgent),{url:n,params:g}}P.createRequest=p}).call(this,I("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(I,J,P){"use strict";var L=I("babel-runtime/core-js/object/keys"),u=h(L),S=I("babel-runtime/helpers/typeof"),R=h(S);function h(o){return o&&o.__esModule?o:{default:o}}Object.defineProperty(P,"__esModule",{value:!0}),P.deepCopy=void 0,P.deepCopy=function(o){if(o===null||(typeof o=="undefined"?"undefined":(0,R.default)(o))!=="object")return o;var C=Array.isArray(o)?[]:{};return(0,u.default)(o).forEach(function(c){C[c]=P.deepCopy(o[c])}),C}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(I,J,P){"use strict";var L=I("babel-runtime/core-js/object/keys"),u=h(L),S=I("babel-runtime/helpers/typeof"),R=h(S);function h(c){return c&&c.__esModule?c:{default:c}}Object.defineProperty(P,"__esModule",{value:!0}),P.formatObjKey=void 0;function o(c,a){if(c===null||(typeof c=="undefined"?"undefined":(0,R.default)(c))!=="object")return c;var i=void 0;if(Array.isArray(c)){i=[];for(var r=0;r `),c&&c.firstUpperCase&&(C=R.formatObjKey(C,"firstUpperCase")),h(C)==="object"?(0,u.default)(C).forEach(function(i){h(C[i])==="string"||h(C[i])==="number"?a+="<"+i+">"+C[i]+"":h(C[i])==="object"?a+="<"+i+">"+o(C[i])+"":h(C[i])==="array"?a+=C[i].map(function(r){return"<"+i+">"+o(r)+""}).join(""):a+="<"+i+">"+C[i].toString()+""}):a+=C.toString(),a}P.obj2xml=o},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(I,J,P){J.exports=L,J.exports.HttpsAgent=L;function L(){}},{}],49:[function(I,J,P){J.exports=I("./register")().Promise},{"./register":51}],50:[function(I,J,P){"use strict";var L="@@any-promise/REGISTRATION",u=null;J.exports=function(S,R){return function(o,C){o=o||null,C=C||{};var c=C.global!==!1;if(u===null&&c&&(u=S[L]||null),u!==null&&o!==null&&u.implementation!==o)throw new Error('any-promise already defined as "'+u.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return u===null&&(o!==null&&typeof C.Promise!="undefined"?u={Promise:C.Promise,implementation:o}:u=R(o),c&&(S[L]=u)),u}}},{}],51:[function(I,J,P){"use strict";J.exports=I("./loader")(window,L);function L(){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(I,J,P){J.exports={default:I("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(I,J,P){J.exports={default:I("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(I,J,P){J.exports={default:I("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(I,J,P){J.exports={default:I("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(I,J,P){J.exports={default:I("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(I,J,P){J.exports={default:I("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(I,J,P){J.exports={default:I("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(I,J,P){J.exports={default:I("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(I,J,P){J.exports={default:I("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(I,J,P){J.exports={default:I("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(I,J,P){J.exports={default:I("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(I,J,P){J.exports={default:I("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(I,J,P){J.exports={default:I("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(I,J,P){J.exports={default:I("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(I,J,P){J.exports={default:I("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(I,J,P){"use strict";P.__esModule=!0;var L=I("../core-js/symbol/iterator"),u=o(L),S=I("../core-js/symbol"),R=o(S),h=typeof R.default=="function"&&typeof u.default=="symbol"?function(C){return typeof C}:function(C){return C&&typeof R.default=="function"&&C.constructor===R.default&&C!==R.default.prototype?"symbol":typeof C};function o(C){return C&&C.__esModule?C:{default:C}}P.default=typeof R.default=="function"&&h(u.default)==="symbol"?function(C){return typeof C=="undefined"?"undefined":h(C)}:function(C){return C&&typeof R.default=="function"&&C.constructor===R.default&&C!==R.default.prototype?"symbol":typeof C=="undefined"?"undefined":h(C)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(I,J,P){J.exports=I("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(I,J,P){"use strict";P.byteLength=c,P.toByteArray=i,P.fromByteArray=p;for(var L=[],u=[],S=typeof Uint8Array!="undefined"?Uint8Array:Array,R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,o=R.length;h0)throw new Error("Invalid string. Length must be a multiple of 4");var v=f.indexOf("=");v===-1&&(v=b);var m=v===b?0:4-v%4;return[v,m]}function c(f){var b=C(f),v=b[0],m=b[1];return(v+m)*3/4-m}function a(f,b,v){return(b+v)*3/4-v}function i(f){var b,v=C(f),m=v[0],n=v[1],d=new S(a(f,m,n)),g=0,T=n>0?m-4:m,y;for(y=0;y>16&255,d[g++]=b>>8&255,d[g++]=b&255;return n===2&&(b=u[f.charCodeAt(y)]<<2|u[f.charCodeAt(y+1)]>>4,d[g++]=b&255),n===1&&(b=u[f.charCodeAt(y)]<<10|u[f.charCodeAt(y+1)]<<4|u[f.charCodeAt(y+2)]>>2,d[g++]=b>>8&255,d[g++]=b&255),d}function r(f){return L[f>>18&63]+L[f>>12&63]+L[f>>6&63]+L[f&63]}function l(f,b,v){for(var m,n=[],d=b;dT?T:g+d));return m===1?(b=f[v-1],n.push(L[b>>2]+L[b<<4&63]+"==")):m===2&&(b=(f[v-2]<<8)+f[v-1],n.push(L[b>>10]+L[b>>4&63]+L[b<<2&63]+"=")),n.join("")}},{}],70:[function(I,J,P){/*! * Bowser - a browser detector * https://github.com/ded/bowser * MIT License | (c) Dustin Diaz 2015 */!function(L,u,S){typeof J!="undefined"&&J.exports?J.exports=S():typeof define=="function"&&define.amd?define(u,S):L[u]=S()}(this,"bowser",function(){var L=!0;function u(a){function i(G){var B=a.match(G);return B&&B.length>1&&B[1]||""}function r(G){var B=a.match(G);return B&&B.length>1&&B[2]||""}var l=i(/(ipod|iphone|ipad)/i).toLowerCase(),p=/like android/i.test(a),f=!p&&/android/i.test(a),b=/nexus\s*[0-6]\s*/i.test(a),v=!b&&/nexus\s*[0-9]+/i.test(a),m=/CrOS/.test(a),n=/silk/i.test(a),d=/sailfish/i.test(a),g=/tizen/i.test(a),T=/(web|hpw)(o|0)s/i.test(a),y=/windows phone/i.test(a),s=/SamsungBrowser/i.test(a),M=!y&&/windows/i.test(a),A=!l&&!n&&/macintosh/i.test(a),x=!f&&!d&&!g&&!T&&/linux/i.test(a),E=r(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),w=i(/version\/(\d+(\.\d+)?)/i),_=/tablet/i.test(a)&&!/tablet pc/i.test(a),N=!_&&/[^-]mobi/i.test(a),j=/xbox/i.test(a),k;/opera/i.test(a)?k={name:"Opera",opera:L,version:w||i(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(a)?k={name:"Opera",opera:L,version:i(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||w}:/SamsungBrowser/i.test(a)?k={name:"Samsung Internet for Android",samsungBrowser:L,version:w||i(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(a)?k={name:"NAVER Whale browser",whale:L,version:i(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(a)?k={name:"MZ Browser",mzbrowser:L,version:i(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(a)?k={name:"Opera Coast",coast:L,version:w||i(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(a)?k={name:"Focus",focus:L,version:i(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(a)?k={name:"Yandex Browser",yandexbrowser:L,version:w||i(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(a)?k={name:"UC Browser",ucbrowser:L,version:i(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(a)?k={name:"Maxthon",maxthon:L,version:i(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(a)?k={name:"Epiphany",epiphany:L,version:i(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(a)?k={name:"Puffin",puffin:L,version:i(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(a)?k={name:"Sleipnir",sleipnir:L,version:i(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(a)?k={name:"K-Meleon",kMeleon:L,version:i(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:y?(k={name:"Windows Phone",osname:"Windows Phone",windowsphone:L},E?(k.msedge=L,k.version=E):(k.msie=L,k.version=i(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(a)?k={name:"Internet Explorer",msie:L,version:i(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:m?k={name:"Chrome",osname:"Chrome OS",chromeos:L,chromeBook:L,chrome:L,version:i(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(a)?k={name:"Microsoft Edge",msedge:L,version:E}:/vivaldi/i.test(a)?k={name:"Vivaldi",vivaldi:L,version:i(/vivaldi\/(\d+(\.\d+)?)/i)||w}:d?k={name:"Sailfish",osname:"Sailfish OS",sailfish:L,version:i(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(a)?k={name:"SeaMonkey",seamonkey:L,version:i(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(a)?(k={name:"Firefox",firefox:L,version:i(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(a)&&(k.firefoxos=L,k.osname="Firefox OS")):n?k={name:"Amazon Silk",silk:L,version:i(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(a)?k={name:"PhantomJS",phantom:L,version:i(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(a)?k={name:"SlimerJS",slimer:L,version:i(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(a)||/rim\stablet/i.test(a)?k={name:"BlackBerry",osname:"BlackBerry OS",blackberry:L,version:w||i(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:T?(k={name:"WebOS",osname:"WebOS",webos:L,version:w||i(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(a)&&(k.touchpad=L)):/bada/i.test(a)?k={name:"Bada",osname:"Bada",bada:L,version:i(/dolfin\/(\d+(\.\d+)?)/i)}:g?k={name:"Tizen",osname:"Tizen",tizen:L,version:i(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||w}:/qupzilla/i.test(a)?k={name:"QupZilla",qupzilla:L,version:i(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||w}:/chromium/i.test(a)?k={name:"Chromium",chromium:L,version:i(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||w}:/chrome|crios|crmo/i.test(a)?k={name:"Chrome",chrome:L,version:i(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:f?k={name:"Android",version:w}:/safari|applewebkit/i.test(a)?(k={name:"Safari",safari:L},w&&(k.version=w)):l?(k={name:l=="iphone"?"iPhone":l=="ipad"?"iPad":"iPod"},w&&(k.version=w)):/googlebot/i.test(a)?k={name:"Googlebot",googlebot:L,version:i(/googlebot\/(\d+(\.\d+))/i)||w}:k={name:i(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!k.msedge&&/(apple)?webkit/i.test(a)?(/(apple)?webkit\/537\.36/i.test(a)?(k.name=k.name||"Blink",k.blink=L):(k.name=k.name||"Webkit",k.webkit=L),!k.version&&w&&(k.version=w)):!k.opera&&/gecko\//i.test(a)&&(k.name=k.name||"Gecko",k.gecko=L,k.version=k.version||i(/gecko\/(\d+(\.\d+)?)/i)),!k.windowsphone&&(f||k.silk)?(k.android=L,k.osname="Android"):!k.windowsphone&&l?(k[l]=L,k.ios=L,k.osname="iOS"):A?(k.mac=L,k.osname="macOS"):j?(k.xbox=L,k.osname="Xbox"):M?(k.windows=L,k.osname="Windows"):x&&(k.linux=L,k.osname="Linux");function z(G){switch(G){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 H="";k.windows?H=z(i(/Windows ((NT|XP)( \d\d?.\d)?)/i)):k.windowsphone?H=i(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):k.mac?(H=i(/Mac OS X (\d+([_\.\s]\d+)*)/i),H=H.replace(/[_\s]/g,".")):l?(H=i(/os (\d+([_\s]\d+)*) like mac os x/i),H=H.replace(/[_\s]/g,".")):f?H=i(/android[ \/-](\d+(\.\d+)*)/i):k.webos?H=i(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):k.blackberry?H=i(/rim\stablet\sos\s(\d+(\.\d+)*)/i):k.bada?H=i(/bada\/(\d+(\.\d+)*)/i):k.tizen&&(H=i(/tizen[\/\s](\d+(\.\d+)*)/i)),H&&(k.osversion=H);var F=!k.windows&&H.split(".")[0];return _||v||l=="ipad"||f&&(F==3||F>=4&&!N)||k.silk?k.tablet=L:(N||l=="iphone"||l=="ipod"||f||b||k.blackberry||k.webos||k.bada)&&(k.mobile=L),k.msedge||k.msie&&k.version>=10||k.yandexbrowser&&k.version>=15||k.vivaldi&&k.version>=1||k.chrome&&k.version>=20||k.samsungBrowser&&k.version>=4||k.whale&&o([k.version,"1.0"])===1||k.mzbrowser&&o([k.version,"6.0"])===1||k.focus&&o([k.version,"1.0"])===1||k.firefox&&k.version>=20||k.safari&&k.version>=6||k.opera&&k.version>=10||k.ios&&k.osversion&&k.osversion.split(".")[0]>=6||k.blackberry&&k.version>=10.1||k.chromium&&k.version>=20?k.a=L:k.msie&&k.version<10||k.chrome&&k.version<20||k.firefox&&k.version<20||k.safari&&k.version<6||k.opera&&k.version<10||k.ios&&k.osversion&&k.osversion.split(".")[0]<6||k.chromium&&k.version<20?k.c=L:k.x=L,k}var S=u(typeof navigator!="undefined"&&navigator.userAgent||"");S.test=function(a){for(var i=0;i=0;){if(r[0][i]>r[1][i])return 1;if(r[0][i]===r[1][i]){if(i===0)return 0}else return-1}}function C(a,i,r){var l=S;typeof i=="string"&&(r=i,i=void 0),i===void 0&&(i=!1),r&&(l=u(r));var p=""+l.version;for(var f in a)if(a.hasOwnProperty(f)&&l[f]){if(typeof a[f]!="string")throw new Error("Browser version in the minVersion map should be a string: "+f+": "+String(a));return o([p,a[f]])<0}return i}function c(a,i,r){return!C(a,i,r)}return S.isUnsupportedBrowser=C,S.compareVersions=o,S.check=c,S._detect=u,S.detect=u,S})},{}],71:[function(I,J,P){},{}],72:[function(I,J,P){var L=I("buffer").Buffer,u=L.isEncoding||function(c){switch(c&&c.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 S(c){if(c&&!u(c))throw new Error("Unknown encoding: "+c)}var R=P.StringDecoder=function(c){this.encoding=(c||"utf8").toLowerCase().replace(/[-_]/,""),S(c);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=C;break;default:this.write=h;return}this.charBuffer=new L(6),this.charReceived=0,this.charLength=0};R.prototype.write=function(c){for(var a="";this.charLength;){var i=c.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:c.length;if(c.copy(this.charBuffer,this.charReceived,0,i),this.charReceived+=i,this.charReceived=55296&&l<=56319){this.charLength+=this.surrogateSize,a="";continue}if(this.charReceived=this.charLength=0,c.length===0)return a;break}this.detectIncompleteChar(c);var r=c.length;this.charLength&&(c.copy(this.charBuffer,0,c.length-this.charReceived,r),r-=this.charReceived),a+=c.toString(this.encoding,0,r);var r=a.length-1,l=a.charCodeAt(r);if(l>=55296&&l<=56319){var p=this.surrogateSize;return this.charLength+=p,this.charReceived+=p,this.charBuffer.copy(this.charBuffer,p,0,p),c.copy(this.charBuffer,0,0,p),a.substring(0,r)}return a},R.prototype.detectIncompleteChar=function(c){for(var a=c.length>=3?3:c.length;a>0;a--){var i=c[c.length-a];if(a==1&&i>>5==6){this.charLength=2;break}if(a<=2&&i>>4==14){this.charLength=3;break}if(a<=3&&i>>3==30){this.charLength=4;break}}this.charReceived=a},R.prototype.end=function(c){var a="";if(c&&c.length&&(a=this.write(c)),this.charReceived){var i=this.charReceived,r=this.charBuffer,l=this.encoding;a+=r.slice(0,i).toString(l)}return a};function h(c){return c.toString(this.encoding)}function o(c){this.charReceived=c.length%2,this.charLength=this.charReceived?2:0}function C(c){this.charReceived=c.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(I,J,P){(function(L,u){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */"use strict";var S=I("base64-js"),R=I("ieee754"),h=I("isarray");P.Buffer=u,P.SlowBuffer=n,P.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=L.TYPED_ARRAY_SUPPORT!==void 0?L.TYPED_ARRAY_SUPPORT:o(),P.kMaxLength=C();function o(){try{var le=new Uint8Array(1);return le.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},le.foo()===42&&typeof le.subarray=="function"&&le.subarray(1,1).byteLength===0}catch(Q){return!1}}function C(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(le,Q){if(C()=C())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C().toString(16)+" bytes");return le|0}function n(le){return+le!=le&&(le=0),u.alloc(+le)}u.isBuffer=function(Q){return!!(Q!=null&&Q._isBuffer)},u.compare=function(Q,Y){if(!u.isBuffer(Q)||!u.isBuffer(Y))throw new TypeError("Arguments must be Buffers");if(Q===Y)return 0;for(var Z=Q.length,be=Y.length,ge=0,De=Math.min(Z,be);ge>>1;case"base64":return te(le).length;default:if(Z)return ce(le).length;Q=(""+Q).toLowerCase(),Z=!0}}u.byteLength=d;function g(le,Q,Y){var Z=!1;if((Q===void 0||Q<0)&&(Q=0),Q>this.length)return"";if((Y===void 0||Y>this.length)&&(Y=this.length),Y<=0)return"";if(Y>>>=0,Q>>>=0,Y<=Q)return"";for(le||(le="utf8");;)switch(le){case"hex":return G(this,Q,Y);case"utf8":case"utf-8":return j(this,Q,Y);case"ascii":return H(this,Q,Y);case"latin1":case"binary":return F(this,Q,Y);case"base64":return N(this,Q,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,Q,Y);default:if(Z)throw new TypeError("Unknown encoding: "+le);le=(le+"").toLowerCase(),Z=!0}}u.prototype._isBuffer=!0;function T(le,Q,Y){var Z=le[Q];le[Q]=le[Y],le[Y]=Z}u.prototype.swap16=function(){var Q=this.length;if(Q%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Y=0;Y0&&(Q=this.toString("hex",0,Y).match(/.{2}/g).join(" "),this.length>Y&&(Q+=" ... ")),""},u.prototype.compare=function(Q,Y,Z,be,ge){if(!u.isBuffer(Q))throw new TypeError("Argument must be a Buffer");if(Y===void 0&&(Y=0),Z===void 0&&(Z=Q?Q.length:0),be===void 0&&(be=0),ge===void 0&&(ge=this.length),Y<0||Z>Q.length||be<0||ge>this.length)throw new RangeError("out of range index");if(be>=ge&&Y>=Z)return 0;if(be>=ge)return-1;if(Y>=Z)return 1;if(Y>>>=0,Z>>>=0,be>>>=0,ge>>>=0,this===Q)return 0;for(var De=ge-be,Qe=Z-Y,Ze=Math.min(De,Qe),nt=this.slice(be,ge),tt=Q.slice(Y,Z),lt=0;lt2147483647?Y=2147483647:Y<-2147483648&&(Y=-2147483648),Y=+Y,isNaN(Y)&&(Y=be?0:le.length-1),Y<0&&(Y=le.length+Y),Y>=le.length){if(be)return-1;Y=le.length-1}else if(Y<0)if(be)Y=0;else return-1;if(typeof Q=="string"&&(Q=u.from(Q,Z)),u.isBuffer(Q))return Q.length===0?-1:s(le,Q,Y,Z,be);if(typeof Q=="number")return Q=Q&255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?be?Uint8Array.prototype.indexOf.call(le,Q,Y):Uint8Array.prototype.lastIndexOf.call(le,Q,Y):s(le,[Q],Y,Z,be);throw new TypeError("val must be string, number or Buffer")}function s(le,Q,Y,Z,be){var ge=1,De=le.length,Qe=Q.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(le.length<2||Q.length<2)return-1;ge=2,De/=2,Qe/=2,Y/=2}function Ze(je,Re){return ge===1?je[Re]:je.readUInt16BE(Re*ge)}var nt;if(be){var tt=-1;for(nt=Y;ntDe&&(Y=De-Qe),nt=Y;nt>=0;nt--){for(var lt=!0,st=0;stbe&&(Z=be)):Z=be;var ge=Q.length;if(ge%2!==0)throw new TypeError("Invalid hex string");Z>ge/2&&(Z=ge/2);for(var De=0;Dege)&&(Z=ge),Q.length>0&&(Z<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");be||(be="utf8");for(var De=!1;;)switch(be){case"hex":return M(this,Q,Y,Z);case"utf8":case"utf-8":return A(this,Q,Y,Z);case"ascii":return x(this,Q,Y,Z);case"latin1":case"binary":return E(this,Q,Y,Z);case"base64":return w(this,Q,Y,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,Q,Y,Z);default:if(De)throw new TypeError("Unknown encoding: "+be);be=(""+be).toLowerCase(),De=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function N(le,Q,Y){return Q===0&&Y===le.length?S.fromByteArray(le):S.fromByteArray(le.slice(Q,Y))}function j(le,Q,Y){Y=Math.min(le.length,Y);for(var Z=[],be=Q;be239?4:ge>223?3:ge>191?2:1;if(be+Qe<=Y){var Ze,nt,tt,lt;switch(Qe){case 1:ge<128&&(De=ge);break;case 2:Ze=le[be+1],(Ze&192)===128&&(lt=(ge&31)<<6|Ze&63,lt>127&&(De=lt));break;case 3:Ze=le[be+1],nt=le[be+2],(Ze&192)===128&&(nt&192)===128&&(lt=(ge&15)<<12|(Ze&63)<<6|nt&63,lt>2047&&(lt<55296||lt>57343)&&(De=lt));break;case 4:Ze=le[be+1],nt=le[be+2],tt=le[be+3],(Ze&192)===128&&(nt&192)===128&&(tt&192)===128&&(lt=(ge&15)<<18|(Ze&63)<<12|(nt&63)<<6|tt&63,lt>65535&<<1114112&&(De=lt))}}De===null?(De=65533,Qe=1):De>65535&&(De-=65536,Z.push(De>>>10&1023|55296),De=56320|De&1023),Z.push(De),be+=Qe}return z(Z)}var k=4096;function z(le){var Q=le.length;if(Q<=k)return String.fromCharCode.apply(String,le);for(var Y="",Z=0;ZZ)&&(Y=Z);for(var be="",ge=Q;geZ&&(Q=Z),Y<0?(Y+=Z,Y<0&&(Y=0)):Y>Z&&(Y=Z),YY)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUIntLE=function(Q,Y,Z){Q=Q|0,Y=Y|0,Z||W(Q,Y,this.length);for(var be=this[Q],ge=1,De=0;++De0&&(ge*=256);)be+=this[Q+--Y]*ge;return be},u.prototype.readUInt8=function(Q,Y){return Y||W(Q,1,this.length),this[Q]},u.prototype.readUInt16LE=function(Q,Y){return Y||W(Q,2,this.length),this[Q]|this[Q+1]<<8},u.prototype.readUInt16BE=function(Q,Y){return Y||W(Q,2,this.length),this[Q]<<8|this[Q+1]},u.prototype.readUInt32LE=function(Q,Y){return Y||W(Q,4,this.length),(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+this[Q+3]*16777216},u.prototype.readUInt32BE=function(Q,Y){return Y||W(Q,4,this.length),this[Q]*16777216+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])},u.prototype.readIntLE=function(Q,Y,Z){Q=Q|0,Y=Y|0,Z||W(Q,Y,this.length);for(var be=this[Q],ge=1,De=0;++De=ge&&(be-=Math.pow(2,8*Y)),be},u.prototype.readIntBE=function(Q,Y,Z){Q=Q|0,Y=Y|0,Z||W(Q,Y,this.length);for(var be=Y,ge=1,De=this[Q+--be];be>0&&(ge*=256);)De+=this[Q+--be]*ge;return ge*=128,De>=ge&&(De-=Math.pow(2,8*Y)),De},u.prototype.readInt8=function(Q,Y){return Y||W(Q,1,this.length),this[Q]&128?(255-this[Q]+1)*-1:this[Q]},u.prototype.readInt16LE=function(Q,Y){Y||W(Q,2,this.length);var Z=this[Q]|this[Q+1]<<8;return Z&32768?Z|4294901760:Z},u.prototype.readInt16BE=function(Q,Y){Y||W(Q,2,this.length);var Z=this[Q+1]|this[Q]<<8;return Z&32768?Z|4294901760:Z},u.prototype.readInt32LE=function(Q,Y){return Y||W(Q,4,this.length),this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24},u.prototype.readInt32BE=function(Q,Y){return Y||W(Q,4,this.length),this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]},u.prototype.readFloatLE=function(Q,Y){return Y||W(Q,4,this.length),R.read(this,Q,!0,23,4)},u.prototype.readFloatBE=function(Q,Y){return Y||W(Q,4,this.length),R.read(this,Q,!1,23,4)},u.prototype.readDoubleLE=function(Q,Y){return Y||W(Q,8,this.length),R.read(this,Q,!0,52,8)},u.prototype.readDoubleBE=function(Q,Y){return Y||W(Q,8,this.length),R.read(this,Q,!1,52,8)};function K(le,Q,Y,Z,be,ge){if(!u.isBuffer(le))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>be||Qle.length)throw new RangeError("Index out of range")}u.prototype.writeUIntLE=function(Q,Y,Z,be){if(Q=+Q,Y=Y|0,Z=Z|0,!be){var ge=Math.pow(2,8*Z)-1;K(this,Q,Y,Z,ge,0)}var De=1,Qe=0;for(this[Y]=Q&255;++Qe=0&&(Qe*=256);)this[Y+De]=Q/Qe&255;return Y+Z},u.prototype.writeUInt8=function(Q,Y,Z){return Q=+Q,Y=Y|0,Z||K(this,Q,Y,1,255,0),u.TYPED_ARRAY_SUPPORT||(Q=Math.floor(Q)),this[Y]=Q&255,Y+1};function q(le,Q,Y,Z){Q<0&&(Q=65535+Q+1);for(var be=0,ge=Math.min(le.length-Y,2);be>>(Z?be:1-be)*8}u.prototype.writeUInt16LE=function(Q,Y,Z){return Q=+Q,Y=Y|0,Z||K(this,Q,Y,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[Y]=Q&255,this[Y+1]=Q>>>8):q(this,Q,Y,!0),Y+2},u.prototype.writeUInt16BE=function(Q,Y,Z){return Q=+Q,Y=Y|0,Z||K(this,Q,Y,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[Y]=Q>>>8,this[Y+1]=Q&255):q(this,Q,Y,!1),Y+2};function re(le,Q,Y,Z){Q<0&&(Q=4294967295+Q+1);for(var be=0,ge=Math.min(le.length-Y,4);be>>(Z?be:3-be)*8&255}u.prototype.writeUInt32LE=function(Q,Y,Z){return Q=+Q,Y=Y|0,Z||K(this,Q,Y,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[Y+3]=Q>>>24,this[Y+2]=Q>>>16,this[Y+1]=Q>>>8,this[Y]=Q&255):re(this,Q,Y,!0),Y+4},u.prototype.writeUInt32BE=function(Q,Y,Z){return Q=+Q,Y=Y|0,Z||K(this,Q,Y,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[Y]=Q>>>24,this[Y+1]=Q>>>16,this[Y+2]=Q>>>8,this[Y+3]=Q&255):re(this,Q,Y,!1),Y+4},u.prototype.writeIntLE=function(Q,Y,Z,be){if(Q=+Q,Y=Y|0,!be){var ge=Math.pow(2,8*Z-1);K(this,Q,Y,Z,ge-1,-ge)}var De=0,Qe=1,Ze=0;for(this[Y]=Q&255;++De>0)-Ze&255;return Y+Z},u.prototype.writeIntBE=function(Q,Y,Z,be){if(Q=+Q,Y=Y|0,!be){var ge=Math.pow(2,8*Z-1);K(this,Q,Y,Z,ge-1,-ge)}var De=Z-1,Qe=1,Ze=0;for(this[Y+De]=Q&255;--De>=0&&(Qe*=256);)Q<0&&Ze===0&&this[Y+De+1]!==0&&(Ze=1),this[Y+De]=(Q/Qe>>0)-Ze&255;return Y+Z},u.prototype.writeInt8=function(Q,Y,Z){return Q=+Q,Y=Y|0,Z||K(this,Q,Y,1,127,-128),u.TYPED_ARRAY_SUPPORT||(Q=Math.floor(Q)),Q<0&&(Q=255+Q+1),this[Y]=Q&255,Y+1},u.prototype.writeInt16LE=function(Q,Y,Z){return Q=+Q,Y=Y|0,Z||K(this,Q,Y,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[Y]=Q&255,this[Y+1]=Q>>>8):q(this,Q,Y,!0),Y+2},u.prototype.writeInt16BE=function(Q,Y,Z){return Q=+Q,Y=Y|0,Z||K(this,Q,Y,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[Y]=Q>>>8,this[Y+1]=Q&255):q(this,Q,Y,!1),Y+2},u.prototype.writeInt32LE=function(Q,Y,Z){return Q=+Q,Y=Y|0,Z||K(this,Q,Y,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[Y]=Q&255,this[Y+1]=Q>>>8,this[Y+2]=Q>>>16,this[Y+3]=Q>>>24):re(this,Q,Y,!0),Y+4},u.prototype.writeInt32BE=function(Q,Y,Z){return Q=+Q,Y=Y|0,Z||K(this,Q,Y,4,2147483647,-2147483648),Q<0&&(Q=4294967295+Q+1),u.TYPED_ARRAY_SUPPORT?(this[Y]=Q>>>24,this[Y+1]=Q>>>16,this[Y+2]=Q>>>8,this[Y+3]=Q&255):re(this,Q,Y,!1),Y+4};function ee(le,Q,Y,Z,be,ge){if(Y+Z>le.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("Index out of range")}function Ce(le,Q,Y,Z,be){return be||ee(le,Q,Y,4,34028234663852886e22,-34028234663852886e22),R.write(le,Q,Y,Z,23,4),Y+4}u.prototype.writeFloatLE=function(Q,Y,Z){return Ce(this,Q,Y,!0,Z)},u.prototype.writeFloatBE=function(Q,Y,Z){return Ce(this,Q,Y,!1,Z)};function xe(le,Q,Y,Z,be){return be||ee(le,Q,Y,8,17976931348623157e292,-17976931348623157e292),R.write(le,Q,Y,Z,52,8),Y+8}u.prototype.writeDoubleLE=function(Q,Y,Z){return xe(this,Q,Y,!0,Z)},u.prototype.writeDoubleBE=function(Q,Y,Z){return xe(this,Q,Y,!1,Z)},u.prototype.copy=function(Q,Y,Z,be){if(Z||(Z=0),!be&&be!==0&&(be=this.length),Y>=Q.length&&(Y=Q.length),Y||(Y=0),be>0&&be=this.length)throw new RangeError("sourceStart out of bounds");if(be<0)throw new RangeError("sourceEnd out of bounds");be>this.length&&(be=this.length),Q.length-Y=0;--De)Q[De+Y]=this[De+Z];else if(ge<1e3||!u.TYPED_ARRAY_SUPPORT)for(De=0;De>>0,Z=Z===void 0?this.length:Z>>>0,Q||(Q=0);var De;if(typeof Q=="number")for(De=Y;De55295&&Y<57344){if(!be){if(Y>56319){(Q-=3)>-1&&ge.push(239,191,189);continue}else if(De+1===Z){(Q-=3)>-1&&ge.push(239,191,189);continue}be=Y;continue}if(Y<56320){(Q-=3)>-1&&ge.push(239,191,189),be=Y;continue}Y=(be-55296<<10|Y-56320)+65536}else be&&((Q-=3)>-1&&ge.push(239,191,189));if(be=null,Y<128){if((Q-=1)<0)break;ge.push(Y)}else if(Y<2048){if((Q-=2)<0)break;ge.push(Y>>6|192,Y&63|128)}else if(Y<65536){if((Q-=3)<0)break;ge.push(Y>>12|224,Y>>6&63|128,Y&63|128)}else if(Y<1114112){if((Q-=4)<0)break;ge.push(Y>>18|240,Y>>12&63|128,Y>>6&63|128,Y&63|128)}else throw new Error("Invalid code point")}return ge}function ae(le){for(var Q=[],Y=0;Y>8,be=Y%256,ge.push(be),ge.push(Z);return ge}function te(le){return S.toByteArray(ke(le))}function ue(le,Q,Y,Z){for(var be=0;be=Q.length||be>=le.length);++be)Q[be+Y]=le[be];return be}function Oe(le){return le!==le}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},I("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(I,J,P){J.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(I,J,P){J.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(I,J,P){/*! * copy-to - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */"use strict";var L=Array.prototype.slice;J.exports=u;function u(R,h){if(!(this instanceof u))return new u(R,h);this.src=R,this._withAccess=h}u.prototype.withAccess=function(R){return this._withAccess=R!==!1,this},u.prototype.pick=function(R){return Array.isArray(R)||(R=L.call(arguments)),R.length&&(this.keys=R),this},u.prototype.to=function(R){if(R=R||{},!this.src)return R;var h=this.keys||Object.keys(this.src);if(!this._withAccess){for(var o=0;oi;)if(r=c[i++],r!=r)return!0}else for(;a>i;i++)if((R||i in c)&&c[i]===o)return R||i||0;return!R&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(I,J,P){var L=I("./_cof"),u=I("./_wks")("toStringTag"),S=L(function(){return arguments}())=="Arguments",R=function(h,o){try{return h[o]}catch(C){}};J.exports=function(h){var o,C,c;return h===void 0?"Undefined":h===null?"Null":typeof(C=R(o=Object(h),u))=="string"?C:S?L(o):(c=L(o))=="Object"&&typeof o.callee=="function"?"Arguments":c}},{"./_cof":98,"./_wks":166}],98:[function(I,J,P){var L={}.toString;J.exports=function(u){return L.call(u).slice(8,-1)}},{}],99:[function(I,J,P){var L=J.exports={version:"2.6.11"};typeof __e=="number"&&(__e=L)},{}],100:[function(I,J,P){"use strict";var L=I("./_object-dp"),u=I("./_property-desc");J.exports=function(S,R,h){R in S?L.f(S,R,u(0,h)):S[R]=h}},{"./_object-dp":132,"./_property-desc":146}],101:[function(I,J,P){var L=I("./_a-function");J.exports=function(u,S,R){if(L(u),S===void 0)return u;switch(R){case 1:return function(h){return u.call(S,h)};case 2:return function(h,o){return u.call(S,h,o)};case 3:return function(h,o,C){return u.call(S,h,o,C)}}return function(){return u.apply(S,arguments)}}},{"./_a-function":92}],102:[function(I,J,P){J.exports=function(L){if(L==null)throw TypeError("Can't call method on "+L);return L}},{}],103:[function(I,J,P){J.exports=!I("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(I,J,P){var L=I("./_is-object"),u=I("./_global").document,S=L(u)&&L(u.createElement);J.exports=function(R){return S?u.createElement(R):{}}},{"./_global":110,"./_is-object":119}],105:[function(I,J,P){J.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(I,J,P){var L=I("./_object-keys"),u=I("./_object-gops"),S=I("./_object-pie");J.exports=function(R){var h=L(R),o=u.f;if(o)for(var C=o(R),c=S.f,a=0,i;C.length>a;)c.call(R,i=C[a++])&&h.push(i);return h}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(I,J,P){var L=I("./_global"),u=I("./_core"),S=I("./_ctx"),R=I("./_hide"),h=I("./_has"),o="prototype",C=function(c,a,i){var r=c&C.F,l=c&C.G,p=c&C.S,f=c&C.P,b=c&C.B,v=c&C.W,m=l?u:u[a]||(u[a]={}),n=m[o],d=l?L:p?L[a]:(L[a]||{})[o],g,T,y;l&&(i=a);for(g in i){if(T=!r&&d&&d[g]!==void 0,T&&h(m,g))continue;y=T?d[g]:i[g],m[g]=l&&typeof d[g]!="function"?i[g]:b&&T?S(y,L):v&&d[g]==y?function(s){var M=function(A,x,E){if(this instanceof s){switch(arguments.length){case 0:return new s;case 1:return new s(A);case 2:return new s(A,x)}return new s(A,x,E)}return s.apply(this,arguments)};return M[o]=s[o],M}(y):f&&typeof y=="function"?S(Function.call,y):y,f&&((m.virtual||(m.virtual={}))[g]=y,c&C.R&&n&&!n[g]&&R(n,g,y))}};C.F=1,C.G=2,C.S=4,C.P=8,C.B=16,C.W=32,C.U=64,C.R=128,J.exports=C},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(I,J,P){J.exports=function(L){try{return!!L()}catch(u){return!0}}},{}],109:[function(I,J,P){var L=I("./_ctx"),u=I("./_iter-call"),S=I("./_is-array-iter"),R=I("./_an-object"),h=I("./_to-length"),o=I("./core.get-iterator-method"),C={},c={},P=J.exports=function(a,i,r,l,p){var f=p?function(){return a}:o(a),b=L(r,l,i?2:1),v=0,m,n,d,g;if(typeof f!="function")throw TypeError(a+" is not iterable!");if(S(f)){for(m=h(a.length);m>v;v++)if(g=i?b(R(n=a[v])[0],n[1]):b(a[v]),g===C||g===c)return g}else for(d=f.call(a);!(n=d.next()).done;)if(g=u(d,b,n.value,i),g===C||g===c)return g};P.BREAK=C,P.RETURN=c},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(I,J,P){var L=J.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=L)},{}],111:[function(I,J,P){var L={}.hasOwnProperty;J.exports=function(u,S){return L.call(u,S)}},{}],112:[function(I,J,P){var L=I("./_object-dp"),u=I("./_property-desc");J.exports=I("./_descriptors")?function(S,R,h){return L.f(S,R,u(1,h))}:function(S,R,h){return S[R]=h,S}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(I,J,P){var L=I("./_global").document;J.exports=L&&L.documentElement},{"./_global":110}],114:[function(I,J,P){J.exports=!I("./_descriptors")&&!I("./_fails")(function(){return Object.defineProperty(I("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(I,J,P){J.exports=function(L,u,S){var R=S===void 0;switch(u.length){case 0:return R?L():L.call(S);case 1:return R?L(u[0]):L.call(S,u[0]);case 2:return R?L(u[0],u[1]):L.call(S,u[0],u[1]);case 3:return R?L(u[0],u[1],u[2]):L.call(S,u[0],u[1],u[2]);case 4:return R?L(u[0],u[1],u[2],u[3]):L.call(S,u[0],u[1],u[2],u[3])}return L.apply(S,u)}},{}],116:[function(I,J,P){var L=I("./_cof");J.exports=Object("z").propertyIsEnumerable(0)?Object:function(u){return L(u)=="String"?u.split(""):Object(u)}},{"./_cof":98}],117:[function(I,J,P){var L=I("./_iterators"),u=I("./_wks")("iterator"),S=Array.prototype;J.exports=function(R){return R!==void 0&&(L.Array===R||S[u]===R)}},{"./_iterators":125,"./_wks":166}],118:[function(I,J,P){var L=I("./_cof");J.exports=Array.isArray||function(S){return L(S)=="Array"}},{"./_cof":98}],119:[function(I,J,P){J.exports=function(L){return typeof L=="object"?L!==null:typeof L=="function"}},{}],120:[function(I,J,P){var L=I("./_an-object");J.exports=function(u,S,R,h){try{return h?S(L(R)[0],R[1]):S(R)}catch(C){var o=u.return;throw o!==void 0&&L(o.call(u)),C}}},{"./_an-object":95}],121:[function(I,J,P){"use strict";var L=I("./_object-create"),u=I("./_property-desc"),S=I("./_set-to-string-tag"),R={};I("./_hide")(R,I("./_wks")("iterator"),function(){return this}),J.exports=function(h,o,C){h.prototype=L(R,{next:u(1,C)}),S(h,o+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(I,J,P){"use strict";var L=I("./_library"),u=I("./_export"),S=I("./_redefine"),R=I("./_hide"),h=I("./_iterators"),o=I("./_iter-create"),C=I("./_set-to-string-tag"),c=I("./_object-gpo"),a=I("./_wks")("iterator"),i=!([].keys&&"next"in[].keys()),r="@@iterator",l="keys",p="values",f=function(){return this};J.exports=function(b,v,m,n,d,g,T){o(m,v,n);var y=function(H){if(!i&&H in x)return x[H];switch(H){case l:return function(){return new m(this,H)};case p:return function(){return new m(this,H)}}return function(){return new m(this,H)}},s=v+" Iterator",M=d==p,A=!1,x=b.prototype,E=x[a]||x[r]||d&&x[d],w=E||y(d),_=d?M?y("entries"):w:void 0,N=v=="Array"&&x.entries||E,j,k,z;if(N&&(z=c(N.call(new b)),z!==Object.prototype&&z.next&&(C(z,s,!0),!L&&typeof z[a]!="function"&&R(z,a,f))),M&&E&&E.name!==p&&(A=!0,w=function(){return E.call(this)}),(!L||T)&&(i||A||!x[a])&&R(x,a,w),h[v]=w,h[s]=f,d)if(j={values:M?w:y(p),keys:g?w:y(l),entries:_},T)for(k in j)k in x||S(x,k,j[k]);else u(u.P+u.F*(i||A),v,j);return j}},{"./_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(I,J,P){var L=I("./_wks")("iterator"),u=!1;try{var S=[7][L]();S.return=function(){u=!0},Array.from(S,function(){throw 2})}catch(R){}J.exports=function(R,h){if(!h&&!u)return!1;var o=!1;try{var C=[7],c=C[L]();c.next=function(){return{done:o=!0}},C[L]=function(){return c},R(C)}catch(a){}return o}},{"./_wks":166}],124:[function(I,J,P){J.exports=function(L,u){return{value:u,done:!!L}}},{}],125:[function(I,J,P){J.exports={}},{}],126:[function(I,J,P){J.exports=!0},{}],127:[function(I,J,P){var L=I("./_uid")("meta"),u=I("./_is-object"),S=I("./_has"),R=I("./_object-dp").f,h=0,o=Object.isExtensible||function(){return!0},C=!I("./_fails")(function(){return o(Object.preventExtensions({}))}),c=function(p){R(p,L,{value:{i:"O"+ ++h,w:{}}})},a=function(p,f){if(!u(p))return typeof p=="symbol"?p:(typeof p=="string"?"S":"P")+p;if(!S(p,L)){if(!o(p))return"F";if(!f)return"E";c(p)}return p[L].i},i=function(p,f){if(!S(p,L)){if(!o(p))return!0;if(!f)return!1;c(p)}return p[L].w},r=function(p){return C&&l.NEED&&o(p)&&!S(p,L)&&c(p),p},l=J.exports={KEY:L,NEED:!1,fastKey:a,getWeak:i,onFreeze:r}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(I,J,P){var L=I("./_global"),u=I("./_task").set,S=L.MutationObserver||L.WebKitMutationObserver,R=L.process,h=L.Promise,o=I("./_cof")(R)=="process";J.exports=function(){var C,c,a,i=function(){var f,b;for(o&&(f=R.domain)&&f.exit();C;){b=C.fn,C=C.next;try{b()}catch(v){throw C?a():c=void 0,v}}c=void 0,f&&f.enter()};if(o)a=function(){R.nextTick(i)};else if(S&&!(L.navigator&&L.navigator.standalone)){var r=!0,l=document.createTextNode("");new S(i).observe(l,{characterData:!0}),a=function(){l.data=r=!r}}else if(h&&h.resolve){var p=h.resolve(void 0);a=function(){p.then(i)}}else a=function(){u.call(L,i)};return function(f){var b={fn:f,next:void 0};c&&(c.next=b),C||(C=b,a()),c=b}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(I,J,P){"use strict";var L=I("./_a-function");function u(S){var R,h;this.promise=new S(function(o,C){if(R!==void 0||h!==void 0)throw TypeError("Bad Promise constructor");R=o,h=C}),this.resolve=L(R),this.reject=L(h)}J.exports.f=function(S){return new u(S)}},{"./_a-function":92}],130:[function(I,J,P){"use strict";var L=I("./_descriptors"),u=I("./_object-keys"),S=I("./_object-gops"),R=I("./_object-pie"),h=I("./_to-object"),o=I("./_iobject"),C=Object.assign;J.exports=!C||I("./_fails")(function(){var c={},a={},i=Symbol(),r="abcdefghijklmnopqrst";return c[i]=7,r.split("").forEach(function(l){a[l]=l}),C({},c)[i]!=7||Object.keys(C({},a)).join("")!=r})?function(a,i){for(var r=h(a),l=arguments.length,p=1,f=S.f,b=R.f;l>p;)for(var v=o(arguments[p++]),m=f?u(v).concat(f(v)):u(v),n=m.length,d=0,g;n>d;)g=m[d++],(!L||b.call(v,g))&&(r[g]=v[g]);return r}:C},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(I,J,P){var L=I("./_an-object"),u=I("./_object-dps"),S=I("./_enum-bug-keys"),R=I("./_shared-key")("IE_PROTO"),h=function(){},o="prototype",C=function(){var c=I("./_dom-create")("iframe"),a=S.length,i="<",r=">",l;for(c.style.display="none",I("./_html").appendChild(c),c.src="javascript:",l=c.contentWindow.document,l.open(),l.write(i+"script"+r+"document.F=Object"+i+"/script"+r),l.close(),C=l.F;a--;)delete C[o][S[a]];return C()};J.exports=Object.create||function(a,i){var r;return a!==null?(h[o]=L(a),r=new h,h[o]=null,r[R]=a):r=C(),i===void 0?r:u(r,i)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(I,J,P){var L=I("./_an-object"),u=I("./_ie8-dom-define"),S=I("./_to-primitive"),R=Object.defineProperty;P.f=I("./_descriptors")?Object.defineProperty:function(o,C,c){if(L(o),C=S(C,!0),L(c),u)try{return R(o,C,c)}catch(a){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(o[C]=c.value),o}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(I,J,P){var L=I("./_object-dp"),u=I("./_an-object"),S=I("./_object-keys");J.exports=I("./_descriptors")?Object.defineProperties:function(h,o){u(h);for(var C=S(o),c=C.length,a=0,i;c>a;)L.f(h,i=C[a++],o[i]);return h}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(I,J,P){var L=I("./_object-pie"),u=I("./_property-desc"),S=I("./_to-iobject"),R=I("./_to-primitive"),h=I("./_has"),o=I("./_ie8-dom-define"),C=Object.getOwnPropertyDescriptor;P.f=I("./_descriptors")?C:function(a,i){if(a=S(a),i=R(i,!0),o)try{return C(a,i)}catch(r){}if(h(a,i))return u(!L.f.call(a,i),a[i])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(I,J,P){var L=I("./_to-iobject"),u=I("./_object-gopn").f,S={}.toString,R=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(o){try{return u(o)}catch(C){return R.slice()}};J.exports.f=function(C){return R&&S.call(C)=="[object Window]"?h(C):u(L(C))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(I,J,P){var L=I("./_object-keys-internal"),u=I("./_enum-bug-keys").concat("length","prototype");P.f=Object.getOwnPropertyNames||function(R){return L(R,u)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(I,J,P){P.f=Object.getOwnPropertySymbols},{}],138:[function(I,J,P){var L=I("./_has"),u=I("./_to-object"),S=I("./_shared-key")("IE_PROTO"),R=Object.prototype;J.exports=Object.getPrototypeOf||function(h){return h=u(h),L(h,S)?h[S]:typeof h.constructor=="function"&&h instanceof h.constructor?h.constructor.prototype:h instanceof Object?R:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(I,J,P){var L=I("./_has"),u=I("./_to-iobject"),S=I("./_array-includes")(!1),R=I("./_shared-key")("IE_PROTO");J.exports=function(h,o){var C=u(h),c=0,a=[],i;for(i in C)i!=R&&(L(C,i)&&a.push(i));for(;o.length>c;)L(C,i=o[c++])&&(~S(a,i)||a.push(i));return a}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(I,J,P){var L=I("./_object-keys-internal"),u=I("./_enum-bug-keys");J.exports=Object.keys||function(R){return L(R,u)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(I,J,P){P.f={}.propertyIsEnumerable},{}],142:[function(I,J,P){var L=I("./_export"),u=I("./_core"),S=I("./_fails");J.exports=function(R,h){var o=(u.Object||{})[R]||Object[R],C={};C[R]=h(o),L(L.S+L.F*S(function(){o(1)}),"Object",C)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(I,J,P){var L=I("./_descriptors"),u=I("./_object-keys"),S=I("./_to-iobject"),R=I("./_object-pie").f;J.exports=function(h){return function(o){for(var C=S(o),c=u(C),a=c.length,i=0,r=[],l;a>i;)l=c[i++],(!L||R.call(C,l))&&r.push(h?[l,C[l]]:C[l]);return r}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(I,J,P){J.exports=function(L){try{return{e:!1,v:L()}}catch(u){return{e:!0,v:u}}}},{}],145:[function(I,J,P){var L=I("./_an-object"),u=I("./_is-object"),S=I("./_new-promise-capability");J.exports=function(R,h){if(L(R),u(h)&&h.constructor===R)return h;var o=S.f(R),C=o.resolve;return C(h),o.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(I,J,P){J.exports=function(L,u){return{enumerable:!(L&1),configurable:!(L&2),writable:!(L&4),value:u}}},{}],147:[function(I,J,P){var L=I("./_hide");J.exports=function(u,S,R){for(var h in S)R&&u[h]?u[h]=S[h]:L(u,h,S[h]);return u}},{"./_hide":112}],148:[function(I,J,P){J.exports=I("./_hide")},{"./_hide":112}],149:[function(I,J,P){"use strict";var L=I("./_global"),u=I("./_core"),S=I("./_object-dp"),R=I("./_descriptors"),h=I("./_wks")("species");J.exports=function(o){var C=typeof u[o]=="function"?u[o]:L[o];R&&C&&!C[h]&&S.f(C,h,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(I,J,P){var L=I("./_object-dp").f,u=I("./_has"),S=I("./_wks")("toStringTag");J.exports=function(R,h,o){R&&!u(R=o?R:R.prototype,S)&&L(R,S,{configurable:!0,value:h})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(I,J,P){var L=I("./_shared")("keys"),u=I("./_uid");J.exports=function(S){return L[S]||(L[S]=u(S))}},{"./_shared":152,"./_uid":162}],152:[function(I,J,P){var L=I("./_core"),u=I("./_global"),S="__core-js_shared__",R=u[S]||(u[S]={});(J.exports=function(h,o){return R[h]||(R[h]=o!==void 0?o:{})})("versions",[]).push({version:L.version,mode:I("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(I,J,P){var L=I("./_an-object"),u=I("./_a-function"),S=I("./_wks")("species");J.exports=function(R,h){var o=L(R).constructor,C;return o===void 0||(C=L(o)[S])==null?h:u(C)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(I,J,P){var L=I("./_to-integer"),u=I("./_defined");J.exports=function(S){return function(R,h){var o=String(u(R)),C=L(h),c=o.length,a,i;return C<0||C>=c?S?"":void 0:(a=o.charCodeAt(C),a<55296||a>56319||C+1===c||(i=o.charCodeAt(C+1))<56320||i>57343?S?o.charAt(C):a:S?o.slice(C,C+2):(a-55296<<10)+(i-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(I,J,P){var L=I("./_ctx"),u=I("./_invoke"),S=I("./_html"),R=I("./_dom-create"),h=I("./_global"),o=h.process,C=h.setImmediate,c=h.clearImmediate,a=h.MessageChannel,i=h.Dispatch,r=0,l={},p="onreadystatechange",f,b,v,m=function(){var d=+this;if(l.hasOwnProperty(d)){var g=l[d];delete l[d],g()}},n=function(d){m.call(d.data)};(!C||!c)&&(C=function(g){for(var T=[],y=1;arguments.length>y;)T.push(arguments[y++]);return l[++r]=function(){u(typeof g=="function"?g:Function(g),T)},f(r),r},c=function(g){delete l[g]},I("./_cof")(o)=="process"?f=function(d){o.nextTick(L(m,d,1))}:i&&i.now?f=function(d){i.now(L(m,d,1))}:a?(b=new a,v=b.port2,b.port1.onmessage=n,f=L(v.postMessage,v,1)):h.addEventListener&&typeof postMessage=="function"&&!h.importScripts?(f=function(d){h.postMessage(d+"","*")},h.addEventListener("message",n,!1)):p in R("script")?f=function(d){S.appendChild(R("script"))[p]=function(){S.removeChild(this),m.call(d)}}:f=function(d){setTimeout(L(m,d,1),0)}),J.exports={set:C,clear:c}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(I,J,P){var L=I("./_to-integer"),u=Math.max,S=Math.min;J.exports=function(R,h){return R=L(R),R<0?u(R+h,0):S(R,h)}},{"./_to-integer":157}],157:[function(I,J,P){var L=Math.ceil,u=Math.floor;J.exports=function(S){return isNaN(S=+S)?0:(S>0?u:L)(S)}},{}],158:[function(I,J,P){var L=I("./_iobject"),u=I("./_defined");J.exports=function(S){return L(u(S))}},{"./_defined":102,"./_iobject":116}],159:[function(I,J,P){var L=I("./_to-integer"),u=Math.min;J.exports=function(S){return S>0?u(L(S),9007199254740991):0}},{"./_to-integer":157}],160:[function(I,J,P){var L=I("./_defined");J.exports=function(u){return Object(L(u))}},{"./_defined":102}],161:[function(I,J,P){var L=I("./_is-object");J.exports=function(u,S){if(!L(u))return u;var R,h;if(S&&typeof(R=u.toString)=="function"&&!L(h=R.call(u)))return h;if(typeof(R=u.valueOf)=="function"&&!L(h=R.call(u)))return h;if(!S&&typeof(R=u.toString)=="function"&&!L(h=R.call(u)))return h;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(I,J,P){var L=0,u=Math.random();J.exports=function(S){return"Symbol(".concat(S===void 0?"":S,")_",(++L+u).toString(36))}},{}],163:[function(I,J,P){var L=I("./_global"),u=L.navigator;J.exports=u&&u.userAgent||""},{"./_global":110}],164:[function(I,J,P){var L=I("./_global"),u=I("./_core"),S=I("./_library"),R=I("./_wks-ext"),h=I("./_object-dp").f;J.exports=function(o){var C=u.Symbol||(u.Symbol=S?{}:L.Symbol||{});o.charAt(0)!="_"&&!(o in C)&&h(C,o,{value:R.f(o)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(I,J,P){P.f=I("./_wks")},{"./_wks":166}],166:[function(I,J,P){var L=I("./_shared")("wks"),u=I("./_uid"),S=I("./_global").Symbol,R=typeof S=="function",h=J.exports=function(o){return L[o]||(L[o]=R&&S[o]||(R?S:u)("Symbol."+o))};h.store=L},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(I,J,P){var L=I("./_classof"),u=I("./_wks")("iterator"),S=I("./_iterators");J.exports=I("./_core").getIteratorMethod=function(R){if(R!=null)return R[u]||R["@@iterator"]||S[L(R)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(I,J,P){"use strict";var L=I("./_ctx"),u=I("./_export"),S=I("./_to-object"),R=I("./_iter-call"),h=I("./_is-array-iter"),o=I("./_to-length"),C=I("./_create-property"),c=I("./core.get-iterator-method");u(u.S+u.F*!I("./_iter-detect")(function(a){Array.from(a)}),"Array",{from:function(i){var r=S(i),l=typeof this=="function"?this:Array,p=arguments.length,f=p>1?arguments[1]:void 0,b=f!==void 0,v=0,m=c(r),n,d,g,T;if(b&&(f=L(f,p>2?arguments[2]:void 0,2)),m!=null&&!(l==Array&&h(m)))for(T=m.call(r),d=new l;!(g=T.next()).done;v++)C(d,v,b?R(T,f,[g.value,v],!0):g.value);else for(n=o(r.length),d=new l(n);n>v;v++)C(d,v,b?f(r[v],v):r[v]);return d.length=v,d}})},{"./_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(I,J,P){"use strict";var L=I("./_add-to-unscopables"),u=I("./_iter-step"),S=I("./_iterators"),R=I("./_to-iobject");J.exports=I("./_iter-define")(Array,"Array",function(h,o){this._t=R(h),this._i=0,this._k=o},function(){var h=this._t,o=this._k,C=this._i++;return!h||C>=h.length?(this._t=void 0,u(1)):o=="keys"?u(0,C):o=="values"?u(0,h[C]):u(0,[C,h[C]])},"values"),S.Arguments=S.Array,L("keys"),L("values"),L("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(I,J,P){"use strict";var L=I("./_is-object"),u=I("./_object-gpo"),S=I("./_wks")("hasInstance"),R=Function.prototype;S in R||I("./_object-dp").f(R,S,{value:function(h){if(typeof this!="function"||!L(h))return!1;if(!L(this.prototype))return h instanceof this;for(;h=u(h);)if(this.prototype===h)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(I,J,P){var L=I("./_export");L(L.S+L.F,"Object",{assign:I("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(I,J,P){var L=I("./_export");L(L.S,"Object",{create:I("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(I,J,P){var L=I("./_export");L(L.S+L.F*!I("./_descriptors"),"Object",{defineProperty:I("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(I,J,P){I("./_object-sap")("getOwnPropertyNames",function(){return I("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(I,J,P){var L=I("./_to-object"),u=I("./_object-gpo");I("./_object-sap")("getPrototypeOf",function(){return function(R){return u(L(R))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(I,J,P){var L=I("./_to-object"),u=I("./_object-keys");I("./_object-sap")("keys",function(){return function(R){return u(L(R))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(I,J,P){arguments[4][71][0].apply(P,arguments)},{dup:71}],178:[function(I,J,P){"use strict";var L=I("./_library"),u=I("./_global"),S=I("./_ctx"),R=I("./_classof"),h=I("./_export"),o=I("./_is-object"),C=I("./_a-function"),c=I("./_an-instance"),a=I("./_for-of"),i=I("./_species-constructor"),r=I("./_task").set,l=I("./_microtask")(),p=I("./_new-promise-capability"),f=I("./_perform"),b=I("./_user-agent"),v=I("./_promise-resolve"),m="Promise",n=u.TypeError,d=u.process,g=d&&d.versions,T=g&&g.v8||"",y=u[m],s=R(d)=="process",M=function(){},A,x,E,w,_=x=p.f,N=!!function(){try{var W=y.resolve(1),K=(W.constructor={})[I("./_wks")("species")]=function(q){q(M,M)};return(s||typeof PromiseRejectionEvent=="function")&&W.then(M)instanceof K&&T.indexOf("6.6")!==0&&b.indexOf("Chrome/66")===-1}catch(q){}}(),j=function(W){var K;return o(W)&&typeof(K=W.then)=="function"?K:!1},k=function(W,K){if(W._n)return;W._n=!0;var q=W._c;l(function(){for(var re=W._v,ee=W._s==1,Ce=0,xe=function(he){var ke=ee?he.ok:he.fail,_e=he.resolve,de=he.reject,ce=he.domain,ae,Se,te;try{ke?(ee||(W._h==2&&F(W),W._h=1),ke===!0?ae=re:(ce&&ce.enter(),ae=ke(re),ce&&(ce.exit(),te=!0)),ae===he.promise?de(n("Promise-chain cycle")):(Se=j(ae))?Se.call(ae,_e,de):_e(ae)):de(re)}catch(ue){ce&&!te&&ce.exit(),de(ue)}};q.length>Ce;)xe(q[Ce++]);W._c=[],W._n=!1,K&&!W._h&&z(W)})},z=function(W){r.call(u,function(){var K=W._v,q=H(W),re,ee,Ce;if(q&&(re=f(function(){s?d.emit("unhandledRejection",K,W):(ee=u.onunhandledrejection)?ee({promise:W,reason:K}):(Ce=u.console)&&Ce.error&&Ce.error("Unhandled promise rejection",K)}),W._h=s||H(W)?2:1),W._a=void 0,q&&re.e)throw re.v})},H=function(W){return W._h!==1&&(W._a||W._c).length===0},F=function(W){r.call(u,function(){var K;s?d.emit("rejectionHandled",W):(K=u.onrejectionhandled)&&K({promise:W,reason:W._v})})},G=function(W){var K=this;if(K._d)return;K._d=!0,K=K._w||K,K._v=W,K._s=2,K._a||(K._a=K._c.slice()),k(K,!0)},B=function(W){var K=this,q;if(K._d)return;K._d=!0,K=K._w||K;try{if(K===W)throw n("Promise can't be resolved itself");(q=j(W))?l(function(){var re={_w:K,_d:!1};try{q.call(W,S(B,re,1),S(G,re,1))}catch(ee){G.call(re,ee)}}):(K._v=W,K._s=1,k(K,!1))}catch(re){G.call({_w:K,_d:!1},re)}};N||(y=function(K){c(this,y,m,"_h"),C(K),A.call(this);try{K(S(B,this,1),S(G,this,1))}catch(q){G.call(this,q)}},A=function(K){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},A.prototype=I("./_redefine-all")(y.prototype,{then:function(K,q){var re=_(i(this,y));return re.ok=typeof K=="function"?K:!0,re.fail=typeof q=="function"&&q,re.domain=s?d.domain:void 0,this._c.push(re),this._a&&this._a.push(re),this._s&&k(this,!1),re.promise},catch:function(W){return this.then(void 0,W)}}),E=function(){var W=new A;this.promise=W,this.resolve=S(B,W,1),this.reject=S(G,W,1)},p.f=_=function(W){return W===y||W===w?new E(W):x(W)}),h(h.G+h.W+h.F*!N,{Promise:y}),I("./_set-to-string-tag")(y,m),I("./_set-species")(m),w=I("./_core")[m],h(h.S+h.F*!N,m,{reject:function(K){var q=_(this),re=q.reject;return re(K),q.promise}}),h(h.S+h.F*(L||!N),m,{resolve:function(K){return v(L&&this===w?y:this,K)}}),h(h.S+h.F*!(N&&I("./_iter-detect")(function(W){y.all(W).catch(M)})),m,{all:function(K){var q=this,re=_(q),ee=re.resolve,Ce=re.reject,xe=f(function(){var he=[],ke=0,_e=1;a(K,!1,function(de){var ce=ke++,ae=!1;he.push(void 0),_e++,q.resolve(de).then(function(Se){if(ae)return;ae=!0,he[ce]=Se,--_e||ee(he)},Ce)}),--_e||ee(he)});return xe.e&&Ce(xe.v),re.promise},race:function(K){var q=this,re=_(q),ee=re.reject,Ce=f(function(){a(K,!1,function(xe){q.resolve(xe).then(re.resolve,ee)})});return Ce.e&&ee(Ce.v),re.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(I,J,P){var L=I("./_export"),u=I("./_to-absolute-index"),S=String.fromCharCode,R=String.fromCodePoint;L(L.S+L.F*(!!R&&R.length!=1),"String",{fromCodePoint:function(o){for(var C=[],c=arguments.length,a=0,i;c>a;){if(i=+arguments[a++],u(i,1114111)!==i)throw RangeError(i+" is not a valid code point");C.push(i<65536?S(i):S(((i-=65536)>>10)+55296,i%1024+56320))}return C.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(I,J,P){"use strict";var L=I("./_string-at")(!0);I("./_iter-define")(String,"String",function(u){this._t=String(u),this._i=0},function(){var u=this._t,S=this._i,R;return S>=u.length?{value:void 0,done:!0}:(R=L(u,S),this._i+=R.length,{value:R,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(I,J,P){"use strict";var L=I("./_global"),u=I("./_has"),S=I("./_descriptors"),R=I("./_export"),h=I("./_redefine"),o=I("./_meta").KEY,C=I("./_fails"),c=I("./_shared"),a=I("./_set-to-string-tag"),i=I("./_uid"),r=I("./_wks"),l=I("./_wks-ext"),p=I("./_wks-define"),f=I("./_enum-keys"),b=I("./_is-array"),v=I("./_an-object"),m=I("./_is-object"),n=I("./_to-object"),d=I("./_to-iobject"),g=I("./_to-primitive"),T=I("./_property-desc"),y=I("./_object-create"),s=I("./_object-gopn-ext"),M=I("./_object-gopd"),A=I("./_object-gops"),x=I("./_object-dp"),E=I("./_object-keys"),w=M.f,_=x.f,N=s.f,j=L.Symbol,k=L.JSON,z=k&&k.stringify,H="prototype",F=r("_hidden"),G=r("toPrimitive"),B={}.propertyIsEnumerable,W=c("symbol-registry"),K=c("symbols"),q=c("op-symbols"),re=Object[H],ee=typeof j=="function"&&!!A.f,Ce=L.QObject,xe=!Ce||!Ce[H]||!Ce[H].findChild,he=S&&C(function(){return y(_({},"a",{get:function(){return _(this,"a",{value:7}).a}})).a!=7})?function(ge,De,Qe){var Ze=w(re,De);Ze&&delete re[De],_(ge,De,Qe),Ze&&ge!==re&&_(re,De,Ze)}:_,ke=function(ge){var De=K[ge]=y(j[H]);return De._k=ge,De},_e=ee&&typeof j.iterator=="symbol"?function(ge){return typeof ge=="symbol"}:function(ge){return ge instanceof j},de=function(De,Qe,Ze){return De===re&&de(q,Qe,Ze),v(De),Qe=g(Qe,!0),v(Ze),u(K,Qe)?(Ze.enumerable?(u(De,F)&&De[F][Qe]&&(De[F][Qe]=!1),Ze=y(Ze,{enumerable:T(0,!1)})):(u(De,F)||_(De,F,T(1,{})),De[F][Qe]=!0),he(De,Qe,Ze)):_(De,Qe,Ze)},ce=function(De,Qe){v(De);for(var Ze=f(Qe=d(Qe)),nt=0,tt=Ze.length,lt;tt>nt;)de(De,lt=Ze[nt++],Qe[lt]);return De},ae=function(De,Qe){return Qe===void 0?y(De):ce(y(De),Qe)},Se=function(De){var Qe=B.call(this,De=g(De,!0));return this===re&&u(K,De)&&!u(q,De)?!1:Qe||!u(this,De)||!u(K,De)||u(this,F)&&this[F][De]?Qe:!0},te=function(De,Qe){if(De=d(De),Qe=g(Qe,!0),De===re&&u(K,Qe)&&!u(q,Qe))return;var Ze=w(De,Qe);return Ze&&u(K,Qe)&&!(u(De,F)&&De[F][Qe])&&(Ze.enumerable=!0),Ze},ue=function(De){for(var Qe=N(d(De)),Ze=[],nt=0,tt;Qe.length>nt;)!u(K,tt=Qe[nt++])&&tt!=F&&tt!=o&&Ze.push(tt);return Ze},Oe=function(De){for(var Qe=De===re,Ze=N(Qe?q:d(De)),nt=[],tt=0,lt;Ze.length>tt;)u(K,lt=Ze[tt++])&&(Qe?u(re,lt):!0)&&nt.push(K[lt]);return nt};ee||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var De=i(arguments.length>0?arguments[0]:void 0),Qe=function(Ze){this===re&&Qe.call(q,Ze),u(this,F)&&u(this[F],De)&&(this[F][De]=!1),he(this,De,T(1,Ze))};return S&&xe&&he(re,De,{configurable:!0,set:Qe}),ke(De)},h(j[H],"toString",function(){return this._k}),M.f=te,x.f=de,I("./_object-gopn").f=s.f=ue,I("./_object-pie").f=Se,A.f=Oe,S&&!I("./_library")&&h(re,"propertyIsEnumerable",Se,!0),l.f=function(ge){return ke(r(ge))}),R(R.G+R.W+R.F*!ee,{Symbol:j});for(var le="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Q=0;le.length>Q;)r(le[Q++]);for(var Y=E(r.store),Z=0;Y.length>Z;)p(Y[Z++]);R(R.S+R.F*!ee,"Symbol",{for:function(ge){return u(W,ge+="")?W[ge]:W[ge]=j(ge)},keyFor:function(De){if(!_e(De))throw TypeError(De+" is not a symbol!");for(var Qe in W)if(W[Qe]===De)return Qe},useSetter:function(){xe=!0},useSimple:function(){xe=!1}}),R(R.S+R.F*!ee,"Object",{create:ae,defineProperty:de,defineProperties:ce,getOwnPropertyDescriptor:te,getOwnPropertyNames:ue,getOwnPropertySymbols:Oe});var be=C(function(){A.f(1)});R(R.S+R.F*be,"Object",{getOwnPropertySymbols:function(De){return A.f(n(De))}}),k&&R(R.S+R.F*(!ee||C(function(){var ge=j();return z([ge])!="[null]"||z({a:ge})!="{}"||z(Object(ge))!="{}"})),"JSON",{stringify:function(De){for(var Qe=[De],Ze=1,nt,tt;arguments.length>Ze;)Qe.push(arguments[Ze++]);return tt=nt=Qe[1],!m(nt)&&De===void 0||_e(De)?void 0:(b(nt)||(nt=function(lt,st){if(typeof tt=="function"&&(st=tt.call(this,lt,st)),!_e(st))return st}),Qe[1]=nt,z.apply(k,Qe))}}),j[H][G]||I("./_hide")(j[H],G,j[H].valueOf),a(j,"Symbol"),a(Math,"Math",!0),a(L.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(I,J,P){var L=I("./_export"),u=I("./_object-to-array")(!0);L(L.S,"Object",{entries:function(R){return u(R)}})},{"./_export":107,"./_object-to-array":143}],183:[function(I,J,P){"use strict";var L=I("./_export"),u=I("./_core"),S=I("./_global"),R=I("./_species-constructor"),h=I("./_promise-resolve");L(L.P+L.R,"Promise",{finally:function(o){var C=R(this,u.Promise||S.Promise),c=typeof o=="function";return this.then(c?function(a){return h(C,o()).then(function(){return a})}:o,c?function(a){return h(C,o()).then(function(){throw a})}:o)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(I,J,P){"use strict";var L=I("./_export"),u=I("./_new-promise-capability"),S=I("./_perform");L(L.S,"Promise",{try:function(R){var h=u.f(this),o=S(R);return(o.e?h.reject:h.resolve)(o.v),h.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(I,J,P){I("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(I,J,P){I("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(I,J,P){I("./es6.array.iterator");for(var L=I("./_global"),u=I("./_hide"),S=I("./_iterators"),R=I("./_wks")("toStringTag"),h="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(","),o=0;o0?"-":"+")+o(Math.floor(Math.abs(E)/60)*100+Math.abs(E)%60,4),S:["th","st","nd","rd"][d%10>3?0:(d%100-d%10!=10)*d%10],W:w,N:_};return f.replace(i,function(j){return j in N?N[j]:j.slice(1,j.length-1)})}}();h.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"},h.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 o(i,r){for(i=String(i),r=r||2;i.length]/;J.exports=u;function u(S){var R=""+S,h=L.exec(R);if(!h)return R;var o,C="",c=0,a=0;for(c=h.index;c0&&this._events[o].length>c&&(this._events[o].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[o].length),typeof console.trace=="function"&&console.trace())),this},L.prototype.on=L.prototype.addListener,L.prototype.once=function(o,C){if(!u(C))throw TypeError("listener must be a function");var c=!1;function a(){this.removeListener(o,a),c||(c=!0,C.apply(this,arguments))}return a.listener=C,this.on(o,a),this},L.prototype.removeListener=function(o,C){var c,a,i,r;if(!u(C))throw TypeError("listener must be a function");if(!this._events||!this._events[o])return this;if(c=this._events[o],i=c.length,a=-1,c===C||u(c.listener)&&c.listener===C)delete this._events[o],this._events.removeListener&&this.emit("removeListener",o,C);else if(R(c)){for(r=i;r-- >0;)if(c[r]===C||c[r].listener&&c[r].listener===C){a=r;break}if(a<0)return this;c.length===1?(c.length=0,delete this._events[o]):c.splice(a,1),this._events.removeListener&&this.emit("removeListener",o,C)}return this},L.prototype.removeAllListeners=function(o){var C,c;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[o]&&delete this._events[o],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(c=this._events[o],u(c))this.removeListener(o,c);else if(c)for(;c.length;)this.removeListener(o,c[c.length-1]);return delete this._events[o],this},L.prototype.listeners=function(o){var C;return!this._events||!this._events[o]?C=[]:u(this._events[o])?C=[this._events[o]]:C=this._events[o].slice(),C},L.prototype.listenerCount=function(o){if(this._events){var C=this._events[o];if(u(C))return 1;if(C)return C.length}return 0},L.listenerCount=function(o,C){return o.listenerCount(C)};function u(o){return typeof o=="function"}function S(o){return typeof o=="number"}function R(o){return typeof o=="object"&&o!==null}function h(o){return o===void 0}},{}],193:[function(I,J,P){var L=I("http"),u=J.exports;for(var S in L)L.hasOwnProperty(S)&&(u[S]=L[S]);u.request=function(R,h){return R||(R={}),R.scheme="https",R.protocol="https:",L.request.call(this,R,h)}},{http:231}],194:[function(I,J,P){/*! * humanize-ms - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */"use strict";var L=I("util"),u=I("ms");J.exports=function(S){if(typeof S=="number")return S;var R=u(S);if(R===void 0){var h=new Error(L.format("humanize-ms(%j) result undefined",S));console.warn(h.stack)}return R}},{ms:204,util:243}],195:[function(I,J,P){P.read=function(L,u,S,R,h){var o,C,c=h*8-R-1,a=(1<>1,r=-7,l=S?h-1:0,p=S?-1:1,f=L[u+l];for(l+=p,o=f&(1<<-r)-1,f>>=-r,r+=c;r>0;o=o*256+L[u+l],l+=p,r-=8);for(C=o&(1<<-r)-1,o>>=-r,r+=R;r>0;C=C*256+L[u+l],l+=p,r-=8);if(o===0)o=1-i;else{if(o===a)return C?NaN:(f?-1:1)*Infinity;C=C+Math.pow(2,R),o=o-i}return(f?-1:1)*C*Math.pow(2,o-R)},P.write=function(L,u,S,R,h,o){var C,c,a,i=o*8-h-1,r=(1<>1,p=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=R?0:o-1,b=R?1:-1,v=u<0||u===0&&1/u<0?1:0;for(u=Math.abs(u),isNaN(u)||u===Infinity?(c=isNaN(u)?1:0,C=r):(C=Math.floor(Math.log(u)/Math.LN2),u*(a=Math.pow(2,-C))<1&&(C--,a*=2),C+l>=1?u+=p/a:u+=p*Math.pow(2,1-l),u*a>=2&&(C++,a/=2),C+l>=r?(c=0,C=r):C+l>=1?(c=(u*a-1)*Math.pow(2,h),C=C+l):(c=u*Math.pow(2,l-1)*Math.pow(2,h),C=0));h>=8;L[S+f]=c&255,f+=b,c/=256,h-=8);for(C=C<0;L[S+f]=C&255,f+=b,C/=256,i-=8);L[S+f-b]|=v*128}},{}],196:[function(I,J,P){typeof Object.create=="function"?J.exports=function(u,S){S&&(u.super_=S,u.prototype=Object.create(S.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}))}:J.exports=function(u,S){if(S){u.super_=S;var R=function(){};R.prototype=S.prototype,u.prototype=new R,u.prototype.constructor=u}}},{}],197:[function(I,J,P){/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */J.exports=function(S){return S!=null&&(L(S)||u(S)||!!S._isBuffer)};function L(S){return!!S.constructor&&typeof S.constructor.isBuffer=="function"&&S.constructor.isBuffer(S)}function u(S){return typeof S.readFloatLE=="function"&&typeof S.slice=="function"&&L(S.slice(0,0))}},{}],198:[function(I,J,P){var L={}.toString;J.exports=Array.isArray||function(u){return L.call(u)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(I,J){typeof exports=="object"&&typeof module!="undefined"?module.exports=J(I):typeof define=="function"&&define.amd?define(J):J(I)})(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(I){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(I){for(var J={},P=0,L=I.length;P>>6)+fromCharCode(128|J&63):fromCharCode(224|J>>>12&15)+fromCharCode(128|J>>>6&63)+fromCharCode(128|J&63)}else{var J=65536+(I.charCodeAt(0)-55296)*1024+(I.charCodeAt(1)-56320);return fromCharCode(240|J>>>18&7)+fromCharCode(128|J>>>12&63)+fromCharCode(128|J>>>6&63)+fromCharCode(128|J&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(I){return I.replace(re_utob,cb_utob)},cb_encode=function(I){var J=[0,2,1][I.length%3],P=I.charCodeAt(0)<<16|(I.length>1?I.charCodeAt(1):0)<<8|(I.length>2?I.charCodeAt(2):0),L=[b64chars.charAt(P>>>18),b64chars.charAt(P>>>12&63),J>=2?"=":b64chars.charAt(P>>>6&63),J>=1?"=":b64chars.charAt(P&63)];return L.join("")},btoa=global.btoa?function(I){return global.btoa(I)}:function(I){return I.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(I){var J=Object.prototype.toString.call(I)==="[object Uint8Array]";return J?I.toString("base64"):btoa(utob(String(I)))},encode=function(I,J){return J?_encode(String(I)).replace(/[+\/]/g,function(P){return P=="+"?"-":"_"}).replace(/=/g,""):_encode(I)},encodeURI=function(I){return encode(I,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(I){switch(I.length){case 4:var J=(7&I.charCodeAt(0))<<18|(63&I.charCodeAt(1))<<12|(63&I.charCodeAt(2))<<6|63&I.charCodeAt(3),P=J-65536;return fromCharCode((P>>>10)+55296)+fromCharCode((P&1023)+56320);case 3:return fromCharCode((15&I.charCodeAt(0))<<12|(63&I.charCodeAt(1))<<6|63&I.charCodeAt(2));default:return fromCharCode((31&I.charCodeAt(0))<<6|63&I.charCodeAt(1))}},btou=function(I){return I.replace(re_btou,cb_btou)},cb_decode=function(I){var J=I.length,P=J%4,L=(J>0?b64tab[I.charAt(0)]<<18:0)|(J>1?b64tab[I.charAt(1)]<<12:0)|(J>2?b64tab[I.charAt(2)]<<6:0)|(J>3?b64tab[I.charAt(3)]:0),u=[fromCharCode(L>>>16),fromCharCode(L>>>8&255),fromCharCode(L&255)];return u.length-=[0,0,2,1][P],u.join("")},_atob=global.atob?function(I){return global.atob(I)}:function(I){return I.replace(/\S{1,4}/g,cb_decode)},atob=function(I){return _atob(String(I).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(I){return(I.constructor===buffer.constructor?I:buffer.from(I,"base64")).toString()}:function(I){return(I.constructor===buffer.constructor?I:new buffer(I,"base64")).toString()}:function(I){return btou(_atob(I))},decode=function(I){return _decode(String(I).replace(/[-_]/g,function(J){return J=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var I=global.Base64;return global.Base64=_Base64,I};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(I){return{value:I,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(I){return encode(this,I)})),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(I,J,P){/*! * merge-descriptors * Copyright(c) 2014 Jonathan Ong * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */"use strict";J.exports=u;var L=Object.prototype.hasOwnProperty;function u(S,R,h){if(!S)throw new TypeError("argument dest is required");if(!R)throw new TypeError("argument src is required");return h===void 0&&(h=!0),Object.getOwnPropertyNames(R).forEach(function(C){if(!h&&L.call(S,C))return;var c=Object.getOwnPropertyDescriptor(R,C);Object.defineProperty(S,C,c)}),S}},{}],201:[function(I,J,P){"use strict";function L(){this._types=Object.create(null),this._extensions=Object.create(null);for(var u=0;u0)return C(r);if(p==="number"&&isFinite(r))return l.long?a(r):c(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function C(r){if(r=String(r),r.length>100)return;var l=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(!l)return;var p=parseFloat(l[1]),f=(l[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return p*o;case"weeks":case"week":case"w":return p*h;case"days":case"day":case"d":return p*R;case"hours":case"hour":case"hrs":case"hr":case"h":return p*S;case"minutes":case"minute":case"mins":case"min":case"m":return p*u;case"seconds":case"second":case"secs":case"sec":case"s":return p*L;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}function c(r){var l=Math.abs(r);return l>=R?Math.round(r/R)+"d":l>=S?Math.round(r/S)+"h":l>=u?Math.round(r/u)+"m":l>=L?Math.round(r/L)+"s":r+"ms"}function a(r){var l=Math.abs(r);return l>=R?i(r,l,R,"day"):l>=S?i(r,l,S,"hour"):l>=u?i(r,l,u,"minute"):l>=L?i(r,l,L,"second"):r+" ms"}function i(r,l,p,f){var b=l>=p*1.5;return Math.round(r/p)+" "+f+(b?"s":"")}},{}],205:[function(I,J,P){(function(L){function u(o,C){for(var c=0,a=o.length-1;a>=0;a--){var i=o[a];i==="."?o.splice(a,1):i===".."?(o.splice(a,1),c++):c&&(o.splice(a,1),c--)}if(C)for(;c--;c)o.unshift("..");return o}P.resolve=function(){for(var o="",C=!1,c=arguments.length-1;c>=-1&&!C;c--){var a=c>=0?arguments[c]:L.cwd();if(typeof a!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!a)continue;o=a+"/"+o,C=a.charAt(0)==="/"}return o=u(R(o.split("/"),function(i){return!!i}),!C).join("/"),(C?"/":"")+o||"."},P.normalize=function(o){var C=P.isAbsolute(o),c=h(o,-1)==="/";return o=u(R(o.split("/"),function(a){return!!a}),!C).join("/"),!o&&!C&&(o="."),o&&c&&(o+="/"),(C?"/":"")+o},P.isAbsolute=function(o){return o.charAt(0)==="/"},P.join=function(){var o=Array.prototype.slice.call(arguments,0);return P.normalize(R(o,function(C,c){if(typeof C!="string")throw new TypeError("Arguments to path.join must be strings");return C}).join("/"))},P.relative=function(o,C){o=P.resolve(o).substr(1),C=P.resolve(C).substr(1);function c(b){for(var v=0;v=0&&!(b[m]!=="");m--);return v>m?[]:b.slice(v,m-v+1)}for(var a=c(o.split("/")),i=c(C.split("/")),r=Math.min(a.length,i.length),l=r,p=0;p=1;--r)if(C=o.charCodeAt(r),C===47){if(!i){a=r;break}}else i=!1;return a===-1?c?"/":".":c&&a===1?"/":o.slice(0,a)};function S(o){typeof o!="string"&&(o=o+"");var C=0,c=-1,a=!0,i;for(i=o.length-1;i>=0;--i)if(o.charCodeAt(i)===47){if(!a){C=i+1;break}}else c===-1&&(a=!1,c=i+1);return c===-1?"":o.slice(C,c)}P.basename=function(o,C){var c=S(o);return C&&c.substr(-1*C.length)===C&&(c=c.substr(0,c.length-C.length)),c},P.extname=function(o){typeof o!="string"&&(o=o+"");for(var C=-1,c=0,a=-1,i=!0,r=0,l=o.length-1;l>=0;--l){var p=o.charCodeAt(l);if(p===47){if(!i){c=l+1;break}continue}a===-1&&(i=!1,a=l+1),p===46?C===-1?C=l:r!==1&&(r=1):C!==-1&&(r=-1)}return C===-1||a===-1||r===0||r===1&&C===a-1&&C===c+1?"":o.slice(C,a)};function R(o,C){if(o.filter)return o.filter(C);for(var c=[],a=0;a * Copyright 2014-2018 Benjamin Tan * Copyright 2011-2013 John-David Dalton * Available under MIT license */(function(){"use strict";var u={function:!0,object:!0},S=u[typeof window]&&window||this,R=S,h=u[typeof P]&&P,o=u[typeof J]&&J&&!J.nodeType&&J,C=h&&o&&typeof L=="object"&&L;C&&(C.global===C||C.window===C||C.self===C)&&(S=C);var c=Math.pow(2,53)-1,a=/\bOpera/,i=this,r=Object.prototype,l=r.hasOwnProperty,p=r.toString;function f(x){return x=String(x),x.charAt(0).toUpperCase()+x.slice(1)}function b(x,E,w){var _={"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 E&&w&&/^Win/i.test(x)&&!/^Windows Phone /i.test(x)&&(_=_[/[\d.]+$/.exec(x)])&&(x="Windows "+_),x=String(x),E&&w&&(x=x.replace(RegExp(E,"i"),w)),x=m(x.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]),x}function v(x,E){var w=-1,_=x?x.length:0;if(typeof _=="number"&&_>-1&&_<=c)for(;++w<_;)E(x[w],w,x);else n(x,E)}function m(x){return x=s(x),/^(?:webOS|i(?:OS|P))/.test(x)?x:f(x)}function n(x,E){for(var w in x)l.call(x,w)&&E(x[w],w,x)}function d(x){return x==null?f(x):p.call(x).slice(8,-1)}function g(x,E){var w=x!=null?typeof x[E]:"number";return!/^(?:boolean|number|string|undefined)$/.test(w)&&(w=="object"?!!x[E]:!0)}function T(x){return String(x).replace(/([ -])(?!$)/g,"$1?")}function y(x,E){var w=null;return v(x,function(_,N){w=E(w,_,N,x)}),w}function s(x){return String(x).replace(/^ +| +$/g,"")}function M(x){var E=S,w=x&&typeof x=="object"&&d(x)!="String";w&&(E=x,x=null);var _=E.navigator||{},N=_.userAgent||"";x||(x=N);var j=w||i==R,k=w?!!_.likeChrome:/\bChrome\b/.test(x)&&!/internal|\n/i.test(p.toString()),z="Object",H=w?z:"ScriptBridgingProxyObject",F=w?z:"Environment",G=w&&E.java?"JavaPackage":d(E.java),B=w?z:"RuntimeObject",W=/\bJava/.test(G)&&E.java,K=W&&d(E.environment)==F,q=W?"a":"\u03B1",re=W?"b":"\u03B2",ee=E.document||{},Ce=E.operamini||E.opera,xe=a.test(xe=w&&Ce?Ce["[[Class]]"]:d(Ce))?xe:Ce=null,he,ke=x,_e=[],de=null,ce=x==N,ae=ce&&Ce&&typeof Ce.version=="function"&&Ce.version(),Se,te=Y([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),ue=be(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),Oe=De([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),le=Z({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),Q=ge(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function Y(tt){return y(tt,function(lt,st){return lt||RegExp("\\b"+(st.pattern||T(st))+"\\b","i").exec(x)&&(st.label||st)})}function Z(tt){return y(tt,function(lt,st,je){return lt||(st[Oe]||st[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Oe)]||RegExp("\\b"+T(je)+"(?:\\b|\\w*\\d)","i").exec(x))&&je})}function be(tt){return y(tt,function(lt,st){return lt||RegExp("\\b"+(st.pattern||T(st))+"\\b","i").exec(x)&&(st.label||st)})}function ge(tt){return y(tt,function(lt,st){var je=st.pattern||T(st);return!lt&&(lt=RegExp("\\b"+je+"(?:/[\\d.]+|[ \\w.]*)","i").exec(x))&&(lt=b(lt,je,st.label||st)),lt})}function De(tt){return y(tt,function(lt,st){var je=st.pattern||T(st);return!lt&&(lt=RegExp("\\b"+je+" *\\d+[.\\w_]*","i").exec(x)||RegExp("\\b"+je+" *\\w+-[\\w]*","i").exec(x)||RegExp("\\b"+je+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(x))&&((lt=String(st.label&&!RegExp(je,"i").test(st.label)?st.label:lt).split("/"))[1]&&!/[\d.]+/.test(lt[0])&&(lt[0]+=" "+lt[1]),st=st.label||st,lt=m(lt[0].replace(RegExp(je,"i"),st).replace(RegExp("; *(?:"+st+"[_-])?","i")," ").replace(RegExp("("+st+")[-_.]?(\\w)","i"),"$1 $2"))),lt})}function Qe(tt){return y(tt,function(lt,st){return lt||(RegExp(st+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(x)||0)[1]||null})}function Ze(){return this.description||""}if(te&&(te=[te]),le&&!Oe&&(Oe=De([le])),(he=/\bGoogle TV\b/.exec(Oe))&&(Oe=he[0]),/\bSimulator\b/i.test(x)&&(Oe=(Oe?Oe+" ":"")+"Simulator"),ue=="Opera Mini"&&/\bOPiOS\b/.test(x)&&_e.push("running in Turbo/Uncompressed mode"),ue=="IE"&&/\blike iPhone OS\b/.test(x)?(he=M(x.replace(/like iPhone OS/,"")),le=he.manufacturer,Oe=he.product):/^iP/.test(Oe)?(ue||(ue="Safari"),Q="iOS"+((he=/ OS ([\d_]+)/i.exec(x))?" "+he[1].replace(/_/g,"."):"")):ue=="Konqueror"&&!/buntu/i.test(Q)?Q="Kubuntu":le&&le!="Google"&&(/Chrome/.test(ue)&&!/\bMobile Safari\b/i.test(x)||/\bVita\b/.test(Oe))||/\bAndroid\b/.test(Q)&&/^Chrome/.test(ue)&&/\bVersion\//i.test(x)?(ue="Android Browser",Q=/\bAndroid\b/.test(Q)?Q:"Android"):ue=="Silk"?(/\bMobi/i.test(x)||(Q="Android",_e.unshift("desktop mode")),/Accelerated *= *true/i.test(x)&&_e.unshift("accelerated")):ue=="PaleMoon"&&(he=/\bFirefox\/([\d.]+)\b/.exec(x))?_e.push("identifying as Firefox "+he[1]):ue=="Firefox"&&(he=/\b(Mobile|Tablet|TV)\b/i.exec(x))?(Q||(Q="Firefox OS"),Oe||(Oe=he[1])):!ue||(he=!/\bMinefield\b/i.test(x)&&/\b(?:Firefox|Safari)\b/.exec(ue))?(ue&&!Oe&&/[\/,]|^[^(]+?\)/.test(x.slice(x.indexOf(he+"/")+8))&&(ue=null),(he=Oe||le||Q)&&(Oe||le||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Q))&&(ue=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Q)?Q:he)+" Browser")):ue=="Electron"&&(he=(/\bChrome\/([\d.]+)\b/.exec(x)||0)[1])&&_e.push("Chromium "+he),ae||(ae=Qe(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",T(ue),"(?:Firefox|Minefield|NetFront)"])),(he=te=="iCab"&&parseFloat(ae)>3&&"WebKit"||/\bOpera\b/.test(ue)&&(/\bOPR\b/.test(x)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(x)&&!/^(?:Trident|EdgeHTML)$/.test(te)&&"WebKit"||!te&&/\bMSIE\b/i.test(x)&&(Q=="Mac OS"?"Tasman":"Trident")||te=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ue)&&"NetFront")&&(te=[he]),ue=="IE"&&(he=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(x)||0)[1])?(ue+=" Mobile",Q="Windows Phone "+(/\+$/.test(he)?he:he+".x"),_e.unshift("desktop mode")):/\bWPDesktop\b/i.test(x)?(ue="IE Mobile",Q="Windows Phone 8.x",_e.unshift("desktop mode"),ae||(ae=(/\brv:([\d.]+)/.exec(x)||0)[1])):ue!="IE"&&te=="Trident"&&(he=/\brv:([\d.]+)/.exec(x))&&(ue&&_e.push("identifying as "+ue+(ae?" "+ae:"")),ue="IE",ae=he[1]),ce){if(g(E,"global"))if(W&&(he=W.lang.System,ke=he.getProperty("os.arch"),Q=Q||he.getProperty("os.name")+" "+he.getProperty("os.version")),K){try{ae=E.require("ringo/engine").version.join("."),ue="RingoJS"}catch(tt){(he=E.system)&&he.global.system==E.system&&(ue="Narwhal",Q||(Q=he[0].os||null))}ue||(ue="Rhino")}else typeof E.process=="object"&&!E.process.browser&&(he=E.process)&&(typeof he.versions=="object"&&(typeof he.versions.electron=="string"?(_e.push("Node "+he.versions.node),ue="Electron",ae=he.versions.electron):typeof he.versions.nw=="string"&&(_e.push("Chromium "+ae,"Node "+he.versions.node),ue="NW.js",ae=he.versions.nw)),ue||(ue="Node.js",ke=he.arch,Q=he.platform,ae=/[\d.]+/.exec(he.version),ae=ae?ae[0]:null));else d(he=E.runtime)==H?(ue="Adobe AIR",Q=he.flash.system.Capabilities.os):d(he=E.phantom)==B?(ue="PhantomJS",ae=(he=he.version||null)&&he.major+"."+he.minor+"."+he.patch):typeof ee.documentMode=="number"&&(he=/\bTrident\/(\d+)/i.exec(x))?(ae=[ae,ee.documentMode],(he=+he[1]+4)!=ae[1]&&(_e.push("IE "+ae[1]+" mode"),te&&(te[1]=""),ae[1]=he),ae=ue=="IE"?String(ae[1].toFixed(1)):ae[0]):typeof ee.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ue)&&(_e.push("masking as "+ue+" "+ae),ue="IE",ae="11.0",te=["Trident"],Q="Windows");Q=Q&&m(Q)}if(ae&&(he=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(ae)||/(?:alpha|beta)(?: ?\d)?/i.exec(x+";"+(ce&&_.appMinorVersion))||/\bMinefield\b/i.test(x)&&"a")&&(de=/b/i.test(he)?"beta":"alpha",ae=ae.replace(RegExp(he+"\\+?$"),"")+(de=="beta"?re:q)+(/\d+\+?/.exec(he)||"")),ue=="Fennec"||ue=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Q))ue="Firefox Mobile";else if(ue=="Maxthon"&&ae)ae=ae.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Oe))Oe=="Xbox 360"&&(Q=null),Oe=="Xbox 360"&&/\bIEMobile\b/.test(x)&&_e.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(ue)||ue&&!Oe&&!/Browser|Mobi/.test(ue))&&(Q=="Windows CE"||/Mobi/i.test(x)))ue+=" Mobile";else if(ue=="IE"&&ce)try{E.external===null&&_e.unshift("platform preview")}catch(tt){_e.unshift("embedded")}else(/\bBlackBerry\b/.test(Oe)||/\bBB10\b/.test(x))&&(he=(RegExp(Oe.replace(/ +/g," *")+"/([.\\d]+)","i").exec(x)||0)[1]||ae)?(he=[he,/BB10/.test(x)],Q=(he[1]?(Oe=null,le="BlackBerry"):"Device Software")+" "+he[0],ae=null):this!=n&&Oe!="Wii"&&(ce&&Ce||/Opera/.test(ue)&&/\b(?:MSIE|Firefox)\b/i.test(x)||ue=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Q)||ue=="IE"&&(Q&&!/^Win/.test(Q)&&ae>5.5||/\bWindows XP\b/.test(Q)&&ae>8||ae==8&&!/\bTrident\b/.test(x)))&&!a.test(he=M.call(n,x.replace(a,"")+";"))&&he.name&&(he="ing as "+he.name+((he=he.version)?" "+he:""),a.test(ue)?(/\bIE\b/.test(he)&&Q=="Mac OS"&&(Q=null),he="identify"+he):(he="mask"+he,xe?ue=m(xe.replace(/([a-z])([A-Z])/g,"$1 $2")):ue="Opera",/\bIE\b/.test(he)&&(Q=null),ce||(ae=null)),te=["Presto"],_e.push(he));(he=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(x)||0)[1])&&(he=[parseFloat(he.replace(/\.(\d)$/,".0$1")),he],ue=="Safari"&&he[1].slice(-1)=="+"?(ue="WebKit Nightly",de="alpha",ae=he[1].slice(0,-1)):(ae==he[1]||ae==(he[2]=(/\bSafari\/([\d.]+\+?)/i.exec(x)||0)[1]))&&(ae=null),he[1]=(/\bChrome\/([\d.]+)/i.exec(x)||0)[1],he[0]==537.36&&he[2]==537.36&&parseFloat(he[1])>=28&&te=="WebKit"&&(te=["Blink"]),!ce||!k&&!he[1]?(te&&(te[1]="like Safari"),he=(he=he[0],he<400?1:he<500?2:he<526?3:he<533?4:he<534?"4+":he<535?5:he<537?6:he<538?7:he<601?8:"8")):(te&&(te[1]="like Chrome"),he=he[1]||(he=he[0],he<530?1:he<532?2:he<532.05?3:he<533?4:he<534.03?5:he<534.07?6:he<534.1?7:he<534.13?8:he<534.16?9:he<534.24?10:he<534.3?11:he<535.01?12:he<535.02?"13+":he<535.07?15:he<535.11?16:he<535.19?17:he<536.05?18:he<536.1?19:he<537.01?20:he<537.11?"21+":he<537.13?23:he<537.18?24:he<537.24?25:he<537.36?26:te!="Blink"?"27":"28")),te&&(te[1]+=" "+(he+=typeof he=="number"?".x":/[.+]/.test(he)?"":"+")),ue=="Safari"&&(!ae||parseInt(ae)>45)&&(ae=he)),ue=="Opera"&&(he=/\bzbov|zvav$/.exec(Q))?(ue+=" ",_e.unshift("desktop mode"),he=="zvav"?(ue+="Mini",ae=null):ue+="Mobile",Q=Q.replace(RegExp(" *"+he+"$"),"")):ue=="Safari"&&/\bChrome\b/.exec(te&&te[1])&&(_e.unshift("desktop mode"),ue="Chrome Mobile",ae=null,/\bOS X\b/.test(Q)?(le="Apple",Q="iOS 4.3+"):Q=null),ae&&ae.indexOf(he=/[\d.]+$/.exec(Q))==0&&x.indexOf("/"+he+"-")>-1&&(Q=s(Q.replace(he,""))),te&&!/\b(?:Avant|Nook)\b/.test(ue)&&(/Browser|Lunascape|Maxthon/.test(ue)||ue!="Safari"&&/^iOS/.test(Q)&&/\bSafari\b/.test(te[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ue)&&te[1])&&((he=te[te.length-1])&&_e.push(he)),_e.length&&(_e=["("+_e.join("; ")+")"]),le&&Oe&&Oe.indexOf(le)<0&&_e.push("on "+le),Oe&&_e.push((/^on /.test(_e[_e.length-1])?"":"on ")+Oe),Q&&(he=/ ([\d.+]+)$/.exec(Q),Se=he&&Q.charAt(Q.length-he[0].length-1)=="/",Q={architecture:32,family:he&&!Se?Q.replace(he[0],""):Q,version:he?he[1]:null,toString:function(){var tt=this.version;return this.family+(tt&&!Se?" "+tt:"")+(this.architecture==64?" 64-bit":"")}}),(he=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(ke))&&!/\bi686\b/i.test(ke)?(Q&&(Q.architecture=64,Q.family=Q.family.replace(RegExp(" *"+he),"")),ue&&(/\bWOW64\b/i.test(x)||ce&&/\w(?:86|32)$/.test(_.cpuClass||_.platform)&&!/\bWin64; x64\b/i.test(x))&&_e.unshift("32-bit")):Q&&/^OS X/.test(Q.family)&&ue=="Chrome"&&parseFloat(ae)>=39&&(Q.architecture=64),x||(x=null);var nt={};return nt.description=x,nt.layout=te&&te[0],nt.manufacturer=le,nt.name=ue,nt.prerelease=de,nt.product=Oe,nt.ua=x,nt.version=ue&&ae,nt.os=Q||{architecture:null,family:null,version:null,toString:function(){return"null"}},nt.parse=M,nt.toString=Ze,nt.version&&_e.unshift(ae),nt.name&&_e.unshift(ue),Q&&ue&&!(Q==String(Q).split(" ")[0]&&(Q==ue.split(" ")[0]||Oe))&&_e.push(Oe?"("+Q+")":"on "+Q),_e.length&&(nt.description=_e.join(" ")),nt}var A=M();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(S.platform=A,define(function(){return A})):h&&o?n(A,function(x,E){h[E]=x}):S.platform=A}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(I,J,P){(function(L){"use strict";typeof L=="undefined"||!L.version||L.version.indexOf("v0.")===0||L.version.indexOf("v1.")===0&&L.version.indexOf("v1.8.")!==0?J.exports={nextTick:u}:J.exports=L;function u(S,R,h,o){if(typeof S!="function")throw new TypeError('"callback" argument must be a function');var C=arguments.length,c,a;switch(C){case 0:case 1:return L.nextTick(S);case 2:return L.nextTick(function(){S.call(null,R)});case 3:return L.nextTick(function(){S.call(null,R,h)});case 4:return L.nextTick(function(){S.call(null,R,h,o)});default:for(c=new Array(C-1),a=0;a1)for(var n=1;n= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=c-a,T=Math.floor,y=String.fromCharCode,s;function M(G){throw new RangeError(d[G])}function A(G,B){for(var W=G.length,K=[];W--;)K[W]=B(G[W]);return K}function x(G,B){var W=G.split("@"),K="";W.length>1&&(K=W[0]+"@",G=W[1]),G=G.replace(n,".");var q=G.split("."),re=A(q,B).join(".");return K+re}function E(G){for(var B=[],W=0,K=G.length,q,re;W=55296&&q<=56319&&W65535&&(B-=65536,W+=y(B>>>10&1023|55296),B=56320|B&1023),W+=y(B),W}).join("")}function _(G){return G-48<10?G-22:G-65<26?G-65:G-97<26?G-97:c}function N(G,B){return G+22+75*(G<26)-((B!=0)<<5)}function j(G,B,W){var K=0;for(G=W?T(G/l):G>>1,G+=T(G/B);G>g*i>>1;K+=c)G=T(G/g);return T(K+(g+1)*G/(G+r))}function k(G){var B=[],W=G.length,K,q=0,re=f,ee=p,Ce,xe,he,ke,_e,de,ce,ae,Se;for(Ce=G.lastIndexOf(b),Ce<0&&(Ce=0),xe=0;xe=128&&M("not-basic"),B.push(G.charCodeAt(xe));for(he=Ce>0?Ce+1:0;he=W&&M("invalid-input"),ce=_(G.charCodeAt(he++)),(ce>=c||ce>T((C-q)/_e))&&M("overflow"),q+=ce*_e,ae=de<=ee?a:de>=ee+i?i:de-ee,ceT(C/Se)&&M("overflow"),_e*=Se;K=B.length+1,ee=j(q-ke,K,ke==0),T(q/K)>C-re&&M("overflow"),re+=T(q/K),q%=K,B.splice(q++,0,re)}return w(B)}function z(G){var B,W,K,q,re,ee,Ce,xe,he,ke,_e,de=[],ce,ae,Se,te;for(G=E(G),ce=G.length,B=f,W=0,re=p,ee=0;ee=B&&_eT((C-W)/ae)&&M("overflow"),W+=(Ce-B)*ae,B=Ce,ee=0;eeC&&M("overflow"),_e==B){for(xe=W,he=c;!(ke=he<=re?a:he>=re+i?i:he-re,xe0&&i>a&&(i=a);for(var r=0;r=0?(f=l.substr(0,p),b=l.substr(p+1)):(f=l,b=""),v=decodeURIComponent(f),m=decodeURIComponent(b),L(C,v)?u(C[v])?C[v].push(m):C[v]=[C[v],m]:C[v]=m}return C};var u=Array.isArray||function(S){return Object.prototype.toString.call(S)==="[object Array]"}},{}],211:[function(I,J,P){"use strict";var L=function(h){switch(typeof h){case"string":return h;case"boolean":return h?"true":"false";case"number":return isFinite(h)?h:"";default:return""}};J.exports=function(h,o,C,c){return o=o||"&",C=C||"=",h===null&&(h=void 0),typeof h=="object"?S(R(h),function(a){var i=encodeURIComponent(L(a))+C;return u(h[a])?S(h[a],function(r){return i+encodeURIComponent(L(r))}).join(o):i+encodeURIComponent(L(h[a]))}).join(o):c?encodeURIComponent(L(c))+C+encodeURIComponent(L(h)):""};var u=Array.isArray||function(h){return Object.prototype.toString.call(h)==="[object Array]"};function S(h,o){if(h.map)return h.map(o);for(var C=[],c=0;c0?(typeof ue!="string"&&!Y.objectMode&&(0,R.default)(ue)!==f.prototype&&(ue=v(ue)),le?Y.endEmitted?te.emit("error",new Error("stream.unshift() after end event")):_(te,Y,ue,!0):Y.ended?te.emit("error",new Error("stream.push() after EOF")):(Y.reading=!1,Y.decoder&&!Oe?(ue=Y.decoder.write(ue),Y.objectMode||ue.length!==0?_(te,Y,ue,!1):W(te,Y)):_(te,Y,ue,!1))):le||(Y.reading=!1)}return j(Y)}function _(te,ue,Oe,le){ue.flowing&&ue.length===0&&!ue.sync?(te.emit("data",Oe),te.read(0)):(ue.length+=ue.objectMode?1:Oe.length,le?ue.buffer.unshift(Oe):ue.buffer.push(Oe),ue.needReadable&&G(te)),W(te,ue)}function N(te,ue){var Oe;return!m(ue)&&typeof ue!="string"&&ue!==void 0&&!te.objectMode&&(Oe=new TypeError("Invalid non-string/buffer chunk")),Oe}function j(te){return!te.ended&&(te.needReadable||te.length=k?te=k:(te--,te|=te>>>1,te|=te>>>2,te|=te>>>4,te|=te>>>8,te|=te>>>16,te++),te}function H(te,ue){return te<=0||ue.length===0&&ue.ended?0:ue.objectMode?1:te!==te?ue.flowing&&ue.length?ue.buffer.head.data.length:ue.length:(te>ue.highWaterMark&&(ue.highWaterMark=z(te)),te<=ue.length?te:ue.ended?ue.length:(ue.needReadable=!0,0))}E.prototype.read=function(te){g("read",te),te=parseInt(te,10);var ue=this._readableState,Oe=te;if(te!==0&&(ue.emittedReadable=!1),te===0&&ue.needReadable&&(ue.length>=ue.highWaterMark||ue.ended))return g("read: emitReadable",ue.length,ue.ended),ue.length===0&&ue.ended?ce(this):G(this),null;if(te=H(te,ue),te===0&&ue.ended)return ue.length===0&&ce(this),null;var le=ue.needReadable;g("need readable",le),(ue.length===0||ue.length-te0?Q=he(te,ue):Q=null,Q===null?(ue.needReadable=!0,te=0):ue.length-=te,ue.length===0&&(ue.ended||(ue.needReadable=!0),Oe!==te&&ue.ended&&ce(this)),Q!==null&&this.emit("data",Q),Q};function F(te,ue){if(ue.ended)return;if(ue.decoder){var Oe=ue.decoder.end();Oe&&Oe.length&&(ue.buffer.push(Oe),ue.length+=ue.objectMode?1:Oe.length)}ue.ended=!0,G(te)}function G(te){var ue=te._readableState;ue.needReadable=!1,ue.emittedReadable||(g("emitReadable",ue.flowing),ue.emittedReadable=!0,ue.sync?c.nextTick(B,te):B(te))}function B(te){g("emit readable"),te.emit("readable"),xe(te)}function W(te,ue){ue.readingMore||(ue.readingMore=!0,c.nextTick(K,te,ue))}function K(te,ue){for(var Oe=ue.length;!ue.reading&&!ue.flowing&&!ue.ended&&ue.length1&&Se(le.pipes,te)!==-1)&&!De&&(g("false write response, pause",Oe._readableState.awaitDrain),Oe._readableState.awaitDrain++,Ze=!0),Oe.pause())}function tt(Re){g("onerror",Re),je(),te.removeListener("error",tt),l(te,"error")===0&&te.emit("error",Re)}A(te,"error",tt);function lt(){te.removeListener("finish",st),je()}te.once("close",lt);function st(){g("onfinish"),te.removeListener("close",lt),je()}te.once("finish",st);function je(){g("unpipe"),Oe.unpipe(te)}return te.emit("pipe",Oe),le.flowing||(g("pipe resume"),Oe.resume()),te};function q(te){return function(){var ue=te._readableState;g("pipeOnDrain",ue.awaitDrain),ue.awaitDrain&&ue.awaitDrain--,ue.awaitDrain===0&&l(te,"data")&&(ue.flowing=!0,xe(te))}}E.prototype.unpipe=function(te){var ue=this._readableState,Oe={hasUnpiped:!1};if(ue.pipesCount===0)return this;if(ue.pipesCount===1)return te&&te!==ue.pipes?this:(te||(te=ue.pipes),ue.pipes=null,ue.pipesCount=0,ue.flowing=!1,te&&te.emit("unpipe",this,Oe),this);if(!te){var le=ue.pipes,Q=ue.pipesCount;ue.pipes=null,ue.pipesCount=0,ue.flowing=!1;for(var Y=0;Y=ue.length?(ue.decoder?Oe=ue.buffer.join(""):ue.buffer.length===1?Oe=ue.buffer.head.data:Oe=ue.buffer.concat(ue.length),ue.buffer.clear()):Oe=ke(te,ue.buffer,ue.decoder),Oe}function ke(te,ue,Oe){var le;return teY.length?Y.length:te;if(Z===Y.length?Q+=Y:Q+=Y.slice(0,te),te-=Z,te===0){Z===Y.length?(++le,Oe.next?ue.head=Oe.next:ue.head=ue.tail=null):(ue.head=Oe,Oe.data=Y.slice(Z));break}++le}return ue.length-=le,Q}function de(te,ue){var Oe=f.allocUnsafe(te),le=ue.head,Q=1;for(le.data.copy(Oe),te-=le.data.length;le=le.next;){var Y=le.data,Z=te>Y.length?Y.length:te;if(Y.copy(Oe,Oe.length-te,0,Z),te-=Z,te===0){Z===Y.length?(++Q,le.next?ue.head=le.next:ue.head=ue.tail=null):(ue.head=le,le.data=Y.slice(Z));break}++Q}return ue.length-=Q,Oe}function ce(te){var ue=te._readableState;if(ue.length>0)throw new Error('"endReadable()" called on non-empty stream');ue.endEmitted||(ue.ended=!0,c.nextTick(ae,ue,te))}function ae(te,ue){!te.endEmitted&&te.length===0&&(te.endEmitted=!0,ue.readable=!1,ue.emit("end"))}function Se(te,ue){for(var Oe=0,le=te.length;Oe-1?l.default:f.nextTick,n;N.WritableState=w;var d=(0,i.default)(I("core-util-is"));d.inherits=I("inherits");var g={deprecate:I("util-deprecate")},T=I("./internal/streams/stream"),y=I("safe-buffer").Buffer,s=u.Uint8Array||function(){};function M(de){return y.from(de)}function A(de){return y.isBuffer(de)||de instanceof s}var x=I("./internal/streams/destroy");d.inherits(N,T);function E(){}function w(de,ce){n=n||I("./_stream_duplex"),de=de||{};var ae=ce instanceof n;this.objectMode=!!de.objectMode,ae&&(this.objectMode=this.objectMode||!!de.writableObjectMode);var Se=de.highWaterMark,te=de.writableHighWaterMark,ue=this.objectMode?16:16*1024;Se||Se===0?this.highWaterMark=Se:ae&&(te||te===0)?this.highWaterMark=te:this.highWaterMark=ue,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 Oe=de.decodeStrings===!1;this.decodeStrings=!Oe,this.defaultEncoding=de.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(le){W(ce,le)},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 v(this)}w.prototype.getBuffer=function(){for(var ce=this.bufferedRequest,ae=[];ce;)ae.push(ce),ce=ce.next;return ae},function(){try{Object.defineProperty(w.prototype,"buffer",{get:g.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(de){}}();var _;typeof c.default=="function"&&o.default&&typeof Function.prototype[o.default]=="function"?(_=Function.prototype[o.default],(0,R.default)(N,o.default,{value:function(ce){return _.call(this,ce)?!0:this!==N?!1:ce&&ce._writableState instanceof w}})):_=function(ce){return ce instanceof this};function N(de){if(n=n||I("./_stream_duplex"),!_.call(N,this)&&!(this instanceof n))return new N(de);this._writableState=new w(de,this),this.writable=!0,de&&(typeof de.write=="function"&&(this._write=de.write),typeof de.writev=="function"&&(this._writev=de.writev),typeof de.destroy=="function"&&(this._destroy=de.destroy),typeof de.final=="function"&&(this._final=de.final)),T.call(this)}N.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function j(de,ce){var ae=new Error("write after end");de.emit("error",ae),f.nextTick(ce,ae)}function k(de,ce,ae,Se){var te=!0,ue=!1;return ae===null?ue=new TypeError("May not write null values to stream"):typeof ae!="string"&&ae!==void 0&&!ce.objectMode&&(ue=new TypeError("Invalid non-string/buffer chunk")),ue&&(de.emit("error",ue),f.nextTick(Se,ue),te=!1),te}N.prototype.write=function(de,ce,ae){var Se=this._writableState,te=!1,ue=!Se.objectMode&&A(de);return ue&&!y.isBuffer(de)&&(de=M(de)),typeof ce=="function"&&(ae=ce,ce=null),ue?ce="buffer":ce||(ce=Se.defaultEncoding),typeof ae!="function"&&(ae=E),Se.ended?j(this,ae):(ue||k(this,Se,de,ae))&&(Se.pendingcb++,te=H(this,Se,ue,de,ce,ae)),te},N.prototype.cork=function(){var de=this._writableState;de.corked++},N.prototype.uncork=function(){var de=this._writableState;de.corked&&(de.corked--,!de.writing&&!de.corked&&!de.finished&&!de.bufferProcessing&&de.bufferedRequest&&re(this,de))},N.prototype.setDefaultEncoding=function(ce){if(typeof ce=="string"&&(ce=ce.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ce+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ce);return this._writableState.defaultEncoding=ce,this};function z(de,ce,ae){return!de.objectMode&&de.decodeStrings!==!1&&typeof ce=="string"&&(ce=y.from(ce,ae)),ce}Object.defineProperty(N.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function H(de,ce,ae,Se,te,ue){if(!ae){var Oe=z(ce,Se,te);Se!==Oe&&(ae=!0,te="buffer",Se=Oe)}var le=ce.objectMode?1:Se.length;ce.length+=le;var Q=ce.length0?this.tail.next=c:this.head=c,this.tail=c,++this.length},h.prototype.unshift=function(C){var c={data:C,next:this.head};this.length===0&&(this.tail=c),this.head=c,++this.length},h.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},h.prototype.clear=function(){this.head=this.tail=null,this.length=0},h.prototype.join=function(C){if(this.length===0)return"";for(var c=this.head,a=""+c.data;c=c.next;)a+=C+c.data;return a},h.prototype.concat=function(C){if(this.length===0)return u.alloc(0);if(this.length===1)return this.head.data;for(var c=u.allocUnsafe(C>>>0),a=this.head,i=0;a;)R(a.data,c,i),i+=a.data.length,a=a.next;return c},h}(),S&&S.inspect&&S.inspect.custom&&(J.exports.prototype[S.inspect.custom]=function(){var h=S.inspect({length:this.length});return this.constructor.name+" "+h})},{"safe-buffer":228,util:71}],220:[function(I,J,P){"use strict";var L=I("process-nextick-args");function u(h,o){var C=this,c=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return c||a?(o?o(h):h&&(!this._writableState||!this._writableState.errorEmitted)&&L.nextTick(R,this,h),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(h||null,function(i){!o&&i?(L.nextTick(R,C,i),C._writableState&&(C._writableState.errorEmitted=!0)):o&&o(i)}),this)}function S(){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 R(h,o){h.emit("error",o)}J.exports={destroy:u,undestroy:S}},{"process-nextick-args":207}],221:[function(I,J,P){"use strict";J.exports=I("events").EventEmitter},{events:192}],222:[function(I,J,P){J.exports=I("./readable").PassThrough},{"./readable":223}],223:[function(I,J,P){P=J.exports=I("./lib/_stream_readable.js"),P.Stream=P,P.Readable=P,P.Writable=I("./lib/_stream_writable.js"),P.Duplex=I("./lib/_stream_duplex.js"),P.Transform=I("./lib/_stream_transform.js"),P.PassThrough=I("./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(I,J,P){J.exports=I("./readable").Transform},{"./readable":223}],225:[function(I,J,P){J.exports=I("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(I,J,P){var L=function(){return this}()||Function("return this")(),u=L.regeneratorRuntime&&Object.getOwnPropertyNames(L).indexOf("regeneratorRuntime")>=0,S=u&&L.regeneratorRuntime;if(L.regeneratorRuntime=void 0,J.exports=I("./runtime"),u)L.regeneratorRuntime=S;else try{delete L.regeneratorRuntime}catch(R){L.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(I,J,P){!function(L){"use strict";var u=Object.prototype,S=u.hasOwnProperty,R,h=typeof Symbol=="function"?Symbol:{},o=h.iterator||"@@iterator",C=h.asyncIterator||"@@asyncIterator",c=h.toStringTag||"@@toStringTag",a=typeof J=="object",i=L.regeneratorRuntime;if(i){a&&(J.exports=i);return}i=L.regeneratorRuntime=a?J.exports:{};function r(H,F,G,B){var W=F&&F.prototype instanceof n?F:n,K=Object.create(W.prototype),q=new j(B||[]);return K._invoke=E(H,G,q),K}i.wrap=r;function l(H,F,G){try{return{type:"normal",arg:H.call(F,G)}}catch(B){return{type:"throw",arg:B}}}var p="suspendedStart",f="suspendedYield",b="executing",v="completed",m={};function n(){}function d(){}function g(){}var T={};T[o]=function(){return this};var y=Object.getPrototypeOf,s=y&&y(y(k([])));s&&s!==u&&S.call(s,o)&&(T=s);var M=g.prototype=n.prototype=Object.create(T);d.prototype=M.constructor=g,g.constructor=d,g[c]=d.displayName="GeneratorFunction";function A(H){["next","throw","return"].forEach(function(F){H[F]=function(G){return this._invoke(F,G)}})}i.isGeneratorFunction=function(H){var F=typeof H=="function"&&H.constructor;return F?F===d||(F.displayName||F.name)==="GeneratorFunction":!1},i.mark=function(H){return Object.setPrototypeOf?Object.setPrototypeOf(H,g):(H.__proto__=g,c in H||(H[c]="GeneratorFunction")),H.prototype=Object.create(M),H},i.awrap=function(H){return{__await:H}};function x(H){function F(W,K,q,re){var ee=l(H[W],H,K);if(ee.type==="throw")re(ee.arg);else{var Ce=ee.arg,xe=Ce.value;return xe&&typeof xe=="object"&&S.call(xe,"__await")?Promise.resolve(xe.__await).then(function(he){F("next",he,q,re)},function(he){F("throw",he,q,re)}):Promise.resolve(xe).then(function(he){Ce.value=he,q(Ce)},re)}}var G;function B(W,K){function q(){return new Promise(function(re,ee){F(W,K,re,ee)})}return G=G?G.then(q,q):q()}this._invoke=B}A(x.prototype),x.prototype[C]=function(){return this},i.AsyncIterator=x,i.async=function(H,F,G,B){var W=new x(r(H,F,G,B));return i.isGeneratorFunction(F)?W:W.next().then(function(K){return K.done?K.value:W.next()})};function E(H,F,G){var B=p;return function(K,q){if(B===b)throw new Error("Generator is already running");if(B===v){if(K==="throw")throw q;return z()}for(G.method=K,G.arg=q;;){var re=G.delegate;if(re){var ee=w(re,G);if(ee){if(ee===m)continue;return ee}}if(G.method==="next")G.sent=G._sent=G.arg;else if(G.method==="throw"){if(B===p)throw B=v,G.arg;G.dispatchException(G.arg)}else G.method==="return"&&G.abrupt("return",G.arg);B=b;var Ce=l(H,F,G);if(Ce.type==="normal"){if(B=G.done?v:f,Ce.arg===m)continue;return{value:Ce.arg,done:G.done}}else Ce.type==="throw"&&(B=v,G.method="throw",G.arg=Ce.arg)}}}function w(H,F){var G=H.iterator[F.method];if(G===R){if(F.delegate=null,F.method==="throw"){if(H.iterator.return&&(F.method="return",F.arg=R,w(H,F),F.method==="throw"))return m;F.method="throw",F.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var B=l(G,H.iterator,F.arg);if(B.type==="throw")return F.method="throw",F.arg=B.arg,F.delegate=null,m;var W=B.arg;if(!W)return F.method="throw",F.arg=new TypeError("iterator result is not an object"),F.delegate=null,m;if(W.done)F[H.resultName]=W.value,F.next=H.nextLoc,F.method!=="return"&&(F.method="next",F.arg=R);else return W;return F.delegate=null,m}A(M),M[c]="Generator",M[o]=function(){return this},M.toString=function(){return"[object Generator]"};function _(H){var F={tryLoc:H[0]};1 in H&&(F.catchLoc=H[1]),2 in H&&(F.finallyLoc=H[2],F.afterLoc=H[3]),this.tryEntries.push(F)}function N(H){var F=H.completion||{};F.type="normal",delete F.arg,H.completion=F}function j(H){this.tryEntries=[{tryLoc:"root"}],H.forEach(_,this),this.reset(!0)}i.keys=function(H){var F=[];for(var G in H)F.push(G);return F.reverse(),function B(){for(;F.length;){var W=F.pop();if(W in H)return B.value=W,B.done=!1,B}return B.done=!0,B}};function k(H){if(H){var F=H[o];if(F)return F.call(H);if(typeof H.next=="function")return H;if(!isNaN(H.length)){var G=-1,B=function W(){for(;++G=0;--B){var W=this.tryEntries[B],K=W.completion;if(W.tryLoc==="root")return G("end");if(W.tryLoc<=this.prev){var q=S.call(W,"catchLoc"),re=S.call(W,"finallyLoc");if(q&&re){if(this.prev=0;--G){var B=this.tryEntries[G];if(B.tryLoc<=this.prev&&S.call(B,"finallyLoc")&&this.prev=0;--F){var G=this.tryEntries[F];if(G.finallyLoc===H)return this.complete(G.completion,G.afterLoc),N(G),m}},catch:function(H){for(var F=this.tryEntries.length-1;F>=0;--F){var G=this.tryEntries[F];if(G.tryLoc===H){var B=G.completion;if(B.type==="throw"){var W=B.arg;N(G)}return W}}throw new Error("illegal catch attempt")},delegateYield:function(H,F,G){return this.delegate={iterator:k(H),resultName:F,nextLoc:G},this.method==="next"&&(this.arg=R),m}}}(function(){return this}()||Function("return this")())},{}],228:[function(I,J,P){var L=I("buffer"),u=L.Buffer;function S(h,o){for(var C in h)o[C]=h[C]}u.from&&u.alloc&&u.allocUnsafe&&u.allocUnsafeSlow?J.exports=L:(S(L,P),P.Buffer=R);function R(h,o,C){return u(h,o,C)}S(u,R),R.from=function(h,o,C){if(typeof h=="number")throw new TypeError("Argument must not be a number");return u(h,o,C)},R.alloc=function(h,o,C){if(typeof h!="number")throw new TypeError("Argument must be a number");var c=u(h);return o!==void 0?typeof C=="string"?c.fill(o,C):c.fill(o):c.fill(0),c},R.allocUnsafe=function(h){if(typeof h!="number")throw new TypeError("Argument must be a number");return u(h)},R.allocUnsafeSlow=function(h){if(typeof h!="number")throw new TypeError("Argument must be a number");return L.SlowBuffer(h)}},{buffer:73}],229:[function(I,J,P){(function(L){"use strict";var u=I("babel-runtime/core-js/string/from-code-point"),S=f(u),R=I("babel-runtime/core-js/json/stringify"),h=f(R),o=I("babel-runtime/helpers/typeof"),C=f(o),c=I("babel-runtime/core-js/object/define-property"),a=f(c),i=I("babel-runtime/core-js/object/keys"),r=f(i),l=I("babel-runtime/core-js/object/create"),p=f(l);function f(b){return b&&b.__esModule?b:{default:b}}(function(b){b.parser=function(Y,Z){return new m(Y,Z)},b.SAXParser=m,b.SAXStream=M,b.createStream=s,b.MAX_BUFFER_LENGTH=64*1024;var v=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];b.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function m(Y,Z){if(!(this instanceof m))return new m(Y,Z);var be=this;d(be),be.q=be.c="",be.bufferCheckPosition=b.MAX_BUFFER_LENGTH,be.opt=Z||{},be.opt.lowercase=be.opt.lowercase||be.opt.lowercasetags,be.looseCase=be.opt.lowercase?"toLowerCase":"toUpperCase",be.tags=[],be.closed=be.closedRoot=be.sawRoot=!1,be.tag=be.error=null,be.strict=!!Y,be.noscript=!!(Y||be.opt.noscript),be.state=K.BEGIN,be.strictEntities=be.opt.strictEntities,be.ENTITIES=be.strictEntities?(0,p.default)(b.XML_ENTITIES):(0,p.default)(b.ENTITIES),be.attribList=[],be.opt.xmlns&&(be.ns=(0,p.default)(_)),be.trackPosition=be.opt.position!==!1,be.trackPosition&&(be.position=be.line=be.column=0),re(be,"onready")}p.default||(Object.create=function(Y){function Z(){}Z.prototype=Y;var be=new Z;return be}),r.default||(Object.keys=function(Y){var Z=[];for(var be in Y)Y.hasOwnProperty(be)&&Z.push(be);return Z});function n(Y){for(var Z=Math.max(b.MAX_BUFFER_LENGTH,10),be=0,ge=0,De=v.length;geZ)switch(v[ge]){case"textNode":Ce(Y);break;case"cdata":ee(Y,"oncdata",Y.cdata),Y.cdata="";break;case"script":ee(Y,"onscript",Y.script),Y.script="";break;default:he(Y,"Max buffer length exceeded: "+v[ge])}be=Math.max(be,Qe)}var Ze=b.MAX_BUFFER_LENGTH-be;Y.bufferCheckPosition=Ze+Y.position}function d(Y){for(var Z=0,be=v.length;Z"||H(Y)}function B(Y,Z){return Y.test(Z)}function W(Y,Z){return!B(Y,Z)}var K=0;b.STATE={BEGIN:K++,BEGIN_WHITESPACE:K++,TEXT:K++,TEXT_ENTITY:K++,OPEN_WAKA:K++,SGML_DECL:K++,SGML_DECL_QUOTED:K++,DOCTYPE:K++,DOCTYPE_QUOTED:K++,DOCTYPE_DTD:K++,DOCTYPE_DTD_QUOTED:K++,COMMENT_STARTING:K++,COMMENT:K++,COMMENT_ENDING:K++,COMMENT_ENDED:K++,CDATA:K++,CDATA_ENDING:K++,CDATA_ENDING_2:K++,PROC_INST:K++,PROC_INST_BODY:K++,PROC_INST_ENDING:K++,OPEN_TAG:K++,OPEN_TAG_SLASH:K++,ATTRIB:K++,ATTRIB_NAME:K++,ATTRIB_NAME_SAW_WHITE:K++,ATTRIB_VALUE:K++,ATTRIB_VALUE_QUOTED:K++,ATTRIB_VALUE_CLOSED:K++,ATTRIB_VALUE_UNQUOTED:K++,ATTRIB_VALUE_ENTITY_Q:K++,ATTRIB_VALUE_ENTITY_U:K++,CLOSE_TAG:K++,CLOSE_TAG_SAW_WHITE:K++,SCRIPT:K++,SCRIPT_ENDING:K++},b.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},b.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,r.default)(b.ENTITIES).forEach(function(Y){var Z=b.ENTITIES[Y],be=typeof Z=="number"?String.fromCharCode(Z):Z;b.ENTITIES[Y]=be});for(var q in b.STATE)b.STATE[b.STATE[q]]=q;K=b.STATE;function re(Y,Z,be){Y[Z]&&Y[Z](be)}function ee(Y,Z,be){Y.textNode&&Ce(Y),re(Y,Z,be)}function Ce(Y){Y.textNode=xe(Y.opt,Y.textNode),Y.textNode&&re(Y,"ontext",Y.textNode),Y.textNode=""}function xe(Y,Z){return Y.trim&&(Z=Z.trim()),Y.normalize&&(Z=Z.replace(/\s+/g," ")),Z}function he(Y,Z){return Ce(Y),Y.trackPosition&&(Z+=` Line: `+Y.line+` Column: `+Y.column+` Char: `+Y.c),Z=new Error(Z),Y.error=Z,re(Y,"onerror",Z),Y}function ke(Y){return Y.sawRoot&&!Y.closedRoot&&_e(Y,"Unclosed root tag"),Y.state!==K.BEGIN&&Y.state!==K.BEGIN_WHITESPACE&&Y.state!==K.TEXT&&he(Y,"Unexpected end"),Ce(Y),Y.c="",Y.closed=!0,re(Y,"onend"),m.call(Y,Y.strict,Y.opt),Y}function _e(Y,Z){if((typeof Y=="undefined"?"undefined":(0,C.default)(Y))!=="object"||!(Y instanceof m))throw new Error("bad call to strictFail");Y.strict&&he(Y,Z)}function de(Y){Y.strict||(Y.tagName=Y.tagName[Y.looseCase]());var Z=Y.tags[Y.tags.length-1]||Y,be=Y.tag={name:Y.tagName,attributes:{}};Y.opt.xmlns&&(be.ns=Z.ns),Y.attribList.length=0,ee(Y,"onopentagstart",be)}function ce(Y,Z){var be=Y.indexOf(":"),ge=be<0?["",Y]:Y.split(":"),De=ge[0],Qe=ge[1];return Z&&Y==="xmlns"&&(De="xmlns",Qe=""),{prefix:De,local:Qe}}function ae(Y){if(Y.strict||(Y.attribName=Y.attribName[Y.looseCase]()),Y.attribList.indexOf(Y.attribName)!==-1||Y.tag.attributes.hasOwnProperty(Y.attribName)){Y.attribName=Y.attribValue="";return}if(Y.opt.xmlns){var Z=ce(Y.attribName,!0),be=Z.prefix,ge=Z.local;if(be==="xmlns")if(ge==="xml"&&Y.attribValue!==E)_e(Y,"xml: prefix must be bound to "+E+` Actual: `+Y.attribValue);else if(ge==="xmlns"&&Y.attribValue!==w)_e(Y,"xmlns: prefix must be bound to "+w+` Actual: `+Y.attribValue);else{var De=Y.tag,Qe=Y.tags[Y.tags.length-1]||Y;De.ns===Qe.ns&&(De.ns=(0,p.default)(Qe.ns)),De.ns[ge]=Y.attribValue}Y.attribList.push([Y.attribName,Y.attribValue])}else Y.tag.attributes[Y.attribName]=Y.attribValue,ee(Y,"onattribute",{name:Y.attribName,value:Y.attribValue});Y.attribName=Y.attribValue=""}function Se(Y,Z){if(Y.opt.xmlns){var be=Y.tag,ge=ce(Y.tagName);be.prefix=ge.prefix,be.local=ge.local,be.uri=be.ns[ge.prefix]||"",be.prefix&&!be.uri&&(_e(Y,"Unbound namespace prefix: "+(0,h.default)(Y.tagName)),be.uri=ge.prefix);var De=Y.tags[Y.tags.length-1]||Y;be.ns&&De.ns!==be.ns&&(0,r.default)(be.ns).forEach(function($e){ee(Y,"onopennamespace",{prefix:$e,uri:be.ns[$e]})});for(var Qe=0,Ze=Y.attribList.length;Qe",Y.tagName="",Y.state=K.SCRIPT;return}ee(Y,"onscript",Y.script),Y.script=""}var Z=Y.tags.length,be=Y.tagName;Y.strict||(be=be[Y.looseCase]());for(var ge=be;Z--;){var De=Y.tags[Z];if(De.name!==ge)_e(Y,"Unexpected close tag");else break}if(Z<0){_e(Y,"Unmatched closing tag: "+Y.tagName),Y.textNode+="",Y.state=K.TEXT;return}Y.tagName=be;for(var Qe=Y.tags.length;Qe-- >Z;){var Ze=Y.tag=Y.tags.pop();Y.tagName=Y.tag.name,ee(Y,"onclosetag",Y.tagName);var nt={};for(var tt in Ze.ns)nt[tt]=Ze.ns[tt];var lt=Y.tags[Y.tags.length-1]||Y;Y.opt.xmlns&&Ze.ns!==lt.ns&&(0,r.default)(Ze.ns).forEach(function(st){var je=Ze.ns[st];ee(Y,"onclosenamespace",{prefix:st,uri:je})})}Z===0&&(Y.closedRoot=!0),Y.tagName=Y.attribValue=Y.attribName="",Y.attribList.length=0,Y.state=K.TEXT}function ue(Y){var Z=Y.entity,be=Z.toLowerCase(),ge,De="";return Y.ENTITIES[Z]?Y.ENTITIES[Z]:Y.ENTITIES[be]?Y.ENTITIES[be]:(Z=be,Z.charAt(0)==="#"&&(Z.charAt(1)==="x"?(Z=Z.slice(2),ge=parseInt(Z,16),De=ge.toString(16)):(Z=Z.slice(1),ge=parseInt(Z,10),De=ge.toString(10))),Z=Z.replace(/^0+/,""),isNaN(ge)||De.toLowerCase()!==Z?(_e(Y,"Invalid character entity"),"&"+Y.entity+";"):(0,S.default)(ge))}function Oe(Y,Z){Z==="<"?(Y.state=K.OPEN_WAKA,Y.startTagPosition=Y.position):H(Z)||(_e(Y,"Non-whitespace before first tag."),Y.textNode=Z,Y.state=K.TEXT)}function le(Y,Z){var be="";return Z"?(ee(Z,"onsgmldeclaration",Z.sgmlDecl),Z.sgmlDecl="",Z.state=K.TEXT):(F(ge)&&(Z.state=K.SGML_DECL_QUOTED),Z.sgmlDecl+=ge);continue;case K.SGML_DECL_QUOTED:ge===Z.q&&(Z.state=K.SGML_DECL,Z.q=""),Z.sgmlDecl+=ge;continue;case K.DOCTYPE:ge===">"?(Z.state=K.TEXT,ee(Z,"ondoctype",Z.doctype),Z.doctype=!0):(Z.doctype+=ge,ge==="["?Z.state=K.DOCTYPE_DTD:F(ge)&&(Z.state=K.DOCTYPE_QUOTED,Z.q=ge));continue;case K.DOCTYPE_QUOTED:Z.doctype+=ge,ge===Z.q&&(Z.q="",Z.state=K.DOCTYPE);continue;case K.DOCTYPE_DTD:Z.doctype+=ge,ge==="]"?Z.state=K.DOCTYPE:F(ge)&&(Z.state=K.DOCTYPE_DTD_QUOTED,Z.q=ge);continue;case K.DOCTYPE_DTD_QUOTED:Z.doctype+=ge,ge===Z.q&&(Z.state=K.DOCTYPE_DTD,Z.q="");continue;case K.COMMENT:ge==="-"?Z.state=K.COMMENT_ENDING:Z.comment+=ge;continue;case K.COMMENT_ENDING:ge==="-"?(Z.state=K.COMMENT_ENDED,Z.comment=xe(Z.opt,Z.comment),Z.comment&&ee(Z,"oncomment",Z.comment),Z.comment=""):(Z.comment+="-"+ge,Z.state=K.COMMENT);continue;case K.COMMENT_ENDED:ge!==">"?(_e(Z,"Malformed comment"),Z.comment+="--"+ge,Z.state=K.COMMENT):Z.state=K.TEXT;continue;case K.CDATA:ge==="]"?Z.state=K.CDATA_ENDING:Z.cdata+=ge;continue;case K.CDATA_ENDING:ge==="]"?Z.state=K.CDATA_ENDING_2:(Z.cdata+="]"+ge,Z.state=K.CDATA);continue;case K.CDATA_ENDING_2:ge===">"?(Z.cdata&&ee(Z,"oncdata",Z.cdata),ee(Z,"onclosecdata"),Z.cdata="",Z.state=K.TEXT):ge==="]"?Z.cdata+="]":(Z.cdata+="]]"+ge,Z.state=K.CDATA);continue;case K.PROC_INST:ge==="?"?Z.state=K.PROC_INST_ENDING:H(ge)?Z.state=K.PROC_INST_BODY:Z.procInstName+=ge;continue;case K.PROC_INST_BODY:if(!Z.procInstBody&&H(ge))continue;ge==="?"?Z.state=K.PROC_INST_ENDING:Z.procInstBody+=ge;continue;case K.PROC_INST_ENDING:ge===">"?(ee(Z,"onprocessinginstruction",{name:Z.procInstName,body:Z.procInstBody}),Z.procInstName=Z.procInstBody="",Z.state=K.TEXT):(Z.procInstBody+="?"+ge,Z.state=K.PROC_INST_BODY);continue;case K.OPEN_TAG:B(j,ge)?Z.tagName+=ge:(de(Z),ge===">"?Se(Z):ge==="/"?Z.state=K.OPEN_TAG_SLASH:(H(ge)||_e(Z,"Invalid character in tag name"),Z.state=K.ATTRIB));continue;case K.OPEN_TAG_SLASH:ge===">"?(Se(Z,!0),te(Z)):(_e(Z,"Forward-slash in opening tag not followed by >"),Z.state=K.ATTRIB);continue;case K.ATTRIB:if(H(ge))continue;ge===">"?Se(Z):ge==="/"?Z.state=K.OPEN_TAG_SLASH:B(N,ge)?(Z.attribName=ge,Z.attribValue="",Z.state=K.ATTRIB_NAME):_e(Z,"Invalid attribute name");continue;case K.ATTRIB_NAME:ge==="="?Z.state=K.ATTRIB_VALUE:ge===">"?(_e(Z,"Attribute without value"),Z.attribValue=Z.attribName,ae(Z),Se(Z)):H(ge)?Z.state=K.ATTRIB_NAME_SAW_WHITE:B(j,ge)?Z.attribName+=ge:_e(Z,"Invalid attribute name");continue;case K.ATTRIB_NAME_SAW_WHITE:if(ge==="=")Z.state=K.ATTRIB_VALUE;else{if(H(ge))continue;_e(Z,"Attribute without value"),Z.tag.attributes[Z.attribName]="",Z.attribValue="",ee(Z,"onattribute",{name:Z.attribName,value:""}),Z.attribName="",ge===">"?Se(Z):B(N,ge)?(Z.attribName=ge,Z.state=K.ATTRIB_NAME):(_e(Z,"Invalid attribute name"),Z.state=K.ATTRIB)}continue;case K.ATTRIB_VALUE:if(H(ge))continue;F(ge)?(Z.q=ge,Z.state=K.ATTRIB_VALUE_QUOTED):(_e(Z,"Unquoted attribute value"),Z.state=K.ATTRIB_VALUE_UNQUOTED,Z.attribValue=ge);continue;case K.ATTRIB_VALUE_QUOTED:if(ge!==Z.q){ge==="&"?Z.state=K.ATTRIB_VALUE_ENTITY_Q:Z.attribValue+=ge;continue}ae(Z),Z.q="",Z.state=K.ATTRIB_VALUE_CLOSED;continue;case K.ATTRIB_VALUE_CLOSED:H(ge)?Z.state=K.ATTRIB:ge===">"?Se(Z):ge==="/"?Z.state=K.OPEN_TAG_SLASH:B(N,ge)?(_e(Z,"No whitespace between attributes"),Z.attribName=ge,Z.attribValue="",Z.state=K.ATTRIB_NAME):_e(Z,"Invalid attribute name");continue;case K.ATTRIB_VALUE_UNQUOTED:if(!G(ge)){ge==="&"?Z.state=K.ATTRIB_VALUE_ENTITY_U:Z.attribValue+=ge;continue}ae(Z),ge===">"?Se(Z):Z.state=K.ATTRIB;continue;case K.CLOSE_TAG:if(Z.tagName)ge===">"?te(Z):B(j,ge)?Z.tagName+=ge:Z.script?(Z.script+=""?te(Z):_e(Z,"Invalid characters in closing tag");continue;case K.TEXT_ENTITY:case K.ATTRIB_VALUE_ENTITY_Q:case K.ATTRIB_VALUE_ENTITY_U:var Ze,nt;switch(Z.state){case K.TEXT_ENTITY:Ze=K.TEXT,nt="textNode";break;case K.ATTRIB_VALUE_ENTITY_Q:Ze=K.ATTRIB_VALUE_QUOTED,nt="attribValue";break;case K.ATTRIB_VALUE_ENTITY_U:Ze=K.ATTRIB_VALUE_UNQUOTED,nt="attribValue";break}ge===";"?(Z[nt]+=ue(Z),Z.entity="",Z.state=Ze):B(Z.entity.length?z:k,ge)?Z.entity+=ge:(_e(Z,"Invalid character in entity name"),Z[nt]+="&"+Z.entity+ge,Z.entity="",Z.state=Ze);continue;default:throw new Error(Z,"Unknown state: "+Z.state)}}return Z.position>=Z.bufferCheckPosition&&n(Z),Z}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */S.default||function(){var Y=String.fromCharCode,Z=Math.floor,be=function(){var De=16384,Qe=[],Ze,nt,tt=-1,lt=arguments.length;if(!lt)return"";for(var st="";++tt1114111||Z(je)!==je)throw RangeError("Invalid code point: "+je);je<=65535?Qe.push(je):(je-=65536,Ze=(je>>10)+55296,nt=je%1024+56320,Qe.push(Ze,nt)),(tt+1===lt||Qe.length>De)&&(st+=Y.apply(null,Qe),Qe.length=0)}return st};a.default?Object.defineProperty(String,"fromCodePoint",{value:be,configurable:!0,writable:!0}):String.fromCodePoint=be}()})(typeof P=="undefined"?(void 0).sax={}:P)}).call(this,I("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(I,J,P){J.exports=S;var L=I("events").EventEmitter,u=I("inherits");u(S,L),S.Readable=I("readable-stream/readable.js"),S.Writable=I("readable-stream/writable.js"),S.Duplex=I("readable-stream/duplex.js"),S.Transform=I("readable-stream/transform.js"),S.PassThrough=I("readable-stream/passthrough.js"),S.Stream=S;function S(){L.call(this)}S.prototype.pipe=function(R,h){var o=this;function C(f){R.writable&&(R.write(f)===!1&&o.pause&&o.pause())}o.on("data",C);function c(){o.readable&&o.resume&&o.resume()}R.on("drain",c),!R._isStdio&&(!h||h.end!==!1)&&(o.on("end",i),o.on("close",r));var a=!1;function i(){if(a)return;a=!0,R.end()}function r(){if(a)return;a=!0,typeof R.destroy=="function"&&R.destroy()}function l(f){if(p(),L.listenerCount(this,"error")===0)throw f}o.on("error",l),R.on("error",l);function p(){o.removeListener("data",C),R.removeListener("drain",c),o.removeListener("end",i),o.removeListener("close",r),o.removeListener("error",l),R.removeListener("error",l),o.removeListener("end",p),o.removeListener("close",p),R.removeListener("close",p)}return o.on("end",p),o.on("close",p),R.on("close",p),R.emit("pipe",o),R}},{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(I,J,P){(function(L){var u=I("./lib/request"),S=I("./lib/response"),R=I("xtend"),h=I("builtin-status-codes"),o=I("url"),C=P;C.request=function(c,a){typeof c=="string"?c=o.parse(c):c=R(c);var i=L.location.protocol.search(/^https?:$/)===-1?"http:":"",r=c.protocol||i,l=c.hostname||c.host,p=c.port,f=c.path||"/";l&&l.indexOf(":")!==-1&&(l="["+l+"]"),c.url=(l?r+"//"+l:"")+(p?":"+p:"")+f,c.method=(c.method||"GET").toUpperCase(),c.headers=c.headers||{};var b=new u(c);return a&&b.on("response",a),b},C.get=function(a,i){var r=C.request(a,i);return r.end(),r},C.ClientRequest=u,C.IncomingMessage=S.IncomingMessage,C.Agent=function(){},C.Agent.defaultMaxSockets=4,C.globalAgent=new C.Agent,C.STATUS_CODES=h,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(I,J,P){(function(L){"use strict";P.fetch=C(L.fetch)&&C(L.ReadableStream),P.writableStream=C(L.WritableStream),P.abortController=C(L.AbortController),P.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),P.blobConstructor=!0}catch(c){}var u;function S(){if(u!==void 0)return u;if(L.XMLHttpRequest){u=new L.XMLHttpRequest;try{u.open("GET",L.XDomainRequest?"/":"https://example.com")}catch(c){u=null}}else u=null;return u}function R(c){var a=S();if(!a)return!1;try{return a.responseType=c,a.responseType===c}catch(i){}return!1}var h=typeof L.ArrayBuffer!="undefined",o=h&&C(L.ArrayBuffer.prototype.slice);P.arraybuffer=P.fetch||h&&R("arraybuffer"),P.msstream=!P.fetch&&o&&R("ms-stream"),P.mozchunkedarraybuffer=!P.fetch&&h&&R("moz-chunked-arraybuffer"),P.overrideMimeType=P.fetch||(S()?C(S().overrideMimeType):!1),P.vbArray=C(L.VBArray);function C(c){return typeof c=="function"}u=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(I,J,P){(function(L,u,S){"use strict";var R=I("babel-runtime/core-js/object/keys"),h=o(R);function o(n){return n&&n.__esModule?n:{default:n}}var C=I("./capability"),c=I("inherits"),a=I("./response"),i=I("readable-stream"),r=I("to-arraybuffer"),l=a.IncomingMessage,p=a.readyStates;function f(n,d){return C.fetch&&d?"fetch":C.mozchunkedarraybuffer?"moz-chunked-arraybuffer":C.msstream?"ms-stream":C.arraybuffer&&n?"arraybuffer":C.vbArray&&n?"text:vbarray":"text"}var b=J.exports=function(n){var d=this;i.Writable.call(d),d._opts=n,d._body=[],d._headers={},n.auth&&d.setHeader("Authorization","Basic "+new S(n.auth).toString("base64")),(0,h.default)(n.headers).forEach(function(y){d.setHeader(y,n.headers[y])});var g,T=!0;if(n.mode==="disable-fetch"||"requestTimeout"in n&&!C.abortController)T=!1,g=!0;else if(n.mode==="prefer-streaming")g=!1;else if(n.mode==="allow-wrong-content-type")g=!C.overrideMimeType;else if(!n.mode||n.mode==="default"||n.mode==="prefer-fast")g=!0;else throw new Error("Invalid value for opts.mode");d._mode=f(g,T),d._fetchTimer=null,d.on("finish",function(){d._onFinish()})};c(b,i.Writable),b.prototype.setHeader=function(n,d){var g=this,T=n.toLowerCase();if(m.indexOf(T)!==-1)return;g._headers[T]={name:n,value:d}},b.prototype.getHeader=function(n){var d=this._headers[n.toLowerCase()];return d?d.value:null},b.prototype.removeHeader=function(n){var d=this;delete d._headers[n.toLowerCase()]},b.prototype._onFinish=function(){var n=this;if(n._destroyed)return;var d=n._opts,g=n._headers,T=null;d.method!=="GET"&&d.method!=="HEAD"&&(C.arraybuffer?T=r(S.concat(n._body)):C.blobConstructor?T=new u.Blob(n._body.map(function(E){return r(E)}),{type:(g["content-type"]||{}).value||""}):T=S.concat(n._body).toString());var y=[];if((0,h.default)(g).forEach(function(E){var w=g[E].name,_=g[E].value;Array.isArray(_)?_.forEach(function(N){y.push([w,N])}):y.push([w,_])}),n._mode==="fetch"){var s=null,M=null;if(C.abortController){var A=new AbortController;s=A.signal,n._fetchAbortController=A,"requestTimeout"in d&&d.requestTimeout!==0&&(n._fetchTimer=u.setTimeout(function(){n.emit("requestTimeout"),n._fetchAbortController&&n._fetchAbortController.abort()},d.requestTimeout))}u.fetch(n._opts.url,{method:n._opts.method,headers:y,body:T||void 0,mode:"cors",credentials:d.withCredentials?"include":"same-origin",signal:s}).then(function(E){n._fetchResponse=E,n._connect()},function(E){u.clearTimeout(n._fetchTimer),n._destroyed||n.emit("error",E)})}else{var x=n._xhr=new u.XMLHttpRequest;try{x.open(n._opts.method,n._opts.url,!0)}catch(E){L.nextTick(function(){n.emit("error",E)});return}"responseType"in x&&(x.responseType=n._mode.split(":")[0]),"withCredentials"in x&&(x.withCredentials=!!d.withCredentials),n._mode==="text"&&"overrideMimeType"in x&&x.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in d&&(x.timeout=d.requestTimeout,x.ontimeout=function(){n.emit("requestTimeout")}),y.forEach(function(E){x.setRequestHeader(E[0],E[1])}),n._response=null,x.onreadystatechange=function(){switch(x.readyState){case p.LOADING:case p.DONE:n._onXHRProgress();break}},n._mode==="moz-chunked-arraybuffer"&&(x.onprogress=function(){n._onXHRProgress()}),x.onerror=function(){if(n._destroyed)return;n.emit("error",new Error("XHR error"))};try{x.send(T)}catch(E){L.nextTick(function(){n.emit("error",E)});return}}};function v(n){try{var d=n.status;return d!==null&&d!==0}catch(g){return!1}}b.prototype._onXHRProgress=function(){var n=this;if(!v(n._xhr)||n._destroyed)return;n._response||n._connect(),n._response._onXHRProgress()},b.prototype._connect=function(){var n=this;if(n._destroyed)return;n._response=new l(n._xhr,n._fetchResponse,n._mode,n._fetchTimer),n._response.on("error",function(d){n.emit("error",d)}),n.emit("response",n._response)},b.prototype._write=function(n,d,g){var T=this;T._body.push(n),g()},b.prototype.abort=b.prototype.destroy=function(){var n=this;n._destroyed=!0,u.clearTimeout(n._fetchTimer),n._response&&(n._response._destroyed=!0),n._xhr?n._xhr.abort():n._fetchAbortController&&n._fetchAbortController.abort()},b.prototype.end=function(n,d,g){var T=this;typeof n=="function"&&(g=n,n=void 0),i.Writable.prototype.end.call(T,n,d,g)},b.prototype.flushHeaders=function(){},b.prototype.setTimeout=function(){},b.prototype.setNoDelay=function(){},b.prototype.setSocketKeepAlive=function(){};var m=["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,I("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},I("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(I,J,P){(function(L,u,S){"use strict";var R=I("babel-runtime/core-js/promise"),h=o(R);function o(l){return l&&l.__esModule?l:{default:l}}var C=I("./capability"),c=I("inherits"),a=I("readable-stream"),i=P.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},r=P.IncomingMessage=function(l,p,f,b){var v=this;if(a.Readable.call(v),v._mode=f,v.headers={},v.rawHeaders=[],v.trailers={},v.rawTrailers=[],v.on("end",function(){L.nextTick(function(){v.emit("close")})}),f==="fetch"){var m=function s(){d.read().then(function(M){if(v._destroyed)return;if(M.done){u.clearTimeout(b),v.push(null);return}v.push(new S(M.value)),s()}).catch(function(M){u.clearTimeout(b),v._destroyed||v.emit("error",M)})};if(v._fetchResponse=p,v.url=p.url,v.statusCode=p.status,v.statusMessage=p.statusText,p.headers.forEach(function(s,M){v.headers[M.toLowerCase()]=s,v.rawHeaders.push(M,s)}),C.writableStream){var n=new WritableStream({write:function(M){return new h.default(function(A,x){v._destroyed?x():v.push(new S(M))?A():v._resumeFetch=A})},close:function(){u.clearTimeout(b),v._destroyed||v.push(null)},abort:function(M){v._destroyed||v.emit("error",M)}});try{p.body.pipeTo(n).catch(function(s){u.clearTimeout(b),v._destroyed||v.emit("error",s)});return}catch(s){}}var d=p.body.getReader();m()}else{v._xhr=l,v._pos=0,v.url=l.responseURL,v.statusCode=l.status,v.statusMessage=l.statusText;var g=l.getAllResponseHeaders().split(/\r?\n/);if(g.forEach(function(s){var M=s.match(/^([^:]+):\s*(.*)/);if(M){var A=M[1].toLowerCase();A==="set-cookie"?(v.headers[A]===void 0&&(v.headers[A]=[]),v.headers[A].push(M[2])):v.headers[A]!==void 0?v.headers[A]+=", "+M[2]:v.headers[A]=M[2],v.rawHeaders.push(M[1],M[2])}}),v._charset="x-user-defined",!C.overrideMimeType){var T=v.rawHeaders["mime-type"];if(T){var y=T.match(/;\s*charset=([^;])(;|$)/);y&&(v._charset=y[1].toLowerCase())}v._charset||(v._charset="utf-8")}}};c(r,a.Readable),r.prototype._read=function(){var l=this,p=l._resumeFetch;p&&(l._resumeFetch=null,p())},r.prototype._onXHRProgress=function(){var l=this,p=l._xhr,f=null;switch(l._mode){case"text:vbarray":if(p.readyState!==i.DONE)break;try{f=new u.VBArray(p.responseBody).toArray()}catch(d){}if(f!==null){l.push(new S(f));break}case"text":try{f=p.responseText}catch(d){l._mode="text:vbarray";break}if(f.length>l._pos){var b=f.substr(l._pos);if(l._charset==="x-user-defined"){for(var v=new S(b.length),m=0;ml._pos&&(l.push(new S(new Uint8Array(n.result.slice(l._pos)))),l._pos=n.result.byteLength)},n.onload=function(){l.push(null)},n.readAsArrayBuffer(f);break}l._xhr.readyState===i.DONE&&l._mode!=="ms-stream"&&l.push(null)}}).call(this,I("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},I("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(I,J,P){"use strict";var L=I("safe-buffer").Buffer,u=L.isEncoding||function(n){n=""+n;switch(n&&n.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 S(n){if(!n)return"utf8";for(var d;;)switch(n){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 n;default:if(d)return;n=(""+n).toLowerCase(),d=!0}}function R(n){var d=S(n);if(typeof d!="string"&&(L.isEncoding===u||!u(n)))throw new Error("Unknown encoding: "+n);return d||n}P.StringDecoder=h;function h(n){this.encoding=R(n);var d;switch(this.encoding){case"utf16le":this.text=l,this.end=p,d=4;break;case"utf8":this.fillLast=a,d=4;break;case"base64":this.text=f,this.end=b,d=3;break;default:this.write=v,this.end=m;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=L.allocUnsafe(d)}h.prototype.write=function(n){if(n.length===0)return"";var d,g;if(this.lastNeed){if(d=this.fillLast(n),d===void 0)return"";g=this.lastNeed,this.lastNeed=0}else g=0;return g>5===6?2:n>>4===14?3:n>>3===30?4:n>>6===2?-1:-2}function C(n,d,g){var T=d.length-1;if(T=0?(y>0&&(n.lastNeed=y-1),y):--T=0?(y>0&&(n.lastNeed=y-2),y):--T=0?(y>0&&(y===2?y=0:n.lastNeed=y-3),y):0))}function c(n,d,g){if((d[0]&192)!==128)return n.lastNeed=0,"\uFFFD";if(n.lastNeed>1&&d.length>1){if((d[1]&192)!==128)return n.lastNeed=1,"\uFFFD";if(n.lastNeed>2&&d.length>2&&(d[2]&192)!==128)return n.lastNeed=2,"\uFFFD"}}function a(n){var d=this.lastTotal-this.lastNeed,g=c(this,n,d);if(g!==void 0)return g;if(this.lastNeed<=n.length)return n.copy(this.lastChar,d,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,d,0,n.length),this.lastNeed-=n.length}function i(n,d){var g=C(this,n,d);if(!this.lastNeed)return n.toString("utf8",d);this.lastTotal=g;var T=n.length-(g-this.lastNeed);return n.copy(this.lastChar,0,T),n.toString("utf8",d,T)}function r(n){var d=n&&n.length?this.write(n):"";return this.lastNeed?d+"\uFFFD":d}function l(n,d){if((n.length-d)%2===0){var g=n.toString("utf16le",d);if(g){var T=g.charCodeAt(g.length-1);if(T>=55296&&T<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1],g.slice(0,-1)}return g}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=n[n.length-1],n.toString("utf16le",d,n.length-1)}function p(n){var d=n&&n.length?this.write(n):"";if(this.lastNeed){var g=this.lastTotal-this.lastNeed;return d+this.lastChar.toString("utf16le",0,g)}return d}function f(n,d){var g=(n.length-d)%3;return g===0?n.toString("base64",d):(this.lastNeed=3-g,this.lastTotal=3,g===1?this.lastChar[0]=n[n.length-1]:(this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1]),n.toString("base64",d,n.length-g))}function b(n){var d=n&&n.length?this.write(n):"";return this.lastNeed?d+this.lastChar.toString("base64",0,3-this.lastNeed):d}function v(n){return n.toString(this.encoding)}function m(n){return n&&n.length?this.write(n):""}},{"safe-buffer":228}],236:[function(I,J,P){(function(L,u){var S=I("process/browser.js").nextTick,R=Function.prototype.apply,h=Array.prototype.slice,o={},C=0;P.setTimeout=function(){return new c(R.call(setTimeout,window,arguments),clearTimeout)},P.setInterval=function(){return new c(R.call(setInterval,window,arguments),clearInterval)},P.clearTimeout=P.clearInterval=function(a){a.close()};function c(a,i){this._id=a,this._clearFn=i}c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},P.enroll=function(a,i){clearTimeout(a._idleTimeoutId),a._idleTimeout=i},P.unenroll=function(a){clearTimeout(a._idleTimeoutId),a._idleTimeout=-1},P._unrefActive=P.active=function(a){clearTimeout(a._idleTimeoutId);var i=a._idleTimeout;i>=0&&(a._idleTimeoutId=setTimeout(function(){a._onTimeout&&a._onTimeout()},i))},P.setImmediate=typeof L=="function"?L:function(a){var i=C++,r=arguments.length<2?!1:h.call(arguments,1);return o[i]=!0,S(function(){o[i]&&(r?a.apply(null,r):a.call(null),P.clearImmediate(i))}),i},P.clearImmediate=typeof u=="function"?u:function(a){delete o[a]}}).call(this,I("timers").setImmediate,I("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(I,J,P){var L=I("buffer").Buffer;J.exports=function(u){if(u instanceof Uint8Array){if(u.byteOffset===0&&u.byteLength===u.buffer.byteLength)return u.buffer;if(typeof u.buffer.slice=="function")return u.buffer.slice(u.byteOffset,u.byteOffset+u.byteLength)}if(L.isBuffer(u)){for(var S=new Uint8Array(u.length),R=u.length,h=0;h",'"',"`"," ","\r",` `," "],c=["{","}","|","\\","^","`"].concat(C),a=["'"].concat(c),i=["%","/","?",";","#"].concat(a),r=["/","?","#"],l=255,p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},n=I("querystring");function d(s,M,A){if(s&&u.isObject(s)&&s instanceof S)return s;var x=new S;return x.parse(s,M,A),x}S.prototype.parse=function(s,M,A){if(!u.isString(s))throw new TypeError("Parameter 'url' must be a string, not "+typeof s);var x=s.indexOf("?"),E=x!==-1&&x127?xe+="x":xe+=Ce[he];if(!xe.match(p)){var _e=re.slice(0,G),de=re.slice(G+1),ce=Ce.match(f);ce&&(_e.push(ce[1]),de.unshift(ce[2])),de.length&&(N="/"+de.join(".")+N),this.hostname=_e.join(".");break}}}this.hostname.length>l?this.hostname="":this.hostname=this.hostname.toLowerCase(),q||(this.hostname=L.toASCII(this.hostname));var ae=this.port?":"+this.port:"",Se=this.hostname||"";this.host=Se+ae,this.href+=this.host,q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),N[0]!=="/"&&(N="/"+N))}if(!b[z])for(var G=0,ee=a.length;G0?A.host.split("@"):!1;xe&&(A.auth=xe.shift(),A.host=A.hostname=xe.shift())}return A.search=s.search,A.query=s.query,(!u.isNull(A.pathname)||!u.isNull(A.search))&&(A.path=(A.pathname?A.pathname:"")+(A.search?A.search:"")),A.href=A.format(),A}if(!re.length)return A.pathname=null,A.search?A.path="/"+A.search:A.path=null,A.href=A.format(),A;for(var he=re.slice(-1)[0],ke=(A.host||s.host||re.length>1)&&(he==="."||he==="..")||he==="",_e=0,de=re.length;de>=0;de--)he=re[de],he==="."?re.splice(de,1):he===".."?(re.splice(de,1),_e++):_e&&(re.splice(de,1),_e--);if(!K&&!q)for(;_e--;_e)re.unshift("..");K&&re[0]!==""&&(!re[0]||re[0].charAt(0)!=="/")&&re.unshift(""),ke&&re.join("/").substr(-1)!=="/"&&re.push("");var ce=re[0]===""||re[0]&&re[0].charAt(0)==="/";if(Ce){A.hostname=A.host=ce?"":re.length?re.shift():"";var xe=A.host&&A.host.indexOf("@")>0?A.host.split("@"):!1;xe&&(A.auth=xe.shift(),A.host=A.hostname=xe.shift())}return K=K||A.host&&re.length,K&&!ce&&re.unshift(""),re.length?A.pathname=re.join("/"):(A.pathname=null,A.path=null),(!u.isNull(A.pathname)||!u.isNull(A.search))&&(A.path=(A.pathname?A.pathname:"")+(A.search?A.search:"")),A.auth=s.auth||A.auth,A.slashes=A.slashes||s.slashes,A.href=A.format(),A},S.prototype.parseHost=function(){var s=this.host,M=h.exec(s);M&&(M=M[0],M!==":"&&(this.port=M.substr(1)),s=s.substr(0,s.length-M.length)),s&&(this.hostname=s)}},{"./util":239,punycode:209,querystring:212}],239:[function(I,J,P){"use strict";J.exports={isString:function(L){return typeof L=="string"},isObject:function(L){return typeof L=="object"&&L!==null},isNull:function(L){return L===null},isNullOrUndefined:function(L){return L==null}}},{}],240:[function(I,J,P){(function(L){J.exports=u;function u(R,h){if(S("noDeprecation"))return R;var o=!1;function C(){if(!o){if(S("throwDeprecation"))throw new Error(h);S("traceDeprecation")?console.trace(h):console.warn(h),o=!0}return R.apply(this,arguments)}return C}function S(R){try{if(!L.localStorage)return!1}catch(o){return!1}var h=L.localStorage[R];return h==null?!1:String(h).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(I,J,P){typeof Object.create=="function"?J.exports=function(u,S){u.super_=S,u.prototype=Object.create(S.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}})}:J.exports=function(u,S){u.super_=S;var R=function(){};R.prototype=S.prototype,u.prototype=new R,u.prototype.constructor=u}},{}],242:[function(I,J,P){J.exports=function(u){return u&&typeof u=="object"&&typeof u.copy=="function"&&typeof u.fill=="function"&&typeof u.readUInt8=="function"}},{}],243:[function(I,J,P){(function(L,u){var S=/%[sdj%]/g;P.format=function(F){if(!T(F)){for(var G=[],B=0;B=K)return ee;switch(ee){case"%s":return String(W[B++]);case"%d":return Number(W[B++]);case"%j":try{return JSON.stringify(W[B++])}catch(Ce){return"[Circular]"}default:return ee}}),re=W[B];B=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),m(G)?B.showHidden=G:G&&P._extend(B,G),s(B.showHidden)&&(B.showHidden=!1),s(B.depth)&&(B.depth=2),s(B.colors)&&(B.colors=!1),s(B.customInspect)&&(B.customInspect=!0),B.colors&&(B.stylize=C),i(B,F,B.depth)}P.inspect=o,o.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]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function C(F,G){var B=o.styles[G];return B?"["+o.colors[B][0]+"m"+F+"["+o.colors[B][1]+"m":F}function c(F,G){return F}function a(F){var G={};return F.forEach(function(B,W){G[B]=!0}),G}function i(F,G,B){if(F.customInspect&&G&&w(G.inspect)&&G.inspect!==P.inspect&&!(G.constructor&&G.constructor.prototype===G)){var W=G.inspect(B,F);return T(W)||(W=i(F,W,B)),W}var K=r(F,G);if(K)return K;var q=Object.keys(G),re=a(q);if(F.showHidden&&(q=Object.getOwnPropertyNames(G)),E(G)&&(q.indexOf("message")>=0||q.indexOf("description")>=0))return l(G);if(q.length===0){if(w(G)){var ee=G.name?": "+G.name:"";return F.stylize("[Function"+ee+"]","special")}if(M(G))return F.stylize(RegExp.prototype.toString.call(G),"regexp");if(x(G))return F.stylize(Date.prototype.toString.call(G),"date");if(E(G))return l(G)}var Ce="",xe=!1,he=["{","}"];if(v(G)&&(xe=!0,he=["[","]"]),w(G)){var ke=G.name?": "+G.name:"";Ce=" [Function"+ke+"]"}if(M(G)&&(Ce=" "+RegExp.prototype.toString.call(G)),x(G)&&(Ce=" "+Date.prototype.toUTCString.call(G)),E(G)&&(Ce=" "+l(G)),q.length===0&&(!xe||G.length==0))return he[0]+Ce+he[1];if(B<0)return M(G)?F.stylize(RegExp.prototype.toString.call(G),"regexp"):F.stylize("[Object]","special");F.seen.push(G);var _e;return xe?_e=p(F,G,B,re,q):_e=q.map(function(de){return f(F,G,B,re,de,xe)}),F.seen.pop(),b(_e,Ce,he)}function r(F,G){if(s(G))return F.stylize("undefined","undefined");if(T(G)){var B="'"+JSON.stringify(G).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return F.stylize(B,"string")}if(g(G))return F.stylize(""+G,"number");if(m(G))return F.stylize(""+G,"boolean");if(n(G))return F.stylize("null","null")}function l(F){return"["+Error.prototype.toString.call(F)+"]"}function p(F,G,B,W,K){for(var q=[],re=0,ee=G.length;re-1&&(q?ee=ee.split(` `).map(function(xe){return" "+xe}).join(` `).substr(2):ee=` `+ee.split(` `).map(function(xe){return" "+xe}).join(` `))):ee=F.stylize("[Circular]","special")),s(re)){if(q&&K.match(/^\d+$/))return ee;re=JSON.stringify(""+K),re.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(re=re.substr(1,re.length-2),re=F.stylize(re,"name")):(re=re.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),re=F.stylize(re,"string"))}return re+": "+ee}function b(F,G,B){var W=0,K=F.reduce(function(q,re){return W++,re.indexOf(` `)>=0&&W++,q+re.replace(/\u001b\[\d\d?m/g,"").length+1},0);return K>60?B[0]+(G===""?"":G+` `)+" "+F.join(`, `)+" "+B[1]:B[0]+G+" "+F.join(", ")+" "+B[1]}function v(F){return Array.isArray(F)}P.isArray=v;function m(F){return typeof F=="boolean"}P.isBoolean=m;function n(F){return F===null}P.isNull=n;function d(F){return F==null}P.isNullOrUndefined=d;function g(F){return typeof F=="number"}P.isNumber=g;function T(F){return typeof F=="string"}P.isString=T;function y(F){return typeof F=="symbol"}P.isSymbol=y;function s(F){return F===void 0}P.isUndefined=s;function M(F){return A(F)&&N(F)==="[object RegExp]"}P.isRegExp=M;function A(F){return typeof F=="object"&&F!==null}P.isObject=A;function x(F){return A(F)&&N(F)==="[object Date]"}P.isDate=x;function E(F){return A(F)&&(N(F)==="[object Error]"||F instanceof Error)}P.isError=E;function w(F){return typeof F=="function"}P.isFunction=w;function _(F){return F===null||typeof F=="boolean"||typeof F=="number"||typeof F=="string"||typeof F=="symbol"||typeof F=="undefined"}P.isPrimitive=_,P.isBuffer=I("./support/isBuffer");function N(F){return Object.prototype.toString.call(F)}function j(F){return F<10?"0"+F.toString(10):F.toString(10)}var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function z(){var F=new Date,G=[j(F.getHours()),j(F.getMinutes()),j(F.getSeconds())].join(":");return[F.getDate(),k[F.getMonth()],G].join(" ")}P.log=function(){console.log("%s - %s",z(),P.format.apply(P,arguments))},P.inherits=I("inherits"),P._extend=function(F,G){if(!G||!A(G))return F;for(var B=Object.keys(G),W=B.length;W--;)F[B[W]]=G[B[W]];return F};function H(F,G){return Object.prototype.hasOwnProperty.call(F,G)}}).call(this,I("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(I,J,P){"use strict";(function(){"use strict";P.stripBOM=function(L){return L[0]==="\uFEFF"?L.substring(1):L}}).call(void 0)},{}],245:[function(I,J,P){"use strict";var L=I("babel-runtime/helpers/typeof"),u=h(L),S=I("babel-runtime/core-js/object/keys"),R=h(S);function h(o){return o&&o.__esModule?o:{default:o}}(function(){"use strict";var o,C,c,a,i,r={}.hasOwnProperty;o=I("xmlbuilder"),C=I("./defaults").defaults,a=function(p){return typeof p=="string"&&(p.indexOf("&")>=0||p.indexOf(">")>=0||p.indexOf("<")>=0)},i=function(p){return""},c=function(p){return p.replace("]]>","]]]]>")},P.Builder=function(){function l(p){var f,b,v;this.options={},b=C["0.2"];for(f in b){if(!r.call(b,f))continue;v=b[f],this.options[f]=v}for(f in p){if(!r.call(p,f))continue;v=p[f],this.options[f]=v}}return l.prototype.buildObject=function(p){var f,b,v,m,n;return f=this.options.attrkey,b=this.options.charkey,(0,R.default)(p).length===1&&this.options.rootName===C["0.2"].rootName?(n=(0,R.default)(p)[0],p=p[n]):n=this.options.rootName,v=function(d){return function(g,T){var y,s,M,A,x,E;if((typeof T=="undefined"?"undefined":(0,u.default)(T))!=="object")d.options.cdata&&a(T)?g.raw(i(T)):g.txt(T);else if(Array.isArray(T))for(A in T){if(!r.call(T,A))continue;s=T[A];for(x in s)M=s[x],g=v(g.ele(x),M).up()}else for(x in T){if(!r.call(T,x))continue;if(s=T[x],x===f){if((typeof s=="undefined"?"undefined":(0,u.default)(s))==="object")for(y in s)E=s[y],g=g.att(y,E)}else if(x===b)d.options.cdata&&a(s)?g=g.raw(i(s)):g=g.txt(s);else if(Array.isArray(s))for(A in s){if(!r.call(s,A))continue;M=s[A],typeof M=="string"?d.options.cdata&&a(M)?g=g.ele(x).raw(i(M)).up():g=g.ele(x,M).up():g=v(g.ele(x),M).up()}else(typeof s=="undefined"?"undefined":(0,u.default)(s))==="object"?g=v(g.ele(x),s).up():typeof s=="string"&&d.options.cdata&&a(s)?g=g.ele(x).raw(i(s)).up():(s==null&&(s=""),g=g.ele(x,s.toString()).up())}return g}}(this),m=o.create(n,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),v(m,p).end(this.options.renderOpts)},l}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(I,J,P){"use strict";(function(){P.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(I,J,P){"use strict";var L=I("babel-runtime/core-js/promise"),u=a(L),S=I("babel-runtime/core-js/object/get-own-property-names"),R=a(S),h=I("babel-runtime/core-js/object/keys"),o=a(h),C=I("babel-runtime/helpers/typeof"),c=a(C);function a(i){return i&&i.__esModule?i:{default:i}}(function(){"use strict";var i,r,l,p,f,b,v,m,n=function(y,s){return function(){return y.apply(s,arguments)}},d=function(y,s){for(var M in s)g.call(s,M)&&(y[M]=s[M]);function A(){this.constructor=y}return A.prototype=s.prototype,y.prototype=new A,y.__super__=s.prototype,y},g={}.hasOwnProperty;v=I("sax"),l=I("events"),i=I("./bom"),b=I("./processors"),m=I("timers").setImmediate,r=I("./defaults").defaults,p=function(y){return(typeof y=="undefined"?"undefined":(0,c.default)(y))==="object"&&y!=null&&(0,o.default)(y).length===0},f=function(y,s,M){var A,x,E;for(A=0,x=y.length;A0&&(j[E.options.childkey]=z),z=j;else if(G){G[E.options.childkey]=G[E.options.childkey]||[],H={};for(N in z){if(!g.call(z,N))continue;H[N]=z[N]}G[E.options.childkey].push(H),delete z["#name"],(0,o.default)(z).length===1&&M in z&&!E.EXPLICIT_CHARKEY&&(z=z[M])}}return x.length>0?E.assignOrPush(G,k,z):(E.options.explicitRoot&&(F=z,z={},z[k]=F),E.resultObject=z,E.saxParser.ended=!0,E.emit("end",E.resultObject))}}(this),A=function(E){return function(w){var _,N;if(N=x[x.length-1],N)return N[M]+=w,E.options.explicitChildren&&E.options.preserveChildrenOrder&&E.options.charsAsChildren&&(E.options.includeWhiteChars||w.replace(/\\n/g,"").trim()!=="")&&(N[E.options.childkey]=N[E.options.childkey]||[],_={"#name":"__text__"},_[M]=w,E.options.normalize&&(_[M]=_[M].replace(/\s{2,}/g," ").trim()),N[E.options.childkey].push(_)),N}}(this),this.saxParser.ontext=A,this.saxParser.oncdata=function(E){return function(w){var _;if(_=A(w),_)return _.cdata=!0}}(this)},y.prototype.parseString=function(s,M){var A;M!=null&&typeof M=="function"&&(this.on("end",function(x){return this.reset(),M(null,x)}),this.on("error",function(x){return this.reset(),M(x)}));try{return s=s.toString(),s.trim()===""?(this.emit("end",null),!0):(s=i.stripBOM(s),this.options.async?(this.remaining=s,m(this.processAsync),this.saxParser):this.saxParser.write(s).close())}catch(x){if(A=x,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw A}else return this.emit("error",A),this.saxParser.errThrown=!0}},y.prototype.parseStringPromise=function(s){return new u.default(function(M){return function(A,x){return M.parseString(s,function(E,w){return E?x(E):A(w)})}}(this))},y}(l),P.parseString=function(T,y,s){var M,A,x;return s!=null?(typeof s=="function"&&(M=s),(typeof y=="undefined"?"undefined":(0,c.default)(y))==="object"&&(A=y)):(typeof y=="function"&&(M=y),A={}),x=new P.Parser(A),x.parseString(T,M)},P.parseStringPromise=function(T,y){var s,M;return(typeof y=="undefined"?"undefined":(0,c.default)(y))==="object"&&(s=y),M=new P.Parser(s),M.parseStringPromise(T)}}).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(I,J,P){"use strict";(function(){"use strict";var L;L=new RegExp(/(?!xmlns)^.*:/),P.normalize=function(u){return u.toLowerCase()},P.firstCharLowerCase=function(u){return u.charAt(0).toLowerCase()+u.slice(1)},P.stripPrefix=function(u){return u.replace(L,"")},P.parseNumbers=function(u){return isNaN(u)||(u=u%1===0?parseInt(u,10):parseFloat(u)),u},P.parseBooleans=function(u){return/^(?:true|false)$/i.test(u)&&(u=u.toLowerCase()==="true"),u}}).call(void 0)},{}],249:[function(I,J,P){"use strict";(function(){"use strict";var L,u,S,R,h=function(c,a){for(var i in a)o.call(a,i)&&(c[i]=a[i]);function r(){this.constructor=c}return r.prototype=a.prototype,c.prototype=new r,c.__super__=a.prototype,c},o={}.hasOwnProperty;u=I("./defaults"),L=I("./builder"),S=I("./parser"),R=I("./processors"),P.defaults=u.defaults,P.processors=R,P.ValidationError=function(C){h(c,C);function c(a){this.message=a}return c}(Error),P.Builder=L.Builder,P.Parser=S.Parser,P.parseString=S.parseString,P.parseStringPromise=S.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(I,J,P){"use strict";(function(){J.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(I,J,P){"use strict";(function(){J.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(I,J,P){"use strict";var L=I("babel-runtime/core-js/object/get-prototype-of"),u=C(L),S=I("babel-runtime/helpers/typeof"),R=C(S),h=I("babel-runtime/core-js/object/assign"),o=C(h);function C(c){return c&&c.__esModule?c:{default:c}}(function(){var c,a,i,r,l,p,f,b=[].slice,v={}.hasOwnProperty;c=function(){var n,d,g,T,y,s;if(s=arguments[0],y=2<=arguments.length?b.call(arguments,1):[],l(o.default))o.default.apply(null,arguments);else for(n=0,g=y.length;n":"attribute: {"+c+"}, parent: <"+this.parent.name+">"},C.prototype.isEqualNode=function(c){return c.namespaceURI!==this.namespaceURI||(c.prefix!==this.prefix||c.localName!==this.localName)?!1:!(c.value!==this.value)},C}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(I,J,P){"use strict";var L=I("babel-runtime/core-js/object/create"),u=S(L);function S(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,o,C=function(i,r){for(var l in r)c.call(r,l)&&(i[l]=r[l]);function p(){this.constructor=i}return p.prototype=r.prototype,i.prototype=new p,i.__super__=r.prototype,i},c={}.hasOwnProperty;R=I("./NodeType"),o=I("./XMLCharacterData"),J.exports=h=function(a){C(i,a);function i(r,l){if(i.__super__.constructor.call(this,r),l==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=R.CData,this.value=this.stringify.cdata(l)}return i.prototype.clone=function(){return(0,u.default)(this)},i.prototype.toString=function(r){return this.options.writer.cdata(this,this.options.writer.filterOptions(r))},i}(o)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(I,J,P){"use strict";var L=I("babel-runtime/core-js/object/create"),u=S(L);function S(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,o=function(a,i){for(var r in i)C.call(i,r)&&(a[r]=i[r]);function l(){this.constructor=a}return l.prototype=i.prototype,a.prototype=new l,a.__super__=i.prototype,a},C={}.hasOwnProperty;h=I("./XMLNode"),J.exports=R=function(c){o(a,c);function a(i){a.__super__.constructor.call(this,i),this.value=""}return Object.defineProperty(a.prototype,"data",{get:function(){return this.value},set:function(r){return this.value=r||""}}),Object.defineProperty(a.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(a.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}}),a.prototype.clone=function(){return(0,u.default)(this)},a.prototype.substringData=function(i,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.appendData=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.insertData=function(i,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.deleteData=function(i,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.replaceData=function(i,r,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.isEqualNode=function(i){return a.__super__.isEqualNode.apply(this,arguments).isEqualNode(i)?!(i.data!==this.data):!1},a}(h)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(I,J,P){"use strict";var L=I("babel-runtime/core-js/object/create"),u=S(L);function S(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,o,C=function(i,r){for(var l in r)c.call(r,l)&&(i[l]=r[l]);function p(){this.constructor=i}return p.prototype=r.prototype,i.prototype=new p,i.__super__=r.prototype,i},c={}.hasOwnProperty;R=I("./NodeType"),h=I("./XMLCharacterData"),J.exports=o=function(a){C(i,a);function i(r,l){if(i.__super__.constructor.call(this,r),l==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=R.Comment,this.value=this.stringify.comment(l)}return i.prototype.clone=function(){return(0,u.default)(this)},i.prototype.toString=function(r){return this.options.writer.comment(this,this.options.writer.filterOptions(r))},i}(h)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(I,J,P){"use strict";var L=I("babel-runtime/core-js/object/keys"),u=h(L),S=I("babel-runtime/core-js/object/create"),R=h(S);function h(o){return o&&o.__esModule?o:{default:o}}(function(){var o,C,c;C=I("./XMLDOMErrorHandler"),c=I("./XMLDOMStringList"),J.exports=o=function(){function a(){var i;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=i=(0,R.default)(this.defaultParams)}return Object.defineProperty(a.prototype,"parameterNames",{get:function(){return new c((0,u.default)(this.defaultParams))}}),a.prototype.getParameter=function(i){return this.params.hasOwnProperty(i)?this.params[i]:null},a.prototype.canSetParameter=function(i,r){return!0},a.prototype.setParameter=function(i,r){return r!=null?this.params[i]=r:delete this.params[i]},a}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(I,J,P){"use strict";(function(){var L;J.exports=L=function(){function u(){}return u.prototype.handleError=function(S){throw new Error(S)},u}()}).call(void 0)},{}],260:[function(I,J,P){"use strict";(function(){var L;J.exports=L=function(){function u(){}return u.prototype.hasFeature=function(S,R){return!0},u.prototype.createDocumentType=function(S,R,h){throw new Error("This DOM method is not implemented.")},u.prototype.createDocument=function(S,R,h){throw new Error("This DOM method is not implemented.")},u.prototype.createHTMLDocument=function(S){throw new Error("This DOM method is not implemented.")},u.prototype.getFeature=function(S,R){throw new Error("This DOM method is not implemented.")},u}()}).call(void 0)},{}],261:[function(I,J,P){"use strict";(function(){var L;J.exports=L=function(){function u(S){this.arr=S||[]}return Object.defineProperty(u.prototype,"length",{get:function(){return this.arr.length}}),u.prototype.item=function(S){return this.arr[S]||null},u.prototype.contains=function(S){return this.arr.indexOf(S)!==-1},u}()}).call(void 0)},{}],262:[function(I,J,P){"use strict";(function(){var L,u,S,R=function(C,c){for(var a in c)h.call(c,a)&&(C[a]=c[a]);function i(){this.constructor=C}return i.prototype=c.prototype,C.prototype=new i,C.__super__=c.prototype,C},h={}.hasOwnProperty;S=I("./XMLNode"),L=I("./NodeType"),J.exports=u=function(o){R(C,o);function C(c,a,i,r,l,p){if(C.__super__.constructor.call(this,c),a==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(i==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(a));if(!r)throw new Error("Missing DTD attribute type. "+this.debugInfo(a));if(!l)throw new Error("Missing DTD attribute default. "+this.debugInfo(a));if(l.indexOf("#")!==0&&(l="#"+l),!l.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(a));if(p&&!l.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(a));this.elementName=this.stringify.name(a),this.type=L.AttributeDeclaration,this.attributeName=this.stringify.name(i),this.attributeType=this.stringify.dtdAttType(r),p&&(this.defaultValue=this.stringify.dtdAttDefault(p)),this.defaultValueType=l}return C.prototype.toString=function(c){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(c))},C}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(I,J,P){"use strict";(function(){var L,u,S,R=function(C,c){for(var a in c)h.call(c,a)&&(C[a]=c[a]);function i(){this.constructor=C}return i.prototype=c.prototype,C.prototype=new i,C.__super__=c.prototype,C},h={}.hasOwnProperty;S=I("./XMLNode"),L=I("./NodeType"),J.exports=u=function(o){R(C,o);function C(c,a,i){if(C.__super__.constructor.call(this,c),a==null)throw new Error("Missing DTD element name. "+this.debugInfo());i||(i="(#PCDATA)"),Array.isArray(i)&&(i="("+i.join(",")+")"),this.name=this.stringify.name(a),this.type=L.ElementDeclaration,this.value=this.stringify.dtdElementValue(i)}return C.prototype.toString=function(c){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(c))},C}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(I,J,P){"use strict";(function(){var L,u,S,R,h=function(c,a){for(var i in a)o.call(a,i)&&(c[i]=a[i]);function r(){this.constructor=c}return r.prototype=a.prototype,c.prototype=new r,c.__super__=a.prototype,c},o={}.hasOwnProperty;R=I("./Utility").isObject,S=I("./XMLNode"),L=I("./NodeType"),J.exports=u=function(C){h(c,C);function c(a,i,r,l){if(c.__super__.constructor.call(this,a),r==null)throw new Error("Missing DTD entity name. "+this.debugInfo(r));if(l==null)throw new Error("Missing DTD entity value. "+this.debugInfo(r));if(this.pe=!!i,this.name=this.stringify.name(r),this.type=L.EntityDeclaration,!R(l))this.value=this.stringify.dtdEntityValue(l),this.internal=!0;else{if(!l.pubID&&!l.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(r));if(l.pubID&&!l.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(r));if(this.internal=!1,l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID)),l.nData!=null&&(this.nData=this.stringify.dtdNData(l.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(r))}}return Object.defineProperty(c.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(c.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(c.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(c.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(c.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(c.prototype,"xmlVersion",{get:function(){return null}}),c.prototype.toString=function(a){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(a))},c}(S)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(I,J,P){"use strict";(function(){var L,u,S,R=function(C,c){for(var a in c)h.call(c,a)&&(C[a]=c[a]);function i(){this.constructor=C}return i.prototype=c.prototype,C.prototype=new i,C.__super__=c.prototype,C},h={}.hasOwnProperty;S=I("./XMLNode"),L=I("./NodeType"),J.exports=u=function(o){R(C,o);function C(c,a,i){if(C.__super__.constructor.call(this,c),a==null)throw new Error("Missing DTD notation name. "+this.debugInfo(a));if(!i.pubID&&!i.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(a));this.name=this.stringify.name(a),this.type=L.NotationDeclaration,i.pubID!=null&&(this.pubID=this.stringify.dtdPubID(i.pubID)),i.sysID!=null&&(this.sysID=this.stringify.dtdSysID(i.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(c){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(c))},C}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(I,J,P){"use strict";(function(){var L,u,S,R,h=function(c,a){for(var i in a)o.call(a,i)&&(c[i]=a[i]);function r(){this.constructor=c}return r.prototype=a.prototype,c.prototype=new r,c.__super__=a.prototype,c},o={}.hasOwnProperty;R=I("./Utility").isObject,S=I("./XMLNode"),L=I("./NodeType"),J.exports=u=function(C){h(c,C);function c(a,i,r,l){var p;c.__super__.constructor.call(this,a),R(i)&&(p=i,i=p.version,r=p.encoding,l=p.standalone),i||(i="1.0"),this.type=L.Declaration,this.version=this.stringify.xmlVersion(i),r!=null&&(this.encoding=this.stringify.xmlEncoding(r)),l!=null&&(this.standalone=this.stringify.xmlStandalone(l))}return c.prototype.toString=function(a){return this.options.writer.declaration(this,this.options.writer.filterOptions(a))},c}(S)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(I,J,P){"use strict";(function(){var L,u,S,R,h,o,C,c,a,i=function(p,f){for(var b in f)r.call(f,b)&&(p[b]=f[b]);function v(){this.constructor=p}return v.prototype=f.prototype,p.prototype=new v,p.__super__=f.prototype,p},r={}.hasOwnProperty;a=I("./Utility").isObject,c=I("./XMLNode"),L=I("./NodeType"),u=I("./XMLDTDAttList"),R=I("./XMLDTDEntity"),S=I("./XMLDTDElement"),h=I("./XMLDTDNotation"),C=I("./XMLNamedNodeMap"),J.exports=o=function(l){i(p,l);function p(f,b,v){var m,n,d,g,T,y;if(p.__super__.constructor.call(this,f),this.type=L.DocType,f.children){for(g=f.children,n=0,d=g.length;n=0;)this.up();return this.onEnd()},x.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},x.prototype.openNode=function(E){var w,_,N,j;if(!E.isOpen){if(!this.root&&this.currentLevel===0&&E.type===L.Element&&(this.root=E),_="",E.type===L.Element){this.writerOptions.state=u.OpenTag,_=this.writer.indent(E,this.writerOptions,this.currentLevel)+"<"+E.name,j=E.attribs;for(N in j){if(!A.call(j,N))continue;w=j[N],_+=this.writer.attribute(w,this.writerOptions,this.currentLevel)}_+=(E.children?">":"/>")+this.writer.endline(E,this.writerOptions,this.currentLevel),this.writerOptions.state=u.InsideTag}else this.writerOptions.state=u.OpenTag,_=this.writer.indent(E,this.writerOptions,this.currentLevel)+""),_+=this.writer.endline(E,this.writerOptions,this.currentLevel);return this.onData(_,this.currentLevel),E.isOpen=!0}},x.prototype.closeNode=function(E){var w;if(!E.isClosed)return w="",this.writerOptions.state=u.CloseTag,E.type===L.Element?w=this.writer.indent(E,this.writerOptions,this.currentLevel)+""+this.writer.endline(E,this.writerOptions,this.currentLevel):w=this.writer.indent(E,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(E,this.writerOptions,this.currentLevel),this.writerOptions.state=u.None,this.onData(w,this.currentLevel),E.isClosed=!0},x.prototype.onData=function(E,w){return this.documentStarted=!0,this.onDataCallback(E,w+1)},x.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},x.prototype.debugInfo=function(E){return E==null?"":"node: <"+E+">"},x.prototype.ele=function(){return this.element.apply(this,arguments)},x.prototype.nod=function(E,w,_){return this.node(E,w,_)},x.prototype.txt=function(E){return this.text(E)},x.prototype.dat=function(E){return this.cdata(E)},x.prototype.com=function(E){return this.comment(E)},x.prototype.ins=function(E,w){return this.instruction(E,w)},x.prototype.dec=function(E,w,_){return this.declaration(E,w,_)},x.prototype.dtd=function(E,w,_){return this.doctype(E,w,_)},x.prototype.e=function(E,w,_){return this.element(E,w,_)},x.prototype.n=function(E,w,_){return this.node(E,w,_)},x.prototype.t=function(E){return this.text(E)},x.prototype.d=function(E){return this.cdata(E)},x.prototype.c=function(E){return this.comment(E)},x.prototype.r=function(E){return this.raw(E)},x.prototype.i=function(E,w){return this.instruction(E,w)},x.prototype.att=function(){return this.currentNode&&this.currentNode.type===L.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},x.prototype.a=function(){return this.currentNode&&this.currentNode.type===L.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},x.prototype.ent=function(E,w){return this.entity(E,w)},x.prototype.pent=function(E,w){return this.pEntity(E,w)},x.prototype.not=function(E,w){return this.notation(E,w)},x}()}).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(I,J,P){"use strict";var L=I("babel-runtime/core-js/object/create"),u=S(L);function S(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,o,C=function(i,r){for(var l in r)c.call(r,l)&&(i[l]=r[l]);function p(){this.constructor=i}return p.prototype=r.prototype,i.prototype=new p,i.__super__=r.prototype,i},c={}.hasOwnProperty;o=I("./XMLNode"),R=I("./NodeType"),J.exports=h=function(a){C(i,a);function i(r){i.__super__.constructor.call(this,r),this.type=R.Dummy}return i.prototype.clone=function(){return(0,u.default)(this)},i.prototype.toString=function(r){return""},i}(o)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(I,J,P){"use strict";var L=I("babel-runtime/core-js/object/create"),u=S(L);function S(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,o,C,c,a,i,r,l,p=function(v,m){for(var n in m)f.call(m,n)&&(v[n]=m[n]);function d(){this.constructor=v}return d.prototype=m.prototype,v.prototype=new d,v.__super__=m.prototype,v},f={}.hasOwnProperty;l=I("./Utility"),r=l.isObject,i=l.isFunction,a=l.getValue,c=I("./XMLNode"),R=I("./NodeType"),h=I("./XMLAttribute"),C=I("./XMLNamedNodeMap"),J.exports=o=function(b){p(v,b);function v(m,n,d){var g,T,y,s;if(v.__super__.constructor.call(this,m),n==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(n),this.type=R.Element,this.attribs={},this.schemaTypeInfo=null,d!=null&&this.attribute(d),m.type===R.Document&&(this.isRoot=!0,this.documentObject=m,m.rootObject=this,m.children)){for(s=m.children,T=0,y=s.length;T=g;n=0<=g?++d:--d)if(!this.attribs[n].isEqualNode(m.attribs[n]))return!1;return!0},v}(c)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(I,J,P){"use strict";var L=I("babel-runtime/core-js/object/keys"),u=S(L);function S(R){return R&&R.__esModule?R:{default:R}}(function(){var R;J.exports=R=function(){function h(o){this.nodes=o}return Object.defineProperty(h.prototype,"length",{get:function(){return(0,u.default)(this.nodes).length||0}}),h.prototype.clone=function(){return this.nodes=null},h.prototype.getNamedItem=function(o){return this.nodes[o]},h.prototype.setNamedItem=function(o){var C;return C=this.nodes[o.nodeName],this.nodes[o.nodeName]=o,C||null},h.prototype.removeNamedItem=function(o){var C;return C=this.nodes[o],delete this.nodes[o],C||null},h.prototype.item=function(o){return this.nodes[(0,u.default)(this.nodes)[o]]||null},h.prototype.getNamedItemNS=function(o,C){throw new Error("This DOM method is not implemented.")},h.prototype.setNamedItemNS=function(o){throw new Error("This DOM method is not implemented.")},h.prototype.removeNamedItemNS=function(o,C){throw new Error("This DOM method is not implemented.")},h}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(I,J,P){"use strict";(function(){var L,u,S,R,h,o,C,c,a,i,r,l,p,f,b,v,m,n,d,g={}.hasOwnProperty;d=I("./Utility"),n=d.isObject,m=d.isFunction,v=d.isEmpty,b=d.getValue,c=null,S=null,R=null,h=null,o=null,p=null,f=null,l=null,C=null,u=null,r=null,a=null,L=null,J.exports=i=function(){function T(y){this.parent=y,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,c||(c=I("./XMLElement"),S=I("./XMLCData"),R=I("./XMLComment"),h=I("./XMLDeclaration"),o=I("./XMLDocType"),p=I("./XMLRaw"),f=I("./XMLText"),l=I("./XMLProcessingInstruction"),C=I("./XMLDummy"),u=I("./NodeType"),r=I("./XMLNodeList"),a=I("./XMLNamedNodeMap"),L=I("./DocumentPosition"))}return Object.defineProperty(T.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(T.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(T.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(T.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(T.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new r(this.children)),this.childNodeList}}),Object.defineProperty(T.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(T.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(T.prototype,"previousSibling",{get:function(){var s;return s=this.parent.children.indexOf(this),this.parent.children[s-1]||null}}),Object.defineProperty(T.prototype,"nextSibling",{get:function(){var s;return s=this.parent.children.indexOf(this),this.parent.children[s+1]||null}}),Object.defineProperty(T.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(T.prototype,"textContent",{get:function(){var s,M,A,x,E;if(this.nodeType===u.Element||this.nodeType===u.DocumentFragment){for(E="",x=this.children,M=0,A=x.length;M":((M=this.parent)!=null?M.name:void 0)?"node: <"+y+">, parent: <"+this.parent.name+">":"node: <"+y+">"},T.prototype.ele=function(y,s,M){return this.element(y,s,M)},T.prototype.nod=function(y,s,M){return this.node(y,s,M)},T.prototype.txt=function(y){return this.text(y)},T.prototype.dat=function(y){return this.cdata(y)},T.prototype.com=function(y){return this.comment(y)},T.prototype.ins=function(y,s){return this.instruction(y,s)},T.prototype.doc=function(){return this.document()},T.prototype.dec=function(y,s,M){return this.declaration(y,s,M)},T.prototype.e=function(y,s,M){return this.element(y,s,M)},T.prototype.n=function(y,s,M){return this.node(y,s,M)},T.prototype.t=function(y){return this.text(y)},T.prototype.d=function(y){return this.cdata(y)},T.prototype.c=function(y){return this.comment(y)},T.prototype.r=function(y){return this.raw(y)},T.prototype.i=function(y,s){return this.instruction(y,s)},T.prototype.u=function(){return this.up()},T.prototype.importXMLBuilder=function(y){return this.importDocument(y)},T.prototype.replaceChild=function(y,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.removeChild=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.appendChild=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.hasChildNodes=function(){return this.children.length!==0},T.prototype.cloneNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isSupported=function(y,s){return!0},T.prototype.hasAttributes=function(){return this.attribs.length!==0},T.prototype.compareDocumentPosition=function(y){var s,M;return s=this,s===y?0:this.document()!==y.document()?(M=L.Disconnected|L.ImplementationSpecific,Math.random()<.5?M|=L.Preceding:M|=L.Following,M):s.isAncestor(y)?L.Contains|L.Preceding:s.isDescendant(y)?L.Contains|L.Following:s.isPreceding(y)?L.Preceding:L.Following},T.prototype.isSameNode=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.lookupPrefix=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isDefaultNamespace=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.lookupNamespaceURI=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isEqualNode=function(y){var s,M,A;if(y.nodeType!==this.nodeType)return!1;if(y.children.length!==this.children.length)return!1;for(s=M=0,A=this.children.length-1;0<=A?M<=A:M>=A;s=0<=A?++M:--M)if(!this.children[s].isEqualNode(y.children[s]))return!1;return!0},T.prototype.getFeature=function(y,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.setUserData=function(y,s,M){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getUserData=function(y){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.contains=function(y){return y?y===this||this.isDescendant(y):!1},T.prototype.isDescendant=function(y){var s,M,A,x,E;for(E=this.children,A=0,x=E.length;AM},T.prototype.treePosition=function(y){var s,M;return M=0,s=!1,this.foreachTreeNode(this.document(),function(A){if(M++,!s&&A===y)return s=!0}),s?M:-1},T.prototype.foreachTreeNode=function(y,s){var M,A,x,E,w;for(y||(y=this.document()),E=y.children,A=0,x=E.length;A0){for(this.stream.write(" ["),this.stream.write(this.endline(a,i,r)),i.state=u.InsideTag,b=a.children,p=0,f=b.length;p"),this.stream.write(this.endline(a,i,r)),i.state=u.None,this.closeNode(a,i,r)},c.prototype.element=function(a,i,r){var l,p,f,b,v,m,n,d,g,T;r||(r=0),this.openNode(a,i,r),i.state=u.OpenTag,this.stream.write(this.indent(a,i,r)+"<"+a.name),g=a.attribs;for(n in g){if(!o.call(g,n))continue;l=g[n],this.attribute(l,i,r)}if(f=a.children.length,b=f===0?null:a.children[0],f===0||a.children.every(function(y){return(y.type===L.Text||y.type===L.Raw)&&y.value===""}))i.allowEmpty?(this.stream.write(">"),i.state=u.CloseTag,this.stream.write("")):(i.state=u.CloseTag,this.stream.write(i.spaceBeforeSlash+"/>"));else if(i.pretty&&f===1&&(b.type===L.Text||b.type===L.Raw)&&b.value!=null)this.stream.write(">"),i.state=u.InsideTag,i.suppressPrettyCount++,d=!0,this.writeChildNode(b,i,r+1),i.suppressPrettyCount--,d=!1,i.state=u.CloseTag,this.stream.write("");else{for(this.stream.write(">"+this.endline(a,i,r)),i.state=u.InsideTag,T=a.children,v=0,m=T.length;v")}return this.stream.write(this.endline(a,i,r)),i.state=u.None,this.closeNode(a,i,r)},c.prototype.processingInstruction=function(a,i,r){return this.stream.write(c.__super__.processingInstruction.call(this,a,i,r))},c.prototype.raw=function(a,i,r){return this.stream.write(c.__super__.raw.call(this,a,i,r))},c.prototype.text=function(a,i,r){return this.stream.write(c.__super__.text.call(this,a,i,r))},c.prototype.dtdAttList=function(a,i,r){return this.stream.write(c.__super__.dtdAttList.call(this,a,i,r))},c.prototype.dtdElement=function(a,i,r){return this.stream.write(c.__super__.dtdElement.call(this,a,i,r))},c.prototype.dtdEntity=function(a,i,r){return this.stream.write(c.__super__.dtdEntity.call(this,a,i,r))},c.prototype.dtdNotation=function(a,i,r){return this.stream.write(c.__super__.dtdNotation.call(this,a,i,r))},c}(R)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(I,J,P){"use strict";(function(){var L,u,S=function(o,C){for(var c in C)R.call(C,c)&&(o[c]=C[c]);function a(){this.constructor=o}return a.prototype=C.prototype,o.prototype=new a,o.__super__=C.prototype,o},R={}.hasOwnProperty;u=I("./XMLWriterBase"),J.exports=L=function(h){S(o,h);function o(C){o.__super__.constructor.call(this,C)}return o.prototype.document=function(C,c){var a,i,r,l,p;for(c=this.filterOptions(c),l="",p=C.children,i=0,r=p.length;i","]]]]>"),this.assertLegalChar(h))},R.prototype.comment=function(h){if(this.options.noValidation)return h;if(h=""+h||"",h.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+h);return this.assertLegalChar(h)},R.prototype.raw=function(h){return this.options.noValidation?h:""+h||""},R.prototype.attValue=function(h){return this.options.noValidation?h:this.assertLegalChar(this.attEscape(h=""+h||""))},R.prototype.insTarget=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},R.prototype.insValue=function(h){if(this.options.noValidation)return h;if(h=""+h||"",h.match(/\?>/))throw new Error("Invalid processing instruction value: "+h);return this.assertLegalChar(h)},R.prototype.xmlVersion=function(h){if(this.options.noValidation)return h;if(h=""+h||"",!h.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+h);return h},R.prototype.xmlEncoding=function(h){if(this.options.noValidation)return h;if(h=""+h||"",!h.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+h);return this.assertLegalChar(h)},R.prototype.xmlStandalone=function(h){return this.options.noValidation?h:h?"yes":"no"},R.prototype.dtdPubID=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},R.prototype.dtdSysID=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},R.prototype.dtdElementValue=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},R.prototype.dtdAttType=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},R.prototype.dtdAttDefault=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},R.prototype.dtdEntityValue=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},R.prototype.dtdNData=function(h){return this.options.noValidation?h:this.assertLegalChar(""+h||"")},R.prototype.convertAttKey="@",R.prototype.convertPIKey="?",R.prototype.convertTextKey="#text",R.prototype.convertCDataKey="#cdata",R.prototype.convertCommentKey="#comment",R.prototype.convertRawKey="#raw",R.prototype.assertLegalChar=function(h){var o,C;if(this.options.noValidation)return h;if(o="",this.options.version==="1.0"){if(o=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C=h.match(o))throw new Error("Invalid character in string: "+h+" at index "+C.index)}else if(this.options.version==="1.1"&&(o=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C=h.match(o)))throw new Error("Invalid character in string: "+h+" at index "+C.index);return h},R.prototype.assertLegalName=function(h){var o;if(this.options.noValidation)return h;if(this.assertLegalChar(h),o=/^([: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])*$/,!h.match(o))throw new Error("Invalid character in name");return h},R.prototype.textEscape=function(h){var o;return this.options.noValidation?h:(o=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,h.replace(o,"&").replace(//g,">").replace(/\r/g," "))},R.prototype.attEscape=function(h){var o;return this.options.noValidation?h:(o=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,h.replace(o,"&").replace(/0)?new Array(s).join(T.indent):""},d.prototype.endline=function(g,T,y){return!T.pretty||T.suppressPrettyCount?"":T.newline},d.prototype.attribute=function(g,T,y){var s;return this.openAttribute(g,T,y),s=" "+g.name+'="'+g.value+'"',this.closeAttribute(g,T,y),s},d.prototype.cdata=function(g,T,y){var s;return this.openNode(g,T,y),T.state=u.OpenTag,s=this.indent(g,T,y)+""+this.endline(g,T,y),T.state=u.None,this.closeNode(g,T,y),s},d.prototype.comment=function(g,T,y){var s;return this.openNode(g,T,y),T.state=u.OpenTag,s=this.indent(g,T,y)+""+this.endline(g,T,y),T.state=u.None,this.closeNode(g,T,y),s},d.prototype.declaration=function(g,T,y){var s;return this.openNode(g,T,y),T.state=u.OpenTag,s=this.indent(g,T,y)+"",s+=this.endline(g,T,y),T.state=u.None,this.closeNode(g,T,y),s},d.prototype.docType=function(g,T,y){var s,M,A,x,E;if(y||(y=0),this.openNode(g,T,y),T.state=u.OpenTag,x=this.indent(g,T,y),x+="0){for(x+=" [",x+=this.endline(g,T,y),T.state=u.InsideTag,E=g.children,M=0,A=E.length;M",x+=this.endline(g,T,y),T.state=u.None,this.closeNode(g,T,y),x},d.prototype.element=function(g,T,y){var s,M,A,x,E,w,_,N,j,k,z,H,F,G;y||(y=0),k=!1,z="",this.openNode(g,T,y),T.state=u.OpenTag,z+=this.indent(g,T,y)+"<"+g.name,H=g.attribs;for(j in H){if(!n.call(H,j))continue;s=H[j],z+=this.attribute(s,T,y)}if(A=g.children.length,x=A===0?null:g.children[0],A===0||g.children.every(function(B){return(B.type===L.Text||B.type===L.Raw)&&B.value===""}))T.allowEmpty?(z+=">",T.state=u.CloseTag,z+=""+this.endline(g,T,y)):(T.state=u.CloseTag,z+=T.spaceBeforeSlash+"/>"+this.endline(g,T,y));else if(T.pretty&&A===1&&(x.type===L.Text||x.type===L.Raw)&&x.value!=null)z+=">",T.state=u.InsideTag,T.suppressPrettyCount++,k=!0,z+=this.writeChildNode(x,T,y+1),T.suppressPrettyCount--,k=!1,T.state=u.CloseTag,z+=""+this.endline(g,T,y);else{if(T.dontPrettyTextNodes){for(F=g.children,E=0,_=F.length;E<_;E++)if(M=F[E],(M.type===L.Text||M.type===L.Raw)&&M.value!=null){T.suppressPrettyCount++,k=!0;break}}for(z+=">"+this.endline(g,T,y),T.state=u.InsideTag,G=g.children,w=0,N=G.length;w",k&&T.suppressPrettyCount--,z+=this.endline(g,T,y),T.state=u.None}return this.closeNode(g,T,y),z},d.prototype.writeChildNode=function(g,T,y){switch(g.type){case L.CData:return this.cdata(g,T,y);case L.Comment:return this.comment(g,T,y);case L.Element:return this.element(g,T,y);case L.Raw:return this.raw(g,T,y);case L.Text:return this.text(g,T,y);case L.ProcessingInstruction:return this.processingInstruction(g,T,y);case L.Dummy:return"";case L.Declaration:return this.declaration(g,T,y);case L.DocType:return this.docType(g,T,y);case L.AttributeDeclaration:return this.dtdAttList(g,T,y);case L.ElementDeclaration:return this.dtdElement(g,T,y);case L.EntityDeclaration:return this.dtdEntity(g,T,y);case L.NotationDeclaration:return this.dtdNotation(g,T,y);default:throw new Error("Unknown XML node type: "+g.constructor.name)}},d.prototype.processingInstruction=function(g,T,y){var s;return this.openNode(g,T,y),T.state=u.OpenTag,s=this.indent(g,T,y)+"",s+=this.endline(g,T,y),T.state=u.None,this.closeNode(g,T,y),s},d.prototype.raw=function(g,T,y){var s;return this.openNode(g,T,y),T.state=u.OpenTag,s=this.indent(g,T,y),T.state=u.InsideTag,s+=g.value,T.state=u.CloseTag,s+=this.endline(g,T,y),T.state=u.None,this.closeNode(g,T,y),s},d.prototype.text=function(g,T,y){var s;return this.openNode(g,T,y),T.state=u.OpenTag,s=this.indent(g,T,y),T.state=u.InsideTag,s+=g.value,T.state=u.CloseTag,s+=this.endline(g,T,y),T.state=u.None,this.closeNode(g,T,y),s},d.prototype.dtdAttList=function(g,T,y){var s;return this.openNode(g,T,y),T.state=u.OpenTag,s=this.indent(g,T,y)+""+this.endline(g,T,y),T.state=u.None,this.closeNode(g,T,y),s},d.prototype.dtdElement=function(g,T,y){var s;return this.openNode(g,T,y),T.state=u.OpenTag,s=this.indent(g,T,y)+""+this.endline(g,T,y),T.state=u.None,this.closeNode(g,T,y),s},d.prototype.dtdEntity=function(g,T,y){var s;return this.openNode(g,T,y),T.state=u.OpenTag,s=this.indent(g,T,y)+""+this.endline(g,T,y),T.state=u.None,this.closeNode(g,T,y),s},d.prototype.dtdNotation=function(g,T,y){var s;return this.openNode(g,T,y),T.state=u.OpenTag,s=this.indent(g,T,y)+""+this.endline(g,T,y),T.state=u.None,this.closeNode(g,T,y),s},d.prototype.openNode=function(g,T,y){},d.prototype.closeNode=function(g,T,y){},d.prototype.openAttribute=function(g,T,y){},d.prototype.closeAttribute=function(g,T,y){},d}()}).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(I,J,P){"use strict";(function(){var L,u,S,R,h,o,C,c,a,i;i=I("./Utility"),c=i.assign,a=i.isFunction,S=I("./XMLDOMImplementation"),R=I("./XMLDocument"),h=I("./XMLDocumentCB"),C=I("./XMLStringWriter"),o=I("./XMLStreamWriter"),L=I("./NodeType"),u=I("./WriterState"),J.exports.create=function(r,l,p,f){var b,v;if(r==null)throw new Error("Root element needs a name.");return f=c({},l,p,f),b=new R(f),v=b.element(r),f.headless||(b.declaration(f),(f.pubID!=null||f.sysID!=null)&&b.dtd(f)),v},J.exports.begin=function(r,l,p){var f;return a(r)&&(f=[r,l],l=f[0],p=f[1],r={}),l?new h(r,l,p):new R(r)},J.exports.stringWriter=function(r){return new C(r)},J.exports.streamWriter=function(r,l){return new o(r,l)},J.exports.implementation=new S,J.exports.nodeType=L,J.exports.writerState=u}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(I,J,P){J.exports=u;var L=Object.prototype.hasOwnProperty;function u(){for(var S={},R=0;Rh?r=i(r):r.length>5]|=128<>>9<<4)+14]=l;for(var p=1732584193,f=-271733879,b=-1732584194,v=271733878,m=0;m>16)+(l>>16)+(p>>16);return f<<16|p&65535}function i(r,l){return r<>>32-l}J.exports=function(l){return L.hash(l,S,16)}},{"./helpers":285}],287:[function(I,J,P){"use strict";var L=I("./helpers");function u(C,c){C[c>>5]|=128<<24-c%32,C[(c+64>>9<<4)+15]=c;for(var a=Array(80),i=1732584193,r=-271733879,l=-1732584194,p=271733878,f=-1009589776,b=0;b>16)+(c>>16)+(a>>16);return i<<16|a&65535}function o(C,c){return C<>>32-c}J.exports=function(c){return L.hash(c,u,20,!0)}},{"./helpers":285}],288:[function(I,J,P){"use strict";J.exports=function(){return function(){}}},{}],289:[function(I,J,P){(function(L){"use strict";var u=I("babel-runtime/helpers/typeof"),S=R(u);function R(i){return i&&i.__esModule?i:{default:i}}var h=I("stream"),o=h.Stream,C=I("../lib/common/utils/isArray"),c=C.isArray;J.exports.string=function(r){return typeof r=="string"},J.exports.array=c,J.exports.buffer=L.isBuffer;function a(i){return i instanceof o}J.exports.writableStream=function(r){return a(r)&&typeof r._write=="function"&&(0,S.default)(r._writableState)==="object"}}).call(this,{isBuffer:I("../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(I,J,P){"use strict";P.encodeURIComponent=function(L){try{return encodeURIComponent(L)}catch(u){return L}},P.escape=I("escape-html"),P.timestamp=function(u){if(u){var S=u;return typeof S=="string"&&(S=Number(S)),String(u).length===10&&(S*=1e3),new Date(S)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(I,J,P){(function(L,u){"use strict";var S=I("babel-runtime/core-js/json/stringify"),R=C(S),h=I("babel-runtime/helpers/typeof"),o=C(h);function C(T){return T&&T.__esModule?T:{default:T}}var c=I("util"),a=I("url"),i=I("http"),r=I("https"),l=I("debug")("urllib"),p=I("humanize-ms"),f,b=0,v=Math.pow(2,31)-10,m=/^https?:\/\//i;function n(T,y){return T===void 0?y:T}function d(T,y){return function(s,M,A){if(s)return y(s);T({data:M,status:A.statusCode,headers:A.headers,res:A})}}P.TIMEOUTS=[p("300s"),p("300s")];var g=["json","text"];P.request=function(y,s,M){return arguments.length===2&&typeof s=="function"&&(M=s,s=null),typeof M=="function"?P.requestWithCallback(y,s,M):(f||(f=I("any-promise")),new f(function(A,x){P.requestWithCallback(y,s,d(A,x))}))},P.requestWithCallback=function(y,s,M){if(!y||typeof y!="string"&&(typeof y=="undefined"?"undefined":(0,o.default)(y))!=="object"){var A=c.format("expect request url to be a string or a http request options, but got %j",y);throw new Error(A)}arguments.length===2&&typeof s=="function"&&(M=s,s=null),s=s||{},b>=v&&(b=0);var x=++b;s.requestUrls=s.requestUrls||[];var E={requestId:x,url:y,args:s,ctx:s.ctx};s.emitter&&s.emitter.emit("request",E),s.timeout=s.timeout||P.TIMEOUTS,s.maxRedirects=s.maxRedirects||10,s.streaming=s.streaming||s.customResponse;var w=Date.now(),_;typeof y=="string"?(m.test(y)||(y="http://"+y),_=a.parse(y)):_=y;var N=(s.type||s.method||_.method||"GET").toUpperCase(),j=_.port||80,k=i,z=n(s.agent,P.agent),H=s.fixJSONCtlChars;_.protocol==="https:"&&(k=r,z=n(s.httpsAgent,P.httpsAgent),_.port||(j=443));var F={host:_.hostname||_.host||"localhost",path:_.path||"/",method:N,port:j,agent:z,headers:s.headers||{},lookup:s.lookup};Array.isArray(s.timeout)?F.requestTimeout=s.timeout[s.timeout.length-1]:typeof s.timeout!="undefined"&&(F.requestTimeout=s.timeout);for(var G=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],B=0;B=0)return l("Request#%d %s: got digest auth header WWW-Authenticate: %s",x,y,Ue),s.headers=s.headers||{},s.headers.Authorization=digestAuthHeader(F.method,F.path,Ue,s.digestAuth),l("Request#%d %s: auth with digest header: %s",x,y,s.headers.Authorization),ct.headers["set-cookie"]&&(s.headers.Cookie=ct.headers["set-cookie"].join(";")),P.requestWithCallback(y,s,$e)}var Me=Date.now()-w;le&&(le.contentDownload=Me),l("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Me,ae,Se,F.method,F.host,F.path,ce,le);var Ie={status:Se,statusCode:Se,headers:qe,size:ae,aborted:te,rt:Me,keepAliveSocket:ce,data:et,requestUrls:s.requestUrls,timing:le,remoteAddress:ue,remotePort:Oe};if(Re){var ye="";z&&typeof z.getCurrentStatus=="function"&&(ye=", agent status: "+(0,R.default)(z.getCurrentStatus())),Re.message+=", "+F.method+" "+y+" "+Se+" (connected: "+de+", keepalive socket: "+ce+ye+`) headers: `+(0,R.default)(qe),Re.data=et,Re.path=F.path,Re.status=Se,Re.headers=qe,Re.res=Ie}$e(Re,et,s.streaming?ct:Ie),s.emitter&&(E.url=y,E.socket=st&&st.connection,E.options=F,E.size=Ce,s.emitter.emit("response",{requestId:x,error:Re,ctx:s.ctx,req:E,res:Ie}))}function be(Re){var et=null;if(s.followRedirect&&statuses.redirect[Re.statusCode]){s._followRedirectCount=(s._followRedirectCount||0)+1;var ct=Re.headers.location;if(!ct)et=new Error("Got statusCode "+Re.statusCode+" but cannot resolve next location from headers"),et.name="FollowRedirectError";else if(s._followRedirectCount>s.maxRedirects)et=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+y),et.name="MaxRedirectError";else{var $e=s.formatRedirectUrl?s.formatRedirectUrl(y,ct):a.resolve(y,ct);l("Request#%d %s: `redirected` from %s to %s",x,F.path,y,$e),Y(),s.headers&&s.headers.Host&&m.test(ct)&&(s.headers.Host=null);var qe=M;return M=null,P.requestWithCallback($e,s,qe),{redirect:!0,error:null}}}return{redirect:!1,error:et}}!F.headers["User-Agent"]&&!F.headers["user-agent"]&&(F.headers["User-Agent"]=navigator.userAgent),s.gzip&&(!F.headers["Accept-Encoding"]&&!F.headers["accept-encoding"]&&(F.headers["Accept-Encoding"]="gzip"));function ge(Re,et,ct){var $e=Re.headers["content-encoding"];return ct(null,et,$e)}var De=s.writeStream;l("Request#%d %s %s with headers %j, options.path: %s",x,N,y,F.headers,F.path),s.requestUrls.push(y);function Qe(Re){if(le&&(le.waiting=Date.now()-w),l("Request#%d %s `req response` event emit: status %d, headers: %j",x,y,Re.statusCode,Re.headers),s.streaming){var et=be(Re);if(et.redirect){Re.resume();return}return et.error?(Re.resume(),Z(et.error,null,Re)):Z(null,null,Re)}if(Re.on("close",function(){l("Request#%d %s: `res close` event emit, total size %d",x,y,ae)}),Re.on("error",function(){l("Request#%d %s: `res error` event emit, total size %d",x,y,ae)}),Re.on("aborted",function(){te=!0,l("Request#%d %s: `res aborted` event emit, total size %d",x,y,ae)}),De){var et=be(Re);if(et.redirect){Re.resume();return}return et.error?(Re.resume(),De.end(),Z(et.error,null,Re)):(s.consumeWriteStream===!1?Re.on("end",Z.bind(null,null,null,Re)):isNode010||isNode012?first([[De,"close"],[Re,"aborted"]],function(qe,Ue,Me){l("Request#%d %s: writeStream or res %s event emitted",x,y,Me),Z(_e||null,null,Re)}):De.on("close",function(){l("Request#%d %s: writeStream close event emitted",x,y),Z(_e||null,null,Re)}),Re.pipe(De))}var ct=[];Re.on("data",function($e){l("Request#%d %s: `res data` event emit, size %d",x,y,$e.length),ae+=$e.length,ct.push($e)}),Re.on("end",function(){var $e=u.concat(ct,ae);if(l("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",x,y,ae,Re._dumped),_e)return Z(_e,$e,Re);var qe=be(Re);if(qe.error)return Z(qe.error,$e,Re);if(qe.redirect)return;ge(Re,$e,function(Ue,Me,Ie){if(Ue)return Z(Ue,$e,Re);if(!Ie&&g.indexOf(s.dataType)>=0){try{Me=decodeBodyByCharset(Me,Re)}catch(Te){return l("decodeBodyByCharset error: %s",Te),Z(null,Me,Re)}if(s.dataType==="json")if(ae===0)Me=null;else{var ye=parseJSON(Me,H);ye.error?Ue=ye.error:Me=ye.data}}te&&l("Request#%d %s: Remote socket was terminated before `response.end()` was called",x,y),Z(Ue,Me,Re)})})}var Ze,nt;Array.isArray(s.timeout)?(Ze=p(s.timeout[0]),nt=p(s.timeout[1])):Ze=nt=p(s.timeout),l("ConnectTimeout: %d, ResponseTimeout: %d",Ze,nt);function tt(){l("Connect timer ticking, timeout: %d",Ze),he=setTimeout(function(){he=null,Se===-1&&(Se=-2);var Re="Connect timeout for "+Ze+"ms",et="ConnectionTimeoutError";st.socket||(et="SocketAssignTimeoutError",Re+=", working sockets is full"),_e=new Error(Re),_e.name=et,_e.requestId=x,l("ConnectTimeout: Request#%d %s %s: %s, connected: %s",x,y,_e.name,Re,de),je()},Ze)}function lt(){l("Response timer ticking, timeout: %d",nt),ke=setTimeout(function(){ke=null;var Re="Response timeout for "+nt+"ms",et="ResponseTimeoutError";_e=new Error(Re),_e.name=et,_e.requestId=x,l("ResponseTimeout: Request#%d %s %s: %s, connected: %s",x,y,_e.name,Re,de),je()},nt)}var st;F.mode=s.mode?s.mode:"";try{st=k.request(F,Qe)}catch(Re){return Z(Re)}typeof window=="undefined"?tt():st.on("requestTimeout",function(){Se===-1&&(Se=-2);var Re="Connect timeout for "+Ze+"ms",et="ConnectionTimeoutError";_e=new Error(Re),_e.name=et,_e.requestId=x,je()});function je(){l("Request#%d %s abort, connected: %s",x,y,de),st.socket||(_e.noSocket=!0,Z(_e)),st.abort()}return le&&st.on("finish",function(){le.requestSent=Date.now()-w}),st.once("socket",function(Re){le&&(le.queuing=Date.now()-w),isNode010&&Re.socket&&(Re=Re.socket);var et=Re.readyState;if(et==="opening"){Re.once("lookup",function(ct,$e,qe){l("Request#%d %s lookup: %s, %s, %s",x,y,ct,$e,qe),le&&(le.dnslookup=Date.now()-w),$e&&(ue=$e)}),Re.once("connect",function(){le&&(le.connected=Date.now()-w),Q(),lt(),l("Request#%d %s new socket connected",x,y),de=!0,ue||(ue=Re.remoteAddress),Oe=Re.remotePort});return}l("Request#%d %s reuse socket connected, readyState: %s",x,y,et),de=!0,ce=!0,ue||(ue=Re.remoteAddress),Oe=Re.remotePort,Q(),lt()}),st.on("error",function(Re){(Re.name==="Error"||Re.name==="TypeError")&&(Re.name=de?"ResponseError":"RequestError"),Re.message+=' (req "error")',l("Request#%d %s `req error` event emit, %s: %s",x,y,Re.name,Re.message),Z(_e||Re)}),De&&De.once("error",function(Re){Re.message+=' (writeStream "error")',_e=Re,l("Request#%d %s `writeStream error` event emit, %s: %s",x,y,Re.name,Re.message),je()}),s.stream?(s.stream.pipe(st),s.stream.once("error",function(Re){Re.message+=' (stream "error")',_e=Re,l("Request#%d %s `readStream error` event emit, %s: %s",x,y,Re.name,Re.message),je()})):st.end(q),st.requestId=x,st}}).call(this,I("_process"),I("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(I,J,P){"use strict";P.d(J,"a",function(){return c});var L=P("q1tI"),u=P("biw7"),S=P("fyJ8");function R(a){var i=a.className,r=a.index,l=a.children,p=a.colSpan,f=a.rowSpan,b=L.useContext(u.a),v=b.prefixCls,m=b.fixedInfoList,n=m[r];return L.createElement(S.a,Object.assign({className:i,index:r,component:"td",prefixCls:v,record:null,dataIndex:null,render:function(){return{children:l,props:{colSpan:p,rowSpan:f}}}},n))}function h(a){return L.createElement("tr",Object.assign({},a))}function o(a){var i=a.children,r=L.useContext(u.a),l=r.prefixCls;return L.createElement("tfoot",{className:"".concat(l,"-summary")},i)}var C=J.b=o,c={Cell:R,Row:h}},nVVt:function(I,J){I.exports={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3}},nj2k:function(I,J,P){I.exports=P.p+"static/nodata.c3b0b86c.svg"},oRuE:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("OLod"))})(this,function(L){return L.pad.Iso10126={pad:function(u,S){var R=S*4,h=R-u.sigBytes%R;u.concat(L.lib.WordArray.random(h-1)).concat(L.lib.WordArray.create([h<<24],1))},unpad:function(u){var S=u.words[u.sigBytes-1>>>2]&255;u.sigBytes-=S}},L.pad.Iso10126})},osHv:function(I,J,P){(function(L){L(P("VrN/"))})(function(L){"use strict";var u=L.Pos;function S(m,n){return m.line-n.line||m.ch-n.ch}var R="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",h=R+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",o=new RegExp("<(/?)(["+R+"]["+h+"]*)","g");function C(m,n,d,g){this.line=n,this.ch=d,this.cm=m,this.text=m.getLine(n),this.min=g?Math.max(g.from,m.firstLine()):m.firstLine(),this.max=g?Math.min(g.to-1,m.lastLine()):m.lastLine()}function c(m,n){var d=m.cm.getTokenTypeAt(u(m.line,n));return d&&/\btag\b/.test(d)}function a(m){return m.line>=m.max?void 0:(m.ch=0,m.text=m.cm.getLine(++m.line),!0)}function i(m){return m.line<=m.min?void 0:(m.text=m.cm.getLine(--m.line),m.ch=m.text.length,!0)}function r(m){for(;;){var n=m.text.indexOf(">",m.ch);if(n==-1){if(a(m))continue;return}if(!c(m,n+1)){m.ch=n+1;continue}var d=m.text.lastIndexOf("/",n),g=d>-1&&!/\S/.test(m.text.slice(d+1,n));return m.ch=n+1,g?"selfClose":"regular"}}function l(m){for(;;){var n=m.ch?m.text.lastIndexOf("<",m.ch-1):-1;if(n==-1){if(i(m))continue;return}if(!c(m,n+1)){m.ch=n;continue}o.lastIndex=n,m.ch=n;var d=o.exec(m.text);if(d&&d.index==n)return d}}function p(m){for(;;){o.lastIndex=m.ch;var n=o.exec(m.text);if(!n){if(a(m))continue;return}if(!c(m,n.index+1)){m.ch=n.index+1;continue}return m.ch=n.index+n[0].length,n}}function f(m){for(;;){var n=m.ch?m.text.lastIndexOf(">",m.ch-1):-1;if(n==-1){if(i(m))continue;return}if(!c(m,n+1)){m.ch=n;continue}var d=m.text.lastIndexOf("/",n),g=d>-1&&!/\S/.test(m.text.slice(d+1,n));return m.ch=n+1,g?"selfClose":"regular"}}function b(m,n){for(var d=[];;){var g=p(m),T,y=m.line,s=m.ch-(g?g[0].length:0);if(!g||!(T=r(m)))return;if(T=="selfClose")continue;if(g[1]){for(var M=d.length-1;M>=0;--M)if(d[M]==g[2]){d.length=M;break}if(M<0&&(!n||n==g[2]))return{tag:g[2],from:u(y,s),to:u(m.line,m.ch)}}else d.push(g[2])}}function v(m,n){for(var d=[];;){var g=f(m);if(!g)return;if(g=="selfClose"){l(m);continue}var T=m.line,y=m.ch,s=l(m);if(!s)return;if(s[1])d.push(s[2]);else{for(var M=d.length-1;M>=0;--M)if(d[M]==s[2]){d.length=M;break}if(M<0&&(!n||n==s[2]))return{tag:s[2],from:u(m.line,m.ch),to:u(T,y)}}}}L.registerHelper("fold","xml",function(m,n){for(var d=new C(m,n.line,0);;){var g=p(d);if(!g||d.line!=n.line)return;var T=r(d);if(!T)return;if(!g[1]&&T!="selfClose"){var y=u(d.line,d.ch),s=b(d,g[2]);return s&&S(s.from,y)>0?{from:y,to:s.from}:null}}}),L.findMatchingTag=function(m,n,d){var g=new C(m,n.line,n.ch,d);if(g.text.indexOf(">")==-1&&g.text.indexOf("<")==-1)return;var T=r(g),y=T&&u(g.line,g.ch),s=T&&l(g);if(!T||!s||S(g,n)>0)return;var M={from:u(g.line,g.ch),to:y,tag:s[2]};return T=="selfClose"?{open:M,close:null,at:"open"}:s[1]?{open:v(g,s[2]),close:M,at:"close"}:(g=new C(m,y.line,y.ch,d),{open:M,close:b(g,s[2]),at:"open"})},L.findEnclosingTag=function(m,n,d,g){for(var T=new C(m,n.line,n.ch,d);;){var y=v(T,g);if(!y)break;var s=new C(m,n.line,n.ch,d),M=b(s,y.tag);if(M)return{open:y,close:M}}},L.scanForClosingTag=function(m,n,d,g){var T=new C(m,n.line,n.ch,g?{from:0,to:g}:null);return b(T,d)}})},p5ED:function(I,J,P){"use strict";var L=P("+L6B"),u=P("2/Rp"),S=P("5Dmo"),R=P("3S7+"),h=P("k1fw"),o=P("tJVT"),C=P("q1tI"),c=P.n(C),a=P("vHTk"),i=P.n(a),r=P("yEEn"),l=P("ZW9T"),p=P("1vsH");J.a=function(f){var b=f.name,v=f.data,m=f.theme,n=f.type,d=f.filename,g=f.monacoEditor,T=f.className,y=f.style,s=f.close,M=f.onClose,A=f.hasMask,x=Object(C.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),E=Object(o.a)(x,2),w=E[0],_=E[1],N=Object(C.useState)(""),j=Object(o.a)(N,2),k=j[0],z=j[1],H=Object(C.useRef)();d&&(g.filename=d),Object(C.useEffect)(function(){var B,W,K=(B=document.cookie)===null||B===void 0||((W=B.replace(/\s/g,""))===null||W===void 0)?void 0:W.split(";");K==null||K.map(function(q){var re=q.split("=");re[0]==="_educoder_session"&&z(re[1])})},[]);var F=function(){if(v.startsWith("http")||v.startsWith("/")){G();return}Object(p.x)(d||"educoder",v,d)},G=function(){Object(p.v)(d||b,v)};return console.log("data:",v,"fileanme:",d," name:",b),c.a.createElement("div",{style:Object(h.a)({},y||{}),className:"".concat(A&&i.a.bgBlack," ").concat(n?i.a.wrp:"hide")},s&&c.a.createElement("div",{className:i.a.close,ref:H},c.a.createElement(R.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return H.current}},c.a.createElement("span",{onClick:G},c.a.createElement("i",{className:"icon-quxiaozhiding"}))),c.a.createElement(R.a,{title:"\u5173\u95ED",getPopupContainer:function(){return H.current}},c.a.createElement("span",{className:"",onClick:M},c.a.createElement("i",{className:"icon-guanbi1"})))),c.a.createElement("div",{className:"".concat(i.a[T]," ").concat(T," ").concat(i.a.monaco," ").concat(n==="txt"?"show":"hide")},n==="txt"&&c.a.createElement(l.b,g)),n==="audio"&&c.a.createElement("audio",{src:"".concat(v!=null&&v.startsWith("/")||(v==null?void 0:v.indexOf("https://"))>-1?v:"data:audio/mp3;base64,").concat(v),autoPlay:!0}),n==="video"&&c.a.createElement(c.a.Fragment,null,v!=null&&v.startsWith("/")?c.a.createElement("video",{controls:!0,src:"".concat(v),autoPlay:!0}):c.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(v),autoPlay:!0})),n==="html"&&c.a.createElement("iframe",{src:v+"&disposition=inline"}),n==="pdf"&&c.a.createElement("embed",{className:i.a.embed,src:v}),n==="image"&&c.a.createElement(c.a.Fragment,null,c.a.createElement("img",{src:"".concat(v!=null&&v.startsWith("/")||(v==null?void 0:v.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(v)})),n==="other"&&c.a.createElement("div",null,c.a.createElement(u.a,{type:"primary",size:"large",onClick:F},c.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(n==="download"||n==="office")&&c.a.createElement(u.a,{type:"primary",size:"large",onClick:F},c.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(I,J,P){},pA7S:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("ETIr"),P("cv67"),P("K3mO"),P("OLod"))})(this,function(L){return function(){var u=L,S=u.lib,R=S.WordArray,h=S.BlockCipher,o=u.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],c=[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],a=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],i=[{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}],r=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],l=o.DES=h.extend({_doReset:function(){for(var v=this._key,m=v.words,n=[],d=0;d<56;d++){var g=C[d]-1;n[d]=m[g>>>5]>>>31-g%32&1}for(var T=this._subKeys=[],y=0;y<16;y++){for(var s=T[y]=[],M=a[y],d=0;d<24;d++)s[d/6|0]|=n[(c[d]-1+M)%28]<<31-d%6,s[4+(d/6|0)]|=n[28+(c[d+24]-1+M)%28]<<31-d%6;s[0]=s[0]<<1|s[0]>>>31;for(var d=1;d<7;d++)s[d]=s[d]>>>(d-1)*4+3;s[7]=s[7]<<5|s[7]>>>27}for(var A=this._invSubKeys=[],d=0;d<16;d++)A[d]=T[15-d]},encryptBlock:function(v,m){this._doCryptBlock(v,m,this._subKeys)},decryptBlock:function(v,m){this._doCryptBlock(v,m,this._invSubKeys)},_doCryptBlock:function(v,m,n){this._lBlock=v[m],this._rBlock=v[m+1],p.call(this,4,252645135),p.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),p.call(this,1,1431655765);for(var d=0;d<16;d++){for(var g=n[d],T=this._lBlock,y=this._rBlock,s=0,M=0;M<8;M++)s|=i[M][((y^g[M])&r[M])>>>0];this._lBlock=y,this._rBlock=T^s}var A=this._lBlock;this._lBlock=this._rBlock,this._rBlock=A,p.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),v[m]=this._lBlock,v[m+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function p(v,m){var n=(this._lBlock>>>v^this._rBlock)&m;this._rBlock^=n,this._lBlock^=n<>>v^this._lBlock)&m;this._lBlock^=n,this._rBlock^=n<192.");var n=m.slice(0,2),d=m.length<4?m.slice(0,2):m.slice(2,4),g=m.length<6?m.slice(0,2):m.slice(4,6);this._des1=l.createEncryptor(R.create(n)),this._des2=l.createEncryptor(R.create(d)),this._des3=l.createEncryptor(R.create(g))},encryptBlock:function(v,m){this._des1.encryptBlock(v,m),this._des2.decryptBlock(v,m),this._des3.encryptBlock(v,m)},decryptBlock:function(v,m){this._des3.decryptBlock(v,m),this._des2.encryptBlock(v,m),this._des1.decryptBlock(v,m)},keySize:192/32,ivSize:64/32,blockSize:64/32});u.TripleDES=h._createHelper(b)}(),L.TripleDES})},qBft:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("OLod"))})(this,function(L){return L.pad.AnsiX923={pad:function(u,S){var R=u.sigBytes,h=S*4,o=h-R%h,C=R+o-1;u.clamp(),u.words[C>>>2]|=o<<24-C%4*8,u.sigBytes+=o},unpad:function(u){var S=u.words[u.sigBytes-1>>>2]&255;u.sigBytes-=S}},L.pad.Ansix923})},qM6L:function(I,J,P){(function(L,u){I.exports=J=u(P("Ib8C"))})(this,function(L){return function(){var u=L,S=u.lib,R=S.WordArray,h=u.enc,o=h.Utf16=h.Utf16BE={stringify:function(c){for(var a=c.words,i=c.sigBytes,r=[],l=0;l>>2]>>>16-l%4*8&65535;r.push(String.fromCharCode(p))}return r.join("")},parse:function(c){for(var a=c.length,i=[],r=0;r>>1]|=c.charCodeAt(r)<<16-r%2*16;return R.create(i,a*2)}};h.Utf16LE={stringify:function(c){for(var a=c.words,i=c.sigBytes,r=[],l=0;l>>2]>>>16-l%4*8&65535);r.push(String.fromCharCode(p))}return r.join("")},parse:function(c){for(var a=c.length,i=[],r=0;r>>1]|=C(c.charCodeAt(r)<<16-r%2*16);return R.create(i,a*2)}};function C(c){return c<<8&4278255360|c>>>8&16711935}}(),L.enc.Utf16})},qu8F:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("OLod"))})(this,function(L){/** @preserve * Counter block mode compatible with Dr Brian Gladman fileenc.c * derived from CryptoJS.mode.CTR * Jan Hruby jhruby.web@gmail.com */return L.mode.CTRGladman=function(){var u=L.lib.BlockCipherMode.extend();function S(o){if((o>>24&255)===255){var C=o>>16&255,c=o>>8&255,a=o&255;C===255?(C=0,c===255?(c=0,a===255?a=0:++a):++c):++C,o=0,o+=C<<16,o+=c<<8,o+=a}else o+=1<<24;return o}function R(o){return(o[0]=S(o[0]))===0&&(o[1]=S(o[1])),o}var h=u.Encryptor=u.extend({processBlock:function(o,C){var c=this._cipher,a=c.blockSize,i=this._iv,r=this._counter;i&&(r=this._counter=i.slice(0),this._iv=void 0),R(r);var l=r.slice(0);c.encryptBlock(l,0);for(var p=0;p=S.length?{done:!0}:{done:!1,value:S[o++]}},e:function(l){throw l},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 c=!0,a=!1,i;return{s:function(){h=S[Symbol.iterator]()},n:function(){var l=h.next();return c=l.done,l},e:function(l){a=!0,i=l},f:function(){try{!c&&h.return!=null&&h.return()}finally{if(a)throw i}}}}},rUJ1:function(I,J){const P=/[&<>"']/,L=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,S=/[<>"']|&(?!#?\w+;)/g,R={"&":"&","<":"<",">":">",'"':""","'":"'"},h=A=>R[A];function o(A,x){if(x){if(P.test(A))return A.replace(L,h)}else if(u.test(A))return A.replace(S,h);return A}const C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function c(A){return A.replace(C,(x,E)=>(E=E.toLowerCase(),E==="colon"?":":E.charAt(0)==="#"?E.charAt(1)==="x"?String.fromCharCode(parseInt(E.substring(2),16)):String.fromCharCode(+E.substring(1)):""))}const a=/(^|[^\[])\^/g;function i(A,x){A=A.source||A,x=x||"";const E={replace:(w,_)=>(_=_.source||_,_=_.replace(a,"$1"),A=A.replace(w,_),E),getRegex:()=>new RegExp(A,x)};return E}const r=/[^\w:]/g,l=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function p(A,x,E){if(A){let w;try{w=decodeURIComponent(c(E)).replace(r,"").toLowerCase()}catch(_){return null}if(w.indexOf("javascript:")===0||w.indexOf("vbscript:")===0||w.indexOf("data:")===0)return null}x&&!l.test(E)&&(E=n(x,E));try{E=encodeURI(E).replace(/%25/g,"%")}catch(w){return null}return E}const f={},b=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,m=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(A,x){f[" "+A]||(b.test(A)?f[" "+A]=A+"/":f[" "+A]=y(A,"/",!0)),A=f[" "+A];const E=A.indexOf(":")===-1;return x.substring(0,2)==="//"?E?x:A.replace(v,"$1")+x:x.charAt(0)==="/"?E?x:A.replace(m,"$1")+x:A+x}const d={exec:function(){}};function g(A){let x=1,E,w;for(;x{let z=!1,H=j;for(;--H>=0&&k[H]==="\\";)z=!z;return z?"|":" |"}),w=E.split(/ \|/);let _=0;if(w.length>x)w.splice(x);else for(;w.length0&&(jt.children=[],Se($t,jt.children))})}function te(Tt,Dt){for(var Ct=[],Rr=0;Rr0){Ct[0]=$t.id;for(var jt=0;jt<$t.sub_disciplines.length;jt++){var Ur=$t.sub_disciplines[jt];if(Ur.id===Dt)return Ct[1]=Ur.id,[Ct,Ur.tag_disciplines||Ur.sub_disciplines||[]]}}}return[Ct,[]]}var ue=P("Ty5D"),Oe=P("9kvl"),le=P("J66h"),Q=P("GIiI"),Y=P("2BaD"),Z=P("Ot1p"),be=P("ErOA");function ge(Tt){return Object(be.f)("practices.json",Tt)}function De(){return Object(be.c)("problems/new.json")}function Qe(Tt){return Object(be.c)("practices/".concat(Tt,"/edit.json"))}function Ze(Tt,Dt){return Object(be.g)("practices/".concat(Tt),Dt)}function nt(Tt,Dt){return Object(be.f)("exercises/".concat(Tt,"/exercise_questions.json"),Dt)}function tt(Tt,Dt){return Object(be.g)("exercise_questions/".concat(Tt,".json"),Dt)}var lt=P("cDPC"),st=P("bbsP"),je=P("/wGt"),Re=P("0Owb"),et=P("ZW9T"),ct=P("ZD9Y"),$e=P("M8RZ"),qe=P("bCnd"),Ue=P("1T2W"),Me=P.n(Ue),Ie={theme:Object(qe.a)("cmCodeMode","vs-dark"),fontSize:Object(qe.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(qe.a)("cmTabToSpace",!0)},ye;(function(Tt){Tt[Tt.set_font_size=0]="set_font_size",Tt[Tt.set_theme=1]="set_theme",Tt[Tt.on_tab_to_space=2]="on_tab_to_space",Tt[Tt.set_show_editor_setting=3]="set_show_editor_setting"})(ye||(ye={}));function Te(Tt,Dt){switch(Dt.type){case ye.set_show_editor_setting:return Object(k.a)(Object(k.a)({},Tt),{},{showEditorSetting:Dt.payload});case ye.set_theme:return Object(k.a)(Object(k.a)({},Tt),{},{theme:Dt.payload});case ye.set_font_size:return Object(k.a)(Object(k.a)({},Tt),{},{fontSize:Dt.payload});case ye.on_tab_to_space:return Object(k.a)(Object(k.a)({},Tt),{},{tabToSpace:Dt.payload});default:throw new Error}}var Ae=function(Tt){var Dt=Tt.value,Ct=Tt.onChange,Rr=Tt.language,jr=Tt.onLanguage,$t=Tt.languageItems,jt=Tt.ActionBarRender,Ur=jt===void 0?function(me){return ee.a.createElement(Pe,{languageItems:$t,onLanguage:jr,language:Rr,onShowCodeSetting:me})}:jt,_n=Object(re.useReducer)(Te,Ie),Vr=Object(j.a)(_n,2),vt=Vr[0],Ft=Vr[1],rn=vt.theme,hn=vt.fontSize,An=vt.showEditorSetting,Rn=vt.tabToSpace;console.log(Dt,Rr,"value");var se={onFontSizeChange:function(ie){Ft({type:ye.set_font_size,payload:ie}),Object(qe.b)("cmFontSize",ie)},tabToSpace:Rn,cmFontSize:hn,className:"oj",cmCodeMode:rn,onTabToSpace:function(ie){Ft({type:ye.on_tab_to_space,payload:ie}),Object(qe.b)("cmTabToSpace",ie)},onCodeModeChange:function(ie){Ft({type:ye.set_theme,payload:ie}),Object(qe.b)("cmCodeMode",ie)}};function V(){Ft({type:ye.set_show_editor_setting,payload:!1})}function X(){Ft({type:ye.set_show_editor_setting,payload:!0})}var ne={value:Dt,language:Rr,onChange:Ct,theme:rn,height:"calc(100% - 56px)",options:{fontSize:hn,insertSpaces:Rn}};return ee.a.createElement(re.Fragment,null,ee.a.createElement("div",{className:Me.a["code-panel-container"]},Ur(X),ee.a.createElement(et.b,Object(Re.a)({key:Rr},ne))),ee.a.createElement($e.a,null,ee.a.createElement(je.a,{className:"oj",title:null,placement:"right",closable:!1,visible:An,onClose:V},ee.a.createElement(ct.a,se))))};function Pe(Tt){var Dt=Tt.languageItems,Ct=Tt.language,Rr=Tt.onShowCodeSetting,jr=Tt.onLanguage;return ee.a.createElement("div",{className:Me.a["action-oj-bar"]},Dt==null?void 0:Dt.map(function($t){return ee.a.createElement("div",{className:Ct===($t==null?void 0:$t.language)?Me.a.active:"",onClick:function(){return jr($t==null?void 0:$t.language)},key:$t==null?void 0:$t.language},$t==null?void 0:$t.language)}),ee.a.createElement("a",{onClick:Rr},ee.a.createElement("i",{className:"iconfont icon-shezhi"})))}var Xe=P("Znn+"),rt=P("ZTPi"),ft=P("L9qf"),St=P.n(ft),Pt=function(Dt){var Ct=Dt.visible,Rr=Dt.onOK,jr=Dt.onCancel,$t=Object(re.useState)(!1),jt=Object(j.a)($t,2),Ur=jt[0],_n=jt[1],Vr=Object(re.useState)(!1),vt=Object(j.a)(Vr,2),Ft=vt[0],rn=vt[1],hn=Object(re.useState)("1"),An=Object(j.a)(hn,2),Rn=An[0],se=An[1],V=Object(re.useState)(""),X=Object(j.a)(V,2),ne=X[0],me=X[1],ie=Object(re.useState)([]),ze=Object(j.a)(ie,2),pt=ze[0],ot=ze[1],It=function(){var Zr=Object(w.a)(q.a.mark(function Zt(){var Hr;return q.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:if(ne){Jt.next=3;break}return E.b.warn("\u9898\u76EE".concat(an,"\u4E0D\u80FD\u4E3A\u7A7A")),Jt.abrupt("return");case 3:return rn(!0),Jt.next=6,Object(be.a)("/api/tag_disciplines.json",{method:"post",body:{target:Ct,name:ne}});case 6:if(Hr=Jt.sent,!((Hr==null?void 0:Hr.status)===0)){Jt.next=10;break}return Rr(),Jt.abrupt("return");case 10:rn(!1);case 11:case"end":return Jt.stop()}},Zt)}));return function(){return Zr.apply(this,arguments)}}(),gt=function(){var Zr=Object(w.a)(q.a.mark(function Zt(){var Hr,fr,Jt=arguments;return q.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return Hr=Jt.length>0&&Jt[0]!==void 0?Jt[0]:"",_n(!0),vr.next=4,Object(be.a)("/api/tag_disciplines.json",{method:"get",params:{target:Ct,search:Hr}});case 4:fr=vr.sent,ot(fr.tag_disciplines||[]),_n(!1);case 7:case"end":return vr.stop()}},Zt)}));return function(){return Zr.apply(this,arguments)}}(),Ht=function(Zt){var Hr=Zt.name;G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:ee.a.createElement("div",null,ee.a.createElement(W.a,{defaultValue:Hr,placeholder:"\u8BF7\u8F93\u5165".concat(an,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20,onChange:function(Jt){Hr=Jt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var fr=Object(w.a)(q.a.mark(function tr(){var vr;return q.a.wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:if(Hr){ln.next=3;break}return E.b.warn("\u9898\u76EE".concat(an,"\u4E0D\u80FD\u4E3A\u7A7A")),ln.abrupt("return",Promise.reject());case 3:return ln.next=5,Object(be.a)("/api/tag_disciplines/".concat(Zt.id,"/rename.json"),{method:"post",body:{id:Zt.id,name:Hr}});case 5:vr=ln.sent,(vr==null?void 0:vr.status)===0&>();case 7:case"end":return ln.stop()}},tr)}));function Jt(){return fr.apply(this,arguments)}return Jt}()})},Xt=function(Zt){G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:Ct==="practice"?ee.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",ee.a.createElement("span",{className:"c-light-primary"},Zt.name),"\u201D\u5220\u9664\u5417\uFF1F",ee.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):ee.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",ee.a.createElement("span",{className:"c-light-primary"},Zt.name),"\u201D\u5220\u9664\u5417\uFF1F",ee.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u77E5\u8BC6\u70B9\u8FDB\u884C\u6E05\u9664\u3002"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Hr=Object(w.a)(q.a.mark(function Jt(){var tr;return q.a.wrap(function(Xr){for(;;)switch(Xr.prev=Xr.next){case 0:return Xr.next=2,Object(be.a)("/api/tag_disciplines/".concat(Zt.id,".json"),{method:"delete",body:{id:Zt.id}});case 2:tr=Xr.sent,(tr==null?void 0:tr.status)===0&>();case 4:case"end":return Xr.stop()}},Jt)}));function fr(){return Hr.apply(this,arguments)}return fr}()})},Sr=function(Zt){gt(Zt)},an=Ct==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return ee.a.createElement(G.a,{afterClose:function(){rn(!1),_n(!1),me(""),se("1"),ot([])},centered:!0,keyboard:!1,width:600,title:"".concat(an,"\u7BA1\u7406"),visible:!!Ct,className:St.a.customModal,footer:null,onCancel:jr},ee.a.createElement("section",{className:St.a.wrap},ee.a.createElement(rt.a,{activeKey:Rn,onChange:function(Zt){me(""),se(Zt),gt()}},ee.a.createElement(rt.a.TabPane,{tab:"\u65B0\u589E".concat(an),key:"1"},ee.a.createElement(W.a,{value:ne,onChange:function(Zt){return me(Zt.target.value)},className:St.a.in,placeholder:"\u8F93\u5165".concat(an,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20}),ee.a.createElement("div",{className:St.a.btns},ee.a.createElement(T.a,{onClick:jr,className:"mr20"},"\u53D6\u6D88 "),ee.a.createElement(T.a,{loading:Ft,onClick:It,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),ee.a.createElement(rt.a.TabPane,{tab:"\u5DF2\u6709".concat(an),key:"2"},ee.a.createElement(W.a.Search,{allowClear:!0,onSearch:Sr,value:ne,onChange:function(Zt){return me(Zt.target.value)},className:St.a.in,placeholder:"\u8F93\u5165".concat(an,"\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2")}),ee.a.createElement(d.a,{dataSource:pt,bordered:!1,loading:Ur,scroll:pt.length>7?{y:300}:{},style:{padding:"0 40px 20px 40px"},columns:[{title:"".concat(an,"\u540D\u79F0"),dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:function(Zt,Hr){return ee.a.createElement("span",null,ee.a.createElement("span",{onClick:function(){return Ht(Hr)},className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),ee.a.createElement("span",{onClick:function(){return Xt(Hr)},className:"current c-grey-666"},"\u5220\u9664"))}}],pagination:!1})))))},dt=Pt,At=P("m3rI"),Ot=P("B7Ph"),bt=P("wd/R"),Vt=P.n(bt),ir=P("1vsH"),Qt=P("9Bee"),dr=P("xKgJ"),Nt=W.a.TextArea,br=G.a.confirm,ur=H.a.Panel,wt={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0},hr;(function(Tt){Tt[Tt.SET_INITAL_DATA=0]="SET_INITAL_DATA",Tt[Tt.SET_LOADING=1]="SET_LOADING",Tt[Tt.SET_STATUS=2]="SET_STATUS"})(hr||(hr={}));var Qr="#### \u9898\u76EE\u63CF\u8FF0\n\u73B0\u6709\u4E00\u4E2A\u6574\u578B\u6570\u7EC4 `nums`\uFF0C\u8BF7\u7F16\u5199\u7A0B\u5E8F\u5C06\u6570\u7EC4 `nums` \u4E2D\u7684\u6240\u6709 `$$0$$` \u79FB\u52A8\u5230\u6570\u7EC4\u7684\u672B\u5C3E\uFF0C\u4F46\u4E0D\u6539\u53D8\u975E\u96F6\u5143\u7D20\u5728\u6570\u7EC4\u4E2D\u7684\u76F8\u5BF9\u4F4D\u7F6E\u3002\u8BF7\u5728\u539F\u6570\u7EC4 `nums` \u4E0A\u8FDB\u884C\u64CD\u4F5C\u3002\n#### \u8F93\u5165\u8F93\u51FA\u683C\u5F0F\n**\u8F93\u5165\u683C\u5F0F**\n\u7B2C\u4E00\u884C\u6709\u4E00\u4E2A\u6574\u6570 `numsSize`\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u5927\u5C0F\uFF1B\n\u7B2C\u4E8C\u884C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n**\u8F93\u51FA\u683C\u5F0F**\n\u4E00\u884C\u8F93\u51FA\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B1\n**\u8F93\u5165**\n`4`\n`0 1 2 3`\n**\u8F93\u51FA**\n`1 2 3 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B2\n**\u8F93\u5165**\n`5`\n`1 1 0 1 0`\n**\u8F93\u51FA**\n`1 1 1 0 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8BF4\u660E\u63D0\u793A\n-`1\u2264n\u2264100`";function Gr(Tt,Dt){switch(Dt.type){case hr.SET_INITAL_DATA:return Object(k.a)(Object(k.a)({},Tt),Dt.payload);case hr.SET_LOADING:return Object(k.a)(Object(k.a)({},Tt),{},{loading:Dt.payload});case hr.SET_STATUS:return Object(k.a)(Object(k.a)({},Tt),{},{status:Dt.payload});default:throw new Error}}var Lr=J.default=function(){var Tt,Dt,Ct,Rr=Object(ue.h)(),jr=Object(ue.g)(),$t=Object(ue.i)(),jt=$t.id,Ur=N.a.useForm(),_n=Object(j.a)(Ur,1),Vr=_n[0],vt=Object(re.useState)(),Ft=Object(j.a)(vt,2),rn=Ft[0],hn=Ft[1],An=Object(re.useState)(!1),Rn=Object(j.a)(An,2),se=Rn[0],V=Rn[1],X=Object(re.useState)([]),ne=Object(j.a)(X,2),me=ne[0],ie=ne[1],ze=Object(re.useState)([]),pt=Object(j.a)(ze,2),ot=pt[0],It=pt[1],gt=Object(re.useState)([]),Ht=Object(j.a)(gt,2),Xt=Ht[0],Sr=Ht[1],an=Object(re.useState)([]),Zr=Object(j.a)(an,2),Zt=Zr[0],Hr=Zr[1],fr=Object(re.useState)([]),Jt=Object(j.a)(fr,2),tr=Jt[0],vr=Jt[1],Xr=Object(re.useState)("C"),ln=Object(j.a)(Xr,2),mn=ln[0],li=ln[1],Ki=Object(re.useReducer)(Gr,wt),Ui=Object(j.a)(Ki,2),Fn=Ui[0],qr=Ui[1],Oi=Fn.loading,on=Fn.data,Zn=Fn.user,Yr=Fn.status,cr=on==null?void 0:on.hack_sets,en=on==null||((Tt=on.hack)===null||Tt===void 0)?void 0:Tt.test_set_average,Mr=Object(re.useState)(!1),En=Object(j.a)(Mr,2),Fr=En[0],xi=En[1],gn=Object(re.useRef)([]),On=Object(re.useState)(!1),ui=Object(j.a)(On,2),ci=ui[0],qn=ui[1],Ei=Object(re.useState)(!1),Yn=Object(j.a)(Ei,2),Ai=Yn[0],zn=Yn[1],fi=Object(re.useRef)(!0),pi=Object(re.useState)({}),ei=Object(j.a)(pi,2),$r=ei[0],$i=ei[1];Object(re.useEffect)(function(){return Object(Oe.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(Oe.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(Oe.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(Oe.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}},[]),Object(re.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)});var ta=function(){var rr=Object(w.a)(q.a.mark(function Mt(){var pr,mr;return q.a.wrap(function(Tr){for(;;)switch(Tr.prev=Tr.next){case 0:return Tr.next=2,Object(be.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}});case 2:return pr=Tr.sent,Tr.next=5,Object(be.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});case 5:mr=Tr.sent,It(pr.tag_disciplines||[]),Sr(mr.tag_disciplines||[]);case 8:case"end":return Tr.stop()}},Mt)}));return function(){return rr.apply(this,arguments)}}(),Ni=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}],Ji=Object(re.useCallback)(Object(w.a)(q.a.mark(function rr(){var Mt,pr,mr,tn,Tr,Dn,wn,ki,Bn,Kn,$n,Xi,Ne,Ge,Je,Fe,ve,Le,we,Be,He,Ye,Ve,it,ht,Et,xt;return q.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:if(qr({type:hr.SET_LOADING,payload:!0}),!jt){Yt.next=19;break}return Yt.next=4,Qe(jt);case 4:Mt=Yt.sent,pr=Mt.user,mr=Mt.language,tn=Mt.practice_sets,Tr=Mt.practice_codes,Dn=Mt.description,wn=Mt.difficulty,ki=Mt.name,Bn=Mt.open_or_not,Kn=Mt.time_limit,$n=Mt.test_set_average,Xi=Mt.test_set_score,Ne=Mt.status,Ge=Mt.tag_discipline_ids,Je=Mt.source_discipline_ids,Fe=Mt.item_banks_group_id,ve=Mt.is_file,Le=ve===void 0?!1:ve,we=Mt.hide_actual_output,Be=Mt.review_privilege,He=Mt.review_description,Ye={review_privilege:Be,status:Ne,review_description:He,name:ki},$i(Ye),xi(we),Ve=Le?[{input:"",output:"",score:100,position:1}]:tn,Le?(ie(tn),Vr.setFieldsValue({hack_sets:Ve})):ie([]),it={loading:!0,user:pr,status:Ne,data:{hack:{difficulty:wn,name:ki,description:Dn,open_or_not:Bn,time_limit:Kn,test_set_average:$n,test_set_score:Xi,tag_discipline_ids:Ge,source_discipline_ids:Je,is_file:Le},hack_sets:Ve}},qr({type:hr.SET_INITAL_DATA,payload:it}),hn({hack:{difficulty:wn,name:ki,description:Dn,open_or_not:Bn,time_limit:Kn,test_set_average:$n,test_set_score:Xi,tag_discipline_ids:Ge,source_discipline_ids:Je,is_file:Le}}),ht=Tr==null?void 0:Tr.map(function(gr){return Object(k.a)(Object(k.a)({},gr),{},{code:le.Base64.decode(gr==null?void 0:gr.code)})}),vr(ht),gn.current=ht,Yt.next=27;break;case 19:return Yt.next=21,De();case 21:Et=Yt.sent,xt=Et.user,qr({type:hr.SET_INITAL_DATA,payload:{loading:!0,status:0,user:xt,data:{hack:{difficulty:"",time_limit:3,description:Qr,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),hn({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),vr(Ni),gn.current=Ni;case 27:qr({type:hr.SET_LOADING,payload:!1});case 28:case"end":return Yt.stop()}},rr)})),[jt]);Object(re.useEffect)(function(){try{Ji(),ta()}catch(rr){console.log(rr,"----")}},[]);function Gi(rr,Mt){return Bt.apply(this,arguments)}function Bt(){return Bt=Object(w.a)(q.a.mark(function rr(Mt,pr){var mr,tn,Tr,Dn,wn,ki,Bn,Kn,$n,Xi,Ne,Ge,Je,Fe,ve,Le,we,Be;return q.a.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:tn=Object(k.a)({},Mt),Tr=tn.hack_sets,Dn=tn.hack,Dn.hide_actual_output=Fr,wn=[],ki=[],Bn=0,Kn=Dn!=null&&Dn.is_file?me.map(function(Ve,it){return Object(k.a)(Object(k.a)({},Ve),{},{position:it+1})}):Tr.map(function(Ve){return Object(k.a)(Object(k.a)({},Ve),{},{is_file:!1})}),$n=Object(b.a)(Kn);try{for($n.s();!(Xi=$n.n()).done;)Ne=Xi.value,Bn+=Ne.score,Ne.id&&Ne.id>=0?wn.push(Ne):ki.push(Ne)}catch(Ve){$n.e(Ve)}finally{$n.f()}if(Kn!=null&&Kn.length){Ye.next=11;break}return E.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),Ye.abrupt("return");case 11:if(!(Bn!==100&&!Dn.test_set_score)){Ye.next=14;break}return E.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),Ye.abrupt("return");case 14:if(!(Kn!=null&&Kn.some(function(Ve){return!Ve.output}))){Ye.next=17;break}return E.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),Ye.abrupt("return");case 17:if(fi.current?qn(!0):zn(!0),Je=tr==null?void 0:tr.map(function(Ve){return Object(k.a)(Object(k.a)({},Ve),{},{code:le.Base64.encode(Ve==null?void 0:Ve.code)})}),!jt){Ye.next=25;break}return Ye.next=22,Ze(jt,{practice:Dn,practice_codes:Je,practice_sets:ki,update_practice_sets:wn});case 22:Ge=Ye.sent,Ye.next=28;break;case 25:return Ye.next=27,ge({practice:Dn,practice_codes:Je,practice_sets:Kn,publish:!fi.current});case 27:Ge=Ye.sent;case 28:if(qn(!1),zn(!1),!(((mr=Ge)===null||mr===void 0?void 0:mr.status)===0)){Ye.next=46;break}if(!((Fe=Ge)!==null&&Fe!==void 0&&(ve=Fe.similar_practice)!==null&&ve!==void 0&&ve.length)){Ye.next=35;break}return V(!0),Hr((Le=Ge)===null||Le===void 0?void 0:Le.similar_practice),Ye.abrupt("return");case 35:if(!jt){Ye.next=44;break}if(E.b.success("\u4FDD\u5B58\u6210\u529F"),fi.current){Ye.next=42;break}return Ye.next=40,Object(be.a)("/api/practices/".concat(jt,"/start"),{method:"get"});case 40:we=Ye.sent,(we==null?void 0:we.status)===0&&jr.push("/problems/".concat(we==null?void 0:we.identifier,"/oj/").concat(jt));case 42:Ye.next=46;break;case 44:E.b.success("\u65B0\u5EFA\u6210\u529F"),jr.replace("/problems/".concat((Be=Ge)===null||Be===void 0?void 0:Be.identifier,"/ojedit"));case 46:case"end":return Ye.stop()}},rr)})),Bt.apply(this,arguments)}function ar(){jr.replace("/problems")}var Kt=function(Mt){var pr=Math.floor(100/Mt.length),mr=pr+100%Mt.length;Mt=Mt.map(function(tn,Tr){return Tr===Mt.length-1?Object(k.a)(Object(k.a)({},tn),{},{score:mr}):Object(k.a)(Object(k.a)({},tn),{},{score:pr})}),ie(Mt)};function xr(rr){rr.target.value||Kt(me),qr({type:hr.SET_INITAL_DATA,payload:{data:Object(k.a)(Object(k.a)({},on),{},{hack:Object(k.a)(Object(k.a)({},on.hack),{},{test_set_score:rr.target.value})})}})}function Dr(rr){qr({type:hr.SET_INITAL_DATA,payload:{data:Object(k.a)(Object(k.a)({},on),{},{hack:Object(k.a)(Object(k.a)({},on.hack),{},{is_file:rr.target.value})})}})}function Br(rr){xi(rr.target.checked)}function Or(rr){var Mt=rr.target.value;Mt&&Kt(me),qr({type:hr.SET_INITAL_DATA,payload:{data:Object(k.a)(Object(k.a)({},on),{},{hack:Object(k.a)(Object(k.a)({},on.hack),{},{test_set_average:Mt})})}})}function un(){var rr=Vr.getFieldValue("hack_sets"),Mt=rr.length+1,pr=Math.floor(100/Mt),mr=100%Mt;rr.map(function(tn,Tr){return en&&(tn.score=pr),tn.position=Tr+1,tn}),rr.push({input:"",output:"",position:Mt,score:en?pr+mr:0}),Vr.setFieldsValue({hack_sets:rr}),qr({type:hr.SET_INITAL_DATA,payload:{data:Object(k.a)(Object(k.a)({},on),{},{hack_sets:rr})}})}Object(re.useEffect)(function(){if(en){var rr=cr==null?void 0:cr.length,Mt=Math.floor(100/rr),pr=100%rr;cr==null||cr.map(function(mr,tn){return mr.score=Mt,mr.position=tn+1,tn===rr-1&&(mr.score=Mt+pr),mr}),qr({type:hr.SET_INITAL_DATA,payload:{data:Object(k.a)(Object(k.a)({},on),{},{hack_sets:cr})}}),Vr.setFieldsValue({hack_sets:cr})}},[en]);function Pn(rr){var Mt=Vr.getFieldValue("hack_sets"),pr=(Mt==null?void 0:Mt.length)-1,mr=Math.ceil(100/pr),tn=100%pr;Mt.splice(rr,1),Mt==null||Mt.map(function(Tr,Dn){return en&&(Tr.score=mr,Dn===pr-1&&(Tr.score=mr+tn)),Tr.position=Dn+1,Tr}),qr({type:hr.SET_INITAL_DATA,payload:{data:Object(k.a)(Object(k.a)({},on),{},{hack_sets:Mt})}}),Vr.setFieldsValue({hack_sets:Mt})}function Er(rr){li(rr)}var Ri=function(Mt){var pr,mr=(pr=gn.current)===null||pr===void 0?void 0:pr.findIndex(function(tn){return tn.language===mn});gn.current[mr].code=Mt,vr(gn.current)},Gt=function(Mt){hn(Object(k.a)({},Vr.getFieldsValue()))},or=function(){var rr=Object(w.a)(q.a.mark(function Mt(pr){var mr;return q.a.wrap(function(Tr){for(;;)switch(Tr.prev=Tr.next){case 0:return Tr.next=2,Object(be.a)("/api/practices/".concat(pr,"/start"),{method:"get"});case 2:mr=Tr.sent,(mr==null?void 0:mr.status)===0&&Object(ir.Q)("/problems/".concat(mr==null?void 0:mr.identifier,"/oj/").concat(pr));case 4:case"end":return Tr.stop()}},Mt)}));return function(pr){return rr.apply(this,arguments)}}(),sr=function(){var rr=Object(w.a)(q.a.mark(function Mt(){var pr,mr,tn,Tr,Dn,wn;return q.a.wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:return Bn.next=2,Qe(jt);case 2:pr=Bn.sent,mr=pr.name,tn=pr.status,Tr=pr.review_privilege,Dn=pr.review_description,wn={review_privilege:Tr,status:tn,review_description:Dn,name:mr},$i(wn);case 6:case"end":return Bn.stop()}},Mt)}));return function(){return rr.apply(this,arguments)}}(),vn=function(){var Mt="";G.a.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:ee.a.createElement("div",{className:"mt20"},ee.a.createElement(Z.a,{className:xe.a.MdEditor,defaultValue:Mt,onChange:function(mr){Mt=mr}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var pr=Object(w.a)(q.a.mark(function tn(){var Tr;return q.a.wrap(function(wn){for(;;)switch(wn.prev=wn.next){case 0:if(Mt){wn.next=3;break}return E.b.warn("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),wn.abrupt("return",Promise.reject());case 3:return wn.next=5,Object(be.a)("/api/practices/".concat(jt,"/review.json"),{method:"post",body:{op:"fail",description:Mt}});case 5:Tr=wn.sent,(Tr==null?void 0:Tr.status)===0&&(E.b.success("\u63D0\u4EA4\u6210\u529F"),sr());case 7:case"end":return wn.stop()}},tn)}));function mr(){return pr.apply(this,arguments)}return mr}()})},Di=function(){var rr=Object(w.a)(q.a.mark(function Mt(){return q.a.wrap(function(mr){for(;;)switch(mr.prev=mr.next){case 0:G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u63D0\u793A",content:"\u786E\u8BA4\u5C06\u9898\u76EE\u300A".concat($r==null?void 0:$r.name,"\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var tn=Object(w.a)(q.a.mark(function Dn(){var wn;return q.a.wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:return Bn.next=2,Object(be.a)("/api/practices/".concat(jt,"/review.json"),{method:"post",body:{op:"pass"}});case 2:wn=Bn.sent,(wn==null?void 0:wn.status)===0&&(E.b.success("\u63D0\u4EA4\u6210\u529F"),sr());case 4:case"end":return Bn.stop()}},Dn)}));function Tr(){return tn.apply(this,arguments)}return Tr}()});case 1:case"end":return mr.stop()}},Mt)}));return function(){return rr.apply(this,arguments)}}(),Vi=function(){var Mt=G.a.confirm({icon:null,width:700,className:"".concat(xe.a.cusModal," custom-modal-divider"),centered:!0,title:ee.a.createElement(s.a,null,ee.a.createElement(A.a,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),ee.a.createElement(A.a,null,ee.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return Mt.destroy()}}))),content:ee.a.createElement("div",null,ee.a.createElement(Qt.a,{className:"mt20",value:($r==null?void 0:$r.review_description)||""}))})};return ee.a.createElement(m.a,{spinning:Oi,size:"large",className:xe.a["oj-custom-large-spin"]},on?ee.a.createElement(re.Fragment,null,ee.a.createElement("header",{className:xe.a.header},ee.a.createElement("div",null,ee.a.createElement("img",{src:"".concat(At.a.IMG_SERVER,"/images/").concat(Zn==null?void 0:Zn.image_url),alt:"user",width:30}),ee.a.createElement("span",null,Zn==null?void 0:Zn.name)),ee.a.createElement("h2",null," ",on==null||((Dt=on.hack)===null||Dt===void 0)?void 0:Dt.name," "),jt?ee.a.createElement("a",{className:xe.a.btn_back,onClick:ar}," ",ee.a.createElement(Q.a,null),"\u9000\u51FA"):null),ee.a.createElement(N.a,{form:Vr,initialValues:on,layout:"vertical",className:xe.a["oj-form-container"],onValuesChange:Gt,onFinish:Gi},ee.a.createElement(lt.a,{hideResize:!0,className:xe.a["oj-problems"],leftChild:ee.a.createElement(si,{formValue:rn,onRemoveTestCase:Pn,onAddTestCase:un,hack:on.hack,onChangeScore:xr,onChangehide:Br,onChangeAverage:Or,onChangeFile:Dr,uploadData:me,setUploadData:ie,handleUploadRatio:Kt,ischecked:Fr,pointData:ot,sourceData:Xt,getPointData:ta}),rightChild:ee.a.createElement(Ae,{value:tr==null||((Ct=tr.find(function(rr){return rr.language===mn}))===null||Ct===void 0)?void 0:Ct.code,onChange:Ri,onLanguage:Er,languageItems:tr,language:mn})}),ee.a.createElement("div",{className:xe.a.footer},!!jt&&ee.a.createElement("div",{className:xe.a.result},ee.a.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),$r!=null&&$r.review_privilege?ee.a.createElement(ee.a.Fragment,null,ee.a.createElement("div",{onClick:Di,className:xe.a.pass},"\u901A\u8FC7"),ee.a.createElement("div",{onClick:vn,className:xe.a.noPass},"\u4E0D\u901A\u8FC7")):ee.a.createElement(ee.a.Fragment,null,($r==null?void 0:$r.status)===0&&ee.a.createElement("div",{className:xe.a.passText},ee.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),($r==null?void 0:$r.status)===1&&ee.a.createElement("div",{className:xe.a.passText},ee.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),($r==null?void 0:$r.status)===2&&ee.a.createElement("div",{className:xe.a.passText},ee.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),($r==null?void 0:$r.status)===3&&ee.a.createElement("div",{className:xe.a.passText},ee.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),($r==null?void 0:$r.status)===4&&ee.a.createElement("div",{className:xe.a.passText},ee.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),($r==null?void 0:$r.status)===5&&ee.a.createElement("div",{className:xe.a.noPassText},ee.a.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",ee.a.createElement("span",{onClick:Vi},"\u67E5\u770B\u539F\u56E0")))),ee.a.createElement(T.a,{type:"primary",ghost:!0,onClick:ar},"\u9000\u51FA\u7F16\u8F91"),ee.a.createElement(T.a,{disabled:Ai,loading:ci,type:"primary",onClick:function(){fi.current=!0,Vr.submit()}},"\u4FDD\u5B58 "),jt?ee.a.createElement(T.a,{disabled:ci,loading:Ai,style:{background:"#2FC25B",border:0},type:"primary",onClick:function(){fi.current=!1,Vr.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):ee.a.createElement(T.a,{disabled:ci,loading:Ai,type:"primary",onClick:function(){fi.current=!1,Vr.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,ee.a.createElement(G.a,{centered:!0,destroyOnClose:!0,footer:null,visible:se,onCancel:function(){return V(!1)},title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},ee.a.createElement("div",null,ee.a.createElement("p",{className:"font14"},"\u7ECF\u7CFB\u7EDF\u68C0\u6D4B\u53D1\u73B0\uFF0C\u672C\u9898\u76EE\u4E0E\u7CFB\u7EDF\u4E2D\u5DF2\u521B\u5EFA\u7684\u9898\u76EE\u9AD8\u5EA6\u96F7\u540C\uFF0C\u8BF7\u8C03\u6574\u9898\u76EE\u540E\u518D\u8FDB\u884C\u4FDD\u5B58"),ee.a.createElement(d.a,{dataSource:Zt,bordered:!1,scroll:Zt.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:function(Mt,pr){return ee.a.createElement("span",{onClick:function(){return or(pr==null?void 0:pr.identifier)},style:{textDecorationLine:"underline"},className:"current c-light-primary"},Mt)}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:function(Mt){var pr;return(pr=Vt()(Mt))===null||pr===void 0?void 0:pr.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function si(Tt){var Dt,Ct,Rr=Tt.ischecked,jr=Tt.formValue,$t=Tt.hack,jt=Tt.onChangeAverage,Ur=Tt.onChangeScore,_n=Tt.onChangehide,Vr=Tt.onChangeFile,vt=Tt.onAddTestCase,Ft=Tt.onRemoveTestCase,rn=Tt.uploadData,hn=Tt.setUploadData,An=Tt.handleUploadRatio,Rn=Tt.pointData,se=Tt.sourceData,V=Tt.getPointData,X=$t.test_set_average,ne=$t.test_set_score,me=Object(re.useState)(!1),ie=Object(j.a)(me,2),ze=ie[0],pt=ie[1],ot=Object(re.useState)(!1),It=Object(j.a)(ot,2),gt=It[0],Ht=It[1],Xt=function(Jt,tr){var vr=Object(f.a)(rn);vr.splice(tr,1),X?An(vr):hn(vr)},Sr=function(Jt,tr){console.log(Jt,tr);var vr=rn.map(function(Xr,ln){return ln===tr?Object(k.a)(Object(k.a)({},Xr),{},{score:Jt.target.value?Number(Jt.target.value):0}):Xr});hn(vr)},an=function(Jt){var tr=rn.concat(Jt);$t.test_set_average?An(tr):hn(tr)};function Zr(fr){fr.stopPropagation()}function Zt(){if(Object(dr.v)()){Ht("practice");return}var fr="";G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:ee.a.createElement("div",null,ee.a.createElement(W.a,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(tr){fr=tr.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Jt=Object(w.a)(q.a.mark(function vr(){var Xr;return q.a.wrap(function(mn){for(;;)switch(mn.prev=mn.next){case 0:return mn.next=2,Object(be.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:fr}});case 2:Xr=mn.sent,(Xr==null?void 0:Xr.status)===0&&V();case 4:case"end":return mn.stop()}},vr)}));function tr(){return Jt.apply(this,arguments)}return tr}()})}function Hr(){if(Object(dr.v)()){Ht("practice_source");return}var fr="";G.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:ee.a.createElement("div",null,ee.a.createElement(W.a,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(tr){fr=tr.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Jt=Object(w.a)(q.a.mark(function vr(){var Xr;return q.a.wrap(function(mn){for(;;)switch(mn.prev=mn.next){case 0:return mn.next=2,Object(be.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:fr}});case 2:Xr=mn.sent,(Xr==null?void 0:Xr.status)===0&&V();case 4:case"end":return mn.stop()}},vr)}));function tr(){return Jt.apply(this,arguments)}return tr}()})}return ee.a.createElement("div",{className:xe.a["oj-left-panel"]},ee.a.createElement("div",{className:xe.a["oj-form-info"]},ee.a.createElement(N.a.Item,{label:"\u9898\u76EE\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0"}],className:xe.a.inputOne},ee.a.createElement(W.a,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:ee.a.createElement("span",null,(jr==null||((Dt=jr.hack)===null||Dt===void 0||((Ct=Dt.name)===null||Ct===void 0))?void 0:Ct.length)||0,"/",ee.a.createElement("span",{className:"c-grey-999"},"60"))})),ee.a.createElement(N.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},ee.a.createElement(Z.a,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),ee.a.createElement("div",{className:xe.a.row},ee.a.createElement("div",{className:xe.a.a},ee.a.createElement(N.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},ee.a.createElement(p.a,null,ae(de.difficulty)))),ee.a.createElement("div",{className:xe.a.b},ee.a.createElement(N.a.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},ee.a.createElement(p.a,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(Jt){return Jt.parentNode}},se.map(function(fr){return ee.a.createElement(p.a.Option,{key:fr.id,value:fr.id},fr.name)}))),ee.a.createElement(T.a,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:function(){return Hr()}},Object(dr.v)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),ee.a.createElement("div",{className:xe.a.row},ee.a.createElement("div",{className:xe.a.b,style:{width:"100%",marginLeft:0}},ee.a.createElement(N.a.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},ee.a.createElement(p.a,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(Jt){return Jt.parentNode}},Rn.map(function(fr){return ee.a.createElement(p.a.Option,{key:fr.id,value:fr.id},fr.name)}))),ee.a.createElement(T.a,{type:"primary",ghost:!0,onClick:function(){return Zt()}},Object(dr.v)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),ee.a.createElement("div",{className:xe.a.field},ee.a.createElement(N.a.Item,{label:"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236",name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],className:xe.a.inputTwo,extra:ee.a.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",ee.a.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},ee.a.createElement(r.a,{style:{width:185},min:3}))),ee.a.createElement("div",{className:"tst-case-info"},ee.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!$t.is_file&&ee.a.createElement(T.a,{style:{height:40},type:"primary",ghost:!0,onClick:vt},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),ee.a.createElement(N.a.Item,{name:["hack","test_set_score"]},ee.a.createElement(a.a.Group,{onChange:Ur},ee.a.createElement(a.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",ee.a.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u4EC5\u5F53\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u83B7\u5F97\u4E00\u6B21\u6027\u5956\u52B1\uFF09")),ee.a.createElement(a.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",ee.a.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u901A\u8FC7\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5BF9\u5E94\u5956\u52B1\uFF09")))),ee.a.createElement(C.a,{style:{marginBottom:"5px"},checked:Rr,onChange:_n},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u505A\u9898\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),ee.a.createElement(N.a.Item,{className:xe.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},ee.a.createElement(a.a.Group,{onChange:Vr},ee.a.createElement(h.a,{direction:"horizontal"},ee.a.createElement(a.a,{value:!1},"\u6587\u672C"),ee.a.createElement(a.a,{value:!0},"\u6587\u4EF6")))),!$t.test_set_score&&ee.a.createElement(N.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},ee.a.createElement(a.a.Group,{onChange:jt},ee.a.createElement(a.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),ee.a.createElement(a.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),$t.is_file&&ee.a.createElement("div",{className:xe.a.upBtn},ee.a.createElement(T.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return pt(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),ee.a.createElement(Ot.a,{disabled:$t==null?void 0:$t.test_set_average,inputChange:Sr,showScore:!$t.test_set_score,data:rn,onRemove:Xt})),!$t.is_file&&ee.a.createElement(N.a.List,{name:"hack_sets"},function(fr,Jt){return Object(S.a)(Jt),ee.a.createElement(H.a,{accordion:!0},fr.map(function(tr,vr){return ee.a.createElement(ur,{key:"".concat(tr.key,"--").concat(vr),header:ee.a.createElement("a",{className:xe.a["test-case-name"]},ee.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",vr+1),ne?null:ee.a.createElement(ee.a.Fragment,null,ee.a.createElement(N.a.Item,{name:[tr.name,"score"],fieldKey:[tr.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(vr+1,"\u8BC4\u5206")}]},ee.a.createElement(r.a,{onClick:Zr,min:0,max:100,disabled:X})),ee.a.createElement("span",null,"%"))),extra:vr>0?ee.a.createElement("div",{onClick:Zr},ee.a.createElement(u.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(vr+1),onConfirm:function(){Ft(vr)}},ee.a.createElement(Y.a,{className:xe.a["btn-remove-case"]}))):null},ee.a.createElement(N.a.Item,{label:"\u8F93\u5165",name:[tr.name,"input"],fieldKey:[tr.fieldKey,"input"]},ee.a.createElement(Nt,null)),ee.a.createElement(N.a.Item,{label:"\u8F93\u51FA",name:[tr.name,"output"],fieldKey:[tr.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},ee.a.createElement(Nt,null)))}))}))),ee.a.createElement(Ot.b,{rootIdentifier:null,visible:ze,onClose:function(){return pt(!1)},onOK:an}),ee.a.createElement(dt,{visible:gt,onCancel:function(){Ht(!1),V()},onOK:function(){Ht(!1),V()}}))}},rcnY:function(I,J,P){var L=P("aRTE");function u(S,R){this.totalCount=S,this.dataCount=R}u.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],u.getRSBlocks=function(S,R){var h=u.getRsBlockTable(S,R);if(h==null)throw new Error("bad rs block @ typeNumber:"+S+"/errorCorrectLevel:"+R);for(var o=h.length/3,C=new Array,c=0;c=0;i--){var r=S().key(i);a(R(r),r)}}function C(a){return S().removeItem(a)}function c(){return S().clear()}},sR1s:function(I,J,P){"use strict";P.d(J,"b",function(){return R}),P.d(J,"a",function(){return h}),P.d(J,"c",function(){return o}),P.d(J,"d",function(){return C});var L=P("U8pU"),u="RC_TABLE_KEY";function S(c){return c==null?[]:Array.isArray(c)?c:[c]}function R(c,a){if(!a&&typeof a!="number")return c;for(var i=S(a),r=c,l=0;l1)Object(i.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(g.length===0)return Object(i.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var T=g[0];if(o.isValidElement(T)&&Object(r.c)(T)){var y=T.ref;g[0]=o.cloneElement(T,{ref:Object(r.a)(y,this.setChildNode)})}return g.length===1?g[0]:g.map(function(s,M){return!o.isValidElement(s)||"key"in s&&s.key!==null?s:o.cloneElement(s,{key:"".concat(p,"-").concat(M)})})}}]),m}(o.Component);f.displayName="ResizeObserver",J.a=f},uGsb:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("MlIO"),P("1uat"))})(this,function(L){return function(){var u=L,S=u.x64,R=S.Word,h=S.WordArray,o=u.algo,C=o.SHA512,c=o.SHA384=C.extend({_doReset:function(){this._hash=new h.init([new R.init(3418070365,3238371032),new R.init(1654270250,914150663),new R.init(2438529370,812702999),new R.init(355462360,4144912697),new R.init(1731405415,4290775857),new R.init(2394180231,1750603025),new R.init(3675008525,1694076839),new R.init(1203062813,3204075428)])},_doFinalize:function(){var a=C._doFinalize.call(this);return a.sigBytes-=16,a}});u.SHA384=C._createHelper(c),u.HmacSHA384=C._createHmacHelper(c)}(),L.SHA384})},uGxW:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("OLod"))})(this,function(L){return L.pad.NoPadding={pad:function(){},unpad:function(){}},L.pad.NoPadding})},uQRt:function(I,J,P){I.exports=L;function L(){return P("gaXo"),{}}},ulZh:function(I,J,P){typeof window!="undefined"&&function(u,S){I.exports=S()}(this,function(){return function(L){var u={};function S(R){if(u[R])return u[R].exports;var h=u[R]={i:R,l:!1,exports:{}};return L[R].call(h.exports,h,h.exports,S),h.l=!0,h.exports}return S.m=L,S.c=u,S.d=function(R,h,o){S.o(R,h)||Object.defineProperty(R,h,{enumerable:!0,get:o})},S.r=function(R){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(R,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(R,"__esModule",{value:!0})},S.t=function(R,h){if(h&1&&(R=S(R)),h&8)return R;if(h&4&&typeof R=="object"&&R&&R.__esModule)return R;var o=Object.create(null);if(S.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:R}),h&2&&typeof R!="string")for(var C in R)S.d(o,C,function(c){return R[c]}.bind(null,C));return o},S.n=function(R){var h=R&&R.__esModule?function(){return R.default}:function(){return R};return S.d(h,"a",h),h},S.o=function(R,h){return Object.prototype.hasOwnProperty.call(R,h)},S.p="/dist/",S(S.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(L,u,S){"use strict";var R=Object.prototype.hasOwnProperty,h="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(h=!1));function C(r,l,p){this.fn=r,this.context=l,this.once=p||!1}function c(r,l,p,f,b){if(typeof p!="function")throw new TypeError("The listener must be a function");var v=new C(p,f||r,b),m=h?h+l:l;return r._events[m]?r._events[m].fn?r._events[m]=[r._events[m],v]:r._events[m].push(v):(r._events[m]=v,r._eventsCount++),r}function a(r,l){--r._eventsCount===0?r._events=new o:delete r._events[l]}function i(){this._events=new o,this._eventsCount=0}i.prototype.eventNames=function(){var l=[],p,f;if(this._eventsCount===0)return l;for(f in p=this._events)R.call(p,f)&&l.push(h?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(p)):l},i.prototype.listeners=function(l){var p=h?h+l:l,f=this._events[p];if(!f)return[];if(f.fn)return[f.fn];for(var b=0,v=f.length,m=new Array(v);b0},!1)}function r(l,p){for(var f={main:[p]},b={main:[]},v={main:{}};i(f);)for(var m=Object.keys(f),n=0;n=2*M/x||k<=H)return;var F=Number.POSITIVE_INFINITY,G;for(G=m.level-1;G>w;G--){var B=E[G].maxBitrate;if(F=M*B/(8*.8*j),F=k)return;var W=this.bwEstimator.getEstimate();i.logger.warn("Fragment "+m.sn+(n?" part "+n.index:"")+" of level "+m.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+G+` Current BW estimate: `+(Object(R.isFiniteNumber)(W)?(W/1024).toFixed(3):"Unknown")+` Kb/s Estimated load time for current fragment: `+k.toFixed(3)+` s Estimated load time for the next fragment: `+F.toFixed(3)+` s Time to underbuffer: `+H.toFixed(3)+" s"),d.nextLoadLevel=G,this.bwEstimator.sample(A,s.loaded),this.clearTimer(),m.loader&&(this.fragCurrent=this.partCurrent=null,m.loader.abort()),d.trigger(o.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:m,part:n,stats:s})},b.onFragLoaded=function(m,n){var d=n.frag,g=n.part;if(d.type===a.PlaylistLevelType.MAIN&&Object(R.isFiniteNumber)(d.sn)){var T=g?g.stats:d.stats,y=g?g.duration:d.duration;if(this.clearTimer(),this.lastLoadedFragLevel=d.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var s=this.hls.levels[d.level],M=(s.loaded?s.loaded.bytes:0)+T.loaded,A=(s.loaded?s.loaded.duration:0)+y;s.loaded={bytes:M,duration:A},s.realBitrate=Math.round(8*M/A)}if(d.bitrateTest){var x={stats:T,frag:d,part:g,id:d.type};this.onFragBuffered(o.Events.FRAG_BUFFERED,x),d.bitrateTest=!1}}},b.onFragBuffered=function(m,n){var d=n.frag,g=n.part,T=g?g.stats:d.stats;if(T.aborted)return;if(d.type!==a.PlaylistLevelType.MAIN||d.sn==="initSegment")return;var y=T.parsing.end-T.loading.start;this.bwEstimator.sample(y,T.loaded),T.bwEstimate=this.bwEstimator.getEstimate(),d.bitrateTest?this.bitrateTestDelay=y/1e3:this.bitrateTestDelay=0},b.onError=function(m,n){switch(n.details){case c.ErrorDetails.FRAG_LOAD_ERROR:case c.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},b.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},b.getNextABRAutoLevel=function(){var m=this.fragCurrent,n=this.partCurrent,d=this.hls,g=d.maxAutoLevel,T=d.config,y=d.minAutoLevel,s=d.media,M=n?n.duration:m?m.duration:0,A=s?s.currentTime:0,x=s&&s.playbackRate!==0?Math.abs(s.playbackRate):1,E=this.bwEstimator?this.bwEstimator.getEstimate():T.abrEwmaDefaultEstimate,w=(C.BufferHelper.bufferInfo(s,A,T.maxBufferHole).end-A)/x,_=this.findBestLevel(E,y,g,w,T.abrBandWidthFactor,T.abrBandWidthUpFactor);if(_>=0)return _;i.logger.trace((w?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var N=M?Math.min(M,T.maxStarvationDelay):T.maxStarvationDelay,j=T.abrBandWidthFactor,k=T.abrBandWidthUpFactor;if(!w){var z=this.bitrateTestDelay;if(z){var H=M?Math.min(M,T.maxLoadingDelay):T.maxLoadingDelay;N=H-z,i.logger.trace("bitrate test took "+Math.round(1e3*z)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*N)+" ms"),j=k=1}}return _=this.findBestLevel(E,y,g,w+N,j,k),Math.max(_,0)},b.findBestLevel=function(m,n,d,g,T,y){for(var s,M=this.fragCurrent,A=this.partCurrent,x=this.lastLoadedFragLevel,E=this.hls.levels,w=E[x],_=!!(w!=null&&(s=w.details)!==null&&s!==void 0&&s.live),N=w==null?void 0:w.codecSet,j=A?A.duration:M?M.duration:0,k=d;k>=n;k--){var z=E[k];if(!z||N&&z.codecSet!==N)continue;var H=z.details,F=(A?H==null?void 0:H.partTarget:H==null?void 0:H.averagetargetduration)||j,G=void 0;k<=x?G=T*m:G=y*m;var B=E[k].maxBitrate,W=B*F/G;if(i.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+k+"/"+Math.round(G)+"/"+B+"/"+F+"/"+g+"/"+W),G>B&&(!W||_&&!this.bitrateTestDelay||W0&&w===-1?(this.log("Override startPosition with lastCurrentTime @"+_.toFixed(3)),this.state=h.State.IDLE):(this.loadedmetadata=!1,this.state=h.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=w,this.tick()},x.doTick=function(){switch(this.state){case h.State.IDLE:this.doTickIdle();break;case h.State.WAITING_TRACK:{var w,_=this.levels,N=this.trackId,j=_==null||((w=_[N])===null||w===void 0)?void 0:w.details;if(j){if(this.waitForCdnTuneIn(j))break;this.state=h.State.WAITING_INIT_PTS}break}case h.State.FRAG_LOADING_WAITING_RETRY:{var k,z=performance.now(),H=this.retryDate;(!H||z>=H||(k=this.media)!==null&&k!==void 0&&k.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=h.State.IDLE);break}case h.State.WAITING_INIT_PTS:{var F=this.waitingData;if(F){var G=F.frag,B=F.part,W=F.cache,K=F.complete;if(this.initPTS[G.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=h.State.FRAG_LOADING;var q=W.flush(),re={frag:G,part:B,payload:q,networkDetails:null};this._handleFragmentLoadProgress(re),K&&M.prototype._handleFragmentLoadComplete.call(this,re)}else if(this.videoTrackCC!==this.waitingVideoCC)n.logger.log("Waiting fragment cc ("+G.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var ee=this.getLoadPosition(),Ce=C.BufferHelper.bufferInfo(this.mediaBuffer,ee,this.config.maxBufferHole),xe=Object(b.fragmentWithinToleranceTest)(Ce.end,this.config.maxFragLookUpTolerance,G);xe<0&&(n.logger.log("Waiting fragment cc ("+G.cc+") @ "+G.start+" cancelled because another fragment at "+Ce.end+" is needed"),this.clearWaitingFragment())}}else this.state=h.State.IDLE}}this.onTickEnd()},x.clearWaitingFragment=function(){var w=this.waitingData;w&&(this.fragmentTracker.removeFragment(w.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=h.State.IDLE)},x.onTickEnd=function(){var w=this.media;if(!w||!w.readyState)return;var _=this.mediaBuffer?this.mediaBuffer:w,N=_.buffered;!this.loadedmetadata&&N.length&&(this.loadedmetadata=!0),this.lastCurrentTime=w.currentTime},x.doTickIdle=function(){var w,_,N=this.hls,j=this.levels,k=this.media,z=this.trackId,H=N.config;if(!j||!j[z])return;if(!k&&(this.startFragRequested||!H.startFragPrefetch))return;var F=j[z],G=F.details;if(!G||G.live&&this.levelLastLoaded!==z||this.waitForCdnTuneIn(G)){this.state=h.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,r.ElementaryStreamTypes.AUDIO,i.PlaylistLevelType.AUDIO));var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,i.PlaylistLevelType.AUDIO);if(B===null)return;var W=B.len,K=this.getMaxBufferLength(),q=this.audioSwitch;if(W>=K&&!q)return;if(!q&&this._streamEnded(B,G)){N.trigger(o.Events.BUFFER_EOS,{type:"audio"}),this.state=h.State.ENDED;return}var re=G.fragments,ee=re[0].start,Ce=B.end;if(q){var xe=this.getLoadPosition();Ce=xe,G.PTSKnown&&xeee||B.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),k.currentTime=ee+.05))}var he=this.getNextFragment(Ce,G);if(!he){this.bufferFlushed=!0;return}((w=he.decryptdata)===null||w===void 0?void 0:w.keyFormat)==="identity"&&!((_=he.decryptdata)!==null&&_!==void 0&&_.key)?this.loadKey(he,G):this.loadFragment(he,G,Ce)},x.getMaxBufferLength=function(){var w=M.prototype.getMaxBufferLength.call(this),_=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,i.PlaylistLevelType.MAIN);return _===null?w:Math.max(w,_.len)},x.onMediaDetaching=function(){this.videoBuffer=null,M.prototype.onMediaDetaching.call(this)},x.onAudioTracksUpdated=function(w,_){var N=_.audioTracks;this.resetTransmuxer(),this.levels=N.map(function(j){return new a.Level(j)})},x.onAudioTrackSwitching=function(w,_){var N=!!_.url;this.trackId=_.id;var j=this.fragCurrent;j!=null&&j.loader&&j.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),N?this.setInterval(y):this.resetTransmuxer(),N?(this.audioSwitch=!0,this.state=h.State.IDLE):this.state=h.State.STOPPED,this.tick()},x.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},x.onLevelLoaded=function(w,_){this.mainDetails=_.details},x.onAudioTrackLoaded=function(w,_){var N,j=this.levels,k=_.details,z=_.id;if(!j){this.warn("Audio tracks were reset while loading level "+z);return}this.log("Track "+z+" loaded ["+k.startSN+","+k.endSN+"],duration:"+k.totalduration);var H=j[z],F=0;if(k.live||(N=H.details)!==null&&N!==void 0&&N.live){var G=this.mainDetails;if(k.fragments[0]||(k.deltaUpdateFailed=!0),k.deltaUpdateFailed||!G)return;!H.details&&k.hasProgramDateTime&&G.hasProgramDateTime?(Object(v.alignMediaPlaylistByPDT)(k,G),F=k.fragments[0].start):F=this.alignPlaylists(k,H.details)}H.details=k,this.levelLastLoaded=z,!this.startFragRequested&&(this.mainDetails||!k.live)&&this.setStartPosition(H.details,F),this.state===h.State.WAITING_TRACK&&!this.waitForCdnTuneIn(k)&&(this.state=h.State.IDLE),this.tick()},x._handleFragmentLoadProgress=function(w){var _,N=w.frag,j=w.part,k=w.payload,z=this.config,H=this.trackId,F=this.levels;if(!F){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+N.sn+" of level "+N.level+" will not be buffered");return}var G=F[H];console.assert(G,"Audio track is defined on fragment load progress");var B=G.details;console.assert(B,"Audio track details are defined on fragment load progress");var W=z.defaultAudioCodec||G.audioCodec||"mp4a.40.2",K=this.transmuxer;K||(K=this.transmuxer=new p.default(this.hls,i.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var q=this.initPTS[N.cc],re=(_=N.initSegment)===null||_===void 0?void 0:_.data;if(q!==void 0){var ee=!1,Ce=j?j.index:-1,xe=Ce!==-1,he=new f.ChunkMetadata(N.level,N.sn,N.stats.chunkCount,k.byteLength,Ce,xe);K.push(k,re,W,"",N,j,B.totalduration,ee,he,q)}else{n.logger.log("Unknown video PTS for cc "+N.cc+", waiting for video PTS before demuxing audio frag "+N.sn+" of ["+B.startSN+" ,"+B.endSN+"],track "+H);var ke=this.waitingData=this.waitingData||{frag:N,part:j,cache:new l.default,complete:!1},_e=ke.cache;_e.push(new Uint8Array(k)),this.waitingVideoCC=this.videoTrackCC,this.state=h.State.WAITING_INIT_PTS}},x._handleFragmentLoadComplete=function(w){if(this.waitingData){this.waitingData.complete=!0;return}M.prototype._handleFragmentLoadComplete.call(this,w)},x.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},x.onBufferCreated=function(w,_){var N=_.tracks.audio;N&&(this.mediaBuffer=N.buffer),_.tracks.video&&(this.videoBuffer=_.tracks.video.buffer)},x.onFragBuffered=function(w,_){var N=_.frag,j=_.part;if(N.type!==i.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(N)){this.warn("Fragment "+N.sn+(j?" p: "+j.index:"")+" of level "+N.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}N.sn!=="initSegment"&&(this.fragPrevious=N,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(N,j)},x.onError=function(w,_){switch(_.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(i.PlaylistLevelType.AUDIO,_);break;case m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==h.State.ERROR&&this.state!==h.State.STOPPED&&(this.state=_.fatal?h.State.ERROR:h.State.IDLE,this.warn(_.details+" while loading frag, switching to "+this.state+" state"));break;case m.ErrorDetails.BUFFER_FULL_ERROR:if(_.parent==="audio"&&(this.state===h.State.PARSING||this.state===h.State.PARSED)){var N=!0,j=this.getFwdBufferInfo(this.mediaBuffer,i.PlaylistLevelType.AUDIO);j&&j.len>.5&&(N=!this.reduceMaxBufferLength(j.len)),N&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,M.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},x.onBufferFlushed=function(w,_){var N=_.type;N===r.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},x._handleTransmuxComplete=function(w){var _,N="audio",j=this.hls,k=w.remuxResult,z=w.chunkMeta,H=this.getCurrentContext(z);if(!H){this.warn("The loading context changed while buffering fragment "+z.sn+" of level "+z.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(z.level);return}var F=H.frag,G=H.part,B=k.audio,W=k.text,K=k.id3,q=k.initSegment;if(this.fragContextChanged(F))return;if(this.state=h.State.PARSING,this.audioSwitch&&B&&this.completeAudioSwitch(),q!=null&&q.tracks&&(this._bufferInitSegment(q.tracks,F,z),j.trigger(o.Events.FRAG_PARSING_INIT_SEGMENT,{frag:F,id:N,tracks:q.tracks})),B){var re=B.startPTS,ee=B.endPTS,Ce=B.startDTS,xe=B.endDTS;G&&(G.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:re,endPTS:ee,startDTS:Ce,endDTS:xe}),F.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,re,ee,Ce,xe),this.bufferFragmentData(B,F,G,z)}if(K!=null&&(_=K.samples)!==null&&_!==void 0&&_.length){var he=d({frag:F,id:N},K);j.trigger(o.Events.FRAG_PARSING_METADATA,he)}if(W){var ke=d({frag:F,id:N},W);j.trigger(o.Events.FRAG_PARSING_USERDATA,ke)}},x._bufferInitSegment=function(w,_,N){if(this.state!==h.State.PARSING)return;w.video&&delete w.video;var j=w.audio;if(!j)return;j.levelCodec=j.codec,j.id="audio",this.log("Init audio buffer, container:"+j.container+", codecs[parsed]=["+j.codec+"]"),this.hls.trigger(o.Events.BUFFER_CODECS,w);var k=j.initSegment;if(k!=null&&k.byteLength){var z={type:"audio",frag:_,part:null,chunkMeta:N,parent:_.type,data:k};this.hls.trigger(o.Events.BUFFER_APPENDING,z)}this.tick()},x.loadFragment=function(w,_,N){var j=this.fragmentTracker.getState(w);this.fragCurrent=w,(this.audioSwitch||j===c.FragmentState.NOT_LOADED||j===c.FragmentState.PARTIAL)&&(w.sn==="initSegment"?this._loadInitSegment(w):_.live&&!Object(R.isFiniteNumber)(this.initPTS[w.cc])?(this.log("Waiting for video PTS in continuity counter "+w.cc+" of live stream before loading audio fragment "+w.sn+" of level "+this.trackId),this.state=h.State.WAITING_INIT_PTS):(this.startFragRequested=!0,M.prototype.loadFragment.call(this,w,_,N)))},x.completeAudioSwitch=function(){var w=this.hls,_=this.media,N=this.trackId;_&&(this.log("Switching audio track : flushing all audio"),M.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,w.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:N})},A}(h.default);u.default=s},"./src/controller/audio-track-controller.ts":function(L,u,S){"use strict";S.r(u);var R=S("./src/events.ts"),h=S("./src/errors.ts"),o=S("./src/controller/base-playlist-controller.ts"),C=S("./src/types/loader.ts");function c(p,f){for(var b=0;b=n.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var d=n[this.trackId];this.log("Now switching to audio-track index "+m);var g=n[m],T=g.id,y=g.groupId,s=y===void 0?"":y,M=g.name,A=g.type,x=g.url;if(this.trackId=m,this.trackName=M,this.selectDefaultTrack=!1,this.hls.trigger(R.Events.AUDIO_TRACK_SWITCHING,{id:T,groupId:s,name:M,type:A,url:x}),g.details&&!g.details.live)return;var E=this.switchParams(g.url,d==null?void 0:d.details);this.loadPlaylist(E)},b.selectInitialTrack=function(){var m=this.tracksInGroup;console.assert(m.length,"Initial audio track should be selected when tracks are known");var n=this.trackName,d=this.findTrackId(n)||this.findTrackId();d!==-1?this.setAudioTrack(d):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},b.findTrackId=function(m){for(var n=this.tracksInGroup,d=0;df.partTarget&&(g+=1)}if(Object(R.isFiniteNumber)(d))return new h.HlsUrlParameters(d,Object(R.isFiniteNumber)(g)?g:void 0,h.HlsSkip.No)}}},r.loadPlaylist=function(p){},r.shouldLoadTrack=function(p){return this.canLoad&&p&&!!p.url&&(!p.details||p.details.live)},r.playlistLoaded=function(p,f,b){var v=this,m=f.details,n=f.stats,d=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(m.advancedDateTime=Date.now()-d,m.live||b!=null&&b.live){if(m.reloaded(b),b&&this.log("live playlist "+p+" "+(m.advanced?"REFRESHED "+m.lastPartSn+"-"+m.lastPartIndex:"MISSED")),b&&m.fragments.length>0&&Object(o.mergeDetails)(b,m),!this.canLoad||!m.live)return;var g,T=void 0,y=void 0;if(m.canBlockReload&&m.endSN&&m.advanced){var s=this.hls.config.lowLatencyMode,M=m.lastPartSn,A=m.endSN,x=m.lastPartIndex,E=x!==-1,w=M===A,_=s?0:x;E?(T=w?A+1:M,y=w?_:x+1):T=A+1;var N=m.age,j=N+m.ageHeader,k=Math.min(j-m.partTarget,m.targetduration*1.5);if(k>0){if(b&&k>b.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+b.tuneInGoal+" to: "+k+" with playlist age: "+m.age),k=0;else{var z=Math.floor(k/m.targetduration);if(T+=z,y!==void 0){var H=Math.round(k%m.targetduration/m.partTarget);y+=H}this.log("CDN Tune-in age: "+m.ageHeader+"s last advanced "+N.toFixed(2)+"s goal: "+k+" skip sn "+z+" to part "+y)}m.tuneInGoal=k}if(g=this.getDeliveryDirectives(m,f.deliveryDirectives,T,y),s||!w){this.loadPlaylist(g);return}}else g=this.getDeliveryDirectives(m,f.deliveryDirectives,T,y);var F=Object(o.computeReloadInterval)(m,n);T!==void 0&&m.canBlockReload&&(F-=m.partTarget||1),this.log("reload live playlist "+p+" in "+Math.round(F)+" ms"),this.timer=self.setTimeout(function(){return v.loadPlaylist(g)},F)}else this.clearTimer()},r.getDeliveryDirectives=function(p,f,b,v){var m=Object(h.getSkipValue)(p,b);return f!=null&&f.skip&&p.deltaUpdateFailed&&(b=f.msn,v=f.part,m=h.HlsSkip.No),new h.HlsUrlParameters(b,v,m)},r.retryLoadingOrFail=function(p){var f=this,b=this.hls.config,v=this.retryCount-1&&(m=p.context)!==null&&m!==void 0&&m.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+p.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*b.levelLoadingRetryDelay,b.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return f.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+p.details+'"')}}else this.warn('cannot recover from error "'+p.details+'"'),this.clearTimer(),p.fatal=!0;return v},i}()},"./src/controller/base-stream-controller.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"State",function(){return A}),S.d(u,"default",function(){return x});var R=S("./src/polyfills/number.ts"),h=S("./src/task-loop.ts"),o=S("./src/controller/fragment-tracker.ts"),C=S("./src/utils/buffer-helper.ts"),c=S("./src/utils/logger.ts"),a=S("./src/events.ts"),i=S("./src/errors.ts"),r=S("./src/types/transmuxer.ts"),l=S("./src/utils/mp4-tools.ts"),p=S("./src/utils/discontinuities.ts"),f=S("./src/controller/fragment-finders.ts"),b=S("./src/controller/level-helper.ts"),v=S("./src/loader/fragment-loader.ts"),m=S("./src/crypt/decrypter.ts"),n=S("./src/utils/time-ranges.ts"),d=S("./src/types/loader.ts");function g(E,w){for(var _=0;_q;(G0&&G&&G.key&&G.iv&&G.method==="AES-128"){var B=self.performance.now();return k.decrypter.webCryptoDecrypt(new Uint8Array(F),G.key.buffer,G.iv.buffer).then(function(W){var K=self.performance.now();return H.trigger(a.Events.FRAG_DECRYPTED,{frag:j,payload:W,stats:{tstart:B,tdecrypt:K}}),z.payload=W,z})}return z}).then(function(z){var H=k.fragCurrent,F=k.hls,G=k.levels;if(!G)throw new Error("init load aborted, missing levels");var B=G[j.level].details;console.assert(B,"Level details are defined when init segment is loaded");var W=j.stats;k.state=A.IDLE,k.fragLoadError=0,j.data=new Uint8Array(z.payload),W.parsing.start=W.buffering.start=self.performance.now(),W.parsing.end=W.buffering.end=self.performance.now(),z.frag===H&&F.trigger(a.Events.FRAG_BUFFERED,{stats:W,frag:H,part:null,id:j.type}),k.tick()}).catch(function(z){k.warn(z),k.resetFragmentLoading(j)})},_.fragContextChanged=function(j){var k=this.fragCurrent;return!j||!k||j.level!==k.level||j.sn!==k.sn||j.urlId!==k.urlId},_.fragBufferedComplete=function(j,k){var z=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+j.type+" sn: "+j.sn+(k?" part: "+k.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+j.level+" "+n.default.toString(C.BufferHelper.getBuffered(z))),this.state=A.IDLE,this.tick()},_._handleFragmentLoadComplete=function(j){var k=this.transmuxer;if(!k)return;var z=j.frag,H=j.part,F=j.partsLoaded,G=!F||F.length===0||F.some(function(W){return!W}),B=new r.ChunkMetadata(z.level,z.sn,z.stats.chunkCount+1,0,H?H.index:-1,!G);k.flush(B)},_._handleFragmentLoadProgress=function(j){},_._doFragLoad=function(j,k,z,H){var F=this;if(z===void 0&&(z=null),!this.levels)throw new Error("frag load aborted, missing levels");if(z=Math.max(j.start,z||0),this.config.lowLatencyMode&&k){var G=k.partList;if(G&&H){z>j.end&&k.fragmentHint&&(j=k.fragmentHint);var B=this.getNextPart(G,j,z);if(B>-1){var W=G[B];return this.log("Loading part sn: "+j.sn+" p: "+W.index+" cc: "+j.cc+" of playlist ["+k.startSN+"-"+k.endSN+"] parts [0-"+B+"-"+(G.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+j.level+", target: "+parseFloat(z.toFixed(3))),this.nextLoadPosition=W.start+W.duration,this.state=A.FRAG_LOADING,this.hls.trigger(a.Events.FRAG_LOADING,{frag:j,part:G[B],targetBufferTime:z}),this.doFragPartsLoad(j,G,B,H).catch(function(K){return F.handleFragLoadError(K)})}else if(!j.url||this.loadedEndOfParts(G,z))return Promise.resolve(null)}}return this.log("Loading fragment "+j.sn+" cc: "+j.cc+" "+(k?"of ["+k.startSN+"-"+k.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+j.level+", target: "+parseFloat(z.toFixed(3))),Object(R.isFiniteNumber)(j.sn)&&!this.bitrateTest&&(this.nextLoadPosition=j.start+j.duration),this.state=A.FRAG_LOADING,this.hls.trigger(a.Events.FRAG_LOADING,{frag:j,targetBufferTime:z}),this.fragmentLoader.load(j,H).catch(function(K){return F.handleFragLoadError(K)})},_.doFragPartsLoad=function(j,k,z,H){var F=this;return new Promise(function(G,B){var W=[],K=function q(re){var ee=k[re];F.fragmentLoader.loadPart(j,ee,H).then(function(Ce){W[ee.index]=Ce;var xe=Ce.part;F.hls.trigger(a.Events.FRAG_LOADED,Ce);var he=k[re+1];if(he&&he.fragment===j)q(re+1);else return G({frag:j,part:xe,partsLoaded:W})}).catch(B)};K(z)})},_.handleFragLoadError=function(j){var k=j.data;return k&&k.details===i.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(k.frag,k.part):this.hls.trigger(a.Events.ERROR,k),null},_._handleTransmuxerFlush=function(j){var k=this.getCurrentContext(j);if(!k||this.state!==A.PARSING){this.fragCurrent||(this.state=A.IDLE);return}var z=k.frag,H=k.part,F=k.level,G=self.performance.now();z.stats.parsing.end=G,H&&(H.stats.parsing.end=G),this.updateLevelTiming(z,H,F,j.partial)},_.getCurrentContext=function(j){var k=this.levels,z=j.level,H=j.sn,F=j.part;if(!k||!k[z])return this.warn("Levels object was unset while buffering fragment "+H+" of level "+z+". The current chunk will not be buffered."),null;var G=k[z],B=F>-1?Object(b.getPartWith)(G,H,F):null,W=B?B.fragment:Object(b.getFragmentWithSN)(G,H,this.fragCurrent);return W?{frag:W,part:B,level:G}:null},_.bufferFragmentData=function(j,k,z,H){if(!j||this.state!==A.PARSING)return;var F=j.data1,G=j.data2,B=F;if(F&&G&&(B=Object(l.appendUint8Array)(F,G)),!B||!B.length)return;var W={type:j.type,frag:k,part:z,chunkMeta:H,parent:k.type,data:B};this.hls.trigger(a.Events.BUFFER_APPENDING,W),j.dropped&&j.independent&&!z&&this.flushBufferGap(k)},_.flushBufferGap=function(j){var k=this.media;if(!k)return;if(!C.BufferHelper.isBuffered(k,k.currentTime)){this.flushMainBuffer(0,j.start);return}var z=k.currentTime,H=C.BufferHelper.bufferInfo(k,z,0),F=j.duration,G=Math.min(this.config.maxFragLookUpTolerance*2,F*.25),B=Math.max(Math.min(j.start-G,H.end-G),z+G);j.start-B>G&&this.flushMainBuffer(B,j.start)},_.getFwdBufferInfo=function(j,k){var z=this.config,H=this.getLoadPosition();if(!Object(R.isFiniteNumber)(H))return null;var F=C.BufferHelper.bufferInfo(j,H,z.maxBufferHole);if(F.len===0&&F.nextStart!==void 0){var G=this.fragmentTracker.getBufferedFrag(H,k);if(G&&F.nextStart=z?(k.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+k.maxMaxBufferLength+"s"),!0):!1},_.getNextFragment=function(j,k){var z,H,F=k.fragments,G=F.length;if(!G)return null;var B=this.config,W=F[0].start,K;if(k.live){var q=B.initialLiveManifestSize;if(G-1&&zz.start&&z.loaded},_.getInitialLiveFragment=function(j,k){var z=this.fragPrevious,H=null;if(z){if(j.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+z.programDateTime),H=Object(f.findFragmentByPDT)(k,z.endProgramDateTime,this.config.maxFragLookUpTolerance)),!H){var F=z.sn+1;if(F>=j.startSN&&F<=j.endSN){var G=k[F-j.startSN];z.cc===G.cc&&(H=G,this.log("Live playlist, switching playlist, load frag with next SN: "+H.sn))}H||(H=Object(f.findFragWithCC)(k,z.cc),H&&this.log("Live playlist, switching playlist, load frag with same CC: "+H.sn))}}else{var B=this.hls.liveSyncPosition;B!==null&&(H=this.getFragmentAtPosition(B,this.bitrateTest?j.fragmentEnd:j.edge,j))}return H},_.getFragmentAtPosition=function(j,k,z){var H=this.config,F=this.fragPrevious,G=z.fragments,B=z.endSN,W=z.fragmentHint,K=H.maxFragLookUpTolerance,q=!!(H.lowLatencyMode&&z.partList&&W);q&&W&&!this.bitrateTest&&(G=G.concat(W),B=W.sn);var re;if(jk-K?0:K;re=Object(f.findFragmentByPTS)(F,G,j,ee)}else re=G[G.length-1];if(re){var Ce=re.sn-z.startSN,xe=F&&re.level===F.level,he=G[Ce+1],ke=this.fragmentTracker.getState(re);if(ke===o.FragmentState.BACKTRACKED){re=null;for(var _e=Ce;G[_e]&&this.fragmentTracker.getState(G[_e])===o.FragmentState.BACKTRACKED;)F?re=G[_e--]:re=G[--_e];re||(re=he)}else F&&re.sn===F.sn&&!q&&(xe&&(re.sn=G-k.maxFragLookUpTolerance&&F<=B;if(H!==null&&z.duration>H&&(F"+j.startSN+" prev-sn: "+(F?F.sn:"na")+" fragments: "+B),re}return W},_.waitForCdnTuneIn=function(j){var k=3;return j.live&&j.canBlockReload&&j.tuneInGoal>Math.max(j.partHoldBack,j.partTarget*k)},_.setStartPosition=function(j,k){var z=this.startPosition;if(z"+j))}}]),w}(h.default)},"./src/controller/buffer-controller.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"default",function(){return f});var R=S("./src/polyfills/number.ts"),h=S("./src/events.ts"),o=S("./src/utils/logger.ts"),C=S("./src/errors.ts"),c=S("./src/utils/buffer-helper.ts"),a=S("./src/utils/mediasource-helper.ts"),i=S("./src/loader/fragment.ts"),r=S("./src/controller/buffer-operation-queue.ts"),l=Object(a.getMediaSource)(),p=/([ha]vc.)(?:\.[^.,]+)+/,f=function(){function b(m){var n=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 d=n.hls,g=n.media,T=n.mediaSource;o.logger.log("[buffer-controller]: Media source opened"),g&&(n.updateMediaElementDuration(),d.trigger(h.Events.MEDIA_ATTACHED,{media:g})),T&&T.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},this._onMediaSourceClose=function(){o.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){o.logger.log("[buffer-controller]: Media source ended")},this.hls=m,this._initSourceBuffer(),this.registerListeners()}var v=b.prototype;return v.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},v.destroy=function(){this.unregisterListeners(),this.details=null},v.registerListeners=function(){var n=this.hls;n.on(h.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(h.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(h.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(h.Events.BUFFER_RESET,this.onBufferReset,this),n.on(h.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.on(h.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(h.Events.BUFFER_EOS,this.onBufferEos,this),n.on(h.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.on(h.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.on(h.Events.FRAG_PARSED,this.onFragParsed,this),n.on(h.Events.FRAG_CHANGED,this.onFragChanged,this)},v.unregisterListeners=function(){var n=this.hls;n.off(h.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(h.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(h.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(h.Events.BUFFER_RESET,this.onBufferReset,this),n.off(h.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.off(h.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(h.Events.BUFFER_EOS,this.onBufferEos,this),n.off(h.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.off(h.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.off(h.Events.FRAG_PARSED,this.onFragParsed,this),n.off(h.Events.FRAG_CHANGED,this.onFragChanged,this)},v._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new r.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},v.onManifestParsed=function(n,d){var g=2;(d.audio&&!d.video||!d.altAudio)&&(g=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=g,this.details=null,o.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},v.onMediaAttaching=function(n,d){var g=this.media=d.media;if(g&&l){var T=this.mediaSource=new l;T.addEventListener("sourceopen",this._onMediaSourceOpen),T.addEventListener("sourceended",this._onMediaSourceEnded),T.addEventListener("sourceclose",this._onMediaSourceClose),g.src=self.URL.createObjectURL(T),this._objectUrl=g.src}},v.onMediaDetaching=function(){var n=this.media,d=this.mediaSource,g=this._objectUrl;if(d){if(o.logger.log("[buffer-controller]: media source detaching"),d.readyState==="open")try{d.endOfStream()}catch(T){o.logger.warn("[buffer-controller]: onMediaDetaching: "+T.message+" while calling endOfStream")}this.onBufferReset(),d.removeEventListener("sourceopen",this._onMediaSourceOpen),d.removeEventListener("sourceended",this._onMediaSourceEnded),d.removeEventListener("sourceclose",this._onMediaSourceClose),n&&(g&&self.URL.revokeObjectURL(g),n.src===g?(n.removeAttribute("src"),n.load()):o.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(h.Events.MEDIA_DETACHED,void 0)},v.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(d){var g=n.sourceBuffer[d];try{g&&(n.removeBufferListeners(d),n.mediaSource&&n.mediaSource.removeSourceBuffer(g),n.sourceBuffer[d]=void 0)}catch(T){o.logger.warn("[buffer-controller]: Failed to reset the "+d+" buffer",T)}}),this._initSourceBuffer()},v.onBufferCodecs=function(n,d){var g=this,T=this.getSourceBufferTypes().length;if(Object.keys(d).forEach(function(y){if(T){var s=g.tracks[y];if(s&&typeof s.buffer.changeType=="function"){var M=d[y],A=M.codec,x=M.levelCodec,E=M.container,w=(s.levelCodec||s.codec).replace(p,"$1"),_=(x||A).replace(p,"$1");if(w!==_){var N=E+";codecs="+(x||A);g.appendChangeType(y,N)}}}else g.pendingTracks[y]=d[y]}),T)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},v.appendChangeType=function(n,d){var g=this,T=this.operationQueue,y={execute:function(){var M=g.sourceBuffer[n];M&&(o.logger.log("[buffer-controller]: changing "+n+" sourceBuffer type to "+d),M.changeType(d)),T.shiftAndExecuteNext(n)},onStart:function(){},onComplete:function(){},onError:function(M){o.logger.warn("[buffer-controller]: Failed to change "+n+" SourceBuffer type",M)}};T.append(y,n)},v.onBufferAppending=function(n,d){var g=this,T=this.hls,y=this.operationQueue,s=this.tracks,M=d.data,A=d.type,x=d.frag,E=d.part,w=d.chunkMeta,_=w.buffering[A],N=self.performance.now();_.start=N;var j=x.stats.buffering,k=E?E.stats.buffering:null;j.start===0&&(j.start=N),k&&k.start===0&&(k.start=N);var z=s.audio,H=A==="audio"&&w.id===1&&(z==null?void 0:z.container)==="audio/mpeg",F={execute:function(){if(_.executeStart=self.performance.now(),H){var B=g.sourceBuffer[A];if(B){var W=x.start-B.timestampOffset;Math.abs(W)>=.1&&(o.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+x.start+" (delta: "+W+") sn: "+x.sn+")"),B.timestampOffset=x.start)}}g.appendExecutor(M,A)},onStart:function(){},onComplete:function(){var B=self.performance.now();_.executeEnd=_.end=B,j.first===0&&(j.first=B),k&&k.first===0&&(k.first=B);var W=g.sourceBuffer,K={};for(var q in W)K[q]=c.BufferHelper.getBuffered(W[q]);g.appendError=0,g.hls.trigger(h.Events.BUFFER_APPENDED,{type:A,frag:x,part:E,chunkMeta:w,parent:x.type,timeRanges:K})},onError:function(B){o.logger.error("[buffer-controller]: Error encountered while trying to append to the "+A+" SourceBuffer",B);var W={type:C.ErrorTypes.MEDIA_ERROR,parent:x.type,details:C.ErrorDetails.BUFFER_APPEND_ERROR,err:B,fatal:!1};B.code===DOMException.QUOTA_EXCEEDED_ERR?W.details=C.ErrorDetails.BUFFER_FULL_ERROR:(g.appendError++,W.details=C.ErrorDetails.BUFFER_APPEND_ERROR,g.appendError>T.config.appendErrorMaxRetry&&(o.logger.error("[buffer-controller]: Failed "+T.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),W.fatal=!0)),T.trigger(h.Events.ERROR,W)}};y.append(F,A)},v.onBufferFlushing=function(n,d){var g=this,T=this.operationQueue,y=function(M){return{execute:g.removeExecutor.bind(g,M,d.startOffset,d.endOffset),onStart:function(){},onComplete:function(){g.hls.trigger(h.Events.BUFFER_FLUSHED,{type:M})},onError:function(x){o.logger.warn("[buffer-controller]: Failed to remove from "+M+" SourceBuffer",x)}}};d.type?T.append(y(d.type),d.type):this.getSourceBufferTypes().forEach(function(s){T.append(y(s),s)})},v.onFragParsed=function(n,d){var g=this,T=d.frag,y=d.part,s=[],M=y?y.elementaryStreams:T.elementaryStreams;M[i.ElementaryStreamTypes.AUDIOVIDEO]?s.push("audiovideo"):(M[i.ElementaryStreamTypes.AUDIO]&&s.push("audio"),M[i.ElementaryStreamTypes.VIDEO]&&s.push("video"));var A=function(){var E=self.performance.now();T.stats.buffering.end=E,y&&(y.stats.buffering.end=E);var w=y?y.stats:T.stats;g.hls.trigger(h.Events.FRAG_BUFFERED,{frag:T,part:y,stats:w,id:T.type})};s.length===0&&o.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+T.type+" level: "+T.level+" sn: "+T.sn),this.blockBuffers(A,s)},v.onFragChanged=function(n,d){this.flushBackBuffer()},v.onBufferEos=function(n,d){var g=this,T=this.getSourceBufferTypes().reduce(function(y,s){var M=g.sourceBuffer[s];return(!d.type||d.type===s)&&(M&&!M.ended&&(M.ended=!0,o.logger.log("[buffer-controller]: "+s+" sourceBuffer now EOS"))),y&&!!(!M||M.ended)},!0);T&&this.blockBuffers(function(){var y=g.mediaSource;if(!y||y.readyState!=="open")return;y.endOfStream()})},v.onLevelUpdated=function(n,d){var g=d.details;if(!g.fragments.length)return;this.details=g,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},v.flushBackBuffer=function(){var n=this.hls,d=this.details,g=this.media,T=this.sourceBuffer;if(!g||d===null)return;var y=this.getSourceBufferTypes();if(!y.length)return;var s=d.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(R.isFiniteNumber)(s)||s<0)return;var M=g.currentTime,A=d.levelTargetDuration,x=Math.max(s,A),E=Math.floor(M/A)*A-x;y.forEach(function(w){var _=T[w];if(_){var N=c.BufferHelper.getBuffered(_);N.length>0&&E>N.start(0)&&(n.trigger(h.Events.BACK_BUFFER_REACHED,{bufferEnd:E}),d.live&&n.trigger(h.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:E}),n.trigger(h.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:E,type:w}))}})},v.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,d=this.hls,g=this.media,T=this.mediaSource,y=n.fragments[0].start+n.totalduration,s=g.duration,M=Object(R.isFiniteNumber)(T.duration)?T.duration:0;n.live&&d.config.liveDurationInfinity?(o.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),T.duration=Infinity,this.updateSeekableRange(n)):(y>M&&y>s||!Object(R.isFiniteNumber)(s))&&(o.logger.log("[buffer-controller]: Updating Media Source duration to "+y.toFixed(3)),T.duration=y)},v.updateSeekableRange=function(n){var d=this.mediaSource,g=n.fragments,T=g.length;if(T&&n.live&&d!==null&&d!==void 0&&d.setLiveSeekableRange){var y=Math.max(0,g[0].start),s=Math.max(y,y+n.totalduration);d.setLiveSeekableRange(y,s)}},v.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,d=this.operationQueue,g=this.pendingTracks,T=Object.keys(g).length;if(T&&!n||T===2){this.createSourceBuffers(g),this.pendingTracks={};var y=this.getSourceBufferTypes();if(y.length===0){this.hls.trigger(h.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}y.forEach(function(s){d.executeNext(s)})}},v.createSourceBuffers=function(n){var d=this.sourceBuffer,g=this.mediaSource;if(!g)throw Error("createSourceBuffers called when mediaSource was null");var T=0;for(var y in n)if(!d[y]){var s=n[y];if(!s)throw Error("source buffer exists for track "+y+", however track does not");var M=s.levelCodec||s.codec,A=s.container+";codecs="+M;o.logger.log("[buffer-controller]: creating sourceBuffer("+A+")");try{var x=d[y]=g.addSourceBuffer(A),E=y;this.addBufferListener(E,"updatestart",this._onSBUpdateStart),this.addBufferListener(E,"updateend",this._onSBUpdateEnd),this.addBufferListener(E,"error",this._onSBUpdateError),this.tracks[y]={buffer:x,codec:M,container:s.container,levelCodec:s.levelCodec,id:s.id},T++}catch(w){o.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+w.message),this.hls.trigger(h.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:w,mimeType:A})}}T&&this.hls.trigger(h.Events.BUFFER_CREATED,{tracks:this.tracks})},v._onSBUpdateStart=function(n){var d=this.operationQueue,g=d.current(n);g.onStart()},v._onSBUpdateEnd=function(n){var d=this.operationQueue,g=d.current(n);g.onComplete(),d.shiftAndExecuteNext(n)},v._onSBUpdateError=function(n,d){o.logger.error("[buffer-controller]: "+n+" SourceBuffer error",d),this.hls.trigger(h.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var g=this.operationQueue.current(n);g&&g.onError(d)},v.removeExecutor=function(n,d,g){var T=this.media,y=this.mediaSource,s=this.operationQueue,M=this.sourceBuffer,A=M[n];if(!T||!y||!A){o.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),s.shiftAndExecuteNext(n);return}var x=Object(R.isFiniteNumber)(T.duration)?T.duration:Infinity,E=Object(R.isFiniteNumber)(y.duration)?y.duration:Infinity,w=Math.max(0,d),_=Math.min(g,x,E);_>w?(o.logger.log("[buffer-controller]: Removing ["+w+","+_+"] from the "+n+" SourceBuffer"),console.assert(!A.updating,n+" sourceBuffer must not be updating"),A.remove(w,_)):s.shiftAndExecuteNext(n)},v.appendExecutor=function(n,d){var g=this.operationQueue,T=this.sourceBuffer,y=T[d];if(!y){o.logger.warn("[buffer-controller]: Attempting to append to the "+d+" SourceBuffer, but it does not exist"),g.shiftAndExecuteNext(d);return}y.ended=!1,console.assert(!y.updating,d+" sourceBuffer must not be updating"),y.appendBuffer(n)},v.blockBuffers=function(n,d){var g=this;if(d===void 0&&(d=this.getSourceBufferTypes()),!d.length){o.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(n);return}var T=this.operationQueue,y=d.map(function(s){return T.appendBlocker(s)});Promise.all(y).then(function(){n(),d.forEach(function(s){var M=g.sourceBuffer[s];(!M||!M.updating)&&T.shiftAndExecuteNext(s)})})},v.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},v.addBufferListener=function(n,d,g){var T=this.sourceBuffer[n];if(!T)return;var y=g.bind(this,n);this.listeners[n].push({event:d,listener:y}),T.addEventListener(d,y)},v.removeBufferListeners=function(n){var d=this.sourceBuffer[n];if(!d)return;this.listeners[n].forEach(function(g){d.removeEventListener(g.event,g.listener)})},b}()},"./src/controller/buffer-operation-queue.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"default",function(){return h});var R=S("./src/utils/logger.ts"),h=function(){function o(c){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=c}var C=o.prototype;return C.append=function(a,i){var r=this.queues[i];r.push(a),r.length===1&&this.buffers[i]&&this.executeNext(i)},C.insertAbort=function(a,i){var r=this.queues[i];r.unshift(a),this.executeNext(i)},C.appendBlocker=function(a){var i,r=new Promise(function(p){i=p}),l={execute:i,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(l,a),r},C.executeNext=function(a){var i=this.buffers,r=this.queues,l=i[a],p=r[a];if(p.length){var f=p[0];try{f.execute()}catch(b){R.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),f.onError(b),(!l||!l.updating)&&(p.shift(),this.executeNext(a))}}},C.shiftAndExecuteNext=function(a){this.queues[a].shift(),this.executeNext(a)},C.current=function(a){return this.queues[a][0]},o}()},"./src/controller/cap-level-controller.ts":function(L,u,S){"use strict";S.r(u);var R=S("./src/events.ts");function h(c,a){for(var i=0;i0&&this.mediaWidth>0){var r=this.hls.levels;if(r.length){var l=this.hls;l.autoLevelCapping=this.getMaxLevel(r.length-1),l.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=l.autoLevelCapping}}},a.getMaxLevel=function(r){var l=this,p=this.hls.levels;if(!p.length)return-1;var f=p.filter(function(b,v){return c.isLevelAllowed(v,l.restrictedLevels)&&v<=r});return this.clientRect=null,c.getMaxLevelByMediaSize(f,this.mediaWidth,this.mediaHeight)},a.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()},a.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},a.getDimensions=function(){if(this.clientRect)return this.clientRect;var r=this.media,l={width:0,height:0};if(r){var p=r.getBoundingClientRect();l.width=p.width,l.height=p.height,!l.width&&!l.height&&(l.width=p.right-p.left||r.width||0,l.height=p.bottom-p.top||r.height||0)}return this.clientRect=l,l},c.isLevelAllowed=function(r,l){return l===void 0&&(l=[]),l.indexOf(r)===-1},c.getMaxLevelByMediaSize=function(r,l,p){if(!r||!r.length)return-1;for(var f=function(d,g){return g?d.width!==g.width||d.height!==g.height:!0},b=r.length-1,v=0;v=l||m.height>=p)&&f(m,r[v+1])){b=v;break}}return b},o(c,[{key:"mediaWidth",get:function(){return this.getDimensions().width*c.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*c.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var r=1;try{r=self.devicePixelRatio}catch(l){}return r}}]),c}();u.default=C},"./src/controller/cmcd-controller.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"default",function(){return f});var R=S("./src/events.ts"),h=S("./src/types/cmcd.ts"),o=S("./src/utils/buffer-helper.ts"),C=S("./src/utils/logger.ts");function c(b,v){for(var m=0;m=b.length?{done:!0}:{done:!1,value:b[n++]}}}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 r(b,v){if(!b)return;if(typeof b=="string")return l(b,v);var m=Object.prototype.toString.call(b).slice(8,-1);if(m==="Object"&&b.constructor&&(m=b.constructor.name),m==="Map"||m==="Set")return Array.from(b);if(m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m))return l(b,v)}function l(b,v){(v==null||v>b.length)&&(v=b.length);for(var m=0,n=new Array(v);md&&(d=s.bitrate)}return d>0?d:NaN},v.getBufferLength=function(n){var d=this.hls.media,g=n===h.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!g||!d)return NaN;var T=o.BufferHelper.bufferInfo(g,d.currentTime,this.config.maxBufferHole);return T.len*1e3},v.createPlaylistLoader=function(){var n=this.config.pLoader,d=this.applyPlaylistData,g=n||this.config.loader;return function(){function T(s){this.loader=void 0,this.loader=new g(s)}var y=T.prototype;return y.destroy=function(){this.loader.destroy()},y.abort=function(){this.loader.abort()},y.load=function(M,A,x){d(M),this.loader.load(M,A,x)},a(T,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),T}()},v.createFragmentLoader=function(){var n=this.config.fLoader,d=this.applyFragmentData,g=n||this.config.loader;return function(){function T(s){this.loader=void 0,this.loader=new g(s)}var y=T.prototype;return y.destroy=function(){this.loader.destroy()},y.abort=function(){this.loader.abort()},y.load=function(M,A,x){d(M),this.loader.load(M,A,x)},a(T,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),T}()},b.uuid=function(){var n=URL.createObjectURL(new Blob),d=n.toString();return URL.revokeObjectURL(n),d.substr(d.lastIndexOf("/")+1)},b.serialize=function(n){for(var d=[],g=function(H){return!Number.isNaN(H)&&H!=null&&H!==""&&H!==!1},T=function(H){return Math.round(H)},y=function(H){return T(H/100)*100},s=function(H){return encodeURIComponent(H)},M={br:T,d:T,bl:y,dl:y,mtp:y,nor:s,rtp:y,tb:T},A=Object.keys(n||{}).sort(),x=i(A),E;!(E=x()).done;){var w=E.value,_=n[w];if(!g(_))continue;if(w==="v"&&_===1)continue;if(w=="pr"&&_===1)continue;var N=M[w];N&&(_=N(_));var j=typeof _,k=void 0;w==="ot"||w==="sf"||w==="st"?k=w+"="+_:j==="boolean"?k=w:j==="number"?k=w+"="+_:k=w+"="+JSON.stringify(_),d.push(k)}return d.join(",")},b.toHeaders=function(n){for(var d=Object.keys(n),g={},T=["Object","Request","Session","Status"],y=[{},{},{},{}],s={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},M=0,A=d;Mi){this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var s=i-this._requestLicenseFailureCount+1;o.logger.warn("Retrying license request, "+s+" attempts left"),this._requestLicense(d,g)}break}},b._generateLicenseRequestChallenge=function(m,n){switch(m.mediaKeySystemDomain){case C.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+m.mediaKeySystemDomain)},b._requestLicense=function(m,n){o.logger.log("Requesting content license for key-system");var d=this._mediaKeysList[0];if(!d){o.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var g=this.getLicenseServerUrl(d.mediaKeySystemDomain),T=this._createLicenseXhr(g,m,n);o.logger.log("Sending license request to URL: "+g);var y=this._generateLicenseRequestChallenge(d,m);T.send(y)}catch(s){o.logger.error("Failure requesting DRM license: "+s),this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},b.onMediaAttached=function(m,n){if(!this._emeEnabled)return;var d=n.media;this._media=d,d.addEventListener("encrypted",this._onMediaEncrypted)},b.onMediaDetached=function(){var m=this._media,n=this._mediaKeysList;if(!m)return;m.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(n.map(function(d){if(d.mediaKeysSession)return d.mediaKeysSession.close().catch(function(){})})).then(function(){return m.setMediaKeys(null)}).catch(function(){})},b.onManifestParsed=function(m,n){if(!this._emeEnabled)return;var d=n.levels.map(function(T){return T.audioCodec}).filter(function(T){return!!T}),g=n.levels.map(function(T){return T.videoCodec}).filter(function(T){return!!T});this._attemptKeySystemAccess(C.KeySystems.WIDEVINE,d,g)},a(f,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),f}();u.default=p},"./src/controller/fps-controller.ts":function(L,u,S){"use strict";S.r(u);var R=S("./src/events.ts"),h=S("./src/utils/logger.ts"),o=function(){function C(a){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=a,this.registerListeners()}var c=C.prototype;return c.setStreamController=function(i){this.streamController=i},c.registerListeners=function(){this.hls.on(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},c.unregisterListeners=function(){this.hls.off(R.Events.MEDIA_ATTACHING,this.onMediaAttaching)},c.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},c.onMediaAttaching=function(i,r){var l=this.hls.config;if(l.capLevelOnFPSDrop){var p=r.media instanceof self.HTMLVideoElement?r.media:null;this.media=p,p&&typeof p.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),l.fpsDroppedMonitoringPeriod)}},c.checkFPS=function(i,r,l){var p=performance.now();if(r){if(this.lastTime){var f=p-this.lastTime,b=l-this.lastDroppedFrames,v=r-this.lastDecodedFrames,m=1e3*b/f,n=this.hls;if(n.trigger(R.Events.FPS_DROP,{currentDropped:b,currentDecoded:v,totalDroppedFrames:l}),m>0&&b>n.config.fpsDroppedMonitoringThreshold*v){var d=n.currentLevel;h.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+d),d>0&&(n.autoLevelCapping===-1||n.autoLevelCapping>=d)&&(d=d-1,n.trigger(R.Events.FPS_DROP_LEVEL_CAPPING,{level:d,droppedLevel:n.currentLevel}),n.autoLevelCapping=d,this.streamController.nextLevelSwitch())}}this.lastTime=p,this.lastDroppedFrames=l,this.lastDecodedFrames=r}},c.checkFPSInterval=function(){var i=this.media;if(i)if(this.isVideoPlaybackQualityAvailable){var r=i.getVideoPlaybackQuality();this.checkFPS(i,r.totalVideoFrames,r.droppedVideoFrames)}else this.checkFPS(i,i.webkitDecodedFrameCount,i.webkitDroppedFrameCount)},C}();u.default=o},"./src/controller/fragment-finders.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"findFragmentByPDT",function(){return o}),S.d(u,"findFragmentByPTS",function(){return C}),S.d(u,"fragmentWithinToleranceTest",function(){return c}),S.d(u,"pdtWithinToleranceTest",function(){return a}),S.d(u,"findFragWithCC",function(){return i});var R=S("./src/polyfills/number.ts"),h=S("./src/utils/binary-search.ts");function o(r,l,p){if(l===null||!Array.isArray(r)||!r.length||!Object(R.isFiniteNumber)(l))return null;var f=r[0].programDateTime;if(l<(f||0))return null;var b=r[r.length-1].endProgramDateTime;if(l>=(b||0))return null;p=p||0;for(var v=0;vr&&p.start?-1:0}function a(r,l,p){var f=Math.min(l,p.duration+(p.deltaPTS?p.deltaPTS:0))*1e3,b=p.endProgramDateTime||0;return b-f>r}function i(r,l){return h.default.search(r,function(p){return p.ccl?-1:0})}},"./src/controller/fragment-tracker.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"FragmentState",function(){return o}),S.d(u,"FragmentTracker",function(){return C});var R=S("./src/events.ts"),h=S("./src/types/loader.ts"),o;(function(i){i.NOT_LOADED="NOT_LOADED",i.BACKTRACKED="BACKTRACKED",i.APPENDING="APPENDING",i.PARTIAL="PARTIAL",i.OK="OK"})(o||(o={}));var C=function(){function i(l){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=l,this._registerListeners()}var r=i.prototype;return r._registerListeners=function(){var p=this.hls;p.on(R.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.on(R.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.on(R.Events.FRAG_LOADED,this.onFragLoaded,this)},r._unregisterListeners=function(){var p=this.hls;p.off(R.Events.BUFFER_APPENDED,this.onBufferAppended,this),p.off(R.Events.FRAG_BUFFERED,this.onFragBuffered,this),p.off(R.Events.FRAG_LOADED,this.onFragLoaded,this)},r.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},r.getAppendedFrag=function(p,f){if(f===h.PlaylistLevelType.MAIN){var b=this.activeFragment,v=this.activeParts;if(!b)return null;if(v)for(var m=v.length;m--;){var n=v[m],d=n?n.end:b.appendedPTS;if(n.start<=p&&d!==void 0&&p<=d)return m>9&&(this.activeParts=v.slice(m-9)),n}else if(b.start<=p&&b.appendedPTS!==void 0&&p<=b.appendedPTS)return b}return this.getBufferedFrag(p,f)},r.getBufferedFrag=function(p,f){for(var b=this.fragments,v=Object.keys(b),m=v.length;m--;){var n=b[v[m]];if((n==null?void 0:n.body.type)===f&&n.buffered){var d=n.body;if(d.start<=p&&p<=d.end)return d}}return null},r.detectEvictedFragments=function(p,f,b){var v=this;Object.keys(this.fragments).forEach(function(m){var n=v.fragments[m];if(!n)return;if(!n.buffered){n.body.type===b&&v.removeFragment(n.body);return}var d=n.range[p];if(!d)return;d.time.some(function(g){var T=!v.isTimeBuffered(g.startPTS,g.endPTS,f);return T&&v.removeFragment(n.body),T})})},r.detectPartialFragments=function(p){var f=this,b=this.timeRanges,v=p.frag,m=p.part;if(!b||v.sn==="initSegment")return;var n=a(v),d=this.fragments[n];if(!d)return;Object.keys(b).forEach(function(g){var T=v.elementaryStreams[g];if(!T)return;var y=b[g],s=m!==null||T.partial===!0;d.range[g]=f.getBufferedTimes(v,m,s,y)}),d.backtrack=d.loaded=null,Object.keys(d.range).length?d.buffered=!0:this.removeFragment(d.body)},r.fragBuffered=function(p){var f=a(p),b=this.fragments[f];b&&(b.backtrack=b.loaded=null,b.buffered=!0)},r.getBufferedTimes=function(p,f,b,v){for(var m={time:[],partial:b},n=f?f.start:p.start,d=f?f.end:p.end,g=p.minEndPTS||d,T=p.maxStartPTS||n,y=0;y=s&&g<=M){m.time.push({startPTS:Math.max(n,v.start(y)),endPTS:Math.min(d,v.end(y))});break}else if(ns)m.partial=!0,m.time.push({startPTS:Math.max(n,v.start(y)),endPTS:Math.min(d,v.end(y))});else if(d<=s)break}return m},r.getPartialFragment=function(p){var f=null,b,v,m,n=0,d=this.bufferPadding,g=this.fragments;return Object.keys(g).forEach(function(T){var y=g[T];if(!y)return;c(y)&&(v=y.body.start-d,m=y.body.end+d,p>=v&&p<=m&&(b=Math.min(p-v,m-p),n<=b&&(f=y.body,n=b)))}),f},r.getState=function(p){var f=a(p),b=this.fragments[f];return b?b.buffered?c(b)?o.PARTIAL:o.OK:b.backtrack?o.BACKTRACKED:o.APPENDING:o.NOT_LOADED},r.backtrack=function(p,f){var b=a(p),v=this.fragments[b];if(!v||v.backtrack)return null;var m=v.backtrack=f||v.loaded;return v.loaded=null,m},r.getBacktrackData=function(p){var f=a(p),b=this.fragments[f];if(b){var v,m=b.backtrack;if(m!=null&&(v=m.payload)!==null&&v!==void 0&&v.byteLength)return m;this.removeFragment(p)}return null},r.isTimeBuffered=function(p,f,b){for(var v,m,n=0;n=v&&f<=m)return!0;if(f<=v)return!1}return!1},r.onFragLoaded=function(p,f){var b=f.frag,v=f.part;if(b.sn==="initSegment"||b.bitrateTest||v)return;var m=a(b);this.fragments[m]={body:b,loaded:f,backtrack:null,buffered:!1,range:Object.create(null)}},r.onBufferAppended=function(p,f){var b=this,v=f.frag,m=f.part,n=f.timeRanges;if(v.type===h.PlaylistLevelType.MAIN)if(this.activeFragment=v,m){var d=this.activeParts;d||(this.activeParts=d=[]),d.push(m)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(g){var T=n[g];if(b.detectEvictedFragments(g,T),!m)for(var y=0;yp&&v.removeFragment(d)}})},r.removeFragment=function(p){var f=a(p);p.stats.loaded=0,p.clearElementaryStreamInfo(),delete this.fragments[f]},r.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},i}();function c(i){var r,l;return i.buffered&&(((r=i.range.video)===null||r===void 0?void 0:r.partial)||((l=i.range.audio)===null||l===void 0?void 0:l.partial))}function a(i){return i.type+"_"+i.level+"_"+i.urlId+"_"+i.sn}},"./src/controller/gap-controller.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"STALL_MINIMUM_DURATION_MS",function(){return c}),S.d(u,"MAX_START_GAP_JUMP",function(){return a}),S.d(u,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return i}),S.d(u,"SKIP_BUFFER_RANGE_START",function(){return r}),S.d(u,"default",function(){return l});var R=S("./src/utils/buffer-helper.ts"),h=S("./src/errors.ts"),o=S("./src/events.ts"),C=S("./src/utils/logger.ts"),c=250,a=2,i=.1,r=.05,l=function(){function p(b,v,m,n){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=b,this.media=v,this.fragmentTracker=m,this.hls=n}var f=p.prototype;return f.destroy=function(){this.hls=this.fragmentTracker=this.media=null},f.poll=function(v){var m=this.config,n=this.media,d=this.stalled,g=n.currentTime,T=n.seeking,y=this.seeking&&!T,s=!this.seeking&&T;if(this.seeking=T,g!==v){if(this.moved=!0,d!==null){if(this.stallReported){var M=self.performance.now()-d;C.logger.warn("playback not stuck anymore @"+g+", after "+Math.round(M)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((s||y)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!R.BufferHelper.getBuffered(n).length)return;var A=R.BufferHelper.bufferInfo(n,g,0),x=A.len>0,E=A.nextStart||0;if(!x&&!E)return;if(T){var w=A.len>a,_=!E||E-g>a&&!this.fragmentTracker.getPartialFragment(g);if(w||_)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var N,j=Math.max(E,A.start||0)-g,k=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,z=k==null||((N=k.details)===null||N===void 0)?void 0:N.live,H=z?k.details.targetduration*2:a;if(j>0&&j<=H){this._trySkipBufferHole(null);return}}var F=self.performance.now();if(d===null){this.stalled=F;return}var G=F-d;!T&&G>=c&&this._reportStall(A.len);var B=R.BufferHelper.bufferInfo(n,g,m.maxBufferHole);this._tryFixBufferStall(B,G)},f._tryFixBufferStall=function(v,m){var n=this.config,d=this.fragmentTracker,g=this.media,T=g.currentTime,y=d.getPartialFragment(T);if(y){var s=this._trySkipBufferHole(y);if(s)return}v.len>n.maxBufferHole&&m>n.highBufferWatchdogPeriod*1e3&&(C.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},f._reportStall=function(v){var m=this.hls,n=this.media,d=this.stallReported;d||(this.stallReported=!0,C.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+v+")"),m.trigger(o.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:v}))},f._trySkipBufferHole=function(v){for(var m=this.config,n=this.hls,d=this.media,g=d.currentTime,T=0,y=R.BufferHelper.getBuffered(d),s=0;s=T&&g.05&&this.forwardBufferLength>1){var s=Math.min(2,Math.max(1,n)),M=Math.round(2/(1+Math.exp(-.75*g-this.edgeStalled))*20)/20;p.playbackRate=Math.min(s,Math.max(1,M))}else p.playbackRate!==1&&p.playbackRate!==0&&(p.playbackRate=1)},r.estimateLiveEdge=function(){var p=this.levelDetails;return p===null?null:p.edge+p.age},r.computeLatency=function(){var p=this.estimateLiveEdge();return p===null?null:p-this.currentTime},c(i,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var p=this.config,f=this.levelDetails;return p.liveMaxLatencyDuration!==void 0?p.liveMaxLatencyDuration:f?p.liveMaxLatencyDurationCount*f.targetduration:0}},{key:"targetLatency",get:function(){var p=this.levelDetails;if(p===null)return null;var f=p.holdBack,b=p.partHoldBack,v=p.targetduration,m=this.config,n=m.liveSyncDuration,d=m.liveSyncDurationCount,g=m.lowLatencyMode,T=this.hls.userConfig,y=g&&b||f;(T.liveSyncDuration||T.liveSyncDurationCount||y===0)&&(y=n!==void 0?n:d*v);var s=v,M=1;return y+Math.min(this.stallCount*M,s)}},{key:"liveSyncPosition",get:function(){var p=this.estimateLiveEdge(),f=this.targetLatency,b=this.levelDetails;if(p===null||f===null||b===null)return null;var v=b.edge,m=p-f-this.edgeStalled,n=v-b.totalduration,d=v-(this.config.lowLatencyMode&&b.partTarget||b.targetduration);return Math.min(Math.max(n,m),d)}},{key:"drift",get:function(){var p=this.levelDetails;return p===null?1:p.drift}},{key:"edgeStalled",get:function(){var p=this.levelDetails;if(p===null)return 0;var f=(this.config.lowLatencyMode&&p.partTarget||p.targetduration)*3;return Math.max(p.age-f,0)}},{key:"forwardBufferLength",get:function(){var p=this.media,f=this.levelDetails;if(!p||!f)return 0;var b=p.buffered.length;return b?p.buffered.end(b-1):f.edge-this.currentTime}}]),i}()},"./src/controller/level-controller.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"default",function(){return m});var R=S("./src/types/level.ts"),h=S("./src/events.ts"),o=S("./src/errors.ts"),C=S("./src/utils/codecs.ts"),c=S("./src/controller/level-helper.ts"),a=S("./src/controller/base-playlist-controller.ts"),i=S("./src/types/loader.ts");function r(){return r=Object.assign||function(n){for(var d=1;d0){E=M[0].bitrate,M.sort(function(G,B){return G.bitrate-B.bitrate}),this._levels=M;for(var z=0;zthis.hls.config.fragLoadingMaxRetry&&(w=s.frag.level)):w=s.frag.level}break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:M&&(M.deliveryDirectives&&(E=!1),w=M.level),x=!0;break;case o.ErrorDetails.REMUX_ALLOC_ERROR:w=s.level,x=!0;break}w!==void 0&&this.recoverLevel(s,w,x,E)},g.recoverLevel=function(y,s,M,A){var x=y.details,E=this._levels[s];if(E.loadError++,M){var w=this.retryLoadingOrFail(y);if(w)y.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(A){var _=E.url.length;if(_>1&&E.loadError<_)y.levelRetry=!0,this.redundantFailover(s);else if(this.manualLevelIndex===-1){var N=s===0?this._levels.length-1:s-1;this.currentLevelIndex!==N&&this._levels[N].loadError===0&&(this.warn(x+": switch to "+N),y.levelRetry=!0,this.hls.nextAutoLevel=N)}}},g.redundantFailover=function(y){var s=this._levels[y],M=s.url.length;if(M>1){var A=(s.urlId+1)%M;this.warn("Switching to redundant URL-id "+A),this._levels.forEach(function(x){x.urlId=A}),this.level=y}},g.onFragLoaded=function(y,s){var M=s.frag;if(M!==void 0&&M.type===i.PlaylistLevelType.MAIN){var A=this._levels[M.level];A!==void 0&&(A.fragmentError=0,A.loadError=0)}},g.onLevelLoaded=function(y,s){var M,A=s.level,x=s.details,E=this._levels[A];if(!E){var w;this.warn("Invalid level index "+A),(w=s.deliveryDirectives)!==null&&w!==void 0&&w.skip&&(x.deltaUpdateFailed=!0);return}A===this.currentLevelIndex?(E.fragmentError===0&&(E.loadError=0,this.retryCount=0),this.playlistLoaded(A,s,E.details)):(M=s.deliveryDirectives)!==null&&M!==void 0&&M.skip&&(x.deltaUpdateFailed=!0)},g.onAudioTrackSwitched=function(y,s){var M=this.hls.levels[this.currentLevelIndex];if(!M)return;if(M.audioGroupIds){for(var A=-1,x=this.hls.audioTracks[s.id].groupId,E=0;E0){var A=M.urlId,x=M.url[A];if(y)try{x=y.addDirectives(x)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("Attempt loading level index "+s+(y?" at sn "+y.msn+" part "+y.part:"")+" with URL-id "+A+" "+x),this.clearTimer(),this.hls.trigger(h.Events.LEVEL_LOADING,{url:x,level:s,id:A,deliveryDirectives:y||null})}},g.removeLevel=function(y,s){var M=function(E,w){return w!==s},A=this._levels.filter(function(x,E){return E!==y?!0:x.url.length>1&&s!==void 0?(x.url=x.url.filter(M),x.audioGroupIds&&(x.audioGroupIds=x.audioGroupIds.filter(M)),x.textGroupIds&&(x.textGroupIds=x.textGroupIds.filter(M)),x.urlId=0,!0):!1}).map(function(x,E){var w=x.details;return w!=null&&w.fragments&&w.fragments.forEach(function(_){_.level=E}),x});this._levels=A,this.hls.trigger(h.Events.LEVELS_UPDATED,{levels:A})},p(d,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(y){var s,M=this._levels;if(M.length===0)return;if(this.currentLevelIndex===y&&(s=M[y])!==null&&s!==void 0&&s.details)return;if(y<0||y>=M.length){var A=y<0;if(this.hls.trigger(h.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.LEVEL_SWITCH_ERROR,level:y,fatal:A,reason:"invalid level idx"}),A)return;y=Math.min(y,M.length-1)}this.clearTimer();var x=this.currentLevelIndex,E=M[x],w=M[y];this.log("switching to level "+y+" from "+x),this.currentLevelIndex=y;var _=r({},w,{level:y,maxBitrate:w.maxBitrate,uri:w.uri,urlId:w.urlId});delete _._urlId,this.hls.trigger(h.Events.LEVEL_SWITCHING,_);var N=w.details;if(!N||N.live){var j=this.switchParams(w.uri,E==null?void 0:E.details);this.loadPlaylist(j)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(y){this.manualLevelIndex=y,this._startLevel===void 0&&(this._startLevel=y),y!==-1&&(this.level=y)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(y){this._firstLevel=y}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var y=this.hls.config.startLevel;return y!==void 0?y:this._firstLevel}else return this._startLevel},set:function(y){this._startLevel=y}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(y){this.level=y,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=y)}}]),d}(a.default)},"./src/controller/level-helper.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"addGroupId",function(){return o}),S.d(u,"assignTrackIdsByGroup",function(){return C}),S.d(u,"updatePTS",function(){return c}),S.d(u,"updateFragPTSDTS",function(){return i}),S.d(u,"mergeDetails",function(){return r}),S.d(u,"mapPartIntersection",function(){return l}),S.d(u,"mapFragmentIntersection",function(){return p}),S.d(u,"adjustSliding",function(){return f}),S.d(u,"addSliding",function(){return b}),S.d(u,"computeReloadInterval",function(){return v}),S.d(u,"getFragmentWithSN",function(){return m}),S.d(u,"getPartWith",function(){return n});var R=S("./src/polyfills/number.ts"),h=S("./src/utils/logger.ts");function o(d,g,T){switch(g){case"audio":d.audioGroupIds||(d.audioGroupIds=[]),d.audioGroupIds.push(T);break;case"text":d.textGroupIds||(d.textGroupIds=[]),d.textGroupIds.push(T);break}}function C(d){var g={};d.forEach(function(T){var y=T.groupId||"";T.id=g[y]=g[y]||0,g[y]++})}function c(d,g,T){var y=d[g],s=d[T];a(y,s)}function a(d,g){var T=g.startPTS;if(Object(R.isFiniteNumber)(T)){var y=0,s;g.sn>d.sn?(y=T-d.start,s=d):(y=d.start-T,s=g),s.duration!==y&&(s.duration=y)}else if(g.sn>d.sn){var M=d.cc===g.cc;M&&d.minEndPTS?g.start=d.start+(d.minEndPTS-d.start):g.start=d.start+d.duration}else g.start=Math.max(d.start-g.duration,0)}function i(d,g,T,y,s,M){var A=y-T;A<=0&&(h.logger.warn("Fragment should have a positive duration",g),y=T+g.duration,M=s+g.duration);var x=T,E=y,w=g.startPTS,_=g.endPTS;if(Object(R.isFiniteNumber)(w)){var N=Math.abs(w-T);Object(R.isFiniteNumber)(g.deltaPTS)?g.deltaPTS=Math.max(N,g.deltaPTS):g.deltaPTS=N,x=Math.max(T,w),T=Math.min(T,w),s=Math.min(s,g.startDTS),E=Math.min(y,_),y=Math.max(y,_),M=Math.max(M,g.endDTS)}g.duration=y-T;var j=T-g.start;g.appendedPTS=y,g.start=g.startPTS=T,g.maxStartPTS=x,g.startDTS=s,g.endPTS=y,g.minEndPTS=E,g.endDTS=M;var k=g.sn;if(!d||kd.endSN)return 0;var z,H=k-d.startSN,F=d.fragments;for(F[H]=g,z=H;z>0;z--)a(F[z],F[z-1]);for(z=H;z=0;s--){var M=y[s].initSegment;if(M){T=M;break}}d.fragmentHint&&delete d.fragmentHint.endPTS;var A=0,x;if(p(d,g,function(z,H){z.relurl&&(A=z.cc-H.cc),Object(R.isFiniteNumber)(z.startPTS)&&Object(R.isFiniteNumber)(z.endPTS)&&(H.start=H.startPTS=z.startPTS,H.startDTS=z.startDTS,H.appendedPTS=z.appendedPTS,H.maxStartPTS=z.maxStartPTS,H.endPTS=z.endPTS,H.endDTS=z.endDTS,H.minEndPTS=z.minEndPTS,H.duration=z.endPTS-z.startPTS,H.duration&&(x=H),g.PTSKnown=g.alignedSliding=!0),H.elementaryStreams=z.elementaryStreams,H.loader=z.loader,H.stats=z.stats,H.urlId=z.urlId,z.initSegment&&(H.initSegment=z.initSegment,T=z.initSegment)}),T){var E=g.fragmentHint?g.fragments.concat(g.fragmentHint):g.fragments;E.forEach(function(z){var H;(!z.initSegment||z.initSegment.relurl===((H=T)===null||H===void 0?void 0:H.relurl))&&(z.initSegment=T)})}if(g.skippedSegments&&(g.deltaUpdateFailed=g.fragments.some(function(z){return!z}),g.deltaUpdateFailed)){h.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var w=g.skippedSegments;w--;)g.fragments.shift();g.startSN=g.fragments[0].sn,g.startCC=g.fragments[0].cc}var _=g.fragments;if(A){h.logger.warn("discontinuity sliding from playlist, take drift into account");for(var N=0;N<_.length;N++)_[N].cc+=A}g.skippedSegments&&(g.startCC=g.fragments[0].cc),l(d.partList,g.partList,function(z,H){H.elementaryStreams=z.elementaryStreams,H.stats=z.stats}),x?i(g,x,x.startPTS,x.endPTS,x.startDTS,x.endDTS):f(d,g),_.length&&(g.totalduration=g.edge-_[0].start),g.driftStartTime=d.driftStartTime,g.driftStart=d.driftStart;var j=g.advancedDateTime;if(g.advanced&&j){var k=g.edge;g.driftStart||(g.driftStartTime=j,g.driftStart=k),g.driftEndTime=j,g.driftEnd=k}else g.driftEndTime=d.driftEndTime,g.driftEnd=d.driftEnd,g.advancedDateTime=d.advancedDateTime}function l(d,g,T){if(d&&g)for(var y=0,s=0,M=d.length;s<=M;s++){var A=d[s],x=g[s+y];A&&x&&A.index===x.index&&A.fragment.sn===x.fragment.sn?T(A,x):y--}}function p(d,g,T){for(var y=g.skippedSegments,s=Math.max(d.startSN,g.startSN)-g.startSN,M=(d.fragmentHint?1:0)+(y?g.endSN:Math.min(d.endSN,g.endSN))-g.startSN,A=g.startSN-d.startSN,x=g.fragmentHint?g.fragments.concat(g.fragmentHint):g.fragments,E=d.fragmentHint?d.fragments.concat(d.fragmentHint):d.fragments,w=s;w<=M;w++){var _=E[A+w],N=x[w];y&&!N&&w=y.length)return;b(g,y[T].start)}function b(d,g){if(g){for(var T=d.fragments,y=d.skippedSegments;y0&&s0&&E===-1&&(this.log("Override startPosition with lastCurrentTime @"+w.toFixed(3)),E=w),this.state=h.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()}else this._forceStartLoad=!0,this.state=h.State.STOPPED},A.stopLoad=function(){this._forceStartLoad=!1,s.prototype.stopLoad.call(this)},A.doTick=function(){switch(this.state){case h.State.IDLE:this.doTickIdle();break;case h.State.WAITING_LEVEL:{var E,w=this.levels,_=this.level,N=w==null||((E=w[_])===null||E===void 0)?void 0:E.details;if(N&&(!N.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(N))break;this.state=h.State.IDLE;break}break}case h.State.FRAG_LOADING_WAITING_RETRY:{var j,k=self.performance.now(),z=this.retryDate;(!z||k>=z||(j=this.media)!==null&&j!==void 0&&j.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=h.State.IDLE)}break;default:break}this.onTickEnd()},A.onTickEnd=function(){s.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},A.doTickIdle=function(){var E,w,_=this.hls,N=this.levelLastLoaded,j=this.levels,k=this.media,z=_.config,H=_.nextLoadLevel;if(N===null||!k&&(this.startFragRequested||!z.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!j||!j[H])return;var F=j[H];this.level=_.nextLoadLevel=H;var G=F.details;if(!G||this.state===h.State.WAITING_LEVEL||G.live&&this.levelLastLoaded!==H){this.state=h.State.WAITING_LEVEL;return}var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:k,i.PlaylistLevelType.MAIN);if(B===null)return;var W=B.len,K=this.getMaxBufferLength(F.maxBitrate);if(W>=K)return;if(this._streamEnded(B,G)){var q={};this.altAudio&&(q.type="video"),this.hls.trigger(C.Events.BUFFER_EOS,q),this.state=h.State.ENDED;return}var re=B.end,ee=this.getNextFragment(re,G);if(this.couldBacktrack&&!this.fragPrevious&&ee&&ee.sn!=="initSegment"){var Ce=ee.sn-G.startSN;Ce>1&&(ee=G.fragments[Ce-1],this.fragmentTracker.removeFragment(ee))}if(ee&&this.fragmentTracker.getState(ee)===a.FragmentState.OK&&this.nextLoadPosition>re){var xe=this.audioOnly&&!this.altAudio?r.ElementaryStreamTypes.AUDIO:r.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(k,xe,i.PlaylistLevelType.MAIN),ee=this.getNextFragment(this.nextLoadPosition,G)}if(!ee)return;ee.initSegment&&!ee.initSegment.data&&!this.bitrateTest&&(ee=ee.initSegment),((E=ee.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((w=ee.decryptdata)!==null&&w!==void 0&&w.key)?this.loadKey(ee,G):this.loadFragment(ee,G,re)},A.loadFragment=function(E,w,_){var N,j=this.fragmentTracker.getState(E);if(this.fragCurrent=E,j===a.FragmentState.BACKTRACKED){var k=this.fragmentTracker.getBacktrackData(E);if(k){this._handleFragmentLoadProgress(k),this._handleFragmentLoadComplete(k);return}else j=a.FragmentState.NOT_LOADED}j===a.FragmentState.NOT_LOADED||j===a.FragmentState.PARTIAL?E.sn==="initSegment"?this._loadInitSegment(E):this.bitrateTest?(E.bitrateTest=!0,this.log("Fragment "+E.sn+" of level "+E.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(E)):(this.startFragRequested=!0,s.prototype.loadFragment.call(this,E,w,_)):j===a.FragmentState.APPENDING?this.reduceMaxBufferLength(E.duration)&&this.fragmentTracker.removeFragment(E):((N=this.media)===null||N===void 0?void 0:N.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},A.getAppendedFrag=function(E){var w=this.fragmentTracker.getAppendedFrag(E,i.PlaylistLevelType.MAIN);return w&&"fragment"in w?w.fragment:w},A.getBufferedFrag=function(E){return this.fragmentTracker.getBufferedFrag(E,i.PlaylistLevelType.MAIN)},A.followingBufferedFrag=function(E){return E?this.getBufferedFrag(E.end+.5):null},A.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},A.nextLevelSwitch=function(){var E=this.levels,w=this.media;if(w!=null&&w.readyState){var _,N=this.getAppendedFrag(w.currentTime);if(N&&N.start>1&&this.flushMainBuffer(0,N.start-1),!w.paused&&E){var j=this.hls.nextLoadLevel,k=E[j],z=this.fragLastKbps;z&&this.fragCurrent?_=this.fragCurrent.duration*k.maxBitrate/(1e3*z)+1:_=0}else _=0;var H=this.getBufferedFrag(w.currentTime+_);if(H){var F=this.followingBufferedFrag(H);if(F){this.abortCurrentFrag();var G=F.maxStartPTS?F.maxStartPTS:F.start,B=F.duration,W=Math.max(H.end,G+Math.min(Math.max(B-this.config.maxFragLookUpTolerance,B*.5),B*.75));this.flushMainBuffer(W,Number.POSITIVE_INFINITY)}}}},A.abortCurrentFrag=function(){var E=this.fragCurrent;this.fragCurrent=null,E!=null&&E.loader&&E.loader.abort(),this.state===h.State.KEY_LOADING&&(this.state=h.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},A.flushMainBuffer=function(E,w){s.prototype.flushMainBuffer.call(this,E,w,this.altAudio?"video":null)},A.onMediaAttached=function(E,w){s.prototype.onMediaAttached.call(this,E,w);var _=w.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),_.addEventListener("playing",this.onvplaying),_.addEventListener("seeked",this.onvseeked),this.gapController=new f.default(this.config,_,this.fragmentTracker,this.hls)},A.onMediaDetaching=function(){var E=this.media;E&&(E.removeEventListener("playing",this.onvplaying),E.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),s.prototype.onMediaDetaching.call(this)},A.onMediaPlaying=function(){this.tick()},A.onMediaSeeked=function(){var E=this.media,w=E?E.currentTime:null;Object(R.isFiniteNumber)(w)&&this.log("Media seeked to "+w.toFixed(3)),this.tick()},A.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},A.onManifestParsed=function(E,w){var _=!1,N=!1,j;w.levels.forEach(function(k){j=k.audioCodec,j&&(j.indexOf("mp4a.40.2")!==-1&&(_=!0),j.indexOf("mp4a.40.5")!==-1&&(N=!0))}),this.audioCodecSwitch=_&&N&&!Object(o.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=w.levels,this.startFragRequested=!1},A.onLevelLoading=function(E,w){var _=this.levels;if(!_||this.state!==h.State.IDLE)return;var N=_[w.level];(!N.details||N.details.live&&this.levelLastLoaded!==w.level||this.waitForCdnTuneIn(N.details))&&(this.state=h.State.WAITING_LEVEL)},A.onLevelLoaded=function(E,w){var _,N=this.levels,j=w.level,k=w.details,z=k.totalduration;if(!N){this.warn("Levels were reset while loading level "+j);return}this.log("Level "+j+" loaded ["+k.startSN+","+k.endSN+"], cc ["+k.startCC+", "+k.endCC+"] duration:"+z);var H=this.fragCurrent;H&&(this.state===h.State.FRAG_LOADING||this.state===h.State.FRAG_LOADING_WAITING_RETRY)&&(H.level!==w.level&&H.loader&&(this.state=h.State.IDLE,H.loader.abort()));var F=N[j],G=0;if(k.live||(_=F.details)!==null&&_!==void 0&&_.live){if(k.fragments[0]||(k.deltaUpdateFailed=!0),k.deltaUpdateFailed)return;G=this.alignPlaylists(k,F.details)}if(F.details=k,this.levelLastLoaded=j,this.hls.trigger(C.Events.LEVEL_UPDATED,{details:k,level:j}),this.state===h.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(k))return;this.state=h.State.IDLE}this.startFragRequested?k.live&&this.synchronizeToLiveEdge(k):this.setStartPosition(k,G),this.tick()},A._handleFragmentLoadProgress=function(E){var w,_=E.frag,N=E.part,j=E.payload,k=this.levels;if(!k){this.warn("Levels were reset while fragment load was in progress. Fragment "+_.sn+" of level "+_.level+" will not be buffered");return}var z=k[_.level],H=z.details;if(!H){this.warn("Dropping fragment "+_.sn+" of level "+_.level+" after level details were reset");return}var F=z.videoCodec,G=H.PTSKnown||!H.live,B=(w=_.initSegment)===null||w===void 0?void 0:w.data,W=this._getAudioCodec(z),K=this.transmuxer=this.transmuxer||new l.default(this.hls,i.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),q=N?N.index:-1,re=q!==-1,ee=new p.ChunkMetadata(_.level,_.sn,_.stats.chunkCount,j.byteLength,q,re),Ce=this.initPTS[_.cc];K.push(j,B,W,F,_,N,H.totalduration,G,ee,Ce)},A.onAudioTrackSwitching=function(E,w){var _=this.altAudio,N=!!w.url,j=w.id;if(!N){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var k=this.fragCurrent;k!=null&&k.loader&&(this.log("Switching to main audio track, cancel main fragment load"),k.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var z=this.hls;_&&z.trigger(C.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),z.trigger(C.Events.AUDIO_TRACK_SWITCHED,{id:j})}},A.onAudioTrackSwitched=function(E,w){var _=w.id,N=!!this.hls.audioTracks[_].url;if(N){var j=this.videoBuffer;j&&this.mediaBuffer!==j&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=j)}this.altAudio=N,this.tick()},A.onBufferCreated=function(E,w){var _=w.tracks,N,j,k=!1;for(var z in _){var H=_[z];if(H.id==="main"){if(j=z,N=H,z==="video"){var F=_[z];F&&(this.videoBuffer=F.buffer)}}else k=!0}k&&N?(this.log("Alternate track found, use "+j+".buffered to schedule main fragment loading"),this.mediaBuffer=N.buffer):this.mediaBuffer=this.media},A.onFragBuffered=function(E,w){var _=w.frag,N=w.part;if(_&&_.type!==i.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(_)){this.warn("Fragment "+_.sn+(N?" p: "+N.index:"")+" of level "+_.level+" finished buffering, but was aborted. state: "+this.state),this.state===h.State.PARSED&&(this.state=h.State.IDLE);return}var j=N?N.stats:_.stats;this.fragLastKbps=Math.round(8*j.total/(j.buffering.end-j.loading.first)),_.sn!=="initSegment"&&(this.fragPrevious=_),this.fragBufferedComplete(_,N)},A.onError=function(E,w){switch(w.details){case b.ErrorDetails.FRAG_LOAD_ERROR:case b.ErrorDetails.FRAG_LOAD_TIMEOUT:case b.ErrorDetails.KEY_LOAD_ERROR:case b.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(i.PlaylistLevelType.MAIN,w);break;case b.ErrorDetails.LEVEL_LOAD_ERROR:case b.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==h.State.ERROR&&(w.fatal?(this.warn(""+w.details),this.state=h.State.ERROR):!w.levelRetry&&this.state===h.State.WAITING_LEVEL&&(this.state=h.State.IDLE));break;case b.ErrorDetails.BUFFER_FULL_ERROR:if(w.parent==="main"&&(this.state===h.State.PARSING||this.state===h.State.PARSED)){var _=!0,N=this.getFwdBufferInfo(this.media,i.PlaylistLevelType.MAIN);N&&N.len>.5&&(_=!this.reduceMaxBufferLength(N.len)),_&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},A.checkBuffer=function(){var E=this.media,w=this.gapController;if(!E||!w||!E.readyState)return;var _=c.BufferHelper.getBuffered(E);!this.loadedmetadata&&_.length?(this.loadedmetadata=!0,this.seekToStartPos()):w.poll(this.lastCurrentTime),this.lastCurrentTime=E.currentTime},A.onFragLoadEmergencyAborted=function(){this.state=h.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},A.onBufferFlushed=function(E,w){var _=w.type;if(_!==r.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var N=(_===r.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(N,_,i.PlaylistLevelType.MAIN)}},A.onLevelsUpdated=function(E,w){this.levels=w.levels},A.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},A.seekToStartPos=function(){var E=this.media,w=E.currentTime,_=this.startPosition;if(_>=0&&w<_){if(E.seeking){v.logger.log("could not seek to "+_+", already seeking at "+w);return}var N=c.BufferHelper.getBuffered(E),j=N.length?N.start(0):0,k=j-_;k>0&&(k1&&E.seeking===!1){var _=E.currentTime;if(c.BufferHelper.isBuffered(E,_)?w=this.getAppendedFrag(_):c.BufferHelper.isBuffered(E,_+.1)&&(w=this.getAppendedFrag(_+.1)),w){var N=this.fragPlaying,j=w.level;(!N||w.sn!==N.sn||N.level!==j||w.urlId!==N.urlId)&&(this.hls.trigger(C.Events.FRAG_CHANGED,{frag:w}),(!N||N.level!==j)&&this.hls.trigger(C.Events.LEVEL_SWITCHED,{level:j}),this.fragPlaying=w)}}},n(M,[{key:"nextLevel",get:function(){var E=this.nextBufferedFrag;return E?E.level:-1}},{key:"currentLevel",get:function(){var E=this.media;if(E){var w=this.getAppendedFrag(E.currentTime);if(w)return w.level}return-1}},{key:"nextBufferedFrag",get:function(){var E=this.media;if(E){var w=this.getAppendedFrag(E.currentTime);return this.followingBufferedFrag(w)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),M}(h.default)},"./src/controller/subtitle-stream-controller.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"SubtitleStreamController",function(){return d});var R=S("./src/events.ts"),h=S("./src/utils/logger.ts"),o=S("./src/utils/buffer-helper.ts"),C=S("./src/controller/fragment-finders.ts"),c=S("./src/utils/discontinuities.ts"),a=S("./src/controller/level-helper.ts"),i=S("./src/controller/fragment-tracker.ts"),r=S("./src/controller/base-stream-controller.ts"),l=S("./src/types/loader.ts"),p=S("./src/types/level.ts");function f(g,T){for(var y=0;y=w[j].start&&N<=w[j].end){_=w[j];break}var k=x.start+x.duration;_?_.end=k:(_={start:N,end:k},w.push(_)),this.fragmentTracker.fragBuffered(x)},y.onBufferFlushing=function(M,A){var x=A.startOffset,E=A.endOffset;if(x===0&&E!==Number.POSITIVE_INFINITY){var w=this.currentTrackId,_=this.levels;if(!_.length||!_[w]||!_[w].details)return;var N=_[w].details,j=N.targetduration,k=E-j;if(k<=0)return;A.endOffsetSubtitles=Math.max(0,k),this.tracksBuffered.forEach(function(z){for(var H=0;H=N.length||w!==_||!j)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,E.live||(x=j.details)!==null&&x!==void 0&&x.live){var k=this.mainDetails;if(E.deltaUpdateFailed||!k)return;var z=k.fragments[0];if(!j.details)E.hasProgramDateTime&&k.hasProgramDateTime?Object(c.alignMediaPlaylistByPDT)(E,k):z&&Object(a.addSliding)(E,z.start);else{var H=this.alignPlaylists(E,j.details);H===0&&z&&Object(a.addSliding)(E,z.start)}}if(j.details=E,this.levelLastLoaded=w,this.tick(),E.live&&!this.fragCurrent&&this.media&&this.state===r.State.IDLE){var F=Object(C.findFragmentByPTS)(null,E.fragments,this.media.currentTime,0);F||(this.warn("Subtitle playlist not aligned with playback"),j.details=void 0)}},y._handleFragmentLoadComplete=function(M){var A=M.frag,x=M.payload,E=A.decryptdata,w=this.hls;if(this.fragContextChanged(A))return;if(x&&x.byteLength>0&&E&&E.key&&E.iv&&E.method==="AES-128"){var _=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(x),E.key.buffer,E.iv.buffer).then(function(N){var j=performance.now();w.trigger(R.Events.FRAG_DECRYPTED,{frag:A,payload:N,stats:{tstart:_,tdecrypt:j}})})}},y.doTick=function(){if(!this.media){this.state=r.State.IDLE;return}if(this.state===r.State.IDLE){var M,A=this.currentTrackId,x=this.levels;if(!x.length||!x[A]||!x[A].details)return;var E=x[A].details,w=E.targetduration,_=this.config,N=this.media,j=o.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,N.currentTime-w,_.maxBufferHole),k=j.end,z=j.len,H=this.getMaxBufferLength()+w;if(z>H)return;console.assert(E,"Subtitle track details are defined on idle subtitle stream controller tick");var F=E.fragments,G=F.length,B=E.edge,W,K=this.fragPrevious;if(k-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)},v.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},v.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 n=p(this.media.textTracks);n.forEach(function(d){Object(h.clearCurrentCues)(d)}),this.subtitleTrack=-1,this.media=null},v.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},v.onManifestParsed=function(n,d){this.tracks=d.subtitleTracks},v.onSubtitleTrackLoaded=function(n,d){var g=d.id,T=d.details,y=this.trackId,s=this.tracksInGroup[y];if(!s){this.warn("Invalid subtitle track id "+g);return}var M=s.details;s.details=d.details,this.log("subtitle track "+g+" loaded ["+T.startSN+"-"+T.endSN+"]"),g===this.trackId&&(this.retryCount=0,this.playlistLoaded(g,d,M))},v.onLevelLoading=function(n,d){this.switchLevel(d.level)},v.onLevelSwitching=function(n,d){this.switchLevel(d.level)},v.switchLevel=function(n){var d=this.hls.levels[n];if(!(d!=null&&d.textGroupIds))return;var g=d.textGroupIds[d.urlId];if(this.groupId!==g){var T=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,y=this.tracks.filter(function(A){return!g||A.groupId===g});this.tracksInGroup=y;var s=this.findTrackId(T==null?void 0:T.name)||this.findTrackId();this.groupId=g;var M={subtitleTracks:y};this.log("Updating subtitle tracks, "+y.length+' track(s) found in "'+g+'" group-id'),this.hls.trigger(R.Events.SUBTITLE_TRACKS_UPDATED,M),s!==-1&&this.setSubtitleTrack(s,T)}},v.findTrackId=function(n){for(var d=this.tracksInGroup,g=0;g=T.length)return;this.clearTimer();var y=T[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,y){var s=y.id,M=y.groupId,A=M===void 0?"":M,x=y.name,E=y.type,w=y.url;this.hls.trigger(R.Events.SUBTITLE_TRACK_SWITCH,{id:s,groupId:A,name:x,type:E,url:w});var _=this.switchParams(y.url,d==null?void 0:d.details);this.loadPlaylist(_)}else this.hls.trigger(R.Events.SUBTITLE_TRACK_SWITCH,{id:n})},v.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,d=p(this.media.textTracks),g=0;g=0&&(E[0]=Math.min(E[0],T),E[1]=Math.max(E[1],y),A=!0,w/(y-T)>.5))return}if(A||M.push([T,y]),this.config.renderTextTracksNatively){var _=this.captionsTracks[g];this.Cues.newCue(_,T,y,s)}else{var N=this.Cues.newCue(null,T,y,s);this.hls.trigger(h.Events.CUES_PARSED,{type:"captions",cues:N,track:g})}},n.onInitPtsFound=function(g,T){var y=this,s=T.frag,M=T.id,A=T.initPTS,x=T.timescale,E=this.unparsedVttFrags;M==="main"&&(this.initPTS[s.cc]=A,this.timescale[s.cc]=x),E.length&&(this.unparsedVttFrags=[],E.forEach(function(w){y.onFragLoaded(h.Events.FRAG_LOADED,w)}))},n.getExistingTrack=function(g){var T=this.media;if(T)for(var y=0;y>>8^x&255^99,i[s]=x,r[x]=s;var E=y[s],w=y[E],_=y[w],N=y[x]*257^x*16843008;p[s]=N<<24|N>>>8,f[s]=N<<16|N>>>16,b[s]=N<<8|N>>>24,v[s]=N,N=_*16843009^w*65537^E*257^s*16843008,n[x]=N<<24|N>>>8,d[x]=N<<16|N>>>16,g[x]=N<<8|N>>>24,T[x]=N,s?(s=E^y[y[y[_^E]]],M^=y[y[M]]):s=M=1}},c.expandKey=function(i){for(var r=this.uint8ArrayToUint32Array_(i),l=!0,p=0;p>>6)+1;var N=(g[T+2]&60)>>>2;if(N>_.length-1){d.trigger(o.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+N});return}return A=(g[T+2]&1)<<2,A|=(g[T+3]&192)>>>6,R.logger.log("manifest codec:"+y+", ADTS type:"+s+", samplingIndex:"+N),/firefox/i.test(E)?N>=6?(s=5,x=new Array(4),M=N-3):(s=2,x=new Array(2),M=N):E.indexOf("android")!==-1?(s=2,x=new Array(2),M=N):(s=5,x=new Array(4),y&&(y.indexOf("mp4a.40.29")!==-1||y.indexOf("mp4a.40.5")!==-1)||!y&&N>=6?M=N-3:((y&&y.indexOf("mp4a.40.2")!==-1&&(N>=6&&A===1||/vivaldi/i.test(E))||!y&&A===1)&&(s=2,x=new Array(2)),M=N)),x[0]=s<<3,x[0]|=(N&14)>>1,x[1]|=(N&1)<<7,x[1]|=A<<3,s===5&&(x[1]|=(M&14)>>1,x[2]=(M&1)<<7,x[2]|=2<<2,x[3]=0),{config:x,samplerate:_[N],channelCount:A,codec:"mp4a.40."+s,manifestCodec:w}}function c(d,g){return d[g]===255&&(d[g+1]&246)===240}function a(d,g){return d[g+1]&1?7:9}function i(d,g){return(d[g+3]&3)<<11|d[g+4]<<3|(d[g+5]&224)>>>5}function r(d,g){return g+5=d.length)return!1;var y=i(d,g);if(y<=T)return!1;var s=g+y;return s===d.length||l(d,s)}return!1}function b(d,g,T,y,s){if(!d.samplerate){var M=C(g,T,y,s);if(!M)return;d.config=M.config,d.samplerate=M.samplerate,d.channelCount=M.channelCount,d.codec=M.codec,d.manifestCodec=M.manifestCodec,R.logger.log("parsed codec:"+d.codec+", rate:"+M.samplerate+", channels:"+M.channelCount)}}function v(d){return 1024*9e4/d}function m(d,g,T,y,s){var M=a(d,g),A=i(d,g);if(A-=M,A>0){var x=T+y*s;return{headerLength:M,frameLength:A,stamp:x}}}function n(d,g,T,y,s){var M=v(d.samplerate),A=m(g,T,y,s,M);if(A){var x=A.frameLength,E=A.headerLength,w=A.stamp,_=E+x,N=Math.max(0,T+_-g.length),j;N?(j=new Uint8Array(_-E),j.set(g.subarray(T+E,g.length),0)):j=g.subarray(T+E,T+_);var k={unit:j,pts:w};return N||d.samples.push(k),{sample:k,length:_,missing:N}}}},"./src/demux/base-audio-demuxer.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"initPTSFn",function(){return i});var R=S("./src/polyfills/number.ts"),h=S("./src/demux/id3.ts"),o=S("./src/demux/dummy-demuxed-track.ts"),C=S("./src/utils/mp4-tools.ts"),c=S("./src/utils/typed-array.ts"),a=function(){function r(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var l=r.prototype;return l.resetInitSegment=function(f,b,v){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},l.resetTimeStamp=function(){},l.resetContiguity=function(){},l.canParse=function(f,b){return!1},l.appendFrame=function(f,b,v){},l.demux=function(f,b){this.cachedData&&(f=Object(C.appendUint8Array)(this.cachedData,f),this.cachedData=null);var v=h.getID3Data(f,0),m=v?v.length:0,n,d,g=this._audioTrack,T=this._id3Track,y=v?h.getTimeStamp(v):void 0,s=f.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=i(y,b)),v&&v.length>0&&T.samples.push({pts:this.initPTS,dts:this.initPTS,data:v}),d=this.initPTS;ma?(this.word<<=a,this.bitsAvailable-=a):(a-=this.bitsAvailable,i=a>>3,a-=i>>3,this.bytesAvailable-=i,this.loadWord(),this.word<<=a,this.bitsAvailable-=a)},C.readBits=function(a){var i=Math.min(this.bitsAvailable,a),r=this.word>>>32-i;return a>32&&R.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=i,this.bitsAvailable>0?this.word<<=i:this.bytesAvailable>0&&this.loadWord(),i=a-i,i>0&&this.bitsAvailable?r<>>a)!==0)return this.word<<=a,this.bitsAvailable-=a,a;return this.loadWord(),a+this.skipLZ()},C.skipUEG=function(){this.skipBits(1+this.skipLZ())},C.skipEG=function(){this.skipBits(1+this.skipLZ())},C.readUEG=function(){var a=this.skipLZ();return this.readBits(a+1)-1},C.readEG=function(){var a=this.readUEG();return 1&a?1+a>>>1:-1*(a>>>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(a){for(var i=8,r=8,l,p=0;p0?s.subarray(A,A+x):void 0},C=function(s,M){var A=0;return A=(s[M]&127)<<21,A|=(s[M+1]&127)<<14,A|=(s[M+2]&127)<<7,A|=s[M+3]&127,A},c=function(s,M){return R(s,M)&&C(s,M+6)+10<=s.length-M},a=function(s){for(var M=l(s),A=0;A>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:k+=String.fromCharCode(_);break;case 12:case 13:N=s[z++],k+=String.fromCharCode((_&31)<<6|N&63);break;case 14:N=s[z++],j=s[z++],k+=String.fromCharCode((_&15)<<12|(N&63)<<6|(j&63)<<0);break;default:}}return k},d={decodeTextFrame:b},g;function T(){return!g&&typeof self.TextDecoder!="undefined"&&(g=new self.TextDecoder("utf-8")),g}},"./src/demux/mp3demuxer.ts":function(L,u,S){"use strict";S.r(u);var R=S("./src/demux/base-audio-demuxer.ts"),h=S("./src/demux/id3.ts"),o=S("./src/utils/logger.ts"),C=S("./src/demux/mpegaudio.ts");function c(r,l){r.prototype=Object.create(l.prototype),r.prototype.constructor=r,a(r,l)}function a(r,l){return a=Object.setPrototypeOf||function(f,b){return f.__proto__=b,f},a(r,l)}var i=function(r){c(l,r);function l(){return r.apply(this,arguments)||this}var p=l.prototype;return p.resetInitSegment=function(b,v,m){r.prototype.resetInitSegment.call(this,b,v,m),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:b,duration:m,inputTimeScale:9e4,dropped:0}},l.probe=function(b){if(!b)return!1;for(var v=h.getID3Data(b,0)||[],m=v.length,n=b.length;m0},c.demux=function(i){var r=i,l=Object(h.dummyTrack)();if(this.config.progressive){this.remainderData&&(r=Object(R.appendUint8Array)(this.remainderData,i));var p=Object(R.segmentValidRange)(r);this.remainderData=p.remainder,l.samples=p.valid||new Uint8Array}else l.samples=r;return{audioTrack:Object(h.dummyTrack)(),avcTrack:l,id3Track:Object(h.dummyTrack)(),textTrack:Object(h.dummyTrack)()}},c.flush=function(){var i=Object(h.dummyTrack)();return i.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(h.dummyTrack)(),avcTrack:i,id3Track:Object(h.dummyTrack)(),textTrack:Object(h.dummyTrack)()}},c.demuxSampleAes=function(i,r,l){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},c.destroy=function(){},C}();o.minProbeByteLength=1024,u.default=o},"./src/demux/mpegaudio.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"appendFrame",function(){return a}),S.d(u,"parseHeader",function(){return i}),S.d(u,"isHeaderPattern",function(){return r}),S.d(u,"isHeader",function(){return l}),S.d(u,"canParse",function(){return p}),S.d(u,"probe",function(){return f});var R=null,h=[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],o=[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]],c=[0,1,1,4];function a(b,v,m,n,d){if(m+24>v.length)return;var g=i(v,m);if(g&&m+g.frameLength<=v.length){var T=g.samplesPerFrame*9e4/g.sampleRate,y=n+d*T,s={unit:v.subarray(m,m+g.frameLength),pts:y,dts:y};return b.config=[],b.channelCount=g.channelCount,b.samplerate=g.sampleRate,b.samples.push(s),{sample:s,length:g.frameLength,missing:0}}}function i(b,v){var m=b[v+1]>>3&3,n=b[v+1]>>1&3,d=b[v+2]>>4&15,g=b[v+2]>>2&3;if(m!==1&&d!==0&&d!==15&&g!==3){var T=b[v+2]>>1&1,y=b[v+3]>>6,s=m===3?3-n:n===3?3:4,M=h[s*14+d-1]*1e3,A=m===3?0:m===2?1:2,x=o[A*3+g],E=y===3?1:2,w=C[m][n],_=c[n],N=w*8*_,j=Math.floor(w*M/x+T)*_;if(R===null){var k=navigator.userAgent||"",z=k.match(/Chrome\/(\d+)/i);R=z?parseInt(z[1]):0}var H=!!R&&R<=87;return H&&n===2&&M>=224e3&&y===0&&(b[v+3]=b[v+3]|128),{sampleRate:x,channelCount:E,frameLength:j,samplesPerFrame:N}}}function r(b,v){return b[v]===255&&(b[v+1]&224)===224&&(b[v+1]&6)!==0}function l(b,v){return v+1=i.length){l();return}if(i[r].unit.length<32)continue;var p=this.decrypter.isSync();if(this.decryptAacSample(i,r,l,p),!p)return}},c.getAvcEncryptedData=function(i){for(var r=Math.floor((i.length-48)/160)*16+16,l=new Int8Array(r),p=0,f=32;f<=i.length-16;f+=160,p+=16)l.set(i.subarray(f,f+16),p);return l},c.getAvcDecryptedUnit=function(i,r){for(var l=new Uint8Array(r),p=0,f=32;f<=i.length-16;f+=160,p+=16)i.set(l.subarray(p,p+16),f);return i},c.decryptAvcSample=function(i,r,l,p,f,b){var v=Object(h.discardEPB)(f.data),m=this.getAvcEncryptedData(v),n=this;this.decryptBuffer(m.buffer,function(d){f.data=n.getAvcDecryptedUnit(v,d),b||n.decryptAvcSamples(i,r,l+1,p)})},c.decryptAvcSamples=function(i,r,l,p){if(i instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;r++,l=0){if(r>=i.length){p();return}for(var f=i[r].units;!(l>=f.length);l++){var b=f[l];if(b.data.length<=48||b.type!==1&&b.type!==5)continue;var v=this.decrypter.isSync();if(this.decryptAvcSample(i,r,l,p,b,v),!v)return}}},C}();u.default=o},"./src/demux/transmuxer-interface.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"default",function(){return f});var R=S("./node_modules/webworkify-webpack/index.js"),h=S.n(R),o=S("./src/events.ts"),C=S("./src/demux/transmuxer.ts"),c=S("./src/utils/logger.ts"),a=S("./src/errors.ts"),i=S("./src/utils/mediasource-helper.ts"),r=S("./node_modules/eventemitter3/index.js"),l=S.n(r),p=Object(i.getMediaSource)()||{isTypeSupported:function(){return!1}},f=function(){function b(m,n,d,g){var T=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=m,this.id=n,this.onTransmuxComplete=d,this.onFlush=g;var y=m.config,s=function(w,_){_=_||{},_.frag=T.frag,_.id=T.id,m.trigger(w,_)};this.observer=new r.EventEmitter,this.observer.on(o.Events.FRAG_DECRYPTED,s),this.observer.on(o.Events.ERROR,s);var M={mp4:p.isTypeSupported("video/mp4"),mpeg:p.isTypeSupported("audio/mpeg"),mp3:p.isTypeSupported('audio/mp4; codecs="mp3"')},A=navigator.vendor;if(y.enableWorker&&typeof Worker!="undefined"){c.logger.log("demuxing in webworker");var x;try{x=this.worker=R("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),x.addEventListener("message",this.onwmsg),x.onerror=function(E){m.trigger(o.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(E.message+" ("+E.filename+":"+E.lineno+")")})},x.postMessage({cmd:"init",typeSupported:M,vendor:A,id:n,config:JSON.stringify(y)})}catch(E){c.logger.warn("Error in worker:",E),c.logger.error("Error while initializing DemuxerWorker, fallback to inline"),x&&self.URL.revokeObjectURL(x.objectURL),this.transmuxer=new C.default(this.observer,M,y,A,n),this.worker=null}}else this.transmuxer=new C.default(this.observer,M,y,A,n)}var v=b.prototype;return v.destroy=function(){var n=this.worker;if(n)n.removeEventListener("message",this.onwmsg),n.terminate(),this.worker=null;else{var d=this.transmuxer;d&&(d.destroy(),this.transmuxer=null)}var g=this.observer;g&&g.removeAllListeners(),this.observer=null},v.push=function(n,d,g,T,y,s,M,A,x,E){var w=this;x.transmuxing.start=self.performance.now();var _=this.transmuxer,N=this.worker,j=s?s.start:y.start,k=y.decryptdata,z=this.frag,H=!(z&&y.cc===z.cc),F=!(z&&x.level===z.level),G=z?x.sn-z.sn:-1,B=this.part?x.part-this.part.index:1,W=!F&&(G===1||G===0&&B===1),K=self.performance.now();(F||G||y.stats.parsing.start===0)&&(y.stats.parsing.start=K),s&&(B||!W)&&(s.stats.parsing.start=K);var q=new C.TransmuxState(H,W,A,F,j);if(!W||H){c.logger.log("[transmuxer-interface, "+y.type+"]: Starting new transmux session for sn: "+x.sn+" p: "+x.part+" level: "+x.level+" id: "+x.id+` discontinuity: `+H+` trackSwitch: `+F+` contiguous: `+W+` accurateTimeOffset: `+A+` timeOffset: `+j);var re=new C.TransmuxConfig(g,T,d,M,E);this.configureTransmuxer(re)}if(this.frag=y,this.part=s,N)N.postMessage({cmd:"demux",data:n,decryptdata:k,chunkMeta:x,state:q},n instanceof ArrayBuffer?[n]:[]);else if(_){var ee=_.push(n,k,x,q);Object(C.isPromise)(ee)?ee.then(function(Ce){w.handleTransmuxComplete(Ce)}):this.handleTransmuxComplete(ee)}},v.flush=function(n){var d=this;n.transmuxing.start=self.performance.now();var g=this.transmuxer,T=this.worker;if(T)T.postMessage({cmd:"flush",chunkMeta:n});else if(g){var y=g.flush(n);Object(C.isPromise)(y)?y.then(function(s){d.handleFlushResult(s,n)}):this.handleFlushResult(y,n)}},v.handleFlushResult=function(n,d){var g=this;n.forEach(function(T){g.handleTransmuxComplete(T)}),this.onFlush(d)},v.onWorkerMessage=function(n){var d=n.data,g=this.hls;switch(d.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(d.data);break}case"flush":{this.onFlush(d.data);break}default:{d.data=d.data||{},d.data.frag=this.frag,d.data.id=this.id,g.trigger(d.event,d.data);break}}},v.configureTransmuxer=function(n){var d=this.worker,g=this.transmuxer;d?d.postMessage({cmd:"configure",config:n}):g&&g.configure(n)},v.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},b}()},"./src/demux/transmuxer-worker.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"default",function(){return a});var R=S("./src/demux/transmuxer.ts"),h=S("./src/events.ts"),o=S("./src/utils/logger.ts"),C=S("./node_modules/eventemitter3/index.js"),c=S.n(C);function a(f){var b=new C.EventEmitter,v=function(n,d){f.postMessage({event:n,data:d})};b.on(h.Events.FRAG_DECRYPTED,v),b.on(h.Events.ERROR,v),f.addEventListener("message",function(m){var n=m.data;switch(n.cmd){case"init":{var d=JSON.parse(n.config);f.transmuxer=new R.default(b,n.typeSupported,d,n.vendor,n.id),Object(o.enableLogs)(d.debug),v("init",null);break}case"configure":{f.transmuxer.configure(n.config);break}case"demux":{var g=f.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(R.isPromise)(g)?g.then(function(s){i(f,s)}):i(f,g);break}case"flush":{var T=n.chunkMeta,y=f.transmuxer.flush(T);Object(R.isPromise)(y)?y.then(function(s){l(f,s,T)}):l(f,y,T);break}default:break}})}function i(f,b){if(p(b.remuxResult))return;var v=[],m=b.remuxResult,n=m.audio,d=m.video;n&&r(v,n),d&&r(v,d),f.postMessage({event:"transmuxComplete",data:b},v)}function r(f,b){b.data1&&f.push(b.data1.buffer),b.data2&&f.push(b.data2.buffer)}function l(f,b,v){b.forEach(function(m){i(f,m)}),f.postMessage({event:"flush",data:v})}function p(f){return!f.audio&&!f.video&&!f.text&&!f.id3&&!f.initSegment}},"./src/demux/transmuxer.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"default",function(){return d}),S.d(u,"isPromise",function(){return y}),S.d(u,"TransmuxConfig",function(){return s}),S.d(u,"TransmuxState",function(){return M});var R=S("./src/events.ts"),h=S("./src/errors.ts"),o=S("./src/crypt/decrypter.ts"),C=S("./src/demux/aacdemuxer.ts"),c=S("./src/demux/mp4demuxer.ts"),a=S("./src/demux/tsdemuxer.ts"),i=S("./src/demux/mp3demuxer.ts"),r=S("./src/remux/mp4-remuxer.ts"),l=S("./src/remux/passthrough-remuxer.ts"),p=S("./src/demux/chunk-cache.ts"),f=S("./src/utils/mp4-tools.ts"),b=S("./src/utils/logger.ts"),v;try{v=self.performance.now.bind(self.performance)}catch(A){b.logger.debug("Unable to use Performance API on this environment"),v=self.Date.now}var m=[{demux:a.default,remux:r.default},{demux:c.default,remux:l.default},{demux:C.default,remux:r.default},{demux:i.default,remux:r.default}],n=1024;m.forEach(function(A){var x=A.demux;n=Math.max(n,x.minProbeByteLength)});var d=function(){function A(E,w,_,N,j){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 p.default,this.observer=E,this.typeSupported=w,this.config=_,this.vendor=N,this.id=j}var x=A.prototype;return x.configure=function(w){this.transmuxConfig=w,this.decrypter&&this.decrypter.reset()},x.push=function(w,_,N,j){var k=this,z=N.transmuxing;z.executeStart=v();var H=new Uint8Array(w),F=this.cache,G=this.config,B=this.currentTransmuxState,W=this.transmuxConfig;j&&(this.currentTransmuxState=j);var K=g(H,_);if(K&&K.method==="AES-128"){var q=this.getDecrypter();if(G.enableSoftwareAES){var re=q.softwareDecrypt(H,K.key.buffer,K.iv.buffer);if(!re)return z.executeEnd=v(),T(N);H=new Uint8Array(re)}else return this.decryptionPromise=q.webCryptoDecrypt(H,K.key.buffer,K.iv.buffer).then(function(Q){var Y=k.push(Q,null,N);return k.decryptionPromise=null,Y}),this.decryptionPromise}var ee=j||B,Ce=ee.contiguous,xe=ee.discontinuity,he=ee.trackSwitch,ke=ee.accurateTimeOffset,_e=ee.timeOffset,de=W.audioCodec,ce=W.videoCodec,ae=W.defaultInitPts,Se=W.duration,te=W.initSegmentData;if((xe||he)&&this.resetInitSegment(te,de,ce,Se),xe&&this.resetInitialTimestamp(ae),Ce||this.resetContiguity(),this.needsProbing(H,xe,he)){if(F.dataLength){var ue=F.flush();H=Object(f.appendUint8Array)(ue,H)}this.configureTransmuxer(H,W)}var Oe=this.transmux(H,K,_e,ke,N),le=this.currentTransmuxState;return le.contiguous=!0,le.discontinuity=!1,le.trackSwitch=!1,z.executeEnd=v(),Oe},x.flush=function(w){var _=this,N=w.transmuxing;N.executeStart=v();var j=this.decrypter,k=this.cache,z=this.currentTransmuxState,H=this.decryptionPromise;if(H)return H.then(function(){return _.flush(w)});var F=[],G=z.timeOffset;if(j){var B=j.flush();B&&F.push(this.push(B,null,w))}var W=k.dataLength;k.reset();var K=this.demuxer,q=this.remuxer;if(!K||!q)return W>=n&&this.observer.emit(R.Events.ERROR,R.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),N.executeEnd=v(),[T(w)];var re=K.flush(G);return y(re)?re.then(function(ee){return _.flushRemux(F,ee,w),F}):(this.flushRemux(F,re,w),F)},x.flushRemux=function(w,_,N){var j=_.audioTrack,k=_.avcTrack,z=_.id3Track,H=_.textTrack,F=this.currentTransmuxState,G=F.accurateTimeOffset,B=F.timeOffset;b.logger.log("[transmuxer.ts]: Flushed fragment "+N.sn+(N.part>-1?" p: "+N.part:"")+" of level "+N.level);var W=this.remuxer.remux(j,k,z,H,B,G,!0,this.id);w.push({remuxResult:W,chunkMeta:N}),N.transmuxing.executeEnd=v()},x.resetInitialTimestamp=function(w){var _=this.demuxer,N=this.remuxer;if(!_||!N)return;_.resetTimeStamp(w),N.resetTimeStamp(w)},x.resetContiguity=function(){var w=this.demuxer,_=this.remuxer;if(!w||!_)return;w.resetContiguity(),_.resetNextTimestamp()},x.resetInitSegment=function(w,_,N,j){var k=this.demuxer,z=this.remuxer;if(!k||!z)return;k.resetInitSegment(_,N,j),z.resetInitSegment(w,_,N)},x.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},x.transmux=function(w,_,N,j,k){var z;return _&&_.method==="SAMPLE-AES"?z=this.transmuxSampleAes(w,_,N,j,k):z=this.transmuxUnencrypted(w,N,j,k),z},x.transmuxUnencrypted=function(w,_,N,j){var k=this.demuxer.demux(w,_,!1,!this.config.progressive),z=k.audioTrack,H=k.avcTrack,F=k.id3Track,G=k.textTrack,B=this.remuxer.remux(z,H,F,G,_,N,!1,this.id);return{remuxResult:B,chunkMeta:j}},x.transmuxSampleAes=function(w,_,N,j,k){var z=this;return this.demuxer.demuxSampleAes(w,_,N).then(function(H){var F=z.remuxer.remux(H.audioTrack,H.avcTrack,H.id3Track,H.textTrack,N,j,!1,z.id);return{remuxResult:F,chunkMeta:k}})},x.configureTransmuxer=function(w,_){for(var N=this.config,j=this.observer,k=this.typeSupported,z=this.vendor,H=_.audioCodec,F=_.defaultInitPts,G=_.duration,B=_.initSegmentData,W=_.videoCodec,K,q=0,re=m.length;q0&&x!=null&&x.key!=null&&x.iv!==null&&x.method!=null&&(E=x),E}var T=function(x){return{remuxResult:{},chunkMeta:x}};function y(A){return"then"in A&&A.then instanceof Function}var s=function(x,E,w,_,N){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=x,this.videoCodec=E,this.initSegmentData=w,this.duration=_,this.defaultInitPts=N},M=function(x,E,w,_,N){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=x,this.contiguous=E,this.accurateTimeOffset=w,this.trackSwitch=_,this.timeOffset=N}},"./src/demux/tsdemuxer.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"discardEPB",function(){return T});var R=S("./src/demux/adts.ts"),h=S("./src/demux/mpegaudio.ts"),o=S("./src/demux/exp-golomb.ts"),C=S("./src/demux/id3.ts"),c=S("./src/demux/sample-aes.ts"),a=S("./src/events.ts"),i=S("./src/utils/mp4-tools.ts"),r=S("./src/utils/logger.ts"),l=S("./src/errors.ts"),p={video:1,audio:2,id3:3,text:4},f=function(){function y(M,A,x){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=M,this.config=A,this.typeSupported=x}y.probe=function(A){var x=y.syncOffset(A);return x<0?!1:(x&&r.logger.warn("MPEG2-TS detected but first sync word found @ offset "+x+", junk ahead ?"),!0)},y.syncOffset=function(A){for(var x=Math.min(1e3,A.length-3*188),E=0;E>4,de=void 0;if(_e>1){if(de=xe+5+A[xe+4],de===xe+188)continue}else de=xe+4;switch(ke){case z:he&&(H&&(_=n(H))&&this.parseAVCPES(_,!1),H={data:[],size:0}),H&&(H.data.push(A.subarray(de,xe+188)),H.size+=xe+188-de);break;case F:he&&(B&&(_=n(B))&&(j.isAAC?this.parseAACPES(_):this.parseMPEGPES(_)),B={data:[],size:0}),B&&(B.data.push(A.subarray(de,xe+188)),B.size+=xe+188-de);break;case G:he&&(W&&(_=n(W))&&this.parseID3PES(_),W={data:[],size:0}),W&&(W.data.push(A.subarray(de,xe+188)),W.size+=xe+188-de);break;case 0:he&&(de+=A[de]+1),re=this._pmtId=v(A,de);break;case re:{he&&(de+=A[de]+1);var ce=m(A,de,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,E);z=ce.avc,z>0&&(N.pid=z),F=ce.audio,F>0&&(j.pid=F,j.isAAC=ce.isAAC),G=ce.id3,G>0&&(k.pid=G),K&&!q&&(r.logger.log("reparse from beginning"),K=!1,xe=Ce-188),q=this.pmtParsed=!0;break}case 17:case 8191:break;default:K=!0;break}}else this.observer.emit(a.Events.ERROR,a.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});N.pesData=H,j.pesData=B,k.pesData=W;var ae={audioTrack:j,avcTrack:N,id3Track:k,textTrack:this._txtTrack};return w&&this.extractRemainingSamples(ae),ae},s.flush=function(){var A=this.remainderData;this.remainderData=null;var x;return A?x=this.demux(A,-1,!1,!0):x={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(x),this.sampleAes?this.decrypt(x,this.sampleAes):x},s.extractRemainingSamples=function(A){var x=A.audioTrack,E=A.avcTrack,w=A.id3Track,_=E.pesData,N=x.pesData,j=w.pesData,k;_&&(k=n(_))?(this.parseAVCPES(k,!0),E.pesData=null):E.pesData=_,N&&(k=n(N))?(x.isAAC?this.parseAACPES(k):this.parseMPEGPES(k),x.pesData=null):(N!=null&&N.size&&r.logger.log("last AAC PES packet truncated,might overlap between fragments"),x.pesData=N),j&&(k=n(j))?(this.parseID3PES(k),w.pesData=null):w.pesData=j},s.demuxSampleAes=function(A,x,E){var w=this.demux(A,E,!0,!this.config.progressive),_=this.sampleAes=new c.default(this.observer,this.config,x);return this.decrypt(w,_)},s.decrypt=function(A,x){return new Promise(function(E){var w=A.audioTrack,_=A.avcTrack;w.samples&&w.isAAC?x.decryptAacSamples(w.samples,0,function(){_.samples?x.decryptAvcSamples(_.samples,0,0,function(){E(A)}):E(A)}):_.samples&&x.decryptAvcSamples(_.samples,0,0,function(){E(A)})})},s.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},s.parseAVCPES=function(A,x){var E=this,w=this._avcTrack,_=this.parseAVCNALu(A.data),N=!1,j=this.avcSample,k,z=!1;A.data=null,j&&_.length&&!w.audFound&&(d(j,w),j=this.avcSample=b(!1,A.pts,A.dts,"")),_.forEach(function(H){switch(H.type){case 1:{k=!0,j||(j=E.avcSample=b(!0,A.pts,A.dts,"")),N&&(j.debug+="NDR "),j.frame=!0;var F=H.data;if(z&&F.length>4){var G=new o.default(F).readSliceType();(G===2||G===4||G===7||G===9)&&(j.key=!0)}break}case 5:k=!0,j||(j=E.avcSample=b(!0,A.pts,A.dts,"")),N&&(j.debug+="IDR "),j.key=!0,j.frame=!0;break;case 6:{k=!0,N&&j&&(j.debug+="SEI ");var B=new o.default(T(H.data));B.readUByte();for(var W=0,K=0,q=!1,re=0;!q&&B.bytesAvailable>1;){W=0;do re=B.readUByte(),W+=re;while(re===255);K=0;do re=B.readUByte(),K+=re;while(re===255);if(W===4&&B.bytesAvailable!==0){q=!0;var ee=B.readUByte();if(ee===181){var Ce=B.readUShort();if(Ce===49){var xe=B.readUInt();if(xe===1195456820){var he=B.readUByte();if(he===3){for(var ke=B.readUByte(),_e=B.readUByte(),de=31&ke,ce=[ke,_e],ae=0;ae16){for(var Se=[],te=0;te<16;te++)Se.push(B.readUByte().toString(16)),(te===3||te===5||te===7||te===9)&&Se.push("-");for(var ue=K-16,Oe=new Uint8Array(ue),le=0;le=0){var B={data:A.subarray(F,j-w-1),type:G};N.push(B)}else{var W=this.getLastNalUnit();if(W&&(_&&j<=4-_&&(W.state&&(W.data=W.data.subarray(0,W.data.byteLength-_))),z=j-w-1,z>0)){var K=new Uint8Array(W.data.byteLength+z);K.set(W.data,0),K.set(A.subarray(0,z),W.data.byteLength),W.data=K,W.state=0}}j=0&&w>=0){var q={data:A.subarray(F,x),type:G,state:w};N.push(q)}if(N.length===0){var re=this.getLastNalUnit();if(re){var ee=new Uint8Array(re.data.byteLength+A.byteLength);ee.set(re.data,0),ee.set(A,re.data.byteLength),re.data=ee}}return E.naluState=w,N},s.parseAACPES=function(A){var x=0,E=this._audioTrack,w=this.aacOverFlow,_=A.data;if(w){this.aacOverFlow=null;var N=w.sample.unit.byteLength,j=Math.min(w.missing,N),k=N-j;w.sample.unit.set(_.subarray(0,j),k),E.samples.push(w.sample),x=w.missing}var z,H;for(z=x,H=_.length;z1;){var N=new Uint8Array(_[0].length+_[1].length);N.set(_[0]),N.set(_[1],_[0].length),_[0]=N,_.splice(1,1)}M=_[0];var j=(M[0]<<16)+(M[1]<<8)+M[2];if(j===1){if(A=(M[4]<<8)+M[5],A&&A>y.size-6)return null;var k=M[7];k&192&&(E=(M[9]&14)*536870912+(M[10]&255)*4194304+(M[11]&254)*16384+(M[12]&255)*128+(M[13]&254)/2,k&64?(w=(M[14]&14)*536870912+(M[15]&255)*4194304+(M[16]&254)*16384+(M[17]&255)*128+(M[18]&254)/2,E-w>60*9e4&&(r.logger.warn(Math.round((E-w)/9e4)+"s delta between PTS and DTS, align them"),E=w)):w=E),x=M[8];var z=x+9;if(y.size<=z)return null;y.size-=z;for(var H=new Uint8Array(y.size),F=0,G=_.length;FB){z-=B;continue}else M=M.subarray(z),B-=z,z=0;H.set(M,s),s+=B}return A&&(A-=x+3),{data:H,pts:E,dts:w,len:A}}return null}function d(y,s){if(y.units.length&&y.frame){if(y.pts===void 0){var M=s.samples,A=M.length;if(A){var x=M[A-1];y.pts=x.pts,y.dts=x.dts}else{s.dropped++;return}}s.samples.push(y)}y.debug.length&&r.logger.log(y.pts+"/"+y.dts+":"+y.debug)}function g(y,s){var M=y.length;if(M>0){if(s.pts>=y[M-1].pts)y.push(s);else for(var A=M-1;A>=0;A--)if(s.ptsE)return _;return 0}},{key:"maxAutoLevel",get:function(){var x=this.levels,E=this.autoLevelCapping,w;return E===-1&&x&&x.length?w=x.length-1:w=E,w}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(x){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,x)}},{key:"audioTracks",get:function(){var x=this.audioTrackController;return x?x.audioTracks:[]}},{key:"audioTrack",get:function(){var x=this.audioTrackController;return x?x.audioTrack:-1},set:function(x){var E=this.audioTrackController;E&&(E.audioTrack=x)}},{key:"subtitleTracks",get:function(){var x=this.subtitleTrackController;return x?x.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var x=this.subtitleTrackController;return x?x.subtitleTrack:-1},set:function(x){var E=this.subtitleTrackController;E&&(E.subtitleTrack=x)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var x=this.subtitleTrackController;return x?x.subtitleDisplay:!1},set:function(x){var E=this.subtitleTrackController;E&&(E.subtitleDisplay=x)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(x){this.config.lowLatencyMode=x}},{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 n.Events}},{key:"ErrorTypes",get:function(){return d.ErrorTypes}},{key:"ErrorDetails",get:function(){return d.ErrorDetails}},{key:"DefaultConfig",get:function(){return s.defaultConfig?s.defaultConfig:b.hlsDefaultConfig},set:function(x){s.defaultConfig=x}}]),s}();y.defaultConfig=void 0},"./src/is-supported.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"isSupported",function(){return o}),S.d(u,"changeTypeSupported",function(){return C});var R=S("./src/utils/mediasource-helper.ts");function h(){return self.SourceBuffer||self.WebKitSourceBuffer}function o(){var c=Object(R.getMediaSource)();if(!c)return!1;var a=h(),i=c&&typeof c.isTypeSupported=="function"&&c.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!a||a.prototype&&typeof a.prototype.appendBuffer=="function"&&typeof a.prototype.remove=="function";return!!i&&!!r}function C(){var c,a=h();return typeof(a==null||((c=a.prototype)===null||c===void 0)?void 0:c.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"default",function(){return f}),S.d(u,"LoadError",function(){return v});var R=S("./src/polyfills/number.ts"),h=S("./src/errors.ts");function o(m,n){m.prototype=Object.create(n.prototype),m.prototype.constructor=m,r(m,n)}function C(m){var n=typeof Map=="function"?new Map:void 0;return C=function(g){if(g===null||!i(g))return g;if(typeof g!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(g))return n.get(g);n.set(g,T)}function T(){return c(g,arguments,l(this).constructor)}return T.prototype=Object.create(g.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),r(T,g)},C(m)}function c(m,n,d){return a()?c=Reflect.construct:c=function(T,y,s){var M=[null];M.push.apply(M,y);var A=Function.bind.apply(T,M),x=new A;return s&&r(x,s.prototype),x},c.apply(null,arguments)}function a(){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(m){return!1}}function i(m){return Function.toString.call(m).indexOf("[native code]")!==-1}function r(m,n){return r=Object.setPrototypeOf||function(g,T){return g.__proto__=T,g},r(m,n)}function l(m){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(d){return d.__proto__||Object.getPrototypeOf(d)},l(m)}var p=Math.pow(2,17),f=function(){function m(d){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=d}var n=m.prototype;return n.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},n.abort=function(){this.loader&&this.loader.abort()},n.load=function(g,T){var y=this,s=g.url;if(!s)return Promise.reject(new v({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:g,networkDetails:null},"Fragment does not have a "+(s?"part list":"url")));this.abort();var M=this.config,A=M.fLoader,x=M.loader;return new Promise(function(E,w){y.loader&&y.loader.destroy();var _=y.loader=g.loader=A?new A(M):new x(M),N=b(g),j={timeout:M.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:M.fragLoadingMaxRetryTimeout,highWaterMark:p};g.stats=_.stats,_.load(N,j,{onSuccess:function(z,H,F,G){y.resetLoader(g,_),E({frag:g,part:null,payload:z.data,networkDetails:G})},onError:function(z,H,F){y.resetLoader(g,_),w(new v({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:g,response:z,networkDetails:F}))},onAbort:function(z,H,F){y.resetLoader(g,_),w(new v({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:g,networkDetails:F}))},onTimeout:function(z,H,F){y.resetLoader(g,_),w(new v({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:g,networkDetails:F}))},onProgress:function(z,H,F,G){T&&T({frag:g,part:null,payload:F,networkDetails:G})}})})},n.loadPart=function(g,T,y){var s=this;this.abort();var M=this.config,A=M.fLoader,x=M.loader;return new Promise(function(E,w){s.loader&&s.loader.destroy();var _=s.loader=g.loader=A?new A(M):new x(M),N=b(g,T),j={timeout:M.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:M.fragLoadingMaxRetryTimeout,highWaterMark:p};T.stats=_.stats,_.load(N,j,{onSuccess:function(z,H,F,G){s.resetLoader(g,_),s.updateStatsFromPart(g,T);var B={frag:g,part:T,payload:z.data,networkDetails:G};y(B),E(B)},onError:function(z,H,F){s.resetLoader(g,_),w(new v({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:g,part:T,response:z,networkDetails:F}))},onAbort:function(z,H,F){g.stats.aborted=T.stats.aborted,s.resetLoader(g,_),w(new v({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:g,part:T,networkDetails:F}))},onTimeout:function(z,H,F){s.resetLoader(g,_),w(new v({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:g,part:T,networkDetails:F}))}})})},n.updateStatsFromPart=function(g,T){var y=g.stats,s=T.stats,M=s.total;if(y.loaded+=s.loaded,M){var A=Math.round(g.duration/T.duration),x=Math.min(Math.round(y.loaded/M),A),E=A-x,w=E*Math.round(y.loaded/x);y.total=y.loaded+w}else y.total=Math.max(y.loaded,y.total);var _=y.loading,N=s.loading;_.start?_.first+=N.first-N.start:(_.start=N.start,_.first=N.first),_.end=N.end},n.resetLoader=function(g,T){g.loader=null,this.loader===T&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),T.destroy()},m}();function b(m,n){n===void 0&&(n=null);var d=n||m,g={frag:m,part:n,responseType:"arraybuffer",url:d.url,headers:{},rangeStart:0,rangeEnd:0},T=d.byteRangeStartOffset,y=d.byteRangeEndOffset;return Object(R.isFiniteNumber)(T)&&Object(R.isFiniteNumber)(y)&&(g.rangeStart=T,g.rangeEnd=y),g}var v=function(m){o(n,m);function n(d){for(var g,T=arguments.length,y=new Array(T>1?T-1:0),s=1;s>8*(15-M)&255;return s},g.setDecryptDataFromLevelKey=function(y,s){var M=y;return(y==null?void 0:y.method)==="AES-128"&&y.uri&&!y.iv&&(M=c.LevelKey.fromURI(y.uri),M.method=y.method,M.iv=this.createInitializationVector(s),M.keyFormat="identity"),M},g.setElementaryStreamInfo=function(y,s,M,A,x,E){E===void 0&&(E=!1);var w=this.elementaryStreams,_=w[y];if(!_){w[y]={startPTS:s,endPTS:M,startDTS:A,endDTS:x,partial:E};return}_.startPTS=Math.min(_.startPTS,s),_.endPTS=Math.max(_.endPTS,M),_.startDTS=Math.min(_.startDTS,A),_.endDTS=Math.max(_.endDTS,x)},g.clearElementaryStreamInfo=function(){var y=this.elementaryStreams;y[f.AUDIO]=null,y[f.VIDEO]=null,y[f.AUDIOVIDEO]=null},p(d,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var y=this.sn;typeof y!="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'),y=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,y)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(R.isFiniteNumber)(this.programDateTime))return null;var y=Object(R.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+y*1e3}},{key:"encrypted",get:function(){var y;return!!((y=this.decryptdata)!==null&&y!==void 0&&y.keyFormat&&this.decryptdata.uri)}}]),d}(b),m=function(n){i(d,n);function d(g,T,y,s,M){var A;A=n.call(this,y)||this,A.fragOffset=0,A.duration=0,A.gap=!1,A.independent=!1,A.relurl=void 0,A.fragment=void 0,A.index=void 0,A.stats=new a.LoadStats,A.duration=g.decimalFloatingPoint("DURATION"),A.gap=g.bool("GAP"),A.independent=g.bool("INDEPENDENT"),A.relurl=g.enumeratedString("URI"),A.fragment=T,A.index=s;var x=g.enumeratedString("BYTERANGE");return x&&A.setByteRange(x,M),M&&(A.fragOffset=M.fragOffset+M.duration),A}return p(d,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var T=this.elementaryStreams;return!!(T.audio||T.video||T.audiovideo)}}]),d}(b)},"./src/loader/key-loader.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"default",function(){return C});var R=S("./src/events.ts"),h=S("./src/errors.ts"),o=S("./src/utils/logger.ts"),C=function(){function c(i){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=i,this._registerListeners()}var a=c.prototype;return a._registerListeners=function(){this.hls.on(R.Events.KEY_LOADING,this.onKeyLoading,this)},a._unregisterListeners=function(){this.hls.off(R.Events.KEY_LOADING,this.onKeyLoading)},a.destroy=function(){this._unregisterListeners();for(var r in this.loaders){var l=this.loaders[r];l&&l.destroy()}this.loaders={}},a.onKeyLoading=function(r,l){var p=l.frag,f=p.type,b=this.loaders[f];if(!p.decryptdata){o.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var v=p.decryptdata.uri;if(v!==this.decrypturl||this.decryptkey===null){var m=this.hls.config;if(b&&(o.logger.warn("abort previous key loader for type:"+f),b.abort()),!v){o.logger.warn("key uri is falsy");return}var n=m.loader,d=p.loader=this.loaders[f]=new n(m);this.decrypturl=v,this.decryptkey=null;var g={url:v,frag:p,responseType:"arraybuffer"},T={timeout:m.fragLoadingTimeOut,maxRetry:0,retryDelay:m.fragLoadingRetryDelay,maxRetryDelay:m.fragLoadingMaxRetryTimeout,highWaterMark:0},y={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};d.load(g,T,y)}else this.decryptkey&&(p.decryptdata.key=this.decryptkey,this.hls.trigger(R.Events.KEY_LOADED,{frag:p}))},a.loadsuccess=function(r,l,p){var f=p.frag;if(!f.decryptdata){o.logger.error("after key load, decryptdata unset");return}this.decryptkey=f.decryptdata.key=new Uint8Array(r.data),f.loader=null,delete this.loaders[f.type],this.hls.trigger(R.Events.KEY_LOADED,{frag:f})},a.loaderror=function(r,l){var p=l.frag,f=p.loader;f&&f.abort(),delete this.loaders[p.type],this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:p,response:r})},a.loadtimeout=function(r,l){var p=l.frag,f=p.loader;f&&f.abort(),delete this.loaders[p.type],this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:p})},c}()},"./src/loader/level-details.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"LevelDetails",function(){return c});var R=S("./src/polyfills/number.ts");function h(a,i){for(var r=0;rl.endSN||p>0||p===0&&f>0,this.updated||this.advanced?this.misses=Math.floor(l.misses*.6):this.misses=l.misses+1,this.availabilityDelay=l.availabilityDelay},o(a,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(R.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||C}},{key:"drift",get:function(){var l=this.driftEndTime-this.driftStartTime;if(l>0){var p=this.driftEnd-this.driftStart;return p*1e3/l}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var l;return(l=this.fragments)!==null&&l!==void 0&&l.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 l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),a}()},"./src/loader/level-key.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"LevelKey",function(){return c});var R=S("./node_modules/url-toolkit/src/url-toolkit.js"),h=S.n(R);function o(a,i){for(var r=0;r2){var w=E.shift()+".";return w+=parseInt(E.shift()).toString(16),w+=("000"+parseInt(E.shift()).toString(16)).substr(-4),w}return x},M.resolve=function(x,E){return h.buildAbsoluteURL(E,x,{alwaysNormalize:!0})},M.parseMasterPlaylist=function(x,E){var w=[],_={},N=!1;p.lastIndex=0;for(var j;(j=p.exec(x))!=null;)if(j[1]){var k=new i.AttrList(j[1]),z={attrs:k,bitrate:k.decimalInteger("AVERAGE-BANDWIDTH")||k.decimalInteger("BANDWIDTH"),name:k.NAME,url:M.resolve(j[2],E)},H=k.decimalResolution("RESOLUTION");H&&(z.width=H.width,z.height=H.height),g((k.CODECS||"").split(/[ ,]+/).filter(function(G){return G}),z),z.videoCodec&&z.videoCodec.indexOf("avc1")!==-1&&(z.videoCodec=M.convertAVC1ToAVCOTI(z.videoCodec)),w.push(z)}else if(j[3]){var F=new i.AttrList(j[3]);F["DATA-ID"]&&(N=!0,_[F["DATA-ID"]]=F)}return{levels:w,sessionData:N?_:null}},M.parseMasterPlaylistMedia=function(x,E,w,_){_===void 0&&(_=[]);var N,j=[],k=0;for(f.lastIndex=0;(N=f.exec(x))!==null;){var z=new i.AttrList(N[1]);if(z.TYPE===w){var H={attrs:z,bitrate:0,id:k++,groupId:z["GROUP-ID"],instreamId:z["INSTREAM-ID"],name:z.NAME||z.LANGUAGE||"",type:w,default:z.bool("DEFAULT"),autoselect:z.bool("AUTOSELECT"),forced:z.bool("FORCED"),lang:z.LANGUAGE,url:z.URI?M.resolve(z.URI,E):""};if(_.length){var F=M.findGroup(_,H.groupId)||_[0];T(H,F,"audioCodec"),T(H,F,"textCodec")}j.push(H)}}return j},M.parseLevelPlaylist=function(x,E,w,_,N){var j=new c.LevelDetails(E),k=j.fragments,z=null,H=0,F=0,G=0,B=0,W=null,K=new C.Fragment(_,E),q,re,ee,Ce=-1,xe=!1;for(b.lastIndex=0,j.m3u8=x;(q=b.exec(x))!==null;){xe&&(xe=!1,K=new C.Fragment(_,E),K.start=G,K.sn=H,K.cc=B,K.level=w,z&&(K.initSegment=z,K.rawProgramDateTime=z.rawProgramDateTime));var he=q[1];if(he){K.duration=parseFloat(he);var ke=(" "+q[2]).slice(1);K.title=ke||null,K.tagList.push(ke?["INF",he,ke]:["INF",he])}else if(q[3])Object(R.isFiniteNumber)(K.duration)&&(K.start=G,ee&&(K.levelkey=ee),K.sn=H,K.level=w,K.cc=B,K.urlId=N,k.push(K),K.relurl=(" "+q[3]).slice(1),s(K,W),W=K,G+=K.duration,H++,F=0,xe=!0);else if(q[4]){var _e=(" "+q[4]).slice(1);W?K.setByteRange(_e,W):K.setByteRange(_e)}else if(q[5])K.rawProgramDateTime=(" "+q[5]).slice(1),K.tagList.push(["PROGRAM-DATE-TIME",K.rawProgramDateTime]),Ce===-1&&(Ce=k.length);else{if(q=q[0].match(v),!q){r.logger.warn("No matches on slow regex match for level playlist!");continue}for(re=1;re-1){r.logger.warn("Keyformat "+Qe+" is not supported from the manifest");continue}else if(Qe!=="identity")continue;Y&&(ee=a.LevelKey.fromURL(E,Z),Z&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Y)>=0&&(ee.method=Y,ee.keyFormat=Qe,De&&(ee.keyID=De),ge&&(ee.keyFormatVersions=ge),ee.iv=be));break}case"START":{var nt=new i.AttrList(ce),tt=nt.decimalFloatingPoint("TIME-OFFSET");Object(R.isFiniteNumber)(tt)&&(j.startTimeOffset=tt);break}case"MAP":{var lt=new i.AttrList(ce);K.relurl=lt.URI,lt.BYTERANGE&&K.setByteRange(lt.BYTERANGE),K.level=w,K.sn="initSegment",ee&&(K.levelkey=ee),K.initSegment=null,z=K,xe=!0;break}case"SERVER-CONTROL":{var st=new i.AttrList(ce);j.canBlockReload=st.bool("CAN-BLOCK-RELOAD"),j.canSkipUntil=st.optionalFloat("CAN-SKIP-UNTIL",0),j.canSkipDateRanges=j.canSkipUntil>0&&st.bool("CAN-SKIP-DATERANGES"),j.partHoldBack=st.optionalFloat("PART-HOLD-BACK",0),j.holdBack=st.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var je=new i.AttrList(ce);j.partTarget=je.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Re=j.partList;Re||(Re=j.partList=[]);var et=F>0?Re[Re.length-1]:void 0,ct=F++,$e=new C.Part(new i.AttrList(ce),K,E,ct,et);Re.push($e),K.duration+=$e.duration;break}case"PRELOAD-HINT":{var qe=new i.AttrList(ce);j.preloadHint=qe;break}case"RENDITION-REPORT":{var Ue=new i.AttrList(ce);j.renditionReports=j.renditionReports||[],j.renditionReports.push(Ue);break}default:r.logger.warn("line parsed but not handled: "+q);break}}}W&&!W.relurl?(k.pop(),G-=W.duration,j.partList&&(j.fragmentHint=W)):j.partList&&(s(K,W),K.cc=B,j.fragmentHint=K);var Me=k.length,Ie=k[0],ye=k[Me-1];if(G+=j.skippedSegments*j.targetduration,G>0&&Me&&ye){j.averagetargetduration=G/Me;var Te=ye.sn;j.endSN=Te!=="initSegment"?Te:0,Ie&&(j.startCC=Ie.cc,Ie.initSegment||j.fragments.every(function(Ae){return Ae.relurl&&n(Ae.relurl)})&&(r.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),K=new C.Fragment(_,E),K.relurl=ye.relurl,K.level=w,K.sn="initSegment",Ie.initSegment=K,j.needSidxRanges=!0))}else j.endSN=0,j.startCC=0;return j.fragmentHint&&(G+=j.fragmentHint.duration),j.totalduration=G,j.endCC=B,Ce>0&&y(k,Ce),j},M}();function g(M,A){["video","audio","text"].forEach(function(x){var E=M.filter(function(_){return Object(l.isCodecType)(_,x)});if(E.length){var w=E.filter(function(_){return _.lastIndexOf("avc1",0)===0||_.lastIndexOf("mp4a",0)===0});A[x+"Codec"]=w.length>0?w[0]:E[0],M=M.filter(function(_){return E.indexOf(_)===-1})}}),A.unknownCodecs=M}function T(M,A,x){var E=A[x];E&&(M[x]=E)}function y(M,A){for(var x=M[A],E=A;E--;){var w=M[E];if(!w)return;w.programDateTime=x.programDateTime-w.duration*1e3,x=w}}function s(M,A){M.rawProgramDateTime?M.programDateTime=Date.parse(M.rawProgramDateTime):A!=null&&A.programDateTime&&(M.programDateTime=A.endProgramDateTime),Object(R.isFiniteNumber)(M.programDateTime)||(M.programDateTime=null,M.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(L,u,S){"use strict";S.r(u);var R=S("./src/polyfills/number.ts"),h=S("./src/events.ts"),o=S("./src/errors.ts"),C=S("./src/utils/logger.ts"),c=S("./src/utils/mp4-tools.ts"),a=S("./src/loader/m3u8-parser.ts"),i=S("./src/types/loader.ts"),r=S("./src/utils/attr-list.ts");function l(b){var v=b.type;switch(v){case i.PlaylistContextType.AUDIO_TRACK:return i.PlaylistLevelType.AUDIO;case i.PlaylistContextType.SUBTITLE_TRACK:return i.PlaylistLevelType.SUBTITLE;default:return i.PlaylistLevelType.MAIN}}function p(b,v){var m=b.url;return(m===void 0||m.indexOf("data:")===0)&&(m=v.url),m}var f=function(){function b(m){this.hls=void 0,this.loaders=Object.create(null),this.hls=m,this.registerListeners()}var v=b.prototype;return v.registerListeners=function(){var n=this.hls;n.on(h.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(h.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(h.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.on(h.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},v.unregisterListeners=function(){var n=this.hls;n.off(h.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(h.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(h.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.off(h.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},v.createInternalLoader=function(n){var d=this.hls.config,g=d.pLoader,T=d.loader,y=g||T,s=new y(d);return n.loader=s,this.loaders[n.type]=s,s},v.getInternalLoader=function(n){return this.loaders[n.type]},v.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},v.destroyInternalLoaders=function(){for(var n in this.loaders){var d=this.loaders[n];d&&d.destroy(),this.resetInternalLoader(n)}},v.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},v.onManifestLoading=function(n,d){var g=d.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:i.PlaylistContextType.MANIFEST,url:g,deliveryDirectives:null})},v.onLevelLoading=function(n,d){var g=d.id,T=d.level,y=d.url,s=d.deliveryDirectives;this.load({id:g,groupId:null,level:T,responseType:"text",type:i.PlaylistContextType.LEVEL,url:y,deliveryDirectives:s})},v.onAudioTrackLoading=function(n,d){var g=d.id,T=d.groupId,y=d.url,s=d.deliveryDirectives;this.load({id:g,groupId:T,level:null,responseType:"text",type:i.PlaylistContextType.AUDIO_TRACK,url:y,deliveryDirectives:s})},v.onSubtitleTrackLoading=function(n,d){var g=d.id,T=d.groupId,y=d.url,s=d.deliveryDirectives;this.load({id:g,groupId:T,level:null,responseType:"text",type:i.PlaylistContextType.SUBTITLE_TRACK,url:y,deliveryDirectives:s})},v.load=function(n){var d,g=this.hls.config,T=this.getInternalLoader(n);if(T){var y=T.context;if(y&&y.url===n.url){C.logger.trace("[playlist-loader]: playlist request ongoing");return}C.logger.log("[playlist-loader]: aborting previous loader for type: "+n.type),T.abort()}var s,M,A,x;switch(n.type){case i.PlaylistContextType.MANIFEST:s=g.manifestLoadingMaxRetry,M=g.manifestLoadingTimeOut,A=g.manifestLoadingRetryDelay,x=g.manifestLoadingMaxRetryTimeout;break;case i.PlaylistContextType.LEVEL:case i.PlaylistContextType.AUDIO_TRACK:case i.PlaylistContextType.SUBTITLE_TRACK:s=0,M=g.levelLoadingTimeOut;break;default:s=g.levelLoadingMaxRetry,M=g.levelLoadingTimeOut,A=g.levelLoadingRetryDelay,x=g.levelLoadingMaxRetryTimeout;break}if(T=this.createInternalLoader(n),(d=n.deliveryDirectives)!==null&&d!==void 0&&d.part){var E;if(n.type===i.PlaylistContextType.LEVEL&&n.level!==null?E=this.hls.levels[n.level].details:n.type===i.PlaylistContextType.AUDIO_TRACK&&n.id!==null?E=this.hls.audioTracks[n.id].details:n.type===i.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(E=this.hls.subtitleTracks[n.id].details),E){var w=E.partTarget,_=E.targetduration;w&&_&&(M=Math.min(Math.max(w*3,_*.8)*1e3,M))}}var N={timeout:M,maxRetry:s,retryDelay:A,maxRetryDelay:x,highWaterMark:0},j={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};T.load(n,N,j)},v.loadsuccess=function(n,d,g,T){if(T===void 0&&(T=null),g.isSidxRequest){this.handleSidxRequest(n,g),this.handlePlaylistLoaded(n,d,g,T);return}this.resetInternalLoader(g.type);var y=n.data;if(y.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,g,"no EXTM3U delimiter",T);return}d.parsing.start=performance.now(),y.indexOf("#EXTINF:")>0||y.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,d,g,T):this.handleMasterPlaylist(n,d,g,T)},v.loaderror=function(n,d,g){g===void 0&&(g=null),this.handleNetworkError(d,g,!1,n)},v.loadtimeout=function(n,d,g){g===void 0&&(g=null),this.handleNetworkError(d,g,!0)},v.handleMasterPlaylist=function(n,d,g,T){var y=this.hls,s=n.data,M=p(n,g),A=a.default.parseMasterPlaylist(s,M),x=A.levels,E=A.sessionData;if(!x.length){this.handleManifestParsingError(n,g,"no level found in manifest",T);return}var w=x.map(function(H){return{id:H.attrs.AUDIO,audioCodec:H.audioCodec}}),_=x.map(function(H){return{id:H.attrs.SUBTITLES,textCodec:H.textCodec}}),N=a.default.parseMasterPlaylistMedia(s,M,"AUDIO",w),j=a.default.parseMasterPlaylistMedia(s,M,"SUBTITLES",_),k=a.default.parseMasterPlaylistMedia(s,M,"CLOSED-CAPTIONS");if(N.length){var z=N.some(function(H){return!H.url});!z&&x[0].audioCodec&&!x[0].attrs.AUDIO&&(C.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),N.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new r.AttrList({}),bitrate:0,url:""}))}y.trigger(h.Events.MANIFEST_LOADED,{levels:x,audioTracks:N,subtitles:j,captions:k,url:M,stats:d,networkDetails:T,sessionData:E})},v.handleTrackOrLevelPlaylist=function(n,d,g,T){var y=this.hls,s=g.id,M=g.level,A=g.type,x=p(n,g),E=Object(R.isFiniteNumber)(s)?s:0,w=Object(R.isFiniteNumber)(M)?M:E,_=l(g),N=a.default.parseLevelPlaylist(n.data,x,w,_,E);if(!N.fragments.length){y.trigger(h.Events.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:x,reason:"no fragments found in level",level:typeof g.level=="number"?g.level:void 0});return}if(A===i.PlaylistContextType.MANIFEST){var j={attrs:new r.AttrList({}),bitrate:0,details:N,name:"",url:x};y.trigger(h.Events.MANIFEST_LOADED,{levels:[j],audioTracks:[],url:x,stats:d,networkDetails:T,sessionData:null})}if(d.parsing.end=performance.now(),N.needSidxRanges){var k,z=(k=N.fragments[0].initSegment)===null||k===void 0?void 0:k.url;this.load({url:z,isSidxRequest:!0,type:A,level:M,levelDetails:N,id:s,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}g.levelDetails=N,this.handlePlaylistLoaded(n,d,g,T)},v.handleSidxRequest=function(n,d){var g=Object(c.parseSegmentIndex)(new Uint8Array(n.data));if(!g)return;var T=g.references,y=d.levelDetails;T.forEach(function(s,M){var A=s.info,x=y.fragments[M];x.byteRange.length===0&&x.setByteRange(String(1+A.end-A.start)+"@"+String(A.start)),x.initSegment&&x.initSegment.setByteRange(String(g.moovEndOffset)+"@0")})},v.handleManifestParsingError=function(n,d,g,T){this.hls.trigger(h.Events.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:d.type===i.PlaylistContextType.MANIFEST,url:n.url,reason:g,response:n,context:d,networkDetails:T})},v.handleNetworkError=function(n,d,g,T){g===void 0&&(g=!1),C.logger.warn("[playlist-loader]: A network "+(g?"timeout":"error")+" occurred while loading "+n.type+" level: "+n.level+" id: "+n.id+' group-id: "'+n.groupId+'"');var y=o.ErrorDetails.UNKNOWN,s=!1,M=this.getInternalLoader(n);switch(n.type){case i.PlaylistContextType.MANIFEST:y=g?o.ErrorDetails.MANIFEST_LOAD_TIMEOUT:o.ErrorDetails.MANIFEST_LOAD_ERROR,s=!0;break;case i.PlaylistContextType.LEVEL:y=g?o.ErrorDetails.LEVEL_LOAD_TIMEOUT:o.ErrorDetails.LEVEL_LOAD_ERROR,s=!1;break;case i.PlaylistContextType.AUDIO_TRACK:y=g?o.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,s=!1;break;case i.PlaylistContextType.SUBTITLE_TRACK:y=g?o.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:o.ErrorDetails.SUBTITLE_LOAD_ERROR,s=!1;break}M&&this.resetInternalLoader(n.type);var A={type:o.ErrorTypes.NETWORK_ERROR,details:y,fatal:s,url:n.url,loader:M,context:n,networkDetails:d};T&&(A.response=T),this.hls.trigger(h.Events.ERROR,A)},v.handlePlaylistLoaded=function(n,d,g,T){var y=g.type,s=g.level,M=g.id,A=g.groupId,x=g.loader,E=g.levelDetails,w=g.deliveryDirectives;if(!(E!=null&&E.targetduration)){this.handleManifestParsingError(n,g,"invalid target duration",T);return}if(!x)return;E.live&&(x.getCacheAge&&(E.ageHeader=x.getCacheAge()||0),(!x.getCacheAge||isNaN(E.ageHeader))&&(E.ageHeader=0));switch(y){case i.PlaylistContextType.MANIFEST:case i.PlaylistContextType.LEVEL:this.hls.trigger(h.Events.LEVEL_LOADED,{details:E,level:s||0,id:M||0,stats:d,networkDetails:T,deliveryDirectives:w});break;case i.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(h.Events.AUDIO_TRACK_LOADED,{details:E,id:M||0,groupId:A||"",stats:d,networkDetails:T,deliveryDirectives:w});break;case i.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(h.Events.SUBTITLE_TRACK_LOADED,{details:E,id:M||0,groupId:A||"",stats:d,networkDetails:T,deliveryDirectives:w});break}},b}();u.default=f},"./src/polyfills/number.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"isFiniteNumber",function(){return R}),S.d(u,"MAX_SAFE_INTEGER",function(){return h});var R=Number.isFinite||function(o){return typeof o=="number"&&isFinite(o)},h=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(L,u,S){"use strict";S.r(u);var R=function(){function h(){}return h.getSilentFrame=function(C,c){switch(C){case"mp4a.40.2":if(c===1)return new Uint8Array([0,200,0,128,35,128]);if(c===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(c===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(c===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(c===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(c===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(c===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(c===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(c===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},h}();u.default=R},"./src/remux/mp4-generator.ts":function(L,u,S){"use strict";S.r(u);var R=Math.pow(2,32)-1,h=function(){function o(){}return o.init=function(){o.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 c;for(c in o.types)o.types.hasOwnProperty(c)&&(o.types[c]=[c.charCodeAt(0),c.charCodeAt(1),c.charCodeAt(2),c.charCodeAt(3)]);var a=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]),i=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]);o.HDLR_TYPES={video:a,audio:i};var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),l=new Uint8Array([0,0,0,0,0,0,0,0]);o.STTS=o.STSC=o.STCO=l,o.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),o.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),o.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),o.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var p=new Uint8Array([105,115,111,109]),f=new Uint8Array([97,118,99,49]),b=new Uint8Array([0,0,0,1]);o.FTYP=o.box(o.types.ftyp,p,b,p,f),o.DINF=o.box(o.types.dinf,o.box(o.types.dref,r))},o.box=function(c){for(var a=8,i=arguments.length,r=new Array(i>1?i-1:0),l=1;l>24&255,b[1]=a>>16&255,b[2]=a>>8&255,b[3]=a&255,b.set(c,4),p=0,a=8;p>24&255,c>>16&255,c>>8&255,c&255,i>>24,i>>16&255,i>>8&255,i&255,r>>24,r>>16&255,r>>8&255,r&255,85,196,0,0]))},o.mdia=function(c){return o.box(o.types.mdia,o.mdhd(c.timescale,c.duration),o.hdlr(c.type),o.minf(c))},o.mfhd=function(c){return o.box(o.types.mfhd,new Uint8Array([0,0,0,0,c>>24,c>>16&255,c>>8&255,c&255]))},o.minf=function(c){return c.type==="audio"?o.box(o.types.minf,o.box(o.types.smhd,o.SMHD),o.DINF,o.stbl(c)):o.box(o.types.minf,o.box(o.types.vmhd,o.VMHD),o.DINF,o.stbl(c))},o.moof=function(c,a,i){return o.box(o.types.moof,o.mfhd(c),o.traf(i,a))},o.moov=function(c){for(var a=c.length,i=[];a--;)i[a]=o.trak(c[a]);return o.box.apply(null,[o.types.moov,o.mvhd(c[0].timescale,c[0].duration)].concat(i).concat(o.mvex(c)))},o.mvex=function(c){for(var a=c.length,i=[];a--;)i[a]=o.trex(c[a]);return o.box.apply(null,[o.types.mvex].concat(i))},o.mvhd=function(c,a){a*=c;var i=Math.floor(a/(R+1)),r=Math.floor(a%(R+1)),l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,c>>24&255,c>>16&255,c>>8&255,c&255,i>>24,i>>16&255,i>>8&255,i&255,r>>24,r>>16&255,r>>8&255,r&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 o.box(o.types.mvhd,l)},o.sdtp=function(c){var a=c.samples||[],i=new Uint8Array(4+a.length),r,l;for(r=0;r>>8&255),a.push(p&255),a=a.concat(Array.prototype.slice.call(l));for(r=0;r>>8&255),i.push(p&255),i=i.concat(Array.prototype.slice.call(l));var f=o.box(o.types.avcC,new Uint8Array([1,a[3],a[4],a[5],252|3,224|c.sps.length].concat(a).concat([c.pps.length]).concat(i))),b=c.width,v=c.height,m=c.pixelRatio[0],n=c.pixelRatio[1];return o.box(o.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,b>>8&255,b&255,v>>8&255,v&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]),f,o.box(o.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),o.box(o.types.pasp,new Uint8Array([m>>24,m>>16&255,m>>8&255,m&255,n>>24,n>>16&255,n>>8&255,n&255])))},o.esds=function(c){var a=c.config.length;return new Uint8Array([0,0,0,0,3,23+a,0,1,0,4,15+a,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([a]).concat(c.config).concat([6,1,2]))},o.mp4a=function(c){var a=c.samplerate;return o.box(o.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,c.channelCount,0,16,0,0,0,0,a>>8&255,a&255,0,0]),o.box(o.types.esds,o.esds(c)))},o.mp3=function(c){var a=c.samplerate;return o.box(o.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,c.channelCount,0,16,0,0,0,0,a>>8&255,a&255,0,0]))},o.stsd=function(c){return c.type==="audio"?!c.isAAC&&c.codec==="mp3"?o.box(o.types.stsd,o.STSD,o.mp3(c)):o.box(o.types.stsd,o.STSD,o.mp4a(c)):o.box(o.types.stsd,o.STSD,o.avc1(c))},o.tkhd=function(c){var a=c.id,i=c.duration*c.timescale,r=c.width,l=c.height,p=Math.floor(i/(R+1)),f=Math.floor(i%(R+1));return o.box(o.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,a>>24&255,a>>16&255,a>>8&255,a&255,0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,f>>24,f>>16&255,f>>8&255,f&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,r>>8&255,r&255,0,0,l>>8&255,l&255,0,0]))},o.traf=function(c,a){var i=o.sdtp(c),r=c.id,l=Math.floor(a/(R+1)),p=Math.floor(a%(R+1));return o.box(o.types.traf,o.box(o.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),o.box(o.types.tfdt,new Uint8Array([1,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,p>>24,p>>16&255,p>>8&255,p&255])),o.trun(c,i.length+16+20+8+16+8+8),i)},o.trak=function(c){return c.duration=c.duration||4294967295,o.box(o.types.trak,o.tkhd(c),o.mdia(c))},o.trex=function(c){var a=c.id;return o.box(o.types.trex,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,a&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},o.trun=function(c,a){var i=c.samples||[],r=i.length,l=12+16*r,p=new Uint8Array(l),f,b,v,m,n,d;for(a+=8+l,p.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,a>>>24&255,a>>>16&255,a>>>8&255,a&255],0),f=0;f>>24&255,v>>>16&255,v>>>8&255,v&255,m>>>24&255,m>>>16&255,m>>>8&255,m&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.paddingValue<<1|n.isNonSync,n.degradPrio&240<<8,n.degradPrio&15,d>>>24&255,d>>>16&255,d>>>8&255,d&255],12+16*f);return o.box(o.types.trun,p)},o.initSegment=function(c){o.types||o.init();var a=o.moov(c),i=new Uint8Array(o.FTYP.byteLength+a.byteLength);return i.set(o.FTYP),i.set(a,o.FTYP.byteLength),i},o}();h.types=void 0,h.HDLR_TYPES=void 0,h.STTS=void 0,h.STSC=void 0,h.STCO=void 0,h.STSZ=void 0,h.VMHD=void 0,h.SMHD=void 0,h.STSD=void 0,h.FTYP=void 0,h.DINF=void 0,u.default=h},"./src/remux/mp4-remuxer.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"default",function(){return d}),S.d(u,"normalizePts",function(){return g});var R=S("./src/polyfills/number.ts"),h=S("./src/remux/aac-helper.ts"),o=S("./src/remux/mp4-generator.ts"),C=S("./src/events.ts"),c=S("./src/errors.ts"),a=S("./src/utils/logger.ts"),i=S("./src/types/loader.ts"),r=S("./src/utils/timescale-conversion.ts");function l(){return l=Object.assign||function(M){for(var A=1;A0?N:j.pts},E[0].pts);return w&&a.logger.debug("PTS rollover detected"),_},A.remux=function(E,w,_,N,j,k,z,H){var F,G,B,W,K,q,re=j,ee=j,Ce=E.pid>-1,xe=w.pid>-1,he=w.samples.length,ke=E.samples.length>0,_e=he>1,de=(!Ce||ke)&&(!xe||_e)||this.ISGenerated||z;if(de){this.ISGenerated||(B=this.generateIS(E,w,j));var ce=this.isVideoContiguous,ae=-1;if(_e&&(ae=T(w.samples),!ce&&this.config.forceKeyFrameOnDiscontinuity))if(q=!0,ae>0){a.logger.warn("[mp4-remuxer]: Dropped "+ae+" out of "+he+" video samples due to a missing keyframe");var Se=this.getVideoStartPts(w.samples);w.samples=w.samples.slice(ae),w.dropped+=ae,ee+=(w.samples[0].pts-Se)/(w.timescale||9e4)}else ae===-1&&(a.logger.warn("[mp4-remuxer]: No keyframe found out of "+he+" video samples"),q=!1);if(this.ISGenerated){if(ke&&_e){var te=this.getVideoStartPts(w.samples),ue=g(E.samples[0].pts,te)-te,Oe=ue/w.inputTimeScale;re+=Math.max(0,Oe),ee+=Math.max(0,-Oe)}if(ke){if(E.samplerate||(a.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),B=this.generateIS(E,w,j)),G=this.remuxAudio(E,re,this.isAudioContiguous,k,xe||_e||H===i.PlaylistLevelType.AUDIO?ee:void 0),_e){var le=G?G.endPTS-G.startPTS:0;w.inputTimeScale||(a.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),B=this.generateIS(E,w,j)),F=this.remuxVideo(w,ee,ce,le)}}else _e&&(F=this.remuxVideo(w,ee,ce,0));F&&(F.firstKeyFrame=ae,F.independent=ae!==-1)}}return this.ISGenerated&&(_.samples.length&&(K=this.remuxID3(_,j)),N.samples.length&&(W=this.remuxText(N,j))),{audio:G,video:F,initSegment:B,independent:q,text:W,id3:K}},A.generateIS=function(E,w,_){var N=E.samples,j=w.samples,k=this.typeSupported,z={},H=!Object(R.isFiniteNumber)(this._initPTS),F="audio/mp4",G,B,W;if(H&&(G=B=Infinity),E.config&&N.length&&(E.timescale=E.samplerate,E.isAAC||(k.mpeg?(F="audio/mpeg",E.codec=""):k.mp3&&(E.codec="mp3")),z.audio={id:"audio",container:F,codec:E.codec,initSegment:!E.isAAC&&k.mpeg?new Uint8Array(0):o.default.initSegment([E]),metadata:{channelCount:E.channelCount}},H&&(W=E.inputTimeScale,G=B=N[0].pts-Math.round(W*_))),w.sps&&w.pps&&j.length&&(w.timescale=w.inputTimeScale,z.video={id:"main",container:"video/mp4",codec:w.codec,initSegment:o.default.initSegment([w]),metadata:{width:w.width,height:w.height}},H)){W=w.inputTimeScale;var K=this.getVideoStartPts(j),q=Math.round(W*_);B=Math.min(B,g(j[0].dts,K)-q),G=Math.min(G,K-q)}if(Object.keys(z).length)return this.ISGenerated=!0,H&&(this._initPTS=G,this._initDTS=B),{tracks:z,initPTS:G,timescale:W}},A.remuxVideo=function(E,w,_,N){var j=E.inputTimeScale,k=E.samples,z=[],H=k.length,F=this._initPTS,G=this.nextAvcDts,B=8,W,K,q,re=Number.POSITIVE_INFINITY,ee=Number.NEGATIVE_INFINITY,Ce=0,xe=!1;if(!_||G===null){var he=w*j,ke=k[0].pts-g(k[0].dts,k[0].pts);G=he-ke}for(var _e=0;_ede.pts){var ce=9e4*.2;Ce=Math.max(Math.min(Ce,de.pts-de.dts),-1*ce)}de.dts0?_e-1:_e].dts&&(xe=!0)}xe&&k.sort(function(At,Ot){var bt=At.dts-Ot.dts,Vt=At.pts-Ot.pts;return bt||Vt}),K=k[0].dts,q=k[k.length-1].dts;var ae=Math.round((q-K)/(H-1));if(Ce<0){if(Ceae,Q=Oe<-1;if(le||Q){le?a.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(Oe,!0)+" ms ("+Oe+"dts) hole between fragments detected, filling it"):a.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(-Oe,!0)+" ms ("+Oe+"dts) overlapping between fragments detected"),K=G;var Y=k[0].pts-Oe;k[0].dts=K,k[0].pts=Y,a.logger.log("Video: First PTS/DTS adjusted: "+Object(r.toMsFromMpegTsClock)(Y,!0)+"/"+Object(r.toMsFromMpegTsClock)(K,!0)+", delta: "+Object(r.toMsFromMpegTsClock)(Oe,!0)+" ms")}}n&&(K=Math.max(0,K));for(var Z=0,be=0,ge=0;ge0?Re-1:Re].dts;if(Te.stretchShortVideoTrack&&this.nextAudioPts!==null){var Pe=Math.floor(Te.maxBufferHole*j),Xe=(N?re+N*j:this.nextAudioPts)-et.pts;Xe>Pe?(W=Xe-Ae,W<0&&(W=Ae),a.logger.log("[mp4-remuxer]: It is approximately "+Xe/90+" ms to the next segment; using duration "+W/90+" ms for the last video frame.")):W=Ae}else W=Ae}var rt=Math.round(et.pts-et.dts);z.push(new y(et.key,W,$e,rt))}if(z.length&&v&&v<70){var ft=z[0].flags;ft.dependsOn=2,ft.isNonSync=0}console.assert(W!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=G=q+W,this.isVideoContiguous=!0;var St=o.default.moof(E.sequenceNumber++,K,l({},E,{samples:z})),Pt="video",dt={data1:St,data2:st,startPTS:re/j,endPTS:(ee+W)/j,startDTS:K/j,endDTS:G/j,type:Pt,hasAudio:!1,hasVideo:!0,nb:z.length,dropped:E.dropped};return E.samples=[],E.dropped=0,console.assert(st.length,"MDAT length must not be zero"),dt},A.remuxAudio=function(E,w,_,N,j){var k=E.inputTimeScale,z=E.samplerate?E.samplerate:k,H=k/z,F=E.isAAC?f:b,G=F*H,B=this._initPTS,W=!E.isAAC&&this.typeSupported.mpeg,K=[],q=E.samples,re=W?0:8,ee=this.nextAudioPts||-1,Ce=w*k;if(this.isAudioContiguous=_=_||q.length&&ee>0&&(N&&Math.abs(Ce-ee)<9e3||Math.abs(g(q[0].pts-B,Ce)-ee)<20*G),q.forEach(function(Ie){Ie.pts=g(Ie.pts-B,Ce)}),!_||ee<0){if(q=q.filter(function(Ie){return Ie.pts>=0}),!q.length)return;j===0?ee=0:N?ee=Math.max(0,Ce):ee=q[0].pts}if(E.isAAC)for(var xe=j!==void 0,he=this.config.maxAudioFramesDrift,ke=0,_e=ee;ke=he*G&&Se0){be+=re;try{Z=new Uint8Array(be)}catch(Ie){this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:c.ErrorTypes.MUX_ERROR,details:c.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:be,reason:"fail allocating audio mdat "+be});return}if(!W){var st=new DataView(Z.buffer);st.setUint32(0,be),Z.set(o.default.types.mdat,4)}}else return;Z.set(nt,re);var je=nt.byteLength;re+=je,K.push(new y(!0,F,je,0)),Y=tt}var Re=K.length;if(!Re)return;var et=K[K.length-1];this.nextAudioPts=ee=Y+H*et.duration;var ct=W?new Uint8Array(0):o.default.moof(E.sequenceNumber++,Q/H,l({},E,{samples:K}));E.samples=[];var $e=Q/k,qe=ee/k,Ue="audio",Me={data1:ct,data2:Z,startPTS:$e,endPTS:qe,startDTS:$e,endDTS:qe,type:Ue,hasAudio:!0,hasVideo:!1,nb:Re};return this.isAudioContiguous=!0,console.assert(Z.length,"MDAT length must not be zero"),Me},A.remuxEmptyAudio=function(E,w,_,N){var j=E.inputTimeScale,k=E.samplerate?E.samplerate:j,z=j/k,H=this.nextAudioPts,F=(H!==null?H:N.startDTS*j)+this._initDTS,G=N.endDTS*j+this._initDTS,B=z*f,W=Math.ceil((G-F)/B),K=h.default.getSilentFrame(E.manifestCodec||E.codec,E.channelCount);if(a.logger.warn("[mp4-remuxer]: remux empty Audio"),!K){a.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var q=[],re=0;re4294967296;)M+=x;return M}function T(M){for(var A=0;A0?this.lastEndDTS=E:(C.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var w=!!M.audio,_=!!M.video,N="";w&&(N+="audio"),_&&(N+="video");var j={data1:y,startPTS:x,startDTS:x,endPTS:E,endDTS:E,type:N,hasAudio:w,hasVideo:_,nb:1,dropped:0};return T.audio=j.type==="audio"?j:void 0,T.video=j.type!=="audio"?j:void 0,T.text=m,T.id3=v,T.initSegment=s,T},r}(),a=function(l,p,f){return Object(h.getStartDTS)(l,p)-f};function i(r,l){var p=r==null?void 0:r.codec;return p&&p.length>4?p:p==="hvc1"?"hvc1.1.c.L120.90":p==="av01"?"av01.0.04M.08":p==="avc1"||l===o.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}u.default=c},"./src/task-loop.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"default",function(){return R});var R=function(){function h(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var o=h.prototype;return o.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},o.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},o.onHandlerDestroyed=function(){},o.hasInterval=function(){return!!this._tickInterval},o.hasNextTick=function(){return!!this._tickTimer},o.setInterval=function(c){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,c),!0)},o.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},o.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},o.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},o.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},o.doTick=function(){},h}()},"./src/types/cmcd.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"CMCDVersion",function(){return R}),S.d(u,"CMCDObjectType",function(){return h}),S.d(u,"CMCDStreamingFormat",function(){return o}),S.d(u,"CMCDStreamType",function(){return C});var R=1,h;(function(c){c.MANIFEST="m",c.AUDIO="a",c.VIDEO="v",c.MUXED="av",c.INIT="i",c.CAPTION="c",c.TIMED_TEXT="tt",c.KEY="k",c.OTHER="o"})(h||(h={}));var o;(function(c){c.DASH="d",c.HLS="h",c.SMOOTH="s",c.OTHER="o"})(o||(o={}));var C;(function(c){c.VOD="v",c.LIVE="l"})(C||(C={}))},"./src/types/level.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"HlsSkip",function(){return o}),S.d(u,"getSkipValue",function(){return C}),S.d(u,"HlsUrlParameters",function(){return c}),S.d(u,"Level",function(){return a});function R(i,r){for(var l=0;lNumber.MAX_SAFE_INTEGER?Infinity:r},c.hexadecimalInteger=function(i){if(this[i]){var r=(this[i]||"0x").slice(2);r=(r.length&1?"0":"")+r;for(var l=new Uint8Array(r.length/2),p=0;pNumber.MAX_SAFE_INTEGER?Infinity:r},c.decimalFloatingPoint=function(i){return parseFloat(this[i])},c.optionalFloat=function(i,r){var l=this[i];return l?parseFloat(l):r},c.enumeratedString=function(i){return this[i]},c.bool=function(i){return this[i]==="YES"},c.decimalResolution=function(i){var r=R.exec(this[i]);return r===null?void 0:{width:parseInt(r[1],10),height:parseInt(r[2],10)}},C.parseAttrList=function(i){var r,l={},p='"';for(h.lastIndex=0;(r=h.exec(i))!==null;){var f=r[2];f.indexOf(p)===0&&f.lastIndexOf(p)===f.length-1&&(f=f.slice(1,-1)),l[r[1]]=f}return l},C}()},"./src/utils/binary-search.ts":function(L,u,S){"use strict";S.r(u);var R={search:function(o,C){for(var c=0,a=o.length-1,i=null,r=null;c<=a;){i=(c+a)/2|0,r=o[i];var l=C(r);if(l>0)c=i+1;else if(l<0)a=i-1;else return r}return null}};u.default=R},"./src/utils/buffer-helper.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"BufferHelper",function(){return o});var R=S("./src/utils/logger.ts"),h={length:0,start:function(){return 0},end:function(){return 0}},o=function(){function C(){}return C.isBuffered=function(a,i){try{if(a){for(var r=C.getBuffered(a),l=0;l=r.start(l)&&i<=r.end(l))return!0}}catch(p){}return!1},C.bufferInfo=function(a,i,r){try{if(a){var l=C.getBuffered(a),p=[],f;for(f=0;fb&&(l[f-1].end=a[p].end):l.push(a[p])}else l.push(a[p])}else l=a;for(var v=0,m,n=i,d=i,g=0;g=T&&i=_&&R.logger.log(this.time+" ["+_+"] "+N)},x}(),v=function(E){for(var w=[],_=0;_c&&(this.logger.log(f.DEBUG,"Too large cursor position "+this.pos),this.pos=c)},E.moveCursor=function(_){var N=this.pos+_;if(_>1)for(var j=this.pos+1;j=144&&this.backSpace();var N=o(_);if(this.pos>=c){this.logger.log(f.ERROR,"Cannot insert "+_.toString(16)+" ("+N+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(N,this.currPenState),this.moveCursor(1)},E.clearFromPos=function(_){var N;for(N=_;N0&&(_?j="["+N.join(" | ")+"]":j=N.join(` `)),j},E.getTextAndFormat=function(){return this.rows},x}(),T=function(){function x(w,_,N){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=w,this.outputFilter=_,this.mode=null,this.verbose=0,this.displayedMemory=new g(N),this.nonDisplayedMemory=new g(N),this.lastOutputScreen=new g(N),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=N}var E=x.prototype;return E.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},E.getHandler=function(){return this.outputFilter},E.setHandler=function(_){this.outputFilter=_},E.setPAC=function(_){this.writeScreen.setPAC(_)},E.setBkgData=function(_){this.writeScreen.setBkgData(_)},E.setMode=function(_){if(_===this.mode)return;this.mode=_,this.logger.log(f.INFO,"MODE="+_),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=_},E.insertChars=function(_){for(var N=0;N<_.length;N++)this.writeScreen.insertChar(_[N]);var j=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(f.INFO,j+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(f.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},E.ccRCL=function(){this.logger.log(f.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},E.ccBS=function(){if(this.logger.log(f.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},E.ccAOF=function(){},E.ccAON=function(){},E.ccDER=function(){this.logger.log(f.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},E.ccRU=function(_){this.logger.log(f.INFO,"RU("+_+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(_)},E.ccFON=function(){this.logger.log(f.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},E.ccRDC=function(){this.logger.log(f.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},E.ccTR=function(){this.logger.log(f.INFO,"TR"),this.setMode("MODE_TEXT")},E.ccRTD=function(){this.logger.log(f.INFO,"RTD"),this.setMode("MODE_TEXT")},E.ccEDM=function(){this.logger.log(f.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},E.ccCR=function(){this.logger.log(f.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},E.ccENM=function(){this.logger.log(f.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},E.ccEOC=function(){if(this.logger.log(f.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var _=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=_,this.writeScreen=this.nonDisplayedMemory,this.logger.log(f.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},E.ccTO=function(_){this.logger.log(f.INFO,"TO("+_+") - Tab Offset"),this.writeScreen.moveCursor(_)},E.ccMIDROW=function(_){var N={flash:!1};if(N.underline=_%2===1,N.italics=_>=46,N.italics)N.foreground="white";else{var j=Math.floor(_/2)-16,k=["white","green","blue","cyan","red","yellow","magenta"];N.foreground=k[j]}this.logger.log(f.INFO,"MIDROW: "+JSON.stringify(N)),this.writeScreen.setPen(N)},E.outputDataUpdate=function(_){_===void 0&&(_=!1);var N=this.logger.time;if(N===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=N:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,N,this.lastOutputScreen),_&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:N),this.lastOutputScreen.copy(this.displayedMemory))},E.cueSplitAtTime=function(_){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,_,this.displayedMemory),this.cueStartTime=_))},x}(),y=function(){function x(w,_,N){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var j=new b;this.channels=[null,new T(w,_,j),new T(w+1,N,j)],this.cmdHistory=A(),this.logger=j}var E=x.prototype;return E.getHandler=function(_){return this.channels[_].getHandler()},E.setHandler=function(_,N){this.channels[_].setHandler(N)},E.addData=function(_,N){var j,k,z,H=!1;this.logger.time=_;for(var F=0;F ("+v([k,z])+")"),j=this.parseCmd(k,z),j||(j=this.parseMidrow(k,z)),j||(j=this.parsePAC(k,z)),j||(j=this.parseBackgroundAttributes(k,z)),!j&&(H=this.parseChars(k,z),H)){var G=this.currentChannel;if(G&&G>0){var B=this.channels[G];B.insertChars(H)}else this.logger.log(f.WARNING,"No channel found yet. TEXT-MODE?")}!j&&!H&&this.logger.log(f.WARNING,"Couldn't parse cleaned data "+v([k,z])+" orig: "+v([N[F],N[F+1]]))}},E.parseCmd=function(_,N){var j=this.cmdHistory,k=(_===20||_===28||_===21||_===29)&&N>=32&&N<=47,z=(_===23||_===31)&&N>=33&&N<=35;if(!(k||z))return!1;if(M(_,N,j))return s(null,null,j),this.logger.log(f.DEBUG,"Repeated command ("+v([_,N])+") is dropped"),!0;var H=_===20||_===21||_===23?1:2,F=this.channels[H];return _===20||_===21||_===28||_===29?N===32?F.ccRCL():N===33?F.ccBS():N===34?F.ccAOF():N===35?F.ccAON():N===36?F.ccDER():N===37?F.ccRU(2):N===38?F.ccRU(3):N===39?F.ccRU(4):N===40?F.ccFON():N===41?F.ccRDC():N===42?F.ccTR():N===43?F.ccRTD():N===44?F.ccEDM():N===45?F.ccCR():N===46?F.ccENM():N===47&&F.ccEOC():F.ccTO(N-32),s(_,N,j),this.currentChannel=H,!0},E.parseMidrow=function(_,N){var j=0;if((_===17||_===25)&&N>=32&&N<=47){if(_===17?j=1:j=2,j!==this.currentChannel)return this.logger.log(f.ERROR,"Mismatch channel in midrow parsing"),!1;var k=this.channels[j];return k?(k.ccMIDROW(N),this.logger.log(f.DEBUG,"MIDROW ("+v([_,N])+")"),!0):!1}return!1},E.parsePAC=function(_,N){var j,k=this.cmdHistory,z=(_>=17&&_<=23||_>=25&&_<=31)&&N>=64&&N<=127,H=(_===16||_===24)&&N>=64&&N<=95;if(!(z||H))return!1;if(M(_,N,k))return s(null,null,k),!0;var F=_<=23?1:2;N>=64&&N<=95?j=F===1?a[_]:r[_]:j=F===1?i[_]:l[_];var G=this.channels[F];return G?(G.setPAC(this.interpretPAC(j,N)),s(_,N,k),this.currentChannel=F,!0):!1},E.interpretPAC=function(_,N){var j,k={color:null,italics:!1,indent:null,underline:!1,row:_};return N>95?j=N-96:j=N-64,k.underline=(j&1)===1,j<=13?k.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(j/2)]:j<=15?(k.italics=!0,k.color="white"):k.indent=Math.floor((j-16)/2)*4,k},E.parseChars=function(_,N){var j,k=null,z=null;if(_>=25?(j=2,z=_-8):(j=1,z=_),z>=17&&z<=19){var H;z===17?H=N+80:z===18?H=N+112:H=N+144,this.logger.log(f.INFO,"Special char '"+o(H)+"' in channel "+j),k=[H]}else _>=32&&_<=127&&(k=N===0?[_]:[_,N]);if(k){var F=v(k);this.logger.log(f.DEBUG,"Char codes = "+F.join(",")),s(_,N,this.cmdHistory)}return k},E.parseBackgroundAttributes=function(_,N){var j=(_===16||_===24)&&N>=32&&N<=47,k=(_===23||_===31)&&N>=45&&N<=47;if(!(j||k))return!1;var z,H={};_===16||_===24?(z=Math.floor((N-32)/2),H.background=p[z],N%2===1&&(H.background=H.background+"_semi")):N===45?H.background="transparent":(H.foreground="black",N===47&&(H.underline=!0));var F=_<=23?1:2,G=this.channels[F];return G.setBkgData(H),s(_,N,this.cmdHistory),!0},E.reset=function(){for(var _=0;_=16?n--:n++;var s=Object(R.fixLineBreaks)(d.trim()),M=Object(h.generateCueId)(r,l,s);(!i||!i.cues||!i.cues.getCueById(M))&&(v=new g(r,l,s),v.id=M,v.line=T+1,v.align="left",v.position=10+Math.min(80,Math.floor(n*8/32)*10),f.push(v))}return i&&f.length&&(f.sort(function(A,x){return A.line==="auto"||x.line==="auto"?0:A.line>8&&x.line>8?x.line-A.line:A.line-x.line}),f.forEach(function(A){return Object(o.addCueToTrack)(i,A)})),f}};u.default=c},"./src/utils/discontinuities.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"findFirstFragWithCC",function(){return C}),S.d(u,"shouldAlignOnDiscontinuities",function(){return c}),S.d(u,"findDiscontinuousReferenceFrag",function(){return a}),S.d(u,"adjustSlidingStart",function(){return r}),S.d(u,"alignStream",function(){return l}),S.d(u,"alignPDT",function(){return f}),S.d(u,"alignFragmentByPDTDelta",function(){return b}),S.d(u,"alignMediaPlaylistByPDT",function(){return v});var R=S("./src/polyfills/number.ts"),h=S("./src/utils/logger.ts"),o=S("./src/controller/level-helper.ts");function C(m,n){for(var d=null,g=0,T=m.length;gd.startCC||m&&m.cc=this.minWeight_},C.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},C.destroy=function(){},o}();u.default=h},"./src/utils/ewma.ts":function(L,u,S){"use strict";S.r(u);var R=function(){function h(C,c,a){c===void 0&&(c=0),a===void 0&&(a=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_=c,this.totalWeight_=a}var o=h.prototype;return o.sample=function(c,a){var i=Math.pow(this.alpha_,c);this.estimate_=a*(1-i)+i*this.estimate_,this.totalWeight_+=c},o.getTotalWeight=function(){return this.totalWeight_},o.getEstimate=function(){if(this.alpha_){var c=1-Math.pow(this.alpha_,this.totalWeight_);if(c)return this.estimate_/c}return this.estimate_},h}();u.default=R},"./src/utils/fetch-loader.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"fetchSupported",function(){return b});var R=S("./src/polyfills/number.ts"),h=S("./src/loader/load-stats.ts"),o=S("./src/demux/chunk-cache.ts");function C(g,T){g.prototype=Object.create(T.prototype),g.prototype.constructor=g,l(g,T)}function c(g){var T=typeof Map=="function"?new Map:void 0;return c=function(s){if(s===null||!r(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof T!="undefined"){if(T.has(s))return T.get(s);T.set(s,M)}function M(){return a(s,arguments,p(this).constructor)}return M.prototype=Object.create(s.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),l(M,s)},c(g)}function a(g,T,y){return i()?a=Reflect.construct:a=function(M,A,x){var E=[null];E.push.apply(E,A);var w=Function.bind.apply(M,E),_=new w;return x&&l(_,x.prototype),_},a.apply(null,arguments)}function i(){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(g){return!1}}function r(g){return Function.toString.call(g).indexOf("[native code]")!==-1}function l(g,T){return l=Object.setPrototypeOf||function(s,M){return s.__proto__=M,s},l(g,T)}function p(g){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},p(g)}function f(){return f=Object.assign||function(g){for(var T=1;T=x&&E(M,A,w.flush(),s)):E(M,A,z,s),j()}).catch(function(){return Promise.reject()})};return N()},g}();function m(g,T){var y={method:"GET",mode:"cors",credentials:"same-origin",signal:T,headers:new self.Headers(f({},g.headers))};return g.rangeEnd&&y.headers.set("Range","bytes="+g.rangeStart+"-"+String(g.rangeEnd-1)),y}function n(g,T){return new self.Request(g.url,T)}var d=function(g){C(T,g);function T(y,s,M){var A;return A=g.call(this,y)||this,A.code=void 0,A.details=void 0,A.code=s,A.details=M,A}return T}(c(Error));u.default=v},"./src/utils/imsc1-ttml-parser.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"IMSC1_CODEC",function(){return r}),S.d(u,"parseIMSC1",function(){return b});var R=S("./src/utils/mp4-tools.ts"),h=S("./src/utils/vttparser.ts"),o=S("./src/utils/vttcue.ts"),C=S("./src/demux/id3.ts"),c=S("./src/utils/timescale-conversion.ts"),a=S("./src/utils/webvtt-parser.ts");function i(){return i=Object.assign||function(x){for(var E=1;E"):R}function c(r){for(var l=arguments.length,p=new Array(l>1?l-1:0),f=1;f>24,T[y+1]=s>>16&255,T[y+2]=s>>8&255,T[y+3]=s&255}function l(T,y){var s=[];if(!y.length)return s;var M,A,x;"data"in T?(M=T.data,A=T.start,x=T.end):(M=T,A=0,x=M.byteLength);for(var E=A;E1?E+w:x;if(_===y[0])if(y.length===1)s.push({data:M,start:E+8,end:N});else{var j=l({data:M,start:E+8,end:N},y.slice(1));j.length&&C.apply(s,j)}E=N}return s}function p(T){var y=l(T,["moov"]),s=y[0],M=s?s.end:null,A=l(T,["sidx"]);if(!A||!A[0])return null;var x=[],E=A[0],w=E.data[0],_=w===0?8:16,N=i(E,_);_+=4;var j=0,k=0;w===0?_+=8:_+=16,_+=2;var z=E.end+k,H=a(E,_);_+=2;for(var F=0;F>>31;if(K===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var q=i(E,G);G+=4,x.push({referenceSize:W,subsegmentDuration:q,info:{duration:q/N,start:z,end:z+W-1}}),z+=W,G+=4,_=G}return{earliestPresentationTime:j,timescale:N,version:w,referencesCount:H,references:x,moovEndOffset:M}}function f(T){for(var y=[],s=l(T,["moov","trak"]),M=0;Mc)&&(this.startTime=c),this.endTime=a,this.screen=i,this.timelineController.createCaptionsTrack(this.trackName)},o.reset=function(){this.cueRanges=[]},h}()},"./src/utils/texttrack-utils.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"sendAddTrackEvent",function(){return h}),S.d(u,"addCueToTrack",function(){return o}),S.d(u,"clearCurrentCues",function(){return C}),S.d(u,"removeCuesInRange",function(){return c}),S.d(u,"getCuesInRange",function(){return i});var R=S("./src/utils/logger.ts");function h(r,l){var p;try{p=new Event("addtrack")}catch(f){p=document.createEvent("Event"),p.initEvent("addtrack",!1,!1)}p.track=r,l.dispatchEvent(p)}function o(r,l){var p=r.mode;if(p==="disabled"&&(r.mode="hidden"),r.cues&&!r.cues.getCueById(l.id))try{if(r.addCue(l),!r.cues.getCueById(l.id))throw new Error("addCue is failed for: "+l)}catch(b){R.logger.debug("[texttrack-utils]: "+b);var f=new self.TextTrackCue(l.startTime,l.endTime,l.text);f.id=l.id,r.addCue(f)}p==="disabled"&&(r.mode=p)}function C(r){var l=r.mode;if(l==="disabled"&&(r.mode="hidden"),r.cues)for(var p=r.cues.length;p--;)r.removeCue(r.cues[p]);l==="disabled"&&(r.mode=l)}function c(r,l,p){var f=r.mode;if(f==="disabled"&&(r.mode="hidden"),r.cues&&r.cues.length>0)for(var b=i(r.cues,l,p),v=0;vr[p].endTime)return-1;for(var f=0,b=p;f<=b;){var v=Math.floor((b+f)/2);if(lr[v].startTime&&f-1)for(var v=b,m=r.length;v=l&&n.endTime<=p)f.push(n);else if(n.startTime>p)return f}return f}},"./src/utils/time-ranges.ts":function(L,u,S){"use strict";S.r(u);var R={toString:function(o){for(var C="",c=o.length,a=0;a1?l-1:0),f=1;f100)throw new Error("Position must be between 0 and 100.");x=j,this.hasBeenReset=!0}})),Object.defineProperty(f,"positionAlign",a({},b,{get:function(){return E},set:function(j){var k=c(j);if(!k)throw new SyntaxError("An invalid or illegal string was specified.");E=k,this.hasBeenReset=!0}})),Object.defineProperty(f,"size",a({},b,{get:function(){return w},set:function(j){if(j<0||j>100)throw new Error("Size must be between 0 and 100.");w=j,this.hasBeenReset=!0}})),Object.defineProperty(f,"align",a({},b,{get:function(){return _},set:function(j){var k=c(j);if(!k)throw new SyntaxError("An invalid or illegal string was specified.");_=k,this.hasBeenReset=!0}})),f.displayState=void 0}return i.prototype.getCueAsHTML=function(){var r=self.WebVTT;return r.convertCueToDOMTree(self,this.text)},i}()},"./src/utils/vttparser.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"parseTimeStamp",function(){return o}),S.d(u,"fixLineBreaks",function(){return l}),S.d(u,"VTTParser",function(){return p});var R=S("./src/utils/vttcue.ts"),h=function(){function f(){}var b=f.prototype;return b.decode=function(m,n){if(!m)return"";if(typeof m!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(m))},f}();function o(f){function b(m,n,d,g){return(m|0)*3600+(n|0)*60+(d|0)+parseFloat(g||0)}var v=f.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return v?parseFloat(v[2])>59?b(v[2],v[3],0,v[4]):b(v[1],v[2],v[3],v[4]):null}var C=function(){function f(){this.values=Object.create(null)}var b=f.prototype;return b.set=function(m,n){!this.get(m)&&n!==""&&(this.values[m]=n)},b.get=function(m,n,d){return d?this.has(m)?this.values[m]:n[d]:this.has(m)?this.values[m]:n},b.has=function(m){return m in this.values},b.alt=function(m,n,d){for(var g=0;g=0&&d<=100)return this.set(m,d),!0}return!1},f}();function c(f,b,v,m){var n=m?f.split(m):[f];for(var d in n){if(typeof n[d]!="string")continue;var g=n[d].split(v);if(g.length!==2)continue;var T=g[0],y=g[1];b(T,y)}}var a=new R.default(0,0,""),i=a.align==="middle"?"middle":"center";function r(f,b,v){var m=f;function n(){var T=o(f);if(T===null)throw new Error("Malformed timestamp: "+m);return f=f.replace(/^[^\sa-zA-Z-]+/,""),T}function d(T,y){var s=new C;c(T,function(x,E){var w;switch(x){case"region":for(var _=v.length-1;_>=0;_--)if(v[_].id===E){s.set(x,v[_].region);break}break;case"vertical":s.alt(x,E,["rl","lr"]);break;case"line":w=E.split(","),s.integer(x,w[0]),s.percent(x,w[0])&&s.set("snapToLines",!1),s.alt(x,w[0],["auto"]),w.length===2&&s.alt("lineAlign",w[1],["start",i,"end"]);break;case"position":w=E.split(","),s.percent(x,w[0]),w.length===2&&s.alt("positionAlign",w[1],["start",i,"end","line-left","line-right","auto"]);break;case"size":s.percent(x,E);break;case"align":s.alt(x,E,["start",i,"end","left","right"]);break}},/:/,/\s/),y.region=s.get("region",null),y.vertical=s.get("vertical","");var M=s.get("line","auto");M==="auto"&&a.line===-1&&(M=-1),y.line=M,y.lineAlign=s.get("lineAlign","start"),y.snapToLines=s.get("snapToLines",!0),y.size=s.get("size",100),y.align=s.get("align",i);var A=s.get("position","auto");A==="auto"&&a.position===50&&(A=y.align==="start"||y.align==="left"?0:y.align==="end"||y.align==="right"?100:50),y.position=A}function g(){f=f.replace(/^\s+/,"")}if(g(),b.startTime=n(),g(),f.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+m);f=f.substr(3),g(),b.endTime=n(),g(),d(f,b)}function l(f){return f.replace(//gi,` `)}var p=function(){function f(){this.state="INITIAL",this.buffer="",this.decoder=new h,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var b=f.prototype;return b.parse=function(m){var n=this;m&&(n.buffer+=n.decoder.decode(m,{stream:!0}));function d(){var A=n.buffer,x=0;for(A=l(A);x")===-1){n.cue.id=T;continue}case"CUE":if(!n.cue){n.state="BADCUE";continue}try{r(T,n.cue,n.regionList)}catch(A){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":{var M=T.indexOf("-->")!==-1;if(!T||M&&(s=!0)){n.oncue&&n.cue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}if(n.cue===null)continue;n.cue.text&&(n.cue.text+=` `),n.cue.text+=T}continue;case"BADCUE":T||(n.state="ID")}}}catch(A){n.state==="CUETEXT"&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state=n.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},b.flush=function(){var m=this;try{if((m.cue||m.state==="HEADER")&&(m.buffer+=` `,m.parse()),m.state==="INITIAL"||m.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){m.onparsingerror&&m.onparsingerror(n)}return m.onflush&&m.onflush(),this},f}()},"./src/utils/webvtt-parser.ts":function(L,u,S){"use strict";S.r(u),S.d(u,"generateCueId",function(){return p}),S.d(u,"parseWebVTT",function(){return b});var R=S("./src/polyfills/number.ts"),h=S("./src/utils/vttparser.ts"),o=S("./src/demux/id3.ts"),C=S("./src/utils/timescale-conversion.ts"),c=S("./src/remux/mp4-remuxer.ts"),a=/\r\n|\n\r|\n|\r/g,i=function(m,n,d){return d===void 0&&(d=0),m.substr(d,n.length)===n},r=function(m){var n=parseInt(m.substr(-3)),d=parseInt(m.substr(-6,2)),g=parseInt(m.substr(-9,2)),T=m.length>9?parseInt(m.substr(0,m.indexOf(":"))):0;if(!Object(R.isFiniteNumber)(n)||!Object(R.isFiniteNumber)(d)||!Object(R.isFiniteNumber)(g)||!Object(R.isFiniteNumber)(T))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+m);return n+=1e3*d,n+=60*1e3*g,n+=60*60*1e3*T,n},l=function(m){for(var n=5381,d=m.length;d;)n=n*33^m.charCodeAt(--d);return(n>>>0).toString()};function p(v,m,n){return l(v.toString())+l(m.toString())+l(n)}var f=function(m,n,d){var g=m[n],T=m[g.prevCC];if(!T||!T.new&&g.new){m.ccOffset=m.presentationOffset=g.start,g.new=!1;return}for(;(y=T)!==null&&y!==void 0&&y.new;){var y;m.ccOffset+=g.start-T.start,g.new=!1,g=T,T=m[g.prevCC]}m.presentationOffset=d};function b(v,m,n,d,g,T,y,s){var M=new h.VTTParser,A=Object(o.utf8ArrayToStr)(new Uint8Array(v)).trim().replace(a,` `).split(` `),x=[],E=Object(C.toMpegTsClockFromTimescale)(m,n),w="00:00.000",_=0,N=0,j,k=!0,z=!1;M.oncue=function(H){var F=d[g],G=d.ccOffset,B=(_-E)/9e4;if(F!=null&&F.new&&(N!==void 0?G=d.ccOffset=F.start:f(d,g,B)),B&&(G=B-d.presentationOffset),z){var W=H.endTime-H.startTime,K=Object(c.normalizePts)((H.startTime+G-N)*9e4,T*9e4)/9e4;H.startTime=K,H.endTime=K+W}var q=H.text.trim();H.text=decodeURIComponent(encodeURIComponent(q)),H.id||(H.id=p(H.startTime,H.endTime,q)),H.endTime>0&&x.push(H)},M.onparsingerror=function(H){j=H},M.onflush=function(){if(j){s(j);return}y(x)},A.forEach(function(H){if(k)if(i(H,"X-TIMESTAMP-MAP=")){k=!1,z=!0,H.substr(16).split(",").forEach(function(F){i(F,"LOCAL:")?w=F.substr(6):i(F,"MPEGTS:")&&(_=parseInt(F.substr(7)))});try{N=r(w)/1e3}catch(F){z=!1,j=F}return}else H===""&&(k=!1);M.parse(H+` `)}),M.flush()}},"./src/utils/xhr-loader.ts":function(L,u,S){"use strict";S.r(u);var R=S("./src/utils/logger.ts"),h=S("./src/loader/load-stats.ts"),o=/^age:\s*[\d.]+\s*$/m,C=function(){function c(i){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=i?i.xhrSetup:null,this.stats=new h.LoadStats,this.retryDelay=0}var a=c.prototype;return a.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},a.abortInternal=function(){var r=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),r&&(r.onreadystatechange=null,r.onprogress=null,r.readyState!==4&&(this.stats.aborted=!0,r.abort()))},a.abort=function(){var r;this.abortInternal(),(r=this.callbacks)!==null&&r!==void 0&&r.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},a.load=function(r,l,p){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=r,this.config=l,this.callbacks=p,this.retryDelay=l.retryDelay,this.loadInternal()},a.loadInternal=function(){var r=this.config,l=this.context;if(!r)return;var p=this.loader=new self.XMLHttpRequest,f=this.stats;f.loading.first=0,f.loaded=0;var b=this.xhrSetup;try{if(b)try{b(p,l.url)}catch(n){p.open("GET",l.url,!0),b(p,l.url)}p.readyState||p.open("GET",l.url,!0);var v=this.context.headers;if(v)for(var m in v)p.setRequestHeader(m,v[m])}catch(n){this.callbacks.onError({code:p.status,text:n.message},l,p);return}l.rangeEnd&&p.setRequestHeader("Range","bytes="+l.rangeStart+"-"+(l.rangeEnd-1)),p.onreadystatechange=this.readystatechange.bind(this),p.onprogress=this.loadprogress.bind(this),p.responseType=l.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),p.send()},a.readystatechange=function(){var r=this.context,l=this.loader,p=this.stats;if(!r||!l)return;var f=l.readyState,b=this.config;if(p.aborted)return;if(f>=2)if(self.clearTimeout(this.requestTimeout),p.loading.first===0&&(p.loading.first=Math.max(self.performance.now(),p.loading.start)),f===4){l.onreadystatechange=null,l.onprogress=null;var v=l.status;if(v>=200&&v<300){p.loading.end=Math.max(self.performance.now(),p.loading.first);var m,n;if(r.responseType==="arraybuffer"?(m=l.response,n=m.byteLength):(m=l.responseText,n=m.length),p.loaded=p.total=n,!this.callbacks)return;var d=this.callbacks.onProgress;if(d&&d(p,r,m,l),!this.callbacks)return;var g={url:l.responseURL,data:m};this.callbacks.onSuccess(g,p,r,l)}else p.retry>=b.maxRetry||v>=400&&v<499?(R.logger.error(v+" while loading "+r.url),this.callbacks.onError({code:v,text:l.statusText},r,l)):(R.logger.warn(v+" while loading "+r.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,b.maxRetryDelay),p.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),b.timeout)},a.loadtimeout=function(){R.logger.warn("timeout while loading "+this.context.url);var r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))},a.loadprogress=function(r){var l=this.stats;l.loaded=r.loaded,r.lengthComputable&&(l.total=r.total)},a.getCacheAge=function(){var r=null;if(this.loader&&o.test(this.loader.getAllResponseHeaders())){var l=this.loader.getResponseHeader("age");r=l?parseFloat(l):null}return r},c}();u.default=C}}).default})},vHTk:function(I,J,P){I.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("ETIr"),P("cv67"),P("K3mO"),P("OLod"))})(this,function(L){return function(){var u=L,S=u.lib,R=S.StreamCipher,h=u.algo,o=h.RC4=R.extend({_doReset:function(){for(var a=this._key,i=a.words,r=a.sigBytes,l=this._S=[],p=0;p<256;p++)l[p]=p;for(var p=0,f=0;p<256;p++){var b=p%r,v=i[b>>>2]>>>24-b%4*8&255;f=(f+l[p]+v)%256;var m=l[p];l[p]=l[f],l[f]=m}this._i=this._j=0},_doProcessBlock:function(a,i){a[i]^=C.call(this)},keySize:256/32,ivSize:0});function C(){for(var a=this._S,i=this._i,r=this._j,l=0,p=0;p<4;p++){i=(i+1)%256,r=(r+a[i])%256;var f=a[i];a[i]=a[r],a[r]=f,l|=a[(a[i]+a[r])%256]<<24-p*8}return this._i=i,this._j=r,l}u.RC4=R._createHelper(o);var c=h.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var a=this.cfg.drop;a>0;a--)C.call(this)}});u.RC4Drop=R._createHelper(c)}(),L.RC4})},wCXF:function(I,J,P){"use strict";P.d(J,"a",function(){return nt});var L=P("rePB"),u=P("VTBJ"),S=P("KQm4"),R=P("U8pU"),h=P("ODXe"),o=P("q1tI"),C=P("TSYQ"),c=P.n(C),a=P("Gytx"),i=P.n(a),r=P("Kwbf"),l=P("t23M"),p=P("qx4F"),f=P("6eGT"),b=P("IBYe"),v=P("Ff2n"),m=P("c+Xe"),n=P("fyJ8"),d=P("biw7");function g(je,Re,et,ct,$e){var qe=et[je]||{},Ue=et[Re]||{},Me,Ie;qe.fixed==="left"?Me=ct.left[je]:Ue.fixed==="right"&&(Ie=ct.right[Re]);var ye=!1,Te=!1,Ae=!1,Pe=!1,Xe=et[Re+1],rt=et[je-1];if($e==="rtl"){if(Me!==void 0){var ft=rt&&rt.fixed==="left";Pe=!ft}else if(Ie!==void 0){var St=Xe&&Xe.fixed==="right";Ae=!St}}else if(Me!==void 0){var Pt=Xe&&Xe.fixed==="left";ye=!Pt}else if(Ie!==void 0){var dt=rt&&rt.fixed==="right";Te=!dt}return{fixLeft:Me,fixRight:Ie,lastFixLeft:ye,firstFixRight:Te,lastFixRight:Ae,firstFixLeft:Pe,isSticky:ct.isSticky}}var T=P("sR1s");function y(je){var Re=je.cells,et=je.stickyOffsets,ct=je.flattenColumns,$e=je.rowComponent,qe=je.cellComponent,Ue=je.onHeaderRow,Me=je.index,Ie=o.useContext(d.a),ye=Ie.prefixCls,Te=Ie.direction,Ae;Ue&&(Ae=Ue(Re.map(function(Xe){return Xe.column}),Me));var Pe=Object(T.a)(Re.map(function(Xe){return Xe.column}));return o.createElement($e,Object.assign({},Ae),Re.map(function(Xe,rt){var ft=Xe.column,St=g(Xe.colStart,Xe.colEnd,ct,et,Te),Pt;return ft&&ft.onHeaderCell&&(Pt=Xe.column.onHeaderCell(ft)),o.createElement(n.a,Object.assign({},Xe,{ellipsis:ft.ellipsis,align:ft.align,component:qe,prefixCls:ye,key:Pe[rt]},St,{additionalProps:Pt,rowType:"header"}))}))}y.displayName="HeaderRow";var s=y;function M(je){var Re=[];function et(Ue,Me){var Ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Re[Ie]=Re[Ie]||[];var ye=Me,Te=Ue.filter(Boolean).map(function(Ae){var Pe={key:Ae.key,className:Ae.className||"",children:Ae.title,column:Ae,colStart:ye},Xe=1,rt=Ae.children;return rt&&rt.length>0&&(Xe=et(rt,ye,Ie+1).reduce(function(ft,St){return ft+St},0),Pe.hasSubColumns=!0),"colSpan"in Ae&&(Xe=Ae.colSpan),"rowSpan"in Ae&&(Pe.rowSpan=Ae.rowSpan),Pe.colSpan=Xe,Pe.colEnd=Pe.colStart+Xe-1,Re[Ie].push(Pe),ye+=Xe,Xe});return Te}et(je,0);for(var ct=Re.length,$e=function(Me){Re[Me].forEach(function(Ie){!("rowSpan"in Ie)&&!Ie.hasSubColumns&&(Ie.rowSpan=ct-Me)})},qe=0;qe=0;Me-=1){var Ie=Re[Me],ye=et&&et[Me],Te=ye&&ye[E.a];(Ie||Te||Ue)&&($e.unshift(o.createElement("col",Object.assign({key:Me,style:{width:Ie,minWidth:Ie}},Te))),Ue=!0)}return o.createElement("colgroup",null,$e)}var _=w;function N(je,Re){return Object(o.useMemo)(function(){for(var et=[],ct=0;ct1?ne-1:0),ie=1;ie=Ae&&(Lr=Ae-Pe),Ue({scrollLeft:Lr/Ae*(Te+2)}),dt.current.x=wt.pageX},Nt=function(){var wt=Object(Z.b)(qe.current).top,hr=wt+qe.current.offsetHeight,Qr=document.documentElement.scrollTop+window.innerHeight;hr-Object(p.a)()<=Qr||wt>=Qr-Me?Pt(function(Gr){return Object(u.a)(Object(u.a)({},Gr),{},{isHiddenScrollBar:!0})}):Pt(function(Gr){return Object(u.a)(Object(u.a)({},Gr),{},{isHiddenScrollBar:!1})})},br=function(wt){Pt(function(hr){return Object(u.a)(Object(u.a)({},hr),{},{scrollLeft:wt/Te*Ae||0})})};return o.useImperativeHandle(et,function(){return{setScrollLeft:br}}),o.useEffect(function(){var ur=Object(Y.a)(document.body,"mouseup",ir,!1),wt=Object(Y.a)(document.body,"mousemove",dr,!1);return Nt(),function(){ur.remove(),wt.remove()}},[Pe,bt]),o.useEffect(function(){var ur=Object(Y.a)(window,"scroll",Nt,!1),wt=Object(Y.a)(window,"resize",Nt,!1);return function(){ur.remove(),wt.remove()}},[]),o.useEffect(function(){St.isHiddenScrollBar||Pt(function(ur){var wt,hr;return Object(u.a)(Object(u.a)({},ur),{},{scrollLeft:qe.current.scrollLeft/((wt=qe.current)===null||wt===void 0?void 0:wt.scrollWidth)*((hr=qe.current)===null||hr===void 0?void 0:hr.clientWidth)})})},[St.isHiddenScrollBar]),Te<=Ae||!Pe||St.isHiddenScrollBar?null:o.createElement("div",{style:{height:Object(p.a)(),width:Ae,bottom:Me},className:"".concat(ye,"-sticky-scroll")},o.createElement("div",{onMouseDown:Qt,ref:Xe,className:c()("".concat(ye,"-sticky-scroll-bar"),Object(L.a)({},"".concat(ye,"-sticky-scroll-bar-active"),bt)),style:{width:"".concat(Pe,"px"),transform:"translate3d(".concat(St.scrollLeft,"px, 0, 0)")}}))},ge=o.forwardRef(be);function De(je,Re){return o.useMemo(function(){var et=!!je;return{isSticky:et,stickyClassName:et?"".concat(Re,"-sticky-header"):"",offsetHeader:Object(R.a)(je)==="object"&&je.offsetHeader||0,offsetScroll:Object(R.a)(je)==="object"&&je.offsetScroll||0}},[je,Re])}var Qe=[],Ze={},nt="rc-table-internal-hook",tt=o.memo(function(je){var Re=je.children;return Re},function(je,Re){return i()(je.props,Re.props)?je.pingLeft!==Re.pingLeft||je.pingRight!==Re.pingRight:!1});function lt(je){var Re,et=je.prefixCls,ct=je.className,$e=je.rowClassName,qe=je.style,Ue=je.data,Me=je.rowKey,Ie=je.scroll,ye=je.tableLayout,Te=je.direction,Ae=je.title,Pe=je.footer,Xe=je.summary,rt=je.id,ft=je.showHeader,St=je.components,Pt=je.emptyText,dt=je.onRow,At=je.onHeaderRow,Ot=je.internalHooks,bt=je.transformColumns,Vt=je.internalRefs,ir=je.sticky,Qt=Ue||Qe,dr=!!Qt.length,Nt=o.useState(0),br=Object(h.a)(Nt,2),ur=br[0],wt=br[1];o.useEffect(function(){wt(Object(p.a)())});var hr=o.useMemo(function(){return Object(T.c)(St,{})},[St]),Qr=o.useCallback(function(Gt,or){return Object(T.b)(hr,Gt)||or},[hr]),Gr=o.useMemo(function(){return typeof Me=="function"?Me:function(Gt){var or=Gt&&Gt[Me];return or}},[Me]),Lr=Object(E.c)(je),si=Lr.expandIcon,Tt=Lr.expandedRowKeys,Dt=Lr.defaultExpandedRowKeys,Ct=Lr.defaultExpandAllRows,Rr=Lr.expandedRowRender,jr=Lr.onExpand,$t=Lr.onExpandedRowsChange,jt=Lr.expandRowByClick,Ur=Lr.rowExpandable,_n=Lr.expandIconColumnIndex,Vr=Lr.expandedRowClassName,vt=Lr.childrenColumnName,Ft=Lr.indentSize,rn=si||le,hn=vt||"children",An=o.useMemo(function(){return Rr?"row":je.expandable&&Ot===nt&&je.expandable.__PARENT_RENDER_ICON__||Qt.some(function(Gt){return Gt&&Object(R.a)(Gt)==="object"&&Gt[hn]})?"nest":!1},[!!Rr,Qt]),Rn=o.useState(function(){return Dt||(Ct?Q(Qt,Gr,hn):[])}),se=Object(h.a)(Rn,2),V=se[0],X=se[1],ne=o.useMemo(function(){return new Set(Tt||V||[])},[Tt,V]),me=o.useCallback(function(Gt){var or=Gr(Gt,Qt.indexOf(Gt)),sr,vn=ne.has(or);vn?(ne.delete(or),sr=Object(S.a)(ne)):sr=[].concat(Object(S.a)(ne),[or]),X(sr),jr&&jr(!vn,Gt),$t&&$t(sr)},[Gr,ne,Qt,jr,$t]),ie=o.useState(0),ze=Object(h.a)(ie,2),pt=ze[0],ot=ze[1],It=Object(he.b)(Object(u.a)(Object(u.a)(Object(u.a)({},je),Lr),{},{expandable:!!Rr,expandedKeys:ne,getRowKey:Gr,onTriggerExpand:me,expandIcon:rn,expandIconColumnIndex:_n,direction:Te}),Ot===nt?bt:null),gt=Object(h.a)(It,2),Ht=gt[0],Xt=gt[1],Sr=o.useMemo(function(){return{columns:Ht,flattenColumns:Xt}},[Ht,Xt]),an=o.useRef(),Zr=o.useRef(),Zt=o.useRef(),Hr=o.useState(!1),fr=Object(h.a)(Hr,2),Jt=fr[0],tr=fr[1],vr=o.useState(!1),Xr=Object(h.a)(vr,2),ln=Xr[0],mn=Xr[1],li=de(new Map),Ki=Object(h.a)(li,2),Ui=Ki[0],Fn=Ki[1],qr=Object(T.a)(Xt),Oi=qr.map(function(Gt){return Ui.get(Gt)}),on=o.useMemo(function(){return Oi},[Oi.join("_")]),Zn=Se(on,Xt.length,Te),Yr=Ie&&Object(T.d)(Ie.y),cr=Ie&&Object(T.d)(Ie.x),en=cr&&Xt.some(function(Gt){var or=Gt.fixed;return or}),Mr=o.useRef(),En=De(ir,et),Fr=En.isSticky,xi=En.offsetHeader,gn=En.offsetScroll,On=En.stickyClassName,ui,ci,qn;Yr&&(ci={overflowY:"scroll",maxHeight:Ie.y}),cr&&(ui={overflowX:"auto"},Yr||(ci={overflowY:"hidden"}),qn={width:Ie.x===!0?"auto":Ie.x,minWidth:"100%"});var Ei=o.useCallback(function(Gt,or){Fn(function(sr){var vn=new Map(sr);return vn.set(Gt,or),vn})},[]),Yn=ce(null),Ai=Object(h.a)(Yn,2),zn=Ai[0],fi=Ai[1];function pi(Gt,or){if(!or)return;typeof or=="function"?or(Gt):or.scrollLeft!==Gt&&(or.scrollLeft=Gt)}var ei=function(or){var sr=or.currentTarget,vn=or.scrollLeft,Di=typeof vn=="number"?vn:sr.scrollLeft,Vi=sr||Ze;if(!fi()||fi()===Vi){var rr;zn(Vi),pi(Di,Zr.current),pi(Di,Zt.current),pi(Di,(rr=Mr.current)===null||rr===void 0?void 0:rr.setScrollLeft)}if(sr){var Mt=sr.scrollWidth,pr=sr.clientWidth;tr(Di>0),mn(Di0?[].concat(Object(u.a)(v),Object(u.a)(r(g).map(function(T){return Object(S.a)({fixed:d},T)}))):[].concat(Object(u.a)(v),[Object(S.a)(Object(S.a)({},m),{},{fixed:d})])},[])}function l(b){for(var v=!0,m=0;m=0;g-=1){var T=b[g];if(d&&T.fixed!=="right")d=!1;else if(!d&&T.fixed==="right"){Object(C.a)(!1,"Index ".concat(g+1," of `columns` missing `fixed='right'` prop."));break}}}function p(b){return b.map(function(v){var m=v.fixed,n=Object(R.a)(v,["fixed"]),d=m;return m==="left"?d="right":m==="right"&&(d="left"),Object(S.a)({fixed:d},n)})}function f(b,v){var m=b.prefixCls,n=b.columns,d=b.children,g=b.expandable,T=b.expandedKeys,y=b.getRowKey,s=b.onTriggerExpand,M=b.expandIcon,A=b.rowExpandable,x=b.expandIconColumnIndex,E=b.direction,w=b.expandRowByClick,_=h.useMemo(function(){return n||i(d)},[n,d]),N=h.useMemo(function(){if(g){var z,H=x||0,F=_[H],G=(z={},Object(L.a)(z,a.a,{className:"".concat(m,"-expand-icon-col")}),Object(L.a)(z,"title",""),Object(L.a)(z,"fixed",F?F.fixed:null),Object(L.a)(z,"className","".concat(m,"-row-expand-icon-cell")),Object(L.a)(z,"render",function(K,q,re){var ee=y(q,re),Ce=T.has(ee),xe=A?A(q):!0,he=M({prefixCls:m,expanded:Ce,expandable:xe,record:q,onExpand:s});return w?h.createElement("span",{onClick:function(_e){return _e.stopPropagation()}},he):he}),z),B=_.slice();return H>=0&&B.splice(H,0,G),B}return _},[g,_,y,T,M,E]),j=h.useMemo(function(){var z=N;return v&&(z=v(z)),z.length||(z=[{render:function(){return null}}]),z},[v,N,E]),k=h.useMemo(function(){return E==="rtl"?p(r(j)):r(j)},[j,E]);return[j,k]}J.b=f},wU8J:function(I,J){function P(){this.buffer=new Array,this.length=0}P.prototype={get:function(L){var u=Math.floor(L/8);return(this.buffer[u]>>>7-L%8&1)==1},put:function(L,u){for(var S=0;S>>u-S-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(L){var u=Math.floor(this.length/8);this.buffer.length<=u&&this.buffer.push(0),L&&(this.buffer[u]|=128>>>this.length%8),this.length++}},I.exports=P},wZgz:function(I,J,P){(function(L,u,S){I.exports=J=u(P("Ib8C"),P("ETIr"),P("cv67"),P("K3mO"),P("OLod"))})(this,function(L){return function(){var u=L,S=u.lib,R=S.BlockCipher,h=u.algo,o=[],C=[],c=[],a=[],i=[],r=[],l=[],p=[],f=[],b=[];(function(){for(var n=[],d=0;d<256;d++)d<128?n[d]=d<<1:n[d]=d<<1^283;for(var g=0,T=0,d=0;d<256;d++){var y=T^T<<1^T<<2^T<<3^T<<4;y=y>>>8^y&255^99,o[g]=y,C[y]=g;var s=n[g],M=n[s],A=n[M],x=n[y]*257^y*16843008;c[g]=x<<24|x>>>8,a[g]=x<<16|x>>>16,i[g]=x<<8|x>>>24,r[g]=x;var x=A*16843009^M*65537^s*257^g*16843008;l[y]=x<<24|x>>>8,p[y]=x<<16|x>>>16,f[y]=x<<8|x>>>24,b[y]=x,g?(g=s^n[n[n[A^s]]],T^=n[n[T]]):g=T=1}})();var v=[0,1,2,4,8,16,32,64,128,27,54],m=h.AES=R.extend({_doReset:function(){var n;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var d=this._keyPriorReset=this._key,g=d.words,T=d.sigBytes/4,y=this._nRounds=T+6,s=(y+1)*4,M=this._keySchedule=[],A=0;A6&&A%T==4&&(n=o[n>>>24]<<24|o[n>>>16&255]<<16|o[n>>>8&255]<<8|o[n&255]):(n=n<<8|n>>>24,n=o[n>>>24]<<24|o[n>>>16&255]<<16|o[n>>>8&255]<<8|o[n&255],n^=v[A/T|0]<<24),M[A]=M[A-T]^n);for(var x=this._invKeySchedule=[],E=0;E>>24]]^p[o[n>>>16&255]]^f[o[n>>>8&255]]^b[o[n&255]]}},encryptBlock:function(n,d){this._doCryptBlock(n,d,this._keySchedule,c,a,i,r,o)},decryptBlock:function(n,d){var g=n[d+1];n[d+1]=n[d+3],n[d+3]=g,this._doCryptBlock(n,d,this._invKeySchedule,l,p,f,b,C);var g=n[d+1];n[d+1]=n[d+3],n[d+3]=g},_doCryptBlock:function(n,d,g,T,y,s,M,A){for(var x=this._nRounds,E=n[d]^g[0],w=n[d+1]^g[1],_=n[d+2]^g[2],N=n[d+3]^g[3],j=4,k=1;k>>24]^y[w>>>16&255]^s[_>>>8&255]^M[N&255]^g[j++],H=T[w>>>24]^y[_>>>16&255]^s[N>>>8&255]^M[E&255]^g[j++],F=T[_>>>24]^y[N>>>16&255]^s[E>>>8&255]^M[w&255]^g[j++],G=T[N>>>24]^y[E>>>16&255]^s[w>>>8&255]^M[_&255]^g[j++];E=z,w=H,_=F,N=G}var z=(A[E>>>24]<<24|A[w>>>16&255]<<16|A[_>>>8&255]<<8|A[N&255])^g[j++],H=(A[w>>>24]<<24|A[_>>>16&255]<<16|A[N>>>8&255]<<8|A[E&255])^g[j++],F=(A[_>>>24]<<24|A[N>>>16&255]<<16|A[E>>>8&255]<<8|A[w&255])^g[j++],G=(A[N>>>24]<<24|A[E>>>16&255]<<16|A[w>>>8&255]<<8|A[_&255])^g[j++];n[d]=z,n[d+1]=H,n[d+2]=F,n[d+3]=G},keySize:256/32});u.AES=R._createHelper(m)}(),L.AES})},wbyO:function(I,J,P){(function(L,u){I.exports=J=u(P("Ib8C"))})(this,function(L){return function(){var u=L,S=u.lib,R=S.WordArray,h=u.enc,o=h.Base64url={stringify:function(c,a=!0){var i=c.words,r=c.sigBytes,l=a?this._safe_map:this._map;c.clamp();for(var p=[],f=0;f>>2]>>>24-f%4*8&255,v=i[f+1>>>2]>>>24-(f+1)%4*8&255,m=i[f+2>>>2]>>>24-(f+2)%4*8&255,n=b<<16|v<<8|m,d=0;d<4&&f+d*.75>>6*(3-d)&63));var g=l.charAt(64);if(g)for(;p.length%4;)p.push(g);return p.join("")},parse:function(c,a=!0){var i=c.length,r=a?this._safe_map:this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var p=0;p>>6-p%4*2,v=f|b;r[l>>>2]|=v<<24-l%4*8,l++}return R.create(r,l)}}(),L.enc.Base64url})},"y0+3":function(I,J,P){"use strict";P.d(J,"a",function(){return r}),P.d(J,"b",function(){return p});var L=/margin|padding|width|height|max|min|offset/,u={left:!0,top:!0},S={cssFloat:1,styleFloat:1,float:1};function R(f){return f.nodeType===1?f.ownerDocument.defaultView.getComputedStyle(f,null):{}}function h(f,b,v){if(b=b.toLowerCase(),v==="auto"){if(b==="height")return f.offsetHeight;if(b==="width")return f.offsetWidth}return b in u||(u[b]=L.test(b)),u[b]?parseFloat(v)||0:v}function o(f,b){var v=arguments.length,m=R(f);return b=S[b]?"cssFloat"in f.style?"cssFloat":"styleFloat":b,v===1?m:h(f,b,m[b]||f.style[b])}function C(f,b,v){var m=arguments.length;if(b=S[b]?"cssFloat"in f.style?"cssFloat":"styleFloat":b,m===3)return typeof v=="number"&&L.test(b)&&(v="".concat(v,"px")),f.style[b]=v,v;for(var n in b)b.hasOwnProperty(n)&&C(f,n,b[n]);return R(f)}function c(f){return f===document.body?document.documentElement.clientWidth:f.offsetWidth}function a(f){return f===document.body?window.innerHeight||document.documentElement.clientHeight:f.offsetHeight}function i(){var f=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),b=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:f,height:b}}function r(){var f=document.documentElement.clientWidth,b=window.innerHeight||document.documentElement.clientHeight;return{width:f,height:b}}function l(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function p(f){var b=f.getBoundingClientRect(),v=document.documentElement;return{left:b.left+(window.pageXOffset||v.scrollLeft)-(v.clientLeft||document.body.clientLeft||0),top:b.top+(window.pageYOffset||v.scrollTop)-(v.clientTop||document.body.clientTop||0)}}},ynwM:function(I,J,P){var L=P("MFOe"),u=L.Global;I.exports={name:"oldFF-globalStorage",read:R,write:h,each:o,remove:C,clearAll:c};var S=u.globalStorage;function R(a){return S[a]}function h(a,i){S[a]=i}function o(a){for(var i=S.length-1;i>=0;i--){var r=S.key(i);a(S[r],r)}}function C(a){return S.removeItem(a)}function c(){o(function(a,i){delete S[a]})}}}]);