(window.webpackJsonp=window.webpackJsonp||[]).push([[184,5,6,7,8,10],{"+NIl":function(N,Y,k){(function(P){P(k("VrN/"))})(function(P){"use strict";P.defineMode("stex",function(u,C){"use strict";function R(m,w){m.cmdState.push(w)}function h(m){return m.cmdState.length>0?m.cmdState[m.cmdState.length-1]:null}function s(m){var w=m.cmdState.pop();w&&w.closeBracket()}function S(m){for(var w=m.cmdState,p=w.length-1;p>=0;p--){var f=w[p];if(f.name=="DEFAULT")continue;return f}return{styleIdentifier:function(){return null}}}function d(m,w,p){return function(){this.name=m,this.bracketNo=0,this.style=w,this.styles=p,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=d("importmodule","tag",["string","builtin"]),a.documentclass=d("documentclass","tag",["","atom"]),a.usepackage=d("usepackage","tag",["atom"]),a.begin=d("begin","tag",["atom"]),a.end=d("end","tag",["atom"]),a.label=d("label","tag",["atom"]),a.ref=d("ref","tag",["atom"]),a.eqref=d("eqref","tag",["atom"]),a.cite=d("cite","tag",["atom"]),a.bibitem=d("bibitem","tag",["atom"]),a.Bibitem=d("Bibitem","tag",["atom"]),a.RBibitem=d("RBibitem","tag",["atom"]),a.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function o(m,w){m.f=w}function r(m,w){var p;if(m.match(/^\\[a-zA-Z@]+/)){var f=m.current().slice(1);return p=a.hasOwnProperty(f)?a[f]:a.DEFAULT,p=new p,R(w,p),o(w,g),p.style}if(m.match(/^\\[$&%#{}_]/))return"tag";if(m.match(/^\\[,;!\/\\]/))return"tag";if(m.match("\\["))return o(w,function(l,c){return x(l,c,"\\]")}),"keyword";if(m.match("\\("))return o(w,function(l,c){return x(l,c,"\\)")}),"keyword";if(m.match("$$"))return o(w,function(l,c){return x(l,c,"$$")}),"keyword";if(m.match("$"))return o(w,function(l,c){return x(l,c,"$")}),"keyword";var n=m.next();if(n=="%")return m.skipToEnd(),"comment";if(n=="}"||n=="]"){if(p=h(w),p)p.closeBracket(n),o(w,g);else return"error";return"bracket"}else return n=="{"||n=="["?(p=a.DEFAULT,p=new p,R(w,p),"bracket"):/\d/.test(n)?(m.eatWhile(/[\w.%]/),"atom"):(m.eatWhile(/[\w\-_]/),p=S(w),p.name=="begin"&&(p.argument=m.current()),p.styleIdentifier())}function x(m,w,p){if(m.eatSpace())return null;if(p&&m.match(p))return o(w,r),"keyword";if(m.match(/^\\[a-zA-Z@]+/))return"tag";if(m.match(/^[a-zA-Z]+/))return"variable-2";if(m.match(/^\\[$&%#{}_]/))return"tag";if(m.match(/^\\[,;!\/]/))return"tag";if(m.match(/^[\^_&]/))return"tag";if(m.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(m.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var f=m.next();return f=="{"||f=="}"||f=="["||f=="]"||f=="("||f==")"?"bracket":f=="%"?(m.skipToEnd(),"comment"):"error"}function g(m,w){var p=m.peek(),f;return p=="{"||p=="["?(f=h(w),f.openBracket(p),m.eat(p),o(w,r),"bracket"):/[ \t\r]/.test(p)?(m.eat(p),null):(o(w,r),s(w),r(m,w))}return{startState:function(){var m=C.inMathMode?function(w,p){return x(w,p)}:r;return{cmdState:[],f:m}},copyState:function(m){return{cmdState:m.cmdState.slice(),f:m.f}},token:function(m,w){return w.f(m,w)},blankLine:function(m){m.f=r,m.cmdState.length=0},lineComment:"%"}}),P.defineMIME("text/x-stex","stex"),P.defineMIME("text/x-latex","stex")})},"19Vz":function(N,Y,k){(function(P){P(k("VrN/"))})(function(P){P.defineOption("placeholder","",function(d,a,o){var r=o&&o!=P.Init;if(a&&!r)d.on("blur",h),d.on("change",s),d.on("swapDoc",s),P.on(d.getInputField(),"compositionupdate",d.state.placeholderCompose=function(){R(d)}),s(d);else if(!a&&r){d.off("blur",h),d.off("change",s),d.off("swapDoc",s),P.off(d.getInputField(),"compositionupdate",d.state.placeholderCompose),u(d);var x=d.getWrapperElement();x.className=x.className.replace(" CodeMirror-empty","")}a&&!d.hasFocus()&&h(d)});function u(d){d.state.placeholder&&(d.state.placeholder.parentNode.removeChild(d.state.placeholder),d.state.placeholder=null)}function C(d){u(d);var a=d.state.placeholder=document.createElement("pre");a.style.cssText="height: 0; overflow: visible",a.style.direction=d.getOption("direction"),a.className="CodeMirror-placeholder CodeMirror-line-like";var o=d.getOption("placeholder");typeof o=="string"&&(o=document.createTextNode(o)),a.appendChild(o),d.display.lineSpace.insertBefore(a,d.display.lineSpace.firstChild)}function R(d){setTimeout(function(){var a=!1,o=d.getInputField();o.nodeName=="TEXTAREA"?a=!o.value:d.lineCount()==1&&(a=!/[^\u200b]/.test(o.querySelector(".CodeMirror-line").textContent)),a?C(d):u(d)},20)}function h(d){S(d)&&C(d)}function s(d){var a=d.getWrapperElement(),o=S(d);a.className=a.className.replace(" CodeMirror-empty","")+(o?" CodeMirror-empty":""),o?C(d):u(d)}function S(d){return d.lineCount()===1&&d.getLine(0)===""}})},"1T2W":function(N,Y,k){N.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"1eCo":function(N,Y,k){(function(P){P(k("VrN/"))})(function(P){"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},C={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};P.defineMode("xml",function(R,h){var s=R.indentUnit,S={},d=h.htmlMode?u:C;for(var a in d)S[a]=d[a];for(var a in h)S[a]=h[a];var o,r;function x(_,I){function j(K){return I.tokenize=K,K(_,I)}var M=_.next();if(M=="<")return _.eat("!")?_.eat("[")?_.match("CDATA[")?j(w("atom","]]>")):null:_.match("--")?j(w("comment","-->")):_.match("DOCTYPE",!0,!0)?(_.eatWhile(/[\w\._\-]/),j(p(1))):null:_.eat("?")?(_.eatWhile(/[\w\._\-]/),I.tokenize=w("meta","?>"),"meta"):(o=_.eat("/")?"closeTag":"openTag",I.tokenize=g,"tag bracket");if(M=="&"){var G;return _.eat("#")?_.eat("x")?G=_.eatWhile(/[a-fA-F\d]/)&&_.eat(";"):G=_.eatWhile(/[\d]/)&&_.eat(";"):G=_.eatWhile(/[\w\.\-:]/)&&_.eat(";"),G?"atom":"error"}else return _.eatWhile(/[^&<]/),null}x.isInText=!0;function g(_,I){var j=_.next();if(j==">"||j=="/"&&_.eat(">"))return I.tokenize=x,o=j==">"?"endTag":"selfcloseTag","tag bracket";if(j=="=")return o="equals",null;if(j=="<"){I.tokenize=x,I.state=c,I.tagName=I.tagStart=null;var M=I.tokenize(_,I);return M?M+" tag error":"tag error"}else return/[\'\"]/.test(j)?(I.tokenize=m(j),I.stringStartCol=_.column(),I.tokenize(_,I)):(_.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function m(_){var I=function(j,M){for(;!j.eol();)if(j.next()==_){M.tokenize=g;break}return"string"};return I.isInAttribute=!0,I}function w(_,I){return function(j,M){for(;!j.eol();){if(j.match(I)){M.tokenize=x;break}j.next()}return _}}function p(_){return function(I,j){for(var M;(M=I.next())!=null;){if(M=="<")return j.tokenize=p(_+1),j.tokenize(I,j);if(M==">")if(_==1){j.tokenize=x;break}else return j.tokenize=p(_-1),j.tokenize(I,j)}return"meta"}}function f(_,I,j){this.prev=_.context,this.tagName=I,this.indent=_.indented,this.startOfLine=j,(S.doNotIndent.hasOwnProperty(I)||_.context&&_.context.noIndent)&&(this.noIndent=!0)}function n(_){_.context&&(_.context=_.context.prev)}function l(_,I){for(var j;;){if(!_.context)return;if(j=_.context.tagName,!S.contextGrabbers.hasOwnProperty(j)||!S.contextGrabbers[j].hasOwnProperty(I))return;n(_)}}function c(_,I,j){return _=="openTag"?(j.tagStart=I.column(),T):_=="closeTag"?v:c}function T(_,I,j){return _=="word"?(j.tagName=I.current(),r="tag",A):S.allowMissingTagName&&_=="endTag"?(r="tag bracket",A(_,I,j)):(r="error",T)}function v(_,I,j){if(_=="word"){var M=I.current();return j.context&&j.context.tagName!=M&&S.implicitlyClosed.hasOwnProperty(j.context.tagName)&&n(j),j.context&&j.context.tagName==M||S.matchClosing===!1?(r="tag",i):(r="tag error",L)}else return S.allowMissingTagName&&_=="endTag"?(r="tag bracket",i(_,I,j)):(r="error",L)}function i(_,I,j){return _!="endTag"?(r="error",i):(n(j),c)}function L(_,I,j){return r="error",i(_,I,j)}function A(_,I,j){if(_=="word")return r="attribute",y;if(_=="endTag"||_=="selfcloseTag"){var M=j.tagName,G=j.tagStart;return j.tagName=j.tagStart=null,_=="selfcloseTag"||S.autoSelfClosers.hasOwnProperty(M)?l(j,M):(l(j,M),j.context=new f(j,M,G==j.indented)),c}return r="error",A}function y(_,I,j){return _=="equals"?E:(S.allowMissing||(r="error"),A(_,I,j))}function E(_,I,j){return _=="string"?b:_=="word"&&S.allowUnquoted?(r="string",A):(r="error",A(_,I,j))}function b(_,I,j){return _=="string"?b:A(_,I,j)}return{startState:function(_){var I={tokenize:x,state:c,indented:_||0,tagName:null,tagStart:null,context:null};return _!=null&&(I.baseIndent=_),I},token:function(_,I){if(!I.tagName&&_.sol()&&(I.indented=_.indentation()),_.eatSpace())return null;o=null;var j=I.tokenize(_,I);return(j||o)&&j!="comment"&&(r=null,I.state=I.state(o||j,_,I),r&&(j=r=="error"?j+" error":r)),j},indent:function(_,I,j){var M=_.context;if(_.tokenize.isInAttribute)return _.tagStart==_.indented?_.stringStartCol+1:_.indented+s;if(M&&M.noIndent)return P.Pass;if(_.tokenize!=g&&_.tokenize!=x)return j?j.match(/^(\s*)/)[0].length:0;if(_.tagName)return S.multilineTagIndentPastTag!==!1?_.tagStart+_.tagName.length+2:_.tagStart+s*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/$/,blockCommentStart:"",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(_){_.state==E&&(_.state=A)},xmlCurrentTag:function(_){return _.tagName?{name:_.tagName,close:_.type=="closeTag"}:null},xmlCurrentContext:function(_){for(var I=[],j=_.context;j;j=j.prev)j.tagName&&I.push(j.tagName);return I.reverse()}}}),P.defineMIME("text/xml","xml"),P.defineMIME("application/xml","xml"),P.mimeModes.hasOwnProperty("text/html")||P.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("MlIO"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.Hasher,h=u.x64,s=h.Word,S=h.WordArray,d=u.algo;function a(){return s.create.apply(s,arguments)}var o=[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 g=0;g<80;g++)r[g]=a()})();var x=d.SHA512=R.extend({_doReset:function(){this._hash=new S.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(g,m){for(var w=this._hash.words,p=w[0],f=w[1],n=w[2],l=w[3],c=w[4],T=w[5],v=w[6],i=w[7],L=p.high,A=p.low,y=f.high,E=f.low,b=n.high,_=n.low,I=l.high,j=l.low,M=c.high,G=c.low,K=T.high,H=T.low,z=v.high,B=v.low,W=i.high,F=i.low,$=L,ee=A,Z=y,ve=E,he=b,le=_,Re=I,xe=j,ie=M,se=G,re=K,be=H,q=z,ne=B,Te=W,ae=F,J=0;J<80;J++){var X,Q,pe=r[J];if(J<16)Q=pe.high=g[m+J*2]|0,X=pe.low=g[m+J*2+1]|0;else{var ce=r[J-15],we=ce.high,ze=ce.low,Ge=(we>>>1|ze<<31)^(we>>>8|ze<<24)^we>>>7,Qe=(ze>>>1|we<<31)^(ze>>>8|we<<24)^(ze>>>7|we<<25),$e=r[J-2],rt=$e.high,et=$e.low,Me=(rt>>>19|et<<13)^(rt<<3|et>>>29)^rt>>>6,Ce=(et>>>19|rt<<13)^(et<<3|rt>>>29)^(et>>>6|rt<<26),Ve=r[J-7],tt=Ve.high,He=Ve.low,Je=r[J-16],_e=Je.high,Se=Je.low;X=Qe+He,Q=Ge+tt+(X>>>0>>0?1:0),X=X+Ce,Q=Q+Me+(X>>>0>>0?1:0),X=X+Se,Q=Q+_e+(X>>>0>>0?1:0),pe.high=Q,pe.low=X}var Oe=ie&re^~ie&q,de=se&be^~se&ne,ye=$&Z^$&he^Z&he,Ee=ee&ve^ee&le^ve&le,De=($>>>28|ee<<4)^($<<30|ee>>>2)^($<<25|ee>>>7),Be=(ee>>>28|$<<4)^(ee<<30|$>>>2)^(ee<<25|$>>>7),Xe=(ie>>>14|se<<18)^(ie>>>18|se<<14)^(ie<<23|se>>>9),nt=(se>>>14|ie<<18)^(se>>>18|ie<<14)^(se<<23|ie>>>9),dt=o[J],Et=dt.high,ft=dt.low,jt=ae+nt,Ct=Te+Xe+(jt>>>0>>0?1:0),jt=jt+de,Ct=Ct+Oe+(jt>>>0>>0?1:0),jt=jt+ft,Ct=Ct+Et+(jt>>>0>>0?1:0),jt=jt+X,Ct=Ct+Q+(jt>>>0>>0?1:0),xt=Be+Ee,Yt=De+ye+(xt>>>0>>0?1:0);Te=q,ae=ne,q=re,ne=be,re=ie,be=se,se=xe+jt|0,ie=Re+Ct+(se>>>0>>0?1:0)|0,Re=he,xe=le,he=Z,le=ve,Z=$,ve=ee,ee=jt+xt|0,$=Ct+Yt+(ee>>>0>>0?1:0)|0}A=p.low=A+ee,p.high=L+$+(A>>>0>>0?1:0),E=f.low=E+ve,f.high=y+Z+(E>>>0>>0?1:0),_=n.low=_+le,n.high=b+he+(_>>>0>>0?1:0),j=l.low=j+xe,l.high=I+Re+(j>>>0>>0?1:0),G=c.low=G+se,c.high=M+ie+(G>>>0>>0?1:0),H=T.low=H+be,T.high=K+re+(H>>>0>>0?1:0),B=v.low=B+ne,v.high=z+q+(B>>>0>>0?1:0),F=i.low=F+ae,i.high=W+Te+(F>>>0>>0?1:0)},_doFinalize:function(){var g=this._data,m=g.words,w=this._nDataBytes*8,p=g.sigBytes*8;m[p>>>5]|=128<<24-p%32,m[(p+128>>>10<<5)+30]=Math.floor(w/4294967296),m[(p+128>>>10<<5)+31]=w,g.sigBytes=m.length*4,this._process();var f=this._hash.toX32();return f},clone:function(){var g=R.clone.call(this);return g._hash=this._hash.clone(),g},blockSize:1024/32});u.SHA512=R._createHelper(x),u.HmacSHA512=R._createHmacHelper(x)}(),P.SHA512})},"3y9D":function(N,Y,k){(function(P,u){N.exports=Y=u(k("Ib8C"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.WordArray,h=C.Hasher,s=u.algo,S=[],d=s.SHA1=h.extend({_doReset:function(){this._hash=new R.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,o){for(var r=this._hash.words,x=r[0],g=r[1],m=r[2],w=r[3],p=r[4],f=0;f<80;f++){if(f<16)S[f]=a[o+f]|0;else{var n=S[f-3]^S[f-8]^S[f-14]^S[f-16];S[f]=n<<1|n>>>31}var l=(x<<5|x>>>27)+p+S[f];f<20?l+=(g&m|~g&w)+1518500249:f<40?l+=(g^m^w)+1859775393:f<60?l+=(g&m|g&w|m&w)-1894007588:l+=(g^m^w)-899497514,p=w,w=m,m=g<<30|g>>>2,g=x,x=l}r[0]=r[0]+x|0,r[1]=r[1]+g|0,r[2]=r[2]+m|0,r[3]=r[3]+w|0,r[4]=r[4]+p|0},_doFinalize:function(){var a=this._data,o=a.words,r=this._nDataBytes*8,x=a.sigBytes*8;return o[x>>>5]|=128<<24-x%32,o[(x+64>>>9<<4)+14]=Math.floor(r/4294967296),o[(x+64>>>9<<4)+15]=r,a.sigBytes=o.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(d),u.HmacSHA1=h._createHmacHelper(d)}(),P.SHA1})},4:function(N,Y){},"5hvy":function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("MlIO"))})(this,function(P){return function(u){var C=P,R=C.lib,h=R.WordArray,s=R.Hasher,S=C.x64,d=S.Word,a=C.algo,o=[],r=[],x=[];(function(){for(var w=1,p=0,f=0;f<24;f++){o[w+5*p]=(f+1)*(f+2)/2%64;var n=p%5,l=(2*w+3*p)%5;w=n,p=l}for(var w=0;w<5;w++)for(var p=0;p<5;p++)r[w+5*p]=p+(2*w+3*p)%5*5;for(var c=1,T=0;T<24;T++){for(var v=0,i=0,L=0;L<7;L++){if(c&1){var A=(1<>>24)&16711935|(c<<24|c>>>8)&4278255360,T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360;var v=f[l];v.high^=T,v.low^=c}for(var i=0;i<24;i++){for(var L=0;L<5;L++){for(var A=0,y=0,E=0;E<5;E++){var v=f[L+5*E];A^=v.high,y^=v.low}var b=g[L];b.high=A,b.low=y}for(var L=0;L<5;L++)for(var _=g[(L+4)%5],I=g[(L+1)%5],j=I.high,M=I.low,A=_.high^(j<<1|M>>>31),y=_.low^(M<<1|j>>>31),E=0;E<5;E++){var v=f[L+5*E];v.high^=A,v.low^=y}for(var G=1;G<25;G++){var A,y,v=f[G],K=v.high,H=v.low,z=o[G];z<32?(A=K<>>32-z,y=H<>>32-z):(A=H<>>64-z,y=K<>>64-z);var B=g[r[G]];B.high=A,B.low=y}var W=g[0],F=f[0];W.high=F.high,W.low=F.low;for(var L=0;L<5;L++)for(var E=0;E<5;E++){var G=L+5*E,v=f[G],$=g[G],ee=g[(L+1)%5+5*E],Z=g[(L+2)%5+5*E];v.high=$.high^~ee.high&Z.high,v.low=$.low^~ee.low&Z.low}var v=f[0],ve=x[i];v.high^=ve.high,v.low^=ve.low}},_doFinalize:function(){var w=this._data,p=w.words,f=this._nDataBytes*8,n=w.sigBytes*8,l=this.blockSize*32;p[n>>>5]|=1<<24-n%32,p[(u.ceil((n+1)/l)*l>>>5)-1]|=128,w.sigBytes=p.length*4,this._process();for(var c=this._state,T=this.cfg.outputLength/8,v=T/8,i=[],L=0;L>>24)&16711935|(y<<24|y>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,i.push(E),i.push(y)}return new h.init(i,T)},clone:function(){for(var w=s.clone.call(this),p=w._state=this._state.slice(0),f=0;f<25;f++)p[f]=p[f].clone();return w}});C.SHA3=s._createHelper(m),C.HmacSHA3=s._createHmacHelper(m)}(Math),P.SHA3})},"5nXd":function(N,Y,k){var P=k("MFOe"),u=P.slice,C=P.pluck,R=P.each,h=P.bind,s=P.create,S=P.isList,d=P.isFunction,a=P.isObject;N.exports={createStore:x};var o={version:"2.0.12",enabled:!1,get:function(g,m){var w=this.storage.read(this._namespacePrefix+g);return this._deserialize(w,m)},set:function(g,m){return m===void 0?this.remove(g):(this.storage.write(this._namespacePrefix+g,this._serialize(m)),m)},remove:function(g){this.storage.remove(this._namespacePrefix+g)},each:function(g){var m=this;this.storage.each(function(w,p){g.call(m,m._deserialize(w),(p||"").replace(m._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(g){return this._namespacePrefix=="__storejs_"+g+"_"},createStore:function(){return x.apply(this,arguments)},addPlugin:function(g){this._addPlugin(g)},namespace:function(g){return x(this.storage,this.plugins,g)}};function r(){var g=typeof console=="undefined"?null:console;if(!g)return;var m=g.warn?g.warn:g.log;m.apply(g,arguments)}function x(g,m,w){w||(w=""),g&&!S(g)&&(g=[g]),m&&!S(m)&&(m=[m]);var p=w?"__storejs_"+w+"_":"",f=w?new RegExp("^"+p):null,n=/^[a-zA-Z0-9_\-]*$/;if(!n.test(w))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var l={_namespacePrefix:p,_namespaceRegexp:f,_testStorage:function(T){try{var v="__storejs__test__";T.write(v,v);var i=T.read(v)===v;return T.remove(v),i}catch(L){return!1}},_assignPluginFnProp:function(T,v){var i=this[v];this[v]=function(){var A=u(arguments,0),y=this;function E(){return i?(R(arguments,function(_,I){A[I]=_}),i.apply(y,A)):void 0}var b=[E].concat(A);return T.apply(y,b)}},_serialize:function(T){return JSON.stringify(T)},_deserialize:function(T,v){if(!T)return v;var i="";try{i=JSON.parse(T)}catch(L){i=T}return i!==void 0?i:v},_addStorage:function(T){if(this.enabled)return;this._testStorage(T)&&(this.storage=T,this.enabled=!0)},_addPlugin:function(T){var v=this;if(S(T)){R(T,function(A){v._addPlugin(A)});return}var i=C(this.plugins,function(A){return T===A});if(i)return;if(this.plugins.push(T),!d(T))throw new Error("Plugins must be function values that return objects");var L=T.call(this);if(!a(L))throw new Error("Plugins must return an object of function properties");R(L,function(A,y){if(!d(A))throw new Error("Bad plugin property: "+y+" from plugin "+T.name+". Plugins should only return functions.");v._assignPluginFnProp(A,y)})},addStorage:function(T){r("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(T)}},c=s(l,o,{plugins:[]});return c.raw={},R(c,function(T,v){d(T)&&(c.raw[v]=h(c,T))}),R(g,function(T){c._addStorage(T)}),R(m,function(T){c._addPlugin(T)}),c}},"6+eU":function(N,Y,k){"use strict";k.d(Y,"a",function(){return i});var P=k("wx14"),u=k("rePB"),C=k("VTBJ"),R=k("1OyB"),h=k("vuIU"),s=k("Ji7U"),S=k("LK+K"),d=k("q1tI"),a=k.n(d),o=k("TSYQ"),r=k.n(o),x=function(A){var y,E="".concat(A.rootPrefixCls,"-item"),b=r()(E,"".concat(E,"-").concat(A.page),(y={},Object(u.a)(y,"".concat(E,"-active"),A.active),Object(u.a)(y,A.className,!!A.className),Object(u.a)(y,"".concat(E,"-disabled"),!A.page),y)),_=function(){A.onClick(A.page)},I=function(M){A.onKeyPress(M,A.onClick,A.page)};return a.a.createElement("li",{title:A.showTitle?A.page:null,className:b,onClick:_,onKeyPress:I,tabIndex:"0"},A.itemRender(A.page,"page",a.a.createElement("a",{rel:"nofollow"},A.page)))},g=x,m={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},w=function(L){Object(s.a)(y,L);var A=Object(S.a)(y);function y(){var E;Object(R.a)(this,y);for(var b=arguments.length,_=new Array(b),I=0;I=0||j.relatedTarget.className.indexOf("".concat(H,"-next"))>=0))return;E.setState({goInputText:""}),K(E.getValidValue())},E.go=function(j){var M=E.state.goInputText;if(M==="")return;(j.keyCode===m.ENTER||j.type==="click")&&(E.setState({goInputText:""}),E.props.quickGo(E.getValidValue()))},E}return Object(h.a)(y,[{key:"getValidValue",value:function(){var b=this.state,_=b.goInputText,I=b.current;return!_||isNaN(_)?I:Number(_)}},{key:"getPageSizeOptions",value:function(){var b=this.props,_=b.pageSize,I=b.pageSizeOptions;return I.some(function(j){return j.toString()===_.toString()})?I:I.concat([_.toString()]).sort(function(j,M){var G=isNaN(Number(j))?0:Number(j),K=isNaN(Number(M))?0:Number(M);return G-K})}},{key:"render",value:function(){var b=this,_=this.props,I=_.pageSize,j=_.locale,M=_.rootPrefixCls,G=_.changeSize,K=_.quickGo,H=_.goButton,z=_.selectComponentClass,B=_.buildOptionText,W=_.selectPrefixCls,F=_.disabled,$=this.state.goInputText,ee="".concat(M,"-options"),Z=z,ve=null,he=null,le=null;if(!G&&!K)return null;var Re=this.getPageSizeOptions();if(G&&Z){var xe=Re.map(function(ie,se){return a.a.createElement(Z.Option,{key:se,value:ie.toString()},(B||b.buildOptionText)(ie))});ve=a.a.createElement(Z,{disabled:F,prefixCls:W,showSearch:!1,className:"".concat(ee,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(I||Re[0]).toString(),onChange:this.changeSize,getPopupContainer:function(se){return se.parentNode}},xe)}return K&&(H&&(le=typeof H=="boolean"?a.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:F,className:"".concat(ee,"-quick-jumper-button")},j.jump_to_confirm):a.a.createElement("span",{onClick:this.go,onKeyUp:this.go},H)),he=a.a.createElement("div",{className:"".concat(ee,"-quick-jumper")},j.jump_to,a.a.createElement("input",{disabled:F,type:"text",value:$,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),j.page,le)),a.a.createElement("li",{className:"".concat(ee)},ve,he)}}]),y}(a.a.Component);w.defaultProps={pageSizeOptions:["10","20","50","100"]};var p=w,f=k("N2Kk");function n(){}function l(L){return typeof L=="number"&&isFinite(L)&&Math.floor(L)===L}function c(L,A,y){return y}function T(L,A,y){var E=typeof L=="undefined"?A.pageSize:L;return Math.floor((y.total-1)/E)+1}var v=function(L){Object(s.a)(y,L);var A=Object(S.a)(y);function y(E){var b;Object(R.a)(this,y),b=A.call(this,E),b.getJumpPrevPage=function(){return Math.max(1,b.state.current-(b.props.showLessItems?3:5))},b.getJumpNextPage=function(){return Math.min(T(void 0,b.state,b.props),b.state.current+(b.props.showLessItems?3:5))},b.getItemIcon=function(G,K){var H=b.props.prefixCls,z=G||a.a.createElement("button",{type:"button","aria-label":K,className:"".concat(H,"-item-link")});return typeof G=="function"&&(z=a.a.createElement(G,Object(C.a)({},b.props))),z},b.savePaginationNode=function(G){b.paginationNode=G},b.isValid=function(G){return l(G)&&G!==b.state.current},b.shouldDisplayQuickJumper=function(){var G=b.props,K=G.showQuickJumper,H=G.pageSize,z=G.total;return z<=H?!1:K},b.handleKeyDown=function(G){(G.keyCode===m.ARROW_UP||G.keyCode===m.ARROW_DOWN)&&G.preventDefault()},b.handleKeyUp=function(G){var K=b.getValidValue(G),H=b.state.currentInputValue;K!==H&&b.setState({currentInputValue:K}),G.keyCode===m.ENTER?b.handleChange(K):G.keyCode===m.ARROW_UP?b.handleChange(K-1):G.keyCode===m.ARROW_DOWN&&b.handleChange(K+1)},b.changePageSize=function(G){var K=b.state.current,H=T(G,b.state,b.props);K=K>H?H:K,H===0&&(K=b.state.current),typeof G=="number"&&("pageSize"in b.props||b.setState({pageSize:G}),"current"in b.props||b.setState({current:K,currentInputValue:K})),b.props.onShowSizeChange(K,G),"onChange"in b.props&&b.props.onChange&&b.props.onChange(K,G)},b.handleChange=function(G){var K=b.props.disabled,H=G;if(b.isValid(H)&&!K){var z=T(void 0,b.state,b.props);H>z?H=z:H<1&&(H=1),"current"in b.props||b.setState({current:H,currentInputValue:H});var B=b.state.pageSize;return b.props.onChange(H,B),H}return b.state.current},b.prev=function(){b.hasPrev()&&b.handleChange(b.state.current-1)},b.next=function(){b.hasNext()&&b.handleChange(b.state.current+1)},b.jumpPrev=function(){b.handleChange(b.getJumpPrevPage())},b.jumpNext=function(){b.handleChange(b.getJumpNextPage())},b.hasPrev=function(){return b.state.current>1},b.hasNext=function(){return b.state.current2?H-2:0),B=2;B=I?M=I:M=Number(_),M}},{key:"getShowSizeChanger",value:function(){var b=this.props,_=b.showSizeChanger,I=b.total,j=b.totalBoundaryShowSizeChanger;return typeof _!="undefined"?_:I>j}},{key:"renderPrev",value:function(b){var _=this.props,I=_.prevIcon,j=_.itemRender,M=j(b,"prev",this.getItemIcon(I,"prev page")),G=!this.hasPrev();return Object(d.isValidElement)(M)?Object(d.cloneElement)(M,{disabled:G}):M}},{key:"renderNext",value:function(b){var _=this.props,I=_.nextIcon,j=_.itemRender,M=j(b,"next",this.getItemIcon(I,"next page")),G=!this.hasNext();return Object(d.isValidElement)(M)?Object(d.cloneElement)(M,{disabled:G}):M}},{key:"render",value:function(){var b=this,_=this.props,I=_.prefixCls,j=_.className,M=_.style,G=_.disabled,K=_.hideOnSinglePage,H=_.total,z=_.locale,B=_.showQuickJumper,W=_.showLessItems,F=_.showTitle,$=_.showTotal,ee=_.simple,Z=_.itemRender,ve=_.showPrevNextJumpers,he=_.jumpPrevIcon,le=_.jumpNextIcon,Re=_.selectComponentClass,xe=_.selectPrefixCls,ie=_.pageSizeOptions,se=this.state,re=se.current,be=se.pageSize,q=se.currentInputValue;if(K===!0&&H<=be)return null;var ne=T(void 0,this.state,this.props),Te=[],ae=null,J=null,X=null,Q=null,pe=null,ce=B&&B.goButton,we=W?1:2,ze=re-1>0?re-1:0,Ge=re+1=we*2&&re!==1+2&&(Te[0]=Object(d.cloneElement)(Te[0],{className:"".concat(I,"-item-after-jump-prev")}),Te.unshift(ae)),ne-re>=we*2&&re!==ne-2&&(Te[Te.length-1]=Object(d.cloneElement)(Te[Te.length-1],{className:"".concat(I,"-item-before-jump-next")}),Te.push(J)),Ve!==1&&Te.unshift(X),tt!==ne&&Te.push(Q)}var _e=null;$&&(_e=a.a.createElement("li",{className:"".concat(I,"-total-text")},$(H,[H===0?0:(re-1)*be+1,re*be>H?H:re*be])));var Se=!this.hasPrev()||!ne,Oe=!this.hasNext()||!ne;return a.a.createElement("ul",Object(P.a)({className:r()(I,j,Object(u.a)({},"".concat(I,"-disabled"),G)),style:M,unselectable:"unselectable",ref:this.savePaginationNode},Qe),_e,a.a.createElement("li",{title:F?z.prev_page:null,onClick:this.prev,tabIndex:Se?null:0,onKeyPress:this.runIfEnterPrev,className:r()("".concat(I,"-prev"),Object(u.a)({},"".concat(I,"-disabled"),Se)),"aria-disabled":Se},this.renderPrev(ze)),Te,a.a.createElement("li",{title:F?z.next_page:null,onClick:this.next,tabIndex:Oe?null:0,onKeyPress:this.runIfEnterNext,className:r()("".concat(I,"-next"),Object(u.a)({},"".concat(I,"-disabled"),Oe)),"aria-disabled":Oe},this.renderNext(Ge)),a.a.createElement(p,{disabled:G,locale:z,rootPrefixCls:I,selectComponentClass:Re,selectPrefixCls:xe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:re,pageSize:be,pageSizeOptions:ie,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ce}))}}],[{key:"getDerivedStateFromProps",value:function(b,_){var I={};if("current"in b&&(I.current=b.current,b.current!==_.current&&(I.currentInputValue=I.current)),"pageSize"in b&&b.pageSize!==_.pageSize){var j=_.current,M=T(b.pageSize,_,b);j=j>M?M:j,"current"in b||(I.current=j,I.currentInputValue=j),I.pageSize=b.pageSize}return I}}]),y}(a.a.Component);v.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:f.a,style:{},itemRender:c,totalBoundaryShowSizeChanger:50};var i=v},"6RRn":function(N,Y,k){"use strict";var P=k("wCXF"),u=k("n6Qo");k.d(Y,"b",function(){return u.a});var C=k("IBYe"),R=k("6eGT"),h=k("hW8S");k.d(Y,"a",function(){return h.a}),Y.c=P.b},"6eGT":function(N,Y,k){"use strict";function P(u){return null}Y.a=P},"7Cbv":function(N,Y,k){"use strict";var P=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 C(){if(!P)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return P(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(g){return typeof g=="string"&&R.test(g)}for(var s=h,S=[],d=0;d<256;++d)S.push((d+256).toString(16).substr(1));function a(g){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,w=(S[g[m+0]]+S[g[m+1]]+S[g[m+2]]+S[g[m+3]]+"-"+S[g[m+4]]+S[g[m+5]]+"-"+S[g[m+6]]+S[g[m+7]]+"-"+S[g[m+8]]+S[g[m+9]]+"-"+S[g[m+10]]+S[g[m+11]]+S[g[m+12]]+S[g[m+13]]+S[g[m+14]]+S[g[m+15]]).toLowerCase();if(!s(w))throw TypeError("Stringified UUID is invalid");return w}var o=a;function r(g,m,w){g=g||{};var p=g.random||(g.rng||C)();if(p[6]=p[6]&15|64,p[8]=p[8]&63|128,m){w=w||0;for(var f=0;f<16;++f)m[w+f]=p[f];return m}return o(p)}var x=Y.a=r},"7ahc":function(N,Y,k){"use strict";k.d(Y,"a",function(){return T});var P=k("k1fw"),u=k("0Owb"),C=k("+L6B"),R=k("2/Rp"),h=k("y8nQ"),s=k("Vl3Y"),S=k("tJVT"),d=k("OaEy"),a=k("2fM7"),o=k("q1tI"),r=k.n(o),x=k("VrN/"),g=k.n(x),m=k("p77/"),w=k.n(m),p=k("c5Ni"),f=k.n(p),n=a.a.Option,l={labelCol:{span:4},wrapperCol:{span:20}},c={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"]};Y.b=function(v){var i=v.callback,L=v.onCancel,A=Object(o.useState)("python"),y=Object(S.a)(A,2),E=y[0],b=y[1];function _(j){b(c[j][1])}function I(j){i(j)}return r.a.createElement(s.a,Object(u.a)({},l,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:I}),r.a.createElement(s.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},r.a.createElement(a.a,{onChange:_},Object.keys(c).map(function(j){return r.a.createElement(n,{key:j,value:j},c[j][0])}))),r.a.createElement(s.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:L},"\u53D6\u6D88")))};function T(v){var i=v.value,L=v.onChange,A=v.mode,y=v.options,E=y===void 0?{}:y,b=Object(o.useRef)(),_=Object(o.useState)(),I=Object(S.a)(_,2),j=I[0],M=I[1];return Object(o.useEffect)(function(){if(j){function G(K){var H=K.getValue();L&&L(H)}return j.on("change",G),function(){j.off("change",G)}}},[j,L]),Object(o.useEffect)(function(){j&&j.setOption("mode",A)},[j,A]),Object(o.useEffect)(function(){j&&((i!==j.getValue()||i==="")&&setTimeout(function(){j.setValue(i||" ")},300))},[j,i]),Object(o.useEffect)(function(){if(b.current&&!j){var G=g.a.fromTextArea(b.current,Object(P.a)({mode:A,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},E));M(G)}},[b.current,j]),r.a.createElement("div",{className:"my-codemirror-container"},r.a.createElement("textarea",{ref:b}))}},"815F":function(N,Y,k){"use strict";k.d(Y,"e",function(){return S}),k.d(Y,"c",function(){return a}),k.d(Y,"d",function(){return o}),k.d(Y,"a",function(){return x}),k.d(Y,"f",function(){return g}),k.d(Y,"b",function(){return m});var P=k("KQm4"),u=k("VTBJ"),C=k("Ff2n"),R=k("Zm9Q"),h=k("Kwbf"),s=k("OZM5");function S(w,p){return w!=null?w:p}function d(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],p=new Map;function f(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(c){var T=c.key,v=c.children;Object(h.a)(T!=null,"Tree node must have a certain key: [".concat(l).concat(T,"]"));var i=String(T);Object(h.a)(!p.has(i)||T===null||T===void 0,"Same 'key' exist in the Tree: ".concat(i)),p.set(i,!0),f(v,"".concat(l).concat(i," > "))})}f(w)}function a(w){function p(f){var n=Object(R.a)(f);return n.map(function(l){if(!Object(s.i)(l))return Object(h.a)(!l,"Tree/TreeNode can only accept TreeNode as children."),null;var c=l.key,T=l.props,v=T.children,i=Object(C.a)(T,["children"]),L=Object(u.a)({key:c},i),A=p(v);return A.length&&(L.children=A),L}).filter(function(l){return l})}return p(w)}function o(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],f=new Set(p===!0?[]:p),n=[];function l(c){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return c.map(function(v,i){var L=Object(s.h)(T?T.pos:"0",i),A=S(v.key,L),y=Object(u.a)(Object(u.a)({},v),{},{parent:T,pos:L,children:null,data:v,isStart:[].concat(Object(P.a)(T?T.isStart:[]),[i===0]),isEnd:[].concat(Object(P.a)(T?T.isEnd:[]),[i===c.length-1])});return n.push(y),p===!0||f.has(A)?y.children=l(v.children||[],y):y.children=[],y})}return l(w),n}function r(w,p,f){var n;f?typeof f=="string"?n=function(T){return T[f]}:typeof f=="function"&&(n=function(T){return f(T)}):n=function(T,v){return S(T.key,v)};function l(c,T,v){var i=c?c.children:w,L=c?Object(s.h)(v.pos,T):"0";if(c){var A=n(c,L),y={node:c,index:T,pos:L,key:A,parentPos:v.node?v.pos:null,level:v.level+1};p(y)}i&&i.forEach(function(E,b){l(E,b,{node:c,pos:L,level:v?v.level+1:-1})})}l(null)}function x(w){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=p.initWrapper,n=p.processEntity,l=p.onProcessFinished,c=arguments.length>2?arguments[2]:void 0,T={},v={},i={posEntities:T,keyEntities:v};return f&&(i=f(i)||i),r(w,function(L){var A=L.node,y=L.index,E=L.pos,b=L.key,_=L.parentPos,I=L.level,j={node:A,index:y,key:b,pos:E,level:I},M=S(b,E);T[E]=j,v[M]=j,j.parent=T[_],j.parent&&(j.parent.children=j.parent.children||[],j.parent.children.push(j)),n&&n(j,i)},c),l&&l(i),i}function g(w,p){var f=p.expandedKeys,n=p.selectedKeys,l=p.loadedKeys,c=p.loadingKeys,T=p.checkedKeys,v=p.halfCheckedKeys,i=p.dragOverNodeKey,L=p.dropPosition,A=p.keyEntities,y=A[w],E={eventKey:w,expanded:f.indexOf(w)!==-1,selected:n.indexOf(w)!==-1,loaded:l.indexOf(w)!==-1,loading:c.indexOf(w)!==-1,checked:T.indexOf(w)!==-1,halfChecked:v.indexOf(w)!==-1,pos:String(y?y.pos:""),dragOver:i===w&&L===0,dragOverGapTop:i===w&&L===-1,dragOverGapBottom:i===w&&L===1};return E}function m(w){var p=w.data,f=w.expanded,n=w.selected,l=w.checked,c=w.loaded,T=w.loading,v=w.halfChecked,i=w.dragOver,L=w.dragOverGapTop,A=w.dragOverGapBottom,y=w.pos,E=w.active,b=Object(u.a)(Object(u.a)({},p),{},{expanded:f,selected:n,checked:l,loaded:c,loading:T,halfChecked:v,dragOver:i,dragOverGapTop:L,dragOverGapBottom:A,pos:y,active:E});return"props"in b||Object.defineProperty(b,"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`."),w}}),b}},"8EBN":function(N,Y,k){(function(P){P(k("VrN/"))})(function(P){"use strict";P.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var u=0;u-1&&R.substring(S+1,R.length);if(d)return P.findModeByExtension(d)},P.findModeByName=function(R){R=R.toLowerCase();for(var h=0;h=Z.length?ve.slice(Z.length):ve}).join(` `)}var o=[],r=["
    "],x=new S.a.Renderer,g=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function m(){o.length=0,r=["
      "]}var w={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function p(F,$,ee,Z){if($>=F.length||F[$].level<=ee)return $;var ve=F[$];Z.push("
    • "+ve.text+""),$++;var he=[];return $=p(F,$,ve.level,he),he.length>0&&(Z.push("
        "),he.forEach(function(le){Z.push(le)}),Z.push("
      ")),Z.push("
    • "),$=p(F,$,ee,Z),$}function f(){return p(o,0,0,r),r.push("
    "),r.join("")}var n={heading:function($){var ee=g.exec($);if(ee)return{type:"heading",raw:ee[0],depth:ee[1].length,text:ee[2]}},fences:function($){var ee=this.rules.block.fences.exec($);if(ee){var Z=ee[0],ve=a(Z,ee[3]||""),he=ee[2]?ee[2].trim():ee[2];if(["latex","katex","math"].indexOf(he)>=0){var le=T(),Re=ve;ve=le,v[le]={type:"block",expression:Re}}return{type:"code",raw:Z,lang:he,text:ve}}}},l=/(?:\${2})([^\n`]+?)(?:\${2})/gi,c=0,T=function(){return"__special_katext_id_".concat(c++,"__")},v={};function i(){return v}function L(){c=0,v={}}function A(F){return F=F.replace(l,function($,ee){var Z=T();return v[Z]={type:"inline",expression:ee},Z}),F}var y=x.listitem;x.listitem=function(F){return y(A(F))};var E=x.paragraph;x.paragraph=function(F){return E(A(F))};var b=x.tablecell;x.tablecell=function(F,$){return b(A(F),$)},x.code=function(F,$,ee){var Z=($||"").match(/\S*/)[0];return Z?["latex","katex","math"].indexOf(Z)>=0?"

    ".concat(F,"

    "):'
    ').concat(ee?F:Object(d.escape)(F,!0),`
    `):'
    '+(ee?F:Object(d.escape)(F,!0))+"
    "},x.heading=function(F,$,ee){var Z=this.options.headerPrefix+ee.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return o.push({anchor:Z,level:$,text:F}),"'+F+""},S.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),S.a.use({tokenizer:n,renderer:x});var _=S.a,I=k("SJMd"),j=k("ulZh"),M=k.n(j),G=k("m3rI"),K=k("Oy/b"),H=k("p5ED"),z=/]*>/g;function B(F){var $=document.createElement("div");return $.innerHTML=F,$.childNodes.length===0?"":$.childNodes[0].nodeValue}var W=Y.a=function(F){var $=F.value,ee=$===void 0?"":$,Z=F.className,ve=F.showTextOnly,he=F.showLines,le=F.style,Re=le===void 0?{}:le,xe=F.stylesPrev,ie=xe===void 0?{}:xe,se=String(ee),re=Object(C.useState)(""),be=Object(u.a)(re,2),q=be[0],ne=be[1],Te=Object(C.useMemo)(function(){try{var Q=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,pe=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ce=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;se=se.replace(Q,"("+G.a.API_SERVER+"/api/attachments/").replace(pe,'"'+G.a.API_SERVER+"/api/attachments/").replace(ce,'"'+G.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,` `),se=se.replace(new RegExp("(?[TOC]

    ",f()),m()),we=we.replace(/(__special_katext_id_\d+__)/g,function(Qe,$e){var rt=ze[$e],et=rt.type,Me=rt.expression;return Object(K.renderToString)(B(Me)||"",{displayMode:et==="block",throwOnError:!1,output:"html"})}),we=we.replace(/▁/g,"\u2581\u2581\u2581"),L(),ve){var Ge=document.createElement("div");return Ge.innerHTML=we,Ge.innerText}return setTimeout(function(){return X()},500),we},[se]),ae=Object(C.useRef)();w.WebkitLineClamp=he,he&&(Re=Object(P.a)(Object(P.a)({},Re),w));function J(Q){var pe=Q.target;if(pe.tagName.toUpperCase()==="A"){var ce=pe.getAttribute("href");if(ce.indexOf("office")>-1)Q.preventDefault(),ne(ce);else if(ce.startsWith("#")){Q.preventDefault();var we=document.getElementById(ce.replace("#",""));we&&we.scrollIntoView(!0)}}}var X=function(){var pe,ce=(pe=ae.current)===null||pe===void 0?void 0:pe.querySelectorAll("video");ce==null||ce.forEach(function(we){if(we.oncontextmenu=function(){return!1},we.src.indexOf(".m3u8")>-1&&!we.canPlayType("application/vnd.apple.mpegurl")){if(M.a.isSupported()){var ze=new M.a;ze.loadSource(we.src),ze.attachMedia(we)}}})};return Object(C.useEffect)(function(){if(ae.current&&Te&&(Te.match(z)&&window.PR.prettyPrint()),ae.current)return ae.current.addEventListener("click",J),function(){ae.current.removeEventListener("click",J),L(),m()}},[Te,ae.current,J]),R.a.createElement(R.a.Fragment,null,R.a.createElement("div",{ref:ae,style:Object(P.a)({},Re),className:"".concat(Z||""," markdown-body "),dangerouslySetInnerHTML:{__html:Te}}),R.a.createElement(H.a,{close:!0,data:q,type:q!=null&&q.length?"office":"",style:Object(P.a)({},ie),onClose:function(){return ne("")}}))}},"9OqN":function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return P.mode.CTR=function(){var u=P.lib.BlockCipherMode.extend(),C=u.Encryptor=u.extend({processBlock:function(R,h){var s=this._cipher,S=s.blockSize,d=this._iv,a=this._counter;d&&(a=this._counter=d.slice(0),this._iv=void 0);var o=a.slice(0);s.encryptBlock(o,0),a[S-1]=a[S-1]+1|0;for(var r=0;r-1?"."+$e.split(".").pop():"");F===null&&(Me="testsets/".concat(et).concat($e.indexOf(".")>-1?"."+$e.split(".").pop():"")),Qe.multipartUpload(Me,new Blob([Ge.file],{type:Ge.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:$e+""},url:Re==null?void 0:Re.callback_url,host:Re==null?void 0:Re.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(y.e)(rt)}}).then(function(Ce){if(Ce.data.status===0){ne.current=ne.current+1;var Ve=q.current.map(function(He){var Je,_e;if(He.name===((Je=Ce.data)===null||Je===void 0||((_e=Je.data)===null||_e===void 0)?void 0:_e.file_name)){var Se,Oe,de,ye=Object(a.a)({},He);if((Se=Ce.data)!==null&&Se!==void 0&&(Oe=Se.data)!==null&&Oe!==void 0&&(de=Oe.file_name)!==null&&de!==void 0&&de.includes(".in")){var Ee,De,Be,Xe,nt,dt;ye.in_object_key=(Ee=Ce.data)===null||Ee===void 0||((De=Ee.data)===null||De===void 0)?void 0:De.object,ye.in_object_size=(Be=Ce.data)===null||Be===void 0||((Xe=Be.data)===null||Xe===void 0)?void 0:Xe.size,ye.input=(nt=Ce.data)===null||nt===void 0||((dt=nt.data)===null||dt===void 0)?void 0:dt.file_name,ye.in_file=Ge}else{var Et,ft,jt,Ct,xt,Yt;ye.out_object_key=(Et=Ce.data)===null||Et===void 0||((ft=Et.data)===null||ft===void 0)?void 0:ft.object,ye.out_object_size=(jt=Ce.data)===null||jt===void 0||((Ct=jt.data)===null||Ct===void 0)?void 0:Ct.size,ye.output=(xt=Ce.data)===null||xt===void 0||((Yt=xt.data)===null||Yt===void 0)?void 0:Yt.file_name,ye.out_file=Ge}return ye}return He});if(q.current=Object(x.a)(Ve),ve(Object(x.a)(Ve)),ne.current>0&&ne.current===Z.length){be(!1);var tt=I(Ve);tt=tt.filter(function(He){var Je,_e;return!!((Je=He[0])!==null&&Je!==void 0&&Je.name&&(_e=He[1])!==null&&_e!==void 0&&_e.name)}),tt=tt.map(function(He){return Object(a.a)(Object(a.a)(Object(a.a)({},He[0]),He[1]),{},{is_file:!0})}),z(tt),H()}}})},pe=function(){if(Z.length===0){d.b.warn("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}be(!0);var Ge=I(Z);if(Ge.some(function(Qe){var $e,rt;return!(($e=Qe[0])!==null&&$e!==void 0&&$e.name&&(rt=Qe[1])!==null&&rt!==void 0&&rt.name)})){s.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 Qe=Object(o.a)(p.a.mark(function rt(){return p.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:Z.map(function(){var Ce=Object(o.a)(p.a.mark(function Ve(tt){return p.a.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:Q(tt);case 1:case"end":return Je.stop()}},Ve)}));return function(Ve){return Ce.apply(this,arguments)}}());case 1:case"end":return Me.stop()}},rt)}));function $e(){return Qe.apply(this,arguments)}return $e}(),onCancel:function(){be(!1)}});return}Z.map(function(){var Qe=Object(o.a)(p.a.mark(function $e(rt){return p.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:Q(rt);case 1:case"end":return Me.stop()}},$e)}));return function($e){return Qe.apply(this,arguments)}}())},ce={name:"file",fileList:Z,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:function(Ge){if(Z!=null&&Z.some(function($e){return $e.name===Ge.name}))return d.b.info("".concat(Ge.name,"\u6587\u4EF6\u5DF2\u5B58\u5728")),!1;if(Ge.size/1024/1024>100)return d.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(Ge.name))return d.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var Qe={name:Ge.name,uid:Ge.uid,file:Ge,percent:0};return Z.push(Qe),q.current=Object(x.a)(Z),ve(Object(x.a)(Z)),!1}},we=I(Z);return console.log(Z,we,"fileList"),n.a.createElement(s.a,{visible:B,wrapClassName:W,onOk:pe,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:re},onCancel:Te,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},n.a.createElement("div",{className:c.a.wrap},Z.length?n.a.createElement("div",null,n.a.createElement(m.a,ce,n.a.createElement(R.a,{className:c.a.btnS},"\u4E0A\u4F20\u6587\u4EF6")),n.a.createElement(M,{data:we,onRemove:X})):n.a.createElement("div",{className:c.a.noData},n.a.createElement("img",{src:v.a,alt:""}),n.a.createElement(m.a,ce,n.a.createElement(R.a,{className:c.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),n.a.createElement("div",{className:c.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")))},M=function(K){var H=K.data,z=H===void 0?[]:H,B=K.onRemove,W=K.width,F=W===void 0?"auto":W,$=K.showScore,ee=$===void 0?!1:$,Z=K.disabled,ve=Z===void 0?!1:Z,he=K.inputChange,le=function(se){var re=document.createElement("a");document.body.appendChild(re);var be=URL.createObjectURL(se.file);re.href=be,re.download=se.name,re.click(),URL.revokeObjectURL(be),document.body.removeChild(re)},Re=function(se,re){Object(b.w)(se,re)},xe=function(se,re){s.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(se,re)},onCancel:function(){}})};return z.length?n.a.createElement("div",{style:{width:F}},n.a.createElement("div",{className:c.a.head},n.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),n.a.createElement("div",{style:{width:ee?"25%":"35%"}},"\u8F93\u5165"),n.a.createElement("div",{style:{width:ee?"25%":"35%"}},"\u8F93\u51FA"),ee&&n.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),n.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),z.map(function(ie,se){var re,be,q,ne;return n.a.createElement("div",{key:se,className:c.a.list},n.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",se+1),n.a.createElement("div",{className:c.a.info,style:{width:ee?"25%":"35%"}},n.a.createElement("span",{title:ie.input||((re=ie[0])===null||re===void 0?void 0:re.name),onClick:function(){ie.input?ie.input_file_url?Re(ie.input_file_url,ie.input):le(ie.in_file):le(ie[0])}},ie.input||((be=ie[0])===null||be===void 0?void 0:be.name))),n.a.createElement("div",{className:c.a.info,style:{width:ee?"25%":"35%"}},n.a.createElement("span",{title:ie.output||((q=ie[1])===null||q===void 0?void 0:q.name),onClick:function(){ie.input?ie.output_file_url?Re(ie.output_file_url,ie.output):le(ie.out_file):le(ie[1])}},ie.output||((ne=ie[1])===null||ne===void 0?void 0:ne.name))),ee&&n.a.createElement("div",{style:{width:"20%"}},n.a.createElement(u.a,{disabled:ve,style:{width:"70%"},onChange:function(ae){return he(ae,se)},value:ie.score}),n.a.createElement("span",null,"\xA0%")),n.a.createElement("div",{onClick:function(){return xe(ie,se)},style:{width:"10%"}},n.a.createElement("span",{className:c.a.del},"\u5220\u9664")))})):n.a.createElement(n.a.Fragment,null)};Y.b=j},BU3w:function(N,Y,k){"use strict";k.d(Y,"a",function(){return s});var P=k("MNnm"),u="rc-util-key";function C(S){if(S.attachTo)return S.attachTo;var d=document.querySelector("head");return d||document.body}function R(S){var d,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(P.a)())return null;var o=document.createElement("style");if((d=a.csp)===null||d===void 0?void 0:d.nonce){var r;o.nonce=(r=a.csp)===null||r===void 0?void 0:r.nonce}o.innerHTML=S;var x=C(a),g=x.firstChild;return a.prepend&&x.prepend?x.prepend(o):a.prepend&&g?x.insertBefore(o,g):x.appendChild(o),o}var h=new Map;function s(S,d){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=C(a);if(!h.has(o)){var r=R("",a),x=r.parentNode;h.set(o,x),x.removeChild(r)}var g=Array.from(h.get(o).children).find(function(n){return n.tagName==="STYLE"&&n[u]===d});if(g){var m,w;if(((m=a.csp)===null||m===void 0?void 0:m.nonce)&&g.nonce!==((w=a.csp)===null||w===void 0?void 0:w.nonce)){var p;g.nonce=(p=a.csp)===null||p===void 0?void 0:p.nonce}return g.innerHTML!==S&&(g.innerHTML=S),g}var f=R(S,a);return f[u]=d,f}},Bd2K:function(N,Y,k){(function(P){P(k("VrN/"),k("osHv"))})(function(P){P.defineOption("autoCloseTags",!1,function(a,o,r){if(r!=P.Init&&r&&a.removeKeyMap("autoCloseTags"),!o)return;var x={name:"autoCloseTags"};(typeof o!="object"||o.whenClosing!==!1)&&(x["'/'"]=function(g){return s(g)}),(typeof o!="object"||o.whenOpening!==!1)&&(x["'>'"]=function(g){return R(g)}),a.addKeyMap(x)});var u=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],C=["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 P.Pass;for(var o=a.listSelections(),r=[],x=a.getOption("autoCloseTags"),g=0;gm.ch&&(l=l.slice(0,l.length-w.end+m.ch));var i=l.toLowerCase();if(!l||w.type=="string"&&(w.end!=m.ch||!/[\"\']/.test(w.string.charAt(w.string.length-1))||w.string.length==1)||w.type=="tag"&&n.close||w.string.indexOf("/")==m.ch-w.start-1||T&&S(T,i)>-1||d(a,p.mode.xmlCurrentContext&&p.mode.xmlCurrentContext(f)||[],l,m,!0))return P.Pass;var L=typeof x=="object"&&x.emptyTags;if(L&&S(L,l)>-1){r[g]={text:"/>",newPos:P.Pos(m.line,m.ch+2)};continue}var A=v&&S(v,i)>-1;r[g]={indent:A,text:">"+(A?` `:"")+"",newPos:A?P.Pos(m.line+1,0):P.Pos(m.line,m.ch+1)}}for(var y=typeof x=="object"&&x.dontIndentOnAutoClose,g=o.length-1;g>=0;g--){var E=r[g];a.replaceRange(E.text,o[g].head,o[g].anchor,"+insert");var b=a.listSelections().slice(0);b[g]={head:E.newPos,anchor:E.newPos},a.setSelections(b),!y&&E.indent&&(a.indentLine(E.newPos.line,null,!0),a.indentLine(E.newPos.line+1,null,!0))}}function h(a,o){for(var r=a.listSelections(),x=[],g=o?"/":""&&(T+=">"),x[p]=T}if(a.replaceSelections(x),r=a.listSelections(),!w)for(var p=0;p=0&&o[f]==r;f--)++p;x=w.to;for(var f=1;f0){for(var o=0;o1&&arguments[1]!==void 0?arguments[1]:"",o=[],r=0;r=0;o--){var r=C().key(o);a(R(r),r)}}function S(a){return C().removeItem(a)}function d(){return C().clear()}},DlQD:function(N,Y,k){(function(P,u){N.exports=u()})(this,function(){"use strict";function P(_e,Se){for(var Oe=0;Oe_e.length)&&(Se=_e.length);for(var Oe=0,de=new Array(Se);Oe=_e.length?{done:!0}:{done:!1,value:_e[de++]}}}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 Oe=_e[Symbol.iterator](),Oe.next.bind(Oe)}function s(_e,Se){return Se={exports:{}},_e(Se,Se.exports),Se.exports}var S=s(function(_e){function Se(){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 Oe(de){_e.exports.defaults=de}_e.exports={defaults:Se(),getDefaults:Se,changeDefaults:Oe}}),d=S.defaults,a=S.getDefaults,o=S.changeDefaults,r=/[&<>"']/,x=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,m=/[<>"']|&(?!#?\w+;)/g,w={"&":"&","<":"<",">":">",'"':""","'":"'"},p=function(Se){return w[Se]};function f(_e,Se){if(Se){if(r.test(_e))return _e.replace(x,p)}else if(g.test(_e))return _e.replace(m,p);return _e}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function l(_e){return _e.replace(n,function(Se,Oe){return Oe=Oe.toLowerCase(),Oe==="colon"?":":Oe.charAt(0)==="#"?Oe.charAt(1)==="x"?String.fromCharCode(parseInt(Oe.substring(2),16)):String.fromCharCode(+Oe.substring(1)):""})}var c=/(^|[^\[])\^/g;function T(_e,Se){_e=_e.source||_e,Se=Se||"";var Oe={replace:function(ye,Ee){return Ee=Ee.source||Ee,Ee=Ee.replace(c,"$1"),_e=_e.replace(ye,Ee),Oe},getRegex:function(){return new RegExp(_e,Se)}};return Oe}var v=/[^\w:]/g,i=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function L(_e,Se,Oe){if(_e){var de;try{de=decodeURIComponent(l(Oe)).replace(v,"").toLowerCase()}catch(ye){return null}if(de.indexOf("javascript:")===0||de.indexOf("vbscript:")===0||de.indexOf("data:")===0)return null}Se&&!i.test(Oe)&&(Oe=_(Se,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(ye){return null}return Oe}var A={},y=/^[^:]+:\/*[^/]*$/,E=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function _(_e,Se){A[" "+_e]||(y.test(_e)?A[" "+_e]=_e+"/":A[" "+_e]=G(_e,"/",!0)),_e=A[" "+_e];var Oe=_e.indexOf(":")===-1;return Se.substring(0,2)==="//"?Oe?Se:_e.replace(E,"$1")+Se:Se.charAt(0)==="/"?Oe?Se:_e.replace(b,"$1")+Se:_e+Se}var I={exec:function(){}};function j(_e){for(var Se=1,Oe,de;Se=0&&Be[nt]==="\\";)Xe=!Xe;return Xe?"|":" |"}),de=Oe.split(/ \|/),ye=0;if(de.length>Se)de.splice(Se);else for(;de.length=de.length?ye.slice(de.length):ye}).join(` `)}var he=function(){function _e(Oe){this.options=Oe||B}var Se=_e.prototype;return Se.space=function(de){var ye=this.rules.block.newline.exec(de);if(ye)return ye[0].length>1?{type:"space",raw:ye[0]}:{raw:` `}},Se.code=function(de,ye){var Ee=this.rules.block.code.exec(de);if(Ee){var De=ye[ye.length-1];if(De&&De.type==="paragraph")return{raw:Ee[0],text:Ee[0].trimRight()};var Be=Ee[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ee[0],codeBlockStyle:"indented",text:this.options.pedantic?Be:W(Be,` `)}}},Se.fences=function(de){var ye=this.rules.block.fences.exec(de);if(ye){var Ee=ye[0],De=ve(Ee,ye[3]||"");return{type:"code",raw:Ee,lang:ye[2]?ye[2].trim():ye[2],text:De}}},Se.heading=function(de){var ye=this.rules.block.heading.exec(de);if(ye)return{type:"heading",raw:ye[0],depth:ye[1].length,text:ye[2]}},Se.nptable=function(de){var ye=this.rules.block.nptable.exec(de);if(ye){var Ee={type:"table",header:F(ye[1].replace(/^ *| *\| *$/g,"")),align:ye[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ye[3]?ye[3].replace(/\n$/,"").split(` `):[],raw:ye[0]};if(Ee.header.length===Ee.align.length){var De=Ee.align.length,Be;for(Be=0;Be ?/gm,"");return{type:"blockquote",raw:ye[0],text:Ee}}},Se.list=function(de){var ye=this.rules.block.list.exec(de);if(ye){for(var Ee=ye[0],De=ye[2],Be=De.length>1,Xe=De[De.length-1]===")",nt={type:"list",raw:Ee,ordered:Be,start:Be?+De.slice(0,-1):"",loose:!1,items:[]},dt=ye[0].match(this.rules.block.item),Et=!1,ft,jt,Ct,xt,Yt,$t,Vt,xr=dt.length,Lt=0;Lt1||this.options.smartLists&&Ct!==De)&&(xt=dt.slice(Lt+1).join(` `),nt.raw=nt.raw.substring(0,nt.raw.length-xt.length),Lt=xr-1)),Yt=Et||/\n\n(?!\s*$)/.test(ft),Lt!==xr-1&&(Et=ft.charAt(ft.length-1)===` `,Yt||(Yt=Et)),Yt&&(nt.loose=!0),$t=/^\[[ xX]\] /.test(ft),Vt=void 0,$t&&(Vt=ft[1]!==" ",ft=ft.replace(/^\[[ xX]\] +/,"")),nt.items.push({type:"list_item",raw:Ee,task:$t,checked:Vt,loose:Yt,text:ft});return nt}},Se.html=function(de){var ye=this.rules.block.html.exec(de);if(ye)return{type:this.options.sanitize?"paragraph":"html",raw:ye[0],pre:!this.options.sanitizer&&(ye[1]==="pre"||ye[1]==="script"||ye[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ye[0]):$(ye[0]):ye[0]}},Se.def=function(de){var ye=this.rules.block.def.exec(de);if(ye){ye[3]&&(ye[3]=ye[3].substring(1,ye[3].length-1));var Ee=ye[1].toLowerCase().replace(/\s+/g," ");return{tag:Ee,raw:ye[0],href:ye[2],title:ye[3]}}},Se.table=function(de){var ye=this.rules.block.table.exec(de);if(ye){var Ee={type:"table",header:F(ye[1].replace(/^ *| *\| *$/g,"")),align:ye[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ye[3]?ye[3].replace(/\n$/,"").split(` `):[]};if(Ee.header.length===Ee.align.length){Ee.raw=ye[0];var De=Ee.align.length,Be;for(Be=0;Be/i.test(De[0])&&(ye=!1),!Ee&&/^<(pre|code|kbd|script)(\s|>)/i.test(De[0])?Ee=!0:Ee&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(De[0])&&(Ee=!1),{type:this.options.sanitize?"text":"html",raw:De[0],inLink:ye,inRawBlock:Ee,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(De[0]):$(De[0]):De[0]}},Se.link=function(de){var ye=this.rules.inline.link.exec(de);if(ye){var Ee=ee(ye[2],"()");if(Ee>-1){var De=ye[0].indexOf("!")===0?5:4,Be=De+ye[1].length+Ee;ye[2]=ye[2].substring(0,Ee),ye[0]=ye[0].substring(0,Be).trim(),ye[3]=""}var Xe=ye[2],nt="";if(this.options.pedantic){var dt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Xe);dt?(Xe=dt[1],nt=dt[3]):nt=""}else nt=ye[3]?ye[3].slice(1,-1):"";Xe=Xe.trim().replace(/^<([\s\S]*)>$/,"$1");var Et=Z(ye,{href:Xe&&Xe.replace(this.rules.inline._escapes,"$1"),title:nt&&nt.replace(this.rules.inline._escapes,"$1")},ye[0]);return Et}},Se.reflink=function(de,ye){var Ee;if((Ee=this.rules.inline.reflink.exec(de))||(Ee=this.rules.inline.nolink.exec(de))){var De=(Ee[2]||Ee[1]).replace(/\s+/g," ");if(De=ye[De.toLowerCase()],!De||!De.href){var Be=Ee[0].charAt(0);return{type:"text",raw:Be,text:Be}}var Xe=Z(Ee,De,Ee[0]);return Xe}},Se.strong=function(de,ye,Ee){Ee===void 0&&(Ee="");var De=this.rules.inline.strong.start.exec(de);if(De&&(!De[1]||De[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ye=ye.slice(-1*de.length);var Be=De[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Be.lastIndex=0;for(var Xe;(De=Be.exec(ye))!=null;)if(Xe=this.rules.inline.strong.middle.exec(ye.slice(0,De.index+3)),Xe)return{type:"strong",raw:de.slice(0,Xe[0].length),text:de.slice(2,Xe[0].length-2)}}},Se.em=function(de,ye,Ee){Ee===void 0&&(Ee="");var De=this.rules.inline.em.start.exec(de);if(De&&(!De[1]||De[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ye=ye.slice(-1*de.length);var Be=De[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Be.lastIndex=0;for(var Xe;(De=Be.exec(ye))!=null;)if(Xe=this.rules.inline.em.middle.exec(ye.slice(0,De.index+2)),Xe)return{type:"em",raw:de.slice(0,Xe[0].length),text:de.slice(1,Xe[0].length-1)}}},Se.codespan=function(de){var ye=this.rules.inline.code.exec(de);if(ye){var Ee=ye[2].replace(/\n/g," "),De=/[^ ]/.test(Ee),Be=Ee.startsWith(" ")&&Ee.endsWith(" ");return De&&Be&&(Ee=Ee.substring(1,Ee.length-1)),Ee=$(Ee,!0),{type:"codespan",raw:ye[0],text:Ee}}},Se.br=function(de){var ye=this.rules.inline.br.exec(de);if(ye)return{type:"br",raw:ye[0]}},Se.del=function(de){var ye=this.rules.inline.del.exec(de);if(ye)return{type:"del",raw:ye[0],text:ye[1]}},Se.autolink=function(de,ye){var Ee=this.rules.inline.autolink.exec(de);if(Ee){var De,Be;return Ee[2]==="@"?(De=$(this.options.mangle?ye(Ee[1]):Ee[1]),Be="mailto:"+De):(De=$(Ee[1]),Be=De),{type:"link",raw:Ee[0],text:De,href:Be,tokens:[{type:"text",raw:De,text:De}]}}},Se.url=function(de,ye){var Ee;if(Ee=this.rules.inline.url.exec(de)){var De,Be;if(Ee[2]==="@")De=$(this.options.mangle?ye(Ee[0]):Ee[0]),Be="mailto:"+De;else{var Xe;do Xe=Ee[0],Ee[0]=this.rules.inline._backpedal.exec(Ee[0])[0];while(Xe!==Ee[0]);De=$(Ee[0]),Ee[1]==="www."?Be="http://"+De:Be=De}return{type:"link",raw:Ee[0],text:De,href:Be,tokens:[{type:"text",raw:De,text:De}]}}},Se.inlineText=function(de,ye,Ee){var De=this.rules.inline.text.exec(de);if(De){var Be;return ye?Be=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(De[0]):$(De[0]):De[0]:Be=$(this.options.smartypants?Ee(De[0]):De[0]),{type:"text",raw:De[0],text:Be}}},_e}(),le=z.noopTest,Re=z.edit,xe=z.merge,ie={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:le,table:le,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ie._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ie._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ie.def=Re(ie.def).replace("label",ie._label).replace("title",ie._title).getRegex(),ie.bullet=/(?:[*+-]|\d{1,9}[.)])/,ie.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ie.item=Re(ie.item,"gm").replace(/bull/g,ie.bullet).getRegex(),ie.list=Re(ie.list).replace(/bull/g,ie.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ie.def.source+")").getRegex(),ie._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",ie._comment=//,ie.html=Re(ie.html,"i").replace("comment",ie._comment).replace("tag",ie._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ie.paragraph=Re(ie._paragraph).replace("hr",ie.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",ie._tag).getRegex(),ie.blockquote=Re(ie.blockquote).replace("paragraph",ie.paragraph).getRegex(),ie.normal=xe({},ie),ie.gfm=xe({},ie.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*|$)"}),ie.gfm.nptable=Re(ie.gfm.nptable).replace("hr",ie.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",ie._tag).getRegex(),ie.gfm.table=Re(ie.gfm.table).replace("hr",ie.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",ie._tag).getRegex(),ie.pedantic=xe({},ie.normal,{html:Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ie._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:le,paragraph:Re(ie.normal._paragraph).replace("hr",ie.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",ie.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var se={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:le,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:le,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",se.punctuation=Re(se.punctuation).replace(/punctuation/g,se._punctuation).getRegex(),se._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",se._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",se.em.start=Re(se.em.start).replace(/punctuation/g,se._punctuation).getRegex(),se.em.middle=Re(se.em.middle).replace(/punctuation/g,se._punctuation).replace(/overlapSkip/g,se._overlapSkip).getRegex(),se.em.endAst=Re(se.em.endAst,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.em.endUnd=Re(se.em.endUnd,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.strong.start=Re(se.strong.start).replace(/punctuation/g,se._punctuation).getRegex(),se.strong.middle=Re(se.strong.middle).replace(/punctuation/g,se._punctuation).replace(/blockSkip/g,se._blockSkip).getRegex(),se.strong.endAst=Re(se.strong.endAst,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.strong.endUnd=Re(se.strong.endUnd,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.blockSkip=Re(se._blockSkip,"g").getRegex(),se.overlapSkip=Re(se._overlapSkip,"g").getRegex(),se._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,se._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,se._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])?)+(?![-_])/,se.autolink=Re(se.autolink).replace("scheme",se._scheme).replace("email",se._email).getRegex(),se._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,se.tag=Re(se.tag).replace("comment",ie._comment).replace("attribute",se._attribute).getRegex(),se._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,se._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,se._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,se.link=Re(se.link).replace("label",se._label).replace("href",se._href).replace("title",se._title).getRegex(),se.reflink=Re(se.reflink).replace("label",se._label).getRegex(),se.reflinkSearch=Re(se.reflinkSearch,"g").replace("reflink",se.reflink).replace("nolink",se.nolink).getRegex(),se.normal=xe({},se),se.pedantic=xe({},se.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:Re(/^!?\[(label)\]\((.*?)\)/).replace("label",se._label).getRegex(),reflink:Re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",se._label).getRegex()}),se.gfm=xe({},se.normal,{escape:Re(se.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&&(de="x"+de.toString(16)),Se+="&#"+de+";";return Se}var J=function(){function _e(Oe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Oe||be,this.options.tokenizer=this.options.tokenizer||new he,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var de={block:q.normal,inline:ne.normal};this.options.pedantic?(de.block=q.pedantic,de.inline=ne.pedantic):this.options.gfm&&(de.block=q.gfm,this.options.breaks?de.inline=ne.breaks:de.inline=ne.gfm),this.tokenizer.rules=de}_e.lex=function(de,ye){var Ee=new _e(ye);return Ee.lex(de)};var Se=_e.prototype;return Se.lex=function(de){return de=de.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(de,this.tokens,!0),this.inline(this.tokens),this.tokens},Se.blockTokens=function(de,ye,Ee){ye===void 0&&(ye=[]),Ee===void 0&&(Ee=!0),de=de.replace(/^ +$/gm,"");for(var De,Be,Xe,nt;de;){if(De=this.tokenizer.space(de)){de=de.substring(De.raw.length),De.type&&ye.push(De);continue}if(De=this.tokenizer.code(de,ye)){de=de.substring(De.raw.length),De.type?ye.push(De):(nt=ye[ye.length-1],nt.raw+=` `+De.raw,nt.text+=` `+De.text);continue}if(De=this.tokenizer.fences(de)){de=de.substring(De.raw.length),ye.push(De);continue}if(De=this.tokenizer.heading(de)){de=de.substring(De.raw.length),ye.push(De);continue}if(De=this.tokenizer.nptable(de)){de=de.substring(De.raw.length),ye.push(De);continue}if(De=this.tokenizer.hr(de)){de=de.substring(De.raw.length),ye.push(De);continue}if(De=this.tokenizer.blockquote(de)){de=de.substring(De.raw.length),De.tokens=this.blockTokens(De.text,[],Ee),ye.push(De);continue}if(De=this.tokenizer.list(de)){for(de=de.substring(De.raw.length),Xe=De.items.length,Be=0;Be0)for(;(dt=this.tokenizer.rules.inline.reflinkSearch.exec(nt))!=null;)Et.includes(dt[0].slice(dt[0].lastIndexOf("[")+1,-1))&&(nt=nt.slice(0,dt.index)+"["+"a".repeat(dt[0].length-2)+"]"+nt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(dt=this.tokenizer.rules.inline.blockSkip.exec(nt))!=null;)nt=nt.slice(0,dt.index)+"["+"a".repeat(dt[0].length-2)+"]"+nt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;de;){if(Xe=this.tokenizer.escape(de)){de=de.substring(Xe.raw.length),ye.push(Xe);continue}if(Xe=this.tokenizer.tag(de,Ee,De)){de=de.substring(Xe.raw.length),Ee=Xe.inLink,De=Xe.inRawBlock,ye.push(Xe);continue}if(Xe=this.tokenizer.link(de)){de=de.substring(Xe.raw.length),Xe.type==="link"&&(Xe.tokens=this.inlineTokens(Xe.text,[],!0,De)),ye.push(Xe);continue}if(Xe=this.tokenizer.reflink(de,this.tokens.links)){de=de.substring(Xe.raw.length),Xe.type==="link"&&(Xe.tokens=this.inlineTokens(Xe.text,[],!0,De)),ye.push(Xe);continue}if(Xe=this.tokenizer.strong(de,nt,Be)){de=de.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],Ee,De),ye.push(Xe);continue}if(Xe=this.tokenizer.em(de,nt,Be)){de=de.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],Ee,De),ye.push(Xe);continue}if(Xe=this.tokenizer.codespan(de)){de=de.substring(Xe.raw.length),ye.push(Xe);continue}if(Xe=this.tokenizer.br(de)){de=de.substring(Xe.raw.length),ye.push(Xe);continue}if(Xe=this.tokenizer.del(de)){de=de.substring(Xe.raw.length),Xe.tokens=this.inlineTokens(Xe.text,[],Ee,De),ye.push(Xe);continue}if(Xe=this.tokenizer.autolink(de,ae)){de=de.substring(Xe.raw.length),ye.push(Xe);continue}if(!Ee&&(Xe=this.tokenizer.url(de,ae))){de=de.substring(Xe.raw.length),ye.push(Xe);continue}if(Xe=this.tokenizer.inlineText(de,De,Te)){de=de.substring(Xe.raw.length),Be=Xe.raw.slice(-1),ye.push(Xe);continue}if(de){var ft="Infinite loop on byte: "+de.charCodeAt(0);if(this.options.silent){console.error(ft);break}else throw new Error(ft)}}return ye},u(_e,null,[{key:"rules",get:function(){return{block:q,inline:ne}}}]),_e}(),X=S.defaults,Q=z.cleanUrl,pe=z.escape,ce=function(){function _e(Oe){this.options=Oe||X}var Se=_e.prototype;return Se.code=function(de,ye,Ee){var De=(ye||"").match(/\S*/)[0];if(this.options.highlight){var Be=this.options.highlight(de,De);Be!=null&&Be!==de&&(Ee=!0,de=Be)}return De?'
    '+(Ee?de:pe(de,!0))+`
    `:"
    "+(Ee?de:pe(de,!0))+`
    `},Se.blockquote=function(de){return`
    `+de+`
    `},Se.html=function(de){return de},Se.heading=function(de,ye,Ee,De){return this.options.headerIds?"'+de+" `:""+de+" `},Se.hr=function(){return this.options.xhtml?`
    `:`
    `},Se.list=function(de,ye,Ee){var De=ye?"ol":"ul",Be=ye&&Ee!==1?' start="'+Ee+'"':"";return"<"+De+Be+`> `+de+" `},Se.listitem=function(de){return"
  • "+de+`
  • `},Se.checkbox=function(de){return" "},Se.paragraph=function(de){return"

    "+de+`

    `},Se.table=function(de,ye){return ye&&(ye=""+ye+""),` `+de+` `+ye+`
    `},Se.tablerow=function(de){return` `+de+` `},Se.tablecell=function(de,ye){var Ee=ye.header?"th":"td",De=ye.align?"<"+Ee+' align="'+ye.align+'">':"<"+Ee+">";return De+de+" `},Se.strong=function(de){return""+de+""},Se.em=function(de){return""+de+""},Se.codespan=function(de){return""+de+""},Se.br=function(){return this.options.xhtml?"
    ":"
    "},Se.del=function(de){return""+de+""},Se.link=function(de,ye,Ee){if(de=Q(this.options.sanitize,this.options.baseUrl,de),de===null)return Ee;var De='",De},Se.image=function(de,ye,Ee){if(de=Q(this.options.sanitize,this.options.baseUrl,de),de===null)return Ee;var De=''+Ee+'":">",De},Se.text=function(de){return de},_e}(),we=function(){function _e(){}var Se=_e.prototype;return Se.strong=function(de){return de},Se.em=function(de){return de},Se.codespan=function(de){return de},Se.del=function(de){return de},Se.html=function(de){return de},Se.text=function(de){return de},Se.link=function(de,ye,Ee){return""+Ee},Se.image=function(de,ye,Ee){return""+Ee},Se.br=function(){return""},_e}(),ze=function(){function _e(){this.seen={}}var Se=_e.prototype;return Se.slug=function(de){var ye=de.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ye)){var Ee=ye;do this.seen[Ee]++,ye=Ee+"-"+this.seen[Ee];while(this.seen.hasOwnProperty(ye))}return this.seen[ye]=0,ye},_e}(),Ge=S.defaults,Qe=z.unescape,$e=function(){function _e(Oe){this.options=Oe||Ge,this.options.renderer=this.options.renderer||new ce,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new we,this.slugger=new ze}_e.parse=function(de,ye){var Ee=new _e(ye);return Ee.parse(de)};var Se=_e.prototype;return Se.parse=function(de,ye){ye===void 0&&(ye=!0);var Ee="",De,Be,Xe,nt,dt,Et,ft,jt,Ct,xt,Yt,$t,Vt,xr,Lt,Er,fr,Wt,Xt=de.length;for(De=0;De0&&Lt.tokens[0].type==="text"?(Lt.tokens[0].text=Wt+" "+Lt.tokens[0].text,Lt.tokens[0].tokens&&Lt.tokens[0].tokens.length>0&&Lt.tokens[0].tokens[0].type==="text"&&(Lt.tokens[0].tokens[0].text=Wt+" "+Lt.tokens[0].tokens[0].text)):Lt.tokens.unshift({type:"text",text:Wt}):xr+=Wt),xr+=this.parse(Lt.tokens,Vt),Ct+=this.renderer.listitem(xr,fr,Er);Ee+=this.renderer.list(Ct,Yt,$t);continue}case"html":{Ee+=this.renderer.html(xt.text);continue}case"paragraph":{Ee+=this.renderer.paragraph(this.parseInline(xt.tokens));continue}case"text":{for(Ct=xt.tokens?this.parseInline(xt.tokens):xt.text;De+1An error occurred:

    "+Me(Xe.message+"",!0)+"
    ";throw Xe}}He.options=He.setOptions=function(_e){return rt(He.defaults,_e),Ve(He.defaults),He},He.getDefaults=Ce,He.defaults=tt,He.use=function(_e){var Se=rt({},_e);if(_e.renderer&&function(){var de=He.defaults.renderer||new ce,ye=function(Be){var Xe=de[Be];de[Be]=function(){for(var nt=arguments.length,dt=new Array(nt),Et=0;Et=0;g--){if(!C(x[g]))continue;var m=x[g].split("="),w=unescape(m[0]),p=unescape(m[1]);r(p,w)}}function S(r,x){if(!r)return;R.cookie=escape(r)+"="+escape(x)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function d(r){if(!r||!o(r))return;R.cookie=escape(r)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function a(){s(function(r,x){d(x)})}function o(r){return new RegExp("(?:^|;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(R.cookie)}},E4JC:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.StreamCipher,h=u.algo,s=[],S=[],d=[],a=h.Rabbit=R.extend({_doReset:function(){for(var r=this._key.words,x=this.cfg.iv,g=0;g<4;g++)r[g]=(r[g]<<8|r[g]>>>24)&16711935|(r[g]<<24|r[g]>>>8)&4278255360;var m=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],w=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 g=0;g<4;g++)o.call(this);for(var g=0;g<8;g++)w[g]^=m[g+4&7];if(x){var p=x.words,f=p[0],n=p[1],l=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,c=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,T=l>>>16|c&4294901760,v=c<<16|l&65535;w[0]^=l,w[1]^=T,w[2]^=c,w[3]^=v,w[4]^=l,w[5]^=T,w[6]^=c,w[7]^=v;for(var g=0;g<4;g++)o.call(this)}},_doProcessBlock:function(r,x){var g=this._X;o.call(this),s[0]=g[0]^g[5]>>>16^g[3]<<16,s[1]=g[2]^g[7]>>>16^g[5]<<16,s[2]=g[4]^g[1]>>>16^g[7]<<16,s[3]=g[6]^g[3]>>>16^g[1]<<16;for(var m=0;m<4;m++)s[m]=(s[m]<<8|s[m]>>>24)&16711935|(s[m]<<24|s[m]>>>8)&4278255360,r[x+m]^=s[m]},blockSize:128/32,ivSize:64/32});function o(){for(var r=this._X,x=this._C,g=0;g<8;g++)S[g]=x[g];x[0]=x[0]+1295307597+this._b|0,x[1]=x[1]+3545052371+(x[0]>>>0>>0?1:0)|0,x[2]=x[2]+886263092+(x[1]>>>0>>0?1:0)|0,x[3]=x[3]+1295307597+(x[2]>>>0>>0?1:0)|0,x[4]=x[4]+3545052371+(x[3]>>>0>>0?1:0)|0,x[5]=x[5]+886263092+(x[4]>>>0>>0?1:0)|0,x[6]=x[6]+1295307597+(x[5]>>>0>>0?1:0)|0,x[7]=x[7]+3545052371+(x[6]>>>0>>0?1:0)|0,this._b=x[7]>>>0>>0?1:0;for(var g=0;g<8;g++){var m=r[g]+x[g],w=m&65535,p=m>>>16,f=((w*w>>>17)+w*p>>>15)+p*p,n=((m&4294901760)*m|0)+((m&65535)*m|0);d[g]=f^n}r[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,r[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,r[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,r[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,r[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,r[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,r[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,r[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}u.Rabbit=R._createHelper(a)}(),P.Rabbit})},ELLl:function(N,Y,k){(function(P){P(k("VrN/"))})(function(P){var u={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},C=P.Pos;P.defineOption("autoCloseBrackets",!1,function(w,p,f){f&&f!=P.Init&&(w.removeKeyMap(h),w.state.closeBrackets=null),p&&(s(R(p,"pairs")),w.state.closeBrackets=p,w.addKeyMap(h))});function R(w,p){return p=="pairs"&&typeof w=="string"?w:typeof w=="object"&&w[p]!=null?w[p]:u[p]}var h={Backspace:a,Enter:o};function s(w){for(var p=0;p=0;l--){var T=n[l].head;w.replaceRange("",C(T.line,T.ch-1),C(T.line,T.ch+1),"+delete")}}function o(w){var p=d(w),f=p&&R(p,"explode");if(!f||w.getOption("disableInput"))return P.Pass;for(var n=w.listSelections(),l=0;l0;return{anchor:new C(w.anchor.line,w.anchor.ch+(p?-1:1)),head:new C(w.head.line,w.head.ch+(p?1:-1))}}function x(w,p){var f=d(w);if(!f||w.getOption("disableInput"))return P.Pass;var n=R(f,"pairs"),l=n.indexOf(p);if(l==-1)return P.Pass;for(var c=R(f,"closeBefore"),T=R(f,"triples"),v=n.charAt(l+1)==p,i=w.listSelections(),L=l%2==0,A,y=0;y=0&&w.getRange(b,C(b.line,b.ch+3))==p+p+p?_="skipThree":_="skip";else if(v&&b.ch>1&&T.indexOf(p)>=0&&w.getRange(C(b.line,b.ch-2),b)==p+p){if(b.ch>2&&/\bstring/.test(w.getTokenTypeAt(C(b.line,b.ch-2))))return P.Pass;_="addFour"}else if(v){var j=b.ch==0?" ":w.getRange(C(b.line,b.ch-1),b);if(!P.isWordChar(I)&&j!=p&&!P.isWordChar(j))_="both";else return P.Pass}else if(L&&(I.length===0||/\s/.test(I)||c.indexOf(I)>-1))_="both";else return P.Pass;if(!A)A=_;else if(A!=_)return P.Pass}var M=l%2?n.charAt(l-1):p,G=l%2?p:n.charAt(l+1);w.operation(function(){if(A=="skip")w.execCommand("goCharRight");else if(A=="skipThree")for(var K=0;K<3;K++)w.execCommand("goCharRight");else if(A=="surround"){for(var H=w.getSelections(),K=0;K>>24)&16711935|(A<<24|A>>>8)&4278255360}var y=this._hash.words,E=x.words,b=g.words,_=d.words,I=a.words,j=o.words,M=r.words,G,K,H,z,B,W,F,$,ee,Z;W=G=y[0],F=K=y[1],$=H=y[2],ee=z=y[3],Z=B=y[4];for(var ve,i=0;i<80;i+=1)ve=G+T[v+_[i]]|0,i<16?ve+=w(K,H,z)+E[0]:i<32?ve+=p(K,H,z)+E[1]:i<48?ve+=f(K,H,z)+E[2]:i<64?ve+=n(K,H,z)+E[3]:ve+=l(K,H,z)+E[4],ve=ve|0,ve=c(ve,j[i]),ve=ve+B|0,G=B,B=z,z=c(H,10),H=K,K=ve,ve=W+T[v+I[i]]|0,i<16?ve+=l(F,$,ee)+b[0]:i<32?ve+=n(F,$,ee)+b[1]:i<48?ve+=f(F,$,ee)+b[2]:i<64?ve+=p(F,$,ee)+b[3]:ve+=w(F,$,ee)+b[4],ve=ve|0,ve=c(ve,M[i]),ve=ve+Z|0,W=Z,Z=ee,ee=c($,10),$=F,F=ve;ve=y[1]+H+ee|0,y[1]=y[2]+z+Z|0,y[2]=y[3]+B+W|0,y[3]=y[4]+G+F|0,y[4]=y[0]+K+$|0,y[0]=ve},_doFinalize:function(){var T=this._data,v=T.words,i=this._nDataBytes*8,L=T.sigBytes*8;v[L>>>5]|=128<<24-L%32,v[(L+64>>>9<<4)+14]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360,T.sigBytes=(v.length+1)*4,this._process();for(var A=this._hash,y=A.words,E=0;E<5;E++){var b=y[E];y[E]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360}return A},clone:function(){var T=s.clone.call(this);return T._hash=this._hash.clone(),T}});function w(T,v,i){return T^v^i}function p(T,v,i){return T&v|~T&i}function f(T,v,i){return(T|~v)^i}function n(T,v,i){return T&i|v&~i}function l(T,v,i){return T^(v|~i)}function c(T,v){return T<>>32-v}C.RIPEMD160=s._createHelper(m),C.HmacRIPEMD160=s._createHmacHelper(m)}(Math),P.RIPEMD160})},ETIr:function(N,Y,k){(function(P,u){N.exports=Y=u(k("Ib8C"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.WordArray,h=u.enc,s=h.Base64={stringify:function(d){var a=d.words,o=d.sigBytes,r=this._map;d.clamp();for(var x=[],g=0;g>>2]>>>24-g%4*8&255,w=a[g+1>>>2]>>>24-(g+1)%4*8&255,p=a[g+2>>>2]>>>24-(g+2)%4*8&255,f=m<<16|w<<8|p,n=0;n<4&&g+n*.75>>6*(3-n)&63));var l=r.charAt(64);if(l)for(;x.length%4;)x.push(l);return x.join("")},parse:function(d){var a=d.length,o=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var x=0;x>>6-g%4*2,p=m|w;r[x>>>2]|=p<<24-x%4*8,x++}return R.create(r,x)}}(),P.enc.Base64})},"F+F2":function(N,Y,k){(function(P,u){N.exports=Y=u(k("Ib8C"))})(this,function(P){return function(){if(typeof ArrayBuffer!="function")return;var u=P,C=u.lib,R=C.WordArray,h=R.init,s=R.init=function(S){if(S instanceof ArrayBuffer&&(S=new Uint8Array(S)),(S instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&S instanceof Uint8ClampedArray||S instanceof Int16Array||S instanceof Uint16Array||S instanceof Int32Array||S instanceof Uint32Array||S instanceof Float32Array||S instanceof Float64Array)&&(S=new Uint8Array(S.buffer,S.byteOffset,S.byteLength)),S instanceof Uint8Array){for(var d=S.byteLength,a=[],o=0;o>>2]|=S[o]<<24-o%4*8;h.call(this,a,d)}else h.apply(this,arguments)};s.prototype=R}(),P.lib.WordArray})},GRuw:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("lPiR"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.WordArray,h=u.algo,s=h.SHA256,S=h.SHA224=s.extend({_doReset:function(){this._hash=new R.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var d=s._doFinalize.call(this);return d.sigBytes-=4,d}});u.SHA224=s._createHelper(S),u.HmacSHA224=s._createHmacHelper(S)}(),P.SHA224})},GfqC:function(N,Y,k){"use strict";var P=k("q1tI"),u=k.n(P),C=k("TSYQ"),R=k.n(C);function h(z,B){var W="cannot "+z.method+" "+z.action+" "+B.status+"'",F=new Error(W);return F.status=B.status,F.method=z.method,F.url=z.action,F}function s(z){var B=z.responseText||z.response;if(!B)return B;try{return JSON.parse(B)}catch(W){return B}}function S(z){var B=new XMLHttpRequest;z.onProgress&&B.upload&&(B.upload.onprogress=function(ee){ee.total>0&&(ee.percent=ee.loaded/ee.total*100),z.onProgress(ee)});var W=new FormData;z.data&&Object.keys(z.data).forEach(function($){var ee=z.data[$];if(Array.isArray(ee)){ee.forEach(function(Z){W.append($+"[]",Z)});return}W.append($,z.data[$])}),z.file instanceof Blob?W.append(z.filename,z.file,z.file.name):W.append(z.filename,z.file),B.onerror=function(ee){z.onError(ee)},B.onload=function(){return B.status<200||B.status>=300?z.onError(h(z,B),s(B)):z.onSuccess(s(B),B)},B.open(z.method,z.action,!0),z.withCredentials&&"withCredentials"in B&&(B.withCredentials=!0);var F=z.headers||{};return F["X-Requested-With"]!==null&&B.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(F).forEach(function($){F[$]!==null&&B.setRequestHeader($,F[$])}),B.send(W),{abort:function(){B.abort()}}}var d=+new Date,a=0;function o(){return"rc-upload-"+d+"-"+ ++a}function r(z,B){return z.indexOf(B,z.length-B.length)!==-1}var x=function(z,B){if(z&&B){var W=Array.isArray(B)?B:B.split(","),F=z.name||"",$=z.type||"",ee=$.replace(/\/.*$/,"");return W.some(function(Z){var ve=Z.trim();return ve.charAt(0)==="."?r(F.toLowerCase(),ve.toLowerCase()):/\/\*$/.test(ve)?ee===ve.replace(/\/.*$/,""):$===ve})}return!0};function g(z,B){var W=z.createReader(),F=[];function $(){W.readEntries(function(ee){var Z=Array.prototype.slice.apply(ee);F=F.concat(Z);var ve=!Z.length;ve?B(F):$()})}$()}var m=function(B,W,F){var $=function ee(Z,ve){ve=ve||"",Z.isFile?Z.file(function(he){F(he)&&(Z.fullPath&&!he.webkitRelativePath&&(Object.defineProperties(he,{webkitRelativePath:{writable:!0}}),he.webkitRelativePath=Z.fullPath.replace(/^\//,""),Object.defineProperties(he,{webkitRelativePath:{writable:!1}})),W([he]))}):Z.isDirectory&&g(Z,function(he){he.forEach(function(le){ee(le,""+ve+Z.name+"/")})})};B.forEach(function(ee){$(ee.webkitGetAsEntry())})},w=m,p=Object.assign||function(z){for(var B=1;B=0)continue;if(!Object.prototype.hasOwnProperty.call(z,F))continue;W[F]=z[F]}return W}function T(z,B){if(!(z instanceof B))throw new TypeError("Cannot call a class as a function")}function v(z,B){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:z}function i(z,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);z.prototype=Object.create(B&&B.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(z,B):z.__proto__=B)}var L=function(B){return Object.keys(B).reduce(function(W,F){return(F.substr(0,5)==="data-"||F.substr(0,5)==="aria-"||F==="role")&&(W[F]=B[F]),W},{})},A=function(z){i(B,z);function B(){var W,F,$,ee;T(this,B);for(var Z=arguments.length,ve=Array(Z),he=0;he>>2]>>>24-L%4*8&255;c[v+L>>>2]|=A<<24-(v+L)%4*8}else for(var y=0;y>>2]=T[y>>>2];return this.sigBytes+=i,this},clamp:function(){var l=this.words,c=this.sigBytes;l[c>>>2]&=4294967295<<32-c%4*8,l.length=C.ceil(c/4)},clone:function(){var l=o.clone.call(this);return l.words=this.words.slice(0),l},random:function(l){for(var c=[],T=0;T>>2]>>>24-i%4*8&255;v.push((L>>>4).toString(16)),v.push((L&15).toString(16))}return v.join("")},parse:function(l){for(var c=l.length,T=[],v=0;v>>3]|=parseInt(l.substr(v,2),16)<<24-v%8*4;return new r.init(T,c/2)}},m=x.Latin1={stringify:function(l){for(var c=l.words,T=l.sigBytes,v=[],i=0;i>>2]>>>24-i%4*8&255;v.push(String.fromCharCode(L))}return v.join("")},parse:function(l){for(var c=l.length,T=[],v=0;v>>2]|=(l.charCodeAt(v)&255)<<24-v%4*8;return new r.init(T,c)}},w=x.Utf8={stringify:function(l){try{return decodeURIComponent(escape(m.stringify(l)))}catch(c){throw new Error("Malformed UTF-8 data")}},parse:function(l){return m.parse(unescape(encodeURIComponent(l)))}},p=a.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(l){typeof l=="string"&&(l=w.parse(l)),this._data.concat(l),this._nDataBytes+=l.sigBytes},_process:function(l){var c,T=this._data,v=T.words,i=T.sigBytes,L=this.blockSize,A=L*4,y=i/A;l?y=C.ceil(y):y=C.max((y|0)-this._minBufferSize,0);var E=y*L,b=C.min(E*4,i);if(E){for(var _=0;_>>6)+a(128|G&63):a(224|G>>>12&15)+a(128|G>>>6&63)+a(128|G&63)}else{var G=65536+(M.charCodeAt(0)-55296)*1024+(M.charCodeAt(1)-56320);return a(240|G>>>18&7)+a(128|G>>>12&63)+a(128|G>>>6&63)+a(128|G&63)}},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,x=function(M){return M.replace(r,o)},g=function(M){var G=[0,2,1][M.length%3],K=M.charCodeAt(0)<<16|(M.length>1?M.charCodeAt(1):0)<<8|(M.length>2?M.charCodeAt(2):0),H=[S.charAt(K>>>18),S.charAt(K>>>12&63),G>=2?"=":S.charAt(K>>>6&63),G>=1?"=":S.charAt(K&63)];return H.join("")},m=R.btoa&&typeof R.btoa=="function"?function(M){return R.btoa(M)}:function(M){if(M.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return M.replace(/[\s\S]{1,3}/g,g)},w=function(M){return m(x(String(M)))},p=function(M){return M.replace(/[+\/]/g,function(G){return G=="+"?"-":"_"}).replace(/=/g,"")},f=function(M,G){return G?p(w(M)):w(M)},n=function(M){return f(M,!0)},l;R.Uint8Array&&(l=function(M,G){for(var K="",H=0,z=M.length;H>>18)+S.charAt($>>>12&63)+(typeof W!="undefined"?S.charAt($>>>6&63):"=")+(typeof F!="undefined"?S.charAt($&63):"=")}return G?p(K):K});var c=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,T=function(M){switch(M.length){case 4:var G=(7&M.charCodeAt(0))<<18|(63&M.charCodeAt(1))<<12|(63&M.charCodeAt(2))<<6|63&M.charCodeAt(3),K=G-65536;return a((K>>>10)+55296)+a((K&1023)+56320);case 3:return a((15&M.charCodeAt(0))<<12|(63&M.charCodeAt(1))<<6|63&M.charCodeAt(2));default:return a((31&M.charCodeAt(0))<<6|63&M.charCodeAt(1))}},v=function(M){return M.replace(c,T)},i=function(M){var G=M.length,K=G%4,H=(G>0?d[M.charAt(0)]<<18:0)|(G>1?d[M.charAt(1)]<<12:0)|(G>2?d[M.charAt(2)]<<6:0)|(G>3?d[M.charAt(3)]:0),z=[a(H>>>16),a(H>>>8&255),a(H&255)];return z.length-=[0,0,2,1][K],z.join("")},L=R.atob&&typeof R.atob=="function"?function(M){return R.atob(M)}:function(M){return M.replace(/\S{1,4}/g,i)},A=function(M){return L(String(M).replace(/[^A-Za-z0-9\+\/]/g,""))},y=function(M){return v(L(M))},E=function(M){return String(M).replace(/[-_]/g,function(G){return G=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},b=function(M){return y(E(M))},_;R.Uint8Array&&(_=function(M){return Uint8Array.from(A(E(M)),function(G){return G.charCodeAt(0)})});var I=function(){var M=R.Base64;return R.Base64=h,M};if(R.Base64={VERSION:s,atob:A,btoa:m,fromBase64:b,toBase64:f,utob:x,encode:f,encodeURI:n,btou:v,decode:b,noConflict:I,fromUint8Array:l,toUint8Array:_},typeof Object.defineProperty=="function"){var j=function(M){return{value:M,enumerable:!1,writable:!0,configurable:!0}};R.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",j(function(){return b(this)})),Object.defineProperty(String.prototype,"toBase64",j(function(M){return f(this,M)})),Object.defineProperty(String.prototype,"toBase64URI",j(function(){return f(this,!0)}))}}return R.Meteor&&(Base64=R.Base64),N.exports?N.exports.Base64=R.Base64:!(u=[],C=function(){return R.Base64}.apply(Y,u),C!==void 0&&(N.exports=C)),{Base64:R.Base64}})}).call(this,k("IyRk"))},K3mO:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("3y9D"),k("WYAk"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.Base,h=C.WordArray,s=u.algo,S=s.MD5,d=s.EvpKDF=R.extend({cfg:R.extend({keySize:128/32,hasher:S,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,o){for(var r,x=this.cfg,g=x.hasher.create(),m=h.create(),w=m.words,p=x.keySize,f=x.iterations;w.lengthRe)){ie.next=7;break}return C.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(Re/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),ie.abrupt("return",!1);case 7:return K.push({name:le.name,file:le}),H(Object(R.a)(K)),j.onChange(K),ie.abrupt("return",!1);case 11:case"end":return ie.stop()}},he)}));function ve(he){return Z.apply(this,arguments)}return ve}()},ee=function(){var Z=Object(d.a)(x.a.mark(function ve(he,le){var Re,xe,ie,se,re,be,q,ne,Te;return x.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return le.file_name=he.name,q=he.name,J.next=4,Object(w.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(ne=J.sent,ne.data=JSON.parse(i(ne.data)),!((ne==null?void 0:ne.status)!==0)){J.next=12;break}return K[K.findIndex(function(X){return X.name===q})].status="error",K[K.findIndex(function(X){return X.name===q})].file.status="error",j.onChange(K),C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),J.abrupt("return");case 12:return W=new T.a({endpoint:ne==null||((Re=ne.data)===null||Re===void 0)?void 0:Re.end_point,region:ne==null||((xe=ne.data)===null||xe===void 0)?void 0:xe.region,accessKeyId:ne==null||((ie=ne.data)===null||ie===void 0)?void 0:ie.access_key_id,accessKeySecret:ne==null||((se=ne.data)===null||se===void 0)?void 0:se.access_key_secret,bucket:ne==null||((re=ne.data)===null||re===void 0)?void 0:re.bucket,stsToken:ne==null||((be=ne.data)===null||be===void 0)?void 0:be.security_token}),console.log(he,"file"),F(W),Te=Object(n.a)(),J.abrupt("return",new Promise(function(X,Q){try{var pe;W.multipartUpload("".concat(j.identifier,"/").concat(Te).concat(q.indexOf(".")>-1?"."+q.split(".").pop():""),new Blob([he.file],{type:he.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(we,ze,Ge){try{console.log("\u8FDB\u5EA6",we,ze,Ge);var Qe=K.findIndex(function($e){return $e.name===q});K[Qe].file.percent=we*100,K[Qe].tempCheckpoint=ze,H(Object(R.a)(K))}catch($e){}},checkpoint:K[K.findIndex(function(ce){return ce.name===q})].tempCheckpoint,callback:{customValue:{id:q+""},url:ne==null||((pe=ne.data)===null||pe===void 0)?void 0:pe.callback_url,host:ne==null?void 0:ne.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(w.e)(le)}}).then(function(ce){var we,ze=K.findIndex(function(et){return et.name===q}),Ge="done";if(((we=ce.data)===null||we===void 0?void 0:we.status)===0){var Qe;he.response=(Qe=ce.data)===null||Qe===void 0?void 0:Qe.data;var $e=K.findIndex(function(et){return et.name===q});K[$e].status="done",K[$e].file.status="done"}else{var rt;C.b.warn((rt=ce.data)===null||rt===void 0?void 0:rt.message),Ge="error"}K[ze].status=Ge,K[ze].file.status=Ge,j.onChange(K),X(ce==null?void 0:ce.data)}).catch(function(ce){K[K.findIndex(function(we){return we.name===q})].status="error",K[K.findIndex(function(we){return we.name===q})].file.status="error",C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),H(Object(R.a)(K)),j.onChange(K),Q(ce),console.log("err:",ce)})}catch(ce){}}));case 17:case"end":return J.stop()}},ve)}));return function(he,le){return Z.apply(this,arguments)}}();return Object(g.useEffect)(function(){K.every(function(Z){return Z==="done"||Z==="error"})&&j.onComplete(K)},[K]),Object(g.useEffect)(function(){if(I){var Z;(Z=W)===null||Z===void 0||Z.cancel()}},[I]),Object(g.useEffect)(function(){j.uploading&&K.map(function(){var Z=Object(d.a)(x.a.mark(function ve(he){var le,Re;return x.a.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:if(!((!he.status||he.status==="error")&&!I)){ie.next=6;break}return he.status="uploading",he.file.status="uploading",ie.next=5,ee(he,{login:_==null||((le=_.userInfo)===null||le===void 0)?void 0:le.login,container_type:j.container_type,container_id:j.container_id,description:j.description});case 5:Re=ie.sent;case 6:case"end":return ie.stop()}},ve)}));return function(ve){return Z.apply(this,arguments)}}())},[j.uploading]),m.a.createElement(v,Object(P.a)({},$,{height:j.height,className:j.className}),m.a.createElement("p",{className:"ant-upload-hint"},j.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};Y.b=Object(l.a)(function(E){var b=E.loading,_=E.globalSetting,I=E.user;return{globalSetting:_,loading:b.models.competitions,user:I}})(y)},KmYQ:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return P.pad.ZeroPadding={pad:function(u,C){var R=C*4;u.clamp(),u.sigBytes+=R-(u.sigBytes%R||R)},unpad:function(u){for(var C=u.words,R=u.sigBytes-1,R=u.sigBytes-1;R>=0;R--)if(C[R>>>2]>>>24-R%4*8&255){u.sigBytes=R+1;break}}},P.pad.ZeroPadding})},L9qf:function(N,Y,k){N.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(N,Y,k){"use strict";k.d(Y,"b",function(){return c}),k.d(Y,"a",function(){return v});var P=k("1OyB"),u=k("vuIU"),C=k("Ji7U"),R=k("LK+K"),h=k("q1tI"),s=k("rePB"),S=k("Ff2n"),d=k("ODXe"),a=k("4IlW"),o=k("bX4T"),r=k("YrtM"),x=k("TSYQ"),g=k.n(x),m=k("+nKL"),w=k("8OUc"),p=function(F,$){var ee=F.prefixCls,Z=F.id,ve=F.flattenOptions,he=F.childrenAsData,le=F.values,Re=F.searchValue,xe=F.multiple,ie=F.defaultActiveFirstOption,se=F.height,re=F.itemHeight,be=F.notFoundContent,q=F.open,ne=F.menuItemSelectedIcon,Te=F.virtual,ae=F.onSelect,J=F.onToggleOpen,X=F.onActiveValue,Q=F.onScroll,pe=F.onMouseEnter,ce="".concat(ee,"-item"),we=Object(r.a)(function(){return ve},[q,ve],function(Je,_e){return _e[0]&&Je[1]!==_e[1]}),ze=h.useRef(null),Ge=function(_e){_e.preventDefault()},Qe=function(_e){ze.current&&ze.current.scrollTo({index:_e})},$e=function(_e){for(var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Oe=we.length,de=0;de1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(W).map(function($,ee){if(!h.isValidElement($)||!$.type)return null;var Z=$.type.isSelectOptGroup,ve=$.key,he=$.props,le=he.children,Re=Object(S.a)(he,["children"]);return F||!Z?A($):Object(i.a)(Object(i.a)({key:"__RC_SELECT_GRP__".concat(ve===null?ee:ve,"__"),label:ve},Re),{},{options:y(le)})}).filter(function($){return $})}var E=k("2Qr1"),b=k("qNPg"),_=k("U8pU"),I=k("Kwbf"),j=k("WKfj");function M(W){var F=W.mode,$=W.options,ee=W.children,Z=W.backfill,ve=W.allowClear,he=W.placeholder,le=W.getInputElement,Re=W.showSearch,xe=W.onSearch,ie=W.defaultOpen,se=W.autoFocus,re=W.labelInValue,be=W.value,q=W.inputValue,ne=W.optionLabelProp,Te=F==="multiple"||F==="tags",ae=Re!==void 0?Re:Te||F==="combobox",J=$||y(ee);if(Object(I.a)(F!=="tags"||J.every(function(ce){return!ce.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),F==="tags"||F==="combobox"){var X=J.some(function(ce){return ce.options?ce.options.some(function(we){return typeof("value"in we?we.value:we.key)=="number"}):typeof("value"in ce?ce.value:ce.key)=="number"});Object(I.a)(!X,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(I.a)(F!=="combobox"||!ne,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(I.a)(F==="combobox"||!Z,"`backfill` only works with `combobox` mode."),Object(I.a)(F==="combobox"||!le,"`getInputElement` only work with `combobox` mode."),Object(I.b)(F!=="combobox"||!le||!ve||!he,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),xe&&!ae&&F!=="combobox"&&F!=="tags"&&Object(I.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(I.b)(!ie||se,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),be!=null){var Q=Object(j.d)(be);Object(I.a)(!re||Q.every(function(ce){return Object(_.a)(ce)==="object"&&("key"in ce||"value"in ce)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(I.a)(!Te||Array.isArray(be),"`value` should be array when `mode` is `multiple` or `tags`")}if(ee){var pe=null;Object(L.a)(ee).some(function(ce){if(!h.isValidElement(ce)||!ce.type)return!1;var we=ce.type;if(we.isSelectOption)return!1;if(we.isSelectOptGroup){var ze=Object(L.a)(ce.props.children).every(function(Ge){return!h.isValidElement(Ge)||!ce.type||Ge.type.isSelectOption?!0:(pe=Ge.type,!1)});return!ze}return pe=we,!0}),pe&&Object(I.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(pe.displayName||pe.name||pe,"`.")),Object(I.a)(q===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var G=M,K=Object(b.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:y,flattenOptions:E.d,getLabeledValue:E.e,filterOptions:E.b,isValueDisabled:E.g,findValueOption:E.c,warningProps:G,fillOptionsWithMissingValue:E.a}),H=function(W){Object(C.a)($,W);var F=Object(R.a)($);function $(){var ee;return Object(P.a)(this,$),ee=F.apply(this,arguments),ee.selectRef=h.createRef(),ee.focus=function(){ee.selectRef.current.focus()},ee.blur=function(){ee.selectRef.current.blur()},ee}return Object(u.a)($,[{key:"render",value:function(){return h.createElement(K,Object.assign({ref:this.selectRef},this.props))}}]),$}(h.Component);H.Option=c,H.OptGroup=v;var z=H,B=Y.c=z},M8RZ:function(N,Y,k){"use strict";k.d(Y,"a",function(){return a});var P=k("fWQN"),u=k("mtLc"),C=k("yKVA"),R=k("879j"),h=k("q1tI"),s=k.n(h),S=k("i8i4"),d=k.n(S),a=function(o){Object(C.a)(x,o);var r=Object(R.a)(x);function x(g){var m;Object(P.a)(this,x),m=r.call(this,g);var w=window.document;return m.node=w.createElement("div"),w.body.appendChild(m.node),m}return Object(u.a)(x,[{key:"render",value:function(){var m=this.props.children;return Object(S.createPortal)(m,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),x}(s.a.Component)},MFOe:function(N,Y,k){(function(P){var u=s(),C=S(),R=d(),h=typeof window!="undefined"?window:P;N.exports={assign:u,create:C,trim:R,bind:a,slice:o,each:r,map:x,pluck:g,isList:m,isFunction:w,isObject:p,Global:h};function s(){return Object.assign?Object.assign:function(n,l,c,T){for(var v=1;v=0;p-=1){var f=d.get(p)||new Set;f.forEach(function(n){var l=n.parent,c=n.node;if(o(c)||!n.parent||w.has(n.parent.key))return;if(o(n.parent.node)){w.add(l.key);return}var T=!0,v=!1;(l.children||[]).filter(function(i){return!o(i.node)}).forEach(function(i){var L=i.key,A=r.has(L);T&&!A&&(T=!1),!v&&(A||x.has(L))&&(v=!0)}),T&&r.add(l.key),v&&x.add(l.key),w.add(l.key)})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(u(x,r))}}function h(S,d,a,o,r){for(var x=new Set(S),g=new Set(d),m=0;m<=o;m+=1){var w=a.get(m)||new Set;w.forEach(function(l){var c=l.key,T=l.node,v=l.children,i=v===void 0?[]:v;!x.has(c)&&!g.has(c)&&!r(T)&&i.filter(function(L){return!r(L.node)}).forEach(function(L){x.delete(L.key)})})}g=new Set;for(var p=new Set,f=o;f>=0;f-=1){var n=a.get(f)||new Set;n.forEach(function(l){var c=l.parent,T=l.node;if(r(T)||!l.parent||p.has(l.parent.key))return;if(r(l.parent.node)){p.add(c.key);return}var v=!0,i=!1;(c.children||[]).filter(function(L){return!r(L.node)}).forEach(function(L){var A=L.key,y=x.has(A);v&&!y&&(v=!1),!i&&(y||g.has(A))&&(i=!0)}),v||x.delete(c.key),i&&g.add(c.key),p.add(c.key)})}return{checkedKeys:Array.from(x),halfCheckedKeys:Array.from(u(g,x))}}function s(S,d,a,o){var r=[],x;o?x=o:x=C;var g=new Set(S.filter(function(f){var n=!!a[f];return n||r.push(f),n})),m=new Map,w=0;Object.keys(a).forEach(function(f){var n=a[f],l=n.level,c=m.get(l);c||(c=new Set,m.set(l,c)),c.add(n),w=Math.max(w,l)}),Object(P.a)(!r.length,"Tree missing follow keys: ".concat(r.slice(0,100).map(function(f){return"'".concat(f,"'")}).join(", ")));var p;return d===!0?p=R(g,m,w,x):p=h(g,d.halfCheckedKeys,m,w,x),p}},OLod:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("K3mO"))})(this,function(P){P.lib.Cipher||function(u){var C=P,R=C.lib,h=R.Base,s=R.WordArray,S=R.BufferedBlockAlgorithm,d=C.enc,a=d.Utf8,o=d.Base64,r=C.algo,x=r.EvpKDF,g=R.Cipher=S.extend({cfg:h.extend(),createEncryptor:function(b,_){return this.create(this._ENC_XFORM_MODE,b,_)},createDecryptor:function(b,_){return this.create(this._DEC_XFORM_MODE,b,_)},init:function(b,_,I){this.cfg=this.cfg.extend(I),this._xformMode=b,this._key=_,this.reset()},reset:function(){S.reset.call(this),this._doReset()},process:function(b){return this._append(b),this._process()},finalize:function(b){b&&this._append(b);var _=this._doFinalize();return _},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function b(_){return typeof _=="string"?E:L}return function(_){return{encrypt:function(I,j,M){return b(j).encrypt(_,I,j,M)},decrypt:function(I,j,M){return b(j).decrypt(_,I,j,M)}}}}()}),m=R.StreamCipher=g.extend({_doFinalize:function(){var b=this._process(!0);return b},blockSize:1}),w=C.mode={},p=R.BlockCipherMode=h.extend({createEncryptor:function(b,_){return this.Encryptor.create(b,_)},createDecryptor:function(b,_){return this.Decryptor.create(b,_)},init:function(b,_){this._cipher=b,this._iv=_}}),f=w.CBC=function(){var b=p.extend();b.Encryptor=b.extend({processBlock:function(I,j){var M=this._cipher,G=M.blockSize;_.call(this,I,j,G),M.encryptBlock(I,j),this._prevBlock=I.slice(j,j+G)}}),b.Decryptor=b.extend({processBlock:function(I,j){var M=this._cipher,G=M.blockSize,K=I.slice(j,j+G);M.decryptBlock(I,j),_.call(this,I,j,G),this._prevBlock=K}});function _(I,j,M){var G,K=this._iv;K?(G=K,this._iv=u):G=this._prevBlock;for(var H=0;H>>2]&255;b.sigBytes-=_}},c=R.BlockCipher=g.extend({cfg:g.cfg.extend({mode:f,padding:l}),reset:function(){var b;g.reset.call(this);var _=this.cfg,I=_.iv,j=_.mode;this._xformMode==this._ENC_XFORM_MODE?b=j.createEncryptor:(b=j.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==b?this._mode.init(this,I&&I.words):(this._mode=b.call(j,this,I&&I.words),this._mode.__creator=b)},_doProcessBlock:function(b,_){this._mode.processBlock(b,_)},_doFinalize:function(){var b,_=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(_.pad(this._data,this.blockSize),b=this._process(!0)):(b=this._process(!0),_.unpad(b)),b},blockSize:128/32}),T=R.CipherParams=h.extend({init:function(b){this.mixIn(b)},toString:function(b){return(b||this.formatter).stringify(this)}}),v=C.format={},i=v.OpenSSL={stringify:function(b){var _,I=b.ciphertext,j=b.salt;return j?_=s.create([1398893684,1701076831]).concat(j).concat(I):_=I,_.toString(o)},parse:function(b){var _,I=o.parse(b),j=I.words;return j[0]==1398893684&&j[1]==1701076831&&(_=s.create(j.slice(2,4)),j.splice(0,4),I.sigBytes-=16),T.create({ciphertext:I,salt:_})}},L=R.SerializableCipher=h.extend({cfg:h.extend({format:i}),encrypt:function(b,_,I,j){j=this.cfg.extend(j);var M=b.createEncryptor(I,j),G=M.finalize(_),K=M.cfg;return T.create({ciphertext:G,key:I,iv:K.iv,algorithm:b,mode:K.mode,padding:K.padding,blockSize:b.blockSize,formatter:j.format})},decrypt:function(b,_,I,j){j=this.cfg.extend(j),_=this._parse(_,j.format);var M=b.createDecryptor(I,j).finalize(_.ciphertext);return M},_parse:function(b,_){return typeof b=="string"?_.parse(b,this):b}}),A=C.kdf={},y=A.OpenSSL={execute:function(b,_,I,j){j||(j=s.random(64/8));var M=x.create({keySize:_+I}).compute(b,j),G=s.create(M.words.slice(_),I*4);return M.sigBytes=_*4,T.create({key:M,iv:G,salt:j})}},E=R.PasswordBasedCipher=L.extend({cfg:L.cfg.extend({kdf:y}),encrypt:function(b,_,I,j){j=this.cfg.extend(j);var M=j.kdf.execute(I,b.keySize,b.ivSize);j.iv=M.iv;var G=L.encrypt.call(this,b,_,M.key,j);return G.mixIn(M),G},decrypt:function(b,_,I,j){j=this.cfg.extend(j),_=this._parse(_,j.format);var M=j.kdf.execute(I,b.keySize,b.ivSize,_.salt);j.iv=M.iv;var G=L.decrypt.call(this,b,_,M.key,j);return G}})}()})},OZM5:function(N,Y,k){"use strict";k.d(Y,"b",function(){return o}),k.d(Y,"a",function(){return r}),k.d(Y,"k",function(){return x}),k.d(Y,"h",function(){return g}),k.d(Y,"i",function(){return m}),k.d(Y,"g",function(){return w}),k.d(Y,"c",function(){return p}),k.d(Y,"d",function(){return f}),k.d(Y,"j",function(){return c}),k.d(Y,"e",function(){return T}),k.d(Y,"f",function(){return v});var P=k("KQm4"),u=k("U8pU"),C=k("Ff2n"),R=k("q1tI"),h=k.n(R),s=k("Kwbf"),S=k("WaYH"),d=.25,a=2;function o(i,L){var A=i.slice(),y=A.indexOf(L);return y>=0&&A.splice(y,1),A}function r(i,L){var A=i.slice();return A.indexOf(L)===-1&&A.push(L),A}function x(i){return i.split("-")}function g(i,L){return"".concat(i,"-").concat(L)}function m(i){return i&&i.type&&i.type.isTreeNode}function w(i,L){var A=[i],y=L[i];function E(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];b.forEach(function(_){var I=_.key,j=_.children;A.push(I),E(j)})}return E(y.children),A}function p(i,L){var A=i.clientY,y=L.selectHandle.getBoundingClientRect(),E=y.top,b=y.bottom,_=y.height,I=Math.max(_*d,a);return A<=E+I?-1:A>=b-I?1:0}function f(i,L){if(!i)return;var A=L.multiple;return A?i.slice():i.length?[i[0]]:i}var n=function(L){return L};function l(i,L){if(!i)return[];var A=L||{},y=A.processProps,E=y===void 0?n:y,b=Array.isArray(i)?i:[i];return b.map(function(_){var I=_.children,j=Object(C.a)(_,["children"]),M=l(I,L);return h.a.createElement(S.a,Object.assign({},E(j)),M)})}function c(i){if(!i)return null;var L;if(Array.isArray(i))L={checkedKeys:i,halfCheckedKeys:void 0};else if(Object(u.a)(i)==="object")L={checkedKeys:i.checked||void 0,halfCheckedKeys:i.halfChecked||void 0};else return Object(s.a)(!1,"`checkedKeys` is not an array or an object"),null;return L}function T(i,L){var A=new Set;function y(E){if(A.has(E))return;var b=L[E];if(!b)return;A.add(E);var _=b.parent,I=b.node;if(I.disabled)return;_&&y(_.key)}return(i||[]).forEach(function(E){y(E)}),Object(P.a)(A)}function v(i){var L={};return Object.keys(i).forEach(function(A){(A.startsWith("data-")||A.startsWith("aria-"))&&(L[A]=i[A])}),L}},Ot1p:function(N,Y,k){"use strict";var P=k("2qtc"),u=k("kLXV"),C=k("rAM+"),R=k("miYZ"),h=k("tsqr"),s=k("tJVT"),S=k("jrin"),d=k("q1tI"),a=k.n(d),o=k("VrN/"),r=k.n(o),x=k("bdgK"),g=k("p77/"),m=k("Bd2K"),w=k("ELLl"),p=k("19Vz"),f=k("lZu9"),n=k("+NIl"),l=k("kSUc"),c=k("9Bee"),T=function(_e){var Se=_e.value,Oe=Se===void 0?"":Se,de=_e.className,ye=_e.showTextOnly,Ee=_e.showLines,De=_e.style,Be=De===void 0?{}:De,Xe=Object(d.useMemo)(function(){return""},[Oe]);return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{dangerouslySetInnerHTML:{__html:Xe}}))},v=k("0Owb"),i=k("dejd"),L=k("C+DQ"),A=[{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 y(_e){var Se=_e.onActionCallback,Oe=_e.title,de=_e.icon,ye=_e.actionName,Ee=_e.className,De=Ee===void 0?"":Ee,Be=_e.children;function Xe(){Se(ye)}return a.a.createElement("a",{title:Oe,className:De,onClick:Xe},a.a.createElement("i",{className:"md-iconfont ".concat(de)}),Be)}var E=function(_e){var Se=_e.watch,Oe=_e.showNullButton,de=_e.onActionCallback,ye=_e.fullScreen,Ee=_e.insertTemp,De=_e.hidetoolBar,Be=[].concat(A,[{title:"".concat(Se?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Se?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return a.a.createElement("ul",{className:"markdown-toolbar-container"},!De&&Be.map(function(Xe,nt){return a.a.createElement("li",{key:nt},Xe.actionName?a.a.createElement(y,Object(v.a)({},Xe,{onActionCallback:de})):a.a.createElement("span",{className:"v-line"}))}),Oe?a.a.createElement("li",null,a.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:de},a.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ee&&a.a.createElement("li",null,a.a.createElement(y,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ee),onActionCallback:de},a.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),a.a.createElement("li",{className:"btn-full-screen"},a.a.createElement(y,{icon:"".concat(ye?"icon-shrink":"icon-enlarge"),title:ye?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:de})))},b=k("M8RZ"),_=k("+L6B"),I=k("2/Rp"),j=k("y8nQ"),M=k("Vl3Y"),G=k("5NDa"),K=k("5rEg"),H={labelCol:{span:4},wrapperCol:{span:20}},z=function(_e){var Se=_e.callback,Oe=_e.onCancel;function de(ye){Se(ye)}return a.a.createElement(M.a,Object(v.a)({},H,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:de}),a.a.createElement(M.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},a.a.createElement(K.a,null)),a.a.createElement(M.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},a.a.createElement(K.a,null)),a.a.createElement("div",{className:"flex-container flex-end"},a.a.createElement(I.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),a.a.createElement(I.a,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))},B=k("7ahc"),W=k("HmJG"),F=k("BjJ7"),$=M.a.useForm,ee={width:280,marginRight:10},Z={labelCol:{span:5},wrapperCol:{span:19}},ve=function(_e){var Se=_e.callback,Oe=_e.onCancel,de=$(),ye=Object(s.a)(de,1),Ee=ye[0];function De(nt){Se(nt)}function Be(nt,dt){Ee.setFieldsValue({src:"/api/attachments/".concat(nt.id),type:dt.type})}function Xe(nt){var dt=nt.target.files[0];le(dt,Be)}return a.a.createElement(M.a,Object(v.a)({form:Ee},Z,{className:"upload-image-panel",onFinish:De}),a.a.createElement(M.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},a.a.createElement("div",{className:"flex-container"},a.a.createElement(M.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},a.a.createElement(K.a,{style:ee})),a.a.createElement(he,{onFileChange:Xe}))),a.a.createElement(M.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},a.a.createElement(K.a,{style:{width:264}})),a.a.createElement(M.a.Item,{style:{textAlign:"right"}},a.a.createElement(I.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),a.a.createElement(I.a,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))};function he(_e){var Se=_e.onFileChange;return a.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",a.a.createElement("input",{type:"file",onChange:Se}))}function le(_e,Se){if(!_e)throw new String("\u6CA1\u6709\u6587\u4EF6");var Oe=new FormData;Oe.append("editormd-image-file",_e),Oe.append("file_param_name","editormd-image-file"),Oe.append("byxhr","true");var de=new window.XMLHttpRequest;de.withCredentials=!0,de.addEventListener("load",function(ye){Se(JSON.parse(ye.target.responseText),_e)},!1),de.addEventListener("error",function(ye){console.error(ye)},!1),de.open("POST","".concat(F.a,"/api/attachments.json")),de.send(Oe)}var Re=k("giR+"),xe=k("fyUT"),ie=k("7Kak"),se=k("9yH6"),re=se.a.Group,be={margin:"0 8px"},q=function(_e){var Se=_e.callback,Oe=_e.onCancel;function de(ye){Se(ye)}return a.a.createElement(M.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:de},a.a.createElement("div",{className:"flex-container"},a.a.createElement("span",{style:be},"\u5355\u5143\u683C\u6570\uFF1A"),a.a.createElement("span",{style:be},"\u884C\u6570"),a.a.createElement(M.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},a.a.createElement(xe.a,null)),a.a.createElement("span",{style:be},"\u5217\u6570"),a.a.createElement(M.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},a.a.createElement(xe.a,null))),a.a.createElement("div",{className:"flex-container",style:{marginTop:12}},a.a.createElement("span",{style:be},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),a.a.createElement(M.a.Item,{name:"align"},a.a.createElement(re,null,a.a.createElement(se.a,{value:"default"},a.a.createElement("i",{className:"fa fa-align-justify"})),a.a.createElement(se.a,{value:"left"},a.a.createElement("i",{className:"fa fa-align-left"})),a.a.createElement(se.a,{value:"center"},a.a.createElement("i",{className:"fa fa-align-center"})),a.a.createElement(se.a,{value:"right"},a.a.createElement("i",{className:"fa fa-align-right"}))))),a.a.createElement("div",{className:"flex-container flex-end"},a.a.createElement(I.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),a.a.createElement(I.a,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))},ne=k("m3rI"),Te="link",ae="upload-image",J="code-block",X="add-table",Q="------------",pe={default:Q,left:":".concat(Q),center:":".concat(Q,":"),right:"".concat(Q,":")},ce=k("9VGf"),we,ze;function Ge(){}var Qe=0,$e=1e4,rt="\u2581",et=` **\u6A21\u677F\u6807\u9898** \u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function Me(_e){return/^\d+$/.test(_e)?"".concat(_e,"px"):_e}var Ce=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ve=Ce?"Cmd":"Ctrl",tt=(we={},Object(S.a)(we,Ve+"-B","bold"),Object(S.a)(we,Ve+"-I","italic"),we),He=(ze={},Object(S.a)(ze,Te,"\u6DFB\u52A0\u94FE\u63A5"),Object(S.a)(ze,J,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(S.a)(ze,ae,"\u6DFB\u52A0\u56FE\u7247"),Object(S.a)(ze,X,"\u6DFB\u52A0\u8868\u683C"),ze),Je=Y.a=function(_e){var Se=_e.defaultValue,Oe=Se===void 0?"":Se,de=_e.onChange,ye=_e.width,Ee=ye===void 0?"100%":ye,De=_e.height,Be=De===void 0?400:De,Xe=_e.miniToolbar,nt=Xe===void 0?!1:Xe,dt=_e.isFocus,Et=dt===void 0?!1:dt,ft=_e.watch,jt=_e.insertTemp,Ct=_e.mode,xt=Ct===void 0?"markdown":Ct,Yt=_e.id,$t=Yt===void 0?"markdown-editor-id":Yt,Vt=_e.showResizeBar,xr=Vt===void 0?!1:Vt,Lt=_e.noStorage,Er=Lt===void 0?!1:Lt,fr=_e.showNullButton,Wt=fr===void 0?!1:fr,Xt=_e.hidetoolBar,$r=Xt===void 0?!1:Xt,Tn=_e.fullScreen,wr=Tn===void 0?!1:Tn,aa=_e.onBlur,pt=_e.onCMBeforeChange,Tt=_e.onFullScreen,ht=_e.className,Tr=ht===void 0?"":ht,Rr=_e.disablePaste,Pt=Rr===void 0?!1:Rr,_t=_e.placeholder,Lr=_t===void 0?"":_t,cn=_e.values,Mr=cn===void 0?"":cn,ot=Object(d.useState)(null),Ot=Object(s.a)(ot,2),lt=Ot[0],un=Ot[1],Sn=Object(d.useState)(Oe),dn=Object(s.a)(Sn,2),jr=dn[0],wt=dn[1],fn=Object(d.useState)(ft),Fr=Object(s.a)(fn,2),sr=Fr[0],nr=Fr[1],qn=Object(d.useState)(wr),Rn=Object(s.a)(qn,2),an=Rn[0],ea=Rn[1],ta=Object(d.useState)(""),Cn=Object(s.a)(ta,2),Sr=Cn[0],Ln=Cn[1],vn=Object(d.useState)(0),on=Object(s.a)(vn,2),Jt=on[0],zr=on[1],Gt=Object(d.useState)(Be),kt=Object(s.a)(Gt,2),Qt=kt[0],hr=kt[1],Ir=Object(d.useState)(!1),Jr=Object(s.a)(Ir,2),Mn=Jr[0],Ba=Jr[1],wa=Object(d.useRef)(),Ma=Object(d.useRef)(),ia=Object(d.useRef)(),en=Object(d.useRef)();Object(d.useEffect)(function(){wt(Mr),lt==null||lt.setValue(Mr)},[Mr]),Object(d.useEffect)(function(){Tt==null||Tt(an)},[an]),Object(d.useEffect)(function(){if(wa.current){var Rt=r.a.fromTextArea(wa.current,{mode:xt,lineNumbers:!nt,lineWrapping:!0,value:Oe,autoCloseTags:!0,autoCloseBrackets:!0});Et&&Rt.focus();function Kt(Bt,pr){if(Pt){pr.preventDefault();return}var mr=pr.clipboardData;if(mr){var Pr=mr.types.toString(),Xr=mr.items,Br=["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"];if(Pr==="Files"||mr.types.indexOf("Files")>-1){if(pr.preventDefault(),xt=="stex")return;try{var tn,Hn=Xr[1];((tn=Xr[0])===null||tn===void 0?void 0:tn.kind)==="file"&&(Hn=Xr[0]);var Cr=Hn.getAsFile(),ur=Cr.name.split(".").pop();le(Cr,function(yn){if(yn.id){var ca,Kn,Ta;(Cr==null||((ca=Cr.type)===null||ca===void 0)?void 0:ca.indexOf("image"))>-1?Rt.replaceSelection("![,](/api/attachments/".concat(yn.id,"?type=").concat(yn.content_type,")")):(Cr==null||((Kn=Cr.type)===null||Kn===void 0)?void 0:Kn.indexOf("video"))>-1?Rt.replaceSelection('')):(Cr==null||((Ta=Cr.type)===null||Ta===void 0)?void 0:Ta.indexOf("pdf"))>-1?Rt.replaceSelection('
    ').concat(Cr.name,"")):Br.includes(ur)?Rt.replaceSelection('').concat(Cr.name,"")):Rt.replaceSelection("[".concat(Cr.name,"](").concat(ne.a.API_SERVER,"/api/attachments/").concat(yn.id,"?type=").concat(yn.content_type,")"))}else(yn==null?void 0:yn.status)===401&&(document.location.href="/user/login")})}catch(yn){h.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Rt.on("paste",Kt),un(Rt),function(){Rt.off("paste",Kt)}}},[]);var Pa=Object(d.useCallback)(function(){if(Ma.current)try{}catch(Rt){console.log(Rt,"---- to set md editor body height")}},[Qt,Ma,an]);Object(d.useEffect)(function(){function Rt(){var Bt=new x.default(function(pr){var mr=Object(C.a)(pr),Pr;try{for(mr.s();!(Pr=mr.n()).done;){var Xr=Pr.value;(Xr.target.offsetHeight>0||Xr.target.offsetWidth>0)&&(Pa(),lt.setSize("100%","100%"),lt.refresh())}}catch(Br){mr.e(Br)}finally{mr.f()}});return Bt.observe(wa.current.parentElement),Bt}if(lt){var Kt=Rt();return function(){Kt.unobserve(wa.current.parentElement)}}},[lt,Pa]),Object(d.useEffect)(function(){if(lt){for(var Rt=[],Kt=function(){var Xr=pr[Bt];mr=Object(s.a)(Xr,2);var Br=mr[0],tn=mr[1],Hn=Object(S.a)({},Br,function(){Hr(tn)});Rt.push(Hn),lt.addKeyMap(Hn)},Bt=0,pr=Object.entries(tt);Bt0){var Rt=new Date().getTime(),Kt=window.sessionStorage.getItem($t);Rt>=Jt+$e&&(!Kt||Kt!==jr)&&(window.sessionStorage.setItem($t,jr),Ba(!0))}},$e),Object(d.useEffect)(function(){nr(ft)},[lt,ft]),Object(d.useEffect)(function(){lt&&(Et&<.focus())},[lt,Et]),Object(d.useEffect)(function(){if(sr&<){var Rt=lt.getScrollerElement();function Kt(Bt){var pr=Bt.target;if(en.current){var mr=pr.scrollTop/pr.scrollHeight;en.current.scrollTop=en.current.scrollHeight*mr}}return Rt.addEventListener("scroll",Kt),function(){Rt.removeEventListener("scroll",Kt)}}},[lt,sr]),Object(d.useEffect)(function(){if(lt&&pt){function Rt(Kt,Bt){pt(Kt,Bt)}return lt.on("beforeChange",Rt),function(){lt.off("beforeChange",Rt)}}},[lt,pt]),Object(d.useEffect)(function(){if(lt&&aa){function Rt(){aa(lt.getValue())}return lt.on("blur",Rt),function(){lt.off("blur",Rt)}}},[lt,aa]),Object(d.useEffect)(function(){if(lt){function Rt(Kt){var Bt=Kt.getValue();wt(Bt),zr(new Date().getTime()),Kt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),de&&de(Bt)}return lt.on("change",Rt),function(){lt.off("change",Rt)}}},[lt,de]),Object(d.useEffect)(function(){lt&&(Oe==null?(lt.setValue(""),wt("")):Oe!==lt.getValue()&&(lt.setValue(Oe),wt(Oe),lt.setCursor(lt.lineCount(),0)))},[lt,Oe]);var Hr=Object(d.useCallback)(function(Rt){var Kt=lt.getCursor(),Bt=lt.getSelection(),pr=Bt.split(` `);switch(Rt){case"bold":return lt.replaceSelection("**"+Bt+"**"),Bt===""&<.setCursor(Kt.line,Kt.ch+2),lt.focus();case"italic":return lt.replaceSelection("*"+Bt+"*"),Bt===""&<.setCursor(Kt.line,Kt.ch+1),lt.focus();case"code":return lt.replaceSelection("`"+Bt+"`"),Bt===""&<.setCursor(Kt.line,Kt.ch+1),lt.focus();case"inline-latex":return lt.replaceSelection("`$$"+Bt+"$$`"),Bt===""&<.setCursor(Kt.line,Kt.ch+3),lt.focus();case"latex":return lt.replaceSelection("```latex\n"+Bt+"\n```"),lt.setCursor(Kt.line+1,Bt.length+1),lt.focus();case"line-break":return lt.replaceSelection(`
    `),lt.focus();case"list-ul":return Bt===""?lt.replaceSelection("- "+Bt):lt.replaceSelection(pr.map(function(mr){return mr===""?"":"- ".concat(mr)}).join(` `)),lt.focus();case"list-ol":return Bt===""?lt.replaceSelection("1. "+Bt):lt.replaceSelection(pr.map(function(mr,Pr){return mr===""?"":"".concat(Pr+1,". ").concat(mr)}).join(` `)),lt.focus();case"add-null-ch":return Bt===""&<.setCursor(Kt.line,Kt.ch+1),lt.replaceSelection(rt),lt.focus();case"inster-template-1":return Bt===""&<.setCursor(Kt.line,Kt.ch),lt.replaceSelection(et),lt.focus();case"eraser":return lt.setValue(""),lt.focus();case"trigger-watch":return nr(!sr),lt.focus();case"trigger-full-screen":return ea(!an),lt.focus();case Te:Ln(Te);return;case J:Ln(J);return;case ae:Ln(ae);return;case X:Ln(X);return;default:throw new Error}},[lt,sr,an]),Wn=Object(d.useCallback)(function(Rt){Ln("");switch(Sr){case Te:var Kt=Rt.title,Bt=Rt.link;return lt.replaceSelection("[".concat(Kt,"](").concat(Bt,")")),lt.focus();case J:var pr=Rt.language,mr=Rt.content;return lt.replaceSelection(["```"+pr,mr,"```"].join(` `)),lt.focus();case ae:var Pr=Rt.src,Xr=Rt.alt;return lt.replaceSelection("![ ".concat(Xr," ]( ").concat(Pr,' "').concat(Xr,'" )')),lt.focus();case X:for(var Br=Rt.row,tn=Rt.col,Hn=Rt.align,Cr=` `,ur=0;ur300&&(Br=300);var tn=Be+Br+"px";hr(tn)}}return Rt.addEventListener("mousedown",pr),document.addEventListener("mousemove",Pr),document.addEventListener("mouseup",mr),function(){Rt.removeEventListener("mousedown",pr),document.removeEventListener("mousemove",Pr),document.removeEventListener("mouseup",mr)}}},[lt,ia]),Object(d.useEffect)(function(){hr(Be)},[Be]);var _n=Me(Ee),ka=Me(Qt),ga={width:_n,height:ka},ua=Object(d.useMemo)(function(){if(Jt){var Rt=new Date(Jt),Kt=Rt.getHours(),Bt=Rt.getMinutes(),pr=Rt.getSeconds();return Kt=Kt<10?"0"+Kt:Kt,Bt=Bt<10?"0"+Bt:Bt,pr=pr<10?"0"+pr:pr,"".concat(Kt,":").concat(Bt,":").concat(pr)}return 0},[Jt]);function Va(){window.sessionStorage.removeItem($t),Ba(!1),zr(0)}function Ca(){Ba(!1),zr(0),lt.setValue(window.sessionStorage.getItem($t))}return a.a.createElement(d.Fragment,null,a.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ma},a.a.createElement("div",{className:"markdown-editor-container ".concat(Tr," ").concat(sr?"on-preview":""," ").concat(nt?"mini":""," ").concat(an?"full-screen":""),style:ga},a.a.createElement(E,{insertTemp:jt,watch:sr,fullScreen:an,showNullButton:Wt,onActionCallback:Hr,hidetoolBar:$r}),a.a.createElement("div",{className:"markdown-editor-body"},a.a.createElement("div",{className:"codemirror-container"},a.a.createElement("textarea",{ref:wa,placeholder:Lr})),sr?a.a.createElement("div",{ref:en,className:"preview-container"},xt==="stex"&&a.a.createElement(T,{value:jr}),xt!=="stex"&&a.a.createElement(c.a,{value:jr})):null))),xr?a.a.createElement("a",{ref:ia,className:"editor-resize"}):null,a.a.createElement(b.a,null,He[Sr]?a.a.createElement(u.a,{centered:!0,title:He[Sr],visible:!0,onCancel:Gr,footer:null},jn):null))}},PD8m:function(N,Y){N.exports={name:"memoryStorage",read:P,write:u,each:C,remove:R,clearAll:h};var k={};function P(s){return k[s]}function u(s,S){k[s]=S}function C(s){for(var S in k)k.hasOwnProperty(S)&&s(k[S],S)}function R(s){delete k[s]}function h(s){k={}}},PVpz:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.StreamCipher,h=u.algo,s=[],S=[],d=[],a=h.RabbitLegacy=R.extend({_doReset:function(){var r=this._key.words,x=this.cfg.iv,g=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],m=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 w=0;w<4;w++)o.call(this);for(var w=0;w<8;w++)m[w]^=g[w+4&7];if(x){var p=x.words,f=p[0],n=p[1],l=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,c=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,T=l>>>16|c&4294901760,v=c<<16|l&65535;m[0]^=l,m[1]^=T,m[2]^=c,m[3]^=v,m[4]^=l,m[5]^=T,m[6]^=c,m[7]^=v;for(var w=0;w<4;w++)o.call(this)}},_doProcessBlock:function(r,x){var g=this._X;o.call(this),s[0]=g[0]^g[5]>>>16^g[3]<<16,s[1]=g[2]^g[7]>>>16^g[5]<<16,s[2]=g[4]^g[1]>>>16^g[7]<<16,s[3]=g[6]^g[3]>>>16^g[1]<<16;for(var m=0;m<4;m++)s[m]=(s[m]<<8|s[m]>>>24)&16711935|(s[m]<<24|s[m]>>>8)&4278255360,r[x+m]^=s[m]},blockSize:128/32,ivSize:64/32});function o(){for(var r=this._X,x=this._C,g=0;g<8;g++)S[g]=x[g];x[0]=x[0]+1295307597+this._b|0,x[1]=x[1]+3545052371+(x[0]>>>0>>0?1:0)|0,x[2]=x[2]+886263092+(x[1]>>>0>>0?1:0)|0,x[3]=x[3]+1295307597+(x[2]>>>0>>0?1:0)|0,x[4]=x[4]+3545052371+(x[3]>>>0>>0?1:0)|0,x[5]=x[5]+886263092+(x[4]>>>0>>0?1:0)|0,x[6]=x[6]+1295307597+(x[5]>>>0>>0?1:0)|0,x[7]=x[7]+3545052371+(x[6]>>>0>>0?1:0)|0,this._b=x[7]>>>0>>0?1:0;for(var g=0;g<8;g++){var m=r[g]+x[g],w=m&65535,p=m>>>16,f=((w*w>>>17)+w*p>>>15)+p*p,n=((m&4294901760)*m|0)+((m&65535)*m|0);d[g]=f^n}r[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,r[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,r[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,r[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,r[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,r[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,r[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,r[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}u.RabbitLegacy=R._createHelper(a)}(),P.RabbitLegacy})},RELg:function(N,Y,k){var P=k("MFOe"),u=P.Global;N.exports={name:"oldIE-userDataStorage",write:S,read:d,each:a,remove:o,clearAll:r};var C="storejs",R=u.document,h=m(),s=(u.navigator?u.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function S(w,p){if(s)return;var f=g(w);h(function(n){n.setAttribute(f,p),n.save(C)})}function d(w){if(s)return;var p=g(w),f=null;return h(function(n){f=n.getAttribute(p)}),f}function a(w){h(function(p){for(var f=p.XMLDocument.documentElement.attributes,n=f.length-1;n>=0;n--){var l=f[n];w(p.getAttribute(l.name),l.name)}})}function o(w){var p=g(w);h(function(f){f.removeAttribute(p),f.save(C)})}function r(){h(function(w){var p=w.XMLDocument.documentElement.attributes;w.load(C);for(var f=p.length-1;f>=0;f--)w.removeAttribute(p[f].name);w.save(C)})}var x=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function g(w){return w.replace(/^\d/,"___$&").replace(x,"___")}function m(){if(!R||!R.documentElement||!R.documentElement.addBehavior)return null;var w="script",p,f,n;try{f=new ActiveXObject("htmlfile"),f.open(),f.write("<"+w+">document.w=window'),f.close(),p=f.w.frames[0].document,n=p.createElement("div")}catch(l){n=R.createElement("div"),p=R.body}return function(l){var c=[].slice.call(arguments,0);c.unshift(n),p.appendChild(n),n.addBehavior("#default#userData"),n.load(C),l.apply(this,c),p.removeChild(n);return}}},S6kV:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return P.mode.OFB=function(){var u=P.lib.BlockCipherMode.extend(),C=u.Encryptor=u.extend({processBlock:function(R,h){var s=this._cipher,S=s.blockSize,d=this._iv,a=this._keystream;d&&(a=this._keystream=d.slice(0),this._iv=void 0),s.encryptBlock(a,0);for(var o=0;o|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function B(ae){for(var J=0,X=!1,Q=!1,pe=0,ce=ae.length;pe122||(de<65||Oe>90||Ve.push([Math.max(65,Oe)|32,Math.min(de,90)|32]),de<97||Oe>122||Ve.push([Math.max(97,Oe)&~32,Math.min(de,122)&~32]))}}Ve.sort(function(Be,Xe){return Be[0]-Xe[0]||Xe[1]-Be[1]});for(var ye=[],Ee=[],Je=0;JeDe[0]&&(De[1]+1>De[0]&&He.push("-"),He.push(Qe(De[1])))}return He.push("]"),He.join("")}function rt(Me){for(var Ce=Me.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")),Ve=Ce.length,tt=[],He=0,Je=0;He=2&&Oe==="["?Ce[He]=$e(_e):Oe!=="\\"&&(Ce[He]=_e.replace(/[a-zA-Z]/g,function(Ee){var De=Ee.charCodeAt(0);return"["+String.fromCharCode(De&~32,De|32)+"]"}))}return Ce.join("")}for(var et=[],pe=0,ce=ae.length;pe=0;)X[et.charAt(Me)]=rt;var Ce=rt[1],Ve=""+Ce;Ge.hasOwnProperty(Ve)||(ze.push(Ce),Ge[Ve]=null)}ze.push(/[\0-\uffff]/),Q=B(ze)})();var pe=J.length,ce=function(we){for(var ze=we.sourceCode,Ge=we.basePos,Qe=we.sourceNode,$e=[Ge,_],rt=0,et=ze.match(Q)||[],Me={},Ce=0,Ve=et.length;Ce=5&&He.substring(0,5)==="lang-",_e&&!(Je&&typeof Je[1]=="string")&&(_e=!1,He=M),_e||(Me[tt]=He)}var de=rt;if(rt+=tt.length,!_e)$e.push(Ge+de,He);else{var ye=Je[1],Ee=tt.indexOf(ye),De=Ee+ye.length;Je[2]&&(De=tt.length-Je[2].length,Ee=De-ye.length);var Be=He.substring(5);F(Qe,Ge+de,tt.substring(0,Ee),ce,$e),F(Qe,Ge+de+Ee,ye,se(Be,ye),$e),F(Qe,Ge+de+De,tt.substring(De),ce,$e)}}we.decorations=$e};return ce}function ve(ae){var J=[],X=[];ae.tripleQuotedStrings?J.push([i,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ae.multiLineStrings?J.push([i,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):J.push([i,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ae.verbatimStrings&&X.push([i,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Q=ae.hashComments;Q&&(ae.cStyleComments?(Q>1?J.push([A,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):J.push([A,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),X.push([i,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):J.push([A,/^#[^\r\n]*/,null,"#"])),ae.cStyleComments&&(X.push([A,/^\/\/[^\r\n]*/,null]),X.push([A,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var pe=ae.regexLiterals;if(pe){var ce=pe>1?"":` \r`,we=ce?".":"[\\S\\s]",ze="/(?=[^/*"+ce+"])(?:[^/\\x5B\\x5C"+ce+"]|\\x5C"+we+"|\\x5B(?:[^\\x5C\\x5D"+ce+"]|\\x5C"+we+")*(?:\\x5D|$))+/";X.push(["lang-regex",RegExp("^"+z+"("+ze+")")])}var Ge=ae.types;Ge&&X.push([y,Ge]);var Qe=(""+ae.keywords).replace(/^ | $/g,"");Qe.length&&X.push([L,new RegExp("^(?:"+Qe.replace(/[\s,]+/g,"|")+")\\b"),null]),J.push([_,/^\s+/,null,` \r \xA0`]);var $e="^.[^\\s\\w.$@'\"`/\\\\]*";return ae.regexLiterals&&($e+="(?!s*/)"),X.push([E,/^@[a-z_$][a-z_$@0-9]*/i,null],[y,/^(?:[@_]?[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],[b,new RegExp($e),null]),Z(J,X)}var he=ve({keywords:T,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function le(ae,J,X){for(var Q=/(?:^|\s)nocode(?:\s|$)/,pe=/\r\n?|\n/,ce=ae.ownerDocument,we=ce.createElement("li");ae.firstChild;)we.appendChild(ae.firstChild);var ze=[we];function Ge(Ce){var Ve=Ce.nodeType;if(Ve==1&&!Q.test(Ce.className))if(Ce.nodeName==="br")Qe(Ce),Ce.parentNode&&Ce.parentNode.removeChild(Ce);else for(var tt=Ce.firstChild;tt;tt=tt.nextSibling)Ge(tt);else if((Ve==3||Ve==4)&&X){var He=Ce.nodeValue,Je=He.match(pe);if(Je){var _e=He.substring(0,Je.index);Ce.nodeValue=_e;var Se=He.substring(Je.index+Je[0].length);if(Se){var Oe=Ce.parentNode;Oe.insertBefore(ce.createTextNode(Se),Ce.nextSibling)}Qe(Ce),_e||Ce.parentNode.removeChild(Ce)}}}function Qe(Ce){for(;!Ce.nextSibling;)if(Ce=Ce.parentNode,!Ce)return;function Ve(Je,_e){var Se=_e?Je.cloneNode(!1):Je,Oe=Je.parentNode;if(Oe){var de=Ve(Oe,1),ye=Je.nextSibling;de.appendChild(Se);for(var Ee=ye;Ee;Ee=ye)ye=Ee.nextSibling,de.appendChild(Ee)}return Se}for(var tt=Ve(Ce.nextSibling,0),He;(He=tt.parentNode)&&He.nodeType===1;)tt=He;ze.push(tt)}for(var $e=0;$e=Oe&&(Ge+=2),ce>=de&&(rt+=2)}}finally{He&&(He.style.display=Je)}}var xe={};function ie(ae,J){for(var X=J.length;--X>=0;){var Q=J[X];xe.hasOwnProperty(Q)?d.console&&console.warn("cannot override language handler %s",Q):xe[Q]=ae}}function se(ae,J){return ae&&xe.hasOwnProperty(ae)||(ae=/^\s*]*(?:>|$)/],[A,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[b,/^(?:<[%?]|[%?]>)/],["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"]),ie(Z([[_,/^[\s]+/,null,` \r `],[K,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[I,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[G,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[b,/^[=<>\/]+/],["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"]),ie(Z([],[[K,/^[\s\S]+/]]),["uq.val"]),ie(ve({keywords:x,hashComments:!0,cStyleComments:!0,types:v}),["c","cc","cpp","cxx","cyc","m"]),ie(ve({keywords:"null,true,false"}),["json"]),ie(ve({keywords:m,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:v}),["cs"]),ie(ve({keywords:g,cStyleComments:!0}),["java"]),ie(ve({keywords:c,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ie(ve({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ie(ve({keywords:f,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ie(ve({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ie(ve({keywords:p,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ie(ve({keywords:w,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ie(Z([],[[i,/^[\s\S]+/]]),["regex"]);function re(ae){var J=ae.langExtension;try{var X=W(ae.sourceNode,ae.pre),Q=X.sourceCode;ae.sourceCode=Q,ae.spans=X.spans,ae.basePos=0,se(J,Q)(ae),Re(ae)}catch(pe){d.console&&console.log(pe&&pe.stack||pe)}}function be(ae,J,X){var Q=X||!1,pe=J||null,ce=document.createElement("div");ce.innerHTML="
    "+ae+"
    ",ce=ce.firstChild,Q&&le(ce,Q,!0);var we={langExtension:pe,numberLines:Q,sourceNode:ce,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return re(we),ce.innerHTML}function q(ae,J){var X=J||document.body,Q=X.ownerDocument||document;function pe(Se){return X.getElementsByTagName(Se)}for(var ce=[pe("pre"),pe("code"),pe("xmp")],we=[],ze=0;ze=15&&(x=!1,a=!0);var i=l&&(o||x&&(v==null||v<12.11)),L=C||S&&d>=9;function A(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var y=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 b(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 V=0;V=t)return te+(t-V);te+=oe-V,te+=D-te%D,V=oe+1}}var $=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};$.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},$.prototype.set=function(e,t){this.f=t;var D=+new Date+e;(!this.id||D=t)return O+Math.min(te,t-U);if(U+=V-O,U+=D-U%D,O=V+1,U>=t)return O}}var ie=[""];function se(e){for(;ie.length<=e;)ie.push(re(ie)+" ");return ie[e]}function re(e){return e[e.length-1]}function be(e,t){for(var D=[],O=0;O"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ae.test(e))}function X(e,t){return t?t.source.indexOf("\\w")>-1&&J(e)?!0:t.test(e):J(e)}function Q(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var pe=/[\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 ce(e){return e.charCodeAt(0)>=768&&pe.test(e)}function we(e,t,D){for(;(D<0?t>0:tD?-1:1;;){if(t==D)return t;var U=(t+D)/2,V=O<0?Math.ceil(U):Math.floor(U);if(V==t)return e(V)?t:D;e(V)?D=V:t=V+O}}function Ge(e,t,D,O){if(!e)return O(t,D,"ltr",0);for(var U=!1,V=0;Vt||t==D&&te.to==t)&&(O(Math.max(te.from,t),Math.min(te.to,D),te.level==1?"rtl":"ltr",V),U=!0)}U||O(t,D,"ltr")}var Qe=null;function $e(e,t,D){var O;Qe=null;for(var U=0;Ut)return U;V.to==t&&(V.from!=V.to&&D=="before"?O=U:Qe=U),V.from==t&&(V.from!=V.to&&D!="before"?O=U:Qe=U)}return O!=null?O:Qe}var rt=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function D(me){return me<=247?e.charAt(me):1424<=me&&me<=1524?"R":1536<=me&&me<=1785?t.charAt(me-1536):1774<=me&&me<=2220?"r":8192<=me&&me<=8203?"w":me==8204?"b":"L"}var O=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,U=/[stwN]/,V=/[LRr]/,te=/[Lb1n]/,oe=/[1n]/;function ue(me,Ie,je){this.level=me,this.from=Ie,this.to=je}return function(me,Ie){var je=Ie=="ltr"?"L":"R";if(me.length==0||Ie=="ltr"&&!O.test(me))return!1;for(var qe=me.length,Ze=[],it=0;it-1&&(O[t]=U.slice(0,V).concat(U.slice(V+1)))}}}function He(e,t){var D=Ve(e,t);if(!D.length)return;for(var O=Array.prototype.slice.call(arguments,2),U=0;U0}function Oe(e){e.prototype.on=function(t,D){Ce(this,t,D)},e.prototype.off=function(t,D){tt(this,t,D)}}function de(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ye(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function De(e){de(e),ye(e)}function Be(e){return e.target||e.srcElement}function Xe(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),l&&e.ctrlKey&&t==1&&(t=3),t}var nt=function(){if(S&&d<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}(),dt;function Et(e){if(dt==null){var t=_("span","\u200B");b(e,_("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(dt=t.offsetWidth<=1&&t.offsetHeight>2&&!(S&&d<8))}var D=dt?_("span","\u200B"):_("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return D.setAttribute("cm-text",""),D}var ft;function jt(e){if(ft!=null)return ft;var t=b(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:ft=O.right-D.right<3}var Ct=` 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 V=e.slice(t,e.charAt(U-1)=="\r"?U-1:U),te=V.indexOf("\r");te!=-1?(D.push(V.slice(0,te)),t+=te+1):(D.push(V),t=U+1)}return D}:function(e){return e.split(/\r\n?|\n/)},xt=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},Yt=function(){var e=_("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),$t=null;function Vt(e){if($t!=null)return $t;var t=b(e,_("span","x")),D=t.getBoundingClientRect(),O=j(t,0,1).getBoundingClientRect();return $t=Math.abs(D.left-O.left)>1}var xr={},Lt={};function Er(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),xr[e]=t}function fr(e,t){Lt[e]=t}function Wt(e){if(typeof e=="string"&&Lt.hasOwnProperty(e))e=Lt[e];else if(e&&typeof e.name=="string"&&Lt.hasOwnProperty(e.name)){var t=Lt[e.name];typeof t=="string"&&(t={name:t}),e=Te(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 Xt(e,t){t=Wt(t);var D=xr[t.name];if(!D)return Xt(e,"text/plain");var O=D(e,t);if($r.hasOwnProperty(t.name)){var U=$r[t.name];for(var V in U){if(!U.hasOwnProperty(V))continue;O.hasOwnProperty(V)&&(O["_"+V]=O[V]),O[V]=U[V]}}if(O.name=t.name,t.helperType&&(O.helperType=t.helperType),t.modeProps)for(var te in t.modeProps)O[te]=t.modeProps[te];return O}var $r={};function Tn(e,t){var D=$r.hasOwnProperty(e)?$r[e]:$r[e]={};W(t,D)}function wr(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 aa(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 pt(e,t,D){return e.startState?e.startState(t,D):!0}var Tt=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};Tt.prototype.eol=function(){return this.pos>=this.string.length},Tt.prototype.sol=function(){return this.pos==this.lineStart},Tt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Tt.prototype.next=function(){if(this.post},Tt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Tt.prototype.skipToEnd=function(){this.pos=this.string.length},Tt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Tt.prototype.backUp=function(e){this.pos-=e},Tt.prototype.column=function(){return this.lastColumnPos0?null:(V&&t!==!1&&(this.pos+=V[0].length),V)}},Tt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Tt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Tt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Tt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ht(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],V=U.chunkSize();if(t=e.first&&tD?ot(D,ht(e,D).text.length):fn(t,ht(e,t.line).text.length)}function fn(e,t){var D=e.ch;return D==null||D>t?ot(e.line,t):D<0?ot(e.line,0):e}function Fr(e,t){for(var D=[],O=0;Othis.maxLookAhead&&(this.maxLookAhead=e),t},nr.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}},nr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},nr.fromSaved=function(e,t,D){return t instanceof sr?new nr(e,wr(e.mode,t.state),D,t.lookAhead):new nr(e,wr(e.mode,t),D)},nr.prototype.save=function(e){var t=e!==!1?wr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new sr(t,this.maxLookAhead):t};function qn(e,t,D,O){var U=[e.state.modeGen],V={};on(e,t.text,e.doc.mode,D,function(me,Ie){return U.push(me,Ie)},V,O);for(var te=D.state,oe=function(me){D.baseTokens=U;var Ie=e.state.overlays[me],je=1,qe=0;D.state=!0,on(e,t.text,Ie.mode,D,function(Ze,it){for(var st=je;qeZe&&U.splice(je,1,Ze,U[je+1],mt),je+=2,qe=Math.min(Ze,mt)}if(!it)return;if(Ie.opaque)U.splice(st,je-st,Ze,"overlay "+it),je=st+2;else for(;ste.options.maxHighlightLength&&wr(e.doc.mode,O.state),V=qn(e,t,O);U&&(O.state=U),t.stateAfter=O.save(!U),t.styles=V.styles,V.classes?t.styleClasses=V.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 an(e,t,D){var O=e.doc,U=e.display;if(!O.mode.startState)return new nr(O,!0,t);var V=Jt(e,t,D),te=V>O.first&&ht(O,V-1).stateAfter,oe=te?nr.fromSaved(O,te,V):new nr(O,pt(O.mode),V);return O.iter(V,t,function(ue){ea(e,ue.text,oe);var me=oe.line;ue.stateAfter=me==t-1||me%5==0||me>=U.viewFrom&&met.start)return V}throw new Error("Mode "+e.name+" failed to advance stream.")}var Sr=function(e,t,D){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=D};function Ln(e,t,D,O){var U=e.doc,V=U.mode,te;t=wt(U,t);var oe=ht(U,t.line),ue=an(e,t.line,D),me=new Tt(oe.text,e.options.tabSize,ue),Ie;for(O&&(Ie=[]);(O||me.pose.options.maxHighlightLength?(oe=!1,te&&ea(e,t,O,Ie.pos),Ie.pos=t.length,je=null):je=vn(Cn(D,Ie,O.state,qe),V),qe){var Ze=qe[0].name;Ze&&(je="m-"+(je?Ze+" "+je:Ze))}if(!oe||me!=je){for(;uete;--oe){if(oe<=V.first)return V.first;var ue=ht(V,oe-1),me=ue.stateAfter;if(me&&(!D||oe+(me instanceof sr?me.lookAhead:0)<=V.modeFrontier))return oe;var Ie=F(ue.text,null,e.options.tabSize);(U==null||O>Ie)&&(U=oe-1,O=Ie)}return U}function zr(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontierD;O--){var U=ht(e,O).stateAfter;if(U&&(!(U instanceof sr)||O+U.lookAhead=t:V.to>t);(O||(O=[])).push(new Ir(te,V.from,ue?null:V.to))}}return O}function Ma(e,t,D){var O;if(e)for(var U=0;U=t:V.to>t);if(oe||V.from==t&&te.type=="bookmark"&&(!D||V.marker.insertLeft)){var ue=V.from==null||(te.inclusiveLeft?V.from<=t:V.from0&&oe)for(var At=0;At0)continue;var Ie=[ue,1],je=Ot(me.from,oe.from),qe=Ot(me.to,oe.to);(je<0||!te.inclusiveLeft&&!je)&&Ie.push({from:me.from,to:oe.from}),(qe>0||!te.inclusiveRight&&!qe)&&Ie.push({from:oe.to,to:me.to}),U.splice.apply(U,Ie),ue+=Ie.length-3}return U}function Hr(e){var t=e.markedSpans;if(!t)return;for(var D=0;Dt)&&(!O||_n(O,V.marker)<0)&&(O=V.marker)}return O}function Ca(e,t,D,O,U){var V=ht(e,t),te=kt&&V.markedSpans;if(te)for(var oe=0;oe=0&&je<=0||Ie<=0&&je>=0)continue;if(Ie<=0&&(ue.marker.inclusiveRight&&U.inclusiveLeft?Ot(me.to,D)>=0:Ot(me.to,D)>0)||Ie>=0&&(ue.marker.inclusiveRight&&U.inclusiveLeft?Ot(me.from,O)<=0:Ot(me.from,O)<0))return!0}}function Rt(e){for(var t;t=ga(e);)e=t.find(-1,!0).line;return e}function Kt(e){for(var t;t=ua(e);)e=t.find(1,!0).line;return e}function Bt(e){for(var t,D;t=ua(e);)e=t.find(1,!0).line,(D||(D=[])).push(e);return D}function pr(e,t){var D=ht(e,t),O=Rt(D);return D==O?t:_t(O)}function mr(e,t){if(t>e.lastLine())return t;var D=ht(e,t),O;if(!Pr(e,D))return t;for(;O=ua(D);)D=O.find(1,!0).line;return _t(D)+1}function Pr(e,t){var D=kt&&t.markedSpans;if(D)for(var O=void 0,U=0;Ut.maxLineLength&&(t.maxLineLength=U,t.maxLine=O)})}var Cr=function(e,t,D){this.text=e,Wn(this,t),this.height=D?D(this):1};Cr.prototype.lineNo=function(){return _t(this)},Oe(Cr);function ur(e,t,D,O){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Hr(e),Wn(e,D);var U=O?O(e):1;U!=e.height&&Pt(e,U)}function yn(e){e.parent=null,Hr(e)}var ca={},Kn={};function Ta(e,t){if(!e||/^\s*$/.test(e))return null;var D=t.addModeClass?Kn:ca;return D[e]||(D[e]=e.replace(/\S+/g,"cm-$&"))}function Ya(e,t){var D=I("span",null,null,a?"padding-right: .1px":null),O={pre:I("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 V=U?t.rest[U-1]:t.line,te=void 0;O.pos=0,O.addToken=hi,jt(e.display.measure)&&(te=et(V,e.doc.direction))&&(O.addToken=Ci(O.addToken,te)),O.map=[];var oe=t!=e.display.externalMeasured&&_t(V);ai(V,O,Rn(e,V,oe)),V.styleClasses&&(V.styleClasses.bgClass&&(O.bgClass=H(V.styleClasses.bgClass,O.bgClass||"")),V.styleClasses.textClass&&(O.textClass=H(V.styleClasses.textClass,O.textClass||""))),O.map.length==0&&O.map.push(0,0,O.content.appendChild(Et(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 ue=O.content.lastChild;(/\bcm-tab\b/.test(ue.className)||ue.querySelector&&ue.querySelector(".cm-tab"))&&(O.content.className="cm-tab-wrap-hack")}return He(e,"renderLine",e,t.line,O.pre),O.pre.className&&(O.textClass=H(O.pre.className,O.textClass||"")),O}function Wa(e){var t=_("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function hi(e,t,D,O,U,V,te){if(!t)return;var oe=e.splitSpaces?Ha(t,e.trailingSpace):t,ue=e.cm.state.specialChars,me=!1,Ie;if(!ue.test(t))e.col+=t.length,Ie=document.createTextNode(oe),e.map.push(e.pos,e.pos+t.length,Ie),S&&d<9&&(me=!0),e.pos+=t.length;else{Ie=document.createDocumentFragment();for(var je=0;;){ue.lastIndex=je;var qe=ue.exec(t),Ze=qe?qe.index-je:t.length-je;if(Ze){var it=document.createTextNode(oe.slice(je,je+Ze));S&&d<9?Ie.appendChild(_("span",[it])):Ie.appendChild(it),e.map.push(e.pos,e.pos+Ze,it),e.col+=Ze,e.pos+=Ze}if(!qe)break;je+=Ze+1;var st=void 0;if(qe[0]==" "){var mt=e.cm.options.tabSize,vt=mt-e.col%mt;st=Ie.appendChild(_("span",se(vt),"cm-tab")),st.setAttribute("role","presentation"),st.setAttribute("cm-text"," "),e.col+=vt}else qe[0]=="\r"||qe[0]==` `?(st=Ie.appendChild(_("span",qe[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),st.setAttribute("cm-text",qe[0]),e.col+=1):(st=e.cm.options.specialCharPlaceholder(qe[0]),st.setAttribute("cm-text",qe[0]),S&&d<9?Ie.appendChild(_("span",[st])):Ie.appendChild(st),e.col+=1);e.map.push(e.pos,e.pos+1,st),e.pos++}}if(e.trailingSpace=oe.charCodeAt(t.length-1)==32,D||O||U||me||V||te){var St=D||"";O&&(St+=O),U&&(St+=U);var yt=_("span",[Ie],St,V);if(te)for(var At in te)te.hasOwnProperty(At)&&At!="style"&&At!="class"&&yt.setAttribute(At,te[At]);return e.content.appendChild(yt)}e.content.appendChild(Ie)}function Ha(e,t){if(e.length>1&&!/ /.test(e))return e;for(var D=t,O="",U=0;Ume&&je.from<=me);qe++);if(je.to>=Ie)return e(D,O,U,V,te,oe,ue);e(D,O.slice(0,je.to-me),U,V,null,oe,ue),V=null,O=O.slice(je.to-me),me=je.to}}}function ni(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 ai(e,t,D){var O=e.markedSpans,U=e.text,V=0;if(!O){for(var te=1;teue||dr.collapsed&&Nt.to==ue&&Nt.from==ue)){if(Nt.to!=null&&Nt.to!=ue&&Ze>Nt.to&&(Ze=Nt.to,st=""),dr.className&&(it+=" "+dr.className),dr.css&&(qe=(qe?qe+";":"")+dr.css),dr.startStyle&&Nt.from==ue&&(mt+=" "+dr.startStyle),dr.endStyle&&Nt.to==Ze&&(At||(At=[])).push(dr.endStyle,Nt.to),dr.title&&((St||(St={})).title=dr.title),dr.attributes)for(var ln in dr.attributes)(St||(St={}))[ln]=dr.attributes[ln];dr.collapsed&&(!vt||_n(vt.marker,dr)<0)&&(vt=Nt)}else Nt.from>ue&&Ze>Nt.from&&(Ze=Nt.from)}if(At)for(var Qn=0;Qn=oe)break;for(var Sa=Math.min(oe,Ze);;){if(Ie){var ba=ue+Ie.length;if(!vt){var Fn=ba>Sa?Ie.slice(0,Sa-ue):Ie;t.addToken(t,Fn,je?je+it:it,mt,ue+Fn.length==Ze?st:"",qe,St)}if(ba>=Sa){Ie=Ie.slice(Sa-ue),ue=Sa;break}ue=ba,mt=""}Ie=U.slice(V,V=D[me++]),je=Ta(D[me++],t.cm.options)}}}function pi(e,t,D){this.line=t,this.rest=Bt(t),this.size=this.rest?_t(re(this.rest))-D+1:1,this.node=this.text=null,this.hidden=Pr(e,t)}function _a(e,t,D){for(var O=[],U,V=t;V2&&V.push((ue.bottom+me.top)/2-D.top)}}V.push(D.bottom-D.top)}}function ge(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 ke(e,t){t=Rt(t);var D=_t(t),O=e.display.externalMeasured=new pi(e.doc,t,D);O.lineN=D;var U=O.built=Ya(e,O);return O.text=U.pre,b(e.display.lineMeasure,U.pre),O}function Ne(e,t,D,O){return Ye(e,Fe(e,t),D,O)}function We(e,t){if(t>=e.display.viewFrom&&t=D.lineN&&tt)&&(V=ue-oe,U=V-1,t>=ue&&(te="right")),U!=null){if(O=e[me+2],oe==ue&&D==(O.insertLeft?"left":"right")&&(te=D),D=="left"&&U==0)for(;me&&e[me-2]==e[me-3]&&e[me-1].insertLeft;)O=e[(me-=3)+2],te="left";if(D=="right"&&U==ue-oe)for(;me=0&&!((D=e[U]).left!=D.right);U--);return D}function gt(e,t,D,O){var U=ct(t.map,D,O),V=U.node,te=U.start,oe=U.end,ue=U.collapse,me;if(V.nodeType==3){for(var Ie=0;Ie<4;Ie++){for(;te&&ce(t.line.text.charAt(U.coverStart+te));)--te;for(;U.coverStart+oe0&&(ue=O="right");var je;e.options.lineWrapping&&(je=V.getClientRects()).length>1?me=je[O=="right"?je.length-1:0]:me=V.getBoundingClientRect()}if(S&&d<9&&!te&&(!me||!me.left&&!me.right)){var qe=V.parentNode.getClientRects()[0];qe?me={left:qe.left,right:qe.left+zn(e.display),top:qe.top,bottom:qe.bottom}:me=at}for(var Ze=me.top-t.rect.top,it=me.bottom-t.rect.top,st=(Ze+it)/2,mt=t.view.measure.heights,vt=0;vt=O.text.length?(ue=O.text.length,me="before"):ue<=0&&(ue=0,me="after"),!oe)return te(me=="before"?ue-1:ue,me=="before");function Ie(it,st,mt){var vt=oe[st],St=vt.level==1;return te(mt?it-1:it,St!=mt)}var je=$e(oe,ue,me),qe=Qe,Ze=Ie(ue,je,me=="before");return qe!=null&&(Ze.other=Ie(ue,qe,me!="before")),Ze}function Ft(e,t){var D=0;t=wt(e.doc,t),e.options.lineWrapping||(D=zn(e.display)*t.ch);var O=ht(e.doc,t.line),U=Br(O)+Ua(e.display);return{left:D,right:D,top:U,bottom:U+O.height}}function It(e,t,D,O,U){var V=ot(e,t,D);return V.xRel=U,O&&(V.outside=O),V}function yr(e,t,D){var O=e.doc;if(D+=e.display.viewOffset,D<0)return It(O.first,0,null,-1,-1);var U=Lr(O,D),V=O.first+O.size-1;if(U>V)return It(O.first+O.size-1,ht(O,V).text.length,null,1,1);t<0&&(t=0);for(var te=ht(O,U);;){var oe=mn(e,te,U,t,D),ue=Va(te,oe.ch+(oe.xRel>0||oe.outside>0?1:0));if(!ue)return oe;var me=ue.find(1);if(me.line==U)return me;te=ht(O,U=me.line)}}function Ar(e,t,D,O){O-=rr(t);var U=t.text.length,V=ze(function(te){return Ye(e,D,te-1).bottom<=O},U,0);return U=ze(function(te){return Ye(e,D,te).top>O},V,U),{begin:V,end:U}}function Dt(e,t,D,O){D||(D=Fe(e,t));var U=Or(e,t,Ye(e,D,O),"line").top;return Ar(e,t,D,U)}function Dr(e,t,D,O){return e.bottom<=D?!1:e.top>D?!0:(O?e.left:e.right)>t}function mn(e,t,D,O,U){U-=Br(t);var V=Fe(e,t),te=rr(t),oe=0,ue=t.text.length,me=!0,Ie=et(t,e.doc.direction);if(Ie){var je=(e.options.lineWrapping?Qr:Nr)(e,t,D,V,Ie,O,U);me=je.level!=1,oe=me?je.from:je.to-1,ue=me?je.to:je.from-1}var qe=null,Ze=null,it=ze(function(Ht){var Nt=Ye(e,V,Ht);return Nt.top+=te,Nt.bottom+=te,Dr(Nt,O,U,!1)?(Nt.top<=U&&Nt.left<=O&&(qe=Ht,Ze=Nt),!0):!1},oe,ue),st,mt,vt=!1;if(Ze){var St=O-Ze.left=At.bottom?1:0}return it=we(t.text,it,1),It(D,it,mt,vt,O-st)}function Nr(e,t,D,O,U,V,te){var oe=ze(function(je){var qe=U[je],Ze=qe.level!=1;return Dr(vr(e,ot(D,Ze?qe.to:qe.from,Ze?"before":"after"),"line",t,O),V,te,!0)},0,U.length-1),ue=U[oe];if(oe>0){var me=ue.level!=1,Ie=vr(e,ot(D,me?ue.from:ue.to,me?"after":"before"),"line",t,O);Dr(Ie,V,te,!0)&&Ie.top>te&&(ue=U[oe-1])}return ue}function Qr(e,t,D,O,U,V,te){var oe=Ar(e,t,O,te),ue=oe.begin,me=oe.end;/\s/.test(t.text.charAt(me-1))&&me--;for(var Ie=null,je=null,qe=0;qe=me||Ze.to<=ue)continue;var it=Ze.level!=1,st=Ye(e,O,it?Math.min(me,Ze.to)-1:Math.max(ue,Ze.from)).right,mt=stmt)&&(Ie=Ze,je=mt)}return Ie||(Ie=U[U.length-1]),Ie.fromme&&(Ie={from:Ie.from,to:me,level:Ie.level}),Ie}var Vr;function An(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Vr==null){Vr=_("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Vr.appendChild(document.createTextNode("x")),Vr.appendChild(_("br"));Vr.appendChild(document.createTextNode("x"))}b(e.measure,Vr);var D=Vr.offsetHeight/50;return D>3&&(e.cachedTextHeight=D),E(e.measure),D||1}function zn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=_("span","xxxxxxxxxx"),D=_("pre",[t],"CodeMirror-line-like");b(e.measure,D);var O=t.getBoundingClientRect(),U=(O.right-O.left)/10;return U>2&&(e.cachedCharWidth=U),U||10}function bn(e){for(var t=e.display,D={},O={},U=t.gutters.clientLeft,V=t.gutters.firstChild,te=0;V;V=V.nextSibling,++te){var oe=e.display.gutterSpecs[te].className;D[oe]=V.offsetLeft+V.clientLeft+U,O[oe]=V.clientWidth}return{fixedPos:oa(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:D,gutterWidth:O,wrapperWidth:t.wrapper.clientWidth}}function oa(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Oa(e){var t=An(e.display),D=e.options.lineWrapping,O=D&&Math.max(5,e.display.scroller.clientWidth/zn(e.display)-3);return function(U){if(Pr(e.doc,U))return 0;var V=0;if(U.widgets)for(var te=0;te0&&(me=ht(e.doc,ue.line).text).length==ue.ch){var Ie=F(me,me.length,e.options.tabSize)-me.length;ue=ot(ue.line,Math.max(0,Math.round((V-Ue(e.display).left)/zn(e.display))-Ie))}return ue}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)kt&&pr(e.doc,t)U.viewFrom?gn(e):(U.viewFrom+=O,U.viewTo+=O);else if(t<=U.viewFrom&&D>=U.viewTo)gn(e);else if(t<=U.viewFrom){var V=Aa(e,D,D+O,1);V?(U.view=U.view.slice(V.index),U.viewFrom=V.lineN,U.viewTo+=O):gn(e)}else if(D>=U.viewTo){var te=Aa(e,t,t,-1);te?(U.view=U.view.slice(0,te.index),U.viewTo=te.lineN):gn(e)}else{var oe=Aa(e,t,t,-1),ue=Aa(e,D,D+O,1);oe&&ue?(U.view=U.view.slice(0,oe.index).concat(_a(e,oe.lineN,ue.lineN)).concat(U.view.slice(ue.index)),U.viewTo+=O):gn(e)}var me=U.externalMeasured;me&&(D=U.lineN&&t=O.viewTo)return;var V=O.view[sn(e,t)];if(V.node==null)return;var te=V.changes||(V.changes=[]);ee(te,D)==-1&&te.push(D)}function gn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Aa(e,t,D,O){var U=sn(e,t),V,te=e.display.view;if(!kt||D==e.doc.first+e.doc.size)return{index:U,lineN:D};for(var oe=e.display.viewFrom,ue=0;ue0){if(U==te.length-1)return null;V=oe+te[U].size-t,U++}else V=oe-t;t+=V,D+=V}for(;pr(e.doc,D)!=D;){if(U==(O<0?0:te.length-1))return null;D+=O*te[U-(O<0?1:0)].size,U+=O}return{index:U,lineN:D}}function $a(e,t,D){var O=e.display,U=O.view;U.length==0||t>=O.viewTo||D<=O.viewFrom?(O.view=_a(e,t,D),O.viewFrom=t):(O.viewFrom>t?O.view=_a(e,t,O.viewFrom).concat(O.view):O.viewFromD&&(O.view=O.view.slice(0,sn(e,D)))),O.viewTo=D}function Ja(e){for(var t=e.display.view,D=0,O=0;O=e.display.viewTo||oe.to().line0?t.blinker=setInterval(function(){e.hasFocus()||mi(e),t.cursorDiv.style.visibility=(D=!D)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Co(e){e.state.focused||(e.display.input.focus(),Za(e))}function eo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,mi(e))},100)}function Za(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(He(e,"focus",e,t),e.state.focused=!0,K(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()),Xn(e)}function mi(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(He(e,"blur",e,t),e.state.focused=!1,y(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ki(e){for(var t=e.display,D=t.lineDiv.offsetTop,O=0;O.005||Ie<-.005)&&(Pt(U.line,te),to(U.line),U.rest))for(var je=0;jee.display.sizerWidth){var qe=Math.ceil(oe/zn(e.display));qe>e.display.maxLineLength&&(e.display.maxLineLength=qe,e.display.maxLine=U.line,e.display.maxLineChanged=!0)}}}function to(e){if(e.widgets)for(var t=0;t=te&&(V=Lr(t,Br(ht(t,ue))-e.wrapper.clientHeight),te=ue)}return{from:V,to:Math.max(te,V+1)}}function Vo(e,t){if(Je(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&&!w){var V=_("div","\u200B",null,`position: absolute; top: `+(t.top-D.viewOffset-Ua(e.display))+`px; height: `+(t.bottom-t.top+Ke(e)+D.barHeight)+`px; left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(V),V.scrollIntoView(U),e.display.lineSpace.removeChild(V)}}function Yo(e,t,D,O){O==null&&(O=0);var U;!e.options.lineWrapping&&t==D&&(t=t.ch?ot(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,D=t.sticky=="before"?ot(t.line,t.ch+1,"before"):t);for(var V=0;V<5;V++){var te=!1,oe=vr(e,t),ue=!D||D==t?oe:vr(e,D);U={left:Math.min(oe.left,ue.left),top:Math.min(oe.top,ue.top)-O,right:Math.max(oe.left,ue.left),bottom:Math.max(oe.bottom,ue.bottom)+O};var me=ro(e,U),Ie=e.doc.scrollTop,je=e.doc.scrollLeft;if(me.scrollTop!=null&&(yi(e,me.scrollTop),Math.abs(e.doc.scrollTop-Ie)>1&&(te=!0)),me.scrollLeft!=null&&(Da(e,me.scrollLeft),Math.abs(e.doc.scrollLeft-je)>1&&(te=!0)),!te)break}return U}function _o(e,t){var D=ro(e,t);D.scrollTop!=null&&yi(e,D.scrollTop),D.scrollLeft!=null&&Da(e,D.scrollLeft)}function ro(e,t){var D=e.display,O=An(e.display);t.top<0&&(t.top=0);var U=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:D.scroller.scrollTop,V=fe(e),te={};t.bottom-t.top>V&&(t.bottom=t.top+V);var oe=e.doc.height+Le(D),ue=t.topoe-O;if(t.topU+V){var Ie=Math.min(t.top,(me?oe:t.bottom)-V);Ie!=U&&(te.scrollTop=Ie)}var je=e.options.fixedGutter?0:D.gutters.offsetWidth,qe=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:D.scroller.scrollLeft-je,Ze=Pe(e)-D.gutters.offsetWidth,it=t.right-t.left>Ze;return it&&(t.right=t.left+Ze),t.left<10?te.scrollLeft=0:t.leftZe+qe-3&&(te.scrollLeft=t.right+(it?0:10)-Ze),te}function no(e,t){if(t==null)return;Ni(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function gi(e){Ni(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function vi(e,t,D){(t!=null||D!=null)&&Ni(e),t!=null&&(e.curOp.scrollLeft=t),D!=null&&(e.curOp.scrollTop=D)}function $o(e,t){Ni(e),e.curOp.scrollToPos=t}function Ni(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var D=Ft(e,t.from),O=Ft(e,t.to);Oi(e,D,O,t.margin)}}function Oi(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});vi(e,U.scrollLeft,U.scrollTop)}function yi(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;C||Ri(e,{top:t}),bi(e,t,!0),C&&Ri(e),Di(e,100)}function bi(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 Da(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,br(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function oi(e){var t=e.display,D=t.gutters.offsetWidth,O=Math.round(e.doc.height+Le(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+Ke(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:D}}var qa=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),Ce(O,"scroll",function(){O.clientHeight&&t(O.scrollTop,"vertical")}),Ce(U,"scroll",function(){U.clientWidth&&t(U.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,S&&d<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};qa.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 V=e.viewWidth-e.barLeft-(D?O:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+V)+"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}},qa.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},qa.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},qa.prototype.zeroWidthHack=function(){var e=l&&!m?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new $,this.disableVert=new $},qa.prototype.enableZeroWidthBar=function(e,t,D){e.style.pointerEvents="auto";function O(){var U=e.getBoundingClientRect(),V=D=="vert"?document.elementFromPoint(U.right-1,(U.top+U.bottom)/2):document.elementFromPoint((U.right+U.left)/2,U.bottom-1);V!=e?e.style.pointerEvents="none":t.set(1e3,O)}t.set(1e3,O)},qa.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ai=function(){};Ai.prototype.update=function(){return{bottom:0,right:0}},Ai.prototype.setScrollLeft=function(){},Ai.prototype.setScrollTop=function(){},Ai.prototype.clear=function(){};function si(e,t){t||(t=oi(e));var D=e.display.barWidth,O=e.display.barHeight;ji(e,t);for(var U=0;U<4&&D!=e.display.barWidth||O!=e.display.barHeight;U++)D!=e.display.barWidth&&e.options.lineWrapping&&ki(e),ji(e,oi(e)),D=e.display.barWidth,O=e.display.barHeight}function ji(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 ao={native:qa,null:Ai};function Ui(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&y(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ao[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ce(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"?Da(e,t):yi(e,t)},e),e.display.scrollbars.addClass&&K(e.display.wrapper,e.display.scrollbars.addClass)}var io=0;function ei(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:++io},_i(e.curOp)}function li(e){var t=e.curOp;t&&_r(t,function(D){for(var O=0;O=D.viewTo)||D.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ra(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&ui(e.cm,e.update)}function Zo(e){var t=e.cm,D=t.display;e.updatedDisplay&&ki(t),e.barMeasure=oi(t),D.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ne(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+Ke(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,D.sizer.offsetLeft+e.adjustWidthTo-Pe(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=an(e,t.highlightFrontier),U=[];t.iter(O.line,Math.min(t.first+t.size,e.display.viewTo+500),function(V){if(O.line>=e.display.viewFrom){var te=V.styles,oe=V.text.length>e.options.maxHighlightLength?wr(t.mode,O.state):null,ue=qn(e,V,O,!0);oe&&(O.state=oe),V.styles=ue.styles;var me=V.styleClasses,Ie=ue.classes;Ie?V.styleClasses=Ie:me&&(V.styleClasses=null);for(var je=!te||te.length!=V.styles.length||me!=Ie&&(!me||!Ie||me.bgClass!=Ie.bgClass||me.textClass!=Ie.textClass),qe=0;!je&&qeD)return Di(e,e.options.workDelay),!0}),t.highlightFrontier=O.line,t.modeFrontier=Math.max(t.modeFrontier,O.line),U.length&&fa(e,function(){for(var V=0;V=D.viewFrom&&t.visible.to<=D.viewTo&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo)&&D.renderedView==D.view&&Ja(e)==0)return!1;Vn(e)&&(gn(e),t.dims=bn(e));var U=O.first+O.size,V=Math.max(t.visible.from-e.options.viewportMargin,O.first),te=Math.min(U,t.visible.to+e.options.viewportMargin);D.viewFromte&&D.viewTo-te<20&&(te=Math.min(U,D.viewTo)),kt&&(V=pr(e.doc,V),te=mr(e.doc,te));var oe=V!=D.viewFrom||te!=D.viewTo||D.lastWrapHeight!=t.wrapperHeight||D.lastWrapWidth!=t.wrapperWidth;$a(e,V,te),D.viewOffset=Br(ht(e.doc,D.viewFrom)),e.display.mover.style.top=D.viewOffset+"px";var ue=Ja(e);if(!oe&&ue==0&&!t.force&&D.renderedView==D.view&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo))return!1;var me=Do(e);return ue>4&&(D.lineDiv.style.display="none"),Lo(e,D.updateLineNumbers,t.dims),ue>4&&(D.lineDiv.style.display=""),D.renderedView=D.view,Ro(me),E(D.cursorDiv),E(D.selectionDiv),D.gutters.style.height=D.sizer.style.minHeight=0,oe&&(D.lastWrapHeight=t.wrapperHeight,D.lastWrapWidth=t.wrapperWidth,Di(e,400)),D.updateLineNumbers=null,!0}function Fi(e,t){for(var D=t.viewport,O=!0;;O=!1){if(!O||!e.options.lineWrapping||t.oldDisplayWidth==Pe(e)){if(D&&D.top!=null&&(D={top:Math.min(e.doc.height+Le(e.display)-fe(e),D.top)}),t.visible=Ii(e.display,e.doc,D),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else O&&(t.visible=Ii(e.display,e.doc,D));if(!ui(e,t))break;ki(e);var U=oi(e);Yr(e),si(e,U),Wr(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 Ri(e,t){var D=new Ra(e,t);if(ui(e,D)){ki(e),Fi(e,D);var O=oi(e);Yr(e),si(e,O),Wr(e,O),D.finish()}}function Lo(e,t,D){var O=e.display,U=e.options.lineNumbers,V=O.lineDiv,te=V.firstChild;function oe(it){var st=it.nextSibling;return a&&l&&e.display.currentWheelTarget==it?it.style.display="none":it.parentNode.removeChild(it),st}for(var ue=O.view,me=O.viewFrom,Ie=0;Ie-1&&(Ze=!1),Na(e,je,me,D)),Ze&&(E(je.lineNumber),je.lineNumber.appendChild(document.createTextNode(Mr(e.options,me)))),te=je.node.nextSibling}me+=je.size}for(;te;)te=oe(te)}function Bi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Wr(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+Ke(e)+"px"}function br(e){var t=e.display,D=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var O=oa(t)-t.scroller.scrollLeft+e.doc.scrollLeft,U=t.gutters.offsetWidth,V=O+"px",te=0;tete.clientWidth,ue=te.scrollHeight>te.clientHeight;if(!(O&&oe||U&&ue))return;if(U&&l&&a){e:for(var me=t.target,Ie=V.view;me!=te;me=me.parentNode)for(var je=0;je=0&&Ot(e,O.to())<=0)return D}return-1};var Ur=function(e,t){this.anchor=e,this.head=t};Ur.prototype.from=function(){return dn(this.anchor,this.head)},Ur.prototype.to=function(){return Sn(this.anchor,this.head)},Ur.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function La(e,t,D){var O=e&&e.options.selectionsMayTouch,U=t[D];t.sort(function(qe,Ze){return Ot(qe.from(),Ze.from())}),D=ee(t,U);for(var V=1;V0:ue>=0){var me=dn(oe.from(),te.from()),Ie=Sn(oe.to(),te.to()),je=oe.empty()?te.from()==te.head:oe.from()==oe.head;V<=D&&--D,t.splice(--V,2,new Ur(je?Ie:me,je?me:Ie))}}return new pa(t,D)}function za(e,t){return new pa([new Ur(e,t||e)],0)}function Ga(e){return e.text?ot(e.from.line+e.text.length-1,re(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function uo(e,t){if(Ot(e,t.from)<0)return e;if(Ot(e,t.to)<=0)return Ga(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+=Ga(t).ch-t.to.ch),ot(D,O)}function Hi(e,t){for(var D=[],O=0;O1&&e.remove(oe.line+1,it-1),e.insert(oe.line+1,vt)}ar(e,"change",e,t)}function Ei(e,t,D){function O(U,V,te){if(U.linked)for(var oe=0;oe1&&!e.done[e.done.length-2].ranges)return e.done.pop(),re(e.done)}function xs(e,t,D,O){var U=e.history;U.undone.length=0;var V=+new Date,te,oe;if((U.lastOp==O||U.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&U.lastModTime>V-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(te=ml(U,U.lastOp==O)))oe=re(te.changes),Ot(t.from,t.to)==0&&Ot(t.from,oe.to)==0?oe.to=Ga(t):te.changes.push(rs(e,t));else{var ue=re(U.done);for((!ue||!ue.ranges)&&Io(e.sel,U.done),te={changes:[rs(e,t)],generation:U.generation},U.done.push(te);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=V,U.lastOp=U.lastSelOp=O,U.lastOrigin=U.lastSelOrigin=t.origin,oe||He(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,V=O&&O.origin;D==U.lastSelOp||V&&U.lastSelOrigin==V&&(U.lastModTime==U.lastSelTime&&U.lastOrigin==V||gl(e,V,re(U.done),t))?U.done[U.done.length-1]=t:Io(t,U.done),U.lastSelTime=+new Date,U.lastSelOrigin=V,U.lastSelOp=D,O&&O.clearRedo!==!1&&bs(U.undone)}function Io(e,t){var D=re(t);D&&D.ranges&&D.equals(e)||t.push(e)}function Es(e,t,D,O){var U=t["spans_"+e.id],V=0;e.iter(Math.max(e.first,D),Math.min(e.first+e.size,O),function(te){te.markedSpans&&((U||(U=t["spans_"+e.id]={}))[V]=te.markedSpans),++V})}function yl(e){if(!e)return null;for(var t,D=0;D-1&&(re(oe)[je]=me[je],delete me[je]))}}return O}function ns(e,t,D,O){if(O){var U=e.anchor;if(D){var V=Ot(t,U)<0;V!=Ot(D,U)<0?(U=t,t=D):V!=Ot(t,D)<0&&(t=D)}return new Ur(U,t)}else return new Ur(D||t,t)}function No(e,t,D,O,U){U==null&&(U=e.cm&&(e.cm.display.shift||e.extend)),sa(e,new pa([ns(e.sel.primary(),t,D,U)],0),O)}function Ts(e,t,D){for(var O=[],U=e.cm&&(e.cm.display.shift||e.extend),V=0;V=t.ch:oe.to>t.ch))){if(U&&(He(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(V.markedSpans){--te;continue}else break;if(!ue.atomic)continue;if(D){var je=ue.find(O<0?1:-1),qe=void 0;if((O<0?Ie:me)&&(je=Ds(e,je,-O,je&&je.line==t.line?V:null)),je&&je.line==t.line&&(qe=Ot(je,D))&&(O<0?qe<0:qe>0))return zi(e,je,t,O,U)}var Ze=ue.find(O<0?-1:1);return(O<0?me:Ie)&&(Ze=Ds(e,Ze,O,Ze.line==t.line?V:null)),Ze?zi(e,Ze,t,O,U):null}}return t}function Uo(e,t,D,O,U){var V=O||1,te=zi(e,t,D,V,U)||!U&&zi(e,t,D,V,!0)||zi(e,t,D,-V,U)||!U&&zi(e,t,D,-V,!0);return te||(e.cantEdit=!0,ot(e.first,0))}function Ds(e,t,D,O){return D<0&&t.ch==0?t.line>e.first?wt(e,ot(t.line-1)):null:D>0&&t.ch==(O||ht(e,t.line)).text.length?t.line=0;--U)Ms(e,{from:O[U].from,to:O[U].to,text:U?[""]:t.text,origin:t.origin});else Ms(e,t)}function Ms(e,t){if(t.text.length==1&&t.text[0]==""&&Ot(t.from,t.to)==0)return;var D=Hi(e,t);xs(e,t,D,e.cm?e.cm.curOp.id:NaN),fo(e,t,D,ia(e,t));var O=[];Ei(e,function(U,V){!V&&ee(O,U.history)==-1&&(Ns(U.history,t),O.push(U.history)),fo(U,t,null,ia(U,t))})}function Fo(e,t,D){var O=e.cm&&e.cm.state.suppressEdits;if(O&&!D)return;for(var U=e.history,V,te=e.sel,oe=t=="undo"?U.done:U.undone,ue=t=="undo"?U.undone:U.done,me=0;me=0;--Ze){var it=qe(Ze);if(it)return it.v}}function Ps(e,t){if(t==0)return;if(e.first+=t,e.sel=new pa(be(e.sel.ranges,function(U){return new Ur(ot(U.anchor.line+t,U.anchor.ch),ot(U.head.line+t,U.head.ch))}),e.sel.primIndex),e.cm){Zr(e.cm,e.first,e.first-t,t);for(var D=e.cm.display,O=D.viewFrom;Oe.lastLine())return;if(t.from.lineV&&(t={from:t.from,to:ot(V,ht(e,V).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Tr(e,t.from,t.to),D||(D=Hi(e,t)),e.cm?El(e.cm,t,O):ts(e,t,O),jo(e,D,he),e.cantEdit&&Uo(e,ot(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,t,D){var O=e.doc,U=e.display,V=t.from,te=t.to,oe=!1,ue=V.line;e.options.lineWrapping||(ue=_t(Rt(ht(O,V.line))),O.iter(ue,te.line+1,function(Ze){if(Ze==U.maxLine)return oe=!0,!0})),O.sel.contains(t.from,t.to)>-1&&_e(e),ts(O,t,D,Oa(e)),e.options.lineWrapping||(O.iter(ue,V.line+t.text.length,function(Ze){var it=tn(Ze);it>U.maxLineLength&&(U.maxLine=Ze,U.maxLineLength=it,U.maxLineChanged=!0,oe=!1)}),oe&&(e.curOp.updateMaxLine=!0)),zr(O,V.line),Di(e,400);var me=t.text.length-(te.line-V.line)-1;t.full?Zr(e):V.line==te.line&&t.text.length==1&&!gs(e.doc,t)?xn(e,V.line,"text"):Zr(e,V.line,te.line+1,me);var Ie=Se(e,"changes"),je=Se(e,"change");if(je||Ie){var qe={from:V,to:te,text:t.text,removed:t.removed,origin:t.origin};je&&ar(e,"change",e,qe),Ie&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(qe)}e.display.selForContextMenu=null}function Xi(e,t,D,O,U){var V;O||(O=D),Ot(O,D)<0&&(V=[O,D],D=V[0],O=V[1]),typeof t=="string"&&(t=e.splitLines(t)),Gi(e,{from:D,to:O,text:t,origin:U})}function ks(e,t,D,O){D1||!(this.children[0]instanceof po))){var oe=[];this.collapse(oe),this.children=[new po(oe)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var te=U.lines.length%25+25,oe=te;oe10);e.parent.maybeSpill()},iterN:function(e,t,D){for(var O=0;Oe.display.maxLineLength&&(e.display.maxLine=me,e.display.maxLineLength=Ie,e.display.maxLineChanged=!0)}O!=null&&e&&this.collapsed&&Zr(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&&ar(e,"markerCleared",e,this,O,U),t&&li(e),this.parent&&this.parent.clear()},wi.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var D,O,U=0;U0||te==0&&V.clearWhenEmpty!==!1)return V;if(V.replacedWith&&(V.collapsed=!0,V.widgetNode=I("span",[V.replacedWith],"CodeMirror-widget"),O.handleMouseEvents||V.widgetNode.setAttribute("cm-ignore-events","true"),O.insertLeft&&(V.widgetNode.insertLeft=!0)),V.collapsed){if(Ca(e,t.line,t,D,V)||t.line!=D.line&&Ca(e,D.line,t,D,V))throw new Error("Inserting collapsed marker partially overlapping an existing one");hr()}V.addToHistory&&xs(e,{from:t,to:D,origin:"markText"},e.sel,NaN);var oe=t.line,ue=e.cm,me;if(e.iter(oe,D.line+1,function(je){ue&&V.collapsed&&!ue.options.lineWrapping&&Rt(je)==ue.display.maxLine&&(me=!0),V.collapsed&&oe!=t.line&&Pt(je,0),Ba(je,new Ir(V,oe==t.line?t.ch:null,oe==D.line?D.ch:null)),++oe}),V.collapsed&&e.iter(t.line,D.line+1,function(je){Pr(e,je)&&Pt(je,0)}),V.clearOnEnter&&Ce(V,"beforeCursorEnter",function(){return V.clear()}),V.readOnly&&(Qt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),V.collapsed&&(V.id=++Us,V.atomic=!0),ue){if(me&&(ue.curOp.updateMaxLine=!0),V.collapsed)Zr(ue,t.line,D.line+1);else if(V.className||V.startStyle||V.endStyle||V.css||V.attributes||V.title)for(var Ie=t.line;Ie<=D.line;Ie++)xn(ue,Ie,"text");V.atomic&&Os(ue.doc),ar(ue,"markerAdded",ue,V)}return V}var vo=function(e,t){this.markers=e,this.primary=t;for(var D=0;D=0;ue--)Gi(this,O[ue]);oe?Cs(this,oe):this.cm&&gi(this.cm)}),undo:In(function(){Fo(this,"undo")}),redo:In(function(){Fo(this,"redo")}),undoSelection:In(function(){Fo(this,"undo",!0)}),redoSelection:In(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=wt(this,e),t=wt(this,t);var O=[],U=e.line;return this.iter(e.line,t.line+1,function(V){var te=V.markedSpans;if(te)for(var oe=0;oe=ue.to||ue.from==null&&U!=e.line||ue.from!=null&&U==t.line&&ue.from>=t.ch)&&(!D||D(ue.marker))&&O.push(ue.marker.parent||ue.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-=V,++D}),wt(this,ot(D,t))},indexFromPos:function(e){e=wt(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 Ie=e.dataTransfer.getData("Text");if(Ie){var je;if(t.state.draggingText&&!t.state.draggingText.copy&&(je=t.listSelections()),jo(t.doc,za(D,D)),je)for(var qe=0;qe=0;oe--)Xi(e.doc,"",O[oe].from,O[oe].to,"+delete");gi(e)})}function is(e,t,D){var O=we(e.text,t+D,D);return O<0||O>e.text.length?null:O}function os(e,t,D){var O=is(e,t.ch,D);return O==null?null:new ot(t.line,O,D<0?"after":"before")}function ss(e,t,D,O,U){if(e){t.doc.direction=="rtl"&&(U=-U);var V=et(D,t.doc.direction);if(V){var te=U<0?re(V):V[0],oe=U<0==(te.level==1),ue=oe?"after":"before",me;if(te.level>0||t.doc.direction=="rtl"){var Ie=Fe(t,D);me=U<0?D.text.length-1:0;var je=Ye(t,Ie,me).top;me=ze(function(qe){return Ye(t,Ie,qe).top==je},U<0==(te.level==1)?te.from:te.to-1,me),ue=="before"&&(me=is(D,me,1))}else me=U<0?te.to:te.from;return new ot(O,me,ue)}}return new ot(O,U<0?D.text.length:0,U<0?"before":"after")}function Il(e,t,D,O){var U=et(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 V=$e(U,D.ch,D.sticky),te=U[V];if(e.doc.direction=="ltr"&&te.level%2==0&&(O>0?te.to>D.ch:te.from=te.from&&qe>=Ie.begin)){var Ze=je?"before":"after";return new ot(D.line,qe,Ze)}}var it=function(vt,St,yt){for(var At=function(ln,Qn){return Qn?new ot(D.line,oe(ln,1),"before"):new ot(D.line,ln,"after")};vt>=0&&vt0==(Ht.level!=1),dr=Nt?yt.begin:oe(yt.end,-1);if(Ht.from<=dr&&dr0?Ie.end:oe(Ie.begin,-1);return mt!=null&&!(O>0&&mt==t.text.length)&&(st=it(O>0?0:U.length-1,O,me(mt)),st)?st:null}var xo={selectAll:Rs,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),he)},killLine:function(e){return $i(e,function(t){if(t.empty()){var D=ht(e.doc,t.head.line).text.length;return t.head.ch==D&&t.head.line0)U=new ot(U.line,U.ch+1),e.replaceRange(V.charAt(U.ch-1)+V.charAt(U.ch-2),ot(U.line,U.ch-2),U,"+transpose");else if(U.line>e.doc.first){var te=ht(e.doc,U.line-1).text;te&&(U=new ot(U.line,1),e.replaceRange(V.charAt(0)+e.doc.lineSeparator()+te.charAt(te.length-1),ot(U.line-1,te.length-1),U,"+transpose"))}}D.push(new Ur(U,U))}e.setSelections(D)})},newlineAndIndent:function(e){return fa(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&&Ot(t,this.pos)==0&&D==this.button};var wo,To;function Hl(e,t){var D=+new Date;return To&&To.compare(D,e,t)?(wo=To=null,"triple"):wo&&wo.compare(D,e,t)?(To=new us(D,e,t),wo=null,"double"):(wo=new us(D,e,t),To=null,"single")}function tl(e){var t=this,D=t.display;if(Je(t,e)||D.activeTouch&&D.input.supportsTouch())return;if(D.input.ensurePolled(),D.shift=e.shiftKey,Un(D,e)){a||(D.scroller.draggable=!1,setTimeout(function(){return D.scroller.draggable=!0},100));return}if(cs(t,e))return;var O=Gn(t,e),U=Xe(e),V=O?Hl(O,U):"single";if(window.focus(),U==1&&t.state.selectingText&&t.state.selectingText(e),O&&Kl(t,U,O,V,e))return;U==1?O?Gl(t,O,V,e):Be(e)==D.scroller&&de(e):U==2?(O&&No(t.doc,O),setTimeout(function(){return D.input.focus()},20)):U==3&&(L?t.display.input.onContextMenu(e):eo(t))}function Kl(e,t,D,O,U){var V="Click";return O=="double"?V="Double"+V:O=="triple"&&(V="Triple"+V),V=(t==1?"Left":t==2?"Middle":"Right")+V,Eo(e,Gs(V,U),U,function(te){if(typeof te=="string"&&(te=xo[te]),!te)return!1;var oe=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),oe=te(e,D)!=ve}finally{e.state.suppressEdits=!1}return oe})}function zl(e,t,D){var O=e.getOption("configureMouse"),U=O?O(e,t,D):{};if(U.unit==null){var V=c?D.shiftKey&&D.metaKey:D.altKey;U.unit=V?"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=l?D.metaKey:D.ctrlKey),U.moveOnDrag==null&&(U.moveOnDrag=!(l?D.altKey:D.ctrlKey)),U}function Gl(e,t,D,O){S?setTimeout(B(Co,e),0):e.curOp.focus=G();var U=zl(e,D,O),V=e.doc.sel,te;e.options.dragDrop&&nt&&!e.isReadOnly()&&D=="single"&&(te=V.contains(t))>-1&&(Ot((te=V.ranges[te]).from(),t)<0||t.xRel>0)&&(Ot(te.to(),t)>0||t.xRel<0)?Xl(e,O,t,U):Vl(e,O,t,U)}function Xl(e,t,D,O){var U=e.display,V=!1,te=kn(e,function(me){a&&(U.scroller.draggable=!1),e.state.draggingText=!1,tt(U.wrapper.ownerDocument,"mouseup",te),tt(U.wrapper.ownerDocument,"mousemove",oe),tt(U.scroller,"dragstart",ue),tt(U.scroller,"drop",te),V||(de(me),O.addNew||No(e.doc,D,null,null,O.extend),a&&!g||S&&d==9?setTimeout(function(){U.wrapper.ownerDocument.body.focus({preventScroll:!0}),U.input.focus()},20):U.input.focus())}),oe=function(me){V=V||Math.abs(t.clientX-me.clientX)+Math.abs(t.clientY-me.clientY)>=10},ue=function(){return V=!0};a&&(U.scroller.draggable=!0),e.state.draggingText=te,te.copy=!O.moveOnDrag,U.scroller.dragDrop&&U.scroller.dragDrop(),Ce(U.wrapper.ownerDocument,"mouseup",te),Ce(U.wrapper.ownerDocument,"mousemove",oe),Ce(U.scroller,"dragstart",ue),Ce(U.scroller,"drop",te),eo(e),setTimeout(function(){return U.input.focus()},20)}function rl(e,t,D){if(D=="char")return new Ur(t,t);if(D=="word")return e.findWordAt(t);if(D=="line")return new Ur(ot(t.line,0),wt(e.doc,ot(t.line+1,0)));var O=D(e,t);return new Ur(O.from,O.to)}function Vl(e,t,D,O){var U=e.display,V=e.doc;de(t);var te,oe,ue=V.sel,me=ue.ranges;if(O.addNew&&!O.extend?(oe=V.sel.contains(D),oe>-1?te=me[oe]:te=new Ur(D,D)):(te=V.sel.primary(),oe=V.sel.primIndex),O.unit=="rectangle")O.addNew||(te=new Ur(D,D)),D=Gn(e,t,!0,!0),oe=-1;else{var Ie=rl(e,D,O.unit);O.extend?te=ns(te,Ie.anchor,Ie.head,O.extend):te=Ie}O.addNew?oe==-1?(oe=me.length,sa(V,La(e,me.concat([te]),oe),{scroll:!1,origin:"*mouse"})):me.length>1&&me[oe].empty()&&O.unit=="char"&&!O.extend?(sa(V,La(e,me.slice(0,oe).concat(me.slice(oe+1)),0),{scroll:!1,origin:"*mouse"}),ue=V.sel):as(V,oe,te,le):(oe=0,sa(V,new pa([te],0),le),ue=V.sel);var je=D;function qe(yt){if(Ot(je,yt)==0)return;if(je=yt,O.unit=="rectangle"){for(var At=[],Ht=e.options.tabSize,Nt=F(ht(V,D.line).text,D.ch,Ht),dr=F(ht(V,yt.line).text,yt.ch,Ht),ln=Math.min(Nt,dr),Qn=Math.max(Nt,dr),wn=Math.min(D.line,yt.line),Sa=Math.min(e.lastLine(),Math.max(D.line,yt.line));wn<=Sa;wn++){var ba=ht(V,wn).text,Fn=xe(ba,ln,Ht);ln==Qn?At.push(new Ur(ot(wn,Fn),ot(wn,Fn))):ba.length>Fn&&At.push(new Ur(ot(wn,Fn),ot(wn,xe(ba,Qn,Ht))))}At.length||At.push(new Ur(D,D)),sa(V,La(e,ue.ranges.slice(0,oe).concat(At),oe),{origin:"*mouse",scroll:!1}),e.scrollIntoView(yt)}else{var xa=te,na=rl(e,yt,O.unit),$n=xa.anchor,Bn;Ot(na.anchor,$n)>0?(Bn=na.head,$n=dn(xa.from(),na.anchor)):(Bn=na.anchor,$n=Sn(xa.to(),na.head));var Dn=ue.ranges.slice(0);Dn[oe]=Yl(e,new Ur(wt(V,$n),Bn)),sa(V,La(e,Dn,oe),le)}}var Ze=U.wrapper.getBoundingClientRect(),it=0;function st(yt){var At=++it,Ht=Gn(e,yt,!0,O.unit=="rectangle");if(!Ht)return;if(Ot(Ht,je)!=0){e.curOp.focus=G(),qe(Ht);var Nt=Ii(U,V);(Ht.line>=Nt.to||Ht.lineZe.bottom?20:0;dr&&setTimeout(kn(e,function(){if(it!=At)return;U.scroller.scrollTop+=dr,st(yt)}),50)}}function mt(yt){e.state.selectingText=!1,it=Infinity,yt&&(de(yt),U.input.focus()),tt(U.wrapper.ownerDocument,"mousemove",vt),tt(U.wrapper.ownerDocument,"mouseup",St),V.history.lastSelOrigin=null}var vt=kn(e,function(yt){yt.buttons===0||!Xe(yt)?mt(yt):st(yt)}),St=kn(e,mt);e.state.selectingText=St,Ce(U.wrapper.ownerDocument,"mousemove",vt),Ce(U.wrapper.ownerDocument,"mouseup",St)}function Yl(e,t){var D=t.anchor,O=t.head,U=ht(e.doc,D.line);if(Ot(D,O)==0&&D.sticky==O.sticky)return t;var V=et(U);if(!V)return t;var te=$e(V,D.ch,D.sticky),oe=V[te];if(oe.from!=D.ch&&oe.to!=D.ch)return t;var ue=te+(oe.from==D.ch==(oe.level!=1)?0:1);if(ue==0||ue==V.length)return t;var me;if(O.line!=D.line)me=(O.line-D.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Ie=$e(V,O.ch,O.sticky),je=Ie-te||(O.ch-D.ch)*(oe.level==1?-1:1);Ie==ue-1||Ie==ue?me=je<0:me=je>0}var qe=V[ue+(me?-1:0)],Ze=me==(qe.level==1),it=Ze?qe.from:qe.to,st=Ze?"after":"before";return D.ch==it&&D.sticky==st?t:new Ur(new ot(D.line,it,st),O)}function nl(e,t,D,O){var U,V;if(t.touches)U=t.touches[0].clientX,V=t.touches[0].clientY;else try{U=t.clientX,V=t.clientY}catch(qe){return!1}if(U>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;O&&de(t);var te=e.display,oe=te.lineDiv.getBoundingClientRect();if(V>oe.bottom||!Se(e,D))return Ee(t);V-=oe.top-te.viewOffset;for(var ue=0;ue=U){var Ie=Lr(e.doc,V),je=e.display.gutterSpecs[ue];return He(e,D,e,Ie,je.className,t),Ee(t)}}}function cs(e,t){return nl(e,t,"gutterClick",!0)}function al(e,t){if(Un(e.display,t)||$l(e,t))return;if(Je(e,t,"contextmenu"))return;L||e.display.input.onContextMenu(t)}function $l(e,t){return Se(e,"gutterContextMenu")?nl(e,t,"gutterContextMenu",!1):!1}function il(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),tr(e)}var Ji={toString:function(){return"CodeMirror.Init"}},ol={},Ko={};function Jl(e){var t=e.optionHandlers;function D(O,U,V,te){e.defaults[O]=U,V&&(t[O]=te?function(oe,ue,me){me!=Ji&&V(oe,ue,me)}:V)}e.defineOption=D,e.Init=Ji,D("value","",function(O,U){return O.setValue(U)},!0),D("mode",null,function(O,U){O.doc.modeOption=U,ci(O)},!0),D("indentUnit",2,ci,!0),D("indentWithTabs",!1),D("smartIndent",!0),D("tabSize",4,function(O){co(O),tr(O),Zr(O)},!0),D("lineSeparator",null,function(O,U){if(O.doc.lineSep=U,!U)return;var V=[],te=O.doc.first;O.doc.iter(function(ue){for(var me=0;;){var Ie=ue.text.indexOf(U,me);if(Ie==-1)break;me=Ie+U.length,V.push(ot(te,Ie))}te++});for(var oe=V.length-1;oe>=0;oe--)Xi(O.doc,U,V[oe],ot(V[oe].line,V[oe].ch+U.length))}),D("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(O,U,V){O.state.specialChars=new RegExp(U.source+(U.test(" ")?"":"| "),"g"),V!=Ji&&O.refresh()}),D("specialCharPlaceholder",Wa,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){il(O),Ka(O)},!0),D("keyMap","default",function(O,U,V){var te=Wo(U),oe=V!=Ji&&Wo(V);oe&&oe.detach&&oe.detach(O,te),te.attach&&te.attach(O,oe||null)}),D("extraKeys",null),D("configureMouse",null),D("lineWrapping",!1,Zl,!0),D("gutters",[],function(O,U){O.display.gutterSpecs=ha(U,O.options.lineNumbers),Ka(O)},!0),D("fixedGutter",!0,function(O,U){O.display.gutters.style.left=U?oa(O.display)+"px":"0",O.refresh()},!0),D("coverGutterNextToScrollbar",!1,function(O){return si(O)},!0),D("scrollbarStyle","native",function(O){Ui(O),si(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=ha(O.options.gutters,U),Ka(O)},!0),D("firstLineNumber",1,Ka,!0),D("lineNumberFormatter",function(O){return O},Ka,!0),D("showCursorWhenSelecting",!1,Yr,!0),D("resetSelectionOnContextMenu",!0),D("lineWiseCopyCut",!0),D("pasteLinesPerSelection",!0),D("selectionsMayTouch",!1),D("readOnly",!1,function(O,U){U=="nocursor"&&(mi(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,Yr,!0),D("singleCursorHeightPerLine",!0,Yr,!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!=Ji;if(!t!=!O){var U=e.display.dragFunctions,V=t?Ce:tt;V(e.display.scroller,"dragstart",U.start),V(e.display.scroller,"dragenter",U.enter),V(e.display.scroller,"dragover",U.over),V(e.display.scroller,"dragleave",U.leave),V(e.display.scroller,"drop",U.drop)}}function Zl(e){e.options.lineWrapping?(K(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(y(e.display.wrapper,"CodeMirror-wrap"),Hn(e)),da(e),Zr(e),tr(e),setTimeout(function(){return si(e)},100)}function En(e,t){var D=this;if(!(this instanceof En))return new En(e,t);this.options=t=t?W(t):{},W(ol,t,!1);var O=t.value;typeof O=="string"?O=new ya(O,t.mode,null,t.lineSeparator,t.direction):t.mode&&(O.modeOption=t.mode),this.doc=O;var U=new En.inputStyles[t.inputStyle](this),V=this.display=new Li(e,O,U,t);V.wrapper.CodeMirror=this,il(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ui(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 $,keySeq:null,specialChars:null},t.autofocus&&!n&&V.input.focus(),S&&d<11&&setTimeout(function(){return D.display.input.reset(!0)},20),ql(this),Rl(),ei(this),this.curOp.forceUpdate=!0,vs(this,O),t.autofocus&&!n||this.hasFocus()?setTimeout(function(){D.hasFocus()&&!D.state.focused&&Za(D)},20):mi(this);for(var te in Ko)Ko.hasOwnProperty(te)&&Ko[te](this,t[te],Ji);Vn(this),t.finishInit&&t.finishInit(this);for(var oe=0;oe20*20}Ce(t.scroller,"touchstart",function(ue){if(!Je(e,ue)&&!V(ue)&&!cs(e,ue)){t.input.ensurePolled(),clearTimeout(D);var me=+new Date;t.activeTouch={start:me,moved:!1,prev:me-O.end<=300?O:null},ue.touches.length==1&&(t.activeTouch.left=ue.touches[0].pageX,t.activeTouch.top=ue.touches[0].pageY)}}),Ce(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),Ce(t.scroller,"touchend",function(ue){var me=t.activeTouch;if(me&&!Un(t,ue)&&me.left!=null&&!me.moved&&new Date-me.start<300){var Ie=e.coordsChar(t.activeTouch,"page"),je;!me.prev||te(me,me.prev)?je=new Ur(Ie,Ie):!me.prev.prev||te(me,me.prev.prev)?je=e.findWordAt(Ie):je=new Ur(ot(Ie.line,0),wt(e.doc,ot(Ie.line+1,0))),e.setSelection(je.anchor,je.head),e.focus(),de(ue)}U()}),Ce(t.scroller,"touchcancel",U),Ce(t.scroller,"scroll",function(){t.scroller.clientHeight&&(yi(e,t.scroller.scrollTop),Da(e,t.scroller.scrollLeft,!0),He(e,"scroll",e))}),Ce(t.scroller,"mousewheel",function(ue){return lo(e,ue)}),Ce(t.scroller,"DOMMouseScroll",function(ue){return lo(e,ue)}),Ce(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(ue){Je(e,ue)||De(ue)},over:function(ue){Je(e,ue)||(Dl(e,ue),De(ue))},start:function(ue){return Al(e,ue)},drop:kn(e,Ol),leave:function(ue){Je(e,ue)||Ws(e)}};var oe=t.input.getField();Ce(oe,"keyup",function(ue){return Zs.call(e,ue)}),Ce(oe,"keydown",kn(e,Qs)),Ce(oe,"keypress",kn(e,el)),Ce(oe,"focus",function(ue){return Za(e,ue)}),Ce(oe,"blur",function(ue){return mi(e,ue)})}var ds=[];En.defineInitHook=function(e){return ds.push(e)};function So(e,t,D,O){var U=e.doc,V;D==null&&(D="add"),D=="smart"&&(U.mode.indent?V=an(e,t).state:D="prev");var te=e.options.tabSize,oe=ht(U,t),ue=F(oe.text,null,te);oe.stateAfter&&(oe.stateAfter=null);var me=oe.text.match(/^\s*/)[0],Ie;if(!O&&!/\S/.test(oe.text))Ie=0,D="not";else if(D=="smart"&&(Ie=U.mode.indent(V,oe.text.slice(me.length),oe.text),Ie==ve||Ie>150)){if(!O)return;D="prev"}D=="prev"?t>U.first?Ie=F(ht(U,t-1).text,null,te):Ie=0:D=="add"?Ie=ue+e.options.indentUnit:D=="subtract"?Ie=ue-e.options.indentUnit:typeof D=="number"&&(Ie=ue+D),Ie=Math.max(0,Ie);var je="",qe=0;if(e.options.indentWithTabs)for(var Ze=Math.floor(Ie/te);Ze;--Ze)qe+=te,je+=" ";if(qete,ue=Ct(t),me=null;if(oe&&O.ranges.length>1)if(Xa&&Xa.text.join(` `)==t){if(O.ranges.length%Xa.text.length==0){me=[];for(var Ie=0;Ie=0;qe--){var Ze=O.ranges[qe],it=Ze.from(),st=Ze.to();Ze.empty()&&(D&&D>0?it=ot(it.line,it.ch-D):e.state.overwrite&&!oe?st=ot(st.line,Math.min(ht(V,st.line).text.length,st.ch+re(ue).length)):oe&&Xa&&Xa.lineWise&&Xa.text.join(` `)==ue.join(` `)&&(it=st=ot(it.line,0)));var mt={from:it,to:st,text:me?me[qe%me.length]:ue,origin:U||(oe?"paste":e.state.cutIncoming>te?"cut":"+input")};Gi(e.doc,mt),ar(e,"inputRead",e,mt)}t&&!oe&&ll(e,t),gi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=je),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&&fa(t,function(){return fs(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 V=e.getModeAt(U.head),te=!1;if(V.electricChars){for(var oe=0;oe-1){te=So(e,U.head.line,"smart");break}}else V.electricInput&&(V.electricInput.test(ht(e.doc,U.head.line).text.slice(0,U.head.ch))&&(te=So(e,U.head.line,"smart")));te&&ar(e,"electricInput",e,U.head.line)}}function ul(e){for(var t=[],D=[],O=0;OV&&(So(this,oe.head.line,O,!0),V=oe.head.line,te==this.doc.sel.primIndex&&gi(this));else{var ue=oe.from(),me=oe.to(),Ie=Math.max(V,ue.line);V=Math.min(this.lastLine(),me.line-(me.ch?0:1))+1;for(var je=Ie;je0&&as(this.doc,te,new Ur(ue,qe[te].to()),he)}}}),getTokenAt:function(O,U){return Ln(this,O,U)},getLineTokens:function(O,U){return Ln(this,ot(O),U,!0)},getTokenTypeAt:function(O){O=wt(this.doc,O);var U=Rn(this,ht(this.doc,O.line)),V=0,te=(U.length-1)/2,oe=O.ch,ue;if(oe==0)ue=U[2];else for(;;){var me=V+te>>1;if((me?U[me*2-1]:0)>=oe)te=me;else if(U[me*2+1]ue&&(O=ue,te=!0),oe=ht(this.doc,O)}else oe=O;return Or(this,oe,{top:0,left:0},U||"page",V||te).top+(te?this.doc.height-Br(oe):0)},defaultTextHeight:function(){return An(this.display)},defaultCharWidth:function(){return zn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(O,U,V,te,oe){var ue=this.display;O=vr(this,wt(this.doc,O));var me=O.bottom,Ie=O.left;if(U.style.position="absolute",U.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(U),ue.sizer.appendChild(U),te=="over")me=O.top;else if(te=="above"||te=="near"){var je=Math.max(ue.wrapper.clientHeight,this.doc.height),qe=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(te=="above"||O.bottom+U.offsetHeight>je)&&O.top>U.offsetHeight?me=O.top-U.offsetHeight:O.bottom+U.offsetHeight<=je&&(me=O.bottom),Ie+U.offsetWidth>qe&&(Ie=qe-U.offsetWidth)}U.style.top=me+"px",U.style.left=U.style.right="",oe=="right"?(Ie=ue.sizer.clientWidth-U.offsetWidth,U.style.right="0px"):(oe=="left"?Ie=0:oe=="middle"&&(Ie=(ue.sizer.clientWidth-U.offsetWidth)/2),U.style.left=Ie+"px"),V&&_o(this,{left:Ie,top:me,right:Ie+U.offsetWidth,bottom:me+U.offsetHeight})},triggerOnKeyDown:ra(Qs),triggerOnKeyPress:ra(el),triggerOnKeyUp:Zs,triggerOnMouseDown:ra(tl),execCommand:function(O){if(xo.hasOwnProperty(O))return xo[O].call(null,this)},triggerElectric:ra(function(O){ll(this,O)}),findPosH:function(O,U,V,te){var oe=1;U<0&&(oe=-1,U=-U);for(var ue=wt(this.doc,O),me=0;me0&&Ie(V.charAt(te-1));)--te;for(;oe.5||this.options.lineWrapping)&&da(this),He(this,"refresh",this)}),swapDoc:ra(function(O){var U=this.doc;return U.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,O),tr(this),this.display.input.reset(),vi(this,O.scrollLeft,O.scrollTop),this.curOp.forceScroll=!0,ar(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}},Oe(e),e.registerHelper=function(O,U,V){D.hasOwnProperty(O)||(D[O]=e[O]={_global:[]}),D[O][U]=V},e.registerGlobalHelper=function(O,U,V,te){e.registerHelper(O,U,te),D[O]._global.push({pred:V,val:te})}}function hs(e,t,D,O,U){var V=t,te=D,oe=ht(e,t.line),ue=U&&e.direction=="rtl"?-D:D;function me(){var St=t.line+ue;return St=e.first+e.size?!1:(t=new ot(St,t.ch,t.sticky),oe=ht(e,St))}function Ie(St){var yt;if(O=="codepoint"){var At=oe.text.charCodeAt(t.ch+(O>0?0:-1));isNaN(At)?yt=null:yt=new ot(t.line,Math.max(0,Math.min(oe.text.length,t.ch+D*(At>=55296&&At<56320?2:1))),-D)}else U?yt=Il(e.cm,oe,t,D):yt=os(oe,t,D);if(yt==null)if(!St&&me())t=ss(U,e.cm,oe,t.line,ue);else return!1;else t=yt;return!0}if(O=="char"||O=="codepoint")Ie();else if(O=="column")Ie(!0);else if(O=="word"||O=="group")for(var je=null,qe=O=="group",Ze=e.cm&&e.cm.getHelper(t,"wordChars"),it=!0;!(D<0&&!Ie(!it));it=!1){var st=oe.text.charAt(t.ch)||` `,mt=X(st,Ze)?"w":qe&&st==` `?"n":!qe||/\s/.test(st)?null:"p";if(qe&&!it&&!mt&&(mt="s"),je&&je!=mt){D<0&&(D=1,Ie(),t.sticky="after");break}if(mt&&(je=mt),D>0&&!Ie(!it))break}var vt=Uo(e,t,V,te,!0);return lt(V,vt)&&(vt.hitSide=!0),vt}function fl(e,t,D,O){var U=e.doc,V=t.left,te;if(O=="page"){var oe=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(oe-.5*An(e.display),3);te=(D>0?t.bottom:t.top)+D*ue}else O=="line"&&(te=D>0?t.bottom+3:t.top-3);for(var me;!(me=yr(e,V,te),!me.outside);){if(D<0?te<=0:te>=U.height){me.hitSide=!0;break}te+=D*5}return me}var qr=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new $,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};qr.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 V(oe){for(var ue=oe.target;ue;ue=ue.parentNode){if(ue==U)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ue.className))break}return!1}Ce(U,"paste",function(oe){if(!V(oe)||Je(O,oe)||sl(oe,O))return;d<=11&&setTimeout(kn(O,function(){return t.updateFromDOM()}),20)}),Ce(U,"compositionstart",function(oe){t.composing={data:oe.data,done:!1}}),Ce(U,"compositionupdate",function(oe){t.composing||(t.composing={data:oe.data,done:!1})}),Ce(U,"compositionend",function(oe){t.composing&&(oe.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),Ce(U,"touchstart",function(){return D.forceCompositionEnd()}),Ce(U,"input",function(){t.composing||t.readFromDOMSoon()});function te(oe){if(!V(oe)||Je(O,oe))return;if(O.somethingSelected())zo({lineWise:!1,text:O.getSelections()}),oe.type=="cut"&&O.replaceSelection("",null,"cut");else if(O.options.lineWiseCopyCut){var ue=ul(O);zo({lineWise:!0,text:ue.text}),oe.type=="cut"&&O.operation(function(){O.setSelections(ue.ranges,0,he),O.replaceSelection("",null,"cut")})}else return;if(oe.clipboardData){oe.clipboardData.clearData();var me=Xa.text.join(` `);if(oe.clipboardData.setData("Text",me),oe.clipboardData.getData("Text")==me){oe.preventDefault();return}}var Ie=dl(),je=Ie.firstChild;O.display.lineSpace.insertBefore(Ie,O.display.lineSpace.firstChild),je.value=Xa.text.join(` `);var qe=document.activeElement;z(je),setTimeout(function(){O.display.lineSpace.removeChild(Ie),qe.focus(),qe==U&&D.showPrimarySelection()},50)}Ce(U,"copy",te),Ce(U,"cut",te)},qr.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},qr.prototype.prepareSelection=function(){var e=Fa(this.cm,!1);return e.focus=document.activeElement==this.div,e},qr.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},qr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},qr.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&&hl(t,O)||{node:oe[0].measure.map[2],offset:0},me=U.linee.firstLine()&&(O=ot(O.line-1,ht(e.doc,O.line-1).length)),U.ch==ht(e.doc,U.line).text.length&&U.linet.viewTo-1)return!1;var V,te,oe;O.line==t.viewFrom||(V=sn(e,O.line))==0?(te=_t(t.view[0].line),oe=t.view[0].node):(te=_t(t.view[V].line),oe=t.view[V-1].node.nextSibling);var ue=sn(e,U.line),me,Ie;if(ue==t.view.length-1?(me=t.viewTo-1,Ie=t.lineDiv.lastChild):(me=_t(t.view[ue+1].line)-1,Ie=t.view[ue+1].node.previousSibling),!oe)return!1;for(var je=e.doc.splitLines(ru(e,oe,Ie,te,me)),qe=Tr(e.doc,ot(te,0),ot(me,ht(e.doc,me).text.length));je.length>1&&qe.length>1;)if(re(je)==re(qe))je.pop(),qe.pop(),me--;else if(je[0]==qe[0])je.shift(),qe.shift(),te++;else break;for(var Ze=0,it=0,st=je[0],mt=qe[0],vt=Math.min(st.length,mt.length);ZeO.ch&&St.charCodeAt(St.length-it-1)==yt.charCodeAt(yt.length-it-1);)Ze--,it++;je[je.length-1]=St.slice(0,St.length-it).replace(/^\u200b+/,""),je[0]=je[0].slice(Ze).replace(/\u200b+$/,"");var Ht=ot(te,Ze),Nt=ot(me,qe.length?re(qe).length-it:0);if(je.length>1||je[0]||Ot(Ht,Nt))return Xi(e.doc,je,Ht,Nt,"+input"),!0},qr.prototype.ensurePolled=function(){this.forceCompositionEnd()},qr.prototype.reset=function(){this.forceCompositionEnd()},qr.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},qr.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)},qr.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&fa(this.cm,function(){return Zr(e.cm)})},qr.prototype.setUneditable=function(e){e.contentEditable="false"},qr.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||kn(this.cm,fs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},qr.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},qr.prototype.onContextMenu=function(){},qr.prototype.resetPosition=function(){},qr.prototype.needsContentAttribute=!0;function hl(e,t){var D=We(e,t.line);if(!D||D.hidden)return null;var O=ht(e.doc,t.line),U=ge(D,O,t.line),V=et(O,e.doc.direction),te="left";if(V){var oe=$e(V,t.ch);te=oe%2?"right":"left"}var ue=ct(U.map,t.ch,te);return ue.offset=ue.collapse=="right"?ue.end:ue.start,ue}function tu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Qi(e,t){return t&&(e.bad=!0),e}function ru(e,t,D,O,U){var V="",te=!1,oe=e.doc.lineSeparator(),ue=!1;function me(Ze){return function(it){return it.id==Ze}}function Ie(){te&&(V+=oe,ue&&(V+=oe),te=ue=!1)}function je(Ze){Ze&&(Ie(),V+=Ze)}function qe(Ze){if(Ze.nodeType==1){var it=Ze.getAttribute("cm-text");if(it){je(it);return}var st=Ze.getAttribute("cm-marker"),mt;if(st){var vt=e.findMarks(ot(O,0),ot(U+1,0),me(+st));vt.length&&(mt=vt[0].find(0))&&je(Tr(e.doc,mt.from,mt.to).join(oe));return}if(Ze.getAttribute("contenteditable")=="false")return;var St=/^(pre|div|p|li|table|br)$/i.test(Ze.nodeName);if(!/^br$/i.test(Ze.nodeName)&&Ze.textContent.length==0)return;St&&Ie();for(var yt=0;yt=9&&t.hasSelection&&(t.hasSelection=null),D.poll()}),Ce(U,"paste",function(te){if(Je(O,te)||sl(te,O))return;O.state.pasteIncoming=+new Date,D.fastPoll()});function V(te){if(Je(O,te))return;if(O.somethingSelected())zo({lineWise:!1,text:O.getSelections()});else if(O.options.lineWiseCopyCut){var oe=ul(O);zo({lineWise:!0,text:oe.text}),te.type=="cut"?O.setSelections(oe.ranges,null,he):(D.prevInput="",U.value=oe.text.join(` `),z(U))}else return;te.type=="cut"&&(O.state.cutIncoming=+new Date)}Ce(U,"cut",V),Ce(U,"copy",V),Ce(e.scroller,"paste",function(te){if(Un(e,te)||Je(O,te))return;if(!U.dispatchEvent){O.state.pasteIncoming=+new Date,D.focus();return}var oe=new Event("paste");oe.clipboardData=te.clipboardData,U.dispatchEvent(oe)}),Ce(e.lineSpace,"selectstart",function(te){Un(e,te)||de(te)}),Ce(U,"compositionstart",function(){var te=O.getCursor("from");D.composing&&D.composing.range.clear(),D.composing={start:te,range:O.markText(te,O.getCursor("to"),{className:"CodeMirror-composing"})}}),Ce(U,"compositionend",function(){D.composing&&(D.poll(),D.composing.range.clear(),D.composing=null)})},Nn.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},Nn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Nn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,D=e.doc,O=Fa(e);if(e.options.moveInputWithCursor){var U=vr(e,D.sel.primary().head,"div"),V=t.wrapper.getBoundingClientRect(),te=t.lineDiv.getBoundingClientRect();O.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,U.top+te.top-V.top)),O.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,U.left+te.left-V.left))}return O},Nn.prototype.showSelection=function(e){var t=this.cm,D=t.display;b(D.cursorDiv,e.cursors),b(D.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Nn.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&&z(this.textarea),S&&d>=9&&(this.hasSelection=D)}else e||(this.prevInput=this.textarea.value="",S&&d>=9&&(this.hasSelection=null))},Nn.prototype.getField=function(){return this.textarea},Nn.prototype.supportsTouch=function(){return!1},Nn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||G()!=this.textarea))try{this.textarea.focus()}catch(e){}},Nn.prototype.blur=function(){this.textarea.blur()},Nn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Nn.prototype.receivedFocus=function(){this.slowPoll()},Nn.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()})},Nn.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)},Nn.prototype.poll=function(){var e=this,t=this.cm,D=this.textarea,O=this.prevInput;if(this.contextMenuPending||!t.state.focused||xt(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(S&&d>=9&&this.hasSelection===U||l&&/[\uf700-\uf7ff]/.test(U))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var V=U.charCodeAt(0);if(V==8203&&!O&&(O="\u200B"),V==8666)return this.reset(),this.cm.execCommand("undo")}for(var te=0,oe=Math.min(O.length,U.length);te1e3||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},Nn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Nn.prototype.onKeyPress=function(){S&&d>=9&&(this.hasSelection=null),this.fastPoll()},Nn.prototype.onContextMenu=function(e){var t=this,D=t.cm,O=D.display,U=t.textarea;t.contextMenuPending&&t.contextMenuPending();var V=Gn(D,e),te=O.scroller.scrollTop;if(!V||x)return;var oe=D.options.resetSelectionOnContextMenu;oe&&D.doc.sel.contains(V)==-1&&kn(D,sa)(D.doc,za(V),he);var ue=U.style.cssText,me=t.wrapper.style.cssText,Ie=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",U.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-Ie.top-5)+"px; left: "+(e.clientX-Ie.left-5)+`px; z-index: 1000; background: `+(S?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var je;a&&(je=window.scrollY),O.input.focus(),a&&window.scrollTo(null,je),O.input.reset(),D.somethingSelected()||(U.value=t.prevInput=" "),t.contextMenuPending=Ze,O.selForContextMenu=D.doc.sel,clearTimeout(O.detectingSelectAll);function qe(){if(U.selectionStart!=null){var st=D.somethingSelected(),mt="\u200B"+(st?U.value:"");U.value="\u21DA",U.value=mt,t.prevInput=st?"":"\u200B",U.selectionStart=1,U.selectionEnd=mt.length,O.selForContextMenu=D.doc.sel}}function Ze(){if(t.contextMenuPending!=Ze)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=me,U.style.cssText=ue,S&&d<9&&O.scrollbars.setScrollTop(O.scroller.scrollTop=te),U.selectionStart!=null){(!S||S&&d<9)&&qe();var st=0,mt=function(){O.selForContextMenu==D.doc.sel&&U.selectionStart==0&&U.selectionEnd>0&&t.prevInput=="\u200B"?kn(D,Rs)(D):st++<10?O.detectingSelectAll=setTimeout(mt,500):(O.selForContextMenu=null,O.input.reset())};O.detectingSelectAll=setTimeout(mt,200)}}if(S&&d>=9&&qe(),L){De(e);var it=function(){tt(window,"mouseup",it),setTimeout(Ze,20)};Ce(window,"mouseup",it)}else setTimeout(Ze,50)},Nn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Nn.prototype.setUneditable=function(){},Nn.prototype.needsContentAttribute=!1;function au(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=G();t.autofocus=D==e||e.getAttribute("autofocus")!=null&&D==document.body}function O(){e.value=oe.getValue()}var U;if(e.form&&(Ce(e.form,"submit",O),!t.leaveSubmitMethodAlone)){var V=e.form;U=V.submit;try{var te=V.submit=function(){O(),V.submit=U,V.submit(),V.submit=te}}catch(ue){}}t.finishInit=function(ue){ue.save=O,ue.getTextArea=function(){return e},ue.toTextArea=function(){ue.toTextArea=isNaN,O(),e.parentNode.removeChild(ue.getWrapperElement()),e.style.display="",e.form&&(tt(e.form,"submit",O),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=U))}},e.style.display="none";var oe=En(function(ue){return e.parentNode.insertBefore(ue,e.nextSibling)},t);return oe}function iu(e){e.off=tt,e.on=Ce,e.wheelEventPixels=so,e.Doc=ya,e.splitLines=Ct,e.countColumn=F,e.findColumn=xe,e.isWordChar=J,e.Pass=ve,e.signal=He,e.Line=Cr,e.changeEnd=Ga,e.scrollbarModel=ao,e.Pos=ot,e.cmpPos=Ot,e.modes=xr,e.mimeModes=Lt,e.resolveMode=Wt,e.getMode=Xt,e.modeExtensions=$r,e.extendMode=Tn,e.copyState=wr,e.startState=pt,e.innerMode=aa,e.commands=xo,e.keyMap=di,e.keyName=Xs,e.isModifierKey=zs,e.lookupKey=Yi,e.normalizeKeyMap=kl,e.StringStream=Tt,e.SharedTextMarker=vo,e.TextMarker=wi,e.LineWidget=go,e.e_preventDefault=de,e.e_stopPropagation=ye,e.e_stop=De,e.addClass=K,e.contains=M,e.rmClass=y,e.keyNames=Ti}Jl(En),eu(En);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Xo in ya.prototype)ya.prototype.hasOwnProperty(Xo)&&ee(ou,Xo)<0&&(En.prototype[Xo]=function(e){return function(){return e.apply(this.doc,arguments)}}(ya.prototype[Xo]));return Oe(ya),En.inputStyles={textarea:Nn,contenteditable:qr},En.defineMode=function(e){!En.defaults.mode&&e!="null"&&(En.defaults.mode=e),Er.apply(this,arguments)},En.defineMIME=fr,En.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),En.defineMIME("text/plain","null"),En.defineExtension=function(e,t){En.prototype[e]=t},En.defineDocExtension=function(e,t){ya.prototype[e]=t},En.fromTextArea=au,iu(En),En.version="5.58.2",En})},WYAk:function(N,Y,k){(function(P,u){N.exports=Y=u(k("Ib8C"))})(this,function(P){(function(){var u=P,C=u.lib,R=C.Base,h=u.enc,s=h.Utf8,S=u.algo,d=S.HMAC=R.extend({init:function(a,o){a=this._hasher=new a.init,typeof o=="string"&&(o=s.parse(o));var r=a.blockSize,x=r*4;o.sigBytes>x&&(o=a.finalize(o)),o.clamp();for(var g=this._oKey=o.clone(),m=this._iKey=o.clone(),w=g.words,p=m.words,f=0;f1&&arguments[1]!==void 0?arguments[1]:!1,Re=he.getAttribute("id")||he.getAttribute("data-reactid")||he.getAttribute("name");if(le&&G[Re])return G[Re];var xe=window.getComputedStyle(he),ie=xe.getPropertyValue("box-sizing")||xe.getPropertyValue("-moz-box-sizing")||xe.getPropertyValue("-webkit-box-sizing"),se=parseFloat(xe.getPropertyValue("padding-bottom"))+parseFloat(xe.getPropertyValue("padding-top")),re=parseFloat(xe.getPropertyValue("border-bottom-width"))+parseFloat(xe.getPropertyValue("border-top-width")),be=M.map(function(ne){return"".concat(ne,":").concat(xe.getPropertyValue(ne))}).join(";"),q={sizingStyle:be,paddingSize:se,borderSize:re,boxSizing:ie};return le&&Re&&(G[Re]=q),q}function z(he){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,xe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;K||(K=document.createElement("textarea"),K.setAttribute("tab-index","-1"),K.setAttribute("aria-hidden","true"),document.body.appendChild(K)),he.getAttribute("wrap")?K.setAttribute("wrap",he.getAttribute("wrap")):K.removeAttribute("wrap");var ie=H(he,le),se=ie.paddingSize,re=ie.borderSize,be=ie.boxSizing,q=ie.sizingStyle;K.setAttribute("style","".concat(q,";").concat(j)),K.value=he.value||he.placeholder||"";var ne=Number.MIN_SAFE_INTEGER,Te=Number.MAX_SAFE_INTEGER,ae=K.scrollHeight,J;if(be==="border-box"?ae+=re:be==="content-box"&&(ae-=se),Re!==null||xe!==null){K.value=" ";var X=K.scrollHeight-se;Re!==null&&(ne=X*Re,be==="border-box"&&(ne=ne+se+re),ae=Math.max(ne,ae)),xe!==null&&(Te=X*xe,be==="border-box"&&(Te=Te+se+re),J=ae>Te?"":"hidden",ae=Math.min(Te,ae))}return{height:ae,minHeight:ne,maxHeight:Te,overflowY:J,resize:"none"}}var B=k("Gytx"),W=k.n(B),F;(function(he){he[he.NONE=0]="NONE",he[he.RESIZING=1]="RESIZING",he[he.RESIZED=2]="RESIZED"})(F||(F={}));var $=function(he){Object(R.a)(Re,he);var le=Object(h.a)(Re);function Re(xe){var ie;return Object(u.a)(this,Re),ie=le.call(this,xe),ie.nextFrameActionId=void 0,ie.resizeFrameId=void 0,ie.textArea=void 0,ie.saveTextArea=function(se){ie.textArea=se},ie.handleResize=function(se){var re=ie.state.resizeStatus,be=ie.props,q=be.autoSize,ne=be.onResize;if(re!==F.NONE)return;typeof ne=="function"&&ne(se),q&&ie.resizeOnNextFrame()},ie.resizeOnNextFrame=function(){cancelAnimationFrame(ie.nextFrameActionId),ie.nextFrameActionId=requestAnimationFrame(ie.resizeTextarea)},ie.resizeTextarea=function(){var se=ie.props.autoSize;if(!se||!ie.textArea)return;var re=se.minRows,be=se.maxRows,q=z(ie.textArea,!1,re,be);ie.setState({textareaStyles:q,resizeStatus:F.RESIZING},function(){cancelAnimationFrame(ie.resizeFrameId),ie.resizeFrameId=requestAnimationFrame(function(){ie.setState({resizeStatus:F.RESIZED},function(){ie.resizeFrameId=requestAnimationFrame(function(){ie.setState({resizeStatus:F.NONE}),ie.fixFirefoxAutoScroll()})})})})},ie.renderTextArea=function(){var se=ie.props,re=se.prefixCls,be=re===void 0?"rc-textarea":re,q=se.autoSize,ne=se.onResize,Te=se.className,ae=se.disabled,J=ie.state,X=J.textareaStyles,Q=J.resizeStatus,pe=Object(b.a)(ie.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ce=I()(be,Te,Object(d.a)({},"".concat(be,"-disabled"),ae));"value"in pe&&(pe.value=pe.value||"");var we=Object(S.a)(Object(S.a)(Object(S.a)({},ie.props.style),X),Q===F.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return s.createElement(E,{onResize:ie.handleResize,disabled:!(q||ne)},s.createElement("textarea",Object(P.a)({},pe,{className:ce,style:we,ref:ie.saveTextArea})))},ie.state={textareaStyles:{},resizeStatus:F.NONE},ie}return Object(C.a)(Re,[{key:"componentDidUpdate",value:function(ie){(ie.value!==this.props.value||!W()(ie.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 ie=this.textArea.selectionStart,se=this.textArea.selectionEnd;this.textArea.setSelectionRange(ie,se)}}catch(re){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Re}(s.Component),ee=$,Z=function(he){Object(R.a)(Re,he);var le=Object(h.a)(Re);function Re(xe){var ie;Object(u.a)(this,Re),ie=le.call(this,xe),ie.resizableTextArea=void 0,ie.focus=function(){ie.resizableTextArea.textArea.focus()},ie.saveTextArea=function(re){ie.resizableTextArea=re},ie.handleChange=function(re){var be=ie.props.onChange;ie.setValue(re.target.value,function(){ie.resizableTextArea.resizeTextarea()}),be&&be(re)},ie.handleKeyDown=function(re){var be=ie.props,q=be.onPressEnter,ne=be.onKeyDown;re.keyCode===13&&q&&q(re),ne&&ne(re)};var se=typeof xe.value=="undefined"||xe.value===null?xe.defaultValue:xe.value;return ie.state={value:se},ie}return Object(C.a)(Re,[{key:"setValue",value:function(ie,se){"value"in this.props||this.setState({value:ie},se)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return s.createElement(ee,Object(P.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(ie){return"value"in ie?{value:ie.value}:null}}]),Re}(s.Component),ve=Y.default=Z},ZD9Y:function(N,Y,k){"use strict";var P=k("BoS7"),u=k("Sdc0"),C=k("OaEy"),R=k("2fM7"),h=k("q1tI"),s=k.n(h),S=k("lOMy"),d=k.n(S),a=R.a.Option;Y.a=function(o){var r=o.onFontSizeChange,x=o.cmFontSize,g=o.cmCodeMode,m=o.onCodeModeChange,w=o.onTabToSpace,p=o.className,f=p===void 0?"":p,n=o.tabToSpace,l=o.children;return s.a.createElement("div",{className:"tpi-code-setting ".concat(f)},s.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),s.a.createElement("section",null,s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),s.a.createElement(R.a,{bordered:!1,size:"small",value:g,onChange:m},s.a.createElement(a,{value:"vs"},"\u767D\u8272\u80CC\u666F"),s.a.createElement(a,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),s.a.createElement(R.a,{bordered:!1,size:"small",value:x,onChange:r},s.a.createElement(a,{value:12},"12px"),s.a.createElement(a,{value:14},"14px"),s.a.createElement(a,{value:16},"16px"),s.a.createElement(a,{value:18},"18px"),s.a.createElement(a,{value:20},"20px"),s.a.createElement(a,{value:22},"22px"))),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"Tab\u8F6C\u6362"),s.a.createElement(u.a,{checked:n,onChange:w}))),s.a.createElement("h3",null,"\u5FEB\u6377\u952E"),s.a.createElement("section",null,s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),s.a.createElement("span",null,"Ctrl + S")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),s.a.createElement("span",null,"F1 / Alt + F1")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),s.a.createElement("span",null,"Ctrl + ]/[")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),s.a.createElement("span",null,"Ctrl + Shift + \\")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),s.a.createElement("span",null,"Home")),s.a.createElement("div",{className:"file-item"},s.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),s.a.createElement("span",null,"End"))),l)}},ZW9T:function(N,Y,k){"use strict";k.d(Y,"a",function(){return T});var P=k("k1fw"),u=k("miYZ"),C=k("tsqr"),R=k("rAM+"),h=k("tJVT"),s=k("PpiC"),S=k("q1tI"),d=k.n(S),a=k("bdgK");function o(v,i,L,A,y){var E=i.getWordUntilPosition(L),b={startLineNumber:L.lineNumber,endLineNumber:L.lineNumber,startColumn:E.startColumn,endColumn:E.endColumn},_=A.map(function(I){return{label:I,kind:v.languages.CompletionItemKind.Keyword,insertText:I,insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:b}});return y.map(function(I){_.push(Object(P.a)(Object(P.a)({},I),{},{range:b}))}),_}var r=function(v){var i={label:"ifelse",kind:v.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `),insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet},L=["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"];v.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(b,_){var I=o(v,b,_,L,[i]);return{suggestions:I}}});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"];v.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(b,_){var I=[{label:"print",kind:v.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(` `),insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet}],j=o(v,b,_,A,I);return{suggestions:j}}});var y=["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"];v.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(b,_){var I=[i,{label:"main",kind:v.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(` `),insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:v.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(` `),insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet}],j=o(v,b,_,y,I);return{suggestions:j}}})},x="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",g=k("LvDl");function m(v){return/^\d+$/.test(v)?"".concat(v,"px"):v}function w(){}var p=!1,f={"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 v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],i=v;if(Array.isArray(v)){for(var L=0;L0||nt.target.offsetWidth>0)&&Te.current.instance.layout()}}catch(dt){Be.e(dt)}finally{Be.f()}}),Ee.observe(ne.current)),Ee}function Ge(){C.b.warn(decodeURIComponent(x))}var Qe=function(){var De=Te.current.instance;if(E!=null&&De&&ce){var Be=De.getModel();Be&&E!==Be.getValue()&&(p=!0,Be.setValue(E),De.layout(),p=!1)}};Object(S.useEffect)(function(){ae.current&&clearTimeout(ae.current),ae.current=setTimeout(function(){Qe()},500)},[E,ce,Te.current]);function $e(){var Ee=Te.current.instance;if(Ee){var De=Ee.getSelection(),Be=Te.current.pastePos||{},Xe=new l.Range(Be.startLineNumber||De.endLineNumber,Be.startColumn||De.endColumn,Be.endLineNumber||De.endLineNumber,Be.endColumn||De.endColumn);setTimeout(function(){Ee.executeEdits("",[{range:Xe,text:""}])},300)}}function rt(Ee){(window.navigator.platform.match("Mac")?Ee.metaKey:Ee.ctrlKey)&&Ee.keyCode==83&&(Ee.preventDefault(),F())}var et=function(){if(ee&&Te.current.instance){var De=Te.current.instance.getContentHeight();de(De0||Re.target.offsetWidth>0)&&ee.layout()}}catch(xe){he.e(xe)}finally{he.f()}}),Z.observe(M.current)),Z}Object(S.useEffect)(function(){M.current&&k.e(27).then(k.t.bind(null,"M/lh",7)).then(function(ee){l=ee;var Z=l.editor.createDiffEditor(M.current,Object(P.a)(Object(P.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},j),{},{wordWrap:!0}));z(Z);var ve=B(Z);return function(){Z.dispose();var he=Z.getModel();he&&he.dispose(),ve.unobserve(M.current)}})},[]),Object(S.useEffect)(function(){H&&H.setModel({original:l.editor.createModel(E,_),modified:l.editor.createModel(b,_)})},[E,b,_,H]);var W=m(L),F=m(y),$={width:W,height:F};return d.a.createElement("div",{className:"my-diff-editor",ref:M,style:$})}},ZpRC:function(N,Y,k){"use strict";function P(r){return typeof r=="object"&&r!=null&&r.nodeType===1}function u(r,x){return(!x||r!=="hidden")&&r!=="visible"&&r!=="clip"}function C(r,x){if(r.clientHeightx||p>r&&f=x&&n>=g?p-r-m:f>x&&ng?f-x+w:0}var h=function(r,x){var g=window,m=x.scrollMode,w=x.block,p=x.inline,f=x.boundary,n=x.skipOverflowHiddenElements,l=typeof f=="function"?f:function(X){return X!==f};if(!P(r))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,T=[],v=r;P(v)&&l(v);){if((v=v.parentElement)===c){T.push(v);break}v!=null&&v===document.body&&C(v)&&!C(document.documentElement)||v!=null&&C(v,n)&&T.push(v)}for(var i=g.visualViewport?g.visualViewport.width:innerWidth,L=g.visualViewport?g.visualViewport.height:innerHeight,A=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,E=r.getBoundingClientRect(),b=E.height,_=E.width,I=E.top,j=E.right,M=E.bottom,G=E.left,K=w==="start"||w==="nearest"?I:w==="end"?M:I+b/2,H=p==="center"?G+_/2:p==="end"?j:G,z=[],B=0;B=0&&G>=0&&M<=L&&j<=i&&I>=Z&&M<=he&&G>=le&&j<=ve)return z;var Re=getComputedStyle(W),xe=parseInt(Re.borderLeftWidth,10),ie=parseInt(Re.borderTopWidth,10),se=parseInt(Re.borderRightWidth,10),re=parseInt(Re.borderBottomWidth,10),be=0,q=0,ne="offsetWidth"in W?W.offsetWidth-W.clientWidth-xe-se:0,Te="offsetHeight"in W?W.offsetHeight-W.clientHeight-ie-re:0;if(c===W)be=w==="start"?K:w==="end"?K-L:w==="nearest"?R(y,y+L,L,ie,re,y+K,y+K+b,b):K-L/2,q=p==="start"?H:p==="center"?H-i/2:p==="end"?H-i:R(A,A+i,i,xe,se,A+H,A+H+_,_),be=Math.max(0,be+y),q=Math.max(0,q+A);else{be=w==="start"?K-Z-ie:w==="end"?K-he+re+Te:w==="nearest"?R(Z,he,$,ie,re+Te,K,K+b,b):K-(Z+$/2)+Te/2,q=p==="start"?H-le-xe:p==="center"?H-(le+ee/2)+ne/2:p==="end"?H-ve+se+ne:R(le,ve,ee,xe,se+ne,H,H+_,_);var ae=W.scrollLeft,J=W.scrollTop;K+=J-(be=Math.max(0,Math.min(J+be,W.scrollHeight-$+Te))),H+=ae-(q=Math.max(0,Math.min(ae+q,W.scrollWidth-ee+ne)))}z.push({el:W,top:be,left:q})}return z};function s(r){return r===Object(r)&&Object.keys(r).length!==0}function S(r,x){x===void 0&&(x="auto");var g="scrollBehavior"in document.body.style;r.forEach(function(m){var w=m.el,p=m.top,f=m.left;w.scroll&&g?w.scroll({top:p,left:f,behavior:x}):(w.scrollTop=p,w.scrollLeft=f)})}function d(r){return r===!1?{block:"end",inline:"nearest"}:s(r)?r:{block:"start",inline:"nearest"}}function a(r,x){var g=!r.ownerDocument.documentElement.contains(r);if(s(x)&&typeof x.behavior=="function")return x.behavior(g?[]:h(r,x));if(g)return;var m=d(x);return S(h(r,m),m.behavior)}var o=Y.a=a},Zss7:function(N,Y,k){var P;(function(u){var C=/^\s+/,R=/\s+$/,h=0,s=u.round,S=u.min,d=u.max,a=u.random;function o(re,be){if(re=re||"",be=be||{},re instanceof o)return re;if(!(this instanceof o))return new o(re,be);var q=r(re);this._originalInput=re,this._r=q.r,this._g=q.g,this._b=q.b,this._a=q.a,this._roundA=s(100*this._a)/100,this._format=be.format||q.format,this._gradientType=be.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=q.ok,this._tc_id=h++}o.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var re=this.toRgb();return(re.r*299+re.g*587+re.b*114)/1e3},getLuminance:function(){var re=this.toRgb(),be,q,ne,Te,ae,J;return be=re.r/255,q=re.g/255,ne=re.b/255,be<=.03928?Te=be/12.92:Te=u.pow((be+.055)/1.055,2.4),q<=.03928?ae=q/12.92:ae=u.pow((q+.055)/1.055,2.4),ne<=.03928?J=ne/12.92:J=u.pow((ne+.055)/1.055,2.4),.2126*Te+.7152*ae+.0722*J},setAlpha:function(re){return this._a=z(re),this._roundA=s(100*this._a)/100,this},toHsv:function(){var re=w(this._r,this._g,this._b);return{h:re.h*360,s:re.s,v:re.v,a:this._a}},toHsvString:function(){var re=w(this._r,this._g,this._b),be=s(re.h*360),q=s(re.s*100),ne=s(re.v*100);return this._a==1?"hsv("+be+", "+q+"%, "+ne+"%)":"hsva("+be+", "+q+"%, "+ne+"%, "+this._roundA+")"},toHsl:function(){var re=g(this._r,this._g,this._b);return{h:re.h*360,s:re.s,l:re.l,a:this._a}},toHslString:function(){var re=g(this._r,this._g,this._b),be=s(re.h*360),q=s(re.s*100),ne=s(re.l*100);return this._a==1?"hsl("+be+", "+q+"%, "+ne+"%)":"hsla("+be+", "+q+"%, "+ne+"%, "+this._roundA+")"},toHex:function(re){return f(this._r,this._g,this._b,re)},toHexString:function(re){return"#"+this.toHex(re)},toHex8:function(re){return n(this._r,this._g,this._b,this._a,re)},toHex8String:function(re){return"#"+this.toHex8(re)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(B(this._r,255)*100)+"%",g:s(B(this._g,255)*100)+"%",b:s(B(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+s(B(this._r,255)*100)+"%, "+s(B(this._g,255)*100)+"%, "+s(B(this._b,255)*100)+"%)":"rgba("+s(B(this._r,255)*100)+"%, "+s(B(this._g,255)*100)+"%, "+s(B(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:K[f(this._r,this._g,this._b,!0)]||!1},toFilter:function(re){var be="#"+l(this._r,this._g,this._b,this._a),q=be,ne=this._gradientType?"GradientType = 1, ":"";if(re){var Te=o(re);q="#"+l(Te._r,Te._g,Te._b,Te._a)}return"progid:DXImageTransform.Microsoft.gradient("+ne+"startColorstr="+be+",endColorstr="+q+")"},toString:function(re){var be=!!re;re=re||this._format;var q=!1,ne=this._a<1&&this._a>=0,Te=!be&&ne&&(re==="hex"||re==="hex6"||re==="hex3"||re==="hex4"||re==="hex8"||re==="name");return Te?re==="name"&&this._a===0?this.toName():this.toRgbString():(re==="rgb"&&(q=this.toRgbString()),re==="prgb"&&(q=this.toPercentageRgbString()),(re==="hex"||re==="hex6")&&(q=this.toHexString()),re==="hex3"&&(q=this.toHexString(!0)),re==="hex4"&&(q=this.toHex8String(!0)),re==="hex8"&&(q=this.toHex8String()),re==="name"&&(q=this.toName()),re==="hsl"&&(q=this.toHslString()),re==="hsv"&&(q=this.toHsvString()),q||this.toHexString())},clone:function(){return o(this.toString())},_applyModification:function(re,be){var q=re.apply(null,[this].concat([].slice.call(be)));return this._r=q._r,this._g=q._g,this._b=q._b,this.setAlpha(q._a),this},lighten:function(){return this._applyModification(i,arguments)},brighten:function(){return this._applyModification(L,arguments)},darken:function(){return this._applyModification(A,arguments)},desaturate:function(){return this._applyModification(c,arguments)},saturate:function(){return this._applyModification(T,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(y,arguments)},_applyCombination:function(re,be){return re.apply(null,[this].concat([].slice.call(be)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(I,arguments)},triad:function(){return this._applyCombination(b,arguments)},tetrad:function(){return this._applyCombination(_,arguments)}},o.fromRatio=function(re,be){if(typeof re=="object"){var q={};for(var ne in re)re.hasOwnProperty(ne)&&(ne==="a"?q[ne]=re[ne]:q[ne]=ve(re[ne]));re=q}return o(re,be)};function r(re){var be={r:0,g:0,b:0},q=1,ne=null,Te=null,ae=null,J=!1,X=!1;return typeof re=="string"&&(re=ie(re)),typeof re=="object"&&(xe(re.r)&&xe(re.g)&&xe(re.b)?(be=x(re.r,re.g,re.b),J=!0,X=String(re.r).substr(-1)==="%"?"prgb":"rgb"):xe(re.h)&&xe(re.s)&&xe(re.v)?(ne=ve(re.s),Te=ve(re.v),be=p(re.h,ne,Te),J=!0,X="hsv"):xe(re.h)&&xe(re.s)&&xe(re.l)&&(ne=ve(re.s),ae=ve(re.l),be=m(re.h,ne,ae),J=!0,X="hsl"),re.hasOwnProperty("a")&&(q=re.a)),q=z(q),{ok:J,format:re.format||X,r:S(255,d(be.r,0)),g:S(255,d(be.g,0)),b:S(255,d(be.b,0)),a:q}}function x(re,be,q){return{r:B(re,255)*255,g:B(be,255)*255,b:B(q,255)*255}}function g(re,be,q){re=B(re,255),be=B(be,255),q=B(q,255);var ne=d(re,be,q),Te=S(re,be,q),ae,J,X=(ne+Te)/2;if(ne==Te)ae=J=0;else{var Q=ne-Te;J=X>.5?Q/(2-ne-Te):Q/(ne+Te);switch(ne){case re:ae=(be-q)/Q+(be1&&(we-=1),we<1/6?pe+(ce-pe)*6*we:we<1/2?ce:we<2/3?pe+(ce-pe)*(2/3-we)*6:pe}if(be===0)ne=Te=ae=q;else{var X=q<.5?q*(1+be):q+be-q*be,Q=2*q-X;ne=J(Q,X,re+1/3),Te=J(Q,X,re),ae=J(Q,X,re-1/3)}return{r:ne*255,g:Te*255,b:ae*255}}function w(re,be,q){re=B(re,255),be=B(be,255),q=B(q,255);var ne=d(re,be,q),Te=S(re,be,q),ae,J,X=ne,Q=ne-Te;if(J=ne===0?0:Q/ne,ne==Te)ae=0;else{switch(ne){case re:ae=(be-q)/Q+(be>1)+720)%360;--be;)ne.h=(ne.h+Te)%360,ae.push(o(ne));return ae}function M(re,be){be=be||6;for(var q=o(re).toHsv(),ne=q.h,Te=q.s,ae=q.v,J=[],X=1/be;be--;)J.push(o({h:ne,s:Te,v:ae})),ae=(ae+X)%1;return J}o.mix=function(re,be,q){q=q===0?0:q||50;var ne=o(re).toRgb(),Te=o(be).toRgb(),ae=q/100,J={r:(Te.r-ne.r)*ae+ne.r,g:(Te.g-ne.g)*ae+ne.g,b:(Te.b-ne.b)*ae+ne.b,a:(Te.a-ne.a)*ae+ne.a};return o(J)},o.readability=function(re,be){var q=o(re),ne=o(be);return(u.max(q.getLuminance(),ne.getLuminance())+.05)/(u.min(q.getLuminance(),ne.getLuminance())+.05)},o.isReadable=function(re,be,q){var ne=o.readability(re,be),Te,ae;ae=!1,Te=se(q);switch(Te.level+Te.size){case"AAsmall":case"AAAlarge":ae=ne>=4.5;break;case"AAlarge":ae=ne>=3;break;case"AAAsmall":ae=ne>=7;break}return ae},o.mostReadable=function(re,be,q){var ne=null,Te=0,ae,J,X,Q;q=q||{},J=q.includeFallbackColors,X=q.level,Q=q.size;for(var pe=0;peTe&&(Te=ae,ne=o(be[pe]));return o.isReadable(re,ne,{level:X,size:Q})||!J?ne:(q.includeFallbackColors=!1,o.mostReadable(re,["#fff","#000"],q))};var G=o.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"},K=o.hexNames=H(G);function H(re){var be={};for(var q in re)re.hasOwnProperty(q)&&(be[re[q]]=q);return be}function z(re){return re=parseFloat(re),(isNaN(re)||re<0||re>1)&&(re=1),re}function B(re,be){$(re)&&(re="100%");var q=ee(re);return re=S(be,d(0,parseFloat(re))),q&&(re=parseInt(re*be,10)/100),u.abs(re-be)<1e-6?1:re%be/parseFloat(be)}function W(re){return S(1,d(0,re))}function F(re){return parseInt(re,16)}function $(re){return typeof re=="string"&&re.indexOf(".")!=-1&&parseFloat(re)===1}function ee(re){return typeof re=="string"&&re.indexOf("%")!=-1}function Z(re){return re.length==1?"0"+re:""+re}function ve(re){return re<=1&&(re=re*100+"%"),re}function he(re){return u.round(parseFloat(re)*255).toString(16)}function le(re){return F(re)/255}var Re=function(){var re="[-\\+]?\\d+%?",be="[-\\+]?\\d*\\.\\d+%?",q="(?:"+be+")|(?:"+re+")",ne="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?",Te="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?";return{CSS_UNIT:new RegExp(q),rgb:new RegExp("rgb"+ne),rgba:new RegExp("rgba"+Te),hsl:new RegExp("hsl"+ne),hsla:new RegExp("hsla"+Te),hsv:new RegExp("hsv"+ne),hsva:new RegExp("hsva"+Te),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 xe(re){return!!Re.CSS_UNIT.exec(re)}function ie(re){re=re.replace(C,"").replace(R,"").toLowerCase();var be=!1;if(G[re])re=G[re],be=!0;else if(re=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var q;return(q=Re.rgb.exec(re))?{r:q[1],g:q[2],b:q[3]}:(q=Re.rgba.exec(re))?{r:q[1],g:q[2],b:q[3],a:q[4]}:(q=Re.hsl.exec(re))?{h:q[1],s:q[2],l:q[3]}:(q=Re.hsla.exec(re))?{h:q[1],s:q[2],l:q[3],a:q[4]}:(q=Re.hsv.exec(re))?{h:q[1],s:q[2],v:q[3]}:(q=Re.hsva.exec(re))?{h:q[1],s:q[2],v:q[3],a:q[4]}:(q=Re.hex8.exec(re))?{r:F(q[1]),g:F(q[2]),b:F(q[3]),a:le(q[4]),format:be?"name":"hex8"}:(q=Re.hex6.exec(re))?{r:F(q[1]),g:F(q[2]),b:F(q[3]),format:be?"name":"hex"}:(q=Re.hex4.exec(re))?{r:F(q[1]+""+q[1]),g:F(q[2]+""+q[2]),b:F(q[3]+""+q[3]),a:le(q[4]+""+q[4]),format:be?"name":"hex8"}:(q=Re.hex3.exec(re))?{r:F(q[1]+""+q[1]),g:F(q[2]+""+q[2]),b:F(q[3]+""+q[3]),format:be?"name":"hex"}:!1}function se(re){var be,q;return re=re||{level:"AA",size:"small"},be=(re.level||"AA").toUpperCase(),q=(re.size||"small").toLowerCase(),be!=="AA"&&be!=="AAA"&&(be="AA"),q!=="small"&&q!=="large"&&(q="small"),{level:be,size:q}}N.exports?N.exports=o:!(P=function(){return o}.call(Y,k,Y,N),P!==void 0&&(N.exports=P))})(Math)},bCnd:function(N,Y,k){"use strict";k.d(Y,"b",function(){return R}),k.d(Y,"a",function(){return h});var P=k("je13"),u=k.n(P),C=!1;function R(s,S){var d=u.a.get("__ec");d||(d={}),d[s]=S,u.a.set("__ec",d)}function h(s,S){var d=u.a.get("__ec");return d?d[s]===void 0?S:d[s]:S}},bQjk:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return function(u){var C=P,R=C.lib,h=R.CipherParams,s=C.enc,S=s.Hex,d=C.format,a=d.Hex={stringify:function(o){return o.ciphertext.toString(S)},parse:function(o){var r=S.parse(o);return h.create({ciphertext:r})}}}(),P.format.Hex})},bT9E:function(N,Y,k){"use strict";k.d(Y,"a",function(){return u});var P=k("VTBJ");function u(C,R){var h=Object(P.a)({},C);return Array.isArray(R)&&R.forEach(function(s){delete h[s]}),h}},biw7:function(N,Y,k){"use strict";var P=k("q1tI"),u=k.n(P),C=P.createContext(null);Y.a=C},c5Ni:function(N,Y,k){},cDPC:function(N,Y,k){"use strict";var P=k("tJVT"),u=k("q1tI"),C=k.n(u),R=k("i3hx"),h=k.n(R);Y.a=function(s){var S=s.defaultX,d=S===void 0?"40%":S,a=s.leftChild,o=s.rightChild,r=s.className,x=s.hideResize,g=x===void 0?!1:x,m=Object(u.useState)(d),w=Object(P.a)(m,2),p=w[0],f=w[1],n=Object(u.useRef)();function l(){n.current=!0}Object(u.useEffect)(function(){function v(L){n.current&&f(L.pageX)}function i(){n.current=!1}return window.addEventListener("mousemove",v),window.addEventListener("mouseup",i),function(){window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",i)}},[]);var c=typeof p=="number"&&p!==.01?"".concat(p,"px"):d,T="calc(100% - ".concat(g?"0px":"4px"," - ").concat(c,")");return C.a.createElement("div",{className:"split-panel-container ".concat(r)},C.a.createElement("section",{style:{width:c,display:p===.01?"none":""}},a),C.a.createElement("section",{className:"resize-x-bar",onMouseDown:l},C.a.createElement("a",{className:"btn-resize"},C.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},C.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"})))),C.a.createElement("section",{style:{width:T}},o))}},cv67:function(N,Y,k){(function(P,u){N.exports=Y=u(k("Ib8C"))})(this,function(P){return function(u){var C=P,R=C.lib,h=R.WordArray,s=R.Hasher,S=C.algo,d=[];(function(){for(var m=0;m<64;m++)d[m]=u.abs(u.sin(m+1))*4294967296|0})();var a=S.MD5=s.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,w){for(var p=0;p<16;p++){var f=w+p,n=m[f];m[f]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360}var l=this._hash.words,c=m[w+0],T=m[w+1],v=m[w+2],i=m[w+3],L=m[w+4],A=m[w+5],y=m[w+6],E=m[w+7],b=m[w+8],_=m[w+9],I=m[w+10],j=m[w+11],M=m[w+12],G=m[w+13],K=m[w+14],H=m[w+15],z=l[0],B=l[1],W=l[2],F=l[3];z=o(z,B,W,F,c,7,d[0]),F=o(F,z,B,W,T,12,d[1]),W=o(W,F,z,B,v,17,d[2]),B=o(B,W,F,z,i,22,d[3]),z=o(z,B,W,F,L,7,d[4]),F=o(F,z,B,W,A,12,d[5]),W=o(W,F,z,B,y,17,d[6]),B=o(B,W,F,z,E,22,d[7]),z=o(z,B,W,F,b,7,d[8]),F=o(F,z,B,W,_,12,d[9]),W=o(W,F,z,B,I,17,d[10]),B=o(B,W,F,z,j,22,d[11]),z=o(z,B,W,F,M,7,d[12]),F=o(F,z,B,W,G,12,d[13]),W=o(W,F,z,B,K,17,d[14]),B=o(B,W,F,z,H,22,d[15]),z=r(z,B,W,F,T,5,d[16]),F=r(F,z,B,W,y,9,d[17]),W=r(W,F,z,B,j,14,d[18]),B=r(B,W,F,z,c,20,d[19]),z=r(z,B,W,F,A,5,d[20]),F=r(F,z,B,W,I,9,d[21]),W=r(W,F,z,B,H,14,d[22]),B=r(B,W,F,z,L,20,d[23]),z=r(z,B,W,F,_,5,d[24]),F=r(F,z,B,W,K,9,d[25]),W=r(W,F,z,B,i,14,d[26]),B=r(B,W,F,z,b,20,d[27]),z=r(z,B,W,F,G,5,d[28]),F=r(F,z,B,W,v,9,d[29]),W=r(W,F,z,B,E,14,d[30]),B=r(B,W,F,z,M,20,d[31]),z=x(z,B,W,F,A,4,d[32]),F=x(F,z,B,W,b,11,d[33]),W=x(W,F,z,B,j,16,d[34]),B=x(B,W,F,z,K,23,d[35]),z=x(z,B,W,F,T,4,d[36]),F=x(F,z,B,W,L,11,d[37]),W=x(W,F,z,B,E,16,d[38]),B=x(B,W,F,z,I,23,d[39]),z=x(z,B,W,F,G,4,d[40]),F=x(F,z,B,W,c,11,d[41]),W=x(W,F,z,B,i,16,d[42]),B=x(B,W,F,z,y,23,d[43]),z=x(z,B,W,F,_,4,d[44]),F=x(F,z,B,W,M,11,d[45]),W=x(W,F,z,B,H,16,d[46]),B=x(B,W,F,z,v,23,d[47]),z=g(z,B,W,F,c,6,d[48]),F=g(F,z,B,W,E,10,d[49]),W=g(W,F,z,B,K,15,d[50]),B=g(B,W,F,z,A,21,d[51]),z=g(z,B,W,F,M,6,d[52]),F=g(F,z,B,W,i,10,d[53]),W=g(W,F,z,B,I,15,d[54]),B=g(B,W,F,z,T,21,d[55]),z=g(z,B,W,F,b,6,d[56]),F=g(F,z,B,W,H,10,d[57]),W=g(W,F,z,B,y,15,d[58]),B=g(B,W,F,z,G,21,d[59]),z=g(z,B,W,F,L,6,d[60]),F=g(F,z,B,W,j,10,d[61]),W=g(W,F,z,B,v,15,d[62]),B=g(B,W,F,z,_,21,d[63]),l[0]=l[0]+z|0,l[1]=l[1]+B|0,l[2]=l[2]+W|0,l[3]=l[3]+F|0},_doFinalize:function(){var m=this._data,w=m.words,p=this._nDataBytes*8,f=m.sigBytes*8;w[f>>>5]|=128<<24-f%32;var n=u.floor(p/4294967296),l=p;w[(f+64>>>9<<4)+15]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,w[(f+64>>>9<<4)+14]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,m.sigBytes=(w.length+1)*4,this._process();for(var c=this._hash,T=c.words,v=0;v<4;v++){var i=T[v];T[v]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}return c},clone:function(){var m=s.clone.call(this);return m._hash=this._hash.clone(),m}});function o(m,w,p,f,n,l,c){var T=m+(w&p|~w&f)+n+c;return(T<>>32-l)+w}function r(m,w,p,f,n,l,c){var T=m+(w&f|p&~f)+n+c;return(T<>>32-l)+w}function x(m,w,p,f,n,l,c){var T=m+(w^p^f)+n+c;return(T<>>32-l)+w}function g(m,w,p,f,n,l,c){var T=m+(p^(w|~f))+n+c;return(T<>>32-l)+w}C.MD5=s._createHelper(a),C.HmacMD5=s._createHmacHelper(a)}(Math),P.MD5})},dejd:function(N,Y,k){},dmUQ:function(N,Y,k){"use strict";var P=k("Ff2n"),u=k("rePB"),C=k("1OyB"),R=k("vuIU"),h=k("Ji7U"),s=k("md7G"),S=k("foSv"),d=k("q1tI"),a=k.n(d),o=k("TSYQ"),r=k.n(o),x=k("4IlW");function g(b,_){var I=Object.keys(b);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(b);_&&(j=j.filter(function(M){return Object.getOwnPropertyDescriptor(b,M).enumerable})),I.push.apply(I,j)}return I}function m(b){for(var _=1;_1?ee-1:0),ve=1;ve1?B-1:0),F=1;F=0)return parseInt(z.slice(z.indexOf("e-")+2),10);var B=0;return z.indexOf(".")>=0&&(B=z.length-z.indexOf(".")-1),B},M.getInputDisplayValue=function(H){var z=H||M.state,B=z.focused,W=z.inputValue,F=z.value,$;B?$=W:$=M.toPrecisionAsStep(F),$==null&&($="");var ee=M.formatWrapper($);return i(M.props.decimalSeparator)&&(ee=ee.toString().replace(".",M.props.decimalSeparator)),ee},M.recordCursorPosition=function(){try{M.cursorStart=M.input.selectionStart,M.cursorEnd=M.input.selectionEnd,M.currentValue=M.input.value,M.cursorBefore=M.input.value.substring(0,M.cursorStart),M.cursorAfter=M.input.value.substring(M.cursorEnd)}catch(H){}},M.restoreByAfter=function(H){if(H===void 0)return!1;var z=M.input.value,B=z.lastIndexOf(H);if(B===-1)return!1;var W=M.cursorBefore.length;return M.lastKeyCode===x.a.DELETE&&M.cursorBefore.charAt(W-1)===H[0]?(M.fixCaret(W,W),!0):B+H.length===z.length?(M.fixCaret(B,B),!0):!1},M.partRestoreByAfter=function(H){return H===void 0?!1:Array.prototype.some.call(H,function(z,B){var W=H.substring(B);return M.restoreByAfter(W)})},M.isNotCompleteNumber=function(H){return isNaN(H)||H===""||H===null||H&&H.toString().indexOf(".")===H.toString().length-1},M.stop=function(){M.autoStepTimer&&clearTimeout(M.autoStepTimer)},M.down=function(H,z,B){M.pressingUpOrDown=!0,M.step("down",H,z,B)},M.up=function(H,z,B){M.pressingUpOrDown=!0,M.step("up",H,z,B)},M.saveInput=function(H){M.input=H};var G=j.value;G===void 0&&(G=j.defaultValue),M.state={focused:j.autoFocus};var K=M.getValidValue(M.toNumber(G));return M.state=m(m({},M.state),{},{inputValue:M.toPrecisionAsStep(K),value:K}),M}return Object(R.a)(I,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(M){var G=this.props,K=G.value,H=G.onChange,z=G.max,B=G.min,W=this.state.focused;if(M){if(!L(M.value,K)||!L(M.max,z)||!L(M.min,B)){var F=W?K:this.getValidValue(K),$;this.pressingUpOrDown?$=F:this.inputting?$=this.rawInput:$=this.toPrecisionAsStep(F),this.setState({value:F,inputValue:$})}var ee="value"in this.props?K:this.state.value;"max"in this.props&&M.max!==z&&typeof ee=="number"&&ee>z&&H&&H(z),"min"in this.props&&M.min!==B&&typeof ee=="number"&&ee1&&arguments[1]!==void 0?arguments[1]:this.props.min,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,H=parseFloat(M);return isNaN(H)?M:(HK&&(H=K),H)}},{key:"setValue",value:function(M,G){var K=this.props.precision,H=this.isNotCompleteNumber(parseFloat(M))?null:parseFloat(M),z=this.state.value,B=z===void 0?null:z,W=this.state.inputValue,F=W===void 0?null:W,$=typeof H=="number"?H.toFixed(K):"".concat(H),ee=H!==B||$!=="".concat(F);return"value"in this.props?(F=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:F},G)):this.setState({value:H,inputValue:this.toPrecisionAsStep(M)},G),ee&&this.props.onChange(H),H}},{key:"getMaxPrecision",value:function(M){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.props,H=K.precision,z=K.step;if(i(H))return H;var B=this.getPrecision(G),W=this.getPrecision(z),F=this.getPrecision(M);return M?Math.max(F,B+W):B+W}},{key:"getPrecisionFactor",value:function(M){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.getMaxPrecision(M,G);return Math.pow(10,K)}},{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(M){return this.props.formatter?this.props.formatter(M):M}},{key:"toPrecisionAsStep",value:function(M){if(this.isNotCompleteNumber(M)||M==="")return M;var G=Math.abs(this.getMaxPrecision(M));return isNaN(G)?M.toString():Number(M).toFixed(G)}},{key:"toNumber",value:function(M){var G=this.props.precision,K=this.state.focused,H=M&&M.length>16&&K;return this.isNotCompleteNumber(M)||H?M:i(G)?Math.round(M*Math.pow(10,G))/Math.pow(10,G):Number(M)}},{key:"upStep",value:function(M,G){var K=this.props.step,H=this.getPrecisionFactor(M,G),z=Math.abs(this.getMaxPrecision(M,G)),B=((H*M+H*K*G)/H).toFixed(z);return this.toNumber(B)}},{key:"downStep",value:function(M,G){var K=this.props.step,H=this.getPrecisionFactor(M,G),z=Math.abs(this.getMaxPrecision(M,G)),B=((H*M-H*K*G)/H).toFixed(z);return this.toNumber(B)}},{key:"step",value:function(M,G){var K=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,z=arguments.length>3?arguments[3]:void 0;this.stop(),G&&(G.persist(),G.preventDefault());var B=this.props;if(B.disabled)return;var W=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(W))return;var F=this["".concat(M,"Step")](W,H),$=F>B.max||FB.max?F=B.max:F=Z),Je=(rt||rt===0)&&(isNaN(rt)||Number(rt)<=ve),_e=He||H||z,Se=Je||H||z,Oe=r()("".concat(K,"-handler"),"".concat(K,"-handler-up"),Object(u.a)({},"".concat(K,"-handler-up-disabled"),_e)),de=r()("".concat(K,"-handler"),"".concat(K,"-handler-down"),Object(u.a)({},"".concat(K,"-handler-down-disabled"),Se)),ye=B?{onTouchStart:_e?f:this.up,onTouchEnd:this.stop}:{onMouseDown:_e?f:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ee=B?{onTouchStart:Se?f:this.down,onTouchEnd:this.stop}:{onMouseDown:Se?f:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return a.a.createElement("div",{className:Me,style:he,title:le,onMouseEnter:Re,onMouseLeave:xe,onMouseOver:ie,onMouseOut:se,onFocus:function(){return null},onBlur:function(){return null}},a.a.createElement("div",{className:"".concat(K,"-handler-wrap")},a.a.createElement("span",Object.assign({unselectable:"on"},ye,{role:"button","aria-label":"Increase Value","aria-disabled":_e,className:Oe}),F||a.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-up-inner"),onClick:n})),a.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Decrease Value","aria-disabled":Se,className:de}),$||a.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-down-inner"),onClick:n}))),a.a.createElement("div",{className:"".concat(K,"-input-wrap")},a.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ve,"aria-valuemax":Z,"aria-valuenow":rt,required:re,type:ne,placeholder:Te,onPaste:ze,onClick:be,onMouseUp:this.onMouseUp,className:"".concat(K,"-input"),tabIndex:q,autoComplete:W,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ve?this.onKeyDown:f,onKeyUp:Ve?this.onKeyUp:f,autoFocus:ce,maxLength:pe,readOnly:z,disabled:H,max:Z,min:ve,step:Q,name:we,title:le,id:ae,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(tt),pattern:X,inputMode:J,onInput:Ge},Ce))))}}]),I}(a.a.Component);A.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:v,min:-v,step:1,style:{},onChange:f,onKeyDown:f,onPressEnter:f,onFocus:f,onBlur:f,parser:l,required:!1,autoComplete:"off"};var y=A,E=Y.a=y},e7zE:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("3y9D"),k("WYAk"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.Base,h=C.WordArray,s=u.algo,S=s.SHA1,d=s.HMAC,a=s.PBKDF2=R.extend({cfg:R.extend({keySize:128/32,hasher:S,iterations:1}),init:function(o){this.cfg=this.cfg.extend(o)},compute:function(o,r){for(var x=this.cfg,g=d.create(x.hasher,o),m=h.create(),w=h.create([1]),p=m.words,f=w.words,n=x.keySize,l=x.iterations;p.length=Z&&F<0||B.scrollTop<=0&&F>0))||ee&&(!ie||ie&&(B.scrollLeft>=ve&&W<0||B.scrollLeft<=0&&W>0))?H(z,B.parentNode,W,F):!1};function A(H){var z=y();return function(){var W=Object(s.a)(H),F;if(z){var $=Object(s.a)(this).constructor;F=Reflect.construct(W,arguments,$)}else F=W.apply(this,arguments);return Object(h.a)(this,F)}}function y(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(H){return!1}}var E={},b=function(H){Object(R.a)(B,H);var z=A(B);function B(W){var F;return Object(u.a)(this,B),F=z.call(this,W),F.domFocus=function(){F.dom&&F.dom.focus()},F.removeStartHandler=function($){if($.touches.length>1)return;F.startPos={x:$.touches[0].clientX,y:$.touches[0].clientY}},F.removeMoveHandler=function($){if($.changedTouches.length>1)return;var ee=$.currentTarget,Z=$.changedTouches[0].clientX-F.startPos.x,ve=$.changedTouches[0].clientY-F.startPos.y;(ee===F.maskDom||ee===F.handlerDom||ee===F.contentDom&&L(ee,$.target,Z,ve))&&$.cancelable&&$.preventDefault()},F.transitionEnd=function($){var ee=$.target;c(ee,n,F.transitionEnd),ee.style.transition=""},F.onKeyDown=function($){if($.keyCode===m.a.ESC){var ee=F.props.onClose;$.stopPropagation(),ee&&ee($)}},F.onWrapperTransitionEnd=function($){var ee=F.props,Z=ee.open,ve=ee.afterVisibleChange;$.target===F.contentWrapper&&$.propertyName.match(/transform$/)&&(F.dom.style.transition="",!Z&&F.getCurrentDrawerSome()&&(document.body.style.overflowX="",F.maskDom&&(F.maskDom.style.left="",F.maskDom.style.width="")),ve&&ve(!!Z))},F.openLevelTransition=function(){var $=F.props,ee=$.open,Z=$.width,ve=$.height,he=F.getHorizontalBoolAndPlacementName(),le=he.isHorizontal,Re=he.placementName,xe=F.contentDom?F.contentDom.getBoundingClientRect()[le?"width":"height"]:0,ie=(le?Z:ve)||xe;F.setLevelAndScrolling(ee,Re,ie)},F.setLevelTransform=function($,ee,Z,ve){var he=F.props,le=he.placement,Re=he.levelMove,xe=he.duration,ie=he.ease,se=he.showMask;F.levelDom.forEach(function(re){re.style.transition="transform ".concat(xe," ").concat(ie),l(re,n,F.transitionEnd);var be=$?Z:0;if(Re){var q=T(Re,{target:re,open:$});be=$?q[0]:q[1]||0}var ne=typeof be=="number"?"".concat(be,"px"):be,Te=le==="left"||le==="top"?ne:"-".concat(ne);Te=se&&le==="right"&&ve?"calc(".concat(Te," + ").concat(ve,"px)"):Te,re.style.transform=be?"".concat(ee,"(").concat(Te,")"):""})},F.setLevelAndScrolling=function($,ee,Z){var ve=F.props.onChange;if(!i){var he=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(g.a)(!0):0;F.setLevelTransform($,ee,Z,he),F.toggleScrollingToDrawerAndBody(he)}ve&&ve($)},F.toggleScrollingToDrawerAndBody=function($){var ee=F.props,Z=ee.getOpenCount,ve=ee.getContainer,he=ee.showMask,le=ee.open,Re=ve&&ve(),xe=Z&&Z();if(Re&&Re.parentNode===document.body&&he){var ie=["touchstart"],se=[document.body,F.maskDom,F.handlerDom,F.contentDom];le&&document.body.style.overflow!=="hidden"?($&&F.addScrollingEffect($),xe===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",se.forEach(function(re,be){if(!re)return;l(re,ie[be]||"touchmove",be?F.removeMoveHandler:F.removeStartHandler,F.passive)})):F.getCurrentDrawerSome()&&(xe||(document.body.style.overflow=""),document.body.style.touchAction="",$&&F.remScrollingEffect($),se.forEach(function(re,be){if(!re)return;c(re,ie[be]||"touchmove",be?F.removeMoveHandler:F.removeStartHandler,F.passive)}))}},F.addScrollingEffect=function($){var ee=F.props,Z=ee.placement,ve=ee.duration,he=ee.ease,le=ee.getOpenCount,Re=ee.switchScrollingEffect,xe=le&&le();xe===1&&Re();var ie="width ".concat(ve," ").concat(he),se="transform ".concat(ve," ").concat(he);F.dom.style.transition="none";switch(Z){case"right":F.dom.style.transform="translateX(-".concat($,"px)");break;case"top":case"bottom":F.dom.style.width="calc(100% - ".concat($,"px)"),F.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(F.timeout),F.timeout=setTimeout(function(){F.dom&&(F.dom.style.transition="".concat(se,",").concat(ie),F.dom.style.width="",F.dom.style.transform="")})},F.remScrollingEffect=function($){var ee=F.props,Z=ee.placement,ve=ee.duration,he=ee.ease,le=ee.getOpenCount,Re=ee.switchScrollingEffect,xe=le&&le();xe||Re(!0),f&&(document.body.style.overflowX="hidden"),F.dom.style.transition="none";var ie,se="width ".concat(ve," ").concat(he),re="transform ".concat(ve," ").concat(he);switch(Z){case"left":{F.dom.style.width="100%",se="width 0s ".concat(he," ").concat(ve);break}case"right":{F.dom.style.transform="translateX(".concat($,"px)"),F.dom.style.width="100%",se="width 0s ".concat(he," ").concat(ve),F.maskDom&&(F.maskDom.style.left="-".concat($,"px"),F.maskDom.style.width="calc(100% + ".concat($,"px)"));break}case"top":case"bottom":{F.dom.style.width="calc(100% + ".concat($,"px)"),F.dom.style.height="100%",F.dom.style.transform="translateZ(0)",ie="height 0s ".concat(he," ").concat(ve);break}default:break}clearTimeout(F.timeout),F.timeout=setTimeout(function(){F.dom&&(F.dom.style.transition="".concat(re,",").concat(ie?"".concat(ie,","):"").concat(se),F.dom.style.transform="",F.dom.style.width="",F.dom.style.height="")})},F.getCurrentDrawerSome=function(){return!Object.keys(E).some(function($){return E[$]})},F.getLevelDom=function($){var ee=$.level,Z=$.getContainer;if(i)return;var ve=Z&&Z(),he=ve?ve.parentNode:null;if(F.levelDom=[],ee==="all"){var le=he?Array.prototype.slice.call(he.children):[];le.forEach(function(Re){Re.nodeName!=="SCRIPT"&&Re.nodeName!=="STYLE"&&Re.nodeName!=="LINK"&&Re!==ve&&F.levelDom.push(Re)})}else ee&&w(ee).forEach(function(Re){document.querySelectorAll(Re).forEach(function(xe){F.levelDom.push(xe)})})},F.getHorizontalBoolAndPlacementName=function(){var $=F.props.placement,ee=$==="left"||$==="right",Z="translate".concat(ee?"X":"Y");return{isHorizontal:ee,placementName:Z}},F.state={_self:Object(o.a)(F)},F}return Object(C.a)(B,[{key:"componentDidMount",value:function(){var F=this;if(!i){var $=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return $=!0,null}}))}catch(le){}this.passive=$?{passive:!1}:!1}var ee=this.props,Z=ee.open,ve=ee.getContainer,he=ve&&ve();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),Z&&(he&&he.parentNode===document.body&&(E[this.drawerId]=Z),this.openLevelTransition(),this.forceUpdate(function(){F.domFocus()}))}},{key:"componentDidUpdate",value:function(F){var $=this.props,ee=$.open,Z=$.getContainer,ve=Z&&Z();ee!==F.open&&(ee&&this.domFocus(),ve&&ve.parentNode===document.body&&(E[this.drawerId]=!!ee),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var F=this.props,$=F.getOpenCount,ee=F.open,Z=F.switchScrollingEffect,ve=typeof $=="function"&&$();delete E[this.drawerId],ee&&(this.setLevelTransform(!1),document.body.style.touchAction=""),ve||(document.body.style.overflow="",Z(!0))}},{key:"render",value:function(){var F,$=this,ee=this.props,Z=ee.className,ve=ee.children,he=ee.style,le=ee.width,Re=ee.height,xe=ee.defaultOpen,ie=ee.open,se=ee.prefixCls,re=ee.placement,be=ee.level,q=ee.levelMove,ne=ee.ease,Te=ee.duration,ae=ee.getContainer,J=ee.handler,X=ee.onChange,Q=ee.afterVisibleChange,pe=ee.showMask,ce=ee.maskClosable,we=ee.maskStyle,ze=ee.onClose,Ge=ee.onHandleClick,Qe=ee.keyboard,$e=ee.getOpenCount,rt=ee.switchScrollingEffect,et=Object(P.a)(ee,["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"]),Me=this.dom?ie:!1,Ce=x()(se,(F={},Object(a.a)(F,"".concat(se,"-").concat(re),!0),Object(a.a)(F,"".concat(se,"-open"),Me),Object(a.a)(F,Z||"",!!Z),Object(a.a)(F,"no-mask",!pe),F)),Ve=this.getHorizontalBoolAndPlacementName(),tt=Ve.placementName,He=re==="left"||re==="top"?"-100%":"100%",Je=Me?"":"".concat(tt,"(").concat(He,")"),_e=J&&d.cloneElement(J,{onClick:function(Oe){J.props.onClick&&J.props.onClick(),Ge&&Ge(Oe)},ref:function(Oe){$.handlerDom=Oe}});return d.createElement("div",Object.assign({},et,{tabIndex:-1,className:Ce,style:he,ref:function(Oe){$.dom=Oe},onKeyDown:Me&&Qe?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),pe&&d.createElement("div",{className:"".concat(se,"-mask"),onClick:ce?ze:void 0,style:we,ref:function(Oe){$.maskDom=Oe}}),d.createElement("div",{className:"".concat(se,"-content-wrapper"),style:{transform:Je,msTransform:Je,width:v(le)?"".concat(le,"px"):le,height:v(Re)?"".concat(Re,"px"):Re},ref:function(Oe){$.contentWrapper=Oe}},d.createElement("div",{className:"".concat(se,"-content"),ref:function(Oe){$.contentDom=Oe},onTouchStart:Me&&pe?this.removeStartHandler:void 0,onTouchMove:Me&&pe?this.removeMoveHandler:void 0},ve),_e))}}],[{key:"getDerivedStateFromProps",value:function(F,$){var ee=$.prevProps,Z=$._self,ve={prevProps:F};if(ee!==void 0){var he=F.placement,le=F.level;he!==ee.placement&&(Z.contentDom=null),le!==ee.level&&Z.getLevelDom(F)}return ve}}]),B}(d.Component);b.defaultProps={switchScrollingEffect:function(){}};var _=b;function I(H){var z=j();return function(){var W=Object(s.a)(H),F;if(z){var $=Object(s.a)(this).constructor;F=Reflect.construct(W,arguments,$)}else F=W.apply(this,arguments);return Object(h.a)(this,F)}}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(H){return!1}}var M=function(H){Object(R.a)(B,H);var z=I(B);function B(W){var F;Object(u.a)(this,B),F=z.call(this,W),F.onHandleClick=function(ee){var Z=F.props,ve=Z.onHandleClick,he=Z.open;if(ve&&ve(ee),typeof he=="undefined"){var le=F.state.open;F.setState({open:!le})}},F.onClose=function(ee){var Z=F.props,ve=Z.onClose,he=Z.open;ve&&ve(ee),typeof he=="undefined"&&F.setState({open:!1})};var $=typeof W.open!="undefined"?W.open:!!W.defaultOpen;return F.state={open:$},"onMaskClick"in W&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),F}return Object(C.a)(B,[{key:"render",value:function(){var F=this,$=this.props,ee=$.defaultOpen,Z=$.getContainer,ve=$.wrapperClassName,he=$.forceRender,le=$.handler,Re=Object(P.a)($,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),xe=this.state.open;if(!Z)return d.createElement("div",{className:ve,ref:function(re){F.dom=re}},d.createElement(_,Object.assign({},Re,{open:xe,handler:le,getContainer:function(){return F.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var ie=!!le||he;return d.createElement(S.a,{visible:xe,forceRender:ie,getContainer:Z,wrapperClassName:ve},function(se){var re=se.visible,be=se.afterClose,q=Object(P.a)(se,["visible","afterClose"]);return d.createElement(_,Object.assign({},Re,q,{open:re!==void 0?re:xe,afterVisibleChange:be!==void 0?be:Re.afterVisibleChange,handler:le,onClose:F.onClose,onHandleClick:F.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(F,$){var ee=$.prevProps,Z={prevProps:F};return typeof ee!="undefined"&&F.open!==ee.open&&(Z.open=F.open),Z}}]),B}(d.Component);M.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:d.createElement("div",{className:"drawer-handle"},d.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var G=M,K=Y.a=G},fyJ8:function(N,Y,k){"use strict";var P=k("rePB"),u=k("VTBJ"),C=k("Ff2n"),R=k("U8pU"),h=k("q1tI"),s=k.n(h),S=k("TSYQ"),d=k.n(S),a=k("c+Xe"),o=k("sR1s");function r(p){return p&&Object(R.a)(p)==="object"&&!Array.isArray(p)&&!h.isValidElement(p)}function x(p){return typeof p=="string"?!0:Object(a.c)(p)}function g(p,f){var n,l=p.prefixCls,c=p.className,T=p.record,v=p.index,i=p.dataIndex,L=p.render,A=p.children,y=p.component,E=y===void 0?"td":y,b=p.colSpan,_=p.rowSpan,I=p.fixLeft,j=p.fixRight,M=p.firstFixLeft,G=p.lastFixLeft,K=p.firstFixRight,H=p.lastFixRight,z=p.appendNode,B=p.additionalProps,W=B===void 0?{}:B,F=p.ellipsis,$=p.align,ee=p.rowType,Z=p.isSticky,ve="".concat(l,"-cell"),he,le;if(A)le=A;else{var Re=Object(o.b)(T,i);if(le=Re,L){var xe=L(Re,T,v);r(xe)?(le=xe.children,he=xe.props):le=xe}}Object(R.a)(le)==="object"&&!Array.isArray(le)&&!h.isValidElement(le)&&(le=null),F&&(G||K)&&(le=h.createElement("span",{className:"".concat(ve,"-content")},le));var ie=he||{},se=ie.colSpan,re=ie.rowSpan,be=ie.style,q=ie.className,ne=Object(C.a)(ie,["colSpan","rowSpan","style","className"]),Te=se!==void 0?se:b,ae=re!==void 0?re:_;if(Te===0||ae===0)return null;var J={},X=typeof I=="number",Q=typeof j=="number";X&&(J.position="sticky",J.left=I),Q&&(J.position="sticky",J.right=j);var pe={};$&&(pe.textAlign=$);var ce,we=F===!0?{showTitle:!0}:F;we&&(we.showTitle||ee==="header")&&(typeof le=="string"||typeof le=="number"?ce=le.toString():h.isValidElement(le)&&typeof le.props.children=="string"&&(ce=le.props.children));var ze=Object(u.a)(Object(u.a)(Object(u.a)({title:ce},ne),W),{},{colSpan:Te&&Te!==1?Te:null,rowSpan:ae&&ae!==1?ae:null,className:d()(ve,c,(n={},Object(P.a)(n,"".concat(ve,"-fix-left"),X),Object(P.a)(n,"".concat(ve,"-fix-left-first"),M),Object(P.a)(n,"".concat(ve,"-fix-left-last"),G),Object(P.a)(n,"".concat(ve,"-fix-right"),Q),Object(P.a)(n,"".concat(ve,"-fix-right-first"),K),Object(P.a)(n,"".concat(ve,"-fix-right-last"),H),Object(P.a)(n,"".concat(ve,"-ellipsis"),F),Object(P.a)(n,"".concat(ve,"-with-append"),z),Object(P.a)(n,"".concat(ve,"-fix-sticky"),(X||Q)&&Z),n),W.className,q),style:Object(u.a)(Object(u.a)(Object(u.a)(Object(u.a)({},W.style),pe),J),be),ref:x(E)?f:null});return h.createElement(E,Object.assign({},ze),z,le)}var m=h.forwardRef(g);m.displayName="Cell";var w=h.memo(m,function(p,f){return f.shouldCellUpdate?!f.shouldCellUpdate(f.record,p.record):!1});Y.a=w},gRFJ:function(N,Y,k){N.exports=[k("rdUC"),k("ynwM"),k("RELg"),k("DlR+"),k("CrYA"),k("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(N){return N<10?"0"+N:N}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(N){return rx_escapable.lastIndex=0,rx_escapable.test(N)?'"'+N.replace(rx_escapable,function(Y){var k=meta[Y];return typeof k=="string"?k:"\\u"+("0000"+Y.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+N+'"'}function str(N,Y){var k,P,u,C,R=gap,h,s=Y[N];s&&typeof s=="object"&&typeof s.toJSON=="function"&&(s=s.toJSON(N)),typeof rep=="function"&&(s=rep.call(Y,N,s));switch(typeof s){case"string":return quote(s);case"number":return isFinite(s)?String(s):"null";case"boolean":case"null":return String(s);case"object":if(!s)return"null";if(gap+=indent,h=[],Object.prototype.toString.apply(s)==="[object Array]"){for(C=s.length,k=0;kK.length)&&(H=K.length);for(var z=0,B=new Array(H);z=0)continue;if(!Object.prototype.propertyIsEnumerable.call(K,B))continue;z[B]=K[B]}}return z}function w(K,H){if(K==null)return{};var z={},B=Object.keys(K),W,F;for(F=0;F=0)continue;z[W]=K[W]}return z}var p=function(H){var z=H.className,B=H.percent,W=H.prefixCls,F=H.strokeColor,$=H.strokeLinecap,ee=H.strokeWidth,Z=H.style,ve=H.trailColor,he=H.trailWidth,le=H.transition,Re=m(H,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Re.gapPosition;var xe=Array.isArray(B)?B:[B],ie=Array.isArray(F)?F:[F],se=s(xe),re=d(se,1),be=re[0],q=ee/2,ne=100-ee/2,Te="M ".concat($==="round"?q:0,",").concat(q,` L `).concat($==="round"?ne:100,",").concat(q),ae="0 0 100 ".concat(ee),J=0;return u.a.createElement("svg",S({className:R()("".concat(W,"-line"),z),viewBox:ae,preserveAspectRatio:"none",style:Z},Re),u.a.createElement("path",{className:"".concat(W,"-line-trail"),d:Te,strokeLinecap:$,stroke:ve,strokeWidth:he||ee,fillOpacity:"0"}),xe.map(function(X,Q){var pe={strokeDasharray:"".concat(X,"px, 100px"),strokeDashoffset:"-".concat(J,"px"),transition:le||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ce=ie[Q]||ie[ie.length-1];return J+=X,u.a.createElement("path",{key:Q,className:"".concat(W,"-line-path"),d:Te,strokeLinecap:$,stroke:ce,strokeWidth:ee,fillOpacity:"0",ref:be[Q],style:pe})}))};p.defaultProps=h;var f=p;function n(){return n=Object.assign||function(K){for(var H=1;HK.length)&&(H=K.length);for(var z=0,B=new Array(H);z=0)continue;if(!Object.prototype.propertyIsEnumerable.call(K,B))continue;z[B]=K[B]}}return z}function y(K,H){if(K==null)return{};var z={},B=Object.keys(K),W,F;for(F=0;F=0)continue;z[W]=K[W]}return z}var E=0;function b(K){return+K.replace("%","")}function _(K){return Array.isArray(K)?K:[K]}function I(K,H,z,B){var W=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,F=arguments.length>5?arguments[5]:void 0,$=50-B/2,ee=0,Z=-$,ve=0,he=-2*$;switch(F){case"left":ee=-$,Z=0,ve=2*$,he=0;break;case"right":ee=$,Z=0,ve=-2*$,he=0;break;case"bottom":Z=$,he=2*$;break;default:}var le="M 50,50 m ".concat(ee,",").concat(Z,` a `).concat($,",").concat($," 0 1 1 ").concat(ve,",").concat(-he,` a `).concat($,",").concat($," 0 1 1 ").concat(-ve,",").concat(he),Re=Math.PI*2*$,xe={stroke:z,strokeDasharray:"".concat(H/100*(Re-W),"px ").concat(Re,"px"),strokeDashoffset:"-".concat(W/2+K/100*(Re-W),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:le,pathStyle:xe}}var j=function(H){var z=H.prefixCls,B=H.strokeWidth,W=H.trailWidth,F=H.gapDegree,$=H.gapPosition,ee=H.trailColor,Z=H.strokeLinecap,ve=H.style,he=H.className,le=H.strokeColor,Re=H.percent,xe=A(H,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ie=Object(P.useMemo)(function(){return E+=1,E},[]),se=I(0,100,ee,B,F,$),re=se.pathString,be=se.pathStyle,q=_(Re),ne=_(le),Te=ne.find(function(pe){return Object.prototype.toString.call(pe)==="[object Object]"}),ae=s(q),J=l(ae,1),X=J[0],Q=function(){var ce=0;return q.map(function(we,ze){var Ge=ne[ze]||ne[ne.length-1],Qe=Object.prototype.toString.call(Ge)==="[object Object]"?"url(#".concat(z,"-gradient-").concat(ie,")"):"",$e=I(ce,we,Ge,B,F,$);return ce+=we,u.a.createElement("path",{key:ze,className:"".concat(z,"-circle-path"),d:$e.pathString,stroke:Qe,strokeLinecap:Z,strokeWidth:B,opacity:we===0?0:1,fillOpacity:"0",style:$e.pathStyle,ref:X[ze]})})};return u.a.createElement("svg",n({className:R()("".concat(z,"-circle"),he),viewBox:"0 0 100 100",style:ve},xe),Te&&u.a.createElement("defs",null,u.a.createElement("linearGradient",{id:"".concat(z,"-gradient-").concat(ie),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Te).sort(function(pe,ce){return b(pe)-b(ce)}).map(function(pe,ce){return u.a.createElement("stop",{key:ce,offset:pe,stopColor:Te[pe]})}))),u.a.createElement("path",{className:"".concat(z,"-circle-trail"),d:re,stroke:ee,strokeLinecap:Z,strokeWidth:W||B,fillOpacity:"0",style:be}),Q().reverse())};j.defaultProps=h;var M=j,G={Line:f,Circle:M}},hW8S:function(N,Y,k){"use strict";k.d(Y,"a",function(){return R}),k.d(Y,"c",function(){return h}),k.d(Y,"b",function(){return s});var P=k("VTBJ"),u=k("Ff2n"),C=k("Kwbf"),R="RC_TABLE_INTERNAL_COL_DEFINE";function h(S){var d=S.expandable,a=Object(u.a)(S,["expandable"]);return"expandable"in S?Object(P.a)(Object(P.a)({},a),d):a}function s(S){return Object.keys(S).reduce(function(d,a){return(a.substr(0,5)==="data-"||a.substr(0,5)==="aria-")&&(d[a]=S[a]),d},{})}},i3hx:function(N,Y,k){},jO9C:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return P.pad.Iso97971={pad:function(u,C){u.concat(P.lib.WordArray.create([2147483648],1)),P.pad.ZeroPadding.pad(u,C)},unpad:function(u){P.pad.ZeroPadding.unpad(u),u.sigBytes--}},P.pad.Iso97971})},je13:function(N,Y,k){var P=k("5nXd"),u=k("gRFJ"),C=[k("uQRt")];N.exports=P.createStore(u,C)},k3GJ:function(N,Y,k){"use strict";k.d(Y,"a",function(){return hn});var P=k("rePB"),u=k("ODXe"),C=k("Ff2n"),R=k("VTBJ"),h=k("q1tI"),s=k("TSYQ"),S=k.n(s),d=k("Zm9Q"),a=k("6cGi"),o=k("KQm4"),r=k("xEkU"),x=k.n(r),g=k("t23M");function m(Le){var Ue=Object(h.useRef)(),Ke=Object(h.useRef)(!1);function Pe(){for(var fe=arguments.length,Ae=new Array(fe),ge=0;geYe&&(ut=Ye-ct),Object(h.useMemo)(function(){if(!Ae.length)return[0,0];for(var gt=Ae.length,Mt=gt,qt=0;qtFe+ut){Mt=qt-1;break}}for(var tr=0,lr=gt-1;lr>=0;lr-=1){var or=Le.get(Ae[lr].key)||T;if(or[We]1&&arguments[1]!==void 0?arguments[1]:!1,Pe=Ue&&typeof Ue.getBoundingClientRect=="function"&&Ue.getBoundingClientRect().width;if(Pe){if(Ke){var fe=getComputedStyle(Ue),Ae=fe.marginLeft,ge=fe.marginRight;Pe+=+Ae.replace("px","")+ +ge.replace("px","")}Pe=+Pe.toFixed(6)}return Pe||0},ce=function(Ue,Ke,Pe){Ue&&Object(K.a)(Ue.style)==="object"&&(Ue.style[Ke]=Pe)},we=function(){return q.any},ze=k("bdgK"),Ge=k("i8i4"),Qe=k.n(Ge),$e=k("wgJM"),rt=k("l4aY"),et=k("m+aA"),Me=k("c+Xe"),Ce=k("zT1h"),Ve=k("QC+M");function tt(Le,Ue,Ke){return Ke?Le[0]===Ue[0]:Le[0]===Ue[0]&&Le[1]===Ue[1]}function He(Le,Ue,Ke){var Pe=Le[Ue]||{};return Object(R.a)(Object(R.a)({},Pe),Ke)}function Je(Le,Ue,Ke,Pe){for(var fe=Ke.points,Ae=Object.keys(Le),ge=0;ge1&&arguments[1]!==void 0?arguments[1]:2;Ue();var Ae=Object($e.a)(function(){fe<=1?Pe({isCanceled:function(){return Ae!==Le.current}}):Ke(Pe,fe-1)});Le.current=Ae}return h.useEffect(function(){return function(){Ue()}},[]),[Ke,Ue]},aa=[Lt,Er,fr,Wt],pt=!1,Tt=!0;function ht(Le){return Le===fr||Le===Wt}var Tr=function(Le,Ue){var Ke=h.useState(xr),Pe=Object(u.a)(Ke,2),fe=Pe[0],Ae=Pe[1],ge=wr(),ke=Object(u.a)(ge,2),Ne=ke[0],We=ke[1];function Fe(){Ae(Lt)}return Tn(function(){if(fe!==xr&&fe!==Wt){var Ye=aa.indexOf(fe),at=aa[Ye+1],ct=Ue(fe);ct===pt?Ae(at):Ne(function(ut){function gt(){if(ut.isCanceled())return;Ae(at)}ct===!0?gt():Promise.resolve(ct).then(gt)})}},[Le,fe]),h.useEffect(function(){return function(){We()}},[]),[Fe,fe]},Rr=function(Le){var Ue=Object(h.useRef)(),Ke=Object(h.useRef)(Le);Ke.current=Le;var Pe=h.useCallback(function(ge){Ke.current(ge)},[]);function fe(ge){ge&&(ge.removeEventListener(jt,Pe),ge.removeEventListener(ft,Pe))}function Ae(ge){Ue.current&&Ue.current!==ge&&fe(Ue.current),ge&&ge!==Ue.current&&(ge.addEventListener(jt,Pe),ge.addEventListener(ft,Pe),Ue.current=ge)}return h.useEffect(function(){return function(){fe(Ue.current)}},[]),[Ae,fe]};function Pt(Le,Ue,Ke,Pe){var fe=Pe.motionEnter,Ae=fe===void 0?!0:fe,ge=Pe.motionAppear,ke=ge===void 0?!0:ge,Ne=Pe.motionLeave,We=Ne===void 0?!0:Ne,Fe=Pe.motionDeadline,Ye=Pe.motionLeaveImmediately,at=Pe.onAppearPrepare,ct=Pe.onEnterPrepare,ut=Pe.onLeavePrepare,gt=Pe.onAppearStart,Mt=Pe.onEnterStart,qt=Pe.onLeaveStart,er=Pe.onAppearActive,tr=Pe.onEnterActive,lr=Pe.onLeaveActive,or=Pe.onAppearEnd,rr=Pe.onEnterEnd,Or=Pe.onLeaveEnd,gr=Pe.onVisibleChanged,pn=Xt(),vr=Object(u.a)(pn,2),Ft=vr[0],It=vr[1],yr=Xt(xt),Ar=Object(u.a)(yr,2),Dt=Ar[0],Dr=Ar[1],mn=Xt(null),Nr=Object(u.a)(mn,2),Qr=Nr[0],Vr=Nr[1],An=Object(h.useRef)(!1),zn=Object(h.useRef)(null),bn=Object(h.useRef)(!1),oa=Object(h.useRef)(null);function Oa(){var nn=Ke();return nn||oa.current}var da=Object(h.useRef)(!1);function Gn(nn){var Kr=Oa();if(nn&&!nn.deadline&&nn.target!==Kr)return;var Xn;Dt===Yt&&da.current?Xn=or==null?void 0:or(Kr,nn):Dt===$t&&da.current?Xn=rr==null?void 0:rr(Kr,nn):Dt===Vt&&da.current&&(Xn=Or==null?void 0:Or(Kr,nn)),Xn!==!1&&!bn.current&&(Dr(xt),Vr(null))}var sn=Rr(Gn),Zr=Object(u.a)(sn,1),xn=Zr[0],gn=h.useMemo(function(){var nn,Kr,Xn;switch(Dt){case"appear":return nn={},Object(P.a)(nn,Lt,at),Object(P.a)(nn,Er,gt),Object(P.a)(nn,fr,er),nn;case"enter":return Kr={},Object(P.a)(Kr,Lt,ct),Object(P.a)(Kr,Er,Mt),Object(P.a)(Kr,fr,tr),Kr;case"leave":return Xn={},Object(P.a)(Xn,Lt,ut),Object(P.a)(Xn,Er,qt),Object(P.a)(Xn,fr,lr),Xn;default:return{}}},[Dt]),Aa=Tr(Dt,function(nn){if(nn===Lt){var Kr=gn[Lt];return Kr?Kr(Oa()):pt}if(Yr in gn){var Xn;Vr(((Xn=gn[Yr])===null||Xn===void 0?void 0:Xn.call(gn,Oa(),null))||null)}return Yr===fr&&(xn(Oa()),Fe>0&&(clearTimeout(zn.current),zn.current=setTimeout(function(){Gn({deadline:!0})},Fe))),Tt}),$a=Object(u.a)(Aa,2),Ja=$a[0],Yr=$a[1],Fa=ht(Yr);da.current=Fa,Tn(function(){It(Ue);var nn=An.current;if(An.current=!0,!Le)return;var Kr;!nn&&Ue&&ke&&(Kr=Yt),nn&&Ue&&Ae&&(Kr=$t),(nn&&!Ue&&We||!nn&&Ye&&!Ue&&We)&&(Kr=Vt),Kr&&(Dr(Kr),Ja())},[Ue]),Object(h.useEffect)(function(){(Dt===Yt&&!ke||Dt===$t&&!Ae||Dt===Vt&&!We)&&Dr(xt)},[ke,Ae,We]),Object(h.useEffect)(function(){return function(){clearTimeout(zn.current),bn.current=!0}},[]),Object(h.useEffect)(function(){Ft!==void 0&&Dt===xt&&(gr==null||gr(Ft))},[Ft,Dt]);var Qa=Qr;return gn[Lt]&&Yr===Er&&(Qa=Object(R.a)({transition:"none"},Qa)),[Dt,Yr,Qa,Ft!=null?Ft:Ue]}var _t=function(Le){Object(E.a)(Ke,Le);var Ue=Object(b.a)(Ke);function Ke(){return Object(L.a)(this,Ke),Ue.apply(this,arguments)}return Object(A.a)(Ke,[{key:"render",value:function(){return this.props.children}}]),Ke}(h.Component),Lr=_t;function cn(Le){var Ue=Le;Object(K.a)(Le)==="object"&&(Ue=Le.transitionSupport);function Ke(fe){return!!(fe.motionName&&Ue)}var Pe=h.forwardRef(function(fe,Ae){var ge=fe.visible,ke=ge===void 0?!0:ge,Ne=fe.removeOnLeave,We=Ne===void 0?!0:Ne,Fe=fe.forceRender,Ye=fe.children,at=fe.motionName,ct=fe.leavedClassName,ut=fe.eventProps,gt=Ke(fe),Mt=Object(h.useRef)(),qt=Object(h.useRef)();function er(){try{return Object(et.a)(Mt.current||qt.current)}catch(Dr){return null}}var tr=Pt(gt,ke,er,fe),lr=Object(u.a)(tr,4),or=lr[0],rr=lr[1],Or=lr[2],gr=lr[3],pn=h.useRef(gr);gr&&(pn.current=!0);var vr=Object(h.useRef)(Ae);vr.current=Ae;var Ft=h.useCallback(function(Dr){Mt.current=Dr,Object(Me.b)(vr.current,Dr)},[]),It,yr=Object(R.a)(Object(R.a)({},ut),{},{visible:ke});if(!Ye)It=null;else if(or===xt||!Ke(fe))gr?It=Ye(Object(R.a)({},yr),Ft):!We&&pn.current?It=Ye(Object(R.a)(Object(R.a)({},yr),{},{className:ct}),Ft):Fe?It=Ye(Object(R.a)(Object(R.a)({},yr),{},{style:{display:"none"}}),Ft):It=null;else{var Ar,Dt;rr===Lt?Dt="prepare":ht(rr)?Dt="active":rr===Er&&(Dt="start"),It=Ye(Object(R.a)(Object(R.a)({},yr),{},{className:S()(Ct(at,or),(Ar={},Object(P.a)(Ar,Ct(at,"".concat(or,"-").concat(Dt)),Dt),Object(P.a)(Ar,at,typeof at=="string"),Ar)),style:Or}),Ft)}return h.createElement(Lr,{ref:qt},It)});return Pe.displayName="CSSMotion",Pe}var Mr=cn(Et),ot="add",Ot="keep",lt="remove",un="removed";function Sn(Le){var Ue;return Le&&Object(K.a)(Le)==="object"&&"key"in Le?Ue=Le:Ue={key:Le},Object(R.a)(Object(R.a)({},Ue),{},{key:String(Ue.key)})}function dn(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Le.map(Sn)}function jr(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ke=[],Pe=0,fe=Ue.length,Ae=dn(Le),ge=dn(Ue);Ae.forEach(function(We){for(var Fe=!1,Ye=Pe;Ye1});return Ne.forEach(function(We){Ke=Ke.filter(function(Fe){var Ye=Fe.key,at=Fe.status;return Ye!==We||at!==lt}),Ke.forEach(function(Fe){Fe.key===We&&(Fe.status=Ot)})}),Ke}var wt=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function fn(Le){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mr,Ke=function(Pe){Object(E.a)(Ae,Pe);var fe=Object(b.a)(Ae);function Ae(){var ge;return Object(L.a)(this,Ae),ge=fe.apply(this,arguments),ge.state={keyEntities:[]},ge.removeKey=function(ke){ge.setState(function(Ne){var We=Ne.keyEntities;return{keyEntities:We.map(function(Fe){return Fe.key!==ke?Fe:Object(R.a)(Object(R.a)({},Fe),{},{status:un})})}})},ge}return Object(A.a)(Ae,[{key:"render",value:function(){var ke=this,Ne=this.state.keyEntities,We=this.props,Fe=We.component,Ye=We.children,at=We.onVisibleChanged,ct=Object(C.a)(We,["component","children","onVisibleChanged"]),ut=Fe||h.Fragment,gt={};return wt.forEach(function(Mt){gt[Mt]=ct[Mt],delete ct[Mt]}),delete ct.keys,h.createElement(ut,ct,Ne.map(function(Mt){var qt=Mt.status,er=Object(C.a)(Mt,["status"]),tr=qt===ot||qt===Ot;return h.createElement(Ue,Object(i.a)({},gt,{key:er.key,visible:tr,eventProps:er,onVisibleChanged:function(or){at==null||at(or,{key:er.key}),or||ke.removeKey(er.key)}}),Ye)}))}}],[{key:"getDerivedStateFromProps",value:function(ke,Ne){var We=ke.keys,Fe=Ne.keyEntities,Ye=dn(We),at=jr(Fe,Ye);return{keyEntities:at.filter(function(ct){var ut=Fe.find(function(gt){var Mt=gt.key;return ct.key===Mt});return!(ut&&ut.status===un&&ct.status===lt)})}}}]),Ae}(h.Component);return Ke.defaultProps={component:"div"},Ke}var Fr=fn(Et),sr=Mr;function nr(Le){var Ue=Le.prefixCls,Ke=Le.motion,Pe=Le.animation,fe=Le.transitionName;return Ke||(Pe?{motionName:"".concat(Ue,"-").concat(Pe)}:fe?{motionName:fe}:null)}function qn(Le){var Ue=Le.prefixCls,Ke=Le.visible,Pe=Le.zIndex,fe=Le.mask,Ae=Le.maskMotion,ge=Le.maskAnimation,ke=Le.maskTransitionName;if(!fe)return null;var Ne={};return(Ae||ke||ge)&&(Ne=Object(R.a)({motionAppear:!0},nr({motion:Ae,prefixCls:Ue,transitionName:ke,animation:ge}))),h.createElement(sr,Object(i.a)({},Ne,{visible:Ke,removeOnLeave:!0}),function(We){var Fe=We.className;return h.createElement("div",{style:{zIndex:Pe},className:S()("".concat(Ue,"-mask"),Fe)})})}var Rn=k("9mu1"),an=k("o0o1"),ea=k.n(an),ta=k("HaE+"),Cn=["measure","align",null,"motion"],Sr=function(Le,Ue){var Ke=Object(h.useState)(null),Pe=Object(u.a)(Ke,2),fe=Pe[0],Ae=Pe[1],ge=Object(h.useRef)(),ke=Object(h.useRef)(!1);function Ne(Ye){ke.current||Ae(Ye)}function We(){$e.a.cancel(ge.current)}function Fe(Ye){We(),ge.current=Object($e.a)(function(){Ne(function(at){switch(fe){case"align":return"motion";case"motion":return"stable";default:}return at}),Ye==null||Ye()})}return Object(h.useEffect)(function(){Ne("measure")},[Le]),Object(h.useEffect)(function(){switch(fe){case"measure":Ue();break;default:}fe&&(ge.current=Object($e.a)(Object(ta.a)(ea.a.mark(function Ye(){var at,ct;return ea.a.wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:at=Cn.indexOf(fe),ct=Cn[at+1],ct&&at!==-1&&Ne(ct);case 3:case"end":return gt.stop()}},Ye)}))))},[fe]),Object(h.useEffect)(function(){return function(){ke.current=!0,We()}},[]),[fe,Fe]},Ln=function(Le){var Ue=h.useState({width:0,height:0}),Ke=Object(u.a)(Ue,2),Pe=Ke[0],fe=Ke[1];function Ae(ke){fe({width:ke.offsetWidth,height:ke.offsetHeight})}var ge=h.useMemo(function(){var ke={};if(Le){var Ne=Pe.width,We=Pe.height;Le.indexOf("height")!==-1&&We?ke.height=We:Le.indexOf("minHeight")!==-1&&We&&(ke.minHeight=We),Le.indexOf("width")!==-1&&Ne?ke.width=Ne:Le.indexOf("minWidth")!==-1&&Ne&&(ke.minWidth=Ne)}return ke},[Le,Pe]);return[ge,Ae]},vn=h.forwardRef(function(Le,Ue){var Ke=Le.visible,Pe=Le.prefixCls,fe=Le.className,Ae=Le.style,ge=Le.children,ke=Le.zIndex,Ne=Le.stretch,We=Le.destroyPopupOnHide,Fe=Le.forceRender,Ye=Le.align,at=Le.point,ct=Le.getRootDomNode,ut=Le.getClassNameFromAlign,gt=Le.onAlign,Mt=Le.onMouseEnter,qt=Le.onMouseLeave,er=Le.onMouseDown,tr=Le.onTouchStart,lr=Object(h.useRef)(),or=Object(h.useRef)(),rr=Object(h.useState)(),Or=Object(u.a)(rr,2),gr=Or[0],pn=Or[1],vr=Ln(Ne),Ft=Object(u.a)(vr,2),It=Ft[0],yr=Ft[1];function Ar(){Ne&&yr(ct())}var Dt=Sr(Ke,Ar),Dr=Object(u.a)(Dt,2),mn=Dr[0],Nr=Dr[1],Qr=Object(h.useRef)();function Vr(){return at||ct}function An(){var sn;(sn=lr.current)===null||sn===void 0||sn.forceAlign()}function zn(sn,Zr){var xn=ut(Zr);gr!==xn&&pn(xn),mn==="align"&&(gr!==xn?Promise.resolve().then(function(){An()}):Nr(function(){var gn;(gn=Qr.current)===null||gn===void 0||gn.call(Qr)}),gt==null||gt(sn,Zr))}var bn=Object(R.a)({},nr(Le));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(sn){var Zr=bn[sn];bn[sn]=function(xn,gn){return Nr(),Zr==null?void 0:Zr(xn,gn)}});function oa(){return new Promise(function(sn){Qr.current=sn})}h.useEffect(function(){!bn.motionName&&mn==="motion"&&Nr()},[bn.motionName,mn]),h.useImperativeHandle(Ue,function(){return{forceAlign:An,getElement:function(){return or.current}}});var Oa=Object(R.a)(Object(R.a)({},It),{},{zIndex:ke,opacity:mn==="motion"||mn==="stable"||!Ke?void 0:0,pointerEvents:mn==="stable"?void 0:"none"},Ae),da=!0;(Ye==null?void 0:Ye.points)&&(mn==="align"||mn==="stable")&&(da=!1);var Gn=ge;return h.Children.count(ge)>1&&(Gn=h.createElement("div",{className:"".concat(Pe,"-content")},ge)),h.createElement(sr,Object(i.a)({visible:Ke,ref:or,leavedClassName:"".concat(Pe,"-hidden")},bn,{onAppearPrepare:oa,onEnterPrepare:oa,removeOnLeave:We,forceRender:Fe}),function(sn,Zr){var xn=sn.className,gn=sn.style,Aa=S()(Pe,fe,gr,xn);return h.createElement(Rn.a,{target:Vr(),key:"popup",ref:lr,monitorWindowResize:!0,disabled:da,align:Ye,onAlign:zn},h.createElement("div",{ref:Zr,className:Aa,onMouseEnter:Mt,onMouseLeave:qt,onMouseDownCapture:er,onTouchStartCapture:tr,style:Object(R.a)(Object(R.a)({},gn),Oa)},Gn))})});vn.displayName="PopupInner";var on=vn,Jt=h.forwardRef(function(Le,Ue){var Ke=Le.prefixCls,Pe=Le.visible,fe=Le.zIndex,Ae=Le.children,ge=Le.mobile;ge=ge===void 0?{}:ge;var ke=ge.popupClassName,Ne=ge.popupStyle,We=ge.popupMotion,Fe=We===void 0?{}:We,Ye=ge.popupRender,at=h.useRef();h.useImperativeHandle(Ue,function(){return{forceAlign:function(){},getElement:function(){return at.current}}});var ct=Object(R.a)({zIndex:fe},Ne),ut=Ae;return h.Children.count(Ae)>1&&(ut=h.createElement("div",{className:"".concat(Ke,"-content")},Ae)),Ye&&(ut=Ye(ut)),h.createElement(sr,Object(i.a)({visible:Pe,ref:at,removeOnLeave:!0},Fe),function(gt,Mt){var qt=gt.className,er=gt.style,tr=S()(Ke,ke,qt);return h.createElement("div",{ref:Mt,className:tr,style:Object(R.a)(Object(R.a)({},er),ct)},ut)})});Jt.displayName="MobilePopupInner";var zr=Jt,Gt=["visible","mobile"],kt=h.forwardRef(function(Le,Ue){var Ke=Le.visible,Pe=Le.mobile,fe=Object(C.a)(Le,Gt),Ae=Object(h.useState)(Ke),ge=Object(u.a)(Ae,2),ke=ge[0],Ne=ge[1],We=Object(h.useState)(!1),Fe=Object(u.a)(We,2),Ye=Fe[0],at=Fe[1],ct=Object(R.a)(Object(R.a)({},fe),{},{visible:ke});Object(h.useEffect)(function(){Ne(Ke),Ke&&Pe&&at(_e())},[Ke,Pe]);var ut=Ye?h.createElement(zr,Object(i.a)({},ct,{mobile:Pe,ref:Ue})):h.createElement(on,Object(i.a)({},ct,{ref:Ue}));return h.createElement("div",null,h.createElement(qn,ct),ut)});kt.displayName="Popup";var Qt=kt,hr=h.createContext(null),Ir=hr;function Jr(){}function Mn(){return""}function Ba(Le){return Le?Le.ownerDocument:window.document}var wa=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Ma(Le){var Ue=function(Ke){Object(E.a)(fe,Ke);var Pe=Object(b.a)(fe);function fe(Ae){var ge;Object(L.a)(this,fe),ge=Pe.call(this,Ae),ge.popupRef=h.createRef(),ge.triggerRef=h.createRef(),ge.attachId=void 0,ge.clickOutsideHandler=void 0,ge.touchOutsideHandler=void 0,ge.contextMenuOutsideHandler1=void 0,ge.contextMenuOutsideHandler2=void 0,ge.mouseDownTimeout=void 0,ge.focusTime=void 0,ge.preClickTime=void 0,ge.preTouchTime=void 0,ge.delayTimer=void 0,ge.hasPopupMouseDown=void 0,ge.onMouseEnter=function(Ne){var We=ge.props.mouseEnterDelay;ge.fireEvents("onMouseEnter",Ne),ge.delaySetPopupVisible(!0,We,We?null:Ne)},ge.onMouseMove=function(Ne){ge.fireEvents("onMouseMove",Ne),ge.setPoint(Ne)},ge.onMouseLeave=function(Ne){ge.fireEvents("onMouseLeave",Ne),ge.delaySetPopupVisible(!1,ge.props.mouseLeaveDelay)},ge.onPopupMouseEnter=function(){ge.clearDelayTimer()},ge.onPopupMouseLeave=function(Ne){var We;if(Ne.relatedTarget&&!Ne.relatedTarget.setTimeout&&Object(rt.a)((We=ge.popupRef.current)===null||We===void 0?void 0:We.getElement(),Ne.relatedTarget))return;ge.delaySetPopupVisible(!1,ge.props.mouseLeaveDelay)},ge.onFocus=function(Ne){ge.fireEvents("onFocus",Ne),ge.clearDelayTimer(),ge.isFocusToShow()&&(ge.focusTime=Date.now(),ge.delaySetPopupVisible(!0,ge.props.focusDelay))},ge.onMouseDown=function(Ne){ge.fireEvents("onMouseDown",Ne),ge.preClickTime=Date.now()},ge.onTouchStart=function(Ne){ge.fireEvents("onTouchStart",Ne),ge.preTouchTime=Date.now()},ge.onBlur=function(Ne){ge.fireEvents("onBlur",Ne),ge.clearDelayTimer(),ge.isBlurToHide()&&ge.delaySetPopupVisible(!1,ge.props.blurDelay)},ge.onContextMenu=function(Ne){Ne.preventDefault(),ge.fireEvents("onContextMenu",Ne),ge.setPopupVisible(!0,Ne)},ge.onContextMenuClose=function(){ge.isContextMenuToShow()&&ge.close()},ge.onClick=function(Ne){if(ge.fireEvents("onClick",Ne),ge.focusTime){var We;if(ge.preClickTime&&ge.preTouchTime?We=Math.min(ge.preClickTime,ge.preTouchTime):ge.preClickTime?We=ge.preClickTime:ge.preTouchTime&&(We=ge.preTouchTime),Math.abs(We-ge.focusTime)<20)return;ge.focusTime=0}ge.preClickTime=0,ge.preTouchTime=0,ge.isClickToShow()&&(ge.isClickToHide()||ge.isBlurToHide())&&Ne&&Ne.preventDefault&&Ne.preventDefault();var Fe=!ge.state.popupVisible;(ge.isClickToHide()&&!Fe||Fe&&ge.isClickToShow())&&ge.setPopupVisible(!ge.state.popupVisible,Ne)},ge.onPopupMouseDown=function(){if(ge.hasPopupMouseDown=!0,clearTimeout(ge.mouseDownTimeout),ge.mouseDownTimeout=window.setTimeout(function(){ge.hasPopupMouseDown=!1},0),ge.context){var Ne;(Ne=ge.context).onPopupMouseDown.apply(Ne,arguments)}},ge.onDocumentClick=function(Ne){if(ge.props.mask&&!ge.props.maskClosable)return;var We=Ne.target,Fe=ge.getRootDomNode(),Ye=ge.getPopupDomNode();(!Object(rt.a)(Fe,We)||ge.isContextMenuOnly())&&!Object(rt.a)(Ye,We)&&!ge.hasPopupMouseDown&&ge.close()},ge.getRootDomNode=function(){var Ne=ge.props.getTriggerDOMNode;if(Ne)return Ne(ge.triggerRef.current);try{var We=Object(et.a)(ge.triggerRef.current);if(We)return We}catch(Fe){}return Qe.a.findDOMNode(Object(y.a)(ge))},ge.getPopupClassNameFromAlign=function(Ne){var We=[],Fe=ge.props,Ye=Fe.popupPlacement,at=Fe.builtinPlacements,ct=Fe.prefixCls,ut=Fe.alignPoint,gt=Fe.getPopupClassNameFromAlign;return Ye&&at&&We.push(Je(at,ct,Ne,ut)),gt&&We.push(gt(Ne)),We.join(" ")},ge.getComponent=function(){var Ne=ge.props,We=Ne.prefixCls,Fe=Ne.destroyPopupOnHide,Ye=Ne.popupClassName,at=Ne.onPopupAlign,ct=Ne.popupMotion,ut=Ne.popupAnimation,gt=Ne.popupTransitionName,Mt=Ne.popupStyle,qt=Ne.mask,er=Ne.maskAnimation,tr=Ne.maskTransitionName,lr=Ne.maskMotion,or=Ne.zIndex,rr=Ne.popup,Or=Ne.stretch,gr=Ne.alignPoint,pn=Ne.mobile,vr=Ne.forceRender,Ft=ge.state,It=Ft.popupVisible,yr=Ft.point,Ar=ge.getPopupAlign(),Dt={};return ge.isMouseEnterToShow()&&(Dt.onMouseEnter=ge.onPopupMouseEnter),ge.isMouseLeaveToHide()&&(Dt.onMouseLeave=ge.onPopupMouseLeave),Dt.onMouseDown=ge.onPopupMouseDown,Dt.onTouchStart=ge.onPopupMouseDown,h.createElement(Qt,Object(i.a)({prefixCls:We,destroyPopupOnHide:Fe,visible:It,point:gr&&yr,className:Ye,align:Ar,onAlign:at,animation:ut,getClassNameFromAlign:ge.getPopupClassNameFromAlign},Dt,{stretch:Or,getRootDomNode:ge.getRootDomNode,style:Mt,mask:qt,zIndex:or,transitionName:gt,maskAnimation:er,maskTransitionName:tr,maskMotion:lr,ref:ge.popupRef,motion:ct,mobile:pn,forceRender:vr}),typeof rr=="function"?rr():rr)},ge.attachParent=function(Ne){$e.a.cancel(ge.attachId);var We=ge.props,Fe=We.getPopupContainer,Ye=We.getDocument,at=ge.getRootDomNode(),ct;Fe?(at||Fe.length===0)&&(ct=Fe(at)):ct=Ye(ge.getRootDomNode()).body,ct?ct.appendChild(Ne):ge.attachId=Object($e.a)(function(){ge.attachParent(Ne)})},ge.getContainer=function(){var Ne=ge.props.getDocument,We=Ne(ge.getRootDomNode()).createElement("div");return We.style.position="absolute",We.style.top="0",We.style.left="0",We.style.width="100%",ge.attachParent(We),We},ge.setPoint=function(Ne){var We=ge.props.alignPoint;if(!We||!Ne)return;ge.setState({point:{pageX:Ne.pageX,pageY:Ne.pageY}})},ge.handlePortalUpdate=function(){ge.state.prevPopupVisible!==ge.state.popupVisible&&ge.props.afterPopupVisibleChange(ge.state.popupVisible)},ge.triggerContextValue={onPopupMouseDown:ge.onPopupMouseDown};var ke;return"popupVisible"in Ae?ke=!!Ae.popupVisible:ke=!!Ae.defaultPopupVisible,ge.state={prevPopupVisible:ke,popupVisible:ke},wa.forEach(function(Ne){ge["fire".concat(Ne)]=function(We){ge.fireEvents(Ne,We)}}),ge}return Object(A.a)(fe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ge=this.props,ke=this.state;if(ke.popupVisible){var Ne;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Ne=ge.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ce.a)(Ne,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Ne=Ne||ge.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ce.a)(Ne,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Ne=Ne||ge.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ce.a)(Ne,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Ce.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),$e.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var ge;return((ge=this.popupRef.current)===null||ge===void 0?void 0:ge.getElement())||null}},{key:"getPopupAlign",value:function(){var ge=this.props,ke=ge.popupPlacement,Ne=ge.popupAlign,We=ge.builtinPlacements;return ke&&We?He(We,ke,Ne):Ne}},{key:"setPopupVisible",value:function(ge,ke){var Ne=this.props.alignPoint,We=this.state.popupVisible;this.clearDelayTimer(),We!==ge&&("popupVisible"in this.props||this.setState({popupVisible:ge,prevPopupVisible:We}),this.props.onPopupVisibleChange(ge)),Ne&&ke&&ge&&this.setPoint(ke)}},{key:"delaySetPopupVisible",value:function(ge,ke,Ne){var We=this,Fe=ke*1e3;if(this.clearDelayTimer(),Fe){var Ye=Ne?{pageX:Ne.pageX,pageY:Ne.pageY}:null;this.delayTimer=window.setTimeout(function(){We.setPopupVisible(ge,Ye),We.clearDelayTimer()},Fe)}else this.setPopupVisible(ge,Ne)}},{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(ge){var ke=this.props.children.props,Ne=this.props;return ke[ge]&&Ne[ge]?this["fire".concat(ge)]:ke[ge]||Ne[ge]}},{key:"isClickToShow",value:function(){var ge=this.props,ke=ge.action,Ne=ge.showAction;return ke.indexOf("click")!==-1||Ne.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var ge=this.props.action;return ge==="contextMenu"||ge.length===1&&ge[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var ge=this.props,ke=ge.action,Ne=ge.showAction;return ke.indexOf("contextMenu")!==-1||Ne.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var ge=this.props,ke=ge.action,Ne=ge.hideAction;return ke.indexOf("click")!==-1||Ne.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var ge=this.props,ke=ge.action,Ne=ge.showAction;return ke.indexOf("hover")!==-1||Ne.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var ge=this.props,ke=ge.action,Ne=ge.hideAction;return ke.indexOf("hover")!==-1||Ne.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var ge=this.props,ke=ge.action,Ne=ge.showAction;return ke.indexOf("focus")!==-1||Ne.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var ge=this.props,ke=ge.action,Ne=ge.hideAction;return ke.indexOf("focus")!==-1||Ne.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var ge;(ge=this.popupRef.current)===null||ge===void 0||ge.forceAlign()}}},{key:"fireEvents",value:function(ge,ke){var Ne=this.props.children.props[ge];Ne&&Ne(ke);var We=this.props[ge];We&&We(ke)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var ge=this.state.popupVisible,ke=this.props,Ne=ke.children,We=ke.forceRender,Fe=ke.alignPoint,Ye=ke.className,at=ke.autoDestroy,ct=h.Children.only(Ne),ut={key:"trigger"};this.isContextMenuToShow()?ut.onContextMenu=this.onContextMenu:ut.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(ut.onClick=this.onClick,ut.onMouseDown=this.onMouseDown,ut.onTouchStart=this.onTouchStart):(ut.onClick=this.createTwoChains("onClick"),ut.onMouseDown=this.createTwoChains("onMouseDown"),ut.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(ut.onMouseEnter=this.onMouseEnter,Fe&&(ut.onMouseMove=this.onMouseMove)):ut.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?ut.onMouseLeave=this.onMouseLeave:ut.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(ut.onFocus=this.onFocus,ut.onBlur=this.onBlur):(ut.onFocus=this.createTwoChains("onFocus"),ut.onBlur=this.createTwoChains("onBlur"));var gt=S()(ct&&ct.props&&ct.props.className,Ye);gt&&(ut.className=gt);var Mt=Object(R.a)({},ut);Object(Me.c)(ct)&&(Mt.ref=Object(Me.a)(this.triggerRef,ct.ref));var qt=h.cloneElement(ct,Mt),er;return(ge||this.popupRef.current||We)&&(er=h.createElement(Le,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!ge&&at&&(er=null),h.createElement(Ir.Provider,{value:this.triggerContextValue},qt,er)}}],[{key:"getDerivedStateFromProps",value:function(ge,ke){var Ne=ge.popupVisible,We={};return Ne!==void 0&&ke.popupVisible!==Ne&&(We.popupVisible=Ne,We.prevPopupVisible=ke.popupVisible),We}}]),fe}(h.Component);return Ue.contextType=Ir,Ue.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Mn,getDocument:Ba,onPopupVisibleChange:Jr,afterPopupVisibleChange:Jr,onPopupAlign:Jr,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Ue}var ia=Ma(Ve.a),en={adjustX:1,adjustY:1},Pa={topLeft:{points:["bl","tl"],overflow:en,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:en,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:en,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:en,offset:[4,0]}},Hr={topLeft:{points:["bl","tl"],overflow:en,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:en,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:en,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:en,offset:[4,0]}},Wn=Pa,jn=0,Gr={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},_n=function(Ue,Ke,Pe){var fe=ae(Ke),Ae=Ue.getState();Ue.setState({defaultActiveFirst:Object(R.a)(Object(R.a)({},Ae.defaultActiveFirst),{},Object(P.a)({},fe,Pe))})},ka=function(Le){Object(E.a)(Ke,Le);var Ue=Object(b.a)(Ke);function Ke(Pe){var fe;Object(L.a)(this,Ke),fe=Ue.call(this,Pe),fe.onDestroy=function(Fe){fe.props.onDestroy(Fe)},fe.onKeyDown=function(Fe){var Ye=Fe.keyCode,at=fe.menuInstance,ct=fe.props.store,ut=fe.getVisible();if(Ye===p.a.ENTER)return fe.onTitleClick(Fe),_n(ct,fe.props.eventKey,!0),!0;if(Ye===p.a.RIGHT)return ut?at.onKeyDown(Fe):(fe.triggerOpenChange(!0),_n(ct,fe.props.eventKey,!0)),!0;if(Ye===p.a.LEFT){var gt;if(ut)gt=at.onKeyDown(Fe);else return;return gt||(fe.triggerOpenChange(!1),gt=!0),gt}return ut&&(Ye===p.a.UP||Ye===p.a.DOWN)?at.onKeyDown(Fe):void 0},fe.onOpenChange=function(Fe){fe.props.onOpenChange(Fe)},fe.onPopupVisibleChange=function(Fe){fe.triggerOpenChange(Fe,Fe?"mouseenter":"mouseleave")},fe.onMouseEnter=function(Fe){var Ye=fe.props,at=Ye.eventKey,ct=Ye.onMouseEnter,ut=Ye.store;_n(ut,fe.props.eventKey,!1),ct({key:at,domEvent:Fe})},fe.onMouseLeave=function(Fe){var Ye=fe.props,at=Ye.parentMenu,ct=Ye.eventKey,ut=Ye.onMouseLeave;at.subMenuInstance=Object(y.a)(fe),ut({key:ct,domEvent:Fe})},fe.onTitleMouseEnter=function(Fe){var Ye=fe.props,at=Ye.eventKey,ct=Ye.onItemHover,ut=Ye.onTitleMouseEnter;ct({key:at,hover:!0}),ut({key:at,domEvent:Fe})},fe.onTitleMouseLeave=function(Fe){var Ye=fe.props,at=Ye.parentMenu,ct=Ye.eventKey,ut=Ye.onItemHover,gt=Ye.onTitleMouseLeave;at.subMenuInstance=Object(y.a)(fe),ut({key:ct,hover:!1}),gt({key:ct,domEvent:Fe})},fe.onTitleClick=function(Fe){var Ye=Object(y.a)(fe),at=Ye.props;if(at.onTitleClick({key:at.eventKey,domEvent:Fe}),at.triggerSubMenuAction==="hover")return;fe.triggerOpenChange(!fe.getVisible(),"click"),_n(at.store,fe.props.eventKey,!1)},fe.onSubMenuClick=function(Fe){typeof fe.props.onClick=="function"&&fe.props.onClick(fe.addKeyPath(Fe))},fe.onSelect=function(Fe){fe.props.onSelect(Fe)},fe.onDeselect=function(Fe){fe.props.onDeselect(Fe)},fe.getPrefixCls=function(){return"".concat(fe.props.rootPrefixCls,"-submenu")},fe.getActiveClassName=function(){return"".concat(fe.getPrefixCls(),"-active")},fe.getDisabledClassName=function(){return"".concat(fe.getPrefixCls(),"-disabled")},fe.getSelectedClassName=function(){return"".concat(fe.getPrefixCls(),"-selected")},fe.getOpenClassName=function(){return"".concat(fe.props.rootPrefixCls,"-submenu-open")},fe.getVisible=function(){return fe.state.isOpen},fe.getMode=function(){return fe.state.mode},fe.saveMenuInstance=function(Fe){fe.menuInstance=Fe},fe.addKeyPath=function(Fe){return Object(R.a)(Object(R.a)({},Fe),{},{keyPath:(Fe.keyPath||[]).concat(fe.props.eventKey)})},fe.triggerOpenChange=function(Fe,Ye){var at=fe.props.eventKey,ct=function(){fe.onOpenChange({key:at,item:Object(y.a)(fe),trigger:Ye,open:Fe})};Ye==="mouseenter"?fe.mouseenterTimeout=setTimeout(function(){ct()},0):ct()},fe.isChildrenSelected=function(){var Fe={find:!1};return X(fe.props.children,fe.props.selectedKeys,Fe),Fe.find},fe.isInlineMode=function(){return fe.getMode()==="inline"},fe.adjustWidth=function(){if(!fe.subMenuTitle||!fe.menuInstance)return;var Fe=Ge.findDOMNode(fe.menuInstance);if(Fe.offsetWidth>=fe.subMenuTitle.offsetWidth)return;Fe.style.minWidth="".concat(fe.subMenuTitle.offsetWidth,"px")},fe.saveSubMenuTitle=function(Fe){fe.subMenuTitle=Fe},fe.getBaseProps=function(){var Fe=Object(y.a)(fe),Ye=Fe.props,at=fe.getMode();return{mode:at==="horizontal"?"vertical":at,visible:fe.getVisible(),level:Ye.level+1,inlineIndent:Ye.inlineIndent,focusable:!1,onClick:fe.onSubMenuClick,onSelect:fe.onSelect,onDeselect:fe.onDeselect,onDestroy:fe.onDestroy,selectedKeys:Ye.selectedKeys,eventKey:"".concat(Ye.eventKey,"-menu-"),openKeys:Ye.openKeys,motion:Ye.motion,onOpenChange:fe.onOpenChange,subMenuOpenDelay:Ye.subMenuOpenDelay,parentMenu:Object(y.a)(fe),subMenuCloseDelay:Ye.subMenuCloseDelay,forceSubMenuRender:Ye.forceSubMenuRender,triggerSubMenuAction:Ye.triggerSubMenuAction,builtinPlacements:Ye.builtinPlacements,defaultActiveFirst:Ye.store.getState().defaultActiveFirst[ae(Ye.eventKey)],multiple:Ye.multiple,prefixCls:Ye.rootPrefixCls,id:fe.internalMenuId,manualRef:fe.saveMenuInstance,itemIcon:Ye.itemIcon,expandIcon:Ye.expandIcon,direction:Ye.direction}},fe.getMotion=function(Fe,Ye){var at=Object(y.a)(fe),ct=at.haveRendered,ut=fe.props,gt=ut.motion,Mt=ut.rootPrefixCls,qt=Object(R.a)(Object(R.a)({},gt),{},{leavedClassName:"".concat(Mt,"-hidden"),removeOnLeave:!1,motionAppear:ct||!Ye||Fe!=="inline"});return qt};var Ae=Pe.store,ge=Pe.eventKey,ke=Ae.getState(),Ne=ke.defaultActiveFirst;fe.isRootMenu=!1;var We=!1;return Ne&&(We=Ne[ge]),_n(Ae,ge,We),fe.state={mode:Pe.mode,isOpen:Pe.isOpen},fe}return Object(A.a)(Ke,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var fe=this,Ae=this.props,ge=Ae.mode,ke=Ae.parentMenu,Ne=Ae.manualRef,We=Ae.isOpen,Fe=function(){fe.setState({mode:ge,isOpen:We})},Ye=We!==this.state.isOpen,at=ge!==this.state.mode;if((at||Ye)&&($e.a.cancel(this.updateStateRaf),at?this.updateStateRaf=Object($e.a)(Fe):Fe()),Ne&&Ne(this),ge!=="horizontal"||!(ke==null?void 0:ke.isRootMenu)||!We)return;this.minWidthTimeout=setTimeout(function(){return fe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var fe=this.props,Ae=fe.onDestroy,ge=fe.eventKey;Ae&&Ae(ge),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),$e.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(fe,Ae){var ge=this.getBaseProps();return h.createElement(Hn,Object(i.a)({},ge,{id:this.internalMenuId,className:fe,style:Ae}),this.props.children)}},{key:"renderChildren",value:function(){var fe=this,Ae=this.getBaseProps(),ge=Ae.mode,ke=Ae.visible,Ne=Ae.forceSubMenuRender,We=Ae.direction,Fe=this.getMotion(ge,ke);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||ke||Ne,!this.haveOpened)return h.createElement("div",null);var Ye=S()("".concat(Ae.prefixCls,"-sub"),Object(P.a)({},"".concat(Ae.prefixCls,"-rtl"),We==="rtl"));return this.isInlineMode()?h.createElement(sr,Object(i.a)({visible:Ae.visible,forceRender:Ne},Fe),function(at){var ct=at.className,ut=at.style,gt=S()(Ye,ct);return fe.renderPopupMenu(gt,ut)}):this.renderPopupMenu(Ye)}},{key:"render",value:function(){var fe,Ae,ge,ke=Object(R.a)({},this.props),Ne=this.getVisible(),We=this.getPrefixCls(),Fe=this.isInlineMode(),Ye=this.getMode(),at=S()(We,"".concat(We,"-").concat(Ye),(fe={},Object(P.a)(fe,ke.className,!!ke.className),Object(P.a)(fe,this.getOpenClassName(),Ne),Object(P.a)(fe,this.getActiveClassName(),ke.active||Ne&&!Fe),Object(P.a)(fe,this.getDisabledClassName(),ke.disabled),Object(P.a)(fe,this.getSelectedClassName(),this.isChildrenSelected()),fe));this.internalMenuId||(ke.eventKey?this.internalMenuId="".concat(ke.eventKey,"$Menu"):(jn+=1,this.internalMenuId="$__$".concat(jn,"$Menu")));var ct={},ut={},gt={};ke.disabled||(ct={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},ut={onClick:this.onTitleClick},gt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Mt={},qt=ke.direction,er=qt==="rtl";Fe&&(er?Mt.paddingRight=ke.inlineIndent*ke.level:Mt.paddingLeft=ke.inlineIndent*ke.level);var tr={};this.getVisible()&&(tr={"aria-owns":this.internalMenuId});var lr=null;Ye!=="horizontal"&&(lr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(lr=h.createElement(this.props.expandIcon,Object(R.a)({},this.props))));var or=h.createElement("div",Object(i.a)({ref:this.saveSubMenuTitle,style:Mt,className:"".concat(We,"-title"),role:"button"},gt,ut,{"aria-expanded":Ne},tr,{"aria-haspopup":"true",title:typeof ke.title=="string"?ke.title:void 0}),ke.title,lr||h.createElement("i",{className:"".concat(We,"-arrow")})),rr=this.renderChildren(),Or=((Ae=ke.parentMenu)===null||Ae===void 0?void 0:Ae.isRootMenu)?ke.parentMenu.props.getPopupContainer:function(Vr){return Vr.parentNode},gr=Gr[Ye],pn=ke.popupOffset?{offset:ke.popupOffset}:{},vr=S()((ge={},Object(P.a)(ge,ke.popupClassName,ke.popupClassName&&!Fe),Object(P.a)(ge,"".concat(We,"-rtl"),er),ge)),Ft=ke.disabled,It=ke.triggerSubMenuAction,yr=ke.subMenuOpenDelay,Ar=ke.forceSubMenuRender,Dt=ke.subMenuCloseDelay,Dr=ke.builtinPlacements;Q.forEach(function(Vr){return delete ke[Vr]}),delete ke.onClick;var mn=er?Object(R.a)(Object(R.a)({},Hr),Dr):Object(R.a)(Object(R.a)({},Pa),Dr);delete ke.direction;var Nr=this.getBaseProps(),Qr=Fe?null:this.getMotion(Nr.mode,Nr.visible);return h.createElement("li",Object(i.a)({},ke,ct,{className:at,role:"menuitem"}),h.createElement(ia,{prefixCls:We,popupClassName:S()("".concat(We,"-popup"),vr),getPopupContainer:Or,builtinPlacements:mn,popupPlacement:gr,popupVisible:Fe?!1:Ne,popupAlign:pn,popup:Fe?null:rr,action:Ft||Fe?[]:[It],mouseEnterDelay:yr,mouseLeaveDelay:Dt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Ar,popupMotion:Qr},or),Fe?rr:null)}}]),Ke}(h.Component);ka.defaultProps={onMouseEnter:ne,onMouseLeave:ne,onTitleMouseEnter:ne,onTitleMouseLeave:ne,onTitleClick:ne,manualRef:ne,mode:"vertical",title:""};var ga=Object(_.b)(function(Le,Ue){var Ke=Le.openKeys,Pe=Le.activeKey,fe=Le.selectedKeys,Ae=Ue.eventKey,ge=Ue.subMenuKey;return{isOpen:Ke.indexOf(Ae)>-1,active:Pe[ge]===Ae,selectedKeys:fe}})(ka);ga.isSubMenu=!0;var ua=ga,Va="menuitem-overflowed",Ca=.5,Rt=function(Le){Object(E.a)(Ke,Le);var Ue=Object(b.a)(Ke);function Ke(){var Pe;return Object(L.a)(this,Ke),Pe=Ue.apply(this,arguments),Pe.resizeObserver=null,Pe.mutationObserver=null,Pe.originalTotalWidth=0,Pe.overflowedItems=[],Pe.menuItemSizes=[],Pe.cancelFrameId=null,Pe.state={lastVisibleIndex:void 0},Pe.childRef=h.createRef(),Pe.getMenuItemNodes=function(){var fe=Pe.props.prefixCls,Ae=Pe.childRef.current;return Ae?[].slice.call(Ae.children).filter(function(ge){return ge.className.split(" ").indexOf("".concat(fe,"-overflowed-submenu"))<0}):[]},Pe.getOverflowedSubMenuItem=function(fe,Ae,ge){var ke=Pe.props,Ne=ke.overflowedIndicator,We=ke.level,Fe=ke.mode,Ye=ke.prefixCls,at=ke.theme;if(We!==1||Fe!=="horizontal")return null;var ct=Pe.props.children[0],ut=ct.props,gt=ut.children,Mt=ut.title,qt=ut.style,er=Object(C.a)(ut,["children","title","style"]),tr=Object(R.a)({},qt),lr="".concat(fe,"-overflowed-indicator"),or="".concat(fe,"-overflowed-indicator");Ae.length===0&&ge!==!0?tr=Object(R.a)(Object(R.a)({},tr),{},{display:"none"}):ge&&(tr=Object(R.a)(Object(R.a)({},tr),{},{visibility:"hidden",position:"absolute"}),lr="".concat(lr,"-placeholder"),or="".concat(or,"-placeholder"));var rr=at?"".concat(Ye,"-").concat(at):"",Or={};return Q.forEach(function(gr){er[gr]!==void 0&&(Or[gr]=er[gr])}),h.createElement(ua,Object(i.a)({title:Ne,className:"".concat(Ye,"-overflowed-submenu"),popupClassName:rr},Or,{key:lr,eventKey:or,disabled:!1,style:tr}),Ae)},Pe.setChildrenWidthAndResize=function(){if(Pe.props.mode!=="horizontal")return;var fe=Pe.childRef.current;if(!fe)return;var Ae=fe.children;if(!Ae||Ae.length===0)return;var ge=fe.children[Ae.length-1];ce(ge,"display","inline-block");var ke=Pe.getMenuItemNodes(),Ne=ke.filter(function(We){return We.className.split(" ").indexOf(Va)>=0});Ne.forEach(function(We){ce(We,"display","inline-block")}),Pe.menuItemSizes=ke.map(function(We){return pe(We,!0)}),Ne.forEach(function(We){ce(We,"display","none")}),Pe.overflowedIndicatorWidth=pe(fe.children[fe.children.length-1],!0),Pe.originalTotalWidth=Pe.menuItemSizes.reduce(function(We,Fe){return We+Fe},0),Pe.handleResize(),ce(ge,"display","none")},Pe.handleResize=function(){if(Pe.props.mode!=="horizontal")return;var fe=Pe.childRef.current;if(!fe)return;var Ae=pe(fe);Pe.overflowedItems=[];var ge=0,ke;Pe.originalTotalWidth>Ae+Ca&&(ke=-1,Pe.menuItemSizes.forEach(function(Ne){ge+=Ne,ge+Pe.overflowedIndicatorWidth<=Ae&&(ke+=1)})),Pe.setState({lastVisibleIndex:ke})},Pe}return Object(A.a)(Ke,[{key:"componentDidMount",value:function(){var fe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Ae=this.childRef.current;if(!Ae)return;this.resizeObserver=new ze.default(function(ge){ge.forEach(function(){var ke=fe.cancelFrameId;cancelAnimationFrame(ke),fe.cancelFrameId=requestAnimationFrame(fe.setChildrenWidthAndResize)})}),[].slice.call(Ae.children).concat(Ae).forEach(function(ge){fe.resizeObserver.observe(ge)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){fe.resizeObserver.disconnect(),[].slice.call(Ae.children).concat(Ae).forEach(function(ge){fe.resizeObserver.observe(ge)}),fe.setChildrenWidthAndResize()}),this.mutationObserver.observe(Ae,{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(fe){var Ae=this,ge=this.state.lastVisibleIndex;return(fe||[]).reduce(function(ke,Ne,We){var Fe=Ne;if(Ae.props.mode==="horizontal"){var Ye=Ae.getOverflowedSubMenuItem(Ne.props.eventKey,[]);ge!==void 0&&Ae.props.className.indexOf("".concat(Ae.props.prefixCls,"-root"))!==-1&&(We>ge&&(Fe=h.cloneElement(Ne,{style:{display:"none"},eventKey:"".concat(Ne.props.eventKey,"-hidden"),className:"".concat(Va)})),We===ge+1&&(Ae.overflowedItems=fe.slice(ge+1).map(function(ct){return h.cloneElement(ct,{key:ct.props.eventKey,mode:"vertical-left"})}),Ye=Ae.getOverflowedSubMenuItem(Ne.props.eventKey,Ae.overflowedItems)));var at=[].concat(Object(o.a)(ke),[Ye,Fe]);return We===fe.length-1&&at.push(Ae.getOverflowedSubMenuItem(Ne.props.eventKey,[],!0)),at}return[].concat(Object(o.a)(ke),[Fe])},[])}},{key:"render",value:function(){var fe=this.props,Ae=fe.visible,ge=fe.prefixCls,ke=fe.overflowedIndicator,Ne=fe.mode,We=fe.level,Fe=fe.tag,Ye=fe.children,at=fe.theme,ct=Object(C.a)(fe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),ut=Fe;return h.createElement(ut,Object(i.a)({ref:this.childRef},ct),this.renderChildren(Ye))}}]),Ke}(h.Component);Rt.defaultProps={tag:"div",className:""};var Kt=Rt;function Bt(Le){return Le.length?Le.every(function(Ue){return!!Ue.props.disabled}):!0}function pr(Le,Ue,Ke){var Pe=Le.getState();Le.setState({activeKey:Object(R.a)(Object(R.a)({},Pe.activeKey),{},Object(P.a)({},Ue,Ke))})}function mr(Le){return Le.eventKey||"0-menu-"}function Pr(Le,Ue){var Ke=Ue,Pe=Le.children,fe=Le.eventKey;if(Ke){var Ae;if(J(Pe,function(ge,ke){ge&&ge.props&&!ge.props.disabled&&Ke===Te(ge,fe,ke)&&(Ae=!0)}),Ae)return Ke}return Ke=null,Le.defaultActiveFirst&&J(Pe,function(ge,ke){!Ke&&ge&&!ge.props.disabled&&(Ke=Te(ge,fe,ke))}),Ke}function Xr(Le){if(!Le)return;var Ue=this.instanceArray.indexOf(Le);Ue!==-1?this.instanceArray[Ue]=Le:this.instanceArray.push(Le)}var Br=function(Le){Object(E.a)(Ke,Le);var Ue=Object(b.a)(Ke);function Ke(Pe){var fe;return Object(L.a)(this,Ke),fe=Ue.call(this,Pe),fe.onKeyDown=function(Ae,ge){var ke=Ae.keyCode,Ne;if(fe.getFlatInstanceArray().forEach(function(Fe){Fe&&Fe.props.active&&Fe.onKeyDown&&(Ne=Fe.onKeyDown(Ae))}),Ne)return 1;var We=null;return(ke===p.a.UP||ke===p.a.DOWN)&&(We=fe.step(ke===p.a.UP?-1:1)),We?(Ae.preventDefault(),pr(fe.props.store,mr(fe.props),We.props.eventKey),typeof ge=="function"&&ge(We),1):void 0},fe.onItemHover=function(Ae){var ge=Ae.key,ke=Ae.hover;pr(fe.props.store,mr(fe.props),ke?ge:null)},fe.onDeselect=function(Ae){fe.props.onDeselect(Ae)},fe.onSelect=function(Ae){fe.props.onSelect(Ae)},fe.onClick=function(Ae){fe.props.onClick(Ae)},fe.onOpenChange=function(Ae){fe.props.onOpenChange(Ae)},fe.onDestroy=function(Ae){fe.props.onDestroy(Ae)},fe.getFlatInstanceArray=function(){return fe.instanceArray},fe.step=function(Ae){var ge=fe.getFlatInstanceArray(),ke=fe.props.store.getState().activeKey[mr(fe.props)],Ne=ge.length;if(!Ne)return null;Ae<0&&(ge=ge.concat().reverse());var We=-1;if(ge.every(function(ct,ut){return ct&&ct.props.eventKey===ke?(We=ut,!1):!0}),!fe.props.defaultActiveFirst&&We!==-1&&Bt(ge.slice(We,Ne-1)))return;var Fe=(We+1)%Ne,Ye=Fe;do{var at=ge[Ye];if(!at||at.props.disabled)Ye=(Ye+1)%Ne;else return at}while(Ye!==Fe);return null},fe.renderCommonMenuItem=function(Ae,ge,ke){var Ne=fe.props.store.getState(),We=Object(y.a)(fe),Fe=We.props,Ye=Te(Ae,Fe.eventKey,ge),at=Ae.props;if(!at||typeof Ae.type=="string")return Ae;var ct=Ye===Ne.activeKey,ut=Object(R.a)(Object(R.a)({mode:at.mode||Fe.mode,level:Fe.level,inlineIndent:Fe.inlineIndent,renderMenuItem:fe.renderMenuItem,rootPrefixCls:Fe.prefixCls,index:ge,parentMenu:Fe.parentMenu,manualRef:at.disabled?void 0:Object(j.a)(Ae.ref,Xr.bind(Object(y.a)(fe))),eventKey:Ye,active:!at.disabled&&ct,multiple:Fe.multiple,onClick:function(Mt){(at.onClick||ne)(Mt),fe.onClick(Mt)},onItemHover:fe.onItemHover,motion:Fe.motion,subMenuOpenDelay:Fe.subMenuOpenDelay,subMenuCloseDelay:Fe.subMenuCloseDelay,forceSubMenuRender:Fe.forceSubMenuRender,onOpenChange:fe.onOpenChange,onDeselect:fe.onDeselect,onSelect:fe.onSelect,builtinPlacements:Fe.builtinPlacements,itemIcon:at.itemIcon||fe.props.itemIcon,expandIcon:at.expandIcon||fe.props.expandIcon},ke),{},{direction:Fe.direction});return(Fe.mode==="inline"||we())&&(ut.triggerSubMenuAction="click"),h.cloneElement(Ae,Object(R.a)(Object(R.a)({},ut),{},{key:Ye||ge}))},fe.renderMenuItem=function(Ae,ge,ke){if(!Ae)return null;var Ne=fe.props.store.getState(),We={openKeys:Ne.openKeys,selectedKeys:Ne.selectedKeys,triggerSubMenuAction:fe.props.triggerSubMenuAction,subMenuKey:ke};return fe.renderCommonMenuItem(Ae,ge,We)},Pe.store.setState({activeKey:Object(R.a)(Object(R.a)({},Pe.store.getState().activeKey),{},Object(P.a)({},Pe.eventKey,Pr(Pe,Pe.activeKey)))}),fe.instanceArray=[],fe}return Object(A.a)(Ke,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(fe){return this.props.visible||fe.visible||this.props.className!==fe.className||!G()(this.props.style,fe.style)}},{key:"componentDidUpdate",value:function(fe){var Ae=this.props,ge="activeKey"in Ae?Ae.activeKey:Ae.store.getState().activeKey[mr(Ae)],ke=Pr(Ae,ge);if(ke!==ge)pr(Ae.store,mr(Ae),ke);else if("activeKey"in fe){var Ne=Pr(fe,fe.activeKey);ke!==Ne&&pr(Ae.store,mr(Ae),ke)}}},{key:"render",value:function(){var fe=this,Ae=Object(i.a)({},this.props);this.instanceArray=[];var ge=S()(Ae.prefixCls,Ae.className,"".concat(Ae.prefixCls,"-").concat(Ae.mode)),ke={className:ge,role:Ae.role||"menu"};Ae.id&&(ke.id=Ae.id),Ae.focusable&&(ke.tabIndex=0,ke.onKeyDown=this.onKeyDown);var Ne=Ae.prefixCls,We=Ae.eventKey,Fe=Ae.visible,Ye=Ae.level,at=Ae.mode,ct=Ae.overflowedIndicator,ut=Ae.theme;return Q.forEach(function(gt){return delete Ae[gt]}),delete Ae.onClick,h.createElement(Kt,Object(i.a)({},Ae,{prefixCls:Ne,mode:at,tag:"ul",level:Ye,theme:ut,visible:Fe,overflowedIndicator:ct},ke),Object(d.a)(Ae.children).map(function(gt,Mt){return fe.renderMenuItem(gt,Mt,We||"0-menu-")}))}}]),Ke}(h.Component);Br.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:ne};var tn=Object(_.b)()(Br),Hn=tn,Cr=k("Kwbf");function ur(Le,Ue,Ke){var Pe=Le.prefixCls,fe=Le.motion,Ae=Le.defaultMotions,ge=Ae===void 0?{}:Ae,ke=Le.openAnimation,Ne=Le.openTransitionName,We=Ue.switchingModeFromInline;if(fe)return fe;if(Object(K.a)(ke)==="object"&&ke)Object(Cr.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof ke=="string")return{motionName:"".concat(Pe,"-open-").concat(ke)};if(Ne)return{motionName:Ne};var Fe=ge[Ke];return Fe||(We?null:ge.other)}var yn=function(Le){Object(E.a)(Ke,Le);var Ue=Object(b.a)(Ke);function Ke(Pe){var fe;Object(L.a)(this,Ke),fe=Ue.call(this,Pe),fe.onSelect=function(ke){var Ne=Object(y.a)(fe),We=Ne.props;if(We.selectable){var Fe=fe.store.getState(),Ye=Fe.selectedKeys,at=ke.key;We.multiple?Ye=Ye.concat([at]):Ye=[at],"selectedKeys"in We||fe.store.setState({selectedKeys:Ye}),We.onSelect(Object(R.a)(Object(R.a)({},ke),{},{selectedKeys:Ye}))}},fe.onClick=function(ke){var Ne=fe.getRealMenuMode(),We=Object(y.a)(fe),Fe=We.store,Ye=We.props.onOpenChange;Ne!=="inline"&&!("openKeys"in fe.props)&&(Fe.setState({openKeys:[]}),Ye([])),fe.props.onClick(ke)},fe.onKeyDown=function(ke,Ne){fe.innerMenu.getWrappedInstance().onKeyDown(ke,Ne)},fe.onOpenChange=function(ke){var Ne=Object(y.a)(fe),We=Ne.props,Fe=fe.store.getState().openKeys.concat(),Ye=!1,at=function(ut){var gt=!1;if(ut.open)gt=Fe.indexOf(ut.key)===-1,gt&&Fe.push(ut.key);else{var Mt=Fe.indexOf(ut.key);gt=Mt!==-1,gt&&Fe.splice(Mt,1)}Ye=Ye||gt};Array.isArray(ke)?ke.forEach(at):at(ke),Ye&&("openKeys"in fe.props||fe.store.setState({openKeys:Fe}),We.onOpenChange(Fe))},fe.onDeselect=function(ke){var Ne=Object(y.a)(fe),We=Ne.props;if(We.selectable){var Fe=fe.store.getState().selectedKeys.concat(),Ye=ke.key,at=Fe.indexOf(Ye);at!==-1&&Fe.splice(at,1),"selectedKeys"in We||fe.store.setState({selectedKeys:Fe}),We.onDeselect(Object(R.a)(Object(R.a)({},ke),{},{selectedKeys:Fe}))}},fe.onMouseEnter=function(ke){fe.restoreModeVerticalFromInline();var Ne=fe.props.onMouseEnter;Ne&&Ne(ke)},fe.onTransitionEnd=function(ke){var Ne=ke.propertyName==="width"&&ke.target===ke.currentTarget,We=ke.target.className,Fe=Object.prototype.toString.call(We)==="[object SVGAnimatedString]"?We.animVal:We,Ye=ke.propertyName==="font-size"&&Fe.indexOf("anticon")>=0;(Ne||Ye)&&fe.restoreModeVerticalFromInline()},fe.setInnerMenu=function(ke){fe.innerMenu=ke},fe.isRootMenu=!0;var Ae=Pe.defaultSelectedKeys,ge=Pe.defaultOpenKeys;return"selectedKeys"in Pe&&(Ae=Pe.selectedKeys||[]),"openKeys"in Pe&&(ge=Pe.openKeys||[]),fe.store=Object(_.c)({selectedKeys:Ae,openKeys:ge,activeKey:{"0-menu-":Pr(Pe,Pe.activeKey)}}),fe.state={switchingModeFromInline:!1,prevProps:Pe,inlineOpenKeys:[],store:fe.store},fe}return Object(A.a)(Ke,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(fe){var Ae=this.props,ge=Ae.siderCollapsed,ke=Ae.inlineCollapsed,Ne=Ae.onOpenChange;(!fe.inlineCollapsed&&ke||!fe.siderCollapsed&&ge)&&Ne([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var fe=this.props.collapsedWidth,Ae=this.store,ge=this.prevOpenKeys,ke=this.getInlineCollapsed()&&(fe===0||fe==="0"||fe==="0px");ke?(this.prevOpenKeys=Ae.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ge&&(this.store.setState({openKeys:ge}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var fe=this.props.mode,Ae=this.state.switchingModeFromInline,ge=this.getInlineCollapsed();return Ae&&ge?"inline":ge?"vertical":fe}},{key:"getInlineCollapsed",value:function(){var fe=this.props,Ae=fe.inlineCollapsed,ge=fe.siderCollapsed;return ge!==void 0?ge:Ae}},{key:"restoreModeVerticalFromInline",value:function(){var fe=this.state.switchingModeFromInline;fe&&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 fe=Object(R.a)({},Object(I.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Ae=this.getRealMenuMode();return fe.className+=" ".concat(fe.prefixCls,"-root"),fe.direction==="rtl"&&(fe.className+=" ".concat(fe.prefixCls,"-rtl")),fe=Object(R.a)(Object(R.a)({},fe),{},{mode:Ae,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:ur(this.props,this.state,Ae)}),delete fe.openAnimation,delete fe.openTransitionName,h.createElement(_.a,{store:this.store},h.createElement(Hn,Object(i.a)({},fe,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(fe,Ae){var ge=Ae.prevProps,ke=Ae.store,Ne=ke.getState(),We={},Fe={prevProps:fe};return ge.mode==="inline"&&fe.mode!=="inline"&&(Fe.switchingModeFromInline=!0),"openKeys"in fe?We.openKeys=fe.openKeys||[]:((fe.inlineCollapsed&&!ge.inlineCollapsed||fe.siderCollapsed&&!ge.siderCollapsed)&&(Fe.switchingModeFromInline=!0,Fe.inlineOpenKeys=Ne.openKeys,We.openKeys=[]),(!fe.inlineCollapsed&&ge.inlineCollapsed||!fe.siderCollapsed&&ge.siderCollapsed)&&(We.openKeys=Ae.inlineOpenKeys,Fe.inlineOpenKeys=[])),Object.keys(We).length&&ke.setState(We),Fe}}]),Ke}(h.Component);yn.defaultProps={selectable:!0,onClick:ne,onSelect:ne,onOpenChange:ne,onDeselect:ne,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 ca=yn,Kn=function(Le){Object(E.a)(Ke,Le);var Ue=Object(b.a)(Ke);function Ke(){var Pe;return Object(L.a)(this,Ke),Pe=Ue.apply(this,arguments),Pe.onKeyDown=function(fe){var Ae=fe.keyCode;return Ae===p.a.ENTER?(Pe.onClick(fe),!0):void 0},Pe.onMouseLeave=function(fe){var Ae=Pe.props,ge=Ae.eventKey,ke=Ae.onItemHover,Ne=Ae.onMouseLeave;ke({key:ge,hover:!1}),Ne({key:ge,domEvent:fe})},Pe.onMouseEnter=function(fe){var Ae=Pe.props,ge=Ae.eventKey,ke=Ae.onItemHover,Ne=Ae.onMouseEnter;ke({key:ge,hover:!0}),Ne({key:ge,domEvent:fe})},Pe.onClick=function(fe){var Ae=Pe.props,ge=Ae.eventKey,ke=Ae.multiple,Ne=Ae.onClick,We=Ae.onSelect,Fe=Ae.onDeselect,Ye=Ae.isSelected,at={key:ge,keyPath:[ge],item:Object(y.a)(Pe),domEvent:fe};Ne(at),ke?Ye?Fe(at):We(at):Ye||We(at)},Pe.saveNode=function(fe){Pe.node=fe},Pe}return Object(A.a)(Ke,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var fe=this.props;fe.onDestroy&&fe.onDestroy(fe.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 fe,Ae=Object(R.a)({},this.props),ge=S()(this.getPrefixCls(),Ae.className,(fe={},Object(P.a)(fe,this.getActiveClassName(),!Ae.disabled&&Ae.active),Object(P.a)(fe,this.getSelectedClassName(),Ae.isSelected),Object(P.a)(fe,this.getDisabledClassName(),Ae.disabled),fe)),ke=Object(R.a)(Object(R.a)({},Ae.attribute),{},{title:typeof Ae.title=="string"?Ae.title:void 0,className:ge,role:Ae.role||"menuitem","aria-disabled":Ae.disabled});Ae.role==="option"?ke=Object(R.a)(Object(R.a)({},ke),{},{role:"option","aria-selected":Ae.isSelected}):(Ae.role===null||Ae.role==="none")&&(ke.role="none");var Ne={onClick:Ae.disabled?null:this.onClick,onMouseLeave:Ae.disabled?null:this.onMouseLeave,onMouseEnter:Ae.disabled?null:this.onMouseEnter},We=Object(R.a)({},Ae.style);Ae.mode==="inline"&&(Ae.direction==="rtl"?We.paddingRight=Ae.inlineIndent*Ae.level:We.paddingLeft=Ae.inlineIndent*Ae.level),Q.forEach(function(Ye){return delete Ae[Ye]}),delete Ae.direction;var Fe=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Fe=h.createElement(this.props.itemIcon,this.props)),h.createElement("li",Object(i.a)({},Object(I.a)(Ae,["onClick","onMouseEnter","onMouseLeave","onSelect"]),ke,Ne,{style:We,ref:this.saveNode}),Ae.children,Fe)}}]),Ke}(h.Component);Kn.isMenuItem=!0,Kn.defaultProps={onSelect:ne,onMouseEnter:ne,onMouseLeave:ne,manualRef:ne};var Ta=Object(_.b)(function(Le,Ue){var Ke=Le.activeKey,Pe=Le.selectedKeys,fe=Ue.eventKey,Ae=Ue.subMenuKey;return{active:Ke[Ae]===fe,isSelected:Array.isArray(Pe)?Pe.indexOf(fe)!==-1:Pe===fe}})(Kn),Ya=Ta,Wa=function(Le){Object(E.a)(Ke,Le);var Ue=Object(b.a)(Ke);function Ke(){var Pe;return Object(L.a)(this,Ke),Pe=Ue.apply(this,arguments),Pe.renderInnerMenuItem=function(fe){var Ae=Pe.props,ge=Ae.renderMenuItem,ke=Ae.index;return ge(fe,ke,Pe.props.subMenuKey)},Pe}return Object(A.a)(Ke,[{key:"render",value:function(){var fe=Object(i.a)({},this.props),Ae=fe.className,ge=Ae===void 0?"":Ae,ke=fe.rootPrefixCls,Ne="".concat(ke,"-item-group-title"),We="".concat(ke,"-item-group-list"),Fe=fe.title,Ye=fe.children;return Q.forEach(function(at){return delete fe[at]}),delete fe.direction,h.createElement("li",Object(i.a)({},fe,{onClick:function(ct){return ct.stopPropagation()},className:"".concat(ge," ").concat(ke,"-item-group")}),h.createElement("div",{className:Ne,title:typeof Fe=="string"?Fe:void 0},Fe),h.createElement("ul",{className:We},h.Children.map(Ye,this.renderInnerMenuItem)))}}]),Ke}(h.Component);Wa.isMenuItemGroup=!0,Wa.defaultProps={disabled:!0};var hi=Wa,Ha=function(Ue){var Ke=Ue.className,Pe=Ue.rootPrefixCls,fe=Ue.style;return h.createElement("li",{className:"".concat(Ke," ").concat(Pe,"-item-divider"),style:fe})};Ha.defaultProps={disabled:!0,className:"",style:{}};var Ci=Ha,ni=ca,ai=k("eDIo");function pi(Le,Ue){var Ke=Le.prefixCls,Pe=Le.editable,fe=Le.locale,Ae=Le.style;return!Pe||Pe.showAdd===!1?null:h.createElement("button",{ref:Ue,type:"button",className:"".concat(Ke,"-nav-add"),style:Ae,"aria-label":(fe==null?void 0:fe.addAriaLabel)||"Add tab",onClick:function(ke){Pe.onEdit("add",{event:ke})}},Pe.addIcon||"+")}var _a=h.forwardRef(pi);function Ia(Le,Ue){var Ke=Le.prefixCls,Pe=Le.id,fe=Le.tabs,Ae=Le.locale,ge=Le.mobile,ke=Le.moreIcon,Ne=ke===void 0?"More":ke,We=Le.moreTransitionName,Fe=Le.style,Ye=Le.className,at=Le.editable,ct=Le.tabBarGutter,ut=Le.rtl,gt=Le.onTabClick,Mt=Object(h.useState)(!1),qt=Object(u.a)(Mt,2),er=qt[0],tr=qt[1],lr=Object(h.useState)(null),or=Object(u.a)(lr,2),rr=or[0],Or=or[1],gr="".concat(Pe,"-more-popup"),pn="".concat(Ke,"-dropdown"),vr=rr!==null?"".concat(gr,"-").concat(rr):null,Ft=Ae==null?void 0:Ae.dropdownAriaLabel,It=h.createElement(ni,{onClick:function(Qr){var Vr=Qr.key,An=Qr.domEvent;gt(Vr,An),tr(!1)},id:gr,tabIndex:-1,role:"listbox","aria-activedescendant":vr,selectedKeys:[rr],"aria-label":Ft!==void 0?Ft:"expanded dropdown"},fe.map(function(Nr){return h.createElement(Ya,{key:Nr.key,id:"".concat(gr,"-").concat(Nr.key),role:"option","aria-controls":Pe&&"".concat(Pe,"-panel-").concat(Nr.key),disabled:Nr.disabled},Nr.tab)}));function yr(Nr){for(var Qr=fe.filter(function(oa){return!oa.disabled}),Vr=Qr.findIndex(function(oa){return oa.key===rr})||0,An=Qr.length,zn=0;znDr?(Ar=It,gr.current="x"):(Ar=yr,gr.current="y");var mn=Date.now();mn-rr.current>100&&(Or.current=!1),(Ue(-Ar,-Ar)||Or.current)&&(Ft.preventDefault(),Or.current=!0),rr.current=mn}var vr=Object(h.useRef)(null);vr.current={onTouchStart:tr,onTouchMove:lr,onTouchEnd:or,onWheel:pn},h.useEffect(function(){function Ft(Dt){vr.current.onTouchStart(Dt)}function It(Dt){vr.current.onTouchMove(Dt)}function yr(Dt){vr.current.onTouchEnd(Dt)}function Ar(Dt){vr.current.onWheel(Dt)}return document.addEventListener("touchmove",It,{passive:!1}),document.addEventListener("touchend",yr,{passive:!1}),Le.current.addEventListener("touchstart",Ft,{passive:!1}),Le.current.addEventListener("wheel",Ar),function(){document.removeEventListener("touchmove",It),document.removeEventListener("touchend",yr)}},[])}function Ut(){var Le=Object(h.useRef)(new Map);function Ue(Pe){return Le.current.has(Pe)||Le.current.set(Pe,h.createRef()),Le.current.get(Pe)}function Ke(Pe){Le.current.delete(Pe)}return[Ue,Ke]}function bt(Le,Ue){var Ke=h.useRef(Le),Pe=h.useState({}),fe=Object(u.a)(Pe,2),Ae=fe[1];function ge(ke){var Ne=typeof ke=="function"?ke(Ke.current):ke;Ne!==Ke.current&&Ue(Ne,Ke.current),Ke.current=Ne,Ae({})}return[Ke.current,ge]}var zt=function(Ue){var Ke=Ue.position,Pe=Ue.prefixCls,fe=Ue.extra;if(!fe)return null;var Ae,ge=fe;return Ke==="right"&&(Ae=ge.right||!ge.left&&ge||null),Ke==="left"&&(Ae=ge.left||null),Ae?h.createElement("div",{className:"".concat(Pe,"-extra-content")},Ae):null};function Zt(Le,Ue){var Ke,Pe=h.useContext(ii),fe=Pe.prefixCls,Ae=Pe.tabs,ge=Le.className,ke=Le.style,Ne=Le.id,We=Le.animated,Fe=Le.activeKey,Ye=Le.rtl,at=Le.extra,ct=Le.editable,ut=Le.locale,gt=Le.tabPosition,Mt=Le.tabBarGutter,qt=Le.children,er=Le.onTabClick,tr=Le.onTabScroll,lr=Object(h.useRef)(),or=Object(h.useRef)(),rr=Object(h.useRef)(),Or=Object(h.useRef)(),gr=Ut(),pn=Object(u.a)(gr,2),vr=pn[0],Ft=pn[1],It=gt==="top"||gt==="bottom",yr=bt(0,function(Wr,br){It&&tr&&tr({direction:Wr>br?"left":"right"})}),Ar=Object(u.a)(yr,2),Dt=Ar[0],Dr=Ar[1],mn=bt(0,function(Wr,br){!It&&tr&&tr({direction:Wr>br?"top":"bottom"})}),Nr=Object(u.a)(mn,2),Qr=Nr[0],Vr=Nr[1],An=Object(h.useState)(0),zn=Object(u.a)(An,2),bn=zn[0],oa=zn[1],Oa=Object(h.useState)(0),da=Object(u.a)(Oa,2),Gn=da[0],sn=da[1],Zr=Object(h.useState)(0),xn=Object(u.a)(Zr,2),gn=xn[0],Aa=xn[1],$a=Object(h.useState)(0),Ja=Object(u.a)($a,2),Yr=Ja[0],Fa=Ja[1],Qa=Object(h.useState)(null),nn=Object(u.a)(Qa,2),Kr=nn[0],Xn=nn[1],Co=Object(h.useState)(null),eo=Object(u.a)(Co,2),Za=eo[0],mi=eo[1],ki=Object(h.useState)(0),to=Object(u.a)(ki,2),Ii=to[0],Vo=to[1],Yo=Object(h.useState)(0),_o=Object(u.a)(Yo,2),ro=_o[0],no=_o[1],gi=w(new Map),vi=Object(u.a)(gi,2),$o=vi[0],Ni=vi[1],Oi=c(Ae,$o,bn),yi="".concat(fe,"-nav-operations-hidden"),bi=0,Da=0;It?Ye?(bi=0,Da=Math.max(0,bn-Kr)):(bi=Math.min(0,Kr-bn),Da=0):(bi=Math.min(0,Za-Gn),Da=0);function oi(Wr){return WrDa?[Da,!1]:[Wr,!0]}var qa=Object(h.useRef)(),Ai=Object(h.useState)(),si=Object(u.a)(Ai,2),ji=si[0],ao=si[1];function Ui(){ao(Date.now())}function io(){window.clearTimeout(qa.current)}ja(lr,function(Wr,br){var Vn=!1;function ha(xi,Ka){xi(function(Li){var ti=oi(Li+Ka),Yn=Object(u.a)(ti,2),Wi=Yn[0],so=Yn[1];return Vn=so,Wi})}if(It){if(Kr>=bn)return Vn;ha(Dr,Wr)}else{if(Za>=Gn)return Vn;ha(Vr,br)}return io(),Ui(),Vn}),Object(h.useEffect)(function(){return io(),ji&&(qa.current=window.setTimeout(function(){ao(0)},100)),io},[ji]);function ei(){var Wr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Fe,br=Oi.get(Wr);if(!br)return;if(It){var Vn=Dt;Ye?br.rightDt+Kr&&(Vn=br.right+br.width-Kr):br.left<-Dt?Vn=-br.left:br.left+br.width>-Dt+Kr&&(Vn=-(br.left+br.width-Kr)),Vr(0),Dr(oi(Vn)[0])}else{var ha=Qr;br.top<-Qr?ha=-br.top:br.top+br.height>-Qr+Za&&(ha=-(br.top+br.height-Za)),Dr(0),Vr(oi(ha)[0])}}var li=v(Oi,{width:Kr,height:Za,left:Dt,top:Qr},{width:gn,height:Yr},{width:Ii,height:ro},Object(R.a)(Object(R.a)({},Le),{},{tabs:Ae})),Oo=Object(u.a)(li,2),Jo=Oo[0],Qo=Oo[1],Zo=Ae.map(function(Wr){var br=Wr.key;return h.createElement(n,{id:Ne,prefixCls:fe,key:br,rtl:Ye,tab:Wr,closable:Wr.closable,editable:ct,active:br===Fe,tabPosition:gt,tabBarGutter:Mt,renderWrapper:qt,removeAriaLabel:ut==null?void 0:ut.removeAriaLabel,ref:vr(br),onClick:function(ha){er(br,ha)},onRemove:function(){Ft(br)},onFocus:function(){ei(br),Ui(),Ye||(lr.current.scrollLeft=0),lr.current.scrollTop=0}})}),oo=m(function(){var Wr,br,Vn,ha,xi,Ka,Li,ti,Yn,Wi=((Wr=lr.current)===null||Wr===void 0?void 0:Wr.offsetWidth)||0,so=((br=lr.current)===null||br===void 0?void 0:br.offsetHeight)||0,lo=((Vn=Or.current)===null||Vn===void 0?void 0:Vn.offsetWidth)||0,pa=((ha=Or.current)===null||ha===void 0?void 0:ha.offsetHeight)||0,Ur=((xi=rr.current)===null||xi===void 0?void 0:xi.offsetWidth)||0,La=((Ka=rr.current)===null||Ka===void 0?void 0:Ka.offsetHeight)||0;Xn(Wi),mi(so),Vo(lo),no(pa);var za=(((Li=or.current)===null||Li===void 0?void 0:Li.offsetWidth)||0)-lo,Ga=(((ti=or.current)===null||ti===void 0?void 0:ti.offsetHeight)||0)-pa;oa(za),sn(Ga);var uo=(Yn=rr.current)===null||Yn===void 0?void 0:Yn.className.includes(yi);Aa(za-(uo?0:Ur)),Fa(Ga-(uo?0:La)),Ni(function(){var Hi=new Map;return Ae.forEach(function(Mo){var Po=Mo.key,ci=vr(Po).current;ci&&Hi.set(Po,{width:ci.offsetWidth,height:ci.offsetHeight,left:ci.offsetLeft,top:ci.offsetTop})}),Hi})}),qo=Ae.slice(0,Jo),fa=Ae.slice(Qo+1),kn=[].concat(Object(o.a)(qo),Object(o.a)(fa)),ra=Object(h.useState)(),In=Object(u.a)(ra,2),Di=In[0],es=In[1],Ra=Oi.get(Fe),Ao=Object(h.useRef)();function Do(){x.a.cancel(Ao.current)}Object(h.useEffect)(function(){var Wr={};return Ra&&(It?(Ye?Wr.right=Ra.right:Wr.left=Ra.left,Wr.width=Ra.width):(Wr.top=Ra.top,Wr.height=Ra.height)),Do(),Ao.current=x()(function(){es(Wr)}),Do},[Ra,It,Ye]),Object(h.useEffect)(function(){ei()},[Fe,Ra,Oi,It]),Object(h.useEffect)(function(){oo()},[Ye,Mt,Fe,Ae.map(function(Wr){return Wr.key}).join("_")]);var Ro=!!kn.length,ui="".concat(fe,"-nav-wrap"),Fi,Ri,Lo,Bi;return It?Ye?(Ri=Dt>0,Fi=Dt+Kr>>7)^(L<<14|L>>>18)^L>>>3,y=o[i-2],E=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;o[i]=A+o[i-7]+E+o[i-16]}var b=l&c^~l&T,_=w&p^w&f^p&f,I=(w<<30|w>>>2)^(w<<19|w>>>13)^(w<<10|w>>>22),j=(l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25),M=v+j+b+a[i]+o[i],G=I+_;v=T,T=c,c=l,l=n+M|0,n=f,f=p,p=w,w=M+G|0}m[0]=m[0]+w|0,m[1]=m[1]+p|0,m[2]=m[2]+f|0,m[3]=m[3]+n|0,m[4]=m[4]+l|0,m[5]=m[5]+c|0,m[6]=m[6]+T|0,m[7]=m[7]+v|0},_doFinalize:function(){var x=this._data,g=x.words,m=this._nDataBytes*8,w=x.sigBytes*8;return g[w>>>5]|=128<<24-w%32,g[(w+64>>>9<<4)+14]=u.floor(m/4294967296),g[(w+64>>>9<<4)+15]=m,x.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var x=s.clone.call(this);return x._hash=this._hash.clone(),x}});C.SHA256=s._createHelper(r),C.HmacSHA256=s._createHmacHelper(r)}(Math),P.SHA256})},lZu9:function(N,Y,k){(function(P){P(k("VrN/"),k("1eCo"),k("8EBN"))})(function(P){"use strict";P.defineMode("markdown",function(u,C){var R=P.getMode(u,"text/html"),h=R.name=="null";function s(B){if(P.findModeByName){var W=P.findModeByName(B);W&&(B=W.mime||W.mimes[0])}var F=P.getMode(u,B);return F.name=="null"?null:F}C.highlightFormatting===void 0&&(C.highlightFormatting=!1),C.maxBlockquoteDepth===void 0&&(C.maxBlockquoteDepth=0),C.taskLists===void 0&&(C.taskLists=!1),C.strikethrough===void 0&&(C.strikethrough=!1),C.emoji===void 0&&(C.emoji=!1),C.fencedCodeBlockHighlighting===void 0&&(C.fencedCodeBlockHighlighting=!0),C.fencedCodeBlockDefaultMode===void 0&&(C.fencedCodeBlockDefaultMode="text/plain"),C.xml===void 0&&(C.xml=!0),C.tokenTypeOverrides===void 0&&(C.tokenTypeOverrides={});var S={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 d in S)S.hasOwnProperty(d)&&C.tokenTypeOverrides[d]&&(S[d]=C.tokenTypeOverrides[d]);var a=/^([*\-_])(?:\s*\1){2,}\s*$/,o=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,r=/^\[(x| )\](?=\s)/i,x=C.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,g=/^ {0,3}(?:\={1,}|-{2,})\s*$/,m=/^[^#!\[\]*_\\<>` "'(~:]+/,w=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,f=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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 l(B,W,F){return W.f=W.inline=F,F(B,W)}function c(B,W,F){return W.f=W.block=F,F(B,W)}function T(B){return!B||!/\S/.test(B.string)}function v(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==L){var W=h;if(!W){var F=P.innerMode(R,B.htmlState);W=F.mode.name=="xml"&&F.state.tagStart===null&&!F.state.context&&F.state.tokenize.isInText}W&&(B.f=b,B.block=i,B.htmlState=null)}return B.trailingSpace=0,B.trailingSpaceNewLine=!1,B.prevLine=B.thisLine,B.thisLine={stream:null},null}function i(B,W){var F=B.column()===W.indentation,$=T(W.prevLine.stream),ee=W.indentedCode,Z=W.prevLine.hr,ve=W.list!==!1,he=(W.listStack[W.listStack.length-1]||0)+3;W.indentedCode=!1;var le=W.indentation;if(W.indentationDiff===null&&(W.indentationDiff=W.indentation,ve)){for(W.list=null;le=4&&(ee||W.prevLine.fencedCodeEnd||W.prevLine.header||$))return B.skipToEnd(),W.indentedCode=!0,S.code;if(B.eatSpace())return null;if(F&&W.indentation<=he&&(ie=B.match(x))&&ie[1].length<=6)return W.quote=0,W.header=ie[1].length,W.thisLine.header=!0,C.highlightFormatting&&(W.formatting="header"),W.f=W.inline,y(W);if(W.indentation<=he&&B.eat(">"))return W.quote=F?1:W.quote+1,C.highlightFormatting&&(W.formatting="quote"),B.eatSpace(),y(W);if(!xe&&!W.setext&&F&&W.indentation<=he&&(ie=B.match(o))){var se=ie[1]?"ol":"ul";return W.indentation=le+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,C.taskLists&&B.match(r,!1)&&(W.taskList=!0),W.f=W.inline,C.highlightFormatting&&(W.formatting=["list","list-"+se]),y(W)}else{if(F&&W.indentation<=he&&(ie=B.match(w,!0)))return W.quote=0,W.fencedEndRE=new RegExp(ie[1]+"+ *$"),W.localMode=C.fencedCodeBlockHighlighting&&s(ie[2]||C.fencedCodeBlockDefaultMode),W.localMode&&(W.localState=P.startState(W.localMode)),W.f=W.block=A,C.highlightFormatting&&(W.formatting="code-block"),W.code=-1,y(W);if(W.setext||(!Re||!ve)&&!W.quote&&W.list===!1&&!W.code&&!xe&&!p.test(B.string)&&(ie=B.lookAhead(1))&&(ie=ie.match(g)))return W.setext?(W.header=W.setext,W.setext=0,B.skipToEnd(),C.highlightFormatting&&(W.formatting="header")):(W.header=ie[0].charAt(0)=="="?1:2,W.setext=W.header),W.thisLine.header=!0,W.f=W.inline,y(W);if(xe)return B.skipToEnd(),W.hr=!0,W.thisLine.hr=!0,S.hr;if(B.peek()==="[")return l(B,W,G)}return l(B,W,W.inline)}function L(B,W){var F=R.token(B,W.htmlState);if(!h){var $=P.innerMode(R,W.htmlState);($.mode.name=="xml"&&$.state.tagStart===null&&!$.state.context&&$.state.tokenize.isInText||W.md_inside&&B.current().indexOf(">")>-1)&&(W.f=b,W.block=i,W.htmlState=null)}return F}function A(B,W){var F=W.listStack[W.listStack.length-1]||0,$=W.indentation=B.quote?W.push(S.formatting+"-"+B.formatting[F]+"-"+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(S.linkHref,"url"):(B.strong&&W.push(S.strong),B.em&&W.push(S.em),B.strikethrough&&W.push(S.strikethrough),B.emoji&&W.push(S.emoji),B.linkText&&W.push(S.linkText),B.code&&W.push(S.code),B.image&&W.push(S.image),B.imageAltText&&W.push(S.imageAltText,"link"),B.imageMarker&&W.push(S.imageMarker)),B.header&&W.push(S.header,S.header+"-"+B.header),B.quote&&(W.push(S.quote),!C.maxBlockquoteDepth||C.maxBlockquoteDepth>=B.quote?W.push(S.quote+"-"+B.quote):W.push(S.quote+"-"+C.maxBlockquoteDepth)),B.list!==!1){var $=(B.listStack.length-1)%3;$?$===1?W.push(S.list2):W.push(S.list3):W.push(S.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(m,!0)?y(W):void 0}function b(B,W){var F=W.text(B,W);if(typeof F!="undefined")return F;if(W.list)return W.list=null,y(W);if(W.taskList){var $=B.match(r,!0)[1]===" ";return $?W.taskOpen=!0:W.taskClosed=!0,C.highlightFormatting&&(W.formatting="task"),W.taskList=!1,y(W)}if(W.taskOpen=!1,W.taskClosed=!1,W.header&&B.match(/^#+$/,!0))return C.highlightFormatting&&(W.formatting="header"),y(W);var ee=B.next();if(W.linkTitle){W.linkTitle=!1;var Z=ee;ee==="("&&(Z=")"),Z=(Z+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ve="^\\s*(?:[^"+Z+"\\\\]+|\\\\\\\\|\\\\.)"+Z;if(B.match(new RegExp(ve),!0))return S.linkHref}if(ee==="`"){var he=W.formatting;C.highlightFormatting&&(W.formatting="code"),B.eatWhile("`");var le=B.current().length;if(W.code==0&&(!W.quote||le==1))return W.code=le,y(W);if(le==W.code){var Re=y(W);return W.code=0,Re}else return W.formatting=he,y(W)}else if(W.code)return y(W);if(ee==="\\"&&(B.next(),C.highlightFormatting)){var xe=y(W),ie=S.formatting+"-escape";return xe?xe+" "+ie:ie}if(ee==="!"&&B.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return W.imageMarker=!0,W.image=!0,C.highlightFormatting&&(W.formatting="image"),y(W);if(ee==="["&&W.imageMarker&&B.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return W.imageMarker=!1,W.imageAltText=!0,C.highlightFormatting&&(W.formatting="image"),y(W);if(ee==="]"&&W.imageAltText){C.highlightFormatting&&(W.formatting="image");var xe=y(W);return W.imageAltText=!1,W.image=!1,W.inline=W.f=I,xe}if(ee==="["&&!W.image)return W.linkText&&B.match(/^.*?\]/)||(W.linkText=!0,C.highlightFormatting&&(W.formatting="link")),y(W);if(ee==="]"&&W.linkText){C.highlightFormatting&&(W.formatting="link");var xe=y(W);return W.linkText=!1,W.inline=W.f=B.match(/\(.*?\)| ?\[.*?\]/,!1)?I:b,xe}if(ee==="<"&&B.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){W.f=W.inline=_,C.highlightFormatting&&(W.formatting="link");var xe=y(W);return xe?xe+=" ":xe="",xe+S.linkInline}if(ee==="<"&&B.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){W.f=W.inline=_,C.highlightFormatting&&(W.formatting="link");var xe=y(W);return xe?xe+=" ":xe="",xe+S.linkEmail}if(C.xml&&ee==="<"&&B.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var se=B.string.indexOf(">",B.pos);if(se!=-1){var re=B.string.substring(B.start,se);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(re)&&(W.md_inside=!0)}return B.backUp(1),W.htmlState=P.startState(R),c(B,W,L)}if(C.xml&&ee==="<"&&B.match(/^\/\w*?>/))return W.md_inside=!1,"tag";if(ee==="*"||ee==="_"){for(var be=1,q=B.pos==1?" ":B.string.charAt(B.pos-2);be<3&&B.eat(ee);)be++;var ne=B.peek()||" ",Te=!/\s/.test(ne)&&(!f.test(ne)||/\s/.test(q)||f.test(q)),ae=!/\s/.test(q)&&(!f.test(q)||/\s/.test(ne)||f.test(ne)),J=null,X=null;if(be%2&&(!W.em&&Te&&(ee==="*"||!ae||f.test(q))?J=!0:W.em==ee&&ae&&(ee==="*"||!Te||f.test(ne))&&(J=!1)),be>1&&(!W.strong&&Te&&(ee==="*"||!ae||f.test(q))?X=!0:W.strong==ee&&ae&&(ee==="*"||!Te||f.test(ne))&&(X=!1)),X!=null||J!=null){C.highlightFormatting&&(W.formatting=J==null?"strong":X==null?"em":"strong em"),J===!0&&(W.em=ee),X===!0&&(W.strong=ee);var Re=y(W);return J===!1&&(W.em=!1),X===!1&&(W.strong=!1),Re}}else if(ee===" "&&(B.eat("*")||B.eat("_"))){if(B.peek()===" ")return y(W);B.backUp(1)}if(C.strikethrough){if(ee==="~"&&B.eatWhile(ee)){if(W.strikethrough){C.highlightFormatting&&(W.formatting="strikethrough");var Re=y(W);return W.strikethrough=!1,Re}else if(B.match(/^[^\s]/,!1))return W.strikethrough=!0,C.highlightFormatting&&(W.formatting="strikethrough"),y(W)}else if(ee===" "&&B.match(/^~~/,!0)){if(B.peek()===" ")return y(W);B.backUp(2)}}if(C.emoji&&ee===":"&&B.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){W.emoji=!0,C.highlightFormatting&&(W.formatting="emoji");var Q=y(W);return W.emoji=!1,Q}return ee===" "&&(B.match(/^ +$/,!1)?W.trailingSpace++:W.trailingSpace&&(W.trailingSpaceNewLine=!0)),y(W)}function _(B,W){var F=B.next();if(F===">"){W.f=W.inline=b,C.highlightFormatting&&(W.formatting="link");var $=y(W);return $?$+=" ":$="",$+S.linkInline}return B.match(/^[^>]+/,!0),S.linkInline}function I(B,W){if(B.eatSpace())return null;var F=B.next();return F==="("||F==="["?(W.f=W.inline=M(F==="("?")":"]"),C.highlightFormatting&&(W.formatting="link-string"),W.linkHref=!0,y(W)):"error"}var j={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function M(B){return function(W,F){var $=W.next();if($===B){F.f=F.inline=b,C.highlightFormatting&&(F.formatting="link-string");var ee=y(F);return F.linkHref=!1,ee}return W.match(j[B]),F.linkHref=!0,y(F)}}function G(B,W){return B.match(/^([^\]\\]|\\.)*\]:/,!1)?(W.f=K,B.next(),C.highlightFormatting&&(W.formatting="link"),W.linkText=!0,y(W)):l(B,W,b)}function K(B,W){if(B.match(/^\]:/,!0)){W.f=W.inline=H,C.highlightFormatting&&(W.formatting="link");var F=y(W);return W.linkText=!1,F}return B.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function H(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=b,S.linkHref+" url")}var z={startState:function(){return{f:i,prevLine:{stream:null},thisLine:{stream:null},block:i,htmlState:null,indentation:0,inline:b,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&&P.copyState(R,B.htmlState),indentation:B.indentation,localMode:B.localMode,localState:B.localMode?P.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 v(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!=L)){var F=B.match(/^\s*/,!0)[0].replace(/\t/g,n).length;if(W.indentation=F,W.indentationDiff=null,F>0)return null}}return W.f(B,W)},innerMode:function(B){return B.block==L?{state:B.htmlState,mode:R}:B.localState?{state:B.localState,mode:B.localMode}:{state:B,mode:z}},indent:function(B,W,F){return B.block==L&&R.indent?R.indent(B.htmlState,W,F):B.localState&&B.localMode.indent?B.localMode.indent(B.localState,W,F):P.Pass},blankLine:v,getType:y,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return z},"xml"),P.defineMIME("text/markdown","markdown"),P.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(N){if(!0)module.exports=N();else var Y})(function(){var define,module,exports;return function(){function N(Y,k,P){function u(h,s){if(!k[h]){if(!Y[h]){var S=typeof require=="function"&&require;if(!s&&S)return require(h,!0);if(C)return C(h,!0);var d=new Error("Cannot find module '"+h+"'");throw d.code="MODULE_NOT_FOUND",d}var a=k[h]={exports:{}};Y[h][0].call(a.exports,function(o){var r=Y[h][1][o];return u(r||o)},a,a.exports,N,Y,k,P)}return k[h].exports}for(var C=typeof require=="function"&&require,R=0;R0&&g(I).to(M),G=this._divideParts(E,b),K=G.length,H=!1,z=function(Re,xe){var ie=this;return new h.default(function(re,be){var q,ne,Te,ae;return S.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(X.prev=0,Re.isCancel()){X.next=18;break}return q=G[xe-1],ne={stream:Re._createStream(y,q.start,q.end),size:q.end-q.start},X.next=6,S.default.awrap(Re._uploadPart(j,_,xe,ne));case 6:if(Te=X.sent,!(!Re.isCancel()&&!H)){X.next=15;break}if(i.doneParts.push({number:xe,etag:Te.res.headers.etag}),!L.progress){X.next=12;break}return X.next=12,S.default.awrap(L.progress(I.length/K,i,Te.res));case 12:re({number:xe,etag:Te.res.headers.etag}),X.next=16;break;case 15:re();case 16:X.next=19;break;case 18:re();case 19:X.next=30;break;case 21:X.prev=21,X.t0=X.catch(0),ae=new Error,ae.name=X.t0.name,ae.message=X.t0.message,ae.stack=X.t0.stack,ae.partNum=xe,g(X.t0).to(ae),be(ae);case 30:case"end":return X.stop()}},null,ie,[[0,21]])})},B=(0,C.default)(new Array(K),function(le,Re){return Re+1}),W=M.map(function(le){return le.number}),F=B.filter(function(le){return W.indexOf(le)<0}),$=5,ee=L.parallel||$,he.next=17,S.default.awrap(this._parallel(F,ee,function(le){return new h.default(function(Re,xe){z(A,le).then(function(ie){ie&&M.push(ie),Re()}).catch(function(ie){xe(ie)})})}));case 17:if(Z=he.sent,H=!0,!this.isCancel()){he.next=22;break}throw z=null,this._makeCancelEvent();case 22:if(!(Z&&Z.length>0)){he.next=25;break}throw Z[0].message="Failed to upload some parts with error: "+Z[0].toString()+" part_num: "+Z[0].partNum,Z[0];case 25:return he.next=27,S.default.awrap(this.completeMultipartUpload(j,_,M,L));case 27:return he.abrupt("return",he.sent);case 28:case"end":return he.stop()}},null,this)},n._getFileSize=function(i){return S.default.async(function(A){for(;;)switch(A.prev=A.next){case 0:if(!a.buffer(i)){A.next=4;break}return A.abrupt("return",i.length);case 4:if(!(w(i)||f(i))){A.next=6;break}return A.abrupt("return",i.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return A.stop()}},null,this)};var l=N("stream"),c=l.Readable;function T(v,i){if(!(this instanceof T))return new T(v,i);c.call(this,i),this.file=v,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}o.inherits(T,c),T.prototype.readFileAndPush=function(i){if(this.fileBuffer)for(var L=!0;L&&this.fileBuffer&&this.startthis.fileBuffer.length?this.fileBuffer.length:y,this.start=y,L=this.push(this.fileBuffer.slice(A,y))}},T.prototype._read=function(i){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 L=16*1024;i=i||L;var A=this;this.reader.onload=function(E){A.fileBuffer=P.from(new Uint8Array(E.target.result)),A.file=null,A.readFileAndPush(i)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(i)},n._createStream=function(i,L,A){if(w(i)||f(i))return new T(i.slice(L,A));throw new Error("_createStream requires File/Blob.")},n._getPartSize=function(i,L){var A=10*1e3,y=1024*1024;return L?Math.max(Math.ceil(i/A),L):y},n._divideParts=function(i,L){for(var A=Math.ceil(i/L),y=[],E=0;E255)throw new Error("ID is composed of 255 bytes at most");if(i.prefix===""||i.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(i.status))throw new Error("Status must be Enabled or Disabled");if(i.transition){if(!["IA","Archive"].includes(i.transition.storageClass))throw new Error("StorageClass must be IA or Archive");c(i.transition,"Transition")}if(i.expiration){if(!i.expiration.expiredObjectDeleteMarker)c(i.expiration,"Expiration");else if(i.expiration.days||i.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(i.abortMultipartUpload&&c(i.abortMultipartUpload,"AbortMultipartUpload"),!i.expiration&&!i.abortMultipartUpload&&!i.transition&&!i.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(i.tag){if(i.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");T(i.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(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=C(P);function C(a){return a&&a.__esModule?a:{default:a}}var R=N("../utils/checkBucketName"),h=R.checkBucketName,s=N("../utils/obj2xml"),S=s.obj2xml,d=k;d.putBucketVersioning=function(o,r){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},g,m,w;return u.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:if(h(o),["Enabled","Suspended"].includes(r)){f.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return g=this._bucketRequestParams("PUT",o,"versioning",x),m={VersioningConfiguration:{Status:r}},g.mime="xml",g.content=S(m,{headers:!0}),f.next=9,u.default.awrap(this.request(g));case 9:return w=f.sent,f.abrupt("return",{res:w.res,status:w.status});case 11:case"end":return f.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=C(P);function C(r){return r&&r.__esModule?r:{default:r}}var R=N("../utils/checkBucketName"),h=R.checkBucketName,s=N("../utils/obj2xml"),S=s.obj2xml,d=N("../utils/isArray"),a=d.isArray,o=k;o.putBucketWebsite=function(x){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=arguments[2],w,p,f,n,l;return u.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:if(h(x),w=this._bucketRequestParams("PUT",x,"website",m),p={Suffix:g.index||"index.html"},f={IndexDocument:p},n={WebsiteConfiguration:f},g.supportSubDir&&(p.SupportSubDir=g.supportSubDir),g.type&&(p.Type=g.type),g.error&&(f.ErrorDocument={Key:g.error}),!(g.routingRules!==void 0)){T.next=12;break}if(a(g.routingRules)){T.next=11;break}throw new Error("RoutingRules must be Array");case 11:f.RoutingRules={RoutingRule:g.routingRules};case 12:return n=S(n),w.content=n,w.mime="xml",w.successStatuses=[200],T.next=18,u.default.awrap(this.request(w));case 18:return l=T.sent,T.abrupt("return",{res:l.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(N,Y,k){(function(P){"use strict";var u=N("babel-runtime/core-js/object/keys"),C=s(u),R=N("babel-runtime/core-js/json/stringify"),h=s(R);function s(S){return S&&S.__esModule?S:{default:S}}k.encodeCallback=function(d,a){if(d.headers=d.headers||{},!Object.prototype.hasOwnProperty.call(d.headers,"x-oss-callback")&&a.callback){var o={callbackUrl:encodeURI(a.callback.url),callbackBody:a.callback.body};a.callback.host&&(o.callbackHost=a.callback.host),a.callback.contentType&&(o.callbackBodyType=a.callback.contentType);var r=P.from((0,h.default)(o)).toString("base64");if(d.headers["x-oss-callback"]=r,a.callback.customValue){var x={};(0,C.default)(a.callback.customValue).forEach(function(g){x["x:"+g]=a.callback.customValue[g]}),d.headers["x-oss-callback-var"]=P.from((0,h.default)(x)).toString("base64")}}}}).call(this,N("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/assign"),u=C(P);function C(o){return o&&o.__esModule?o:{default:o}}var R=N("humanize-ms"),h=N("url"),s=N("../utils/checkBucketName"),S=s.checkBucketName;function d(o,r){var x=h.parse(o);if(x.protocol||(x=h.parse("http"+(r?"s":"")+"://"+o)),x.protocol!=="http:"&&x.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return x}function a(o,r,x){var g=x?"https://":"http://",m=r?"-internal.aliyuncs.com":".aliyuncs.com",w="vpc100-oss-cn-";return o.substr(0,w.length)===w&&(m=".aliyuncs.com"),h.parse(g+o+m)}Y.exports=function(o){if(!o||!o.accessKeyId||!o.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");o.bucket&&S(o.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},o);if(r.accessKeyId=r.accessKeyId.trim(),r.accessKeySecret=r.accessKeySecret.trim(),r.timeout&&(r.timeout=R(r.timeout)),r.endpoint)r.endpoint=d(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(N,Y,k){"use strict";var P=N("merge-descriptors"),u=k;P(u,N("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=C(P);function C(r){return r&&r.__esModule?r:{default:r}}var R=N("../utils/checkBucketName"),h=R.checkBucketName,s=N("querystring"),S=N("js-base64"),d=S.Base64.encode,a=k;a.processObjectSave=function(x,g,m,w){var p,f,n,l;return u.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return o(x,"sourceObject"),o(g,"targetObject"),o(m,"process"),g=this._objectName(g),w&&h(w),p=this._objectRequestParams("POST",x,{subres:"x-oss-process"}),f=w?",b_"+d(w):"",g=d(g),n={"x-oss-process":m+"|sys/saveas,o_"+g+f},p.content=s.stringify(n),T.next=12,u.default.awrap(this.request(p));case 12:return l=T.sent,T.abrupt("return",{res:l.res,status:l.res.status});case 14:case"end":return T.stop()}},null,this)};function o(r,x){if(!r)throw new Error(x+" is required");if(typeof r!="string")throw new Error(x+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=C(P);function C(a){return a&&a.__esModule?a:{default:a}}var R=N("copy-to"),h=N("./callback"),s=N("./utils/deepCopy"),S=s.deepCopy,d=k;d.listUploads=function(o,r){var x,g,m,w;return u.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return r=r||{},x={},R(r).to(x),x.subres="uploads",g=this._objectRequestParams("GET","",x),g.query=o,g.xmlResponse=!0,g.successStatuses=[200],f.next=10,u.default.awrap(this.request(g));case 10:return m=f.sent,w=m.data.Upload||[],Array.isArray(w)||(w=[w]),w=w.map(function(n){return{name:n.Key,uploadId:n.UploadId,initiated:n.Initiated}}),f.abrupt("return",{res:m.res,uploads:w,bucket:m.data.Bucket,nextKeyMarker:m.data.NextKeyMarker,nextUploadIdMarker:m.data.NextUploadIdMarker,isTruncated:m.data.IsTruncated==="true"});case 15:case"end":return f.stop()}},null,this)},d.listParts=function(o,r,x,g){var m,w,p;return u.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return g=g||{},m={},R(g).to(m),m.subres={uploadId:r},w=this._objectRequestParams("GET",o,m),w.query=x,w.xmlResponse=!0,w.successStatuses=[200],n.next=10,u.default.awrap(this.request(w));case 10:return p=n.sent,n.abrupt("return",{res:p.res,uploadId:p.data.UploadId,bucket:p.data.Bucket,name:p.data.Key,partNumberMarker:p.data.PartNumberMarker,nextPartNumberMarker:p.data.NextPartNumberMarker,maxParts:p.data.MaxParts,isTruncated:p.data.IsTruncated,parts:p.data.Part||[]});case 12:case"end":return n.stop()}},null,this)},d.abortMultipartUpload=function(o,r,x){var g,m,w;return u.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return this._stop(),x=x||{},g={},R(x).to(g),g.subres={uploadId:r},m=this._objectRequestParams("DELETE",o,g),m.successStatuses=[204],f.next=9,u.default.awrap(this.request(m));case 9:return w=f.sent,f.abrupt("return",{res:w.res});case 11:case"end":return f.stop()}},null,this)},d.initMultipartUpload=function(o,r){var x,g,m;return u.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return r=r||{},x={},R(r).to(x),x.headers=x.headers||{},this._convertMetaToHeaders(r.meta,x.headers),x.subres="uploads",g=this._objectRequestParams("POST",o,x),g.mime=r.mime,g.xmlResponse=!0,g.successStatuses=[200],p.next=12,u.default.awrap(this.request(g));case 12:return m=p.sent,p.abrupt("return",{res:m.res,bucket:m.data.Bucket,name:m.data.Key,uploadId:m.data.UploadId});case 14:case"end":return p.stop()}},null,this)},d.uploadPart=function(o,r,x,g,m,w,p){var f;return u.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return f={stream:this._createStream(g,m,w),size:w-m},l.next=3,u.default.awrap(this._uploadPart(o,r,x,f,p));case 3:return l.abrupt("return",l.sent);case 4:case"end":return l.stop()}},null,this)},d.completeMultipartUpload=function(o,r,x,g){var m,w,p,f,n,l,c,T;return u.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:for(m=x.concat().sort(function(L,A){return L.number-A.number}).filter(function(L,A,y){return!A||L.number!==y[A-1].number}),w=` `,p=0;p `,w+=""+f.number+` `,w+=""+f.etag+` `,w+=` `;return w+="",g=g||{},n={},n=S(g),n.headers&&delete n.headers["x-oss-server-side-encryption"],n.subres={uploadId:r},l=this._objectRequestParams("POST",o,n),h.encodeCallback(l,n),l.mime="xml",l.content=w,l.headers&&l.headers["x-oss-callback"]||(l.xmlResponse=!0),l.successStatuses=[200],i.next=17,u.default.awrap(this.request(l));case 17:return c=i.sent,T={res:c.res,bucket:l.bucket,name:o,etag:c.res.headers.etag},l.headers&&l.headers["x-oss-callback"]&&(T.data=JSON.parse(c.data.toString())),i.abrupt("return",T);case 21:case"end":return i.stop()}},null,this)},d._uploadPart=function(o,r,x,g,m){var w,p,f;return u.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return m=m||{},w={},R(m).to(w),w.headers={"Content-Length":g.size},w.subres={partNumber:x,uploadId:r},p=this._objectRequestParams("PUT",o,w),p.mime=w.mime,p.stream=g.stream,p.successStatuses=[200],l.next=11,u.default.awrap(this.request(p));case 11:if(f=l.sent,f.res.headers.etag){l.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 g.stream=null,p.stream=null,l.abrupt("return",{name:o,etag:f.res.headers.etag,res:f.res});case 17:case"end":return l.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=S(P),C=N("babel-runtime/core-js/object/keys"),R=S(C),h=N("babel-runtime/helpers/typeof"),s=S(h);function S(r){return r&&r.__esModule?r:{default:r}}var d=N("../utils/checkBucketName"),a=d.checkBucketName,o=k;o.copy=function(x,g,m,w){var p,f,n;return u.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return(typeof m=="undefined"?"undefined":(0,s.default)(m))==="object"&&(w=m),w=w||{},w.headers=w.headers||{},(0,R.default)(w.headers).forEach(function(T){w.headers["x-oss-copy-source-"+T.toLowerCase()]=w.headers[T]}),w.meta&&(w.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(w.meta,w.headers),g=this._getSourceName(g,m),w.versionId&&(g=g+"?versionId="+w.versionId),w.headers["x-oss-copy-source"]=g,p=this._objectRequestParams("PUT",x,w),p.xmlResponse=!0,p.successStatuses=[200,304],c.next=14,u.default.awrap(this.request(p));case 14:return f=c.sent,n=f.data,n&&(n={etag:n.ETag,lastModified:n.LastModified}),c.abrupt("return",{data:n,res:f.res});case 18:case"end":return c.stop()}},null,this)},o._getSourceName=function(x,g){return typeof g=="string"?x=this._objectName(x):x[0]!=="/"?g=this.options.bucket:(g=x.replace(/\/(.+?)(\/.*)/,"$1"),x=x.replace(/(\/.+?\/)(.*)/,"$2")),a(g),x=encodeURI(x),x="/"+g+"/"+x,x}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=k;s.delete=function(d){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,r;return u.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return a.subres=(0,R.default)({},a.subres),a.versionId&&(a.subres.versionId=a.versionId),o=this._objectRequestParams("DELETE",d,a),o.successStatuses=[204],g.next=6,u.default.awrap(this.request(o));case 6:return r=g.sent,g.abrupt("return",{res:r.res});case 8:case"end":return g.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(o){return o&&o.__esModule?o:{default:o}}var s=N("utility"),S=N("../utils/obj2xml"),d=S.obj2xml,a=k;a.deleteMulti=function(r){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g,m,w,p,f,n,l,c,T,v,i,L;return u.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:if(g=[],!(!r||!r.length)){y.next=3;break}throw new Error("names is required");case 3:for(m=0;m1&&arguments[1]!==void 0?arguments[1]:{},o,r;return u.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return a.subres=(0,R.default)({tagging:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),d=this._objectName(d),o=this._objectRequestParams("DELETE",d,a),o.successStatuses=[204],g.next=7,u.default.awrap(this.request(o));case 7:return r=g.sent,g.abrupt("return",{status:r.status,res:r.res});case 9:case"end":return g.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(a){return a&&a.__esModule?a:{default:a}}var s=N("fs"),S=N("is-type-of"),d=k;d.get=function(o,r){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},g,m,w,p;return u.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return g=null,m=!1,S.writableStream(r)?g=r:S.string(r)?(g=s.createWriteStream(r),m=!0):x=r,x=x||{},x.subres=(0,R.default)({},x.subres),x.versionId&&(x.subres.versionId=x.versionId),x.process&&(x.subres["x-oss-process"]=x.process),w=void 0,n.prev=8,p=this._objectRequestParams("GET",o,x),p.writeStream=g,p.successStatuses=[200,206,304],n.next=14,u.default.awrap(this.request(p));case 14:w=n.sent,m&&g.destroy(),n.next=25;break;case 18:if(n.prev=18,n.t0=n.catch(8),!m){n.next=24;break}return g.destroy(),n.next=24,u.default.awrap(this._deleteFileSafe(r));case 24:throw n.t0;case 25:return n.abrupt("return",{res:w.res,content:w.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(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=k;s.getACL=function(d){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,r;return u.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return a.subres=(0,R.default)({acl:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),d=this._objectName(d),o=this._objectRequestParams("GET",d,a),o.successStatuses=[200],o.xmlResponse=!0,g.next=8,u.default.awrap(this.request(o));case 8:return r=g.sent,g.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 g.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/keys"),u=S(P),C=N("babel-runtime/regenerator"),R=S(C),h=N("babel-runtime/core-js/object/assign"),s=S(h);function S(p){return p&&p.__esModule?p:{default:p}}var d=k,a=N("../utils/isObject"),o=a.isObject,r=N("../utils/isArray"),x=r.isArray;d.getBucketVersions=g,d.listObjectVersions=g;function g(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,l,c,T,v,i;return R.default.async(function(A){for(;;)switch(A.prev=A.next){case 0:if(!(p.versionIdMarker&&p.keyMarker===void 0)){A.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return f.subres=(0,s.default)({versions:""},f.subres),f.versionId&&(f.subres.versionId=f.versionId),n=this._objectRequestParams("GET","",f),n.xmlResponse=!0,n.successStatuses=[200],n.query=w(p),A.next=10,R.default.awrap(this.request(n));case 10:return l=A.sent,c=l.data.Version||[],T=l.data.DeleteMarker||[],v=this,c&&(Array.isArray(c)||(c=[c]),c=c.map(function(y){return{name:y.Key,url:v._objectUrl(y.Key),lastModified:y.LastModified,isLatest:y.IsLatest==="true",versionId:y.VersionId,etag:y.ETag,type:y.Type,size:Number(y.Size),storageClass:y.StorageClass,owner:{id:y.Owner.ID,displayName:y.Owner.DisplayName}}})),T&&(x(T)||(T=[T]),T=T.map(function(y){return{name:y.Key,lastModified:y.LastModified,versionId:y.VersionId,owner:{id:y.Owner.ID,displayName:y.Owner.DisplayName}}})),i=l.data.CommonPrefixes||null,i&&(x(i)||(i=[i]),i=i.map(function(y){return y.Prefix})),A.abrupt("return",{res:l.res,objects:c,deleteMarker:T,prefixes:i,nextMarker:l.data.NextMarker||null,NextVersionIdMarker:l.data.NextVersionIdMarker||null,isTruncated:l.data.IsTruncated==="true"});case 19:case"end":return A.stop()}},null,this)}function m(p){return p.replace(/([A-Z])/g,"-$1").toLowerCase()}function w(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f={};return o(p)&&(0,u.default)(p).forEach(function(n){f[m(n)]=p[n]}),f}},{"../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(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=k;s.getObjectMeta=function(d,a){var o,r;return u.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return a=a||{},d=this._objectName(d),a.subres=(0,R.default)({objectMeta:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),o=this._objectRequestParams("HEAD",d,a),o.successStatuses=[200],g.next=8,u.default.awrap(this.request(o));case 8:return r=g.sent,g.abrupt("return",{status:r.status,res:r.res});case 10:case"end":return g.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(a){return a&&a.__esModule?a:{default:a}}var s=k,S=N("../utils/isObject"),d=S.isObject;s.getObjectTagging=function(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x,g,m,w,p;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),o=this._objectName(o),x=this._objectRequestParams("GET",o,r),x.successStatuses=[200],n.next=7,u.default.awrap(this.request(x));case 7:return g=n.sent,n.next=10,u.default.awrap(this.parseXML(g.data));case 10:return m=n.sent,w=m.TagSet.Tag,w=w&&d(w)?[w]:w||[],p={},w.forEach(function(l){p[l.Key]=l.Value}),n.abrupt("return",{status:g.status,res:g.res,tag:p});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(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=k;s.getSymlink=function(d){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,r,x;return u.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return a.subres=(0,R.default)({symlink:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),d=this._objectName(d),o=this._objectRequestParams("GET",d,a),o.successStatuses=[200],m.next=7,u.default.awrap(this.request(o));case 7:return r=m.sent,x=r.res.headers["x-oss-symlink-target"],m.abrupt("return",{targetName:decodeURIComponent(x),res:r.res});case 10:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=S(P),C=N("babel-runtime/core-js/object/keys"),R=S(C),h=N("babel-runtime/core-js/object/assign"),s=S(h);function S(a){return a&&a.__esModule?a:{default:a}}var d=k;d.head=function(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x,g,m;return u.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return r.subres=(0,s.default)({},r.subres),r.versionId&&(r.subres.versionId=r.versionId),x=this._objectRequestParams("HEAD",o,r),x.successStatuses=[200,304],p.next=6,u.default.awrap(this.request(x));case 6:return g=p.sent,m={meta:null,res:g.res,status:g.status},g.status===200&&(0,R.default)(g.headers).forEach(function(f){f.indexOf("x-oss-meta-")===0&&(m.meta||(m.meta={}),m.meta[f.substring(11)]=g.headers[f])}),p.abrupt("return",m);case 10:case"end":return p.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=k;s.putACL=function(d,a,o){var r,x;return u.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return o=o||{},o.subres=(0,R.default)({acl:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),o.headers=o.headers||{},o.headers["x-oss-object-acl"]=a,d=this._objectName(d),r=this._objectRequestParams("PUT",d,o),r.successStatuses=[200],m.next=10,u.default.awrap(this.request(r));case 10:return x=m.sent,m.abrupt("return",{res:x.res});case 12:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=S(P),C=N("babel-runtime/core-js/object/keys"),R=S(C),h=N("babel-runtime/core-js/object/assign"),s=S(h);function S(g){return g&&g.__esModule?g:{default:g}}var d=N("../utils/obj2xml"),a=d.obj2xml,o=N("../utils/checkObjectTag"),r=o.checkObjectTag,x=k;x.putObjectTagging=function(m,w){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f,n,l;return u.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return r(w),p.subres=(0,s.default)({tagging:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),m=this._objectName(m),f=this._objectRequestParams("PUT",m,p),f.successStatuses=[200],w=(0,R.default)(w).map(function(v){return{Key:v,Value:w[v]}}),n={Tagging:{TagSet:{Tag:w}}},f.mime="xml",f.content=a(n),T.next=12,u.default.awrap(this.request(f));case 12:return l=T.sent,T.abrupt("return",{res:l.res,status:l.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(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=k;s.putSymlink=function(d,a,o){var r,x;return u.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return o=o||{},o.headers=o.headers||{},a=this._escape(this._objectName(a)),this._convertMetaToHeaders(o.meta,o.headers),o.headers["x-oss-symlink-target"]=a,o.subres=(0,R.default)({symlink:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),o.storageClass&&(o.headers["x-oss-storage-class"]=o.storageClass),d=this._objectName(d),r=this._objectRequestParams("PUT",d,o),r.successStatuses=[200],m.next=13,u.default.awrap(this.request(r));case 13:return x=m.sent,m.abrupt("return",{res:x.res});case 15:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(N,Y,k){"use strict";var P=N("babel-runtime/regenerator"),u=h(P),C=N("babel-runtime/core-js/promise"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=k;s._parallelNode=function(d,a,o,r){var x,g,m,w,p,f,n,l;return u.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:x=this,g=[],m=[],w=d.length/a,p=d.length%a,f=p===0?w:(d.length-p)/a+1,n=1,l=0;case 8:if(!(l0){f=!0,n<=0&&x(g);return}n+=1,T(i.value,m(c))}l=!1}v()})},s.cancel=function(d){this.options.cancelFlag=!0,d&&this.abortMultipartUpload(d.name,d.uploadId,d.options)},s.isCancel=function(){return this.options.cancelFlag},s.resetCancelFlag=function(){this.options.cancelFlag=!1},s._stop=function(){this.options.cancelFlag=!0},s._makeCancelEvent=function(){var d={status:0,name:"cancel"};return d}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(N,Y,k){(function(P){"use strict";var u=N("babel-runtime/core-js/json/stringify"),C=s(u),R=N("babel-runtime/core-js/object/keys"),h=s(R);function s(a){return a&&a.__esModule?a:{default:a}}var S=N("./../../shims/crypto/crypto.js"),d=N("is-type-of");k.buildCanonicalizedResource=function(o,r){var x=""+o,g="?";if(d.string(r)&&r.trim()!=="")x+=g+r;else if(d.array(r))r.sort(),x+=g+r.join("&");else if(r){var m=function(f,n){return f[0]>n[0]?1:f[0]1&&arguments[1]!==void 0?arguments[1]:{},x=arguments[2],g=arguments[3],m={},w=r.subResource,p=w===void 0?{}:w;if(r.process){var f="x-oss-process";p[f]=r.process}if(r.trafficLimit){var n="x-oss-traffic-limit";p[n]=r.trafficLimit}if(r.response&&(0,h.default)(r.response).forEach(function(v){var i="response-"+v.toLowerCase();p[i]=r.response[v]}),(0,h.default)(r).forEach(function(v){var i=v.toLowerCase(),L=r[v];i.indexOf("x-oss-")===0?m[i]=L:(i.indexOf("content-md5")===0||i.indexOf("content-type")===0)&&(m[v]=L)}),Object.prototype.hasOwnProperty.call(r,"security-token")&&(p["security-token"]=r["security-token"]),Object.prototype.hasOwnProperty.call(r,"callback")){var l={callbackUrl:encodeURI(r.callback.url),callbackBody:r.callback.body};if(r.callback.host&&(l.callbackHost=r.callback.host),r.callback.contentType&&(l.callbackBodyType=r.callback.contentType),p.callback=P.from((0,C.default)(l)).toString("base64"),r.callback.customValue){var c={};(0,h.default)(r.callback.customValue).forEach(function(v){c["x:"+v]=r.callback.customValue[v]}),p["callback-var"]=P.from((0,C.default)(c)).toString("base64")}}var T=this.buildCanonicalString(r.method,x,{headers:m,parameters:p},g.toString());return{Signature:this.computeSignature(o,T),subResource:p}}}).call(this,N("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(N,Y,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.checkBucketName=void 0,k.checkBucketName=function(P,u){var C=u?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!C.test(P))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/entries"),u=C(P);function C(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(k,"__esModule",{value:!0}),k.checkObjectTag=void 0;var R=N("./checkValid"),h=R.checkValid,s=N("./isObject"),S=s.isObject,d=[{validator:function(x){if(typeof x!="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(d,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(d,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function o(r){if(!S(r))throw new Error("tag must be Object");var x=(0,u.default)(r);if(x.length>10)throw new Error("maximum of 10 tags for a object");var g=["key","value"];x.forEach(function(m){m.forEach(function(w,p){h(w,a[g[p]])})})}k.checkObjectTag=o},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(N,Y,k){"use strict";Object.defineProperty(k,"__esModule",{value:!0}),k.checkValid=void 0;function P(u,C){C.forEach(function(R){if(R.validator)R.validator(u);else if(R.pattern&&!R.pattern.test(u))throw new Error(R.msg)})}k.checkValid=P},{}],38:[function(N,Y,k){(function(P){"use strict";var u=N("babel-runtime/core-js/object/assign"),C=R(u);function R(m){return m&&m.__esModule?m:{default:m}}Object.defineProperty(k,"__esModule",{value:!0}),k.createRequest=void 0;var h=N("./../../../shims/crypto/crypto.js"),s=N("debug")("ali-oss"),S=N("mime"),d=N("dateformat"),a=N("copy-to"),o=N("path");function r(m,w){return m[w]||m[w.toLowerCase()]}function x(m,w){delete m[w],delete m[w.toLowerCase()]}function g(m){var w=new Date;this.options.amendTimeSkewed&&(w=+new Date+this.options.amendTimeSkewed);var p={"x-oss-date":d(w,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(p["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,C.default)(p,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(p["x-oss-security-token"]=this.options.stsToken),a(m.headers).to(p),r(p,"Content-Type")||(m.mime&&m.mime.indexOf("/")>0?p["Content-Type"]=m.mime:p["Content-Type"]=S.getType(m.mime||o.extname(m.object||""))),r(p,"Content-Type")||x(p,"Content-Type"),m.content&&(p["Content-Md5"]=h.createHash("md5").update(P.from(m.content,"utf8")).digest("base64"),p["Content-Length"]||(p["Content-Length"]=m.content.length));var f=this._getResource(m);p.authorization=this.authorization(m.method,f,m.subres,p);var n=this._getReqUrl(m);s("request %s %s, with headers %j, !!stream: %s",m.method,n,p,!!m.stream);var l=m.timeout||this.options.timeout,c={method:m.method,content:m.content,stream:m.stream,headers:p,timeout:l,writeStream:m.writeStream,customResponse:m.customResponse,ctx:m.ctx||this.ctx};return this.agent&&(c.agent=this.agent),this.httpsAgent&&(c.httpsAgent=this.httpsAgent),{url:n,params:c}}k.createRequest=g}).call(this,N("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(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/keys"),u=h(P),C=N("babel-runtime/helpers/typeof"),R=h(C);function h(s){return s&&s.__esModule?s:{default:s}}Object.defineProperty(k,"__esModule",{value:!0}),k.deepCopy=void 0,k.deepCopy=function(s){if(s===null||(typeof s=="undefined"?"undefined":(0,R.default)(s))!=="object")return s;var S=Array.isArray(s)?[]:{};return(0,u.default)(s).forEach(function(d){S[d]=k.deepCopy(s[d])}),S}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/keys"),u=h(P),C=N("babel-runtime/helpers/typeof"),R=h(C);function h(d){return d&&d.__esModule?d:{default:d}}Object.defineProperty(k,"__esModule",{value:!0}),k.formatObjKey=void 0;function s(d,a){if(d===null||(typeof d=="undefined"?"undefined":(0,R.default)(d))!=="object")return d;var o=void 0;if(Array.isArray(d)){o=[];for(var r=0;r `),d&&d.firstUpperCase&&(S=R.formatObjKey(S,"firstUpperCase")),h(S)==="object"?(0,u.default)(S).forEach(function(o){h(S[o])==="string"||h(S[o])==="number"?a+="<"+o+">"+S[o]+"":h(S[o])==="object"?a+="<"+o+">"+s(S[o])+"":h(S[o])==="array"?a+=S[o].map(function(r){return"<"+o+">"+s(r)+""}).join(""):a+="<"+o+">"+S[o].toString()+""}):a+=S.toString(),a}k.obj2xml=s},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(N,Y,k){Y.exports=P,Y.exports.HttpsAgent=P;function P(){}},{}],49:[function(N,Y,k){Y.exports=N("./register")().Promise},{"./register":51}],50:[function(N,Y,k){"use strict";var P="@@any-promise/REGISTRATION",u=null;Y.exports=function(C,R){return function(s,S){s=s||null,S=S||{};var d=S.global!==!1;if(u===null&&d&&(u=C[P]||null),u!==null&&s!==null&&u.implementation!==s)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&&(s!==null&&typeof S.Promise!="undefined"?u={Promise:S.Promise,implementation:s}:u=R(s),d&&(C[P]=u)),u}}},{}],51:[function(N,Y,k){"use strict";Y.exports=N("./loader")(window,P);function P(){if(typeof window.Promise=="undefined")throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}},{"./loader":50}],52:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(N,Y,k){Y.exports={default:N("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(N,Y,k){"use strict";k.__esModule=!0;var P=N("../core-js/symbol/iterator"),u=s(P),C=N("../core-js/symbol"),R=s(C),h=typeof R.default=="function"&&typeof u.default=="symbol"?function(S){return typeof S}:function(S){return S&&typeof R.default=="function"&&S.constructor===R.default&&S!==R.default.prototype?"symbol":typeof S};function s(S){return S&&S.__esModule?S:{default:S}}k.default=typeof R.default=="function"&&h(u.default)==="symbol"?function(S){return typeof S=="undefined"?"undefined":h(S)}:function(S){return S&&typeof R.default=="function"&&S.constructor===R.default&&S!==R.default.prototype?"symbol":typeof S=="undefined"?"undefined":h(S)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(N,Y,k){Y.exports=N("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(N,Y,k){"use strict";k.byteLength=d,k.toByteArray=o,k.fromByteArray=g;for(var P=[],u=[],C=typeof Uint8Array!="undefined"?Uint8Array:Array,R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,s=R.length;h0)throw new Error("Invalid string. Length must be a multiple of 4");var p=m.indexOf("=");p===-1&&(p=w);var f=p===w?0:4-p%4;return[p,f]}function d(m){var w=S(m),p=w[0],f=w[1];return(p+f)*3/4-f}function a(m,w,p){return(w+p)*3/4-p}function o(m){var w,p=S(m),f=p[0],n=p[1],l=new C(a(m,f,n)),c=0,T=n>0?f-4:f,v;for(v=0;v>16&255,l[c++]=w>>8&255,l[c++]=w&255;return n===2&&(w=u[m.charCodeAt(v)]<<2|u[m.charCodeAt(v+1)]>>4,l[c++]=w&255),n===1&&(w=u[m.charCodeAt(v)]<<10|u[m.charCodeAt(v+1)]<<4|u[m.charCodeAt(v+2)]>>2,l[c++]=w>>8&255,l[c++]=w&255),l}function r(m){return P[m>>18&63]+P[m>>12&63]+P[m>>6&63]+P[m&63]}function x(m,w,p){for(var f,n=[],l=w;lT?T:c+l));return f===1?(w=m[p-1],n.push(P[w>>2]+P[w<<4&63]+"==")):f===2&&(w=(m[p-2]<<8)+m[p-1],n.push(P[w>>10]+P[w>>4&63]+P[w<<2&63]+"=")),n.join("")}},{}],70:[function(N,Y,k){/*! * Bowser - a browser detector * https://github.com/ded/bowser * MIT License | (c) Dustin Diaz 2015 */!function(P,u,C){typeof Y!="undefined"&&Y.exports?Y.exports=C():typeof define=="function"&&define.amd?define(u,C):P[u]=C()}(this,"bowser",function(){var P=!0;function u(a){function o(z){var B=a.match(z);return B&&B.length>1&&B[1]||""}function r(z){var B=a.match(z);return B&&B.length>1&&B[2]||""}var x=o(/(ipod|iphone|ipad)/i).toLowerCase(),g=/like android/i.test(a),m=!g&&/android/i.test(a),w=/nexus\s*[0-6]\s*/i.test(a),p=!w&&/nexus\s*[0-9]+/i.test(a),f=/CrOS/.test(a),n=/silk/i.test(a),l=/sailfish/i.test(a),c=/tizen/i.test(a),T=/(web|hpw)(o|0)s/i.test(a),v=/windows phone/i.test(a),i=/SamsungBrowser/i.test(a),L=!v&&/windows/i.test(a),A=!x&&!n&&/macintosh/i.test(a),y=!m&&!l&&!c&&!T&&/linux/i.test(a),E=r(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),b=o(/version\/(\d+(\.\d+)?)/i),_=/tablet/i.test(a)&&!/tablet pc/i.test(a),I=!_&&/[^-]mobi/i.test(a),j=/xbox/i.test(a),M;/opera/i.test(a)?M={name:"Opera",opera:P,version:b||o(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(a)?M={name:"Opera",opera:P,version:o(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||b}:/SamsungBrowser/i.test(a)?M={name:"Samsung Internet for Android",samsungBrowser:P,version:b||o(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(a)?M={name:"NAVER Whale browser",whale:P,version:o(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(a)?M={name:"MZ Browser",mzbrowser:P,version:o(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(a)?M={name:"Opera Coast",coast:P,version:b||o(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(a)?M={name:"Focus",focus:P,version:o(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(a)?M={name:"Yandex Browser",yandexbrowser:P,version:b||o(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(a)?M={name:"UC Browser",ucbrowser:P,version:o(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(a)?M={name:"Maxthon",maxthon:P,version:o(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(a)?M={name:"Epiphany",epiphany:P,version:o(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(a)?M={name:"Puffin",puffin:P,version:o(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(a)?M={name:"Sleipnir",sleipnir:P,version:o(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(a)?M={name:"K-Meleon",kMeleon:P,version:o(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:v?(M={name:"Windows Phone",osname:"Windows Phone",windowsphone:P},E?(M.msedge=P,M.version=E):(M.msie=P,M.version=o(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(a)?M={name:"Internet Explorer",msie:P,version:o(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:f?M={name:"Chrome",osname:"Chrome OS",chromeos:P,chromeBook:P,chrome:P,version:o(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(a)?M={name:"Microsoft Edge",msedge:P,version:E}:/vivaldi/i.test(a)?M={name:"Vivaldi",vivaldi:P,version:o(/vivaldi\/(\d+(\.\d+)?)/i)||b}:l?M={name:"Sailfish",osname:"Sailfish OS",sailfish:P,version:o(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(a)?M={name:"SeaMonkey",seamonkey:P,version:o(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(a)?(M={name:"Firefox",firefox:P,version:o(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(a)&&(M.firefoxos=P,M.osname="Firefox OS")):n?M={name:"Amazon Silk",silk:P,version:o(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(a)?M={name:"PhantomJS",phantom:P,version:o(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(a)?M={name:"SlimerJS",slimer:P,version:o(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(a)||/rim\stablet/i.test(a)?M={name:"BlackBerry",osname:"BlackBerry OS",blackberry:P,version:b||o(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:T?(M={name:"WebOS",osname:"WebOS",webos:P,version:b||o(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(a)&&(M.touchpad=P)):/bada/i.test(a)?M={name:"Bada",osname:"Bada",bada:P,version:o(/dolfin\/(\d+(\.\d+)?)/i)}:c?M={name:"Tizen",osname:"Tizen",tizen:P,version:o(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||b}:/qupzilla/i.test(a)?M={name:"QupZilla",qupzilla:P,version:o(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||b}:/chromium/i.test(a)?M={name:"Chromium",chromium:P,version:o(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||b}:/chrome|crios|crmo/i.test(a)?M={name:"Chrome",chrome:P,version:o(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:m?M={name:"Android",version:b}:/safari|applewebkit/i.test(a)?(M={name:"Safari",safari:P},b&&(M.version=b)):x?(M={name:x=="iphone"?"iPhone":x=="ipad"?"iPad":"iPod"},b&&(M.version=b)):/googlebot/i.test(a)?M={name:"Googlebot",googlebot:P,version:o(/googlebot\/(\d+(\.\d+))/i)||b}:M={name:o(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!M.msedge&&/(apple)?webkit/i.test(a)?(/(apple)?webkit\/537\.36/i.test(a)?(M.name=M.name||"Blink",M.blink=P):(M.name=M.name||"Webkit",M.webkit=P),!M.version&&b&&(M.version=b)):!M.opera&&/gecko\//i.test(a)&&(M.name=M.name||"Gecko",M.gecko=P,M.version=M.version||o(/gecko\/(\d+(\.\d+)?)/i)),!M.windowsphone&&(m||M.silk)?(M.android=P,M.osname="Android"):!M.windowsphone&&x?(M[x]=P,M.ios=P,M.osname="iOS"):A?(M.mac=P,M.osname="macOS"):j?(M.xbox=P,M.osname="Xbox"):L?(M.windows=P,M.osname="Windows"):y&&(M.linux=P,M.osname="Linux");function G(z){switch(z){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var K="";M.windows?K=G(o(/Windows ((NT|XP)( \d\d?.\d)?)/i)):M.windowsphone?K=o(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):M.mac?(K=o(/Mac OS X (\d+([_\.\s]\d+)*)/i),K=K.replace(/[_\s]/g,".")):x?(K=o(/os (\d+([_\s]\d+)*) like mac os x/i),K=K.replace(/[_\s]/g,".")):m?K=o(/android[ \/-](\d+(\.\d+)*)/i):M.webos?K=o(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):M.blackberry?K=o(/rim\stablet\sos\s(\d+(\.\d+)*)/i):M.bada?K=o(/bada\/(\d+(\.\d+)*)/i):M.tizen&&(K=o(/tizen[\/\s](\d+(\.\d+)*)/i)),K&&(M.osversion=K);var H=!M.windows&&K.split(".")[0];return _||p||x=="ipad"||m&&(H==3||H>=4&&!I)||M.silk?M.tablet=P:(I||x=="iphone"||x=="ipod"||m||w||M.blackberry||M.webos||M.bada)&&(M.mobile=P),M.msedge||M.msie&&M.version>=10||M.yandexbrowser&&M.version>=15||M.vivaldi&&M.version>=1||M.chrome&&M.version>=20||M.samsungBrowser&&M.version>=4||M.whale&&s([M.version,"1.0"])===1||M.mzbrowser&&s([M.version,"6.0"])===1||M.focus&&s([M.version,"1.0"])===1||M.firefox&&M.version>=20||M.safari&&M.version>=6||M.opera&&M.version>=10||M.ios&&M.osversion&&M.osversion.split(".")[0]>=6||M.blackberry&&M.version>=10.1||M.chromium&&M.version>=20?M.a=P:M.msie&&M.version<10||M.chrome&&M.version<20||M.firefox&&M.version<20||M.safari&&M.version<6||M.opera&&M.version<10||M.ios&&M.osversion&&M.osversion.split(".")[0]<6||M.chromium&&M.version<20?M.c=P:M.x=P,M}var C=u(typeof navigator!="undefined"&&navigator.userAgent||"");C.test=function(a){for(var o=0;o=0;){if(r[0][o]>r[1][o])return 1;if(r[0][o]===r[1][o]){if(o===0)return 0}else return-1}}function S(a,o,r){var x=C;typeof o=="string"&&(r=o,o=void 0),o===void 0&&(o=!1),r&&(x=u(r));var g=""+x.version;for(var m in a)if(a.hasOwnProperty(m)&&x[m]){if(typeof a[m]!="string")throw new Error("Browser version in the minVersion map should be a string: "+m+": "+String(a));return s([g,a[m]])<0}return o}function d(a,o,r){return!S(a,o,r)}return C.isUnsupportedBrowser=S,C.compareVersions=s,C.check=d,C._detect=u,C.detect=u,C})},{}],71:[function(N,Y,k){},{}],72:[function(N,Y,k){var P=N("buffer").Buffer,u=P.isEncoding||function(d){switch(d&&d.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 C(d){if(d&&!u(d))throw new Error("Unknown encoding: "+d)}var R=k.StringDecoder=function(d){this.encoding=(d||"utf8").toLowerCase().replace(/[-_]/,""),C(d);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=S;break;default:this.write=h;return}this.charBuffer=new P(6),this.charReceived=0,this.charLength=0};R.prototype.write=function(d){for(var a="";this.charLength;){var o=d.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:d.length;if(d.copy(this.charBuffer,this.charReceived,0,o),this.charReceived+=o,this.charReceived=55296&&x<=56319){this.charLength+=this.surrogateSize,a="";continue}if(this.charReceived=this.charLength=0,d.length===0)return a;break}this.detectIncompleteChar(d);var r=d.length;this.charLength&&(d.copy(this.charBuffer,0,d.length-this.charReceived,r),r-=this.charReceived),a+=d.toString(this.encoding,0,r);var r=a.length-1,x=a.charCodeAt(r);if(x>=55296&&x<=56319){var g=this.surrogateSize;return this.charLength+=g,this.charReceived+=g,this.charBuffer.copy(this.charBuffer,g,0,g),d.copy(this.charBuffer,0,0,g),a.substring(0,r)}return a},R.prototype.detectIncompleteChar=function(d){for(var a=d.length>=3?3:d.length;a>0;a--){var o=d[d.length-a];if(a==1&&o>>5==6){this.charLength=2;break}if(a<=2&&o>>4==14){this.charLength=3;break}if(a<=3&&o>>3==30){this.charLength=4;break}}this.charReceived=a},R.prototype.end=function(d){var a="";if(d&&d.length&&(a=this.write(d)),this.charReceived){var o=this.charReceived,r=this.charBuffer,x=this.encoding;a+=r.slice(0,o).toString(x)}return a};function h(d){return d.toString(this.encoding)}function s(d){this.charReceived=d.length%2,this.charLength=this.charReceived?2:0}function S(d){this.charReceived=d.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(N,Y,k){(function(P,u){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */"use strict";var C=N("base64-js"),R=N("ieee754"),h=N("isarray");k.Buffer=u,k.SlowBuffer=n,k.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=P.TYPED_ARRAY_SUPPORT!==void 0?P.TYPED_ARRAY_SUPPORT:s(),k.kMaxLength=S();function s(){try{var ae=new Uint8Array(1);return ae.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ae.foo()===42&&typeof ae.subarray=="function"&&ae.subarray(1,1).byteLength===0}catch(J){return!1}}function S(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function d(ae,J){if(S()=S())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S().toString(16)+" bytes");return ae|0}function n(ae){return+ae!=ae&&(ae=0),u.alloc(+ae)}u.isBuffer=function(J){return!!(J!=null&&J._isBuffer)},u.compare=function(J,X){if(!u.isBuffer(J)||!u.isBuffer(X))throw new TypeError("Arguments must be Buffers");if(J===X)return 0;for(var Q=J.length,pe=X.length,ce=0,we=Math.min(Q,pe);ce>>1;case"base64":return q(ae).length;default:if(Q)return se(ae).length;J=(""+J).toLowerCase(),Q=!0}}u.byteLength=l;function c(ae,J,X){var Q=!1;if((J===void 0||J<0)&&(J=0),J>this.length)return"";if((X===void 0||X>this.length)&&(X=this.length),X<=0)return"";if(X>>>=0,J>>>=0,X<=J)return"";for(ae||(ae="utf8");;)switch(ae){case"hex":return z(this,J,X);case"utf8":case"utf-8":return j(this,J,X);case"ascii":return K(this,J,X);case"latin1":case"binary":return H(this,J,X);case"base64":return I(this,J,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,J,X);default:if(Q)throw new TypeError("Unknown encoding: "+ae);ae=(ae+"").toLowerCase(),Q=!0}}u.prototype._isBuffer=!0;function T(ae,J,X){var Q=ae[J];ae[J]=ae[X],ae[X]=Q}u.prototype.swap16=function(){var J=this.length;if(J%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var X=0;X0&&(J=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&(J+=" ... ")),""},u.prototype.compare=function(J,X,Q,pe,ce){if(!u.isBuffer(J))throw new TypeError("Argument must be a Buffer");if(X===void 0&&(X=0),Q===void 0&&(Q=J?J.length:0),pe===void 0&&(pe=0),ce===void 0&&(ce=this.length),X<0||Q>J.length||pe<0||ce>this.length)throw new RangeError("out of range index");if(pe>=ce&&X>=Q)return 0;if(pe>=ce)return-1;if(X>=Q)return 1;if(X>>>=0,Q>>>=0,pe>>>=0,ce>>>=0,this===J)return 0;for(var we=ce-pe,ze=Q-X,Ge=Math.min(we,ze),Qe=this.slice(pe,ce),$e=J.slice(X,Q),rt=0;rt2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),X=+X,isNaN(X)&&(X=pe?0:ae.length-1),X<0&&(X=ae.length+X),X>=ae.length){if(pe)return-1;X=ae.length-1}else if(X<0)if(pe)X=0;else return-1;if(typeof J=="string"&&(J=u.from(J,Q)),u.isBuffer(J))return J.length===0?-1:i(ae,J,X,Q,pe);if(typeof J=="number")return J=J&255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?pe?Uint8Array.prototype.indexOf.call(ae,J,X):Uint8Array.prototype.lastIndexOf.call(ae,J,X):i(ae,[J],X,Q,pe);throw new TypeError("val must be string, number or Buffer")}function i(ae,J,X,Q,pe){var ce=1,we=ae.length,ze=J.length;if(Q!==void 0&&(Q=String(Q).toLowerCase(),Q==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if(ae.length<2||J.length<2)return-1;ce=2,we/=2,ze/=2,X/=2}function Ge(Me,Ce){return ce===1?Me[Ce]:Me.readUInt16BE(Ce*ce)}var Qe;if(pe){var $e=-1;for(Qe=X;Qewe&&(X=we-ze),Qe=X;Qe>=0;Qe--){for(var rt=!0,et=0;etpe&&(Q=pe)):Q=pe;var ce=J.length;if(ce%2!==0)throw new TypeError("Invalid hex string");Q>ce/2&&(Q=ce/2);for(var we=0;wece)&&(Q=ce),J.length>0&&(Q<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");pe||(pe="utf8");for(var we=!1;;)switch(pe){case"hex":return L(this,J,X,Q);case"utf8":case"utf-8":return A(this,J,X,Q);case"ascii":return y(this,J,X,Q);case"latin1":case"binary":return E(this,J,X,Q);case"base64":return b(this,J,X,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,J,X,Q);default:if(we)throw new TypeError("Unknown encoding: "+pe);pe=(""+pe).toLowerCase(),we=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function I(ae,J,X){return J===0&&X===ae.length?C.fromByteArray(ae):C.fromByteArray(ae.slice(J,X))}function j(ae,J,X){X=Math.min(ae.length,X);for(var Q=[],pe=J;pe239?4:ce>223?3:ce>191?2:1;if(pe+ze<=X){var Ge,Qe,$e,rt;switch(ze){case 1:ce<128&&(we=ce);break;case 2:Ge=ae[pe+1],(Ge&192)===128&&(rt=(ce&31)<<6|Ge&63,rt>127&&(we=rt));break;case 3:Ge=ae[pe+1],Qe=ae[pe+2],(Ge&192)===128&&(Qe&192)===128&&(rt=(ce&15)<<12|(Ge&63)<<6|Qe&63,rt>2047&&(rt<55296||rt>57343)&&(we=rt));break;case 4:Ge=ae[pe+1],Qe=ae[pe+2],$e=ae[pe+3],(Ge&192)===128&&(Qe&192)===128&&($e&192)===128&&(rt=(ce&15)<<18|(Ge&63)<<12|(Qe&63)<<6|$e&63,rt>65535&&rt<1114112&&(we=rt))}}we===null?(we=65533,ze=1):we>65535&&(we-=65536,Q.push(we>>>10&1023|55296),we=56320|we&1023),Q.push(we),pe+=ze}return G(Q)}var M=4096;function G(ae){var J=ae.length;if(J<=M)return String.fromCharCode.apply(String,ae);for(var X="",Q=0;QQ)&&(X=Q);for(var pe="",ce=J;ceQ&&(J=Q),X<0?(X+=Q,X<0&&(X=0)):X>Q&&(X=Q),XX)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUIntLE=function(J,X,Q){J=J|0,X=X|0,Q||W(J,X,this.length);for(var pe=this[J],ce=1,we=0;++we0&&(ce*=256);)pe+=this[J+--X]*ce;return pe},u.prototype.readUInt8=function(J,X){return X||W(J,1,this.length),this[J]},u.prototype.readUInt16LE=function(J,X){return X||W(J,2,this.length),this[J]|this[J+1]<<8},u.prototype.readUInt16BE=function(J,X){return X||W(J,2,this.length),this[J]<<8|this[J+1]},u.prototype.readUInt32LE=function(J,X){return X||W(J,4,this.length),(this[J]|this[J+1]<<8|this[J+2]<<16)+this[J+3]*16777216},u.prototype.readUInt32BE=function(J,X){return X||W(J,4,this.length),this[J]*16777216+(this[J+1]<<16|this[J+2]<<8|this[J+3])},u.prototype.readIntLE=function(J,X,Q){J=J|0,X=X|0,Q||W(J,X,this.length);for(var pe=this[J],ce=1,we=0;++we=ce&&(pe-=Math.pow(2,8*X)),pe},u.prototype.readIntBE=function(J,X,Q){J=J|0,X=X|0,Q||W(J,X,this.length);for(var pe=X,ce=1,we=this[J+--pe];pe>0&&(ce*=256);)we+=this[J+--pe]*ce;return ce*=128,we>=ce&&(we-=Math.pow(2,8*X)),we},u.prototype.readInt8=function(J,X){return X||W(J,1,this.length),this[J]&128?(255-this[J]+1)*-1:this[J]},u.prototype.readInt16LE=function(J,X){X||W(J,2,this.length);var Q=this[J]|this[J+1]<<8;return Q&32768?Q|4294901760:Q},u.prototype.readInt16BE=function(J,X){X||W(J,2,this.length);var Q=this[J+1]|this[J]<<8;return Q&32768?Q|4294901760:Q},u.prototype.readInt32LE=function(J,X){return X||W(J,4,this.length),this[J]|this[J+1]<<8|this[J+2]<<16|this[J+3]<<24},u.prototype.readInt32BE=function(J,X){return X||W(J,4,this.length),this[J]<<24|this[J+1]<<16|this[J+2]<<8|this[J+3]},u.prototype.readFloatLE=function(J,X){return X||W(J,4,this.length),R.read(this,J,!0,23,4)},u.prototype.readFloatBE=function(J,X){return X||W(J,4,this.length),R.read(this,J,!1,23,4)},u.prototype.readDoubleLE=function(J,X){return X||W(J,8,this.length),R.read(this,J,!0,52,8)},u.prototype.readDoubleBE=function(J,X){return X||W(J,8,this.length),R.read(this,J,!1,52,8)};function F(ae,J,X,Q,pe,ce){if(!u.isBuffer(ae))throw new TypeError('"buffer" argument must be a Buffer instance');if(J>pe||Jae.length)throw new RangeError("Index out of range")}u.prototype.writeUIntLE=function(J,X,Q,pe){if(J=+J,X=X|0,Q=Q|0,!pe){var ce=Math.pow(2,8*Q)-1;F(this,J,X,Q,ce,0)}var we=1,ze=0;for(this[X]=J&255;++ze=0&&(ze*=256);)this[X+we]=J/ze&255;return X+Q},u.prototype.writeUInt8=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,1,255,0),u.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),this[X]=J&255,X+1};function $(ae,J,X,Q){J<0&&(J=65535+J+1);for(var pe=0,ce=Math.min(ae.length-X,2);pe>>(Q?pe:1-pe)*8}u.prototype.writeUInt16LE=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8):$(this,J,X,!0),X+2},u.prototype.writeUInt16BE=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[X]=J>>>8,this[X+1]=J&255):$(this,J,X,!1),X+2};function ee(ae,J,X,Q){J<0&&(J=4294967295+J+1);for(var pe=0,ce=Math.min(ae.length-X,4);pe>>(Q?pe:3-pe)*8&255}u.prototype.writeUInt32LE=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[X+3]=J>>>24,this[X+2]=J>>>16,this[X+1]=J>>>8,this[X]=J&255):ee(this,J,X,!0),X+4},u.prototype.writeUInt32BE=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[X]=J>>>24,this[X+1]=J>>>16,this[X+2]=J>>>8,this[X+3]=J&255):ee(this,J,X,!1),X+4},u.prototype.writeIntLE=function(J,X,Q,pe){if(J=+J,X=X|0,!pe){var ce=Math.pow(2,8*Q-1);F(this,J,X,Q,ce-1,-ce)}var we=0,ze=1,Ge=0;for(this[X]=J&255;++we>0)-Ge&255;return X+Q},u.prototype.writeIntBE=function(J,X,Q,pe){if(J=+J,X=X|0,!pe){var ce=Math.pow(2,8*Q-1);F(this,J,X,Q,ce-1,-ce)}var we=Q-1,ze=1,Ge=0;for(this[X+we]=J&255;--we>=0&&(ze*=256);)J<0&&Ge===0&&this[X+we+1]!==0&&(Ge=1),this[X+we]=(J/ze>>0)-Ge&255;return X+Q},u.prototype.writeInt8=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,1,127,-128),u.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),J<0&&(J=255+J+1),this[X]=J&255,X+1},u.prototype.writeInt16LE=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8):$(this,J,X,!0),X+2},u.prototype.writeInt16BE=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[X]=J>>>8,this[X+1]=J&255):$(this,J,X,!1),X+2},u.prototype.writeInt32LE=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8,this[X+2]=J>>>16,this[X+3]=J>>>24):ee(this,J,X,!0),X+4},u.prototype.writeInt32BE=function(J,X,Q){return J=+J,X=X|0,Q||F(this,J,X,4,2147483647,-2147483648),J<0&&(J=4294967295+J+1),u.TYPED_ARRAY_SUPPORT?(this[X]=J>>>24,this[X+1]=J>>>16,this[X+2]=J>>>8,this[X+3]=J&255):ee(this,J,X,!1),X+4};function Z(ae,J,X,Q,pe,ce){if(X+Q>ae.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function ve(ae,J,X,Q,pe){return pe||Z(ae,J,X,4,34028234663852886e22,-34028234663852886e22),R.write(ae,J,X,Q,23,4),X+4}u.prototype.writeFloatLE=function(J,X,Q){return ve(this,J,X,!0,Q)},u.prototype.writeFloatBE=function(J,X,Q){return ve(this,J,X,!1,Q)};function he(ae,J,X,Q,pe){return pe||Z(ae,J,X,8,17976931348623157e292,-17976931348623157e292),R.write(ae,J,X,Q,52,8),X+8}u.prototype.writeDoubleLE=function(J,X,Q){return he(this,J,X,!0,Q)},u.prototype.writeDoubleBE=function(J,X,Q){return he(this,J,X,!1,Q)},u.prototype.copy=function(J,X,Q,pe){if(Q||(Q=0),!pe&&pe!==0&&(pe=this.length),X>=J.length&&(X=J.length),X||(X=0),pe>0&&pe=this.length)throw new RangeError("sourceStart out of bounds");if(pe<0)throw new RangeError("sourceEnd out of bounds");pe>this.length&&(pe=this.length),J.length-X=0;--we)J[we+X]=this[we+Q];else if(ce<1e3||!u.TYPED_ARRAY_SUPPORT)for(we=0;we>>0,Q=Q===void 0?this.length:Q>>>0,J||(J=0);var we;if(typeof J=="number")for(we=X;we55295&&X<57344){if(!pe){if(X>56319){(J-=3)>-1&&ce.push(239,191,189);continue}else if(we+1===Q){(J-=3)>-1&&ce.push(239,191,189);continue}pe=X;continue}if(X<56320){(J-=3)>-1&&ce.push(239,191,189),pe=X;continue}X=(pe-55296<<10|X-56320)+65536}else pe&&((J-=3)>-1&&ce.push(239,191,189));if(pe=null,X<128){if((J-=1)<0)break;ce.push(X)}else if(X<2048){if((J-=2)<0)break;ce.push(X>>6|192,X&63|128)}else if(X<65536){if((J-=3)<0)break;ce.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((J-=4)<0)break;ce.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw new Error("Invalid code point")}return ce}function re(ae){for(var J=[],X=0;X>8,pe=X%256,ce.push(pe),ce.push(Q);return ce}function q(ae){return C.toByteArray(Re(ae))}function ne(ae,J,X,Q){for(var pe=0;pe=J.length||pe>=ae.length);++pe)J[pe+X]=ae[pe];return pe}function Te(ae){return ae!==ae}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},N("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(N,Y,k){Y.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(N,Y,k){Y.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(N,Y,k){/*! * copy-to - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */"use strict";var P=Array.prototype.slice;Y.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=P.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 s=0;so;)if(r=d[o++],r!=r)return!0}else for(;a>o;o++)if((R||o in d)&&d[o]===s)return R||o||0;return!R&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(N,Y,k){var P=N("./_cof"),u=N("./_wks")("toStringTag"),C=P(function(){return arguments}())=="Arguments",R=function(h,s){try{return h[s]}catch(S){}};Y.exports=function(h){var s,S,d;return h===void 0?"Undefined":h===null?"Null":typeof(S=R(s=Object(h),u))=="string"?S:C?P(s):(d=P(s))=="Object"&&typeof s.callee=="function"?"Arguments":d}},{"./_cof":98,"./_wks":166}],98:[function(N,Y,k){var P={}.toString;Y.exports=function(u){return P.call(u).slice(8,-1)}},{}],99:[function(N,Y,k){var P=Y.exports={version:"2.6.11"};typeof __e=="number"&&(__e=P)},{}],100:[function(N,Y,k){"use strict";var P=N("./_object-dp"),u=N("./_property-desc");Y.exports=function(C,R,h){R in C?P.f(C,R,u(0,h)):C[R]=h}},{"./_object-dp":132,"./_property-desc":146}],101:[function(N,Y,k){var P=N("./_a-function");Y.exports=function(u,C,R){if(P(u),C===void 0)return u;switch(R){case 1:return function(h){return u.call(C,h)};case 2:return function(h,s){return u.call(C,h,s)};case 3:return function(h,s,S){return u.call(C,h,s,S)}}return function(){return u.apply(C,arguments)}}},{"./_a-function":92}],102:[function(N,Y,k){Y.exports=function(P){if(P==null)throw TypeError("Can't call method on "+P);return P}},{}],103:[function(N,Y,k){Y.exports=!N("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(N,Y,k){var P=N("./_is-object"),u=N("./_global").document,C=P(u)&&P(u.createElement);Y.exports=function(R){return C?u.createElement(R):{}}},{"./_global":110,"./_is-object":119}],105:[function(N,Y,k){Y.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(N,Y,k){var P=N("./_object-keys"),u=N("./_object-gops"),C=N("./_object-pie");Y.exports=function(R){var h=P(R),s=u.f;if(s)for(var S=s(R),d=C.f,a=0,o;S.length>a;)d.call(R,o=S[a++])&&h.push(o);return h}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(N,Y,k){var P=N("./_global"),u=N("./_core"),C=N("./_ctx"),R=N("./_hide"),h=N("./_has"),s="prototype",S=function(d,a,o){var r=d&S.F,x=d&S.G,g=d&S.S,m=d&S.P,w=d&S.B,p=d&S.W,f=x?u:u[a]||(u[a]={}),n=f[s],l=x?P:g?P[a]:(P[a]||{})[s],c,T,v;x&&(o=a);for(c in o){if(T=!r&&l&&l[c]!==void 0,T&&h(f,c))continue;v=T?l[c]:o[c],f[c]=x&&typeof l[c]!="function"?o[c]:w&&T?C(v,P):p&&l[c]==v?function(i){var L=function(A,y,E){if(this instanceof i){switch(arguments.length){case 0:return new i;case 1:return new i(A);case 2:return new i(A,y)}return new i(A,y,E)}return i.apply(this,arguments)};return L[s]=i[s],L}(v):m&&typeof v=="function"?C(Function.call,v):v,m&&((f.virtual||(f.virtual={}))[c]=v,d&S.R&&n&&!n[c]&&R(n,c,v))}};S.F=1,S.G=2,S.S=4,S.P=8,S.B=16,S.W=32,S.U=64,S.R=128,Y.exports=S},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(N,Y,k){Y.exports=function(P){try{return!!P()}catch(u){return!0}}},{}],109:[function(N,Y,k){var P=N("./_ctx"),u=N("./_iter-call"),C=N("./_is-array-iter"),R=N("./_an-object"),h=N("./_to-length"),s=N("./core.get-iterator-method"),S={},d={},k=Y.exports=function(a,o,r,x,g){var m=g?function(){return a}:s(a),w=P(r,x,o?2:1),p=0,f,n,l,c;if(typeof m!="function")throw TypeError(a+" is not iterable!");if(C(m)){for(f=h(a.length);f>p;p++)if(c=o?w(R(n=a[p])[0],n[1]):w(a[p]),c===S||c===d)return c}else for(l=m.call(a);!(n=l.next()).done;)if(c=u(l,w,n.value,o),c===S||c===d)return c};k.BREAK=S,k.RETURN=d},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(N,Y,k){var P=Y.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=P)},{}],111:[function(N,Y,k){var P={}.hasOwnProperty;Y.exports=function(u,C){return P.call(u,C)}},{}],112:[function(N,Y,k){var P=N("./_object-dp"),u=N("./_property-desc");Y.exports=N("./_descriptors")?function(C,R,h){return P.f(C,R,u(1,h))}:function(C,R,h){return C[R]=h,C}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(N,Y,k){var P=N("./_global").document;Y.exports=P&&P.documentElement},{"./_global":110}],114:[function(N,Y,k){Y.exports=!N("./_descriptors")&&!N("./_fails")(function(){return Object.defineProperty(N("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(N,Y,k){Y.exports=function(P,u,C){var R=C===void 0;switch(u.length){case 0:return R?P():P.call(C);case 1:return R?P(u[0]):P.call(C,u[0]);case 2:return R?P(u[0],u[1]):P.call(C,u[0],u[1]);case 3:return R?P(u[0],u[1],u[2]):P.call(C,u[0],u[1],u[2]);case 4:return R?P(u[0],u[1],u[2],u[3]):P.call(C,u[0],u[1],u[2],u[3])}return P.apply(C,u)}},{}],116:[function(N,Y,k){var P=N("./_cof");Y.exports=Object("z").propertyIsEnumerable(0)?Object:function(u){return P(u)=="String"?u.split(""):Object(u)}},{"./_cof":98}],117:[function(N,Y,k){var P=N("./_iterators"),u=N("./_wks")("iterator"),C=Array.prototype;Y.exports=function(R){return R!==void 0&&(P.Array===R||C[u]===R)}},{"./_iterators":125,"./_wks":166}],118:[function(N,Y,k){var P=N("./_cof");Y.exports=Array.isArray||function(C){return P(C)=="Array"}},{"./_cof":98}],119:[function(N,Y,k){Y.exports=function(P){return typeof P=="object"?P!==null:typeof P=="function"}},{}],120:[function(N,Y,k){var P=N("./_an-object");Y.exports=function(u,C,R,h){try{return h?C(P(R)[0],R[1]):C(R)}catch(S){var s=u.return;throw s!==void 0&&P(s.call(u)),S}}},{"./_an-object":95}],121:[function(N,Y,k){"use strict";var P=N("./_object-create"),u=N("./_property-desc"),C=N("./_set-to-string-tag"),R={};N("./_hide")(R,N("./_wks")("iterator"),function(){return this}),Y.exports=function(h,s,S){h.prototype=P(R,{next:u(1,S)}),C(h,s+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(N,Y,k){"use strict";var P=N("./_library"),u=N("./_export"),C=N("./_redefine"),R=N("./_hide"),h=N("./_iterators"),s=N("./_iter-create"),S=N("./_set-to-string-tag"),d=N("./_object-gpo"),a=N("./_wks")("iterator"),o=!([].keys&&"next"in[].keys()),r="@@iterator",x="keys",g="values",m=function(){return this};Y.exports=function(w,p,f,n,l,c,T){s(f,p,n);var v=function(K){if(!o&&K in y)return y[K];switch(K){case x:return function(){return new f(this,K)};case g:return function(){return new f(this,K)}}return function(){return new f(this,K)}},i=p+" Iterator",L=l==g,A=!1,y=w.prototype,E=y[a]||y[r]||l&&y[l],b=E||v(l),_=l?L?v("entries"):b:void 0,I=p=="Array"&&y.entries||E,j,M,G;if(I&&(G=d(I.call(new w)),G!==Object.prototype&&G.next&&(S(G,i,!0),!P&&typeof G[a]!="function"&&R(G,a,m))),L&&E&&E.name!==g&&(A=!0,b=function(){return E.call(this)}),(!P||T)&&(o||A||!y[a])&&R(y,a,b),h[p]=b,h[i]=m,l)if(j={values:L?b:v(g),keys:c?b:v(x),entries:_},T)for(M in j)M in y||C(y,M,j[M]);else u(u.P+u.F*(o||A),p,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(N,Y,k){var P=N("./_wks")("iterator"),u=!1;try{var C=[7][P]();C.return=function(){u=!0},Array.from(C,function(){throw 2})}catch(R){}Y.exports=function(R,h){if(!h&&!u)return!1;var s=!1;try{var S=[7],d=S[P]();d.next=function(){return{done:s=!0}},S[P]=function(){return d},R(S)}catch(a){}return s}},{"./_wks":166}],124:[function(N,Y,k){Y.exports=function(P,u){return{value:u,done:!!P}}},{}],125:[function(N,Y,k){Y.exports={}},{}],126:[function(N,Y,k){Y.exports=!0},{}],127:[function(N,Y,k){var P=N("./_uid")("meta"),u=N("./_is-object"),C=N("./_has"),R=N("./_object-dp").f,h=0,s=Object.isExtensible||function(){return!0},S=!N("./_fails")(function(){return s(Object.preventExtensions({}))}),d=function(g){R(g,P,{value:{i:"O"+ ++h,w:{}}})},a=function(g,m){if(!u(g))return typeof g=="symbol"?g:(typeof g=="string"?"S":"P")+g;if(!C(g,P)){if(!s(g))return"F";if(!m)return"E";d(g)}return g[P].i},o=function(g,m){if(!C(g,P)){if(!s(g))return!0;if(!m)return!1;d(g)}return g[P].w},r=function(g){return S&&x.NEED&&s(g)&&!C(g,P)&&d(g),g},x=Y.exports={KEY:P,NEED:!1,fastKey:a,getWeak:o,onFreeze:r}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(N,Y,k){var P=N("./_global"),u=N("./_task").set,C=P.MutationObserver||P.WebKitMutationObserver,R=P.process,h=P.Promise,s=N("./_cof")(R)=="process";Y.exports=function(){var S,d,a,o=function(){var m,w;for(s&&(m=R.domain)&&m.exit();S;){w=S.fn,S=S.next;try{w()}catch(p){throw S?a():d=void 0,p}}d=void 0,m&&m.enter()};if(s)a=function(){R.nextTick(o)};else if(C&&!(P.navigator&&P.navigator.standalone)){var r=!0,x=document.createTextNode("");new C(o).observe(x,{characterData:!0}),a=function(){x.data=r=!r}}else if(h&&h.resolve){var g=h.resolve(void 0);a=function(){g.then(o)}}else a=function(){u.call(P,o)};return function(m){var w={fn:m,next:void 0};d&&(d.next=w),S||(S=w,a()),d=w}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(N,Y,k){"use strict";var P=N("./_a-function");function u(C){var R,h;this.promise=new C(function(s,S){if(R!==void 0||h!==void 0)throw TypeError("Bad Promise constructor");R=s,h=S}),this.resolve=P(R),this.reject=P(h)}Y.exports.f=function(C){return new u(C)}},{"./_a-function":92}],130:[function(N,Y,k){"use strict";var P=N("./_descriptors"),u=N("./_object-keys"),C=N("./_object-gops"),R=N("./_object-pie"),h=N("./_to-object"),s=N("./_iobject"),S=Object.assign;Y.exports=!S||N("./_fails")(function(){var d={},a={},o=Symbol(),r="abcdefghijklmnopqrst";return d[o]=7,r.split("").forEach(function(x){a[x]=x}),S({},d)[o]!=7||Object.keys(S({},a)).join("")!=r})?function(a,o){for(var r=h(a),x=arguments.length,g=1,m=C.f,w=R.f;x>g;)for(var p=s(arguments[g++]),f=m?u(p).concat(m(p)):u(p),n=f.length,l=0,c;n>l;)c=f[l++],(!P||w.call(p,c))&&(r[c]=p[c]);return r}:S},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(N,Y,k){var P=N("./_an-object"),u=N("./_object-dps"),C=N("./_enum-bug-keys"),R=N("./_shared-key")("IE_PROTO"),h=function(){},s="prototype",S=function(){var d=N("./_dom-create")("iframe"),a=C.length,o="<",r=">",x;for(d.style.display="none",N("./_html").appendChild(d),d.src="javascript:",x=d.contentWindow.document,x.open(),x.write(o+"script"+r+"document.F=Object"+o+"/script"+r),x.close(),S=x.F;a--;)delete S[s][C[a]];return S()};Y.exports=Object.create||function(a,o){var r;return a!==null?(h[s]=P(a),r=new h,h[s]=null,r[R]=a):r=S(),o===void 0?r:u(r,o)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(N,Y,k){var P=N("./_an-object"),u=N("./_ie8-dom-define"),C=N("./_to-primitive"),R=Object.defineProperty;k.f=N("./_descriptors")?Object.defineProperty:function(s,S,d){if(P(s),S=C(S,!0),P(d),u)try{return R(s,S,d)}catch(a){}if("get"in d||"set"in d)throw TypeError("Accessors not supported!");return"value"in d&&(s[S]=d.value),s}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(N,Y,k){var P=N("./_object-dp"),u=N("./_an-object"),C=N("./_object-keys");Y.exports=N("./_descriptors")?Object.defineProperties:function(h,s){u(h);for(var S=C(s),d=S.length,a=0,o;d>a;)P.f(h,o=S[a++],s[o]);return h}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(N,Y,k){var P=N("./_object-pie"),u=N("./_property-desc"),C=N("./_to-iobject"),R=N("./_to-primitive"),h=N("./_has"),s=N("./_ie8-dom-define"),S=Object.getOwnPropertyDescriptor;k.f=N("./_descriptors")?S:function(a,o){if(a=C(a),o=R(o,!0),s)try{return S(a,o)}catch(r){}if(h(a,o))return u(!P.f.call(a,o),a[o])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(N,Y,k){var P=N("./_to-iobject"),u=N("./_object-gopn").f,C={}.toString,R=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(s){try{return u(s)}catch(S){return R.slice()}};Y.exports.f=function(S){return R&&C.call(S)=="[object Window]"?h(S):u(P(S))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(N,Y,k){var P=N("./_object-keys-internal"),u=N("./_enum-bug-keys").concat("length","prototype");k.f=Object.getOwnPropertyNames||function(R){return P(R,u)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(N,Y,k){k.f=Object.getOwnPropertySymbols},{}],138:[function(N,Y,k){var P=N("./_has"),u=N("./_to-object"),C=N("./_shared-key")("IE_PROTO"),R=Object.prototype;Y.exports=Object.getPrototypeOf||function(h){return h=u(h),P(h,C)?h[C]: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(N,Y,k){var P=N("./_has"),u=N("./_to-iobject"),C=N("./_array-includes")(!1),R=N("./_shared-key")("IE_PROTO");Y.exports=function(h,s){var S=u(h),d=0,a=[],o;for(o in S)o!=R&&(P(S,o)&&a.push(o));for(;s.length>d;)P(S,o=s[d++])&&(~C(a,o)||a.push(o));return a}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(N,Y,k){var P=N("./_object-keys-internal"),u=N("./_enum-bug-keys");Y.exports=Object.keys||function(R){return P(R,u)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(N,Y,k){k.f={}.propertyIsEnumerable},{}],142:[function(N,Y,k){var P=N("./_export"),u=N("./_core"),C=N("./_fails");Y.exports=function(R,h){var s=(u.Object||{})[R]||Object[R],S={};S[R]=h(s),P(P.S+P.F*C(function(){s(1)}),"Object",S)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(N,Y,k){var P=N("./_descriptors"),u=N("./_object-keys"),C=N("./_to-iobject"),R=N("./_object-pie").f;Y.exports=function(h){return function(s){for(var S=C(s),d=u(S),a=d.length,o=0,r=[],x;a>o;)x=d[o++],(!P||R.call(S,x))&&r.push(h?[x,S[x]]:S[x]);return r}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(N,Y,k){Y.exports=function(P){try{return{e:!1,v:P()}}catch(u){return{e:!0,v:u}}}},{}],145:[function(N,Y,k){var P=N("./_an-object"),u=N("./_is-object"),C=N("./_new-promise-capability");Y.exports=function(R,h){if(P(R),u(h)&&h.constructor===R)return h;var s=C.f(R),S=s.resolve;return S(h),s.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(N,Y,k){Y.exports=function(P,u){return{enumerable:!(P&1),configurable:!(P&2),writable:!(P&4),value:u}}},{}],147:[function(N,Y,k){var P=N("./_hide");Y.exports=function(u,C,R){for(var h in C)R&&u[h]?u[h]=C[h]:P(u,h,C[h]);return u}},{"./_hide":112}],148:[function(N,Y,k){Y.exports=N("./_hide")},{"./_hide":112}],149:[function(N,Y,k){"use strict";var P=N("./_global"),u=N("./_core"),C=N("./_object-dp"),R=N("./_descriptors"),h=N("./_wks")("species");Y.exports=function(s){var S=typeof u[s]=="function"?u[s]:P[s];R&&S&&!S[h]&&C.f(S,h,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(N,Y,k){var P=N("./_object-dp").f,u=N("./_has"),C=N("./_wks")("toStringTag");Y.exports=function(R,h,s){R&&!u(R=s?R:R.prototype,C)&&P(R,C,{configurable:!0,value:h})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(N,Y,k){var P=N("./_shared")("keys"),u=N("./_uid");Y.exports=function(C){return P[C]||(P[C]=u(C))}},{"./_shared":152,"./_uid":162}],152:[function(N,Y,k){var P=N("./_core"),u=N("./_global"),C="__core-js_shared__",R=u[C]||(u[C]={});(Y.exports=function(h,s){return R[h]||(R[h]=s!==void 0?s:{})})("versions",[]).push({version:P.version,mode:N("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(N,Y,k){var P=N("./_an-object"),u=N("./_a-function"),C=N("./_wks")("species");Y.exports=function(R,h){var s=P(R).constructor,S;return s===void 0||(S=P(s)[C])==null?h:u(S)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(N,Y,k){var P=N("./_to-integer"),u=N("./_defined");Y.exports=function(C){return function(R,h){var s=String(u(R)),S=P(h),d=s.length,a,o;return S<0||S>=d?C?"":void 0:(a=s.charCodeAt(S),a<55296||a>56319||S+1===d||(o=s.charCodeAt(S+1))<56320||o>57343?C?s.charAt(S):a:C?s.slice(S,S+2):(a-55296<<10)+(o-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(N,Y,k){var P=N("./_ctx"),u=N("./_invoke"),C=N("./_html"),R=N("./_dom-create"),h=N("./_global"),s=h.process,S=h.setImmediate,d=h.clearImmediate,a=h.MessageChannel,o=h.Dispatch,r=0,x={},g="onreadystatechange",m,w,p,f=function(){var l=+this;if(x.hasOwnProperty(l)){var c=x[l];delete x[l],c()}},n=function(l){f.call(l.data)};(!S||!d)&&(S=function(c){for(var T=[],v=1;arguments.length>v;)T.push(arguments[v++]);return x[++r]=function(){u(typeof c=="function"?c:Function(c),T)},m(r),r},d=function(c){delete x[c]},N("./_cof")(s)=="process"?m=function(l){s.nextTick(P(f,l,1))}:o&&o.now?m=function(l){o.now(P(f,l,1))}:a?(w=new a,p=w.port2,w.port1.onmessage=n,m=P(p.postMessage,p,1)):h.addEventListener&&typeof postMessage=="function"&&!h.importScripts?(m=function(l){h.postMessage(l+"","*")},h.addEventListener("message",n,!1)):g in R("script")?m=function(l){C.appendChild(R("script"))[g]=function(){C.removeChild(this),f.call(l)}}:m=function(l){setTimeout(P(f,l,1),0)}),Y.exports={set:S,clear:d}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(N,Y,k){var P=N("./_to-integer"),u=Math.max,C=Math.min;Y.exports=function(R,h){return R=P(R),R<0?u(R+h,0):C(R,h)}},{"./_to-integer":157}],157:[function(N,Y,k){var P=Math.ceil,u=Math.floor;Y.exports=function(C){return isNaN(C=+C)?0:(C>0?u:P)(C)}},{}],158:[function(N,Y,k){var P=N("./_iobject"),u=N("./_defined");Y.exports=function(C){return P(u(C))}},{"./_defined":102,"./_iobject":116}],159:[function(N,Y,k){var P=N("./_to-integer"),u=Math.min;Y.exports=function(C){return C>0?u(P(C),9007199254740991):0}},{"./_to-integer":157}],160:[function(N,Y,k){var P=N("./_defined");Y.exports=function(u){return Object(P(u))}},{"./_defined":102}],161:[function(N,Y,k){var P=N("./_is-object");Y.exports=function(u,C){if(!P(u))return u;var R,h;if(C&&typeof(R=u.toString)=="function"&&!P(h=R.call(u)))return h;if(typeof(R=u.valueOf)=="function"&&!P(h=R.call(u)))return h;if(!C&&typeof(R=u.toString)=="function"&&!P(h=R.call(u)))return h;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(N,Y,k){var P=0,u=Math.random();Y.exports=function(C){return"Symbol(".concat(C===void 0?"":C,")_",(++P+u).toString(36))}},{}],163:[function(N,Y,k){var P=N("./_global"),u=P.navigator;Y.exports=u&&u.userAgent||""},{"./_global":110}],164:[function(N,Y,k){var P=N("./_global"),u=N("./_core"),C=N("./_library"),R=N("./_wks-ext"),h=N("./_object-dp").f;Y.exports=function(s){var S=u.Symbol||(u.Symbol=C?{}:P.Symbol||{});s.charAt(0)!="_"&&!(s in S)&&h(S,s,{value:R.f(s)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(N,Y,k){k.f=N("./_wks")},{"./_wks":166}],166:[function(N,Y,k){var P=N("./_shared")("wks"),u=N("./_uid"),C=N("./_global").Symbol,R=typeof C=="function",h=Y.exports=function(s){return P[s]||(P[s]=R&&C[s]||(R?C:u)("Symbol."+s))};h.store=P},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(N,Y,k){var P=N("./_classof"),u=N("./_wks")("iterator"),C=N("./_iterators");Y.exports=N("./_core").getIteratorMethod=function(R){if(R!=null)return R[u]||R["@@iterator"]||C[P(R)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(N,Y,k){"use strict";var P=N("./_ctx"),u=N("./_export"),C=N("./_to-object"),R=N("./_iter-call"),h=N("./_is-array-iter"),s=N("./_to-length"),S=N("./_create-property"),d=N("./core.get-iterator-method");u(u.S+u.F*!N("./_iter-detect")(function(a){Array.from(a)}),"Array",{from:function(o){var r=C(o),x=typeof this=="function"?this:Array,g=arguments.length,m=g>1?arguments[1]:void 0,w=m!==void 0,p=0,f=d(r),n,l,c,T;if(w&&(m=P(m,g>2?arguments[2]:void 0,2)),f!=null&&!(x==Array&&h(f)))for(T=f.call(r),l=new x;!(c=T.next()).done;p++)S(l,p,w?R(T,m,[c.value,p],!0):c.value);else for(n=s(r.length),l=new x(n);n>p;p++)S(l,p,w?m(r[p],p):r[p]);return l.length=p,l}})},{"./_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(N,Y,k){"use strict";var P=N("./_add-to-unscopables"),u=N("./_iter-step"),C=N("./_iterators"),R=N("./_to-iobject");Y.exports=N("./_iter-define")(Array,"Array",function(h,s){this._t=R(h),this._i=0,this._k=s},function(){var h=this._t,s=this._k,S=this._i++;return!h||S>=h.length?(this._t=void 0,u(1)):s=="keys"?u(0,S):s=="values"?u(0,h[S]):u(0,[S,h[S]])},"values"),C.Arguments=C.Array,P("keys"),P("values"),P("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(N,Y,k){"use strict";var P=N("./_is-object"),u=N("./_object-gpo"),C=N("./_wks")("hasInstance"),R=Function.prototype;C in R||N("./_object-dp").f(R,C,{value:function(h){if(typeof this!="function"||!P(h))return!1;if(!P(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(N,Y,k){var P=N("./_export");P(P.S+P.F,"Object",{assign:N("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(N,Y,k){var P=N("./_export");P(P.S,"Object",{create:N("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(N,Y,k){var P=N("./_export");P(P.S+P.F*!N("./_descriptors"),"Object",{defineProperty:N("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(N,Y,k){N("./_object-sap")("getOwnPropertyNames",function(){return N("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(N,Y,k){var P=N("./_to-object"),u=N("./_object-gpo");N("./_object-sap")("getPrototypeOf",function(){return function(R){return u(P(R))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(N,Y,k){var P=N("./_to-object"),u=N("./_object-keys");N("./_object-sap")("keys",function(){return function(R){return u(P(R))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(N,Y,k){arguments[4][71][0].apply(k,arguments)},{dup:71}],178:[function(N,Y,k){"use strict";var P=N("./_library"),u=N("./_global"),C=N("./_ctx"),R=N("./_classof"),h=N("./_export"),s=N("./_is-object"),S=N("./_a-function"),d=N("./_an-instance"),a=N("./_for-of"),o=N("./_species-constructor"),r=N("./_task").set,x=N("./_microtask")(),g=N("./_new-promise-capability"),m=N("./_perform"),w=N("./_user-agent"),p=N("./_promise-resolve"),f="Promise",n=u.TypeError,l=u.process,c=l&&l.versions,T=c&&c.v8||"",v=u[f],i=R(l)=="process",L=function(){},A,y,E,b,_=y=g.f,I=!!function(){try{var W=v.resolve(1),F=(W.constructor={})[N("./_wks")("species")]=function($){$(L,L)};return(i||typeof PromiseRejectionEvent=="function")&&W.then(L)instanceof F&&T.indexOf("6.6")!==0&&w.indexOf("Chrome/66")===-1}catch($){}}(),j=function(W){var F;return s(W)&&typeof(F=W.then)=="function"?F:!1},M=function(W,F){if(W._n)return;W._n=!0;var $=W._c;x(function(){for(var ee=W._v,Z=W._s==1,ve=0,he=function(le){var Re=Z?le.ok:le.fail,xe=le.resolve,ie=le.reject,se=le.domain,re,be,q;try{Re?(Z||(W._h==2&&H(W),W._h=1),Re===!0?re=ee:(se&&se.enter(),re=Re(ee),se&&(se.exit(),q=!0)),re===le.promise?ie(n("Promise-chain cycle")):(be=j(re))?be.call(re,xe,ie):xe(re)):ie(ee)}catch(ne){se&&!q&&se.exit(),ie(ne)}};$.length>ve;)he($[ve++]);W._c=[],W._n=!1,F&&!W._h&&G(W)})},G=function(W){r.call(u,function(){var F=W._v,$=K(W),ee,Z,ve;if($&&(ee=m(function(){i?l.emit("unhandledRejection",F,W):(Z=u.onunhandledrejection)?Z({promise:W,reason:F}):(ve=u.console)&&ve.error&&ve.error("Unhandled promise rejection",F)}),W._h=i||K(W)?2:1),W._a=void 0,$&&ee.e)throw ee.v})},K=function(W){return W._h!==1&&(W._a||W._c).length===0},H=function(W){r.call(u,function(){var F;i?l.emit("rejectionHandled",W):(F=u.onrejectionhandled)&&F({promise:W,reason:W._v})})},z=function(W){var F=this;if(F._d)return;F._d=!0,F=F._w||F,F._v=W,F._s=2,F._a||(F._a=F._c.slice()),M(F,!0)},B=function(W){var F=this,$;if(F._d)return;F._d=!0,F=F._w||F;try{if(F===W)throw n("Promise can't be resolved itself");($=j(W))?x(function(){var ee={_w:F,_d:!1};try{$.call(W,C(B,ee,1),C(z,ee,1))}catch(Z){z.call(ee,Z)}}):(F._v=W,F._s=1,M(F,!1))}catch(ee){z.call({_w:F,_d:!1},ee)}};I||(v=function(F){d(this,v,f,"_h"),S(F),A.call(this);try{F(C(B,this,1),C(z,this,1))}catch($){z.call(this,$)}},A=function(F){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},A.prototype=N("./_redefine-all")(v.prototype,{then:function(F,$){var ee=_(o(this,v));return ee.ok=typeof F=="function"?F:!0,ee.fail=typeof $=="function"&&$,ee.domain=i?l.domain:void 0,this._c.push(ee),this._a&&this._a.push(ee),this._s&&M(this,!1),ee.promise},catch:function(W){return this.then(void 0,W)}}),E=function(){var W=new A;this.promise=W,this.resolve=C(B,W,1),this.reject=C(z,W,1)},g.f=_=function(W){return W===v||W===b?new E(W):y(W)}),h(h.G+h.W+h.F*!I,{Promise:v}),N("./_set-to-string-tag")(v,f),N("./_set-species")(f),b=N("./_core")[f],h(h.S+h.F*!I,f,{reject:function(F){var $=_(this),ee=$.reject;return ee(F),$.promise}}),h(h.S+h.F*(P||!I),f,{resolve:function(F){return p(P&&this===b?v:this,F)}}),h(h.S+h.F*!(I&&N("./_iter-detect")(function(W){v.all(W).catch(L)})),f,{all:function(F){var $=this,ee=_($),Z=ee.resolve,ve=ee.reject,he=m(function(){var le=[],Re=0,xe=1;a(F,!1,function(ie){var se=Re++,re=!1;le.push(void 0),xe++,$.resolve(ie).then(function(be){if(re)return;re=!0,le[se]=be,--xe||Z(le)},ve)}),--xe||Z(le)});return he.e&&ve(he.v),ee.promise},race:function(F){var $=this,ee=_($),Z=ee.reject,ve=m(function(){a(F,!1,function(he){$.resolve(he).then(ee.resolve,Z)})});return ve.e&&Z(ve.v),ee.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(N,Y,k){var P=N("./_export"),u=N("./_to-absolute-index"),C=String.fromCharCode,R=String.fromCodePoint;P(P.S+P.F*(!!R&&R.length!=1),"String",{fromCodePoint:function(s){for(var S=[],d=arguments.length,a=0,o;d>a;){if(o=+arguments[a++],u(o,1114111)!==o)throw RangeError(o+" is not a valid code point");S.push(o<65536?C(o):C(((o-=65536)>>10)+55296,o%1024+56320))}return S.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(N,Y,k){"use strict";var P=N("./_string-at")(!0);N("./_iter-define")(String,"String",function(u){this._t=String(u),this._i=0},function(){var u=this._t,C=this._i,R;return C>=u.length?{value:void 0,done:!0}:(R=P(u,C),this._i+=R.length,{value:R,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(N,Y,k){"use strict";var P=N("./_global"),u=N("./_has"),C=N("./_descriptors"),R=N("./_export"),h=N("./_redefine"),s=N("./_meta").KEY,S=N("./_fails"),d=N("./_shared"),a=N("./_set-to-string-tag"),o=N("./_uid"),r=N("./_wks"),x=N("./_wks-ext"),g=N("./_wks-define"),m=N("./_enum-keys"),w=N("./_is-array"),p=N("./_an-object"),f=N("./_is-object"),n=N("./_to-object"),l=N("./_to-iobject"),c=N("./_to-primitive"),T=N("./_property-desc"),v=N("./_object-create"),i=N("./_object-gopn-ext"),L=N("./_object-gopd"),A=N("./_object-gops"),y=N("./_object-dp"),E=N("./_object-keys"),b=L.f,_=y.f,I=i.f,j=P.Symbol,M=P.JSON,G=M&&M.stringify,K="prototype",H=r("_hidden"),z=r("toPrimitive"),B={}.propertyIsEnumerable,W=d("symbol-registry"),F=d("symbols"),$=d("op-symbols"),ee=Object[K],Z=typeof j=="function"&&!!A.f,ve=P.QObject,he=!ve||!ve[K]||!ve[K].findChild,le=C&&S(function(){return v(_({},"a",{get:function(){return _(this,"a",{value:7}).a}})).a!=7})?function(ce,we,ze){var Ge=b(ee,we);Ge&&delete ee[we],_(ce,we,ze),Ge&&ce!==ee&&_(ee,we,Ge)}:_,Re=function(ce){var we=F[ce]=v(j[K]);return we._k=ce,we},xe=Z&&typeof j.iterator=="symbol"?function(ce){return typeof ce=="symbol"}:function(ce){return ce instanceof j},ie=function(we,ze,Ge){return we===ee&&ie($,ze,Ge),p(we),ze=c(ze,!0),p(Ge),u(F,ze)?(Ge.enumerable?(u(we,H)&&we[H][ze]&&(we[H][ze]=!1),Ge=v(Ge,{enumerable:T(0,!1)})):(u(we,H)||_(we,H,T(1,{})),we[H][ze]=!0),le(we,ze,Ge)):_(we,ze,Ge)},se=function(we,ze){p(we);for(var Ge=m(ze=l(ze)),Qe=0,$e=Ge.length,rt;$e>Qe;)ie(we,rt=Ge[Qe++],ze[rt]);return we},re=function(we,ze){return ze===void 0?v(we):se(v(we),ze)},be=function(we){var ze=B.call(this,we=c(we,!0));return this===ee&&u(F,we)&&!u($,we)?!1:ze||!u(this,we)||!u(F,we)||u(this,H)&&this[H][we]?ze:!0},q=function(we,ze){if(we=l(we),ze=c(ze,!0),we===ee&&u(F,ze)&&!u($,ze))return;var Ge=b(we,ze);return Ge&&u(F,ze)&&!(u(we,H)&&we[H][ze])&&(Ge.enumerable=!0),Ge},ne=function(we){for(var ze=I(l(we)),Ge=[],Qe=0,$e;ze.length>Qe;)!u(F,$e=ze[Qe++])&&$e!=H&&$e!=s&&Ge.push($e);return Ge},Te=function(we){for(var ze=we===ee,Ge=I(ze?$:l(we)),Qe=[],$e=0,rt;Ge.length>$e;)u(F,rt=Ge[$e++])&&(ze?u(ee,rt):!0)&&Qe.push(F[rt]);return Qe};Z||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var we=o(arguments.length>0?arguments[0]:void 0),ze=function(Ge){this===ee&&ze.call($,Ge),u(this,H)&&u(this[H],we)&&(this[H][we]=!1),le(this,we,T(1,Ge))};return C&&he&&le(ee,we,{configurable:!0,set:ze}),Re(we)},h(j[K],"toString",function(){return this._k}),L.f=q,y.f=ie,N("./_object-gopn").f=i.f=ne,N("./_object-pie").f=be,A.f=Te,C&&!N("./_library")&&h(ee,"propertyIsEnumerable",be,!0),x.f=function(ce){return Re(r(ce))}),R(R.G+R.W+R.F*!Z,{Symbol:j});for(var ae="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),J=0;ae.length>J;)r(ae[J++]);for(var X=E(r.store),Q=0;X.length>Q;)g(X[Q++]);R(R.S+R.F*!Z,"Symbol",{for:function(ce){return u(W,ce+="")?W[ce]:W[ce]=j(ce)},keyFor:function(we){if(!xe(we))throw TypeError(we+" is not a symbol!");for(var ze in W)if(W[ze]===we)return ze},useSetter:function(){he=!0},useSimple:function(){he=!1}}),R(R.S+R.F*!Z,"Object",{create:re,defineProperty:ie,defineProperties:se,getOwnPropertyDescriptor:q,getOwnPropertyNames:ne,getOwnPropertySymbols:Te});var pe=S(function(){A.f(1)});R(R.S+R.F*pe,"Object",{getOwnPropertySymbols:function(we){return A.f(n(we))}}),M&&R(R.S+R.F*(!Z||S(function(){var ce=j();return G([ce])!="[null]"||G({a:ce})!="{}"||G(Object(ce))!="{}"})),"JSON",{stringify:function(we){for(var ze=[we],Ge=1,Qe,$e;arguments.length>Ge;)ze.push(arguments[Ge++]);return $e=Qe=ze[1],!f(Qe)&&we===void 0||xe(we)?void 0:(w(Qe)||(Qe=function(rt,et){if(typeof $e=="function"&&(et=$e.call(this,rt,et)),!xe(et))return et}),ze[1]=Qe,G.apply(M,ze))}}),j[K][z]||N("./_hide")(j[K],z,j[K].valueOf),a(j,"Symbol"),a(Math,"Math",!0),a(P.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(N,Y,k){var P=N("./_export"),u=N("./_object-to-array")(!0);P(P.S,"Object",{entries:function(R){return u(R)}})},{"./_export":107,"./_object-to-array":143}],183:[function(N,Y,k){"use strict";var P=N("./_export"),u=N("./_core"),C=N("./_global"),R=N("./_species-constructor"),h=N("./_promise-resolve");P(P.P+P.R,"Promise",{finally:function(s){var S=R(this,u.Promise||C.Promise),d=typeof s=="function";return this.then(d?function(a){return h(S,s()).then(function(){return a})}:s,d?function(a){return h(S,s()).then(function(){throw a})}:s)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(N,Y,k){"use strict";var P=N("./_export"),u=N("./_new-promise-capability"),C=N("./_perform");P(P.S,"Promise",{try:function(R){var h=u.f(this),s=C(R);return(s.e?h.reject:h.resolve)(s.v),h.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(N,Y,k){N("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(N,Y,k){N("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(N,Y,k){N("./es6.array.iterator");for(var P=N("./_global"),u=N("./_hide"),C=N("./_iterators"),R=N("./_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(","),s=0;s0?"-":"+")+s(Math.floor(Math.abs(E)/60)*100+Math.abs(E)%60,4),S:["th","st","nd","rd"][l%10>3?0:(l%100-l%10!=10)*l%10],W:b,N:_};return m.replace(o,function(j){return j in I?I[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 s(o,r){for(o=String(o),r=r||2;o.length]/;Y.exports=u;function u(C){var R=""+C,h=P.exec(R);if(!h)return R;var s,S="",d=0,a=0;for(d=h.index;d0&&this._events[s].length>d&&(this._events[s].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[s].length),typeof console.trace=="function"&&console.trace())),this},P.prototype.on=P.prototype.addListener,P.prototype.once=function(s,S){if(!u(S))throw TypeError("listener must be a function");var d=!1;function a(){this.removeListener(s,a),d||(d=!0,S.apply(this,arguments))}return a.listener=S,this.on(s,a),this},P.prototype.removeListener=function(s,S){var d,a,o,r;if(!u(S))throw TypeError("listener must be a function");if(!this._events||!this._events[s])return this;if(d=this._events[s],o=d.length,a=-1,d===S||u(d.listener)&&d.listener===S)delete this._events[s],this._events.removeListener&&this.emit("removeListener",s,S);else if(R(d)){for(r=o;r-- >0;)if(d[r]===S||d[r].listener&&d[r].listener===S){a=r;break}if(a<0)return this;d.length===1?(d.length=0,delete this._events[s]):d.splice(a,1),this._events.removeListener&&this.emit("removeListener",s,S)}return this},P.prototype.removeAllListeners=function(s){var S,d;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[s]&&delete this._events[s],this;if(arguments.length===0){for(S in this._events){if(S==="removeListener")continue;this.removeAllListeners(S)}return this.removeAllListeners("removeListener"),this._events={},this}if(d=this._events[s],u(d))this.removeListener(s,d);else if(d)for(;d.length;)this.removeListener(s,d[d.length-1]);return delete this._events[s],this},P.prototype.listeners=function(s){var S;return!this._events||!this._events[s]?S=[]:u(this._events[s])?S=[this._events[s]]:S=this._events[s].slice(),S},P.prototype.listenerCount=function(s){if(this._events){var S=this._events[s];if(u(S))return 1;if(S)return S.length}return 0},P.listenerCount=function(s,S){return s.listenerCount(S)};function u(s){return typeof s=="function"}function C(s){return typeof s=="number"}function R(s){return typeof s=="object"&&s!==null}function h(s){return s===void 0}},{}],193:[function(N,Y,k){var P=N("http"),u=Y.exports;for(var C in P)P.hasOwnProperty(C)&&(u[C]=P[C]);u.request=function(R,h){return R||(R={}),R.scheme="https",R.protocol="https:",P.request.call(this,R,h)}},{http:231}],194:[function(N,Y,k){/*! * humanize-ms - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */"use strict";var P=N("util"),u=N("ms");Y.exports=function(C){if(typeof C=="number")return C;var R=u(C);if(R===void 0){var h=new Error(P.format("humanize-ms(%j) result undefined",C));console.warn(h.stack)}return R}},{ms:204,util:243}],195:[function(N,Y,k){k.read=function(P,u,C,R,h){var s,S,d=h*8-R-1,a=(1<>1,r=-7,x=C?h-1:0,g=C?-1:1,m=P[u+x];for(x+=g,s=m&(1<<-r)-1,m>>=-r,r+=d;r>0;s=s*256+P[u+x],x+=g,r-=8);for(S=s&(1<<-r)-1,s>>=-r,r+=R;r>0;S=S*256+P[u+x],x+=g,r-=8);if(s===0)s=1-o;else{if(s===a)return S?NaN:(m?-1:1)*Infinity;S=S+Math.pow(2,R),s=s-o}return(m?-1:1)*S*Math.pow(2,s-R)},k.write=function(P,u,C,R,h,s){var S,d,a,o=s*8-h-1,r=(1<>1,g=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=R?0:s-1,w=R?1:-1,p=u<0||u===0&&1/u<0?1:0;for(u=Math.abs(u),isNaN(u)||u===Infinity?(d=isNaN(u)?1:0,S=r):(S=Math.floor(Math.log(u)/Math.LN2),u*(a=Math.pow(2,-S))<1&&(S--,a*=2),S+x>=1?u+=g/a:u+=g*Math.pow(2,1-x),u*a>=2&&(S++,a/=2),S+x>=r?(d=0,S=r):S+x>=1?(d=(u*a-1)*Math.pow(2,h),S=S+x):(d=u*Math.pow(2,x-1)*Math.pow(2,h),S=0));h>=8;P[C+m]=d&255,m+=w,d/=256,h-=8);for(S=S<0;P[C+m]=S&255,m+=w,S/=256,o-=8);P[C+m-w]|=p*128}},{}],196:[function(N,Y,k){typeof Object.create=="function"?Y.exports=function(u,C){C&&(u.super_=C,u.prototype=Object.create(C.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}))}:Y.exports=function(u,C){if(C){u.super_=C;var R=function(){};R.prototype=C.prototype,u.prototype=new R,u.prototype.constructor=u}}},{}],197:[function(N,Y,k){/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */Y.exports=function(C){return C!=null&&(P(C)||u(C)||!!C._isBuffer)};function P(C){return!!C.constructor&&typeof C.constructor.isBuffer=="function"&&C.constructor.isBuffer(C)}function u(C){return typeof C.readFloatLE=="function"&&typeof C.slice=="function"&&P(C.slice(0,0))}},{}],198:[function(N,Y,k){var P={}.toString;Y.exports=Array.isArray||function(u){return P.call(u)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(N,Y){typeof exports=="object"&&typeof module!="undefined"?module.exports=Y(N):typeof define=="function"&&define.amd?define(Y):Y(N)})(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(N){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(N){for(var Y={},k=0,P=N.length;k>>6)+fromCharCode(128|Y&63):fromCharCode(224|Y>>>12&15)+fromCharCode(128|Y>>>6&63)+fromCharCode(128|Y&63)}else{var Y=65536+(N.charCodeAt(0)-55296)*1024+(N.charCodeAt(1)-56320);return fromCharCode(240|Y>>>18&7)+fromCharCode(128|Y>>>12&63)+fromCharCode(128|Y>>>6&63)+fromCharCode(128|Y&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(N){return N.replace(re_utob,cb_utob)},cb_encode=function(N){var Y=[0,2,1][N.length%3],k=N.charCodeAt(0)<<16|(N.length>1?N.charCodeAt(1):0)<<8|(N.length>2?N.charCodeAt(2):0),P=[b64chars.charAt(k>>>18),b64chars.charAt(k>>>12&63),Y>=2?"=":b64chars.charAt(k>>>6&63),Y>=1?"=":b64chars.charAt(k&63)];return P.join("")},btoa=global.btoa?function(N){return global.btoa(N)}:function(N){return N.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(N){var Y=Object.prototype.toString.call(N)==="[object Uint8Array]";return Y?N.toString("base64"):btoa(utob(String(N)))},encode=function(N,Y){return Y?_encode(String(N)).replace(/[+\/]/g,function(k){return k=="+"?"-":"_"}).replace(/=/g,""):_encode(N)},encodeURI=function(N){return encode(N,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(N){switch(N.length){case 4:var Y=(7&N.charCodeAt(0))<<18|(63&N.charCodeAt(1))<<12|(63&N.charCodeAt(2))<<6|63&N.charCodeAt(3),k=Y-65536;return fromCharCode((k>>>10)+55296)+fromCharCode((k&1023)+56320);case 3:return fromCharCode((15&N.charCodeAt(0))<<12|(63&N.charCodeAt(1))<<6|63&N.charCodeAt(2));default:return fromCharCode((31&N.charCodeAt(0))<<6|63&N.charCodeAt(1))}},btou=function(N){return N.replace(re_btou,cb_btou)},cb_decode=function(N){var Y=N.length,k=Y%4,P=(Y>0?b64tab[N.charAt(0)]<<18:0)|(Y>1?b64tab[N.charAt(1)]<<12:0)|(Y>2?b64tab[N.charAt(2)]<<6:0)|(Y>3?b64tab[N.charAt(3)]:0),u=[fromCharCode(P>>>16),fromCharCode(P>>>8&255),fromCharCode(P&255)];return u.length-=[0,0,2,1][k],u.join("")},_atob=global.atob?function(N){return global.atob(N)}:function(N){return N.replace(/\S{1,4}/g,cb_decode)},atob=function(N){return _atob(String(N).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(N){return(N.constructor===buffer.constructor?N:buffer.from(N,"base64")).toString()}:function(N){return(N.constructor===buffer.constructor?N:new buffer(N,"base64")).toString()}:function(N){return btou(_atob(N))},decode=function(N){return _decode(String(N).replace(/[-_]/g,function(Y){return Y=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var N=global.Base64;return global.Base64=_Base64,N};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(N){return{value:N,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(N){return encode(this,N)})),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(N,Y,k){/*! * merge-descriptors * Copyright(c) 2014 Jonathan Ong * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */"use strict";Y.exports=u;var P=Object.prototype.hasOwnProperty;function u(C,R,h){if(!C)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(S){if(!h&&P.call(C,S))return;var d=Object.getOwnPropertyDescriptor(R,S);Object.defineProperty(C,S,d)}),C}},{}],201:[function(N,Y,k){"use strict";function P(){this._types=Object.create(null),this._extensions=Object.create(null);for(var u=0;u0)return S(r);if(g==="number"&&isFinite(r))return x.long?a(r):d(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function S(r){if(r=String(r),r.length>100)return;var x=/^(-?(?:\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(!x)return;var g=parseFloat(x[1]),m=(x[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"yrs":case"yr":case"y":return g*s;case"weeks":case"week":case"w":return g*h;case"days":case"day":case"d":return g*R;case"hours":case"hour":case"hrs":case"hr":case"h":return g*C;case"minutes":case"minute":case"mins":case"min":case"m":return g*u;case"seconds":case"second":case"secs":case"sec":case"s":return g*P;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}function d(r){var x=Math.abs(r);return x>=R?Math.round(r/R)+"d":x>=C?Math.round(r/C)+"h":x>=u?Math.round(r/u)+"m":x>=P?Math.round(r/P)+"s":r+"ms"}function a(r){var x=Math.abs(r);return x>=R?o(r,x,R,"day"):x>=C?o(r,x,C,"hour"):x>=u?o(r,x,u,"minute"):x>=P?o(r,x,P,"second"):r+" ms"}function o(r,x,g,m){var w=x>=g*1.5;return Math.round(r/g)+" "+m+(w?"s":"")}},{}],205:[function(N,Y,k){(function(P){function u(s,S){for(var d=0,a=s.length-1;a>=0;a--){var o=s[a];o==="."?s.splice(a,1):o===".."?(s.splice(a,1),d++):d&&(s.splice(a,1),d--)}if(S)for(;d--;d)s.unshift("..");return s}k.resolve=function(){for(var s="",S=!1,d=arguments.length-1;d>=-1&&!S;d--){var a=d>=0?arguments[d]:P.cwd();if(typeof a!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!a)continue;s=a+"/"+s,S=a.charAt(0)==="/"}return s=u(R(s.split("/"),function(o){return!!o}),!S).join("/"),(S?"/":"")+s||"."},k.normalize=function(s){var S=k.isAbsolute(s),d=h(s,-1)==="/";return s=u(R(s.split("/"),function(a){return!!a}),!S).join("/"),!s&&!S&&(s="."),s&&d&&(s+="/"),(S?"/":"")+s},k.isAbsolute=function(s){return s.charAt(0)==="/"},k.join=function(){var s=Array.prototype.slice.call(arguments,0);return k.normalize(R(s,function(S,d){if(typeof S!="string")throw new TypeError("Arguments to path.join must be strings");return S}).join("/"))},k.relative=function(s,S){s=k.resolve(s).substr(1),S=k.resolve(S).substr(1);function d(w){for(var p=0;p=0&&!(w[f]!=="");f--);return p>f?[]:w.slice(p,f-p+1)}for(var a=d(s.split("/")),o=d(S.split("/")),r=Math.min(a.length,o.length),x=r,g=0;g=1;--r)if(S=s.charCodeAt(r),S===47){if(!o){a=r;break}}else o=!1;return a===-1?d?"/":".":d&&a===1?"/":s.slice(0,a)};function C(s){typeof s!="string"&&(s=s+"");var S=0,d=-1,a=!0,o;for(o=s.length-1;o>=0;--o)if(s.charCodeAt(o)===47){if(!a){S=o+1;break}}else d===-1&&(a=!1,d=o+1);return d===-1?"":s.slice(S,d)}k.basename=function(s,S){var d=C(s);return S&&d.substr(-1*S.length)===S&&(d=d.substr(0,d.length-S.length)),d},k.extname=function(s){typeof s!="string"&&(s=s+"");for(var S=-1,d=0,a=-1,o=!0,r=0,x=s.length-1;x>=0;--x){var g=s.charCodeAt(x);if(g===47){if(!o){d=x+1;break}continue}a===-1&&(o=!1,a=x+1),g===46?S===-1?S=x:r!==1&&(r=1):S!==-1&&(r=-1)}return S===-1||a===-1||r===0||r===1&&S===a-1&&S===d+1?"":s.slice(S,a)};function R(s,S){if(s.filter)return s.filter(S);for(var d=[],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},C=u[typeof window]&&window||this,R=C,h=u[typeof k]&&k,s=u[typeof Y]&&Y&&!Y.nodeType&&Y,S=h&&s&&typeof P=="object"&&P;S&&(S.global===S||S.window===S||S.self===S)&&(C=S);var d=Math.pow(2,53)-1,a=/\bOpera/,o=this,r=Object.prototype,x=r.hasOwnProperty,g=r.toString;function m(y){return y=String(y),y.charAt(0).toUpperCase()+y.slice(1)}function w(y,E,b){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&&b&&/^Win/i.test(y)&&!/^Windows Phone /i.test(y)&&(_=_[/[\d.]+$/.exec(y)])&&(y="Windows "+_),y=String(y),E&&b&&(y=y.replace(RegExp(E,"i"),b)),y=f(y.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]),y}function p(y,E){var b=-1,_=y?y.length:0;if(typeof _=="number"&&_>-1&&_<=d)for(;++b<_;)E(y[b],b,y);else n(y,E)}function f(y){return y=i(y),/^(?:webOS|i(?:OS|P))/.test(y)?y:m(y)}function n(y,E){for(var b in y)x.call(y,b)&&E(y[b],b,y)}function l(y){return y==null?m(y):g.call(y).slice(8,-1)}function c(y,E){var b=y!=null?typeof y[E]:"number";return!/^(?:boolean|number|string|undefined)$/.test(b)&&(b=="object"?!!y[E]:!0)}function T(y){return String(y).replace(/([ -])(?!$)/g,"$1?")}function v(y,E){var b=null;return p(y,function(_,I){b=E(b,_,I,y)}),b}function i(y){return String(y).replace(/^ +| +$/g,"")}function L(y){var E=C,b=y&&typeof y=="object"&&l(y)!="String";b&&(E=y,y=null);var _=E.navigator||{},I=_.userAgent||"";y||(y=I);var j=b||o==R,M=b?!!_.likeChrome:/\bChrome\b/.test(y)&&!/internal|\n/i.test(g.toString()),G="Object",K=b?G:"ScriptBridgingProxyObject",H=b?G:"Environment",z=b&&E.java?"JavaPackage":l(E.java),B=b?G:"RuntimeObject",W=/\bJava/.test(z)&&E.java,F=W&&l(E.environment)==H,$=W?"a":"\u03B1",ee=W?"b":"\u03B2",Z=E.document||{},ve=E.operamini||E.opera,he=a.test(he=b&&ve?ve["[[Class]]"]:l(ve))?he:ve=null,le,Re=y,xe=[],ie=null,se=y==I,re=se&&ve&&typeof ve.version=="function"&&ve.version(),be,q=X([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),ne=pe(["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"]),Te=we([{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"]),ae=Q({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}}),J=ce(["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 X($e){return v($e,function(rt,et){return rt||RegExp("\\b"+(et.pattern||T(et))+"\\b","i").exec(y)&&(et.label||et)})}function Q($e){return v($e,function(rt,et,Me){return rt||(et[Te]||et[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Te)]||RegExp("\\b"+T(Me)+"(?:\\b|\\w*\\d)","i").exec(y))&&Me})}function pe($e){return v($e,function(rt,et){return rt||RegExp("\\b"+(et.pattern||T(et))+"\\b","i").exec(y)&&(et.label||et)})}function ce($e){return v($e,function(rt,et){var Me=et.pattern||T(et);return!rt&&(rt=RegExp("\\b"+Me+"(?:/[\\d.]+|[ \\w.]*)","i").exec(y))&&(rt=w(rt,Me,et.label||et)),rt})}function we($e){return v($e,function(rt,et){var Me=et.pattern||T(et);return!rt&&(rt=RegExp("\\b"+Me+" *\\d+[.\\w_]*","i").exec(y)||RegExp("\\b"+Me+" *\\w+-[\\w]*","i").exec(y)||RegExp("\\b"+Me+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(y))&&((rt=String(et.label&&!RegExp(Me,"i").test(et.label)?et.label:rt).split("/"))[1]&&!/[\d.]+/.test(rt[0])&&(rt[0]+=" "+rt[1]),et=et.label||et,rt=f(rt[0].replace(RegExp(Me,"i"),et).replace(RegExp("; *(?:"+et+"[_-])?","i")," ").replace(RegExp("("+et+")[-_.]?(\\w)","i"),"$1 $2"))),rt})}function ze($e){return v($e,function(rt,et){return rt||(RegExp(et+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(y)||0)[1]||null})}function Ge(){return this.description||""}if(q&&(q=[q]),ae&&!Te&&(Te=we([ae])),(le=/\bGoogle TV\b/.exec(Te))&&(Te=le[0]),/\bSimulator\b/i.test(y)&&(Te=(Te?Te+" ":"")+"Simulator"),ne=="Opera Mini"&&/\bOPiOS\b/.test(y)&&xe.push("running in Turbo/Uncompressed mode"),ne=="IE"&&/\blike iPhone OS\b/.test(y)?(le=L(y.replace(/like iPhone OS/,"")),ae=le.manufacturer,Te=le.product):/^iP/.test(Te)?(ne||(ne="Safari"),J="iOS"+((le=/ OS ([\d_]+)/i.exec(y))?" "+le[1].replace(/_/g,"."):"")):ne=="Konqueror"&&!/buntu/i.test(J)?J="Kubuntu":ae&&ae!="Google"&&(/Chrome/.test(ne)&&!/\bMobile Safari\b/i.test(y)||/\bVita\b/.test(Te))||/\bAndroid\b/.test(J)&&/^Chrome/.test(ne)&&/\bVersion\//i.test(y)?(ne="Android Browser",J=/\bAndroid\b/.test(J)?J:"Android"):ne=="Silk"?(/\bMobi/i.test(y)||(J="Android",xe.unshift("desktop mode")),/Accelerated *= *true/i.test(y)&&xe.unshift("accelerated")):ne=="PaleMoon"&&(le=/\bFirefox\/([\d.]+)\b/.exec(y))?xe.push("identifying as Firefox "+le[1]):ne=="Firefox"&&(le=/\b(Mobile|Tablet|TV)\b/i.exec(y))?(J||(J="Firefox OS"),Te||(Te=le[1])):!ne||(le=!/\bMinefield\b/i.test(y)&&/\b(?:Firefox|Safari)\b/.exec(ne))?(ne&&!Te&&/[\/,]|^[^(]+?\)/.test(y.slice(y.indexOf(le+"/")+8))&&(ne=null),(le=Te||ae||J)&&(Te||ae||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(J))&&(ne=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(J)?J:le)+" Browser")):ne=="Electron"&&(le=(/\bChrome\/([\d.]+)\b/.exec(y)||0)[1])&&xe.push("Chromium "+le),re||(re=ze(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",T(ne),"(?:Firefox|Minefield|NetFront)"])),(le=q=="iCab"&&parseFloat(re)>3&&"WebKit"||/\bOpera\b/.test(ne)&&(/\bOPR\b/.test(y)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(y)&&!/^(?:Trident|EdgeHTML)$/.test(q)&&"WebKit"||!q&&/\bMSIE\b/i.test(y)&&(J=="Mac OS"?"Tasman":"Trident")||q=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ne)&&"NetFront")&&(q=[le]),ne=="IE"&&(le=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(y)||0)[1])?(ne+=" Mobile",J="Windows Phone "+(/\+$/.test(le)?le:le+".x"),xe.unshift("desktop mode")):/\bWPDesktop\b/i.test(y)?(ne="IE Mobile",J="Windows Phone 8.x",xe.unshift("desktop mode"),re||(re=(/\brv:([\d.]+)/.exec(y)||0)[1])):ne!="IE"&&q=="Trident"&&(le=/\brv:([\d.]+)/.exec(y))&&(ne&&xe.push("identifying as "+ne+(re?" "+re:"")),ne="IE",re=le[1]),se){if(c(E,"global"))if(W&&(le=W.lang.System,Re=le.getProperty("os.arch"),J=J||le.getProperty("os.name")+" "+le.getProperty("os.version")),F){try{re=E.require("ringo/engine").version.join("."),ne="RingoJS"}catch($e){(le=E.system)&&le.global.system==E.system&&(ne="Narwhal",J||(J=le[0].os||null))}ne||(ne="Rhino")}else typeof E.process=="object"&&!E.process.browser&&(le=E.process)&&(typeof le.versions=="object"&&(typeof le.versions.electron=="string"?(xe.push("Node "+le.versions.node),ne="Electron",re=le.versions.electron):typeof le.versions.nw=="string"&&(xe.push("Chromium "+re,"Node "+le.versions.node),ne="NW.js",re=le.versions.nw)),ne||(ne="Node.js",Re=le.arch,J=le.platform,re=/[\d.]+/.exec(le.version),re=re?re[0]:null));else l(le=E.runtime)==K?(ne="Adobe AIR",J=le.flash.system.Capabilities.os):l(le=E.phantom)==B?(ne="PhantomJS",re=(le=le.version||null)&&le.major+"."+le.minor+"."+le.patch):typeof Z.documentMode=="number"&&(le=/\bTrident\/(\d+)/i.exec(y))?(re=[re,Z.documentMode],(le=+le[1]+4)!=re[1]&&(xe.push("IE "+re[1]+" mode"),q&&(q[1]=""),re[1]=le),re=ne=="IE"?String(re[1].toFixed(1)):re[0]):typeof Z.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ne)&&(xe.push("masking as "+ne+" "+re),ne="IE",re="11.0",q=["Trident"],J="Windows");J=J&&f(J)}if(re&&(le=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(re)||/(?:alpha|beta)(?: ?\d)?/i.exec(y+";"+(se&&_.appMinorVersion))||/\bMinefield\b/i.test(y)&&"a")&&(ie=/b/i.test(le)?"beta":"alpha",re=re.replace(RegExp(le+"\\+?$"),"")+(ie=="beta"?ee:$)+(/\d+\+?/.exec(le)||"")),ne=="Fennec"||ne=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(J))ne="Firefox Mobile";else if(ne=="Maxthon"&&re)re=re.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Te))Te=="Xbox 360"&&(J=null),Te=="Xbox 360"&&/\bIEMobile\b/.test(y)&&xe.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(ne)||ne&&!Te&&!/Browser|Mobi/.test(ne))&&(J=="Windows CE"||/Mobi/i.test(y)))ne+=" Mobile";else if(ne=="IE"&&se)try{E.external===null&&xe.unshift("platform preview")}catch($e){xe.unshift("embedded")}else(/\bBlackBerry\b/.test(Te)||/\bBB10\b/.test(y))&&(le=(RegExp(Te.replace(/ +/g," *")+"/([.\\d]+)","i").exec(y)||0)[1]||re)?(le=[le,/BB10/.test(y)],J=(le[1]?(Te=null,ae="BlackBerry"):"Device Software")+" "+le[0],re=null):this!=n&&Te!="Wii"&&(se&&ve||/Opera/.test(ne)&&/\b(?:MSIE|Firefox)\b/i.test(y)||ne=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(J)||ne=="IE"&&(J&&!/^Win/.test(J)&&re>5.5||/\bWindows XP\b/.test(J)&&re>8||re==8&&!/\bTrident\b/.test(y)))&&!a.test(le=L.call(n,y.replace(a,"")+";"))&&le.name&&(le="ing as "+le.name+((le=le.version)?" "+le:""),a.test(ne)?(/\bIE\b/.test(le)&&J=="Mac OS"&&(J=null),le="identify"+le):(le="mask"+le,he?ne=f(he.replace(/([a-z])([A-Z])/g,"$1 $2")):ne="Opera",/\bIE\b/.test(le)&&(J=null),se||(re=null)),q=["Presto"],xe.push(le));(le=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(y)||0)[1])&&(le=[parseFloat(le.replace(/\.(\d)$/,".0$1")),le],ne=="Safari"&&le[1].slice(-1)=="+"?(ne="WebKit Nightly",ie="alpha",re=le[1].slice(0,-1)):(re==le[1]||re==(le[2]=(/\bSafari\/([\d.]+\+?)/i.exec(y)||0)[1]))&&(re=null),le[1]=(/\bChrome\/([\d.]+)/i.exec(y)||0)[1],le[0]==537.36&&le[2]==537.36&&parseFloat(le[1])>=28&&q=="WebKit"&&(q=["Blink"]),!se||!M&&!le[1]?(q&&(q[1]="like Safari"),le=(le=le[0],le<400?1:le<500?2:le<526?3:le<533?4:le<534?"4+":le<535?5:le<537?6:le<538?7:le<601?8:"8")):(q&&(q[1]="like Chrome"),le=le[1]||(le=le[0],le<530?1:le<532?2:le<532.05?3:le<533?4:le<534.03?5:le<534.07?6:le<534.1?7:le<534.13?8:le<534.16?9:le<534.24?10:le<534.3?11:le<535.01?12:le<535.02?"13+":le<535.07?15:le<535.11?16:le<535.19?17:le<536.05?18:le<536.1?19:le<537.01?20:le<537.11?"21+":le<537.13?23:le<537.18?24:le<537.24?25:le<537.36?26:q!="Blink"?"27":"28")),q&&(q[1]+=" "+(le+=typeof le=="number"?".x":/[.+]/.test(le)?"":"+")),ne=="Safari"&&(!re||parseInt(re)>45)&&(re=le)),ne=="Opera"&&(le=/\bzbov|zvav$/.exec(J))?(ne+=" ",xe.unshift("desktop mode"),le=="zvav"?(ne+="Mini",re=null):ne+="Mobile",J=J.replace(RegExp(" *"+le+"$"),"")):ne=="Safari"&&/\bChrome\b/.exec(q&&q[1])&&(xe.unshift("desktop mode"),ne="Chrome Mobile",re=null,/\bOS X\b/.test(J)?(ae="Apple",J="iOS 4.3+"):J=null),re&&re.indexOf(le=/[\d.]+$/.exec(J))==0&&y.indexOf("/"+le+"-")>-1&&(J=i(J.replace(le,""))),q&&!/\b(?:Avant|Nook)\b/.test(ne)&&(/Browser|Lunascape|Maxthon/.test(ne)||ne!="Safari"&&/^iOS/.test(J)&&/\bSafari\b/.test(q[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ne)&&q[1])&&((le=q[q.length-1])&&xe.push(le)),xe.length&&(xe=["("+xe.join("; ")+")"]),ae&&Te&&Te.indexOf(ae)<0&&xe.push("on "+ae),Te&&xe.push((/^on /.test(xe[xe.length-1])?"":"on ")+Te),J&&(le=/ ([\d.+]+)$/.exec(J),be=le&&J.charAt(J.length-le[0].length-1)=="/",J={architecture:32,family:le&&!be?J.replace(le[0],""):J,version:le?le[1]:null,toString:function(){var $e=this.version;return this.family+($e&&!be?" "+$e:"")+(this.architecture==64?" 64-bit":"")}}),(le=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Re))&&!/\bi686\b/i.test(Re)?(J&&(J.architecture=64,J.family=J.family.replace(RegExp(" *"+le),"")),ne&&(/\bWOW64\b/i.test(y)||se&&/\w(?:86|32)$/.test(_.cpuClass||_.platform)&&!/\bWin64; x64\b/i.test(y))&&xe.unshift("32-bit")):J&&/^OS X/.test(J.family)&&ne=="Chrome"&&parseFloat(re)>=39&&(J.architecture=64),y||(y=null);var Qe={};return Qe.description=y,Qe.layout=q&&q[0],Qe.manufacturer=ae,Qe.name=ne,Qe.prerelease=ie,Qe.product=Te,Qe.ua=y,Qe.version=ne&&re,Qe.os=J||{architecture:null,family:null,version:null,toString:function(){return"null"}},Qe.parse=L,Qe.toString=Ge,Qe.version&&xe.unshift(re),Qe.name&&xe.unshift(ne),J&&ne&&!(J==String(J).split(" ")[0]&&(J==ne.split(" ")[0]||Te))&&xe.push(Te?"("+J+")":"on "+J),xe.length&&(Qe.description=xe.join(" ")),Qe}var A=L();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(C.platform=A,define(function(){return A})):h&&s?n(A,function(y,E){h[E]=y}):C.platform=A}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(N,Y,k){(function(P){"use strict";typeof P=="undefined"||!P.version||P.version.indexOf("v0.")===0||P.version.indexOf("v1.")===0&&P.version.indexOf("v1.8.")!==0?Y.exports={nextTick:u}:Y.exports=P;function u(C,R,h,s){if(typeof C!="function")throw new TypeError('"callback" argument must be a function');var S=arguments.length,d,a;switch(S){case 0:case 1:return P.nextTick(C);case 2:return P.nextTick(function(){C.call(null,R)});case 3:return P.nextTick(function(){C.call(null,R,h)});case 4:return P.nextTick(function(){C.call(null,R,h,s)});default:for(d=new Array(S-1),a=0;a1)for(var n=1;n= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=d-a,T=Math.floor,v=String.fromCharCode,i;function L(z){throw new RangeError(l[z])}function A(z,B){for(var W=z.length,F=[];W--;)F[W]=B(z[W]);return F}function y(z,B){var W=z.split("@"),F="";W.length>1&&(F=W[0]+"@",z=W[1]),z=z.replace(n,".");var $=z.split("."),ee=A($,B).join(".");return F+ee}function E(z){for(var B=[],W=0,F=z.length,$,ee;W=55296&&$<=56319&&W65535&&(B-=65536,W+=v(B>>>10&1023|55296),B=56320|B&1023),W+=v(B),W}).join("")}function _(z){return z-48<10?z-22:z-65<26?z-65:z-97<26?z-97:d}function I(z,B){return z+22+75*(z<26)-((B!=0)<<5)}function j(z,B,W){var F=0;for(z=W?T(z/x):z>>1,z+=T(z/B);z>c*o>>1;F+=d)z=T(z/c);return T(F+(c+1)*z/(z+r))}function M(z){var B=[],W=z.length,F,$=0,ee=m,Z=g,ve,he,le,Re,xe,ie,se,re,be;for(ve=z.lastIndexOf(w),ve<0&&(ve=0),he=0;he=128&&L("not-basic"),B.push(z.charCodeAt(he));for(le=ve>0?ve+1:0;le=W&&L("invalid-input"),se=_(z.charCodeAt(le++)),(se>=d||se>T((S-$)/xe))&&L("overflow"),$+=se*xe,re=ie<=Z?a:ie>=Z+o?o:ie-Z,seT(S/be)&&L("overflow"),xe*=be;F=B.length+1,Z=j($-Re,F,Re==0),T($/F)>S-ee&&L("overflow"),ee+=T($/F),$%=F,B.splice($++,0,ee)}return b(B)}function G(z){var B,W,F,$,ee,Z,ve,he,le,Re,xe,ie=[],se,re,be,q;for(z=E(z),se=z.length,B=m,W=0,ee=g,Z=0;Z=B&&xeT((S-W)/re)&&L("overflow"),W+=(ve-B)*re,B=ve,Z=0;ZS&&L("overflow"),xe==B){for(he=W,le=d;!(Re=le<=ee?a:le>=ee+o?o:le-ee,he0&&o>a&&(o=a);for(var r=0;r=0?(m=x.substr(0,g),w=x.substr(g+1)):(m=x,w=""),p=decodeURIComponent(m),f=decodeURIComponent(w),P(S,p)?u(S[p])?S[p].push(f):S[p]=[S[p],f]:S[p]=f}return S};var u=Array.isArray||function(C){return Object.prototype.toString.call(C)==="[object Array]"}},{}],211:[function(N,Y,k){"use strict";var P=function(h){switch(typeof h){case"string":return h;case"boolean":return h?"true":"false";case"number":return isFinite(h)?h:"";default:return""}};Y.exports=function(h,s,S,d){return s=s||"&",S=S||"=",h===null&&(h=void 0),typeof h=="object"?C(R(h),function(a){var o=encodeURIComponent(P(a))+S;return u(h[a])?C(h[a],function(r){return o+encodeURIComponent(P(r))}).join(s):o+encodeURIComponent(P(h[a]))}).join(s):d?encodeURIComponent(P(d))+S+encodeURIComponent(P(h)):""};var u=Array.isArray||function(h){return Object.prototype.toString.call(h)==="[object Array]"};function C(h,s){if(h.map)return h.map(s);for(var S=[],d=0;d0?(typeof ne!="string"&&!X.objectMode&&(0,R.default)(ne)!==m.prototype&&(ne=p(ne)),ae?X.endEmitted?q.emit("error",new Error("stream.unshift() after end event")):_(q,X,ne,!0):X.ended?q.emit("error",new Error("stream.push() after EOF")):(X.reading=!1,X.decoder&&!Te?(ne=X.decoder.write(ne),X.objectMode||ne.length!==0?_(q,X,ne,!1):W(q,X)):_(q,X,ne,!1))):ae||(X.reading=!1)}return j(X)}function _(q,ne,Te,ae){ne.flowing&&ne.length===0&&!ne.sync?(q.emit("data",Te),q.read(0)):(ne.length+=ne.objectMode?1:Te.length,ae?ne.buffer.unshift(Te):ne.buffer.push(Te),ne.needReadable&&z(q)),W(q,ne)}function I(q,ne){var Te;return!f(ne)&&typeof ne!="string"&&ne!==void 0&&!q.objectMode&&(Te=new TypeError("Invalid non-string/buffer chunk")),Te}function j(q){return!q.ended&&(q.needReadable||q.length=M?q=M:(q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++),q}function K(q,ne){return q<=0||ne.length===0&&ne.ended?0:ne.objectMode?1:q!==q?ne.flowing&&ne.length?ne.buffer.head.data.length:ne.length:(q>ne.highWaterMark&&(ne.highWaterMark=G(q)),q<=ne.length?q:ne.ended?ne.length:(ne.needReadable=!0,0))}E.prototype.read=function(q){c("read",q),q=parseInt(q,10);var ne=this._readableState,Te=q;if(q!==0&&(ne.emittedReadable=!1),q===0&&ne.needReadable&&(ne.length>=ne.highWaterMark||ne.ended))return c("read: emitReadable",ne.length,ne.ended),ne.length===0&&ne.ended?se(this):z(this),null;if(q=K(q,ne),q===0&&ne.ended)return ne.length===0&&se(this),null;var ae=ne.needReadable;c("need readable",ae),(ne.length===0||ne.length-q0?J=le(q,ne):J=null,J===null?(ne.needReadable=!0,q=0):ne.length-=q,ne.length===0&&(ne.ended||(ne.needReadable=!0),Te!==q&&ne.ended&&se(this)),J!==null&&this.emit("data",J),J};function H(q,ne){if(ne.ended)return;if(ne.decoder){var Te=ne.decoder.end();Te&&Te.length&&(ne.buffer.push(Te),ne.length+=ne.objectMode?1:Te.length)}ne.ended=!0,z(q)}function z(q){var ne=q._readableState;ne.needReadable=!1,ne.emittedReadable||(c("emitReadable",ne.flowing),ne.emittedReadable=!0,ne.sync?d.nextTick(B,q):B(q))}function B(q){c("emit readable"),q.emit("readable"),he(q)}function W(q,ne){ne.readingMore||(ne.readingMore=!0,d.nextTick(F,q,ne))}function F(q,ne){for(var Te=ne.length;!ne.reading&&!ne.flowing&&!ne.ended&&ne.length1&&be(ae.pipes,q)!==-1)&&!we&&(c("false write response, pause",Te._readableState.awaitDrain),Te._readableState.awaitDrain++,Ge=!0),Te.pause())}function $e(Ce){c("onerror",Ce),Me(),q.removeListener("error",$e),x(q,"error")===0&&q.emit("error",Ce)}A(q,"error",$e);function rt(){q.removeListener("finish",et),Me()}q.once("close",rt);function et(){c("onfinish"),q.removeListener("close",rt),Me()}q.once("finish",et);function Me(){c("unpipe"),Te.unpipe(q)}return q.emit("pipe",Te),ae.flowing||(c("pipe resume"),Te.resume()),q};function $(q){return function(){var ne=q._readableState;c("pipeOnDrain",ne.awaitDrain),ne.awaitDrain&&ne.awaitDrain--,ne.awaitDrain===0&&x(q,"data")&&(ne.flowing=!0,he(q))}}E.prototype.unpipe=function(q){var ne=this._readableState,Te={hasUnpiped:!1};if(ne.pipesCount===0)return this;if(ne.pipesCount===1)return q&&q!==ne.pipes?this:(q||(q=ne.pipes),ne.pipes=null,ne.pipesCount=0,ne.flowing=!1,q&&q.emit("unpipe",this,Te),this);if(!q){var ae=ne.pipes,J=ne.pipesCount;ne.pipes=null,ne.pipesCount=0,ne.flowing=!1;for(var X=0;X=ne.length?(ne.decoder?Te=ne.buffer.join(""):ne.buffer.length===1?Te=ne.buffer.head.data:Te=ne.buffer.concat(ne.length),ne.buffer.clear()):Te=Re(q,ne.buffer,ne.decoder),Te}function Re(q,ne,Te){var ae;return qX.length?X.length:q;if(Q===X.length?J+=X:J+=X.slice(0,q),q-=Q,q===0){Q===X.length?(++ae,Te.next?ne.head=Te.next:ne.head=ne.tail=null):(ne.head=Te,Te.data=X.slice(Q));break}++ae}return ne.length-=ae,J}function ie(q,ne){var Te=m.allocUnsafe(q),ae=ne.head,J=1;for(ae.data.copy(Te),q-=ae.data.length;ae=ae.next;){var X=ae.data,Q=q>X.length?X.length:q;if(X.copy(Te,Te.length-q,0,Q),q-=Q,q===0){Q===X.length?(++J,ae.next?ne.head=ae.next:ne.head=ne.tail=null):(ne.head=ae,ae.data=X.slice(Q));break}++J}return ne.length-=J,Te}function se(q){var ne=q._readableState;if(ne.length>0)throw new Error('"endReadable()" called on non-empty stream');ne.endEmitted||(ne.ended=!0,d.nextTick(re,ne,q))}function re(q,ne){!q.endEmitted&&q.length===0&&(q.endEmitted=!0,ne.readable=!1,ne.emit("end"))}function be(q,ne){for(var Te=0,ae=q.length;Te-1?x.default:m.nextTick,n;I.WritableState=b;var l=(0,o.default)(N("core-util-is"));l.inherits=N("inherits");var c={deprecate:N("util-deprecate")},T=N("./internal/streams/stream"),v=N("safe-buffer").Buffer,i=u.Uint8Array||function(){};function L(ie){return v.from(ie)}function A(ie){return v.isBuffer(ie)||ie instanceof i}var y=N("./internal/streams/destroy");l.inherits(I,T);function E(){}function b(ie,se){n=n||N("./_stream_duplex"),ie=ie||{};var re=se instanceof n;this.objectMode=!!ie.objectMode,re&&(this.objectMode=this.objectMode||!!ie.writableObjectMode);var be=ie.highWaterMark,q=ie.writableHighWaterMark,ne=this.objectMode?16:16*1024;be||be===0?this.highWaterMark=be:re&&(q||q===0)?this.highWaterMark=q:this.highWaterMark=ne,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 Te=ie.decodeStrings===!1;this.decodeStrings=!Te,this.defaultEncoding=ie.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ae){W(se,ae)},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 p(this)}b.prototype.getBuffer=function(){for(var se=this.bufferedRequest,re=[];se;)re.push(se),se=se.next;return re},function(){try{Object.defineProperty(b.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ie){}}();var _;typeof d.default=="function"&&s.default&&typeof Function.prototype[s.default]=="function"?(_=Function.prototype[s.default],(0,R.default)(I,s.default,{value:function(se){return _.call(this,se)?!0:this!==I?!1:se&&se._writableState instanceof b}})):_=function(se){return se instanceof this};function I(ie){if(n=n||N("./_stream_duplex"),!_.call(I,this)&&!(this instanceof n))return new I(ie);this._writableState=new b(ie,this),this.writable=!0,ie&&(typeof ie.write=="function"&&(this._write=ie.write),typeof ie.writev=="function"&&(this._writev=ie.writev),typeof ie.destroy=="function"&&(this._destroy=ie.destroy),typeof ie.final=="function"&&(this._final=ie.final)),T.call(this)}I.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function j(ie,se){var re=new Error("write after end");ie.emit("error",re),m.nextTick(se,re)}function M(ie,se,re,be){var q=!0,ne=!1;return re===null?ne=new TypeError("May not write null values to stream"):typeof re!="string"&&re!==void 0&&!se.objectMode&&(ne=new TypeError("Invalid non-string/buffer chunk")),ne&&(ie.emit("error",ne),m.nextTick(be,ne),q=!1),q}I.prototype.write=function(ie,se,re){var be=this._writableState,q=!1,ne=!be.objectMode&&A(ie);return ne&&!v.isBuffer(ie)&&(ie=L(ie)),typeof se=="function"&&(re=se,se=null),ne?se="buffer":se||(se=be.defaultEncoding),typeof re!="function"&&(re=E),be.ended?j(this,re):(ne||M(this,be,ie,re))&&(be.pendingcb++,q=K(this,be,ne,ie,se,re)),q},I.prototype.cork=function(){var ie=this._writableState;ie.corked++},I.prototype.uncork=function(){var ie=this._writableState;ie.corked&&(ie.corked--,!ie.writing&&!ie.corked&&!ie.finished&&!ie.bufferProcessing&&ie.bufferedRequest&&ee(this,ie))},I.prototype.setDefaultEncoding=function(se){if(typeof se=="string"&&(se=se.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((se+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+se);return this._writableState.defaultEncoding=se,this};function G(ie,se,re){return!ie.objectMode&&ie.decodeStrings!==!1&&typeof se=="string"&&(se=v.from(se,re)),se}Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function K(ie,se,re,be,q,ne){if(!re){var Te=G(se,be,q);be!==Te&&(re=!0,q="buffer",be=Te)}var ae=se.objectMode?1:be.length;se.length+=ae;var J=se.length0?this.tail.next=d:this.head=d,this.tail=d,++this.length},h.prototype.unshift=function(S){var d={data:S,next:this.head};this.length===0&&(this.tail=d),this.head=d,++this.length},h.prototype.shift=function(){if(this.length===0)return;var S=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,S},h.prototype.clear=function(){this.head=this.tail=null,this.length=0},h.prototype.join=function(S){if(this.length===0)return"";for(var d=this.head,a=""+d.data;d=d.next;)a+=S+d.data;return a},h.prototype.concat=function(S){if(this.length===0)return u.alloc(0);if(this.length===1)return this.head.data;for(var d=u.allocUnsafe(S>>>0),a=this.head,o=0;a;)R(a.data,d,o),o+=a.data.length,a=a.next;return d},h}(),C&&C.inspect&&C.inspect.custom&&(Y.exports.prototype[C.inspect.custom]=function(){var h=C.inspect({length:this.length});return this.constructor.name+" "+h})},{"safe-buffer":228,util:71}],220:[function(N,Y,k){"use strict";var P=N("process-nextick-args");function u(h,s){var S=this,d=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return d||a?(s?s(h):h&&(!this._writableState||!this._writableState.errorEmitted)&&P.nextTick(R,this,h),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(h||null,function(o){!s&&o?(P.nextTick(R,S,o),S._writableState&&(S._writableState.errorEmitted=!0)):s&&s(o)}),this)}function C(){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,s){h.emit("error",s)}Y.exports={destroy:u,undestroy:C}},{"process-nextick-args":207}],221:[function(N,Y,k){"use strict";Y.exports=N("events").EventEmitter},{events:192}],222:[function(N,Y,k){Y.exports=N("./readable").PassThrough},{"./readable":223}],223:[function(N,Y,k){k=Y.exports=N("./lib/_stream_readable.js"),k.Stream=k,k.Readable=k,k.Writable=N("./lib/_stream_writable.js"),k.Duplex=N("./lib/_stream_duplex.js"),k.Transform=N("./lib/_stream_transform.js"),k.PassThrough=N("./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(N,Y,k){Y.exports=N("./readable").Transform},{"./readable":223}],225:[function(N,Y,k){Y.exports=N("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(N,Y,k){var P=function(){return this}()||Function("return this")(),u=P.regeneratorRuntime&&Object.getOwnPropertyNames(P).indexOf("regeneratorRuntime")>=0,C=u&&P.regeneratorRuntime;if(P.regeneratorRuntime=void 0,Y.exports=N("./runtime"),u)P.regeneratorRuntime=C;else try{delete P.regeneratorRuntime}catch(R){P.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(N,Y,k){!function(P){"use strict";var u=Object.prototype,C=u.hasOwnProperty,R,h=typeof Symbol=="function"?Symbol:{},s=h.iterator||"@@iterator",S=h.asyncIterator||"@@asyncIterator",d=h.toStringTag||"@@toStringTag",a=typeof Y=="object",o=P.regeneratorRuntime;if(o){a&&(Y.exports=o);return}o=P.regeneratorRuntime=a?Y.exports:{};function r(K,H,z,B){var W=H&&H.prototype instanceof n?H:n,F=Object.create(W.prototype),$=new j(B||[]);return F._invoke=E(K,z,$),F}o.wrap=r;function x(K,H,z){try{return{type:"normal",arg:K.call(H,z)}}catch(B){return{type:"throw",arg:B}}}var g="suspendedStart",m="suspendedYield",w="executing",p="completed",f={};function n(){}function l(){}function c(){}var T={};T[s]=function(){return this};var v=Object.getPrototypeOf,i=v&&v(v(M([])));i&&i!==u&&C.call(i,s)&&(T=i);var L=c.prototype=n.prototype=Object.create(T);l.prototype=L.constructor=c,c.constructor=l,c[d]=l.displayName="GeneratorFunction";function A(K){["next","throw","return"].forEach(function(H){K[H]=function(z){return this._invoke(H,z)}})}o.isGeneratorFunction=function(K){var H=typeof K=="function"&&K.constructor;return H?H===l||(H.displayName||H.name)==="GeneratorFunction":!1},o.mark=function(K){return Object.setPrototypeOf?Object.setPrototypeOf(K,c):(K.__proto__=c,d in K||(K[d]="GeneratorFunction")),K.prototype=Object.create(L),K},o.awrap=function(K){return{__await:K}};function y(K){function H(W,F,$,ee){var Z=x(K[W],K,F);if(Z.type==="throw")ee(Z.arg);else{var ve=Z.arg,he=ve.value;return he&&typeof he=="object"&&C.call(he,"__await")?Promise.resolve(he.__await).then(function(le){H("next",le,$,ee)},function(le){H("throw",le,$,ee)}):Promise.resolve(he).then(function(le){ve.value=le,$(ve)},ee)}}var z;function B(W,F){function $(){return new Promise(function(ee,Z){H(W,F,ee,Z)})}return z=z?z.then($,$):$()}this._invoke=B}A(y.prototype),y.prototype[S]=function(){return this},o.AsyncIterator=y,o.async=function(K,H,z,B){var W=new y(r(K,H,z,B));return o.isGeneratorFunction(H)?W:W.next().then(function(F){return F.done?F.value:W.next()})};function E(K,H,z){var B=g;return function(F,$){if(B===w)throw new Error("Generator is already running");if(B===p){if(F==="throw")throw $;return G()}for(z.method=F,z.arg=$;;){var ee=z.delegate;if(ee){var Z=b(ee,z);if(Z){if(Z===f)continue;return Z}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(B===g)throw B=p,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);B=w;var ve=x(K,H,z);if(ve.type==="normal"){if(B=z.done?p:m,ve.arg===f)continue;return{value:ve.arg,done:z.done}}else ve.type==="throw"&&(B=p,z.method="throw",z.arg=ve.arg)}}}function b(K,H){var z=K.iterator[H.method];if(z===R){if(H.delegate=null,H.method==="throw"){if(K.iterator.return&&(H.method="return",H.arg=R,b(K,H),H.method==="throw"))return f;H.method="throw",H.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var B=x(z,K.iterator,H.arg);if(B.type==="throw")return H.method="throw",H.arg=B.arg,H.delegate=null,f;var W=B.arg;if(!W)return H.method="throw",H.arg=new TypeError("iterator result is not an object"),H.delegate=null,f;if(W.done)H[K.resultName]=W.value,H.next=K.nextLoc,H.method!=="return"&&(H.method="next",H.arg=R);else return W;return H.delegate=null,f}A(L),L[d]="Generator",L[s]=function(){return this},L.toString=function(){return"[object Generator]"};function _(K){var H={tryLoc:K[0]};1 in K&&(H.catchLoc=K[1]),2 in K&&(H.finallyLoc=K[2],H.afterLoc=K[3]),this.tryEntries.push(H)}function I(K){var H=K.completion||{};H.type="normal",delete H.arg,K.completion=H}function j(K){this.tryEntries=[{tryLoc:"root"}],K.forEach(_,this),this.reset(!0)}o.keys=function(K){var H=[];for(var z in K)H.push(z);return H.reverse(),function B(){for(;H.length;){var W=H.pop();if(W in K)return B.value=W,B.done=!1,B}return B.done=!0,B}};function M(K){if(K){var H=K[s];if(H)return H.call(K);if(typeof K.next=="function")return K;if(!isNaN(K.length)){var z=-1,B=function W(){for(;++z=0;--B){var W=this.tryEntries[B],F=W.completion;if(W.tryLoc==="root")return z("end");if(W.tryLoc<=this.prev){var $=C.call(W,"catchLoc"),ee=C.call(W,"finallyLoc");if($&&ee){if(this.prev=0;--z){var B=this.tryEntries[z];if(B.tryLoc<=this.prev&&C.call(B,"finallyLoc")&&this.prev=0;--H){var z=this.tryEntries[H];if(z.finallyLoc===K)return this.complete(z.completion,z.afterLoc),I(z),f}},catch:function(K){for(var H=this.tryEntries.length-1;H>=0;--H){var z=this.tryEntries[H];if(z.tryLoc===K){var B=z.completion;if(B.type==="throw"){var W=B.arg;I(z)}return W}}throw new Error("illegal catch attempt")},delegateYield:function(K,H,z){return this.delegate={iterator:M(K),resultName:H,nextLoc:z},this.method==="next"&&(this.arg=R),f}}}(function(){return this}()||Function("return this")())},{}],228:[function(N,Y,k){var P=N("buffer"),u=P.Buffer;function C(h,s){for(var S in h)s[S]=h[S]}u.from&&u.alloc&&u.allocUnsafe&&u.allocUnsafeSlow?Y.exports=P:(C(P,k),k.Buffer=R);function R(h,s,S){return u(h,s,S)}C(u,R),R.from=function(h,s,S){if(typeof h=="number")throw new TypeError("Argument must not be a number");return u(h,s,S)},R.alloc=function(h,s,S){if(typeof h!="number")throw new TypeError("Argument must be a number");var d=u(h);return s!==void 0?typeof S=="string"?d.fill(s,S):d.fill(s):d.fill(0),d},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 P.SlowBuffer(h)}},{buffer:73}],229:[function(N,Y,k){(function(P){"use strict";var u=N("babel-runtime/core-js/string/from-code-point"),C=m(u),R=N("babel-runtime/core-js/json/stringify"),h=m(R),s=N("babel-runtime/helpers/typeof"),S=m(s),d=N("babel-runtime/core-js/object/define-property"),a=m(d),o=N("babel-runtime/core-js/object/keys"),r=m(o),x=N("babel-runtime/core-js/object/create"),g=m(x);function m(w){return w&&w.__esModule?w:{default:w}}(function(w){w.parser=function(X,Q){return new f(X,Q)},w.SAXParser=f,w.SAXStream=L,w.createStream=i,w.MAX_BUFFER_LENGTH=64*1024;var p=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];w.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function f(X,Q){if(!(this instanceof f))return new f(X,Q);var pe=this;l(pe),pe.q=pe.c="",pe.bufferCheckPosition=w.MAX_BUFFER_LENGTH,pe.opt=Q||{},pe.opt.lowercase=pe.opt.lowercase||pe.opt.lowercasetags,pe.looseCase=pe.opt.lowercase?"toLowerCase":"toUpperCase",pe.tags=[],pe.closed=pe.closedRoot=pe.sawRoot=!1,pe.tag=pe.error=null,pe.strict=!!X,pe.noscript=!!(X||pe.opt.noscript),pe.state=F.BEGIN,pe.strictEntities=pe.opt.strictEntities,pe.ENTITIES=pe.strictEntities?(0,g.default)(w.XML_ENTITIES):(0,g.default)(w.ENTITIES),pe.attribList=[],pe.opt.xmlns&&(pe.ns=(0,g.default)(_)),pe.trackPosition=pe.opt.position!==!1,pe.trackPosition&&(pe.position=pe.line=pe.column=0),ee(pe,"onready")}g.default||(Object.create=function(X){function Q(){}Q.prototype=X;var pe=new Q;return pe}),r.default||(Object.keys=function(X){var Q=[];for(var pe in X)X.hasOwnProperty(pe)&&Q.push(pe);return Q});function n(X){for(var Q=Math.max(w.MAX_BUFFER_LENGTH,10),pe=0,ce=0,we=p.length;ceQ)switch(p[ce]){case"textNode":ve(X);break;case"cdata":Z(X,"oncdata",X.cdata),X.cdata="";break;case"script":Z(X,"onscript",X.script),X.script="";break;default:le(X,"Max buffer length exceeded: "+p[ce])}pe=Math.max(pe,ze)}var Ge=w.MAX_BUFFER_LENGTH-pe;X.bufferCheckPosition=Ge+X.position}function l(X){for(var Q=0,pe=p.length;Q"||K(X)}function B(X,Q){return X.test(Q)}function W(X,Q){return!B(X,Q)}var F=0;w.STATE={BEGIN:F++,BEGIN_WHITESPACE:F++,TEXT:F++,TEXT_ENTITY:F++,OPEN_WAKA:F++,SGML_DECL:F++,SGML_DECL_QUOTED:F++,DOCTYPE:F++,DOCTYPE_QUOTED:F++,DOCTYPE_DTD:F++,DOCTYPE_DTD_QUOTED:F++,COMMENT_STARTING:F++,COMMENT:F++,COMMENT_ENDING:F++,COMMENT_ENDED:F++,CDATA:F++,CDATA_ENDING:F++,CDATA_ENDING_2:F++,PROC_INST:F++,PROC_INST_BODY:F++,PROC_INST_ENDING:F++,OPEN_TAG:F++,OPEN_TAG_SLASH:F++,ATTRIB:F++,ATTRIB_NAME:F++,ATTRIB_NAME_SAW_WHITE:F++,ATTRIB_VALUE:F++,ATTRIB_VALUE_QUOTED:F++,ATTRIB_VALUE_CLOSED:F++,ATTRIB_VALUE_UNQUOTED:F++,ATTRIB_VALUE_ENTITY_Q:F++,ATTRIB_VALUE_ENTITY_U:F++,CLOSE_TAG:F++,CLOSE_TAG_SAW_WHITE:F++,SCRIPT:F++,SCRIPT_ENDING:F++},w.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},w.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)(w.ENTITIES).forEach(function(X){var Q=w.ENTITIES[X],pe=typeof Q=="number"?String.fromCharCode(Q):Q;w.ENTITIES[X]=pe});for(var $ in w.STATE)w.STATE[w.STATE[$]]=$;F=w.STATE;function ee(X,Q,pe){X[Q]&&X[Q](pe)}function Z(X,Q,pe){X.textNode&&ve(X),ee(X,Q,pe)}function ve(X){X.textNode=he(X.opt,X.textNode),X.textNode&&ee(X,"ontext",X.textNode),X.textNode=""}function he(X,Q){return X.trim&&(Q=Q.trim()),X.normalize&&(Q=Q.replace(/\s+/g," ")),Q}function le(X,Q){return ve(X),X.trackPosition&&(Q+=` Line: `+X.line+` Column: `+X.column+` Char: `+X.c),Q=new Error(Q),X.error=Q,ee(X,"onerror",Q),X}function Re(X){return X.sawRoot&&!X.closedRoot&&xe(X,"Unclosed root tag"),X.state!==F.BEGIN&&X.state!==F.BEGIN_WHITESPACE&&X.state!==F.TEXT&&le(X,"Unexpected end"),ve(X),X.c="",X.closed=!0,ee(X,"onend"),f.call(X,X.strict,X.opt),X}function xe(X,Q){if((typeof X=="undefined"?"undefined":(0,S.default)(X))!=="object"||!(X instanceof f))throw new Error("bad call to strictFail");X.strict&&le(X,Q)}function ie(X){X.strict||(X.tagName=X.tagName[X.looseCase]());var Q=X.tags[X.tags.length-1]||X,pe=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&(pe.ns=Q.ns),X.attribList.length=0,Z(X,"onopentagstart",pe)}function se(X,Q){var pe=X.indexOf(":"),ce=pe<0?["",X]:X.split(":"),we=ce[0],ze=ce[1];return Q&&X==="xmlns"&&(we="xmlns",ze=""),{prefix:we,local:ze}}function re(X){if(X.strict||(X.attribName=X.attribName[X.looseCase]()),X.attribList.indexOf(X.attribName)!==-1||X.tag.attributes.hasOwnProperty(X.attribName)){X.attribName=X.attribValue="";return}if(X.opt.xmlns){var Q=se(X.attribName,!0),pe=Q.prefix,ce=Q.local;if(pe==="xmlns")if(ce==="xml"&&X.attribValue!==E)xe(X,"xml: prefix must be bound to "+E+` Actual: `+X.attribValue);else if(ce==="xmlns"&&X.attribValue!==b)xe(X,"xmlns: prefix must be bound to "+b+` Actual: `+X.attribValue);else{var we=X.tag,ze=X.tags[X.tags.length-1]||X;we.ns===ze.ns&&(we.ns=(0,g.default)(ze.ns)),we.ns[ce]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,Z(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}function be(X,Q){if(X.opt.xmlns){var pe=X.tag,ce=se(X.tagName);pe.prefix=ce.prefix,pe.local=ce.local,pe.uri=pe.ns[ce.prefix]||"",pe.prefix&&!pe.uri&&(xe(X,"Unbound namespace prefix: "+(0,h.default)(X.tagName)),pe.uri=ce.prefix);var we=X.tags[X.tags.length-1]||X;pe.ns&&we.ns!==pe.ns&&(0,r.default)(pe.ns).forEach(function(He){Z(X,"onopennamespace",{prefix:He,uri:pe.ns[He]})});for(var ze=0,Ge=X.attribList.length;ze",X.tagName="",X.state=F.SCRIPT;return}Z(X,"onscript",X.script),X.script=""}var Q=X.tags.length,pe=X.tagName;X.strict||(pe=pe[X.looseCase]());for(var ce=pe;Q--;){var we=X.tags[Q];if(we.name!==ce)xe(X,"Unexpected close tag");else break}if(Q<0){xe(X,"Unmatched closing tag: "+X.tagName),X.textNode+="",X.state=F.TEXT;return}X.tagName=pe;for(var ze=X.tags.length;ze-- >Q;){var Ge=X.tag=X.tags.pop();X.tagName=X.tag.name,Z(X,"onclosetag",X.tagName);var Qe={};for(var $e in Ge.ns)Qe[$e]=Ge.ns[$e];var rt=X.tags[X.tags.length-1]||X;X.opt.xmlns&&Ge.ns!==rt.ns&&(0,r.default)(Ge.ns).forEach(function(et){var Me=Ge.ns[et];Z(X,"onclosenamespace",{prefix:et,uri:Me})})}Q===0&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=F.TEXT}function ne(X){var Q=X.entity,pe=Q.toLowerCase(),ce,we="";return X.ENTITIES[Q]?X.ENTITIES[Q]:X.ENTITIES[pe]?X.ENTITIES[pe]:(Q=pe,Q.charAt(0)==="#"&&(Q.charAt(1)==="x"?(Q=Q.slice(2),ce=parseInt(Q,16),we=ce.toString(16)):(Q=Q.slice(1),ce=parseInt(Q,10),we=ce.toString(10))),Q=Q.replace(/^0+/,""),isNaN(ce)||we.toLowerCase()!==Q?(xe(X,"Invalid character entity"),"&"+X.entity+";"):(0,C.default)(ce))}function Te(X,Q){Q==="<"?(X.state=F.OPEN_WAKA,X.startTagPosition=X.position):K(Q)||(xe(X,"Non-whitespace before first tag."),X.textNode=Q,X.state=F.TEXT)}function ae(X,Q){var pe="";return Q"?(Z(Q,"onsgmldeclaration",Q.sgmlDecl),Q.sgmlDecl="",Q.state=F.TEXT):(H(ce)&&(Q.state=F.SGML_DECL_QUOTED),Q.sgmlDecl+=ce);continue;case F.SGML_DECL_QUOTED:ce===Q.q&&(Q.state=F.SGML_DECL,Q.q=""),Q.sgmlDecl+=ce;continue;case F.DOCTYPE:ce===">"?(Q.state=F.TEXT,Z(Q,"ondoctype",Q.doctype),Q.doctype=!0):(Q.doctype+=ce,ce==="["?Q.state=F.DOCTYPE_DTD:H(ce)&&(Q.state=F.DOCTYPE_QUOTED,Q.q=ce));continue;case F.DOCTYPE_QUOTED:Q.doctype+=ce,ce===Q.q&&(Q.q="",Q.state=F.DOCTYPE);continue;case F.DOCTYPE_DTD:Q.doctype+=ce,ce==="]"?Q.state=F.DOCTYPE:H(ce)&&(Q.state=F.DOCTYPE_DTD_QUOTED,Q.q=ce);continue;case F.DOCTYPE_DTD_QUOTED:Q.doctype+=ce,ce===Q.q&&(Q.state=F.DOCTYPE_DTD,Q.q="");continue;case F.COMMENT:ce==="-"?Q.state=F.COMMENT_ENDING:Q.comment+=ce;continue;case F.COMMENT_ENDING:ce==="-"?(Q.state=F.COMMENT_ENDED,Q.comment=he(Q.opt,Q.comment),Q.comment&&Z(Q,"oncomment",Q.comment),Q.comment=""):(Q.comment+="-"+ce,Q.state=F.COMMENT);continue;case F.COMMENT_ENDED:ce!==">"?(xe(Q,"Malformed comment"),Q.comment+="--"+ce,Q.state=F.COMMENT):Q.state=F.TEXT;continue;case F.CDATA:ce==="]"?Q.state=F.CDATA_ENDING:Q.cdata+=ce;continue;case F.CDATA_ENDING:ce==="]"?Q.state=F.CDATA_ENDING_2:(Q.cdata+="]"+ce,Q.state=F.CDATA);continue;case F.CDATA_ENDING_2:ce===">"?(Q.cdata&&Z(Q,"oncdata",Q.cdata),Z(Q,"onclosecdata"),Q.cdata="",Q.state=F.TEXT):ce==="]"?Q.cdata+="]":(Q.cdata+="]]"+ce,Q.state=F.CDATA);continue;case F.PROC_INST:ce==="?"?Q.state=F.PROC_INST_ENDING:K(ce)?Q.state=F.PROC_INST_BODY:Q.procInstName+=ce;continue;case F.PROC_INST_BODY:if(!Q.procInstBody&&K(ce))continue;ce==="?"?Q.state=F.PROC_INST_ENDING:Q.procInstBody+=ce;continue;case F.PROC_INST_ENDING:ce===">"?(Z(Q,"onprocessinginstruction",{name:Q.procInstName,body:Q.procInstBody}),Q.procInstName=Q.procInstBody="",Q.state=F.TEXT):(Q.procInstBody+="?"+ce,Q.state=F.PROC_INST_BODY);continue;case F.OPEN_TAG:B(j,ce)?Q.tagName+=ce:(ie(Q),ce===">"?be(Q):ce==="/"?Q.state=F.OPEN_TAG_SLASH:(K(ce)||xe(Q,"Invalid character in tag name"),Q.state=F.ATTRIB));continue;case F.OPEN_TAG_SLASH:ce===">"?(be(Q,!0),q(Q)):(xe(Q,"Forward-slash in opening tag not followed by >"),Q.state=F.ATTRIB);continue;case F.ATTRIB:if(K(ce))continue;ce===">"?be(Q):ce==="/"?Q.state=F.OPEN_TAG_SLASH:B(I,ce)?(Q.attribName=ce,Q.attribValue="",Q.state=F.ATTRIB_NAME):xe(Q,"Invalid attribute name");continue;case F.ATTRIB_NAME:ce==="="?Q.state=F.ATTRIB_VALUE:ce===">"?(xe(Q,"Attribute without value"),Q.attribValue=Q.attribName,re(Q),be(Q)):K(ce)?Q.state=F.ATTRIB_NAME_SAW_WHITE:B(j,ce)?Q.attribName+=ce:xe(Q,"Invalid attribute name");continue;case F.ATTRIB_NAME_SAW_WHITE:if(ce==="=")Q.state=F.ATTRIB_VALUE;else{if(K(ce))continue;xe(Q,"Attribute without value"),Q.tag.attributes[Q.attribName]="",Q.attribValue="",Z(Q,"onattribute",{name:Q.attribName,value:""}),Q.attribName="",ce===">"?be(Q):B(I,ce)?(Q.attribName=ce,Q.state=F.ATTRIB_NAME):(xe(Q,"Invalid attribute name"),Q.state=F.ATTRIB)}continue;case F.ATTRIB_VALUE:if(K(ce))continue;H(ce)?(Q.q=ce,Q.state=F.ATTRIB_VALUE_QUOTED):(xe(Q,"Unquoted attribute value"),Q.state=F.ATTRIB_VALUE_UNQUOTED,Q.attribValue=ce);continue;case F.ATTRIB_VALUE_QUOTED:if(ce!==Q.q){ce==="&"?Q.state=F.ATTRIB_VALUE_ENTITY_Q:Q.attribValue+=ce;continue}re(Q),Q.q="",Q.state=F.ATTRIB_VALUE_CLOSED;continue;case F.ATTRIB_VALUE_CLOSED:K(ce)?Q.state=F.ATTRIB:ce===">"?be(Q):ce==="/"?Q.state=F.OPEN_TAG_SLASH:B(I,ce)?(xe(Q,"No whitespace between attributes"),Q.attribName=ce,Q.attribValue="",Q.state=F.ATTRIB_NAME):xe(Q,"Invalid attribute name");continue;case F.ATTRIB_VALUE_UNQUOTED:if(!z(ce)){ce==="&"?Q.state=F.ATTRIB_VALUE_ENTITY_U:Q.attribValue+=ce;continue}re(Q),ce===">"?be(Q):Q.state=F.ATTRIB;continue;case F.CLOSE_TAG:if(Q.tagName)ce===">"?q(Q):B(j,ce)?Q.tagName+=ce:Q.script?(Q.script+=""?q(Q):xe(Q,"Invalid characters in closing tag");continue;case F.TEXT_ENTITY:case F.ATTRIB_VALUE_ENTITY_Q:case F.ATTRIB_VALUE_ENTITY_U:var Ge,Qe;switch(Q.state){case F.TEXT_ENTITY:Ge=F.TEXT,Qe="textNode";break;case F.ATTRIB_VALUE_ENTITY_Q:Ge=F.ATTRIB_VALUE_QUOTED,Qe="attribValue";break;case F.ATTRIB_VALUE_ENTITY_U:Ge=F.ATTRIB_VALUE_UNQUOTED,Qe="attribValue";break}ce===";"?(Q[Qe]+=ne(Q),Q.entity="",Q.state=Ge):B(Q.entity.length?G:M,ce)?Q.entity+=ce:(xe(Q,"Invalid character in entity name"),Q[Qe]+="&"+Q.entity+ce,Q.entity="",Q.state=Ge);continue;default:throw new Error(Q,"Unknown state: "+Q.state)}}return Q.position>=Q.bufferCheckPosition&&n(Q),Q}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */C.default||function(){var X=String.fromCharCode,Q=Math.floor,pe=function(){var we=16384,ze=[],Ge,Qe,$e=-1,rt=arguments.length;if(!rt)return"";for(var et="";++$e1114111||Q(Me)!==Me)throw RangeError("Invalid code point: "+Me);Me<=65535?ze.push(Me):(Me-=65536,Ge=(Me>>10)+55296,Qe=Me%1024+56320,ze.push(Ge,Qe)),($e+1===rt||ze.length>we)&&(et+=X.apply(null,ze),ze.length=0)}return et};a.default?Object.defineProperty(String,"fromCodePoint",{value:pe,configurable:!0,writable:!0}):String.fromCodePoint=pe}()})(typeof k=="undefined"?(void 0).sax={}:k)}).call(this,N("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(N,Y,k){Y.exports=C;var P=N("events").EventEmitter,u=N("inherits");u(C,P),C.Readable=N("readable-stream/readable.js"),C.Writable=N("readable-stream/writable.js"),C.Duplex=N("readable-stream/duplex.js"),C.Transform=N("readable-stream/transform.js"),C.PassThrough=N("readable-stream/passthrough.js"),C.Stream=C;function C(){P.call(this)}C.prototype.pipe=function(R,h){var s=this;function S(m){R.writable&&(R.write(m)===!1&&s.pause&&s.pause())}s.on("data",S);function d(){s.readable&&s.resume&&s.resume()}R.on("drain",d),!R._isStdio&&(!h||h.end!==!1)&&(s.on("end",o),s.on("close",r));var a=!1;function o(){if(a)return;a=!0,R.end()}function r(){if(a)return;a=!0,typeof R.destroy=="function"&&R.destroy()}function x(m){if(g(),P.listenerCount(this,"error")===0)throw m}s.on("error",x),R.on("error",x);function g(){s.removeListener("data",S),R.removeListener("drain",d),s.removeListener("end",o),s.removeListener("close",r),s.removeListener("error",x),R.removeListener("error",x),s.removeListener("end",g),s.removeListener("close",g),R.removeListener("close",g)}return s.on("end",g),s.on("close",g),R.on("close",g),R.emit("pipe",s),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(N,Y,k){(function(P){var u=N("./lib/request"),C=N("./lib/response"),R=N("xtend"),h=N("builtin-status-codes"),s=N("url"),S=k;S.request=function(d,a){typeof d=="string"?d=s.parse(d):d=R(d);var o=P.location.protocol.search(/^https?:$/)===-1?"http:":"",r=d.protocol||o,x=d.hostname||d.host,g=d.port,m=d.path||"/";x&&x.indexOf(":")!==-1&&(x="["+x+"]"),d.url=(x?r+"//"+x:"")+(g?":"+g:"")+m,d.method=(d.method||"GET").toUpperCase(),d.headers=d.headers||{};var w=new u(d);return a&&w.on("response",a),w},S.get=function(a,o){var r=S.request(a,o);return r.end(),r},S.ClientRequest=u,S.IncomingMessage=C.IncomingMessage,S.Agent=function(){},S.Agent.defaultMaxSockets=4,S.globalAgent=new S.Agent,S.STATUS_CODES=h,S.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(N,Y,k){(function(P){"use strict";k.fetch=S(P.fetch)&&S(P.ReadableStream),k.writableStream=S(P.WritableStream),k.abortController=S(P.AbortController),k.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),k.blobConstructor=!0}catch(d){}var u;function C(){if(u!==void 0)return u;if(P.XMLHttpRequest){u=new P.XMLHttpRequest;try{u.open("GET",P.XDomainRequest?"/":"https://example.com")}catch(d){u=null}}else u=null;return u}function R(d){var a=C();if(!a)return!1;try{return a.responseType=d,a.responseType===d}catch(o){}return!1}var h=typeof P.ArrayBuffer!="undefined",s=h&&S(P.ArrayBuffer.prototype.slice);k.arraybuffer=k.fetch||h&&R("arraybuffer"),k.msstream=!k.fetch&&s&&R("ms-stream"),k.mozchunkedarraybuffer=!k.fetch&&h&&R("moz-chunked-arraybuffer"),k.overrideMimeType=k.fetch||(C()?S(C().overrideMimeType):!1),k.vbArray=S(P.VBArray);function S(d){return typeof d=="function"}u=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(N,Y,k){(function(P,u,C){"use strict";var R=N("babel-runtime/core-js/object/keys"),h=s(R);function s(n){return n&&n.__esModule?n:{default:n}}var S=N("./capability"),d=N("inherits"),a=N("./response"),o=N("readable-stream"),r=N("to-arraybuffer"),x=a.IncomingMessage,g=a.readyStates;function m(n,l){return S.fetch&&l?"fetch":S.mozchunkedarraybuffer?"moz-chunked-arraybuffer":S.msstream?"ms-stream":S.arraybuffer&&n?"arraybuffer":S.vbArray&&n?"text:vbarray":"text"}var w=Y.exports=function(n){var l=this;o.Writable.call(l),l._opts=n,l._body=[],l._headers={},n.auth&&l.setHeader("Authorization","Basic "+new C(n.auth).toString("base64")),(0,h.default)(n.headers).forEach(function(v){l.setHeader(v,n.headers[v])});var c,T=!0;if(n.mode==="disable-fetch"||"requestTimeout"in n&&!S.abortController)T=!1,c=!0;else if(n.mode==="prefer-streaming")c=!1;else if(n.mode==="allow-wrong-content-type")c=!S.overrideMimeType;else if(!n.mode||n.mode==="default"||n.mode==="prefer-fast")c=!0;else throw new Error("Invalid value for opts.mode");l._mode=m(c,T),l._fetchTimer=null,l.on("finish",function(){l._onFinish()})};d(w,o.Writable),w.prototype.setHeader=function(n,l){var c=this,T=n.toLowerCase();if(f.indexOf(T)!==-1)return;c._headers[T]={name:n,value:l}},w.prototype.getHeader=function(n){var l=this._headers[n.toLowerCase()];return l?l.value:null},w.prototype.removeHeader=function(n){var l=this;delete l._headers[n.toLowerCase()]},w.prototype._onFinish=function(){var n=this;if(n._destroyed)return;var l=n._opts,c=n._headers,T=null;l.method!=="GET"&&l.method!=="HEAD"&&(S.arraybuffer?T=r(C.concat(n._body)):S.blobConstructor?T=new u.Blob(n._body.map(function(E){return r(E)}),{type:(c["content-type"]||{}).value||""}):T=C.concat(n._body).toString());var v=[];if((0,h.default)(c).forEach(function(E){var b=c[E].name,_=c[E].value;Array.isArray(_)?_.forEach(function(I){v.push([b,I])}):v.push([b,_])}),n._mode==="fetch"){var i=null,L=null;if(S.abortController){var A=new AbortController;i=A.signal,n._fetchAbortController=A,"requestTimeout"in l&&l.requestTimeout!==0&&(n._fetchTimer=u.setTimeout(function(){n.emit("requestTimeout"),n._fetchAbortController&&n._fetchAbortController.abort()},l.requestTimeout))}u.fetch(n._opts.url,{method:n._opts.method,headers:v,body:T||void 0,mode:"cors",credentials:l.withCredentials?"include":"same-origin",signal:i}).then(function(E){n._fetchResponse=E,n._connect()},function(E){u.clearTimeout(n._fetchTimer),n._destroyed||n.emit("error",E)})}else{var y=n._xhr=new u.XMLHttpRequest;try{y.open(n._opts.method,n._opts.url,!0)}catch(E){P.nextTick(function(){n.emit("error",E)});return}"responseType"in y&&(y.responseType=n._mode.split(":")[0]),"withCredentials"in y&&(y.withCredentials=!!l.withCredentials),n._mode==="text"&&"overrideMimeType"in y&&y.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in l&&(y.timeout=l.requestTimeout,y.ontimeout=function(){n.emit("requestTimeout")}),v.forEach(function(E){y.setRequestHeader(E[0],E[1])}),n._response=null,y.onreadystatechange=function(){switch(y.readyState){case g.LOADING:case g.DONE:n._onXHRProgress();break}},n._mode==="moz-chunked-arraybuffer"&&(y.onprogress=function(){n._onXHRProgress()}),y.onerror=function(){if(n._destroyed)return;n.emit("error",new Error("XHR error"))};try{y.send(T)}catch(E){P.nextTick(function(){n.emit("error",E)});return}}};function p(n){try{var l=n.status;return l!==null&&l!==0}catch(c){return!1}}w.prototype._onXHRProgress=function(){var n=this;if(!p(n._xhr)||n._destroyed)return;n._response||n._connect(),n._response._onXHRProgress()},w.prototype._connect=function(){var n=this;if(n._destroyed)return;n._response=new x(n._xhr,n._fetchResponse,n._mode,n._fetchTimer),n._response.on("error",function(l){n.emit("error",l)}),n.emit("response",n._response)},w.prototype._write=function(n,l,c){var T=this;T._body.push(n),c()},w.prototype.abort=w.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()},w.prototype.end=function(n,l,c){var T=this;typeof n=="function"&&(c=n,n=void 0),o.Writable.prototype.end.call(T,n,l,c)},w.prototype.flushHeaders=function(){},w.prototype.setTimeout=function(){},w.prototype.setNoDelay=function(){},w.prototype.setSocketKeepAlive=function(){};var f=["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,N("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},N("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(N,Y,k){(function(P,u,C){"use strict";var R=N("babel-runtime/core-js/promise"),h=s(R);function s(x){return x&&x.__esModule?x:{default:x}}var S=N("./capability"),d=N("inherits"),a=N("readable-stream"),o=k.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},r=k.IncomingMessage=function(x,g,m,w){var p=this;if(a.Readable.call(p),p._mode=m,p.headers={},p.rawHeaders=[],p.trailers={},p.rawTrailers=[],p.on("end",function(){P.nextTick(function(){p.emit("close")})}),m==="fetch"){var f=function i(){l.read().then(function(L){if(p._destroyed)return;if(L.done){u.clearTimeout(w),p.push(null);return}p.push(new C(L.value)),i()}).catch(function(L){u.clearTimeout(w),p._destroyed||p.emit("error",L)})};if(p._fetchResponse=g,p.url=g.url,p.statusCode=g.status,p.statusMessage=g.statusText,g.headers.forEach(function(i,L){p.headers[L.toLowerCase()]=i,p.rawHeaders.push(L,i)}),S.writableStream){var n=new WritableStream({write:function(L){return new h.default(function(A,y){p._destroyed?y():p.push(new C(L))?A():p._resumeFetch=A})},close:function(){u.clearTimeout(w),p._destroyed||p.push(null)},abort:function(L){p._destroyed||p.emit("error",L)}});try{g.body.pipeTo(n).catch(function(i){u.clearTimeout(w),p._destroyed||p.emit("error",i)});return}catch(i){}}var l=g.body.getReader();f()}else{p._xhr=x,p._pos=0,p.url=x.responseURL,p.statusCode=x.status,p.statusMessage=x.statusText;var c=x.getAllResponseHeaders().split(/\r?\n/);if(c.forEach(function(i){var L=i.match(/^([^:]+):\s*(.*)/);if(L){var A=L[1].toLowerCase();A==="set-cookie"?(p.headers[A]===void 0&&(p.headers[A]=[]),p.headers[A].push(L[2])):p.headers[A]!==void 0?p.headers[A]+=", "+L[2]:p.headers[A]=L[2],p.rawHeaders.push(L[1],L[2])}}),p._charset="x-user-defined",!S.overrideMimeType){var T=p.rawHeaders["mime-type"];if(T){var v=T.match(/;\s*charset=([^;])(;|$)/);v&&(p._charset=v[1].toLowerCase())}p._charset||(p._charset="utf-8")}}};d(r,a.Readable),r.prototype._read=function(){var x=this,g=x._resumeFetch;g&&(x._resumeFetch=null,g())},r.prototype._onXHRProgress=function(){var x=this,g=x._xhr,m=null;switch(x._mode){case"text:vbarray":if(g.readyState!==o.DONE)break;try{m=new u.VBArray(g.responseBody).toArray()}catch(l){}if(m!==null){x.push(new C(m));break}case"text":try{m=g.responseText}catch(l){x._mode="text:vbarray";break}if(m.length>x._pos){var w=m.substr(x._pos);if(x._charset==="x-user-defined"){for(var p=new C(w.length),f=0;fx._pos&&(x.push(new C(new Uint8Array(n.result.slice(x._pos)))),x._pos=n.result.byteLength)},n.onload=function(){x.push(null)},n.readAsArrayBuffer(m);break}x._xhr.readyState===o.DONE&&x._mode!=="ms-stream"&&x.push(null)}}).call(this,N("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},N("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(N,Y,k){"use strict";var P=N("safe-buffer").Buffer,u=P.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 C(n){if(!n)return"utf8";for(var l;;)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(l)return;n=(""+n).toLowerCase(),l=!0}}function R(n){var l=C(n);if(typeof l!="string"&&(P.isEncoding===u||!u(n)))throw new Error("Unknown encoding: "+n);return l||n}k.StringDecoder=h;function h(n){this.encoding=R(n);var l;switch(this.encoding){case"utf16le":this.text=x,this.end=g,l=4;break;case"utf8":this.fillLast=a,l=4;break;case"base64":this.text=m,this.end=w,l=3;break;default:this.write=p,this.end=f;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=P.allocUnsafe(l)}h.prototype.write=function(n){if(n.length===0)return"";var l,c;if(this.lastNeed){if(l=this.fillLast(n),l===void 0)return"";c=this.lastNeed,this.lastNeed=0}else c=0;return c>5===6?2:n>>4===14?3:n>>3===30?4:n>>6===2?-1:-2}function S(n,l,c){var T=l.length-1;if(T=0?(v>0&&(n.lastNeed=v-1),v):--T=0?(v>0&&(n.lastNeed=v-2),v):--T=0?(v>0&&(v===2?v=0:n.lastNeed=v-3),v):0))}function d(n,l,c){if((l[0]&192)!==128)return n.lastNeed=0,"\uFFFD";if(n.lastNeed>1&&l.length>1){if((l[1]&192)!==128)return n.lastNeed=1,"\uFFFD";if(n.lastNeed>2&&l.length>2&&(l[2]&192)!==128)return n.lastNeed=2,"\uFFFD"}}function a(n){var l=this.lastTotal-this.lastNeed,c=d(this,n,l);if(c!==void 0)return c;if(this.lastNeed<=n.length)return n.copy(this.lastChar,l,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,l,0,n.length),this.lastNeed-=n.length}function o(n,l){var c=S(this,n,l);if(!this.lastNeed)return n.toString("utf8",l);this.lastTotal=c;var T=n.length-(c-this.lastNeed);return n.copy(this.lastChar,0,T),n.toString("utf8",l,T)}function r(n){var l=n&&n.length?this.write(n):"";return this.lastNeed?l+"\uFFFD":l}function x(n,l){if((n.length-l)%2===0){var c=n.toString("utf16le",l);if(c){var T=c.charCodeAt(c.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],c.slice(0,-1)}return c}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=n[n.length-1],n.toString("utf16le",l,n.length-1)}function g(n){var l=n&&n.length?this.write(n):"";if(this.lastNeed){var c=this.lastTotal-this.lastNeed;return l+this.lastChar.toString("utf16le",0,c)}return l}function m(n,l){var c=(n.length-l)%3;return c===0?n.toString("base64",l):(this.lastNeed=3-c,this.lastTotal=3,c===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",l,n.length-c))}function w(n){var l=n&&n.length?this.write(n):"";return this.lastNeed?l+this.lastChar.toString("base64",0,3-this.lastNeed):l}function p(n){return n.toString(this.encoding)}function f(n){return n&&n.length?this.write(n):""}},{"safe-buffer":228}],236:[function(N,Y,k){(function(P,u){var C=N("process/browser.js").nextTick,R=Function.prototype.apply,h=Array.prototype.slice,s={},S=0;k.setTimeout=function(){return new d(R.call(setTimeout,window,arguments),clearTimeout)},k.setInterval=function(){return new d(R.call(setInterval,window,arguments),clearInterval)},k.clearTimeout=k.clearInterval=function(a){a.close()};function d(a,o){this._id=a,this._clearFn=o}d.prototype.unref=d.prototype.ref=function(){},d.prototype.close=function(){this._clearFn.call(window,this._id)},k.enroll=function(a,o){clearTimeout(a._idleTimeoutId),a._idleTimeout=o},k.unenroll=function(a){clearTimeout(a._idleTimeoutId),a._idleTimeout=-1},k._unrefActive=k.active=function(a){clearTimeout(a._idleTimeoutId);var o=a._idleTimeout;o>=0&&(a._idleTimeoutId=setTimeout(function(){a._onTimeout&&a._onTimeout()},o))},k.setImmediate=typeof P=="function"?P:function(a){var o=S++,r=arguments.length<2?!1:h.call(arguments,1);return s[o]=!0,C(function(){s[o]&&(r?a.apply(null,r):a.call(null),k.clearImmediate(o))}),o},k.clearImmediate=typeof u=="function"?u:function(a){delete s[a]}}).call(this,N("timers").setImmediate,N("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(N,Y,k){var P=N("buffer").Buffer;Y.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(P.isBuffer(u)){for(var C=new Uint8Array(u.length),R=u.length,h=0;h",'"',"`"," ","\r",` `," "],d=["{","}","|","\\","^","`"].concat(S),a=["'"].concat(d),o=["%","/","?",";","#"].concat(a),r=["/","?","#"],x=255,g=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,w={javascript:!0,"javascript:":!0},p={javascript:!0,"javascript:":!0},f={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},n=N("querystring");function l(i,L,A){if(i&&u.isObject(i)&&i instanceof C)return i;var y=new C;return y.parse(i,L,A),y}C.prototype.parse=function(i,L,A){if(!u.isString(i))throw new TypeError("Parameter 'url' must be a string, not "+typeof i);var y=i.indexOf("?"),E=y!==-1&&y127?he+="x":he+=ve[le];if(!he.match(g)){var xe=ee.slice(0,z),ie=ee.slice(z+1),se=ve.match(m);se&&(xe.push(se[1]),ie.unshift(se[2])),ie.length&&(I="/"+ie.join(".")+I),this.hostname=xe.join(".");break}}}this.hostname.length>x?this.hostname="":this.hostname=this.hostname.toLowerCase(),$||(this.hostname=P.toASCII(this.hostname));var re=this.port?":"+this.port:"",be=this.hostname||"";this.host=be+re,this.href+=this.host,$&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),I[0]!=="/"&&(I="/"+I))}if(!w[G])for(var z=0,Z=a.length;z0?A.host.split("@"):!1;he&&(A.auth=he.shift(),A.host=A.hostname=he.shift())}return A.search=i.search,A.query=i.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(!ee.length)return A.pathname=null,A.search?A.path="/"+A.search:A.path=null,A.href=A.format(),A;for(var le=ee.slice(-1)[0],Re=(A.host||i.host||ee.length>1)&&(le==="."||le==="..")||le==="",xe=0,ie=ee.length;ie>=0;ie--)le=ee[ie],le==="."?ee.splice(ie,1):le===".."?(ee.splice(ie,1),xe++):xe&&(ee.splice(ie,1),xe--);if(!F&&!$)for(;xe--;xe)ee.unshift("..");F&&ee[0]!==""&&(!ee[0]||ee[0].charAt(0)!=="/")&&ee.unshift(""),Re&&ee.join("/").substr(-1)!=="/"&&ee.push("");var se=ee[0]===""||ee[0]&&ee[0].charAt(0)==="/";if(ve){A.hostname=A.host=se?"":ee.length?ee.shift():"";var he=A.host&&A.host.indexOf("@")>0?A.host.split("@"):!1;he&&(A.auth=he.shift(),A.host=A.hostname=he.shift())}return F=F||A.host&&ee.length,F&&!se&&ee.unshift(""),ee.length?A.pathname=ee.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=i.auth||A.auth,A.slashes=A.slashes||i.slashes,A.href=A.format(),A},C.prototype.parseHost=function(){var i=this.host,L=h.exec(i);L&&(L=L[0],L!==":"&&(this.port=L.substr(1)),i=i.substr(0,i.length-L.length)),i&&(this.hostname=i)}},{"./util":239,punycode:209,querystring:212}],239:[function(N,Y,k){"use strict";Y.exports={isString:function(P){return typeof P=="string"},isObject:function(P){return typeof P=="object"&&P!==null},isNull:function(P){return P===null},isNullOrUndefined:function(P){return P==null}}},{}],240:[function(N,Y,k){(function(P){Y.exports=u;function u(R,h){if(C("noDeprecation"))return R;var s=!1;function S(){if(!s){if(C("throwDeprecation"))throw new Error(h);C("traceDeprecation")?console.trace(h):console.warn(h),s=!0}return R.apply(this,arguments)}return S}function C(R){try{if(!P.localStorage)return!1}catch(s){return!1}var h=P.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(N,Y,k){typeof Object.create=="function"?Y.exports=function(u,C){u.super_=C,u.prototype=Object.create(C.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}})}:Y.exports=function(u,C){u.super_=C;var R=function(){};R.prototype=C.prototype,u.prototype=new R,u.prototype.constructor=u}},{}],242:[function(N,Y,k){Y.exports=function(u){return u&&typeof u=="object"&&typeof u.copy=="function"&&typeof u.fill=="function"&&typeof u.readUInt8=="function"}},{}],243:[function(N,Y,k){(function(P,u){var C=/%[sdj%]/g;k.format=function(H){if(!T(H)){for(var z=[],B=0;B=F)return Z;switch(Z){case"%s":return String(W[B++]);case"%d":return Number(W[B++]);case"%j":try{return JSON.stringify(W[B++])}catch(ve){return"[Circular]"}default:return Z}}),ee=W[B];B=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),f(z)?B.showHidden=z:z&&k._extend(B,z),i(B.showHidden)&&(B.showHidden=!1),i(B.depth)&&(B.depth=2),i(B.colors)&&(B.colors=!1),i(B.customInspect)&&(B.customInspect=!0),B.colors&&(B.stylize=S),o(B,H,B.depth)}k.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function S(H,z){var B=s.styles[z];return B?"["+s.colors[B][0]+"m"+H+"["+s.colors[B][1]+"m":H}function d(H,z){return H}function a(H){var z={};return H.forEach(function(B,W){z[B]=!0}),z}function o(H,z,B){if(H.customInspect&&z&&b(z.inspect)&&z.inspect!==k.inspect&&!(z.constructor&&z.constructor.prototype===z)){var W=z.inspect(B,H);return T(W)||(W=o(H,W,B)),W}var F=r(H,z);if(F)return F;var $=Object.keys(z),ee=a($);if(H.showHidden&&($=Object.getOwnPropertyNames(z)),E(z)&&($.indexOf("message")>=0||$.indexOf("description")>=0))return x(z);if($.length===0){if(b(z)){var Z=z.name?": "+z.name:"";return H.stylize("[Function"+Z+"]","special")}if(L(z))return H.stylize(RegExp.prototype.toString.call(z),"regexp");if(y(z))return H.stylize(Date.prototype.toString.call(z),"date");if(E(z))return x(z)}var ve="",he=!1,le=["{","}"];if(p(z)&&(he=!0,le=["[","]"]),b(z)){var Re=z.name?": "+z.name:"";ve=" [Function"+Re+"]"}if(L(z)&&(ve=" "+RegExp.prototype.toString.call(z)),y(z)&&(ve=" "+Date.prototype.toUTCString.call(z)),E(z)&&(ve=" "+x(z)),$.length===0&&(!he||z.length==0))return le[0]+ve+le[1];if(B<0)return L(z)?H.stylize(RegExp.prototype.toString.call(z),"regexp"):H.stylize("[Object]","special");H.seen.push(z);var xe;return he?xe=g(H,z,B,ee,$):xe=$.map(function(ie){return m(H,z,B,ee,ie,he)}),H.seen.pop(),w(xe,ve,le)}function r(H,z){if(i(z))return H.stylize("undefined","undefined");if(T(z)){var B="'"+JSON.stringify(z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return H.stylize(B,"string")}if(c(z))return H.stylize(""+z,"number");if(f(z))return H.stylize(""+z,"boolean");if(n(z))return H.stylize("null","null")}function x(H){return"["+Error.prototype.toString.call(H)+"]"}function g(H,z,B,W,F){for(var $=[],ee=0,Z=z.length;ee-1&&($?Z=Z.split(` `).map(function(he){return" "+he}).join(` `).substr(2):Z=` `+Z.split(` `).map(function(he){return" "+he}).join(` `))):Z=H.stylize("[Circular]","special")),i(ee)){if($&&F.match(/^\d+$/))return Z;ee=JSON.stringify(""+F),ee.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ee=ee.substr(1,ee.length-2),ee=H.stylize(ee,"name")):(ee=ee.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ee=H.stylize(ee,"string"))}return ee+": "+Z}function w(H,z,B){var W=0,F=H.reduce(function($,ee){return W++,ee.indexOf(` `)>=0&&W++,$+ee.replace(/\u001b\[\d\d?m/g,"").length+1},0);return F>60?B[0]+(z===""?"":z+` `)+" "+H.join(`, `)+" "+B[1]:B[0]+z+" "+H.join(", ")+" "+B[1]}function p(H){return Array.isArray(H)}k.isArray=p;function f(H){return typeof H=="boolean"}k.isBoolean=f;function n(H){return H===null}k.isNull=n;function l(H){return H==null}k.isNullOrUndefined=l;function c(H){return typeof H=="number"}k.isNumber=c;function T(H){return typeof H=="string"}k.isString=T;function v(H){return typeof H=="symbol"}k.isSymbol=v;function i(H){return H===void 0}k.isUndefined=i;function L(H){return A(H)&&I(H)==="[object RegExp]"}k.isRegExp=L;function A(H){return typeof H=="object"&&H!==null}k.isObject=A;function y(H){return A(H)&&I(H)==="[object Date]"}k.isDate=y;function E(H){return A(H)&&(I(H)==="[object Error]"||H instanceof Error)}k.isError=E;function b(H){return typeof H=="function"}k.isFunction=b;function _(H){return H===null||typeof H=="boolean"||typeof H=="number"||typeof H=="string"||typeof H=="symbol"||typeof H=="undefined"}k.isPrimitive=_,k.isBuffer=N("./support/isBuffer");function I(H){return Object.prototype.toString.call(H)}function j(H){return H<10?"0"+H.toString(10):H.toString(10)}var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function G(){var H=new Date,z=[j(H.getHours()),j(H.getMinutes()),j(H.getSeconds())].join(":");return[H.getDate(),M[H.getMonth()],z].join(" ")}k.log=function(){console.log("%s - %s",G(),k.format.apply(k,arguments))},k.inherits=N("inherits"),k._extend=function(H,z){if(!z||!A(z))return H;for(var B=Object.keys(z),W=B.length;W--;)H[B[W]]=z[B[W]];return H};function K(H,z){return Object.prototype.hasOwnProperty.call(H,z)}}).call(this,N("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(N,Y,k){"use strict";(function(){"use strict";k.stripBOM=function(P){return P[0]==="\uFEFF"?P.substring(1):P}}).call(void 0)},{}],245:[function(N,Y,k){"use strict";var P=N("babel-runtime/helpers/typeof"),u=h(P),C=N("babel-runtime/core-js/object/keys"),R=h(C);function h(s){return s&&s.__esModule?s:{default:s}}(function(){"use strict";var s,S,d,a,o,r={}.hasOwnProperty;s=N("xmlbuilder"),S=N("./defaults").defaults,a=function(g){return typeof g=="string"&&(g.indexOf("&")>=0||g.indexOf(">")>=0||g.indexOf("<")>=0)},o=function(g){return""},d=function(g){return g.replace("]]>","]]]]>")},k.Builder=function(){function x(g){var m,w,p;this.options={},w=S["0.2"];for(m in w){if(!r.call(w,m))continue;p=w[m],this.options[m]=p}for(m in g){if(!r.call(g,m))continue;p=g[m],this.options[m]=p}}return x.prototype.buildObject=function(g){var m,w,p,f,n;return m=this.options.attrkey,w=this.options.charkey,(0,R.default)(g).length===1&&this.options.rootName===S["0.2"].rootName?(n=(0,R.default)(g)[0],g=g[n]):n=this.options.rootName,p=function(l){return function(c,T){var v,i,L,A,y,E;if((typeof T=="undefined"?"undefined":(0,u.default)(T))!=="object")l.options.cdata&&a(T)?c.raw(o(T)):c.txt(T);else if(Array.isArray(T))for(A in T){if(!r.call(T,A))continue;i=T[A];for(y in i)L=i[y],c=p(c.ele(y),L).up()}else for(y in T){if(!r.call(T,y))continue;if(i=T[y],y===m){if((typeof i=="undefined"?"undefined":(0,u.default)(i))==="object")for(v in i)E=i[v],c=c.att(v,E)}else if(y===w)l.options.cdata&&a(i)?c=c.raw(o(i)):c=c.txt(i);else if(Array.isArray(i))for(A in i){if(!r.call(i,A))continue;L=i[A],typeof L=="string"?l.options.cdata&&a(L)?c=c.ele(y).raw(o(L)).up():c=c.ele(y,L).up():c=p(c.ele(y),L).up()}else(typeof i=="undefined"?"undefined":(0,u.default)(i))==="object"?c=p(c.ele(y),i).up():typeof i=="string"&&l.options.cdata&&a(i)?c=c.ele(y).raw(o(i)).up():(i==null&&(i=""),c=c.ele(y,i.toString()).up())}return c}}(this),f=s.create(n,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),p(f,g).end(this.options.renderOpts)},x}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(N,Y,k){"use strict";(function(){k.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(N,Y,k){"use strict";var P=N("babel-runtime/core-js/promise"),u=a(P),C=N("babel-runtime/core-js/object/get-own-property-names"),R=a(C),h=N("babel-runtime/core-js/object/keys"),s=a(h),S=N("babel-runtime/helpers/typeof"),d=a(S);function a(o){return o&&o.__esModule?o:{default:o}}(function(){"use strict";var o,r,x,g,m,w,p,f,n=function(v,i){return function(){return v.apply(i,arguments)}},l=function(v,i){for(var L in i)c.call(i,L)&&(v[L]=i[L]);function A(){this.constructor=v}return A.prototype=i.prototype,v.prototype=new A,v.__super__=i.prototype,v},c={}.hasOwnProperty;p=N("sax"),x=N("events"),o=N("./bom"),w=N("./processors"),f=N("timers").setImmediate,r=N("./defaults").defaults,g=function(v){return(typeof v=="undefined"?"undefined":(0,d.default)(v))==="object"&&v!=null&&(0,s.default)(v).length===0},m=function(v,i,L){var A,y,E;for(A=0,y=v.length;A0&&(j[E.options.childkey]=G),G=j;else if(z){z[E.options.childkey]=z[E.options.childkey]||[],K={};for(I in G){if(!c.call(G,I))continue;K[I]=G[I]}z[E.options.childkey].push(K),delete G["#name"],(0,s.default)(G).length===1&&L in G&&!E.EXPLICIT_CHARKEY&&(G=G[L])}}return y.length>0?E.assignOrPush(z,M,G):(E.options.explicitRoot&&(H=G,G={},G[M]=H),E.resultObject=G,E.saxParser.ended=!0,E.emit("end",E.resultObject))}}(this),A=function(E){return function(b){var _,I;if(I=y[y.length-1],I)return I[L]+=b,E.options.explicitChildren&&E.options.preserveChildrenOrder&&E.options.charsAsChildren&&(E.options.includeWhiteChars||b.replace(/\\n/g,"").trim()!=="")&&(I[E.options.childkey]=I[E.options.childkey]||[],_={"#name":"__text__"},_[L]=b,E.options.normalize&&(_[L]=_[L].replace(/\s{2,}/g," ").trim()),I[E.options.childkey].push(_)),I}}(this),this.saxParser.ontext=A,this.saxParser.oncdata=function(E){return function(b){var _;if(_=A(b),_)return _.cdata=!0}}(this)},v.prototype.parseString=function(i,L){var A;L!=null&&typeof L=="function"&&(this.on("end",function(y){return this.reset(),L(null,y)}),this.on("error",function(y){return this.reset(),L(y)}));try{return i=i.toString(),i.trim()===""?(this.emit("end",null),!0):(i=o.stripBOM(i),this.options.async?(this.remaining=i,f(this.processAsync),this.saxParser):this.saxParser.write(i).close())}catch(y){if(A=y,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw A}else return this.emit("error",A),this.saxParser.errThrown=!0}},v.prototype.parseStringPromise=function(i){return new u.default(function(L){return function(A,y){return L.parseString(i,function(E,b){return E?y(E):A(b)})}}(this))},v}(x),k.parseString=function(T,v,i){var L,A,y;return i!=null?(typeof i=="function"&&(L=i),(typeof v=="undefined"?"undefined":(0,d.default)(v))==="object"&&(A=v)):(typeof v=="function"&&(L=v),A={}),y=new k.Parser(A),y.parseString(T,L)},k.parseStringPromise=function(T,v){var i,L;return(typeof v=="undefined"?"undefined":(0,d.default)(v))==="object"&&(i=v),L=new k.Parser(i),L.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(N,Y,k){"use strict";(function(){"use strict";var P;P=new RegExp(/(?!xmlns)^.*:/),k.normalize=function(u){return u.toLowerCase()},k.firstCharLowerCase=function(u){return u.charAt(0).toLowerCase()+u.slice(1)},k.stripPrefix=function(u){return u.replace(P,"")},k.parseNumbers=function(u){return isNaN(u)||(u=u%1===0?parseInt(u,10):parseFloat(u)),u},k.parseBooleans=function(u){return/^(?:true|false)$/i.test(u)&&(u=u.toLowerCase()==="true"),u}}).call(void 0)},{}],249:[function(N,Y,k){"use strict";(function(){"use strict";var P,u,C,R,h=function(d,a){for(var o in a)s.call(a,o)&&(d[o]=a[o]);function r(){this.constructor=d}return r.prototype=a.prototype,d.prototype=new r,d.__super__=a.prototype,d},s={}.hasOwnProperty;u=N("./defaults"),P=N("./builder"),C=N("./parser"),R=N("./processors"),k.defaults=u.defaults,k.processors=R,k.ValidationError=function(S){h(d,S);function d(a){this.message=a}return d}(Error),k.Builder=P.Builder,k.Parser=C.Parser,k.parseString=C.parseString,k.parseStringPromise=C.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(N,Y,k){"use strict";(function(){Y.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(N,Y,k){"use strict";(function(){Y.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(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/get-prototype-of"),u=S(P),C=N("babel-runtime/helpers/typeof"),R=S(C),h=N("babel-runtime/core-js/object/assign"),s=S(h);function S(d){return d&&d.__esModule?d:{default:d}}(function(){var d,a,o,r,x,g,m,w=[].slice,p={}.hasOwnProperty;d=function(){var n,l,c,T,v,i;if(i=arguments[0],v=2<=arguments.length?w.call(arguments,1):[],x(s.default))s.default.apply(null,arguments);else for(n=0,c=v.length;n":"attribute: {"+d+"}, parent: <"+this.parent.name+">"},S.prototype.isEqualNode=function(d){return d.namespaceURI!==this.namespaceURI||(d.prefix!==this.prefix||d.localName!==this.localName)?!1:!(d.value!==this.value)},S}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/create"),u=C(P);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s,S=function(o,r){for(var x in r)d.call(r,x)&&(o[x]=r[x]);function g(){this.constructor=o}return g.prototype=r.prototype,o.prototype=new g,o.__super__=r.prototype,o},d={}.hasOwnProperty;R=N("./NodeType"),s=N("./XMLCharacterData"),Y.exports=h=function(a){S(o,a);function o(r,x){if(o.__super__.constructor.call(this,r),x==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=R.CData,this.value=this.stringify.cdata(x)}return o.prototype.clone=function(){return(0,u.default)(this)},o.prototype.toString=function(r){return this.options.writer.cdata(this,this.options.writer.filterOptions(r))},o}(s)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/create"),u=C(P);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s=function(a,o){for(var r in o)S.call(o,r)&&(a[r]=o[r]);function x(){this.constructor=a}return x.prototype=o.prototype,a.prototype=new x,a.__super__=o.prototype,a},S={}.hasOwnProperty;h=N("./XMLNode"),Y.exports=R=function(d){s(a,d);function a(o){a.__super__.constructor.call(this,o),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(o,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.appendData=function(o){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.insertData=function(o,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.deleteData=function(o,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.replaceData=function(o,r,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.isEqualNode=function(o){return a.__super__.isEqualNode.apply(this,arguments).isEqualNode(o)?!(o.data!==this.data):!1},a}(h)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/create"),u=C(P);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s,S=function(o,r){for(var x in r)d.call(r,x)&&(o[x]=r[x]);function g(){this.constructor=o}return g.prototype=r.prototype,o.prototype=new g,o.__super__=r.prototype,o},d={}.hasOwnProperty;R=N("./NodeType"),h=N("./XMLCharacterData"),Y.exports=s=function(a){S(o,a);function o(r,x){if(o.__super__.constructor.call(this,r),x==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=R.Comment,this.value=this.stringify.comment(x)}return o.prototype.clone=function(){return(0,u.default)(this)},o.prototype.toString=function(r){return this.options.writer.comment(this,this.options.writer.filterOptions(r))},o}(h)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/keys"),u=h(P),C=N("babel-runtime/core-js/object/create"),R=h(C);function h(s){return s&&s.__esModule?s:{default:s}}(function(){var s,S,d;S=N("./XMLDOMErrorHandler"),d=N("./XMLDOMStringList"),Y.exports=s=function(){function a(){var o;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new S,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=o=(0,R.default)(this.defaultParams)}return Object.defineProperty(a.prototype,"parameterNames",{get:function(){return new d((0,u.default)(this.defaultParams))}}),a.prototype.getParameter=function(o){return this.params.hasOwnProperty(o)?this.params[o]:null},a.prototype.canSetParameter=function(o,r){return!0},a.prototype.setParameter=function(o,r){return r!=null?this.params[o]=r:delete this.params[o]},a}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(N,Y,k){"use strict";(function(){var P;Y.exports=P=function(){function u(){}return u.prototype.handleError=function(C){throw new Error(C)},u}()}).call(void 0)},{}],260:[function(N,Y,k){"use strict";(function(){var P;Y.exports=P=function(){function u(){}return u.prototype.hasFeature=function(C,R){return!0},u.prototype.createDocumentType=function(C,R,h){throw new Error("This DOM method is not implemented.")},u.prototype.createDocument=function(C,R,h){throw new Error("This DOM method is not implemented.")},u.prototype.createHTMLDocument=function(C){throw new Error("This DOM method is not implemented.")},u.prototype.getFeature=function(C,R){throw new Error("This DOM method is not implemented.")},u}()}).call(void 0)},{}],261:[function(N,Y,k){"use strict";(function(){var P;Y.exports=P=function(){function u(C){this.arr=C||[]}return Object.defineProperty(u.prototype,"length",{get:function(){return this.arr.length}}),u.prototype.item=function(C){return this.arr[C]||null},u.prototype.contains=function(C){return this.arr.indexOf(C)!==-1},u}()}).call(void 0)},{}],262:[function(N,Y,k){"use strict";(function(){var P,u,C,R=function(S,d){for(var a in d)h.call(d,a)&&(S[a]=d[a]);function o(){this.constructor=S}return o.prototype=d.prototype,S.prototype=new o,S.__super__=d.prototype,S},h={}.hasOwnProperty;C=N("./XMLNode"),P=N("./NodeType"),Y.exports=u=function(s){R(S,s);function S(d,a,o,r,x,g){if(S.__super__.constructor.call(this,d),a==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(o==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(a));if(!r)throw new Error("Missing DTD attribute type. "+this.debugInfo(a));if(!x)throw new Error("Missing DTD attribute default. "+this.debugInfo(a));if(x.indexOf("#")!==0&&(x="#"+x),!x.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(a));if(g&&!x.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=P.AttributeDeclaration,this.attributeName=this.stringify.name(o),this.attributeType=this.stringify.dtdAttType(r),g&&(this.defaultValue=this.stringify.dtdAttDefault(g)),this.defaultValueType=x}return S.prototype.toString=function(d){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(d))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(N,Y,k){"use strict";(function(){var P,u,C,R=function(S,d){for(var a in d)h.call(d,a)&&(S[a]=d[a]);function o(){this.constructor=S}return o.prototype=d.prototype,S.prototype=new o,S.__super__=d.prototype,S},h={}.hasOwnProperty;C=N("./XMLNode"),P=N("./NodeType"),Y.exports=u=function(s){R(S,s);function S(d,a,o){if(S.__super__.constructor.call(this,d),a==null)throw new Error("Missing DTD element name. "+this.debugInfo());o||(o="(#PCDATA)"),Array.isArray(o)&&(o="("+o.join(",")+")"),this.name=this.stringify.name(a),this.type=P.ElementDeclaration,this.value=this.stringify.dtdElementValue(o)}return S.prototype.toString=function(d){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(d))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(N,Y,k){"use strict";(function(){var P,u,C,R,h=function(d,a){for(var o in a)s.call(a,o)&&(d[o]=a[o]);function r(){this.constructor=d}return r.prototype=a.prototype,d.prototype=new r,d.__super__=a.prototype,d},s={}.hasOwnProperty;R=N("./Utility").isObject,C=N("./XMLNode"),P=N("./NodeType"),Y.exports=u=function(S){h(d,S);function d(a,o,r,x){if(d.__super__.constructor.call(this,a),r==null)throw new Error("Missing DTD entity name. "+this.debugInfo(r));if(x==null)throw new Error("Missing DTD entity value. "+this.debugInfo(r));if(this.pe=!!o,this.name=this.stringify.name(r),this.type=P.EntityDeclaration,!R(x))this.value=this.stringify.dtdEntityValue(x),this.internal=!0;else{if(!x.pubID&&!x.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(r));if(x.pubID&&!x.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(r));if(this.internal=!1,x.pubID!=null&&(this.pubID=this.stringify.dtdPubID(x.pubID)),x.sysID!=null&&(this.sysID=this.stringify.dtdSysID(x.sysID)),x.nData!=null&&(this.nData=this.stringify.dtdNData(x.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(r))}}return Object.defineProperty(d.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(d.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(d.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(d.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(d.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(d.prototype,"xmlVersion",{get:function(){return null}}),d.prototype.toString=function(a){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(a))},d}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(N,Y,k){"use strict";(function(){var P,u,C,R=function(S,d){for(var a in d)h.call(d,a)&&(S[a]=d[a]);function o(){this.constructor=S}return o.prototype=d.prototype,S.prototype=new o,S.__super__=d.prototype,S},h={}.hasOwnProperty;C=N("./XMLNode"),P=N("./NodeType"),Y.exports=u=function(s){R(S,s);function S(d,a,o){if(S.__super__.constructor.call(this,d),a==null)throw new Error("Missing DTD notation name. "+this.debugInfo(a));if(!o.pubID&&!o.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=P.NotationDeclaration,o.pubID!=null&&(this.pubID=this.stringify.dtdPubID(o.pubID)),o.sysID!=null&&(this.sysID=this.stringify.dtdSysID(o.sysID))}return Object.defineProperty(S.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(S.prototype,"systemId",{get:function(){return this.sysID}}),S.prototype.toString=function(d){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(d))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(N,Y,k){"use strict";(function(){var P,u,C,R,h=function(d,a){for(var o in a)s.call(a,o)&&(d[o]=a[o]);function r(){this.constructor=d}return r.prototype=a.prototype,d.prototype=new r,d.__super__=a.prototype,d},s={}.hasOwnProperty;R=N("./Utility").isObject,C=N("./XMLNode"),P=N("./NodeType"),Y.exports=u=function(S){h(d,S);function d(a,o,r,x){var g;d.__super__.constructor.call(this,a),R(o)&&(g=o,o=g.version,r=g.encoding,x=g.standalone),o||(o="1.0"),this.type=P.Declaration,this.version=this.stringify.xmlVersion(o),r!=null&&(this.encoding=this.stringify.xmlEncoding(r)),x!=null&&(this.standalone=this.stringify.xmlStandalone(x))}return d.prototype.toString=function(a){return this.options.writer.declaration(this,this.options.writer.filterOptions(a))},d}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(N,Y,k){"use strict";(function(){var P,u,C,R,h,s,S,d,a,o=function(g,m){for(var w in m)r.call(m,w)&&(g[w]=m[w]);function p(){this.constructor=g}return p.prototype=m.prototype,g.prototype=new p,g.__super__=m.prototype,g},r={}.hasOwnProperty;a=N("./Utility").isObject,d=N("./XMLNode"),P=N("./NodeType"),u=N("./XMLDTDAttList"),R=N("./XMLDTDEntity"),C=N("./XMLDTDElement"),h=N("./XMLDTDNotation"),S=N("./XMLNamedNodeMap"),Y.exports=s=function(x){o(g,x);function g(m,w,p){var f,n,l,c,T,v;if(g.__super__.constructor.call(this,m),this.type=P.DocType,m.children){for(c=m.children,n=0,l=c.length;n=0;)this.up();return this.onEnd()},y.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},y.prototype.openNode=function(E){var b,_,I,j;if(!E.isOpen){if(!this.root&&this.currentLevel===0&&E.type===P.Element&&(this.root=E),_="",E.type===P.Element){this.writerOptions.state=u.OpenTag,_=this.writer.indent(E,this.writerOptions,this.currentLevel)+"<"+E.name,j=E.attribs;for(I in j){if(!A.call(j,I))continue;b=j[I],_+=this.writer.attribute(b,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}},y.prototype.closeNode=function(E){var b;if(!E.isClosed)return b="",this.writerOptions.state=u.CloseTag,E.type===P.Element?b=this.writer.indent(E,this.writerOptions,this.currentLevel)+""+this.writer.endline(E,this.writerOptions,this.currentLevel):b=this.writer.indent(E,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(E,this.writerOptions,this.currentLevel),this.writerOptions.state=u.None,this.onData(b,this.currentLevel),E.isClosed=!0},y.prototype.onData=function(E,b){return this.documentStarted=!0,this.onDataCallback(E,b+1)},y.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},y.prototype.debugInfo=function(E){return E==null?"":"node: <"+E+">"},y.prototype.ele=function(){return this.element.apply(this,arguments)},y.prototype.nod=function(E,b,_){return this.node(E,b,_)},y.prototype.txt=function(E){return this.text(E)},y.prototype.dat=function(E){return this.cdata(E)},y.prototype.com=function(E){return this.comment(E)},y.prototype.ins=function(E,b){return this.instruction(E,b)},y.prototype.dec=function(E,b,_){return this.declaration(E,b,_)},y.prototype.dtd=function(E,b,_){return this.doctype(E,b,_)},y.prototype.e=function(E,b,_){return this.element(E,b,_)},y.prototype.n=function(E,b,_){return this.node(E,b,_)},y.prototype.t=function(E){return this.text(E)},y.prototype.d=function(E){return this.cdata(E)},y.prototype.c=function(E){return this.comment(E)},y.prototype.r=function(E){return this.raw(E)},y.prototype.i=function(E,b){return this.instruction(E,b)},y.prototype.att=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},y.prototype.a=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},y.prototype.ent=function(E,b){return this.entity(E,b)},y.prototype.pent=function(E,b){return this.pEntity(E,b)},y.prototype.not=function(E,b){return this.notation(E,b)},y}()}).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(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/create"),u=C(P);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s,S=function(o,r){for(var x in r)d.call(r,x)&&(o[x]=r[x]);function g(){this.constructor=o}return g.prototype=r.prototype,o.prototype=new g,o.__super__=r.prototype,o},d={}.hasOwnProperty;s=N("./XMLNode"),R=N("./NodeType"),Y.exports=h=function(a){S(o,a);function o(r){o.__super__.constructor.call(this,r),this.type=R.Dummy}return o.prototype.clone=function(){return(0,u.default)(this)},o.prototype.toString=function(r){return""},o}(s)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/create"),u=C(P);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s,S,d,a,o,r,x,g=function(p,f){for(var n in f)m.call(f,n)&&(p[n]=f[n]);function l(){this.constructor=p}return l.prototype=f.prototype,p.prototype=new l,p.__super__=f.prototype,p},m={}.hasOwnProperty;x=N("./Utility"),r=x.isObject,o=x.isFunction,a=x.getValue,d=N("./XMLNode"),R=N("./NodeType"),h=N("./XMLAttribute"),S=N("./XMLNamedNodeMap"),Y.exports=s=function(w){g(p,w);function p(f,n,l){var c,T,v,i;if(p.__super__.constructor.call(this,f),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,l!=null&&this.attribute(l),f.type===R.Document&&(this.isRoot=!0,this.documentObject=f,f.rootObject=this,f.children)){for(i=f.children,T=0,v=i.length;T=c;n=0<=c?++l:--l)if(!this.attribs[n].isEqualNode(f.attribs[n]))return!1;return!0},p}(d)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(N,Y,k){"use strict";var P=N("babel-runtime/core-js/object/keys"),u=C(P);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R;Y.exports=R=function(){function h(s){this.nodes=s}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(s){return this.nodes[s]},h.prototype.setNamedItem=function(s){var S;return S=this.nodes[s.nodeName],this.nodes[s.nodeName]=s,S||null},h.prototype.removeNamedItem=function(s){var S;return S=this.nodes[s],delete this.nodes[s],S||null},h.prototype.item=function(s){return this.nodes[(0,u.default)(this.nodes)[s]]||null},h.prototype.getNamedItemNS=function(s,S){throw new Error("This DOM method is not implemented.")},h.prototype.setNamedItemNS=function(s){throw new Error("This DOM method is not implemented.")},h.prototype.removeNamedItemNS=function(s,S){throw new Error("This DOM method is not implemented.")},h}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(N,Y,k){"use strict";(function(){var P,u,C,R,h,s,S,d,a,o,r,x,g,m,w,p,f,n,l,c={}.hasOwnProperty;l=N("./Utility"),n=l.isObject,f=l.isFunction,p=l.isEmpty,w=l.getValue,d=null,C=null,R=null,h=null,s=null,g=null,m=null,x=null,S=null,u=null,r=null,a=null,P=null,Y.exports=o=function(){function T(v){this.parent=v,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,d||(d=N("./XMLElement"),C=N("./XMLCData"),R=N("./XMLComment"),h=N("./XMLDeclaration"),s=N("./XMLDocType"),g=N("./XMLRaw"),m=N("./XMLText"),x=N("./XMLProcessingInstruction"),S=N("./XMLDummy"),u=N("./NodeType"),r=N("./XMLNodeList"),a=N("./XMLNamedNodeMap"),P=N("./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 i;return i=this.parent.children.indexOf(this),this.parent.children[i-1]||null}}),Object.defineProperty(T.prototype,"nextSibling",{get:function(){var i;return i=this.parent.children.indexOf(this),this.parent.children[i+1]||null}}),Object.defineProperty(T.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(T.prototype,"textContent",{get:function(){var i,L,A,y,E;if(this.nodeType===u.Element||this.nodeType===u.DocumentFragment){for(E="",y=this.children,L=0,A=y.length;L":((L=this.parent)!=null?L.name:void 0)?"node: <"+v+">, parent: <"+this.parent.name+">":"node: <"+v+">"},T.prototype.ele=function(v,i,L){return this.element(v,i,L)},T.prototype.nod=function(v,i,L){return this.node(v,i,L)},T.prototype.txt=function(v){return this.text(v)},T.prototype.dat=function(v){return this.cdata(v)},T.prototype.com=function(v){return this.comment(v)},T.prototype.ins=function(v,i){return this.instruction(v,i)},T.prototype.doc=function(){return this.document()},T.prototype.dec=function(v,i,L){return this.declaration(v,i,L)},T.prototype.e=function(v,i,L){return this.element(v,i,L)},T.prototype.n=function(v,i,L){return this.node(v,i,L)},T.prototype.t=function(v){return this.text(v)},T.prototype.d=function(v){return this.cdata(v)},T.prototype.c=function(v){return this.comment(v)},T.prototype.r=function(v){return this.raw(v)},T.prototype.i=function(v,i){return this.instruction(v,i)},T.prototype.u=function(){return this.up()},T.prototype.importXMLBuilder=function(v){return this.importDocument(v)},T.prototype.replaceChild=function(v,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.removeChild=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.appendChild=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.hasChildNodes=function(){return this.children.length!==0},T.prototype.cloneNode=function(v){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(v,i){return!0},T.prototype.hasAttributes=function(){return this.attribs.length!==0},T.prototype.compareDocumentPosition=function(v){var i,L;return i=this,i===v?0:this.document()!==v.document()?(L=P.Disconnected|P.ImplementationSpecific,Math.random()<.5?L|=P.Preceding:L|=P.Following,L):i.isAncestor(v)?P.Contains|P.Preceding:i.isDescendant(v)?P.Contains|P.Following:i.isPreceding(v)?P.Preceding:P.Following},T.prototype.isSameNode=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.lookupPrefix=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isDefaultNamespace=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.lookupNamespaceURI=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.isEqualNode=function(v){var i,L,A;if(v.nodeType!==this.nodeType)return!1;if(v.children.length!==this.children.length)return!1;for(i=L=0,A=this.children.length-1;0<=A?L<=A:L>=A;i=0<=A?++L:--L)if(!this.children[i].isEqualNode(v.children[i]))return!1;return!0},T.prototype.getFeature=function(v,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.setUserData=function(v,i,L){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getUserData=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.contains=function(v){return v?v===this||this.isDescendant(v):!1},T.prototype.isDescendant=function(v){var i,L,A,y,E;for(E=this.children,A=0,y=E.length;AL},T.prototype.treePosition=function(v){var i,L;return L=0,i=!1,this.foreachTreeNode(this.document(),function(A){if(L++,!i&&A===v)return i=!0}),i?L:-1},T.prototype.foreachTreeNode=function(v,i){var L,A,y,E,b;for(v||(v=this.document()),E=v.children,A=0,y=E.length;A0){for(this.stream.write(" ["),this.stream.write(this.endline(a,o,r)),o.state=u.InsideTag,w=a.children,g=0,m=w.length;g"),this.stream.write(this.endline(a,o,r)),o.state=u.None,this.closeNode(a,o,r)},d.prototype.element=function(a,o,r){var x,g,m,w,p,f,n,l,c,T;r||(r=0),this.openNode(a,o,r),o.state=u.OpenTag,this.stream.write(this.indent(a,o,r)+"<"+a.name),c=a.attribs;for(n in c){if(!s.call(c,n))continue;x=c[n],this.attribute(x,o,r)}if(m=a.children.length,w=m===0?null:a.children[0],m===0||a.children.every(function(v){return(v.type===P.Text||v.type===P.Raw)&&v.value===""}))o.allowEmpty?(this.stream.write(">"),o.state=u.CloseTag,this.stream.write("")):(o.state=u.CloseTag,this.stream.write(o.spaceBeforeSlash+"/>"));else if(o.pretty&&m===1&&(w.type===P.Text||w.type===P.Raw)&&w.value!=null)this.stream.write(">"),o.state=u.InsideTag,o.suppressPrettyCount++,l=!0,this.writeChildNode(w,o,r+1),o.suppressPrettyCount--,l=!1,o.state=u.CloseTag,this.stream.write("");else{for(this.stream.write(">"+this.endline(a,o,r)),o.state=u.InsideTag,T=a.children,p=0,f=T.length;p")}return this.stream.write(this.endline(a,o,r)),o.state=u.None,this.closeNode(a,o,r)},d.prototype.processingInstruction=function(a,o,r){return this.stream.write(d.__super__.processingInstruction.call(this,a,o,r))},d.prototype.raw=function(a,o,r){return this.stream.write(d.__super__.raw.call(this,a,o,r))},d.prototype.text=function(a,o,r){return this.stream.write(d.__super__.text.call(this,a,o,r))},d.prototype.dtdAttList=function(a,o,r){return this.stream.write(d.__super__.dtdAttList.call(this,a,o,r))},d.prototype.dtdElement=function(a,o,r){return this.stream.write(d.__super__.dtdElement.call(this,a,o,r))},d.prototype.dtdEntity=function(a,o,r){return this.stream.write(d.__super__.dtdEntity.call(this,a,o,r))},d.prototype.dtdNotation=function(a,o,r){return this.stream.write(d.__super__.dtdNotation.call(this,a,o,r))},d}(R)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(N,Y,k){"use strict";(function(){var P,u,C=function(s,S){for(var d in S)R.call(S,d)&&(s[d]=S[d]);function a(){this.constructor=s}return a.prototype=S.prototype,s.prototype=new a,s.__super__=S.prototype,s},R={}.hasOwnProperty;u=N("./XMLWriterBase"),Y.exports=P=function(h){C(s,h);function s(S){s.__super__.constructor.call(this,S)}return s.prototype.document=function(S,d){var a,o,r,x,g;for(d=this.filterOptions(d),x="",g=S.children,o=0,r=g.length;o","]]]]>"),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 s,S;if(this.options.noValidation)return h;if(s="",this.options.version==="1.0"){if(s=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=h.match(s))throw new Error("Invalid character in string: "+h+" at index "+S.index)}else if(this.options.version==="1.1"&&(s=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=h.match(s)))throw new Error("Invalid character in string: "+h+" at index "+S.index);return h},R.prototype.assertLegalName=function(h){var s;if(this.options.noValidation)return h;if(this.assertLegalChar(h),s=/^([: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(s))throw new Error("Invalid character in name");return h},R.prototype.textEscape=function(h){var s;return this.options.noValidation?h:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,h.replace(s,"&").replace(//g,">").replace(/\r/g," "))},R.prototype.attEscape=function(h){var s;return this.options.noValidation?h:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,h.replace(s,"&").replace(/0)?new Array(i).join(T.indent):""},l.prototype.endline=function(c,T,v){return!T.pretty||T.suppressPrettyCount?"":T.newline},l.prototype.attribute=function(c,T,v){var i;return this.openAttribute(c,T,v),i=" "+c.name+'="'+c.value+'"',this.closeAttribute(c,T,v),i},l.prototype.cdata=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v)+""+this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.comment=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v)+""+this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.declaration=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v)+"",i+=this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.docType=function(c,T,v){var i,L,A,y,E;if(v||(v=0),this.openNode(c,T,v),T.state=u.OpenTag,y=this.indent(c,T,v),y+="0){for(y+=" [",y+=this.endline(c,T,v),T.state=u.InsideTag,E=c.children,L=0,A=E.length;L",y+=this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),y},l.prototype.element=function(c,T,v){var i,L,A,y,E,b,_,I,j,M,G,K,H,z;v||(v=0),M=!1,G="",this.openNode(c,T,v),T.state=u.OpenTag,G+=this.indent(c,T,v)+"<"+c.name,K=c.attribs;for(j in K){if(!n.call(K,j))continue;i=K[j],G+=this.attribute(i,T,v)}if(A=c.children.length,y=A===0?null:c.children[0],A===0||c.children.every(function(B){return(B.type===P.Text||B.type===P.Raw)&&B.value===""}))T.allowEmpty?(G+=">",T.state=u.CloseTag,G+=""+this.endline(c,T,v)):(T.state=u.CloseTag,G+=T.spaceBeforeSlash+"/>"+this.endline(c,T,v));else if(T.pretty&&A===1&&(y.type===P.Text||y.type===P.Raw)&&y.value!=null)G+=">",T.state=u.InsideTag,T.suppressPrettyCount++,M=!0,G+=this.writeChildNode(y,T,v+1),T.suppressPrettyCount--,M=!1,T.state=u.CloseTag,G+=""+this.endline(c,T,v);else{if(T.dontPrettyTextNodes){for(H=c.children,E=0,_=H.length;E<_;E++)if(L=H[E],(L.type===P.Text||L.type===P.Raw)&&L.value!=null){T.suppressPrettyCount++,M=!0;break}}for(G+=">"+this.endline(c,T,v),T.state=u.InsideTag,z=c.children,b=0,I=z.length;b",M&&T.suppressPrettyCount--,G+=this.endline(c,T,v),T.state=u.None}return this.closeNode(c,T,v),G},l.prototype.writeChildNode=function(c,T,v){switch(c.type){case P.CData:return this.cdata(c,T,v);case P.Comment:return this.comment(c,T,v);case P.Element:return this.element(c,T,v);case P.Raw:return this.raw(c,T,v);case P.Text:return this.text(c,T,v);case P.ProcessingInstruction:return this.processingInstruction(c,T,v);case P.Dummy:return"";case P.Declaration:return this.declaration(c,T,v);case P.DocType:return this.docType(c,T,v);case P.AttributeDeclaration:return this.dtdAttList(c,T,v);case P.ElementDeclaration:return this.dtdElement(c,T,v);case P.EntityDeclaration:return this.dtdEntity(c,T,v);case P.NotationDeclaration:return this.dtdNotation(c,T,v);default:throw new Error("Unknown XML node type: "+c.constructor.name)}},l.prototype.processingInstruction=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v)+"",i+=this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.raw=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v),T.state=u.InsideTag,i+=c.value,T.state=u.CloseTag,i+=this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.text=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v),T.state=u.InsideTag,i+=c.value,T.state=u.CloseTag,i+=this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.dtdAttList=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v)+""+this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.dtdElement=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v)+""+this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.dtdEntity=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v)+""+this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.dtdNotation=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v)+""+this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),i},l.prototype.openNode=function(c,T,v){},l.prototype.closeNode=function(c,T,v){},l.prototype.openAttribute=function(c,T,v){},l.prototype.closeAttribute=function(c,T,v){},l}()}).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(N,Y,k){"use strict";(function(){var P,u,C,R,h,s,S,d,a,o;o=N("./Utility"),d=o.assign,a=o.isFunction,C=N("./XMLDOMImplementation"),R=N("./XMLDocument"),h=N("./XMLDocumentCB"),S=N("./XMLStringWriter"),s=N("./XMLStreamWriter"),P=N("./NodeType"),u=N("./WriterState"),Y.exports.create=function(r,x,g,m){var w,p;if(r==null)throw new Error("Root element needs a name.");return m=d({},x,g,m),w=new R(m),p=w.element(r),m.headless||(w.declaration(m),(m.pubID!=null||m.sysID!=null)&&w.dtd(m)),p},Y.exports.begin=function(r,x,g){var m;return a(r)&&(m=[r,x],x=m[0],g=m[1],r={}),x?new h(r,x,g):new R(r)},Y.exports.stringWriter=function(r){return new S(r)},Y.exports.streamWriter=function(r,x){return new s(r,x)},Y.exports.implementation=new C,Y.exports.nodeType=P,Y.exports.writerState=u}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(N,Y,k){Y.exports=u;var P=Object.prototype.hasOwnProperty;function u(){for(var C={},R=0;Rh?r=o(r):r.length>5]|=128<>>9<<4)+14]=x;for(var g=1732584193,m=-271733879,w=-1732584194,p=271733878,f=0;f>16)+(x>>16)+(g>>16);return m<<16|g&65535}function o(r,x){return r<>>32-x}Y.exports=function(x){return P.hash(x,C,16)}},{"./helpers":285}],287:[function(N,Y,k){"use strict";var P=N("./helpers");function u(S,d){S[d>>5]|=128<<24-d%32,S[(d+64>>9<<4)+15]=d;for(var a=Array(80),o=1732584193,r=-271733879,x=-1732584194,g=271733878,m=-1009589776,w=0;w>16)+(d>>16)+(a>>16);return o<<16|a&65535}function s(S,d){return S<>>32-d}Y.exports=function(d){return P.hash(d,u,20,!0)}},{"./helpers":285}],288:[function(N,Y,k){"use strict";Y.exports=function(){return function(){}}},{}],289:[function(N,Y,k){(function(P){"use strict";var u=N("babel-runtime/helpers/typeof"),C=R(u);function R(o){return o&&o.__esModule?o:{default:o}}var h=N("stream"),s=h.Stream,S=N("../lib/common/utils/isArray"),d=S.isArray;Y.exports.string=function(r){return typeof r=="string"},Y.exports.array=d,Y.exports.buffer=P.isBuffer;function a(o){return o instanceof s}Y.exports.writableStream=function(r){return a(r)&&typeof r._write=="function"&&(0,C.default)(r._writableState)==="object"}}).call(this,{isBuffer:N("../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(N,Y,k){"use strict";k.encodeURIComponent=function(P){try{return encodeURIComponent(P)}catch(u){return P}},k.escape=N("escape-html"),k.timestamp=function(u){if(u){var C=u;return typeof C=="string"&&(C=Number(C)),String(u).length===10&&(C*=1e3),new Date(C)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(N,Y,k){(function(P,u){"use strict";var C=N("babel-runtime/core-js/json/stringify"),R=S(C),h=N("babel-runtime/helpers/typeof"),s=S(h);function S(T){return T&&T.__esModule?T:{default:T}}var d=N("util"),a=N("url"),o=N("http"),r=N("https"),x=N("debug")("urllib"),g=N("humanize-ms"),m,w=0,p=Math.pow(2,31)-10,f=/^https?:\/\//i;function n(T,v){return T===void 0?v:T}function l(T,v){return function(i,L,A){if(i)return v(i);T({data:L,status:A.statusCode,headers:A.headers,res:A})}}k.TIMEOUTS=[g("300s"),g("300s")];var c=["json","text"];k.request=function(v,i,L){return arguments.length===2&&typeof i=="function"&&(L=i,i=null),typeof L=="function"?k.requestWithCallback(v,i,L):(m||(m=N("any-promise")),new m(function(A,y){k.requestWithCallback(v,i,l(A,y))}))},k.requestWithCallback=function(v,i,L){if(!v||typeof v!="string"&&(typeof v=="undefined"?"undefined":(0,s.default)(v))!=="object"){var A=d.format("expect request url to be a string or a http request options, but got %j",v);throw new Error(A)}arguments.length===2&&typeof i=="function"&&(L=i,i=null),i=i||{},w>=p&&(w=0);var y=++w;i.requestUrls=i.requestUrls||[];var E={requestId:y,url:v,args:i,ctx:i.ctx};i.emitter&&i.emitter.emit("request",E),i.timeout=i.timeout||k.TIMEOUTS,i.maxRedirects=i.maxRedirects||10,i.streaming=i.streaming||i.customResponse;var b=Date.now(),_;typeof v=="string"?(f.test(v)||(v="http://"+v),_=a.parse(v)):_=v;var I=(i.type||i.method||_.method||"GET").toUpperCase(),j=_.port||80,M=o,G=n(i.agent,k.agent),K=i.fixJSONCtlChars;_.protocol==="https:"&&(M=r,G=n(i.httpsAgent,k.httpsAgent),_.port||(j=443));var H={host:_.hostname||_.host||"localhost",path:_.path||"/",method:I,port:j,agent:G,headers:i.headers||{},lookup:i.lookup};Array.isArray(i.timeout)?H.requestTimeout=i.timeout[i.timeout.length-1]:typeof i.timeout!="undefined"&&(H.requestTimeout=i.timeout);for(var z=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],B=0;B=0)return x("Request#%d %s: got digest auth header WWW-Authenticate: %s",y,v,_e),i.headers=i.headers||{},i.headers.Authorization=digestAuthHeader(H.method,H.path,_e,i.digestAuth),x("Request#%d %s: auth with digest header: %s",y,v,i.headers.Authorization),tt.headers["set-cookie"]&&(i.headers.Cookie=tt.headers["set-cookie"].join(";")),k.requestWithCallback(v,i,He)}var Se=Date.now()-b;ae&&(ae.contentDownload=Se),x("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Se,re,be,H.method,H.host,H.path,se,ae);var Oe={status:be,statusCode:be,headers:Je,size:re,aborted:q,rt:Se,keepAliveSocket:se,data:Ve,requestUrls:i.requestUrls,timing:ae,remoteAddress:ne,remotePort:Te};if(Ce){var de="";G&&typeof G.getCurrentStatus=="function"&&(de=", agent status: "+(0,R.default)(G.getCurrentStatus())),Ce.message+=", "+H.method+" "+v+" "+be+" (connected: "+ie+", keepalive socket: "+se+de+`) headers: `+(0,R.default)(Je),Ce.data=Ve,Ce.path=H.path,Ce.status=be,Ce.headers=Je,Ce.res=Oe}He(Ce,Ve,i.streaming?tt:Oe),i.emitter&&(E.url=v,E.socket=et&&et.connection,E.options=H,E.size=ve,i.emitter.emit("response",{requestId:y,error:Ce,ctx:i.ctx,req:E,res:Oe}))}function pe(Ce){var Ve=null;if(i.followRedirect&&statuses.redirect[Ce.statusCode]){i._followRedirectCount=(i._followRedirectCount||0)+1;var tt=Ce.headers.location;if(!tt)Ve=new Error("Got statusCode "+Ce.statusCode+" but cannot resolve next location from headers"),Ve.name="FollowRedirectError";else if(i._followRedirectCount>i.maxRedirects)Ve=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+v),Ve.name="MaxRedirectError";else{var He=i.formatRedirectUrl?i.formatRedirectUrl(v,tt):a.resolve(v,tt);x("Request#%d %s: `redirected` from %s to %s",y,H.path,v,He),X(),i.headers&&i.headers.Host&&f.test(tt)&&(i.headers.Host=null);var Je=L;return L=null,k.requestWithCallback(He,i,Je),{redirect:!0,error:null}}}return{redirect:!1,error:Ve}}!H.headers["User-Agent"]&&!H.headers["user-agent"]&&(H.headers["User-Agent"]=navigator.userAgent),i.gzip&&(!H.headers["Accept-Encoding"]&&!H.headers["accept-encoding"]&&(H.headers["Accept-Encoding"]="gzip"));function ce(Ce,Ve,tt){var He=Ce.headers["content-encoding"];return tt(null,Ve,He)}var we=i.writeStream;x("Request#%d %s %s with headers %j, options.path: %s",y,I,v,H.headers,H.path),i.requestUrls.push(v);function ze(Ce){if(ae&&(ae.waiting=Date.now()-b),x("Request#%d %s `req response` event emit: status %d, headers: %j",y,v,Ce.statusCode,Ce.headers),i.streaming){var Ve=pe(Ce);if(Ve.redirect){Ce.resume();return}return Ve.error?(Ce.resume(),Q(Ve.error,null,Ce)):Q(null,null,Ce)}if(Ce.on("close",function(){x("Request#%d %s: `res close` event emit, total size %d",y,v,re)}),Ce.on("error",function(){x("Request#%d %s: `res error` event emit, total size %d",y,v,re)}),Ce.on("aborted",function(){q=!0,x("Request#%d %s: `res aborted` event emit, total size %d",y,v,re)}),we){var Ve=pe(Ce);if(Ve.redirect){Ce.resume();return}return Ve.error?(Ce.resume(),we.end(),Q(Ve.error,null,Ce)):(i.consumeWriteStream===!1?Ce.on("end",Q.bind(null,null,null,Ce)):isNode010||isNode012?first([[we,"close"],[Ce,"aborted"]],function(Je,_e,Se){x("Request#%d %s: writeStream or res %s event emitted",y,v,Se),Q(xe||null,null,Ce)}):we.on("close",function(){x("Request#%d %s: writeStream close event emitted",y,v),Q(xe||null,null,Ce)}),Ce.pipe(we))}var tt=[];Ce.on("data",function(He){x("Request#%d %s: `res data` event emit, size %d",y,v,He.length),re+=He.length,tt.push(He)}),Ce.on("end",function(){var He=u.concat(tt,re);if(x("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",y,v,re,Ce._dumped),xe)return Q(xe,He,Ce);var Je=pe(Ce);if(Je.error)return Q(Je.error,He,Ce);if(Je.redirect)return;ce(Ce,He,function(_e,Se,Oe){if(_e)return Q(_e,He,Ce);if(!Oe&&c.indexOf(i.dataType)>=0){try{Se=decodeBodyByCharset(Se,Ce)}catch(ye){return x("decodeBodyByCharset error: %s",ye),Q(null,Se,Ce)}if(i.dataType==="json")if(re===0)Se=null;else{var de=parseJSON(Se,K);de.error?_e=de.error:Se=de.data}}q&&x("Request#%d %s: Remote socket was terminated before `response.end()` was called",y,v),Q(_e,Se,Ce)})})}var Ge,Qe;Array.isArray(i.timeout)?(Ge=g(i.timeout[0]),Qe=g(i.timeout[1])):Ge=Qe=g(i.timeout),x("ConnectTimeout: %d, ResponseTimeout: %d",Ge,Qe);function $e(){x("Connect timer ticking, timeout: %d",Ge),le=setTimeout(function(){le=null,be===-1&&(be=-2);var Ce="Connect timeout for "+Ge+"ms",Ve="ConnectionTimeoutError";et.socket||(Ve="SocketAssignTimeoutError",Ce+=", working sockets is full"),xe=new Error(Ce),xe.name=Ve,xe.requestId=y,x("ConnectTimeout: Request#%d %s %s: %s, connected: %s",y,v,xe.name,Ce,ie),Me()},Ge)}function rt(){x("Response timer ticking, timeout: %d",Qe),Re=setTimeout(function(){Re=null;var Ce="Response timeout for "+Qe+"ms",Ve="ResponseTimeoutError";xe=new Error(Ce),xe.name=Ve,xe.requestId=y,x("ResponseTimeout: Request#%d %s %s: %s, connected: %s",y,v,xe.name,Ce,ie),Me()},Qe)}var et;H.mode=i.mode?i.mode:"";try{et=M.request(H,ze)}catch(Ce){return Q(Ce)}typeof window=="undefined"?$e():et.on("requestTimeout",function(){be===-1&&(be=-2);var Ce="Connect timeout for "+Ge+"ms",Ve="ConnectionTimeoutError";xe=new Error(Ce),xe.name=Ve,xe.requestId=y,Me()});function Me(){x("Request#%d %s abort, connected: %s",y,v,ie),et.socket||(xe.noSocket=!0,Q(xe)),et.abort()}return ae&&et.on("finish",function(){ae.requestSent=Date.now()-b}),et.once("socket",function(Ce){ae&&(ae.queuing=Date.now()-b),isNode010&&Ce.socket&&(Ce=Ce.socket);var Ve=Ce.readyState;if(Ve==="opening"){Ce.once("lookup",function(tt,He,Je){x("Request#%d %s lookup: %s, %s, %s",y,v,tt,He,Je),ae&&(ae.dnslookup=Date.now()-b),He&&(ne=He)}),Ce.once("connect",function(){ae&&(ae.connected=Date.now()-b),J(),rt(),x("Request#%d %s new socket connected",y,v),ie=!0,ne||(ne=Ce.remoteAddress),Te=Ce.remotePort});return}x("Request#%d %s reuse socket connected, readyState: %s",y,v,Ve),ie=!0,se=!0,ne||(ne=Ce.remoteAddress),Te=Ce.remotePort,J(),rt()}),et.on("error",function(Ce){(Ce.name==="Error"||Ce.name==="TypeError")&&(Ce.name=ie?"ResponseError":"RequestError"),Ce.message+=' (req "error")',x("Request#%d %s `req error` event emit, %s: %s",y,v,Ce.name,Ce.message),Q(xe||Ce)}),we&&we.once("error",function(Ce){Ce.message+=' (writeStream "error")',xe=Ce,x("Request#%d %s `writeStream error` event emit, %s: %s",y,v,Ce.name,Ce.message),Me()}),i.stream?(i.stream.pipe(et),i.stream.once("error",function(Ce){Ce.message+=' (stream "error")',xe=Ce,x("Request#%d %s `readStream error` event emit, %s: %s",y,v,Ce.name,Ce.message),Me()})):et.end($),et.requestId=y,et}}).call(this,N("_process"),N("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(N,Y,k){"use strict";k.d(Y,"a",function(){return d});var P=k("q1tI"),u=k("biw7"),C=k("fyJ8");function R(a){var o=a.className,r=a.index,x=a.children,g=a.colSpan,m=a.rowSpan,w=P.useContext(u.a),p=w.prefixCls,f=w.fixedInfoList,n=f[r];return P.createElement(C.a,Object.assign({className:o,index:r,component:"td",prefixCls:p,record:null,dataIndex:null,render:function(){return{children:x,props:{colSpan:g,rowSpan:m}}}},n))}function h(a){return P.createElement("tr",Object.assign({},a))}function s(a){var o=a.children,r=P.useContext(u.a),x=r.prefixCls;return P.createElement("tfoot",{className:"".concat(x,"-summary")},o)}var S=Y.b=s,d={Cell:R,Row:h}},nj2k:function(N,Y,k){N.exports=k.p+"static/nodata.c3b0b86c.svg"},oRuE:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return P.pad.Iso10126={pad:function(u,C){var R=C*4,h=R-u.sigBytes%R;u.concat(P.lib.WordArray.random(h-1)).concat(P.lib.WordArray.create([h<<24],1))},unpad:function(u){var C=u.words[u.sigBytes-1>>>2]&255;u.sigBytes-=C}},P.pad.Iso10126})},osHv:function(N,Y,k){(function(P){P(k("VrN/"))})(function(P){"use strict";var u=P.Pos;function C(f,n){return f.line-n.line||f.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",s=new RegExp("<(/?)(["+R+"]["+h+"]*)","g");function S(f,n,l,c){this.line=n,this.ch=l,this.cm=f,this.text=f.getLine(n),this.min=c?Math.max(c.from,f.firstLine()):f.firstLine(),this.max=c?Math.min(c.to-1,f.lastLine()):f.lastLine()}function d(f,n){var l=f.cm.getTokenTypeAt(u(f.line,n));return l&&/\btag\b/.test(l)}function a(f){return f.line>=f.max?void 0:(f.ch=0,f.text=f.cm.getLine(++f.line),!0)}function o(f){return f.line<=f.min?void 0:(f.text=f.cm.getLine(--f.line),f.ch=f.text.length,!0)}function r(f){for(;;){var n=f.text.indexOf(">",f.ch);if(n==-1){if(a(f))continue;return}if(!d(f,n+1)){f.ch=n+1;continue}var l=f.text.lastIndexOf("/",n),c=l>-1&&!/\S/.test(f.text.slice(l+1,n));return f.ch=n+1,c?"selfClose":"regular"}}function x(f){for(;;){var n=f.ch?f.text.lastIndexOf("<",f.ch-1):-1;if(n==-1){if(o(f))continue;return}if(!d(f,n+1)){f.ch=n;continue}s.lastIndex=n,f.ch=n;var l=s.exec(f.text);if(l&&l.index==n)return l}}function g(f){for(;;){s.lastIndex=f.ch;var n=s.exec(f.text);if(!n){if(a(f))continue;return}if(!d(f,n.index+1)){f.ch=n.index+1;continue}return f.ch=n.index+n[0].length,n}}function m(f){for(;;){var n=f.ch?f.text.lastIndexOf(">",f.ch-1):-1;if(n==-1){if(o(f))continue;return}if(!d(f,n+1)){f.ch=n;continue}var l=f.text.lastIndexOf("/",n),c=l>-1&&!/\S/.test(f.text.slice(l+1,n));return f.ch=n+1,c?"selfClose":"regular"}}function w(f,n){for(var l=[];;){var c=g(f),T,v=f.line,i=f.ch-(c?c[0].length:0);if(!c||!(T=r(f)))return;if(T=="selfClose")continue;if(c[1]){for(var L=l.length-1;L>=0;--L)if(l[L]==c[2]){l.length=L;break}if(L<0&&(!n||n==c[2]))return{tag:c[2],from:u(v,i),to:u(f.line,f.ch)}}else l.push(c[2])}}function p(f,n){for(var l=[];;){var c=m(f);if(!c)return;if(c=="selfClose"){x(f);continue}var T=f.line,v=f.ch,i=x(f);if(!i)return;if(i[1])l.push(i[2]);else{for(var L=l.length-1;L>=0;--L)if(l[L]==i[2]){l.length=L;break}if(L<0&&(!n||n==i[2]))return{tag:i[2],from:u(f.line,f.ch),to:u(T,v)}}}}P.registerHelper("fold","xml",function(f,n){for(var l=new S(f,n.line,0);;){var c=g(l);if(!c||l.line!=n.line)return;var T=r(l);if(!T)return;if(!c[1]&&T!="selfClose"){var v=u(l.line,l.ch),i=w(l,c[2]);return i&&C(i.from,v)>0?{from:v,to:i.from}:null}}}),P.findMatchingTag=function(f,n,l){var c=new S(f,n.line,n.ch,l);if(c.text.indexOf(">")==-1&&c.text.indexOf("<")==-1)return;var T=r(c),v=T&&u(c.line,c.ch),i=T&&x(c);if(!T||!i||C(c,n)>0)return;var L={from:u(c.line,c.ch),to:v,tag:i[2]};return T=="selfClose"?{open:L,close:null,at:"open"}:i[1]?{open:p(c,i[2]),close:L,at:"close"}:(c=new S(f,v.line,v.ch,l),{open:L,close:w(c,i[2]),at:"open"})},P.findEnclosingTag=function(f,n,l,c){for(var T=new S(f,n.line,n.ch,l);;){var v=p(T,c);if(!v)break;var i=new S(f,n.line,n.ch,l),L=w(i,v.tag);if(L)return{open:v,close:L}}},P.scanForClosingTag=function(f,n,l,c){var T=new S(f,n.line,n.ch,c?{from:0,to:c}:null);return w(T,l)}})},p5ED:function(N,Y,k){"use strict";var P=k("+L6B"),u=k("2/Rp"),C=k("5Dmo"),R=k("3S7+"),h=k("k1fw"),s=k("tJVT"),S=k("q1tI"),d=k.n(S),a=k("vHTk"),o=k.n(a),r=k("yEEn"),x=k("ZW9T"),g=k("1vsH");Y.a=function(m){var w=m.name,p=m.data,f=m.theme,n=m.type,l=m.filename,c=m.monacoEditor,T=m.className,v=m.style,i=m.close,L=m.onClose,A=m.hasMask,y=Object(S.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),E=Object(s.a)(y,2),b=E[0],_=E[1],I=Object(S.useState)(""),j=Object(s.a)(I,2),M=j[0],G=j[1],K=Object(S.useRef)();l&&(c.filename=l),Object(S.useEffect)(function(){var B,W,F=(B=document.cookie)===null||B===void 0||((W=B.replace(/\s/g,""))===null||W===void 0)?void 0:W.split(";");F==null||F.map(function($){var ee=$.split("=");ee[0]==="_educoder_session"&&G(ee[1])})},[]);var H=function(){if(p.startsWith("http")||p.startsWith("/")){z();return}Object(g.x)(l||"educoder",p,l)},z=function(){Object(g.v)(l||w,p)};return console.log("data:",p,"fileanme:",l," name:",w),d.a.createElement("div",{style:Object(h.a)({},v||{}),className:"".concat(A&&o.a.bgBlack," ").concat(n?o.a.wrp:"hide")},i&&d.a.createElement("div",{className:o.a.close,ref:K},d.a.createElement(R.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return K.current}},d.a.createElement("span",{onClick:z},d.a.createElement("i",{className:"icon-quxiaozhiding"}))),d.a.createElement(R.a,{title:"\u5173\u95ED",getPopupContainer:function(){return K.current}},d.a.createElement("span",{className:"",onClick:L},d.a.createElement("i",{className:"icon-guanbi1"})))),d.a.createElement("div",{className:"".concat(o.a[T]," ").concat(T," ").concat(o.a.monaco," ").concat(n==="txt"?"show":"hide")},n==="txt"&&d.a.createElement(x.b,c)),n==="audio"&&d.a.createElement("audio",{src:"".concat(p!=null&&p.startsWith("/")||(p==null?void 0:p.indexOf("https://"))>-1?p:"data:audio/mp3;base64,").concat(p),autoPlay:!0}),n==="video"&&d.a.createElement(d.a.Fragment,null,p!=null&&p.startsWith("/")?d.a.createElement("video",{controls:!0,src:"".concat(p),autoPlay:!0}):d.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(p),autoPlay:!0})),n==="pdf"&&d.a.createElement("embed",{className:o.a.embed,src:p}),n==="image"&&d.a.createElement(d.a.Fragment,null,d.a.createElement("img",{src:"".concat(p!=null&&p.startsWith("/")||(p==null?void 0:p.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(p)})),n==="other"&&d.a.createElement("div",null,d.a.createElement(u.a,{type:"primary",size:"large",onClick:H},d.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(n==="download"||n==="office")&&d.a.createElement(u.a,{type:"primary",size:"large",onClick:H},d.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(N,Y,k){},pA7S:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.WordArray,h=C.BlockCipher,s=u.algo,S=[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],d=[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],o=[{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],x=s.DES=h.extend({_doReset:function(){for(var p=this._key,f=p.words,n=[],l=0;l<56;l++){var c=S[l]-1;n[l]=f[c>>>5]>>>31-c%32&1}for(var T=this._subKeys=[],v=0;v<16;v++){for(var i=T[v]=[],L=a[v],l=0;l<24;l++)i[l/6|0]|=n[(d[l]-1+L)%28]<<31-l%6,i[4+(l/6|0)]|=n[28+(d[l+24]-1+L)%28]<<31-l%6;i[0]=i[0]<<1|i[0]>>>31;for(var l=1;l<7;l++)i[l]=i[l]>>>(l-1)*4+3;i[7]=i[7]<<5|i[7]>>>27}for(var A=this._invSubKeys=[],l=0;l<16;l++)A[l]=T[15-l]},encryptBlock:function(p,f){this._doCryptBlock(p,f,this._subKeys)},decryptBlock:function(p,f){this._doCryptBlock(p,f,this._invSubKeys)},_doCryptBlock:function(p,f,n){this._lBlock=p[f],this._rBlock=p[f+1],g.call(this,4,252645135),g.call(this,16,65535),m.call(this,2,858993459),m.call(this,8,16711935),g.call(this,1,1431655765);for(var l=0;l<16;l++){for(var c=n[l],T=this._lBlock,v=this._rBlock,i=0,L=0;L<8;L++)i|=o[L][((v^c[L])&r[L])>>>0];this._lBlock=v,this._rBlock=T^i}var A=this._lBlock;this._lBlock=this._rBlock,this._rBlock=A,g.call(this,1,1431655765),m.call(this,8,16711935),m.call(this,2,858993459),g.call(this,16,65535),g.call(this,4,252645135),p[f]=this._lBlock,p[f+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function g(p,f){var n=(this._lBlock>>>p^this._rBlock)&f;this._rBlock^=n,this._lBlock^=n<>>p^this._lBlock)&f;this._lBlock^=n,this._rBlock^=n<192.");var n=f.slice(0,2),l=f.length<4?f.slice(0,2):f.slice(2,4),c=f.length<6?f.slice(0,2):f.slice(4,6);this._des1=x.createEncryptor(R.create(n)),this._des2=x.createEncryptor(R.create(l)),this._des3=x.createEncryptor(R.create(c))},encryptBlock:function(p,f){this._des1.encryptBlock(p,f),this._des2.decryptBlock(p,f),this._des3.encryptBlock(p,f)},decryptBlock:function(p,f){this._des3.decryptBlock(p,f),this._des2.encryptBlock(p,f),this._des1.decryptBlock(p,f)},keySize:192/32,ivSize:64/32,blockSize:64/32});u.TripleDES=h._createHelper(w)}(),P.TripleDES})},qBft:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return P.pad.AnsiX923={pad:function(u,C){var R=u.sigBytes,h=C*4,s=h-R%h,S=R+s-1;u.clamp(),u.words[S>>>2]|=s<<24-S%4*8,u.sigBytes+=s},unpad:function(u){var C=u.words[u.sigBytes-1>>>2]&255;u.sigBytes-=C}},P.pad.Ansix923})},qM6L:function(N,Y,k){(function(P,u){N.exports=Y=u(k("Ib8C"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.WordArray,h=u.enc,s=h.Utf16=h.Utf16BE={stringify:function(d){for(var a=d.words,o=d.sigBytes,r=[],x=0;x>>2]>>>16-x%4*8&65535;r.push(String.fromCharCode(g))}return r.join("")},parse:function(d){for(var a=d.length,o=[],r=0;r>>1]|=d.charCodeAt(r)<<16-r%2*16;return R.create(o,a*2)}};h.Utf16LE={stringify:function(d){for(var a=d.words,o=d.sigBytes,r=[],x=0;x>>2]>>>16-x%4*8&65535);r.push(String.fromCharCode(g))}return r.join("")},parse:function(d){for(var a=d.length,o=[],r=0;r>>1]|=S(d.charCodeAt(r)<<16-r%2*16);return R.create(o,a*2)}};function S(d){return d<<8&4278255360|d>>>8&16711935}}(),P.enc.Utf16})},qu8F:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){/** @preserve * Counter block mode compatible with Dr Brian Gladman fileenc.c * derived from CryptoJS.mode.CTR * Jan Hruby jhruby.web@gmail.com */return P.mode.CTRGladman=function(){var u=P.lib.BlockCipherMode.extend();function C(s){if((s>>24&255)===255){var S=s>>16&255,d=s>>8&255,a=s&255;S===255?(S=0,d===255?(d=0,a===255?a=0:++a):++d):++S,s=0,s+=S<<16,s+=d<<8,s+=a}else s+=1<<24;return s}function R(s){return(s[0]=C(s[0]))===0&&(s[1]=C(s[1])),s}var h=u.Encryptor=u.extend({processBlock:function(s,S){var d=this._cipher,a=d.blockSize,o=this._iv,r=this._counter;o&&(r=this._counter=o.slice(0),this._iv=void 0),R(r);var x=r.slice(0);d.encryptBlock(x,0);for(var g=0;g=C.length?{done:!0}:{done:!1,value:C[s++]}},e:function(x){throw x},f:S}}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 d=!0,a=!1,o;return{s:function(){h=C[Symbol.iterator]()},n:function(){var x=h.next();return d=x.done,x},e:function(x){a=!0,o=x},f:function(){try{!d&&h.return!=null&&h.return()}finally{if(a)throw o}}}}},rUJ1:function(N,Y){const k=/[&<>"']/,P=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,C=/[<>"']|&(?!#?\w+;)/g,R={"&":"&","<":"<",">":">",'"':""","'":"'"},h=A=>R[A];function s(A,y){if(y){if(k.test(A))return A.replace(P,h)}else if(u.test(A))return A.replace(C,h);return A}const S=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function d(A){return A.replace(S,(y,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 o(A,y){A=A.source||A,y=y||"";const E={replace:(b,_)=>(_=_.source||_,_=_.replace(a,"$1"),A=A.replace(b,_),E),getRegex:()=>new RegExp(A,y)};return E}const r=/[^\w:]/g,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function g(A,y,E){if(A){let b;try{b=decodeURIComponent(d(E)).replace(r,"").toLowerCase()}catch(_){return null}if(b.indexOf("javascript:")===0||b.indexOf("vbscript:")===0||b.indexOf("data:")===0)return null}y&&!x.test(E)&&(E=n(y,E));try{E=encodeURI(E).replace(/%25/g,"%")}catch(b){return null}return E}const m={},w=/^[^:]+:\/*[^/]*$/,p=/^([^:]+:)[\s\S]*$/,f=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(A,y){m[" "+A]||(w.test(A)?m[" "+A]=A+"/":m[" "+A]=v(A,"/",!0)),A=m[" "+A];const E=A.indexOf(":")===-1;return y.substring(0,2)==="//"?E?y:A.replace(p,"$1")+y:y.charAt(0)==="/"?E?y:A.replace(f,"$1")+y:A+y}const l={exec:function(){}};function c(A){let y=1,E,b;for(;y{let G=!1,K=j;for(;--K>=0&&M[K]==="\\";)G=!G;return G?"|":" |"}),b=E.split(/ \|/);let _=0;if(b.length>y)b.splice(y);else for(;b.length0&&(_t.children=[],be(Pt,_t.children))})}function q(pt,Tt){for(var ht=[],Tr=0;Tr0){ht[0]=Pt.id;for(var _t=0;_t0&&kt[0]!==void 0?kt[0]:"",cn(!0),hr.next=4,Object(pe.a)("/api/tag_disciplines.json",{method:"get",params:{target:ht,search:zr}});case 4:Gt=hr.sent,an(Gt.tag_disciplines||[]),cn(!1);case 7:case"end":return hr.stop()}},Jt)}));return function(){return on.apply(this,arguments)}}(),Cn=function(Jt){var zr=Jt.name;z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:Z.a.createElement("div",null,Z.a.createElement(W.a,{defaultValue:zr,placeholder:"\u8BF7\u8F93\u5165".concat(vn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20,onChange:function(kt){zr=kt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Gt=Object(b.a)($.a.mark(function Qt(){var hr;return $.a.wrap(function(Jr){for(;;)switch(Jr.prev=Jr.next){case 0:if(zr){Jr.next=3;break}return E.b.warn("\u9898\u76EE".concat(vn,"\u4E0D\u80FD\u4E3A\u7A7A")),Jr.abrupt("return",Promise.reject());case 3:return Jr.next=5,Object(pe.a)("/api/tag_disciplines/".concat(Jt.id,"/rename.json"),{method:"post",body:{id:Jt.id,name:zr}});case 5:hr=Jr.sent,(hr==null?void 0:hr.status)===0&&ta();case 7:case"end":return Jr.stop()}},Qt)}));function kt(){return Gt.apply(this,arguments)}return kt}()})},Sr=function(Jt){z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:ht==="practice"?Z.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",Z.a.createElement("span",{className:"c-light-primary"},Jt.name),"\u201D\u5220\u9664\u5417\uFF1F",Z.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):Z.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",Z.a.createElement("span",{className:"c-light-primary"},Jt.name),"\u201D\u5220\u9664\u5417\uFF1F",Z.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 zr=Object(b.a)($.a.mark(function kt(){var Qt;return $.a.wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:return Ir.next=2,Object(pe.a)("/api/tag_disciplines/".concat(Jt.id,".json"),{method:"delete",body:{id:Jt.id}});case 2:Qt=Ir.sent,(Qt==null?void 0:Qt.status)===0&&ta();case 4:case"end":return Ir.stop()}},kt)}));function Gt(){return zr.apply(this,arguments)}return Gt}()})},Ln=function(Jt){ta(Jt)},vn=ht==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return Z.a.createElement(z.a,{afterClose:function(){lt(!1),cn(!1),sr(""),jr("1"),an([])},centered:!0,keyboard:!1,width:600,title:"".concat(vn,"\u7BA1\u7406"),visible:!!ht,className:dt.a.customModal,footer:null,onCancel:Rr},Z.a.createElement("section",{className:dt.a.wrap},Z.a.createElement(Xe.a,{activeKey:dn,onChange:function(Jt){sr(""),jr(Jt),ta()}},Z.a.createElement(Xe.a.TabPane,{tab:"\u65B0\u589E".concat(vn),key:"1"},Z.a.createElement(W.a,{value:Fr,onChange:function(Jt){return sr(Jt.target.value)},className:dt.a.in,placeholder:"\u8F93\u5165".concat(vn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20}),Z.a.createElement("div",{className:dt.a.btns},Z.a.createElement(T.a,{onClick:Rr,className:"mr20"},"\u53D6\u6D88 "),Z.a.createElement(T.a,{loading:Ot,onClick:ea,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),Z.a.createElement(Xe.a.TabPane,{tab:"\u5DF2\u6709".concat(vn),key:"2"},Z.a.createElement(W.a.Search,{allowClear:!0,onSearch:Ln,value:Fr,onChange:function(Jt){return sr(Jt.target.value)},className:dt.a.in,placeholder:"\u8F93\u5165".concat(vn,"\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2")}),Z.a.createElement(l.a,{dataSource:Rn,bordered:!1,loading:Lr,scroll:Rn.length>7?{y:300}:{},style:{padding:"0 40px 20px 40px"},columns:[{title:"".concat(vn,"\u540D\u79F0"),dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:function(Jt,zr){return Z.a.createElement("span",null,Z.a.createElement("span",{onClick:function(){return Cn(zr)},className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),Z.a.createElement("span",{onClick:function(){return Sr(zr)},className:"current c-grey-666"},"\u5220\u9664"))}}],pagination:!1})))))},ft=Et,jt=k("m3rI"),Ct=k("B7Ph"),xt=k("wd/R"),Yt=k.n(xt),$t=k("1vsH"),Vt=k("9Bee"),xr=k("xKgJ"),Lt=W.a.TextArea,Er=z.a.confirm,fr=K.a.Panel,Wt={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0},Xt;(function(pt){pt[pt.SET_INITAL_DATA=0]="SET_INITAL_DATA",pt[pt.SET_LOADING=1]="SET_LOADING",pt[pt.SET_STATUS=2]="SET_STATUS"})(Xt||(Xt={}));var $r="#### \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 Tn(pt,Tt){switch(Tt.type){case Xt.SET_INITAL_DATA:return Object(M.a)(Object(M.a)({},pt),Tt.payload);case Xt.SET_LOADING:return Object(M.a)(Object(M.a)({},pt),{},{loading:Tt.payload});case Xt.SET_STATUS:return Object(M.a)(Object(M.a)({},pt),{},{status:Tt.payload});default:throw new Error}}var wr=Y.default=function(){var pt,Tt,ht,Tr=Object(ne.h)(),Rr=Object(ne.g)(),Pt=Object(ne.i)(),_t=Pt.id,Lr=I.a.useForm(),cn=Object(j.a)(Lr,1),Mr=cn[0],ot=Object(ee.useState)(),Ot=Object(j.a)(ot,2),lt=Ot[0],un=Ot[1],Sn=Object(ee.useState)(!1),dn=Object(j.a)(Sn,2),jr=dn[0],wt=dn[1],fn=Object(ee.useState)([]),Fr=Object(j.a)(fn,2),sr=Fr[0],nr=Fr[1],qn=Object(ee.useState)([]),Rn=Object(j.a)(qn,2),an=Rn[0],ea=Rn[1],ta=Object(ee.useState)([]),Cn=Object(j.a)(ta,2),Sr=Cn[0],Ln=Cn[1],vn=Object(ee.useState)([]),on=Object(j.a)(vn,2),Jt=on[0],zr=on[1],Gt=Object(ee.useState)([]),kt=Object(j.a)(Gt,2),Qt=kt[0],hr=kt[1],Ir=Object(ee.useState)("C"),Jr=Object(j.a)(Ir,2),Mn=Jr[0],Ba=Jr[1],wa=Object(ee.useReducer)(Tn,Wt),Ma=Object(j.a)(wa,2),ia=Ma[0],en=Ma[1],Pa=ia.loading,Hr=ia.data,Wn=ia.user,jn=ia.status,Gr=Hr==null?void 0:Hr.hack_sets,_n=Hr==null||((pt=Hr.hack)===null||pt===void 0)?void 0:pt.test_set_average,ka=Object(ee.useState)(!1),ga=Object(j.a)(ka,2),ua=ga[0],Va=ga[1],Ca=Object(ee.useRef)([]),Rt=Object(ee.useState)(!1),Kt=Object(j.a)(Rt,2),Bt=Kt[0],pr=Kt[1],mr=Object(ee.useState)(!1),Pr=Object(j.a)(mr,2),Xr=Pr[0],Br=Pr[1],tn=Object(ee.useRef)(!0),Hn=Object(ee.useState)({}),Cr=Object(j.a)(Hn,2),ur=Cr[0],yn=Cr[1];Object(ee.useEffect)(function(){return Object(Te.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(Te.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(Te.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(Te.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}},[]),Object(ee.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)});var ca=function(){var Ut=Object(b.a)($.a.mark(function bt(){var zt,Zt;return $.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:return ir.next=2,Object(pe.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}});case 2:return zt=ir.sent,ir.next=5,Object(pe.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});case 5:Zt=ir.sent,ea(zt.tag_disciplines||[]),Ln(Zt.tag_disciplines||[]);case 8:case"end":return ir.stop()}},bt)}));return function(){return Ut.apply(this,arguments)}}(),Kn=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}],Ta=Object(ee.useCallback)(Object(b.a)($.a.mark(function Ut(){var bt,zt,Zt,kr,ir,hn,rn,va,On,Pn,Un,Ua,Le,Ue,Ke,Pe,fe,Ae,ge,ke,Ne,We,Fe,Ye,at,ct,ut;return $.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:if(en({type:Xt.SET_LOADING,payload:!0}),!_t){Mt.next=19;break}return Mt.next=4,ze(_t);case 4:bt=Mt.sent,zt=bt.user,Zt=bt.language,kr=bt.practice_sets,ir=bt.practice_codes,hn=bt.description,rn=bt.difficulty,va=bt.name,On=bt.open_or_not,Pn=bt.time_limit,Un=bt.test_set_average,Ua=bt.test_set_score,Le=bt.status,Ue=bt.tag_discipline_ids,Ke=bt.source_discipline_ids,Pe=bt.item_banks_group_id,fe=bt.is_file,Ae=fe===void 0?!1:fe,ge=bt.hide_actual_output,ke=bt.review_privilege,Ne=bt.review_description,We={review_privilege:ke,status:Le,review_description:Ne,name:va},yn(We),Va(ge),Fe=Ae?[{input:"",output:"",score:100,position:1}]:kr,Ae?(nr(kr),Mr.setFieldsValue({hack_sets:Fe})):nr([]),Ye={loading:!0,user:zt,status:Le,data:{hack:{difficulty:rn,name:va,description:hn,open_or_not:On,time_limit:Pn,test_set_average:Un,test_set_score:Ua,tag_discipline_ids:Ue,source_discipline_ids:Ke,is_file:Ae},hack_sets:Fe}},en({type:Xt.SET_INITAL_DATA,payload:Ye}),un({hack:{difficulty:rn,name:va,description:hn,open_or_not:On,time_limit:Pn,test_set_average:Un,test_set_score:Ua,tag_discipline_ids:Ue,source_discipline_ids:Ke,is_file:Ae}}),at=ir==null?void 0:ir.map(function(qt){return Object(M.a)(Object(M.a)({},qt),{},{code:ae.Base64.decode(qt==null?void 0:qt.code)})}),hr(at),Ca.current=at,Mt.next=27;break;case 19:return Mt.next=21,we();case 21:ct=Mt.sent,ut=ct.user,en({type:Xt.SET_INITAL_DATA,payload:{loading:!0,status:0,user:ut,data:{hack:{difficulty:"",time_limit:3,description:$r,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),un({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),hr(Kn),Ca.current=Kn;case 27:en({type:Xt.SET_LOADING,payload:!1});case 28:case"end":return Mt.stop()}},Ut)})),[_t]);Object(ee.useEffect)(function(){try{Ta(),ca()}catch(Ut){console.log(Ut,"----")}},[]);function Ya(Ut,bt){return Wa.apply(this,arguments)}function Wa(){return Wa=Object(b.a)($.a.mark(function Ut(bt,zt){var Zt,kr,ir,hn,rn,va,On,Pn,Un,Ua,Le,Ue,Ke,Pe,fe,Ae,ge,ke;return $.a.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:kr=Object(M.a)({},bt),ir=kr.hack_sets,hn=kr.hack,hn.hide_actual_output=ua,rn=[],va=[],On=0,Pn=hn!=null&&hn.is_file?sr.map(function(Fe,Ye){return Object(M.a)(Object(M.a)({},Fe),{},{position:Ye+1})}):ir.map(function(Fe){return Object(M.a)(Object(M.a)({},Fe),{},{is_file:!1})}),Un=Object(w.a)(Pn);try{for(Un.s();!(Ua=Un.n()).done;)Le=Ua.value,On+=Le.score,Le.id&&Le.id>=0?rn.push(Le):va.push(Le)}catch(Fe){Un.e(Fe)}finally{Un.f()}if(Pn!=null&&Pn.length){We.next=11;break}return E.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),We.abrupt("return");case 11:if(!(On!==100&&!hn.test_set_score)){We.next=14;break}return E.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),We.abrupt("return");case 14:if(!(Pn!=null&&Pn.some(function(Fe){return!Fe.output}))){We.next=17;break}return E.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),We.abrupt("return");case 17:if(tn.current?pr(!0):Br(!0),Ke=Qt==null?void 0:Qt.map(function(Fe){return Object(M.a)(Object(M.a)({},Fe),{},{code:ae.Base64.encode(Fe==null?void 0:Fe.code)})}),!_t){We.next=25;break}return We.next=22,Ge(_t,{practice:hn,practice_codes:Ke,practice_sets:va,update_practice_sets:rn});case 22:Ue=We.sent,We.next=28;break;case 25:return We.next=27,ce({practice:hn,practice_codes:Ke,practice_sets:Pn,publish:!tn.current});case 27:Ue=We.sent;case 28:if(pr(!1),Br(!1),!(((Zt=Ue)===null||Zt===void 0?void 0:Zt.status)===0)){We.next=46;break}if(!((Pe=Ue)!==null&&Pe!==void 0&&(fe=Pe.similar_practice)!==null&&fe!==void 0&&fe.length)){We.next=35;break}return wt(!0),zr((Ae=Ue)===null||Ae===void 0?void 0:Ae.similar_practice),We.abrupt("return");case 35:if(!_t){We.next=44;break}if(E.b.success("\u4FDD\u5B58\u6210\u529F"),tn.current){We.next=42;break}return We.next=40,Object(pe.a)("/api/practices/".concat(_t,"/start"),{method:"get"});case 40:ge=We.sent,(ge==null?void 0:ge.status)===0&&Rr.push("/problems/".concat(ge==null?void 0:ge.identifier,"/oj/").concat(_t));case 42:We.next=46;break;case 44:E.b.success("\u65B0\u5EFA\u6210\u529F"),Rr.replace("/problems/".concat((ke=Ue)===null||ke===void 0?void 0:ke.identifier,"/ojedit"));case 46:case"end":return We.stop()}},Ut)})),Wa.apply(this,arguments)}function hi(){Rr.replace("/problems")}var Ha=function(bt){var zt=Math.floor(100/bt.length),Zt=zt+100%bt.length;bt=bt.map(function(kr,ir){return ir===bt.length-1?Object(M.a)(Object(M.a)({},kr),{},{score:Zt}):Object(M.a)(Object(M.a)({},kr),{},{score:zt})}),nr(bt)};function Ci(Ut){Ut.target.value||Ha(sr),en({type:Xt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Hr),{},{hack:Object(M.a)(Object(M.a)({},Hr.hack),{},{test_set_score:Ut.target.value})})}})}function ni(Ut){en({type:Xt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Hr),{},{hack:Object(M.a)(Object(M.a)({},Hr.hack),{},{is_file:Ut.target.value})})}})}function ai(Ut){Va(Ut.target.checked)}function pi(Ut){var bt=Ut.target.value;bt&&Ha(sr),en({type:Xt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Hr),{},{hack:Object(M.a)(Object(M.a)({},Hr.hack),{},{test_set_average:bt})})}})}function _a(){var Ut=Mr.getFieldValue("hack_sets"),bt=Ut.length+1,zt=Math.floor(100/bt),Zt=100%bt;Ut.map(function(kr,ir){return _n&&(kr.score=zt),kr.position=ir+1,kr}),Ut.push({input:"",output:"",position:bt,score:_n?zt+Zt:0}),Mr.setFieldsValue({hack_sets:Ut}),en({type:Xt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Hr),{},{hack_sets:Ut})}})}Object(ee.useEffect)(function(){if(_n){var Ut=Gr==null?void 0:Gr.length,bt=Math.floor(100/Ut),zt=100%Ut;Gr==null||Gr.map(function(Zt,kr){return Zt.score=bt,Zt.position=kr+1,kr===Ut-1&&(Zt.score=bt+zt),Zt}),en({type:Xt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Hr),{},{hack_sets:Gr})}}),Mr.setFieldsValue({hack_sets:Gr})}},[_n]);function Ia(Ut){var bt=Mr.getFieldValue("hack_sets"),zt=(bt==null?void 0:bt.length)-1,Zt=Math.ceil(100/zt),kr=100%zt;bt.splice(Ut,1),bt==null||bt.map(function(ir,hn){return _n&&(ir.score=Zt,hn===zt-1&&(ir.score=Zt+kr)),ir.position=hn+1,ir}),en({type:Xt.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Hr),{},{hack_sets:bt})}}),Mr.setFieldsValue({hack_sets:bt})}function _i(Ut){Ba(Ut)}var ii=function(bt){var zt,Zt=(zt=Ca.current)===null||zt===void 0?void 0:zt.findIndex(function(kr){return kr.language===Mn});Ca.current[Zt].code=bt,hr(Ca.current)},_r=function(bt){un(Object(M.a)({},Mr.getFieldsValue()))},cr=function(){var Ut=Object(b.a)($.a.mark(function bt(zt){var Zt;return $.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:return ir.next=2,Object(pe.a)("/api/practices/".concat(zt,"/start"),{method:"get"});case 2:Zt=ir.sent,(Zt==null?void 0:Zt.status)===0&&Object($t.Q)("/problems/".concat(Zt==null?void 0:Zt.identifier,"/oj/").concat(zt));case 4:case"end":return ir.stop()}},bt)}));return function(zt){return Ut.apply(this,arguments)}}(),ar=function(){var Ut=Object(b.a)($.a.mark(function bt(){var zt,Zt,kr,ir,hn,rn;return $.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return On.next=2,ze(_t);case 2:zt=On.sent,Zt=zt.name,kr=zt.status,ir=zt.review_privilege,hn=zt.review_description,rn={review_privilege:ir,status:kr,review_description:hn,name:Zt},yn(rn);case 6:case"end":return On.stop()}},bt)}));return function(){return Ut.apply(this,arguments)}}(),Jn=function(){var bt="";z.a.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:Z.a.createElement("div",{className:"mt20"},Z.a.createElement(Q.a,{className:he.a.MdEditor,defaultValue:bt,onChange:function(Zt){bt=Zt}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var zt=Object(b.a)($.a.mark(function kr(){var ir;return $.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:if(bt){rn.next=3;break}return E.b.warn("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),rn.abrupt("return",Promise.reject());case 3:return rn.next=5,Object(pe.a)("/api/practices/".concat(_t,"/review.json"),{method:"post",body:{op:"fail",description:bt}});case 5:ir=rn.sent,(ir==null?void 0:ir.status)===0&&(E.b.success("\u63D0\u4EA4\u6210\u529F"),ar());case 7:case"end":return rn.stop()}},kr)}));function Zt(){return zt.apply(this,arguments)}return Zt}()})},Na=function(){var Ut=Object(b.a)($.a.mark(function bt(){return $.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u63D0\u793A",content:"\u786E\u8BA4\u5C06\u9898\u76EE\u300A".concat(ur==null?void 0:ur.name,"\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var kr=Object(b.a)($.a.mark(function hn(){var rn;return $.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return On.next=2,Object(pe.a)("/api/practices/".concat(_t,"/review.json"),{method:"post",body:{op:"pass"}});case 2:rn=On.sent,(rn==null?void 0:rn.status)===0&&(E.b.success("\u63D0\u4EA4\u6210\u529F"),ar());case 4:case"end":return On.stop()}},hn)}));function ir(){return kr.apply(this,arguments)}return ir}()});case 1:case"end":return Zt.stop()}},bt)}));return function(){return Ut.apply(this,arguments)}}(),ja=function(){var bt=z.a.confirm({icon:null,width:700,className:"".concat(he.a.cusModal," custom-modal-divider"),centered:!0,title:Z.a.createElement(i.a,null,Z.a.createElement(A.a,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),Z.a.createElement(A.a,null,Z.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return bt.destroy()}}))),content:Z.a.createElement("div",null,Z.a.createElement(Vt.a,{className:"mt20",value:(ur==null?void 0:ur.review_description)||""}))})};return Z.a.createElement(f.a,{spinning:Pa,size:"large",className:he.a["oj-custom-large-spin"]},Hr?Z.a.createElement(ee.Fragment,null,Z.a.createElement("header",{className:he.a.header},Z.a.createElement("div",null,Z.a.createElement("img",{src:"".concat(jt.a.IMG_SERVER,"/images/").concat(Wn==null?void 0:Wn.image_url),alt:"user",width:30}),Z.a.createElement("span",null,Wn==null?void 0:Wn.name)),Z.a.createElement("h2",null," ",Hr==null||((Tt=Hr.hack)===null||Tt===void 0)?void 0:Tt.name," "),_t?Z.a.createElement("a",{className:he.a.btn_back,onClick:hi}," ",Z.a.createElement(J.a,null),"\u9000\u51FA"):null),Z.a.createElement(I.a,{form:Mr,initialValues:Hr,layout:"vertical",className:he.a["oj-form-container"],onValuesChange:_r,onFinish:Ya},Z.a.createElement(rt.a,{hideResize:!0,className:he.a["oj-problems"],leftChild:Z.a.createElement(aa,{formValue:lt,onRemoveTestCase:Ia,onAddTestCase:_a,hack:Hr.hack,onChangeScore:Ci,onChangehide:ai,onChangeAverage:pi,onChangeFile:ni,uploadData:sr,setUploadData:nr,handleUploadRatio:Ha,ischecked:ua,pointData:an,sourceData:Sr,getPointData:ca}),rightChild:Z.a.createElement(Ee,{value:Qt==null||((ht=Qt.find(function(Ut){return Ut.language===Mn}))===null||ht===void 0)?void 0:ht.code,onChange:ii,onLanguage:_i,languageItems:Qt,language:Mn})}),Z.a.createElement("div",{className:he.a.footer},!!_t&&Z.a.createElement("div",{className:he.a.result},Z.a.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),ur!=null&&ur.review_privilege?Z.a.createElement(Z.a.Fragment,null,Z.a.createElement("div",{onClick:Na,className:he.a.pass},"\u901A\u8FC7"),Z.a.createElement("div",{onClick:Jn,className:he.a.noPass},"\u4E0D\u901A\u8FC7")):Z.a.createElement(Z.a.Fragment,null,(ur==null?void 0:ur.status)===0&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(ur==null?void 0:ur.status)===1&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(ur==null?void 0:ur.status)===2&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(ur==null?void 0:ur.status)===3&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(ur==null?void 0:ur.status)===4&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(ur==null?void 0:ur.status)===5&&Z.a.createElement("div",{className:he.a.noPassText},Z.a.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",Z.a.createElement("span",{onClick:ja},"\u67E5\u770B\u539F\u56E0")))),Z.a.createElement(T.a,{type:"primary",ghost:!0,onClick:hi},"\u9000\u51FA\u7F16\u8F91"),Z.a.createElement(T.a,{disabled:Xr,loading:Bt,type:"primary",onClick:function(){tn.current=!0,Mr.submit()}},"\u4FDD\u5B58 "),_t?Z.a.createElement(T.a,{disabled:Bt,loading:Xr,style:{background:"#2FC25B",border:0},type:"primary",onClick:function(){tn.current=!1,Mr.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):Z.a.createElement(T.a,{disabled:Bt,loading:Xr,type:"primary",onClick:function(){tn.current=!1,Mr.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,Z.a.createElement(z.a,{centered:!0,destroyOnClose:!0,footer:null,visible:jr,onCancel:function(){return wt(!1)},title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},Z.a.createElement("div",null,Z.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"),Z.a.createElement(l.a,{dataSource:Jt,bordered:!1,scroll:Jt.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:function(bt,zt){return Z.a.createElement("span",{onClick:function(){return cr(zt==null?void 0:zt.identifier)},style:{textDecorationLine:"underline"},className:"current c-light-primary"},bt)}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:function(bt){var zt;return(zt=Yt()(bt))===null||zt===void 0?void 0:zt.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function aa(pt){var Tt,ht,Tr=pt.ischecked,Rr=pt.formValue,Pt=pt.hack,_t=pt.onChangeAverage,Lr=pt.onChangeScore,cn=pt.onChangehide,Mr=pt.onChangeFile,ot=pt.onAddTestCase,Ot=pt.onRemoveTestCase,lt=pt.uploadData,un=pt.setUploadData,Sn=pt.handleUploadRatio,dn=pt.pointData,jr=pt.sourceData,wt=pt.getPointData,fn=Pt.test_set_average,Fr=Pt.test_set_score,sr=Object(ee.useState)(!1),nr=Object(j.a)(sr,2),qn=nr[0],Rn=nr[1],an=Object(ee.useState)(!1),ea=Object(j.a)(an,2),ta=ea[0],Cn=ea[1],Sr=function(kt,Qt){var hr=Object(m.a)(lt);hr.splice(Qt,1),fn?Sn(hr):un(hr)},Ln=function(kt,Qt){console.log(kt,Qt);var hr=lt.map(function(Ir,Jr){return Jr===Qt?Object(M.a)(Object(M.a)({},Ir),{},{score:kt.target.value?Number(kt.target.value):0}):Ir});un(hr)},vn=function(kt){var Qt=lt.concat(kt);Pt.test_set_average?Sn(Qt):un(Qt)};function on(Gt){Gt.stopPropagation()}function Jt(){if(Object(xr.v)()){Cn("practice");return}var Gt="";z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:Z.a.createElement("div",null,Z.a.createElement(W.a,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(Qt){Gt=Qt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var kt=Object(b.a)($.a.mark(function hr(){var Ir;return $.a.wrap(function(Mn){for(;;)switch(Mn.prev=Mn.next){case 0:return Mn.next=2,Object(pe.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:Gt}});case 2:Ir=Mn.sent,(Ir==null?void 0:Ir.status)===0&&wt();case 4:case"end":return Mn.stop()}},hr)}));function Qt(){return kt.apply(this,arguments)}return Qt}()})}function zr(){if(Object(xr.v)()){Cn("practice_source");return}var Gt="";z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:Z.a.createElement("div",null,Z.a.createElement(W.a,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(Qt){Gt=Qt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var kt=Object(b.a)($.a.mark(function hr(){var Ir;return $.a.wrap(function(Mn){for(;;)switch(Mn.prev=Mn.next){case 0:return Mn.next=2,Object(pe.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:Gt}});case 2:Ir=Mn.sent,(Ir==null?void 0:Ir.status)===0&&wt();case 4:case"end":return Mn.stop()}},hr)}));function Qt(){return kt.apply(this,arguments)}return Qt}()})}return Z.a.createElement("div",{className:he.a["oj-left-panel"]},Z.a.createElement("div",{className:he.a["oj-form-info"]},Z.a.createElement(I.a.Item,{label:"\u9898\u76EE\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0"}],className:he.a.inputOne},Z.a.createElement(W.a,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:Z.a.createElement("span",null,(Rr==null||((Tt=Rr.hack)===null||Tt===void 0||((ht=Tt.name)===null||ht===void 0))?void 0:ht.length)||0,"/",Z.a.createElement("span",{className:"c-grey-999"},"60"))})),Z.a.createElement(I.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},Z.a.createElement(Q.a,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),Z.a.createElement("div",{className:he.a.row},Z.a.createElement("div",{className:he.a.a},Z.a.createElement(I.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},Z.a.createElement(g.a,null,re(ie.difficulty)))),Z.a.createElement("div",{className:he.a.b},Z.a.createElement(I.a.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},Z.a.createElement(g.a,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(kt){return kt.parentNode}},jr.map(function(Gt){return Z.a.createElement(g.a.Option,{key:Gt.id,value:Gt.id},Gt.name)}))),Z.a.createElement(T.a,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:function(){return zr()}},Object(xr.v)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),Z.a.createElement("div",{className:he.a.row},Z.a.createElement("div",{className:he.a.b,style:{width:"100%",marginLeft:0}},Z.a.createElement(I.a.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},Z.a.createElement(g.a,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(kt){return kt.parentNode}},dn.map(function(Gt){return Z.a.createElement(g.a.Option,{key:Gt.id,value:Gt.id},Gt.name)}))),Z.a.createElement(T.a,{type:"primary",ghost:!0,onClick:function(){return Jt()}},Object(xr.v)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),Z.a.createElement("div",{className:he.a.field},Z.a.createElement(I.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:he.a.inputTwo,extra:Z.a.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",Z.a.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},Z.a.createElement(r.a,{style:{width:185},min:3}))),Z.a.createElement("div",{className:"tst-case-info"},Z.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!Pt.is_file&&Z.a.createElement(T.a,{style:{height:40},type:"primary",ghost:!0,onClick:ot},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),Z.a.createElement(I.a.Item,{name:["hack","test_set_score"]},Z.a.createElement(a.a.Group,{onChange:Lr},Z.a.createElement(a.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",Z.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")),Z.a.createElement(a.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",Z.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")))),Z.a.createElement(S.a,{style:{marginBottom:"5px"},checked:Tr,onChange:cn},"\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"),Z.a.createElement(I.a.Item,{className:he.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},Z.a.createElement(a.a.Group,{onChange:Mr},Z.a.createElement(h.a,{direction:"horizontal"},Z.a.createElement(a.a,{value:!1},"\u6587\u672C"),Z.a.createElement(a.a,{value:!0},"\u6587\u4EF6")))),!Pt.test_set_score&&Z.a.createElement(I.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},Z.a.createElement(a.a.Group,{onChange:_t},Z.a.createElement(a.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),Z.a.createElement(a.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),Pt.is_file&&Z.a.createElement("div",{className:he.a.upBtn},Z.a.createElement(T.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return Rn(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),Z.a.createElement(Ct.a,{disabled:Pt==null?void 0:Pt.test_set_average,inputChange:Ln,showScore:!Pt.test_set_score,data:lt,onRemove:Sr})),!Pt.is_file&&Z.a.createElement(I.a.List,{name:"hack_sets"},function(Gt,kt){return Object(C.a)(kt),Z.a.createElement(K.a,{accordion:!0},Gt.map(function(Qt,hr){return Z.a.createElement(fr,{key:"".concat(Qt.key,"--").concat(hr),header:Z.a.createElement("a",{className:he.a["test-case-name"]},Z.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",hr+1),Fr?null:Z.a.createElement(Z.a.Fragment,null,Z.a.createElement(I.a.Item,{name:[Qt.name,"score"],fieldKey:[Qt.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(hr+1,"\u8BC4\u5206")}]},Z.a.createElement(r.a,{onClick:on,min:0,max:100,disabled:fn})),Z.a.createElement("span",null,"%"))),extra:hr>0?Z.a.createElement("div",{onClick:on},Z.a.createElement(u.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(hr+1),onConfirm:function(){Ot(hr)}},Z.a.createElement(X.a,{className:he.a["btn-remove-case"]}))):null},Z.a.createElement(I.a.Item,{label:"\u8F93\u5165",name:[Qt.name,"input"],fieldKey:[Qt.fieldKey,"input"]},Z.a.createElement(Lt,null)),Z.a.createElement(I.a.Item,{label:"\u8F93\u51FA",name:[Qt.name,"output"],fieldKey:[Qt.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},Z.a.createElement(Lt,null)))}))}))),Z.a.createElement(Ct.b,{rootIdentifier:null,visible:qn,onClose:function(){return Rn(!1)},onOK:vn}),Z.a.createElement(ft,{visible:ta,onCancel:function(){Cn(!1),wt()},onOK:function(){Cn(!1),wt()}}))}},rdUC:function(N,Y,k){var P=k("MFOe"),u=P.Global;N.exports={name:"localStorage",read:R,write:h,each:s,remove:S,clearAll:d};function C(){return u.localStorage}function R(a){return C().getItem(a)}function h(a,o){return C().setItem(a,o)}function s(a){for(var o=C().length-1;o>=0;o--){var r=C().key(o);a(R(r),r)}}function S(a){return C().removeItem(a)}function d(){return C().clear()}},sR1s:function(N,Y,k){"use strict";k.d(Y,"b",function(){return R}),k.d(Y,"a",function(){return h}),k.d(Y,"c",function(){return s}),k.d(Y,"d",function(){return S});var P=k("U8pU"),u="RC_TABLE_KEY";function C(d){return d==null?[]:Array.isArray(d)?d:[d]}function R(d,a){if(!a&&typeof a!="number")return d;for(var o=C(a),r=d,x=0;x1)Object(o.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(c.length===0)return Object(o.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var T=c[0];if(s.isValidElement(T)&&Object(r.c)(T)){var v=T.ref;c[0]=s.cloneElement(T,{ref:Object(r.a)(v,this.setChildNode)})}return c.length===1?c[0]:c.map(function(i,L){return!s.isValidElement(i)||"key"in i&&i.key!==null?i:s.cloneElement(i,{key:"".concat(g,"-").concat(L)})})}}]),f}(s.Component);m.displayName="ResizeObserver",Y.a=m},uGsb:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("MlIO"),k("1uat"))})(this,function(P){return function(){var u=P,C=u.x64,R=C.Word,h=C.WordArray,s=u.algo,S=s.SHA512,d=s.SHA384=S.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=S._doFinalize.call(this);return a.sigBytes-=16,a}});u.SHA384=S._createHelper(d),u.HmacSHA384=S._createHmacHelper(d)}(),P.SHA384})},uGxW:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("OLod"))})(this,function(P){return P.pad.NoPadding={pad:function(){},unpad:function(){}},P.pad.NoPadding})},uQRt:function(N,Y,k){N.exports=P;function P(){return k("gaXo"),{}}},ulZh:function(N,Y,k){typeof window!="undefined"&&function(u,C){N.exports=C()}(this,function(){return function(P){var u={};function C(R){if(u[R])return u[R].exports;var h=u[R]={i:R,l:!1,exports:{}};return P[R].call(h.exports,h,h.exports,C),h.l=!0,h.exports}return C.m=P,C.c=u,C.d=function(R,h,s){C.o(R,h)||Object.defineProperty(R,h,{enumerable:!0,get:s})},C.r=function(R){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(R,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(R,"__esModule",{value:!0})},C.t=function(R,h){if(h&1&&(R=C(R)),h&8)return R;if(h&4&&typeof R=="object"&&R&&R.__esModule)return R;var s=Object.create(null);if(C.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:R}),h&2&&typeof R!="string")for(var S in R)C.d(s,S,function(d){return R[d]}.bind(null,S));return s},C.n=function(R){var h=R&&R.__esModule?function(){return R.default}:function(){return R};return C.d(h,"a",h),h},C.o=function(R,h){return Object.prototype.hasOwnProperty.call(R,h)},C.p="/dist/",C(C.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(P,u,C){"use strict";var R=Object.prototype.hasOwnProperty,h="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(h=!1));function S(r,x,g){this.fn=r,this.context=x,this.once=g||!1}function d(r,x,g,m,w){if(typeof g!="function")throw new TypeError("The listener must be a function");var p=new S(g,m||r,w),f=h?h+x:x;return r._events[f]?r._events[f].fn?r._events[f]=[r._events[f],p]:r._events[f].push(p):(r._events[f]=p,r._eventsCount++),r}function a(r,x){--r._eventsCount===0?r._events=new s:delete r._events[x]}function o(){this._events=new s,this._eventsCount=0}o.prototype.eventNames=function(){var x=[],g,m;if(this._eventsCount===0)return x;for(m in g=this._events)R.call(g,m)&&x.push(h?m.slice(1):m);return Object.getOwnPropertySymbols?x.concat(Object.getOwnPropertySymbols(g)):x},o.prototype.listeners=function(x){var g=h?h+x:x,m=this._events[g];if(!m)return[];if(m.fn)return[m.fn];for(var w=0,p=m.length,f=new Array(p);w0},!1)}function r(x,g){for(var m={main:[g]},w={main:[]},p={main:{}};o(m);)for(var f=Object.keys(m),n=0;n=2*L/y||M<=K)return;var H=Number.POSITIVE_INFINITY,z;for(z=f.level-1;z>b;z--){var B=E[z].maxBitrate;if(H=L*B/(8*.8*j),H=M)return;var W=this.bwEstimator.getEstimate();o.logger.warn("Fragment "+f.sn+(n?" part "+n.index:"")+" of level "+f.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+z+` Current BW estimate: `+(Object(R.isFiniteNumber)(W)?(W/1024).toFixed(3):"Unknown")+` Kb/s Estimated load time for current fragment: `+M.toFixed(3)+` s Estimated load time for the next fragment: `+H.toFixed(3)+` s Time to underbuffer: `+K.toFixed(3)+" s"),l.nextLoadLevel=z,this.bwEstimator.sample(A,i.loaded),this.clearTimer(),f.loader&&(this.fragCurrent=this.partCurrent=null,f.loader.abort()),l.trigger(s.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:f,part:n,stats:i})},w.onFragLoaded=function(f,n){var l=n.frag,c=n.part;if(l.type===a.PlaylistLevelType.MAIN&&Object(R.isFiniteNumber)(l.sn)){var T=c?c.stats:l.stats,v=c?c.duration:l.duration;if(this.clearTimer(),this.lastLoadedFragLevel=l.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var i=this.hls.levels[l.level],L=(i.loaded?i.loaded.bytes:0)+T.loaded,A=(i.loaded?i.loaded.duration:0)+v;i.loaded={bytes:L,duration:A},i.realBitrate=Math.round(8*L/A)}if(l.bitrateTest){var y={stats:T,frag:l,part:c,id:l.type};this.onFragBuffered(s.Events.FRAG_BUFFERED,y),l.bitrateTest=!1}}},w.onFragBuffered=function(f,n){var l=n.frag,c=n.part,T=c?c.stats:l.stats;if(T.aborted)return;if(l.type!==a.PlaylistLevelType.MAIN||l.sn==="initSegment")return;var v=T.parsing.end-T.loading.start;this.bwEstimator.sample(v,T.loaded),T.bwEstimate=this.bwEstimator.getEstimate(),l.bitrateTest?this.bitrateTestDelay=v/1e3:this.bitrateTestDelay=0},w.onError=function(f,n){switch(n.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},w.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},w.getNextABRAutoLevel=function(){var f=this.fragCurrent,n=this.partCurrent,l=this.hls,c=l.maxAutoLevel,T=l.config,v=l.minAutoLevel,i=l.media,L=n?n.duration:f?f.duration:0,A=i?i.currentTime:0,y=i&&i.playbackRate!==0?Math.abs(i.playbackRate):1,E=this.bwEstimator?this.bwEstimator.getEstimate():T.abrEwmaDefaultEstimate,b=(S.BufferHelper.bufferInfo(i,A,T.maxBufferHole).end-A)/y,_=this.findBestLevel(E,v,c,b,T.abrBandWidthFactor,T.abrBandWidthUpFactor);if(_>=0)return _;o.logger.trace((b?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var I=L?Math.min(L,T.maxStarvationDelay):T.maxStarvationDelay,j=T.abrBandWidthFactor,M=T.abrBandWidthUpFactor;if(!b){var G=this.bitrateTestDelay;if(G){var K=L?Math.min(L,T.maxLoadingDelay):T.maxLoadingDelay;I=K-G,o.logger.trace("bitrate test took "+Math.round(1e3*G)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*I)+" ms"),j=M=1}}return _=this.findBestLevel(E,v,c,b+I,j,M),Math.max(_,0)},w.findBestLevel=function(f,n,l,c,T,v){for(var i,L=this.fragCurrent,A=this.partCurrent,y=this.lastLoadedFragLevel,E=this.hls.levels,b=E[y],_=!!(b!=null&&(i=b.details)!==null&&i!==void 0&&i.live),I=b==null?void 0:b.codecSet,j=A?A.duration:L?L.duration:0,M=l;M>=n;M--){var G=E[M];if(!G||I&&G.codecSet!==I)continue;var K=G.details,H=(A?K==null?void 0:K.partTarget:K==null?void 0:K.averagetargetduration)||j,z=void 0;M<=y?z=T*f:z=v*f;var B=E[M].maxBitrate,W=B*H/z;if(o.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+M+"/"+Math.round(z)+"/"+B+"/"+H+"/"+c+"/"+W),z>B&&(!W||_&&!this.bitrateTestDelay||W0&&b===-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=b,this.tick()},y.doTick=function(){switch(this.state){case h.State.IDLE:this.doTickIdle();break;case h.State.WAITING_TRACK:{var b,_=this.levels,I=this.trackId,j=_==null||((b=_[I])===null||b===void 0)?void 0:b.details;if(j){if(this.waitForCdnTuneIn(j))break;this.state=h.State.WAITING_INIT_PTS}break}case h.State.FRAG_LOADING_WAITING_RETRY:{var M,G=performance.now(),K=this.retryDate;(!K||G>=K||(M=this.media)!==null&&M!==void 0&&M.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=h.State.IDLE);break}case h.State.WAITING_INIT_PTS:{var H=this.waitingData;if(H){var z=H.frag,B=H.part,W=H.cache,F=H.complete;if(this.initPTS[z.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=h.State.FRAG_LOADING;var $=W.flush(),ee={frag:z,part:B,payload:$,networkDetails:null};this._handleFragmentLoadProgress(ee),F&&L.prototype._handleFragmentLoadComplete.call(this,ee)}else if(this.videoTrackCC!==this.waitingVideoCC)n.logger.log("Waiting fragment cc ("+z.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var Z=this.getLoadPosition(),ve=S.BufferHelper.bufferInfo(this.mediaBuffer,Z,this.config.maxBufferHole),he=Object(w.fragmentWithinToleranceTest)(ve.end,this.config.maxFragLookUpTolerance,z);he<0&&(n.logger.log("Waiting fragment cc ("+z.cc+") @ "+z.start+" cancelled because another fragment at "+ve.end+" is needed"),this.clearWaitingFragment())}}else this.state=h.State.IDLE}}this.onTickEnd()},y.clearWaitingFragment=function(){var b=this.waitingData;b&&(this.fragmentTracker.removeFragment(b.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=h.State.IDLE)},y.onTickEnd=function(){var b=this.media;if(!b||!b.readyState)return;var _=this.mediaBuffer?this.mediaBuffer:b,I=_.buffered;!this.loadedmetadata&&I.length&&(this.loadedmetadata=!0),this.lastCurrentTime=b.currentTime},y.doTickIdle=function(){var b,_,I=this.hls,j=this.levels,M=this.media,G=this.trackId,K=I.config;if(!j||!j[G])return;if(!M&&(this.startFragRequested||!K.startFragPrefetch))return;var H=j[G],z=H.details;if(!z||z.live&&this.levelLastLoaded!==G||this.waitForCdnTuneIn(z)){this.state=h.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,r.ElementaryStreamTypes.AUDIO,o.PlaylistLevelType.AUDIO));var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,o.PlaylistLevelType.AUDIO);if(B===null)return;var W=B.len,F=this.getMaxBufferLength(),$=this.audioSwitch;if(W>=F&&!$)return;if(!$&&this._streamEnded(B,z)){I.trigger(s.Events.BUFFER_EOS,{type:"audio"}),this.state=h.State.ENDED;return}var ee=z.fragments,Z=ee[0].start,ve=B.end;if($){var he=this.getLoadPosition();ve=he,z.PTSKnown&&heZ||B.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),M.currentTime=Z+.05))}var le=this.getNextFragment(ve,z);if(!le){this.bufferFlushed=!0;return}((b=le.decryptdata)===null||b===void 0?void 0:b.keyFormat)==="identity"&&!((_=le.decryptdata)!==null&&_!==void 0&&_.key)?this.loadKey(le,z):this.loadFragment(le,z,ve)},y.getMaxBufferLength=function(){var b=L.prototype.getMaxBufferLength.call(this),_=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,o.PlaylistLevelType.MAIN);return _===null?b:Math.max(b,_.len)},y.onMediaDetaching=function(){this.videoBuffer=null,L.prototype.onMediaDetaching.call(this)},y.onAudioTracksUpdated=function(b,_){var I=_.audioTracks;this.resetTransmuxer(),this.levels=I.map(function(j){return new a.Level(j)})},y.onAudioTrackSwitching=function(b,_){var I=!!_.url;this.trackId=_.id;var j=this.fragCurrent;j!=null&&j.loader&&j.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),I?this.setInterval(v):this.resetTransmuxer(),I?(this.audioSwitch=!0,this.state=h.State.IDLE):this.state=h.State.STOPPED,this.tick()},y.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},y.onLevelLoaded=function(b,_){this.mainDetails=_.details},y.onAudioTrackLoaded=function(b,_){var I,j=this.levels,M=_.details,G=_.id;if(!j){this.warn("Audio tracks were reset while loading level "+G);return}this.log("Track "+G+" loaded ["+M.startSN+","+M.endSN+"],duration:"+M.totalduration);var K=j[G],H=0;if(M.live||(I=K.details)!==null&&I!==void 0&&I.live){var z=this.mainDetails;if(M.fragments[0]||(M.deltaUpdateFailed=!0),M.deltaUpdateFailed||!z)return;!K.details&&M.hasProgramDateTime&&z.hasProgramDateTime?(Object(p.alignMediaPlaylistByPDT)(M,z),H=M.fragments[0].start):H=this.alignPlaylists(M,K.details)}K.details=M,this.levelLastLoaded=G,!this.startFragRequested&&(this.mainDetails||!M.live)&&this.setStartPosition(K.details,H),this.state===h.State.WAITING_TRACK&&!this.waitForCdnTuneIn(M)&&(this.state=h.State.IDLE),this.tick()},y._handleFragmentLoadProgress=function(b){var _,I=b.frag,j=b.part,M=b.payload,G=this.config,K=this.trackId,H=this.levels;if(!H){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+I.sn+" of level "+I.level+" will not be buffered");return}var z=H[K];console.assert(z,"Audio track is defined on fragment load progress");var B=z.details;console.assert(B,"Audio track details are defined on fragment load progress");var W=G.defaultAudioCodec||z.audioCodec||"mp4a.40.2",F=this.transmuxer;F||(F=this.transmuxer=new g.default(this.hls,o.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var $=this.initPTS[I.cc],ee=(_=I.initSegment)===null||_===void 0?void 0:_.data;if($!==void 0){var Z=!1,ve=j?j.index:-1,he=ve!==-1,le=new m.ChunkMetadata(I.level,I.sn,I.stats.chunkCount,M.byteLength,ve,he);F.push(M,ee,W,"",I,j,B.totalduration,Z,le,$)}else{n.logger.log("Unknown video PTS for cc "+I.cc+", waiting for video PTS before demuxing audio frag "+I.sn+" of ["+B.startSN+" ,"+B.endSN+"],track "+K);var Re=this.waitingData=this.waitingData||{frag:I,part:j,cache:new x.default,complete:!1},xe=Re.cache;xe.push(new Uint8Array(M)),this.waitingVideoCC=this.videoTrackCC,this.state=h.State.WAITING_INIT_PTS}},y._handleFragmentLoadComplete=function(b){if(this.waitingData){this.waitingData.complete=!0;return}L.prototype._handleFragmentLoadComplete.call(this,b)},y.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},y.onBufferCreated=function(b,_){var I=_.tracks.audio;I&&(this.mediaBuffer=I.buffer),_.tracks.video&&(this.videoBuffer=_.tracks.video.buffer)},y.onFragBuffered=function(b,_){var I=_.frag,j=_.part;if(I.type!==o.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(I)){this.warn("Fragment "+I.sn+(j?" p: "+j.index:"")+" of level "+I.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}I.sn!=="initSegment"&&(this.fragPrevious=I,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(s.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(I,j)},y.onError=function(b,_){switch(_.details){case f.ErrorDetails.FRAG_LOAD_ERROR:case f.ErrorDetails.FRAG_LOAD_TIMEOUT:case f.ErrorDetails.KEY_LOAD_ERROR:case f.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(o.PlaylistLevelType.AUDIO,_);break;case f.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case f.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 f.ErrorDetails.BUFFER_FULL_ERROR:if(_.parent==="audio"&&(this.state===h.State.PARSING||this.state===h.State.PARSED)){var I=!0,j=this.getFwdBufferInfo(this.mediaBuffer,o.PlaylistLevelType.AUDIO);j&&j.len>.5&&(I=!this.reduceMaxBufferLength(j.len)),I&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},y.onBufferFlushed=function(b,_){var I=_.type;I===r.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},y._handleTransmuxComplete=function(b){var _,I="audio",j=this.hls,M=b.remuxResult,G=b.chunkMeta,K=this.getCurrentContext(G);if(!K){this.warn("The loading context changed while buffering fragment "+G.sn+" of level "+G.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(G.level);return}var H=K.frag,z=K.part,B=M.audio,W=M.text,F=M.id3,$=M.initSegment;if(this.fragContextChanged(H))return;if(this.state=h.State.PARSING,this.audioSwitch&&B&&this.completeAudioSwitch(),$!=null&&$.tracks&&(this._bufferInitSegment($.tracks,H,G),j.trigger(s.Events.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:I,tracks:$.tracks})),B){var ee=B.startPTS,Z=B.endPTS,ve=B.startDTS,he=B.endDTS;z&&(z.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:ee,endPTS:Z,startDTS:ve,endDTS:he}),H.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,ee,Z,ve,he),this.bufferFragmentData(B,H,z,G)}if(F!=null&&(_=F.samples)!==null&&_!==void 0&&_.length){var le=l({frag:H,id:I},F);j.trigger(s.Events.FRAG_PARSING_METADATA,le)}if(W){var Re=l({frag:H,id:I},W);j.trigger(s.Events.FRAG_PARSING_USERDATA,Re)}},y._bufferInitSegment=function(b,_,I){if(this.state!==h.State.PARSING)return;b.video&&delete b.video;var j=b.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(s.Events.BUFFER_CODECS,b);var M=j.initSegment;if(M!=null&&M.byteLength){var G={type:"audio",frag:_,part:null,chunkMeta:I,parent:_.type,data:M};this.hls.trigger(s.Events.BUFFER_APPENDING,G)}this.tick()},y.loadFragment=function(b,_,I){var j=this.fragmentTracker.getState(b);this.fragCurrent=b,(this.audioSwitch||j===d.FragmentState.NOT_LOADED||j===d.FragmentState.PARTIAL)&&(b.sn==="initSegment"?this._loadInitSegment(b):_.live&&!Object(R.isFiniteNumber)(this.initPTS[b.cc])?(this.log("Waiting for video PTS in continuity counter "+b.cc+" of live stream before loading audio fragment "+b.sn+" of level "+this.trackId),this.state=h.State.WAITING_INIT_PTS):(this.startFragRequested=!0,L.prototype.loadFragment.call(this,b,_,I)))},y.completeAudioSwitch=function(){var b=this.hls,_=this.media,I=this.trackId;_&&(this.log("Switching audio track : flushing all audio"),L.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,b.trigger(s.Events.AUDIO_TRACK_SWITCHED,{id:I})},A}(h.default);u.default=i},"./src/controller/audio-track-controller.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/events.ts"),h=C("./src/errors.ts"),s=C("./src/controller/base-playlist-controller.ts"),S=C("./src/types/loader.ts");function d(g,m){for(var w=0;w=n.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var l=n[this.trackId];this.log("Now switching to audio-track index "+f);var c=n[f],T=c.id,v=c.groupId,i=v===void 0?"":v,L=c.name,A=c.type,y=c.url;if(this.trackId=f,this.trackName=L,this.selectDefaultTrack=!1,this.hls.trigger(R.Events.AUDIO_TRACK_SWITCHING,{id:T,groupId:i,name:L,type:A,url:y}),c.details&&!c.details.live)return;var E=this.switchParams(c.url,l==null?void 0:l.details);this.loadPlaylist(E)},w.selectInitialTrack=function(){var f=this.tracksInGroup;console.assert(f.length,"Initial audio track should be selected when tracks are known");var n=this.trackName,l=this.findTrackId(n)||this.findTrackId();l!==-1?this.setAudioTrack(l):(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}))},w.findTrackId=function(f){for(var n=this.tracksInGroup,l=0;lm.partTarget&&(c+=1)}if(Object(R.isFiniteNumber)(l))return new h.HlsUrlParameters(l,Object(R.isFiniteNumber)(c)?c:void 0,h.HlsSkip.No)}}},r.loadPlaylist=function(g){},r.shouldLoadTrack=function(g){return this.canLoad&&g&&!!g.url&&(!g.details||g.details.live)},r.playlistLoaded=function(g,m,w){var p=this,f=m.details,n=m.stats,l=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(f.advancedDateTime=Date.now()-l,f.live||w!=null&&w.live){if(f.reloaded(w),w&&this.log("live playlist "+g+" "+(f.advanced?"REFRESHED "+f.lastPartSn+"-"+f.lastPartIndex:"MISSED")),w&&f.fragments.length>0&&Object(s.mergeDetails)(w,f),!this.canLoad||!f.live)return;var c,T=void 0,v=void 0;if(f.canBlockReload&&f.endSN&&f.advanced){var i=this.hls.config.lowLatencyMode,L=f.lastPartSn,A=f.endSN,y=f.lastPartIndex,E=y!==-1,b=L===A,_=i?0:y;E?(T=b?A+1:L,v=b?_:y+1):T=A+1;var I=f.age,j=I+f.ageHeader,M=Math.min(j-f.partTarget,f.targetduration*1.5);if(M>0){if(w&&M>w.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+w.tuneInGoal+" to: "+M+" with playlist age: "+f.age),M=0;else{var G=Math.floor(M/f.targetduration);if(T+=G,v!==void 0){var K=Math.round(M%f.targetduration/f.partTarget);v+=K}this.log("CDN Tune-in age: "+f.ageHeader+"s last advanced "+I.toFixed(2)+"s goal: "+M+" skip sn "+G+" to part "+v)}f.tuneInGoal=M}if(c=this.getDeliveryDirectives(f,m.deliveryDirectives,T,v),i||!b){this.loadPlaylist(c);return}}else c=this.getDeliveryDirectives(f,m.deliveryDirectives,T,v);var H=Object(s.computeReloadInterval)(f,n);T!==void 0&&f.canBlockReload&&(H-=f.partTarget||1),this.log("reload live playlist "+g+" in "+Math.round(H)+" ms"),this.timer=self.setTimeout(function(){return p.loadPlaylist(c)},H)}else this.clearTimer()},r.getDeliveryDirectives=function(g,m,w,p){var f=Object(h.getSkipValue)(g,w);return m!=null&&m.skip&&g.deltaUpdateFailed&&(w=m.msn,p=m.part,f=h.HlsSkip.No),new h.HlsUrlParameters(w,p,f)},r.retryLoadingOrFail=function(g){var m=this,w=this.hls.config,p=this.retryCount-1&&(f=g.context)!==null&&f!==void 0&&f.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+g.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*w.levelLoadingRetryDelay,w.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return m.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+g.details+'"')}}else this.warn('cannot recover from error "'+g.details+'"'),this.clearTimer(),g.fatal=!0;return p},o}()},"./src/controller/base-stream-controller.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"State",function(){return A}),C.d(u,"default",function(){return y});var R=C("./src/polyfills/number.ts"),h=C("./src/task-loop.ts"),s=C("./src/controller/fragment-tracker.ts"),S=C("./src/utils/buffer-helper.ts"),d=C("./src/utils/logger.ts"),a=C("./src/events.ts"),o=C("./src/errors.ts"),r=C("./src/types/transmuxer.ts"),x=C("./src/utils/mp4-tools.ts"),g=C("./src/utils/discontinuities.ts"),m=C("./src/controller/fragment-finders.ts"),w=C("./src/controller/level-helper.ts"),p=C("./src/loader/fragment-loader.ts"),f=C("./src/crypt/decrypter.ts"),n=C("./src/utils/time-ranges.ts"),l=C("./src/types/loader.ts");function c(E,b){for(var _=0;_$;(z0&&z&&z.key&&z.iv&&z.method==="AES-128"){var B=self.performance.now();return M.decrypter.webCryptoDecrypt(new Uint8Array(H),z.key.buffer,z.iv.buffer).then(function(W){var F=self.performance.now();return K.trigger(a.Events.FRAG_DECRYPTED,{frag:j,payload:W,stats:{tstart:B,tdecrypt:F}}),G.payload=W,G})}return G}).then(function(G){var K=M.fragCurrent,H=M.hls,z=M.levels;if(!z)throw new Error("init load aborted, missing levels");var B=z[j.level].details;console.assert(B,"Level details are defined when init segment is loaded");var W=j.stats;M.state=A.IDLE,M.fragLoadError=0,j.data=new Uint8Array(G.payload),W.parsing.start=W.buffering.start=self.performance.now(),W.parsing.end=W.buffering.end=self.performance.now(),G.frag===K&&H.trigger(a.Events.FRAG_BUFFERED,{stats:W,frag:K,part:null,id:j.type}),M.tick()}).catch(function(G){M.warn(G),M.resetFragmentLoading(j)})},_.fragContextChanged=function(j){var M=this.fragCurrent;return!j||!M||j.level!==M.level||j.sn!==M.sn||j.urlId!==M.urlId},_.fragBufferedComplete=function(j,M){var G=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+j.type+" sn: "+j.sn+(M?" part: "+M.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+j.level+" "+n.default.toString(S.BufferHelper.getBuffered(G))),this.state=A.IDLE,this.tick()},_._handleFragmentLoadComplete=function(j){var M=this.transmuxer;if(!M)return;var G=j.frag,K=j.part,H=j.partsLoaded,z=!H||H.length===0||H.some(function(W){return!W}),B=new r.ChunkMetadata(G.level,G.sn,G.stats.chunkCount+1,0,K?K.index:-1,!z);M.flush(B)},_._handleFragmentLoadProgress=function(j){},_._doFragLoad=function(j,M,G,K){var H=this;if(G===void 0&&(G=null),!this.levels)throw new Error("frag load aborted, missing levels");if(G=Math.max(j.start,G||0),this.config.lowLatencyMode&&M){var z=M.partList;if(z&&K){G>j.end&&M.fragmentHint&&(j=M.fragmentHint);var B=this.getNextPart(z,j,G);if(B>-1){var W=z[B];return this.log("Loading part sn: "+j.sn+" p: "+W.index+" cc: "+j.cc+" of playlist ["+M.startSN+"-"+M.endSN+"] parts [0-"+B+"-"+(z.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+j.level+", target: "+parseFloat(G.toFixed(3))),this.nextLoadPosition=W.start+W.duration,this.state=A.FRAG_LOADING,this.hls.trigger(a.Events.FRAG_LOADING,{frag:j,part:z[B],targetBufferTime:G}),this.doFragPartsLoad(j,z,B,K).catch(function(F){return H.handleFragLoadError(F)})}else if(!j.url||this.loadedEndOfParts(z,G))return Promise.resolve(null)}}return this.log("Loading fragment "+j.sn+" cc: "+j.cc+" "+(M?"of ["+M.startSN+"-"+M.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+j.level+", target: "+parseFloat(G.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:G}),this.fragmentLoader.load(j,K).catch(function(F){return H.handleFragLoadError(F)})},_.doFragPartsLoad=function(j,M,G,K){var H=this;return new Promise(function(z,B){var W=[],F=function $(ee){var Z=M[ee];H.fragmentLoader.loadPart(j,Z,K).then(function(ve){W[Z.index]=ve;var he=ve.part;H.hls.trigger(a.Events.FRAG_LOADED,ve);var le=M[ee+1];if(le&&le.fragment===j)$(ee+1);else return z({frag:j,part:he,partsLoaded:W})}).catch(B)};F(G)})},_.handleFragLoadError=function(j){var M=j.data;return M&&M.details===o.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(M.frag,M.part):this.hls.trigger(a.Events.ERROR,M),null},_._handleTransmuxerFlush=function(j){var M=this.getCurrentContext(j);if(!M||this.state!==A.PARSING){this.fragCurrent||(this.state=A.IDLE);return}var G=M.frag,K=M.part,H=M.level,z=self.performance.now();G.stats.parsing.end=z,K&&(K.stats.parsing.end=z),this.updateLevelTiming(G,K,H,j.partial)},_.getCurrentContext=function(j){var M=this.levels,G=j.level,K=j.sn,H=j.part;if(!M||!M[G])return this.warn("Levels object was unset while buffering fragment "+K+" of level "+G+". The current chunk will not be buffered."),null;var z=M[G],B=H>-1?Object(w.getPartWith)(z,K,H):null,W=B?B.fragment:Object(w.getFragmentWithSN)(z,K,this.fragCurrent);return W?{frag:W,part:B,level:z}:null},_.bufferFragmentData=function(j,M,G,K){if(!j||this.state!==A.PARSING)return;var H=j.data1,z=j.data2,B=H;if(H&&z&&(B=Object(x.appendUint8Array)(H,z)),!B||!B.length)return;var W={type:j.type,frag:M,part:G,chunkMeta:K,parent:M.type,data:B};this.hls.trigger(a.Events.BUFFER_APPENDING,W),j.dropped&&j.independent&&!G&&this.flushBufferGap(M)},_.flushBufferGap=function(j){var M=this.media;if(!M)return;if(!S.BufferHelper.isBuffered(M,M.currentTime)){this.flushMainBuffer(0,j.start);return}var G=M.currentTime,K=S.BufferHelper.bufferInfo(M,G,0),H=j.duration,z=Math.min(this.config.maxFragLookUpTolerance*2,H*.25),B=Math.max(Math.min(j.start-z,K.end-z),G+z);j.start-B>z&&this.flushMainBuffer(B,j.start)},_.getFwdBufferInfo=function(j,M){var G=this.config,K=this.getLoadPosition();if(!Object(R.isFiniteNumber)(K))return null;var H=S.BufferHelper.bufferInfo(j,K,G.maxBufferHole);if(H.len===0&&H.nextStart!==void 0){var z=this.fragmentTracker.getBufferedFrag(K,M);if(z&&H.nextStart=G?(M.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+M.maxMaxBufferLength+"s"),!0):!1},_.getNextFragment=function(j,M){var G,K,H=M.fragments,z=H.length;if(!z)return null;var B=this.config,W=H[0].start,F;if(M.live){var $=B.initialLiveManifestSize;if(z<$)return this.warn("Not enough fragments to start playback (have: "+z+", need: "+$+")"),null;!M.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(F=this.getInitialLiveFragment(M,H),this.startPosition=F?this.hls.liveSyncPosition||F.start:j)}else j<=W&&(F=H[0]);if(!F){var ee=B.lowLatencyMode?M.partEnd:M.fragmentEnd;F=this.getFragmentAtPosition(j,ee,M)}return(G=F)!==null&&G!==void 0&&G.initSegment&&!((K=F)!==null&&K!==void 0&&K.initSegment.data)&&!this.bitrateTest&&(F=F.initSegment),F},_.getNextPart=function(j,M,G){for(var K=-1,H=!1,z=!0,B=0,W=j.length;B-1&&GG.start&&G.loaded},_.getInitialLiveFragment=function(j,M){var G=this.fragPrevious,K=null;if(G){if(j.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+G.programDateTime),K=Object(m.findFragmentByPDT)(M,G.endProgramDateTime,this.config.maxFragLookUpTolerance)),!K){var H=G.sn+1;if(H>=j.startSN&&H<=j.endSN){var z=M[H-j.startSN];G.cc===z.cc&&(K=z,this.log("Live playlist, switching playlist, load frag with next SN: "+K.sn))}K||(K=Object(m.findFragWithCC)(M,G.cc),K&&this.log("Live playlist, switching playlist, load frag with same CC: "+K.sn))}}else{var B=this.hls.liveSyncPosition;B!==null&&(K=this.getFragmentAtPosition(B,this.bitrateTest?j.fragmentEnd:j.edge,j))}return K},_.getFragmentAtPosition=function(j,M,G){var K=this.config,H=this.fragPrevious,z=G.fragments,B=G.endSN,W=G.fragmentHint,F=K.maxFragLookUpTolerance,$=!!(K.lowLatencyMode&&G.partList&&W);$&&W&&!this.bitrateTest&&(z=z.concat(W),B=W.sn);var ee;if(jM-F?0:F;ee=Object(m.findFragmentByPTS)(H,z,j,Z)}else ee=z[z.length-1];if(ee){var ve=ee.sn-G.startSN,he=H&&ee.level===H.level,le=z[ve+1],Re=this.fragmentTracker.getState(ee);if(Re===s.FragmentState.BACKTRACKED){ee=null;for(var xe=ve;z[xe]&&this.fragmentTracker.getState(z[xe])===s.FragmentState.BACKTRACKED;)H?ee=z[xe--]:ee=z[--xe];ee||(ee=le)}else H&&ee.sn===H.sn&&!$&&(he&&(ee.sn=z-M.maxFragLookUpTolerance&&H<=B;if(K!==null&&G.duration>K&&(H"+j.startSN+" prev-sn: "+(H?H.sn:"na")+" fragments: "+B),ee}return W},_.waitForCdnTuneIn=function(j){var M=3;return j.live&&j.canBlockReload&&j.tuneInGoal>Math.max(j.partHoldBack,j.partTarget*M)},_.setStartPosition=function(j,M){var G=this.startPosition;if(G"+j))}}]),b}(h.default)},"./src/controller/buffer-controller.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return m});var R=C("./src/polyfills/number.ts"),h=C("./src/events.ts"),s=C("./src/utils/logger.ts"),S=C("./src/errors.ts"),d=C("./src/utils/buffer-helper.ts"),a=C("./src/utils/mediasource-helper.ts"),o=C("./src/loader/fragment.ts"),r=C("./src/controller/buffer-operation-queue.ts"),x=Object(a.getMediaSource)(),g=/([ha]vc.)(?:\.[^.,]+)+/,m=function(){function w(f){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 l=n.hls,c=n.media,T=n.mediaSource;s.logger.log("[buffer-controller]: Media source opened"),c&&(n.updateMediaElementDuration(),l.trigger(h.Events.MEDIA_ATTACHED,{media:c})),T&&T.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},this._onMediaSourceClose=function(){s.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){s.logger.log("[buffer-controller]: Media source ended")},this.hls=f,this._initSourceBuffer(),this.registerListeners()}var p=w.prototype;return p.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},p.destroy=function(){this.unregisterListeners(),this.details=null},p.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)},p.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)},p._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new r.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},p.onManifestParsed=function(n,l){var c=2;(l.audio&&!l.video||!l.altAudio)&&(c=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=c,this.details=null,s.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},p.onMediaAttaching=function(n,l){var c=this.media=l.media;if(c&&x){var T=this.mediaSource=new x;T.addEventListener("sourceopen",this._onMediaSourceOpen),T.addEventListener("sourceended",this._onMediaSourceEnded),T.addEventListener("sourceclose",this._onMediaSourceClose),c.src=self.URL.createObjectURL(T),this._objectUrl=c.src}},p.onMediaDetaching=function(){var n=this.media,l=this.mediaSource,c=this._objectUrl;if(l){if(s.logger.log("[buffer-controller]: media source detaching"),l.readyState==="open")try{l.endOfStream()}catch(T){s.logger.warn("[buffer-controller]: onMediaDetaching: "+T.message+" while calling endOfStream")}this.onBufferReset(),l.removeEventListener("sourceopen",this._onMediaSourceOpen),l.removeEventListener("sourceended",this._onMediaSourceEnded),l.removeEventListener("sourceclose",this._onMediaSourceClose),n&&(c&&self.URL.revokeObjectURL(c),n.src===c?(n.removeAttribute("src"),n.load()):s.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)},p.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(l){var c=n.sourceBuffer[l];try{c&&(n.removeBufferListeners(l),n.mediaSource&&n.mediaSource.removeSourceBuffer(c),n.sourceBuffer[l]=void 0)}catch(T){s.logger.warn("[buffer-controller]: Failed to reset the "+l+" buffer",T)}}),this._initSourceBuffer()},p.onBufferCodecs=function(n,l){var c=this,T=this.getSourceBufferTypes().length;if(Object.keys(l).forEach(function(v){if(T){var i=c.tracks[v];if(i&&typeof i.buffer.changeType=="function"){var L=l[v],A=L.codec,y=L.levelCodec,E=L.container,b=(i.levelCodec||i.codec).replace(g,"$1"),_=(y||A).replace(g,"$1");if(b!==_){var I=E+";codecs="+(y||A);c.appendChangeType(v,I)}}}else c.pendingTracks[v]=l[v]}),T)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},p.appendChangeType=function(n,l){var c=this,T=this.operationQueue,v={execute:function(){var L=c.sourceBuffer[n];L&&(s.logger.log("[buffer-controller]: changing "+n+" sourceBuffer type to "+l),L.changeType(l)),T.shiftAndExecuteNext(n)},onStart:function(){},onComplete:function(){},onError:function(L){s.logger.warn("[buffer-controller]: Failed to change "+n+" SourceBuffer type",L)}};T.append(v,n)},p.onBufferAppending=function(n,l){var c=this,T=this.hls,v=this.operationQueue,i=this.tracks,L=l.data,A=l.type,y=l.frag,E=l.part,b=l.chunkMeta,_=b.buffering[A],I=self.performance.now();_.start=I;var j=y.stats.buffering,M=E?E.stats.buffering:null;j.start===0&&(j.start=I),M&&M.start===0&&(M.start=I);var G=i.audio,K=A==="audio"&&b.id===1&&(G==null?void 0:G.container)==="audio/mpeg",H={execute:function(){if(_.executeStart=self.performance.now(),K){var B=c.sourceBuffer[A];if(B){var W=y.start-B.timestampOffset;Math.abs(W)>=.1&&(s.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+y.start+" (delta: "+W+") sn: "+y.sn+")"),B.timestampOffset=y.start)}}c.appendExecutor(L,A)},onStart:function(){},onComplete:function(){var B=self.performance.now();_.executeEnd=_.end=B,j.first===0&&(j.first=B),M&&M.first===0&&(M.first=B);var W=c.sourceBuffer,F={};for(var $ in W)F[$]=d.BufferHelper.getBuffered(W[$]);c.appendError=0,c.hls.trigger(h.Events.BUFFER_APPENDED,{type:A,frag:y,part:E,chunkMeta:b,parent:y.type,timeRanges:F})},onError:function(B){s.logger.error("[buffer-controller]: Error encountered while trying to append to the "+A+" SourceBuffer",B);var W={type:S.ErrorTypes.MEDIA_ERROR,parent:y.type,details:S.ErrorDetails.BUFFER_APPEND_ERROR,err:B,fatal:!1};B.code===DOMException.QUOTA_EXCEEDED_ERR?W.details=S.ErrorDetails.BUFFER_FULL_ERROR:(c.appendError++,W.details=S.ErrorDetails.BUFFER_APPEND_ERROR,c.appendError>T.config.appendErrorMaxRetry&&(s.logger.error("[buffer-controller]: Failed "+T.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),W.fatal=!0)),T.trigger(h.Events.ERROR,W)}};v.append(H,A)},p.onBufferFlushing=function(n,l){var c=this,T=this.operationQueue,v=function(L){return{execute:c.removeExecutor.bind(c,L,l.startOffset,l.endOffset),onStart:function(){},onComplete:function(){c.hls.trigger(h.Events.BUFFER_FLUSHED,{type:L})},onError:function(y){s.logger.warn("[buffer-controller]: Failed to remove from "+L+" SourceBuffer",y)}}};l.type?T.append(v(l.type),l.type):this.getSourceBufferTypes().forEach(function(i){T.append(v(i),i)})},p.onFragParsed=function(n,l){var c=this,T=l.frag,v=l.part,i=[],L=v?v.elementaryStreams:T.elementaryStreams;L[o.ElementaryStreamTypes.AUDIOVIDEO]?i.push("audiovideo"):(L[o.ElementaryStreamTypes.AUDIO]&&i.push("audio"),L[o.ElementaryStreamTypes.VIDEO]&&i.push("video"));var A=function(){var E=self.performance.now();T.stats.buffering.end=E,v&&(v.stats.buffering.end=E);var b=v?v.stats:T.stats;c.hls.trigger(h.Events.FRAG_BUFFERED,{frag:T,part:v,stats:b,id:T.type})};i.length===0&&s.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+T.type+" level: "+T.level+" sn: "+T.sn),this.blockBuffers(A,i)},p.onFragChanged=function(n,l){this.flushBackBuffer()},p.onBufferEos=function(n,l){var c=this,T=this.getSourceBufferTypes().reduce(function(v,i){var L=c.sourceBuffer[i];return(!l.type||l.type===i)&&(L&&!L.ended&&(L.ended=!0,s.logger.log("[buffer-controller]: "+i+" sourceBuffer now EOS"))),v&&!!(!L||L.ended)},!0);T&&this.blockBuffers(function(){var v=c.mediaSource;if(!v||v.readyState!=="open")return;v.endOfStream()})},p.onLevelUpdated=function(n,l){var c=l.details;if(!c.fragments.length)return;this.details=c,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},p.flushBackBuffer=function(){var n=this.hls,l=this.details,c=this.media,T=this.sourceBuffer;if(!c||l===null)return;var v=this.getSourceBufferTypes();if(!v.length)return;var i=l.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(R.isFiniteNumber)(i)||i<0)return;var L=c.currentTime,A=l.levelTargetDuration,y=Math.max(i,A),E=Math.floor(L/A)*A-y;v.forEach(function(b){var _=T[b];if(_){var I=d.BufferHelper.getBuffered(_);I.length>0&&E>I.start(0)&&(n.trigger(h.Events.BACK_BUFFER_REACHED,{bufferEnd:E}),l.live&&n.trigger(h.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:E}),n.trigger(h.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:E,type:b}))}})},p.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,l=this.hls,c=this.media,T=this.mediaSource,v=n.fragments[0].start+n.totalduration,i=c.duration,L=Object(R.isFiniteNumber)(T.duration)?T.duration:0;n.live&&l.config.liveDurationInfinity?(s.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),T.duration=Infinity,this.updateSeekableRange(n)):(v>L&&v>i||!Object(R.isFiniteNumber)(i))&&(s.logger.log("[buffer-controller]: Updating Media Source duration to "+v.toFixed(3)),T.duration=v)},p.updateSeekableRange=function(n){var l=this.mediaSource,c=n.fragments,T=c.length;if(T&&n.live&&l!==null&&l!==void 0&&l.setLiveSeekableRange){var v=Math.max(0,c[0].start),i=Math.max(v,v+n.totalduration);l.setLiveSeekableRange(v,i)}},p.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,l=this.operationQueue,c=this.pendingTracks,T=Object.keys(c).length;if(T&&!n||T===2){this.createSourceBuffers(c),this.pendingTracks={};var v=this.getSourceBufferTypes();if(v.length===0){this.hls.trigger(h.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}v.forEach(function(i){l.executeNext(i)})}},p.createSourceBuffers=function(n){var l=this.sourceBuffer,c=this.mediaSource;if(!c)throw Error("createSourceBuffers called when mediaSource was null");var T=0;for(var v in n)if(!l[v]){var i=n[v];if(!i)throw Error("source buffer exists for track "+v+", however track does not");var L=i.levelCodec||i.codec,A=i.container+";codecs="+L;s.logger.log("[buffer-controller]: creating sourceBuffer("+A+")");try{var y=l[v]=c.addSourceBuffer(A),E=v;this.addBufferListener(E,"updatestart",this._onSBUpdateStart),this.addBufferListener(E,"updateend",this._onSBUpdateEnd),this.addBufferListener(E,"error",this._onSBUpdateError),this.tracks[v]={buffer:y,codec:L,container:i.container,levelCodec:i.levelCodec,id:i.id},T++}catch(b){s.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+b.message),this.hls.trigger(h.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:b,mimeType:A})}}T&&this.hls.trigger(h.Events.BUFFER_CREATED,{tracks:this.tracks})},p._onSBUpdateStart=function(n){var l=this.operationQueue,c=l.current(n);c.onStart()},p._onSBUpdateEnd=function(n){var l=this.operationQueue,c=l.current(n);c.onComplete(),l.shiftAndExecuteNext(n)},p._onSBUpdateError=function(n,l){s.logger.error("[buffer-controller]: "+n+" SourceBuffer error",l),this.hls.trigger(h.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var c=this.operationQueue.current(n);c&&c.onError(l)},p.removeExecutor=function(n,l,c){var T=this.media,v=this.mediaSource,i=this.operationQueue,L=this.sourceBuffer,A=L[n];if(!T||!v||!A){s.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),i.shiftAndExecuteNext(n);return}var y=Object(R.isFiniteNumber)(T.duration)?T.duration:Infinity,E=Object(R.isFiniteNumber)(v.duration)?v.duration:Infinity,b=Math.max(0,l),_=Math.min(c,y,E);_>b?(s.logger.log("[buffer-controller]: Removing ["+b+","+_+"] from the "+n+" SourceBuffer"),console.assert(!A.updating,n+" sourceBuffer must not be updating"),A.remove(b,_)):i.shiftAndExecuteNext(n)},p.appendExecutor=function(n,l){var c=this.operationQueue,T=this.sourceBuffer,v=T[l];if(!v){s.logger.warn("[buffer-controller]: Attempting to append to the "+l+" SourceBuffer, but it does not exist"),c.shiftAndExecuteNext(l);return}v.ended=!1,console.assert(!v.updating,l+" sourceBuffer must not be updating"),v.appendBuffer(n)},p.blockBuffers=function(n,l){var c=this;if(l===void 0&&(l=this.getSourceBufferTypes()),!l.length){s.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(n);return}var T=this.operationQueue,v=l.map(function(i){return T.appendBlocker(i)});Promise.all(v).then(function(){n(),l.forEach(function(i){var L=c.sourceBuffer[i];(!L||!L.updating)&&T.shiftAndExecuteNext(i)})})},p.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},p.addBufferListener=function(n,l,c){var T=this.sourceBuffer[n];if(!T)return;var v=c.bind(this,n);this.listeners[n].push({event:l,listener:v}),T.addEventListener(l,v)},p.removeBufferListeners=function(n){var l=this.sourceBuffer[n];if(!l)return;this.listeners[n].forEach(function(c){l.removeEventListener(c.event,c.listener)})},w}()},"./src/controller/buffer-operation-queue.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return h});var R=C("./src/utils/logger.ts"),h=function(){function s(d){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=d}var S=s.prototype;return S.append=function(a,o){var r=this.queues[o];r.push(a),r.length===1&&this.buffers[o]&&this.executeNext(o)},S.insertAbort=function(a,o){var r=this.queues[o];r.unshift(a),this.executeNext(o)},S.appendBlocker=function(a){var o,r=new Promise(function(g){o=g}),x={execute:o,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(x,a),r},S.executeNext=function(a){var o=this.buffers,r=this.queues,x=o[a],g=r[a];if(g.length){var m=g[0];try{m.execute()}catch(w){R.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),m.onError(w),(!x||!x.updating)&&(g.shift(),this.executeNext(a))}}},S.shiftAndExecuteNext=function(a){this.queues[a].shift(),this.executeNext(a)},S.current=function(a){return this.queues[a][0]},s}()},"./src/controller/cap-level-controller.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/events.ts");function h(d,a){for(var o=0;o0&&this.mediaWidth>0){var r=this.hls.levels;if(r.length){var x=this.hls;x.autoLevelCapping=this.getMaxLevel(r.length-1),x.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=x.autoLevelCapping}}},a.getMaxLevel=function(r){var x=this,g=this.hls.levels;if(!g.length)return-1;var m=g.filter(function(w,p){return d.isLevelAllowed(p,x.restrictedLevels)&&p<=r});return this.clientRect=null,d.getMaxLevelByMediaSize(m,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,x={width:0,height:0};if(r){var g=r.getBoundingClientRect();x.width=g.width,x.height=g.height,!x.width&&!x.height&&(x.width=g.right-g.left||r.width||0,x.height=g.bottom-g.top||r.height||0)}return this.clientRect=x,x},d.isLevelAllowed=function(r,x){return x===void 0&&(x=[]),x.indexOf(r)===-1},d.getMaxLevelByMediaSize=function(r,x,g){if(!r||!r.length)return-1;for(var m=function(l,c){return c?l.width!==c.width||l.height!==c.height:!0},w=r.length-1,p=0;p=x||f.height>=g)&&m(f,r[p+1])){w=p;break}}return w},s(d,[{key:"mediaWidth",get:function(){return this.getDimensions().width*d.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*d.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var r=1;try{r=self.devicePixelRatio}catch(x){}return r}}]),d}();u.default=S},"./src/controller/cmcd-controller.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return m});var R=C("./src/events.ts"),h=C("./src/types/cmcd.ts"),s=C("./src/utils/buffer-helper.ts"),S=C("./src/utils/logger.ts");function d(w,p){for(var f=0;f=w.length?{done:!0}:{done:!1,value:w[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(w,p){if(!w)return;if(typeof w=="string")return x(w,p);var f=Object.prototype.toString.call(w).slice(8,-1);if(f==="Object"&&w.constructor&&(f=w.constructor.name),f==="Map"||f==="Set")return Array.from(w);if(f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return x(w,p)}function x(w,p){(p==null||p>w.length)&&(p=w.length);for(var f=0,n=new Array(p);fl&&(l=i.bitrate)}return l>0?l:NaN},p.getBufferLength=function(n){var l=this.hls.media,c=n===h.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!c||!l)return NaN;var T=s.BufferHelper.bufferInfo(c,l.currentTime,this.config.maxBufferHole);return T.len*1e3},p.createPlaylistLoader=function(){var n=this.config.pLoader,l=this.applyPlaylistData,c=n||this.config.loader;return function(){function T(i){this.loader=void 0,this.loader=new c(i)}var v=T.prototype;return v.destroy=function(){this.loader.destroy()},v.abort=function(){this.loader.abort()},v.load=function(L,A,y){l(L),this.loader.load(L,A,y)},a(T,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),T}()},p.createFragmentLoader=function(){var n=this.config.fLoader,l=this.applyFragmentData,c=n||this.config.loader;return function(){function T(i){this.loader=void 0,this.loader=new c(i)}var v=T.prototype;return v.destroy=function(){this.loader.destroy()},v.abort=function(){this.loader.abort()},v.load=function(L,A,y){l(L),this.loader.load(L,A,y)},a(T,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),T}()},w.uuid=function(){var n=URL.createObjectURL(new Blob),l=n.toString();return URL.revokeObjectURL(n),l.substr(l.lastIndexOf("/")+1)},w.serialize=function(n){for(var l=[],c=function(K){return!Number.isNaN(K)&&K!=null&&K!==""&&K!==!1},T=function(K){return Math.round(K)},v=function(K){return T(K/100)*100},i=function(K){return encodeURIComponent(K)},L={br:T,d:T,bl:v,dl:v,mtp:v,nor:i,rtp:v,tb:T},A=Object.keys(n||{}).sort(),y=o(A),E;!(E=y()).done;){var b=E.value,_=n[b];if(!c(_))continue;if(b==="v"&&_===1)continue;if(b=="pr"&&_===1)continue;var I=L[b];I&&(_=I(_));var j=typeof _,M=void 0;b==="ot"||b==="sf"||b==="st"?M=b+"="+_:j==="boolean"?M=b:j==="number"?M=b+"="+_:M=b+"="+JSON.stringify(_),l.push(M)}return l.join(",")},w.toHeaders=function(n){for(var l=Object.keys(n),c={},T=["Object","Request","Session","Status"],v=[{},{},{},{}],i={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},L=0,A=l;Lo){this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var i=o-this._requestLicenseFailureCount+1;s.logger.warn("Retrying license request, "+i+" attempts left"),this._requestLicense(l,c)}break}},w._generateLicenseRequestChallenge=function(f,n){switch(f.mediaKeySystemDomain){case S.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+f.mediaKeySystemDomain)},w._requestLicense=function(f,n){s.logger.log("Requesting content license for key-system");var l=this._mediaKeysList[0];if(!l){s.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 c=this.getLicenseServerUrl(l.mediaKeySystemDomain),T=this._createLicenseXhr(c,f,n);s.logger.log("Sending license request to URL: "+c);var v=this._generateLicenseRequestChallenge(l,f);T.send(v)}catch(i){s.logger.error("Failure requesting DRM license: "+i),this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},w.onMediaAttached=function(f,n){if(!this._emeEnabled)return;var l=n.media;this._media=l,l.addEventListener("encrypted",this._onMediaEncrypted)},w.onMediaDetached=function(){var f=this._media,n=this._mediaKeysList;if(!f)return;f.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(n.map(function(l){if(l.mediaKeysSession)return l.mediaKeysSession.close().catch(function(){})})).then(function(){return f.setMediaKeys(null)}).catch(function(){})},w.onManifestParsed=function(f,n){if(!this._emeEnabled)return;var l=n.levels.map(function(T){return T.audioCodec}).filter(function(T){return!!T}),c=n.levels.map(function(T){return T.videoCodec}).filter(function(T){return!!T});this._attemptKeySystemAccess(S.KeySystems.WIDEVINE,l,c)},a(m,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),m}();u.default=g},"./src/controller/fps-controller.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/events.ts"),h=C("./src/utils/logger.ts"),s=function(){function S(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 d=S.prototype;return d.setStreamController=function(o){this.streamController=o},d.registerListeners=function(){this.hls.on(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},d.unregisterListeners=function(){this.hls.off(R.Events.MEDIA_ATTACHING,this.onMediaAttaching)},d.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},d.onMediaAttaching=function(o,r){var x=this.hls.config;if(x.capLevelOnFPSDrop){var g=r.media instanceof self.HTMLVideoElement?r.media:null;this.media=g,g&&typeof g.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),x.fpsDroppedMonitoringPeriod)}},d.checkFPS=function(o,r,x){var g=performance.now();if(r){if(this.lastTime){var m=g-this.lastTime,w=x-this.lastDroppedFrames,p=r-this.lastDecodedFrames,f=1e3*w/m,n=this.hls;if(n.trigger(R.Events.FPS_DROP,{currentDropped:w,currentDecoded:p,totalDroppedFrames:x}),f>0&&w>n.config.fpsDroppedMonitoringThreshold*p){var l=n.currentLevel;h.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+l),l>0&&(n.autoLevelCapping===-1||n.autoLevelCapping>=l)&&(l=l-1,n.trigger(R.Events.FPS_DROP_LEVEL_CAPPING,{level:l,droppedLevel:n.currentLevel}),n.autoLevelCapping=l,this.streamController.nextLevelSwitch())}}this.lastTime=g,this.lastDroppedFrames=x,this.lastDecodedFrames=r}},d.checkFPSInterval=function(){var o=this.media;if(o)if(this.isVideoPlaybackQualityAvailable){var r=o.getVideoPlaybackQuality();this.checkFPS(o,r.totalVideoFrames,r.droppedVideoFrames)}else this.checkFPS(o,o.webkitDecodedFrameCount,o.webkitDroppedFrameCount)},S}();u.default=s},"./src/controller/fragment-finders.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"findFragmentByPDT",function(){return s}),C.d(u,"findFragmentByPTS",function(){return S}),C.d(u,"fragmentWithinToleranceTest",function(){return d}),C.d(u,"pdtWithinToleranceTest",function(){return a}),C.d(u,"findFragWithCC",function(){return o});var R=C("./src/polyfills/number.ts"),h=C("./src/utils/binary-search.ts");function s(r,x,g){if(x===null||!Array.isArray(r)||!r.length||!Object(R.isFiniteNumber)(x))return null;var m=r[0].programDateTime;if(x<(m||0))return null;var w=r[r.length-1].endProgramDateTime;if(x>=(w||0))return null;g=g||0;for(var p=0;pr&&g.start?-1:0}function a(r,x,g){var m=Math.min(x,g.duration+(g.deltaPTS?g.deltaPTS:0))*1e3,w=g.endProgramDateTime||0;return w-m>r}function o(r,x){return h.default.search(r,function(g){return g.ccx?-1:0})}},"./src/controller/fragment-tracker.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"FragmentState",function(){return s}),C.d(u,"FragmentTracker",function(){return S});var R=C("./src/events.ts"),h=C("./src/types/loader.ts"),s;(function(o){o.NOT_LOADED="NOT_LOADED",o.BACKTRACKED="BACKTRACKED",o.APPENDING="APPENDING",o.PARTIAL="PARTIAL",o.OK="OK"})(s||(s={}));var S=function(){function o(x){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=x,this._registerListeners()}var r=o.prototype;return r._registerListeners=function(){var g=this.hls;g.on(R.Events.BUFFER_APPENDED,this.onBufferAppended,this),g.on(R.Events.FRAG_BUFFERED,this.onFragBuffered,this),g.on(R.Events.FRAG_LOADED,this.onFragLoaded,this)},r._unregisterListeners=function(){var g=this.hls;g.off(R.Events.BUFFER_APPENDED,this.onBufferAppended,this),g.off(R.Events.FRAG_BUFFERED,this.onFragBuffered,this),g.off(R.Events.FRAG_LOADED,this.onFragLoaded,this)},r.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},r.getAppendedFrag=function(g,m){if(m===h.PlaylistLevelType.MAIN){var w=this.activeFragment,p=this.activeParts;if(!w)return null;if(p)for(var f=p.length;f--;){var n=p[f],l=n?n.end:w.appendedPTS;if(n.start<=g&&l!==void 0&&g<=l)return f>9&&(this.activeParts=p.slice(f-9)),n}else if(w.start<=g&&w.appendedPTS!==void 0&&g<=w.appendedPTS)return w}return this.getBufferedFrag(g,m)},r.getBufferedFrag=function(g,m){for(var w=this.fragments,p=Object.keys(w),f=p.length;f--;){var n=w[p[f]];if((n==null?void 0:n.body.type)===m&&n.buffered){var l=n.body;if(l.start<=g&&g<=l.end)return l}}return null},r.detectEvictedFragments=function(g,m,w){var p=this;Object.keys(this.fragments).forEach(function(f){var n=p.fragments[f];if(!n)return;if(!n.buffered){n.body.type===w&&p.removeFragment(n.body);return}var l=n.range[g];if(!l)return;l.time.some(function(c){var T=!p.isTimeBuffered(c.startPTS,c.endPTS,m);return T&&p.removeFragment(n.body),T})})},r.detectPartialFragments=function(g){var m=this,w=this.timeRanges,p=g.frag,f=g.part;if(!w||p.sn==="initSegment")return;var n=a(p),l=this.fragments[n];if(!l)return;Object.keys(w).forEach(function(c){var T=p.elementaryStreams[c];if(!T)return;var v=w[c],i=f!==null||T.partial===!0;l.range[c]=m.getBufferedTimes(p,f,i,v)}),l.backtrack=l.loaded=null,Object.keys(l.range).length?l.buffered=!0:this.removeFragment(l.body)},r.fragBuffered=function(g){var m=a(g),w=this.fragments[m];w&&(w.backtrack=w.loaded=null,w.buffered=!0)},r.getBufferedTimes=function(g,m,w,p){for(var f={time:[],partial:w},n=m?m.start:g.start,l=m?m.end:g.end,c=g.minEndPTS||l,T=g.maxStartPTS||n,v=0;v=i&&c<=L){f.time.push({startPTS:Math.max(n,p.start(v)),endPTS:Math.min(l,p.end(v))});break}else if(ni)f.partial=!0,f.time.push({startPTS:Math.max(n,p.start(v)),endPTS:Math.min(l,p.end(v))});else if(l<=i)break}return f},r.getPartialFragment=function(g){var m=null,w,p,f,n=0,l=this.bufferPadding,c=this.fragments;return Object.keys(c).forEach(function(T){var v=c[T];if(!v)return;d(v)&&(p=v.body.start-l,f=v.body.end+l,g>=p&&g<=f&&(w=Math.min(g-p,f-g),n<=w&&(m=v.body,n=w)))}),m},r.getState=function(g){var m=a(g),w=this.fragments[m];return w?w.buffered?d(w)?s.PARTIAL:s.OK:w.backtrack?s.BACKTRACKED:s.APPENDING:s.NOT_LOADED},r.backtrack=function(g,m){var w=a(g),p=this.fragments[w];if(!p||p.backtrack)return null;var f=p.backtrack=m||p.loaded;return p.loaded=null,f},r.getBacktrackData=function(g){var m=a(g),w=this.fragments[m];if(w){var p,f=w.backtrack;if(f!=null&&(p=f.payload)!==null&&p!==void 0&&p.byteLength)return f;this.removeFragment(g)}return null},r.isTimeBuffered=function(g,m,w){for(var p,f,n=0;n=p&&m<=f)return!0;if(m<=p)return!1}return!1},r.onFragLoaded=function(g,m){var w=m.frag,p=m.part;if(w.sn==="initSegment"||w.bitrateTest||p)return;var f=a(w);this.fragments[f]={body:w,loaded:m,backtrack:null,buffered:!1,range:Object.create(null)}},r.onBufferAppended=function(g,m){var w=this,p=m.frag,f=m.part,n=m.timeRanges;if(p.type===h.PlaylistLevelType.MAIN)if(this.activeFragment=p,f){var l=this.activeParts;l||(this.activeParts=l=[]),l.push(f)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(c){var T=n[c];if(w.detectEvictedFragments(c,T),!f)for(var v=0;vg&&p.removeFragment(l)}})},r.removeFragment=function(g){var m=a(g);g.stats.loaded=0,g.clearElementaryStreamInfo(),delete this.fragments[m]},r.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},o}();function d(o){var r,x;return o.buffered&&(((r=o.range.video)===null||r===void 0?void 0:r.partial)||((x=o.range.audio)===null||x===void 0?void 0:x.partial))}function a(o){return o.type+"_"+o.level+"_"+o.urlId+"_"+o.sn}},"./src/controller/gap-controller.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"STALL_MINIMUM_DURATION_MS",function(){return d}),C.d(u,"MAX_START_GAP_JUMP",function(){return a}),C.d(u,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return o}),C.d(u,"SKIP_BUFFER_RANGE_START",function(){return r}),C.d(u,"default",function(){return x});var R=C("./src/utils/buffer-helper.ts"),h=C("./src/errors.ts"),s=C("./src/events.ts"),S=C("./src/utils/logger.ts"),d=250,a=2,o=.1,r=.05,x=function(){function g(w,p,f,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=w,this.media=p,this.fragmentTracker=f,this.hls=n}var m=g.prototype;return m.destroy=function(){this.hls=this.fragmentTracker=this.media=null},m.poll=function(p){var f=this.config,n=this.media,l=this.stalled,c=n.currentTime,T=n.seeking,v=this.seeking&&!T,i=!this.seeking&&T;if(this.seeking=T,c!==p){if(this.moved=!0,l!==null){if(this.stallReported){var L=self.performance.now()-l;S.logger.warn("playback not stuck anymore @"+c+", after "+Math.round(L)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((i||v)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!R.BufferHelper.getBuffered(n).length)return;var A=R.BufferHelper.bufferInfo(n,c,0),y=A.len>0,E=A.nextStart||0;if(!y&&!E)return;if(T){var b=A.len>a,_=!E||E-c>a&&!this.fragmentTracker.getPartialFragment(c);if(b||_)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var I,j=Math.max(E,A.start||0)-c,M=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,G=M==null||((I=M.details)===null||I===void 0)?void 0:I.live,K=G?M.details.targetduration*2:a;if(j>0&&j<=K){this._trySkipBufferHole(null);return}}var H=self.performance.now();if(l===null){this.stalled=H;return}var z=H-l;!T&&z>=d&&this._reportStall(A.len);var B=R.BufferHelper.bufferInfo(n,c,f.maxBufferHole);this._tryFixBufferStall(B,z)},m._tryFixBufferStall=function(p,f){var n=this.config,l=this.fragmentTracker,c=this.media,T=c.currentTime,v=l.getPartialFragment(T);if(v){var i=this._trySkipBufferHole(v);if(i)return}p.len>n.maxBufferHole&&f>n.highBufferWatchdogPeriod*1e3&&(S.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},m._reportStall=function(p){var f=this.hls,n=this.media,l=this.stallReported;l||(this.stallReported=!0,S.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+p+")"),f.trigger(s.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:p}))},m._trySkipBufferHole=function(p){for(var f=this.config,n=this.hls,l=this.media,c=l.currentTime,T=0,v=R.BufferHelper.getBuffered(l),i=0;i=T&&c.05&&this.forwardBufferLength>1){var i=Math.min(2,Math.max(1,n)),L=Math.round(2/(1+Math.exp(-.75*c-this.edgeStalled))*20)/20;g.playbackRate=Math.min(i,Math.max(1,L))}else g.playbackRate!==1&&g.playbackRate!==0&&(g.playbackRate=1)},r.estimateLiveEdge=function(){var g=this.levelDetails;return g===null?null:g.edge+g.age},r.computeLatency=function(){var g=this.estimateLiveEdge();return g===null?null:g-this.currentTime},d(o,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var g=this.config,m=this.levelDetails;return g.liveMaxLatencyDuration!==void 0?g.liveMaxLatencyDuration:m?g.liveMaxLatencyDurationCount*m.targetduration:0}},{key:"targetLatency",get:function(){var g=this.levelDetails;if(g===null)return null;var m=g.holdBack,w=g.partHoldBack,p=g.targetduration,f=this.config,n=f.liveSyncDuration,l=f.liveSyncDurationCount,c=f.lowLatencyMode,T=this.hls.userConfig,v=c&&w||m;(T.liveSyncDuration||T.liveSyncDurationCount||v===0)&&(v=n!==void 0?n:l*p);var i=p,L=1;return v+Math.min(this.stallCount*L,i)}},{key:"liveSyncPosition",get:function(){var g=this.estimateLiveEdge(),m=this.targetLatency,w=this.levelDetails;if(g===null||m===null||w===null)return null;var p=w.edge,f=g-m-this.edgeStalled,n=p-w.totalduration,l=p-(this.config.lowLatencyMode&&w.partTarget||w.targetduration);return Math.min(Math.max(n,f),l)}},{key:"drift",get:function(){var g=this.levelDetails;return g===null?1:g.drift}},{key:"edgeStalled",get:function(){var g=this.levelDetails;if(g===null)return 0;var m=(this.config.lowLatencyMode&&g.partTarget||g.targetduration)*3;return Math.max(g.age-m,0)}},{key:"forwardBufferLength",get:function(){var g=this.media,m=this.levelDetails;if(!g||!m)return 0;var w=g.buffered.length;return w?g.buffered.end(w-1):m.edge-this.currentTime}}]),o}()},"./src/controller/level-controller.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return f});var R=C("./src/types/level.ts"),h=C("./src/events.ts"),s=C("./src/errors.ts"),S=C("./src/utils/codecs.ts"),d=C("./src/controller/level-helper.ts"),a=C("./src/controller/base-playlist-controller.ts"),o=C("./src/types/loader.ts");function r(){return r=Object.assign||function(n){for(var l=1;l0){E=L[0].bitrate,L.sort(function(z,B){return z.bitrate-B.bitrate}),this._levels=L;for(var G=0;Gthis.hls.config.fragLoadingMaxRetry&&(b=i.frag.level)):b=i.frag.level}break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:L&&(L.deliveryDirectives&&(E=!1),b=L.level),y=!0;break;case s.ErrorDetails.REMUX_ALLOC_ERROR:b=i.level,y=!0;break}b!==void 0&&this.recoverLevel(i,b,y,E)},c.recoverLevel=function(v,i,L,A){var y=v.details,E=this._levels[i];if(E.loadError++,L){var b=this.retryLoadingOrFail(v);if(b)v.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(A){var _=E.url.length;if(_>1&&E.loadError<_)v.levelRetry=!0,this.redundantFailover(i);else if(this.manualLevelIndex===-1){var I=i===0?this._levels.length-1:i-1;this.currentLevelIndex!==I&&this._levels[I].loadError===0&&(this.warn(y+": switch to "+I),v.levelRetry=!0,this.hls.nextAutoLevel=I)}}},c.redundantFailover=function(v){var i=this._levels[v],L=i.url.length;if(L>1){var A=(i.urlId+1)%L;this.warn("Switching to redundant URL-id "+A),this._levels.forEach(function(y){y.urlId=A}),this.level=v}},c.onFragLoaded=function(v,i){var L=i.frag;if(L!==void 0&&L.type===o.PlaylistLevelType.MAIN){var A=this._levels[L.level];A!==void 0&&(A.fragmentError=0,A.loadError=0)}},c.onLevelLoaded=function(v,i){var L,A=i.level,y=i.details,E=this._levels[A];if(!E){var b;this.warn("Invalid level index "+A),(b=i.deliveryDirectives)!==null&&b!==void 0&&b.skip&&(y.deltaUpdateFailed=!0);return}A===this.currentLevelIndex?(E.fragmentError===0&&(E.loadError=0,this.retryCount=0),this.playlistLoaded(A,i,E.details)):(L=i.deliveryDirectives)!==null&&L!==void 0&&L.skip&&(y.deltaUpdateFailed=!0)},c.onAudioTrackSwitched=function(v,i){var L=this.hls.levels[this.currentLevelIndex];if(!L)return;if(L.audioGroupIds){for(var A=-1,y=this.hls.audioTracks[i.id].groupId,E=0;E0){var A=L.urlId,y=L.url[A];if(v)try{y=v.addDirectives(y)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("Attempt loading level index "+i+(v?" at sn "+v.msn+" part "+v.part:"")+" with URL-id "+A+" "+y),this.clearTimer(),this.hls.trigger(h.Events.LEVEL_LOADING,{url:y,level:i,id:A,deliveryDirectives:v||null})}},c.removeLevel=function(v,i){var L=function(E,b){return b!==i},A=this._levels.filter(function(y,E){return E!==v?!0:y.url.length>1&&i!==void 0?(y.url=y.url.filter(L),y.audioGroupIds&&(y.audioGroupIds=y.audioGroupIds.filter(L)),y.textGroupIds&&(y.textGroupIds=y.textGroupIds.filter(L)),y.urlId=0,!0):!1}).map(function(y,E){var b=y.details;return b!=null&&b.fragments&&b.fragments.forEach(function(_){_.level=E}),y});this._levels=A,this.hls.trigger(h.Events.LEVELS_UPDATED,{levels:A})},g(l,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(v){var i,L=this._levels;if(L.length===0)return;if(this.currentLevelIndex===v&&(i=L[v])!==null&&i!==void 0&&i.details)return;if(v<0||v>=L.length){var A=v<0;if(this.hls.trigger(h.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.LEVEL_SWITCH_ERROR,level:v,fatal:A,reason:"invalid level idx"}),A)return;v=Math.min(v,L.length-1)}this.clearTimer();var y=this.currentLevelIndex,E=L[y],b=L[v];this.log("switching to level "+v+" from "+y),this.currentLevelIndex=v;var _=r({},b,{level:v,maxBitrate:b.maxBitrate,uri:b.uri,urlId:b.urlId});delete _._urlId,this.hls.trigger(h.Events.LEVEL_SWITCHING,_);var I=b.details;if(!I||I.live){var j=this.switchParams(b.uri,E==null?void 0:E.details);this.loadPlaylist(j)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(v){this.manualLevelIndex=v,this._startLevel===void 0&&(this._startLevel=v),v!==-1&&(this.level=v)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(v){this._firstLevel=v}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var v=this.hls.config.startLevel;return v!==void 0?v:this._firstLevel}else return this._startLevel},set:function(v){this._startLevel=v}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(v){this.level=v,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=v)}}]),l}(a.default)},"./src/controller/level-helper.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"addGroupId",function(){return s}),C.d(u,"assignTrackIdsByGroup",function(){return S}),C.d(u,"updatePTS",function(){return d}),C.d(u,"updateFragPTSDTS",function(){return o}),C.d(u,"mergeDetails",function(){return r}),C.d(u,"mapPartIntersection",function(){return x}),C.d(u,"mapFragmentIntersection",function(){return g}),C.d(u,"adjustSliding",function(){return m}),C.d(u,"addSliding",function(){return w}),C.d(u,"computeReloadInterval",function(){return p}),C.d(u,"getFragmentWithSN",function(){return f}),C.d(u,"getPartWith",function(){return n});var R=C("./src/polyfills/number.ts"),h=C("./src/utils/logger.ts");function s(l,c,T){switch(c){case"audio":l.audioGroupIds||(l.audioGroupIds=[]),l.audioGroupIds.push(T);break;case"text":l.textGroupIds||(l.textGroupIds=[]),l.textGroupIds.push(T);break}}function S(l){var c={};l.forEach(function(T){var v=T.groupId||"";T.id=c[v]=c[v]||0,c[v]++})}function d(l,c,T){var v=l[c],i=l[T];a(v,i)}function a(l,c){var T=c.startPTS;if(Object(R.isFiniteNumber)(T)){var v=0,i;c.sn>l.sn?(v=T-l.start,i=l):(v=l.start-T,i=c),i.duration!==v&&(i.duration=v)}else if(c.sn>l.sn){var L=l.cc===c.cc;L&&l.minEndPTS?c.start=l.start+(l.minEndPTS-l.start):c.start=l.start+l.duration}else c.start=Math.max(l.start-c.duration,0)}function o(l,c,T,v,i,L){var A=v-T;A<=0&&(h.logger.warn("Fragment should have a positive duration",c),v=T+c.duration,L=i+c.duration);var y=T,E=v,b=c.startPTS,_=c.endPTS;if(Object(R.isFiniteNumber)(b)){var I=Math.abs(b-T);Object(R.isFiniteNumber)(c.deltaPTS)?c.deltaPTS=Math.max(I,c.deltaPTS):c.deltaPTS=I,y=Math.max(T,b),T=Math.min(T,b),i=Math.min(i,c.startDTS),E=Math.min(v,_),v=Math.max(v,_),L=Math.max(L,c.endDTS)}c.duration=v-T;var j=T-c.start;c.appendedPTS=v,c.start=c.startPTS=T,c.maxStartPTS=y,c.startDTS=i,c.endPTS=v,c.minEndPTS=E,c.endDTS=L;var M=c.sn;if(!l||Ml.endSN)return 0;var G,K=M-l.startSN,H=l.fragments;for(H[K]=c,G=K;G>0;G--)a(H[G],H[G-1]);for(G=K;G=0;i--){var L=v[i].initSegment;if(L){T=L;break}}l.fragmentHint&&delete l.fragmentHint.endPTS;var A=0,y;if(g(l,c,function(G,K){G.relurl&&(A=G.cc-K.cc),Object(R.isFiniteNumber)(G.startPTS)&&Object(R.isFiniteNumber)(G.endPTS)&&(K.start=K.startPTS=G.startPTS,K.startDTS=G.startDTS,K.appendedPTS=G.appendedPTS,K.maxStartPTS=G.maxStartPTS,K.endPTS=G.endPTS,K.endDTS=G.endDTS,K.minEndPTS=G.minEndPTS,K.duration=G.endPTS-G.startPTS,K.duration&&(y=K),c.PTSKnown=c.alignedSliding=!0),K.elementaryStreams=G.elementaryStreams,K.loader=G.loader,K.stats=G.stats,K.urlId=G.urlId,G.initSegment&&(K.initSegment=G.initSegment,T=G.initSegment)}),T){var E=c.fragmentHint?c.fragments.concat(c.fragmentHint):c.fragments;E.forEach(function(G){var K;(!G.initSegment||G.initSegment.relurl===((K=T)===null||K===void 0?void 0:K.relurl))&&(G.initSegment=T)})}if(c.skippedSegments&&(c.deltaUpdateFailed=c.fragments.some(function(G){return!G}),c.deltaUpdateFailed)){h.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var b=c.skippedSegments;b--;)c.fragments.shift();c.startSN=c.fragments[0].sn,c.startCC=c.fragments[0].cc}var _=c.fragments;if(A){h.logger.warn("discontinuity sliding from playlist, take drift into account");for(var I=0;I<_.length;I++)_[I].cc+=A}c.skippedSegments&&(c.startCC=c.fragments[0].cc),x(l.partList,c.partList,function(G,K){K.elementaryStreams=G.elementaryStreams,K.stats=G.stats}),y?o(c,y,y.startPTS,y.endPTS,y.startDTS,y.endDTS):m(l,c),_.length&&(c.totalduration=c.edge-_[0].start),c.driftStartTime=l.driftStartTime,c.driftStart=l.driftStart;var j=c.advancedDateTime;if(c.advanced&&j){var M=c.edge;c.driftStart||(c.driftStartTime=j,c.driftStart=M),c.driftEndTime=j,c.driftEnd=M}else c.driftEndTime=l.driftEndTime,c.driftEnd=l.driftEnd,c.advancedDateTime=l.advancedDateTime}function x(l,c,T){if(l&&c)for(var v=0,i=0,L=l.length;i<=L;i++){var A=l[i],y=c[i+v];A&&y&&A.index===y.index&&A.fragment.sn===y.fragment.sn?T(A,y):v--}}function g(l,c,T){for(var v=c.skippedSegments,i=Math.max(l.startSN,c.startSN)-c.startSN,L=(l.fragmentHint?1:0)+(v?c.endSN:Math.min(l.endSN,c.endSN))-c.startSN,A=c.startSN-l.startSN,y=c.fragmentHint?c.fragments.concat(c.fragmentHint):c.fragments,E=l.fragmentHint?l.fragments.concat(l.fragmentHint):l.fragments,b=i;b<=L;b++){var _=E[A+b],I=y[b];v&&!I&&b=v.length)return;w(c,v[T].start)}function w(l,c){if(c){for(var T=l.fragments,v=l.skippedSegments;v0&&i0&&E===-1&&(this.log("Override startPosition with lastCurrentTime @"+b.toFixed(3)),E=b),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,i.prototype.stopLoad.call(this)},A.doTick=function(){switch(this.state){case h.State.IDLE:this.doTickIdle();break;case h.State.WAITING_LEVEL:{var E,b=this.levels,_=this.level,I=b==null||((E=b[_])===null||E===void 0)?void 0:E.details;if(I&&(!I.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(I))break;this.state=h.State.IDLE;break}break}case h.State.FRAG_LOADING_WAITING_RETRY:{var j,M=self.performance.now(),G=this.retryDate;(!G||M>=G||(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(){i.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},A.doTickIdle=function(){var E,b,_=this.hls,I=this.levelLastLoaded,j=this.levels,M=this.media,G=_.config,K=_.nextLoadLevel;if(I===null||!M&&(this.startFragRequested||!G.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!j||!j[K])return;var H=j[K];this.level=_.nextLoadLevel=K;var z=H.details;if(!z||this.state===h.State.WAITING_LEVEL||z.live&&this.levelLastLoaded!==K){this.state=h.State.WAITING_LEVEL;return}var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:M,o.PlaylistLevelType.MAIN);if(B===null)return;var W=B.len,F=this.getMaxBufferLength(H.maxBitrate);if(W>=F)return;if(this._streamEnded(B,z)){var $={};this.altAudio&&($.type="video"),this.hls.trigger(S.Events.BUFFER_EOS,$),this.state=h.State.ENDED;return}var ee=B.end,Z=this.getNextFragment(ee,z);if(this.couldBacktrack&&!this.fragPrevious&&Z&&Z.sn!=="initSegment"){var ve=Z.sn-z.startSN;ve>1&&(Z=z.fragments[ve-1],this.fragmentTracker.removeFragment(Z))}if(Z&&this.fragmentTracker.getState(Z)===a.FragmentState.OK&&this.nextLoadPosition>ee){var he=this.audioOnly&&!this.altAudio?r.ElementaryStreamTypes.AUDIO:r.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(M,he,o.PlaylistLevelType.MAIN),Z=this.getNextFragment(this.nextLoadPosition,z)}if(!Z)return;Z.initSegment&&!Z.initSegment.data&&!this.bitrateTest&&(Z=Z.initSegment),((E=Z.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((b=Z.decryptdata)!==null&&b!==void 0&&b.key)?this.loadKey(Z,z):this.loadFragment(Z,z,ee)},A.loadFragment=function(E,b,_){var I,j=this.fragmentTracker.getState(E);if(this.fragCurrent=E,j===a.FragmentState.BACKTRACKED){var M=this.fragmentTracker.getBacktrackData(E);if(M){this._handleFragmentLoadProgress(M),this._handleFragmentLoadComplete(M);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,i.prototype.loadFragment.call(this,E,b,_)):j===a.FragmentState.APPENDING?this.reduceMaxBufferLength(E.duration)&&this.fragmentTracker.removeFragment(E):((I=this.media)===null||I===void 0?void 0:I.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},A.getAppendedFrag=function(E){var b=this.fragmentTracker.getAppendedFrag(E,o.PlaylistLevelType.MAIN);return b&&"fragment"in b?b.fragment:b},A.getBufferedFrag=function(E){return this.fragmentTracker.getBufferedFrag(E,o.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,b=this.media;if(b!=null&&b.readyState){var _,I=this.getAppendedFrag(b.currentTime);if(I&&I.start>1&&this.flushMainBuffer(0,I.start-1),!b.paused&&E){var j=this.hls.nextLoadLevel,M=E[j],G=this.fragLastKbps;G&&this.fragCurrent?_=this.fragCurrent.duration*M.maxBitrate/(1e3*G)+1:_=0}else _=0;var K=this.getBufferedFrag(b.currentTime+_);if(K){var H=this.followingBufferedFrag(K);if(H){this.abortCurrentFrag();var z=H.maxStartPTS?H.maxStartPTS:H.start,B=H.duration,W=Math.max(K.end,z+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,b){i.prototype.flushMainBuffer.call(this,E,b,this.altAudio?"video":null)},A.onMediaAttached=function(E,b){i.prototype.onMediaAttached.call(this,E,b);var _=b.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),_.addEventListener("playing",this.onvplaying),_.addEventListener("seeked",this.onvseeked),this.gapController=new m.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),i.prototype.onMediaDetaching.call(this)},A.onMediaPlaying=function(){this.tick()},A.onMediaSeeked=function(){var E=this.media,b=E?E.currentTime:null;Object(R.isFiniteNumber)(b)&&this.log("Media seeked to "+b.toFixed(3)),this.tick()},A.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(S.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,b){var _=!1,I=!1,j;b.levels.forEach(function(M){j=M.audioCodec,j&&(j.indexOf("mp4a.40.2")!==-1&&(_=!0),j.indexOf("mp4a.40.5")!==-1&&(I=!0))}),this.audioCodecSwitch=_&&I&&!Object(s.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=b.levels,this.startFragRequested=!1},A.onLevelLoading=function(E,b){var _=this.levels;if(!_||this.state!==h.State.IDLE)return;var I=_[b.level];(!I.details||I.details.live&&this.levelLastLoaded!==b.level||this.waitForCdnTuneIn(I.details))&&(this.state=h.State.WAITING_LEVEL)},A.onLevelLoaded=function(E,b){var _,I=this.levels,j=b.level,M=b.details,G=M.totalduration;if(!I){this.warn("Levels were reset while loading level "+j);return}this.log("Level "+j+" loaded ["+M.startSN+","+M.endSN+"], cc ["+M.startCC+", "+M.endCC+"] duration:"+G);var K=this.fragCurrent;K&&(this.state===h.State.FRAG_LOADING||this.state===h.State.FRAG_LOADING_WAITING_RETRY)&&(K.level!==b.level&&K.loader&&(this.state=h.State.IDLE,K.loader.abort()));var H=I[j],z=0;if(M.live||(_=H.details)!==null&&_!==void 0&&_.live){if(M.fragments[0]||(M.deltaUpdateFailed=!0),M.deltaUpdateFailed)return;z=this.alignPlaylists(M,H.details)}if(H.details=M,this.levelLastLoaded=j,this.hls.trigger(S.Events.LEVEL_UPDATED,{details:M,level:j}),this.state===h.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(M))return;this.state=h.State.IDLE}this.startFragRequested?M.live&&this.synchronizeToLiveEdge(M):this.setStartPosition(M,z),this.tick()},A._handleFragmentLoadProgress=function(E){var b,_=E.frag,I=E.part,j=E.payload,M=this.levels;if(!M){this.warn("Levels were reset while fragment load was in progress. Fragment "+_.sn+" of level "+_.level+" will not be buffered");return}var G=M[_.level],K=G.details;if(!K){this.warn("Dropping fragment "+_.sn+" of level "+_.level+" after level details were reset");return}var H=G.videoCodec,z=K.PTSKnown||!K.live,B=(b=_.initSegment)===null||b===void 0?void 0:b.data,W=this._getAudioCodec(G),F=this.transmuxer=this.transmuxer||new x.default(this.hls,o.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),$=I?I.index:-1,ee=$!==-1,Z=new g.ChunkMetadata(_.level,_.sn,_.stats.chunkCount,j.byteLength,$,ee),ve=this.initPTS[_.cc];F.push(j,B,W,H,_,I,K.totalduration,z,Z,ve)},A.onAudioTrackSwitching=function(E,b){var _=this.altAudio,I=!!b.url,j=b.id;if(!I){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var M=this.fragCurrent;M!=null&&M.loader&&(this.log("Switching to main audio track, cancel main fragment load"),M.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var G=this.hls;_&&G.trigger(S.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),G.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:j})}},A.onAudioTrackSwitched=function(E,b){var _=b.id,I=!!this.hls.audioTracks[_].url;if(I){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=I,this.tick()},A.onBufferCreated=function(E,b){var _=b.tracks,I,j,M=!1;for(var G in _){var K=_[G];if(K.id==="main"){if(j=G,I=K,G==="video"){var H=_[G];H&&(this.videoBuffer=H.buffer)}}else M=!0}M&&I?(this.log("Alternate track found, use "+j+".buffered to schedule main fragment loading"),this.mediaBuffer=I.buffer):this.mediaBuffer=this.media},A.onFragBuffered=function(E,b){var _=b.frag,I=b.part;if(_&&_.type!==o.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(_)){this.warn("Fragment "+_.sn+(I?" p: "+I.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=I?I.stats:_.stats;this.fragLastKbps=Math.round(8*j.total/(j.buffering.end-j.loading.first)),_.sn!=="initSegment"&&(this.fragPrevious=_),this.fragBufferedComplete(_,I)},A.onError=function(E,b){switch(b.details){case w.ErrorDetails.FRAG_LOAD_ERROR:case w.ErrorDetails.FRAG_LOAD_TIMEOUT:case w.ErrorDetails.KEY_LOAD_ERROR:case w.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(o.PlaylistLevelType.MAIN,b);break;case w.ErrorDetails.LEVEL_LOAD_ERROR:case w.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==h.State.ERROR&&(b.fatal?(this.warn(""+b.details),this.state=h.State.ERROR):!b.levelRetry&&this.state===h.State.WAITING_LEVEL&&(this.state=h.State.IDLE));break;case w.ErrorDetails.BUFFER_FULL_ERROR:if(b.parent==="main"&&(this.state===h.State.PARSING||this.state===h.State.PARSED)){var _=!0,I=this.getFwdBufferInfo(this.media,o.PlaylistLevelType.MAIN);I&&I.len>.5&&(_=!this.reduceMaxBufferLength(I.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,b=this.gapController;if(!E||!b||!E.readyState)return;var _=d.BufferHelper.getBuffered(E);!this.loadedmetadata&&_.length?(this.loadedmetadata=!0,this.seekToStartPos()):b.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,b){var _=b.type;if(_!==r.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var I=(_===r.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(I,_,o.PlaylistLevelType.MAIN)}},A.onLevelsUpdated=function(E,b){this.levels=b.levels},A.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},A.seekToStartPos=function(){var E=this.media,b=E.currentTime,_=this.startPosition;if(_>=0&&b<_){if(E.seeking){p.logger.log("could not seek to "+_+", already seeking at "+b);return}var I=d.BufferHelper.getBuffered(E),j=I.length?I.start(0):0,M=j-_;M>0&&(M1&&E.seeking===!1){var _=E.currentTime;if(d.BufferHelper.isBuffered(E,_)?b=this.getAppendedFrag(_):d.BufferHelper.isBuffered(E,_+.1)&&(b=this.getAppendedFrag(_+.1)),b){var I=this.fragPlaying,j=b.level;(!I||b.sn!==I.sn||I.level!==j||b.urlId!==I.urlId)&&(this.hls.trigger(S.Events.FRAG_CHANGED,{frag:b}),(!I||I.level!==j)&&this.hls.trigger(S.Events.LEVEL_SWITCHED,{level:j}),this.fragPlaying=b)}}},n(L,[{key:"nextLevel",get:function(){var E=this.nextBufferedFrag;return E?E.level:-1}},{key:"currentLevel",get:function(){var E=this.media;if(E){var b=this.getAppendedFrag(E.currentTime);if(b)return b.level}return-1}},{key:"nextBufferedFrag",get:function(){var E=this.media;if(E){var b=this.getAppendedFrag(E.currentTime);return this.followingBufferedFrag(b)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),L}(h.default)},"./src/controller/subtitle-stream-controller.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"SubtitleStreamController",function(){return l});var R=C("./src/events.ts"),h=C("./src/utils/logger.ts"),s=C("./src/utils/buffer-helper.ts"),S=C("./src/controller/fragment-finders.ts"),d=C("./src/utils/discontinuities.ts"),a=C("./src/controller/level-helper.ts"),o=C("./src/controller/fragment-tracker.ts"),r=C("./src/controller/base-stream-controller.ts"),x=C("./src/types/loader.ts"),g=C("./src/types/level.ts");function m(c,T){for(var v=0;v=b[j].start&&I<=b[j].end){_=b[j];break}var M=y.start+y.duration;_?_.end=M:(_={start:I,end:M},b.push(_)),this.fragmentTracker.fragBuffered(y)},v.onBufferFlushing=function(L,A){var y=A.startOffset,E=A.endOffset;if(y===0&&E!==Number.POSITIVE_INFINITY){var b=this.currentTrackId,_=this.levels;if(!_.length||!_[b]||!_[b].details)return;var I=_[b].details,j=I.targetduration,M=E-j;if(M<=0)return;A.endOffsetSubtitles=Math.max(0,M),this.tracksBuffered.forEach(function(G){for(var K=0;K=I.length||b!==_||!j)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,E.live||(y=j.details)!==null&&y!==void 0&&y.live){var M=this.mainDetails;if(E.deltaUpdateFailed||!M)return;var G=M.fragments[0];if(!j.details)E.hasProgramDateTime&&M.hasProgramDateTime?Object(d.alignMediaPlaylistByPDT)(E,M):G&&Object(a.addSliding)(E,G.start);else{var K=this.alignPlaylists(E,j.details);K===0&&G&&Object(a.addSliding)(E,G.start)}}if(j.details=E,this.levelLastLoaded=b,this.tick(),E.live&&!this.fragCurrent&&this.media&&this.state===r.State.IDLE){var H=Object(S.findFragmentByPTS)(null,E.fragments,this.media.currentTime,0);H||(this.warn("Subtitle playlist not aligned with playback"),j.details=void 0)}},v._handleFragmentLoadComplete=function(L){var A=L.frag,y=L.payload,E=A.decryptdata,b=this.hls;if(this.fragContextChanged(A))return;if(y&&y.byteLength>0&&E&&E.key&&E.iv&&E.method==="AES-128"){var _=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(y),E.key.buffer,E.iv.buffer).then(function(I){var j=performance.now();b.trigger(R.Events.FRAG_DECRYPTED,{frag:A,payload:I,stats:{tstart:_,tdecrypt:j}})})}},v.doTick=function(){if(!this.media){this.state=r.State.IDLE;return}if(this.state===r.State.IDLE){var L,A=this.currentTrackId,y=this.levels;if(!y.length||!y[A]||!y[A].details)return;var E=y[A].details,b=E.targetduration,_=this.config,I=this.media,j=s.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,I.currentTime-b,_.maxBufferHole),M=j.end,G=j.len,K=this.getMaxBufferLength()+b;if(G>K)return;console.assert(E,"Subtitle track details are defined on idle subtitle stream controller tick");var H=E.fragments,z=H.length,B=E.edge,W,F=this.fragPrevious;if(M-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)},p.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},p.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=g(this.media.textTracks);n.forEach(function(l){Object(h.clearCurrentCues)(l)}),this.subtitleTrack=-1,this.media=null},p.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},p.onManifestParsed=function(n,l){this.tracks=l.subtitleTracks},p.onSubtitleTrackLoaded=function(n,l){var c=l.id,T=l.details,v=this.trackId,i=this.tracksInGroup[v];if(!i){this.warn("Invalid subtitle track id "+c);return}var L=i.details;i.details=l.details,this.log("subtitle track "+c+" loaded ["+T.startSN+"-"+T.endSN+"]"),c===this.trackId&&(this.retryCount=0,this.playlistLoaded(c,l,L))},p.onLevelLoading=function(n,l){this.switchLevel(l.level)},p.onLevelSwitching=function(n,l){this.switchLevel(l.level)},p.switchLevel=function(n){var l=this.hls.levels[n];if(!(l!=null&&l.textGroupIds))return;var c=l.textGroupIds[l.urlId];if(this.groupId!==c){var T=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,v=this.tracks.filter(function(A){return!c||A.groupId===c});this.tracksInGroup=v;var i=this.findTrackId(T==null?void 0:T.name)||this.findTrackId();this.groupId=c;var L={subtitleTracks:v};this.log("Updating subtitle tracks, "+v.length+' track(s) found in "'+c+'" group-id'),this.hls.trigger(R.Events.SUBTITLE_TRACKS_UPDATED,L),i!==-1&&this.setSubtitleTrack(i,T)}},p.findTrackId=function(n){for(var l=this.tracksInGroup,c=0;c=T.length)return;this.clearTimer();var v=T[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,v){var i=v.id,L=v.groupId,A=L===void 0?"":L,y=v.name,E=v.type,b=v.url;this.hls.trigger(R.Events.SUBTITLE_TRACK_SWITCH,{id:i,groupId:A,name:y,type:E,url:b});var _=this.switchParams(v.url,l==null?void 0:l.details);this.loadPlaylist(_)}else this.hls.trigger(R.Events.SUBTITLE_TRACK_SWITCH,{id:n})},p.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,l=g(this.media.textTracks),c=0;c=0&&(E[0]=Math.min(E[0],T),E[1]=Math.max(E[1],v),A=!0,b/(v-T)>.5))return}if(A||L.push([T,v]),this.config.renderTextTracksNatively){var _=this.captionsTracks[c];this.Cues.newCue(_,T,v,i)}else{var I=this.Cues.newCue(null,T,v,i);this.hls.trigger(h.Events.CUES_PARSED,{type:"captions",cues:I,track:c})}},n.onInitPtsFound=function(c,T){var v=this,i=T.frag,L=T.id,A=T.initPTS,y=T.timescale,E=this.unparsedVttFrags;L==="main"&&(this.initPTS[i.cc]=A,this.timescale[i.cc]=y),E.length&&(this.unparsedVttFrags=[],E.forEach(function(b){v.onFragLoaded(h.Events.FRAG_LOADED,b)}))},n.getExistingTrack=function(c){var T=this.media;if(T)for(var v=0;v>>8^y&255^99,o[i]=y,r[y]=i;var E=v[i],b=v[E],_=v[b],I=v[y]*257^y*16843008;g[i]=I<<24|I>>>8,m[i]=I<<16|I>>>16,w[i]=I<<8|I>>>24,p[i]=I,I=_*16843009^b*65537^E*257^i*16843008,n[y]=I<<24|I>>>8,l[y]=I<<16|I>>>16,c[y]=I<<8|I>>>24,T[y]=I,i?(i=E^v[v[v[_^E]]],L^=v[v[L]]):i=L=1}},d.expandKey=function(o){for(var r=this.uint8ArrayToUint32Array_(o),x=!0,g=0;g>>6)+1;var I=(c[T+2]&60)>>>2;if(I>_.length-1){l.trigger(s.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+I});return}return A=(c[T+2]&1)<<2,A|=(c[T+3]&192)>>>6,R.logger.log("manifest codec:"+v+", ADTS type:"+i+", samplingIndex:"+I),/firefox/i.test(E)?I>=6?(i=5,y=new Array(4),L=I-3):(i=2,y=new Array(2),L=I):E.indexOf("android")!==-1?(i=2,y=new Array(2),L=I):(i=5,y=new Array(4),v&&(v.indexOf("mp4a.40.29")!==-1||v.indexOf("mp4a.40.5")!==-1)||!v&&I>=6?L=I-3:((v&&v.indexOf("mp4a.40.2")!==-1&&(I>=6&&A===1||/vivaldi/i.test(E))||!v&&A===1)&&(i=2,y=new Array(2)),L=I)),y[0]=i<<3,y[0]|=(I&14)>>1,y[1]|=(I&1)<<7,y[1]|=A<<3,i===5&&(y[1]|=(L&14)>>1,y[2]=(L&1)<<7,y[2]|=2<<2,y[3]=0),{config:y,samplerate:_[I],channelCount:A,codec:"mp4a.40."+i,manifestCodec:b}}function d(l,c){return l[c]===255&&(l[c+1]&246)===240}function a(l,c){return l[c+1]&1?7:9}function o(l,c){return(l[c+3]&3)<<11|l[c+4]<<3|(l[c+5]&224)>>>5}function r(l,c){return c+5=l.length)return!1;var v=o(l,c);if(v<=T)return!1;var i=c+v;return i===l.length||x(l,i)}return!1}function w(l,c,T,v,i){if(!l.samplerate){var L=S(c,T,v,i);if(!L)return;l.config=L.config,l.samplerate=L.samplerate,l.channelCount=L.channelCount,l.codec=L.codec,l.manifestCodec=L.manifestCodec,R.logger.log("parsed codec:"+l.codec+", rate:"+L.samplerate+", channels:"+L.channelCount)}}function p(l){return 1024*9e4/l}function f(l,c,T,v,i){var L=a(l,c),A=o(l,c);if(A-=L,A>0){var y=T+v*i;return{headerLength:L,frameLength:A,stamp:y}}}function n(l,c,T,v,i){var L=p(l.samplerate),A=f(c,T,v,i,L);if(A){var y=A.frameLength,E=A.headerLength,b=A.stamp,_=E+y,I=Math.max(0,T+_-c.length),j;I?(j=new Uint8Array(_-E),j.set(c.subarray(T+E,c.length),0)):j=c.subarray(T+E,T+_);var M={unit:j,pts:b};return I||l.samples.push(M),{sample:M,length:_,missing:I}}}},"./src/demux/base-audio-demuxer.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"initPTSFn",function(){return o});var R=C("./src/polyfills/number.ts"),h=C("./src/demux/id3.ts"),s=C("./src/demux/dummy-demuxed-track.ts"),S=C("./src/utils/mp4-tools.ts"),d=C("./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 x=r.prototype;return x.resetInitSegment=function(m,w,p){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},x.resetTimeStamp=function(){},x.resetContiguity=function(){},x.canParse=function(m,w){return!1},x.appendFrame=function(m,w,p){},x.demux=function(m,w){this.cachedData&&(m=Object(S.appendUint8Array)(this.cachedData,m),this.cachedData=null);var p=h.getID3Data(m,0),f=p?p.length:0,n,l,c=this._audioTrack,T=this._id3Track,v=p?h.getTimeStamp(p):void 0,i=m.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=o(v,w)),p&&p.length>0&&T.samples.push({pts:this.initPTS,dts:this.initPTS,data:p}),l=this.initPTS;fa?(this.word<<=a,this.bitsAvailable-=a):(a-=this.bitsAvailable,o=a>>3,a-=o>>3,this.bytesAvailable-=o,this.loadWord(),this.word<<=a,this.bitsAvailable-=a)},S.readBits=function(a){var o=Math.min(this.bitsAvailable,a),r=this.word>>>32-o;return a>32&&R.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=o,this.bitsAvailable>0?this.word<<=o:this.bytesAvailable>0&&this.loadWord(),o=a-o,o>0&&this.bitsAvailable?r<>>a)!==0)return this.word<<=a,this.bitsAvailable-=a,a;return this.loadWord(),a+this.skipLZ()},S.skipUEG=function(){this.skipBits(1+this.skipLZ())},S.skipEG=function(){this.skipBits(1+this.skipLZ())},S.readUEG=function(){var a=this.skipLZ();return this.readBits(a+1)-1},S.readEG=function(){var a=this.readUEG();return 1&a?1+a>>>1:-1*(a>>>1)},S.readBoolean=function(){return this.readBits(1)===1},S.readUByte=function(){return this.readBits(8)},S.readUShort=function(){return this.readBits(16)},S.readUInt=function(){return this.readBits(32)},S.skipScalingList=function(a){for(var o=8,r=8,x,g=0;g0?i.subarray(A,A+y):void 0},S=function(i,L){var A=0;return A=(i[L]&127)<<21,A|=(i[L+1]&127)<<14,A|=(i[L+2]&127)<<7,A|=i[L+3]&127,A},d=function(i,L){return R(i,L)&&S(i,L+6)+10<=i.length-L},a=function(i){for(var L=x(i),A=0;A>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:M+=String.fromCharCode(_);break;case 12:case 13:I=i[G++],M+=String.fromCharCode((_&31)<<6|I&63);break;case 14:I=i[G++],j=i[G++],M+=String.fromCharCode((_&15)<<12|(I&63)<<6|(j&63)<<0);break;default:}}return M},l={decodeTextFrame:w},c;function T(){return!c&&typeof self.TextDecoder!="undefined"&&(c=new self.TextDecoder("utf-8")),c}},"./src/demux/mp3demuxer.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/demux/base-audio-demuxer.ts"),h=C("./src/demux/id3.ts"),s=C("./src/utils/logger.ts"),S=C("./src/demux/mpegaudio.ts");function d(r,x){r.prototype=Object.create(x.prototype),r.prototype.constructor=r,a(r,x)}function a(r,x){return a=Object.setPrototypeOf||function(m,w){return m.__proto__=w,m},a(r,x)}var o=function(r){d(x,r);function x(){return r.apply(this,arguments)||this}var g=x.prototype;return g.resetInitSegment=function(w,p,f){r.prototype.resetInitSegment.call(this,w,p,f),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:w,duration:f,inputTimeScale:9e4,dropped:0}},x.probe=function(w){if(!w)return!1;for(var p=h.getID3Data(w,0)||[],f=p.length,n=w.length;f0},d.demux=function(o){var r=o,x=Object(h.dummyTrack)();if(this.config.progressive){this.remainderData&&(r=Object(R.appendUint8Array)(this.remainderData,o));var g=Object(R.segmentValidRange)(r);this.remainderData=g.remainder,x.samples=g.valid||new Uint8Array}else x.samples=r;return{audioTrack:Object(h.dummyTrack)(),avcTrack:x,id3Track:Object(h.dummyTrack)(),textTrack:Object(h.dummyTrack)()}},d.flush=function(){var o=Object(h.dummyTrack)();return o.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(h.dummyTrack)(),avcTrack:o,id3Track:Object(h.dummyTrack)(),textTrack:Object(h.dummyTrack)()}},d.demuxSampleAes=function(o,r,x){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},d.destroy=function(){},S}();s.minProbeByteLength=1024,u.default=s},"./src/demux/mpegaudio.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"appendFrame",function(){return a}),C.d(u,"parseHeader",function(){return o}),C.d(u,"isHeaderPattern",function(){return r}),C.d(u,"isHeader",function(){return x}),C.d(u,"canParse",function(){return g}),C.d(u,"probe",function(){return m});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],s=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],S=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],d=[0,1,1,4];function a(w,p,f,n,l){if(f+24>p.length)return;var c=o(p,f);if(c&&f+c.frameLength<=p.length){var T=c.samplesPerFrame*9e4/c.sampleRate,v=n+l*T,i={unit:p.subarray(f,f+c.frameLength),pts:v,dts:v};return w.config=[],w.channelCount=c.channelCount,w.samplerate=c.sampleRate,w.samples.push(i),{sample:i,length:c.frameLength,missing:0}}}function o(w,p){var f=w[p+1]>>3&3,n=w[p+1]>>1&3,l=w[p+2]>>4&15,c=w[p+2]>>2&3;if(f!==1&&l!==0&&l!==15&&c!==3){var T=w[p+2]>>1&1,v=w[p+3]>>6,i=f===3?3-n:n===3?3:4,L=h[i*14+l-1]*1e3,A=f===3?0:f===2?1:2,y=s[A*3+c],E=v===3?1:2,b=S[f][n],_=d[n],I=b*8*_,j=Math.floor(b*L/y+T)*_;if(R===null){var M=navigator.userAgent||"",G=M.match(/Chrome\/(\d+)/i);R=G?parseInt(G[1]):0}var K=!!R&&R<=87;return K&&n===2&&L>=224e3&&v===0&&(w[p+3]=w[p+3]|128),{sampleRate:y,channelCount:E,frameLength:j,samplesPerFrame:I}}}function r(w,p){return w[p]===255&&(w[p+1]&224)===224&&(w[p+1]&6)!==0}function x(w,p){return p+1=o.length){x();return}if(o[r].unit.length<32)continue;var g=this.decrypter.isSync();if(this.decryptAacSample(o,r,x,g),!g)return}},d.getAvcEncryptedData=function(o){for(var r=Math.floor((o.length-48)/160)*16+16,x=new Int8Array(r),g=0,m=32;m<=o.length-16;m+=160,g+=16)x.set(o.subarray(m,m+16),g);return x},d.getAvcDecryptedUnit=function(o,r){for(var x=new Uint8Array(r),g=0,m=32;m<=o.length-16;m+=160,g+=16)o.set(x.subarray(g,g+16),m);return o},d.decryptAvcSample=function(o,r,x,g,m,w){var p=Object(h.discardEPB)(m.data),f=this.getAvcEncryptedData(p),n=this;this.decryptBuffer(f.buffer,function(l){m.data=n.getAvcDecryptedUnit(p,l),w||n.decryptAvcSamples(o,r,x+1,g)})},d.decryptAvcSamples=function(o,r,x,g){if(o instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;r++,x=0){if(r>=o.length){g();return}for(var m=o[r].units;!(x>=m.length);x++){var w=m[x];if(w.data.length<=48||w.type!==1&&w.type!==5)continue;var p=this.decrypter.isSync();if(this.decryptAvcSample(o,r,x,g,w,p),!p)return}}},S}();u.default=s},"./src/demux/transmuxer-interface.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return m});var R=C("./node_modules/webworkify-webpack/index.js"),h=C.n(R),s=C("./src/events.ts"),S=C("./src/demux/transmuxer.ts"),d=C("./src/utils/logger.ts"),a=C("./src/errors.ts"),o=C("./src/utils/mediasource-helper.ts"),r=C("./node_modules/eventemitter3/index.js"),x=C.n(r),g=Object(o.getMediaSource)()||{isTypeSupported:function(){return!1}},m=function(){function w(f,n,l,c){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=f,this.id=n,this.onTransmuxComplete=l,this.onFlush=c;var v=f.config,i=function(b,_){_=_||{},_.frag=T.frag,_.id=T.id,f.trigger(b,_)};this.observer=new r.EventEmitter,this.observer.on(s.Events.FRAG_DECRYPTED,i),this.observer.on(s.Events.ERROR,i);var L={mp4:g.isTypeSupported("video/mp4"),mpeg:g.isTypeSupported("audio/mpeg"),mp3:g.isTypeSupported('audio/mp4; codecs="mp3"')},A=navigator.vendor;if(v.enableWorker&&typeof Worker!="undefined"){d.logger.log("demuxing in webworker");var y;try{y=this.worker=R("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),y.addEventListener("message",this.onwmsg),y.onerror=function(E){f.trigger(s.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+")")})},y.postMessage({cmd:"init",typeSupported:L,vendor:A,id:n,config:JSON.stringify(v)})}catch(E){d.logger.warn("Error in worker:",E),d.logger.error("Error while initializing DemuxerWorker, fallback to inline"),y&&self.URL.revokeObjectURL(y.objectURL),this.transmuxer=new S.default(this.observer,L,v,A,n),this.worker=null}}else this.transmuxer=new S.default(this.observer,L,v,A,n)}var p=w.prototype;return p.destroy=function(){var n=this.worker;if(n)n.removeEventListener("message",this.onwmsg),n.terminate(),this.worker=null;else{var l=this.transmuxer;l&&(l.destroy(),this.transmuxer=null)}var c=this.observer;c&&c.removeAllListeners(),this.observer=null},p.push=function(n,l,c,T,v,i,L,A,y,E){var b=this;y.transmuxing.start=self.performance.now();var _=this.transmuxer,I=this.worker,j=i?i.start:v.start,M=v.decryptdata,G=this.frag,K=!(G&&v.cc===G.cc),H=!(G&&y.level===G.level),z=G?y.sn-G.sn:-1,B=this.part?y.part-this.part.index:1,W=!H&&(z===1||z===0&&B===1),F=self.performance.now();(H||z||v.stats.parsing.start===0)&&(v.stats.parsing.start=F),i&&(B||!W)&&(i.stats.parsing.start=F);var $=new S.TransmuxState(K,W,A,H,j);if(!W||K){d.logger.log("[transmuxer-interface, "+v.type+"]: Starting new transmux session for sn: "+y.sn+" p: "+y.part+" level: "+y.level+" id: "+y.id+` discontinuity: `+K+` trackSwitch: `+H+` contiguous: `+W+` accurateTimeOffset: `+A+` timeOffset: `+j);var ee=new S.TransmuxConfig(c,T,l,L,E);this.configureTransmuxer(ee)}if(this.frag=v,this.part=i,I)I.postMessage({cmd:"demux",data:n,decryptdata:M,chunkMeta:y,state:$},n instanceof ArrayBuffer?[n]:[]);else if(_){var Z=_.push(n,M,y,$);Object(S.isPromise)(Z)?Z.then(function(ve){b.handleTransmuxComplete(ve)}):this.handleTransmuxComplete(Z)}},p.flush=function(n){var l=this;n.transmuxing.start=self.performance.now();var c=this.transmuxer,T=this.worker;if(T)T.postMessage({cmd:"flush",chunkMeta:n});else if(c){var v=c.flush(n);Object(S.isPromise)(v)?v.then(function(i){l.handleFlushResult(i,n)}):this.handleFlushResult(v,n)}},p.handleFlushResult=function(n,l){var c=this;n.forEach(function(T){c.handleTransmuxComplete(T)}),this.onFlush(l)},p.onWorkerMessage=function(n){var l=n.data,c=this.hls;switch(l.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(l.data);break}case"flush":{this.onFlush(l.data);break}default:{l.data=l.data||{},l.data.frag=this.frag,l.data.id=this.id,c.trigger(l.event,l.data);break}}},p.configureTransmuxer=function(n){var l=this.worker,c=this.transmuxer;l?l.postMessage({cmd:"configure",config:n}):c&&c.configure(n)},p.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},w}()},"./src/demux/transmuxer-worker.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return a});var R=C("./src/demux/transmuxer.ts"),h=C("./src/events.ts"),s=C("./src/utils/logger.ts"),S=C("./node_modules/eventemitter3/index.js"),d=C.n(S);function a(m){var w=new S.EventEmitter,p=function(n,l){m.postMessage({event:n,data:l})};w.on(h.Events.FRAG_DECRYPTED,p),w.on(h.Events.ERROR,p),m.addEventListener("message",function(f){var n=f.data;switch(n.cmd){case"init":{var l=JSON.parse(n.config);m.transmuxer=new R.default(w,n.typeSupported,l,n.vendor,n.id),Object(s.enableLogs)(l.debug),p("init",null);break}case"configure":{m.transmuxer.configure(n.config);break}case"demux":{var c=m.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(R.isPromise)(c)?c.then(function(i){o(m,i)}):o(m,c);break}case"flush":{var T=n.chunkMeta,v=m.transmuxer.flush(T);Object(R.isPromise)(v)?v.then(function(i){x(m,i,T)}):x(m,v,T);break}default:break}})}function o(m,w){if(g(w.remuxResult))return;var p=[],f=w.remuxResult,n=f.audio,l=f.video;n&&r(p,n),l&&r(p,l),m.postMessage({event:"transmuxComplete",data:w},p)}function r(m,w){w.data1&&m.push(w.data1.buffer),w.data2&&m.push(w.data2.buffer)}function x(m,w,p){w.forEach(function(f){o(m,f)}),m.postMessage({event:"flush",data:p})}function g(m){return!m.audio&&!m.video&&!m.text&&!m.id3&&!m.initSegment}},"./src/demux/transmuxer.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return l}),C.d(u,"isPromise",function(){return v}),C.d(u,"TransmuxConfig",function(){return i}),C.d(u,"TransmuxState",function(){return L});var R=C("./src/events.ts"),h=C("./src/errors.ts"),s=C("./src/crypt/decrypter.ts"),S=C("./src/demux/aacdemuxer.ts"),d=C("./src/demux/mp4demuxer.ts"),a=C("./src/demux/tsdemuxer.ts"),o=C("./src/demux/mp3demuxer.ts"),r=C("./src/remux/mp4-remuxer.ts"),x=C("./src/remux/passthrough-remuxer.ts"),g=C("./src/demux/chunk-cache.ts"),m=C("./src/utils/mp4-tools.ts"),w=C("./src/utils/logger.ts"),p;try{p=self.performance.now.bind(self.performance)}catch(A){w.logger.debug("Unable to use Performance API on this environment"),p=self.Date.now}var f=[{demux:a.default,remux:r.default},{demux:d.default,remux:x.default},{demux:S.default,remux:r.default},{demux:o.default,remux:r.default}],n=1024;f.forEach(function(A){var y=A.demux;n=Math.max(n,y.minProbeByteLength)});var l=function(){function A(E,b,_,I,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 g.default,this.observer=E,this.typeSupported=b,this.config=_,this.vendor=I,this.id=j}var y=A.prototype;return y.configure=function(b){this.transmuxConfig=b,this.decrypter&&this.decrypter.reset()},y.push=function(b,_,I,j){var M=this,G=I.transmuxing;G.executeStart=p();var K=new Uint8Array(b),H=this.cache,z=this.config,B=this.currentTransmuxState,W=this.transmuxConfig;j&&(this.currentTransmuxState=j);var F=c(K,_);if(F&&F.method==="AES-128"){var $=this.getDecrypter();if(z.enableSoftwareAES){var ee=$.softwareDecrypt(K,F.key.buffer,F.iv.buffer);if(!ee)return G.executeEnd=p(),T(I);K=new Uint8Array(ee)}else return this.decryptionPromise=$.webCryptoDecrypt(K,F.key.buffer,F.iv.buffer).then(function(J){var X=M.push(J,null,I);return M.decryptionPromise=null,X}),this.decryptionPromise}var Z=j||B,ve=Z.contiguous,he=Z.discontinuity,le=Z.trackSwitch,Re=Z.accurateTimeOffset,xe=Z.timeOffset,ie=W.audioCodec,se=W.videoCodec,re=W.defaultInitPts,be=W.duration,q=W.initSegmentData;if((he||le)&&this.resetInitSegment(q,ie,se,be),he&&this.resetInitialTimestamp(re),ve||this.resetContiguity(),this.needsProbing(K,he,le)){if(H.dataLength){var ne=H.flush();K=Object(m.appendUint8Array)(ne,K)}this.configureTransmuxer(K,W)}var Te=this.transmux(K,F,xe,Re,I),ae=this.currentTransmuxState;return ae.contiguous=!0,ae.discontinuity=!1,ae.trackSwitch=!1,G.executeEnd=p(),Te},y.flush=function(b){var _=this,I=b.transmuxing;I.executeStart=p();var j=this.decrypter,M=this.cache,G=this.currentTransmuxState,K=this.decryptionPromise;if(K)return K.then(function(){return _.flush(b)});var H=[],z=G.timeOffset;if(j){var B=j.flush();B&&H.push(this.push(B,null,b))}var W=M.dataLength;M.reset();var F=this.demuxer,$=this.remuxer;if(!F||!$)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"}),I.executeEnd=p(),[T(b)];var ee=F.flush(z);return v(ee)?ee.then(function(Z){return _.flushRemux(H,Z,b),H}):(this.flushRemux(H,ee,b),H)},y.flushRemux=function(b,_,I){var j=_.audioTrack,M=_.avcTrack,G=_.id3Track,K=_.textTrack,H=this.currentTransmuxState,z=H.accurateTimeOffset,B=H.timeOffset;w.logger.log("[transmuxer.ts]: Flushed fragment "+I.sn+(I.part>-1?" p: "+I.part:"")+" of level "+I.level);var W=this.remuxer.remux(j,M,G,K,B,z,!0,this.id);b.push({remuxResult:W,chunkMeta:I}),I.transmuxing.executeEnd=p()},y.resetInitialTimestamp=function(b){var _=this.demuxer,I=this.remuxer;if(!_||!I)return;_.resetTimeStamp(b),I.resetTimeStamp(b)},y.resetContiguity=function(){var b=this.demuxer,_=this.remuxer;if(!b||!_)return;b.resetContiguity(),_.resetNextTimestamp()},y.resetInitSegment=function(b,_,I,j){var M=this.demuxer,G=this.remuxer;if(!M||!G)return;M.resetInitSegment(_,I,j),G.resetInitSegment(b,_,I)},y.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},y.transmux=function(b,_,I,j,M){var G;return _&&_.method==="SAMPLE-AES"?G=this.transmuxSampleAes(b,_,I,j,M):G=this.transmuxUnencrypted(b,I,j,M),G},y.transmuxUnencrypted=function(b,_,I,j){var M=this.demuxer.demux(b,_,!1,!this.config.progressive),G=M.audioTrack,K=M.avcTrack,H=M.id3Track,z=M.textTrack,B=this.remuxer.remux(G,K,H,z,_,I,!1,this.id);return{remuxResult:B,chunkMeta:j}},y.transmuxSampleAes=function(b,_,I,j,M){var G=this;return this.demuxer.demuxSampleAes(b,_,I).then(function(K){var H=G.remuxer.remux(K.audioTrack,K.avcTrack,K.id3Track,K.textTrack,I,j,!1,G.id);return{remuxResult:H,chunkMeta:M}})},y.configureTransmuxer=function(b,_){for(var I=this.config,j=this.observer,M=this.typeSupported,G=this.vendor,K=_.audioCodec,H=_.defaultInitPts,z=_.duration,B=_.initSegmentData,W=_.videoCodec,F,$=0,ee=f.length;$0&&y!=null&&y.key!=null&&y.iv!==null&&y.method!=null&&(E=y),E}var T=function(y){return{remuxResult:{},chunkMeta:y}};function v(A){return"then"in A&&A.then instanceof Function}var i=function(y,E,b,_,I){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=y,this.videoCodec=E,this.initSegmentData=b,this.duration=_,this.defaultInitPts=I},L=function(y,E,b,_,I){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=y,this.contiguous=E,this.accurateTimeOffset=b,this.trackSwitch=_,this.timeOffset=I}},"./src/demux/tsdemuxer.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"discardEPB",function(){return T});var R=C("./src/demux/adts.ts"),h=C("./src/demux/mpegaudio.ts"),s=C("./src/demux/exp-golomb.ts"),S=C("./src/demux/id3.ts"),d=C("./src/demux/sample-aes.ts"),a=C("./src/events.ts"),o=C("./src/utils/mp4-tools.ts"),r=C("./src/utils/logger.ts"),x=C("./src/errors.ts"),g={video:1,audio:2,id3:3,text:4},m=function(){function v(L,A,y){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=L,this.config=A,this.typeSupported=y}v.probe=function(A){var y=v.syncOffset(A);return y<0?!1:(y&&r.logger.warn("MPEG2-TS detected but first sync word found @ offset "+y+", junk ahead ?"),!0)},v.syncOffset=function(A){for(var y=Math.min(1e3,A.length-3*188),E=0;E>4,ie=void 0;if(xe>1){if(ie=he+5+A[he+4],ie===he+188)continue}else ie=he+4;switch(Re){case G:le&&(K&&(_=n(K))&&this.parseAVCPES(_,!1),K={data:[],size:0}),K&&(K.data.push(A.subarray(ie,he+188)),K.size+=he+188-ie);break;case H:le&&(B&&(_=n(B))&&(j.isAAC?this.parseAACPES(_):this.parseMPEGPES(_)),B={data:[],size:0}),B&&(B.data.push(A.subarray(ie,he+188)),B.size+=he+188-ie);break;case z:le&&(W&&(_=n(W))&&this.parseID3PES(_),W={data:[],size:0}),W&&(W.data.push(A.subarray(ie,he+188)),W.size+=he+188-ie);break;case 0:le&&(ie+=A[ie]+1),ee=this._pmtId=p(A,ie);break;case ee:{le&&(ie+=A[ie]+1);var se=f(A,ie,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,E);G=se.avc,G>0&&(I.pid=G),H=se.audio,H>0&&(j.pid=H,j.isAAC=se.isAAC),z=se.id3,z>0&&(M.pid=z),F&&!$&&(r.logger.log("reparse from beginning"),F=!1,he=ve-188),$=this.pmtParsed=!0;break}case 17:case 8191:break;default:F=!0;break}}else this.observer.emit(a.Events.ERROR,a.Events.ERROR,{type:x.ErrorTypes.MEDIA_ERROR,details:x.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});I.pesData=K,j.pesData=B,M.pesData=W;var re={audioTrack:j,avcTrack:I,id3Track:M,textTrack:this._txtTrack};return b&&this.extractRemainingSamples(re),re},i.flush=function(){var A=this.remainderData;this.remainderData=null;var y;return A?y=this.demux(A,-1,!1,!0):y={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(y),this.sampleAes?this.decrypt(y,this.sampleAes):y},i.extractRemainingSamples=function(A){var y=A.audioTrack,E=A.avcTrack,b=A.id3Track,_=E.pesData,I=y.pesData,j=b.pesData,M;_&&(M=n(_))?(this.parseAVCPES(M,!0),E.pesData=null):E.pesData=_,I&&(M=n(I))?(y.isAAC?this.parseAACPES(M):this.parseMPEGPES(M),y.pesData=null):(I!=null&&I.size&&r.logger.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=I),j&&(M=n(j))?(this.parseID3PES(M),b.pesData=null):b.pesData=j},i.demuxSampleAes=function(A,y,E){var b=this.demux(A,E,!0,!this.config.progressive),_=this.sampleAes=new d.default(this.observer,this.config,y);return this.decrypt(b,_)},i.decrypt=function(A,y){return new Promise(function(E){var b=A.audioTrack,_=A.avcTrack;b.samples&&b.isAAC?y.decryptAacSamples(b.samples,0,function(){_.samples?y.decryptAvcSamples(_.samples,0,0,function(){E(A)}):E(A)}):_.samples&&y.decryptAvcSamples(_.samples,0,0,function(){E(A)})})},i.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},i.parseAVCPES=function(A,y){var E=this,b=this._avcTrack,_=this.parseAVCNALu(A.data),I=!1,j=this.avcSample,M,G=!1;A.data=null,j&&_.length&&!b.audFound&&(l(j,b),j=this.avcSample=w(!1,A.pts,A.dts,"")),_.forEach(function(K){switch(K.type){case 1:{M=!0,j||(j=E.avcSample=w(!0,A.pts,A.dts,"")),I&&(j.debug+="NDR "),j.frame=!0;var H=K.data;if(G&&H.length>4){var z=new s.default(H).readSliceType();(z===2||z===4||z===7||z===9)&&(j.key=!0)}break}case 5:M=!0,j||(j=E.avcSample=w(!0,A.pts,A.dts,"")),I&&(j.debug+="IDR "),j.key=!0,j.frame=!0;break;case 6:{M=!0,I&&j&&(j.debug+="SEI ");var B=new s.default(T(K.data));B.readUByte();for(var W=0,F=0,$=!1,ee=0;!$&&B.bytesAvailable>1;){W=0;do ee=B.readUByte(),W+=ee;while(ee===255);F=0;do ee=B.readUByte(),F+=ee;while(ee===255);if(W===4&&B.bytesAvailable!==0){$=!0;var Z=B.readUByte();if(Z===181){var ve=B.readUShort();if(ve===49){var he=B.readUInt();if(he===1195456820){var le=B.readUByte();if(le===3){for(var Re=B.readUByte(),xe=B.readUByte(),ie=31&Re,se=[Re,xe],re=0;re16){for(var be=[],q=0;q<16;q++)be.push(B.readUByte().toString(16)),(q===3||q===5||q===7||q===9)&&be.push("-");for(var ne=F-16,Te=new Uint8Array(ne),ae=0;ae=0){var B={data:A.subarray(H,j-b-1),type:z};I.push(B)}else{var W=this.getLastNalUnit();if(W&&(_&&j<=4-_&&(W.state&&(W.data=W.data.subarray(0,W.data.byteLength-_))),G=j-b-1,G>0)){var F=new Uint8Array(W.data.byteLength+G);F.set(W.data,0),F.set(A.subarray(0,G),W.data.byteLength),W.data=F,W.state=0}}j=0&&b>=0){var $={data:A.subarray(H,y),type:z,state:b};I.push($)}if(I.length===0){var ee=this.getLastNalUnit();if(ee){var Z=new Uint8Array(ee.data.byteLength+A.byteLength);Z.set(ee.data,0),Z.set(A,ee.data.byteLength),ee.data=Z}}return E.naluState=b,I},i.parseAACPES=function(A){var y=0,E=this._audioTrack,b=this.aacOverFlow,_=A.data;if(b){this.aacOverFlow=null;var I=b.sample.unit.byteLength,j=Math.min(b.missing,I),M=I-j;b.sample.unit.set(_.subarray(0,j),M),E.samples.push(b.sample),y=b.missing}var G,K;for(G=y,K=_.length;G1;){var I=new Uint8Array(_[0].length+_[1].length);I.set(_[0]),I.set(_[1],_[0].length),_[0]=I,_.splice(1,1)}L=_[0];var j=(L[0]<<16)+(L[1]<<8)+L[2];if(j===1){if(A=(L[4]<<8)+L[5],A&&A>v.size-6)return null;var M=L[7];M&192&&(E=(L[9]&14)*536870912+(L[10]&255)*4194304+(L[11]&254)*16384+(L[12]&255)*128+(L[13]&254)/2,M&64?(b=(L[14]&14)*536870912+(L[15]&255)*4194304+(L[16]&254)*16384+(L[17]&255)*128+(L[18]&254)/2,E-b>60*9e4&&(r.logger.warn(Math.round((E-b)/9e4)+"s delta between PTS and DTS, align them"),E=b)):b=E),y=L[8];var G=y+9;if(v.size<=G)return null;v.size-=G;for(var K=new Uint8Array(v.size),H=0,z=_.length;HB){G-=B;continue}else L=L.subarray(G),B-=G,G=0;K.set(L,i),i+=B}return A&&(A-=y+3),{data:K,pts:E,dts:b,len:A}}return null}function l(v,i){if(v.units.length&&v.frame){if(v.pts===void 0){var L=i.samples,A=L.length;if(A){var y=L[A-1];v.pts=y.pts,v.dts=y.dts}else{i.dropped++;return}}i.samples.push(v)}v.debug.length&&r.logger.log(v.pts+"/"+v.dts+":"+v.debug)}function c(v,i){var L=v.length;if(L>0){if(i.pts>=v[L-1].pts)v.push(i);else for(var A=L-1;A>=0;A--)if(i.ptsE)return _;return 0}},{key:"maxAutoLevel",get:function(){var y=this.levels,E=this.autoLevelCapping,b;return E===-1&&y&&y.length?b=y.length-1:b=E,b}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(y){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,y)}},{key:"audioTracks",get:function(){var y=this.audioTrackController;return y?y.audioTracks:[]}},{key:"audioTrack",get:function(){var y=this.audioTrackController;return y?y.audioTrack:-1},set:function(y){var E=this.audioTrackController;E&&(E.audioTrack=y)}},{key:"subtitleTracks",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTrack:-1},set:function(y){var E=this.subtitleTrackController;E&&(E.subtitleTrack=y)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var y=this.subtitleTrackController;return y?y.subtitleDisplay:!1},set:function(y){var E=this.subtitleTrackController;E&&(E.subtitleDisplay=y)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(y){this.config.lowLatencyMode=y}},{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 l.ErrorTypes}},{key:"ErrorDetails",get:function(){return l.ErrorDetails}},{key:"DefaultConfig",get:function(){return i.defaultConfig?i.defaultConfig:w.hlsDefaultConfig},set:function(y){i.defaultConfig=y}}]),i}();v.defaultConfig=void 0},"./src/is-supported.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"isSupported",function(){return s}),C.d(u,"changeTypeSupported",function(){return S});var R=C("./src/utils/mediasource-helper.ts");function h(){return self.SourceBuffer||self.WebKitSourceBuffer}function s(){var d=Object(R.getMediaSource)();if(!d)return!1;var a=h(),o=d&&typeof d.isTypeSupported=="function"&&d.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!a||a.prototype&&typeof a.prototype.appendBuffer=="function"&&typeof a.prototype.remove=="function";return!!o&&!!r}function S(){var d,a=h();return typeof(a==null||((d=a.prototype)===null||d===void 0)?void 0:d.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return m}),C.d(u,"LoadError",function(){return p});var R=C("./src/polyfills/number.ts"),h=C("./src/errors.ts");function s(f,n){f.prototype=Object.create(n.prototype),f.prototype.constructor=f,r(f,n)}function S(f){var n=typeof Map=="function"?new Map:void 0;return S=function(c){if(c===null||!o(c))return c;if(typeof c!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(c))return n.get(c);n.set(c,T)}function T(){return d(c,arguments,x(this).constructor)}return T.prototype=Object.create(c.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),r(T,c)},S(f)}function d(f,n,l){return a()?d=Reflect.construct:d=function(T,v,i){var L=[null];L.push.apply(L,v);var A=Function.bind.apply(T,L),y=new A;return i&&r(y,i.prototype),y},d.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(f){return!1}}function o(f){return Function.toString.call(f).indexOf("[native code]")!==-1}function r(f,n){return r=Object.setPrototypeOf||function(c,T){return c.__proto__=T,c},r(f,n)}function x(f){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)},x(f)}var g=Math.pow(2,17),m=function(){function f(l){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=l}var n=f.prototype;return n.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},n.abort=function(){this.loader&&this.loader.abort()},n.load=function(c,T){var v=this,i=c.url;if(!i)return Promise.reject(new p({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c,networkDetails:null},"Fragment does not have a "+(i?"part list":"url")));this.abort();var L=this.config,A=L.fLoader,y=L.loader;return new Promise(function(E,b){v.loader&&v.loader.destroy();var _=v.loader=c.loader=A?new A(L):new y(L),I=w(c),j={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:g};c.stats=_.stats,_.load(I,j,{onSuccess:function(G,K,H,z){v.resetLoader(c,_),E({frag:c,part:null,payload:G.data,networkDetails:z})},onError:function(G,K,H){v.resetLoader(c,_),b(new p({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c,response:G,networkDetails:H}))},onAbort:function(G,K,H){v.resetLoader(c,_),b(new p({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:c,networkDetails:H}))},onTimeout:function(G,K,H){v.resetLoader(c,_),b(new p({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:c,networkDetails:H}))},onProgress:function(G,K,H,z){T&&T({frag:c,part:null,payload:H,networkDetails:z})}})})},n.loadPart=function(c,T,v){var i=this;this.abort();var L=this.config,A=L.fLoader,y=L.loader;return new Promise(function(E,b){i.loader&&i.loader.destroy();var _=i.loader=c.loader=A?new A(L):new y(L),I=w(c,T),j={timeout:L.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:L.fragLoadingMaxRetryTimeout,highWaterMark:g};T.stats=_.stats,_.load(I,j,{onSuccess:function(G,K,H,z){i.resetLoader(c,_),i.updateStatsFromPart(c,T);var B={frag:c,part:T,payload:G.data,networkDetails:z};v(B),E(B)},onError:function(G,K,H){i.resetLoader(c,_),b(new p({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c,part:T,response:G,networkDetails:H}))},onAbort:function(G,K,H){c.stats.aborted=T.stats.aborted,i.resetLoader(c,_),b(new p({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:c,part:T,networkDetails:H}))},onTimeout:function(G,K,H){i.resetLoader(c,_),b(new p({type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:c,part:T,networkDetails:H}))}})})},n.updateStatsFromPart=function(c,T){var v=c.stats,i=T.stats,L=i.total;if(v.loaded+=i.loaded,L){var A=Math.round(c.duration/T.duration),y=Math.min(Math.round(v.loaded/L),A),E=A-y,b=E*Math.round(v.loaded/y);v.total=v.loaded+b}else v.total=Math.max(v.loaded,v.total);var _=v.loading,I=i.loading;_.start?_.first+=I.first-I.start:(_.start=I.start,_.first=I.first),_.end=I.end},n.resetLoader=function(c,T){c.loader=null,this.loader===T&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),T.destroy()},f}();function w(f,n){n===void 0&&(n=null);var l=n||f,c={frag:f,part:n,responseType:"arraybuffer",url:l.url,headers:{},rangeStart:0,rangeEnd:0},T=l.byteRangeStartOffset,v=l.byteRangeEndOffset;return Object(R.isFiniteNumber)(T)&&Object(R.isFiniteNumber)(v)&&(c.rangeStart=T,c.rangeEnd=v),c}var p=function(f){s(n,f);function n(l){for(var c,T=arguments.length,v=new Array(T>1?T-1:0),i=1;i>8*(15-L)&255;return i},c.setDecryptDataFromLevelKey=function(v,i){var L=v;return(v==null?void 0:v.method)==="AES-128"&&v.uri&&!v.iv&&(L=d.LevelKey.fromURI(v.uri),L.method=v.method,L.iv=this.createInitializationVector(i),L.keyFormat="identity"),L},c.setElementaryStreamInfo=function(v,i,L,A,y,E){E===void 0&&(E=!1);var b=this.elementaryStreams,_=b[v];if(!_){b[v]={startPTS:i,endPTS:L,startDTS:A,endDTS:y,partial:E};return}_.startPTS=Math.min(_.startPTS,i),_.endPTS=Math.max(_.endPTS,L),_.startDTS=Math.min(_.startDTS,A),_.endDTS=Math.max(_.endDTS,y)},c.clearElementaryStreamInfo=function(){var v=this.elementaryStreams;v[m.AUDIO]=null,v[m.VIDEO]=null,v[m.AUDIOVIDEO]=null},g(l,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var v=this.sn;typeof v!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&S.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),v=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,v)}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 v=Object(R.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+v*1e3}},{key:"encrypted",get:function(){var v;return!!((v=this.decryptdata)!==null&&v!==void 0&&v.keyFormat&&this.decryptdata.uri)}}]),l}(w),f=function(n){o(l,n);function l(c,T,v,i,L){var A;A=n.call(this,v)||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=c.decimalFloatingPoint("DURATION"),A.gap=c.bool("GAP"),A.independent=c.bool("INDEPENDENT"),A.relurl=c.enumeratedString("URI"),A.fragment=T,A.index=i;var y=c.enumeratedString("BYTERANGE");return y&&A.setByteRange(y,L),L&&(A.fragOffset=L.fragOffset+L.duration),A}return g(l,[{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)}}]),l}(w)},"./src/loader/key-loader.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return S});var R=C("./src/events.ts"),h=C("./src/errors.ts"),s=C("./src/utils/logger.ts"),S=function(){function d(o){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=o,this._registerListeners()}var a=d.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 x=this.loaders[r];x&&x.destroy()}this.loaders={}},a.onKeyLoading=function(r,x){var g=x.frag,m=g.type,w=this.loaders[m];if(!g.decryptdata){s.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var p=g.decryptdata.uri;if(p!==this.decrypturl||this.decryptkey===null){var f=this.hls.config;if(w&&(s.logger.warn("abort previous key loader for type:"+m),w.abort()),!p){s.logger.warn("key uri is falsy");return}var n=f.loader,l=g.loader=this.loaders[m]=new n(f);this.decrypturl=p,this.decryptkey=null;var c={url:p,frag:g,responseType:"arraybuffer"},T={timeout:f.fragLoadingTimeOut,maxRetry:0,retryDelay:f.fragLoadingRetryDelay,maxRetryDelay:f.fragLoadingMaxRetryTimeout,highWaterMark:0},v={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};l.load(c,T,v)}else this.decryptkey&&(g.decryptdata.key=this.decryptkey,this.hls.trigger(R.Events.KEY_LOADED,{frag:g}))},a.loadsuccess=function(r,x,g){var m=g.frag;if(!m.decryptdata){s.logger.error("after key load, decryptdata unset");return}this.decryptkey=m.decryptdata.key=new Uint8Array(r.data),m.loader=null,delete this.loaders[m.type],this.hls.trigger(R.Events.KEY_LOADED,{frag:m})},a.loaderror=function(r,x){var g=x.frag,m=g.loader;m&&m.abort(),delete this.loaders[g.type],this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:g,response:r})},a.loadtimeout=function(r,x){var g=x.frag,m=g.loader;m&&m.abort(),delete this.loaders[g.type],this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.NETWORK_ERROR,details:h.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:g})},d}()},"./src/loader/level-details.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"LevelDetails",function(){return d});var R=C("./src/polyfills/number.ts");function h(a,o){for(var r=0;rx.endSN||g>0||g===0&&m>0,this.updated||this.advanced?this.misses=Math.floor(x.misses*.6):this.misses=x.misses+1,this.availabilityDelay=x.availabilityDelay},s(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||S}},{key:"drift",get:function(){var x=this.driftEndTime-this.driftStartTime;if(x>0){var g=this.driftEnd-this.driftStart;return g*1e3/x}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var x;return(x=this.partList)!==null&&x!==void 0&&x.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var x;return(x=this.fragments)!==null&&x!==void 0&&x.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 x;return(x=this.partList)!==null&&x!==void 0&&x.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var x;return(x=this.partList)!==null&&x!==void 0&&x.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),a}()},"./src/loader/level-key.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"LevelKey",function(){return d});var R=C("./node_modules/url-toolkit/src/url-toolkit.js"),h=C.n(R);function s(a,o){for(var r=0;r2){var b=E.shift()+".";return b+=parseInt(E.shift()).toString(16),b+=("000"+parseInt(E.shift()).toString(16)).substr(-4),b}return y},L.resolve=function(y,E){return h.buildAbsoluteURL(E,y,{alwaysNormalize:!0})},L.parseMasterPlaylist=function(y,E){var b=[],_={},I=!1;g.lastIndex=0;for(var j;(j=g.exec(y))!=null;)if(j[1]){var M=new o.AttrList(j[1]),G={attrs:M,bitrate:M.decimalInteger("AVERAGE-BANDWIDTH")||M.decimalInteger("BANDWIDTH"),name:M.NAME,url:L.resolve(j[2],E)},K=M.decimalResolution("RESOLUTION");K&&(G.width=K.width,G.height=K.height),c((M.CODECS||"").split(/[ ,]+/).filter(function(z){return z}),G),G.videoCodec&&G.videoCodec.indexOf("avc1")!==-1&&(G.videoCodec=L.convertAVC1ToAVCOTI(G.videoCodec)),b.push(G)}else if(j[3]){var H=new o.AttrList(j[3]);H["DATA-ID"]&&(I=!0,_[H["DATA-ID"]]=H)}return{levels:b,sessionData:I?_:null}},L.parseMasterPlaylistMedia=function(y,E,b,_){_===void 0&&(_=[]);var I,j=[],M=0;for(m.lastIndex=0;(I=m.exec(y))!==null;){var G=new o.AttrList(I[1]);if(G.TYPE===b){var K={attrs:G,bitrate:0,id:M++,groupId:G["GROUP-ID"],instreamId:G["INSTREAM-ID"],name:G.NAME||G.LANGUAGE||"",type:b,default:G.bool("DEFAULT"),autoselect:G.bool("AUTOSELECT"),forced:G.bool("FORCED"),lang:G.LANGUAGE,url:G.URI?L.resolve(G.URI,E):""};if(_.length){var H=L.findGroup(_,K.groupId)||_[0];T(K,H,"audioCodec"),T(K,H,"textCodec")}j.push(K)}}return j},L.parseLevelPlaylist=function(y,E,b,_,I){var j=new d.LevelDetails(E),M=j.fragments,G=null,K=0,H=0,z=0,B=0,W=null,F=new S.Fragment(_,E),$,ee,Z,ve=-1,he=!1;for(w.lastIndex=0,j.m3u8=y;($=w.exec(y))!==null;){he&&(he=!1,F=new S.Fragment(_,E),F.start=z,F.sn=K,F.cc=B,F.level=b,G&&(F.initSegment=G,F.rawProgramDateTime=G.rawProgramDateTime));var le=$[1];if(le){F.duration=parseFloat(le);var Re=(" "+$[2]).slice(1);F.title=Re||null,F.tagList.push(Re?["INF",le,Re]:["INF",le])}else if($[3])Object(R.isFiniteNumber)(F.duration)&&(F.start=z,Z&&(F.levelkey=Z),F.sn=K,F.level=b,F.cc=B,F.urlId=I,M.push(F),F.relurl=(" "+$[3]).slice(1),i(F,W),W=F,z+=F.duration,K++,H=0,he=!0);else if($[4]){var xe=(" "+$[4]).slice(1);W?F.setByteRange(xe,W):F.setByteRange(xe)}else if($[5])F.rawProgramDateTime=(" "+$[5]).slice(1),F.tagList.push(["PROGRAM-DATE-TIME",F.rawProgramDateTime]),ve===-1&&(ve=M.length);else{if($=$[0].match(p),!$){r.logger.warn("No matches on slow regex match for level playlist!");continue}for(ee=1;ee<$.length&&!(typeof $[ee]!="undefined");ee++);var ie=(" "+$[ee]).slice(1),se=(" "+$[ee+1]).slice(1),re=$[ee+2]?(" "+$[ee+2]).slice(1):"";switch(ie){case"PLAYLIST-TYPE":j.type=se.toUpperCase();break;case"MEDIA-SEQUENCE":K=j.startSN=parseInt(se);break;case"SKIP":{var be=new o.AttrList(se),q=be.decimalInteger("SKIPPED-SEGMENTS");if(Object(R.isFiniteNumber)(q)){j.skippedSegments=q;for(var ne=q;ne--;)M.unshift(null);K+=q}var Te=be.enumeratedString("RECENTLY-REMOVED-DATERANGES");Te&&(j.recentlyRemovedDateranges=Te.split(" "));break}case"TARGETDURATION":j.targetduration=parseFloat(se);break;case"VERSION":j.version=parseInt(se);break;case"EXTM3U":break;case"ENDLIST":j.live=!1;break;case"#":(se||re)&&F.tagList.push(re?[se,re]:[se]);break;case"DIS":B++;case"GAP":F.tagList.push([ie]);break;case"BITRATE":F.tagList.push([ie,se]);break;case"DISCONTINUITY-SEQ":B=parseInt(se);break;case"KEY":{var ae,J=new o.AttrList(se),X=J.enumeratedString("METHOD"),Q=J.URI,pe=J.hexadecimalInteger("IV"),ce=J.enumeratedString("KEYFORMATVERSIONS"),we=J.enumeratedString("KEYID"),ze=(ae=J.enumeratedString("KEYFORMAT"))!=null?ae:"identity",Ge=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Ge.indexOf(ze)>-1){r.logger.warn("Keyformat "+ze+" is not supported from the manifest");continue}else if(ze!=="identity")continue;X&&(Z=a.LevelKey.fromURL(E,Q),Q&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(X)>=0&&(Z.method=X,Z.keyFormat=ze,we&&(Z.keyID=we),ce&&(Z.keyFormatVersions=ce),Z.iv=pe));break}case"START":{var Qe=new o.AttrList(se),$e=Qe.decimalFloatingPoint("TIME-OFFSET");Object(R.isFiniteNumber)($e)&&(j.startTimeOffset=$e);break}case"MAP":{var rt=new o.AttrList(se);F.relurl=rt.URI,rt.BYTERANGE&&F.setByteRange(rt.BYTERANGE),F.level=b,F.sn="initSegment",Z&&(F.levelkey=Z),F.initSegment=null,G=F,he=!0;break}case"SERVER-CONTROL":{var et=new o.AttrList(se);j.canBlockReload=et.bool("CAN-BLOCK-RELOAD"),j.canSkipUntil=et.optionalFloat("CAN-SKIP-UNTIL",0),j.canSkipDateRanges=j.canSkipUntil>0&&et.bool("CAN-SKIP-DATERANGES"),j.partHoldBack=et.optionalFloat("PART-HOLD-BACK",0),j.holdBack=et.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Me=new o.AttrList(se);j.partTarget=Me.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ce=j.partList;Ce||(Ce=j.partList=[]);var Ve=H>0?Ce[Ce.length-1]:void 0,tt=H++,He=new S.Part(new o.AttrList(se),F,E,tt,Ve);Ce.push(He),F.duration+=He.duration;break}case"PRELOAD-HINT":{var Je=new o.AttrList(se);j.preloadHint=Je;break}case"RENDITION-REPORT":{var _e=new o.AttrList(se);j.renditionReports=j.renditionReports||[],j.renditionReports.push(_e);break}default:r.logger.warn("line parsed but not handled: "+$);break}}}W&&!W.relurl?(M.pop(),z-=W.duration,j.partList&&(j.fragmentHint=W)):j.partList&&(i(F,W),F.cc=B,j.fragmentHint=F);var Se=M.length,Oe=M[0],de=M[Se-1];if(z+=j.skippedSegments*j.targetduration,z>0&&Se&&de){j.averagetargetduration=z/Se;var ye=de.sn;j.endSN=ye!=="initSegment"?ye:0,Oe&&(j.startCC=Oe.cc,Oe.initSegment||j.fragments.every(function(Ee){return Ee.relurl&&n(Ee.relurl)})&&(r.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),F=new S.Fragment(_,E),F.relurl=de.relurl,F.level=b,F.sn="initSegment",Oe.initSegment=F,j.needSidxRanges=!0))}else j.endSN=0,j.startCC=0;return j.fragmentHint&&(z+=j.fragmentHint.duration),j.totalduration=z,j.endCC=B,ve>0&&v(M,ve),j},L}();function c(L,A){["video","audio","text"].forEach(function(y){var E=L.filter(function(_){return Object(x.isCodecType)(_,y)});if(E.length){var b=E.filter(function(_){return _.lastIndexOf("avc1",0)===0||_.lastIndexOf("mp4a",0)===0});A[y+"Codec"]=b.length>0?b[0]:E[0],L=L.filter(function(_){return E.indexOf(_)===-1})}}),A.unknownCodecs=L}function T(L,A,y){var E=A[y];E&&(L[y]=E)}function v(L,A){for(var y=L[A],E=A;E--;){var b=L[E];if(!b)return;b.programDateTime=y.programDateTime-b.duration*1e3,y=b}}function i(L,A){L.rawProgramDateTime?L.programDateTime=Date.parse(L.rawProgramDateTime):A!=null&&A.programDateTime&&(L.programDateTime=A.endProgramDateTime),Object(R.isFiniteNumber)(L.programDateTime)||(L.programDateTime=null,L.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/polyfills/number.ts"),h=C("./src/events.ts"),s=C("./src/errors.ts"),S=C("./src/utils/logger.ts"),d=C("./src/utils/mp4-tools.ts"),a=C("./src/loader/m3u8-parser.ts"),o=C("./src/types/loader.ts"),r=C("./src/utils/attr-list.ts");function x(w){var p=w.type;switch(p){case o.PlaylistContextType.AUDIO_TRACK:return o.PlaylistLevelType.AUDIO;case o.PlaylistContextType.SUBTITLE_TRACK:return o.PlaylistLevelType.SUBTITLE;default:return o.PlaylistLevelType.MAIN}}function g(w,p){var f=w.url;return(f===void 0||f.indexOf("data:")===0)&&(f=p.url),f}var m=function(){function w(f){this.hls=void 0,this.loaders=Object.create(null),this.hls=f,this.registerListeners()}var p=w.prototype;return p.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)},p.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)},p.createInternalLoader=function(n){var l=this.hls.config,c=l.pLoader,T=l.loader,v=c||T,i=new v(l);return n.loader=i,this.loaders[n.type]=i,i},p.getInternalLoader=function(n){return this.loaders[n.type]},p.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},p.destroyInternalLoaders=function(){for(var n in this.loaders){var l=this.loaders[n];l&&l.destroy(),this.resetInternalLoader(n)}},p.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},p.onManifestLoading=function(n,l){var c=l.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:o.PlaylistContextType.MANIFEST,url:c,deliveryDirectives:null})},p.onLevelLoading=function(n,l){var c=l.id,T=l.level,v=l.url,i=l.deliveryDirectives;this.load({id:c,groupId:null,level:T,responseType:"text",type:o.PlaylistContextType.LEVEL,url:v,deliveryDirectives:i})},p.onAudioTrackLoading=function(n,l){var c=l.id,T=l.groupId,v=l.url,i=l.deliveryDirectives;this.load({id:c,groupId:T,level:null,responseType:"text",type:o.PlaylistContextType.AUDIO_TRACK,url:v,deliveryDirectives:i})},p.onSubtitleTrackLoading=function(n,l){var c=l.id,T=l.groupId,v=l.url,i=l.deliveryDirectives;this.load({id:c,groupId:T,level:null,responseType:"text",type:o.PlaylistContextType.SUBTITLE_TRACK,url:v,deliveryDirectives:i})},p.load=function(n){var l,c=this.hls.config,T=this.getInternalLoader(n);if(T){var v=T.context;if(v&&v.url===n.url){S.logger.trace("[playlist-loader]: playlist request ongoing");return}S.logger.log("[playlist-loader]: aborting previous loader for type: "+n.type),T.abort()}var i,L,A,y;switch(n.type){case o.PlaylistContextType.MANIFEST:i=c.manifestLoadingMaxRetry,L=c.manifestLoadingTimeOut,A=c.manifestLoadingRetryDelay,y=c.manifestLoadingMaxRetryTimeout;break;case o.PlaylistContextType.LEVEL:case o.PlaylistContextType.AUDIO_TRACK:case o.PlaylistContextType.SUBTITLE_TRACK:i=0,L=c.levelLoadingTimeOut;break;default:i=c.levelLoadingMaxRetry,L=c.levelLoadingTimeOut,A=c.levelLoadingRetryDelay,y=c.levelLoadingMaxRetryTimeout;break}if(T=this.createInternalLoader(n),(l=n.deliveryDirectives)!==null&&l!==void 0&&l.part){var E;if(n.type===o.PlaylistContextType.LEVEL&&n.level!==null?E=this.hls.levels[n.level].details:n.type===o.PlaylistContextType.AUDIO_TRACK&&n.id!==null?E=this.hls.audioTracks[n.id].details:n.type===o.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(E=this.hls.subtitleTracks[n.id].details),E){var b=E.partTarget,_=E.targetduration;b&&_&&(L=Math.min(Math.max(b*3,_*.8)*1e3,L))}}var I={timeout:L,maxRetry:i,retryDelay:A,maxRetryDelay:y,highWaterMark:0},j={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};T.load(n,I,j)},p.loadsuccess=function(n,l,c,T){if(T===void 0&&(T=null),c.isSidxRequest){this.handleSidxRequest(n,c),this.handlePlaylistLoaded(n,l,c,T);return}this.resetInternalLoader(c.type);var v=n.data;if(v.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,c,"no EXTM3U delimiter",T);return}l.parsing.start=performance.now(),v.indexOf("#EXTINF:")>0||v.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,l,c,T):this.handleMasterPlaylist(n,l,c,T)},p.loaderror=function(n,l,c){c===void 0&&(c=null),this.handleNetworkError(l,c,!1,n)},p.loadtimeout=function(n,l,c){c===void 0&&(c=null),this.handleNetworkError(l,c,!0)},p.handleMasterPlaylist=function(n,l,c,T){var v=this.hls,i=n.data,L=g(n,c),A=a.default.parseMasterPlaylist(i,L),y=A.levels,E=A.sessionData;if(!y.length){this.handleManifestParsingError(n,c,"no level found in manifest",T);return}var b=y.map(function(K){return{id:K.attrs.AUDIO,audioCodec:K.audioCodec}}),_=y.map(function(K){return{id:K.attrs.SUBTITLES,textCodec:K.textCodec}}),I=a.default.parseMasterPlaylistMedia(i,L,"AUDIO",b),j=a.default.parseMasterPlaylistMedia(i,L,"SUBTITLES",_),M=a.default.parseMasterPlaylistMedia(i,L,"CLOSED-CAPTIONS");if(I.length){var G=I.some(function(K){return!K.url});!G&&y[0].audioCodec&&!y[0].attrs.AUDIO&&(S.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),I.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new r.AttrList({}),bitrate:0,url:""}))}v.trigger(h.Events.MANIFEST_LOADED,{levels:y,audioTracks:I,subtitles:j,captions:M,url:L,stats:l,networkDetails:T,sessionData:E})},p.handleTrackOrLevelPlaylist=function(n,l,c,T){var v=this.hls,i=c.id,L=c.level,A=c.type,y=g(n,c),E=Object(R.isFiniteNumber)(i)?i:0,b=Object(R.isFiniteNumber)(L)?L:E,_=x(c),I=a.default.parseLevelPlaylist(n.data,y,b,_,E);if(!I.fragments.length){v.trigger(h.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:y,reason:"no fragments found in level",level:typeof c.level=="number"?c.level:void 0});return}if(A===o.PlaylistContextType.MANIFEST){var j={attrs:new r.AttrList({}),bitrate:0,details:I,name:"",url:y};v.trigger(h.Events.MANIFEST_LOADED,{levels:[j],audioTracks:[],url:y,stats:l,networkDetails:T,sessionData:null})}if(l.parsing.end=performance.now(),I.needSidxRanges){var M,G=(M=I.fragments[0].initSegment)===null||M===void 0?void 0:M.url;this.load({url:G,isSidxRequest:!0,type:A,level:L,levelDetails:I,id:i,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}c.levelDetails=I,this.handlePlaylistLoaded(n,l,c,T)},p.handleSidxRequest=function(n,l){var c=Object(d.parseSegmentIndex)(new Uint8Array(n.data));if(!c)return;var T=c.references,v=l.levelDetails;T.forEach(function(i,L){var A=i.info,y=v.fragments[L];y.byteRange.length===0&&y.setByteRange(String(1+A.end-A.start)+"@"+String(A.start)),y.initSegment&&y.initSegment.setByteRange(String(c.moovEndOffset)+"@0")})},p.handleManifestParsingError=function(n,l,c,T){this.hls.trigger(h.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:l.type===o.PlaylistContextType.MANIFEST,url:n.url,reason:c,response:n,context:l,networkDetails:T})},p.handleNetworkError=function(n,l,c,T){c===void 0&&(c=!1),S.logger.warn("[playlist-loader]: A network "+(c?"timeout":"error")+" occurred while loading "+n.type+" level: "+n.level+" id: "+n.id+' group-id: "'+n.groupId+'"');var v=s.ErrorDetails.UNKNOWN,i=!1,L=this.getInternalLoader(n);switch(n.type){case o.PlaylistContextType.MANIFEST:v=c?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,i=!0;break;case o.PlaylistContextType.LEVEL:v=c?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,i=!1;break;case o.PlaylistContextType.AUDIO_TRACK:v=c?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,i=!1;break;case o.PlaylistContextType.SUBTITLE_TRACK:v=c?s.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:s.ErrorDetails.SUBTITLE_LOAD_ERROR,i=!1;break}L&&this.resetInternalLoader(n.type);var A={type:s.ErrorTypes.NETWORK_ERROR,details:v,fatal:i,url:n.url,loader:L,context:n,networkDetails:l};T&&(A.response=T),this.hls.trigger(h.Events.ERROR,A)},p.handlePlaylistLoaded=function(n,l,c,T){var v=c.type,i=c.level,L=c.id,A=c.groupId,y=c.loader,E=c.levelDetails,b=c.deliveryDirectives;if(!(E!=null&&E.targetduration)){this.handleManifestParsingError(n,c,"invalid target duration",T);return}if(!y)return;E.live&&(y.getCacheAge&&(E.ageHeader=y.getCacheAge()||0),(!y.getCacheAge||isNaN(E.ageHeader))&&(E.ageHeader=0));switch(v){case o.PlaylistContextType.MANIFEST:case o.PlaylistContextType.LEVEL:this.hls.trigger(h.Events.LEVEL_LOADED,{details:E,level:i||0,id:L||0,stats:l,networkDetails:T,deliveryDirectives:b});break;case o.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(h.Events.AUDIO_TRACK_LOADED,{details:E,id:L||0,groupId:A||"",stats:l,networkDetails:T,deliveryDirectives:b});break;case o.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(h.Events.SUBTITLE_TRACK_LOADED,{details:E,id:L||0,groupId:A||"",stats:l,networkDetails:T,deliveryDirectives:b});break}},w}();u.default=m},"./src/polyfills/number.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"isFiniteNumber",function(){return R}),C.d(u,"MAX_SAFE_INTEGER",function(){return h});var R=Number.isFinite||function(s){return typeof s=="number"&&isFinite(s)},h=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(P,u,C){"use strict";C.r(u);var R=function(){function h(){}return h.getSilentFrame=function(S,d){switch(S){case"mp4a.40.2":if(d===1)return new Uint8Array([0,200,0,128,35,128]);if(d===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(d===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(d===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(d===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(d===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(d===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(d===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(d===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(P,u,C){"use strict";C.r(u);var R=Math.pow(2,32)-1,h=function(){function s(){}return s.init=function(){s.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 d;for(d in s.types)s.types.hasOwnProperty(d)&&(s.types[d]=[d.charCodeAt(0),d.charCodeAt(1),d.charCodeAt(2),d.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]),o=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]);s.HDLR_TYPES={video:a,audio:o};var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),x=new Uint8Array([0,0,0,0,0,0,0,0]);s.STTS=s.STSC=s.STCO=x,s.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),s.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),s.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),s.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var g=new Uint8Array([105,115,111,109]),m=new Uint8Array([97,118,99,49]),w=new Uint8Array([0,0,0,1]);s.FTYP=s.box(s.types.ftyp,g,w,g,m),s.DINF=s.box(s.types.dinf,s.box(s.types.dref,r))},s.box=function(d){for(var a=8,o=arguments.length,r=new Array(o>1?o-1:0),x=1;x>24&255,w[1]=a>>16&255,w[2]=a>>8&255,w[3]=a&255,w.set(d,4),g=0,a=8;g>24&255,d>>16&255,d>>8&255,d&255,o>>24,o>>16&255,o>>8&255,o&255,r>>24,r>>16&255,r>>8&255,r&255,85,196,0,0]))},s.mdia=function(d){return s.box(s.types.mdia,s.mdhd(d.timescale,d.duration),s.hdlr(d.type),s.minf(d))},s.mfhd=function(d){return s.box(s.types.mfhd,new Uint8Array([0,0,0,0,d>>24,d>>16&255,d>>8&255,d&255]))},s.minf=function(d){return d.type==="audio"?s.box(s.types.minf,s.box(s.types.smhd,s.SMHD),s.DINF,s.stbl(d)):s.box(s.types.minf,s.box(s.types.vmhd,s.VMHD),s.DINF,s.stbl(d))},s.moof=function(d,a,o){return s.box(s.types.moof,s.mfhd(d),s.traf(o,a))},s.moov=function(d){for(var a=d.length,o=[];a--;)o[a]=s.trak(d[a]);return s.box.apply(null,[s.types.moov,s.mvhd(d[0].timescale,d[0].duration)].concat(o).concat(s.mvex(d)))},s.mvex=function(d){for(var a=d.length,o=[];a--;)o[a]=s.trex(d[a]);return s.box.apply(null,[s.types.mvex].concat(o))},s.mvhd=function(d,a){a*=d;var o=Math.floor(a/(R+1)),r=Math.floor(a%(R+1)),x=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,d>>24&255,d>>16&255,d>>8&255,d&255,o>>24,o>>16&255,o>>8&255,o&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 s.box(s.types.mvhd,x)},s.sdtp=function(d){var a=d.samples||[],o=new Uint8Array(4+a.length),r,x;for(r=0;r>>8&255),a.push(g&255),a=a.concat(Array.prototype.slice.call(x));for(r=0;r>>8&255),o.push(g&255),o=o.concat(Array.prototype.slice.call(x));var m=s.box(s.types.avcC,new Uint8Array([1,a[3],a[4],a[5],252|3,224|d.sps.length].concat(a).concat([d.pps.length]).concat(o))),w=d.width,p=d.height,f=d.pixelRatio[0],n=d.pixelRatio[1];return s.box(s.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,w>>8&255,w&255,p>>8&255,p&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]),m,s.box(s.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),s.box(s.types.pasp,new Uint8Array([f>>24,f>>16&255,f>>8&255,f&255,n>>24,n>>16&255,n>>8&255,n&255])))},s.esds=function(d){var a=d.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(d.config).concat([6,1,2]))},s.mp4a=function(d){var a=d.samplerate;return s.box(s.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,d.channelCount,0,16,0,0,0,0,a>>8&255,a&255,0,0]),s.box(s.types.esds,s.esds(d)))},s.mp3=function(d){var a=d.samplerate;return s.box(s.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,d.channelCount,0,16,0,0,0,0,a>>8&255,a&255,0,0]))},s.stsd=function(d){return d.type==="audio"?!d.isAAC&&d.codec==="mp3"?s.box(s.types.stsd,s.STSD,s.mp3(d)):s.box(s.types.stsd,s.STSD,s.mp4a(d)):s.box(s.types.stsd,s.STSD,s.avc1(d))},s.tkhd=function(d){var a=d.id,o=d.duration*d.timescale,r=d.width,x=d.height,g=Math.floor(o/(R+1)),m=Math.floor(o%(R+1));return s.box(s.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,g>>24,g>>16&255,g>>8&255,g&255,m>>24,m>>16&255,m>>8&255,m&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,x>>8&255,x&255,0,0]))},s.traf=function(d,a){var o=s.sdtp(d),r=d.id,x=Math.floor(a/(R+1)),g=Math.floor(a%(R+1));return s.box(s.types.traf,s.box(s.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),s.box(s.types.tfdt,new Uint8Array([1,0,0,0,x>>24,x>>16&255,x>>8&255,x&255,g>>24,g>>16&255,g>>8&255,g&255])),s.trun(d,o.length+16+20+8+16+8+8),o)},s.trak=function(d){return d.duration=d.duration||4294967295,s.box(s.types.trak,s.tkhd(d),s.mdia(d))},s.trex=function(d){var a=d.id;return s.box(s.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]))},s.trun=function(d,a){var o=d.samples||[],r=o.length,x=12+16*r,g=new Uint8Array(x),m,w,p,f,n,l;for(a+=8+x,g.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),m=0;m>>24&255,p>>>16&255,p>>>8&255,p&255,f>>>24&255,f>>>16&255,f>>>8&255,f&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.paddingValue<<1|n.isNonSync,n.degradPrio&240<<8,n.degradPrio&15,l>>>24&255,l>>>16&255,l>>>8&255,l&255],12+16*m);return s.box(s.types.trun,g)},s.initSegment=function(d){s.types||s.init();var a=s.moov(d),o=new Uint8Array(s.FTYP.byteLength+a.byteLength);return o.set(s.FTYP),o.set(a,s.FTYP.byteLength),o},s}();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(P,u,C){"use strict";C.r(u),C.d(u,"default",function(){return l}),C.d(u,"normalizePts",function(){return c});var R=C("./src/polyfills/number.ts"),h=C("./src/remux/aac-helper.ts"),s=C("./src/remux/mp4-generator.ts"),S=C("./src/events.ts"),d=C("./src/errors.ts"),a=C("./src/utils/logger.ts"),o=C("./src/types/loader.ts"),r=C("./src/utils/timescale-conversion.ts");function x(){return x=Object.assign||function(L){for(var A=1;A0?I:j.pts},E[0].pts);return b&&a.logger.debug("PTS rollover detected"),_},A.remux=function(E,b,_,I,j,M,G,K){var H,z,B,W,F,$,ee=j,Z=j,ve=E.pid>-1,he=b.pid>-1,le=b.samples.length,Re=E.samples.length>0,xe=le>1,ie=(!ve||Re)&&(!he||xe)||this.ISGenerated||G;if(ie){this.ISGenerated||(B=this.generateIS(E,b,j));var se=this.isVideoContiguous,re=-1;if(xe&&(re=T(b.samples),!se&&this.config.forceKeyFrameOnDiscontinuity))if($=!0,re>0){a.logger.warn("[mp4-remuxer]: Dropped "+re+" out of "+le+" video samples due to a missing keyframe");var be=this.getVideoStartPts(b.samples);b.samples=b.samples.slice(re),b.dropped+=re,Z+=(b.samples[0].pts-be)/(b.timescale||9e4)}else re===-1&&(a.logger.warn("[mp4-remuxer]: No keyframe found out of "+le+" video samples"),$=!1);if(this.ISGenerated){if(Re&&xe){var q=this.getVideoStartPts(b.samples),ne=c(E.samples[0].pts,q)-q,Te=ne/b.inputTimeScale;ee+=Math.max(0,Te),Z+=Math.max(0,-Te)}if(Re){if(E.samplerate||(a.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),B=this.generateIS(E,b,j)),z=this.remuxAudio(E,ee,this.isAudioContiguous,M,he||xe||K===o.PlaylistLevelType.AUDIO?Z:void 0),xe){var ae=z?z.endPTS-z.startPTS:0;b.inputTimeScale||(a.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),B=this.generateIS(E,b,j)),H=this.remuxVideo(b,Z,se,ae)}}else xe&&(H=this.remuxVideo(b,Z,se,0));H&&(H.firstKeyFrame=re,H.independent=re!==-1)}}return this.ISGenerated&&(_.samples.length&&(F=this.remuxID3(_,j)),I.samples.length&&(W=this.remuxText(I,j))),{audio:z,video:H,initSegment:B,independent:$,text:W,id3:F}},A.generateIS=function(E,b,_){var I=E.samples,j=b.samples,M=this.typeSupported,G={},K=!Object(R.isFiniteNumber)(this._initPTS),H="audio/mp4",z,B,W;if(K&&(z=B=Infinity),E.config&&I.length&&(E.timescale=E.samplerate,E.isAAC||(M.mpeg?(H="audio/mpeg",E.codec=""):M.mp3&&(E.codec="mp3")),G.audio={id:"audio",container:H,codec:E.codec,initSegment:!E.isAAC&&M.mpeg?new Uint8Array(0):s.default.initSegment([E]),metadata:{channelCount:E.channelCount}},K&&(W=E.inputTimeScale,z=B=I[0].pts-Math.round(W*_))),b.sps&&b.pps&&j.length&&(b.timescale=b.inputTimeScale,G.video={id:"main",container:"video/mp4",codec:b.codec,initSegment:s.default.initSegment([b]),metadata:{width:b.width,height:b.height}},K)){W=b.inputTimeScale;var F=this.getVideoStartPts(j),$=Math.round(W*_);B=Math.min(B,c(j[0].dts,F)-$),z=Math.min(z,F-$)}if(Object.keys(G).length)return this.ISGenerated=!0,K&&(this._initPTS=z,this._initDTS=B),{tracks:G,initPTS:z,timescale:W}},A.remuxVideo=function(E,b,_,I){var j=E.inputTimeScale,M=E.samples,G=[],K=M.length,H=this._initPTS,z=this.nextAvcDts,B=8,W,F,$,ee=Number.POSITIVE_INFINITY,Z=Number.NEGATIVE_INFINITY,ve=0,he=!1;if(!_||z===null){var le=b*j,Re=M[0].pts-c(M[0].dts,M[0].pts);z=le-Re}for(var xe=0;xeie.pts){var se=9e4*.2;ve=Math.max(Math.min(ve,ie.pts-ie.dts),-1*se)}ie.dts0?xe-1:xe].dts&&(he=!0)}he&&M.sort(function(jt,Ct){var xt=jt.dts-Ct.dts,Yt=jt.pts-Ct.pts;return xt||Yt}),F=M[0].dts,$=M[M.length-1].dts;var re=Math.round(($-F)/(K-1));if(ve<0){if(vere,J=Te<-1;if(ae||J){ae?a.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(Te,!0)+" ms ("+Te+"dts) hole between fragments detected, filling it"):a.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(-Te,!0)+" ms ("+Te+"dts) overlapping between fragments detected"),F=z;var X=M[0].pts-Te;M[0].dts=F,M[0].pts=X,a.logger.log("Video: First PTS/DTS adjusted: "+Object(r.toMsFromMpegTsClock)(X,!0)+"/"+Object(r.toMsFromMpegTsClock)(F,!0)+", delta: "+Object(r.toMsFromMpegTsClock)(Te,!0)+" ms")}}n&&(F=Math.max(0,F));for(var Q=0,pe=0,ce=0;ce0?Ce-1:Ce].dts;if(ye.stretchShortVideoTrack&&this.nextAudioPts!==null){var De=Math.floor(ye.maxBufferHole*j),Be=(I?ee+I*j:this.nextAudioPts)-Ve.pts;Be>De?(W=Be-Ee,W<0&&(W=Ee),a.logger.log("[mp4-remuxer]: It is approximately "+Be/90+" ms to the next segment; using duration "+W/90+" ms for the last video frame.")):W=Ee}else W=Ee}var Xe=Math.round(Ve.pts-Ve.dts);G.push(new v(Ve.key,W,He,Xe))}if(G.length&&p&&p<70){var nt=G[0].flags;nt.dependsOn=2,nt.isNonSync=0}console.assert(W!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=z=$+W,this.isVideoContiguous=!0;var dt=s.default.moof(E.sequenceNumber++,F,x({},E,{samples:G})),Et="video",ft={data1:dt,data2:et,startPTS:ee/j,endPTS:(Z+W)/j,startDTS:F/j,endDTS:z/j,type:Et,hasAudio:!1,hasVideo:!0,nb:G.length,dropped:E.dropped};return E.samples=[],E.dropped=0,console.assert(et.length,"MDAT length must not be zero"),ft},A.remuxAudio=function(E,b,_,I,j){var M=E.inputTimeScale,G=E.samplerate?E.samplerate:M,K=M/G,H=E.isAAC?m:w,z=H*K,B=this._initPTS,W=!E.isAAC&&this.typeSupported.mpeg,F=[],$=E.samples,ee=W?0:8,Z=this.nextAudioPts||-1,ve=b*M;if(this.isAudioContiguous=_=_||$.length&&Z>0&&(I&&Math.abs(ve-Z)<9e3||Math.abs(c($[0].pts-B,ve)-Z)<20*z),$.forEach(function(Oe){Oe.pts=c(Oe.pts-B,ve)}),!_||Z<0){if($=$.filter(function(Oe){return Oe.pts>=0}),!$.length)return;j===0?Z=0:I?Z=Math.max(0,ve):Z=$[0].pts}if(E.isAAC)for(var he=j!==void 0,le=this.config.maxAudioFramesDrift,Re=0,xe=Z;Re<$.length;Re++){var ie=$[Re],se=ie.pts,re=se-xe,be=Math.abs(1e3*re/M);if(re<=-le*z&&he)Re===0&&(a.logger.warn("Audio frame @ "+(se/M).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*re/M)+" ms."),this.nextAudioPts=Z=xe=se);else if(re>=le*z&&be0){pe+=ee;try{Q=new Uint8Array(pe)}catch(Oe){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:d.ErrorTypes.MUX_ERROR,details:d.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:pe,reason:"fail allocating audio mdat "+pe});return}if(!W){var et=new DataView(Q.buffer);et.setUint32(0,pe),Q.set(s.default.types.mdat,4)}}else return;Q.set(Qe,ee);var Me=Qe.byteLength;ee+=Me,F.push(new v(!0,H,Me,0)),X=$e}var Ce=F.length;if(!Ce)return;var Ve=F[F.length-1];this.nextAudioPts=Z=X+K*Ve.duration;var tt=W?new Uint8Array(0):s.default.moof(E.sequenceNumber++,J/K,x({},E,{samples:F}));E.samples=[];var He=J/M,Je=Z/M,_e="audio",Se={data1:tt,data2:Q,startPTS:He,endPTS:Je,startDTS:He,endDTS:Je,type:_e,hasAudio:!0,hasVideo:!1,nb:Ce};return this.isAudioContiguous=!0,console.assert(Q.length,"MDAT length must not be zero"),Se},A.remuxEmptyAudio=function(E,b,_,I){var j=E.inputTimeScale,M=E.samplerate?E.samplerate:j,G=j/M,K=this.nextAudioPts,H=(K!==null?K:I.startDTS*j)+this._initDTS,z=I.endDTS*j+this._initDTS,B=G*m,W=Math.ceil((z-H)/B),F=h.default.getSilentFrame(E.manifestCodec||E.codec,E.channelCount);if(a.logger.warn("[mp4-remuxer]: remux empty Audio"),!F){a.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var $=[],ee=0;ee4294967296;)L+=y;return L}function T(L){for(var A=0;A0?this.lastEndDTS=E:(S.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var b=!!L.audio,_=!!L.video,I="";b&&(I+="audio"),_&&(I+="video");var j={data1:v,startPTS:y,startDTS:y,endPTS:E,endDTS:E,type:I,hasAudio:b,hasVideo:_,nb:1,dropped:0};return T.audio=j.type==="audio"?j:void 0,T.video=j.type!=="audio"?j:void 0,T.text=f,T.id3=p,T.initSegment=i,T},r}(),a=function(x,g,m){return Object(h.getStartDTS)(x,g)-m};function o(r,x){var g=r==null?void 0:r.codec;return g&&g.length>4?g:g==="hvc1"?"hvc1.1.c.L120.90":g==="av01"?"av01.0.04M.08":g==="avc1"||x===s.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}u.default=d},"./src/task-loop.ts":function(P,u,C){"use strict";C.r(u),C.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 s=h.prototype;return s.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},s.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},s.onHandlerDestroyed=function(){},s.hasInterval=function(){return!!this._tickInterval},s.hasNextTick=function(){return!!this._tickTimer},s.setInterval=function(d){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,d),!0)},s.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},s.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},s.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},s.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},s.doTick=function(){},h}()},"./src/types/cmcd.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"CMCDVersion",function(){return R}),C.d(u,"CMCDObjectType",function(){return h}),C.d(u,"CMCDStreamingFormat",function(){return s}),C.d(u,"CMCDStreamType",function(){return S});var R=1,h;(function(d){d.MANIFEST="m",d.AUDIO="a",d.VIDEO="v",d.MUXED="av",d.INIT="i",d.CAPTION="c",d.TIMED_TEXT="tt",d.KEY="k",d.OTHER="o"})(h||(h={}));var s;(function(d){d.DASH="d",d.HLS="h",d.SMOOTH="s",d.OTHER="o"})(s||(s={}));var S;(function(d){d.VOD="v",d.LIVE="l"})(S||(S={}))},"./src/types/level.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"HlsSkip",function(){return s}),C.d(u,"getSkipValue",function(){return S}),C.d(u,"HlsUrlParameters",function(){return d}),C.d(u,"Level",function(){return a});function R(o,r){for(var x=0;xNumber.MAX_SAFE_INTEGER?Infinity:r},d.hexadecimalInteger=function(o){if(this[o]){var r=(this[o]||"0x").slice(2);r=(r.length&1?"0":"")+r;for(var x=new Uint8Array(r.length/2),g=0;gNumber.MAX_SAFE_INTEGER?Infinity:r},d.decimalFloatingPoint=function(o){return parseFloat(this[o])},d.optionalFloat=function(o,r){var x=this[o];return x?parseFloat(x):r},d.enumeratedString=function(o){return this[o]},d.bool=function(o){return this[o]==="YES"},d.decimalResolution=function(o){var r=R.exec(this[o]);return r===null?void 0:{width:parseInt(r[1],10),height:parseInt(r[2],10)}},S.parseAttrList=function(o){var r,x={},g='"';for(h.lastIndex=0;(r=h.exec(o))!==null;){var m=r[2];m.indexOf(g)===0&&m.lastIndexOf(g)===m.length-1&&(m=m.slice(1,-1)),x[r[1]]=m}return x},S}()},"./src/utils/binary-search.ts":function(P,u,C){"use strict";C.r(u);var R={search:function(s,S){for(var d=0,a=s.length-1,o=null,r=null;d<=a;){o=(d+a)/2|0,r=s[o];var x=S(r);if(x>0)d=o+1;else if(x<0)a=o-1;else return r}return null}};u.default=R},"./src/utils/buffer-helper.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"BufferHelper",function(){return s});var R=C("./src/utils/logger.ts"),h={length:0,start:function(){return 0},end:function(){return 0}},s=function(){function S(){}return S.isBuffered=function(a,o){try{if(a){for(var r=S.getBuffered(a),x=0;x=r.start(x)&&o<=r.end(x))return!0}}catch(g){}return!1},S.bufferInfo=function(a,o,r){try{if(a){var x=S.getBuffered(a),g=[],m;for(m=0;mw&&(x[m-1].end=a[g].end):x.push(a[g])}else x.push(a[g])}else x=a;for(var p=0,f,n=o,l=o,c=0;c=T&&o=_&&R.logger.log(this.time+" ["+_+"] "+I)},y}(),p=function(E){for(var b=[],_=0;_d&&(this.logger.log(m.DEBUG,"Too large cursor position "+this.pos),this.pos=d)},E.moveCursor=function(_){var I=this.pos+_;if(_>1)for(var j=this.pos+1;j=144&&this.backSpace();var I=s(_);if(this.pos>=d){this.logger.log(m.ERROR,"Cannot insert "+_.toString(16)+" ("+I+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(I,this.currPenState),this.moveCursor(1)},E.clearFromPos=function(_){var I;for(I=_;I0&&(_?j="["+I.join(" | ")+"]":j=I.join(` `)),j},E.getTextAndFormat=function(){return this.rows},y}(),T=function(){function y(b,_,I){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=b,this.outputFilter=_,this.mode=null,this.verbose=0,this.displayedMemory=new c(I),this.nonDisplayedMemory=new c(I),this.lastOutputScreen=new c(I),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=I}var E=y.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[S-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(m.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 I=0;I<_.length;I++)this.writeScreen.insertChar(_[I]);var j=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(m.INFO,j+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(m.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},E.ccRCL=function(){this.logger.log(m.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},E.ccBS=function(){if(this.logger.log(m.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(m.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},E.ccRU=function(_){this.logger.log(m.INFO,"RU("+_+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(_)},E.ccFON=function(){this.logger.log(m.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},E.ccRDC=function(){this.logger.log(m.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},E.ccTR=function(){this.logger.log(m.INFO,"TR"),this.setMode("MODE_TEXT")},E.ccRTD=function(){this.logger.log(m.INFO,"RTD"),this.setMode("MODE_TEXT")},E.ccEDM=function(){this.logger.log(m.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},E.ccCR=function(){this.logger.log(m.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},E.ccENM=function(){this.logger.log(m.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},E.ccEOC=function(){if(this.logger.log(m.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(m.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},E.ccTO=function(_){this.logger.log(m.INFO,"TO("+_+") - Tab Offset"),this.writeScreen.moveCursor(_)},E.ccMIDROW=function(_){var I={flash:!1};if(I.underline=_%2===1,I.italics=_>=46,I.italics)I.foreground="white";else{var j=Math.floor(_/2)-16,M=["white","green","blue","cyan","red","yellow","magenta"];I.foreground=M[j]}this.logger.log(m.INFO,"MIDROW: "+JSON.stringify(I)),this.writeScreen.setPen(I)},E.outputDataUpdate=function(_){_===void 0&&(_=!1);var I=this.logger.time;if(I===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=I:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,I,this.lastOutputScreen),_&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:I),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=_))},y}(),v=function(){function y(b,_,I){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var j=new w;this.channels=[null,new T(b,_,j),new T(b+1,I,j)],this.cmdHistory=A(),this.logger=j}var E=y.prototype;return E.getHandler=function(_){return this.channels[_].getHandler()},E.setHandler=function(_,I){this.channels[_].setHandler(I)},E.addData=function(_,I){var j,M,G,K=!1;this.logger.time=_;for(var H=0;H ("+p([M,G])+")"),j=this.parseCmd(M,G),j||(j=this.parseMidrow(M,G)),j||(j=this.parsePAC(M,G)),j||(j=this.parseBackgroundAttributes(M,G)),!j&&(K=this.parseChars(M,G),K)){var z=this.currentChannel;if(z&&z>0){var B=this.channels[z];B.insertChars(K)}else this.logger.log(m.WARNING,"No channel found yet. TEXT-MODE?")}!j&&!K&&this.logger.log(m.WARNING,"Couldn't parse cleaned data "+p([M,G])+" orig: "+p([I[H],I[H+1]]))}},E.parseCmd=function(_,I){var j=this.cmdHistory,M=(_===20||_===28||_===21||_===29)&&I>=32&&I<=47,G=(_===23||_===31)&&I>=33&&I<=35;if(!(M||G))return!1;if(L(_,I,j))return i(null,null,j),this.logger.log(m.DEBUG,"Repeated command ("+p([_,I])+") is dropped"),!0;var K=_===20||_===21||_===23?1:2,H=this.channels[K];return _===20||_===21||_===28||_===29?I===32?H.ccRCL():I===33?H.ccBS():I===34?H.ccAOF():I===35?H.ccAON():I===36?H.ccDER():I===37?H.ccRU(2):I===38?H.ccRU(3):I===39?H.ccRU(4):I===40?H.ccFON():I===41?H.ccRDC():I===42?H.ccTR():I===43?H.ccRTD():I===44?H.ccEDM():I===45?H.ccCR():I===46?H.ccENM():I===47&&H.ccEOC():H.ccTO(I-32),i(_,I,j),this.currentChannel=K,!0},E.parseMidrow=function(_,I){var j=0;if((_===17||_===25)&&I>=32&&I<=47){if(_===17?j=1:j=2,j!==this.currentChannel)return this.logger.log(m.ERROR,"Mismatch channel in midrow parsing"),!1;var M=this.channels[j];return M?(M.ccMIDROW(I),this.logger.log(m.DEBUG,"MIDROW ("+p([_,I])+")"),!0):!1}return!1},E.parsePAC=function(_,I){var j,M=this.cmdHistory,G=(_>=17&&_<=23||_>=25&&_<=31)&&I>=64&&I<=127,K=(_===16||_===24)&&I>=64&&I<=95;if(!(G||K))return!1;if(L(_,I,M))return i(null,null,M),!0;var H=_<=23?1:2;I>=64&&I<=95?j=H===1?a[_]:r[_]:j=H===1?o[_]:x[_];var z=this.channels[H];return z?(z.setPAC(this.interpretPAC(j,I)),i(_,I,M),this.currentChannel=H,!0):!1},E.interpretPAC=function(_,I){var j,M={color:null,italics:!1,indent:null,underline:!1,row:_};return I>95?j=I-96:j=I-64,M.underline=(j&1)===1,j<=13?M.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(j/2)]:j<=15?(M.italics=!0,M.color="white"):M.indent=Math.floor((j-16)/2)*4,M},E.parseChars=function(_,I){var j,M=null,G=null;if(_>=25?(j=2,G=_-8):(j=1,G=_),G>=17&&G<=19){var K;G===17?K=I+80:G===18?K=I+112:K=I+144,this.logger.log(m.INFO,"Special char '"+s(K)+"' in channel "+j),M=[K]}else _>=32&&_<=127&&(M=I===0?[_]:[_,I]);if(M){var H=p(M);this.logger.log(m.DEBUG,"Char codes = "+H.join(",")),i(_,I,this.cmdHistory)}return M},E.parseBackgroundAttributes=function(_,I){var j=(_===16||_===24)&&I>=32&&I<=47,M=(_===23||_===31)&&I>=45&&I<=47;if(!(j||M))return!1;var G,K={};_===16||_===24?(G=Math.floor((I-32)/2),K.background=g[G],I%2===1&&(K.background=K.background+"_semi")):I===45?K.background="transparent":(K.foreground="black",I===47&&(K.underline=!0));var H=_<=23?1:2,z=this.channels[H];return z.setBkgData(K),i(_,I,this.cmdHistory),!0},E.reset=function(){for(var _=0;_=16?n--:n++;var i=Object(R.fixLineBreaks)(l.trim()),L=Object(h.generateCueId)(r,x,i);(!o||!o.cues||!o.cues.getCueById(L))&&(p=new c(r,x,i),p.id=L,p.line=T+1,p.align="left",p.position=10+Math.min(80,Math.floor(n*8/32)*10),m.push(p))}return o&&m.length&&(m.sort(function(A,y){return A.line==="auto"||y.line==="auto"?0:A.line>8&&y.line>8?y.line-A.line:A.line-y.line}),m.forEach(function(A){return Object(s.addCueToTrack)(o,A)})),m}};u.default=d},"./src/utils/discontinuities.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"findFirstFragWithCC",function(){return S}),C.d(u,"shouldAlignOnDiscontinuities",function(){return d}),C.d(u,"findDiscontinuousReferenceFrag",function(){return a}),C.d(u,"adjustSlidingStart",function(){return r}),C.d(u,"alignStream",function(){return x}),C.d(u,"alignPDT",function(){return m}),C.d(u,"alignFragmentByPDTDelta",function(){return w}),C.d(u,"alignMediaPlaylistByPDT",function(){return p});var R=C("./src/polyfills/number.ts"),h=C("./src/utils/logger.ts"),s=C("./src/controller/level-helper.ts");function S(f,n){for(var l=null,c=0,T=f.length;cl.startCC||f&&f.cc=this.minWeight_},S.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},S.destroy=function(){},s}();u.default=h},"./src/utils/ewma.ts":function(P,u,C){"use strict";C.r(u);var R=function(){function h(S,d,a){d===void 0&&(d=0),a===void 0&&(a=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=S,this.alpha_=S?Math.exp(Math.log(.5)/S):0,this.estimate_=d,this.totalWeight_=a}var s=h.prototype;return s.sample=function(d,a){var o=Math.pow(this.alpha_,d);this.estimate_=a*(1-o)+o*this.estimate_,this.totalWeight_+=d},s.getTotalWeight=function(){return this.totalWeight_},s.getEstimate=function(){if(this.alpha_){var d=1-Math.pow(this.alpha_,this.totalWeight_);if(d)return this.estimate_/d}return this.estimate_},h}();u.default=R},"./src/utils/fetch-loader.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"fetchSupported",function(){return w});var R=C("./src/polyfills/number.ts"),h=C("./src/loader/load-stats.ts"),s=C("./src/demux/chunk-cache.ts");function S(c,T){c.prototype=Object.create(T.prototype),c.prototype.constructor=c,x(c,T)}function d(c){var T=typeof Map=="function"?new Map:void 0;return d=function(i){if(i===null||!r(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof T!="undefined"){if(T.has(i))return T.get(i);T.set(i,L)}function L(){return a(i,arguments,g(this).constructor)}return L.prototype=Object.create(i.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),x(L,i)},d(c)}function a(c,T,v){return o()?a=Reflect.construct:a=function(L,A,y){var E=[null];E.push.apply(E,A);var b=Function.bind.apply(L,E),_=new b;return y&&x(_,y.prototype),_},a.apply(null,arguments)}function o(){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(c){return!1}}function r(c){return Function.toString.call(c).indexOf("[native code]")!==-1}function x(c,T){return x=Object.setPrototypeOf||function(i,L){return i.__proto__=L,i},x(c,T)}function g(c){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},g(c)}function m(){return m=Object.assign||function(c){for(var T=1;T=y&&E(L,A,b.flush(),i)):E(L,A,G,i),j()}).catch(function(){return Promise.reject()})};return I()},c}();function f(c,T){var v={method:"GET",mode:"cors",credentials:"same-origin",signal:T,headers:new self.Headers(m({},c.headers))};return c.rangeEnd&&v.headers.set("Range","bytes="+c.rangeStart+"-"+String(c.rangeEnd-1)),v}function n(c,T){return new self.Request(c.url,T)}var l=function(c){S(T,c);function T(v,i,L){var A;return A=c.call(this,v)||this,A.code=void 0,A.details=void 0,A.code=i,A.details=L,A}return T}(d(Error));u.default=p},"./src/utils/imsc1-ttml-parser.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"IMSC1_CODEC",function(){return r}),C.d(u,"parseIMSC1",function(){return w});var R=C("./src/utils/mp4-tools.ts"),h=C("./src/utils/vttparser.ts"),s=C("./src/utils/vttcue.ts"),S=C("./src/demux/id3.ts"),d=C("./src/utils/timescale-conversion.ts"),a=C("./src/utils/webvtt-parser.ts");function o(){return o=Object.assign||function(y){for(var E=1;E"):R}function d(r){for(var x=arguments.length,g=new Array(x>1?x-1:0),m=1;m>24,T[v+1]=i>>16&255,T[v+2]=i>>8&255,T[v+3]=i&255}function x(T,v){var i=[];if(!v.length)return i;var L,A,y;"data"in T?(L=T.data,A=T.start,y=T.end):(L=T,A=0,y=L.byteLength);for(var E=A;E1?E+b:y;if(_===v[0])if(v.length===1)i.push({data:L,start:E+8,end:I});else{var j=x({data:L,start:E+8,end:I},v.slice(1));j.length&&S.apply(i,j)}E=I}return i}function g(T){var v=x(T,["moov"]),i=v[0],L=i?i.end:null,A=x(T,["sidx"]);if(!A||!A[0])return null;var y=[],E=A[0],b=E.data[0],_=b===0?8:16,I=o(E,_);_+=4;var j=0,M=0;b===0?_+=8:_+=16,_+=2;var G=E.end+M,K=a(E,_);_+=2;for(var H=0;H>>31;if(F===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var $=o(E,z);z+=4,y.push({referenceSize:W,subsegmentDuration:$,info:{duration:$/I,start:G,end:G+W-1}}),G+=W,z+=4,_=z}return{earliestPresentationTime:j,timescale:I,version:b,referencesCount:K,references:y,moovEndOffset:L}}function m(T){for(var v=[],i=x(T,["moov","trak"]),L=0;Ld)&&(this.startTime=d),this.endTime=a,this.screen=o,this.timelineController.createCaptionsTrack(this.trackName)},s.reset=function(){this.cueRanges=[]},h}()},"./src/utils/texttrack-utils.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"sendAddTrackEvent",function(){return h}),C.d(u,"addCueToTrack",function(){return s}),C.d(u,"clearCurrentCues",function(){return S}),C.d(u,"removeCuesInRange",function(){return d}),C.d(u,"getCuesInRange",function(){return o});var R=C("./src/utils/logger.ts");function h(r,x){var g;try{g=new Event("addtrack")}catch(m){g=document.createEvent("Event"),g.initEvent("addtrack",!1,!1)}g.track=r,x.dispatchEvent(g)}function s(r,x){var g=r.mode;if(g==="disabled"&&(r.mode="hidden"),r.cues&&!r.cues.getCueById(x.id))try{if(r.addCue(x),!r.cues.getCueById(x.id))throw new Error("addCue is failed for: "+x)}catch(w){R.logger.debug("[texttrack-utils]: "+w);var m=new self.TextTrackCue(x.startTime,x.endTime,x.text);m.id=x.id,r.addCue(m)}g==="disabled"&&(r.mode=g)}function S(r){var x=r.mode;if(x==="disabled"&&(r.mode="hidden"),r.cues)for(var g=r.cues.length;g--;)r.removeCue(r.cues[g]);x==="disabled"&&(r.mode=x)}function d(r,x,g){var m=r.mode;if(m==="disabled"&&(r.mode="hidden"),r.cues&&r.cues.length>0)for(var w=o(r.cues,x,g),p=0;pr[g].endTime)return-1;for(var m=0,w=g;m<=w;){var p=Math.floor((w+m)/2);if(xr[p].startTime&&m-1)for(var p=w,f=r.length;p=x&&n.endTime<=g)m.push(n);else if(n.startTime>g)return m}return m}},"./src/utils/time-ranges.ts":function(P,u,C){"use strict";C.r(u);var R={toString:function(s){for(var S="",d=s.length,a=0;a1?x-1:0),m=1;m100)throw new Error("Position must be between 0 and 100.");y=j,this.hasBeenReset=!0}})),Object.defineProperty(m,"positionAlign",a({},w,{get:function(){return E},set:function(j){var M=d(j);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");E=M,this.hasBeenReset=!0}})),Object.defineProperty(m,"size",a({},w,{get:function(){return b},set:function(j){if(j<0||j>100)throw new Error("Size must be between 0 and 100.");b=j,this.hasBeenReset=!0}})),Object.defineProperty(m,"align",a({},w,{get:function(){return _},set:function(j){var M=d(j);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");_=M,this.hasBeenReset=!0}})),m.displayState=void 0}return o.prototype.getCueAsHTML=function(){var r=self.WebVTT;return r.convertCueToDOMTree(self,this.text)},o}()},"./src/utils/vttparser.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"parseTimeStamp",function(){return s}),C.d(u,"fixLineBreaks",function(){return x}),C.d(u,"VTTParser",function(){return g});var R=C("./src/utils/vttcue.ts"),h=function(){function m(){}var w=m.prototype;return w.decode=function(f,n){if(!f)return"";if(typeof f!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(f))},m}();function s(m){function w(f,n,l,c){return(f|0)*3600+(n|0)*60+(l|0)+parseFloat(c||0)}var p=m.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return p?parseFloat(p[2])>59?w(p[2],p[3],0,p[4]):w(p[1],p[2],p[3],p[4]):null}var S=function(){function m(){this.values=Object.create(null)}var w=m.prototype;return w.set=function(f,n){!this.get(f)&&n!==""&&(this.values[f]=n)},w.get=function(f,n,l){return l?this.has(f)?this.values[f]:n[l]:this.has(f)?this.values[f]:n},w.has=function(f){return f in this.values},w.alt=function(f,n,l){for(var c=0;c=0&&l<=100)return this.set(f,l),!0}return!1},m}();function d(m,w,p,f){var n=f?m.split(f):[m];for(var l in n){if(typeof n[l]!="string")continue;var c=n[l].split(p);if(c.length!==2)continue;var T=c[0],v=c[1];w(T,v)}}var a=new R.default(0,0,""),o=a.align==="middle"?"middle":"center";function r(m,w,p){var f=m;function n(){var T=s(m);if(T===null)throw new Error("Malformed timestamp: "+f);return m=m.replace(/^[^\sa-zA-Z-]+/,""),T}function l(T,v){var i=new S;d(T,function(y,E){var b;switch(y){case"region":for(var _=p.length-1;_>=0;_--)if(p[_].id===E){i.set(y,p[_].region);break}break;case"vertical":i.alt(y,E,["rl","lr"]);break;case"line":b=E.split(","),i.integer(y,b[0]),i.percent(y,b[0])&&i.set("snapToLines",!1),i.alt(y,b[0],["auto"]),b.length===2&&i.alt("lineAlign",b[1],["start",o,"end"]);break;case"position":b=E.split(","),i.percent(y,b[0]),b.length===2&&i.alt("positionAlign",b[1],["start",o,"end","line-left","line-right","auto"]);break;case"size":i.percent(y,E);break;case"align":i.alt(y,E,["start",o,"end","left","right"]);break}},/:/,/\s/),v.region=i.get("region",null),v.vertical=i.get("vertical","");var L=i.get("line","auto");L==="auto"&&a.line===-1&&(L=-1),v.line=L,v.lineAlign=i.get("lineAlign","start"),v.snapToLines=i.get("snapToLines",!0),v.size=i.get("size",100),v.align=i.get("align",o);var A=i.get("position","auto");A==="auto"&&a.position===50&&(A=v.align==="start"||v.align==="left"?0:v.align==="end"||v.align==="right"?100:50),v.position=A}function c(){m=m.replace(/^\s+/,"")}if(c(),w.startTime=n(),c(),m.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+f);m=m.substr(3),c(),w.endTime=n(),c(),l(m,w)}function x(m){return m.replace(//gi,` `)}var g=function(){function m(){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 w=m.prototype;return w.parse=function(f){var n=this;f&&(n.buffer+=n.decoder.decode(f,{stream:!0}));function l(){var A=n.buffer,y=0;for(A=x(A);y")===-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 L=T.indexOf("-->")!==-1;if(!T||L&&(i=!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},w.flush=function(){var f=this;try{if((f.cue||f.state==="HEADER")&&(f.buffer+=` `,f.parse()),f.state==="INITIAL"||f.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){f.onparsingerror&&f.onparsingerror(n)}return f.onflush&&f.onflush(),this},m}()},"./src/utils/webvtt-parser.ts":function(P,u,C){"use strict";C.r(u),C.d(u,"generateCueId",function(){return g}),C.d(u,"parseWebVTT",function(){return w});var R=C("./src/polyfills/number.ts"),h=C("./src/utils/vttparser.ts"),s=C("./src/demux/id3.ts"),S=C("./src/utils/timescale-conversion.ts"),d=C("./src/remux/mp4-remuxer.ts"),a=/\r\n|\n\r|\n|\r/g,o=function(f,n,l){return l===void 0&&(l=0),f.substr(l,n.length)===n},r=function(f){var n=parseInt(f.substr(-3)),l=parseInt(f.substr(-6,2)),c=parseInt(f.substr(-9,2)),T=f.length>9?parseInt(f.substr(0,f.indexOf(":"))):0;if(!Object(R.isFiniteNumber)(n)||!Object(R.isFiniteNumber)(l)||!Object(R.isFiniteNumber)(c)||!Object(R.isFiniteNumber)(T))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+f);return n+=1e3*l,n+=60*1e3*c,n+=60*60*1e3*T,n},x=function(f){for(var n=5381,l=f.length;l;)n=n*33^f.charCodeAt(--l);return(n>>>0).toString()};function g(p,f,n){return x(p.toString())+x(f.toString())+x(n)}var m=function(f,n,l){var c=f[n],T=f[c.prevCC];if(!T||!T.new&&c.new){f.ccOffset=f.presentationOffset=c.start,c.new=!1;return}for(;(v=T)!==null&&v!==void 0&&v.new;){var v;f.ccOffset+=c.start-T.start,c.new=!1,c=T,T=f[c.prevCC]}f.presentationOffset=l};function w(p,f,n,l,c,T,v,i){var L=new h.VTTParser,A=Object(s.utf8ArrayToStr)(new Uint8Array(p)).trim().replace(a,` `).split(` `),y=[],E=Object(S.toMpegTsClockFromTimescale)(f,n),b="00:00.000",_=0,I=0,j,M=!0,G=!1;L.oncue=function(K){var H=l[c],z=l.ccOffset,B=(_-E)/9e4;if(H!=null&&H.new&&(I!==void 0?z=l.ccOffset=H.start:m(l,c,B)),B&&(z=B-l.presentationOffset),G){var W=K.endTime-K.startTime,F=Object(d.normalizePts)((K.startTime+z-I)*9e4,T*9e4)/9e4;K.startTime=F,K.endTime=F+W}var $=K.text.trim();K.text=decodeURIComponent(encodeURIComponent($)),K.id||(K.id=g(K.startTime,K.endTime,$)),K.endTime>0&&y.push(K)},L.onparsingerror=function(K){j=K},L.onflush=function(){if(j){i(j);return}v(y)},A.forEach(function(K){if(M)if(o(K,"X-TIMESTAMP-MAP=")){M=!1,G=!0,K.substr(16).split(",").forEach(function(H){o(H,"LOCAL:")?b=H.substr(6):o(H,"MPEGTS:")&&(_=parseInt(H.substr(7)))});try{I=r(b)/1e3}catch(H){G=!1,j=H}return}else K===""&&(M=!1);L.parse(K+` `)}),L.flush()}},"./src/utils/xhr-loader.ts":function(P,u,C){"use strict";C.r(u);var R=C("./src/utils/logger.ts"),h=C("./src/loader/load-stats.ts"),s=/^age:\s*[\d.]+\s*$/m,S=function(){function d(o){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=o?o.xhrSetup:null,this.stats=new h.LoadStats,this.retryDelay=0}var a=d.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,x,g){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=x,this.callbacks=g,this.retryDelay=x.retryDelay,this.loadInternal()},a.loadInternal=function(){var r=this.config,x=this.context;if(!r)return;var g=this.loader=new self.XMLHttpRequest,m=this.stats;m.loading.first=0,m.loaded=0;var w=this.xhrSetup;try{if(w)try{w(g,x.url)}catch(n){g.open("GET",x.url,!0),w(g,x.url)}g.readyState||g.open("GET",x.url,!0);var p=this.context.headers;if(p)for(var f in p)g.setRequestHeader(f,p[f])}catch(n){this.callbacks.onError({code:g.status,text:n.message},x,g);return}x.rangeEnd&&g.setRequestHeader("Range","bytes="+x.rangeStart+"-"+(x.rangeEnd-1)),g.onreadystatechange=this.readystatechange.bind(this),g.onprogress=this.loadprogress.bind(this),g.responseType=x.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),g.send()},a.readystatechange=function(){var r=this.context,x=this.loader,g=this.stats;if(!r||!x)return;var m=x.readyState,w=this.config;if(g.aborted)return;if(m>=2)if(self.clearTimeout(this.requestTimeout),g.loading.first===0&&(g.loading.first=Math.max(self.performance.now(),g.loading.start)),m===4){x.onreadystatechange=null,x.onprogress=null;var p=x.status;if(p>=200&&p<300){g.loading.end=Math.max(self.performance.now(),g.loading.first);var f,n;if(r.responseType==="arraybuffer"?(f=x.response,n=f.byteLength):(f=x.responseText,n=f.length),g.loaded=g.total=n,!this.callbacks)return;var l=this.callbacks.onProgress;if(l&&l(g,r,f,x),!this.callbacks)return;var c={url:x.responseURL,data:f};this.callbacks.onSuccess(c,g,r,x)}else g.retry>=w.maxRetry||p>=400&&p<499?(R.logger.error(p+" while loading "+r.url),this.callbacks.onError({code:p,text:x.statusText},r,x)):(R.logger.warn(p+" 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,w.maxRetryDelay),g.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),w.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 x=this.stats;x.loaded=r.loaded,r.lengthComputable&&(x.total=r.total)},a.getCacheAge=function(){var r=null;if(this.loader&&s.test(this.loader.getAllResponseHeaders())){var x=this.loader.getResponseHeader("age");r=x?parseFloat(x):null}return r},d}();u.default=S}}).default})},vHTk:function(N,Y,k){N.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.StreamCipher,h=u.algo,s=h.RC4=R.extend({_doReset:function(){for(var a=this._key,o=a.words,r=a.sigBytes,x=this._S=[],g=0;g<256;g++)x[g]=g;for(var g=0,m=0;g<256;g++){var w=g%r,p=o[w>>>2]>>>24-w%4*8&255;m=(m+x[g]+p)%256;var f=x[g];x[g]=x[m],x[m]=f}this._i=this._j=0},_doProcessBlock:function(a,o){a[o]^=S.call(this)},keySize:256/32,ivSize:0});function S(){for(var a=this._S,o=this._i,r=this._j,x=0,g=0;g<4;g++){o=(o+1)%256,r=(r+a[o])%256;var m=a[o];a[o]=a[r],a[r]=m,x|=a[(a[o]+a[r])%256]<<24-g*8}return this._i=o,this._j=r,x}u.RC4=R._createHelper(s);var d=h.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var a=this.cfg.drop;a>0;a--)S.call(this)}});u.RC4Drop=R._createHelper(d)}(),P.RC4})},wCXF:function(N,Y,k){"use strict";k.d(Y,"a",function(){return Qe});var P=k("rePB"),u=k("VTBJ"),C=k("KQm4"),R=k("U8pU"),h=k("ODXe"),s=k("q1tI"),S=k("TSYQ"),d=k.n(S),a=k("Gytx"),o=k.n(a),r=k("Kwbf"),x=k("t23M"),g=k("qx4F"),m=k("6eGT"),w=k("IBYe"),p=k("Ff2n"),f=k("c+Xe"),n=k("fyJ8"),l=k("biw7");function c(Me,Ce,Ve,tt,He){var Je=Ve[Me]||{},_e=Ve[Ce]||{},Se,Oe;Je.fixed==="left"?Se=tt.left[Me]:_e.fixed==="right"&&(Oe=tt.right[Ce]);var de=!1,ye=!1,Ee=!1,De=!1,Be=Ve[Ce+1],Xe=Ve[Me-1];if(He==="rtl"){if(Se!==void 0){var nt=Xe&&Xe.fixed==="left";De=!nt}else if(Oe!==void 0){var dt=Be&&Be.fixed==="right";Ee=!dt}}else if(Se!==void 0){var Et=Be&&Be.fixed==="left";de=!Et}else if(Oe!==void 0){var ft=Xe&&Xe.fixed==="right";ye=!ft}return{fixLeft:Se,fixRight:Oe,lastFixLeft:de,firstFixRight:ye,lastFixRight:Ee,firstFixLeft:De,isSticky:tt.isSticky}}var T=k("sR1s");function v(Me){var Ce=Me.cells,Ve=Me.stickyOffsets,tt=Me.flattenColumns,He=Me.rowComponent,Je=Me.cellComponent,_e=Me.onHeaderRow,Se=Me.index,Oe=s.useContext(l.a),de=Oe.prefixCls,ye=Oe.direction,Ee;_e&&(Ee=_e(Ce.map(function(Be){return Be.column}),Se));var De=Object(T.a)(Ce.map(function(Be){return Be.column}));return s.createElement(He,Object.assign({},Ee),Ce.map(function(Be,Xe){var nt=Be.column,dt=c(Be.colStart,Be.colEnd,tt,Ve,ye),Et;return nt&&nt.onHeaderCell&&(Et=Be.column.onHeaderCell(nt)),s.createElement(n.a,Object.assign({},Be,{ellipsis:nt.ellipsis,align:nt.align,component:Je,prefixCls:de,key:De[Xe]},dt,{additionalProps:Et,rowType:"header"}))}))}v.displayName="HeaderRow";var i=v;function L(Me){var Ce=[];function Ve(_e,Se){var Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ce[Oe]=Ce[Oe]||[];var de=Se,ye=_e.filter(Boolean).map(function(Ee){var De={key:Ee.key,className:Ee.className||"",children:Ee.title,column:Ee,colStart:de},Be=1,Xe=Ee.children;return Xe&&Xe.length>0&&(Be=Ve(Xe,de,Oe+1).reduce(function(nt,dt){return nt+dt},0),De.hasSubColumns=!0),"colSpan"in Ee&&(Be=Ee.colSpan),"rowSpan"in Ee&&(De.rowSpan=Ee.rowSpan),De.colSpan=Be,De.colEnd=De.colStart+Be-1,Ce[Oe].push(De),de+=Be,Be});return ye}Ve(Me,0);for(var tt=Ce.length,He=function(Se){Ce[Se].forEach(function(Oe){!("rowSpan"in Oe)&&!Oe.hasSubColumns&&(Oe.rowSpan=tt-Se)})},Je=0;Je=0;Se-=1){var Oe=Ce[Se],de=Ve&&Ve[Se],ye=de&&de[E.a];(Oe||ye||_e)&&(He.unshift(s.createElement("col",Object.assign({key:Se,style:{width:Oe,minWidth:Oe}},ye))),_e=!0)}return s.createElement("colgroup",null,He)}var _=b;function I(Me,Ce){return Object(s.useMemo)(function(){for(var Ve=[],tt=0;tt1?Fr-1:0),nr=1;nr=Ee&&(wr=Ee-De),_e({scrollLeft:wr/Ee*(ye+2)}),ft.current.x=Wt.pageX},Lt=function(){var Wt=Object(Q.b)(Je.current).top,Xt=Wt+Je.current.offsetHeight,$r=document.documentElement.scrollTop+window.innerHeight;Xt-Object(g.a)()<=$r||Wt>=$r-Se?Et(function(Tn){return Object(u.a)(Object(u.a)({},Tn),{},{isHiddenScrollBar:!0})}):Et(function(Tn){return Object(u.a)(Object(u.a)({},Tn),{},{isHiddenScrollBar:!1})})},Er=function(Wt){Et(function(Xt){return Object(u.a)(Object(u.a)({},Xt),{},{scrollLeft:Wt/ye*Ee||0})})};return s.useImperativeHandle(Ve,function(){return{setScrollLeft:Er}}),s.useEffect(function(){var fr=Object(X.a)(document.body,"mouseup",$t,!1),Wt=Object(X.a)(document.body,"mousemove",xr,!1);return Lt(),function(){fr.remove(),Wt.remove()}},[De,xt]),s.useEffect(function(){var fr=Object(X.a)(window,"scroll",Lt,!1),Wt=Object(X.a)(window,"resize",Lt,!1);return function(){fr.remove(),Wt.remove()}},[]),s.useEffect(function(){dt.isHiddenScrollBar||Et(function(fr){var Wt,Xt;return Object(u.a)(Object(u.a)({},fr),{},{scrollLeft:Je.current.scrollLeft/((Wt=Je.current)===null||Wt===void 0?void 0:Wt.scrollWidth)*((Xt=Je.current)===null||Xt===void 0?void 0:Xt.clientWidth)})})},[dt.isHiddenScrollBar]),ye<=Ee||!De||dt.isHiddenScrollBar?null:s.createElement("div",{style:{height:Object(g.a)(),width:Ee,bottom:Se},className:"".concat(de,"-sticky-scroll")},s.createElement("div",{onMouseDown:Vt,ref:Be,className:d()("".concat(de,"-sticky-scroll-bar"),Object(P.a)({},"".concat(de,"-sticky-scroll-bar-active"),xt)),style:{width:"".concat(De,"px"),transform:"translate3d(".concat(dt.scrollLeft,"px, 0, 0)")}}))},ce=s.forwardRef(pe);function we(Me,Ce){return s.useMemo(function(){var Ve=!!Me;return{isSticky:Ve,stickyClassName:Ve?"".concat(Ce,"-sticky-header"):"",offsetHeader:Object(R.a)(Me)==="object"&&Me.offsetHeader||0,offsetScroll:Object(R.a)(Me)==="object"&&Me.offsetScroll||0}},[Me,Ce])}var ze=[],Ge={},Qe="rc-table-internal-hook",$e=s.memo(function(Me){var Ce=Me.children;return Ce},function(Me,Ce){return o()(Me.props,Ce.props)?Me.pingLeft!==Ce.pingLeft||Me.pingRight!==Ce.pingRight:!1});function rt(Me){var Ce,Ve=Me.prefixCls,tt=Me.className,He=Me.rowClassName,Je=Me.style,_e=Me.data,Se=Me.rowKey,Oe=Me.scroll,de=Me.tableLayout,ye=Me.direction,Ee=Me.title,De=Me.footer,Be=Me.summary,Xe=Me.id,nt=Me.showHeader,dt=Me.components,Et=Me.emptyText,ft=Me.onRow,jt=Me.onHeaderRow,Ct=Me.internalHooks,xt=Me.transformColumns,Yt=Me.internalRefs,$t=Me.sticky,Vt=_e||ze,xr=!!Vt.length,Lt=s.useState(0),Er=Object(h.a)(Lt,2),fr=Er[0],Wt=Er[1];s.useEffect(function(){Wt(Object(g.a)())});var Xt=s.useMemo(function(){return Object(T.c)(dt,{})},[dt]),$r=s.useCallback(function(_r,cr){return Object(T.b)(Xt,_r)||cr},[Xt]),Tn=s.useMemo(function(){return typeof Se=="function"?Se:function(_r){var cr=_r&&_r[Se];return cr}},[Se]),wr=Object(E.c)(Me),aa=wr.expandIcon,pt=wr.expandedRowKeys,Tt=wr.defaultExpandedRowKeys,ht=wr.defaultExpandAllRows,Tr=wr.expandedRowRender,Rr=wr.onExpand,Pt=wr.onExpandedRowsChange,_t=wr.expandRowByClick,Lr=wr.rowExpandable,cn=wr.expandIconColumnIndex,Mr=wr.expandedRowClassName,ot=wr.childrenColumnName,Ot=wr.indentSize,lt=aa||ae,un=ot||"children",Sn=s.useMemo(function(){return Tr?"row":Me.expandable&&Ct===Qe&&Me.expandable.__PARENT_RENDER_ICON__||Vt.some(function(_r){return _r&&Object(R.a)(_r)==="object"&&_r[un]})?"nest":!1},[!!Tr,Vt]),dn=s.useState(function(){return Tt||(ht?J(Vt,Tn,un):[])}),jr=Object(h.a)(dn,2),wt=jr[0],fn=jr[1],Fr=s.useMemo(function(){return new Set(pt||wt||[])},[pt,wt]),sr=s.useCallback(function(_r){var cr=Tn(_r,Vt.indexOf(_r)),ar,Jn=Fr.has(cr);Jn?(Fr.delete(cr),ar=Object(C.a)(Fr)):ar=[].concat(Object(C.a)(Fr),[cr]),fn(ar),Rr&&Rr(!Jn,_r),Pt&&Pt(ar)},[Tn,Fr,Vt,Rr,Pt]),nr=s.useState(0),qn=Object(h.a)(nr,2),Rn=qn[0],an=qn[1],ea=Object(le.b)(Object(u.a)(Object(u.a)(Object(u.a)({},Me),wr),{},{expandable:!!Tr,expandedKeys:Fr,getRowKey:Tn,onTriggerExpand:sr,expandIcon:lt,expandIconColumnIndex:cn,direction:ye}),Ct===Qe?xt:null),ta=Object(h.a)(ea,2),Cn=ta[0],Sr=ta[1],Ln=s.useMemo(function(){return{columns:Cn,flattenColumns:Sr}},[Cn,Sr]),vn=s.useRef(),on=s.useRef(),Jt=s.useRef(),zr=s.useState(!1),Gt=Object(h.a)(zr,2),kt=Gt[0],Qt=Gt[1],hr=s.useState(!1),Ir=Object(h.a)(hr,2),Jr=Ir[0],Mn=Ir[1],Ba=ie(new Map),wa=Object(h.a)(Ba,2),Ma=wa[0],ia=wa[1],en=Object(T.a)(Sr),Pa=en.map(function(_r){return Ma.get(_r)}),Hr=s.useMemo(function(){return Pa},[Pa.join("_")]),Wn=be(Hr,Sr.length,ye),jn=Oe&&Object(T.d)(Oe.y),Gr=Oe&&Object(T.d)(Oe.x),_n=Gr&&Sr.some(function(_r){var cr=_r.fixed;return cr}),ka=s.useRef(),ga=we($t,Ve),ua=ga.isSticky,Va=ga.offsetHeader,Ca=ga.offsetScroll,Rt=ga.stickyClassName,Kt,Bt,pr;jn&&(Bt={overflowY:"scroll",maxHeight:Oe.y}),Gr&&(Kt={overflowX:"auto"},jn||(Bt={overflowY:"hidden"}),pr={width:Oe.x===!0?"auto":Oe.x,minWidth:"100%"});var mr=s.useCallback(function(_r,cr){ia(function(ar){var Jn=new Map(ar);return Jn.set(_r,cr),Jn})},[]),Pr=se(null),Xr=Object(h.a)(Pr,2),Br=Xr[0],tn=Xr[1];function Hn(_r,cr){if(!cr)return;typeof cr=="function"?cr(_r):cr.scrollLeft!==_r&&(cr.scrollLeft=_r)}var Cr=function(cr){var ar=cr.currentTarget,Jn=cr.scrollLeft,Na=typeof Jn=="number"?Jn:ar.scrollLeft,ja=ar||Ge;if(!tn()||tn()===ja){var Ut;Br(ja),Hn(Na,on.current),Hn(Na,Jt.current),Hn(Na,(Ut=ka.current)===null||Ut===void 0?void 0:Ut.setScrollLeft)}if(ar){var bt=ar.scrollWidth,zt=ar.clientWidth;Qt(Na>0),Mn(Na0?[].concat(Object(u.a)(p),Object(u.a)(r(c).map(function(T){return Object(C.a)({fixed:l},T)}))):[].concat(Object(u.a)(p),[Object(C.a)(Object(C.a)({},f),{},{fixed:l})])},[])}function x(w){for(var p=!0,f=0;f=0;c-=1){var T=w[c];if(l&&T.fixed!=="right")l=!1;else if(!l&&T.fixed==="right"){Object(S.a)(!1,"Index ".concat(c+1," of `columns` missing `fixed='right'` prop."));break}}}function g(w){return w.map(function(p){var f=p.fixed,n=Object(R.a)(p,["fixed"]),l=f;return f==="left"?l="right":f==="right"&&(l="left"),Object(C.a)({fixed:l},n)})}function m(w,p){var f=w.prefixCls,n=w.columns,l=w.children,c=w.expandable,T=w.expandedKeys,v=w.getRowKey,i=w.onTriggerExpand,L=w.expandIcon,A=w.rowExpandable,y=w.expandIconColumnIndex,E=w.direction,b=w.expandRowByClick,_=h.useMemo(function(){return n||o(l)},[n,l]),I=h.useMemo(function(){if(c){var G,K=y||0,H=_[K],z=(G={},Object(P.a)(G,a.a,{className:"".concat(f,"-expand-icon-col")}),Object(P.a)(G,"title",""),Object(P.a)(G,"fixed",H?H.fixed:null),Object(P.a)(G,"className","".concat(f,"-row-expand-icon-cell")),Object(P.a)(G,"render",function(F,$,ee){var Z=v($,ee),ve=T.has(Z),he=A?A($):!0,le=L({prefixCls:f,expanded:ve,expandable:he,record:$,onExpand:i});return b?h.createElement("span",{onClick:function(xe){return xe.stopPropagation()}},le):le}),G),B=_.slice();return K>=0&&B.splice(K,0,z),B}return _},[c,_,v,T,L,E]),j=h.useMemo(function(){var G=I;return p&&(G=p(G)),G.length||(G=[{render:function(){return null}}]),G},[p,I,E]),M=h.useMemo(function(){return E==="rtl"?g(r(j)):r(j)},[j,E]);return[j,M]}Y.b=m},wZgz:function(N,Y,k){(function(P,u,C){N.exports=Y=u(k("Ib8C"),k("ETIr"),k("cv67"),k("K3mO"),k("OLod"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.BlockCipher,h=u.algo,s=[],S=[],d=[],a=[],o=[],r=[],x=[],g=[],m=[],w=[];(function(){for(var n=[],l=0;l<256;l++)l<128?n[l]=l<<1:n[l]=l<<1^283;for(var c=0,T=0,l=0;l<256;l++){var v=T^T<<1^T<<2^T<<3^T<<4;v=v>>>8^v&255^99,s[c]=v,S[v]=c;var i=n[c],L=n[i],A=n[L],y=n[v]*257^v*16843008;d[c]=y<<24|y>>>8,a[c]=y<<16|y>>>16,o[c]=y<<8|y>>>24,r[c]=y;var y=A*16843009^L*65537^i*257^c*16843008;x[v]=y<<24|y>>>8,g[v]=y<<16|y>>>16,m[v]=y<<8|y>>>24,w[v]=y,c?(c=i^n[n[n[A^i]]],T^=n[n[T]]):c=T=1}})();var p=[0,1,2,4,8,16,32,64,128,27,54],f=h.AES=R.extend({_doReset:function(){var n;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var l=this._keyPriorReset=this._key,c=l.words,T=l.sigBytes/4,v=this._nRounds=T+6,i=(v+1)*4,L=this._keySchedule=[],A=0;A6&&A%T==4&&(n=s[n>>>24]<<24|s[n>>>16&255]<<16|s[n>>>8&255]<<8|s[n&255]):(n=n<<8|n>>>24,n=s[n>>>24]<<24|s[n>>>16&255]<<16|s[n>>>8&255]<<8|s[n&255],n^=p[A/T|0]<<24),L[A]=L[A-T]^n);for(var y=this._invKeySchedule=[],E=0;E>>24]]^g[s[n>>>16&255]]^m[s[n>>>8&255]]^w[s[n&255]]}},encryptBlock:function(n,l){this._doCryptBlock(n,l,this._keySchedule,d,a,o,r,s)},decryptBlock:function(n,l){var c=n[l+1];n[l+1]=n[l+3],n[l+3]=c,this._doCryptBlock(n,l,this._invKeySchedule,x,g,m,w,S);var c=n[l+1];n[l+1]=n[l+3],n[l+3]=c},_doCryptBlock:function(n,l,c,T,v,i,L,A){for(var y=this._nRounds,E=n[l]^c[0],b=n[l+1]^c[1],_=n[l+2]^c[2],I=n[l+3]^c[3],j=4,M=1;M>>24]^v[b>>>16&255]^i[_>>>8&255]^L[I&255]^c[j++],K=T[b>>>24]^v[_>>>16&255]^i[I>>>8&255]^L[E&255]^c[j++],H=T[_>>>24]^v[I>>>16&255]^i[E>>>8&255]^L[b&255]^c[j++],z=T[I>>>24]^v[E>>>16&255]^i[b>>>8&255]^L[_&255]^c[j++];E=G,b=K,_=H,I=z}var G=(A[E>>>24]<<24|A[b>>>16&255]<<16|A[_>>>8&255]<<8|A[I&255])^c[j++],K=(A[b>>>24]<<24|A[_>>>16&255]<<16|A[I>>>8&255]<<8|A[E&255])^c[j++],H=(A[_>>>24]<<24|A[I>>>16&255]<<16|A[E>>>8&255]<<8|A[b&255])^c[j++],z=(A[I>>>24]<<24|A[E>>>16&255]<<16|A[b>>>8&255]<<8|A[_&255])^c[j++];n[l]=G,n[l+1]=K,n[l+2]=H,n[l+3]=z},keySize:256/32});u.AES=R._createHelper(f)}(),P.AES})},wbyO:function(N,Y,k){(function(P,u){N.exports=Y=u(k("Ib8C"))})(this,function(P){return function(){var u=P,C=u.lib,R=C.WordArray,h=u.enc,s=h.Base64url={stringify:function(d,a=!0){var o=d.words,r=d.sigBytes,x=a?this._safe_map:this._map;d.clamp();for(var g=[],m=0;m>>2]>>>24-m%4*8&255,p=o[m+1>>>2]>>>24-(m+1)%4*8&255,f=o[m+2>>>2]>>>24-(m+2)%4*8&255,n=w<<16|p<<8|f,l=0;l<4&&m+l*.75>>6*(3-l)&63));var c=x.charAt(64);if(c)for(;g.length%4;)g.push(c);return g.join("")},parse:function(d,a=!0){var o=d.length,r=a?this._safe_map:this._map,x=this._reverseMap;if(!x){x=this._reverseMap=[];for(var g=0;g>>6-g%4*2,p=m|w;r[x>>>2]|=p<<24-x%4*8,x++}return R.create(r,x)}}(),P.enc.Base64url})},"y0+3":function(N,Y,k){"use strict";k.d(Y,"a",function(){return r}),k.d(Y,"b",function(){return g});var P=/margin|padding|width|height|max|min|offset/,u={left:!0,top:!0},C={cssFloat:1,styleFloat:1,float:1};function R(m){return m.nodeType===1?m.ownerDocument.defaultView.getComputedStyle(m,null):{}}function h(m,w,p){if(w=w.toLowerCase(),p==="auto"){if(w==="height")return m.offsetHeight;if(w==="width")return m.offsetWidth}return w in u||(u[w]=P.test(w)),u[w]?parseFloat(p)||0:p}function s(m,w){var p=arguments.length,f=R(m);return w=C[w]?"cssFloat"in m.style?"cssFloat":"styleFloat":w,p===1?f:h(m,w,f[w]||m.style[w])}function S(m,w,p){var f=arguments.length;if(w=C[w]?"cssFloat"in m.style?"cssFloat":"styleFloat":w,f===3)return typeof p=="number"&&P.test(w)&&(p="".concat(p,"px")),m.style[w]=p,p;for(var n in w)w.hasOwnProperty(n)&&S(m,n,w[n]);return R(m)}function d(m){return m===document.body?document.documentElement.clientWidth:m.offsetWidth}function a(m){return m===document.body?window.innerHeight||document.documentElement.clientHeight:m.offsetHeight}function o(){var m=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),w=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:m,height:w}}function r(){var m=document.documentElement.clientWidth,w=window.innerHeight||document.documentElement.clientHeight;return{width:m,height:w}}function x(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function g(m){var w=m.getBoundingClientRect(),p=document.documentElement;return{left:w.left+(window.pageXOffset||p.scrollLeft)-(p.clientLeft||document.body.clientLeft||0),top:w.top+(window.pageYOffset||p.scrollTop)-(p.clientTop||document.body.clientTop||0)}}},ynwM:function(N,Y,k){var P=k("MFOe"),u=P.Global;N.exports={name:"oldFF-globalStorage",read:R,write:h,each:s,remove:S,clearAll:d};var C=u.globalStorage;function R(a){return C[a]}function h(a,o){C[a]=o}function s(a){for(var o=C.length-1;o>=0;o--){var r=C.key(o);a(C[r],r)}}function S(a){return C.removeItem(a)}function d(){s(function(a,o){delete C[a]})}}}]);