(window.webpackJsonp=window.webpackJsonp||[]).push([[185,5,6,7,8,10,11],{"+NIl":function(N,$,P){(function(k){k(P("VrN/"))})(function(k){"use strict";k.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 d=w[p];if(d.name=="DEFAULT")continue;return d}return{styleIdentifier:function(){return null}}}function f(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=f("importmodule","tag",["string","builtin"]),a.documentclass=f("documentclass","tag",["","atom"]),a.usepackage=f("usepackage","tag",["atom"]),a.begin=f("begin","tag",["atom"]),a.end=f("end","tag",["atom"]),a.label=f("label","tag",["atom"]),a.ref=f("ref","tag",["atom"]),a.eqref=f("eqref","tag",["atom"]),a.cite=f("cite","tag",["atom"]),a.bibitem=f("bibitem","tag",["atom"]),a.Bibitem=f("Bibitem","tag",["atom"]),a.RBibitem=f("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 d=m.current().slice(1);return p=a.hasOwnProperty(d)?a[d]: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 E(l,c,"\\]")}),"keyword";if(m.match("\\("))return o(w,function(l,c){return E(l,c,"\\)")}),"keyword";if(m.match("$$"))return o(w,function(l,c){return E(l,c,"$$")}),"keyword";if(m.match("$"))return o(w,function(l,c){return E(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 E(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 d=m.next();return d=="{"||d=="}"||d=="["||d=="]"||d=="("||d==")"?"bracket":d=="%"?(m.skipToEnd(),"comment"):"error"}function g(m,w){var p=m.peek(),d;return p=="{"||p=="["?(d=h(w),d.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 E(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:"%"}}),k.defineMIME("text/x-stex","stex"),k.defineMIME("text/x-latex","stex")})},"19Vz":function(N,$,P){(function(k){k(P("VrN/"))})(function(k){k.defineOption("placeholder","",function(f,a,o){var r=o&&o!=k.Init;if(a&&!r)f.on("blur",h),f.on("change",s),f.on("swapDoc",s),k.on(f.getInputField(),"compositionupdate",f.state.placeholderCompose=function(){R(f)}),s(f);else if(!a&&r){f.off("blur",h),f.off("change",s),f.off("swapDoc",s),k.off(f.getInputField(),"compositionupdate",f.state.placeholderCompose),u(f);var E=f.getWrapperElement();E.className=E.className.replace(" CodeMirror-empty","")}a&&!f.hasFocus()&&h(f)});function u(f){f.state.placeholder&&(f.state.placeholder.parentNode.removeChild(f.state.placeholder),f.state.placeholder=null)}function C(f){u(f);var a=f.state.placeholder=document.createElement("pre");a.style.cssText="height: 0; overflow: visible",a.style.direction=f.getOption("direction"),a.className="CodeMirror-placeholder CodeMirror-line-like";var o=f.getOption("placeholder");typeof o=="string"&&(o=document.createTextNode(o)),a.appendChild(o),f.display.lineSpace.insertBefore(a,f.display.lineSpace.firstChild)}function R(f){setTimeout(function(){var a=!1,o=f.getInputField();o.nodeName=="TEXTAREA"?a=!o.value:f.lineCount()==1&&(a=!/[^\u200b]/.test(o.querySelector(".CodeMirror-line").textContent)),a?C(f):u(f)},20)}function h(f){S(f)&&C(f)}function s(f){var a=f.getWrapperElement(),o=S(f);a.className=a.className.replace(" CodeMirror-empty","")+(o?" CodeMirror-empty":""),o?C(f):u(f)}function S(f){return f.lineCount()===1&&f.getLine(0)===""}})},"1T2W":function(N,$,P){N.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"1eCo":function(N,$,P){(function(k){k(P("VrN/"))})(function(k){"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};k.defineMode("xml",function(R,h){var s=R.indentUnit,S={},f=h.htmlMode?u:C;for(var a in f)S[a]=f[a];for(var a in h)S[a]=h[a];var o,r;function E(_,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}E.isInText=!0;function g(_,I){var j=_.next();if(j==">"||j=="/"&&_.eat(">"))return I.tokenize=E,o=j==">"?"endTag":"selfcloseTag","tag bracket";if(j=="=")return o="equals",null;if(j=="<"){I.tokenize=E,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=E;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=E;break}else return j.tokenize=p(_-1),j.tokenize(I,j)}return"meta"}}function d(_,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",b;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 d(j,M,G==j.indented)),c}return r="error",A}function b(_,I,j){return _=="equals"?x:(S.allowMissing||(r="error"),A(_,I,j))}function x(_,I,j){return _=="string"?y:_=="word"&&S.allowUnquoted?(r="string",A):(r="error",A(_,I,j))}function y(_,I,j){return _=="string"?y:A(_,I,j)}return{startState:function(_){var I={tokenize:E,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 k.Pass;if(_.tokenize!=g&&_.tokenize!=E)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==x&&(_.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()}}}),k.defineMIME("text/xml","xml"),k.defineMIME("application/xml","xml"),k.mimeModes.hasOwnProperty("text/html")||k.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("MlIO"))})(this,function(k){return function(){var u=k,C=u.lib,R=C.Hasher,h=u.x64,s=h.Word,S=h.WordArray,f=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 E=f.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],d=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,b=d.high,x=d.low,y=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,J=L,ee=A,q=b,ye=x,pe=y,le=_,Oe=I,xe=j,ie=M,se=G,re=K,be=H,Z=z,te=B,Ee=W,ae=F,Y=0;Y<80;Y++){var X,Q,he=r[Y];if(Y<16)Q=he.high=g[m+Y*2]|0,X=he.low=g[m+Y*2+1]|0;else{var ce=r[Y-15],Se=ce.high,Ke=ce.low,Ge=(Se>>>1|Ke<<31)^(Se>>>8|Ke<<24)^Se>>>7,Ye=(Ke>>>1|Se<<31)^(Ke>>>8|Se<<24)^(Ke>>>7|Se<<25),Qe=r[Y-2],rt=Qe.high,qe=Qe.low,Le=(rt>>>19|qe<<13)^(rt<<3|qe>>>29)^rt>>>6,Ce=(qe>>>19|rt<<13)^(qe<<3|rt>>>29)^(qe>>>6|rt<<26),Ve=r[Y-7],tt=Ve.high,He=Ve.low,$e=r[Y-16],Me=$e.high,De=$e.low;X=Ye+He,Q=Ge+tt+(X>>>0>>0?1:0),X=X+Ce,Q=Q+Le+(X>>>0>>0?1:0),X=X+De,Q=Q+Me+(X>>>0>>0?1:0),he.high=Q,he.low=X}var Te=ie&re^~ie&Z,de=se&be^~se&te,ge=J&q^J&pe^q&pe,we=ee&ye^ee&le^ye&le,_e=(J>>>28|ee<<4)^(J<<30|ee>>>2)^(J<<25|ee>>>7),Ue=(ee>>>28|J<<4)^(ee<<30|J>>>2)^(ee<<25|J>>>7),Xe=(ie>>>14|se<<18)^(ie>>>18|se<<14)^(ie<<23|se>>>9),at=(se>>>14|ie<<18)^(se>>>18|ie<<14)^(se<<23|ie>>>9),ut=o[Y],mt=ut.high,ct=ut.low,_t=ae+at,At=Ee+Xe+(_t>>>0>>0?1:0),_t=_t+de,At=At+Te+(_t>>>0>>0?1:0),_t=_t+ct,At=At+mt+(_t>>>0>>0?1:0),_t=_t+X,At=At+Q+(_t>>>0>>0?1:0),Et=Ue+we,Qt=_e+ge+(Et>>>0>>0?1:0);Ee=Z,ae=te,Z=re,te=be,re=ie,be=se,se=xe+_t|0,ie=Oe+At+(se>>>0>>0?1:0)|0,Oe=pe,xe=le,pe=q,le=ye,q=J,ye=ee,ee=_t+Et|0,J=At+Qt+(ee>>>0<_t>>>0?1:0)|0}A=p.low=A+ee,p.high=L+J+(A>>>0>>0?1:0),x=d.low=x+ye,d.high=b+q+(x>>>0>>0?1:0),_=n.low=_+le,n.high=y+pe+(_>>>0>>0?1:0),j=l.low=j+xe,l.high=I+Oe+(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+te,v.high=z+Z+(B>>>0>>0?1:0),F=i.low=F+ae,i.high=W+Ee+(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 d=this._hash.toX32();return d},clone:function(){var g=R.clone.call(this);return g._hash=this._hash.clone(),g},blockSize:1024/32});u.SHA512=R._createHelper(E),u.HmacSHA512=R._createHmacHelper(E)}(),k.SHA512})},"3y9D":function(N,$,P){(function(k,u){N.exports=$=u(P("Ib8C"))})(this,function(k){return function(){var u=k,C=u.lib,R=C.WordArray,h=C.Hasher,s=u.algo,S=[],f=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,E=r[0],g=r[1],m=r[2],w=r[3],p=r[4],d=0;d<80;d++){if(d<16)S[d]=a[o+d]|0;else{var n=S[d-3]^S[d-8]^S[d-14]^S[d-16];S[d]=n<<1|n>>>31}var l=(E<<5|E>>>27)+p+S[d];d<20?l+=(g&m|~g&w)+1518500249:d<40?l+=(g^m^w)+1859775393:d<60?l+=(g&m|g&w|m&w)-1894007588:l+=(g^m^w)-899497514,p=w,w=m,m=g<<30|g>>>2,g=E,E=l}r[0]=r[0]+E|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,E=a.sigBytes*8;return o[E>>>5]|=128<<24-E%32,o[(E+64>>>9<<4)+14]=Math.floor(r/4294967296),o[(E+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(f),u.HmacSHA1=h._createHmacHelper(f)}(),k.SHA1})},4:function(N,$){},"5hvy":function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("MlIO"))})(this,function(k){return function(u){var C=k,R=C.lib,h=R.WordArray,s=R.Hasher,S=C.x64,f=S.Word,a=C.algo,o=[],r=[],E=[];(function(){for(var w=1,p=0,d=0;d<24;d++){o[w+5*p]=(d+1)*(d+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=d[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,b=0,x=0;x<5;x++){var v=d[L+5*x];A^=v.high,b^=v.low}var y=g[L];y.high=A,y.low=b}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),b=_.low^(M<<1|j>>>31),x=0;x<5;x++){var v=d[L+5*x];v.high^=A,v.low^=b}for(var G=1;G<25;G++){var A,b,v=d[G],K=v.high,H=v.low,z=o[G];z<32?(A=K<>>32-z,b=H<>>32-z):(A=H<>>64-z,b=K<>>64-z);var B=g[r[G]];B.high=A,B.low=b}var W=g[0],F=d[0];W.high=F.high,W.low=F.low;for(var L=0;L<5;L++)for(var x=0;x<5;x++){var G=L+5*x,v=d[G],J=g[G],ee=g[(L+1)%5+5*x],q=g[(L+2)%5+5*x];v.high=J.high^~ee.high&q.high,v.low=J.low^~ee.low&q.low}var v=d[0],ye=E[i];v.high^=ye.high,v.low^=ye.low}},_doFinalize:function(){var w=this._data,p=w.words,d=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|(b<<24|b>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,i.push(x),i.push(b)}return new h.init(i,T)},clone:function(){for(var w=s.clone.call(this),p=w._state=this._state.slice(0),d=0;d<25;d++)p[d]=p[d].clone();return w}});C.SHA3=s._createHelper(m),C.HmacSHA3=s._createHmacHelper(m)}(Math),k.SHA3})},"5nXd":function(N,$,P){var k=P("MFOe"),u=k.slice,C=k.pluck,R=k.each,h=k.bind,s=k.create,S=k.isList,f=k.isFunction,a=k.isObject;N.exports={createStore:E};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 E.apply(this,arguments)},addPlugin:function(g){this._addPlugin(g)},namespace:function(g){return E(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 E(g,m,w){w||(w=""),g&&!S(g)&&(g=[g]),m&&!S(m)&&(m=[m]);var p=w?"__storejs_"+w+"_":"",d=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:d,_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),b=this;function x(){return i?(R(arguments,function(_,I){A[I]=_}),i.apply(b,A)):void 0}var y=[x].concat(A);return T.apply(b,y)}},_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),!f(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,b){if(!f(A))throw new Error("Bad plugin property: "+b+" from plugin "+T.name+". Plugins should only return functions.");v._assignPluginFnProp(A,b)})},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){f(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,$,P){"use strict";P.d($,"a",function(){return i});var k=P("wx14"),u=P("rePB"),C=P("VTBJ"),R=P("1OyB"),h=P("vuIU"),s=P("Ji7U"),S=P("LK+K"),f=P("q1tI"),a=P.n(f),o=P("TSYQ"),r=P.n(o),E=function(A){var b,x="".concat(A.rootPrefixCls,"-item"),y=r()(x,"".concat(x,"-").concat(A.page),(b={},Object(u.a)(b,"".concat(x,"-active"),A.active),Object(u.a)(b,A.className,!!A.className),Object(u.a)(b,"".concat(x,"-disabled"),!A.page),b)),_=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:y,onClick:_,onKeyPress:I,tabIndex:"0"},A.itemRender(A.page,"page",a.a.createElement("a",{rel:"nofollow"},A.page)))},g=E,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)(b,L);var A=Object(S.a)(b);function b(){var x;Object(R.a)(this,b);for(var y=arguments.length,_=new Array(y),I=0;I=0||j.relatedTarget.className.indexOf("".concat(H,"-next"))>=0))return;x.setState({goInputText:""}),K(x.getValidValue())},x.go=function(j){var M=x.state.goInputText;if(M==="")return;(j.keyCode===m.ENTER||j.type==="click")&&(x.setState({goInputText:""}),x.props.quickGo(x.getValidValue()))},x}return Object(h.a)(b,[{key:"getValidValue",value:function(){var y=this.state,_=y.goInputText,I=y.current;return!_||isNaN(_)?I:Number(_)}},{key:"getPageSizeOptions",value:function(){var y=this.props,_=y.pageSize,I=y.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 y=this,_=this.props,I=_.pageSize,j=_.locale,M=_.rootPrefixCls,G=_.changeSize,K=_.quickGo,H=_.goButton,z=_.selectComponentClass,B=_.buildOptionText,W=_.selectPrefixCls,F=_.disabled,J=this.state.goInputText,ee="".concat(M,"-options"),q=z,ye=null,pe=null,le=null;if(!G&&!K)return null;var Oe=this.getPageSizeOptions();if(G&&q){var xe=Oe.map(function(ie,se){return a.a.createElement(q.Option,{key:se,value:ie.toString()},(B||y.buildOptionText)(ie))});ye=a.a.createElement(q,{disabled:F,prefixCls:W,showSearch:!1,className:"".concat(ee,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(I||Oe[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)),pe=a.a.createElement("div",{className:"".concat(ee,"-quick-jumper")},j.jump_to,a.a.createElement("input",{disabled:F,type:"text",value:J,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),j.page,le)),a.a.createElement("li",{className:"".concat(ee)},ye,pe)}}]),b}(a.a.Component);w.defaultProps={pageSizeOptions:["10","20","50","100"]};var p=w,d=P("N2Kk");function n(){}function l(L){return typeof L=="number"&&isFinite(L)&&Math.floor(L)===L}function c(L,A,b){return b}function T(L,A,b){var x=typeof L=="undefined"?A.pageSize:L;return Math.floor((b.total-1)/x)+1}var v=function(L){Object(s.a)(b,L);var A=Object(S.a)(b);function b(x){var y;Object(R.a)(this,b),y=A.call(this,x),y.getJumpPrevPage=function(){return Math.max(1,y.state.current-(y.props.showLessItems?3:5))},y.getJumpNextPage=function(){return Math.min(T(void 0,y.state,y.props),y.state.current+(y.props.showLessItems?3:5))},y.getItemIcon=function(G,K){var H=y.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)({},y.props))),z},y.savePaginationNode=function(G){y.paginationNode=G},y.isValid=function(G){return l(G)&&G!==y.state.current},y.shouldDisplayQuickJumper=function(){var G=y.props,K=G.showQuickJumper,H=G.pageSize,z=G.total;return z<=H?!1:K},y.handleKeyDown=function(G){(G.keyCode===m.ARROW_UP||G.keyCode===m.ARROW_DOWN)&&G.preventDefault()},y.handleKeyUp=function(G){var K=y.getValidValue(G),H=y.state.currentInputValue;K!==H&&y.setState({currentInputValue:K}),G.keyCode===m.ENTER?y.handleChange(K):G.keyCode===m.ARROW_UP?y.handleChange(K-1):G.keyCode===m.ARROW_DOWN&&y.handleChange(K+1)},y.changePageSize=function(G){var K=y.state.current,H=T(G,y.state,y.props);K=K>H?H:K,H===0&&(K=y.state.current),typeof G=="number"&&("pageSize"in y.props||y.setState({pageSize:G}),"current"in y.props||y.setState({current:K,currentInputValue:K})),y.props.onShowSizeChange(K,G),"onChange"in y.props&&y.props.onChange&&y.props.onChange(K,G)},y.handleChange=function(G){var K=y.props.disabled,H=G;if(y.isValid(H)&&!K){var z=T(void 0,y.state,y.props);H>z?H=z:H<1&&(H=1),"current"in y.props||y.setState({current:H,currentInputValue:H});var B=y.state.pageSize;return y.props.onChange(H,B),H}return y.state.current},y.prev=function(){y.hasPrev()&&y.handleChange(y.state.current-1)},y.next=function(){y.hasNext()&&y.handleChange(y.state.current+1)},y.jumpPrev=function(){y.handleChange(y.getJumpPrevPage())},y.jumpNext=function(){y.handleChange(y.getJumpNextPage())},y.hasPrev=function(){return y.state.current>1},y.hasNext=function(){return y.state.current2?H-2:0),B=2;B=I?M=I:M=Number(_),M}},{key:"getShowSizeChanger",value:function(){var y=this.props,_=y.showSizeChanger,I=y.total,j=y.totalBoundaryShowSizeChanger;return typeof _!="undefined"?_:I>j}},{key:"renderPrev",value:function(y){var _=this.props,I=_.prevIcon,j=_.itemRender,M=j(y,"prev",this.getItemIcon(I,"prev page")),G=!this.hasPrev();return Object(f.isValidElement)(M)?Object(f.cloneElement)(M,{disabled:G}):M}},{key:"renderNext",value:function(y){var _=this.props,I=_.nextIcon,j=_.itemRender,M=j(y,"next",this.getItemIcon(I,"next page")),G=!this.hasNext();return Object(f.isValidElement)(M)?Object(f.cloneElement)(M,{disabled:G}):M}},{key:"render",value:function(){var y=this,_=this.props,I=_.prefixCls,j=_.className,M=_.style,G=_.disabled,K=_.hideOnSinglePage,H=_.total,z=_.locale,B=_.showQuickJumper,W=_.showLessItems,F=_.showTitle,J=_.showTotal,ee=_.simple,q=_.itemRender,ye=_.showPrevNextJumpers,pe=_.jumpPrevIcon,le=_.jumpNextIcon,Oe=_.selectComponentClass,xe=_.selectPrefixCls,ie=_.pageSizeOptions,se=this.state,re=se.current,be=se.pageSize,Z=se.currentInputValue;if(K===!0&&H<=be)return null;var te=T(void 0,this.state,this.props),Ee=[],ae=null,Y=null,X=null,Q=null,he=null,ce=B&&B.goButton,Se=W?1:2,Ke=re-1>0?re-1:0,Ge=re+1=Se*2&&re!==1+2&&(Ee[0]=Object(f.cloneElement)(Ee[0],{className:"".concat(I,"-item-after-jump-prev")}),Ee.unshift(ae)),te-re>=Se*2&&re!==te-2&&(Ee[Ee.length-1]=Object(f.cloneElement)(Ee[Ee.length-1],{className:"".concat(I,"-item-before-jump-next")}),Ee.push(Y)),Ve!==1&&Ee.unshift(X),tt!==te&&Ee.push(Q)}var Me=null;J&&(Me=a.a.createElement("li",{className:"".concat(I,"-total-text")},J(H,[H===0?0:(re-1)*be+1,re*be>H?H:re*be])));var De=!this.hasPrev()||!te,Te=!this.hasNext()||!te;return a.a.createElement("ul",Object(k.a)({className:r()(I,j,Object(u.a)({},"".concat(I,"-disabled"),G)),style:M,unselectable:"unselectable",ref:this.savePaginationNode},Ye),Me,a.a.createElement("li",{title:F?z.prev_page:null,onClick:this.prev,tabIndex:De?null:0,onKeyPress:this.runIfEnterPrev,className:r()("".concat(I,"-prev"),Object(u.a)({},"".concat(I,"-disabled"),De)),"aria-disabled":De},this.renderPrev(Ke)),Ee,a.a.createElement("li",{title:F?z.next_page:null,onClick:this.next,tabIndex:Te?null:0,onKeyPress:this.runIfEnterNext,className:r()("".concat(I,"-next"),Object(u.a)({},"".concat(I,"-disabled"),Te)),"aria-disabled":Te},this.renderNext(Ge)),a.a.createElement(p,{disabled:G,locale:z,rootPrefixCls:I,selectComponentClass:Oe,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(y,_){var I={};if("current"in y&&(I.current=y.current,y.current!==_.current&&(I.currentInputValue=I.current)),"pageSize"in y&&y.pageSize!==_.pageSize){var j=_.current,M=T(y.pageSize,_,y);j=j>M?M:j,"current"in y||(I.current=j,I.currentInputValue=j),I.pageSize=y.pageSize}return I}}]),b}(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:d.a,style:{},itemRender:c,totalBoundaryShowSizeChanger:50};var i=v},"6RRn":function(N,$,P){"use strict";var k=P("wCXF"),u=P("n6Qo");P.d($,"b",function(){return u.a});var C=P("IBYe"),R=P("6eGT"),h=P("hW8S");P.d($,"a",function(){return h.a}),$.c=k.b},"6eGT":function(N,$,P){"use strict";function k(u){return null}$.a=k},"7Cbv":function(N,$,P){"use strict";var k=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(!k)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return k(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=[],f=0;f<256;++f)S.push((f+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 d=0;d<16;++d)m[w+d]=p[d];return m}return o(p)}var E=$.a=r},"7ahc":function(N,$,P){"use strict";P.d($,"a",function(){return T});var k=P("k1fw"),u=P("0Owb"),C=P("+L6B"),R=P("2/Rp"),h=P("y8nQ"),s=P("Vl3Y"),S=P("tJVT"),f=P("OaEy"),a=P("2fM7"),o=P("q1tI"),r=P.n(o),E=P("VrN/"),g=P.n(E),m=P("p77/"),w=P.n(m),p=P("c5Ni"),d=P.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"]};$.b=function(v){var i=v.callback,L=v.onCancel,A=Object(o.useState)("python"),b=Object(S.a)(A,2),x=b[0],y=b[1];function _(j){y(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:x})),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,b=v.options,x=b===void 0?{}:b,y=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(y.current&&!j){var G=g.a.fromTextArea(y.current,Object(k.a)({mode:A,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},x));M(G)}},[y.current,j]),r.a.createElement("div",{className:"my-codemirror-container"},r.a.createElement("textarea",{ref:y}))}},"815F":function(N,$,P){"use strict";P.d($,"e",function(){return S}),P.d($,"c",function(){return a}),P.d($,"d",function(){return o}),P.d($,"a",function(){return E}),P.d($,"f",function(){return g}),P.d($,"b",function(){return m});var k=P("KQm4"),u=P("VTBJ"),C=P("Ff2n"),R=P("Zm9Q"),h=P("Kwbf"),s=P("OZM5");function S(w,p){return w!=null?w:p}function f(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],p=new Map;function d(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),d(v,"".concat(l).concat(i," > "))})}d(w)}function a(w){function p(d){var n=Object(R.a)(d);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]:[],d=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),b=Object(u.a)(Object(u.a)({},v),{},{parent:T,pos:L,children:null,data:v,isStart:[].concat(Object(k.a)(T?T.isStart:[]),[i===0]),isEnd:[].concat(Object(k.a)(T?T.isEnd:[]),[i===c.length-1])});return n.push(b),p===!0||d.has(A)?b.children=l(v.children||[],b):b.children=[],b})}return l(w),n}function r(w,p,d){var n;d?typeof d=="string"?n=function(T){return T[d]}:typeof d=="function"&&(n=function(T){return d(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),b={node:c,index:T,pos:L,key:A,parentPos:v.node?v.pos:null,level:v.level+1};p(b)}i&&i.forEach(function(x,y){l(x,y,{node:c,pos:L,level:v?v.level+1:-1})})}l(null)}function E(w){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=p.initWrapper,n=p.processEntity,l=p.onProcessFinished,c=arguments.length>2?arguments[2]:void 0,T={},v={},i={posEntities:T,keyEntities:v};return d&&(i=d(i)||i),r(w,function(L){var A=L.node,b=L.index,x=L.pos,y=L.key,_=L.parentPos,I=L.level,j={node:A,index:b,key:y,pos:x,level:I},M=S(y,x);T[x]=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 d=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,b=A[w],x={eventKey:w,expanded:d.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(b?b.pos:""),dragOver:i===w&&L===0,dragOverGapTop:i===w&&L===-1,dragOverGapBottom:i===w&&L===1};return x}function m(w){var p=w.data,d=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,b=w.pos,x=w.active,y=Object(u.a)(Object(u.a)({},p),{},{expanded:d,selected:n,checked:l,loaded:c,loading:T,halfChecked:v,dragOver:i,dragOverGapTop:L,dragOverGapBottom:A,pos:b,active:x});return"props"in y||Object.defineProperty(y,"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}}),y}},"8EBN":function(N,$,P){(function(k){k(P("VrN/"))})(function(k){"use strict";k.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(f)return k.findModeByExtension(f)},k.findModeByName=function(R){R=R.toLowerCase();for(var h=0;h=q.length?ye.slice(q.length):ye}).join(` `)}var o=[],r=["
    "],E=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,J,ee,q){if(J>=F.length||F[J].level<=ee)return J;var ye=F[J];q.push("
    • "+ye.text+""),J++;var pe=[];return J=p(F,J,ye.level,pe),pe.length>0&&(q.push("
        "),pe.forEach(function(le){q.push(le)}),q.push("
      ")),q.push("
    • "),J=p(F,J,ee,q),J}function d(){return p(o,0,0,r),r.push("
    "),r.join("")}var n={heading:function(J){var ee=g.exec(J);if(ee)return{type:"heading",raw:ee[0],depth:ee[1].length,text:ee[2]}},fences:function(J){var ee=this.rules.block.fences.exec(J);if(ee){var q=ee[0],ye=a(q,ee[3]||""),pe=ee[2]?ee[2].trim():ee[2];if(["latex","katex","math"].indexOf(pe)>=0){var le=T(),Oe=ye;ye=le,v[le]={type:"block",expression:Oe}}return{type:"code",raw:q,lang:pe,text:ye}}}},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(J,ee){var q=T();return v[q]={type:"inline",expression:ee},q}),F}var b=E.listitem;E.listitem=function(F){return b(A(F))};var x=E.paragraph;E.paragraph=function(F){return x(A(F))};var y=E.tablecell;E.tablecell=function(F,J){return y(A(F),J)},E.code=function(F,J,ee){var q=(J||"").match(/\S*/)[0];return q?["latex","katex","math"].indexOf(q)>=0?"

    ".concat(F,"

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

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

    "+de+`

    `},De.table=function(de,ge){return ge&&(ge=""+ge+""),` `+de+` `+ge+`
    `},De.tablerow=function(de){return` `+de+` `},De.tablecell=function(de,ge){var we=ge.header?"th":"td",_e=ge.align?"<"+we+' align="'+ge.align+'">':"<"+we+">";return _e+de+" `},De.strong=function(de){return""+de+""},De.em=function(de){return""+de+""},De.codespan=function(de){return""+de+""},De.br=function(){return this.options.xhtml?"
    ":"
    "},De.del=function(de){return""+de+""},De.link=function(de,ge,we){if(de=Q(this.options.sanitize,this.options.baseUrl,de),de===null)return we;var _e='
    ",_e},De.image=function(de,ge,we){if(de=Q(this.options.sanitize,this.options.baseUrl,de),de===null)return we;var _e=''+we+'":">",_e},De.text=function(de){return de},Me}(),Se=function(){function Me(){}var De=Me.prototype;return De.strong=function(de){return de},De.em=function(de){return de},De.codespan=function(de){return de},De.del=function(de){return de},De.html=function(de){return de},De.text=function(de){return de},De.link=function(de,ge,we){return""+we},De.image=function(de,ge,we){return""+we},De.br=function(){return""},Me}(),Ke=function(){function Me(){this.seen={}}var De=Me.prototype;return De.slug=function(de){var ge=de.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ge)){var we=ge;do this.seen[we]++,ge=we+"-"+this.seen[we];while(this.seen.hasOwnProperty(ge))}return this.seen[ge]=0,ge},Me}(),Ge=S.defaults,Ye=z.unescape,Qe=function(){function Me(Te){this.options=Te||Ge,this.options.renderer=this.options.renderer||new ce,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Se,this.slugger=new Ke}Me.parse=function(de,ge){var we=new Me(ge);return we.parse(de)};var De=Me.prototype;return De.parse=function(de,ge){ge===void 0&&(ge=!0);var we="",_e,Ue,Xe,at,ut,mt,ct,_t,At,Et,Qt,qt,Jt,mr,Pt,cr,ir,Ht,$t=de.length;for(_e=0;_e<$t;_e++){Et=de[_e];switch(Et.type){case"space":continue;case"hr":{we+=this.renderer.hr();continue}case"heading":{we+=this.renderer.heading(this.parseInline(Et.tokens),Et.depth,Ye(this.parseInline(Et.tokens,this.textRenderer)),this.slugger);continue}case"code":{we+=this.renderer.code(Et.text,Et.lang,Et.escaped);continue}case"table":{for(_t="",ct="",at=Et.header.length,Ue=0;Ue0&&Pt.tokens[0].type==="text"?(Pt.tokens[0].text=Ht+" "+Pt.tokens[0].text,Pt.tokens[0].tokens&&Pt.tokens[0].tokens.length>0&&Pt.tokens[0].tokens[0].type==="text"&&(Pt.tokens[0].tokens[0].text=Ht+" "+Pt.tokens[0].tokens[0].text)):Pt.tokens.unshift({type:"text",text:Ht}):mr+=Ht),mr+=this.parse(Pt.tokens,Jt),At+=this.renderer.listitem(mr,ir,cr);we+=this.renderer.list(At,Qt,qt);continue}case"html":{we+=this.renderer.html(Et.text);continue}case"paragraph":{we+=this.renderer.paragraph(this.parseInline(Et.tokens));continue}case"text":{for(At=Et.tokens?this.parseInline(Et.tokens):Et.text;_e+1<$t&&de[_e+1].type==="text";)Et=de[++_e],At+=` `+(Et.tokens?this.parseInline(Et.tokens):Et.text);we+=ge?this.renderer.paragraph(At):At;continue}default:{var Kr='Token with "'+Et.type+'" type was not found.';if(this.options.silent){console.error(Kr);return}else throw new Error(Kr)}}}return we},De.parseInline=function(de,ge){ge=ge||this.renderer;var we="",_e,Ue,Xe=de.length;for(_e=0;_eAn error occurred:

    "+Le(Xe.message+"",!0)+"
    ";throw Xe}}He.options=He.setOptions=function(Me){return rt(He.defaults,Me),Ve(He.defaults),He},He.getDefaults=Ce,He.defaults=tt,He.use=function(Me){var De=rt({},Me);if(Me.renderer&&function(){var de=He.defaults.renderer||new ce,ge=function(Ue){var Xe=de[Ue];de[Ue]=function(){for(var at=arguments.length,ut=new Array(at),mt=0;mt=0;g--){if(!C(E[g]))continue;var m=E[g].split("="),w=unescape(m[0]),p=unescape(m[1]);r(p,w)}}function S(r,E){if(!r)return;R.cookie=escape(r)+"="+escape(E)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function f(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,E){f(E)})}function o(r){return new RegExp("(?:^|;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(R.cookie)}},E4JC:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("ETIr"),P("cv67"),P("K3mO"),P("OLod"))})(this,function(k){return function(){var u=k,C=u.lib,R=C.StreamCipher,h=u.algo,s=[],S=[],f=[],a=h.Rabbit=R.extend({_doReset:function(){for(var r=this._key.words,E=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(E){var p=E.words,d=p[0],n=p[1],l=(d<<8|d>>>24)&16711935|(d<<24|d>>>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,E){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[E+m]^=s[m]},blockSize:128/32,ivSize:64/32});function o(){for(var r=this._X,E=this._C,g=0;g<8;g++)S[g]=E[g];E[0]=E[0]+1295307597+this._b|0,E[1]=E[1]+3545052371+(E[0]>>>0>>0?1:0)|0,E[2]=E[2]+886263092+(E[1]>>>0>>0?1:0)|0,E[3]=E[3]+1295307597+(E[2]>>>0>>0?1:0)|0,E[4]=E[4]+3545052371+(E[3]>>>0>>0?1:0)|0,E[5]=E[5]+886263092+(E[4]>>>0>>0?1:0)|0,E[6]=E[6]+1295307597+(E[5]>>>0>>0?1:0)|0,E[7]=E[7]+3545052371+(E[6]>>>0>>0?1:0)|0,this._b=E[7]>>>0>>0?1:0;for(var g=0;g<8;g++){var m=r[g]+E[g],w=m&65535,p=m>>>16,d=((w*w>>>17)+w*p>>>15)+p*p,n=((m&4294901760)*m|0)+((m&65535)*m|0);f[g]=d^n}r[0]=f[0]+(f[7]<<16|f[7]>>>16)+(f[6]<<16|f[6]>>>16)|0,r[1]=f[1]+(f[0]<<8|f[0]>>>24)+f[7]|0,r[2]=f[2]+(f[1]<<16|f[1]>>>16)+(f[0]<<16|f[0]>>>16)|0,r[3]=f[3]+(f[2]<<8|f[2]>>>24)+f[1]|0,r[4]=f[4]+(f[3]<<16|f[3]>>>16)+(f[2]<<16|f[2]>>>16)|0,r[5]=f[5]+(f[4]<<8|f[4]>>>24)+f[3]|0,r[6]=f[6]+(f[5]<<16|f[5]>>>16)+(f[4]<<16|f[4]>>>16)|0,r[7]=f[7]+(f[6]<<8|f[6]>>>24)+f[5]|0}u.Rabbit=R._createHelper(a)}(),k.Rabbit})},ELLl:function(N,$,P){(function(k){k(P("VrN/"))})(function(k){var u={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},C=k.Pos;k.defineOption("autoCloseBrackets",!1,function(w,p,d){d&&d!=k.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=f(w),d=p&&R(p,"explode");if(!d||w.getOption("disableInput"))return k.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 E(w,p){var d=f(w);if(!d||w.getOption("disableInput"))return k.Pass;var n=R(d,"pairs"),l=n.indexOf(p);if(l==-1)return k.Pass;for(var c=R(d,"closeBefore"),T=R(d,"triples"),v=n.charAt(l+1)==p,i=w.listSelections(),L=l%2==0,A,b=0;b=0&&w.getRange(y,C(y.line,y.ch+3))==p+p+p?_="skipThree":_="skip";else if(v&&y.ch>1&&T.indexOf(p)>=0&&w.getRange(C(y.line,y.ch-2),y)==p+p){if(y.ch>2&&/\bstring/.test(w.getTokenTypeAt(C(y.line,y.ch-2))))return k.Pass;_="addFour"}else if(v){var j=y.ch==0?" ":w.getRange(C(y.line,y.ch-1),y);if(!k.isWordChar(I)&&j!=p&&!k.isWordChar(j))_="both";else return k.Pass}else if(L&&(I.length===0||/\s/.test(I)||c.indexOf(I)>-1))_="both";else return k.Pass;if(!A)A=_;else if(A!=_)return k.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 b=this._hash.words,x=E.words,y=g.words,_=f.words,I=a.words,j=o.words,M=r.words,G,K,H,z,B,W,F,J,ee,q;W=G=b[0],F=K=b[1],J=H=b[2],ee=z=b[3],q=B=b[4];for(var ye,i=0;i<80;i+=1)ye=G+T[v+_[i]]|0,i<16?ye+=w(K,H,z)+x[0]:i<32?ye+=p(K,H,z)+x[1]:i<48?ye+=d(K,H,z)+x[2]:i<64?ye+=n(K,H,z)+x[3]:ye+=l(K,H,z)+x[4],ye=ye|0,ye=c(ye,j[i]),ye=ye+B|0,G=B,B=z,z=c(H,10),H=K,K=ye,ye=W+T[v+I[i]]|0,i<16?ye+=l(F,J,ee)+y[0]:i<32?ye+=n(F,J,ee)+y[1]:i<48?ye+=d(F,J,ee)+y[2]:i<64?ye+=p(F,J,ee)+y[3]:ye+=w(F,J,ee)+y[4],ye=ye|0,ye=c(ye,M[i]),ye=ye+q|0,W=q,q=ee,ee=c(J,10),J=F,F=ye;ye=b[1]+H+ee|0,b[1]=b[2]+z+q|0,b[2]=b[3]+B+W|0,b[3]=b[4]+G+F|0,b[4]=b[0]+K+J|0,b[0]=ye},_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,b=A.words,x=0;x<5;x++){var y=b[x];b[x]=(y<<8|y>>>24)&16711935|(y<<24|y>>>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 d(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),k.RIPEMD160})},ETIr:function(N,$,P){(function(k,u){N.exports=$=u(P("Ib8C"))})(this,function(k){return function(){var u=k,C=u.lib,R=C.WordArray,h=u.enc,s=h.Base64={stringify:function(f){var a=f.words,o=f.sigBytes,r=this._map;f.clamp();for(var E=[],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,d=m<<16|w<<8|p,n=0;n<4&&g+n*.75>>6*(3-n)&63));var l=r.charAt(64);if(l)for(;E.length%4;)E.push(l);return E.join("")},parse:function(f){var a=f.length,o=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var E=0;E>>6-g%4*2,p=m|w;r[E>>>2]|=p<<24-E%4*8,E++}return R.create(r,E)}}(),k.enc.Base64})},"F+F2":function(N,$,P){(function(k,u){N.exports=$=u(P("Ib8C"))})(this,function(k){return function(){if(typeof ArrayBuffer!="function")return;var u=k,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 f=S.byteLength,a=[],o=0;o>>2]|=S[o]<<24-o%4*8;h.call(this,a,f)}else h.apply(this,arguments)};s.prototype=R}(),k.lib.WordArray})},GRuw:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("lPiR"))})(this,function(k){return function(){var u=k,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 f=s._doFinalize.call(this);return f.sigBytes-=4,f}});u.SHA224=s._createHelper(S),u.HmacSHA224=s._createHmacHelper(S)}(),k.SHA224})},GfqC:function(N,$,P){"use strict";var k=P("q1tI"),u=P.n(k),C=P("TSYQ"),R=P.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(J){var ee=z.data[J];if(Array.isArray(ee)){ee.forEach(function(q){W.append(J+"[]",q)});return}W.append(J,z.data[J])}),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(J){F[J]!==null&&B.setRequestHeader(J,F[J])}),B.send(W),{abort:function(){B.abort()}}}var f=+new Date,a=0;function o(){return"rc-upload-"+f+"-"+ ++a}function r(z,B){return z.indexOf(B,z.length-B.length)!==-1}var E=function(z,B){if(z&&B){var W=Array.isArray(B)?B:B.split(","),F=z.name||"",J=z.type||"",ee=J.replace(/\/.*$/,"");return W.some(function(q){var ye=q.trim();return ye.charAt(0)==="."?r(F.toLowerCase(),ye.toLowerCase()):/\/\*$/.test(ye)?ee===ye.replace(/\/.*$/,""):J===ye})}return!0};function g(z,B){var W=z.createReader(),F=[];function J(){W.readEntries(function(ee){var q=Array.prototype.slice.apply(ee);F=F.concat(q);var ye=!q.length;ye?B(F):J()})}J()}var m=function(B,W,F){var J=function ee(q,ye){ye=ye||"",q.isFile?q.file(function(pe){F(pe)&&(q.fullPath&&!pe.webkitRelativePath&&(Object.defineProperties(pe,{webkitRelativePath:{writable:!0}}),pe.webkitRelativePath=q.fullPath.replace(/^\//,""),Object.defineProperties(pe,{webkitRelativePath:{writable:!1}})),W([pe]))}):q.isDirectory&&g(q,function(pe){pe.forEach(function(le){ee(le,""+ye+q.name+"/")})})};B.forEach(function(ee){J(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,J,ee;T(this,B);for(var q=arguments.length,ye=Array(q),pe=0;pe>>2]>>>24-L%4*8&255;c[v+L>>>2]|=A<<24-(v+L)%4*8}else for(var b=0;b>>2]=T[b>>>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=E.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=E.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,b=i/A;l?b=C.ceil(b):b=C.max((b|0)-this._minBufferSize,0);var x=b*L,y=C.min(x*4,i);if(x){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,E=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(E(String(M)))},p=function(M){return M.replace(/[+\/]/g,function(G){return G=="+"?"-":"_"}).replace(/=/g,"")},d=function(M,G){return G?p(w(M)):w(M)},n=function(M){return d(M,!0)},l;R.Uint8Array&&(l=function(M,G){for(var K="",H=0,z=M.length;H>>18)+S.charAt(J>>>12&63)+(typeof W!="undefined"?S.charAt(J>>>6&63):"=")+(typeof F!="undefined"?S.charAt(J&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?f[M.charAt(0)]<<18:0)|(G>1?f[M.charAt(1)]<<12:0)|(G>2?f[M.charAt(2)]<<6:0)|(G>3?f[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,""))},b=function(M){return v(L(M))},x=function(M){return String(M).replace(/[-_]/g,function(G){return G=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},y=function(M){return b(x(M))},_;R.Uint8Array&&(_=function(M){return Uint8Array.from(A(x(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:y,toBase64:d,utob:E,encode:d,encodeURI:n,btou:v,decode:y,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 y(this)})),Object.defineProperty(String.prototype,"toBase64",j(function(M){return d(this,M)})),Object.defineProperty(String.prototype,"toBase64URI",j(function(){return d(this,!0)}))}}return R.Meteor&&(Base64=R.Base64),N.exports?N.exports.Base64=R.Base64:!(u=[],C=function(){return R.Base64}.apply($,u),C!==void 0&&(N.exports=C)),{Base64:R.Base64}})}).call(this,P("IyRk"))},K3mO:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("3y9D"),P("WYAk"))})(this,function(k){return function(){var u=k,C=u.lib,R=C.Base,h=C.WordArray,s=u.algo,S=s.MD5,f=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,E=this.cfg,g=E.hasher.create(),m=h.create(),w=m.words,p=E.keySize,d=E.iterations;w.lengthOe)){ie.next=7;break}return C.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(Oe/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()}},pe)}));function ye(pe){return q.apply(this,arguments)}return ye}()},ee=function(){var q=Object(f.a)(E.a.mark(function ye(pe,le){var Oe,xe,ie,se,re,be,Z,te,Ee;return E.a.wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return le.file_name=pe.name,Z=pe.name,Y.next=4,Object(w.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(te=Y.sent,te.data=JSON.parse(i(te.data)),!((te==null?void 0:te.status)!==0)){Y.next=12;break}return K[K.findIndex(function(X){return X.name===Z})].status="error",K[K.findIndex(function(X){return X.name===Z})].file.status="error",j.onChange(K),C.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),Y.abrupt("return");case 12:return W=new T.a({endpoint:te==null||((Oe=te.data)===null||Oe===void 0)?void 0:Oe.end_point,region:te==null||((xe=te.data)===null||xe===void 0)?void 0:xe.region,accessKeyId:te==null||((ie=te.data)===null||ie===void 0)?void 0:ie.access_key_id,accessKeySecret:te==null||((se=te.data)===null||se===void 0)?void 0:se.access_key_secret,bucket:te==null||((re=te.data)===null||re===void 0)?void 0:re.bucket,stsToken:te==null||((be=te.data)===null||be===void 0)?void 0:be.security_token}),console.log(pe,"file"),F(W),Ee=Object(n.a)(),Y.abrupt("return",new Promise(function(X,Q){try{var he;W.multipartUpload("".concat(j.identifier,"/").concat(Ee).concat(Z.indexOf(".")>-1?"."+Z.split(".").pop():""),new Blob([pe.file],{type:pe.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Se,Ke,Ge){try{console.log("\u8FDB\u5EA6",Se,Ke,Ge);var Ye=K.findIndex(function(Qe){return Qe.name===Z});K[Ye].file.percent=Se*100,K[Ye].tempCheckpoint=Ke,H(Object(R.a)(K))}catch(Qe){}},checkpoint:K[K.findIndex(function(ce){return ce.name===Z})].tempCheckpoint,callback:{customValue:{id:Z+""},url:te==null||((he=te.data)===null||he===void 0)?void 0:he.callback_url,host:te==null?void 0:te.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 Se,Ke=K.findIndex(function(qe){return qe.name===Z}),Ge="done";if(((Se=ce.data)===null||Se===void 0?void 0:Se.status)===0){var Ye;pe.response=(Ye=ce.data)===null||Ye===void 0?void 0:Ye.data;var Qe=K.findIndex(function(qe){return qe.name===Z});K[Qe].status="done",K[Qe].file.status="done"}else{var rt;C.b.warn((rt=ce.data)===null||rt===void 0?void 0:rt.message),Ge="error"}K[Ke].status=Ge,K[Ke].file.status=Ge,j.onChange(K),X(ce==null?void 0:ce.data)}).catch(function(ce){K[K.findIndex(function(Se){return Se.name===Z})].status="error",K[K.findIndex(function(Se){return Se.name===Z})].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 Y.stop()}},ye)}));return function(pe,le){return q.apply(this,arguments)}}();return Object(g.useEffect)(function(){K.every(function(q){return q==="done"||q==="error"})&&j.onComplete(K)},[K]),Object(g.useEffect)(function(){if(I){var q;(q=W)===null||q===void 0||q.cancel()}},[I]),Object(g.useEffect)(function(){j.uploading&&K.map(function(){var q=Object(f.a)(E.a.mark(function ye(pe){var le,Oe;return E.a.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:if(!((!pe.status||pe.status==="error")&&!I)){ie.next=6;break}return pe.status="uploading",pe.file.status="uploading",ie.next=5,ee(pe,{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:Oe=ie.sent;case 6:case"end":return ie.stop()}},ye)}));return function(ye){return q.apply(this,arguments)}}())},[j.uploading]),m.a.createElement(v,Object(k.a)({},J,{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"))};$.b=Object(l.a)(function(x){var y=x.loading,_=x.globalSetting,I=x.user;return{globalSetting:_,loading:y.models.competitions,user:I}})(b)},KmYQ:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("OLod"))})(this,function(k){return k.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}}},k.pad.ZeroPadding})},L9qf:function(N,$,P){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,$,P){"use strict";P.d($,"b",function(){return c}),P.d($,"a",function(){return v});var k=P("1OyB"),u=P("vuIU"),C=P("Ji7U"),R=P("LK+K"),h=P("q1tI"),s=P("rePB"),S=P("Ff2n"),f=P("ODXe"),a=P("4IlW"),o=P("bX4T"),r=P("YrtM"),E=P("TSYQ"),g=P.n(E),m=P("+nKL"),w=P("8OUc"),p=function(F,J){var ee=F.prefixCls,q=F.id,ye=F.flattenOptions,pe=F.childrenAsData,le=F.values,Oe=F.searchValue,xe=F.multiple,ie=F.defaultActiveFirstOption,se=F.height,re=F.itemHeight,be=F.notFoundContent,Z=F.open,te=F.menuItemSelectedIcon,Ee=F.virtual,ae=F.onSelect,Y=F.onToggleOpen,X=F.onActiveValue,Q=F.onScroll,he=F.onMouseEnter,ce="".concat(ee,"-item"),Se=Object(r.a)(function(){return ye},[Z,ye],function($e,Me){return Me[0]&&$e[1]!==Me[1]}),Ke=h.useRef(null),Ge=function(Me){Me.preventDefault()},Ye=function(Me){Ke.current&&Ke.current.scrollTo({index:Me})},Qe=function(Me){for(var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Te=Se.length,de=0;de1&&arguments[1]!==void 0?arguments[1]:!1;return Object(L.a)(W).map(function(J,ee){if(!h.isValidElement(J)||!J.type)return null;var q=J.type.isSelectOptGroup,ye=J.key,pe=J.props,le=pe.children,Oe=Object(S.a)(pe,["children"]);return F||!q?A(J):Object(i.a)(Object(i.a)({key:"__RC_SELECT_GRP__".concat(ye===null?ee:ye,"__"),label:ye},Oe),{},{options:b(le)})}).filter(function(J){return J})}var x=P("2Qr1"),y=P("qNPg"),_=P("U8pU"),I=P("Kwbf"),j=P("WKfj");function M(W){var F=W.mode,J=W.options,ee=W.children,q=W.backfill,ye=W.allowClear,pe=W.placeholder,le=W.getInputElement,Oe=W.showSearch,xe=W.onSearch,ie=W.defaultOpen,se=W.autoFocus,re=W.labelInValue,be=W.value,Z=W.inputValue,te=W.optionLabelProp,Ee=F==="multiple"||F==="tags",ae=Oe!==void 0?Oe:Ee||F==="combobox",Y=J||b(ee);if(Object(I.a)(F!=="tags"||Y.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=Y.some(function(ce){return ce.options?ce.options.some(function(Se){return typeof("value"in Se?Se.value:Se.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"||!te,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(I.a)(F==="combobox"||!q,"`backfill` only works with `combobox` mode."),Object(I.a)(F==="combobox"||!le,"`getInputElement` only work with `combobox` mode."),Object(I.b)(F!=="combobox"||!le||!ye||!pe,"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)(!Ee||Array.isArray(be),"`value` should be array when `mode` is `multiple` or `tags`")}if(ee){var he=null;Object(L.a)(ee).some(function(ce){if(!h.isValidElement(ce)||!ce.type)return!1;var Se=ce.type;if(Se.isSelectOption)return!1;if(Se.isSelectOptGroup){var Ke=Object(L.a)(ce.props.children).every(function(Ge){return!h.isValidElement(Ge)||!ce.type||Ge.type.isSelectOption?!0:(he=Ge.type,!1)});return!Ke}return he=Se,!0}),he&&Object(I.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(he.displayName||he.name||he,"`.")),Object(I.a)(Z===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var G=M,K=Object(y.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:b,flattenOptions:x.d,getLabeledValue:x.e,filterOptions:x.b,isValueDisabled:x.g,findValueOption:x.c,warningProps:G,fillOptionsWithMissingValue:x.a}),H=function(W){Object(C.a)(J,W);var F=Object(R.a)(J);function J(){var ee;return Object(k.a)(this,J),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)(J,[{key:"render",value:function(){return h.createElement(K,Object.assign({ref:this.selectRef},this.props))}}]),J}(h.Component);H.Option=c,H.OptGroup=v;var z=H,B=$.c=z},M8RZ:function(N,$,P){"use strict";P.d($,"a",function(){return a});var k=P("fWQN"),u=P("mtLc"),C=P("yKVA"),R=P("879j"),h=P("q1tI"),s=P.n(h),S=P("i8i4"),f=P.n(S),a=function(o){Object(C.a)(E,o);var r=Object(R.a)(E);function E(g){var m;Object(k.a)(this,E),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)(E,[{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)}}]),E}(s.a.Component)},MFOe:function(N,$,P){(function(k){var u=s(),C=S(),R=f(),h=typeof window!="undefined"?window:k;N.exports={assign:u,create:C,trim:R,bind:a,slice:o,each:r,map:E,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 d=f.get(p)||new Set;d.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||E.has(L))&&(v=!0)}),T&&r.add(l.key),v&&E.add(l.key),w.add(l.key)})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(u(E,r))}}function h(S,f,a,o,r){for(var E=new Set(S),g=new Set(f),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;!E.has(c)&&!g.has(c)&&!r(T)&&i.filter(function(L){return!r(L.node)}).forEach(function(L){E.delete(L.key)})})}g=new Set;for(var p=new Set,d=o;d>=0;d-=1){var n=a.get(d)||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,b=E.has(A);v&&!b&&(v=!1),!i&&(b||g.has(A))&&(i=!0)}),v||E.delete(c.key),i&&g.add(c.key),p.add(c.key)})}return{checkedKeys:Array.from(E),halfCheckedKeys:Array.from(u(g,E))}}function s(S,f,a,o){var r=[],E;o?E=o:E=C;var g=new Set(S.filter(function(d){var n=!!a[d];return n||r.push(d),n})),m=new Map,w=0;Object.keys(a).forEach(function(d){var n=a[d],l=n.level,c=m.get(l);c||(c=new Set,m.set(l,c)),c.add(n),w=Math.max(w,l)}),Object(k.a)(!r.length,"Tree missing follow keys: ".concat(r.slice(0,100).map(function(d){return"'".concat(d,"'")}).join(", ")));var p;return f===!0?p=R(g,m,w,E):p=h(g,f.halfCheckedKeys,m,w,E),p}},OLod:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("K3mO"))})(this,function(k){k.lib.Cipher||function(u){var C=k,R=C.lib,h=R.Base,s=R.WordArray,S=R.BufferedBlockAlgorithm,f=C.enc,a=f.Utf8,o=f.Base64,r=C.algo,E=r.EvpKDF,g=R.Cipher=S.extend({cfg:h.extend(),createEncryptor:function(y,_){return this.create(this._ENC_XFORM_MODE,y,_)},createDecryptor:function(y,_){return this.create(this._DEC_XFORM_MODE,y,_)},init:function(y,_,I){this.cfg=this.cfg.extend(I),this._xformMode=y,this._key=_,this.reset()},reset:function(){S.reset.call(this),this._doReset()},process:function(y){return this._append(y),this._process()},finalize:function(y){y&&this._append(y);var _=this._doFinalize();return _},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function y(_){return typeof _=="string"?x:L}return function(_){return{encrypt:function(I,j,M){return y(j).encrypt(_,I,j,M)},decrypt:function(I,j,M){return y(j).decrypt(_,I,j,M)}}}}()}),m=R.StreamCipher=g.extend({_doFinalize:function(){var y=this._process(!0);return y},blockSize:1}),w=C.mode={},p=R.BlockCipherMode=h.extend({createEncryptor:function(y,_){return this.Encryptor.create(y,_)},createDecryptor:function(y,_){return this.Decryptor.create(y,_)},init:function(y,_){this._cipher=y,this._iv=_}}),d=w.CBC=function(){var y=p.extend();y.Encryptor=y.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)}}),y.Decryptor=y.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;y.sigBytes-=_}},c=R.BlockCipher=g.extend({cfg:g.cfg.extend({mode:d,padding:l}),reset:function(){var y;g.reset.call(this);var _=this.cfg,I=_.iv,j=_.mode;this._xformMode==this._ENC_XFORM_MODE?y=j.createEncryptor:(y=j.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==y?this._mode.init(this,I&&I.words):(this._mode=y.call(j,this,I&&I.words),this._mode.__creator=y)},_doProcessBlock:function(y,_){this._mode.processBlock(y,_)},_doFinalize:function(){var y,_=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(_.pad(this._data,this.blockSize),y=this._process(!0)):(y=this._process(!0),_.unpad(y)),y},blockSize:128/32}),T=R.CipherParams=h.extend({init:function(y){this.mixIn(y)},toString:function(y){return(y||this.formatter).stringify(this)}}),v=C.format={},i=v.OpenSSL={stringify:function(y){var _,I=y.ciphertext,j=y.salt;return j?_=s.create([1398893684,1701076831]).concat(j).concat(I):_=I,_.toString(o)},parse:function(y){var _,I=o.parse(y),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(y,_,I,j){j=this.cfg.extend(j);var M=y.createEncryptor(I,j),G=M.finalize(_),K=M.cfg;return T.create({ciphertext:G,key:I,iv:K.iv,algorithm:y,mode:K.mode,padding:K.padding,blockSize:y.blockSize,formatter:j.format})},decrypt:function(y,_,I,j){j=this.cfg.extend(j),_=this._parse(_,j.format);var M=y.createDecryptor(I,j).finalize(_.ciphertext);return M},_parse:function(y,_){return typeof y=="string"?_.parse(y,this):y}}),A=C.kdf={},b=A.OpenSSL={execute:function(y,_,I,j){j||(j=s.random(64/8));var M=E.create({keySize:_+I}).compute(y,j),G=s.create(M.words.slice(_),I*4);return M.sigBytes=_*4,T.create({key:M,iv:G,salt:j})}},x=R.PasswordBasedCipher=L.extend({cfg:L.cfg.extend({kdf:b}),encrypt:function(y,_,I,j){j=this.cfg.extend(j);var M=j.kdf.execute(I,y.keySize,y.ivSize);j.iv=M.iv;var G=L.encrypt.call(this,y,_,M.key,j);return G.mixIn(M),G},decrypt:function(y,_,I,j){j=this.cfg.extend(j),_=this._parse(_,j.format);var M=j.kdf.execute(I,y.keySize,y.ivSize,_.salt);j.iv=M.iv;var G=L.decrypt.call(this,y,_,M.key,j);return G}})}()})},OZM5:function(N,$,P){"use strict";P.d($,"b",function(){return o}),P.d($,"a",function(){return r}),P.d($,"k",function(){return E}),P.d($,"h",function(){return g}),P.d($,"i",function(){return m}),P.d($,"g",function(){return w}),P.d($,"c",function(){return p}),P.d($,"d",function(){return d}),P.d($,"j",function(){return c}),P.d($,"e",function(){return T}),P.d($,"f",function(){return v});var k=P("KQm4"),u=P("U8pU"),C=P("Ff2n"),R=P("q1tI"),h=P.n(R),s=P("Kwbf"),S=P("WaYH"),f=.25,a=2;function o(i,L){var A=i.slice(),b=A.indexOf(L);return b>=0&&A.splice(b,1),A}function r(i,L){var A=i.slice();return A.indexOf(L)===-1&&A.push(L),A}function E(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],b=L[i];function x(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];y.forEach(function(_){var I=_.key,j=_.children;A.push(I),x(j)})}return x(b.children),A}function p(i,L){var A=i.clientY,b=L.selectHandle.getBoundingClientRect(),x=b.top,y=b.bottom,_=b.height,I=Math.max(_*f,a);return A<=x+I?-1:A>=y-I?1:0}function d(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||{},b=A.processProps,x=b===void 0?n:b,y=Array.isArray(i)?i:[i];return y.map(function(_){var I=_.children,j=Object(C.a)(_,["children"]),M=l(I,L);return h.a.createElement(S.a,Object.assign({},x(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 b(x){if(A.has(x))return;var y=L[x];if(!y)return;A.add(x);var _=y.parent,I=y.node;if(I.disabled)return;_&&b(_.key)}return(i||[]).forEach(function(x){b(x)}),Object(k.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,$,P){"use strict";var k=P("2qtc"),u=P("kLXV"),C=P("rAM+"),R=P("miYZ"),h=P("tsqr"),s=P("tJVT"),S=P("jrin"),f=P("q1tI"),a=P.n(f),o=P("VrN/"),r=P.n(o),E=P("bdgK"),g=P("p77/"),m=P("Bd2K"),w=P("ELLl"),p=P("19Vz"),d=P("lZu9"),n=P("+NIl"),l=P("kSUc"),c=P("9Bee"),T=function(Te){var de=Te.value,ge=de===void 0?"":de,we=Te.className,_e=Te.showTextOnly,Ue=Te.showLines,Xe=Te.style,at=Xe===void 0?{}:Xe,ut=Object(f.useMemo)(function(){return""},[ge]);return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{dangerouslySetInnerHTML:{__html:ut}}))},v=P("0Owb"),i=P("dejd"),L=P("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 b(Te){var de=Te.onActionCallback,ge=Te.title,we=Te.icon,_e=Te.actionName,Ue=Te.className,Xe=Ue===void 0?"":Ue,at=Te.children;function ut(){de(_e)}return a.a.createElement("a",{title:ge,className:Xe,onClick:ut},a.a.createElement("i",{className:"md-iconfont ".concat(we)}),at)}var x=function(Te){var de=Te.watch,ge=Te.showNullButton,we=Te.onActionCallback,_e=Te.fullScreen,Ue=Te.insertTemp,Xe=Te.hidetoolBar,at=[].concat(A,[{title:"".concat(de?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(de?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return a.a.createElement("ul",{className:"markdown-toolbar-container"},!Xe&&at.map(function(ut,mt){return a.a.createElement("li",{key:mt},ut.actionName?a.a.createElement(b,Object(v.a)({},ut,{onActionCallback:we})):a.a.createElement("span",{className:"v-line"}))}),ge?a.a.createElement("li",null,a.a.createElement(b,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:we},a.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ue&&a.a.createElement("li",null,a.a.createElement(b,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Ue),onActionCallback:we},a.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),a.a.createElement("li",{className:"btn-full-screen"},a.a.createElement(b,{icon:"".concat(_e?"icon-shrink":"icon-enlarge"),title:_e?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:we})))},y=P("M8RZ"),_=P("+L6B"),I=P("2/Rp"),j=P("y8nQ"),M=P("Vl3Y"),G=P("5NDa"),K=P("5rEg"),H={labelCol:{span:4},wrapperCol:{span:20}},z=function(Te){var de=Te.callback,ge=Te.onCancel;function we(_e){de(_e)}return a.a.createElement(M.a,Object(v.a)({},H,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:we}),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:ge},"\u53D6\u6D88")))},B=P("7ahc"),W=P("HmJG"),F=P("BjJ7"),J=M.a.useForm,ee={width:280,marginRight:10},q={labelCol:{span:5},wrapperCol:{span:19}},ye=function(Te){var de=Te.callback,ge=Te.onCancel,we=J(),_e=Object(s.a)(we,1),Ue=_e[0];function Xe(mt){de(mt)}function at(mt,ct){Ue.setFieldsValue({src:"/api/attachments/".concat(mt.id),type:ct.type})}function ut(mt){var ct=mt.target.files[0];le(ct,at)}return a.a.createElement(M.a,Object(v.a)({form:Ue},q,{className:"upload-image-panel",onFinish:Xe}),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(pe,{onFileChange:ut}))),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:ge},"\u53D6\u6D88")))};function pe(Te){var de=Te.onFileChange;return a.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",a.a.createElement("input",{type:"file",onChange:de}))}function le(Te,de){if(!Te)throw new String("\u6CA1\u6709\u6587\u4EF6");var ge=new FormData;ge.append("editormd-image-file",Te),ge.append("file_param_name","editormd-image-file"),ge.append("byxhr","true");var we=new window.XMLHttpRequest;we.withCredentials=!0,we.addEventListener("load",function(_e){de(JSON.parse(_e.target.responseText),Te)},!1),we.addEventListener("error",function(_e){console.error(_e)},!1),we.open("POST","".concat(F.a,"/api/attachments.json")),we.send(ge)}var Oe=P("giR+"),xe=P("fyUT"),ie=P("7Kak"),se=P("9yH6"),re=se.a.Group,be={margin:"0 8px"},Z=function(Te){var de=Te.callback,ge=Te.onCancel;function we(_e){de(_e)}return a.a.createElement(M.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:we},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:ge},"\u53D6\u6D88")))},te=P("m3rI"),Ee=P("wMS7"),ae=P.n(Ee),Y="link",X="upload-image",Q="code-block",he="add-table",ce="------------",Se={default:ce,left:":".concat(ce),center:":".concat(ce,":"),right:"".concat(ce,":")},Ke=P("9VGf"),Ge,Ye;function Qe(){}var rt=0,qe=1e4,Le="\u2581",Ce=` **\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 Ve(Te){return/^\d+$/.test(Te)?"".concat(Te,"px"):Te}var tt=navigator.platform.toUpperCase().indexOf("MAC")>=0,He=tt?"Cmd":"Ctrl",$e=(Ge={},Object(S.a)(Ge,He+"-B","bold"),Object(S.a)(Ge,He+"-I","italic"),Ge),Me=(Ye={},Object(S.a)(Ye,Y,"\u6DFB\u52A0\u94FE\u63A5"),Object(S.a)(Ye,Q,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(S.a)(Ye,X,"\u6DFB\u52A0\u56FE\u7247"),Object(S.a)(Ye,he,"\u6DFB\u52A0\u8868\u683C"),Ye),De=$.a=function(Te){var de=Te.defaultValue,ge=de===void 0?"":de,we=Te.onChange,_e=Te.width,Ue=_e===void 0?"100%":_e,Xe=Te.height,at=Xe===void 0?400:Xe,ut=Te.miniToolbar,mt=ut===void 0?!1:ut,ct=Te.isFocus,_t=ct===void 0?!1:ct,At=Te.watch,Et=Te.insertTemp,Qt=Te.mode,qt=Qt===void 0?"markdown":Qt,Jt=Te.id,mr=Jt===void 0?"markdown-editor-id":Jt,Pt=Te.showResizeBar,cr=Pt===void 0?!1:Pt,ir=Te.noStorage,Ht=ir===void 0?!1:ir,$t=Te.showNullButton,Kr=$t===void 0?!1:$t,En=Te.hidetoolBar,Nr=En===void 0?!1:En,Wn=Te.fullScreen,gt=Wn===void 0?!1:Wn,Ct=Te.onBlur,dt=Te.onCMBeforeChange,or=Te.onFullScreen,Mr=Te.className,jt=Mr===void 0?"":Mr,Rt=Te.disablePaste,Ar=Rt===void 0?!1:Rt,dn=Te.placeholder,Sr=dn===void 0?"":dn,st=Te.values,Ot=st===void 0?"":st,jr=Object(f.useState)(null),$r=Object(s.a)(jr,2),ft=$r[0],gn=$r[1],Zr=Object(f.useState)(ge),St=Object(s.a)(Zr,2),kr=St[0],Ur=St[1],Dr=Object(f.useState)(At),sr=Object(s.a)(Dr,2),wn=sr[0],Lt=sr[1],nt=Object(f.useState)(gt),wt=Object(s.a)(nt,2),Mt=wt[0],er=wt[1],dr=Object(f.useState)(""),en=Object(s.a)(dr,2),fr=en[0],tr=en[1],lr=Object(f.useState)(0),Rr=Object(s.a)(lr,2),zt=Rr[0],Ut=Rr[1],rr=Object(f.useState)(at),Cr=Object(s.a)(rr,2),zr=Cr[0],on=Cr[1],Ln=Object(f.useState)(!1),Va=Object(s.a)(Ln,2),ri=Va[0],Pa=Va[1],ea=Object(f.useRef)(),vn=Object(f.useRef)(),Ca=Object(f.useRef)(),Jr=Object(f.useRef)();Object(f.useEffect)(function(){Ur(Ot),ft==null||ft.setValue(Ot)},[Ot]),Object(f.useEffect)(function(){or==null||or(Mt)},[Mt]),Object(f.useEffect)(function(){if(ea.current){var Ft=r.a.fromTextArea(ea.current,{mode:qt,lineNumbers:!mt,lineWrapping:!0,value:ge,autoCloseTags:!0,autoCloseBrackets:!0});_t&&Ft.focus();function Kt(Gt,gr){if(Ar){gr.preventDefault();return}var Pr=gr.clipboardData;if(Pr){var Xr=Pr.types.toString(),Vr=Pr.items,yn=["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(Xr==="Files"||Pr.types.indexOf("Files")>-1){if(gr.preventDefault(),qt=="stex")return;try{var rn,xr=Vr[1];((rn=Vr[0])===null||rn===void 0?void 0:rn.kind)==="file"&&(xr=Vr[0]);var fn=xr.getAsFile(),fa=fn.name.split(".").pop();le(fn,function(hn){if(hn.id){var oa,sa,ba;(fn==null||((oa=fn.type)===null||oa===void 0)?void 0:oa.indexOf("image"))>-1?Ft.replaceSelection("![,](/api/attachments/".concat(hn.id,"?type=").concat(hn.content_type,")")):(fn==null||((sa=fn.type)===null||sa===void 0)?void 0:sa.indexOf("video"))>-1?Ft.replaceSelection('')):(fn==null||((ba=fn.type)===null||ba===void 0)?void 0:ba.indexOf("pdf"))>-1?Ft.replaceSelection('
    ').concat(fn.name,"")):yn.includes(fa)?Ft.replaceSelection('').concat(fn.name,"")):Ft.replaceSelection("[".concat(fn.name,"](").concat(te.a.API_SERVER,"/api/attachments/").concat(hn.id,"?type=").concat(hn.content_type,")"))}else(hn==null?void 0:hn.status)===401&&(document.location.href="/user/login")})}catch(hn){h.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Ft.on("paste",Kt),gn(Ft),function(){Ft.off("paste",Kt)}}},[]);var ta=Object(f.useCallback)(function(){if(vn.current)try{}catch(Ft){console.log(Ft,"---- to set md editor body height")}},[zr,vn,Mt]);Object(f.useEffect)(function(){function Ft(){var Gt=new E.default(function(gr){var Pr=Object(C.a)(gr),Xr;try{for(Pr.s();!(Xr=Pr.n()).done;){var Vr=Xr.value;(Vr.target.offsetHeight>0||Vr.target.offsetWidth>0)&&(ta(),ft.setSize("100%","100%"),ft.refresh())}}catch(yn){Pr.e(yn)}finally{Pr.f()}});return Gt.observe(ea.current.parentElement),Gt}if(ft){var Kt=Ft();return function(){Kt.unobserve(ea.current.parentElement)}}},[ft,ta]),Object(f.useEffect)(function(){if(ft){for(var Ft=[],Kt=function(){var Vr=gr[Gt];Pr=Object(s.a)(Vr,2);var yn=Pr[0],rn=Pr[1],xr=Object(S.a)({},yn,function(){Nn(rn)});Ft.push(xr),ft.addKeyMap(xr)},Gt=0,gr=Object.entries($e);Gt0){var Ft=new Date().getTime(),Kt=window.sessionStorage.getItem(mr);Ft>=zt+qe&&(!Kt||Kt!==kr)&&(window.sessionStorage.setItem(mr,kr),Pa(!0))}},qe),Object(f.useEffect)(function(){Lt(At)},[ft,At]),Object(f.useEffect)(function(){ft&&(_t&&ft.focus())},[ft,_t]),Object(f.useEffect)(function(){if(wn&&ft){var Ft=ft.getScrollerElement();function Kt(Gt){var gr=Gt.target;if(Jr.current){var Pr=gr.scrollTop/gr.scrollHeight;Jr.current.scrollTop=Jr.current.scrollHeight*Pr}}return Ft.addEventListener("scroll",Kt),function(){Ft.removeEventListener("scroll",Kt)}}},[ft,wn]),Object(f.useEffect)(function(){if(ft&&dt){function Ft(Kt,Gt){dt(Kt,Gt)}return ft.on("beforeChange",Ft),function(){ft.off("beforeChange",Ft)}}},[ft,dt]),Object(f.useEffect)(function(){if(ft&&Ct){function Ft(){Ct(ft.getValue())}return ft.on("blur",Ft),function(){ft.off("blur",Ft)}}},[ft,Ct]),Object(f.useEffect)(function(){if(ft){function Ft(Kt){var Gt=ae.a.sanitize(Kt.getValue());Ur(Gt),Ut(new Date().getTime()),Kt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),we&&we(Gt)}return ft.on("change",Ft),function(){ft.off("change",Ft)}}},[ft,we]),Object(f.useEffect)(function(){ft&&(ge==null?(ft.setValue(""),Ur("")):ge!==ft.getValue()&&(ft.setValue(ge),Ur(ge),ft.setCursor(ft.lineCount(),0)))},[ft,ge]);var Nn=Object(f.useCallback)(function(Ft){var Kt=ft.getCursor(),Gt=ft.getSelection(),gr=Gt.split(` `);switch(Ft){case"bold":return ft.replaceSelection("**"+Gt+"**"),Gt===""&&ft.setCursor(Kt.line,Kt.ch+2),ft.focus();case"italic":return ft.replaceSelection("*"+Gt+"*"),Gt===""&&ft.setCursor(Kt.line,Kt.ch+1),ft.focus();case"code":return ft.replaceSelection("`"+Gt+"`"),Gt===""&&ft.setCursor(Kt.line,Kt.ch+1),ft.focus();case"inline-latex":return ft.replaceSelection("`$$"+Gt+"$$`"),Gt===""&&ft.setCursor(Kt.line,Kt.ch+3),ft.focus();case"latex":return ft.replaceSelection("```latex\n"+Gt+"\n```"),ft.setCursor(Kt.line+1,Gt.length+1),ft.focus();case"line-break":return ft.replaceSelection(`
    `),ft.focus();case"list-ul":return Gt===""?ft.replaceSelection("- "+Gt):ft.replaceSelection(gr.map(function(Pr){return Pr===""?"":"- ".concat(Pr)}).join(` `)),ft.focus();case"list-ol":return Gt===""?ft.replaceSelection("1. "+Gt):ft.replaceSelection(gr.map(function(Pr,Xr){return Pr===""?"":"".concat(Xr+1,". ").concat(Pr)}).join(` `)),ft.focus();case"add-null-ch":return Gt===""&&ft.setCursor(Kt.line,Kt.ch+1),ft.replaceSelection(Le),ft.focus();case"inster-template-1":return Gt===""&&ft.setCursor(Kt.line,Kt.ch),ft.replaceSelection(Ce),ft.focus();case"eraser":return ft.setValue(""),ft.focus();case"trigger-watch":return Lt(!wn),ft.focus();case"trigger-full-screen":return er(!Mt),ft.focus();case Y:tr(Y);return;case Q:tr(Q);return;case X:tr(X);return;case he:tr(he);return;default:throw new Error}},[ft,wn,Mt]),sn=Object(f.useCallback)(function(Ft){tr("");switch(fr){case Y:var Kt=Ft.title,Gt=Ft.link;return ft.replaceSelection("[".concat(Kt,"](").concat(Gt,")")),ft.focus();case Q:var gr=Ft.language,Pr=Ft.content;return ft.replaceSelection(["```"+gr,Pr,"```"].join(` `)),ft.focus();case X:var Xr=Ft.src,Vr=Ft.alt;return ft.replaceSelection("![ ".concat(Vr," ]( ").concat(Xr,' "').concat(Vr,'" )')),ft.focus();case he:for(var yn=Ft.row,rn=Ft.col,xr=Ft.align,fn=` `,fa=0;fa300&&(yn=300);var rn=at+yn+"px";on(rn)}}return Ft.addEventListener("mousedown",gr),document.addEventListener("mousemove",Xr),document.addEventListener("mouseup",Pr),function(){Ft.removeEventListener("mousedown",gr),document.removeEventListener("mousemove",Xr),document.removeEventListener("mouseup",Pr)}}},[ft,Ca]),Object(f.useEffect)(function(){on(at)},[at]);var ya=Ve(Ue),ia=Ve(zr),Ba={width:ya,height:ia},Oa=Object(f.useMemo)(function(){if(zt){var Ft=new Date(zt),Kt=Ft.getHours(),Gt=Ft.getMinutes(),gr=Ft.getSeconds();return Kt=Kt<10?"0"+Kt:Kt,Gt=Gt<10?"0"+Gt:Gt,gr=gr<10?"0"+gr:gr,"".concat(Kt,":").concat(Gt,":").concat(gr)}return 0},[zt]);function ra(){window.sessionStorage.removeItem(mr),Pa(!1),Ut(0)}function Wa(){Pa(!1),Ut(0),ft.setValue(window.sessionStorage.getItem(mr))}return a.a.createElement(f.Fragment,null,a.a.createElement("div",{className:"markdown-editor-wrapper",ref:vn},a.a.createElement("div",{className:"markdown-editor-container ".concat(jt," ").concat(wn?"on-preview":""," ").concat(mt?"mini":""," ").concat(Mt?"full-screen":""),style:Ba},a.a.createElement(x,{insertTemp:Et,watch:wn,fullScreen:Mt,showNullButton:Kr,onActionCallback:Nn,hidetoolBar:Nr}),a.a.createElement("div",{className:"markdown-editor-body"},a.a.createElement("div",{className:"codemirror-container"},a.a.createElement("textarea",{ref:ea,placeholder:Sr})),wn?a.a.createElement("div",{ref:Jr,className:"preview-container"},qt==="stex"&&a.a.createElement(T,{value:kr}),qt!=="stex"&&a.a.createElement(c.a,{value:kr})):null))),cr?a.a.createElement("a",{ref:Ca,className:"editor-resize"}):null,a.a.createElement(y.a,null,Me[fr]?a.a.createElement(u.a,{centered:!0,title:Me[fr],visible:!0,onCancel:da,footer:null},Mn):null))}},PD8m:function(N,$){N.exports={name:"memoryStorage",read:k,write:u,each:C,remove:R,clearAll:h};var P={};function k(s){return P[s]}function u(s,S){P[s]=S}function C(s){for(var S in P)P.hasOwnProperty(S)&&s(P[S],S)}function R(s){delete P[s]}function h(s){P={}}},PVpz:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("ETIr"),P("cv67"),P("K3mO"),P("OLod"))})(this,function(k){return function(){var u=k,C=u.lib,R=C.StreamCipher,h=u.algo,s=[],S=[],f=[],a=h.RabbitLegacy=R.extend({_doReset:function(){var r=this._key.words,E=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(E){var p=E.words,d=p[0],n=p[1],l=(d<<8|d>>>24)&16711935|(d<<24|d>>>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,E){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[E+m]^=s[m]},blockSize:128/32,ivSize:64/32});function o(){for(var r=this._X,E=this._C,g=0;g<8;g++)S[g]=E[g];E[0]=E[0]+1295307597+this._b|0,E[1]=E[1]+3545052371+(E[0]>>>0>>0?1:0)|0,E[2]=E[2]+886263092+(E[1]>>>0>>0?1:0)|0,E[3]=E[3]+1295307597+(E[2]>>>0>>0?1:0)|0,E[4]=E[4]+3545052371+(E[3]>>>0>>0?1:0)|0,E[5]=E[5]+886263092+(E[4]>>>0>>0?1:0)|0,E[6]=E[6]+1295307597+(E[5]>>>0>>0?1:0)|0,E[7]=E[7]+3545052371+(E[6]>>>0>>0?1:0)|0,this._b=E[7]>>>0>>0?1:0;for(var g=0;g<8;g++){var m=r[g]+E[g],w=m&65535,p=m>>>16,d=((w*w>>>17)+w*p>>>15)+p*p,n=((m&4294901760)*m|0)+((m&65535)*m|0);f[g]=d^n}r[0]=f[0]+(f[7]<<16|f[7]>>>16)+(f[6]<<16|f[6]>>>16)|0,r[1]=f[1]+(f[0]<<8|f[0]>>>24)+f[7]|0,r[2]=f[2]+(f[1]<<16|f[1]>>>16)+(f[0]<<16|f[0]>>>16)|0,r[3]=f[3]+(f[2]<<8|f[2]>>>24)+f[1]|0,r[4]=f[4]+(f[3]<<16|f[3]>>>16)+(f[2]<<16|f[2]>>>16)|0,r[5]=f[5]+(f[4]<<8|f[4]>>>24)+f[3]|0,r[6]=f[6]+(f[5]<<16|f[5]>>>16)+(f[4]<<16|f[4]>>>16)|0,r[7]=f[7]+(f[6]<<8|f[6]>>>24)+f[5]|0}u.RabbitLegacy=R._createHelper(a)}(),k.RabbitLegacy})},RELg:function(N,$,P){var k=P("MFOe"),u=k.Global;N.exports={name:"oldIE-userDataStorage",write:S,read:f,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 d=g(w);h(function(n){n.setAttribute(d,p),n.save(C)})}function f(w){if(s)return;var p=g(w),d=null;return h(function(n){d=n.getAttribute(p)}),d}function a(w){h(function(p){for(var d=p.XMLDocument.documentElement.attributes,n=d.length-1;n>=0;n--){var l=d[n];w(p.getAttribute(l.name),l.name)}})}function o(w){var p=g(w);h(function(d){d.removeAttribute(p),d.save(C)})}function r(){h(function(w){var p=w.XMLDocument.documentElement.attributes;w.load(C);for(var d=p.length-1;d>=0;d--)w.removeAttribute(p[d].name);w.save(C)})}var E=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function g(w){return w.replace(/^\d/,"___$&").replace(E,"___")}function m(){if(!R||!R.documentElement||!R.documentElement.addBehavior)return null;var w="script",p,d,n;try{d=new ActiveXObject("htmlfile"),d.open(),d.write("<"+w+">document.w=window'),d.close(),p=d.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,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("OLod"))})(this,function(k){return k.mode.OFB=function(){var u=k.lib.BlockCipherMode.extend(),C=u.Encryptor=u.extend({processBlock:function(R,h){var s=this._cipher,S=s.blockSize,f=this._iv,a=this._keystream;f&&(a=this._keystream=f.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 Y=0,X=!1,Q=!1,he=0,ce=ae.length;he122||(de<65||Te>90||Ve.push([Math.max(65,Te)|32,Math.min(de,90)|32]),de<97||Te>122||Ve.push([Math.max(97,Te)&~32,Math.min(de,122)&~32]))}}Ve.sort(function(Ue,Xe){return Ue[0]-Xe[0]||Xe[1]-Ue[1]});for(var ge=[],we=[],$e=0;$e_e[0]&&(_e[1]+1>_e[0]&&He.push("-"),He.push(Ye(_e[1])))}return He.push("]"),He.join("")}function rt(Le){for(var Ce=Le.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,$e=0;He=2&&Te==="["?Ce[He]=Qe(Me):Te!=="\\"&&(Ce[He]=Me.replace(/[a-zA-Z]/g,function(we){var _e=we.charCodeAt(0);return"["+String.fromCharCode(_e&~32,_e|32)+"]"}))}return Ce.join("")}for(var qe=[],he=0,ce=ae.length;he=0;)X[qe.charAt(Le)]=rt;var Ce=rt[1],Ve=""+Ce;Ge.hasOwnProperty(Ve)||(Ke.push(Ce),Ge[Ve]=null)}Ke.push(/[\0-\uffff]/),Q=B(Ke)})();var he=Y.length,ce=function(Se){for(var Ke=Se.sourceCode,Ge=Se.basePos,Ye=Se.sourceNode,Qe=[Ge,_],rt=0,qe=Ke.match(Q)||[],Le={},Ce=0,Ve=qe.length;Ce=5&&He.substring(0,5)==="lang-",Me&&!($e&&typeof $e[1]=="string")&&(Me=!1,He=M),Me||(Le[tt]=He)}var de=rt;if(rt+=tt.length,!Me)Qe.push(Ge+de,He);else{var ge=$e[1],we=tt.indexOf(ge),_e=we+ge.length;$e[2]&&(_e=tt.length-$e[2].length,we=_e-ge.length);var Ue=He.substring(5);F(Ye,Ge+de,tt.substring(0,we),ce,Qe),F(Ye,Ge+de+we,ge,se(Ue,ge),Qe),F(Ye,Ge+de+_e,tt.substring(_e),ce,Qe)}}Se.decorations=Qe};return ce}function ye(ae){var Y=[],X=[];ae.tripleQuotedStrings?Y.push([i,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ae.multiLineStrings?Y.push([i,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Y.push([i,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ae.verbatimStrings&&X.push([i,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Q=ae.hashComments;Q&&(ae.cStyleComments?(Q>1?Y.push([A,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Y.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])):Y.push([A,/^#[^\r\n]*/,null,"#"])),ae.cStyleComments&&(X.push([A,/^\/\/[^\r\n]*/,null]),X.push([A,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var he=ae.regexLiterals;if(he){var ce=he>1?"":` \r`,Se=ce?".":"[\\S\\s]",Ke="/(?=[^/*"+ce+"])(?:[^/\\x5B\\x5C"+ce+"]|\\x5C"+Se+"|\\x5B(?:[^\\x5C\\x5D"+ce+"]|\\x5C"+Se+")*(?:\\x5D|$))+/";X.push(["lang-regex",RegExp("^"+z+"("+Ke+")")])}var Ge=ae.types;Ge&&X.push([b,Ge]);var Ye=(""+ae.keywords).replace(/^ | $/g,"");Ye.length&&X.push([L,new RegExp("^(?:"+Ye.replace(/[\s,]+/g,"|")+")\\b"),null]),Y.push([_,/^\s+/,null,` \r \xA0`]);var Qe="^.[^\\s\\w.$@'\"`/\\\\]*";return ae.regexLiterals&&(Qe+="(?!s*/)"),X.push([x,/^@[a-z_$][a-z_$@0-9]*/i,null],[b,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[_,/^[a-z_$][a-z_$@0-9]*/i,null],[x,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[_,/^\\[\s\S]?/,null],[y,new RegExp(Qe),null]),q(Y,X)}var pe=ye({keywords:T,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function le(ae,Y,X){for(var Q=/(?:^|\s)nocode(?:\s|$)/,he=/\r\n?|\n/,ce=ae.ownerDocument,Se=ce.createElement("li");ae.firstChild;)Se.appendChild(ae.firstChild);var Ke=[Se];function Ge(Ce){var Ve=Ce.nodeType;if(Ve==1&&!Q.test(Ce.className))if(Ce.nodeName==="br")Ye(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,$e=He.match(he);if($e){var Me=He.substring(0,$e.index);Ce.nodeValue=Me;var De=He.substring($e.index+$e[0].length);if(De){var Te=Ce.parentNode;Te.insertBefore(ce.createTextNode(De),Ce.nextSibling)}Ye(Ce),Me||Ce.parentNode.removeChild(Ce)}}}function Ye(Ce){for(;!Ce.nextSibling;)if(Ce=Ce.parentNode,!Ce)return;function Ve($e,Me){var De=Me?$e.cloneNode(!1):$e,Te=$e.parentNode;if(Te){var de=Ve(Te,1),ge=$e.nextSibling;de.appendChild(De);for(var we=ge;we;we=ge)ge=we.nextSibling,de.appendChild(we)}return De}for(var tt=Ve(Ce.nextSibling,0),He;(He=tt.parentNode)&&He.nodeType===1;)tt=He;Ke.push(tt)}for(var Qe=0;Qe=Te&&(Ge+=2),ce>=de&&(rt+=2)}}finally{He&&(He.style.display=$e)}}var xe={};function ie(ae,Y){for(var X=Y.length;--X>=0;){var Q=Y[X];xe.hasOwnProperty(Q)?f.console&&console.warn("cannot override language handler %s",Q):xe[Q]=ae}}function se(ae,Y){return ae&&xe.hasOwnProperty(ae)||(ae=/^\s*]*(?:>|$)/],[A,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[y,/^(?:<[%?]|[%?]>)/],["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(q([[_,/^[\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)))/],[y,/^[=<>\/]+/],["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(q([],[[K,/^[\s\S]+/]]),["uq.val"]),ie(ye({keywords:E,hashComments:!0,cStyleComments:!0,types:v}),["c","cc","cpp","cxx","cyc","m"]),ie(ye({keywords:"null,true,false"}),["json"]),ie(ye({keywords:m,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:v}),["cs"]),ie(ye({keywords:g,cStyleComments:!0}),["java"]),ie(ye({keywords:c,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ie(ye({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ie(ye({keywords:d,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ie(ye({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ie(ye({keywords:p,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ie(ye({keywords:w,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ie(q([],[[i,/^[\s\S]+/]]),["regex"]);function re(ae){var Y=ae.langExtension;try{var X=W(ae.sourceNode,ae.pre),Q=X.sourceCode;ae.sourceCode=Q,ae.spans=X.spans,ae.basePos=0,se(Y,Q)(ae),Oe(ae)}catch(he){f.console&&console.log(he&&he.stack||he)}}function be(ae,Y,X){var Q=X||!1,he=Y||null,ce=document.createElement("div");ce.innerHTML="
    "+ae+"
    ",ce=ce.firstChild,Q&&le(ce,Q,!0);var Se={langExtension:he,numberLines:Q,sourceNode:ce,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return re(Se),ce.innerHTML}function Z(ae,Y){var X=Y||document.body,Q=X.ownerDocument||document;function he(De){return X.getElementsByTagName(De)}for(var ce=[he("pre"),he("code"),he("xmp")],Se=[],Ke=0;Ke=15&&(E=!1,a=!0);var i=l&&(o||E&&(v==null||v<12.11)),L=C||S&&f>=9;function A(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var b=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 x(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function y(e,t){return x(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 ne+(t-V);ne+=oe-V,ne+=D-ne%D,V=oe+1}}var J=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};J.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},J.prototype.set=function(e,t){this.f=t;var D=+new Date+e;(!this.id||D=t)return O+Math.min(ne,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&&Y(e)?!0:t.test(e):Y(e)}function Q(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var he=/[\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&&he.test(e)}function Se(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&&ne.to==t)&&(O(Math.max(ne.from,t),Math.min(ne.to,D),ne.level==1?"rtl":"ltr",V),U=!0)}U||O(t,D,"ltr")}var Ye=null;function Qe(e,t,D){var O;Ye=null;for(var U=0;Ut)return U;V.to==t&&(V.from!=V.to&&D=="before"?O=U:Ye=U),V.from==t&&(V.from!=V.to&&D!="before"?O=U:Ye=U)}return O!=null?O:Ye}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]/,ne=/[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 et=me.length,Ze=[],ot=0;ot-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 Te(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 ge(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function _e(e){de(e),ge(e)}function Ue(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 at=function(){if(S&&f<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}(),ut;function mt(e){if(ut==null){var t=_("span","\u200B");y(e,_("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(ut=t.offsetWidth<=1&&t.offsetHeight>2&&!(S&&f<8))}var D=ut?_("span","\u200B"):_("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return D.setAttribute("cm-text",""),D}var ct;function _t(e){if(ct!=null)return ct;var t=y(e,document.createTextNode("A\u062EA")),D=j(t,0,1).getBoundingClientRect(),O=j(t,1,2).getBoundingClientRect();return x(e),!D||D.left==D.right?!1:ct=O.right-D.right<3}var At=` 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),ne=V.indexOf("\r");ne!=-1?(D.push(V.slice(0,ne)),t+=ne+1):(D.push(V),t=U+1)}return D}:function(e){return e.split(/\r\n?|\n/)},Et=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},Qt=function(){var e=_("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),qt=null;function Jt(e){if(qt!=null)return qt;var t=y(e,_("span","x")),D=t.getBoundingClientRect(),O=j(t,0,1).getBoundingClientRect();return qt=Math.abs(D.left-O.left)>1}var mr={},Pt={};function cr(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),mr[e]=t}function ir(e,t){Pt[e]=t}function Ht(e){if(typeof e=="string"&&Pt.hasOwnProperty(e))e=Pt[e];else if(e&&typeof e.name=="string"&&Pt.hasOwnProperty(e.name)){var t=Pt[e.name];typeof t=="string"&&(t={name:t}),e=Ee(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ht("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ht("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function $t(e,t){t=Ht(t);var D=mr[t.name];if(!D)return $t(e,"text/plain");var O=D(e,t);if(Kr.hasOwnProperty(t.name)){var U=Kr[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 ne in t.modeProps)O[ne]=t.modeProps[ne];return O}var Kr={};function En(e,t){var D=Kr.hasOwnProperty(e)?Kr[e]:Kr[e]={};W(t,D)}function Nr(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 Wn(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 gt(e,t,D){return e.startState?e.startState(t,D):!0}var Ct=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};Ct.prototype.eol=function(){return this.pos>=this.string.length},Ct.prototype.sol=function(){return this.pos==this.lineStart},Ct.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ct.prototype.next=function(){if(this.post},Ct.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ct.prototype.skipToEnd=function(){this.pos=this.string.length},Ct.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ct.prototype.backUp=function(e){this.pos-=e},Ct.prototype.column=function(){return this.lastColumnPos0?null:(V&&t!==!1&&(this.pos+=V[0].length),V)}},Ct.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ct.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ct.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ct.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function dt(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?st(D,dt(e,D).text.length):kr(t,dt(e,t.line).text.length)}function kr(e,t){var D=e.ch;return D==null||D>t?st(e.line,t):D<0?st(e.line,0):e}function Ur(e,t){for(var D=[],O=0;Othis.maxLookAhead&&(this.maxLookAhead=e),t},sr.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}},sr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},sr.fromSaved=function(e,t,D){return t instanceof Dr?new sr(e,Nr(e.mode,t.state),D,t.lookAhead):new sr(e,Nr(e.mode,t),D)},sr.prototype.save=function(e){var t=e!==!1?Nr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Dr(t,this.maxLookAhead):t};function wn(e,t,D,O){var U=[e.state.modeGen],V={};tr(e,t.text,e.doc.mode,D,function(me,Ie){return U.push(me,Ie)},V,O);for(var ne=D.state,oe=function(me){D.baseTokens=U;var Ie=e.state.overlays[me],je=1,et=0;D.state=!0,tr(e,t.text,Ie.mode,D,function(Ze,ot){for(var lt=je;etZe&&U.splice(je,1,Ze,U[je+1],vt),je+=2,et=Math.min(Ze,vt)}if(!ot)return;if(Ie.opaque)U.splice(lt,je-lt,Ze,"overlay "+ot),je=lt+2;else for(;lte.options.maxHighlightLength&&Nr(e.doc.mode,O.state),V=wn(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 nt(e,t,D){var O=e.doc,U=e.display;if(!O.mode.startState)return new sr(O,!0,t);var V=lr(e,t,D),ne=V>O.first&&dt(O,V-1).stateAfter,oe=ne?sr.fromSaved(O,ne,V):new sr(O,gt(O.mode),V);return O.iter(V,t,function(ue){wt(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 dr=function(e,t,D){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=D};function en(e,t,D,O){var U=e.doc,V=U.mode,ne;t=St(U,t);var oe=dt(U,t.line),ue=nt(e,t.line,D),me=new Ct(oe.text,e.options.tabSize,ue),Ie;for(O&&(Ie=[]);(O||me.pose.options.maxHighlightLength?(oe=!1,ne&&wt(e,t,O,Ie.pos),Ie.pos=t.length,je=null):je=fr(er(D,Ie,O.state,et),V),et){var Ze=et[0].name;Ze&&(je="m-"+(je?Ze+" "+je:Ze))}if(!oe||me!=je){for(;uene;--oe){if(oe<=V.first)return V.first;var ue=dt(V,oe-1),me=ue.stateAfter;if(me&&(!D||oe+(me instanceof Dr?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 Rr(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontierD;O--){var U=dt(e,O).stateAfter;if(U&&(!(U instanceof Dr)||O+U.lookAhead=t:V.to>t);(O||(O=[])).push(new zr(ne,V.from,ue?null:V.to))}}return O}function Pa(e,t,D){var O;if(e)for(var U=0;U=t:V.to>t);if(oe||V.from==t&&ne.type=="bookmark"&&(!D||V.marker.insertLeft)){var ue=V.from==null||(ne.inclusiveLeft?V.from<=t:V.from0&&oe)for(var kt=0;kt0)continue;var Ie=[ue,1],je=Ot(me.from,oe.from),et=Ot(me.to,oe.to);(je<0||!ne.inclusiveLeft&&!je)&&Ie.push({from:me.from,to:oe.from}),(et>0||!ne.inclusiveRight&&!et)&&Ie.push({from:oe.to,to:me.to}),U.splice.apply(U,Ie),ue+=Ie.length-3}return U}function Jr(e){var t=e.markedSpans;if(!t)return;for(var D=0;Dt)&&(!O||Mn(O,V.marker)<0)&&(O=V.marker)}return O}function Oa(e,t,D,O,U){var V=dt(e,t),ne=Ut&&V.markedSpans;if(ne)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 ra(e){for(var t;t=ya(e);)e=t.find(-1,!0).line;return e}function Wa(e){for(var t;t=ia(e);)e=t.find(1,!0).line;return e}function Ft(e){for(var t,D;t=ia(e);)e=t.find(1,!0).line,(D||(D=[])).push(e);return D}function Kt(e,t){var D=dt(e,t),O=ra(D);return D==O?t:Rt(O)}function Gt(e,t){if(t>e.lastLine())return t;var D=dt(e,t),O;if(!gr(e,D))return t;for(;O=ia(D);)D=O.find(1,!0).line;return Rt(D)+1}function gr(e,t){var D=Ut&&t.markedSpans;if(D)for(var O=void 0,U=0;Ut.maxLineLength&&(t.maxLineLength=U,t.maxLine=O)})}var rn=function(e,t,D){this.text=e,ta(this,t),this.height=D?D(this):1};rn.prototype.lineNo=function(){return Rt(this)},Te(rn);function xr(e,t,D,O){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Jr(e),ta(e,D);var U=O?O(e):1;U!=e.height&&jt(e,U)}function fn(e){e.parent=null,Jr(e)}var fa={},hn={};function oa(e,t){if(!e||/^\s*$/.test(e))return null;var D=t.addModeClass?hn:fa;return D[e]||(D[e]=e.replace(/\S+/g,"cm-$&"))}function sa(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,ne=void 0;O.pos=0,O.addToken=hi,_t(e.display.measure)&&(ne=qe(V,e.doc.direction))&&(O.addToken=Ci(O.addToken,ne)),O.map=[];var oe=t!=e.display.externalMeasured&&Rt(V);ai(V,O,Lt(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(mt(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 ba(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,ne){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&&f<9&&(me=!0),e.pos+=t.length;else{Ie=document.createDocumentFragment();for(var je=0;;){ue.lastIndex=je;var et=ue.exec(t),Ze=et?et.index-je:t.length-je;if(Ze){var ot=document.createTextNode(oe.slice(je,je+Ze));S&&f<9?Ie.appendChild(_("span",[ot])):Ie.appendChild(ot),e.map.push(e.pos,e.pos+Ze,ot),e.col+=Ze,e.pos+=Ze}if(!et)break;je+=Ze+1;var lt=void 0;if(et[0]==" "){var vt=e.cm.options.tabSize,bt=vt-e.col%vt;lt=Ie.appendChild(_("span",se(bt),"cm-tab")),lt.setAttribute("role","presentation"),lt.setAttribute("cm-text"," "),e.col+=bt}else et[0]=="\r"||et[0]==` `?(lt=Ie.appendChild(_("span",et[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),lt.setAttribute("cm-text",et[0]),e.col+=1):(lt=e.cm.options.specialCharPlaceholder(et[0]),lt.setAttribute("cm-text",et[0]),S&&f<9?Ie.appendChild(_("span",[lt])):Ie.appendChild(lt),e.col+=1);e.map.push(e.pos,e.pos+1,lt),e.pos++}}if(e.trailingSpace=oe.charCodeAt(t.length-1)==32,D||O||U||me||V||ne){var Dt=D||"";O&&(Dt+=O),U&&(Dt+=U);var xt=_("span",[Ie],Dt,V);if(ne)for(var kt in ne)ne.hasOwnProperty(kt)&&kt!="style"&&kt!="class"&&xt.setAttribute(kt,ne[kt]);return e.content.appendChild(xt)}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);et++);if(je.to>=Ie)return e(D,O,U,V,ne,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 ne=1;neue||Tr.collapsed&&Wt.to==ue&&Wt.from==ue)){if(Wt.to!=null&&Wt.to!=ue&&Ze>Wt.to&&(Ze=Wt.to,lt=""),Tr.className&&(ot+=" "+Tr.className),Tr.css&&(et=(et?et+";":"")+Tr.css),Tr.startStyle&&Wt.from==ue&&(vt+=" "+Tr.startStyle),Tr.endStyle&&Wt.to==Ze&&(kt||(kt=[])).push(Tr.endStyle,Wt.to),Tr.title&&((Dt||(Dt={})).title=Tr.title),Tr.attributes)for(var xn in Tr.attributes)(Dt||(Dt={}))[xn]=Tr.attributes[xn];Tr.collapsed&&(!bt||Mn(bt.marker,Tr)<0)&&(bt=Wt)}else Wt.from>ue&&Ze>Wt.from&&(Ze=Wt.from)}if(kt)for(var Zn=0;Zn=oe)break;for(var _a=Math.min(oe,Ze);;){if(Ie){var wa=ue+Ie.length;if(!bt){var Kn=wa>_a?Ie.slice(0,_a-ue):Ie;t.addToken(t,Kn,je?je+ot:ot,vt,ue+Kn.length==Ze?lt:"",et,Dt)}if(wa>=_a){Ie=Ie.slice(_a-ue),ue=_a;break}ue=wa,vt=""}Ie=U.slice(V,V=D[me++]),je=oa(D[me++],t.cm.options)}}}function pi(e,t,D){this.line=t,this.rest=Ft(t),this.size=this.rest?Rt(re(this.rest))-D+1:1,this.node=this.text=null,this.hidden=gr(e,t)}function Aa(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 ve(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 Pe(e,t){t=ra(t);var D=Rt(t),O=e.display.externalMeasured=new pi(e.doc,t,D);O.lineN=D;var U=O.built=sa(e,O);return O.text=U.pre,y(e.display.lineMeasure,U.pre),O}function Ne(e,t,D,O){return Je(e,Be(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&&(ne="right")),U!=null){if(O=e[me+2],oe==ue&&D==(O.insertLeft?"left":"right")&&(ne=D),D=="left"&&U==0)for(;me&&e[me-2]==e[me-3]&&e[me-1].insertLeft;)O=e[(me-=3)+2],ne="left";if(D=="right"&&U==ue-oe)for(;me=0&&!((D=e[U]).left!=D.right);U--);return D}function yt(e,t,D,O){var U=pt(t.map,D,O),V=U.node,ne=U.start,oe=U.end,ue=U.collapse,me;if(V.nodeType==3){for(var Ie=0;Ie<4;Ie++){for(;ne&&ce(t.line.text.charAt(U.coverStart+ne));)--ne;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&&f<9&&!ne&&(!me||!me.left&&!me.right)){var et=V.parentNode.getClientRects()[0];et?me={left:et.left,right:et.left+Gn(e.display),top:et.top,bottom:et.bottom}:me=it}for(var Ze=me.top-t.rect.top,ot=me.bottom-t.rect.top,lt=(Ze+ot)/2,vt=t.view.measure.heights,bt=0;bt=O.text.length?(ue=O.text.length,me="before"):ue<=0&&(ue=0,me="after"),!oe)return ne(me=="before"?ue-1:ue,me=="before");function Ie(ot,lt,vt){var bt=oe[lt],Dt=bt.level==1;return ne(vt?ot-1:ot,Dt!=vt)}var je=Qe(oe,ue,me),et=Ye,Ze=Ie(ue,je,me=="before");return et!=null&&(Ze.other=Ie(ue,et,me!="before")),Ze}function Vt(e,t){var D=0;t=St(e.doc,t),e.options.lineWrapping||(D=Gn(e.display)*t.ch);var O=dt(e.doc,t.line),U=Xr(O)+Ua(e.display);return{left:D,right:D,top:U,bottom:U+O.height}}function Bt(e,t,D,O,U){var V=st(e,t,D);return V.xRel=U,O&&(V.outside=O),V}function Lr(e,t,D){var O=e.doc;if(D+=e.display.viewOffset,D<0)return Bt(O.first,0,null,-1,-1);var U=Ar(O,D),V=O.first+O.size-1;if(U>V)return Bt(O.first+O.size-1,dt(O,V).text.length,null,1,1);t<0&&(t=0);for(var ne=dt(O,U);;){var oe=Cn(e,ne,U,t,D),ue=Ba(ne,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;ne=dt(O,U=me.line)}}function Wr(e,t,D,O){O-=pr(t);var U=t.text.length,V=Ke(function(ne){return Je(e,D,ne-1).bottom<=O},U,0);return U=Ke(function(ne){return Je(e,D,ne).top>O},V,U),{begin:V,end:U}}function It(e,t,D,O){D||(D=Be(e,t));var U=Br(e,t,Je(e,D,O),"line").top;return Wr(e,t,D,U)}function Hr(e,t,D,O){return e.bottom<=D?!1:e.top>D?!0:(O?e.left:e.right)>t}function Cn(e,t,D,O,U){U-=Xr(t);var V=Be(e,t),ne=pr(t),oe=0,ue=t.text.length,me=!0,Ie=qe(t,e.doc.direction);if(Ie){var je=(e.options.lineWrapping?ln:Yr)(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 et=null,Ze=null,ot=Ke(function(Yt){var Wt=Je(e,V,Yt);return Wt.top+=ne,Wt.bottom+=ne,Hr(Wt,O,U,!1)?(Wt.top<=U&&Wt.left<=O&&(et=Yt,Ze=Wt),!0):!1},oe,ue),lt,vt,bt=!1;if(Ze){var Dt=O-Ze.left=kt.bottom?1:0}return ot=Se(t.text,ot,1),Bt(D,ot,vt,bt,O-lt)}function Yr(e,t,D,O,U,V,ne){var oe=Ke(function(je){var et=U[je],Ze=et.level!=1;return Hr(Or(e,st(D,Ze?et.to:et.from,Ze?"before":"after"),"line",t,O),V,ne,!0)},0,U.length-1),ue=U[oe];if(oe>0){var me=ue.level!=1,Ie=Or(e,st(D,me?ue.from:ue.to,me?"after":"before"),"line",t,O);Hr(Ie,V,ne,!0)&&Ie.top>ne&&(ue=U[oe-1])}return ue}function ln(e,t,D,O,U,V,ne){var oe=Wr(e,t,O,ne),ue=oe.begin,me=oe.end;/\s/.test(t.text.charAt(me-1))&&me--;for(var Ie=null,je=null,et=0;et=me||Ze.to<=ue)continue;var ot=Ze.level!=1,lt=Je(e,O,ot?Math.min(me,Ze.to)-1:Math.max(ue,Ze.from)).right,vt=ltvt)&&(Ie=Ze,je=vt)}return Ie||(Ie=U[U.length-1]),Ie.fromme&&(Ie={from:Ie.from,to:me,level:Ie.level}),Ie}var nn;function Pn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(nn==null){nn=_("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)nn.appendChild(document.createTextNode("x")),nn.appendChild(_("br"));nn.appendChild(document.createTextNode("x"))}y(e.measure,nn);var D=nn.offsetHeight/50;return D>3&&(e.cachedTextHeight=D),x(e.measure),D||1}function Gn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=_("span","xxxxxxxxxx"),D=_("pre",[t],"CodeMirror-line-like");y(e.measure,D);var O=t.getBoundingClientRect(),U=(O.right-O.left)/10;return U>2&&(e.cachedCharWidth=U),U||10}function On(e){for(var t=e.display,D={},O={},U=t.gutters.clientLeft,V=t.gutters.firstChild,ne=0;V;V=V.nextSibling,++ne){var oe=e.display.gutterSpecs[ne].className;D[oe]=V.offsetLeft+V.clientLeft+U,O[oe]=V.clientWidth}return{fixedPos:la(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:D,gutterWidth:O,wrapperWidth:t.wrapper.clientWidth}}function la(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Da(e){var t=Pn(e.display),D=e.options.lineWrapping,O=D&&Math.max(5,e.display.scroller.clientWidth/Gn(e.display)-3);return function(U){if(gr(e.doc,U))return 0;var V=0;if(U.widgets)for(var ne=0;ne0&&(me=dt(e.doc,ue.line).text).length==ue.ch){var Ie=F(me,me.length,e.options.tabSize)-me.length;ue=st(ue.line,Math.max(0,Math.round((V-Fe(e.display).left)/Gn(e.display))-Ie))}return ue}function bn(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)Ut&&Kt(e.doc,t)U.viewFrom?_n(e):(U.viewFrom+=O,U.viewTo+=O);else if(t<=U.viewFrom&&D>=U.viewTo)_n(e);else if(t<=U.viewFrom){var V=Ra(e,D,D+O,1);V?(U.view=U.view.slice(V.index),U.viewFrom=V.lineN,U.viewTo+=O):_n(e)}else if(D>=U.viewTo){var ne=Ra(e,t,t,-1);ne?(U.view=U.view.slice(0,ne.index),U.viewTo=ne.lineN):_n(e)}else{var oe=Ra(e,t,t,-1),ue=Ra(e,D,D+O,1);oe&&ue?(U.view=U.view.slice(0,oe.index).concat(Aa(e,oe.lineN,ue.lineN)).concat(U.view.slice(ue.index)),U.viewTo+=O):_n(e)}var me=U.externalMeasured;me&&(D=U.lineN&&t=O.viewTo)return;var V=O.view[bn(e,t)];if(V.node==null)return;var ne=V.changes||(V.changes=[]);ee(ne,D)==-1&&ne.push(D)}function _n(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ra(e,t,D,O){var U=bn(e,t),V,ne=e.display.view;if(!Ut||D==e.doc.first+e.doc.size)return{index:U,lineN:D};for(var oe=e.display.viewFrom,ue=0;ue0){if(U==ne.length-1)return null;V=oe+ne[U].size-t,U++}else V=oe-t;t+=V,D+=V}for(;Kt(e.doc,D)!=D;){if(U==(O<0?0:ne.length-1))return null;D+=O*ne[U-(O<0?1:0)].size,U+=O}return{index:U,lineN:D}}function Ya(e,t,D){var O=e.display,U=O.view;U.length==0||t>=O.viewTo||D<=O.viewFrom?(O.view=Aa(e,t,D),O.viewFrom=t):(O.viewFrom>t?O.view=Aa(e,t,O.viewFrom).concat(O.view):O.viewFromD&&(O.view=O.view.slice(0,bn(e,D)))),O.viewTo=D}function $a(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(),Qa(e))}function eo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,mi(e))},100)}function Qa(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()),Vn(e)}function mi(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(He(e,"blur",e,t),e.state.focused=!1,b(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Pi(e){for(var t=e.display,D=t.lineDiv.offsetTop,O=0;O.005||Ie<-.005)&&(jt(U.line,ne),to(U.line),U.rest))for(var je=0;jee.display.sizerWidth){var et=Math.ceil(oe/Gn(e.display));et>e.display.maxLineLength&&(e.display.maxLineLength=et,e.display.maxLine=U.line,e.display.maxLineChanged=!0)}}}function to(e){if(e.widgets)for(var t=0;t=ne&&(V=Ar(t,Xr(dt(t,ue))-e.wrapper.clientHeight),ne=ue)}return{from:V,to:Math.max(ne,V+1)}}function Vo(e,t){if($e(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+ze(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?st(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,D=t.sticky=="before"?st(t.line,t.ch+1,"before"):t);for(var V=0;V<5;V++){var ne=!1,oe=Or(e,t),ue=!D||D==t?oe:Or(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&&(ne=!0)),me.scrollLeft!=null&&(La(e,me.scrollLeft),Math.abs(e.doc.scrollLeft-je)>1&&(ne=!0)),!ne)break}return U}function _o(e,t){var D=ro(e,t);D.scrollTop!=null&&yi(e,D.scrollTop),D.scrollLeft!=null&&La(e,D.scrollLeft)}function ro(e,t){var D=e.display,O=Pn(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),ne={};t.bottom-t.top>V&&(t.bottom=t.top+V);var oe=e.doc.height+Re(D),ue=t.topoe-O;if(t.topU+V){var Ie=Math.min(t.top,(me?oe:t.bottom)-V);Ie!=U&&(ne.scrollTop=Ie)}var je=e.options.fixedGutter?0:D.gutters.offsetWidth,et=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:D.scroller.scrollLeft-je,Ze=ke(e)-D.gutters.offsetWidth,ot=t.right-t.left>Ze;return ot&&(t.right=t.left+Ze),t.left<10?ne.scrollLeft=0:t.leftZe+et-3&&(ne.scrollLeft=t.right+(ot?0:10)-Ze),ne}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=Vt(e,t.from),O=Vt(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 La(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,Ir(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+Re(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+ze(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:D}}var Za=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&&f<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Za.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}},Za.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Za.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Za.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 J,this.disableVert=new J},Za.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)},Za.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&&Pi(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:Za,null:Ai};function Ui(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&b(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"?La(e,t):yi(e,t)},e),e.display.scrollbars.addClass&&K(e.display.wrapper,e.display.scrollbars.addClass)}var io=0;function qa(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&&Fr(t,function(D){for(var O=0;O=D.viewTo)||D.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ma(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&&Pi(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+ze(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,D.sizer.offsetLeft+e.adjustWidthTo-ke(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=nt(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 ne=V.styles,oe=V.text.length>e.options.maxHighlightLength?Nr(t.mode,O.state):null,ue=wn(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=!ne||ne.length!=V.styles.length||me!=Ie&&(!me||!Ie||me.bgClass!=Ie.bgClass||me.textClass!=Ie.textClass),et=0;!je&&etD)return Di(e,e.options.workDelay),!0}),t.highlightFrontier=O.line,t.modeFrontier=Math.max(t.modeFrontier,O.line),U.length&&pa(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&&$a(e)==0)return!1;Yn(e)&&(_n(e),t.dims=On(e));var U=O.first+O.size,V=Math.max(t.visible.from-e.options.viewportMargin,O.first),ne=Math.min(U,t.visible.to+e.options.viewportMargin);D.viewFromne&&D.viewTo-ne<20&&(ne=Math.min(U,D.viewTo)),Ut&&(V=Kt(e.doc,V),ne=Gt(e.doc,ne));var oe=V!=D.viewFrom||ne!=D.viewTo||D.lastWrapHeight!=t.wrapperHeight||D.lastWrapWidth!=t.wrapperWidth;Ya(e,V,ne),D.viewOffset=Xr(dt(e.doc,D.viewFrom)),e.display.mover.style.top=D.viewOffset+"px";var ue=$a(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),x(D.cursorDiv),x(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==ke(e)){if(D&&D.top!=null&&(D={top:Math.min(e.doc.height+Re(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;Pi(e);var U=oi(e);an(e),si(e,U),qr(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 Ma(e,t);if(ui(e,D)){Pi(e),Fi(e,D);var O=oi(e);an(e),si(e,O),qr(e,O),D.finish()}}function Lo(e,t,D){var O=e.display,U=e.options.lineNumbers,V=O.lineDiv,ne=V.firstChild;function oe(ot){var lt=ot.nextSibling;return a&&l&&e.display.currentWheelTarget==ot?ot.style.display="none":ot.parentNode.removeChild(ot),lt}for(var ue=O.view,me=O.viewFrom,Ie=0;Ie-1&&(Ze=!1),Na(e,je,me,D)),Ze&&(x(je.lineNumber),je.lineNumber.appendChild(document.createTextNode(Sr(e.options,me)))),ne=je.node.nextSibling}me+=je.size}for(;ne;)ne=oe(ne)}function Bi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function qr(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+ze(e)+"px"}function Ir(e){var t=e.display,D=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var O=la(t)-t.scroller.scrollLeft+e.doc.scrollLeft,U=t.gutters.offsetWidth,V=O+"px",ne=0;nene.clientWidth,ue=ne.scrollHeight>ne.clientHeight;if(!(O&&oe||U&&ue))return;if(U&&l&&a){e:for(var me=t.target,Ie=V.view;me!=ne;me=me.parentNode)for(var je=0;je=0&&Ot(e,O.to())<=0)return D}return-1};var Qr=function(e,t){this.anchor=e,this.head=t};Qr.prototype.from=function(){return gn(this.anchor,this.head)},Qr.prototype.to=function(){return ft(this.anchor,this.head)},Qr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ka(e,t,D){var O=e&&e.options.selectionsMayTouch,U=t[D];t.sort(function(et,Ze){return Ot(et.from(),Ze.from())}),D=ee(t,U);for(var V=1;V0:ue>=0){var me=gn(oe.from(),ne.from()),Ie=ft(oe.to(),ne.to()),je=oe.empty()?ne.from()==ne.head:oe.from()==oe.head;V<=D&&--D,t.splice(--V,2,new Qr(je?Ie:me,je?me:Ie))}}return new ga(t,D)}function za(e,t){return new ga([new Qr(e,t||e)],0)}function Ga(e){return e.text?st(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),st(D,O)}function Hi(e,t){for(var D=[],O=0;O1&&e.remove(oe.line+1,ot-1),e.insert(oe.line+1,bt)}vr(e,"change",e,t)}function Ei(e,t,D){function O(U,V,ne){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,ne,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)=="*"))&&(ne=ml(U,U.lastOp==O)))oe=re(ne.changes),Ot(t.from,t.to)==0&&Ot(t.from,oe.to)==0?oe.to=Ga(t):ne.changes.push(rs(e,t));else{var ue=re(U.done);for((!ue||!ue.ranges)&&Io(e.sel,U.done),ne={changes:[rs(e,t)],generation:U.generation},U.done.push(ne);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(ne){ne.markedSpans&&((U||(U=t["spans_"+e.id]={}))[V]=ne.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 Qr(U,t)}else return new Qr(D||t,t)}function No(e,t,D,O,U){U==null&&(U=e.cm&&(e.cm.display.shift||e.extend)),ua(e,new ga([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){--ne;continue}else break;if(!ue.atomic)continue;if(D){var je=ue.find(O<0?1:-1),et=void 0;if((O<0?Ie:me)&&(je=Ds(e,je,-O,je&&je.line==t.line?V:null)),je&&je.line==t.line&&(et=Ot(je,D))&&(O<0?et<0:et>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,ne=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 ne||(e.cantEdit=!0,st(e.first,0))}function Ds(e,t,D,O){return D<0&&t.ch==0?t.line>e.first?St(e,st(t.line-1)):null:D>0&&t.ch==(O||dt(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,ea(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,ea(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,ne=e.sel,oe=t=="undo"?U.done:U.undone,ue=t=="undo"?U.undone:U.done,me=0;me=0;--Ze){var ot=et(Ze);if(ot)return ot.v}}function ks(e,t){if(t==0)return;if(e.first+=t,e.sel=new ga(be(e.sel.ranges,function(U){return new Qr(st(U.anchor.line+t,U.anchor.ch),st(U.head.line+t,U.head.ch))}),e.sel.primIndex),e.cm){un(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:st(V,dt(e,V).text.length),text:[t.text[0]],origin:t.origin}),t.removed=or(e,t.from,t.to),D||(D=Hi(e,t)),e.cm?El(e.cm,t,O):ts(e,t,O),jo(e,D,pe),e.cantEdit&&Uo(e,st(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,t,D){var O=e.doc,U=e.display,V=t.from,ne=t.to,oe=!1,ue=V.line;e.options.lineWrapping||(ue=Rt(ra(dt(O,V.line))),O.iter(ue,ne.line+1,function(Ze){if(Ze==U.maxLine)return oe=!0,!0})),O.sel.contains(t.from,t.to)>-1&&Me(e),ts(O,t,D,Da(e)),e.options.lineWrapping||(O.iter(ue,V.line+t.text.length,function(Ze){var ot=Vr(Ze);ot>U.maxLineLength&&(U.maxLine=Ze,U.maxLineLength=ot,U.maxLineChanged=!0,oe=!1)}),oe&&(e.curOp.updateMaxLine=!0)),Rr(O,V.line),Di(e,400);var me=t.text.length-(ne.line-V.line)-1;t.full?un(e):V.line==ne.line&&t.text.length==1&&!gs(e.doc,t)?An(e,V.line,"text"):un(e,V.line,ne.line+1,me);var Ie=De(e,"changes"),je=De(e,"change");if(je||Ie){var et={from:V,to:ne,text:t.text,removed:t.removed,origin:t.origin};je&&vr(e,"change",e,et),Ie&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(et)}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 Ps(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 ne=U.lines.length%25+25,oe=ne;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&&un(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&&vr(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||ne==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(Oa(e,t.line,t,D,V)||t.line!=D.line&&Oa(e,D.line,t,D,V))throw new Error("Inserting collapsed marker partially overlapping an existing one");Cr()}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&&ra(je)==ue.display.maxLine&&(me=!0),V.collapsed&&oe!=t.line&&jt(je,0),Va(je,new zr(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){gr(e,je)&&jt(je,0)}),V.clearOnEnter&&Ce(V,"beforeCursorEnter",function(){return V.clear()}),V.readOnly&&(rr(),(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)un(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++)An(ue,Ie,"text");V.atomic&&Os(ue.doc),vr(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:Fn(function(){Fo(this,"undo")}),redo:Fn(function(){Fo(this,"redo")}),undoSelection:Fn(function(){Fo(this,"undo",!0)}),redoSelection:Fn(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=St(this,e),t=St(this,t);var O=[],U=e.line;return this.iter(e.line,t.line+1,function(V){var ne=V.markedSpans;if(ne)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}),St(this,st(D,t))},indexFromPos:function(e){e=St(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 et=0;et=0;oe--)Xi(e.doc,"",O[oe].from,O[oe].to,"+delete");gi(e)})}function is(e,t,D){var O=Se(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 st(t.line,O,D<0?"after":"before")}function ss(e,t,D,O,U){if(e){t.doc.direction=="rtl"&&(U=-U);var V=qe(D,t.doc.direction);if(V){var ne=U<0?re(V):V[0],oe=U<0==(ne.level==1),ue=oe?"after":"before",me;if(ne.level>0||t.doc.direction=="rtl"){var Ie=Be(t,D);me=U<0?D.text.length-1:0;var je=Je(t,Ie,me).top;me=Ke(function(et){return Je(t,Ie,et).top==je},U<0==(ne.level==1)?ne.from:ne.to-1,me),ue=="before"&&(me=is(D,me,1))}else me=U<0?ne.to:ne.from;return new st(O,me,ue)}}return new st(O,U<0?D.text.length:0,U<0?"before":"after")}function Il(e,t,D,O){var U=qe(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=Qe(U,D.ch,D.sticky),ne=U[V];if(e.doc.direction=="ltr"&&ne.level%2==0&&(O>0?ne.to>D.ch:ne.from=ne.from&&et>=Ie.begin)){var Ze=je?"before":"after";return new st(D.line,et,Ze)}}var ot=function(bt,Dt,xt){for(var kt=function(xn,Zn){return Zn?new st(D.line,oe(xn,1),"before"):new st(D.line,xn,"after")};bt>=0&&bt0==(Yt.level!=1),Tr=Wt?xt.begin:oe(xt.end,-1);if(Yt.from<=Tr&&Tr0?Ie.end:oe(Ie.begin,-1);return vt!=null&&!(O>0&&vt==t.text.length)&&(lt=ot(O>0?0:U.length-1,O,me(vt)),lt)?lt:null}var xo={selectAll:Rs,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),pe)},killLine:function(e){return $i(e,function(t){if(t.empty()){var D=dt(e.doc,t.head.line).text.length;return t.head.ch==D&&t.head.line0)U=new st(U.line,U.ch+1),e.replaceRange(V.charAt(U.ch-1)+V.charAt(U.ch-2),st(U.line,U.ch-2),U,"+transpose");else if(U.line>e.doc.first){var ne=dt(e.doc,U.line-1).text;ne&&(U=new st(U.line,1),e.replaceRange(V.charAt(0)+e.doc.lineSeparator()+ne.charAt(ne.length-1),st(U.line-1,ne.length-1),U,"+transpose"))}}D.push(new Qr(U,U))}e.setSelections(D)})},newlineAndIndent:function(e){return pa(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($e(t,e)||D.activeTouch&&D.input.supportsTouch())return;if(D.input.ensurePolled(),D.shift=e.shiftKey,Hn(D,e)){a||(D.scroller.draggable=!1,setTimeout(function(){return D.scroller.draggable=!0},100));return}if(cs(t,e))return;var O=Xn(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):Ue(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(ne){if(typeof ne=="string"&&(ne=xo[ne]),!ne)return!1;var oe=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),oe=ne(e,D)!=ye}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,ne;e.options.dragDrop&&at&&!e.isReadOnly()&&D=="single"&&(ne=V.contains(t))>-1&&(Ot((ne=V.ranges[ne]).from(),t)<0||t.xRel>0)&&(Ot(ne.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,ne=Un(e,function(me){a&&(U.scroller.draggable=!1),e.state.draggingText=!1,tt(U.wrapper.ownerDocument,"mouseup",ne),tt(U.wrapper.ownerDocument,"mousemove",oe),tt(U.scroller,"dragstart",ue),tt(U.scroller,"drop",ne),V||(de(me),O.addNew||No(e.doc,D,null,null,O.extend),a&&!g||S&&f==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=ne,ne.copy=!O.moveOnDrag,U.scroller.dragDrop&&U.scroller.dragDrop(),Ce(U.wrapper.ownerDocument,"mouseup",ne),Ce(U.wrapper.ownerDocument,"mousemove",oe),Ce(U.scroller,"dragstart",ue),Ce(U.scroller,"drop",ne),eo(e),setTimeout(function(){return U.input.focus()},20)}function rl(e,t,D){if(D=="char")return new Qr(t,t);if(D=="word")return e.findWordAt(t);if(D=="line")return new Qr(st(t.line,0),St(e.doc,st(t.line+1,0)));var O=D(e,t);return new Qr(O.from,O.to)}function Vl(e,t,D,O){var U=e.display,V=e.doc;de(t);var ne,oe,ue=V.sel,me=ue.ranges;if(O.addNew&&!O.extend?(oe=V.sel.contains(D),oe>-1?ne=me[oe]:ne=new Qr(D,D)):(ne=V.sel.primary(),oe=V.sel.primIndex),O.unit=="rectangle")O.addNew||(ne=new Qr(D,D)),D=Xn(e,t,!0,!0),oe=-1;else{var Ie=rl(e,D,O.unit);O.extend?ne=ns(ne,Ie.anchor,Ie.head,O.extend):ne=Ie}O.addNew?oe==-1?(oe=me.length,ua(V,ka(e,me.concat([ne]),oe),{scroll:!1,origin:"*mouse"})):me.length>1&&me[oe].empty()&&O.unit=="char"&&!O.extend?(ua(V,ka(e,me.slice(0,oe).concat(me.slice(oe+1)),0),{scroll:!1,origin:"*mouse"}),ue=V.sel):as(V,oe,ne,le):(oe=0,ua(V,new ga([ne],0),le),ue=V.sel);var je=D;function et(xt){if(Ot(je,xt)==0)return;if(je=xt,O.unit=="rectangle"){for(var kt=[],Yt=e.options.tabSize,Wt=F(dt(V,D.line).text,D.ch,Yt),Tr=F(dt(V,xt.line).text,xt.ch,Yt),xn=Math.min(Wt,Tr),Zn=Math.max(Wt,Tr),Rn=Math.min(D.line,xt.line),_a=Math.min(e.lastLine(),Math.max(D.line,xt.line));Rn<=_a;Rn++){var wa=dt(V,Rn).text,Kn=xe(wa,xn,Yt);xn==Zn?kt.push(new Qr(st(Rn,Kn),st(Rn,Kn))):wa.length>Kn&&kt.push(new Qr(st(Rn,Kn),st(Rn,xe(wa,Zn,Yt))))}kt.length||kt.push(new Qr(D,D)),ua(V,ka(e,ue.ranges.slice(0,oe).concat(kt),oe),{origin:"*mouse",scroll:!1}),e.scrollIntoView(xt)}else{var Ta=ne,aa=rl(e,xt,O.unit),Jn=Ta.anchor,zn;Ot(aa.anchor,Jn)>0?(zn=aa.head,Jn=gn(Ta.from(),aa.anchor)):(zn=aa.anchor,Jn=ft(Ta.to(),aa.head));var In=ue.ranges.slice(0);In[oe]=Yl(e,new Qr(St(V,Jn),zn)),ua(V,ka(e,In,oe),le)}}var Ze=U.wrapper.getBoundingClientRect(),ot=0;function lt(xt){var kt=++ot,Yt=Xn(e,xt,!0,O.unit=="rectangle");if(!Yt)return;if(Ot(Yt,je)!=0){e.curOp.focus=G(),et(Yt);var Wt=Ii(U,V);(Yt.line>=Wt.to||Yt.lineZe.bottom?20:0;Tr&&setTimeout(Un(e,function(){if(ot!=kt)return;U.scroller.scrollTop+=Tr,lt(xt)}),50)}}function vt(xt){e.state.selectingText=!1,ot=Infinity,xt&&(de(xt),U.input.focus()),tt(U.wrapper.ownerDocument,"mousemove",bt),tt(U.wrapper.ownerDocument,"mouseup",Dt),V.history.lastSelOrigin=null}var bt=Un(e,function(xt){xt.buttons===0||!Xe(xt)?vt(xt):lt(xt)}),Dt=Un(e,vt);e.state.selectingText=Dt,Ce(U.wrapper.ownerDocument,"mousemove",bt),Ce(U.wrapper.ownerDocument,"mouseup",Dt)}function Yl(e,t){var D=t.anchor,O=t.head,U=dt(e.doc,D.line);if(Ot(D,O)==0&&D.sticky==O.sticky)return t;var V=qe(U);if(!V)return t;var ne=Qe(V,D.ch,D.sticky),oe=V[ne];if(oe.from!=D.ch&&oe.to!=D.ch)return t;var ue=ne+(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=Qe(V,O.ch,O.sticky),je=Ie-ne||(O.ch-D.ch)*(oe.level==1?-1:1);Ie==ue-1||Ie==ue?me=je<0:me=je>0}var et=V[ue+(me?-1:0)],Ze=me==(et.level==1),ot=Ze?et.from:et.to,lt=Ze?"after":"before";return D.ch==ot&&D.sticky==lt?t:new Qr(new st(D.line,ot,lt),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(et){return!1}if(U>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;O&&de(t);var ne=e.display,oe=ne.lineDiv.getBoundingClientRect();if(V>oe.bottom||!De(e,D))return we(t);V-=oe.top-ne.viewOffset;for(var ue=0;ue=U){var Ie=Ar(e.doc,V),je=e.display.gutterSpecs[ue];return He(e,D,e,Ie,je.className,t),we(t)}}}function cs(e,t){return nl(e,t,"gutterClick",!0)}function al(e,t){if(Hn(e.display,t)||$l(e,t))return;if($e(e,t,"contextmenu"))return;L||e.display.input.onContextMenu(t)}function $l(e,t){return De(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-"),hr(e)}var Ji={toString:function(){return"CodeMirror.Init"}},ol={},Ko={};function Jl(e){var t=e.optionHandlers;function D(O,U,V,ne){e.defaults[O]=U,V&&(t[O]=ne?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),hr(O),un(O)},!0),D("lineSeparator",null,function(O,U){if(O.doc.lineSep=U,!U)return;var V=[],ne=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(st(ne,Ie))}ne++});for(var oe=V.length-1;oe>=0;oe--)Xi(O.doc,U,V[oe],st(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",ba,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 ne=Wo(U),oe=V!=Ji&&Wo(V);oe&&oe.detach&&oe.detach(O,ne),ne.attach&&ne.attach(O,oe||null)}),D("extraKeys",null),D("configureMouse",null),D("lineWrapping",!1,Zl,!0),D("gutters",[],function(O,U){O.display.gutterSpecs=ma(U,O.options.lineNumbers),Ka(O)},!0),D("fixedGutter",!0,function(O,U){O.display.gutters.style.left=U?la(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=ma(O.options.gutters,U),Ka(O)},!0),D("firstLineNumber",1,Ka,!0),D("lineNumberFormatter",function(O){return O},Ka,!0),D("showCursorWhenSelecting",!1,an,!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,an,!0),D("singleCursorHeightPerLine",!0,an,!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):(b(e.display.wrapper,"CodeMirror-wrap"),yn(e)),ha(e),un(e),hr(e),setTimeout(function(){return si(e)},100)}function Dn(e,t){var D=this;if(!(this instanceof Dn))return new Dn(e,t);this.options=t=t?W(t):{},W(ol,t,!1);var O=t.value;typeof O=="string"?O=new Ea(O,t.mode,null,t.lineSeparator,t.direction):t.mode&&(O.modeOption=t.mode),this.doc=O;var U=new Dn.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 J,keySeq:null,specialChars:null},t.autofocus&&!n&&V.input.focus(),S&&f<11&&setTimeout(function(){return D.display.input.reset(!0)},20),ql(this),Rl(),qa(this),this.curOp.forceUpdate=!0,vs(this,O),t.autofocus&&!n||this.hasFocus()?setTimeout(function(){D.hasFocus()&&!D.state.focused&&Qa(D)},20):mi(this);for(var ne in Ko)Ko.hasOwnProperty(ne)&&Ko[ne](this,t[ne],Ji);Yn(this),t.finishInit&&t.finishInit(this);for(var oe=0;oe20*20}Ce(t.scroller,"touchstart",function(ue){if(!$e(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&&!Hn(t,ue)&&me.left!=null&&!me.moved&&new Date-me.start<300){var Ie=e.coordsChar(t.activeTouch,"page"),je;!me.prev||ne(me,me.prev)?je=new Qr(Ie,Ie):!me.prev.prev||ne(me,me.prev.prev)?je=e.findWordAt(Ie):je=new Qr(st(Ie.line,0),St(e.doc,st(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),La(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){$e(e,ue)||_e(ue)},over:function(ue){$e(e,ue)||(Dl(e,ue),_e(ue))},start:function(ue){return Al(e,ue)},drop:Un(e,Ol),leave:function(ue){$e(e,ue)||Ws(e)}};var oe=t.input.getField();Ce(oe,"keyup",function(ue){return Zs.call(e,ue)}),Ce(oe,"keydown",Un(e,Qs)),Ce(oe,"keypress",Un(e,el)),Ce(oe,"focus",function(ue){return Qa(e,ue)}),Ce(oe,"blur",function(ue){return mi(e,ue)})}var ds=[];Dn.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=nt(e,t).state:D="prev");var ne=e.options.tabSize,oe=dt(U,t),ue=F(oe.text,null,ne);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==ye||Ie>150)){if(!O)return;D="prev"}D=="prev"?t>U.first?Ie=F(dt(U,t-1).text,null,ne):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="",et=0;if(e.options.indentWithTabs)for(var Ze=Math.floor(Ie/ne);Ze;--Ze)et+=ne,je+=" ";if(etne,ue=At(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;et--){var Ze=O.ranges[et],ot=Ze.from(),lt=Ze.to();Ze.empty()&&(D&&D>0?ot=st(ot.line,ot.ch-D):e.state.overwrite&&!oe?lt=st(lt.line,Math.min(dt(V,lt.line).text.length,lt.ch+re(ue).length)):oe&&Xa&&Xa.lineWise&&Xa.text.join(` `)==ue.join(` `)&&(ot=lt=st(ot.line,0)));var vt={from:ot,to:lt,text:me?me[et%me.length]:ue,origin:U||(oe?"paste":e.state.cutIncoming>ne?"cut":"+input")};Gi(e.doc,vt),vr(e,"inputRead",e,vt)}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&&pa(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),ne=!1;if(V.electricChars){for(var oe=0;oe-1){ne=So(e,U.head.line,"smart");break}}else V.electricInput&&(V.electricInput.test(dt(e.doc,U.head.line).text.slice(0,U.head.ch))&&(ne=So(e,U.head.line,"smart")));ne&&vr(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,ne==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,ne,new Qr(ue,et[ne].to()),pe)}}}),getTokenAt:function(O,U){return en(this,O,U)},getLineTokens:function(O,U){return en(this,st(O),U,!0)},getTokenTypeAt:function(O){O=St(this.doc,O);var U=Lt(this,dt(this.doc,O.line)),V=0,ne=(U.length-1)/2,oe=O.ch,ue;if(oe==0)ue=U[2];else for(;;){var me=V+ne>>1;if((me?U[me*2-1]:0)>=oe)ne=me;else if(U[me*2+1]ue&&(O=ue,ne=!0),oe=dt(this.doc,O)}else oe=O;return Br(this,oe,{top:0,left:0},U||"page",V||ne).top+(ne?this.doc.height-Xr(oe):0)},defaultTextHeight:function(){return Pn(this.display)},defaultCharWidth:function(){return Gn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(O,U,V,ne,oe){var ue=this.display;O=Or(this,St(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),ne=="over")me=O.top;else if(ne=="above"||ne=="near"){var je=Math.max(ue.wrapper.clientHeight,this.doc.height),et=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(ne=="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>et&&(Ie=et-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:na(Qs),triggerOnKeyPress:na(el),triggerOnKeyUp:Zs,triggerOnMouseDown:na(tl),execCommand:function(O){if(xo.hasOwnProperty(O))return xo[O].call(null,this)},triggerElectric:na(function(O){ll(this,O)}),findPosH:function(O,U,V,ne){var oe=1;U<0&&(oe=-1,U=-U);for(var ue=St(this.doc,O),me=0;me0&&Ie(V.charAt(ne-1));)--ne;for(;oe.5||this.options.lineWrapping)&&ha(this),He(this,"refresh",this)}),swapDoc:na(function(O){var U=this.doc;return U.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,O),hr(this),this.display.input.reset(),vi(this,O.scrollLeft,O.scrollTop),this.curOp.forceScroll=!0,vr(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}},Te(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,ne){e.registerHelper(O,U,ne),D[O]._global.push({pred:V,val:ne})}}function hs(e,t,D,O,U){var V=t,ne=D,oe=dt(e,t.line),ue=U&&e.direction=="rtl"?-D:D;function me(){var Dt=t.line+ue;return Dt=e.first+e.size?!1:(t=new st(Dt,t.ch,t.sticky),oe=dt(e,Dt))}function Ie(Dt){var xt;if(O=="codepoint"){var kt=oe.text.charCodeAt(t.ch+(O>0?0:-1));isNaN(kt)?xt=null:xt=new st(t.line,Math.max(0,Math.min(oe.text.length,t.ch+D*(kt>=55296&&kt<56320?2:1))),-D)}else U?xt=Il(e.cm,oe,t,D):xt=os(oe,t,D);if(xt==null)if(!Dt&&me())t=ss(U,e.cm,oe,t.line,ue);else return!1;else t=xt;return!0}if(O=="char"||O=="codepoint")Ie();else if(O=="column")Ie(!0);else if(O=="word"||O=="group")for(var je=null,et=O=="group",Ze=e.cm&&e.cm.getHelper(t,"wordChars"),ot=!0;!(D<0&&!Ie(!ot));ot=!1){var lt=oe.text.charAt(t.ch)||` `,vt=X(lt,Ze)?"w":et&<==` `?"n":!et||/\s/.test(lt)?null:"p";if(et&&!ot&&!vt&&(vt="s"),je&&je!=vt){D<0&&(D=1,Ie(),t.sticky="after");break}if(vt&&(je=vt),D>0&&!Ie(!ot))break}var bt=Uo(e,t,V,ne,!0);return jr(V,bt)&&(bt.hitSide=!0),bt}function fl(e,t,D,O){var U=e.doc,V=t.left,ne;if(O=="page"){var oe=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(oe-.5*Pn(e.display),3);ne=(D>0?t.bottom:t.top)+D*ue}else O=="line"&&(ne=D>0?t.bottom+3:t.top-3);for(var me;!(me=Lr(e,V,ne),!me.outside);){if(D<0?ne<=0:ne>=U.height){me.hitSide=!0;break}ne+=D*5}return me}var cn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new J,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};cn.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)||$e(O,oe)||sl(oe,O))return;f<=11&&setTimeout(Un(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 ne(oe){if(!V(oe)||$e(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,pe),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 et=document.activeElement;z(je),setTimeout(function(){O.display.lineSpace.removeChild(Ie),et.focus(),et==U&&D.showPrimarySelection()},50)}Ce(U,"copy",ne),Ce(U,"cut",ne)},cn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},cn.prototype.prepareSelection=function(){var e=Fa(this.cm,!1);return e.focus=document.activeElement==this.div,e},cn.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},cn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},cn.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=st(O.line-1,dt(e.doc,O.line-1).length)),U.ch==dt(e.doc,U.line).text.length&&U.linet.viewTo-1)return!1;var V,ne,oe;O.line==t.viewFrom||(V=bn(e,O.line))==0?(ne=Rt(t.view[0].line),oe=t.view[0].node):(ne=Rt(t.view[V].line),oe=t.view[V-1].node.nextSibling);var ue=bn(e,U.line),me,Ie;if(ue==t.view.length-1?(me=t.viewTo-1,Ie=t.lineDiv.lastChild):(me=Rt(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,ne,me)),et=or(e.doc,st(ne,0),st(me,dt(e.doc,me).text.length));je.length>1&&et.length>1;)if(re(je)==re(et))je.pop(),et.pop(),me--;else if(je[0]==et[0])je.shift(),et.shift(),ne++;else break;for(var Ze=0,ot=0,lt=je[0],vt=et[0],bt=Math.min(lt.length,vt.length);ZeO.ch&&Dt.charCodeAt(Dt.length-ot-1)==xt.charCodeAt(xt.length-ot-1);)Ze--,ot++;je[je.length-1]=Dt.slice(0,Dt.length-ot).replace(/^\u200b+/,""),je[0]=je[0].slice(Ze).replace(/\u200b+$/,"");var Yt=st(ne,Ze),Wt=st(me,et.length?re(et).length-ot:0);if(je.length>1||je[0]||Ot(Yt,Wt))return Xi(e.doc,je,Yt,Wt,"+input"),!0},cn.prototype.ensurePolled=function(){this.forceCompositionEnd()},cn.prototype.reset=function(){this.forceCompositionEnd()},cn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},cn.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)},cn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&pa(this.cm,function(){return un(e.cm)})},cn.prototype.setUneditable=function(e){e.contentEditable="false"},cn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Un(this.cm,fs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},cn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},cn.prototype.onContextMenu=function(){},cn.prototype.resetPosition=function(){},cn.prototype.needsContentAttribute=!0;function hl(e,t){var D=We(e,t.line);if(!D||D.hidden)return null;var O=dt(e.doc,t.line),U=ve(D,O,t.line),V=qe(O,e.doc.direction),ne="left";if(V){var oe=Qe(V,t.ch);ne=oe%2?"right":"left"}var ue=pt(U.map,t.ch,ne);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="",ne=!1,oe=e.doc.lineSeparator(),ue=!1;function me(Ze){return function(ot){return ot.id==Ze}}function Ie(){ne&&(V+=oe,ue&&(V+=oe),ne=ue=!1)}function je(Ze){Ze&&(Ie(),V+=Ze)}function et(Ze){if(Ze.nodeType==1){var ot=Ze.getAttribute("cm-text");if(ot){je(ot);return}var lt=Ze.getAttribute("cm-marker"),vt;if(lt){var bt=e.findMarks(st(O,0),st(U+1,0),me(+lt));bt.length&&(vt=bt[0].find(0))&&je(or(e.doc,vt.from,vt.to).join(oe));return}if(Ze.getAttribute("contenteditable")=="false")return;var Dt=/^(pre|div|p|li|table|br)$/i.test(Ze.nodeName);if(!/^br$/i.test(Ze.nodeName)&&Ze.textContent.length==0)return;Dt&&Ie();for(var xt=0;xt=9&&t.hasSelection&&(t.hasSelection=null),D.poll()}),Ce(U,"paste",function(ne){if($e(O,ne)||sl(ne,O))return;O.state.pasteIncoming=+new Date,D.fastPoll()});function V(ne){if($e(O,ne))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}),ne.type=="cut"?O.setSelections(oe.ranges,null,pe):(D.prevInput="",U.value=oe.text.join(` `),z(U))}else return;ne.type=="cut"&&(O.state.cutIncoming=+new Date)}Ce(U,"cut",V),Ce(U,"copy",V),Ce(e.scroller,"paste",function(ne){if(Hn(e,ne)||$e(O,ne))return;if(!U.dispatchEvent){O.state.pasteIncoming=+new Date,D.focus();return}var oe=new Event("paste");oe.clipboardData=ne.clipboardData,U.dispatchEvent(oe)}),Ce(e.lineSpace,"selectstart",function(ne){Hn(e,ne)||de(ne)}),Ce(U,"compositionstart",function(){var ne=O.getCursor("from");D.composing&&D.composing.range.clear(),D.composing={start:ne,range:O.markText(ne,O.getCursor("to"),{className:"CodeMirror-composing"})}}),Ce(U,"compositionend",function(){D.composing&&(D.poll(),D.composing.range.clear(),D.composing=null)})},Bn.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},Bn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Bn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,D=e.doc,O=Fa(e);if(e.options.moveInputWithCursor){var U=Or(e,D.sel.primary().head,"div"),V=t.wrapper.getBoundingClientRect(),ne=t.lineDiv.getBoundingClientRect();O.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,U.top+ne.top-V.top)),O.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,U.left+ne.left-V.left))}return O},Bn.prototype.showSelection=function(e){var t=this.cm,D=t.display;y(D.cursorDiv,e.cursors),y(D.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Bn.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&&f>=9&&(this.hasSelection=D)}else e||(this.prevInput=this.textarea.value="",S&&f>=9&&(this.hasSelection=null))},Bn.prototype.getField=function(){return this.textarea},Bn.prototype.supportsTouch=function(){return!1},Bn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||G()!=this.textarea))try{this.textarea.focus()}catch(e){}},Bn.prototype.blur=function(){this.textarea.blur()},Bn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Bn.prototype.receivedFocus=function(){this.slowPoll()},Bn.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()})},Bn.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)},Bn.prototype.poll=function(){var e=this,t=this.cm,D=this.textarea,O=this.prevInput;if(this.contextMenuPending||!t.state.focused||Et(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&&f>=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 ne=0,oe=Math.min(O.length,U.length);ne1e3||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},Bn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Bn.prototype.onKeyPress=function(){S&&f>=9&&(this.hasSelection=null),this.fastPoll()},Bn.prototype.onContextMenu=function(e){var t=this,D=t.cm,O=D.display,U=t.textarea;t.contextMenuPending&&t.contextMenuPending();var V=Xn(D,e),ne=O.scroller.scrollTop;if(!V||E)return;var oe=D.options.resetSelectionOnContextMenu;oe&&D.doc.sel.contains(V)==-1&&Un(D,ua)(D.doc,za(V),pe);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 et(){if(U.selectionStart!=null){var lt=D.somethingSelected(),vt="\u200B"+(lt?U.value:"");U.value="\u21DA",U.value=vt,t.prevInput=lt?"":"\u200B",U.selectionStart=1,U.selectionEnd=vt.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&&f<9&&O.scrollbars.setScrollTop(O.scroller.scrollTop=ne),U.selectionStart!=null){(!S||S&&f<9)&&et();var lt=0,vt=function(){O.selForContextMenu==D.doc.sel&&U.selectionStart==0&&U.selectionEnd>0&&t.prevInput=="\u200B"?Un(D,Rs)(D):lt++<10?O.detectingSelectAll=setTimeout(vt,500):(O.selForContextMenu=null,O.input.reset())};O.detectingSelectAll=setTimeout(vt,200)}}if(S&&f>=9&&et(),L){_e(e);var ot=function(){tt(window,"mouseup",ot),setTimeout(Ze,20)};Ce(window,"mouseup",ot)}else setTimeout(Ze,50)},Bn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Bn.prototype.setUneditable=function(){},Bn.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 ne=V.submit=function(){O(),V.submit=U,V.submit(),V.submit=ne}}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=Dn(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=Ea,e.splitLines=At,e.countColumn=F,e.findColumn=xe,e.isWordChar=Y,e.Pass=ye,e.signal=He,e.Line=rn,e.changeEnd=Ga,e.scrollbarModel=ao,e.Pos=st,e.cmpPos=Ot,e.modes=mr,e.mimeModes=Pt,e.resolveMode=Ht,e.getMode=$t,e.modeExtensions=Kr,e.extendMode=En,e.copyState=Nr,e.startState=gt,e.innerMode=Wn,e.commands=xo,e.keyMap=di,e.keyName=Xs,e.isModifierKey=zs,e.lookupKey=Yi,e.normalizeKeyMap=Pl,e.StringStream=Ct,e.SharedTextMarker=vo,e.TextMarker=wi,e.LineWidget=go,e.e_preventDefault=de,e.e_stopPropagation=ge,e.e_stop=_e,e.addClass=K,e.contains=M,e.rmClass=b,e.keyNames=Ti}Jl(Dn),eu(Dn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Xo in Ea.prototype)Ea.prototype.hasOwnProperty(Xo)&&ee(ou,Xo)<0&&(Dn.prototype[Xo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ea.prototype[Xo]));return Te(Ea),Dn.inputStyles={textarea:Bn,contenteditable:cn},Dn.defineMode=function(e){!Dn.defaults.mode&&e!="null"&&(Dn.defaults.mode=e),cr.apply(this,arguments)},Dn.defineMIME=ir,Dn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Dn.defineMIME("text/plain","null"),Dn.defineExtension=function(e,t){Dn.prototype[e]=t},Dn.defineDocExtension=function(e,t){Ea.prototype[e]=t},Dn.fromTextArea=au,iu(Dn),Dn.version="5.58.2",Dn})},WYAk:function(N,$,P){(function(k,u){N.exports=$=u(P("Ib8C"))})(this,function(k){(function(){var u=k,C=u.lib,R=C.Base,h=u.enc,s=h.Utf8,S=u.algo,f=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,E=r*4;o.sigBytes>E&&(o=a.finalize(o)),o.clamp();for(var g=this._oKey=o.clone(),m=this._iKey=o.clone(),w=g.words,p=m.words,d=0;d1&&arguments[1]!==void 0?arguments[1]:!1,Oe=pe.getAttribute("id")||pe.getAttribute("data-reactid")||pe.getAttribute("name");if(le&&G[Oe])return G[Oe];var xe=window.getComputedStyle(pe),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(te){return"".concat(te,":").concat(xe.getPropertyValue(te))}).join(";"),Z={sizingStyle:be,paddingSize:se,borderSize:re,boxSizing:ie};return le&&Oe&&(G[Oe]=Z),Z}function z(pe){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=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)),pe.getAttribute("wrap")?K.setAttribute("wrap",pe.getAttribute("wrap")):K.removeAttribute("wrap");var ie=H(pe,le),se=ie.paddingSize,re=ie.borderSize,be=ie.boxSizing,Z=ie.sizingStyle;K.setAttribute("style","".concat(Z,";").concat(j)),K.value=pe.value||pe.placeholder||"";var te=Number.MIN_SAFE_INTEGER,Ee=Number.MAX_SAFE_INTEGER,ae=K.scrollHeight,Y;if(be==="border-box"?ae+=re:be==="content-box"&&(ae-=se),Oe!==null||xe!==null){K.value=" ";var X=K.scrollHeight-se;Oe!==null&&(te=X*Oe,be==="border-box"&&(te=te+se+re),ae=Math.max(te,ae)),xe!==null&&(Ee=X*xe,be==="border-box"&&(Ee=Ee+se+re),Y=ae>Ee?"":"hidden",ae=Math.min(Ee,ae))}return{height:ae,minHeight:te,maxHeight:Ee,overflowY:Y,resize:"none"}}var B=P("Gytx"),W=P.n(B),F;(function(pe){pe[pe.NONE=0]="NONE",pe[pe.RESIZING=1]="RESIZING",pe[pe.RESIZED=2]="RESIZED"})(F||(F={}));var J=function(pe){Object(R.a)(Oe,pe);var le=Object(h.a)(Oe);function Oe(xe){var ie;return Object(u.a)(this,Oe),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,Z=be.autoSize,te=be.onResize;if(re!==F.NONE)return;typeof te=="function"&&te(se),Z&&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,Z=z(ie.textArea,!1,re,be);ie.setState({textareaStyles:Z,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,Z=se.autoSize,te=se.onResize,Ee=se.className,ae=se.disabled,Y=ie.state,X=Y.textareaStyles,Q=Y.resizeStatus,he=Object(y.a)(ie.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ce=I()(be,Ee,Object(f.a)({},"".concat(be,"-disabled"),ae));"value"in he&&(he.value=he.value||"");var Se=Object(S.a)(Object(S.a)(Object(S.a)({},ie.props.style),X),Q===F.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return s.createElement(x,{onResize:ie.handleResize,disabled:!(Z||te)},s.createElement("textarea",Object(k.a)({},he,{className:ce,style:Se,ref:ie.saveTextArea})))},ie.state={textareaStyles:{},resizeStatus:F.NONE},ie}return Object(C.a)(Oe,[{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()}}]),Oe}(s.Component),ee=J,q=function(pe){Object(R.a)(Oe,pe);var le=Object(h.a)(Oe);function Oe(xe){var ie;Object(u.a)(this,Oe),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,Z=be.onPressEnter,te=be.onKeyDown;re.keyCode===13&&Z&&Z(re),te&&te(re)};var se=typeof xe.value=="undefined"||xe.value===null?xe.defaultValue:xe.value;return ie.state={value:se},ie}return Object(C.a)(Oe,[{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(k.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}}]),Oe}(s.Component),ye=$.default=q},ZD9Y:function(N,$,P){"use strict";var k=P("BoS7"),u=P("Sdc0"),C=P("OaEy"),R=P("2fM7"),h=P("q1tI"),s=P.n(h),S=P("lOMy"),f=P.n(S),a=R.a.Option;$.a=function(o){var r=o.onFontSizeChange,E=o.cmFontSize,g=o.cmCodeMode,m=o.onCodeModeChange,w=o.onTabToSpace,p=o.className,d=p===void 0?"":p,n=o.tabToSpace,l=o.children;return s.a.createElement("div",{className:"tpi-code-setting ".concat(d)},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:E,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,$,P){"use strict";P.d($,"a",function(){return T});var k=P("k1fw"),u=P("miYZ"),C=P("tsqr"),R=P("rAM+"),h=P("tJVT"),s=P("PpiC"),S=P("q1tI"),f=P.n(S),a=P("bdgK");function o(v,i,L,A,b){var x=i.getWordUntilPosition(L),y={startLineNumber:L.lineNumber,endLineNumber:L.lineNumber,startColumn:x.startColumn,endColumn:x.endColumn},_=A.map(function(I){return{label:I,kind:v.languages.CompletionItemKind.Keyword,insertText:I,insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:y}});return b.map(function(I){_.push(Object(k.a)(Object(k.a)({},I),{},{range:y}))}),_}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(y,_){var I=o(v,y,_,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(y,_){var I=[{label:"print",kind:v.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(` `),insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet}],j=o(v,y,_,A,I);return{suggestions:j}}});var b=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];v.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(y,_){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,y,_,b,I);return{suggestions:j}}})},E="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",g=P("LvDl");function m(v){return/^\d+$/.test(v)?"".concat(v,"px"):v}function w(){}var p=!1,d={"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||at.target.offsetWidth>0)&&Ee.current.instance.layout()}}catch(ut){Ue.e(ut)}finally{Ue.f()}}),we.observe(te.current)),we}function Ge(){C.b.warn(decodeURIComponent(E))}var Ye=function(){var _e=Ee.current.instance;if(x!=null&&_e&&ce){var Ue=_e.getModel();Ue&&x!==Ue.getValue()&&(p=!0,Ue.setValue(x),_e.layout(),p=!1)}};Object(S.useEffect)(function(){ae.current&&clearTimeout(ae.current),ae.current=setTimeout(function(){Ye()},500)},[x,ce,Ee.current]);function Qe(){var we=Ee.current.instance;if(we){var _e=we.getSelection(),Ue=Ee.current.pastePos||{},Xe=new l.Range(Ue.startLineNumber||_e.endLineNumber,Ue.startColumn||_e.endColumn,Ue.endLineNumber||_e.endLineNumber,Ue.endColumn||_e.endColumn);setTimeout(function(){we.executeEdits("",[{range:Xe,text:""}])},300)}}function rt(we){(window.navigator.platform.match("Mac")?we.metaKey:we.ctrlKey)&&we.keyCode==83&&(we.preventDefault(),F())}var qe=function(){if(ee&&Ee.current.instance){var _e=Ee.current.instance.getContentHeight();de(_e0||Oe.target.offsetWidth>0)&&ee.layout()}}catch(xe){pe.e(xe)}finally{pe.f()}}),q.observe(M.current)),q}Object(S.useEffect)(function(){M.current&&P.e(26).then(P.t.bind(null,"M/lh",7)).then(function(ee){l=ee;var q=l.editor.createDiffEditor(M.current,Object(k.a)(Object(k.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(q);var ye=B(q);return function(){q.dispose();var pe=q.getModel();pe&&pe.dispose(),ye.unobserve(M.current)}})},[]),Object(S.useEffect)(function(){H&&H.setModel({original:l.editor.createModel(x,_),modified:l.editor.createModel(y,_)})},[x,y,_,H]);var W=m(L),F=m(b),J={width:W,height:F};return f.a.createElement("div",{className:"my-diff-editor",ref:M,style:J})}},ZpRC:function(N,$,P){"use strict";function k(r){return typeof r=="object"&&r!=null&&r.nodeType===1}function u(r,E){return(!E||r!=="hidden")&&r!=="visible"&&r!=="clip"}function C(r,E){if(r.clientHeightE||p>r&&d=E&&n>=g?p-r-m:d>E&&ng?d-E+w:0}var h=function(r,E){var g=window,m=E.scrollMode,w=E.block,p=E.inline,d=E.boundary,n=E.skipOverflowHiddenElements,l=typeof d=="function"?d:function(X){return X!==d};if(!k(r))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,T=[],v=r;k(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,b=window.scrollY||pageYOffset,x=r.getBoundingClientRect(),y=x.height,_=x.width,I=x.top,j=x.right,M=x.bottom,G=x.left,K=w==="start"||w==="nearest"?I:w==="end"?M:I+y/2,H=p==="center"?G+_/2:p==="end"?j:G,z=[],B=0;B=0&&G>=0&&M<=L&&j<=i&&I>=q&&M<=pe&&G>=le&&j<=ye)return z;var Oe=getComputedStyle(W),xe=parseInt(Oe.borderLeftWidth,10),ie=parseInt(Oe.borderTopWidth,10),se=parseInt(Oe.borderRightWidth,10),re=parseInt(Oe.borderBottomWidth,10),be=0,Z=0,te="offsetWidth"in W?W.offsetWidth-W.clientWidth-xe-se:0,Ee="offsetHeight"in W?W.offsetHeight-W.clientHeight-ie-re:0;if(c===W)be=w==="start"?K:w==="end"?K-L:w==="nearest"?R(b,b+L,L,ie,re,b+K,b+K+y,y):K-L/2,Z=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+b),Z=Math.max(0,Z+A);else{be=w==="start"?K-q-ie:w==="end"?K-pe+re+Ee:w==="nearest"?R(q,pe,J,ie,re+Ee,K,K+y,y):K-(q+J/2)+Ee/2,Z=p==="start"?H-le-xe:p==="center"?H-(le+ee/2)+te/2:p==="end"?H-ye+se+te:R(le,ye,ee,xe,se+te,H,H+_,_);var ae=W.scrollLeft,Y=W.scrollTop;K+=Y-(be=Math.max(0,Math.min(Y+be,W.scrollHeight-J+Ee))),H+=ae-(Z=Math.max(0,Math.min(ae+Z,W.scrollWidth-ee+te)))}z.push({el:W,top:be,left:Z})}return z};function s(r){return r===Object(r)&&Object.keys(r).length!==0}function S(r,E){E===void 0&&(E="auto");var g="scrollBehavior"in document.body.style;r.forEach(function(m){var w=m.el,p=m.top,d=m.left;w.scroll&&g?w.scroll({top:p,left:d,behavior:E}):(w.scrollTop=p,w.scrollLeft=d)})}function f(r){return r===!1?{block:"end",inline:"nearest"}:s(r)?r:{block:"start",inline:"nearest"}}function a(r,E){var g=!r.ownerDocument.documentElement.contains(r);if(s(E)&&typeof E.behavior=="function")return E.behavior(g?[]:h(r,E));if(g)return;var m=f(E);return S(h(r,m),m.behavior)}var o=$.a=a},Zss7:function(N,$,P){var k;(function(u){var C=/^\s+/,R=/\s+$/,h=0,s=u.round,S=u.min,f=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 Z=r(re);this._originalInput=re,this._r=Z.r,this._g=Z.g,this._b=Z.b,this._a=Z.a,this._roundA=s(100*this._a)/100,this._format=be.format||Z.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=Z.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,Z,te,Ee,ae,Y;return be=re.r/255,Z=re.g/255,te=re.b/255,be<=.03928?Ee=be/12.92:Ee=u.pow((be+.055)/1.055,2.4),Z<=.03928?ae=Z/12.92:ae=u.pow((Z+.055)/1.055,2.4),te<=.03928?Y=te/12.92:Y=u.pow((te+.055)/1.055,2.4),.2126*Ee+.7152*ae+.0722*Y},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),Z=s(re.s*100),te=s(re.v*100);return this._a==1?"hsv("+be+", "+Z+"%, "+te+"%)":"hsva("+be+", "+Z+"%, "+te+"%, "+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),Z=s(re.s*100),te=s(re.l*100);return this._a==1?"hsl("+be+", "+Z+"%, "+te+"%)":"hsla("+be+", "+Z+"%, "+te+"%, "+this._roundA+")"},toHex:function(re){return d(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[d(this._r,this._g,this._b,!0)]||!1},toFilter:function(re){var be="#"+l(this._r,this._g,this._b,this._a),Z=be,te=this._gradientType?"GradientType = 1, ":"";if(re){var Ee=o(re);Z="#"+l(Ee._r,Ee._g,Ee._b,Ee._a)}return"progid:DXImageTransform.Microsoft.gradient("+te+"startColorstr="+be+",endColorstr="+Z+")"},toString:function(re){var be=!!re;re=re||this._format;var Z=!1,te=this._a<1&&this._a>=0,Ee=!be&&te&&(re==="hex"||re==="hex6"||re==="hex3"||re==="hex4"||re==="hex8"||re==="name");return Ee?re==="name"&&this._a===0?this.toName():this.toRgbString():(re==="rgb"&&(Z=this.toRgbString()),re==="prgb"&&(Z=this.toPercentageRgbString()),(re==="hex"||re==="hex6")&&(Z=this.toHexString()),re==="hex3"&&(Z=this.toHexString(!0)),re==="hex4"&&(Z=this.toHex8String(!0)),re==="hex8"&&(Z=this.toHex8String()),re==="name"&&(Z=this.toName()),re==="hsl"&&(Z=this.toHslString()),re==="hsv"&&(Z=this.toHsvString()),Z||this.toHexString())},clone:function(){return o(this.toString())},_applyModification:function(re,be){var Z=re.apply(null,[this].concat([].slice.call(be)));return this._r=Z._r,this._g=Z._g,this._b=Z._b,this.setAlpha(Z._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(b,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(x,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(I,arguments)},triad:function(){return this._applyCombination(y,arguments)},tetrad:function(){return this._applyCombination(_,arguments)}},o.fromRatio=function(re,be){if(typeof re=="object"){var Z={};for(var te in re)re.hasOwnProperty(te)&&(te==="a"?Z[te]=re[te]:Z[te]=ye(re[te]));re=Z}return o(re,be)};function r(re){var be={r:0,g:0,b:0},Z=1,te=null,Ee=null,ae=null,Y=!1,X=!1;return typeof re=="string"&&(re=ie(re)),typeof re=="object"&&(xe(re.r)&&xe(re.g)&&xe(re.b)?(be=E(re.r,re.g,re.b),Y=!0,X=String(re.r).substr(-1)==="%"?"prgb":"rgb"):xe(re.h)&&xe(re.s)&&xe(re.v)?(te=ye(re.s),Ee=ye(re.v),be=p(re.h,te,Ee),Y=!0,X="hsv"):xe(re.h)&&xe(re.s)&&xe(re.l)&&(te=ye(re.s),ae=ye(re.l),be=m(re.h,te,ae),Y=!0,X="hsl"),re.hasOwnProperty("a")&&(Z=re.a)),Z=z(Z),{ok:Y,format:re.format||X,r:S(255,f(be.r,0)),g:S(255,f(be.g,0)),b:S(255,f(be.b,0)),a:Z}}function E(re,be,Z){return{r:B(re,255)*255,g:B(be,255)*255,b:B(Z,255)*255}}function g(re,be,Z){re=B(re,255),be=B(be,255),Z=B(Z,255);var te=f(re,be,Z),Ee=S(re,be,Z),ae,Y,X=(te+Ee)/2;if(te==Ee)ae=Y=0;else{var Q=te-Ee;Y=X>.5?Q/(2-te-Ee):Q/(te+Ee);switch(te){case re:ae=(be-Z)/Q+(be1&&(Se-=1),Se<1/6?he+(ce-he)*6*Se:Se<1/2?ce:Se<2/3?he+(ce-he)*(2/3-Se)*6:he}if(be===0)te=Ee=ae=Z;else{var X=Z<.5?Z*(1+be):Z+be-Z*be,Q=2*Z-X;te=Y(Q,X,re+1/3),Ee=Y(Q,X,re),ae=Y(Q,X,re-1/3)}return{r:te*255,g:Ee*255,b:ae*255}}function w(re,be,Z){re=B(re,255),be=B(be,255),Z=B(Z,255);var te=f(re,be,Z),Ee=S(re,be,Z),ae,Y,X=te,Q=te-Ee;if(Y=te===0?0:Q/te,te==Ee)ae=0;else{switch(te){case re:ae=(be-Z)/Q+(be>1)+720)%360;--be;)te.h=(te.h+Ee)%360,ae.push(o(te));return ae}function M(re,be){be=be||6;for(var Z=o(re).toHsv(),te=Z.h,Ee=Z.s,ae=Z.v,Y=[],X=1/be;be--;)Y.push(o({h:te,s:Ee,v:ae})),ae=(ae+X)%1;return Y}o.mix=function(re,be,Z){Z=Z===0?0:Z||50;var te=o(re).toRgb(),Ee=o(be).toRgb(),ae=Z/100,Y={r:(Ee.r-te.r)*ae+te.r,g:(Ee.g-te.g)*ae+te.g,b:(Ee.b-te.b)*ae+te.b,a:(Ee.a-te.a)*ae+te.a};return o(Y)},o.readability=function(re,be){var Z=o(re),te=o(be);return(u.max(Z.getLuminance(),te.getLuminance())+.05)/(u.min(Z.getLuminance(),te.getLuminance())+.05)},o.isReadable=function(re,be,Z){var te=o.readability(re,be),Ee,ae;ae=!1,Ee=se(Z);switch(Ee.level+Ee.size){case"AAsmall":case"AAAlarge":ae=te>=4.5;break;case"AAlarge":ae=te>=3;break;case"AAAsmall":ae=te>=7;break}return ae},o.mostReadable=function(re,be,Z){var te=null,Ee=0,ae,Y,X,Q;Z=Z||{},Y=Z.includeFallbackColors,X=Z.level,Q=Z.size;for(var he=0;heEe&&(Ee=ae,te=o(be[he]));return o.isReadable(re,te,{level:X,size:Q})||!Y?te:(Z.includeFallbackColors=!1,o.mostReadable(re,["#fff","#000"],Z))};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 Z in re)re.hasOwnProperty(Z)&&(be[re[Z]]=Z);return be}function z(re){return re=parseFloat(re),(isNaN(re)||re<0||re>1)&&(re=1),re}function B(re,be){J(re)&&(re="100%");var Z=ee(re);return re=S(be,f(0,parseFloat(re))),Z&&(re=parseInt(re*be,10)/100),u.abs(re-be)<1e-6?1:re%be/parseFloat(be)}function W(re){return S(1,f(0,re))}function F(re){return parseInt(re,16)}function J(re){return typeof re=="string"&&re.indexOf(".")!=-1&&parseFloat(re)===1}function ee(re){return typeof re=="string"&&re.indexOf("%")!=-1}function q(re){return re.length==1?"0"+re:""+re}function ye(re){return re<=1&&(re=re*100+"%"),re}function pe(re){return u.round(parseFloat(re)*255).toString(16)}function le(re){return F(re)/255}var Oe=function(){var re="[-\\+]?\\d+%?",be="[-\\+]?\\d*\\.\\d+%?",Z="(?:"+be+")|(?:"+re+")",te="[\\s|\\(]+("+Z+")[,|\\s]+("+Z+")[,|\\s]+("+Z+")\\s*\\)?",Ee="[\\s|\\(]+("+Z+")[,|\\s]+("+Z+")[,|\\s]+("+Z+")[,|\\s]+("+Z+")\\s*\\)?";return{CSS_UNIT:new RegExp(Z),rgb:new RegExp("rgb"+te),rgba:new RegExp("rgba"+Ee),hsl:new RegExp("hsl"+te),hsla:new RegExp("hsla"+Ee),hsv:new RegExp("hsv"+te),hsva:new RegExp("hsva"+Ee),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!!Oe.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 Z;return(Z=Oe.rgb.exec(re))?{r:Z[1],g:Z[2],b:Z[3]}:(Z=Oe.rgba.exec(re))?{r:Z[1],g:Z[2],b:Z[3],a:Z[4]}:(Z=Oe.hsl.exec(re))?{h:Z[1],s:Z[2],l:Z[3]}:(Z=Oe.hsla.exec(re))?{h:Z[1],s:Z[2],l:Z[3],a:Z[4]}:(Z=Oe.hsv.exec(re))?{h:Z[1],s:Z[2],v:Z[3]}:(Z=Oe.hsva.exec(re))?{h:Z[1],s:Z[2],v:Z[3],a:Z[4]}:(Z=Oe.hex8.exec(re))?{r:F(Z[1]),g:F(Z[2]),b:F(Z[3]),a:le(Z[4]),format:be?"name":"hex8"}:(Z=Oe.hex6.exec(re))?{r:F(Z[1]),g:F(Z[2]),b:F(Z[3]),format:be?"name":"hex"}:(Z=Oe.hex4.exec(re))?{r:F(Z[1]+""+Z[1]),g:F(Z[2]+""+Z[2]),b:F(Z[3]+""+Z[3]),a:le(Z[4]+""+Z[4]),format:be?"name":"hex8"}:(Z=Oe.hex3.exec(re))?{r:F(Z[1]+""+Z[1]),g:F(Z[2]+""+Z[2]),b:F(Z[3]+""+Z[3]),format:be?"name":"hex"}:!1}function se(re){var be,Z;return re=re||{level:"AA",size:"small"},be=(re.level||"AA").toUpperCase(),Z=(re.size||"small").toLowerCase(),be!=="AA"&&be!=="AAA"&&(be="AA"),Z!=="small"&&Z!=="large"&&(Z="small"),{level:be,size:Z}}N.exports?N.exports=o:!(k=function(){return o}.call($,P,$,N),k!==void 0&&(N.exports=k))})(Math)},bCnd:function(N,$,P){"use strict";P.d($,"b",function(){return R}),P.d($,"a",function(){return h});var k=P("je13"),u=P.n(k),C=!1;function R(s,S){var f=u.a.get("__ec");f||(f={}),f[s]=S,u.a.set("__ec",f)}function h(s,S){var f=u.a.get("__ec");return f?f[s]===void 0?S:f[s]:S}},bQjk:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("OLod"))})(this,function(k){return function(u){var C=k,R=C.lib,h=R.CipherParams,s=C.enc,S=s.Hex,f=C.format,a=f.Hex={stringify:function(o){return o.ciphertext.toString(S)},parse:function(o){var r=S.parse(o);return h.create({ciphertext:r})}}}(),k.format.Hex})},bT9E:function(N,$,P){"use strict";P.d($,"a",function(){return u});var k=P("VTBJ");function u(C,R){var h=Object(k.a)({},C);return Array.isArray(R)&&R.forEach(function(s){delete h[s]}),h}},biw7:function(N,$,P){"use strict";var k=P("q1tI"),u=P.n(k),C=k.createContext(null);$.a=C},c5Ni:function(N,$,P){},cDPC:function(N,$,P){"use strict";var k=P("tJVT"),u=P("q1tI"),C=P.n(u),R=P("i3hx"),h=P.n(R);$.a=function(s){var S=s.defaultX,f=S===void 0?"40%":S,a=s.leftChild,o=s.rightChild,r=s.className,E=s.hideResize,g=E===void 0?!1:E,m=Object(u.useState)(f),w=Object(k.a)(m,2),p=w[0],d=w[1],n=Object(u.useRef)();function l(){n.current=!0}Object(u.useEffect)(function(){function v(L){n.current&&d(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"):f,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,$,P){(function(k,u){N.exports=$=u(P("Ib8C"))})(this,function(k){return function(u){var C=k,R=C.lib,h=R.WordArray,s=R.Hasher,S=C.algo,f=[];(function(){for(var m=0;m<64;m++)f[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 d=w+p,n=m[d];m[d]=(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],b=m[w+6],x=m[w+7],y=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,f[0]),F=o(F,z,B,W,T,12,f[1]),W=o(W,F,z,B,v,17,f[2]),B=o(B,W,F,z,i,22,f[3]),z=o(z,B,W,F,L,7,f[4]),F=o(F,z,B,W,A,12,f[5]),W=o(W,F,z,B,b,17,f[6]),B=o(B,W,F,z,x,22,f[7]),z=o(z,B,W,F,y,7,f[8]),F=o(F,z,B,W,_,12,f[9]),W=o(W,F,z,B,I,17,f[10]),B=o(B,W,F,z,j,22,f[11]),z=o(z,B,W,F,M,7,f[12]),F=o(F,z,B,W,G,12,f[13]),W=o(W,F,z,B,K,17,f[14]),B=o(B,W,F,z,H,22,f[15]),z=r(z,B,W,F,T,5,f[16]),F=r(F,z,B,W,b,9,f[17]),W=r(W,F,z,B,j,14,f[18]),B=r(B,W,F,z,c,20,f[19]),z=r(z,B,W,F,A,5,f[20]),F=r(F,z,B,W,I,9,f[21]),W=r(W,F,z,B,H,14,f[22]),B=r(B,W,F,z,L,20,f[23]),z=r(z,B,W,F,_,5,f[24]),F=r(F,z,B,W,K,9,f[25]),W=r(W,F,z,B,i,14,f[26]),B=r(B,W,F,z,y,20,f[27]),z=r(z,B,W,F,G,5,f[28]),F=r(F,z,B,W,v,9,f[29]),W=r(W,F,z,B,x,14,f[30]),B=r(B,W,F,z,M,20,f[31]),z=E(z,B,W,F,A,4,f[32]),F=E(F,z,B,W,y,11,f[33]),W=E(W,F,z,B,j,16,f[34]),B=E(B,W,F,z,K,23,f[35]),z=E(z,B,W,F,T,4,f[36]),F=E(F,z,B,W,L,11,f[37]),W=E(W,F,z,B,x,16,f[38]),B=E(B,W,F,z,I,23,f[39]),z=E(z,B,W,F,G,4,f[40]),F=E(F,z,B,W,c,11,f[41]),W=E(W,F,z,B,i,16,f[42]),B=E(B,W,F,z,b,23,f[43]),z=E(z,B,W,F,_,4,f[44]),F=E(F,z,B,W,M,11,f[45]),W=E(W,F,z,B,H,16,f[46]),B=E(B,W,F,z,v,23,f[47]),z=g(z,B,W,F,c,6,f[48]),F=g(F,z,B,W,x,10,f[49]),W=g(W,F,z,B,K,15,f[50]),B=g(B,W,F,z,A,21,f[51]),z=g(z,B,W,F,M,6,f[52]),F=g(F,z,B,W,i,10,f[53]),W=g(W,F,z,B,I,15,f[54]),B=g(B,W,F,z,T,21,f[55]),z=g(z,B,W,F,y,6,f[56]),F=g(F,z,B,W,H,10,f[57]),W=g(W,F,z,B,b,15,f[58]),B=g(B,W,F,z,G,21,f[59]),z=g(z,B,W,F,L,6,f[60]),F=g(F,z,B,W,j,10,f[61]),W=g(W,F,z,B,v,15,f[62]),B=g(B,W,F,z,_,21,f[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,d=m.sigBytes*8;w[d>>>5]|=128<<24-d%32;var n=u.floor(p/4294967296),l=p;w[(d+64>>>9<<4)+15]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,w[(d+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,d,n,l,c){var T=m+(w&p|~w&d)+n+c;return(T<>>32-l)+w}function r(m,w,p,d,n,l,c){var T=m+(w&d|p&~d)+n+c;return(T<>>32-l)+w}function E(m,w,p,d,n,l,c){var T=m+(w^p^d)+n+c;return(T<>>32-l)+w}function g(m,w,p,d,n,l,c){var T=m+(p^(w|~d))+n+c;return(T<>>32-l)+w}C.MD5=s._createHelper(a),C.HmacMD5=s._createHmacHelper(a)}(Math),k.MD5})},dejd:function(N,$,P){},dmUQ:function(N,$,P){"use strict";var k=P("Ff2n"),u=P("rePB"),C=P("1OyB"),R=P("vuIU"),h=P("Ji7U"),s=P("md7G"),S=P("foSv"),f=P("q1tI"),a=P.n(f),o=P("TSYQ"),r=P.n(o),E=P("4IlW");function g(y,_){var I=Object.keys(y);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(y);_&&(j=j.filter(function(M){return Object.getOwnPropertyDescriptor(y,M).enumerable})),I.push.apply(I,j)}return I}function m(y){for(var _=1;_1?ee-1:0),ye=1;ye1?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,J;B?J=W:J=M.toPrecisionAsStep(F),J==null&&(J="");var ee=M.formatWrapper(J);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===E.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),J;this.pressingUpOrDown?J=F:this.inputting?J=this.rawInput:J=this.toPrecisionAsStep(F),this.setState({value:F,inputValue:J})}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,J=typeof H=="number"?H.toFixed(K):"".concat(H),ee=H!==B||J!=="".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),J=F>B.max||FB.max?F=B.max:F=q),$e=(rt||rt===0)&&(isNaN(rt)||Number(rt)<=ye),Me=He||H||z,De=$e||H||z,Te=r()("".concat(K,"-handler"),"".concat(K,"-handler-up"),Object(u.a)({},"".concat(K,"-handler-up-disabled"),Me)),de=r()("".concat(K,"-handler"),"".concat(K,"-handler-down"),Object(u.a)({},"".concat(K,"-handler-down-disabled"),De)),ge=B?{onTouchStart:Me?d:this.up,onTouchEnd:this.stop}:{onMouseDown:Me?d:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},we=B?{onTouchStart:De?d:this.down,onTouchEnd:this.stop}:{onMouseDown:De?d:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return a.a.createElement("div",{className:Le,style:pe,title:le,onMouseEnter:Oe,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"},ge,{role:"button","aria-label":"Increase Value","aria-disabled":Me,className:Te}),F||a.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-up-inner"),onClick:n})),a.a.createElement("span",Object.assign({unselectable:"on"},we,{role:"button","aria-label":"Decrease Value","aria-disabled":De,className:de}),J||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":ye,"aria-valuemax":q,"aria-valuenow":rt,required:re,type:te,placeholder:Ee,onPaste:Ke,onClick:be,onMouseUp:this.onMouseUp,className:"".concat(K,"-input"),tabIndex:Z,autoComplete:W,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ve?this.onKeyDown:d,onKeyUp:Ve?this.onKeyUp:d,autoFocus:ce,maxLength:he,readOnly:z,disabled:H,max:q,min:ye,step:Q,name:Se,title:le,id:ae,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(tt),pattern:X,inputMode:Y,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:d,onKeyDown:d,onPressEnter:d,onFocus:d,onBlur:d,parser:l,required:!1,autoComplete:"off"};var b=A,x=$.a=b},e7zE:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("3y9D"),P("WYAk"))})(this,function(k){return function(){var u=k,C=u.lib,R=C.Base,h=C.WordArray,s=u.algo,S=s.SHA1,f=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 E=this.cfg,g=f.create(E.hasher,o),m=h.create(),w=h.create([1]),p=m.words,d=w.words,n=E.keySize,l=E.iterations;p.length=q&&F<0||B.scrollTop<=0&&F>0))||ee&&(!ie||ie&&(B.scrollLeft>=ye&&W<0||B.scrollLeft<=0&&W>0))?H(z,B.parentNode,W,F):!1};function A(H){var z=b();return function(){var W=Object(s.a)(H),F;if(z){var J=Object(s.a)(this).constructor;F=Reflect.construct(W,arguments,J)}else F=W.apply(this,arguments);return Object(h.a)(this,F)}}function b(){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 x={},y=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(J){if(J.touches.length>1)return;F.startPos={x:J.touches[0].clientX,y:J.touches[0].clientY}},F.removeMoveHandler=function(J){if(J.changedTouches.length>1)return;var ee=J.currentTarget,q=J.changedTouches[0].clientX-F.startPos.x,ye=J.changedTouches[0].clientY-F.startPos.y;(ee===F.maskDom||ee===F.handlerDom||ee===F.contentDom&&L(ee,J.target,q,ye))&&J.cancelable&&J.preventDefault()},F.transitionEnd=function(J){var ee=J.target;c(ee,n,F.transitionEnd),ee.style.transition=""},F.onKeyDown=function(J){if(J.keyCode===m.a.ESC){var ee=F.props.onClose;J.stopPropagation(),ee&&ee(J)}},F.onWrapperTransitionEnd=function(J){var ee=F.props,q=ee.open,ye=ee.afterVisibleChange;J.target===F.contentWrapper&&J.propertyName.match(/transform$/)&&(F.dom.style.transition="",!q&&F.getCurrentDrawerSome()&&(document.body.style.overflowX="",F.maskDom&&(F.maskDom.style.left="",F.maskDom.style.width="")),ye&&ye(!!q))},F.openLevelTransition=function(){var J=F.props,ee=J.open,q=J.width,ye=J.height,pe=F.getHorizontalBoolAndPlacementName(),le=pe.isHorizontal,Oe=pe.placementName,xe=F.contentDom?F.contentDom.getBoundingClientRect()[le?"width":"height"]:0,ie=(le?q:ye)||xe;F.setLevelAndScrolling(ee,Oe,ie)},F.setLevelTransform=function(J,ee,q,ye){var pe=F.props,le=pe.placement,Oe=pe.levelMove,xe=pe.duration,ie=pe.ease,se=pe.showMask;F.levelDom.forEach(function(re){re.style.transition="transform ".concat(xe," ").concat(ie),l(re,n,F.transitionEnd);var be=J?q:0;if(Oe){var Z=T(Oe,{target:re,open:J});be=J?Z[0]:Z[1]||0}var te=typeof be=="number"?"".concat(be,"px"):be,Ee=le==="left"||le==="top"?te:"-".concat(te);Ee=se&&le==="right"&&ye?"calc(".concat(Ee," + ").concat(ye,"px)"):Ee,re.style.transform=be?"".concat(ee,"(").concat(Ee,")"):""})},F.setLevelAndScrolling=function(J,ee,q){var ye=F.props.onChange;if(!i){var pe=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(g.a)(!0):0;F.setLevelTransform(J,ee,q,pe),F.toggleScrollingToDrawerAndBody(pe)}ye&&ye(J)},F.toggleScrollingToDrawerAndBody=function(J){var ee=F.props,q=ee.getOpenCount,ye=ee.getContainer,pe=ee.showMask,le=ee.open,Oe=ye&&ye(),xe=q&&q();if(Oe&&Oe.parentNode===document.body&&pe){var ie=["touchstart"],se=[document.body,F.maskDom,F.handlerDom,F.contentDom];le&&document.body.style.overflow!=="hidden"?(J&&F.addScrollingEffect(J),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="",J&&F.remScrollingEffect(J),se.forEach(function(re,be){if(!re)return;c(re,ie[be]||"touchmove",be?F.removeMoveHandler:F.removeStartHandler,F.passive)}))}},F.addScrollingEffect=function(J){var ee=F.props,q=ee.placement,ye=ee.duration,pe=ee.ease,le=ee.getOpenCount,Oe=ee.switchScrollingEffect,xe=le&&le();xe===1&&Oe();var ie="width ".concat(ye," ").concat(pe),se="transform ".concat(ye," ").concat(pe);F.dom.style.transition="none";switch(q){case"right":F.dom.style.transform="translateX(-".concat(J,"px)");break;case"top":case"bottom":F.dom.style.width="calc(100% - ".concat(J,"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(J){var ee=F.props,q=ee.placement,ye=ee.duration,pe=ee.ease,le=ee.getOpenCount,Oe=ee.switchScrollingEffect,xe=le&&le();xe||Oe(!0),d&&(document.body.style.overflowX="hidden"),F.dom.style.transition="none";var ie,se="width ".concat(ye," ").concat(pe),re="transform ".concat(ye," ").concat(pe);switch(q){case"left":{F.dom.style.width="100%",se="width 0s ".concat(pe," ").concat(ye);break}case"right":{F.dom.style.transform="translateX(".concat(J,"px)"),F.dom.style.width="100%",se="width 0s ".concat(pe," ").concat(ye),F.maskDom&&(F.maskDom.style.left="-".concat(J,"px"),F.maskDom.style.width="calc(100% + ".concat(J,"px)"));break}case"top":case"bottom":{F.dom.style.width="calc(100% + ".concat(J,"px)"),F.dom.style.height="100%",F.dom.style.transform="translateZ(0)",ie="height 0s ".concat(pe," ").concat(ye);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(x).some(function(J){return x[J]})},F.getLevelDom=function(J){var ee=J.level,q=J.getContainer;if(i)return;var ye=q&&q(),pe=ye?ye.parentNode:null;if(F.levelDom=[],ee==="all"){var le=pe?Array.prototype.slice.call(pe.children):[];le.forEach(function(Oe){Oe.nodeName!=="SCRIPT"&&Oe.nodeName!=="STYLE"&&Oe.nodeName!=="LINK"&&Oe!==ye&&F.levelDom.push(Oe)})}else ee&&w(ee).forEach(function(Oe){document.querySelectorAll(Oe).forEach(function(xe){F.levelDom.push(xe)})})},F.getHorizontalBoolAndPlacementName=function(){var J=F.props.placement,ee=J==="left"||J==="right",q="translate".concat(ee?"X":"Y");return{isHorizontal:ee,placementName:q}},F.state={_self:Object(o.a)(F)},F}return Object(C.a)(B,[{key:"componentDidMount",value:function(){var F=this;if(!i){var J=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return J=!0,null}}))}catch(le){}this.passive=J?{passive:!1}:!1}var ee=this.props,q=ee.open,ye=ee.getContainer,pe=ye&&ye();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),q&&(pe&&pe.parentNode===document.body&&(x[this.drawerId]=q),this.openLevelTransition(),this.forceUpdate(function(){F.domFocus()}))}},{key:"componentDidUpdate",value:function(F){var J=this.props,ee=J.open,q=J.getContainer,ye=q&&q();ee!==F.open&&(ee&&this.domFocus(),ye&&ye.parentNode===document.body&&(x[this.drawerId]=!!ee),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var F=this.props,J=F.getOpenCount,ee=F.open,q=F.switchScrollingEffect,ye=typeof J=="function"&&J();delete x[this.drawerId],ee&&(this.setLevelTransform(!1),document.body.style.touchAction=""),ye||(document.body.style.overflow="",q(!0))}},{key:"render",value:function(){var F,J=this,ee=this.props,q=ee.className,ye=ee.children,pe=ee.style,le=ee.width,Oe=ee.height,xe=ee.defaultOpen,ie=ee.open,se=ee.prefixCls,re=ee.placement,be=ee.level,Z=ee.levelMove,te=ee.ease,Ee=ee.duration,ae=ee.getContainer,Y=ee.handler,X=ee.onChange,Q=ee.afterVisibleChange,he=ee.showMask,ce=ee.maskClosable,Se=ee.maskStyle,Ke=ee.onClose,Ge=ee.onHandleClick,Ye=ee.keyboard,Qe=ee.getOpenCount,rt=ee.switchScrollingEffect,qe=Object(k.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"]),Le=this.dom?ie:!1,Ce=E()(se,(F={},Object(a.a)(F,"".concat(se,"-").concat(re),!0),Object(a.a)(F,"".concat(se,"-open"),Le),Object(a.a)(F,q||"",!!q),Object(a.a)(F,"no-mask",!he),F)),Ve=this.getHorizontalBoolAndPlacementName(),tt=Ve.placementName,He=re==="left"||re==="top"?"-100%":"100%",$e=Le?"":"".concat(tt,"(").concat(He,")"),Me=Y&&f.cloneElement(Y,{onClick:function(Te){Y.props.onClick&&Y.props.onClick(),Ge&&Ge(Te)},ref:function(Te){J.handlerDom=Te}});return f.createElement("div",Object.assign({},qe,{tabIndex:-1,className:Ce,style:pe,ref:function(Te){J.dom=Te},onKeyDown:Le&&Ye?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),he&&f.createElement("div",{className:"".concat(se,"-mask"),onClick:ce?Ke:void 0,style:Se,ref:function(Te){J.maskDom=Te}}),f.createElement("div",{className:"".concat(se,"-content-wrapper"),style:{transform:$e,msTransform:$e,width:v(le)?"".concat(le,"px"):le,height:v(Oe)?"".concat(Oe,"px"):Oe},ref:function(Te){J.contentWrapper=Te}},f.createElement("div",{className:"".concat(se,"-content"),ref:function(Te){J.contentDom=Te},onTouchStart:Le&&he?this.removeStartHandler:void 0,onTouchMove:Le&&he?this.removeMoveHandler:void 0},ye),Me))}}],[{key:"getDerivedStateFromProps",value:function(F,J){var ee=J.prevProps,q=J._self,ye={prevProps:F};if(ee!==void 0){var pe=F.placement,le=F.level;pe!==ee.placement&&(q.contentDom=null),le!==ee.level&&q.getLevelDom(F)}return ye}}]),B}(f.Component);y.defaultProps={switchScrollingEffect:function(){}};var _=y;function I(H){var z=j();return function(){var W=Object(s.a)(H),F;if(z){var J=Object(s.a)(this).constructor;F=Reflect.construct(W,arguments,J)}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 q=F.props,ye=q.onHandleClick,pe=q.open;if(ye&&ye(ee),typeof pe=="undefined"){var le=F.state.open;F.setState({open:!le})}},F.onClose=function(ee){var q=F.props,ye=q.onClose,pe=q.open;ye&&ye(ee),typeof pe=="undefined"&&F.setState({open:!1})};var J=typeof W.open!="undefined"?W.open:!!W.defaultOpen;return F.state={open:J},"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,J=this.props,ee=J.defaultOpen,q=J.getContainer,ye=J.wrapperClassName,pe=J.forceRender,le=J.handler,Oe=Object(k.a)(J,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),xe=this.state.open;if(!q)return f.createElement("div",{className:ye,ref:function(re){F.dom=re}},f.createElement(_,Object.assign({},Oe,{open:xe,handler:le,getContainer:function(){return F.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var ie=!!le||pe;return f.createElement(S.a,{visible:xe,forceRender:ie,getContainer:q,wrapperClassName:ye},function(se){var re=se.visible,be=se.afterClose,Z=Object(k.a)(se,["visible","afterClose"]);return f.createElement(_,Object.assign({},Oe,Z,{open:re!==void 0?re:xe,afterVisibleChange:be!==void 0?be:Oe.afterVisibleChange,handler:le,onClose:F.onClose,onHandleClick:F.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(F,J){var ee=J.prevProps,q={prevProps:F};return typeof ee!="undefined"&&F.open!==ee.open&&(q.open=F.open),q}}]),B}(f.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:f.createElement("div",{className:"drawer-handle"},f.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var G=M,K=$.a=G},fyJ8:function(N,$,P){"use strict";var k=P("rePB"),u=P("VTBJ"),C=P("Ff2n"),R=P("U8pU"),h=P("q1tI"),s=P.n(h),S=P("TSYQ"),f=P.n(S),a=P("c+Xe"),o=P("sR1s");function r(p){return p&&Object(R.a)(p)==="object"&&!Array.isArray(p)&&!h.isValidElement(p)}function E(p){return typeof p=="string"?!0:Object(a.c)(p)}function g(p,d){var n,l=p.prefixCls,c=p.className,T=p.record,v=p.index,i=p.dataIndex,L=p.render,A=p.children,b=p.component,x=b===void 0?"td":b,y=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,J=p.align,ee=p.rowType,q=p.isSticky,ye="".concat(l,"-cell"),pe,le;if(A)le=A;else{var Oe=Object(o.b)(T,i);if(le=Oe,L){var xe=L(Oe,T,v);r(xe)?(le=xe.children,pe=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(ye,"-content")},le));var ie=pe||{},se=ie.colSpan,re=ie.rowSpan,be=ie.style,Z=ie.className,te=Object(C.a)(ie,["colSpan","rowSpan","style","className"]),Ee=se!==void 0?se:y,ae=re!==void 0?re:_;if(Ee===0||ae===0)return null;var Y={},X=typeof I=="number",Q=typeof j=="number";X&&(Y.position="sticky",Y.left=I),Q&&(Y.position="sticky",Y.right=j);var he={};J&&(he.textAlign=J);var ce,Se=F===!0?{showTitle:!0}:F;Se&&(Se.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 Ke=Object(u.a)(Object(u.a)(Object(u.a)({title:ce},te),W),{},{colSpan:Ee&&Ee!==1?Ee:null,rowSpan:ae&&ae!==1?ae:null,className:f()(ye,c,(n={},Object(k.a)(n,"".concat(ye,"-fix-left"),X),Object(k.a)(n,"".concat(ye,"-fix-left-first"),M),Object(k.a)(n,"".concat(ye,"-fix-left-last"),G),Object(k.a)(n,"".concat(ye,"-fix-right"),Q),Object(k.a)(n,"".concat(ye,"-fix-right-first"),K),Object(k.a)(n,"".concat(ye,"-fix-right-last"),H),Object(k.a)(n,"".concat(ye,"-ellipsis"),F),Object(k.a)(n,"".concat(ye,"-with-append"),z),Object(k.a)(n,"".concat(ye,"-fix-sticky"),(X||Q)&&q),n),W.className,Z),style:Object(u.a)(Object(u.a)(Object(u.a)(Object(u.a)({},W.style),he),Y),be),ref:E(x)?d:null});return h.createElement(x,Object.assign({},Ke),z,le)}var m=h.forwardRef(g);m.displayName="Cell";var w=h.memo(m,function(p,d){return d.shouldCellUpdate?!d.shouldCellUpdate(d.record,p.record):!1});$.a=w},gRFJ:function(N,$,P){N.exports=[P("rdUC"),P("ynwM"),P("RELg"),P("DlR+"),P("CrYA"),P("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(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($){var P=meta[$];return typeof P=="string"?P:"\\u"+("0000"+$.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+N+'"'}function str(N,$){var P,k,u,C,R=gap,h,s=$[N];s&&typeof s=="object"&&typeof s.toJSON=="function"&&(s=s.toJSON(N)),typeof rep=="function"&&(s=rep.call($,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,P=0;PK.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,J=H.strokeLinecap,ee=H.strokeWidth,q=H.style,ye=H.trailColor,pe=H.trailWidth,le=H.transition,Oe=m(H,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Oe.gapPosition;var xe=Array.isArray(B)?B:[B],ie=Array.isArray(F)?F:[F],se=s(xe),re=f(se,1),be=re[0],Z=ee/2,te=100-ee/2,Ee="M ".concat(J==="round"?Z:0,",").concat(Z,` L `).concat(J==="round"?te:100,",").concat(Z),ae="0 0 100 ".concat(ee),Y=0;return u.a.createElement("svg",S({className:R()("".concat(W,"-line"),z),viewBox:ae,preserveAspectRatio:"none",style:q},Oe),u.a.createElement("path",{className:"".concat(W,"-line-trail"),d:Ee,strokeLinecap:J,stroke:ye,strokeWidth:pe||ee,fillOpacity:"0"}),xe.map(function(X,Q){var he={strokeDasharray:"".concat(X,"px, 100px"),strokeDashoffset:"-".concat(Y,"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 Y+=X,u.a.createElement("path",{key:Q,className:"".concat(W,"-line-path"),d:Ee,strokeLinecap:J,stroke:ce,strokeWidth:ee,fillOpacity:"0",ref:be[Q],style:he})}))};p.defaultProps=h;var d=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 b(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 x=0;function y(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,J=50-B/2,ee=0,q=-J,ye=0,pe=-2*J;switch(F){case"left":ee=-J,q=0,ye=2*J,pe=0;break;case"right":ee=J,q=0,ye=-2*J,pe=0;break;case"bottom":q=J,pe=2*J;break;default:}var le="M 50,50 m ".concat(ee,",").concat(q,` a `).concat(J,",").concat(J," 0 1 1 ").concat(ye,",").concat(-pe,` a `).concat(J,",").concat(J," 0 1 1 ").concat(-ye,",").concat(pe),Oe=Math.PI*2*J,xe={stroke:z,strokeDasharray:"".concat(H/100*(Oe-W),"px ").concat(Oe,"px"),strokeDashoffset:"-".concat(W/2+K/100*(Oe-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,J=H.gapPosition,ee=H.trailColor,q=H.strokeLinecap,ye=H.style,pe=H.className,le=H.strokeColor,Oe=H.percent,xe=A(H,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),ie=Object(k.useMemo)(function(){return x+=1,x},[]),se=I(0,100,ee,B,F,J),re=se.pathString,be=se.pathStyle,Z=_(Oe),te=_(le),Ee=te.find(function(he){return Object.prototype.toString.call(he)==="[object Object]"}),ae=s(Z),Y=l(ae,1),X=Y[0],Q=function(){var ce=0;return Z.map(function(Se,Ke){var Ge=te[Ke]||te[te.length-1],Ye=Object.prototype.toString.call(Ge)==="[object Object]"?"url(#".concat(z,"-gradient-").concat(ie,")"):"",Qe=I(ce,Se,Ge,B,F,J);return ce+=Se,u.a.createElement("path",{key:Ke,className:"".concat(z,"-circle-path"),d:Qe.pathString,stroke:Ye,strokeLinecap:q,strokeWidth:B,opacity:Se===0?0:1,fillOpacity:"0",style:Qe.pathStyle,ref:X[Ke]})})};return u.a.createElement("svg",n({className:R()("".concat(z,"-circle"),pe),viewBox:"0 0 100 100",style:ye},xe),Ee&&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(Ee).sort(function(he,ce){return y(he)-y(ce)}).map(function(he,ce){return u.a.createElement("stop",{key:ce,offset:he,stopColor:Ee[he]})}))),u.a.createElement("path",{className:"".concat(z,"-circle-trail"),d:re,stroke:ee,strokeLinecap:q,strokeWidth:W||B,fillOpacity:"0",style:be}),Q().reverse())};j.defaultProps=h;var M=j,G={Line:d,Circle:M}},hW8S:function(N,$,P){"use strict";P.d($,"a",function(){return R}),P.d($,"c",function(){return h}),P.d($,"b",function(){return s});var k=P("VTBJ"),u=P("Ff2n"),C=P("Kwbf"),R="RC_TABLE_INTERNAL_COL_DEFINE";function h(S){var f=S.expandable,a=Object(u.a)(S,["expandable"]);return"expandable"in S?Object(k.a)(Object(k.a)({},a),f):a}function s(S){return Object.keys(S).reduce(function(f,a){return(a.substr(0,5)==="data-"||a.substr(0,5)==="aria-")&&(f[a]=S[a]),f},{})}},i3hx:function(N,$,P){},jO9C:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("OLod"))})(this,function(k){return k.pad.Iso97971={pad:function(u,C){u.concat(k.lib.WordArray.create([2147483648],1)),k.pad.ZeroPadding.pad(u,C)},unpad:function(u){k.pad.ZeroPadding.unpad(u),u.sigBytes--}},k.pad.Iso97971})},je13:function(N,$,P){var k=P("5nXd"),u=P("gRFJ"),C=[P("uQRt")];N.exports=k.createStore(u,C)},k3GJ:function(N,$,P){"use strict";P.d($,"a",function(){return Tn});var k=P("rePB"),u=P("ODXe"),C=P("Ff2n"),R=P("VTBJ"),h=P("q1tI"),s=P("TSYQ"),S=P.n(s),f=P("Zm9Q"),a=P("6cGi"),o=P("KQm4"),r=P("xEkU"),E=P.n(r),g=P("t23M");function m(Re){var Fe=Object(h.useRef)(),ze=Object(h.useRef)(!1);function ke(){for(var fe=arguments.length,Ae=new Array(fe),ve=0;veJe&&(ht=Je-pt),Object(h.useMemo)(function(){if(!Ae.length)return[0,0];for(var yt=Ae.length,Nt=yt,ar=0;arBe+ht){Nt=ar-1;break}}for(var hr=0,Er=yt-1;Er>=0;Er-=1){var br=Re.get(Ae[Er].key)||T;if(br[We]1&&arguments[1]!==void 0?arguments[1]:!1,ke=Fe&&typeof Fe.getBoundingClientRect=="function"&&Fe.getBoundingClientRect().width;if(ke){if(ze){var fe=getComputedStyle(Fe),Ae=fe.marginLeft,ve=fe.marginRight;ke+=+Ae.replace("px","")+ +ve.replace("px","")}ke=+ke.toFixed(6)}return ke||0},ce=function(Fe,ze,ke){Fe&&Object(K.a)(Fe.style)==="object"&&(Fe.style[ze]=ke)},Se=function(){return Z.any},Ke=P("bdgK"),Ge=P("i8i4"),Ye=P.n(Ge),Qe=P("wgJM"),rt=P("l4aY"),qe=P("m+aA"),Le=P("c+Xe"),Ce=P("zT1h"),Ve=P("QC+M");function tt(Re,Fe,ze){return ze?Re[0]===Fe[0]:Re[0]===Fe[0]&&Re[1]===Fe[1]}function He(Re,Fe,ze){var ke=Re[Fe]||{};return Object(R.a)(Object(R.a)({},ke),ze)}function $e(Re,Fe,ze,ke){for(var fe=ze.points,Ae=Object.keys(Re),ve=0;ve1&&arguments[1]!==void 0?arguments[1]:2;Fe();var Ae=Object(Qe.a)(function(){fe<=1?ke({isCanceled:function(){return Ae!==Re.current}}):ze(ke,fe-1)});Re.current=Ae}return h.useEffect(function(){return function(){Fe()}},[]),[ze,Fe]},Wn=[Pt,cr,ir,Ht],gt=!1,Ct=!0;function dt(Re){return Re===ir||Re===Ht}var or=function(Re,Fe){var ze=h.useState(mr),ke=Object(u.a)(ze,2),fe=ke[0],Ae=ke[1],ve=Nr(),Pe=Object(u.a)(ve,2),Ne=Pe[0],We=Pe[1];function Be(){Ae(Pt)}return En(function(){if(fe!==mr&&fe!==Ht){var Je=Wn.indexOf(fe),it=Wn[Je+1],pt=Fe(fe);pt===gt?Ae(it):Ne(function(ht){function yt(){if(ht.isCanceled())return;Ae(it)}pt===!0?yt():Promise.resolve(pt).then(yt)})}},[Re,fe]),h.useEffect(function(){return function(){We()}},[]),[Be,fe]},Mr=function(Re){var Fe=Object(h.useRef)(),ze=Object(h.useRef)(Re);ze.current=Re;var ke=h.useCallback(function(ve){ze.current(ve)},[]);function fe(ve){ve&&(ve.removeEventListener(_t,ke),ve.removeEventListener(ct,ke))}function Ae(ve){Fe.current&&Fe.current!==ve&&fe(Fe.current),ve&&ve!==Fe.current&&(ve.addEventListener(_t,ke),ve.addEventListener(ct,ke),Fe.current=ve)}return h.useEffect(function(){return function(){fe(Fe.current)}},[]),[Ae,fe]};function jt(Re,Fe,ze,ke){var fe=ke.motionEnter,Ae=fe===void 0?!0:fe,ve=ke.motionAppear,Pe=ve===void 0?!0:ve,Ne=ke.motionLeave,We=Ne===void 0?!0:Ne,Be=ke.motionDeadline,Je=ke.motionLeaveImmediately,it=ke.onAppearPrepare,pt=ke.onEnterPrepare,ht=ke.onLeavePrepare,yt=ke.onAppearStart,Nt=ke.onEnterStart,ar=ke.onLeaveStart,ur=ke.onAppearActive,hr=ke.onEnterActive,Er=ke.onLeaveActive,br=ke.onAppearEnd,pr=ke.onEnterEnd,Br=ke.onLeaveEnd,_r=ke.onVisibleChanged,Sn=$t(),Or=Object(u.a)(Sn,2),Vt=Or[0],Bt=Or[1],Lr=$t(Et),Wr=Object(u.a)(Lr,2),It=Wr[0],Hr=Wr[1],Cn=$t(null),Yr=Object(u.a)(Cn,2),ln=Yr[0],nn=Yr[1],Pn=Object(h.useRef)(!1),Gn=Object(h.useRef)(null),On=Object(h.useRef)(!1),la=Object(h.useRef)(null);function Da(){var mn=ze();return mn||la.current}var ha=Object(h.useRef)(!1);function Xn(mn){var tn=Da();if(mn&&!mn.deadline&&mn.target!==tn)return;var Vn;It===Qt&&ha.current?Vn=br==null?void 0:br(tn,mn):It===qt&&ha.current?Vn=pr==null?void 0:pr(tn,mn):It===Jt&&ha.current&&(Vn=Br==null?void 0:Br(tn,mn)),Vn!==!1&&!On.current&&(Hr(Et),nn(null))}var bn=Mr(Xn),un=Object(u.a)(bn,1),An=un[0],_n=h.useMemo(function(){var mn,tn,Vn;switch(It){case"appear":return mn={},Object(k.a)(mn,Pt,it),Object(k.a)(mn,cr,yt),Object(k.a)(mn,ir,ur),mn;case"enter":return tn={},Object(k.a)(tn,Pt,pt),Object(k.a)(tn,cr,Nt),Object(k.a)(tn,ir,hr),tn;case"leave":return Vn={},Object(k.a)(Vn,Pt,ht),Object(k.a)(Vn,cr,ar),Object(k.a)(Vn,ir,Er),Vn;default:return{}}},[It]),Ra=or(It,function(mn){if(mn===Pt){var tn=_n[Pt];return tn?tn(Da()):gt}if(an in _n){var Vn;nn(((Vn=_n[an])===null||Vn===void 0?void 0:Vn.call(_n,Da(),null))||null)}return an===ir&&(An(Da()),Be>0&&(clearTimeout(Gn.current),Gn.current=setTimeout(function(){Xn({deadline:!0})},Be))),Ct}),Ya=Object(u.a)(Ra,2),$a=Ya[0],an=Ya[1],Fa=dt(an);ha.current=Fa,En(function(){Bt(Fe);var mn=Pn.current;if(Pn.current=!0,!Re)return;var tn;!mn&&Fe&&Pe&&(tn=Qt),mn&&Fe&&Ae&&(tn=qt),(mn&&!Fe&&We||!mn&&Je&&!Fe&&We)&&(tn=Jt),tn&&(Hr(tn),$a())},[Fe]),Object(h.useEffect)(function(){(It===Qt&&!Pe||It===qt&&!Ae||It===Jt&&!We)&&Hr(Et)},[Pe,Ae,We]),Object(h.useEffect)(function(){return function(){clearTimeout(Gn.current),On.current=!0}},[]),Object(h.useEffect)(function(){Vt!==void 0&&It===Et&&(_r==null||_r(Vt))},[Vt,It]);var Ja=ln;return _n[Pt]&&an===cr&&(Ja=Object(R.a)({transition:"none"},Ja)),[It,an,Ja,Vt!=null?Vt:Fe]}var Rt=function(Re){Object(x.a)(ze,Re);var Fe=Object(y.a)(ze);function ze(){return Object(L.a)(this,ze),Fe.apply(this,arguments)}return Object(A.a)(ze,[{key:"render",value:function(){return this.props.children}}]),ze}(h.Component),Ar=Rt;function dn(Re){var Fe=Re;Object(K.a)(Re)==="object"&&(Fe=Re.transitionSupport);function ze(fe){return!!(fe.motionName&&Fe)}var ke=h.forwardRef(function(fe,Ae){var ve=fe.visible,Pe=ve===void 0?!0:ve,Ne=fe.removeOnLeave,We=Ne===void 0?!0:Ne,Be=fe.forceRender,Je=fe.children,it=fe.motionName,pt=fe.leavedClassName,ht=fe.eventProps,yt=ze(fe),Nt=Object(h.useRef)(),ar=Object(h.useRef)();function ur(){try{return Object(qe.a)(Nt.current||ar.current)}catch(Hr){return null}}var hr=jt(yt,Pe,ur,fe),Er=Object(u.a)(hr,4),br=Er[0],pr=Er[1],Br=Er[2],_r=Er[3],Sn=h.useRef(_r);_r&&(Sn.current=!0);var Or=Object(h.useRef)(Ae);Or.current=Ae;var Vt=h.useCallback(function(Hr){Nt.current=Hr,Object(Le.b)(Or.current,Hr)},[]),Bt,Lr=Object(R.a)(Object(R.a)({},ht),{},{visible:Pe});if(!Je)Bt=null;else if(br===Et||!ze(fe))_r?Bt=Je(Object(R.a)({},Lr),Vt):!We&&Sn.current?Bt=Je(Object(R.a)(Object(R.a)({},Lr),{},{className:pt}),Vt):Be?Bt=Je(Object(R.a)(Object(R.a)({},Lr),{},{style:{display:"none"}}),Vt):Bt=null;else{var Wr,It;pr===Pt?It="prepare":dt(pr)?It="active":pr===cr&&(It="start"),Bt=Je(Object(R.a)(Object(R.a)({},Lr),{},{className:S()(At(it,br),(Wr={},Object(k.a)(Wr,At(it,"".concat(br,"-").concat(It)),It),Object(k.a)(Wr,it,typeof it=="string"),Wr)),style:Br}),Vt)}return h.createElement(Ar,{ref:ar},Bt)});return ke.displayName="CSSMotion",ke}var Sr=dn(mt),st="add",Ot="keep",jr="remove",$r="removed";function ft(Re){var Fe;return Re&&Object(K.a)(Re)==="object"&&"key"in Re?Fe=Re:Fe={key:Re},Object(R.a)(Object(R.a)({},Fe),{},{key:String(Fe.key)})}function gn(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Re.map(ft)}function Zr(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ze=[],ke=0,fe=Fe.length,Ae=gn(Re),ve=gn(Fe);Ae.forEach(function(We){for(var Be=!1,Je=ke;Je1});return Ne.forEach(function(We){ze=ze.filter(function(Be){var Je=Be.key,it=Be.status;return Je!==We||it!==jr}),ze.forEach(function(Be){Be.key===We&&(Be.status=Ot)})}),ze}var St=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function kr(Re){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Sr,ze=function(ke){Object(x.a)(Ae,ke);var fe=Object(y.a)(Ae);function Ae(){var ve;return Object(L.a)(this,Ae),ve=fe.apply(this,arguments),ve.state={keyEntities:[]},ve.removeKey=function(Pe){ve.setState(function(Ne){var We=Ne.keyEntities;return{keyEntities:We.map(function(Be){return Be.key!==Pe?Be:Object(R.a)(Object(R.a)({},Be),{},{status:$r})})}})},ve}return Object(A.a)(Ae,[{key:"render",value:function(){var Pe=this,Ne=this.state.keyEntities,We=this.props,Be=We.component,Je=We.children,it=We.onVisibleChanged,pt=Object(C.a)(We,["component","children","onVisibleChanged"]),ht=Be||h.Fragment,yt={};return St.forEach(function(Nt){yt[Nt]=pt[Nt],delete pt[Nt]}),delete pt.keys,h.createElement(ht,pt,Ne.map(function(Nt){var ar=Nt.status,ur=Object(C.a)(Nt,["status"]),hr=ar===st||ar===Ot;return h.createElement(Fe,Object(i.a)({},yt,{key:ur.key,visible:hr,eventProps:ur,onVisibleChanged:function(br){it==null||it(br,{key:ur.key}),br||Pe.removeKey(ur.key)}}),Je)}))}}],[{key:"getDerivedStateFromProps",value:function(Pe,Ne){var We=Pe.keys,Be=Ne.keyEntities,Je=gn(We),it=Zr(Be,Je);return{keyEntities:it.filter(function(pt){var ht=Be.find(function(yt){var Nt=yt.key;return pt.key===Nt});return!(ht&&ht.status===$r&&pt.status===jr)})}}}]),Ae}(h.Component);return ze.defaultProps={component:"div"},ze}var Ur=kr(mt),Dr=Sr;function sr(Re){var Fe=Re.prefixCls,ze=Re.motion,ke=Re.animation,fe=Re.transitionName;return ze||(ke?{motionName:"".concat(Fe,"-").concat(ke)}:fe?{motionName:fe}:null)}function wn(Re){var Fe=Re.prefixCls,ze=Re.visible,ke=Re.zIndex,fe=Re.mask,Ae=Re.maskMotion,ve=Re.maskAnimation,Pe=Re.maskTransitionName;if(!fe)return null;var Ne={};return(Ae||Pe||ve)&&(Ne=Object(R.a)({motionAppear:!0},sr({motion:Ae,prefixCls:Fe,transitionName:Pe,animation:ve}))),h.createElement(Dr,Object(i.a)({},Ne,{visible:ze,removeOnLeave:!0}),function(We){var Be=We.className;return h.createElement("div",{style:{zIndex:ke},className:S()("".concat(Fe,"-mask"),Be)})})}var Lt=P("9mu1"),nt=P("o0o1"),wt=P.n(nt),Mt=P("HaE+"),er=["measure","align",null,"motion"],dr=function(Re,Fe){var ze=Object(h.useState)(null),ke=Object(u.a)(ze,2),fe=ke[0],Ae=ke[1],ve=Object(h.useRef)(),Pe=Object(h.useRef)(!1);function Ne(Je){Pe.current||Ae(Je)}function We(){Qe.a.cancel(ve.current)}function Be(Je){We(),ve.current=Object(Qe.a)(function(){Ne(function(it){switch(fe){case"align":return"motion";case"motion":return"stable";default:}return it}),Je==null||Je()})}return Object(h.useEffect)(function(){Ne("measure")},[Re]),Object(h.useEffect)(function(){switch(fe){case"measure":Fe();break;default:}fe&&(ve.current=Object(Qe.a)(Object(Mt.a)(wt.a.mark(function Je(){var it,pt;return wt.a.wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:it=er.indexOf(fe),pt=er[it+1],pt&&it!==-1&&Ne(pt);case 3:case"end":return yt.stop()}},Je)}))))},[fe]),Object(h.useEffect)(function(){return function(){Pe.current=!0,We()}},[]),[fe,Be]},en=function(Re){var Fe=h.useState({width:0,height:0}),ze=Object(u.a)(Fe,2),ke=ze[0],fe=ze[1];function Ae(Pe){fe({width:Pe.offsetWidth,height:Pe.offsetHeight})}var ve=h.useMemo(function(){var Pe={};if(Re){var Ne=ke.width,We=ke.height;Re.indexOf("height")!==-1&&We?Pe.height=We:Re.indexOf("minHeight")!==-1&&We&&(Pe.minHeight=We),Re.indexOf("width")!==-1&&Ne?Pe.width=Ne:Re.indexOf("minWidth")!==-1&&Ne&&(Pe.minWidth=Ne)}return Pe},[Re,ke]);return[ve,Ae]},fr=h.forwardRef(function(Re,Fe){var ze=Re.visible,ke=Re.prefixCls,fe=Re.className,Ae=Re.style,ve=Re.children,Pe=Re.zIndex,Ne=Re.stretch,We=Re.destroyPopupOnHide,Be=Re.forceRender,Je=Re.align,it=Re.point,pt=Re.getRootDomNode,ht=Re.getClassNameFromAlign,yt=Re.onAlign,Nt=Re.onMouseEnter,ar=Re.onMouseLeave,ur=Re.onMouseDown,hr=Re.onTouchStart,Er=Object(h.useRef)(),br=Object(h.useRef)(),pr=Object(h.useState)(),Br=Object(u.a)(pr,2),_r=Br[0],Sn=Br[1],Or=en(Ne),Vt=Object(u.a)(Or,2),Bt=Vt[0],Lr=Vt[1];function Wr(){Ne&&Lr(pt())}var It=dr(ze,Wr),Hr=Object(u.a)(It,2),Cn=Hr[0],Yr=Hr[1],ln=Object(h.useRef)();function nn(){return it||pt}function Pn(){var bn;(bn=Er.current)===null||bn===void 0||bn.forceAlign()}function Gn(bn,un){var An=ht(un);_r!==An&&Sn(An),Cn==="align"&&(_r!==An?Promise.resolve().then(function(){Pn()}):Yr(function(){var _n;(_n=ln.current)===null||_n===void 0||_n.call(ln)}),yt==null||yt(bn,un))}var On=Object(R.a)({},sr(Re));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(bn){var un=On[bn];On[bn]=function(An,_n){return Yr(),un==null?void 0:un(An,_n)}});function la(){return new Promise(function(bn){ln.current=bn})}h.useEffect(function(){!On.motionName&&Cn==="motion"&&Yr()},[On.motionName,Cn]),h.useImperativeHandle(Fe,function(){return{forceAlign:Pn,getElement:function(){return br.current}}});var Da=Object(R.a)(Object(R.a)({},Bt),{},{zIndex:Pe,opacity:Cn==="motion"||Cn==="stable"||!ze?void 0:0,pointerEvents:Cn==="stable"?void 0:"none"},Ae),ha=!0;(Je==null?void 0:Je.points)&&(Cn==="align"||Cn==="stable")&&(ha=!1);var Xn=ve;return h.Children.count(ve)>1&&(Xn=h.createElement("div",{className:"".concat(ke,"-content")},ve)),h.createElement(Dr,Object(i.a)({visible:ze,ref:br,leavedClassName:"".concat(ke,"-hidden")},On,{onAppearPrepare:la,onEnterPrepare:la,removeOnLeave:We,forceRender:Be}),function(bn,un){var An=bn.className,_n=bn.style,Ra=S()(ke,fe,_r,An);return h.createElement(Lt.a,{target:nn(),key:"popup",ref:Er,monitorWindowResize:!0,disabled:ha,align:Je,onAlign:Gn},h.createElement("div",{ref:un,className:Ra,onMouseEnter:Nt,onMouseLeave:ar,onMouseDownCapture:ur,onTouchStartCapture:hr,style:Object(R.a)(Object(R.a)({},_n),Da)},Xn))})});fr.displayName="PopupInner";var tr=fr,lr=h.forwardRef(function(Re,Fe){var ze=Re.prefixCls,ke=Re.visible,fe=Re.zIndex,Ae=Re.children,ve=Re.mobile;ve=ve===void 0?{}:ve;var Pe=ve.popupClassName,Ne=ve.popupStyle,We=ve.popupMotion,Be=We===void 0?{}:We,Je=ve.popupRender,it=h.useRef();h.useImperativeHandle(Fe,function(){return{forceAlign:function(){},getElement:function(){return it.current}}});var pt=Object(R.a)({zIndex:fe},Ne),ht=Ae;return h.Children.count(Ae)>1&&(ht=h.createElement("div",{className:"".concat(ze,"-content")},Ae)),Je&&(ht=Je(ht)),h.createElement(Dr,Object(i.a)({visible:ke,ref:it,removeOnLeave:!0},Be),function(yt,Nt){var ar=yt.className,ur=yt.style,hr=S()(ze,Pe,ar);return h.createElement("div",{ref:Nt,className:hr,style:Object(R.a)(Object(R.a)({},ur),pt)},ht)})});lr.displayName="MobilePopupInner";var Rr=lr,zt=["visible","mobile"],Ut=h.forwardRef(function(Re,Fe){var ze=Re.visible,ke=Re.mobile,fe=Object(C.a)(Re,zt),Ae=Object(h.useState)(ze),ve=Object(u.a)(Ae,2),Pe=ve[0],Ne=ve[1],We=Object(h.useState)(!1),Be=Object(u.a)(We,2),Je=Be[0],it=Be[1],pt=Object(R.a)(Object(R.a)({},fe),{},{visible:Pe});Object(h.useEffect)(function(){Ne(ze),ze&&ke&&it(Me())},[ze,ke]);var ht=Je?h.createElement(Rr,Object(i.a)({},pt,{mobile:ke,ref:Fe})):h.createElement(tr,Object(i.a)({},pt,{ref:Fe}));return h.createElement("div",null,h.createElement(wn,pt),ht)});Ut.displayName="Popup";var rr=Ut,Cr=h.createContext(null),zr=Cr;function on(){}function Ln(){return""}function Va(Re){return Re?Re.ownerDocument:window.document}var ri=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Pa(Re){var Fe=function(ze){Object(x.a)(fe,ze);var ke=Object(y.a)(fe);function fe(Ae){var ve;Object(L.a)(this,fe),ve=ke.call(this,Ae),ve.popupRef=h.createRef(),ve.triggerRef=h.createRef(),ve.attachId=void 0,ve.clickOutsideHandler=void 0,ve.touchOutsideHandler=void 0,ve.contextMenuOutsideHandler1=void 0,ve.contextMenuOutsideHandler2=void 0,ve.mouseDownTimeout=void 0,ve.focusTime=void 0,ve.preClickTime=void 0,ve.preTouchTime=void 0,ve.delayTimer=void 0,ve.hasPopupMouseDown=void 0,ve.onMouseEnter=function(Ne){var We=ve.props.mouseEnterDelay;ve.fireEvents("onMouseEnter",Ne),ve.delaySetPopupVisible(!0,We,We?null:Ne)},ve.onMouseMove=function(Ne){ve.fireEvents("onMouseMove",Ne),ve.setPoint(Ne)},ve.onMouseLeave=function(Ne){ve.fireEvents("onMouseLeave",Ne),ve.delaySetPopupVisible(!1,ve.props.mouseLeaveDelay)},ve.onPopupMouseEnter=function(){ve.clearDelayTimer()},ve.onPopupMouseLeave=function(Ne){var We;if(Ne.relatedTarget&&!Ne.relatedTarget.setTimeout&&Object(rt.a)((We=ve.popupRef.current)===null||We===void 0?void 0:We.getElement(),Ne.relatedTarget))return;ve.delaySetPopupVisible(!1,ve.props.mouseLeaveDelay)},ve.onFocus=function(Ne){ve.fireEvents("onFocus",Ne),ve.clearDelayTimer(),ve.isFocusToShow()&&(ve.focusTime=Date.now(),ve.delaySetPopupVisible(!0,ve.props.focusDelay))},ve.onMouseDown=function(Ne){ve.fireEvents("onMouseDown",Ne),ve.preClickTime=Date.now()},ve.onTouchStart=function(Ne){ve.fireEvents("onTouchStart",Ne),ve.preTouchTime=Date.now()},ve.onBlur=function(Ne){ve.fireEvents("onBlur",Ne),ve.clearDelayTimer(),ve.isBlurToHide()&&ve.delaySetPopupVisible(!1,ve.props.blurDelay)},ve.onContextMenu=function(Ne){Ne.preventDefault(),ve.fireEvents("onContextMenu",Ne),ve.setPopupVisible(!0,Ne)},ve.onContextMenuClose=function(){ve.isContextMenuToShow()&&ve.close()},ve.onClick=function(Ne){if(ve.fireEvents("onClick",Ne),ve.focusTime){var We;if(ve.preClickTime&&ve.preTouchTime?We=Math.min(ve.preClickTime,ve.preTouchTime):ve.preClickTime?We=ve.preClickTime:ve.preTouchTime&&(We=ve.preTouchTime),Math.abs(We-ve.focusTime)<20)return;ve.focusTime=0}ve.preClickTime=0,ve.preTouchTime=0,ve.isClickToShow()&&(ve.isClickToHide()||ve.isBlurToHide())&&Ne&&Ne.preventDefault&&Ne.preventDefault();var Be=!ve.state.popupVisible;(ve.isClickToHide()&&!Be||Be&&ve.isClickToShow())&&ve.setPopupVisible(!ve.state.popupVisible,Ne)},ve.onPopupMouseDown=function(){if(ve.hasPopupMouseDown=!0,clearTimeout(ve.mouseDownTimeout),ve.mouseDownTimeout=window.setTimeout(function(){ve.hasPopupMouseDown=!1},0),ve.context){var Ne;(Ne=ve.context).onPopupMouseDown.apply(Ne,arguments)}},ve.onDocumentClick=function(Ne){if(ve.props.mask&&!ve.props.maskClosable)return;var We=Ne.target,Be=ve.getRootDomNode(),Je=ve.getPopupDomNode();(!Object(rt.a)(Be,We)||ve.isContextMenuOnly())&&!Object(rt.a)(Je,We)&&!ve.hasPopupMouseDown&&ve.close()},ve.getRootDomNode=function(){var Ne=ve.props.getTriggerDOMNode;if(Ne)return Ne(ve.triggerRef.current);try{var We=Object(qe.a)(ve.triggerRef.current);if(We)return We}catch(Be){}return Ye.a.findDOMNode(Object(b.a)(ve))},ve.getPopupClassNameFromAlign=function(Ne){var We=[],Be=ve.props,Je=Be.popupPlacement,it=Be.builtinPlacements,pt=Be.prefixCls,ht=Be.alignPoint,yt=Be.getPopupClassNameFromAlign;return Je&&it&&We.push($e(it,pt,Ne,ht)),yt&&We.push(yt(Ne)),We.join(" ")},ve.getComponent=function(){var Ne=ve.props,We=Ne.prefixCls,Be=Ne.destroyPopupOnHide,Je=Ne.popupClassName,it=Ne.onPopupAlign,pt=Ne.popupMotion,ht=Ne.popupAnimation,yt=Ne.popupTransitionName,Nt=Ne.popupStyle,ar=Ne.mask,ur=Ne.maskAnimation,hr=Ne.maskTransitionName,Er=Ne.maskMotion,br=Ne.zIndex,pr=Ne.popup,Br=Ne.stretch,_r=Ne.alignPoint,Sn=Ne.mobile,Or=Ne.forceRender,Vt=ve.state,Bt=Vt.popupVisible,Lr=Vt.point,Wr=ve.getPopupAlign(),It={};return ve.isMouseEnterToShow()&&(It.onMouseEnter=ve.onPopupMouseEnter),ve.isMouseLeaveToHide()&&(It.onMouseLeave=ve.onPopupMouseLeave),It.onMouseDown=ve.onPopupMouseDown,It.onTouchStart=ve.onPopupMouseDown,h.createElement(rr,Object(i.a)({prefixCls:We,destroyPopupOnHide:Be,visible:Bt,point:_r&&Lr,className:Je,align:Wr,onAlign:it,animation:ht,getClassNameFromAlign:ve.getPopupClassNameFromAlign},It,{stretch:Br,getRootDomNode:ve.getRootDomNode,style:Nt,mask:ar,zIndex:br,transitionName:yt,maskAnimation:ur,maskTransitionName:hr,maskMotion:Er,ref:ve.popupRef,motion:pt,mobile:Sn,forceRender:Or}),typeof pr=="function"?pr():pr)},ve.attachParent=function(Ne){Qe.a.cancel(ve.attachId);var We=ve.props,Be=We.getPopupContainer,Je=We.getDocument,it=ve.getRootDomNode(),pt;Be?(it||Be.length===0)&&(pt=Be(it)):pt=Je(ve.getRootDomNode()).body,pt?pt.appendChild(Ne):ve.attachId=Object(Qe.a)(function(){ve.attachParent(Ne)})},ve.getContainer=function(){var Ne=ve.props.getDocument,We=Ne(ve.getRootDomNode()).createElement("div");return We.style.position="absolute",We.style.top="0",We.style.left="0",We.style.width="100%",ve.attachParent(We),We},ve.setPoint=function(Ne){var We=ve.props.alignPoint;if(!We||!Ne)return;ve.setState({point:{pageX:Ne.pageX,pageY:Ne.pageY}})},ve.handlePortalUpdate=function(){ve.state.prevPopupVisible!==ve.state.popupVisible&&ve.props.afterPopupVisibleChange(ve.state.popupVisible)},ve.triggerContextValue={onPopupMouseDown:ve.onPopupMouseDown};var Pe;return"popupVisible"in Ae?Pe=!!Ae.popupVisible:Pe=!!Ae.defaultPopupVisible,ve.state={prevPopupVisible:Pe,popupVisible:Pe},ri.forEach(function(Ne){ve["fire".concat(Ne)]=function(We){ve.fireEvents(Ne,We)}}),ve}return Object(A.a)(fe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ve=this.props,Pe=this.state;if(Pe.popupVisible){var Ne;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Ne=ve.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ce.a)(Ne,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Ne=Ne||ve.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ce.a)(Ne,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Ne=Ne||ve.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),Qe.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var ve;return((ve=this.popupRef.current)===null||ve===void 0?void 0:ve.getElement())||null}},{key:"getPopupAlign",value:function(){var ve=this.props,Pe=ve.popupPlacement,Ne=ve.popupAlign,We=ve.builtinPlacements;return Pe&&We?He(We,Pe,Ne):Ne}},{key:"setPopupVisible",value:function(ve,Pe){var Ne=this.props.alignPoint,We=this.state.popupVisible;this.clearDelayTimer(),We!==ve&&("popupVisible"in this.props||this.setState({popupVisible:ve,prevPopupVisible:We}),this.props.onPopupVisibleChange(ve)),Ne&&Pe&&ve&&this.setPoint(Pe)}},{key:"delaySetPopupVisible",value:function(ve,Pe,Ne){var We=this,Be=Pe*1e3;if(this.clearDelayTimer(),Be){var Je=Ne?{pageX:Ne.pageX,pageY:Ne.pageY}:null;this.delayTimer=window.setTimeout(function(){We.setPopupVisible(ve,Je),We.clearDelayTimer()},Be)}else this.setPopupVisible(ve,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(ve){var Pe=this.props.children.props,Ne=this.props;return Pe[ve]&&Ne[ve]?this["fire".concat(ve)]:Pe[ve]||Ne[ve]}},{key:"isClickToShow",value:function(){var ve=this.props,Pe=ve.action,Ne=ve.showAction;return Pe.indexOf("click")!==-1||Ne.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var ve=this.props.action;return ve==="contextMenu"||ve.length===1&&ve[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var ve=this.props,Pe=ve.action,Ne=ve.showAction;return Pe.indexOf("contextMenu")!==-1||Ne.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var ve=this.props,Pe=ve.action,Ne=ve.hideAction;return Pe.indexOf("click")!==-1||Ne.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var ve=this.props,Pe=ve.action,Ne=ve.showAction;return Pe.indexOf("hover")!==-1||Ne.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var ve=this.props,Pe=ve.action,Ne=ve.hideAction;return Pe.indexOf("hover")!==-1||Ne.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var ve=this.props,Pe=ve.action,Ne=ve.showAction;return Pe.indexOf("focus")!==-1||Ne.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var ve=this.props,Pe=ve.action,Ne=ve.hideAction;return Pe.indexOf("focus")!==-1||Ne.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var ve;(ve=this.popupRef.current)===null||ve===void 0||ve.forceAlign()}}},{key:"fireEvents",value:function(ve,Pe){var Ne=this.props.children.props[ve];Ne&&Ne(Pe);var We=this.props[ve];We&&We(Pe)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var ve=this.state.popupVisible,Pe=this.props,Ne=Pe.children,We=Pe.forceRender,Be=Pe.alignPoint,Je=Pe.className,it=Pe.autoDestroy,pt=h.Children.only(Ne),ht={key:"trigger"};this.isContextMenuToShow()?ht.onContextMenu=this.onContextMenu:ht.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(ht.onClick=this.onClick,ht.onMouseDown=this.onMouseDown,ht.onTouchStart=this.onTouchStart):(ht.onClick=this.createTwoChains("onClick"),ht.onMouseDown=this.createTwoChains("onMouseDown"),ht.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(ht.onMouseEnter=this.onMouseEnter,Be&&(ht.onMouseMove=this.onMouseMove)):ht.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?ht.onMouseLeave=this.onMouseLeave:ht.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(ht.onFocus=this.onFocus,ht.onBlur=this.onBlur):(ht.onFocus=this.createTwoChains("onFocus"),ht.onBlur=this.createTwoChains("onBlur"));var yt=S()(pt&&pt.props&&pt.props.className,Je);yt&&(ht.className=yt);var Nt=Object(R.a)({},ht);Object(Le.c)(pt)&&(Nt.ref=Object(Le.a)(this.triggerRef,pt.ref));var ar=h.cloneElement(pt,Nt),ur;return(ve||this.popupRef.current||We)&&(ur=h.createElement(Re,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!ve&&it&&(ur=null),h.createElement(zr.Provider,{value:this.triggerContextValue},ar,ur)}}],[{key:"getDerivedStateFromProps",value:function(ve,Pe){var Ne=ve.popupVisible,We={};return Ne!==void 0&&Pe.popupVisible!==Ne&&(We.popupVisible=Ne,We.prevPopupVisible=Pe.popupVisible),We}}]),fe}(h.Component);return Fe.contextType=zr,Fe.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Ln,getDocument:Va,onPopupVisibleChange:on,afterPopupVisibleChange:on,onPopupAlign:on,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Fe}var ea=Pa(Ve.a),vn={adjustX:1,adjustY:1},Ca={topLeft:{points:["bl","tl"],overflow:vn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:vn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:vn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:vn,offset:[4,0]}},Jr={topLeft:{points:["bl","tl"],overflow:vn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:vn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:vn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:vn,offset:[4,0]}},ta=Ca,Nn=0,sn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Mn=function(Fe,ze,ke){var fe=ae(ze),Ae=Fe.getState();Fe.setState({defaultActiveFirst:Object(R.a)(Object(R.a)({},Ae.defaultActiveFirst),{},Object(k.a)({},fe,ke))})},da=function(Re){Object(x.a)(ze,Re);var Fe=Object(y.a)(ze);function ze(ke){var fe;Object(L.a)(this,ze),fe=Fe.call(this,ke),fe.onDestroy=function(Be){fe.props.onDestroy(Be)},fe.onKeyDown=function(Be){var Je=Be.keyCode,it=fe.menuInstance,pt=fe.props.store,ht=fe.getVisible();if(Je===p.a.ENTER)return fe.onTitleClick(Be),Mn(pt,fe.props.eventKey,!0),!0;if(Je===p.a.RIGHT)return ht?it.onKeyDown(Be):(fe.triggerOpenChange(!0),Mn(pt,fe.props.eventKey,!0)),!0;if(Je===p.a.LEFT){var yt;if(ht)yt=it.onKeyDown(Be);else return;return yt||(fe.triggerOpenChange(!1),yt=!0),yt}return ht&&(Je===p.a.UP||Je===p.a.DOWN)?it.onKeyDown(Be):void 0},fe.onOpenChange=function(Be){fe.props.onOpenChange(Be)},fe.onPopupVisibleChange=function(Be){fe.triggerOpenChange(Be,Be?"mouseenter":"mouseleave")},fe.onMouseEnter=function(Be){var Je=fe.props,it=Je.eventKey,pt=Je.onMouseEnter,ht=Je.store;Mn(ht,fe.props.eventKey,!1),pt({key:it,domEvent:Be})},fe.onMouseLeave=function(Be){var Je=fe.props,it=Je.parentMenu,pt=Je.eventKey,ht=Je.onMouseLeave;it.subMenuInstance=Object(b.a)(fe),ht({key:pt,domEvent:Be})},fe.onTitleMouseEnter=function(Be){var Je=fe.props,it=Je.eventKey,pt=Je.onItemHover,ht=Je.onTitleMouseEnter;pt({key:it,hover:!0}),ht({key:it,domEvent:Be})},fe.onTitleMouseLeave=function(Be){var Je=fe.props,it=Je.parentMenu,pt=Je.eventKey,ht=Je.onItemHover,yt=Je.onTitleMouseLeave;it.subMenuInstance=Object(b.a)(fe),ht({key:pt,hover:!1}),yt({key:pt,domEvent:Be})},fe.onTitleClick=function(Be){var Je=Object(b.a)(fe),it=Je.props;if(it.onTitleClick({key:it.eventKey,domEvent:Be}),it.triggerSubMenuAction==="hover")return;fe.triggerOpenChange(!fe.getVisible(),"click"),Mn(it.store,fe.props.eventKey,!1)},fe.onSubMenuClick=function(Be){typeof fe.props.onClick=="function"&&fe.props.onClick(fe.addKeyPath(Be))},fe.onSelect=function(Be){fe.props.onSelect(Be)},fe.onDeselect=function(Be){fe.props.onDeselect(Be)},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(Be){fe.menuInstance=Be},fe.addKeyPath=function(Be){return Object(R.a)(Object(R.a)({},Be),{},{keyPath:(Be.keyPath||[]).concat(fe.props.eventKey)})},fe.triggerOpenChange=function(Be,Je){var it=fe.props.eventKey,pt=function(){fe.onOpenChange({key:it,item:Object(b.a)(fe),trigger:Je,open:Be})};Je==="mouseenter"?fe.mouseenterTimeout=setTimeout(function(){pt()},0):pt()},fe.isChildrenSelected=function(){var Be={find:!1};return X(fe.props.children,fe.props.selectedKeys,Be),Be.find},fe.isInlineMode=function(){return fe.getMode()==="inline"},fe.adjustWidth=function(){if(!fe.subMenuTitle||!fe.menuInstance)return;var Be=Ge.findDOMNode(fe.menuInstance);if(Be.offsetWidth>=fe.subMenuTitle.offsetWidth)return;Be.style.minWidth="".concat(fe.subMenuTitle.offsetWidth,"px")},fe.saveSubMenuTitle=function(Be){fe.subMenuTitle=Be},fe.getBaseProps=function(){var Be=Object(b.a)(fe),Je=Be.props,it=fe.getMode();return{mode:it==="horizontal"?"vertical":it,visible:fe.getVisible(),level:Je.level+1,inlineIndent:Je.inlineIndent,focusable:!1,onClick:fe.onSubMenuClick,onSelect:fe.onSelect,onDeselect:fe.onDeselect,onDestroy:fe.onDestroy,selectedKeys:Je.selectedKeys,eventKey:"".concat(Je.eventKey,"-menu-"),openKeys:Je.openKeys,motion:Je.motion,onOpenChange:fe.onOpenChange,subMenuOpenDelay:Je.subMenuOpenDelay,parentMenu:Object(b.a)(fe),subMenuCloseDelay:Je.subMenuCloseDelay,forceSubMenuRender:Je.forceSubMenuRender,triggerSubMenuAction:Je.triggerSubMenuAction,builtinPlacements:Je.builtinPlacements,defaultActiveFirst:Je.store.getState().defaultActiveFirst[ae(Je.eventKey)],multiple:Je.multiple,prefixCls:Je.rootPrefixCls,id:fe.internalMenuId,manualRef:fe.saveMenuInstance,itemIcon:Je.itemIcon,expandIcon:Je.expandIcon,direction:Je.direction}},fe.getMotion=function(Be,Je){var it=Object(b.a)(fe),pt=it.haveRendered,ht=fe.props,yt=ht.motion,Nt=ht.rootPrefixCls,ar=Object(R.a)(Object(R.a)({},yt),{},{leavedClassName:"".concat(Nt,"-hidden"),removeOnLeave:!1,motionAppear:pt||!Je||Be!=="inline"});return ar};var Ae=ke.store,ve=ke.eventKey,Pe=Ae.getState(),Ne=Pe.defaultActiveFirst;fe.isRootMenu=!1;var We=!1;return Ne&&(We=Ne[ve]),Mn(Ae,ve,We),fe.state={mode:ke.mode,isOpen:ke.isOpen},fe}return Object(A.a)(ze,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var fe=this,Ae=this.props,ve=Ae.mode,Pe=Ae.parentMenu,Ne=Ae.manualRef,We=Ae.isOpen,Be=function(){fe.setState({mode:ve,isOpen:We})},Je=We!==this.state.isOpen,it=ve!==this.state.mode;if((it||Je)&&(Qe.a.cancel(this.updateStateRaf),it?this.updateStateRaf=Object(Qe.a)(Be):Be()),Ne&&Ne(this),ve!=="horizontal"||!(Pe==null?void 0:Pe.isRootMenu)||!We)return;this.minWidthTimeout=setTimeout(function(){return fe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var fe=this.props,Ae=fe.onDestroy,ve=fe.eventKey;Ae&&Ae(ve),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),Qe.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(fe,Ae){var ve=this.getBaseProps();return h.createElement(yn,Object(i.a)({},ve,{id:this.internalMenuId,className:fe,style:Ae}),this.props.children)}},{key:"renderChildren",value:function(){var fe=this,Ae=this.getBaseProps(),ve=Ae.mode,Pe=Ae.visible,Ne=Ae.forceSubMenuRender,We=Ae.direction,Be=this.getMotion(ve,Pe);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Pe||Ne,!this.haveOpened)return h.createElement("div",null);var Je=S()("".concat(Ae.prefixCls,"-sub"),Object(k.a)({},"".concat(Ae.prefixCls,"-rtl"),We==="rtl"));return this.isInlineMode()?h.createElement(Dr,Object(i.a)({visible:Ae.visible,forceRender:Ne},Be),function(it){var pt=it.className,ht=it.style,yt=S()(Je,pt);return fe.renderPopupMenu(yt,ht)}):this.renderPopupMenu(Je)}},{key:"render",value:function(){var fe,Ae,ve,Pe=Object(R.a)({},this.props),Ne=this.getVisible(),We=this.getPrefixCls(),Be=this.isInlineMode(),Je=this.getMode(),it=S()(We,"".concat(We,"-").concat(Je),(fe={},Object(k.a)(fe,Pe.className,!!Pe.className),Object(k.a)(fe,this.getOpenClassName(),Ne),Object(k.a)(fe,this.getActiveClassName(),Pe.active||Ne&&!Be),Object(k.a)(fe,this.getDisabledClassName(),Pe.disabled),Object(k.a)(fe,this.getSelectedClassName(),this.isChildrenSelected()),fe));this.internalMenuId||(Pe.eventKey?this.internalMenuId="".concat(Pe.eventKey,"$Menu"):(Nn+=1,this.internalMenuId="$__$".concat(Nn,"$Menu")));var pt={},ht={},yt={};Pe.disabled||(pt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},ht={onClick:this.onTitleClick},yt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Nt={},ar=Pe.direction,ur=ar==="rtl";Be&&(ur?Nt.paddingRight=Pe.inlineIndent*Pe.level:Nt.paddingLeft=Pe.inlineIndent*Pe.level);var hr={};this.getVisible()&&(hr={"aria-owns":this.internalMenuId});var Er=null;Je!=="horizontal"&&(Er=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Er=h.createElement(this.props.expandIcon,Object(R.a)({},this.props))));var br=h.createElement("div",Object(i.a)({ref:this.saveSubMenuTitle,style:Nt,className:"".concat(We,"-title"),role:"button"},yt,ht,{"aria-expanded":Ne},hr,{"aria-haspopup":"true",title:typeof Pe.title=="string"?Pe.title:void 0}),Pe.title,Er||h.createElement("i",{className:"".concat(We,"-arrow")})),pr=this.renderChildren(),Br=((Ae=Pe.parentMenu)===null||Ae===void 0?void 0:Ae.isRootMenu)?Pe.parentMenu.props.getPopupContainer:function(nn){return nn.parentNode},_r=sn[Je],Sn=Pe.popupOffset?{offset:Pe.popupOffset}:{},Or=S()((ve={},Object(k.a)(ve,Pe.popupClassName,Pe.popupClassName&&!Be),Object(k.a)(ve,"".concat(We,"-rtl"),ur),ve)),Vt=Pe.disabled,Bt=Pe.triggerSubMenuAction,Lr=Pe.subMenuOpenDelay,Wr=Pe.forceSubMenuRender,It=Pe.subMenuCloseDelay,Hr=Pe.builtinPlacements;Q.forEach(function(nn){return delete Pe[nn]}),delete Pe.onClick;var Cn=ur?Object(R.a)(Object(R.a)({},Jr),Hr):Object(R.a)(Object(R.a)({},Ca),Hr);delete Pe.direction;var Yr=this.getBaseProps(),ln=Be?null:this.getMotion(Yr.mode,Yr.visible);return h.createElement("li",Object(i.a)({},Pe,pt,{className:it,role:"menuitem"}),h.createElement(ea,{prefixCls:We,popupClassName:S()("".concat(We,"-popup"),Or),getPopupContainer:Br,builtinPlacements:Cn,popupPlacement:_r,popupVisible:Be?!1:Ne,popupAlign:Sn,popup:Be?null:pr,action:Vt||Be?[]:[Bt],mouseEnterDelay:Lr,mouseLeaveDelay:It,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Wr,popupMotion:ln},br),Be?pr:null)}}]),ze}(h.Component);da.defaultProps={onMouseEnter:te,onMouseLeave:te,onTitleMouseEnter:te,onTitleMouseLeave:te,onTitleClick:te,manualRef:te,mode:"vertical",title:""};var ya=Object(_.b)(function(Re,Fe){var ze=Re.openKeys,ke=Re.activeKey,fe=Re.selectedKeys,Ae=Fe.eventKey,ve=Fe.subMenuKey;return{isOpen:ze.indexOf(Ae)>-1,active:ke[ve]===Ae,selectedKeys:fe}})(da);ya.isSubMenu=!0;var ia=ya,Ba="menuitem-overflowed",Oa=.5,ra=function(Re){Object(x.a)(ze,Re);var Fe=Object(y.a)(ze);function ze(){var ke;return Object(L.a)(this,ze),ke=Fe.apply(this,arguments),ke.resizeObserver=null,ke.mutationObserver=null,ke.originalTotalWidth=0,ke.overflowedItems=[],ke.menuItemSizes=[],ke.cancelFrameId=null,ke.state={lastVisibleIndex:void 0},ke.childRef=h.createRef(),ke.getMenuItemNodes=function(){var fe=ke.props.prefixCls,Ae=ke.childRef.current;return Ae?[].slice.call(Ae.children).filter(function(ve){return ve.className.split(" ").indexOf("".concat(fe,"-overflowed-submenu"))<0}):[]},ke.getOverflowedSubMenuItem=function(fe,Ae,ve){var Pe=ke.props,Ne=Pe.overflowedIndicator,We=Pe.level,Be=Pe.mode,Je=Pe.prefixCls,it=Pe.theme;if(We!==1||Be!=="horizontal")return null;var pt=ke.props.children[0],ht=pt.props,yt=ht.children,Nt=ht.title,ar=ht.style,ur=Object(C.a)(ht,["children","title","style"]),hr=Object(R.a)({},ar),Er="".concat(fe,"-overflowed-indicator"),br="".concat(fe,"-overflowed-indicator");Ae.length===0&&ve!==!0?hr=Object(R.a)(Object(R.a)({},hr),{},{display:"none"}):ve&&(hr=Object(R.a)(Object(R.a)({},hr),{},{visibility:"hidden",position:"absolute"}),Er="".concat(Er,"-placeholder"),br="".concat(br,"-placeholder"));var pr=it?"".concat(Je,"-").concat(it):"",Br={};return Q.forEach(function(_r){ur[_r]!==void 0&&(Br[_r]=ur[_r])}),h.createElement(ia,Object(i.a)({title:Ne,className:"".concat(Je,"-overflowed-submenu"),popupClassName:pr},Br,{key:Er,eventKey:br,disabled:!1,style:hr}),Ae)},ke.setChildrenWidthAndResize=function(){if(ke.props.mode!=="horizontal")return;var fe=ke.childRef.current;if(!fe)return;var Ae=fe.children;if(!Ae||Ae.length===0)return;var ve=fe.children[Ae.length-1];ce(ve,"display","inline-block");var Pe=ke.getMenuItemNodes(),Ne=Pe.filter(function(We){return We.className.split(" ").indexOf(Ba)>=0});Ne.forEach(function(We){ce(We,"display","inline-block")}),ke.menuItemSizes=Pe.map(function(We){return he(We,!0)}),Ne.forEach(function(We){ce(We,"display","none")}),ke.overflowedIndicatorWidth=he(fe.children[fe.children.length-1],!0),ke.originalTotalWidth=ke.menuItemSizes.reduce(function(We,Be){return We+Be},0),ke.handleResize(),ce(ve,"display","none")},ke.handleResize=function(){if(ke.props.mode!=="horizontal")return;var fe=ke.childRef.current;if(!fe)return;var Ae=he(fe);ke.overflowedItems=[];var ve=0,Pe;ke.originalTotalWidth>Ae+Oa&&(Pe=-1,ke.menuItemSizes.forEach(function(Ne){ve+=Ne,ve+ke.overflowedIndicatorWidth<=Ae&&(Pe+=1)})),ke.setState({lastVisibleIndex:Pe})},ke}return Object(A.a)(ze,[{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 Ke.default(function(ve){ve.forEach(function(){var Pe=fe.cancelFrameId;cancelAnimationFrame(Pe),fe.cancelFrameId=requestAnimationFrame(fe.setChildrenWidthAndResize)})}),[].slice.call(Ae.children).concat(Ae).forEach(function(ve){fe.resizeObserver.observe(ve)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){fe.resizeObserver.disconnect(),[].slice.call(Ae.children).concat(Ae).forEach(function(ve){fe.resizeObserver.observe(ve)}),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,ve=this.state.lastVisibleIndex;return(fe||[]).reduce(function(Pe,Ne,We){var Be=Ne;if(Ae.props.mode==="horizontal"){var Je=Ae.getOverflowedSubMenuItem(Ne.props.eventKey,[]);ve!==void 0&&Ae.props.className.indexOf("".concat(Ae.props.prefixCls,"-root"))!==-1&&(We>ve&&(Be=h.cloneElement(Ne,{style:{display:"none"},eventKey:"".concat(Ne.props.eventKey,"-hidden"),className:"".concat(Ba)})),We===ve+1&&(Ae.overflowedItems=fe.slice(ve+1).map(function(pt){return h.cloneElement(pt,{key:pt.props.eventKey,mode:"vertical-left"})}),Je=Ae.getOverflowedSubMenuItem(Ne.props.eventKey,Ae.overflowedItems)));var it=[].concat(Object(o.a)(Pe),[Je,Be]);return We===fe.length-1&&it.push(Ae.getOverflowedSubMenuItem(Ne.props.eventKey,[],!0)),it}return[].concat(Object(o.a)(Pe),[Be])},[])}},{key:"render",value:function(){var fe=this.props,Ae=fe.visible,ve=fe.prefixCls,Pe=fe.overflowedIndicator,Ne=fe.mode,We=fe.level,Be=fe.tag,Je=fe.children,it=fe.theme,pt=Object(C.a)(fe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),ht=Be;return h.createElement(ht,Object(i.a)({ref:this.childRef},pt),this.renderChildren(Je))}}]),ze}(h.Component);ra.defaultProps={tag:"div",className:""};var Wa=ra;function Ft(Re){return Re.length?Re.every(function(Fe){return!!Fe.props.disabled}):!0}function Kt(Re,Fe,ze){var ke=Re.getState();Re.setState({activeKey:Object(R.a)(Object(R.a)({},ke.activeKey),{},Object(k.a)({},Fe,ze))})}function Gt(Re){return Re.eventKey||"0-menu-"}function gr(Re,Fe){var ze=Fe,ke=Re.children,fe=Re.eventKey;if(ze){var Ae;if(Y(ke,function(ve,Pe){ve&&ve.props&&!ve.props.disabled&&ze===Ee(ve,fe,Pe)&&(Ae=!0)}),Ae)return ze}return ze=null,Re.defaultActiveFirst&&Y(ke,function(ve,Pe){!ze&&ve&&!ve.props.disabled&&(ze=Ee(ve,fe,Pe))}),ze}function Pr(Re){if(!Re)return;var Fe=this.instanceArray.indexOf(Re);Fe!==-1?this.instanceArray[Fe]=Re:this.instanceArray.push(Re)}var Xr=function(Re){Object(x.a)(ze,Re);var Fe=Object(y.a)(ze);function ze(ke){var fe;return Object(L.a)(this,ze),fe=Fe.call(this,ke),fe.onKeyDown=function(Ae,ve){var Pe=Ae.keyCode,Ne;if(fe.getFlatInstanceArray().forEach(function(Be){Be&&Be.props.active&&Be.onKeyDown&&(Ne=Be.onKeyDown(Ae))}),Ne)return 1;var We=null;return(Pe===p.a.UP||Pe===p.a.DOWN)&&(We=fe.step(Pe===p.a.UP?-1:1)),We?(Ae.preventDefault(),Kt(fe.props.store,Gt(fe.props),We.props.eventKey),typeof ve=="function"&&ve(We),1):void 0},fe.onItemHover=function(Ae){var ve=Ae.key,Pe=Ae.hover;Kt(fe.props.store,Gt(fe.props),Pe?ve: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 ve=fe.getFlatInstanceArray(),Pe=fe.props.store.getState().activeKey[Gt(fe.props)],Ne=ve.length;if(!Ne)return null;Ae<0&&(ve=ve.concat().reverse());var We=-1;if(ve.every(function(pt,ht){return pt&&pt.props.eventKey===Pe?(We=ht,!1):!0}),!fe.props.defaultActiveFirst&&We!==-1&&Ft(ve.slice(We,Ne-1)))return;var Be=(We+1)%Ne,Je=Be;do{var it=ve[Je];if(!it||it.props.disabled)Je=(Je+1)%Ne;else return it}while(Je!==Be);return null},fe.renderCommonMenuItem=function(Ae,ve,Pe){var Ne=fe.props.store.getState(),We=Object(b.a)(fe),Be=We.props,Je=Ee(Ae,Be.eventKey,ve),it=Ae.props;if(!it||typeof Ae.type=="string")return Ae;var pt=Je===Ne.activeKey,ht=Object(R.a)(Object(R.a)({mode:it.mode||Be.mode,level:Be.level,inlineIndent:Be.inlineIndent,renderMenuItem:fe.renderMenuItem,rootPrefixCls:Be.prefixCls,index:ve,parentMenu:Be.parentMenu,manualRef:it.disabled?void 0:Object(j.a)(Ae.ref,Pr.bind(Object(b.a)(fe))),eventKey:Je,active:!it.disabled&&pt,multiple:Be.multiple,onClick:function(Nt){(it.onClick||te)(Nt),fe.onClick(Nt)},onItemHover:fe.onItemHover,motion:Be.motion,subMenuOpenDelay:Be.subMenuOpenDelay,subMenuCloseDelay:Be.subMenuCloseDelay,forceSubMenuRender:Be.forceSubMenuRender,onOpenChange:fe.onOpenChange,onDeselect:fe.onDeselect,onSelect:fe.onSelect,builtinPlacements:Be.builtinPlacements,itemIcon:it.itemIcon||fe.props.itemIcon,expandIcon:it.expandIcon||fe.props.expandIcon},Pe),{},{direction:Be.direction});return(Be.mode==="inline"||Se())&&(ht.triggerSubMenuAction="click"),h.cloneElement(Ae,Object(R.a)(Object(R.a)({},ht),{},{key:Je||ve}))},fe.renderMenuItem=function(Ae,ve,Pe){if(!Ae)return null;var Ne=fe.props.store.getState(),We={openKeys:Ne.openKeys,selectedKeys:Ne.selectedKeys,triggerSubMenuAction:fe.props.triggerSubMenuAction,subMenuKey:Pe};return fe.renderCommonMenuItem(Ae,ve,We)},ke.store.setState({activeKey:Object(R.a)(Object(R.a)({},ke.store.getState().activeKey),{},Object(k.a)({},ke.eventKey,gr(ke,ke.activeKey)))}),fe.instanceArray=[],fe}return Object(A.a)(ze,[{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,ve="activeKey"in Ae?Ae.activeKey:Ae.store.getState().activeKey[Gt(Ae)],Pe=gr(Ae,ve);if(Pe!==ve)Kt(Ae.store,Gt(Ae),Pe);else if("activeKey"in fe){var Ne=gr(fe,fe.activeKey);Pe!==Ne&&Kt(Ae.store,Gt(Ae),Pe)}}},{key:"render",value:function(){var fe=this,Ae=Object(i.a)({},this.props);this.instanceArray=[];var ve=S()(Ae.prefixCls,Ae.className,"".concat(Ae.prefixCls,"-").concat(Ae.mode)),Pe={className:ve,role:Ae.role||"menu"};Ae.id&&(Pe.id=Ae.id),Ae.focusable&&(Pe.tabIndex=0,Pe.onKeyDown=this.onKeyDown);var Ne=Ae.prefixCls,We=Ae.eventKey,Be=Ae.visible,Je=Ae.level,it=Ae.mode,pt=Ae.overflowedIndicator,ht=Ae.theme;return Q.forEach(function(yt){return delete Ae[yt]}),delete Ae.onClick,h.createElement(Wa,Object(i.a)({},Ae,{prefixCls:Ne,mode:it,tag:"ul",level:Je,theme:ht,visible:Be,overflowedIndicator:pt},Pe),Object(f.a)(Ae.children).map(function(yt,Nt){return fe.renderMenuItem(yt,Nt,We||"0-menu-")}))}}]),ze}(h.Component);Xr.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:te};var Vr=Object(_.b)()(Xr),yn=Vr,rn=P("Kwbf");function xr(Re,Fe,ze){var ke=Re.prefixCls,fe=Re.motion,Ae=Re.defaultMotions,ve=Ae===void 0?{}:Ae,Pe=Re.openAnimation,Ne=Re.openTransitionName,We=Fe.switchingModeFromInline;if(fe)return fe;if(Object(K.a)(Pe)==="object"&&Pe)Object(rn.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Pe=="string")return{motionName:"".concat(ke,"-open-").concat(Pe)};if(Ne)return{motionName:Ne};var Be=ve[ze];return Be||(We?null:ve.other)}var fn=function(Re){Object(x.a)(ze,Re);var Fe=Object(y.a)(ze);function ze(ke){var fe;Object(L.a)(this,ze),fe=Fe.call(this,ke),fe.onSelect=function(Pe){var Ne=Object(b.a)(fe),We=Ne.props;if(We.selectable){var Be=fe.store.getState(),Je=Be.selectedKeys,it=Pe.key;We.multiple?Je=Je.concat([it]):Je=[it],"selectedKeys"in We||fe.store.setState({selectedKeys:Je}),We.onSelect(Object(R.a)(Object(R.a)({},Pe),{},{selectedKeys:Je}))}},fe.onClick=function(Pe){var Ne=fe.getRealMenuMode(),We=Object(b.a)(fe),Be=We.store,Je=We.props.onOpenChange;Ne!=="inline"&&!("openKeys"in fe.props)&&(Be.setState({openKeys:[]}),Je([])),fe.props.onClick(Pe)},fe.onKeyDown=function(Pe,Ne){fe.innerMenu.getWrappedInstance().onKeyDown(Pe,Ne)},fe.onOpenChange=function(Pe){var Ne=Object(b.a)(fe),We=Ne.props,Be=fe.store.getState().openKeys.concat(),Je=!1,it=function(ht){var yt=!1;if(ht.open)yt=Be.indexOf(ht.key)===-1,yt&&Be.push(ht.key);else{var Nt=Be.indexOf(ht.key);yt=Nt!==-1,yt&&Be.splice(Nt,1)}Je=Je||yt};Array.isArray(Pe)?Pe.forEach(it):it(Pe),Je&&("openKeys"in fe.props||fe.store.setState({openKeys:Be}),We.onOpenChange(Be))},fe.onDeselect=function(Pe){var Ne=Object(b.a)(fe),We=Ne.props;if(We.selectable){var Be=fe.store.getState().selectedKeys.concat(),Je=Pe.key,it=Be.indexOf(Je);it!==-1&&Be.splice(it,1),"selectedKeys"in We||fe.store.setState({selectedKeys:Be}),We.onDeselect(Object(R.a)(Object(R.a)({},Pe),{},{selectedKeys:Be}))}},fe.onMouseEnter=function(Pe){fe.restoreModeVerticalFromInline();var Ne=fe.props.onMouseEnter;Ne&&Ne(Pe)},fe.onTransitionEnd=function(Pe){var Ne=Pe.propertyName==="width"&&Pe.target===Pe.currentTarget,We=Pe.target.className,Be=Object.prototype.toString.call(We)==="[object SVGAnimatedString]"?We.animVal:We,Je=Pe.propertyName==="font-size"&&Be.indexOf("anticon")>=0;(Ne||Je)&&fe.restoreModeVerticalFromInline()},fe.setInnerMenu=function(Pe){fe.innerMenu=Pe},fe.isRootMenu=!0;var Ae=ke.defaultSelectedKeys,ve=ke.defaultOpenKeys;return"selectedKeys"in ke&&(Ae=ke.selectedKeys||[]),"openKeys"in ke&&(ve=ke.openKeys||[]),fe.store=Object(_.c)({selectedKeys:Ae,openKeys:ve,activeKey:{"0-menu-":gr(ke,ke.activeKey)}}),fe.state={switchingModeFromInline:!1,prevProps:ke,inlineOpenKeys:[],store:fe.store},fe}return Object(A.a)(ze,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(fe){var Ae=this.props,ve=Ae.siderCollapsed,Pe=Ae.inlineCollapsed,Ne=Ae.onOpenChange;(!fe.inlineCollapsed&&Pe||!fe.siderCollapsed&&ve)&&Ne([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var fe=this.props.collapsedWidth,Ae=this.store,ve=this.prevOpenKeys,Pe=this.getInlineCollapsed()&&(fe===0||fe==="0"||fe==="0px");Pe?(this.prevOpenKeys=Ae.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ve&&(this.store.setState({openKeys:ve}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var fe=this.props.mode,Ae=this.state.switchingModeFromInline,ve=this.getInlineCollapsed();return Ae&&ve?"inline":ve?"vertical":fe}},{key:"getInlineCollapsed",value:function(){var fe=this.props,Ae=fe.inlineCollapsed,ve=fe.siderCollapsed;return ve!==void 0?ve: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:xr(this.props,this.state,Ae)}),delete fe.openAnimation,delete fe.openTransitionName,h.createElement(_.a,{store:this.store},h.createElement(yn,Object(i.a)({},fe,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(fe,Ae){var ve=Ae.prevProps,Pe=Ae.store,Ne=Pe.getState(),We={},Be={prevProps:fe};return ve.mode==="inline"&&fe.mode!=="inline"&&(Be.switchingModeFromInline=!0),"openKeys"in fe?We.openKeys=fe.openKeys||[]:((fe.inlineCollapsed&&!ve.inlineCollapsed||fe.siderCollapsed&&!ve.siderCollapsed)&&(Be.switchingModeFromInline=!0,Be.inlineOpenKeys=Ne.openKeys,We.openKeys=[]),(!fe.inlineCollapsed&&ve.inlineCollapsed||!fe.siderCollapsed&&ve.siderCollapsed)&&(We.openKeys=Ae.inlineOpenKeys,Be.inlineOpenKeys=[])),Object.keys(We).length&&Pe.setState(We),Be}}]),ze}(h.Component);fn.defaultProps={selectable:!0,onClick:te,onSelect:te,onOpenChange:te,onDeselect:te,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 fa=fn,hn=function(Re){Object(x.a)(ze,Re);var Fe=Object(y.a)(ze);function ze(){var ke;return Object(L.a)(this,ze),ke=Fe.apply(this,arguments),ke.onKeyDown=function(fe){var Ae=fe.keyCode;return Ae===p.a.ENTER?(ke.onClick(fe),!0):void 0},ke.onMouseLeave=function(fe){var Ae=ke.props,ve=Ae.eventKey,Pe=Ae.onItemHover,Ne=Ae.onMouseLeave;Pe({key:ve,hover:!1}),Ne({key:ve,domEvent:fe})},ke.onMouseEnter=function(fe){var Ae=ke.props,ve=Ae.eventKey,Pe=Ae.onItemHover,Ne=Ae.onMouseEnter;Pe({key:ve,hover:!0}),Ne({key:ve,domEvent:fe})},ke.onClick=function(fe){var Ae=ke.props,ve=Ae.eventKey,Pe=Ae.multiple,Ne=Ae.onClick,We=Ae.onSelect,Be=Ae.onDeselect,Je=Ae.isSelected,it={key:ve,keyPath:[ve],item:Object(b.a)(ke),domEvent:fe};Ne(it),Pe?Je?Be(it):We(it):Je||We(it)},ke.saveNode=function(fe){ke.node=fe},ke}return Object(A.a)(ze,[{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),ve=S()(this.getPrefixCls(),Ae.className,(fe={},Object(k.a)(fe,this.getActiveClassName(),!Ae.disabled&&Ae.active),Object(k.a)(fe,this.getSelectedClassName(),Ae.isSelected),Object(k.a)(fe,this.getDisabledClassName(),Ae.disabled),fe)),Pe=Object(R.a)(Object(R.a)({},Ae.attribute),{},{title:typeof Ae.title=="string"?Ae.title:void 0,className:ve,role:Ae.role||"menuitem","aria-disabled":Ae.disabled});Ae.role==="option"?Pe=Object(R.a)(Object(R.a)({},Pe),{},{role:"option","aria-selected":Ae.isSelected}):(Ae.role===null||Ae.role==="none")&&(Pe.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(Je){return delete Ae[Je]}),delete Ae.direction;var Be=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Be=h.createElement(this.props.itemIcon,this.props)),h.createElement("li",Object(i.a)({},Object(I.a)(Ae,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Pe,Ne,{style:We,ref:this.saveNode}),Ae.children,Be)}}]),ze}(h.Component);hn.isMenuItem=!0,hn.defaultProps={onSelect:te,onMouseEnter:te,onMouseLeave:te,manualRef:te};var oa=Object(_.b)(function(Re,Fe){var ze=Re.activeKey,ke=Re.selectedKeys,fe=Fe.eventKey,Ae=Fe.subMenuKey;return{active:ze[Ae]===fe,isSelected:Array.isArray(ke)?ke.indexOf(fe)!==-1:ke===fe}})(hn),sa=oa,ba=function(Re){Object(x.a)(ze,Re);var Fe=Object(y.a)(ze);function ze(){var ke;return Object(L.a)(this,ze),ke=Fe.apply(this,arguments),ke.renderInnerMenuItem=function(fe){var Ae=ke.props,ve=Ae.renderMenuItem,Pe=Ae.index;return ve(fe,Pe,ke.props.subMenuKey)},ke}return Object(A.a)(ze,[{key:"render",value:function(){var fe=Object(i.a)({},this.props),Ae=fe.className,ve=Ae===void 0?"":Ae,Pe=fe.rootPrefixCls,Ne="".concat(Pe,"-item-group-title"),We="".concat(Pe,"-item-group-list"),Be=fe.title,Je=fe.children;return Q.forEach(function(it){return delete fe[it]}),delete fe.direction,h.createElement("li",Object(i.a)({},fe,{onClick:function(pt){return pt.stopPropagation()},className:"".concat(ve," ").concat(Pe,"-item-group")}),h.createElement("div",{className:Ne,title:typeof Be=="string"?Be:void 0},Be),h.createElement("ul",{className:We},h.Children.map(Je,this.renderInnerMenuItem)))}}]),ze}(h.Component);ba.isMenuItemGroup=!0,ba.defaultProps={disabled:!0};var hi=ba,Ha=function(Fe){var ze=Fe.className,ke=Fe.rootPrefixCls,fe=Fe.style;return h.createElement("li",{className:"".concat(ze," ").concat(ke,"-item-divider"),style:fe})};Ha.defaultProps={disabled:!0,className:"",style:{}};var Ci=Ha,ni=fa,ai=P("eDIo");function pi(Re,Fe){var ze=Re.prefixCls,ke=Re.editable,fe=Re.locale,Ae=Re.style;return!ke||ke.showAdd===!1?null:h.createElement("button",{ref:Fe,type:"button",className:"".concat(ze,"-nav-add"),style:Ae,"aria-label":(fe==null?void 0:fe.addAriaLabel)||"Add tab",onClick:function(Pe){ke.onEdit("add",{event:Pe})}},ke.addIcon||"+")}var Aa=h.forwardRef(pi);function Ia(Re,Fe){var ze=Re.prefixCls,ke=Re.id,fe=Re.tabs,Ae=Re.locale,ve=Re.mobile,Pe=Re.moreIcon,Ne=Pe===void 0?"More":Pe,We=Re.moreTransitionName,Be=Re.style,Je=Re.className,it=Re.editable,pt=Re.tabBarGutter,ht=Re.rtl,yt=Re.onTabClick,Nt=Object(h.useState)(!1),ar=Object(u.a)(Nt,2),ur=ar[0],hr=ar[1],Er=Object(h.useState)(null),br=Object(u.a)(Er,2),pr=br[0],Br=br[1],_r="".concat(ke,"-more-popup"),Sn="".concat(ze,"-dropdown"),Or=pr!==null?"".concat(_r,"-").concat(pr):null,Vt=Ae==null?void 0:Ae.dropdownAriaLabel,Bt=h.createElement(ni,{onClick:function(ln){var nn=ln.key,Pn=ln.domEvent;yt(nn,Pn),hr(!1)},id:_r,tabIndex:-1,role:"listbox","aria-activedescendant":Or,selectedKeys:[pr],"aria-label":Vt!==void 0?Vt:"expanded dropdown"},fe.map(function(Yr){return h.createElement(sa,{key:Yr.key,id:"".concat(_r,"-").concat(Yr.key),role:"option","aria-controls":ke&&"".concat(ke,"-panel-").concat(Yr.key),disabled:Yr.disabled},Yr.tab)}));function Lr(Yr){for(var ln=fe.filter(function(la){return!la.disabled}),nn=ln.findIndex(function(la){return la.key===pr})||0,Pn=ln.length,Gn=0;GnHr?(Wr=Bt,_r.current="x"):(Wr=Lr,_r.current="y");var Cn=Date.now();Cn-pr.current>100&&(Br.current=!1),(Fe(-Wr,-Wr)||Br.current)&&(Vt.preventDefault(),Br.current=!0),pr.current=Cn}var Or=Object(h.useRef)(null);Or.current={onTouchStart:hr,onTouchMove:Er,onTouchEnd:br,onWheel:Sn},h.useEffect(function(){function Vt(It){Or.current.onTouchStart(It)}function Bt(It){Or.current.onTouchMove(It)}function Lr(It){Or.current.onTouchEnd(It)}function Wr(It){Or.current.onWheel(It)}return document.addEventListener("touchmove",Bt,{passive:!1}),document.addEventListener("touchend",Lr,{passive:!1}),Re.current.addEventListener("touchstart",Vt,{passive:!1}),Re.current.addEventListener("wheel",Wr),function(){document.removeEventListener("touchmove",Bt),document.removeEventListener("touchend",Lr)}},[])}function Xt(){var Re=Object(h.useRef)(new Map);function Fe(ke){return Re.current.has(ke)||Re.current.set(ke,h.createRef()),Re.current.get(ke)}function ze(ke){Re.current.delete(ke)}return[Fe,ze]}function Tt(Re,Fe){var ze=h.useRef(Re),ke=h.useState({}),fe=Object(u.a)(ke,2),Ae=fe[1];function ve(Pe){var Ne=typeof Pe=="function"?Pe(ze.current):Pe;Ne!==ze.current&&Fe(Ne,ze.current),ze.current=Ne,Ae({})}return[ze.current,ve]}var Zt=function(Fe){var ze=Fe.position,ke=Fe.prefixCls,fe=Fe.extra;if(!fe)return null;var Ae,ve=fe;return ze==="right"&&(Ae=ve.right||!ve.left&&ve||null),ze==="left"&&(Ae=ve.left||null),Ae?h.createElement("div",{className:"".concat(ke,"-extra-content")},Ae):null};function nr(Re,Fe){var ze,ke=h.useContext(ii),fe=ke.prefixCls,Ae=ke.tabs,ve=Re.className,Pe=Re.style,Ne=Re.id,We=Re.animated,Be=Re.activeKey,Je=Re.rtl,it=Re.extra,pt=Re.editable,ht=Re.locale,yt=Re.tabPosition,Nt=Re.tabBarGutter,ar=Re.children,ur=Re.onTabClick,hr=Re.onTabScroll,Er=Object(h.useRef)(),br=Object(h.useRef)(),pr=Object(h.useRef)(),Br=Object(h.useRef)(),_r=Xt(),Sn=Object(u.a)(_r,2),Or=Sn[0],Vt=Sn[1],Bt=yt==="top"||yt==="bottom",Lr=Tt(0,function(qr,Ir){Bt&&hr&&hr({direction:qr>Ir?"left":"right"})}),Wr=Object(u.a)(Lr,2),It=Wr[0],Hr=Wr[1],Cn=Tt(0,function(qr,Ir){!Bt&&hr&&hr({direction:qr>Ir?"top":"bottom"})}),Yr=Object(u.a)(Cn,2),ln=Yr[0],nn=Yr[1],Pn=Object(h.useState)(0),Gn=Object(u.a)(Pn,2),On=Gn[0],la=Gn[1],Da=Object(h.useState)(0),ha=Object(u.a)(Da,2),Xn=ha[0],bn=ha[1],un=Object(h.useState)(0),An=Object(u.a)(un,2),_n=An[0],Ra=An[1],Ya=Object(h.useState)(0),$a=Object(u.a)(Ya,2),an=$a[0],Fa=$a[1],Ja=Object(h.useState)(null),mn=Object(u.a)(Ja,2),tn=mn[0],Vn=mn[1],Co=Object(h.useState)(null),eo=Object(u.a)(Co,2),Qa=eo[0],mi=eo[1],Pi=Object(h.useState)(0),to=Object(u.a)(Pi,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,On),yi="".concat(fe,"-nav-operations-hidden"),bi=0,La=0;Bt?Je?(bi=0,La=Math.max(0,On-tn)):(bi=Math.min(0,tn-On),La=0):(bi=Math.min(0,Qa-Xn),La=0);function oi(qr){return qrLa?[La,!1]:[qr,!0]}var Za=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(Za.current)}ja(Er,function(qr,Ir){var Yn=!1;function ma(xi,Ka){xi(function(Li){var ei=oi(Li+Ka),$n=Object(u.a)(ei,2),Wi=$n[0],so=$n[1];return Yn=so,Wi})}if(Bt){if(tn>=On)return Yn;ma(Hr,qr)}else{if(Qa>=Xn)return Yn;ma(nn,Ir)}return io(),Ui(),Yn}),Object(h.useEffect)(function(){return io(),ji&&(Za.current=window.setTimeout(function(){ao(0)},100)),io},[ji]);function qa(){var qr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Be,Ir=Oi.get(qr);if(!Ir)return;if(Bt){var Yn=It;Je?Ir.rightIt+tn&&(Yn=Ir.right+Ir.width-tn):Ir.left<-It?Yn=-Ir.left:Ir.left+Ir.width>-It+tn&&(Yn=-(Ir.left+Ir.width-tn)),nn(0),Hr(oi(Yn)[0])}else{var ma=ln;Ir.top<-ln?ma=-Ir.top:Ir.top+Ir.height>-ln+Qa&&(ma=-(Ir.top+Ir.height-Qa)),Hr(0),nn(oi(ma)[0])}}var li=v(Oi,{width:tn,height:Qa,left:It,top:ln},{width:_n,height:an},{width:Ii,height:ro},Object(R.a)(Object(R.a)({},Re),{},{tabs:Ae})),Oo=Object(u.a)(li,2),Jo=Oo[0],Qo=Oo[1],Zo=Ae.map(function(qr){var Ir=qr.key;return h.createElement(n,{id:Ne,prefixCls:fe,key:Ir,rtl:Je,tab:qr,closable:qr.closable,editable:pt,active:Ir===Be,tabPosition:yt,tabBarGutter:Nt,renderWrapper:ar,removeAriaLabel:ht==null?void 0:ht.removeAriaLabel,ref:Or(Ir),onClick:function(ma){ur(Ir,ma)},onRemove:function(){Vt(Ir)},onFocus:function(){qa(Ir),Ui(),Je||(Er.current.scrollLeft=0),Er.current.scrollTop=0}})}),oo=m(function(){var qr,Ir,Yn,ma,xi,Ka,Li,ei,$n,Wi=((qr=Er.current)===null||qr===void 0?void 0:qr.offsetWidth)||0,so=((Ir=Er.current)===null||Ir===void 0?void 0:Ir.offsetHeight)||0,lo=((Yn=Br.current)===null||Yn===void 0?void 0:Yn.offsetWidth)||0,ga=((ma=Br.current)===null||ma===void 0?void 0:ma.offsetHeight)||0,Qr=((xi=pr.current)===null||xi===void 0?void 0:xi.offsetWidth)||0,ka=((Ka=pr.current)===null||Ka===void 0?void 0:Ka.offsetHeight)||0;Vn(Wi),mi(so),Vo(lo),no(ga);var za=(((Li=br.current)===null||Li===void 0?void 0:Li.offsetWidth)||0)-lo,Ga=(((ei=br.current)===null||ei===void 0?void 0:ei.offsetHeight)||0)-ga;la(za),bn(Ga);var uo=($n=pr.current)===null||$n===void 0?void 0:$n.className.includes(yi);Ra(za-(uo?0:Qr)),Fa(Ga-(uo?0:ka)),Ni(function(){var Hi=new Map;return Ae.forEach(function(Mo){var ko=Mo.key,ci=Or(ko).current;ci&&Hi.set(ko,{width:ci.offsetWidth,height:ci.offsetHeight,left:ci.offsetLeft,top:ci.offsetTop})}),Hi})}),qo=Ae.slice(0,Jo),pa=Ae.slice(Qo+1),Un=[].concat(Object(o.a)(qo),Object(o.a)(pa)),na=Object(h.useState)(),Fn=Object(u.a)(na,2),Di=Fn[0],es=Fn[1],Ma=Oi.get(Be),Ao=Object(h.useRef)();function Do(){E.a.cancel(Ao.current)}Object(h.useEffect)(function(){var qr={};return Ma&&(Bt?(Je?qr.right=Ma.right:qr.left=Ma.left,qr.width=Ma.width):(qr.top=Ma.top,qr.height=Ma.height)),Do(),Ao.current=E()(function(){es(qr)}),Do},[Ma,Bt,Je]),Object(h.useEffect)(function(){qa()},[Be,Ma,Oi,Bt]),Object(h.useEffect)(function(){oo()},[Je,Nt,Be,Ae.map(function(qr){return qr.key}).join("_")]);var Ro=!!Un.length,ui="".concat(fe,"-nav-wrap"),Fi,Ri,Lo,Bi;return Bt?Je?(Ri=It>0,Fi=It+tn>>7)^(L<<14|L>>>18)^L>>>3,b=o[i-2],x=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;o[i]=A+o[i-7]+x+o[i-16]}var y=l&c^~l&T,_=w&p^w&d^p&d,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+y+a[i]+o[i],G=I+_;v=T,T=c,c=l,l=n+M|0,n=d,d=p,p=w,w=M+G|0}m[0]=m[0]+w|0,m[1]=m[1]+p|0,m[2]=m[2]+d|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 E=this._data,g=E.words,m=this._nDataBytes*8,w=E.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,E.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var E=s.clone.call(this);return E._hash=this._hash.clone(),E}});C.SHA256=s._createHelper(r),C.HmacSHA256=s._createHmacHelper(r)}(Math),k.SHA256})},lZu9:function(N,$,P){(function(k){k(P("VrN/"),P("1eCo"),P("8EBN"))})(function(k){"use strict";k.defineMode("markdown",function(u,C){var R=k.getMode(u,"text/html"),h=R.name=="null";function s(B){if(k.findModeByName){var W=k.findModeByName(B);W&&(B=W.mime||W.mimes[0])}var F=k.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 f in S)S.hasOwnProperty(f)&&C.tokenTypeOverrides[f]&&(S[f]=C.tokenTypeOverrides[f]);var a=/^([*\-_])(?:\s*\1){2,}\s*$/,o=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,r=/^\[(x| )\](?=\s)/i,E=C.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,g=/^ {0,3}(?:\={1,}|-{2,})\s*$/,m=/^[^#!\[\]*_\\<>` "'(~:]+/,w=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,d=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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=k.innerMode(R,B.htmlState);W=F.mode.name=="xml"&&F.state.tagStart===null&&!F.state.context&&F.state.tokenize.isInText}W&&(B.f=y,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,J=T(W.prevLine.stream),ee=W.indentedCode,q=W.prevLine.hr,ye=W.list!==!1,pe=(W.listStack[W.listStack.length-1]||0)+3;W.indentedCode=!1;var le=W.indentation;if(W.indentationDiff===null&&(W.indentationDiff=W.indentation,ye)){for(W.list=null;le=4&&(ee||W.prevLine.fencedCodeEnd||W.prevLine.header||J))return B.skipToEnd(),W.indentedCode=!0,S.code;if(B.eatSpace())return null;if(F&&W.indentation<=pe&&(ie=B.match(E))&&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,b(W);if(W.indentation<=pe&&B.eat(">"))return W.quote=F?1:W.quote+1,C.highlightFormatting&&(W.formatting="quote"),B.eatSpace(),b(W);if(!xe&&!W.setext&&F&&W.indentation<=pe&&(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]),b(W)}else{if(F&&W.indentation<=pe&&(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=k.startState(W.localMode)),W.f=W.block=A,C.highlightFormatting&&(W.formatting="code-block"),W.code=-1,b(W);if(W.setext||(!Oe||!ye)&&!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,b(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 J=k.innerMode(R,W.htmlState);(J.mode.name=="xml"&&J.state.tagStart===null&&!J.state.context&&J.state.tokenize.isInText||W.md_inside&&B.current().indexOf(">")>-1)&&(W.f=y,W.block=i,W.htmlState=null)}return F}function A(B,W){var F=W.listStack[W.listStack.length-1]||0,J=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 J=(B.listStack.length-1)%3;J?J===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 x(B,W){return B.match(m,!0)?b(W):void 0}function y(B,W){var F=W.text(B,W);if(typeof F!="undefined")return F;if(W.list)return W.list=null,b(W);if(W.taskList){var J=B.match(r,!0)[1]===" ";return J?W.taskOpen=!0:W.taskClosed=!0,C.highlightFormatting&&(W.formatting="task"),W.taskList=!1,b(W)}if(W.taskOpen=!1,W.taskClosed=!1,W.header&&B.match(/^#+$/,!0))return C.highlightFormatting&&(W.formatting="header"),b(W);var ee=B.next();if(W.linkTitle){W.linkTitle=!1;var q=ee;ee==="("&&(q=")"),q=(q+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ye="^\\s*(?:[^"+q+"\\\\]+|\\\\\\\\|\\\\.)"+q;if(B.match(new RegExp(ye),!0))return S.linkHref}if(ee==="`"){var pe=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,b(W);if(le==W.code){var Oe=b(W);return W.code=0,Oe}else return W.formatting=pe,b(W)}else if(W.code)return b(W);if(ee==="\\"&&(B.next(),C.highlightFormatting)){var xe=b(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"),b(W);if(ee==="["&&W.imageMarker&&B.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return W.imageMarker=!1,W.imageAltText=!0,C.highlightFormatting&&(W.formatting="image"),b(W);if(ee==="]"&&W.imageAltText){C.highlightFormatting&&(W.formatting="image");var xe=b(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")),b(W);if(ee==="]"&&W.linkText){C.highlightFormatting&&(W.formatting="link");var xe=b(W);return W.linkText=!1,W.inline=W.f=B.match(/\(.*?\)| ?\[.*?\]/,!1)?I:y,xe}if(ee==="<"&&B.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){W.f=W.inline=_,C.highlightFormatting&&(W.formatting="link");var xe=b(W);return xe?xe+=" ":xe="",xe+S.linkInline}if(ee==="<"&&B.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){W.f=W.inline=_,C.highlightFormatting&&(W.formatting="link");var xe=b(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=k.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,Z=B.pos==1?" ":B.string.charAt(B.pos-2);be<3&&B.eat(ee);)be++;var te=B.peek()||" ",Ee=!/\s/.test(te)&&(!d.test(te)||/\s/.test(Z)||d.test(Z)),ae=!/\s/.test(Z)&&(!d.test(Z)||/\s/.test(te)||d.test(te)),Y=null,X=null;if(be%2&&(!W.em&&Ee&&(ee==="*"||!ae||d.test(Z))?Y=!0:W.em==ee&&ae&&(ee==="*"||!Ee||d.test(te))&&(Y=!1)),be>1&&(!W.strong&&Ee&&(ee==="*"||!ae||d.test(Z))?X=!0:W.strong==ee&&ae&&(ee==="*"||!Ee||d.test(te))&&(X=!1)),X!=null||Y!=null){C.highlightFormatting&&(W.formatting=Y==null?"strong":X==null?"em":"strong em"),Y===!0&&(W.em=ee),X===!0&&(W.strong=ee);var Oe=b(W);return Y===!1&&(W.em=!1),X===!1&&(W.strong=!1),Oe}}else if(ee===" "&&(B.eat("*")||B.eat("_"))){if(B.peek()===" ")return b(W);B.backUp(1)}if(C.strikethrough){if(ee==="~"&&B.eatWhile(ee)){if(W.strikethrough){C.highlightFormatting&&(W.formatting="strikethrough");var Oe=b(W);return W.strikethrough=!1,Oe}else if(B.match(/^[^\s]/,!1))return W.strikethrough=!0,C.highlightFormatting&&(W.formatting="strikethrough"),b(W)}else if(ee===" "&&B.match(/^~~/,!0)){if(B.peek()===" ")return b(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=b(W);return W.emoji=!1,Q}return ee===" "&&(B.match(/^ +$/,!1)?W.trailingSpace++:W.trailingSpace&&(W.trailingSpaceNewLine=!0)),b(W)}function _(B,W){var F=B.next();if(F===">"){W.f=W.inline=y,C.highlightFormatting&&(W.formatting="link");var J=b(W);return J?J+=" ":J="",J+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,b(W)):"error"}var j={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function M(B){return function(W,F){var J=W.next();if(J===B){F.f=F.inline=y,C.highlightFormatting&&(F.formatting="link-string");var ee=b(F);return F.linkHref=!1,ee}return W.match(j[B]),F.linkHref=!0,b(F)}}function G(B,W){return B.match(/^([^\]\\]|\\.)*\]:/,!1)?(W.f=K,B.next(),C.highlightFormatting&&(W.formatting="link"),W.linkText=!0,b(W)):l(B,W,y)}function K(B,W){if(B.match(/^\]:/,!0)){W.f=W.inline=H,C.highlightFormatting&&(W.formatting="link");var F=b(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=y,S.linkHref+" url")}var z={startState:function(){return{f:i,prevLine:{stream:null},thisLine:{stream:null},block:i,htmlState:null,indentation:0,inline:y,text:x,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&&k.copyState(R,B.htmlState),indentation:B.indentation,localMode:B.localMode,localState:B.localMode?k.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):k.Pass},blankLine:v,getType:b,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return z},"xml"),k.defineMIME("text/markdown","markdown"),k.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 $})(function(){var define,module,exports;return function(){function N($,P,k){function u(h,s){if(!P[h]){if(!$[h]){var S=typeof require=="function"&&require;if(!s&&S)return require(h,!0);if(C)return C(h,!0);var f=new Error("Cannot find module '"+h+"'");throw f.code="MODULE_NOT_FOUND",f}var a=P[h]={exports:{}};$[h][0].call(a.exports,function(o){var r=$[h][1][o];return u(r||o)},a,a.exports,N,$,P,k)}return P[h].exports}for(var C=typeof require=="function"&&require,R=0;R0&&g(I).to(M),G=this._divideParts(x,y),K=G.length,H=!1,z=function(Oe,xe){var ie=this;return new h.default(function(re,be){var Z,te,Ee,ae;return S.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(X.prev=0,Oe.isCancel()){X.next=18;break}return Z=G[xe-1],te={stream:Oe._createStream(b,Z.start,Z.end),size:Z.end-Z.start},X.next=6,S.default.awrap(Oe._uploadPart(j,_,xe,te));case 6:if(Ee=X.sent,!(!Oe.isCancel()&&!H)){X.next=15;break}if(i.doneParts.push({number:xe,etag:Ee.res.headers.etag}),!L.progress){X.next=12;break}return X.next=12,S.default.awrap(L.progress(I.length/K,i,Ee.res));case 12:re({number:xe,etag:Ee.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,Oe){return Oe+1}),W=M.map(function(le){return le.number}),F=B.filter(function(le){return W.indexOf(le)<0}),J=5,ee=L.parallel||J,pe.next=17,S.default.awrap(this._parallel(F,ee,function(le){return new h.default(function(Oe,xe){z(A,le).then(function(ie){ie&&M.push(ie),Oe()}).catch(function(ie){xe(ie)})})}));case 17:if(q=pe.sent,H=!0,!this.isCancel()){pe.next=22;break}throw z=null,this._makeCancelEvent();case 22:if(!(q&&q.length>0)){pe.next=25;break}throw q[0].message="Failed to upload some parts with error: "+q[0].toString()+" part_num: "+q[0].partNum,q[0];case 25:return pe.next=27,S.default.awrap(this.completeMultipartUpload(j,_,M,L));case 27:return pe.abrupt("return",pe.sent);case 28:case"end":return pe.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)||d(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:b,this.start=b,L=this.push(this.fileBuffer.slice(A,b))}},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(x){A.fileBuffer=k.from(new Uint8Array(x.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)||d(i))return new T(i.slice(L,A));throw new Error("_createStream requires File/Blob.")},n._getPartSize=function(i,L){var A=10*1e3,b=1024*1024;return L?Math.max(Math.ceil(i/A),L):b},n._divideParts=function(i,L){for(var A=Math.ceil(i/L),b=[],x=0;x255)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,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=C(k);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,f=P;f.putBucketVersioning=function(o,r){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},g,m,w;return u.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:if(h(o),["Enabled","Suspended"].includes(r)){d.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return g=this._bucketRequestParams("PUT",o,"versioning",E),m={VersioningConfiguration:{Status:r}},g.mime="xml",g.content=S(m,{headers:!0}),d.next=9,u.default.awrap(this.request(g));case 9:return w=d.sent,d.abrupt("return",{res:w.res,status:w.status});case 11:case"end":return d.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(N,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=C(k);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,f=N("../utils/isArray"),a=f.isArray,o=P;o.putBucketWebsite=function(E){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=arguments[2],w,p,d,n,l;return u.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:if(h(E),w=this._bucketRequestParams("PUT",E,"website",m),p={Suffix:g.index||"index.html"},d={IndexDocument:p},n={WebsiteConfiguration:d},g.supportSubDir&&(p.SupportSubDir=g.supportSubDir),g.type&&(p.Type=g.type),g.error&&(d.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:d.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,$,P){(function(k){"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}}P.encodeCallback=function(f,a){if(f.headers=f.headers||{},!Object.prototype.hasOwnProperty.call(f.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=k.from((0,h.default)(o)).toString("base64");if(f.headers["x-oss-callback"]=r,a.callback.customValue){var E={};(0,C.default)(a.callback.customValue).forEach(function(g){E["x:"+g]=a.callback.customValue[g]}),f.headers["x-oss-callback-var"]=k.from((0,h.default)(E)).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,$,P){"use strict";var k=N("babel-runtime/core-js/object/assign"),u=C(k);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 f(o,r){var E=h.parse(o);if(E.protocol||(E=h.parse("http"+(r?"s":"")+"://"+o)),E.protocol!=="http:"&&E.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return E}function a(o,r,E){var g=E?"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)}$.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=f(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,$,P){"use strict";var k=N("merge-descriptors"),u=P;k(u,N("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(N,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=C(k);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"),f=S.Base64.encode,a=P;a.processObjectSave=function(E,g,m,w){var p,d,n,l;return u.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:return o(E,"sourceObject"),o(g,"targetObject"),o(m,"process"),g=this._objectName(g),w&&h(w),p=this._objectRequestParams("POST",E,{subres:"x-oss-process"}),d=w?",b_"+f(w):"",g=f(g),n={"x-oss-process":m+"|sys/saveas,o_"+g+d},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,E){if(!r)throw new Error(E+" is required");if(typeof r!="string")throw new Error(E+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(N,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=C(k);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,f=P;f.listUploads=function(o,r){var E,g,m,w;return u.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return r=r||{},E={},R(r).to(E),E.subres="uploads",g=this._objectRequestParams("GET","",E),g.query=o,g.xmlResponse=!0,g.successStatuses=[200],d.next=10,u.default.awrap(this.request(g));case 10:return m=d.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}}),d.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 d.stop()}},null,this)},f.listParts=function(o,r,E,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=E,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)},f.abortMultipartUpload=function(o,r,E){var g,m,w;return u.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return this._stop(),E=E||{},g={},R(E).to(g),g.subres={uploadId:r},m=this._objectRequestParams("DELETE",o,g),m.successStatuses=[204],d.next=9,u.default.awrap(this.request(m));case 9:return w=d.sent,d.abrupt("return",{res:w.res});case 11:case"end":return d.stop()}},null,this)},f.initMultipartUpload=function(o,r){var E,g,m;return u.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return r=r||{},E={},R(r).to(E),E.headers=E.headers||{},this._convertMetaToHeaders(r.meta,E.headers),E.subres="uploads",g=this._objectRequestParams("POST",o,E),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)},f.uploadPart=function(o,r,E,g,m,w,p){var d;return u.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return d={stream:this._createStream(g,m,w),size:w-m},l.next=3,u.default.awrap(this._uploadPart(o,r,E,d,p));case 3:return l.abrupt("return",l.sent);case 4:case"end":return l.stop()}},null,this)},f.completeMultipartUpload=function(o,r,E,g){var m,w,p,d,n,l,c,T;return u.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:for(m=E.concat().sort(function(L,A){return L.number-A.number}).filter(function(L,A,b){return!A||L.number!==b[A-1].number}),w=` `,p=0;p `,w+=""+d.number+` `,w+=""+d.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)},f._uploadPart=function(o,r,E,g,m){var w,p,d;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:E,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(d=l.sent,d.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:d.res.headers.etag,res:d.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,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=S(k),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 f=N("../utils/checkBucketName"),a=f.checkBucketName,o=P;o.copy=function(E,g,m,w){var p,d,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",E,w),p.xmlResponse=!0,p.successStatuses=[200,304],c.next=14,u.default.awrap(this.request(p));case 14:return d=c.sent,n=d.data,n&&(n={etag:n.ETag,lastModified:n.LastModified}),c.abrupt("return",{data:n,res:d.res});case 18:case"end":return c.stop()}},null,this)},o._getSourceName=function(E,g){return typeof g=="string"?E=this._objectName(E):E[0]!=="/"?g=this.options.bucket:(g=E.replace(/\/(.+?)(\/.*)/,"$1"),E=E.replace(/(\/.+?\/)(.*)/,"$2")),a(g),E=encodeURI(E),E="/"+g+"/"+E,E}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(N,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=h(k),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=P;s.delete=function(f){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",f,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,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=h(k),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"),f=S.obj2xml,a=P;a.deleteMulti=function(r){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g,m,w,p,d,n,l,c,T,v,i,L;return u.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:if(g=[],!(!r||!r.length)){b.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),f=this._objectName(f),o=this._objectRequestParams("DELETE",f,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,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=h(k),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"),f=P;f.get=function(o,r){var E=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):E=r,E=E||{},E.subres=(0,R.default)({},E.subres),E.versionId&&(E.subres.versionId=E.versionId),E.process&&(E.subres["x-oss-process"]=E.process),w=void 0,n.prev=8,p=this._objectRequestParams("GET",o,E),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,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=h(k),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=P;s.getACL=function(f){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),f=this._objectName(f),o=this._objectRequestParams("GET",f,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,$,P){"use strict";var k=N("babel-runtime/core-js/object/keys"),u=S(k),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 f=P,a=N("../utils/isObject"),o=a.isObject,r=N("../utils/isArray"),E=r.isArray;f.getBucketVersions=g,f.listObjectVersions=g;function g(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=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 d.subres=(0,s.default)({versions:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),n=this._objectRequestParams("GET","",d),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(b){return{name:b.Key,url:v._objectUrl(b.Key),lastModified:b.LastModified,isLatest:b.IsLatest==="true",versionId:b.VersionId,etag:b.ETag,type:b.Type,size:Number(b.Size),storageClass:b.StorageClass,owner:{id:b.Owner.ID,displayName:b.Owner.DisplayName}}})),T&&(E(T)||(T=[T]),T=T.map(function(b){return{name:b.Key,lastModified:b.LastModified,versionId:b.VersionId,owner:{id:b.Owner.ID,displayName:b.Owner.DisplayName}}})),i=l.data.CommonPrefixes||null,i&&(E(i)||(i=[i]),i=i.map(function(b){return b.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]:{},d={};return o(p)&&(0,u.default)(p).forEach(function(n){d[m(n)]=p[n]}),d}},{"../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,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=h(k),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=P;s.getObjectMeta=function(f,a){var o,r;return u.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return a=a||{},f=this._objectName(f),a.subres=(0,R.default)({objectMeta:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),o=this._objectRequestParams("HEAD",f,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,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=h(k),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(a){return a&&a.__esModule?a:{default:a}}var s=P,S=N("../utils/isObject"),f=S.isObject;s.getObjectTagging=function(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E,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),E=this._objectRequestParams("GET",o,r),E.successStatuses=[200],n.next=7,u.default.awrap(this.request(E));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&&f(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,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=h(k),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=P;s.getSymlink=function(f){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,r,E;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),f=this._objectName(f),o=this._objectRequestParams("GET",f,a),o.successStatuses=[200],m.next=7,u.default.awrap(this.request(o));case 7:return r=m.sent,E=r.res.headers["x-oss-symlink-target"],m.abrupt("return",{targetName:decodeURIComponent(E),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,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=S(k),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 f=P;f.head=function(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E,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),E=this._objectRequestParams("HEAD",o,r),E.successStatuses=[200,304],p.next=6,u.default.awrap(this.request(E));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(d){d.indexOf("x-oss-meta-")===0&&(m.meta||(m.meta={}),m.meta[d.substring(11)]=g.headers[d])}),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,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=h(k),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=P;s.putACL=function(f,a,o){var r,E;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,f=this._objectName(f),r=this._objectRequestParams("PUT",f,o),r.successStatuses=[200],m.next=10,u.default.awrap(this.request(r));case 10:return E=m.sent,m.abrupt("return",{res:E.res});case 12:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(N,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=S(k),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 f=N("../utils/obj2xml"),a=f.obj2xml,o=N("../utils/checkObjectTag"),r=o.checkObjectTag,E=P;E.putObjectTagging=function(m,w){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d,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),d=this._objectRequestParams("PUT",m,p),d.successStatuses=[200],w=(0,R.default)(w).map(function(v){return{Key:v,Value:w[v]}}),n={Tagging:{TagSet:{Tag:w}}},d.mime="xml",d.content=a(n),T.next=12,u.default.awrap(this.request(d));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,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=h(k),C=N("babel-runtime/core-js/object/assign"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=P;s.putSymlink=function(f,a,o){var r,E;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),f=this._objectName(f),r=this._objectRequestParams("PUT",f,o),r.successStatuses=[200],m.next=13,u.default.awrap(this.request(r));case 13:return E=m.sent,m.abrupt("return",{res:E.res});case 15:case"end":return m.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(N,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=h(k),C=N("babel-runtime/core-js/promise"),R=h(C);function h(S){return S&&S.__esModule?S:{default:S}}var s=P;s._parallelNode=function(f,a,o,r){var E,g,m,w,p,d,n,l;return u.default.async(function(T){for(;;)switch(T.prev=T.next){case 0:E=this,g=[],m=[],w=f.length/a,p=f.length%a,d=p===0?w:(f.length-p)/a+1,n=1,l=0;case 8:if(!(l0){d=!0,n<=0&&E(g);return}n+=1,T(i.value,m(c))}l=!1}v()})},s.cancel=function(f){this.options.cancelFlag=!0,f&&this.abortMultipartUpload(f.name,f.uploadId,f.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 f={status:0,name:"cancel"};return f}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(N,$,P){(function(k){"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"),f=N("is-type-of");P.buildCanonicalizedResource=function(o,r){var E=""+o,g="?";if(f.string(r)&&r.trim()!=="")E+=g+r;else if(f.array(r))r.sort(),E+=g+r.join("&");else if(r){var m=function(d,n){return d[0]>n[0]?1:d[0]1&&arguments[1]!==void 0?arguments[1]:{},E=arguments[2],g=arguments[3],m={},w=r.subResource,p=w===void 0?{}:w;if(r.process){var d="x-oss-process";p[d]=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=k.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"]=k.from((0,C.default)(c)).toString("base64")}}var T=this.buildCanonicalString(r.method,E,{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,$,P){"use strict";Object.defineProperty(P,"__esModule",{value:!0}),P.checkBucketName=void 0,P.checkBucketName=function(k,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(k))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(N,$,P){"use strict";var k=N("babel-runtime/core-js/object/entries"),u=C(k);function C(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(P,"__esModule",{value:!0}),P.checkObjectTag=void 0;var R=N("./checkValid"),h=R.checkValid,s=N("./isObject"),S=s.isObject,f=[{validator:function(E){if(typeof E!="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(f,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(f,[{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 E=(0,u.default)(r);if(E.length>10)throw new Error("maximum of 10 tags for a object");var g=["key","value"];E.forEach(function(m){m.forEach(function(w,p){h(w,a[g[p]])})})}P.checkObjectTag=o},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(N,$,P){"use strict";Object.defineProperty(P,"__esModule",{value:!0}),P.checkValid=void 0;function k(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)})}P.checkValid=k},{}],38:[function(N,$,P){(function(k){"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(P,"__esModule",{value:!0}),P.createRequest=void 0;var h=N("./../../../shims/crypto/crypto.js"),s=N("debug")("ali-oss"),S=N("mime"),f=N("dateformat"),a=N("copy-to"),o=N("path");function r(m,w){return m[w]||m[w.toLowerCase()]}function E(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":f(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")||E(p,"Content-Type"),m.content&&(p["Content-Md5"]=h.createHash("md5").update(k.from(m.content,"utf8")).digest("base64"),p["Content-Length"]||(p["Content-Length"]=m.content.length));var d=this._getResource(m);p.authorization=this.authorization(m.method,d,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}}P.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,$,P){"use strict";var k=N("babel-runtime/core-js/object/keys"),u=h(k),C=N("babel-runtime/helpers/typeof"),R=h(C);function h(s){return s&&s.__esModule?s:{default:s}}Object.defineProperty(P,"__esModule",{value:!0}),P.deepCopy=void 0,P.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(f){S[f]=P.deepCopy(s[f])}),S}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(N,$,P){"use strict";var k=N("babel-runtime/core-js/object/keys"),u=h(k),C=N("babel-runtime/helpers/typeof"),R=h(C);function h(f){return f&&f.__esModule?f:{default:f}}Object.defineProperty(P,"__esModule",{value:!0}),P.formatObjKey=void 0;function s(f,a){if(f===null||(typeof f=="undefined"?"undefined":(0,R.default)(f))!=="object")return f;var o=void 0;if(Array.isArray(f)){o=[];for(var r=0;r `),f&&f.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}P.obj2xml=s},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(N,$,P){$.exports=k,$.exports.HttpsAgent=k;function k(){}},{}],49:[function(N,$,P){$.exports=N("./register")().Promise},{"./register":51}],50:[function(N,$,P){"use strict";var k="@@any-promise/REGISTRATION",u=null;$.exports=function(C,R){return function(s,S){s=s||null,S=S||{};var f=S.global!==!1;if(u===null&&f&&(u=C[k]||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),f&&(C[k]=u)),u}}},{}],51:[function(N,$,P){"use strict";$.exports=N("./loader")(window,k);function k(){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,$,P){$.exports={default:N("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(N,$,P){$.exports={default:N("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(N,$,P){$.exports={default:N("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(N,$,P){$.exports={default:N("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(N,$,P){$.exports={default:N("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(N,$,P){$.exports={default:N("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(N,$,P){$.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,$,P){$.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,$,P){$.exports={default:N("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(N,$,P){$.exports={default:N("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(N,$,P){$.exports={default:N("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(N,$,P){$.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,$,P){$.exports={default:N("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(N,$,P){$.exports={default:N("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(N,$,P){$.exports={default:N("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(N,$,P){"use strict";P.__esModule=!0;var k=N("../core-js/symbol/iterator"),u=s(k),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}}P.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,$,P){$.exports=N("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(N,$,P){"use strict";P.byteLength=f,P.toByteArray=o,P.fromByteArray=g;for(var k=[],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 d=p===w?0:4-p%4;return[p,d]}function f(m){var w=S(m),p=w[0],d=w[1];return(p+d)*3/4-d}function a(m,w,p){return(w+p)*3/4-p}function o(m){var w,p=S(m),d=p[0],n=p[1],l=new C(a(m,d,n)),c=0,T=n>0?d-4:d,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 k[m>>18&63]+k[m>>12&63]+k[m>>6&63]+k[m&63]}function E(m,w,p){for(var d,n=[],l=w;lT?T:c+l));return d===1?(w=m[p-1],n.push(k[w>>2]+k[w<<4&63]+"==")):d===2&&(w=(m[p-2]<<8)+m[p-1],n.push(k[w>>10]+k[w>>4&63]+k[w<<2&63]+"=")),n.join("")}},{}],70:[function(N,$,P){/*! * Bowser - a browser detector * https://github.com/ded/bowser * MIT License | (c) Dustin Diaz 2015 */!function(k,u,C){typeof $!="undefined"&&$.exports?$.exports=C():typeof define=="function"&&define.amd?define(u,C):k[u]=C()}(this,"bowser",function(){var k=!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 E=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),d=/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=!E&&!n&&/macintosh/i.test(a),b=!m&&!l&&!c&&!T&&/linux/i.test(a),x=r(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),y=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:k,version:y||o(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(a)?M={name:"Opera",opera:k,version:o(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||y}:/SamsungBrowser/i.test(a)?M={name:"Samsung Internet for Android",samsungBrowser:k,version:y||o(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(a)?M={name:"NAVER Whale browser",whale:k,version:o(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(a)?M={name:"MZ Browser",mzbrowser:k,version:o(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(a)?M={name:"Opera Coast",coast:k,version:y||o(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(a)?M={name:"Focus",focus:k,version:o(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(a)?M={name:"Yandex Browser",yandexbrowser:k,version:y||o(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(a)?M={name:"UC Browser",ucbrowser:k,version:o(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(a)?M={name:"Maxthon",maxthon:k,version:o(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(a)?M={name:"Epiphany",epiphany:k,version:o(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(a)?M={name:"Puffin",puffin:k,version:o(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(a)?M={name:"Sleipnir",sleipnir:k,version:o(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(a)?M={name:"K-Meleon",kMeleon:k,version:o(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:v?(M={name:"Windows Phone",osname:"Windows Phone",windowsphone:k},x?(M.msedge=k,M.version=x):(M.msie=k,M.version=o(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(a)?M={name:"Internet Explorer",msie:k,version:o(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:d?M={name:"Chrome",osname:"Chrome OS",chromeos:k,chromeBook:k,chrome:k,version:o(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(a)?M={name:"Microsoft Edge",msedge:k,version:x}:/vivaldi/i.test(a)?M={name:"Vivaldi",vivaldi:k,version:o(/vivaldi\/(\d+(\.\d+)?)/i)||y}:l?M={name:"Sailfish",osname:"Sailfish OS",sailfish:k,version:o(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(a)?M={name:"SeaMonkey",seamonkey:k,version:o(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(a)?(M={name:"Firefox",firefox:k,version:o(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(a)&&(M.firefoxos=k,M.osname="Firefox OS")):n?M={name:"Amazon Silk",silk:k,version:o(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(a)?M={name:"PhantomJS",phantom:k,version:o(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(a)?M={name:"SlimerJS",slimer:k,version:o(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(a)||/rim\stablet/i.test(a)?M={name:"BlackBerry",osname:"BlackBerry OS",blackberry:k,version:y||o(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:T?(M={name:"WebOS",osname:"WebOS",webos:k,version:y||o(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(a)&&(M.touchpad=k)):/bada/i.test(a)?M={name:"Bada",osname:"Bada",bada:k,version:o(/dolfin\/(\d+(\.\d+)?)/i)}:c?M={name:"Tizen",osname:"Tizen",tizen:k,version:o(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||y}:/qupzilla/i.test(a)?M={name:"QupZilla",qupzilla:k,version:o(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||y}:/chromium/i.test(a)?M={name:"Chromium",chromium:k,version:o(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||y}:/chrome|crios|crmo/i.test(a)?M={name:"Chrome",chrome:k,version:o(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:m?M={name:"Android",version:y}:/safari|applewebkit/i.test(a)?(M={name:"Safari",safari:k},y&&(M.version=y)):E?(M={name:E=="iphone"?"iPhone":E=="ipad"?"iPad":"iPod"},y&&(M.version=y)):/googlebot/i.test(a)?M={name:"Googlebot",googlebot:k,version:o(/googlebot\/(\d+(\.\d+))/i)||y}: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=k):(M.name=M.name||"Webkit",M.webkit=k),!M.version&&y&&(M.version=y)):!M.opera&&/gecko\//i.test(a)&&(M.name=M.name||"Gecko",M.gecko=k,M.version=M.version||o(/gecko\/(\d+(\.\d+)?)/i)),!M.windowsphone&&(m||M.silk)?(M.android=k,M.osname="Android"):!M.windowsphone&&E?(M[E]=k,M.ios=k,M.osname="iOS"):A?(M.mac=k,M.osname="macOS"):j?(M.xbox=k,M.osname="Xbox"):L?(M.windows=k,M.osname="Windows"):b&&(M.linux=k,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,".")):E?(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||E=="ipad"||m&&(H==3||H>=4&&!I)||M.silk?M.tablet=k:(I||E=="iphone"||E=="ipod"||m||w||M.blackberry||M.webos||M.bada)&&(M.mobile=k),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=k: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=k:M.x=k,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 E=C;typeof o=="string"&&(r=o,o=void 0),o===void 0&&(o=!1),r&&(E=u(r));var g=""+E.version;for(var m in a)if(a.hasOwnProperty(m)&&E[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 f(a,o,r){return!S(a,o,r)}return C.isUnsupportedBrowser=S,C.compareVersions=s,C.check=f,C._detect=u,C.detect=u,C})},{}],71:[function(N,$,P){},{}],72:[function(N,$,P){var k=N("buffer").Buffer,u=k.isEncoding||function(f){switch(f&&f.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(f){if(f&&!u(f))throw new Error("Unknown encoding: "+f)}var R=P.StringDecoder=function(f){this.encoding=(f||"utf8").toLowerCase().replace(/[-_]/,""),C(f);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 k(6),this.charReceived=0,this.charLength=0};R.prototype.write=function(f){for(var a="";this.charLength;){var o=f.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:f.length;if(f.copy(this.charBuffer,this.charReceived,0,o),this.charReceived+=o,this.charReceived=55296&&E<=56319){this.charLength+=this.surrogateSize,a="";continue}if(this.charReceived=this.charLength=0,f.length===0)return a;break}this.detectIncompleteChar(f);var r=f.length;this.charLength&&(f.copy(this.charBuffer,0,f.length-this.charReceived,r),r-=this.charReceived),a+=f.toString(this.encoding,0,r);var r=a.length-1,E=a.charCodeAt(r);if(E>=55296&&E<=56319){var g=this.surrogateSize;return this.charLength+=g,this.charReceived+=g,this.charBuffer.copy(this.charBuffer,g,0,g),f.copy(this.charBuffer,0,0,g),a.substring(0,r)}return a},R.prototype.detectIncompleteChar=function(f){for(var a=f.length>=3?3:f.length;a>0;a--){var o=f[f.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(f){var a="";if(f&&f.length&&(a=this.write(f)),this.charReceived){var o=this.charReceived,r=this.charBuffer,E=this.encoding;a+=r.slice(0,o).toString(E)}return a};function h(f){return f.toString(this.encoding)}function s(f){this.charReceived=f.length%2,this.charLength=this.charReceived?2:0}function S(f){this.charReceived=f.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(N,$,P){(function(k,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");P.Buffer=u,P.SlowBuffer=n,P.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=k.TYPED_ARRAY_SUPPORT!==void 0?k.TYPED_ARRAY_SUPPORT:s(),P.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(Y){return!1}}function S(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(ae,Y){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(Y){return!!(Y!=null&&Y._isBuffer)},u.compare=function(Y,X){if(!u.isBuffer(Y)||!u.isBuffer(X))throw new TypeError("Arguments must be Buffers");if(Y===X)return 0;for(var Q=Y.length,he=X.length,ce=0,Se=Math.min(Q,he);ce>>1;case"base64":return Z(ae).length;default:if(Q)return se(ae).length;Y=(""+Y).toLowerCase(),Q=!0}}u.byteLength=l;function c(ae,Y,X){var Q=!1;if((Y===void 0||Y<0)&&(Y=0),Y>this.length)return"";if((X===void 0||X>this.length)&&(X=this.length),X<=0)return"";if(X>>>=0,Y>>>=0,X<=Y)return"";for(ae||(ae="utf8");;)switch(ae){case"hex":return z(this,Y,X);case"utf8":case"utf-8":return j(this,Y,X);case"ascii":return K(this,Y,X);case"latin1":case"binary":return H(this,Y,X);case"base64":return I(this,Y,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,Y,X);default:if(Q)throw new TypeError("Unknown encoding: "+ae);ae=(ae+"").toLowerCase(),Q=!0}}u.prototype._isBuffer=!0;function T(ae,Y,X){var Q=ae[Y];ae[Y]=ae[X],ae[X]=Q}u.prototype.swap16=function(){var Y=this.length;if(Y%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var X=0;X0&&(Y=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&(Y+=" ... ")),""},u.prototype.compare=function(Y,X,Q,he,ce){if(!u.isBuffer(Y))throw new TypeError("Argument must be a Buffer");if(X===void 0&&(X=0),Q===void 0&&(Q=Y?Y.length:0),he===void 0&&(he=0),ce===void 0&&(ce=this.length),X<0||Q>Y.length||he<0||ce>this.length)throw new RangeError("out of range index");if(he>=ce&&X>=Q)return 0;if(he>=ce)return-1;if(X>=Q)return 1;if(X>>>=0,Q>>>=0,he>>>=0,ce>>>=0,this===Y)return 0;for(var Se=ce-he,Ke=Q-X,Ge=Math.min(Se,Ke),Ye=this.slice(he,ce),Qe=Y.slice(X,Q),rt=0;rt2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),X=+X,isNaN(X)&&(X=he?0:ae.length-1),X<0&&(X=ae.length+X),X>=ae.length){if(he)return-1;X=ae.length-1}else if(X<0)if(he)X=0;else return-1;if(typeof Y=="string"&&(Y=u.from(Y,Q)),u.isBuffer(Y))return Y.length===0?-1:i(ae,Y,X,Q,he);if(typeof Y=="number")return Y=Y&255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?he?Uint8Array.prototype.indexOf.call(ae,Y,X):Uint8Array.prototype.lastIndexOf.call(ae,Y,X):i(ae,[Y],X,Q,he);throw new TypeError("val must be string, number or Buffer")}function i(ae,Y,X,Q,he){var ce=1,Se=ae.length,Ke=Y.length;if(Q!==void 0&&(Q=String(Q).toLowerCase(),Q==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if(ae.length<2||Y.length<2)return-1;ce=2,Se/=2,Ke/=2,X/=2}function Ge(Le,Ce){return ce===1?Le[Ce]:Le.readUInt16BE(Ce*ce)}var Ye;if(he){var Qe=-1;for(Ye=X;YeSe&&(X=Se-Ke),Ye=X;Ye>=0;Ye--){for(var rt=!0,qe=0;qehe&&(Q=he)):Q=he;var ce=Y.length;if(ce%2!==0)throw new TypeError("Invalid hex string");Q>ce/2&&(Q=ce/2);for(var Se=0;Sece)&&(Q=ce),Y.length>0&&(Q<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");he||(he="utf8");for(var Se=!1;;)switch(he){case"hex":return L(this,Y,X,Q);case"utf8":case"utf-8":return A(this,Y,X,Q);case"ascii":return b(this,Y,X,Q);case"latin1":case"binary":return x(this,Y,X,Q);case"base64":return y(this,Y,X,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,Y,X,Q);default:if(Se)throw new TypeError("Unknown encoding: "+he);he=(""+he).toLowerCase(),Se=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function I(ae,Y,X){return Y===0&&X===ae.length?C.fromByteArray(ae):C.fromByteArray(ae.slice(Y,X))}function j(ae,Y,X){X=Math.min(ae.length,X);for(var Q=[],he=Y;he239?4:ce>223?3:ce>191?2:1;if(he+Ke<=X){var Ge,Ye,Qe,rt;switch(Ke){case 1:ce<128&&(Se=ce);break;case 2:Ge=ae[he+1],(Ge&192)===128&&(rt=(ce&31)<<6|Ge&63,rt>127&&(Se=rt));break;case 3:Ge=ae[he+1],Ye=ae[he+2],(Ge&192)===128&&(Ye&192)===128&&(rt=(ce&15)<<12|(Ge&63)<<6|Ye&63,rt>2047&&(rt<55296||rt>57343)&&(Se=rt));break;case 4:Ge=ae[he+1],Ye=ae[he+2],Qe=ae[he+3],(Ge&192)===128&&(Ye&192)===128&&(Qe&192)===128&&(rt=(ce&15)<<18|(Ge&63)<<12|(Ye&63)<<6|Qe&63,rt>65535&&rt<1114112&&(Se=rt))}}Se===null?(Se=65533,Ke=1):Se>65535&&(Se-=65536,Q.push(Se>>>10&1023|55296),Se=56320|Se&1023),Q.push(Se),he+=Ke}return G(Q)}var M=4096;function G(ae){var Y=ae.length;if(Y<=M)return String.fromCharCode.apply(String,ae);for(var X="",Q=0;QQ)&&(X=Q);for(var he="",ce=Y;ceQ&&(Y=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(Y,X,Q){Y=Y|0,X=X|0,Q||W(Y,X,this.length);for(var he=this[Y],ce=1,Se=0;++Se0&&(ce*=256);)he+=this[Y+--X]*ce;return he},u.prototype.readUInt8=function(Y,X){return X||W(Y,1,this.length),this[Y]},u.prototype.readUInt16LE=function(Y,X){return X||W(Y,2,this.length),this[Y]|this[Y+1]<<8},u.prototype.readUInt16BE=function(Y,X){return X||W(Y,2,this.length),this[Y]<<8|this[Y+1]},u.prototype.readUInt32LE=function(Y,X){return X||W(Y,4,this.length),(this[Y]|this[Y+1]<<8|this[Y+2]<<16)+this[Y+3]*16777216},u.prototype.readUInt32BE=function(Y,X){return X||W(Y,4,this.length),this[Y]*16777216+(this[Y+1]<<16|this[Y+2]<<8|this[Y+3])},u.prototype.readIntLE=function(Y,X,Q){Y=Y|0,X=X|0,Q||W(Y,X,this.length);for(var he=this[Y],ce=1,Se=0;++Se=ce&&(he-=Math.pow(2,8*X)),he},u.prototype.readIntBE=function(Y,X,Q){Y=Y|0,X=X|0,Q||W(Y,X,this.length);for(var he=X,ce=1,Se=this[Y+--he];he>0&&(ce*=256);)Se+=this[Y+--he]*ce;return ce*=128,Se>=ce&&(Se-=Math.pow(2,8*X)),Se},u.prototype.readInt8=function(Y,X){return X||W(Y,1,this.length),this[Y]&128?(255-this[Y]+1)*-1:this[Y]},u.prototype.readInt16LE=function(Y,X){X||W(Y,2,this.length);var Q=this[Y]|this[Y+1]<<8;return Q&32768?Q|4294901760:Q},u.prototype.readInt16BE=function(Y,X){X||W(Y,2,this.length);var Q=this[Y+1]|this[Y]<<8;return Q&32768?Q|4294901760:Q},u.prototype.readInt32LE=function(Y,X){return X||W(Y,4,this.length),this[Y]|this[Y+1]<<8|this[Y+2]<<16|this[Y+3]<<24},u.prototype.readInt32BE=function(Y,X){return X||W(Y,4,this.length),this[Y]<<24|this[Y+1]<<16|this[Y+2]<<8|this[Y+3]},u.prototype.readFloatLE=function(Y,X){return X||W(Y,4,this.length),R.read(this,Y,!0,23,4)},u.prototype.readFloatBE=function(Y,X){return X||W(Y,4,this.length),R.read(this,Y,!1,23,4)},u.prototype.readDoubleLE=function(Y,X){return X||W(Y,8,this.length),R.read(this,Y,!0,52,8)},u.prototype.readDoubleBE=function(Y,X){return X||W(Y,8,this.length),R.read(this,Y,!1,52,8)};function F(ae,Y,X,Q,he,ce){if(!u.isBuffer(ae))throw new TypeError('"buffer" argument must be a Buffer instance');if(Y>he||Yae.length)throw new RangeError("Index out of range")}u.prototype.writeUIntLE=function(Y,X,Q,he){if(Y=+Y,X=X|0,Q=Q|0,!he){var ce=Math.pow(2,8*Q)-1;F(this,Y,X,Q,ce,0)}var Se=1,Ke=0;for(this[X]=Y&255;++Ke=0&&(Ke*=256);)this[X+Se]=Y/Ke&255;return X+Q},u.prototype.writeUInt8=function(Y,X,Q){return Y=+Y,X=X|0,Q||F(this,Y,X,1,255,0),u.TYPED_ARRAY_SUPPORT||(Y=Math.floor(Y)),this[X]=Y&255,X+1};function J(ae,Y,X,Q){Y<0&&(Y=65535+Y+1);for(var he=0,ce=Math.min(ae.length-X,2);he>>(Q?he:1-he)*8}u.prototype.writeUInt16LE=function(Y,X,Q){return Y=+Y,X=X|0,Q||F(this,Y,X,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[X]=Y&255,this[X+1]=Y>>>8):J(this,Y,X,!0),X+2},u.prototype.writeUInt16BE=function(Y,X,Q){return Y=+Y,X=X|0,Q||F(this,Y,X,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[X]=Y>>>8,this[X+1]=Y&255):J(this,Y,X,!1),X+2};function ee(ae,Y,X,Q){Y<0&&(Y=4294967295+Y+1);for(var he=0,ce=Math.min(ae.length-X,4);he>>(Q?he:3-he)*8&255}u.prototype.writeUInt32LE=function(Y,X,Q){return Y=+Y,X=X|0,Q||F(this,Y,X,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[X+3]=Y>>>24,this[X+2]=Y>>>16,this[X+1]=Y>>>8,this[X]=Y&255):ee(this,Y,X,!0),X+4},u.prototype.writeUInt32BE=function(Y,X,Q){return Y=+Y,X=X|0,Q||F(this,Y,X,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[X]=Y>>>24,this[X+1]=Y>>>16,this[X+2]=Y>>>8,this[X+3]=Y&255):ee(this,Y,X,!1),X+4},u.prototype.writeIntLE=function(Y,X,Q,he){if(Y=+Y,X=X|0,!he){var ce=Math.pow(2,8*Q-1);F(this,Y,X,Q,ce-1,-ce)}var Se=0,Ke=1,Ge=0;for(this[X]=Y&255;++Se>0)-Ge&255;return X+Q},u.prototype.writeIntBE=function(Y,X,Q,he){if(Y=+Y,X=X|0,!he){var ce=Math.pow(2,8*Q-1);F(this,Y,X,Q,ce-1,-ce)}var Se=Q-1,Ke=1,Ge=0;for(this[X+Se]=Y&255;--Se>=0&&(Ke*=256);)Y<0&&Ge===0&&this[X+Se+1]!==0&&(Ge=1),this[X+Se]=(Y/Ke>>0)-Ge&255;return X+Q},u.prototype.writeInt8=function(Y,X,Q){return Y=+Y,X=X|0,Q||F(this,Y,X,1,127,-128),u.TYPED_ARRAY_SUPPORT||(Y=Math.floor(Y)),Y<0&&(Y=255+Y+1),this[X]=Y&255,X+1},u.prototype.writeInt16LE=function(Y,X,Q){return Y=+Y,X=X|0,Q||F(this,Y,X,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[X]=Y&255,this[X+1]=Y>>>8):J(this,Y,X,!0),X+2},u.prototype.writeInt16BE=function(Y,X,Q){return Y=+Y,X=X|0,Q||F(this,Y,X,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[X]=Y>>>8,this[X+1]=Y&255):J(this,Y,X,!1),X+2},u.prototype.writeInt32LE=function(Y,X,Q){return Y=+Y,X=X|0,Q||F(this,Y,X,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[X]=Y&255,this[X+1]=Y>>>8,this[X+2]=Y>>>16,this[X+3]=Y>>>24):ee(this,Y,X,!0),X+4},u.prototype.writeInt32BE=function(Y,X,Q){return Y=+Y,X=X|0,Q||F(this,Y,X,4,2147483647,-2147483648),Y<0&&(Y=4294967295+Y+1),u.TYPED_ARRAY_SUPPORT?(this[X]=Y>>>24,this[X+1]=Y>>>16,this[X+2]=Y>>>8,this[X+3]=Y&255):ee(this,Y,X,!1),X+4};function q(ae,Y,X,Q,he,ce){if(X+Q>ae.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function ye(ae,Y,X,Q,he){return he||q(ae,Y,X,4,34028234663852886e22,-34028234663852886e22),R.write(ae,Y,X,Q,23,4),X+4}u.prototype.writeFloatLE=function(Y,X,Q){return ye(this,Y,X,!0,Q)},u.prototype.writeFloatBE=function(Y,X,Q){return ye(this,Y,X,!1,Q)};function pe(ae,Y,X,Q,he){return he||q(ae,Y,X,8,17976931348623157e292,-17976931348623157e292),R.write(ae,Y,X,Q,52,8),X+8}u.prototype.writeDoubleLE=function(Y,X,Q){return pe(this,Y,X,!0,Q)},u.prototype.writeDoubleBE=function(Y,X,Q){return pe(this,Y,X,!1,Q)},u.prototype.copy=function(Y,X,Q,he){if(Q||(Q=0),!he&&he!==0&&(he=this.length),X>=Y.length&&(X=Y.length),X||(X=0),he>0&&he=this.length)throw new RangeError("sourceStart out of bounds");if(he<0)throw new RangeError("sourceEnd out of bounds");he>this.length&&(he=this.length),Y.length-X=0;--Se)Y[Se+X]=this[Se+Q];else if(ce<1e3||!u.TYPED_ARRAY_SUPPORT)for(Se=0;Se>>0,Q=Q===void 0?this.length:Q>>>0,Y||(Y=0);var Se;if(typeof Y=="number")for(Se=X;Se55295&&X<57344){if(!he){if(X>56319){(Y-=3)>-1&&ce.push(239,191,189);continue}else if(Se+1===Q){(Y-=3)>-1&&ce.push(239,191,189);continue}he=X;continue}if(X<56320){(Y-=3)>-1&&ce.push(239,191,189),he=X;continue}X=(he-55296<<10|X-56320)+65536}else he&&((Y-=3)>-1&&ce.push(239,191,189));if(he=null,X<128){if((Y-=1)<0)break;ce.push(X)}else if(X<2048){if((Y-=2)<0)break;ce.push(X>>6|192,X&63|128)}else if(X<65536){if((Y-=3)<0)break;ce.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((Y-=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 Y=[],X=0;X>8,he=X%256,ce.push(he),ce.push(Q);return ce}function Z(ae){return C.toByteArray(Oe(ae))}function te(ae,Y,X,Q){for(var he=0;he=Y.length||he>=ae.length);++he)Y[he+X]=ae[he];return he}function Ee(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,$,P){$.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,$,P){$.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,$,P){/*! * copy-to - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */"use strict";var k=Array.prototype.slice;$.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=k.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=f[o++],r!=r)return!0}else for(;a>o;o++)if((R||o in f)&&f[o]===s)return R||o||0;return!R&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(N,$,P){var k=N("./_cof"),u=N("./_wks")("toStringTag"),C=k(function(){return arguments}())=="Arguments",R=function(h,s){try{return h[s]}catch(S){}};$.exports=function(h){var s,S,f;return h===void 0?"Undefined":h===null?"Null":typeof(S=R(s=Object(h),u))=="string"?S:C?k(s):(f=k(s))=="Object"&&typeof s.callee=="function"?"Arguments":f}},{"./_cof":98,"./_wks":166}],98:[function(N,$,P){var k={}.toString;$.exports=function(u){return k.call(u).slice(8,-1)}},{}],99:[function(N,$,P){var k=$.exports={version:"2.6.11"};typeof __e=="number"&&(__e=k)},{}],100:[function(N,$,P){"use strict";var k=N("./_object-dp"),u=N("./_property-desc");$.exports=function(C,R,h){R in C?k.f(C,R,u(0,h)):C[R]=h}},{"./_object-dp":132,"./_property-desc":146}],101:[function(N,$,P){var k=N("./_a-function");$.exports=function(u,C,R){if(k(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,$,P){$.exports=function(k){if(k==null)throw TypeError("Can't call method on "+k);return k}},{}],103:[function(N,$,P){$.exports=!N("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(N,$,P){var k=N("./_is-object"),u=N("./_global").document,C=k(u)&&k(u.createElement);$.exports=function(R){return C?u.createElement(R):{}}},{"./_global":110,"./_is-object":119}],105:[function(N,$,P){$.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(N,$,P){var k=N("./_object-keys"),u=N("./_object-gops"),C=N("./_object-pie");$.exports=function(R){var h=k(R),s=u.f;if(s)for(var S=s(R),f=C.f,a=0,o;S.length>a;)f.call(R,o=S[a++])&&h.push(o);return h}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(N,$,P){var k=N("./_global"),u=N("./_core"),C=N("./_ctx"),R=N("./_hide"),h=N("./_has"),s="prototype",S=function(f,a,o){var r=f&S.F,E=f&S.G,g=f&S.S,m=f&S.P,w=f&S.B,p=f&S.W,d=E?u:u[a]||(u[a]={}),n=d[s],l=E?k:g?k[a]:(k[a]||{})[s],c,T,v;E&&(o=a);for(c in o){if(T=!r&&l&&l[c]!==void 0,T&&h(d,c))continue;v=T?l[c]:o[c],d[c]=E&&typeof l[c]!="function"?o[c]:w&&T?C(v,k):p&&l[c]==v?function(i){var L=function(A,b,x){if(this instanceof i){switch(arguments.length){case 0:return new i;case 1:return new i(A);case 2:return new i(A,b)}return new i(A,b,x)}return i.apply(this,arguments)};return L[s]=i[s],L}(v):m&&typeof v=="function"?C(Function.call,v):v,m&&((d.virtual||(d.virtual={}))[c]=v,f&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,$.exports=S},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(N,$,P){$.exports=function(k){try{return!!k()}catch(u){return!0}}},{}],109:[function(N,$,P){var k=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={},f={},P=$.exports=function(a,o,r,E,g){var m=g?function(){return a}:s(a),w=k(r,E,o?2:1),p=0,d,n,l,c;if(typeof m!="function")throw TypeError(a+" is not iterable!");if(C(m)){for(d=h(a.length);d>p;p++)if(c=o?w(R(n=a[p])[0],n[1]):w(a[p]),c===S||c===f)return c}else for(l=m.call(a);!(n=l.next()).done;)if(c=u(l,w,n.value,o),c===S||c===f)return c};P.BREAK=S,P.RETURN=f},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(N,$,P){var k=$.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=k)},{}],111:[function(N,$,P){var k={}.hasOwnProperty;$.exports=function(u,C){return k.call(u,C)}},{}],112:[function(N,$,P){var k=N("./_object-dp"),u=N("./_property-desc");$.exports=N("./_descriptors")?function(C,R,h){return k.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,$,P){var k=N("./_global").document;$.exports=k&&k.documentElement},{"./_global":110}],114:[function(N,$,P){$.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,$,P){$.exports=function(k,u,C){var R=C===void 0;switch(u.length){case 0:return R?k():k.call(C);case 1:return R?k(u[0]):k.call(C,u[0]);case 2:return R?k(u[0],u[1]):k.call(C,u[0],u[1]);case 3:return R?k(u[0],u[1],u[2]):k.call(C,u[0],u[1],u[2]);case 4:return R?k(u[0],u[1],u[2],u[3]):k.call(C,u[0],u[1],u[2],u[3])}return k.apply(C,u)}},{}],116:[function(N,$,P){var k=N("./_cof");$.exports=Object("z").propertyIsEnumerable(0)?Object:function(u){return k(u)=="String"?u.split(""):Object(u)}},{"./_cof":98}],117:[function(N,$,P){var k=N("./_iterators"),u=N("./_wks")("iterator"),C=Array.prototype;$.exports=function(R){return R!==void 0&&(k.Array===R||C[u]===R)}},{"./_iterators":125,"./_wks":166}],118:[function(N,$,P){var k=N("./_cof");$.exports=Array.isArray||function(C){return k(C)=="Array"}},{"./_cof":98}],119:[function(N,$,P){$.exports=function(k){return typeof k=="object"?k!==null:typeof k=="function"}},{}],120:[function(N,$,P){var k=N("./_an-object");$.exports=function(u,C,R,h){try{return h?C(k(R)[0],R[1]):C(R)}catch(S){var s=u.return;throw s!==void 0&&k(s.call(u)),S}}},{"./_an-object":95}],121:[function(N,$,P){"use strict";var k=N("./_object-create"),u=N("./_property-desc"),C=N("./_set-to-string-tag"),R={};N("./_hide")(R,N("./_wks")("iterator"),function(){return this}),$.exports=function(h,s,S){h.prototype=k(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,$,P){"use strict";var k=N("./_library"),u=N("./_export"),C=N("./_redefine"),R=N("./_hide"),h=N("./_iterators"),s=N("./_iter-create"),S=N("./_set-to-string-tag"),f=N("./_object-gpo"),a=N("./_wks")("iterator"),o=!([].keys&&"next"in[].keys()),r="@@iterator",E="keys",g="values",m=function(){return this};$.exports=function(w,p,d,n,l,c,T){s(d,p,n);var v=function(K){if(!o&&K in b)return b[K];switch(K){case E:return function(){return new d(this,K)};case g:return function(){return new d(this,K)}}return function(){return new d(this,K)}},i=p+" Iterator",L=l==g,A=!1,b=w.prototype,x=b[a]||b[r]||l&&b[l],y=x||v(l),_=l?L?v("entries"):y:void 0,I=p=="Array"&&b.entries||x,j,M,G;if(I&&(G=f(I.call(new w)),G!==Object.prototype&&G.next&&(S(G,i,!0),!k&&typeof G[a]!="function"&&R(G,a,m))),L&&x&&x.name!==g&&(A=!0,y=function(){return x.call(this)}),(!k||T)&&(o||A||!b[a])&&R(b,a,y),h[p]=y,h[i]=m,l)if(j={values:L?y:v(g),keys:c?y:v(E),entries:_},T)for(M in j)M in b||C(b,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,$,P){var k=N("./_wks")("iterator"),u=!1;try{var C=[7][k]();C.return=function(){u=!0},Array.from(C,function(){throw 2})}catch(R){}$.exports=function(R,h){if(!h&&!u)return!1;var s=!1;try{var S=[7],f=S[k]();f.next=function(){return{done:s=!0}},S[k]=function(){return f},R(S)}catch(a){}return s}},{"./_wks":166}],124:[function(N,$,P){$.exports=function(k,u){return{value:u,done:!!k}}},{}],125:[function(N,$,P){$.exports={}},{}],126:[function(N,$,P){$.exports=!0},{}],127:[function(N,$,P){var k=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({}))}),f=function(g){R(g,k,{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,k)){if(!s(g))return"F";if(!m)return"E";f(g)}return g[k].i},o=function(g,m){if(!C(g,k)){if(!s(g))return!0;if(!m)return!1;f(g)}return g[k].w},r=function(g){return S&&E.NEED&&s(g)&&!C(g,k)&&f(g),g},E=$.exports={KEY:k,NEED:!1,fastKey:a,getWeak:o,onFreeze:r}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(N,$,P){var k=N("./_global"),u=N("./_task").set,C=k.MutationObserver||k.WebKitMutationObserver,R=k.process,h=k.Promise,s=N("./_cof")(R)=="process";$.exports=function(){var S,f,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():f=void 0,p}}f=void 0,m&&m.enter()};if(s)a=function(){R.nextTick(o)};else if(C&&!(k.navigator&&k.navigator.standalone)){var r=!0,E=document.createTextNode("");new C(o).observe(E,{characterData:!0}),a=function(){E.data=r=!r}}else if(h&&h.resolve){var g=h.resolve(void 0);a=function(){g.then(o)}}else a=function(){u.call(k,o)};return function(m){var w={fn:m,next:void 0};f&&(f.next=w),S||(S=w,a()),f=w}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(N,$,P){"use strict";var k=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=k(R),this.reject=k(h)}$.exports.f=function(C){return new u(C)}},{"./_a-function":92}],130:[function(N,$,P){"use strict";var k=N("./_descriptors"),u=N("./_object-keys"),C=N("./_object-gops"),R=N("./_object-pie"),h=N("./_to-object"),s=N("./_iobject"),S=Object.assign;$.exports=!S||N("./_fails")(function(){var f={},a={},o=Symbol(),r="abcdefghijklmnopqrst";return f[o]=7,r.split("").forEach(function(E){a[E]=E}),S({},f)[o]!=7||Object.keys(S({},a)).join("")!=r})?function(a,o){for(var r=h(a),E=arguments.length,g=1,m=C.f,w=R.f;E>g;)for(var p=s(arguments[g++]),d=m?u(p).concat(m(p)):u(p),n=d.length,l=0,c;n>l;)c=d[l++],(!k||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,$,P){var k=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 f=N("./_dom-create")("iframe"),a=C.length,o="<",r=">",E;for(f.style.display="none",N("./_html").appendChild(f),f.src="javascript:",E=f.contentWindow.document,E.open(),E.write(o+"script"+r+"document.F=Object"+o+"/script"+r),E.close(),S=E.F;a--;)delete S[s][C[a]];return S()};$.exports=Object.create||function(a,o){var r;return a!==null?(h[s]=k(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,$,P){var k=N("./_an-object"),u=N("./_ie8-dom-define"),C=N("./_to-primitive"),R=Object.defineProperty;P.f=N("./_descriptors")?Object.defineProperty:function(s,S,f){if(k(s),S=C(S,!0),k(f),u)try{return R(s,S,f)}catch(a){}if("get"in f||"set"in f)throw TypeError("Accessors not supported!");return"value"in f&&(s[S]=f.value),s}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(N,$,P){var k=N("./_object-dp"),u=N("./_an-object"),C=N("./_object-keys");$.exports=N("./_descriptors")?Object.defineProperties:function(h,s){u(h);for(var S=C(s),f=S.length,a=0,o;f>a;)k.f(h,o=S[a++],s[o]);return h}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(N,$,P){var k=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;P.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(!k.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,$,P){var k=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()}};$.exports.f=function(S){return R&&C.call(S)=="[object Window]"?h(S):u(k(S))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(N,$,P){var k=N("./_object-keys-internal"),u=N("./_enum-bug-keys").concat("length","prototype");P.f=Object.getOwnPropertyNames||function(R){return k(R,u)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(N,$,P){P.f=Object.getOwnPropertySymbols},{}],138:[function(N,$,P){var k=N("./_has"),u=N("./_to-object"),C=N("./_shared-key")("IE_PROTO"),R=Object.prototype;$.exports=Object.getPrototypeOf||function(h){return h=u(h),k(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,$,P){var k=N("./_has"),u=N("./_to-iobject"),C=N("./_array-includes")(!1),R=N("./_shared-key")("IE_PROTO");$.exports=function(h,s){var S=u(h),f=0,a=[],o;for(o in S)o!=R&&(k(S,o)&&a.push(o));for(;s.length>f;)k(S,o=s[f++])&&(~C(a,o)||a.push(o));return a}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(N,$,P){var k=N("./_object-keys-internal"),u=N("./_enum-bug-keys");$.exports=Object.keys||function(R){return k(R,u)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(N,$,P){P.f={}.propertyIsEnumerable},{}],142:[function(N,$,P){var k=N("./_export"),u=N("./_core"),C=N("./_fails");$.exports=function(R,h){var s=(u.Object||{})[R]||Object[R],S={};S[R]=h(s),k(k.S+k.F*C(function(){s(1)}),"Object",S)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(N,$,P){var k=N("./_descriptors"),u=N("./_object-keys"),C=N("./_to-iobject"),R=N("./_object-pie").f;$.exports=function(h){return function(s){for(var S=C(s),f=u(S),a=f.length,o=0,r=[],E;a>o;)E=f[o++],(!k||R.call(S,E))&&r.push(h?[E,S[E]]:S[E]);return r}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(N,$,P){$.exports=function(k){try{return{e:!1,v:k()}}catch(u){return{e:!0,v:u}}}},{}],145:[function(N,$,P){var k=N("./_an-object"),u=N("./_is-object"),C=N("./_new-promise-capability");$.exports=function(R,h){if(k(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,$,P){$.exports=function(k,u){return{enumerable:!(k&1),configurable:!(k&2),writable:!(k&4),value:u}}},{}],147:[function(N,$,P){var k=N("./_hide");$.exports=function(u,C,R){for(var h in C)R&&u[h]?u[h]=C[h]:k(u,h,C[h]);return u}},{"./_hide":112}],148:[function(N,$,P){$.exports=N("./_hide")},{"./_hide":112}],149:[function(N,$,P){"use strict";var k=N("./_global"),u=N("./_core"),C=N("./_object-dp"),R=N("./_descriptors"),h=N("./_wks")("species");$.exports=function(s){var S=typeof u[s]=="function"?u[s]:k[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,$,P){var k=N("./_object-dp").f,u=N("./_has"),C=N("./_wks")("toStringTag");$.exports=function(R,h,s){R&&!u(R=s?R:R.prototype,C)&&k(R,C,{configurable:!0,value:h})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(N,$,P){var k=N("./_shared")("keys"),u=N("./_uid");$.exports=function(C){return k[C]||(k[C]=u(C))}},{"./_shared":152,"./_uid":162}],152:[function(N,$,P){var k=N("./_core"),u=N("./_global"),C="__core-js_shared__",R=u[C]||(u[C]={});($.exports=function(h,s){return R[h]||(R[h]=s!==void 0?s:{})})("versions",[]).push({version:k.version,mode:N("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(N,$,P){var k=N("./_an-object"),u=N("./_a-function"),C=N("./_wks")("species");$.exports=function(R,h){var s=k(R).constructor,S;return s===void 0||(S=k(s)[C])==null?h:u(S)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(N,$,P){var k=N("./_to-integer"),u=N("./_defined");$.exports=function(C){return function(R,h){var s=String(u(R)),S=k(h),f=s.length,a,o;return S<0||S>=f?C?"":void 0:(a=s.charCodeAt(S),a<55296||a>56319||S+1===f||(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,$,P){var k=N("./_ctx"),u=N("./_invoke"),C=N("./_html"),R=N("./_dom-create"),h=N("./_global"),s=h.process,S=h.setImmediate,f=h.clearImmediate,a=h.MessageChannel,o=h.Dispatch,r=0,E={},g="onreadystatechange",m,w,p,d=function(){var l=+this;if(E.hasOwnProperty(l)){var c=E[l];delete E[l],c()}},n=function(l){d.call(l.data)};(!S||!f)&&(S=function(c){for(var T=[],v=1;arguments.length>v;)T.push(arguments[v++]);return E[++r]=function(){u(typeof c=="function"?c:Function(c),T)},m(r),r},f=function(c){delete E[c]},N("./_cof")(s)=="process"?m=function(l){s.nextTick(k(d,l,1))}:o&&o.now?m=function(l){o.now(k(d,l,1))}:a?(w=new a,p=w.port2,w.port1.onmessage=n,m=k(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),d.call(l)}}:m=function(l){setTimeout(k(d,l,1),0)}),$.exports={set:S,clear:f}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(N,$,P){var k=N("./_to-integer"),u=Math.max,C=Math.min;$.exports=function(R,h){return R=k(R),R<0?u(R+h,0):C(R,h)}},{"./_to-integer":157}],157:[function(N,$,P){var k=Math.ceil,u=Math.floor;$.exports=function(C){return isNaN(C=+C)?0:(C>0?u:k)(C)}},{}],158:[function(N,$,P){var k=N("./_iobject"),u=N("./_defined");$.exports=function(C){return k(u(C))}},{"./_defined":102,"./_iobject":116}],159:[function(N,$,P){var k=N("./_to-integer"),u=Math.min;$.exports=function(C){return C>0?u(k(C),9007199254740991):0}},{"./_to-integer":157}],160:[function(N,$,P){var k=N("./_defined");$.exports=function(u){return Object(k(u))}},{"./_defined":102}],161:[function(N,$,P){var k=N("./_is-object");$.exports=function(u,C){if(!k(u))return u;var R,h;if(C&&typeof(R=u.toString)=="function"&&!k(h=R.call(u)))return h;if(typeof(R=u.valueOf)=="function"&&!k(h=R.call(u)))return h;if(!C&&typeof(R=u.toString)=="function"&&!k(h=R.call(u)))return h;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(N,$,P){var k=0,u=Math.random();$.exports=function(C){return"Symbol(".concat(C===void 0?"":C,")_",(++k+u).toString(36))}},{}],163:[function(N,$,P){var k=N("./_global"),u=k.navigator;$.exports=u&&u.userAgent||""},{"./_global":110}],164:[function(N,$,P){var k=N("./_global"),u=N("./_core"),C=N("./_library"),R=N("./_wks-ext"),h=N("./_object-dp").f;$.exports=function(s){var S=u.Symbol||(u.Symbol=C?{}:k.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,$,P){P.f=N("./_wks")},{"./_wks":166}],166:[function(N,$,P){var k=N("./_shared")("wks"),u=N("./_uid"),C=N("./_global").Symbol,R=typeof C=="function",h=$.exports=function(s){return k[s]||(k[s]=R&&C[s]||(R?C:u)("Symbol."+s))};h.store=k},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(N,$,P){var k=N("./_classof"),u=N("./_wks")("iterator"),C=N("./_iterators");$.exports=N("./_core").getIteratorMethod=function(R){if(R!=null)return R[u]||R["@@iterator"]||C[k(R)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(N,$,P){"use strict";var k=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"),f=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),E=typeof this=="function"?this:Array,g=arguments.length,m=g>1?arguments[1]:void 0,w=m!==void 0,p=0,d=f(r),n,l,c,T;if(w&&(m=k(m,g>2?arguments[2]:void 0,2)),d!=null&&!(E==Array&&h(d)))for(T=d.call(r),l=new E;!(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 E(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,$,P){"use strict";var k=N("./_add-to-unscopables"),u=N("./_iter-step"),C=N("./_iterators"),R=N("./_to-iobject");$.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,k("keys"),k("values"),k("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(N,$,P){"use strict";var k=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"||!k(h))return!1;if(!k(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,$,P){var k=N("./_export");k(k.S+k.F,"Object",{assign:N("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(N,$,P){var k=N("./_export");k(k.S,"Object",{create:N("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(N,$,P){var k=N("./_export");k(k.S+k.F*!N("./_descriptors"),"Object",{defineProperty:N("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(N,$,P){N("./_object-sap")("getOwnPropertyNames",function(){return N("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(N,$,P){var k=N("./_to-object"),u=N("./_object-gpo");N("./_object-sap")("getPrototypeOf",function(){return function(R){return u(k(R))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(N,$,P){var k=N("./_to-object"),u=N("./_object-keys");N("./_object-sap")("keys",function(){return function(R){return u(k(R))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(N,$,P){arguments[4][71][0].apply(P,arguments)},{dup:71}],178:[function(N,$,P){"use strict";var k=N("./_library"),u=N("./_global"),C=N("./_ctx"),R=N("./_classof"),h=N("./_export"),s=N("./_is-object"),S=N("./_a-function"),f=N("./_an-instance"),a=N("./_for-of"),o=N("./_species-constructor"),r=N("./_task").set,E=N("./_microtask")(),g=N("./_new-promise-capability"),m=N("./_perform"),w=N("./_user-agent"),p=N("./_promise-resolve"),d="Promise",n=u.TypeError,l=u.process,c=l&&l.versions,T=c&&c.v8||"",v=u[d],i=R(l)=="process",L=function(){},A,b,x,y,_=b=g.f,I=!!function(){try{var W=v.resolve(1),F=(W.constructor={})[N("./_wks")("species")]=function(J){J(L,L)};return(i||typeof PromiseRejectionEvent=="function")&&W.then(L)instanceof F&&T.indexOf("6.6")!==0&&w.indexOf("Chrome/66")===-1}catch(J){}}(),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 J=W._c;E(function(){for(var ee=W._v,q=W._s==1,ye=0,pe=function(le){var Oe=q?le.ok:le.fail,xe=le.resolve,ie=le.reject,se=le.domain,re,be,Z;try{Oe?(q||(W._h==2&&H(W),W._h=1),Oe===!0?re=ee:(se&&se.enter(),re=Oe(ee),se&&(se.exit(),Z=!0)),re===le.promise?ie(n("Promise-chain cycle")):(be=j(re))?be.call(re,xe,ie):xe(re)):ie(ee)}catch(te){se&&!Z&&se.exit(),ie(te)}};J.length>ye;)pe(J[ye++]);W._c=[],W._n=!1,F&&!W._h&&G(W)})},G=function(W){r.call(u,function(){var F=W._v,J=K(W),ee,q,ye;if(J&&(ee=m(function(){i?l.emit("unhandledRejection",F,W):(q=u.onunhandledrejection)?q({promise:W,reason:F}):(ye=u.console)&&ye.error&&ye.error("Unhandled promise rejection",F)}),W._h=i||K(W)?2:1),W._a=void 0,J&&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,J;if(F._d)return;F._d=!0,F=F._w||F;try{if(F===W)throw n("Promise can't be resolved itself");(J=j(W))?E(function(){var ee={_w:F,_d:!1};try{J.call(W,C(B,ee,1),C(z,ee,1))}catch(q){z.call(ee,q)}}):(F._v=W,F._s=1,M(F,!1))}catch(ee){z.call({_w:F,_d:!1},ee)}};I||(v=function(F){f(this,v,d,"_h"),S(F),A.call(this);try{F(C(B,this,1),C(z,this,1))}catch(J){z.call(this,J)}},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,J){var ee=_(o(this,v));return ee.ok=typeof F=="function"?F:!0,ee.fail=typeof J=="function"&&J,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)}}),x=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===y?new x(W):b(W)}),h(h.G+h.W+h.F*!I,{Promise:v}),N("./_set-to-string-tag")(v,d),N("./_set-species")(d),y=N("./_core")[d],h(h.S+h.F*!I,d,{reject:function(F){var J=_(this),ee=J.reject;return ee(F),J.promise}}),h(h.S+h.F*(k||!I),d,{resolve:function(F){return p(k&&this===y?v:this,F)}}),h(h.S+h.F*!(I&&N("./_iter-detect")(function(W){v.all(W).catch(L)})),d,{all:function(F){var J=this,ee=_(J),q=ee.resolve,ye=ee.reject,pe=m(function(){var le=[],Oe=0,xe=1;a(F,!1,function(ie){var se=Oe++,re=!1;le.push(void 0),xe++,J.resolve(ie).then(function(be){if(re)return;re=!0,le[se]=be,--xe||q(le)},ye)}),--xe||q(le)});return pe.e&&ye(pe.v),ee.promise},race:function(F){var J=this,ee=_(J),q=ee.reject,ye=m(function(){a(F,!1,function(pe){J.resolve(pe).then(ee.resolve,q)})});return ye.e&&q(ye.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,$,P){var k=N("./_export"),u=N("./_to-absolute-index"),C=String.fromCharCode,R=String.fromCodePoint;k(k.S+k.F*(!!R&&R.length!=1),"String",{fromCodePoint:function(s){for(var S=[],f=arguments.length,a=0,o;f>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,$,P){"use strict";var k=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=k(u,C),this._i+=R.length,{value:R,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(N,$,P){"use strict";var k=N("./_global"),u=N("./_has"),C=N("./_descriptors"),R=N("./_export"),h=N("./_redefine"),s=N("./_meta").KEY,S=N("./_fails"),f=N("./_shared"),a=N("./_set-to-string-tag"),o=N("./_uid"),r=N("./_wks"),E=N("./_wks-ext"),g=N("./_wks-define"),m=N("./_enum-keys"),w=N("./_is-array"),p=N("./_an-object"),d=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"),b=N("./_object-dp"),x=N("./_object-keys"),y=L.f,_=b.f,I=i.f,j=k.Symbol,M=k.JSON,G=M&&M.stringify,K="prototype",H=r("_hidden"),z=r("toPrimitive"),B={}.propertyIsEnumerable,W=f("symbol-registry"),F=f("symbols"),J=f("op-symbols"),ee=Object[K],q=typeof j=="function"&&!!A.f,ye=k.QObject,pe=!ye||!ye[K]||!ye[K].findChild,le=C&&S(function(){return v(_({},"a",{get:function(){return _(this,"a",{value:7}).a}})).a!=7})?function(ce,Se,Ke){var Ge=y(ee,Se);Ge&&delete ee[Se],_(ce,Se,Ke),Ge&&ce!==ee&&_(ee,Se,Ge)}:_,Oe=function(ce){var Se=F[ce]=v(j[K]);return Se._k=ce,Se},xe=q&&typeof j.iterator=="symbol"?function(ce){return typeof ce=="symbol"}:function(ce){return ce instanceof j},ie=function(Se,Ke,Ge){return Se===ee&&ie(J,Ke,Ge),p(Se),Ke=c(Ke,!0),p(Ge),u(F,Ke)?(Ge.enumerable?(u(Se,H)&&Se[H][Ke]&&(Se[H][Ke]=!1),Ge=v(Ge,{enumerable:T(0,!1)})):(u(Se,H)||_(Se,H,T(1,{})),Se[H][Ke]=!0),le(Se,Ke,Ge)):_(Se,Ke,Ge)},se=function(Se,Ke){p(Se);for(var Ge=m(Ke=l(Ke)),Ye=0,Qe=Ge.length,rt;Qe>Ye;)ie(Se,rt=Ge[Ye++],Ke[rt]);return Se},re=function(Se,Ke){return Ke===void 0?v(Se):se(v(Se),Ke)},be=function(Se){var Ke=B.call(this,Se=c(Se,!0));return this===ee&&u(F,Se)&&!u(J,Se)?!1:Ke||!u(this,Se)||!u(F,Se)||u(this,H)&&this[H][Se]?Ke:!0},Z=function(Se,Ke){if(Se=l(Se),Ke=c(Ke,!0),Se===ee&&u(F,Ke)&&!u(J,Ke))return;var Ge=y(Se,Ke);return Ge&&u(F,Ke)&&!(u(Se,H)&&Se[H][Ke])&&(Ge.enumerable=!0),Ge},te=function(Se){for(var Ke=I(l(Se)),Ge=[],Ye=0,Qe;Ke.length>Ye;)!u(F,Qe=Ke[Ye++])&&Qe!=H&&Qe!=s&&Ge.push(Qe);return Ge},Ee=function(Se){for(var Ke=Se===ee,Ge=I(Ke?J:l(Se)),Ye=[],Qe=0,rt;Ge.length>Qe;)u(F,rt=Ge[Qe++])&&(Ke?u(ee,rt):!0)&&Ye.push(F[rt]);return Ye};q||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var Se=o(arguments.length>0?arguments[0]:void 0),Ke=function(Ge){this===ee&&Ke.call(J,Ge),u(this,H)&&u(this[H],Se)&&(this[H][Se]=!1),le(this,Se,T(1,Ge))};return C&&pe&&le(ee,Se,{configurable:!0,set:Ke}),Oe(Se)},h(j[K],"toString",function(){return this._k}),L.f=Z,b.f=ie,N("./_object-gopn").f=i.f=te,N("./_object-pie").f=be,A.f=Ee,C&&!N("./_library")&&h(ee,"propertyIsEnumerable",be,!0),E.f=function(ce){return Oe(r(ce))}),R(R.G+R.W+R.F*!q,{Symbol:j});for(var ae="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Y=0;ae.length>Y;)r(ae[Y++]);for(var X=x(r.store),Q=0;X.length>Q;)g(X[Q++]);R(R.S+R.F*!q,"Symbol",{for:function(ce){return u(W,ce+="")?W[ce]:W[ce]=j(ce)},keyFor:function(Se){if(!xe(Se))throw TypeError(Se+" is not a symbol!");for(var Ke in W)if(W[Ke]===Se)return Ke},useSetter:function(){pe=!0},useSimple:function(){pe=!1}}),R(R.S+R.F*!q,"Object",{create:re,defineProperty:ie,defineProperties:se,getOwnPropertyDescriptor:Z,getOwnPropertyNames:te,getOwnPropertySymbols:Ee});var he=S(function(){A.f(1)});R(R.S+R.F*he,"Object",{getOwnPropertySymbols:function(Se){return A.f(n(Se))}}),M&&R(R.S+R.F*(!q||S(function(){var ce=j();return G([ce])!="[null]"||G({a:ce})!="{}"||G(Object(ce))!="{}"})),"JSON",{stringify:function(Se){for(var Ke=[Se],Ge=1,Ye,Qe;arguments.length>Ge;)Ke.push(arguments[Ge++]);return Qe=Ye=Ke[1],!d(Ye)&&Se===void 0||xe(Se)?void 0:(w(Ye)||(Ye=function(rt,qe){if(typeof Qe=="function"&&(qe=Qe.call(this,rt,qe)),!xe(qe))return qe}),Ke[1]=Ye,G.apply(M,Ke))}}),j[K][z]||N("./_hide")(j[K],z,j[K].valueOf),a(j,"Symbol"),a(Math,"Math",!0),a(k.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,$,P){var k=N("./_export"),u=N("./_object-to-array")(!0);k(k.S,"Object",{entries:function(R){return u(R)}})},{"./_export":107,"./_object-to-array":143}],183:[function(N,$,P){"use strict";var k=N("./_export"),u=N("./_core"),C=N("./_global"),R=N("./_species-constructor"),h=N("./_promise-resolve");k(k.P+k.R,"Promise",{finally:function(s){var S=R(this,u.Promise||C.Promise),f=typeof s=="function";return this.then(f?function(a){return h(S,s()).then(function(){return a})}:s,f?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,$,P){"use strict";var k=N("./_export"),u=N("./_new-promise-capability"),C=N("./_perform");k(k.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,$,P){N("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(N,$,P){N("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(N,$,P){N("./es6.array.iterator");for(var k=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(x)/60)*100+Math.abs(x)%60,4),S:["th","st","nd","rd"][l%10>3?0:(l%100-l%10!=10)*l%10],W:y,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]/;$.exports=u;function u(C){var R=""+C,h=k.exec(R);if(!h)return R;var s,S="",f=0,a=0;for(f=h.index;f0&&this._events[s].length>f&&(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},k.prototype.on=k.prototype.addListener,k.prototype.once=function(s,S){if(!u(S))throw TypeError("listener must be a function");var f=!1;function a(){this.removeListener(s,a),f||(f=!0,S.apply(this,arguments))}return a.listener=S,this.on(s,a),this},k.prototype.removeListener=function(s,S){var f,a,o,r;if(!u(S))throw TypeError("listener must be a function");if(!this._events||!this._events[s])return this;if(f=this._events[s],o=f.length,a=-1,f===S||u(f.listener)&&f.listener===S)delete this._events[s],this._events.removeListener&&this.emit("removeListener",s,S);else if(R(f)){for(r=o;r-- >0;)if(f[r]===S||f[r].listener&&f[r].listener===S){a=r;break}if(a<0)return this;f.length===1?(f.length=0,delete this._events[s]):f.splice(a,1),this._events.removeListener&&this.emit("removeListener",s,S)}return this},k.prototype.removeAllListeners=function(s){var S,f;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(f=this._events[s],u(f))this.removeListener(s,f);else if(f)for(;f.length;)this.removeListener(s,f[f.length-1]);return delete this._events[s],this},k.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},k.prototype.listenerCount=function(s){if(this._events){var S=this._events[s];if(u(S))return 1;if(S)return S.length}return 0},k.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,$,P){var k=N("http"),u=$.exports;for(var C in k)k.hasOwnProperty(C)&&(u[C]=k[C]);u.request=function(R,h){return R||(R={}),R.scheme="https",R.protocol="https:",k.request.call(this,R,h)}},{http:231}],194:[function(N,$,P){/*! * humanize-ms - index.js * Copyright(c) 2014 dead_horse * MIT Licensed */"use strict";var k=N("util"),u=N("ms");$.exports=function(C){if(typeof C=="number")return C;var R=u(C);if(R===void 0){var h=new Error(k.format("humanize-ms(%j) result undefined",C));console.warn(h.stack)}return R}},{ms:204,util:243}],195:[function(N,$,P){P.read=function(k,u,C,R,h){var s,S,f=h*8-R-1,a=(1<>1,r=-7,E=C?h-1:0,g=C?-1:1,m=k[u+E];for(E+=g,s=m&(1<<-r)-1,m>>=-r,r+=f;r>0;s=s*256+k[u+E],E+=g,r-=8);for(S=s&(1<<-r)-1,s>>=-r,r+=R;r>0;S=S*256+k[u+E],E+=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)},P.write=function(k,u,C,R,h,s){var S,f,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?(f=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+E>=1?u+=g/a:u+=g*Math.pow(2,1-E),u*a>=2&&(S++,a/=2),S+E>=r?(f=0,S=r):S+E>=1?(f=(u*a-1)*Math.pow(2,h),S=S+E):(f=u*Math.pow(2,E-1)*Math.pow(2,h),S=0));h>=8;k[C+m]=f&255,m+=w,f/=256,h-=8);for(S=S<0;k[C+m]=S&255,m+=w,S/=256,o-=8);k[C+m-w]|=p*128}},{}],196:[function(N,$,P){typeof Object.create=="function"?$.exports=function(u,C){C&&(u.super_=C,u.prototype=Object.create(C.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}))}:$.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,$,P){/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */$.exports=function(C){return C!=null&&(k(C)||u(C)||!!C._isBuffer)};function k(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"&&k(C.slice(0,0))}},{}],198:[function(N,$,P){var k={}.toString;$.exports=Array.isArray||function(u){return k.call(u)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(N,$){typeof exports=="object"&&typeof module!="undefined"?module.exports=$(N):typeof define=="function"&&define.amd?define($):$(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 $={},P=0,k=N.length;P>>6)+fromCharCode(128|$&63):fromCharCode(224|$>>>12&15)+fromCharCode(128|$>>>6&63)+fromCharCode(128|$&63)}else{var $=65536+(N.charCodeAt(0)-55296)*1024+(N.charCodeAt(1)-56320);return fromCharCode(240|$>>>18&7)+fromCharCode(128|$>>>12&63)+fromCharCode(128|$>>>6&63)+fromCharCode(128|$&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 $=[0,2,1][N.length%3],P=N.charCodeAt(0)<<16|(N.length>1?N.charCodeAt(1):0)<<8|(N.length>2?N.charCodeAt(2):0),k=[b64chars.charAt(P>>>18),b64chars.charAt(P>>>12&63),$>=2?"=":b64chars.charAt(P>>>6&63),$>=1?"=":b64chars.charAt(P&63)];return k.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 $=Object.prototype.toString.call(N)==="[object Uint8Array]";return $?N.toString("base64"):btoa(utob(String(N)))},encode=function(N,$){return $?_encode(String(N)).replace(/[+\/]/g,function(P){return P=="+"?"-":"_"}).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 $=(7&N.charCodeAt(0))<<18|(63&N.charCodeAt(1))<<12|(63&N.charCodeAt(2))<<6|63&N.charCodeAt(3),P=$-65536;return fromCharCode((P>>>10)+55296)+fromCharCode((P&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 $=N.length,P=$%4,k=($>0?b64tab[N.charAt(0)]<<18:0)|($>1?b64tab[N.charAt(1)]<<12:0)|($>2?b64tab[N.charAt(2)]<<6:0)|($>3?b64tab[N.charAt(3)]:0),u=[fromCharCode(k>>>16),fromCharCode(k>>>8&255),fromCharCode(k&255)];return u.length-=[0,0,2,1][P],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($){return $=="-"?"+":"/"}).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,$,P){/*! * merge-descriptors * Copyright(c) 2014 Jonathan Ong * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */"use strict";$.exports=u;var k=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&&k.call(C,S))return;var f=Object.getOwnPropertyDescriptor(R,S);Object.defineProperty(C,S,f)}),C}},{}],201:[function(N,$,P){"use strict";function k(){this._types=Object.create(null),this._extensions=Object.create(null);for(var u=0;u0)return S(r);if(g==="number"&&isFinite(r))return E.long?a(r):f(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 E=/^(-?(?:\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(!E)return;var g=parseFloat(E[1]),m=(E[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*k;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}function f(r){var E=Math.abs(r);return E>=R?Math.round(r/R)+"d":E>=C?Math.round(r/C)+"h":E>=u?Math.round(r/u)+"m":E>=k?Math.round(r/k)+"s":r+"ms"}function a(r){var E=Math.abs(r);return E>=R?o(r,E,R,"day"):E>=C?o(r,E,C,"hour"):E>=u?o(r,E,u,"minute"):E>=k?o(r,E,k,"second"):r+" ms"}function o(r,E,g,m){var w=E>=g*1.5;return Math.round(r/g)+" "+m+(w?"s":"")}},{}],205:[function(N,$,P){(function(k){function u(s,S){for(var f=0,a=s.length-1;a>=0;a--){var o=s[a];o==="."?s.splice(a,1):o===".."?(s.splice(a,1),f++):f&&(s.splice(a,1),f--)}if(S)for(;f--;f)s.unshift("..");return s}P.resolve=function(){for(var s="",S=!1,f=arguments.length-1;f>=-1&&!S;f--){var a=f>=0?arguments[f]:k.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||"."},P.normalize=function(s){var S=P.isAbsolute(s),f=h(s,-1)==="/";return s=u(R(s.split("/"),function(a){return!!a}),!S).join("/"),!s&&!S&&(s="."),s&&f&&(s+="/"),(S?"/":"")+s},P.isAbsolute=function(s){return s.charAt(0)==="/"},P.join=function(){var s=Array.prototype.slice.call(arguments,0);return P.normalize(R(s,function(S,f){if(typeof S!="string")throw new TypeError("Arguments to path.join must be strings");return S}).join("/"))},P.relative=function(s,S){s=P.resolve(s).substr(1),S=P.resolve(S).substr(1);function f(w){for(var p=0;p=0&&!(w[d]!=="");d--);return p>d?[]:w.slice(p,d-p+1)}for(var a=f(s.split("/")),o=f(S.split("/")),r=Math.min(a.length,o.length),E=r,g=0;g=1;--r)if(S=s.charCodeAt(r),S===47){if(!o){a=r;break}}else o=!1;return a===-1?f?"/":".":f&&a===1?"/":s.slice(0,a)};function C(s){typeof s!="string"&&(s=s+"");var S=0,f=-1,a=!0,o;for(o=s.length-1;o>=0;--o)if(s.charCodeAt(o)===47){if(!a){S=o+1;break}}else f===-1&&(a=!1,f=o+1);return f===-1?"":s.slice(S,f)}P.basename=function(s,S){var f=C(s);return S&&f.substr(-1*S.length)===S&&(f=f.substr(0,f.length-S.length)),f},P.extname=function(s){typeof s!="string"&&(s=s+"");for(var S=-1,f=0,a=-1,o=!0,r=0,E=s.length-1;E>=0;--E){var g=s.charCodeAt(E);if(g===47){if(!o){f=E+1;break}continue}a===-1&&(o=!1,a=E+1),g===46?S===-1?S=E:r!==1&&(r=1):S!==-1&&(r=-1)}return S===-1||a===-1||r===0||r===1&&S===a-1&&S===f+1?"":s.slice(S,a)};function R(s,S){if(s.filter)return s.filter(S);for(var f=[],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 P]&&P,s=u[typeof $]&&$&&!$.nodeType&&$,S=h&&s&&typeof k=="object"&&k;S&&(S.global===S||S.window===S||S.self===S)&&(C=S);var f=Math.pow(2,53)-1,a=/\bOpera/,o=this,r=Object.prototype,E=r.hasOwnProperty,g=r.toString;function m(b){return b=String(b),b.charAt(0).toUpperCase()+b.slice(1)}function w(b,x,y){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 x&&y&&/^Win/i.test(b)&&!/^Windows Phone /i.test(b)&&(_=_[/[\d.]+$/.exec(b)])&&(b="Windows "+_),b=String(b),x&&y&&(b=b.replace(RegExp(x,"i"),y)),b=d(b.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),b}function p(b,x){var y=-1,_=b?b.length:0;if(typeof _=="number"&&_>-1&&_<=f)for(;++y<_;)x(b[y],y,b);else n(b,x)}function d(b){return b=i(b),/^(?:webOS|i(?:OS|P))/.test(b)?b:m(b)}function n(b,x){for(var y in b)E.call(b,y)&&x(b[y],y,b)}function l(b){return b==null?m(b):g.call(b).slice(8,-1)}function c(b,x){var y=b!=null?typeof b[x]:"number";return!/^(?:boolean|number|string|undefined)$/.test(y)&&(y=="object"?!!b[x]:!0)}function T(b){return String(b).replace(/([ -])(?!$)/g,"$1?")}function v(b,x){var y=null;return p(b,function(_,I){y=x(y,_,I,b)}),y}function i(b){return String(b).replace(/^ +| +$/g,"")}function L(b){var x=C,y=b&&typeof b=="object"&&l(b)!="String";y&&(x=b,b=null);var _=x.navigator||{},I=_.userAgent||"";b||(b=I);var j=y||o==R,M=y?!!_.likeChrome:/\bChrome\b/.test(b)&&!/internal|\n/i.test(g.toString()),G="Object",K=y?G:"ScriptBridgingProxyObject",H=y?G:"Environment",z=y&&x.java?"JavaPackage":l(x.java),B=y?G:"RuntimeObject",W=/\bJava/.test(z)&&x.java,F=W&&l(x.environment)==H,J=W?"a":"\u03B1",ee=W?"b":"\u03B2",q=x.document||{},ye=x.operamini||x.opera,pe=a.test(pe=y&&ye?ye["[[Class]]"]:l(ye))?pe:ye=null,le,Oe=b,xe=[],ie=null,se=b==I,re=se&&ye&&typeof ye.version=="function"&&ye.version(),be,Z=X([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),te=he(["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"]),Ee=Se([{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}}),Y=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(Qe){return v(Qe,function(rt,qe){return rt||RegExp("\\b"+(qe.pattern||T(qe))+"\\b","i").exec(b)&&(qe.label||qe)})}function Q(Qe){return v(Qe,function(rt,qe,Le){return rt||(qe[Ee]||qe[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Ee)]||RegExp("\\b"+T(Le)+"(?:\\b|\\w*\\d)","i").exec(b))&&Le})}function he(Qe){return v(Qe,function(rt,qe){return rt||RegExp("\\b"+(qe.pattern||T(qe))+"\\b","i").exec(b)&&(qe.label||qe)})}function ce(Qe){return v(Qe,function(rt,qe){var Le=qe.pattern||T(qe);return!rt&&(rt=RegExp("\\b"+Le+"(?:/[\\d.]+|[ \\w.]*)","i").exec(b))&&(rt=w(rt,Le,qe.label||qe)),rt})}function Se(Qe){return v(Qe,function(rt,qe){var Le=qe.pattern||T(qe);return!rt&&(rt=RegExp("\\b"+Le+" *\\d+[.\\w_]*","i").exec(b)||RegExp("\\b"+Le+" *\\w+-[\\w]*","i").exec(b)||RegExp("\\b"+Le+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(b))&&((rt=String(qe.label&&!RegExp(Le,"i").test(qe.label)?qe.label:rt).split("/"))[1]&&!/[\d.]+/.test(rt[0])&&(rt[0]+=" "+rt[1]),qe=qe.label||qe,rt=d(rt[0].replace(RegExp(Le,"i"),qe).replace(RegExp("; *(?:"+qe+"[_-])?","i")," ").replace(RegExp("("+qe+")[-_.]?(\\w)","i"),"$1 $2"))),rt})}function Ke(Qe){return v(Qe,function(rt,qe){return rt||(RegExp(qe+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(b)||0)[1]||null})}function Ge(){return this.description||""}if(Z&&(Z=[Z]),ae&&!Ee&&(Ee=Se([ae])),(le=/\bGoogle TV\b/.exec(Ee))&&(Ee=le[0]),/\bSimulator\b/i.test(b)&&(Ee=(Ee?Ee+" ":"")+"Simulator"),te=="Opera Mini"&&/\bOPiOS\b/.test(b)&&xe.push("running in Turbo/Uncompressed mode"),te=="IE"&&/\blike iPhone OS\b/.test(b)?(le=L(b.replace(/like iPhone OS/,"")),ae=le.manufacturer,Ee=le.product):/^iP/.test(Ee)?(te||(te="Safari"),Y="iOS"+((le=/ OS ([\d_]+)/i.exec(b))?" "+le[1].replace(/_/g,"."):"")):te=="Konqueror"&&!/buntu/i.test(Y)?Y="Kubuntu":ae&&ae!="Google"&&(/Chrome/.test(te)&&!/\bMobile Safari\b/i.test(b)||/\bVita\b/.test(Ee))||/\bAndroid\b/.test(Y)&&/^Chrome/.test(te)&&/\bVersion\//i.test(b)?(te="Android Browser",Y=/\bAndroid\b/.test(Y)?Y:"Android"):te=="Silk"?(/\bMobi/i.test(b)||(Y="Android",xe.unshift("desktop mode")),/Accelerated *= *true/i.test(b)&&xe.unshift("accelerated")):te=="PaleMoon"&&(le=/\bFirefox\/([\d.]+)\b/.exec(b))?xe.push("identifying as Firefox "+le[1]):te=="Firefox"&&(le=/\b(Mobile|Tablet|TV)\b/i.exec(b))?(Y||(Y="Firefox OS"),Ee||(Ee=le[1])):!te||(le=!/\bMinefield\b/i.test(b)&&/\b(?:Firefox|Safari)\b/.exec(te))?(te&&!Ee&&/[\/,]|^[^(]+?\)/.test(b.slice(b.indexOf(le+"/")+8))&&(te=null),(le=Ee||ae||Y)&&(Ee||ae||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Y))&&(te=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Y)?Y:le)+" Browser")):te=="Electron"&&(le=(/\bChrome\/([\d.]+)\b/.exec(b)||0)[1])&&xe.push("Chromium "+le),re||(re=Ke(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",T(te),"(?:Firefox|Minefield|NetFront)"])),(le=Z=="iCab"&&parseFloat(re)>3&&"WebKit"||/\bOpera\b/.test(te)&&(/\bOPR\b/.test(b)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(b)&&!/^(?:Trident|EdgeHTML)$/.test(Z)&&"WebKit"||!Z&&/\bMSIE\b/i.test(b)&&(Y=="Mac OS"?"Tasman":"Trident")||Z=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(te)&&"NetFront")&&(Z=[le]),te=="IE"&&(le=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(b)||0)[1])?(te+=" Mobile",Y="Windows Phone "+(/\+$/.test(le)?le:le+".x"),xe.unshift("desktop mode")):/\bWPDesktop\b/i.test(b)?(te="IE Mobile",Y="Windows Phone 8.x",xe.unshift("desktop mode"),re||(re=(/\brv:([\d.]+)/.exec(b)||0)[1])):te!="IE"&&Z=="Trident"&&(le=/\brv:([\d.]+)/.exec(b))&&(te&&xe.push("identifying as "+te+(re?" "+re:"")),te="IE",re=le[1]),se){if(c(x,"global"))if(W&&(le=W.lang.System,Oe=le.getProperty("os.arch"),Y=Y||le.getProperty("os.name")+" "+le.getProperty("os.version")),F){try{re=x.require("ringo/engine").version.join("."),te="RingoJS"}catch(Qe){(le=x.system)&&le.global.system==x.system&&(te="Narwhal",Y||(Y=le[0].os||null))}te||(te="Rhino")}else typeof x.process=="object"&&!x.process.browser&&(le=x.process)&&(typeof le.versions=="object"&&(typeof le.versions.electron=="string"?(xe.push("Node "+le.versions.node),te="Electron",re=le.versions.electron):typeof le.versions.nw=="string"&&(xe.push("Chromium "+re,"Node "+le.versions.node),te="NW.js",re=le.versions.nw)),te||(te="Node.js",Oe=le.arch,Y=le.platform,re=/[\d.]+/.exec(le.version),re=re?re[0]:null));else l(le=x.runtime)==K?(te="Adobe AIR",Y=le.flash.system.Capabilities.os):l(le=x.phantom)==B?(te="PhantomJS",re=(le=le.version||null)&&le.major+"."+le.minor+"."+le.patch):typeof q.documentMode=="number"&&(le=/\bTrident\/(\d+)/i.exec(b))?(re=[re,q.documentMode],(le=+le[1]+4)!=re[1]&&(xe.push("IE "+re[1]+" mode"),Z&&(Z[1]=""),re[1]=le),re=te=="IE"?String(re[1].toFixed(1)):re[0]):typeof q.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(te)&&(xe.push("masking as "+te+" "+re),te="IE",re="11.0",Z=["Trident"],Y="Windows");Y=Y&&d(Y)}if(re&&(le=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(re)||/(?:alpha|beta)(?: ?\d)?/i.exec(b+";"+(se&&_.appMinorVersion))||/\bMinefield\b/i.test(b)&&"a")&&(ie=/b/i.test(le)?"beta":"alpha",re=re.replace(RegExp(le+"\\+?$"),"")+(ie=="beta"?ee:J)+(/\d+\+?/.exec(le)||"")),te=="Fennec"||te=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Y))te="Firefox Mobile";else if(te=="Maxthon"&&re)re=re.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ee))Ee=="Xbox 360"&&(Y=null),Ee=="Xbox 360"&&/\bIEMobile\b/.test(b)&&xe.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(te)||te&&!Ee&&!/Browser|Mobi/.test(te))&&(Y=="Windows CE"||/Mobi/i.test(b)))te+=" Mobile";else if(te=="IE"&&se)try{x.external===null&&xe.unshift("platform preview")}catch(Qe){xe.unshift("embedded")}else(/\bBlackBerry\b/.test(Ee)||/\bBB10\b/.test(b))&&(le=(RegExp(Ee.replace(/ +/g," *")+"/([.\\d]+)","i").exec(b)||0)[1]||re)?(le=[le,/BB10/.test(b)],Y=(le[1]?(Ee=null,ae="BlackBerry"):"Device Software")+" "+le[0],re=null):this!=n&&Ee!="Wii"&&(se&&ye||/Opera/.test(te)&&/\b(?:MSIE|Firefox)\b/i.test(b)||te=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Y)||te=="IE"&&(Y&&!/^Win/.test(Y)&&re>5.5||/\bWindows XP\b/.test(Y)&&re>8||re==8&&!/\bTrident\b/.test(b)))&&!a.test(le=L.call(n,b.replace(a,"")+";"))&&le.name&&(le="ing as "+le.name+((le=le.version)?" "+le:""),a.test(te)?(/\bIE\b/.test(le)&&Y=="Mac OS"&&(Y=null),le="identify"+le):(le="mask"+le,pe?te=d(pe.replace(/([a-z])([A-Z])/g,"$1 $2")):te="Opera",/\bIE\b/.test(le)&&(Y=null),se||(re=null)),Z=["Presto"],xe.push(le));(le=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(b)||0)[1])&&(le=[parseFloat(le.replace(/\.(\d)$/,".0$1")),le],te=="Safari"&&le[1].slice(-1)=="+"?(te="WebKit Nightly",ie="alpha",re=le[1].slice(0,-1)):(re==le[1]||re==(le[2]=(/\bSafari\/([\d.]+\+?)/i.exec(b)||0)[1]))&&(re=null),le[1]=(/\bChrome\/([\d.]+)/i.exec(b)||0)[1],le[0]==537.36&&le[2]==537.36&&parseFloat(le[1])>=28&&Z=="WebKit"&&(Z=["Blink"]),!se||!M&&!le[1]?(Z&&(Z[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")):(Z&&(Z[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:Z!="Blink"?"27":"28")),Z&&(Z[1]+=" "+(le+=typeof le=="number"?".x":/[.+]/.test(le)?"":"+")),te=="Safari"&&(!re||parseInt(re)>45)&&(re=le)),te=="Opera"&&(le=/\bzbov|zvav$/.exec(Y))?(te+=" ",xe.unshift("desktop mode"),le=="zvav"?(te+="Mini",re=null):te+="Mobile",Y=Y.replace(RegExp(" *"+le+"$"),"")):te=="Safari"&&/\bChrome\b/.exec(Z&&Z[1])&&(xe.unshift("desktop mode"),te="Chrome Mobile",re=null,/\bOS X\b/.test(Y)?(ae="Apple",Y="iOS 4.3+"):Y=null),re&&re.indexOf(le=/[\d.]+$/.exec(Y))==0&&b.indexOf("/"+le+"-")>-1&&(Y=i(Y.replace(le,""))),Z&&!/\b(?:Avant|Nook)\b/.test(te)&&(/Browser|Lunascape|Maxthon/.test(te)||te!="Safari"&&/^iOS/.test(Y)&&/\bSafari\b/.test(Z[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(te)&&Z[1])&&((le=Z[Z.length-1])&&xe.push(le)),xe.length&&(xe=["("+xe.join("; ")+")"]),ae&&Ee&&Ee.indexOf(ae)<0&&xe.push("on "+ae),Ee&&xe.push((/^on /.test(xe[xe.length-1])?"":"on ")+Ee),Y&&(le=/ ([\d.+]+)$/.exec(Y),be=le&&Y.charAt(Y.length-le[0].length-1)=="/",Y={architecture:32,family:le&&!be?Y.replace(le[0],""):Y,version:le?le[1]:null,toString:function(){var Qe=this.version;return this.family+(Qe&&!be?" "+Qe:"")+(this.architecture==64?" 64-bit":"")}}),(le=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Oe))&&!/\bi686\b/i.test(Oe)?(Y&&(Y.architecture=64,Y.family=Y.family.replace(RegExp(" *"+le),"")),te&&(/\bWOW64\b/i.test(b)||se&&/\w(?:86|32)$/.test(_.cpuClass||_.platform)&&!/\bWin64; x64\b/i.test(b))&&xe.unshift("32-bit")):Y&&/^OS X/.test(Y.family)&&te=="Chrome"&&parseFloat(re)>=39&&(Y.architecture=64),b||(b=null);var Ye={};return Ye.description=b,Ye.layout=Z&&Z[0],Ye.manufacturer=ae,Ye.name=te,Ye.prerelease=ie,Ye.product=Ee,Ye.ua=b,Ye.version=te&&re,Ye.os=Y||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ye.parse=L,Ye.toString=Ge,Ye.version&&xe.unshift(re),Ye.name&&xe.unshift(te),Y&&te&&!(Y==String(Y).split(" ")[0]&&(Y==te.split(" ")[0]||Ee))&&xe.push(Ee?"("+Y+")":"on "+Y),xe.length&&(Ye.description=xe.join(" ")),Ye}var A=L();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(C.platform=A,define(function(){return A})):h&&s?n(A,function(b,x){h[x]=b}):C.platform=A}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(N,$,P){(function(k){"use strict";typeof k=="undefined"||!k.version||k.version.indexOf("v0.")===0||k.version.indexOf("v1.")===0&&k.version.indexOf("v1.8.")!==0?$.exports={nextTick:u}:$.exports=k;function u(C,R,h,s){if(typeof C!="function")throw new TypeError('"callback" argument must be a function');var S=arguments.length,f,a;switch(S){case 0:case 1:return k.nextTick(C);case 2:return k.nextTick(function(){C.call(null,R)});case 3:return k.nextTick(function(){C.call(null,R,h)});case 4:return k.nextTick(function(){C.call(null,R,h,s)});default:for(f=new Array(S-1),a=0;a1)for(var n=1;n= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=f-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 b(z,B){var W=z.split("@"),F="";W.length>1&&(F=W[0]+"@",z=W[1]),z=z.replace(n,".");var J=z.split("."),ee=A(J,B).join(".");return F+ee}function x(z){for(var B=[],W=0,F=z.length,J,ee;W=55296&&J<=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:f}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/E):z>>1,z+=T(z/B);z>c*o>>1;F+=f)z=T(z/c);return T(F+(c+1)*z/(z+r))}function M(z){var B=[],W=z.length,F,J=0,ee=m,q=g,ye,pe,le,Oe,xe,ie,se,re,be;for(ye=z.lastIndexOf(w),ye<0&&(ye=0),pe=0;pe=128&&L("not-basic"),B.push(z.charCodeAt(pe));for(le=ye>0?ye+1:0;le=W&&L("invalid-input"),se=_(z.charCodeAt(le++)),(se>=f||se>T((S-J)/xe))&&L("overflow"),J+=se*xe,re=ie<=q?a:ie>=q+o?o:ie-q,seT(S/be)&&L("overflow"),xe*=be;F=B.length+1,q=j(J-Oe,F,Oe==0),T(J/F)>S-ee&&L("overflow"),ee+=T(J/F),J%=F,B.splice(J++,0,ee)}return y(B)}function G(z){var B,W,F,J,ee,q,ye,pe,le,Oe,xe,ie=[],se,re,be,Z;for(z=x(z),se=z.length,B=m,W=0,ee=g,q=0;q=B&&xeT((S-W)/re)&&L("overflow"),W+=(ye-B)*re,B=ye,q=0;qS&&L("overflow"),xe==B){for(pe=W,le=f;!(Oe=le<=ee?a:le>=ee+o?o:le-ee,pe0&&o>a&&(o=a);for(var r=0;r=0?(m=E.substr(0,g),w=E.substr(g+1)):(m=E,w=""),p=decodeURIComponent(m),d=decodeURIComponent(w),k(S,p)?u(S[p])?S[p].push(d):S[p]=[S[p],d]:S[p]=d}return S};var u=Array.isArray||function(C){return Object.prototype.toString.call(C)==="[object Array]"}},{}],211:[function(N,$,P){"use strict";var k=function(h){switch(typeof h){case"string":return h;case"boolean":return h?"true":"false";case"number":return isFinite(h)?h:"";default:return""}};$.exports=function(h,s,S,f){return s=s||"&",S=S||"=",h===null&&(h=void 0),typeof h=="object"?C(R(h),function(a){var o=encodeURIComponent(k(a))+S;return u(h[a])?C(h[a],function(r){return o+encodeURIComponent(k(r))}).join(s):o+encodeURIComponent(k(h[a]))}).join(s):f?encodeURIComponent(k(f))+S+encodeURIComponent(k(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=[],f=0;f0?(typeof te!="string"&&!X.objectMode&&(0,R.default)(te)!==m.prototype&&(te=p(te)),ae?X.endEmitted?Z.emit("error",new Error("stream.unshift() after end event")):_(Z,X,te,!0):X.ended?Z.emit("error",new Error("stream.push() after EOF")):(X.reading=!1,X.decoder&&!Ee?(te=X.decoder.write(te),X.objectMode||te.length!==0?_(Z,X,te,!1):W(Z,X)):_(Z,X,te,!1))):ae||(X.reading=!1)}return j(X)}function _(Z,te,Ee,ae){te.flowing&&te.length===0&&!te.sync?(Z.emit("data",Ee),Z.read(0)):(te.length+=te.objectMode?1:Ee.length,ae?te.buffer.unshift(Ee):te.buffer.push(Ee),te.needReadable&&z(Z)),W(Z,te)}function I(Z,te){var Ee;return!d(te)&&typeof te!="string"&&te!==void 0&&!Z.objectMode&&(Ee=new TypeError("Invalid non-string/buffer chunk")),Ee}function j(Z){return!Z.ended&&(Z.needReadable||Z.length=M?Z=M:(Z--,Z|=Z>>>1,Z|=Z>>>2,Z|=Z>>>4,Z|=Z>>>8,Z|=Z>>>16,Z++),Z}function K(Z,te){return Z<=0||te.length===0&&te.ended?0:te.objectMode?1:Z!==Z?te.flowing&&te.length?te.buffer.head.data.length:te.length:(Z>te.highWaterMark&&(te.highWaterMark=G(Z)),Z<=te.length?Z:te.ended?te.length:(te.needReadable=!0,0))}x.prototype.read=function(Z){c("read",Z),Z=parseInt(Z,10);var te=this._readableState,Ee=Z;if(Z!==0&&(te.emittedReadable=!1),Z===0&&te.needReadable&&(te.length>=te.highWaterMark||te.ended))return c("read: emitReadable",te.length,te.ended),te.length===0&&te.ended?se(this):z(this),null;if(Z=K(Z,te),Z===0&&te.ended)return te.length===0&&se(this),null;var ae=te.needReadable;c("need readable",ae),(te.length===0||te.length-Z0?Y=le(Z,te):Y=null,Y===null?(te.needReadable=!0,Z=0):te.length-=Z,te.length===0&&(te.ended||(te.needReadable=!0),Ee!==Z&&te.ended&&se(this)),Y!==null&&this.emit("data",Y),Y};function H(Z,te){if(te.ended)return;if(te.decoder){var Ee=te.decoder.end();Ee&&Ee.length&&(te.buffer.push(Ee),te.length+=te.objectMode?1:Ee.length)}te.ended=!0,z(Z)}function z(Z){var te=Z._readableState;te.needReadable=!1,te.emittedReadable||(c("emitReadable",te.flowing),te.emittedReadable=!0,te.sync?f.nextTick(B,Z):B(Z))}function B(Z){c("emit readable"),Z.emit("readable"),pe(Z)}function W(Z,te){te.readingMore||(te.readingMore=!0,f.nextTick(F,Z,te))}function F(Z,te){for(var Ee=te.length;!te.reading&&!te.flowing&&!te.ended&&te.length1&&be(ae.pipes,Z)!==-1)&&!Se&&(c("false write response, pause",Ee._readableState.awaitDrain),Ee._readableState.awaitDrain++,Ge=!0),Ee.pause())}function Qe(Ce){c("onerror",Ce),Le(),Z.removeListener("error",Qe),E(Z,"error")===0&&Z.emit("error",Ce)}A(Z,"error",Qe);function rt(){Z.removeListener("finish",qe),Le()}Z.once("close",rt);function qe(){c("onfinish"),Z.removeListener("close",rt),Le()}Z.once("finish",qe);function Le(){c("unpipe"),Ee.unpipe(Z)}return Z.emit("pipe",Ee),ae.flowing||(c("pipe resume"),Ee.resume()),Z};function J(Z){return function(){var te=Z._readableState;c("pipeOnDrain",te.awaitDrain),te.awaitDrain&&te.awaitDrain--,te.awaitDrain===0&&E(Z,"data")&&(te.flowing=!0,pe(Z))}}x.prototype.unpipe=function(Z){var te=this._readableState,Ee={hasUnpiped:!1};if(te.pipesCount===0)return this;if(te.pipesCount===1)return Z&&Z!==te.pipes?this:(Z||(Z=te.pipes),te.pipes=null,te.pipesCount=0,te.flowing=!1,Z&&Z.emit("unpipe",this,Ee),this);if(!Z){var ae=te.pipes,Y=te.pipesCount;te.pipes=null,te.pipesCount=0,te.flowing=!1;for(var X=0;X=te.length?(te.decoder?Ee=te.buffer.join(""):te.buffer.length===1?Ee=te.buffer.head.data:Ee=te.buffer.concat(te.length),te.buffer.clear()):Ee=Oe(Z,te.buffer,te.decoder),Ee}function Oe(Z,te,Ee){var ae;return ZX.length?X.length:Z;if(Q===X.length?Y+=X:Y+=X.slice(0,Z),Z-=Q,Z===0){Q===X.length?(++ae,Ee.next?te.head=Ee.next:te.head=te.tail=null):(te.head=Ee,Ee.data=X.slice(Q));break}++ae}return te.length-=ae,Y}function ie(Z,te){var Ee=m.allocUnsafe(Z),ae=te.head,Y=1;for(ae.data.copy(Ee),Z-=ae.data.length;ae=ae.next;){var X=ae.data,Q=Z>X.length?X.length:Z;if(X.copy(Ee,Ee.length-Z,0,Q),Z-=Q,Z===0){Q===X.length?(++Y,ae.next?te.head=ae.next:te.head=te.tail=null):(te.head=ae,ae.data=X.slice(Q));break}++Y}return te.length-=Y,Ee}function se(Z){var te=Z._readableState;if(te.length>0)throw new Error('"endReadable()" called on non-empty stream');te.endEmitted||(te.ended=!0,f.nextTick(re,te,Z))}function re(Z,te){!Z.endEmitted&&Z.length===0&&(Z.endEmitted=!0,te.readable=!1,te.emit("end"))}function be(Z,te){for(var Ee=0,ae=Z.length;Ee-1?E.default:m.nextTick,n;I.WritableState=y;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 b=N("./internal/streams/destroy");l.inherits(I,T);function x(){}function y(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,Z=ie.writableHighWaterMark,te=this.objectMode?16:16*1024;be||be===0?this.highWaterMark=be:re&&(Z||Z===0)?this.highWaterMark=Z:this.highWaterMark=te,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 Ee=ie.decodeStrings===!1;this.decodeStrings=!Ee,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)}y.prototype.getBuffer=function(){for(var se=this.bufferedRequest,re=[];se;)re.push(se),se=se.next;return re},function(){try{Object.defineProperty(y.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ie){}}();var _;typeof f.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 y}})):_=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 y(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 Z=!0,te=!1;return re===null?te=new TypeError("May not write null values to stream"):typeof re!="string"&&re!==void 0&&!se.objectMode&&(te=new TypeError("Invalid non-string/buffer chunk")),te&&(ie.emit("error",te),m.nextTick(be,te),Z=!1),Z}I.prototype.write=function(ie,se,re){var be=this._writableState,Z=!1,te=!be.objectMode&&A(ie);return te&&!v.isBuffer(ie)&&(ie=L(ie)),typeof se=="function"&&(re=se,se=null),te?se="buffer":se||(se=be.defaultEncoding),typeof re!="function"&&(re=x),be.ended?j(this,re):(te||M(this,be,ie,re))&&(be.pendingcb++,Z=K(this,be,te,ie,se,re)),Z},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,Z,te){if(!re){var Ee=G(se,be,Z);be!==Ee&&(re=!0,Z="buffer",be=Ee)}var ae=se.objectMode?1:be.length;se.length+=ae;var Y=se.length0?this.tail.next=f:this.head=f,this.tail=f,++this.length},h.prototype.unshift=function(S){var f={data:S,next:this.head};this.length===0&&(this.tail=f),this.head=f,++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 f=this.head,a=""+f.data;f=f.next;)a+=S+f.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 f=u.allocUnsafe(S>>>0),a=this.head,o=0;a;)R(a.data,f,o),o+=a.data.length,a=a.next;return f},h}(),C&&C.inspect&&C.inspect.custom&&($.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,$,P){"use strict";var k=N("process-nextick-args");function u(h,s){var S=this,f=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return f||a?(s?s(h):h&&(!this._writableState||!this._writableState.errorEmitted)&&k.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?(k.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)}$.exports={destroy:u,undestroy:C}},{"process-nextick-args":207}],221:[function(N,$,P){"use strict";$.exports=N("events").EventEmitter},{events:192}],222:[function(N,$,P){$.exports=N("./readable").PassThrough},{"./readable":223}],223:[function(N,$,P){P=$.exports=N("./lib/_stream_readable.js"),P.Stream=P,P.Readable=P,P.Writable=N("./lib/_stream_writable.js"),P.Duplex=N("./lib/_stream_duplex.js"),P.Transform=N("./lib/_stream_transform.js"),P.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,$,P){$.exports=N("./readable").Transform},{"./readable":223}],225:[function(N,$,P){$.exports=N("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(N,$,P){var k=function(){return this}()||Function("return this")(),u=k.regeneratorRuntime&&Object.getOwnPropertyNames(k).indexOf("regeneratorRuntime")>=0,C=u&&k.regeneratorRuntime;if(k.regeneratorRuntime=void 0,$.exports=N("./runtime"),u)k.regeneratorRuntime=C;else try{delete k.regeneratorRuntime}catch(R){k.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(N,$,P){!function(k){"use strict";var u=Object.prototype,C=u.hasOwnProperty,R,h=typeof Symbol=="function"?Symbol:{},s=h.iterator||"@@iterator",S=h.asyncIterator||"@@asyncIterator",f=h.toStringTag||"@@toStringTag",a=typeof $=="object",o=k.regeneratorRuntime;if(o){a&&($.exports=o);return}o=k.regeneratorRuntime=a?$.exports:{};function r(K,H,z,B){var W=H&&H.prototype instanceof n?H:n,F=Object.create(W.prototype),J=new j(B||[]);return F._invoke=x(K,z,J),F}o.wrap=r;function E(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",d={};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[f]=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,f in K||(K[f]="GeneratorFunction")),K.prototype=Object.create(L),K},o.awrap=function(K){return{__await:K}};function b(K){function H(W,F,J,ee){var q=E(K[W],K,F);if(q.type==="throw")ee(q.arg);else{var ye=q.arg,pe=ye.value;return pe&&typeof pe=="object"&&C.call(pe,"__await")?Promise.resolve(pe.__await).then(function(le){H("next",le,J,ee)},function(le){H("throw",le,J,ee)}):Promise.resolve(pe).then(function(le){ye.value=le,J(ye)},ee)}}var z;function B(W,F){function J(){return new Promise(function(ee,q){H(W,F,ee,q)})}return z=z?z.then(J,J):J()}this._invoke=B}A(b.prototype),b.prototype[S]=function(){return this},o.AsyncIterator=b,o.async=function(K,H,z,B){var W=new b(r(K,H,z,B));return o.isGeneratorFunction(H)?W:W.next().then(function(F){return F.done?F.value:W.next()})};function x(K,H,z){var B=g;return function(F,J){if(B===w)throw new Error("Generator is already running");if(B===p){if(F==="throw")throw J;return G()}for(z.method=F,z.arg=J;;){var ee=z.delegate;if(ee){var q=y(ee,z);if(q){if(q===d)continue;return q}}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 ye=E(K,H,z);if(ye.type==="normal"){if(B=z.done?p:m,ye.arg===d)continue;return{value:ye.arg,done:z.done}}else ye.type==="throw"&&(B=p,z.method="throw",z.arg=ye.arg)}}}function y(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,y(K,H),H.method==="throw"))return d;H.method="throw",H.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var B=E(z,K.iterator,H.arg);if(B.type==="throw")return H.method="throw",H.arg=B.arg,H.delegate=null,d;var W=B.arg;if(!W)return H.method="throw",H.arg=new TypeError("iterator result is not an object"),H.delegate=null,d;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,d}A(L),L[f]="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 J=C.call(W,"catchLoc"),ee=C.call(W,"finallyLoc");if(J&&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),d}},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),d}}}(function(){return this}()||Function("return this")())},{}],228:[function(N,$,P){var k=N("buffer"),u=k.Buffer;function C(h,s){for(var S in h)s[S]=h[S]}u.from&&u.alloc&&u.allocUnsafe&&u.allocUnsafeSlow?$.exports=k:(C(k,P),P.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 f=u(h);return s!==void 0?typeof S=="string"?f.fill(s,S):f.fill(s):f.fill(0),f},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 k.SlowBuffer(h)}},{buffer:73}],229:[function(N,$,P){(function(k){"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),f=N("babel-runtime/core-js/object/define-property"),a=m(f),o=N("babel-runtime/core-js/object/keys"),r=m(o),E=N("babel-runtime/core-js/object/create"),g=m(E);function m(w){return w&&w.__esModule?w:{default:w}}(function(w){w.parser=function(X,Q){return new d(X,Q)},w.SAXParser=d,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 d(X,Q){if(!(this instanceof d))return new d(X,Q);var he=this;l(he),he.q=he.c="",he.bufferCheckPosition=w.MAX_BUFFER_LENGTH,he.opt=Q||{},he.opt.lowercase=he.opt.lowercase||he.opt.lowercasetags,he.looseCase=he.opt.lowercase?"toLowerCase":"toUpperCase",he.tags=[],he.closed=he.closedRoot=he.sawRoot=!1,he.tag=he.error=null,he.strict=!!X,he.noscript=!!(X||he.opt.noscript),he.state=F.BEGIN,he.strictEntities=he.opt.strictEntities,he.ENTITIES=he.strictEntities?(0,g.default)(w.XML_ENTITIES):(0,g.default)(w.ENTITIES),he.attribList=[],he.opt.xmlns&&(he.ns=(0,g.default)(_)),he.trackPosition=he.opt.position!==!1,he.trackPosition&&(he.position=he.line=he.column=0),ee(he,"onready")}g.default||(Object.create=function(X){function Q(){}Q.prototype=X;var he=new Q;return he}),r.default||(Object.keys=function(X){var Q=[];for(var he in X)X.hasOwnProperty(he)&&Q.push(he);return Q});function n(X){for(var Q=Math.max(w.MAX_BUFFER_LENGTH,10),he=0,ce=0,Se=p.length;ceQ)switch(p[ce]){case"textNode":ye(X);break;case"cdata":q(X,"oncdata",X.cdata),X.cdata="";break;case"script":q(X,"onscript",X.script),X.script="";break;default:le(X,"Max buffer length exceeded: "+p[ce])}he=Math.max(he,Ke)}var Ge=w.MAX_BUFFER_LENGTH-he;X.bufferCheckPosition=Ge+X.position}function l(X){for(var Q=0,he=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],he=typeof Q=="number"?String.fromCharCode(Q):Q;w.ENTITIES[X]=he});for(var J in w.STATE)w.STATE[w.STATE[J]]=J;F=w.STATE;function ee(X,Q,he){X[Q]&&X[Q](he)}function q(X,Q,he){X.textNode&&ye(X),ee(X,Q,he)}function ye(X){X.textNode=pe(X.opt,X.textNode),X.textNode&&ee(X,"ontext",X.textNode),X.textNode=""}function pe(X,Q){return X.trim&&(Q=Q.trim()),X.normalize&&(Q=Q.replace(/\s+/g," ")),Q}function le(X,Q){return ye(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 Oe(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"),ye(X),X.c="",X.closed=!0,ee(X,"onend"),d.call(X,X.strict,X.opt),X}function xe(X,Q){if((typeof X=="undefined"?"undefined":(0,S.default)(X))!=="object"||!(X instanceof d))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,he=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&(he.ns=Q.ns),X.attribList.length=0,q(X,"onopentagstart",he)}function se(X,Q){var he=X.indexOf(":"),ce=he<0?["",X]:X.split(":"),Se=ce[0],Ke=ce[1];return Q&&X==="xmlns"&&(Se="xmlns",Ke=""),{prefix:Se,local:Ke}}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),he=Q.prefix,ce=Q.local;if(he==="xmlns")if(ce==="xml"&&X.attribValue!==x)xe(X,"xml: prefix must be bound to "+x+` Actual: `+X.attribValue);else if(ce==="xmlns"&&X.attribValue!==y)xe(X,"xmlns: prefix must be bound to "+y+` Actual: `+X.attribValue);else{var Se=X.tag,Ke=X.tags[X.tags.length-1]||X;Se.ns===Ke.ns&&(Se.ns=(0,g.default)(Ke.ns)),Se.ns[ce]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,q(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}function be(X,Q){if(X.opt.xmlns){var he=X.tag,ce=se(X.tagName);he.prefix=ce.prefix,he.local=ce.local,he.uri=he.ns[ce.prefix]||"",he.prefix&&!he.uri&&(xe(X,"Unbound namespace prefix: "+(0,h.default)(X.tagName)),he.uri=ce.prefix);var Se=X.tags[X.tags.length-1]||X;he.ns&&Se.ns!==he.ns&&(0,r.default)(he.ns).forEach(function(He){q(X,"onopennamespace",{prefix:He,uri:he.ns[He]})});for(var Ke=0,Ge=X.attribList.length;Ke",X.tagName="",X.state=F.SCRIPT;return}q(X,"onscript",X.script),X.script=""}var Q=X.tags.length,he=X.tagName;X.strict||(he=he[X.looseCase]());for(var ce=he;Q--;){var Se=X.tags[Q];if(Se.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=he;for(var Ke=X.tags.length;Ke-- >Q;){var Ge=X.tag=X.tags.pop();X.tagName=X.tag.name,q(X,"onclosetag",X.tagName);var Ye={};for(var Qe in Ge.ns)Ye[Qe]=Ge.ns[Qe];var rt=X.tags[X.tags.length-1]||X;X.opt.xmlns&&Ge.ns!==rt.ns&&(0,r.default)(Ge.ns).forEach(function(qe){var Le=Ge.ns[qe];q(X,"onclosenamespace",{prefix:qe,uri:Le})})}Q===0&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=F.TEXT}function te(X){var Q=X.entity,he=Q.toLowerCase(),ce,Se="";return X.ENTITIES[Q]?X.ENTITIES[Q]:X.ENTITIES[he]?X.ENTITIES[he]:(Q=he,Q.charAt(0)==="#"&&(Q.charAt(1)==="x"?(Q=Q.slice(2),ce=parseInt(Q,16),Se=ce.toString(16)):(Q=Q.slice(1),ce=parseInt(Q,10),Se=ce.toString(10))),Q=Q.replace(/^0+/,""),isNaN(ce)||Se.toLowerCase()!==Q?(xe(X,"Invalid character entity"),"&"+X.entity+";"):(0,C.default)(ce))}function Ee(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 he="";return Q"?(q(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,q(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=pe(Q.opt,Q.comment),Q.comment&&q(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&&q(Q,"oncdata",Q.cdata),q(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===">"?(q(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),Z(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="",q(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===">"?Z(Q):B(j,ce)?Q.tagName+=ce:Q.script?(Q.script+=""?Z(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,Ye;switch(Q.state){case F.TEXT_ENTITY:Ge=F.TEXT,Ye="textNode";break;case F.ATTRIB_VALUE_ENTITY_Q:Ge=F.ATTRIB_VALUE_QUOTED,Ye="attribValue";break;case F.ATTRIB_VALUE_ENTITY_U:Ge=F.ATTRIB_VALUE_UNQUOTED,Ye="attribValue";break}ce===";"?(Q[Ye]+=te(Q),Q.entity="",Q.state=Ge):B(Q.entity.length?G:M,ce)?Q.entity+=ce:(xe(Q,"Invalid character in entity name"),Q[Ye]+="&"+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,he=function(){var Se=16384,Ke=[],Ge,Ye,Qe=-1,rt=arguments.length;if(!rt)return"";for(var qe="";++Qe1114111||Q(Le)!==Le)throw RangeError("Invalid code point: "+Le);Le<=65535?Ke.push(Le):(Le-=65536,Ge=(Le>>10)+55296,Ye=Le%1024+56320,Ke.push(Ge,Ye)),(Qe+1===rt||Ke.length>Se)&&(qe+=X.apply(null,Ke),Ke.length=0)}return qe};a.default?Object.defineProperty(String,"fromCodePoint",{value:he,configurable:!0,writable:!0}):String.fromCodePoint=he}()})(typeof P=="undefined"?(void 0).sax={}:P)}).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,$,P){$.exports=C;var k=N("events").EventEmitter,u=N("inherits");u(C,k),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(){k.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 f(){s.readable&&s.resume&&s.resume()}R.on("drain",f),!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 E(m){if(g(),k.listenerCount(this,"error")===0)throw m}s.on("error",E),R.on("error",E);function g(){s.removeListener("data",S),R.removeListener("drain",f),s.removeListener("end",o),s.removeListener("close",r),s.removeListener("error",E),R.removeListener("error",E),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,$,P){(function(k){var u=N("./lib/request"),C=N("./lib/response"),R=N("xtend"),h=N("builtin-status-codes"),s=N("url"),S=P;S.request=function(f,a){typeof f=="string"?f=s.parse(f):f=R(f);var o=k.location.protocol.search(/^https?:$/)===-1?"http:":"",r=f.protocol||o,E=f.hostname||f.host,g=f.port,m=f.path||"/";E&&E.indexOf(":")!==-1&&(E="["+E+"]"),f.url=(E?r+"//"+E:"")+(g?":"+g:"")+m,f.method=(f.method||"GET").toUpperCase(),f.headers=f.headers||{};var w=new u(f);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,$,P){(function(k){"use strict";P.fetch=S(k.fetch)&&S(k.ReadableStream),P.writableStream=S(k.WritableStream),P.abortController=S(k.AbortController),P.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),P.blobConstructor=!0}catch(f){}var u;function C(){if(u!==void 0)return u;if(k.XMLHttpRequest){u=new k.XMLHttpRequest;try{u.open("GET",k.XDomainRequest?"/":"https://example.com")}catch(f){u=null}}else u=null;return u}function R(f){var a=C();if(!a)return!1;try{return a.responseType=f,a.responseType===f}catch(o){}return!1}var h=typeof k.ArrayBuffer!="undefined",s=h&&S(k.ArrayBuffer.prototype.slice);P.arraybuffer=P.fetch||h&&R("arraybuffer"),P.msstream=!P.fetch&&s&&R("ms-stream"),P.mozchunkedarraybuffer=!P.fetch&&h&&R("moz-chunked-arraybuffer"),P.overrideMimeType=P.fetch||(C()?S(C().overrideMimeType):!1),P.vbArray=S(k.VBArray);function S(f){return typeof f=="function"}u=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(N,$,P){(function(k,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"),f=N("inherits"),a=N("./response"),o=N("readable-stream"),r=N("to-arraybuffer"),E=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=$.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()})};f(w,o.Writable),w.prototype.setHeader=function(n,l){var c=this,T=n.toLowerCase();if(d.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(x){return r(x)}),{type:(c["content-type"]||{}).value||""}):T=C.concat(n._body).toString());var v=[];if((0,h.default)(c).forEach(function(x){var y=c[x].name,_=c[x].value;Array.isArray(_)?_.forEach(function(I){v.push([y,I])}):v.push([y,_])}),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(x){n._fetchResponse=x,n._connect()},function(x){u.clearTimeout(n._fetchTimer),n._destroyed||n.emit("error",x)})}else{var b=n._xhr=new u.XMLHttpRequest;try{b.open(n._opts.method,n._opts.url,!0)}catch(x){k.nextTick(function(){n.emit("error",x)});return}"responseType"in b&&(b.responseType=n._mode.split(":")[0]),"withCredentials"in b&&(b.withCredentials=!!l.withCredentials),n._mode==="text"&&"overrideMimeType"in b&&b.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in l&&(b.timeout=l.requestTimeout,b.ontimeout=function(){n.emit("requestTimeout")}),v.forEach(function(x){b.setRequestHeader(x[0],x[1])}),n._response=null,b.onreadystatechange=function(){switch(b.readyState){case g.LOADING:case g.DONE:n._onXHRProgress();break}},n._mode==="moz-chunked-arraybuffer"&&(b.onprogress=function(){n._onXHRProgress()}),b.onerror=function(){if(n._destroyed)return;n.emit("error",new Error("XHR error"))};try{b.send(T)}catch(x){k.nextTick(function(){n.emit("error",x)});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 E(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 d=["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,$,P){(function(k,u,C){"use strict";var R=N("babel-runtime/core-js/promise"),h=s(R);function s(E){return E&&E.__esModule?E:{default:E}}var S=N("./capability"),f=N("inherits"),a=N("readable-stream"),o=P.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},r=P.IncomingMessage=function(E,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(){k.nextTick(function(){p.emit("close")})}),m==="fetch"){var d=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,b){p._destroyed?b():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();d()}else{p._xhr=E,p._pos=0,p.url=E.responseURL,p.statusCode=E.status,p.statusMessage=E.statusText;var c=E.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")}}};f(r,a.Readable),r.prototype._read=function(){var E=this,g=E._resumeFetch;g&&(E._resumeFetch=null,g())},r.prototype._onXHRProgress=function(){var E=this,g=E._xhr,m=null;switch(E._mode){case"text:vbarray":if(g.readyState!==o.DONE)break;try{m=new u.VBArray(g.responseBody).toArray()}catch(l){}if(m!==null){E.push(new C(m));break}case"text":try{m=g.responseText}catch(l){E._mode="text:vbarray";break}if(m.length>E._pos){var w=m.substr(E._pos);if(E._charset==="x-user-defined"){for(var p=new C(w.length),d=0;dE._pos&&(E.push(new C(new Uint8Array(n.result.slice(E._pos)))),E._pos=n.result.byteLength)},n.onload=function(){E.push(null)},n.readAsArrayBuffer(m);break}E._xhr.readyState===o.DONE&&E._mode!=="ms-stream"&&E.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,$,P){"use strict";var k=N("safe-buffer").Buffer,u=k.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"&&(k.isEncoding===u||!u(n)))throw new Error("Unknown encoding: "+n);return l||n}P.StringDecoder=h;function h(n){this.encoding=R(n);var l;switch(this.encoding){case"utf16le":this.text=E,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=d;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=k.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 f(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=f(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 E(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 d(n){return n&&n.length?this.write(n):""}},{"safe-buffer":228}],236:[function(N,$,P){(function(k,u){var C=N("process/browser.js").nextTick,R=Function.prototype.apply,h=Array.prototype.slice,s={},S=0;P.setTimeout=function(){return new f(R.call(setTimeout,window,arguments),clearTimeout)},P.setInterval=function(){return new f(R.call(setInterval,window,arguments),clearInterval)},P.clearTimeout=P.clearInterval=function(a){a.close()};function f(a,o){this._id=a,this._clearFn=o}f.prototype.unref=f.prototype.ref=function(){},f.prototype.close=function(){this._clearFn.call(window,this._id)},P.enroll=function(a,o){clearTimeout(a._idleTimeoutId),a._idleTimeout=o},P.unenroll=function(a){clearTimeout(a._idleTimeoutId),a._idleTimeout=-1},P._unrefActive=P.active=function(a){clearTimeout(a._idleTimeoutId);var o=a._idleTimeout;o>=0&&(a._idleTimeoutId=setTimeout(function(){a._onTimeout&&a._onTimeout()},o))},P.setImmediate=typeof k=="function"?k: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),P.clearImmediate(o))}),o},P.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,$,P){var k=N("buffer").Buffer;$.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(k.isBuffer(u)){for(var C=new Uint8Array(u.length),R=u.length,h=0;h",'"',"`"," ","\r",` `," "],f=["{","}","|","\\","^","`"].concat(S),a=["'"].concat(f),o=["%","/","?",";","#"].concat(a),r=["/","?","#"],E=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},d={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 b=new C;return b.parse(i,L,A),b}C.prototype.parse=function(i,L,A){if(!u.isString(i))throw new TypeError("Parameter 'url' must be a string, not "+typeof i);var b=i.indexOf("?"),x=b!==-1&&b127?pe+="x":pe+=ye[le];if(!pe.match(g)){var xe=ee.slice(0,z),ie=ee.slice(z+1),se=ye.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>E?this.hostname="":this.hostname=this.hostname.toLowerCase(),J||(this.hostname=k.toASCII(this.hostname));var re=this.port?":"+this.port:"",be=this.hostname||"";this.host=be+re,this.href+=this.host,J&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),I[0]!=="/"&&(I="/"+I))}if(!w[G])for(var z=0,q=a.length;z0?A.host.split("@"):!1;pe&&(A.auth=pe.shift(),A.host=A.hostname=pe.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],Oe=(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&&!J)for(;xe--;xe)ee.unshift("..");F&&ee[0]!==""&&(!ee[0]||ee[0].charAt(0)!=="/")&&ee.unshift(""),Oe&&ee.join("/").substr(-1)!=="/"&&ee.push("");var se=ee[0]===""||ee[0]&&ee[0].charAt(0)==="/";if(ye){A.hostname=A.host=se?"":ee.length?ee.shift():"";var pe=A.host&&A.host.indexOf("@")>0?A.host.split("@"):!1;pe&&(A.auth=pe.shift(),A.host=A.hostname=pe.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,$,P){"use strict";$.exports={isString:function(k){return typeof k=="string"},isObject:function(k){return typeof k=="object"&&k!==null},isNull:function(k){return k===null},isNullOrUndefined:function(k){return k==null}}},{}],240:[function(N,$,P){(function(k){$.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(!k.localStorage)return!1}catch(s){return!1}var h=k.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,$,P){typeof Object.create=="function"?$.exports=function(u,C){u.super_=C,u.prototype=Object.create(C.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}})}:$.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,$,P){$.exports=function(u){return u&&typeof u=="object"&&typeof u.copy=="function"&&typeof u.fill=="function"&&typeof u.readUInt8=="function"}},{}],243:[function(N,$,P){(function(k,u){var C=/%[sdj%]/g;P.format=function(H){if(!T(H)){for(var z=[],B=0;B=F)return q;switch(q){case"%s":return String(W[B++]);case"%d":return Number(W[B++]);case"%j":try{return JSON.stringify(W[B++])}catch(ye){return"[Circular]"}default:return q}}),ee=W[B];B=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),d(z)?B.showHidden=z:z&&P._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)}P.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 f(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&&y(z.inspect)&&z.inspect!==P.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 J=Object.keys(z),ee=a(J);if(H.showHidden&&(J=Object.getOwnPropertyNames(z)),x(z)&&(J.indexOf("message")>=0||J.indexOf("description")>=0))return E(z);if(J.length===0){if(y(z)){var q=z.name?": "+z.name:"";return H.stylize("[Function"+q+"]","special")}if(L(z))return H.stylize(RegExp.prototype.toString.call(z),"regexp");if(b(z))return H.stylize(Date.prototype.toString.call(z),"date");if(x(z))return E(z)}var ye="",pe=!1,le=["{","}"];if(p(z)&&(pe=!0,le=["[","]"]),y(z)){var Oe=z.name?": "+z.name:"";ye=" [Function"+Oe+"]"}if(L(z)&&(ye=" "+RegExp.prototype.toString.call(z)),b(z)&&(ye=" "+Date.prototype.toUTCString.call(z)),x(z)&&(ye=" "+E(z)),J.length===0&&(!pe||z.length==0))return le[0]+ye+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 pe?xe=g(H,z,B,ee,J):xe=J.map(function(ie){return m(H,z,B,ee,ie,pe)}),H.seen.pop(),w(xe,ye,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(d(z))return H.stylize(""+z,"boolean");if(n(z))return H.stylize("null","null")}function E(H){return"["+Error.prototype.toString.call(H)+"]"}function g(H,z,B,W,F){for(var J=[],ee=0,q=z.length;ee-1&&(J?q=q.split(` `).map(function(pe){return" "+pe}).join(` `).substr(2):q=` `+q.split(` `).map(function(pe){return" "+pe}).join(` `))):q=H.stylize("[Circular]","special")),i(ee)){if(J&&F.match(/^\d+$/))return q;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+": "+q}function w(H,z,B){var W=0,F=H.reduce(function(J,ee){return W++,ee.indexOf(` `)>=0&&W++,J+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)}P.isArray=p;function d(H){return typeof H=="boolean"}P.isBoolean=d;function n(H){return H===null}P.isNull=n;function l(H){return H==null}P.isNullOrUndefined=l;function c(H){return typeof H=="number"}P.isNumber=c;function T(H){return typeof H=="string"}P.isString=T;function v(H){return typeof H=="symbol"}P.isSymbol=v;function i(H){return H===void 0}P.isUndefined=i;function L(H){return A(H)&&I(H)==="[object RegExp]"}P.isRegExp=L;function A(H){return typeof H=="object"&&H!==null}P.isObject=A;function b(H){return A(H)&&I(H)==="[object Date]"}P.isDate=b;function x(H){return A(H)&&(I(H)==="[object Error]"||H instanceof Error)}P.isError=x;function y(H){return typeof H=="function"}P.isFunction=y;function _(H){return H===null||typeof H=="boolean"||typeof H=="number"||typeof H=="string"||typeof H=="symbol"||typeof H=="undefined"}P.isPrimitive=_,P.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(" ")}P.log=function(){console.log("%s - %s",G(),P.format.apply(P,arguments))},P.inherits=N("inherits"),P._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,$,P){"use strict";(function(){"use strict";P.stripBOM=function(k){return k[0]==="\uFEFF"?k.substring(1):k}}).call(void 0)},{}],245:[function(N,$,P){"use strict";var k=N("babel-runtime/helpers/typeof"),u=h(k),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,f,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""},f=function(g){return g.replace("]]>","]]]]>")},P.Builder=function(){function E(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 E.prototype.buildObject=function(g){var m,w,p,d,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,b,x;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(b in i)L=i[b],c=p(c.ele(b),L).up()}else for(b in T){if(!r.call(T,b))continue;if(i=T[b],b===m){if((typeof i=="undefined"?"undefined":(0,u.default)(i))==="object")for(v in i)x=i[v],c=c.att(v,x)}else if(b===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(b).raw(o(L)).up():c=c.ele(b,L).up():c=p(c.ele(b),L).up()}else(typeof i=="undefined"?"undefined":(0,u.default)(i))==="object"?c=p(c.ele(b),i).up():typeof i=="string"&&l.options.cdata&&a(i)?c=c.ele(b).raw(o(i)).up():(i==null&&(i=""),c=c.ele(b,i.toString()).up())}return c}}(this),d=s.create(n,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),p(d,g).end(this.options.renderOpts)},E}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(N,$,P){"use strict";(function(){P.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:` `},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],247:[function(N,$,P){"use strict";var k=N("babel-runtime/core-js/promise"),u=a(k),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"),f=a(S);function a(o){return o&&o.__esModule?o:{default:o}}(function(){"use strict";var o,r,E,g,m,w,p,d,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"),E=N("events"),o=N("./bom"),w=N("./processors"),d=N("timers").setImmediate,r=N("./defaults").defaults,g=function(v){return(typeof v=="undefined"?"undefined":(0,f.default)(v))==="object"&&v!=null&&(0,s.default)(v).length===0},m=function(v,i,L){var A,b,x;for(A=0,b=v.length;A0&&(j[x.options.childkey]=G),G=j;else if(z){z[x.options.childkey]=z[x.options.childkey]||[],K={};for(I in G){if(!c.call(G,I))continue;K[I]=G[I]}z[x.options.childkey].push(K),delete G["#name"],(0,s.default)(G).length===1&&L in G&&!x.EXPLICIT_CHARKEY&&(G=G[L])}}return b.length>0?x.assignOrPush(z,M,G):(x.options.explicitRoot&&(H=G,G={},G[M]=H),x.resultObject=G,x.saxParser.ended=!0,x.emit("end",x.resultObject))}}(this),A=function(x){return function(y){var _,I;if(I=b[b.length-1],I)return I[L]+=y,x.options.explicitChildren&&x.options.preserveChildrenOrder&&x.options.charsAsChildren&&(x.options.includeWhiteChars||y.replace(/\\n/g,"").trim()!=="")&&(I[x.options.childkey]=I[x.options.childkey]||[],_={"#name":"__text__"},_[L]=y,x.options.normalize&&(_[L]=_[L].replace(/\s{2,}/g," ").trim()),I[x.options.childkey].push(_)),I}}(this),this.saxParser.ontext=A,this.saxParser.oncdata=function(x){return function(y){var _;if(_=A(y),_)return _.cdata=!0}}(this)},v.prototype.parseString=function(i,L){var A;L!=null&&typeof L=="function"&&(this.on("end",function(b){return this.reset(),L(null,b)}),this.on("error",function(b){return this.reset(),L(b)}));try{return i=i.toString(),i.trim()===""?(this.emit("end",null),!0):(i=o.stripBOM(i),this.options.async?(this.remaining=i,d(this.processAsync),this.saxParser):this.saxParser.write(i).close())}catch(b){if(A=b,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,b){return L.parseString(i,function(x,y){return x?b(x):A(y)})}}(this))},v}(E),P.parseString=function(T,v,i){var L,A,b;return i!=null?(typeof i=="function"&&(L=i),(typeof v=="undefined"?"undefined":(0,f.default)(v))==="object"&&(A=v)):(typeof v=="function"&&(L=v),A={}),b=new P.Parser(A),b.parseString(T,L)},P.parseStringPromise=function(T,v){var i,L;return(typeof v=="undefined"?"undefined":(0,f.default)(v))==="object"&&(i=v),L=new P.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,$,P){"use strict";(function(){"use strict";var k;k=new RegExp(/(?!xmlns)^.*:/),P.normalize=function(u){return u.toLowerCase()},P.firstCharLowerCase=function(u){return u.charAt(0).toLowerCase()+u.slice(1)},P.stripPrefix=function(u){return u.replace(k,"")},P.parseNumbers=function(u){return isNaN(u)||(u=u%1===0?parseInt(u,10):parseFloat(u)),u},P.parseBooleans=function(u){return/^(?:true|false)$/i.test(u)&&(u=u.toLowerCase()==="true"),u}}).call(void 0)},{}],249:[function(N,$,P){"use strict";(function(){"use strict";var k,u,C,R,h=function(f,a){for(var o in a)s.call(a,o)&&(f[o]=a[o]);function r(){this.constructor=f}return r.prototype=a.prototype,f.prototype=new r,f.__super__=a.prototype,f},s={}.hasOwnProperty;u=N("./defaults"),k=N("./builder"),C=N("./parser"),R=N("./processors"),P.defaults=u.defaults,P.processors=R,P.ValidationError=function(S){h(f,S);function f(a){this.message=a}return f}(Error),P.Builder=k.Builder,P.Parser=C.Parser,P.parseString=C.parseString,P.parseStringPromise=C.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(N,$,P){"use strict";(function(){$.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(N,$,P){"use strict";(function(){$.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,$,P){"use strict";var k=N("babel-runtime/core-js/object/get-prototype-of"),u=S(k),C=N("babel-runtime/helpers/typeof"),R=S(C),h=N("babel-runtime/core-js/object/assign"),s=S(h);function S(f){return f&&f.__esModule?f:{default:f}}(function(){var f,a,o,r,E,g,m,w=[].slice,p={}.hasOwnProperty;f=function(){var n,l,c,T,v,i;if(i=arguments[0],v=2<=arguments.length?w.call(arguments,1):[],E(s.default))s.default.apply(null,arguments);else for(n=0,c=v.length;n":"attribute: {"+f+"}, parent: <"+this.parent.name+">"},S.prototype.isEqualNode=function(f){return f.namespaceURI!==this.namespaceURI||(f.prefix!==this.prefix||f.localName!==this.localName)?!1:!(f.value!==this.value)},S}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(N,$,P){"use strict";var k=N("babel-runtime/core-js/object/create"),u=C(k);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s,S=function(o,r){for(var E in r)f.call(r,E)&&(o[E]=r[E]);function g(){this.constructor=o}return g.prototype=r.prototype,o.prototype=new g,o.__super__=r.prototype,o},f={}.hasOwnProperty;R=N("./NodeType"),s=N("./XMLCharacterData"),$.exports=h=function(a){S(o,a);function o(r,E){if(o.__super__.constructor.call(this,r),E==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=R.CData,this.value=this.stringify.cdata(E)}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,$,P){"use strict";var k=N("babel-runtime/core-js/object/create"),u=C(k);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 E(){this.constructor=a}return E.prototype=o.prototype,a.prototype=new E,a.__super__=o.prototype,a},S={}.hasOwnProperty;h=N("./XMLNode"),$.exports=R=function(f){s(a,f);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,E){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,$,P){"use strict";var k=N("babel-runtime/core-js/object/create"),u=C(k);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s,S=function(o,r){for(var E in r)f.call(r,E)&&(o[E]=r[E]);function g(){this.constructor=o}return g.prototype=r.prototype,o.prototype=new g,o.__super__=r.prototype,o},f={}.hasOwnProperty;R=N("./NodeType"),h=N("./XMLCharacterData"),$.exports=s=function(a){S(o,a);function o(r,E){if(o.__super__.constructor.call(this,r),E==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=R.Comment,this.value=this.stringify.comment(E)}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,$,P){"use strict";var k=N("babel-runtime/core-js/object/keys"),u=h(k),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,f;S=N("./XMLDOMErrorHandler"),f=N("./XMLDOMStringList"),$.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 f((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,$,P){"use strict";(function(){var k;$.exports=k=function(){function u(){}return u.prototype.handleError=function(C){throw new Error(C)},u}()}).call(void 0)},{}],260:[function(N,$,P){"use strict";(function(){var k;$.exports=k=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,$,P){"use strict";(function(){var k;$.exports=k=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,$,P){"use strict";(function(){var k,u,C,R=function(S,f){for(var a in f)h.call(f,a)&&(S[a]=f[a]);function o(){this.constructor=S}return o.prototype=f.prototype,S.prototype=new o,S.__super__=f.prototype,S},h={}.hasOwnProperty;C=N("./XMLNode"),k=N("./NodeType"),$.exports=u=function(s){R(S,s);function S(f,a,o,r,E,g){if(S.__super__.constructor.call(this,f),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(!E)throw new Error("Missing DTD attribute default. "+this.debugInfo(a));if(E.indexOf("#")!==0&&(E="#"+E),!E.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(a));if(g&&!E.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=k.AttributeDeclaration,this.attributeName=this.stringify.name(o),this.attributeType=this.stringify.dtdAttType(r),g&&(this.defaultValue=this.stringify.dtdAttDefault(g)),this.defaultValueType=E}return S.prototype.toString=function(f){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(f))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(N,$,P){"use strict";(function(){var k,u,C,R=function(S,f){for(var a in f)h.call(f,a)&&(S[a]=f[a]);function o(){this.constructor=S}return o.prototype=f.prototype,S.prototype=new o,S.__super__=f.prototype,S},h={}.hasOwnProperty;C=N("./XMLNode"),k=N("./NodeType"),$.exports=u=function(s){R(S,s);function S(f,a,o){if(S.__super__.constructor.call(this,f),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=k.ElementDeclaration,this.value=this.stringify.dtdElementValue(o)}return S.prototype.toString=function(f){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(f))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(N,$,P){"use strict";(function(){var k,u,C,R,h=function(f,a){for(var o in a)s.call(a,o)&&(f[o]=a[o]);function r(){this.constructor=f}return r.prototype=a.prototype,f.prototype=new r,f.__super__=a.prototype,f},s={}.hasOwnProperty;R=N("./Utility").isObject,C=N("./XMLNode"),k=N("./NodeType"),$.exports=u=function(S){h(f,S);function f(a,o,r,E){if(f.__super__.constructor.call(this,a),r==null)throw new Error("Missing DTD entity name. "+this.debugInfo(r));if(E==null)throw new Error("Missing DTD entity value. "+this.debugInfo(r));if(this.pe=!!o,this.name=this.stringify.name(r),this.type=k.EntityDeclaration,!R(E))this.value=this.stringify.dtdEntityValue(E),this.internal=!0;else{if(!E.pubID&&!E.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(r));if(E.pubID&&!E.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(r));if(this.internal=!1,E.pubID!=null&&(this.pubID=this.stringify.dtdPubID(E.pubID)),E.sysID!=null&&(this.sysID=this.stringify.dtdSysID(E.sysID)),E.nData!=null&&(this.nData=this.stringify.dtdNData(E.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(r))}}return Object.defineProperty(f.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(f.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(f.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(f.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(f.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(f.prototype,"xmlVersion",{get:function(){return null}}),f.prototype.toString=function(a){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(a))},f}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(N,$,P){"use strict";(function(){var k,u,C,R=function(S,f){for(var a in f)h.call(f,a)&&(S[a]=f[a]);function o(){this.constructor=S}return o.prototype=f.prototype,S.prototype=new o,S.__super__=f.prototype,S},h={}.hasOwnProperty;C=N("./XMLNode"),k=N("./NodeType"),$.exports=u=function(s){R(S,s);function S(f,a,o){if(S.__super__.constructor.call(this,f),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=k.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(f){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(f))},S}(C)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(N,$,P){"use strict";(function(){var k,u,C,R,h=function(f,a){for(var o in a)s.call(a,o)&&(f[o]=a[o]);function r(){this.constructor=f}return r.prototype=a.prototype,f.prototype=new r,f.__super__=a.prototype,f},s={}.hasOwnProperty;R=N("./Utility").isObject,C=N("./XMLNode"),k=N("./NodeType"),$.exports=u=function(S){h(f,S);function f(a,o,r,E){var g;f.__super__.constructor.call(this,a),R(o)&&(g=o,o=g.version,r=g.encoding,E=g.standalone),o||(o="1.0"),this.type=k.Declaration,this.version=this.stringify.xmlVersion(o),r!=null&&(this.encoding=this.stringify.xmlEncoding(r)),E!=null&&(this.standalone=this.stringify.xmlStandalone(E))}return f.prototype.toString=function(a){return this.options.writer.declaration(this,this.options.writer.filterOptions(a))},f}(C)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(N,$,P){"use strict";(function(){var k,u,C,R,h,s,S,f,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,f=N("./XMLNode"),k=N("./NodeType"),u=N("./XMLDTDAttList"),R=N("./XMLDTDEntity"),C=N("./XMLDTDElement"),h=N("./XMLDTDNotation"),S=N("./XMLNamedNodeMap"),$.exports=s=function(E){o(g,E);function g(m,w,p){var d,n,l,c,T,v;if(g.__super__.constructor.call(this,m),this.type=k.DocType,m.children){for(c=m.children,n=0,l=c.length;n=0;)this.up();return this.onEnd()},b.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},b.prototype.openNode=function(x){var y,_,I,j;if(!x.isOpen){if(!this.root&&this.currentLevel===0&&x.type===k.Element&&(this.root=x),_="",x.type===k.Element){this.writerOptions.state=u.OpenTag,_=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<"+x.name,j=x.attribs;for(I in j){if(!A.call(j,I))continue;y=j[I],_+=this.writer.attribute(y,this.writerOptions,this.currentLevel)}_+=(x.children?">":"/>")+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=u.InsideTag}else this.writerOptions.state=u.OpenTag,_=this.writer.indent(x,this.writerOptions,this.currentLevel)+""),_+=this.writer.endline(x,this.writerOptions,this.currentLevel);return this.onData(_,this.currentLevel),x.isOpen=!0}},b.prototype.closeNode=function(x){var y;if(!x.isClosed)return y="",this.writerOptions.state=u.CloseTag,x.type===k.Element?y=this.writer.indent(x,this.writerOptions,this.currentLevel)+""+this.writer.endline(x,this.writerOptions,this.currentLevel):y=this.writer.indent(x,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=u.None,this.onData(y,this.currentLevel),x.isClosed=!0},b.prototype.onData=function(x,y){return this.documentStarted=!0,this.onDataCallback(x,y+1)},b.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},b.prototype.debugInfo=function(x){return x==null?"":"node: <"+x+">"},b.prototype.ele=function(){return this.element.apply(this,arguments)},b.prototype.nod=function(x,y,_){return this.node(x,y,_)},b.prototype.txt=function(x){return this.text(x)},b.prototype.dat=function(x){return this.cdata(x)},b.prototype.com=function(x){return this.comment(x)},b.prototype.ins=function(x,y){return this.instruction(x,y)},b.prototype.dec=function(x,y,_){return this.declaration(x,y,_)},b.prototype.dtd=function(x,y,_){return this.doctype(x,y,_)},b.prototype.e=function(x,y,_){return this.element(x,y,_)},b.prototype.n=function(x,y,_){return this.node(x,y,_)},b.prototype.t=function(x){return this.text(x)},b.prototype.d=function(x){return this.cdata(x)},b.prototype.c=function(x){return this.comment(x)},b.prototype.r=function(x){return this.raw(x)},b.prototype.i=function(x,y){return this.instruction(x,y)},b.prototype.att=function(){return this.currentNode&&this.currentNode.type===k.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},b.prototype.a=function(){return this.currentNode&&this.currentNode.type===k.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},b.prototype.ent=function(x,y){return this.entity(x,y)},b.prototype.pent=function(x,y){return this.pEntity(x,y)},b.prototype.not=function(x,y){return this.notation(x,y)},b}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(N,$,P){"use strict";var k=N("babel-runtime/core-js/object/create"),u=C(k);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s,S=function(o,r){for(var E in r)f.call(r,E)&&(o[E]=r[E]);function g(){this.constructor=o}return g.prototype=r.prototype,o.prototype=new g,o.__super__=r.prototype,o},f={}.hasOwnProperty;s=N("./XMLNode"),R=N("./NodeType"),$.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,$,P){"use strict";var k=N("babel-runtime/core-js/object/create"),u=C(k);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R,h,s,S,f,a,o,r,E,g=function(p,d){for(var n in d)m.call(d,n)&&(p[n]=d[n]);function l(){this.constructor=p}return l.prototype=d.prototype,p.prototype=new l,p.__super__=d.prototype,p},m={}.hasOwnProperty;E=N("./Utility"),r=E.isObject,o=E.isFunction,a=E.getValue,f=N("./XMLNode"),R=N("./NodeType"),h=N("./XMLAttribute"),S=N("./XMLNamedNodeMap"),$.exports=s=function(w){g(p,w);function p(d,n,l){var c,T,v,i;if(p.__super__.constructor.call(this,d),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),d.type===R.Document&&(this.isRoot=!0,this.documentObject=d,d.rootObject=this,d.children)){for(i=d.children,T=0,v=i.length;T=c;n=0<=c?++l:--l)if(!this.attribs[n].isEqualNode(d.attribs[n]))return!1;return!0},p}(f)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(N,$,P){"use strict";var k=N("babel-runtime/core-js/object/keys"),u=C(k);function C(R){return R&&R.__esModule?R:{default:R}}(function(){var R;$.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,$,P){"use strict";(function(){var k,u,C,R,h,s,S,f,a,o,r,E,g,m,w,p,d,n,l,c={}.hasOwnProperty;l=N("./Utility"),n=l.isObject,d=l.isFunction,p=l.isEmpty,w=l.getValue,f=null,C=null,R=null,h=null,s=null,g=null,m=null,E=null,S=null,u=null,r=null,a=null,k=null,$.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,f||(f=N("./XMLElement"),C=N("./XMLCData"),R=N("./XMLComment"),h=N("./XMLDeclaration"),s=N("./XMLDocType"),g=N("./XMLRaw"),m=N("./XMLText"),E=N("./XMLProcessingInstruction"),S=N("./XMLDummy"),u=N("./NodeType"),r=N("./XMLNodeList"),a=N("./XMLNamedNodeMap"),k=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,b,x;if(this.nodeType===u.Element||this.nodeType===u.DocumentFragment){for(x="",b=this.children,L=0,A=b.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=k.Disconnected|k.ImplementationSpecific,Math.random()<.5?L|=k.Preceding:L|=k.Following,L):i.isAncestor(v)?k.Contains|k.Preceding:i.isDescendant(v)?k.Contains|k.Following:i.isPreceding(v)?k.Preceding:k.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,b,x;for(x=this.children,A=0,b=x.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,b,x,y;for(v||(v=this.document()),x=v.children,A=0,b=x.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)},f.prototype.element=function(a,o,r){var E,g,m,w,p,d,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;E=c[n],this.attribute(E,o,r)}if(m=a.children.length,w=m===0?null:a.children[0],m===0||a.children.every(function(v){return(v.type===k.Text||v.type===k.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===k.Text||w.type===k.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,d=T.length;p")}return this.stream.write(this.endline(a,o,r)),o.state=u.None,this.closeNode(a,o,r)},f.prototype.processingInstruction=function(a,o,r){return this.stream.write(f.__super__.processingInstruction.call(this,a,o,r))},f.prototype.raw=function(a,o,r){return this.stream.write(f.__super__.raw.call(this,a,o,r))},f.prototype.text=function(a,o,r){return this.stream.write(f.__super__.text.call(this,a,o,r))},f.prototype.dtdAttList=function(a,o,r){return this.stream.write(f.__super__.dtdAttList.call(this,a,o,r))},f.prototype.dtdElement=function(a,o,r){return this.stream.write(f.__super__.dtdElement.call(this,a,o,r))},f.prototype.dtdEntity=function(a,o,r){return this.stream.write(f.__super__.dtdEntity.call(this,a,o,r))},f.prototype.dtdNotation=function(a,o,r){return this.stream.write(f.__super__.dtdNotation.call(this,a,o,r))},f}(R)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(N,$,P){"use strict";(function(){var k,u,C=function(s,S){for(var f in S)R.call(S,f)&&(s[f]=S[f]);function a(){this.constructor=s}return a.prototype=S.prototype,s.prototype=new a,s.__super__=S.prototype,s},R={}.hasOwnProperty;u=N("./XMLWriterBase"),$.exports=k=function(h){C(s,h);function s(S){s.__super__.constructor.call(this,S)}return s.prototype.document=function(S,f){var a,o,r,E,g;for(f=this.filterOptions(f),E="",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,b,x;if(v||(v=0),this.openNode(c,T,v),T.state=u.OpenTag,b=this.indent(c,T,v),b+="0){for(b+=" [",b+=this.endline(c,T,v),T.state=u.InsideTag,x=c.children,L=0,A=x.length;L",b+=this.endline(c,T,v),T.state=u.None,this.closeNode(c,T,v),b},l.prototype.element=function(c,T,v){var i,L,A,b,x,y,_,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,b=A===0?null:c.children[0],A===0||c.children.every(function(B){return(B.type===k.Text||B.type===k.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&&(b.type===k.Text||b.type===k.Raw)&&b.value!=null)G+=">",T.state=u.InsideTag,T.suppressPrettyCount++,M=!0,G+=this.writeChildNode(b,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,x=0,_=H.length;x<_;x++)if(L=H[x],(L.type===k.Text||L.type===k.Raw)&&L.value!=null){T.suppressPrettyCount++,M=!0;break}}for(G+=">"+this.endline(c,T,v),T.state=u.InsideTag,z=c.children,y=0,I=z.length;y",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 k.CData:return this.cdata(c,T,v);case k.Comment:return this.comment(c,T,v);case k.Element:return this.element(c,T,v);case k.Raw:return this.raw(c,T,v);case k.Text:return this.text(c,T,v);case k.ProcessingInstruction:return this.processingInstruction(c,T,v);case k.Dummy:return"";case k.Declaration:return this.declaration(c,T,v);case k.DocType:return this.docType(c,T,v);case k.AttributeDeclaration:return this.dtdAttList(c,T,v);case k.ElementDeclaration:return this.dtdElement(c,T,v);case k.EntityDeclaration:return this.dtdEntity(c,T,v);case k.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,$,P){"use strict";(function(){var k,u,C,R,h,s,S,f,a,o;o=N("./Utility"),f=o.assign,a=o.isFunction,C=N("./XMLDOMImplementation"),R=N("./XMLDocument"),h=N("./XMLDocumentCB"),S=N("./XMLStringWriter"),s=N("./XMLStreamWriter"),k=N("./NodeType"),u=N("./WriterState"),$.exports.create=function(r,E,g,m){var w,p;if(r==null)throw new Error("Root element needs a name.");return m=f({},E,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},$.exports.begin=function(r,E,g){var m;return a(r)&&(m=[r,E],E=m[0],g=m[1],r={}),E?new h(r,E,g):new R(r)},$.exports.stringWriter=function(r){return new S(r)},$.exports.streamWriter=function(r,E){return new s(r,E)},$.exports.implementation=new C,$.exports.nodeType=k,$.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,$,P){$.exports=u;var k=Object.prototype.hasOwnProperty;function u(){for(var C={},R=0;Rh?r=o(r):r.length>5]|=128<>>9<<4)+14]=E;for(var g=1732584193,m=-271733879,w=-1732584194,p=271733878,d=0;d>16)+(E>>16)+(g>>16);return m<<16|g&65535}function o(r,E){return r<>>32-E}$.exports=function(E){return k.hash(E,C,16)}},{"./helpers":285}],287:[function(N,$,P){"use strict";var k=N("./helpers");function u(S,f){S[f>>5]|=128<<24-f%32,S[(f+64>>9<<4)+15]=f;for(var a=Array(80),o=1732584193,r=-271733879,E=-1732584194,g=271733878,m=-1009589776,w=0;w>16)+(f>>16)+(a>>16);return o<<16|a&65535}function s(S,f){return S<>>32-f}$.exports=function(f){return k.hash(f,u,20,!0)}},{"./helpers":285}],288:[function(N,$,P){"use strict";$.exports=function(){return function(){}}},{}],289:[function(N,$,P){(function(k){"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"),f=S.isArray;$.exports.string=function(r){return typeof r=="string"},$.exports.array=f,$.exports.buffer=k.isBuffer;function a(o){return o instanceof s}$.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,$,P){"use strict";P.encodeURIComponent=function(k){try{return encodeURIComponent(k)}catch(u){return k}},P.escape=N("escape-html"),P.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,$,P){(function(k,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 f=N("util"),a=N("url"),o=N("http"),r=N("https"),E=N("debug")("urllib"),g=N("humanize-ms"),m,w=0,p=Math.pow(2,31)-10,d=/^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})}}P.TIMEOUTS=[g("300s"),g("300s")];var c=["json","text"];P.request=function(v,i,L){return arguments.length===2&&typeof i=="function"&&(L=i,i=null),typeof L=="function"?P.requestWithCallback(v,i,L):(m||(m=N("any-promise")),new m(function(A,b){P.requestWithCallback(v,i,l(A,b))}))},P.requestWithCallback=function(v,i,L){if(!v||typeof v!="string"&&(typeof v=="undefined"?"undefined":(0,s.default)(v))!=="object"){var A=f.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 b=++w;i.requestUrls=i.requestUrls||[];var x={requestId:b,url:v,args:i,ctx:i.ctx};i.emitter&&i.emitter.emit("request",x),i.timeout=i.timeout||P.TIMEOUTS,i.maxRedirects=i.maxRedirects||10,i.streaming=i.streaming||i.customResponse;var y=Date.now(),_;typeof v=="string"?(d.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,P.agent),K=i.fixJSONCtlChars;_.protocol==="https:"&&(M=r,G=n(i.httpsAgent,P.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 E("Request#%d %s: got digest auth header WWW-Authenticate: %s",b,v,Me),i.headers=i.headers||{},i.headers.Authorization=digestAuthHeader(H.method,H.path,Me,i.digestAuth),E("Request#%d %s: auth with digest header: %s",b,v,i.headers.Authorization),tt.headers["set-cookie"]&&(i.headers.Cookie=tt.headers["set-cookie"].join(";")),P.requestWithCallback(v,i,He)}var De=Date.now()-y;ae&&(ae.contentDownload=De),E("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",De,re,be,H.method,H.host,H.path,se,ae);var Te={status:be,statusCode:be,headers:$e,size:re,aborted:Z,rt:De,keepAliveSocket:se,data:Ve,requestUrls:i.requestUrls,timing:ae,remoteAddress:te,remotePort:Ee};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)($e),Ce.data=Ve,Ce.path=H.path,Ce.status=be,Ce.headers=$e,Ce.res=Te}He(Ce,Ve,i.streaming?tt:Te),i.emitter&&(x.url=v,x.socket=qe&&qe.connection,x.options=H,x.size=ye,i.emitter.emit("response",{requestId:b,error:Ce,ctx:i.ctx,req:x,res:Te}))}function he(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);E("Request#%d %s: `redirected` from %s to %s",b,H.path,v,He),X(),i.headers&&i.headers.Host&&d.test(tt)&&(i.headers.Host=null);var $e=L;return L=null,P.requestWithCallback(He,i,$e),{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 Se=i.writeStream;E("Request#%d %s %s with headers %j, options.path: %s",b,I,v,H.headers,H.path),i.requestUrls.push(v);function Ke(Ce){if(ae&&(ae.waiting=Date.now()-y),E("Request#%d %s `req response` event emit: status %d, headers: %j",b,v,Ce.statusCode,Ce.headers),i.streaming){var Ve=he(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(){E("Request#%d %s: `res close` event emit, total size %d",b,v,re)}),Ce.on("error",function(){E("Request#%d %s: `res error` event emit, total size %d",b,v,re)}),Ce.on("aborted",function(){Z=!0,E("Request#%d %s: `res aborted` event emit, total size %d",b,v,re)}),Se){var Ve=he(Ce);if(Ve.redirect){Ce.resume();return}return Ve.error?(Ce.resume(),Se.end(),Q(Ve.error,null,Ce)):(i.consumeWriteStream===!1?Ce.on("end",Q.bind(null,null,null,Ce)):isNode010||isNode012?first([[Se,"close"],[Ce,"aborted"]],function($e,Me,De){E("Request#%d %s: writeStream or res %s event emitted",b,v,De),Q(xe||null,null,Ce)}):Se.on("close",function(){E("Request#%d %s: writeStream close event emitted",b,v),Q(xe||null,null,Ce)}),Ce.pipe(Se))}var tt=[];Ce.on("data",function(He){E("Request#%d %s: `res data` event emit, size %d",b,v,He.length),re+=He.length,tt.push(He)}),Ce.on("end",function(){var He=u.concat(tt,re);if(E("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",b,v,re,Ce._dumped),xe)return Q(xe,He,Ce);var $e=he(Ce);if($e.error)return Q($e.error,He,Ce);if($e.redirect)return;ce(Ce,He,function(Me,De,Te){if(Me)return Q(Me,He,Ce);if(!Te&&c.indexOf(i.dataType)>=0){try{De=decodeBodyByCharset(De,Ce)}catch(ge){return E("decodeBodyByCharset error: %s",ge),Q(null,De,Ce)}if(i.dataType==="json")if(re===0)De=null;else{var de=parseJSON(De,K);de.error?Me=de.error:De=de.data}}Z&&E("Request#%d %s: Remote socket was terminated before `response.end()` was called",b,v),Q(Me,De,Ce)})})}var Ge,Ye;Array.isArray(i.timeout)?(Ge=g(i.timeout[0]),Ye=g(i.timeout[1])):Ge=Ye=g(i.timeout),E("ConnectTimeout: %d, ResponseTimeout: %d",Ge,Ye);function Qe(){E("Connect timer ticking, timeout: %d",Ge),le=setTimeout(function(){le=null,be===-1&&(be=-2);var Ce="Connect timeout for "+Ge+"ms",Ve="ConnectionTimeoutError";qe.socket||(Ve="SocketAssignTimeoutError",Ce+=", working sockets is full"),xe=new Error(Ce),xe.name=Ve,xe.requestId=b,E("ConnectTimeout: Request#%d %s %s: %s, connected: %s",b,v,xe.name,Ce,ie),Le()},Ge)}function rt(){E("Response timer ticking, timeout: %d",Ye),Oe=setTimeout(function(){Oe=null;var Ce="Response timeout for "+Ye+"ms",Ve="ResponseTimeoutError";xe=new Error(Ce),xe.name=Ve,xe.requestId=b,E("ResponseTimeout: Request#%d %s %s: %s, connected: %s",b,v,xe.name,Ce,ie),Le()},Ye)}var qe;H.mode=i.mode?i.mode:"";try{qe=M.request(H,Ke)}catch(Ce){return Q(Ce)}typeof window=="undefined"?Qe():qe.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=b,Le()});function Le(){E("Request#%d %s abort, connected: %s",b,v,ie),qe.socket||(xe.noSocket=!0,Q(xe)),qe.abort()}return ae&&qe.on("finish",function(){ae.requestSent=Date.now()-y}),qe.once("socket",function(Ce){ae&&(ae.queuing=Date.now()-y),isNode010&&Ce.socket&&(Ce=Ce.socket);var Ve=Ce.readyState;if(Ve==="opening"){Ce.once("lookup",function(tt,He,$e){E("Request#%d %s lookup: %s, %s, %s",b,v,tt,He,$e),ae&&(ae.dnslookup=Date.now()-y),He&&(te=He)}),Ce.once("connect",function(){ae&&(ae.connected=Date.now()-y),Y(),rt(),E("Request#%d %s new socket connected",b,v),ie=!0,te||(te=Ce.remoteAddress),Ee=Ce.remotePort});return}E("Request#%d %s reuse socket connected, readyState: %s",b,v,Ve),ie=!0,se=!0,te||(te=Ce.remoteAddress),Ee=Ce.remotePort,Y(),rt()}),qe.on("error",function(Ce){(Ce.name==="Error"||Ce.name==="TypeError")&&(Ce.name=ie?"ResponseError":"RequestError"),Ce.message+=' (req "error")',E("Request#%d %s `req error` event emit, %s: %s",b,v,Ce.name,Ce.message),Q(xe||Ce)}),Se&&Se.once("error",function(Ce){Ce.message+=' (writeStream "error")',xe=Ce,E("Request#%d %s `writeStream error` event emit, %s: %s",b,v,Ce.name,Ce.message),Le()}),i.stream?(i.stream.pipe(qe),i.stream.once("error",function(Ce){Ce.message+=' (stream "error")',xe=Ce,E("Request#%d %s `readStream error` event emit, %s: %s",b,v,Ce.name,Ce.message),Le()})):qe.end(J),qe.requestId=b,qe}}).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,$,P){"use strict";P.d($,"a",function(){return f});var k=P("q1tI"),u=P("biw7"),C=P("fyJ8");function R(a){var o=a.className,r=a.index,E=a.children,g=a.colSpan,m=a.rowSpan,w=k.useContext(u.a),p=w.prefixCls,d=w.fixedInfoList,n=d[r];return k.createElement(C.a,Object.assign({className:o,index:r,component:"td",prefixCls:p,record:null,dataIndex:null,render:function(){return{children:E,props:{colSpan:g,rowSpan:m}}}},n))}function h(a){return k.createElement("tr",Object.assign({},a))}function s(a){var o=a.children,r=k.useContext(u.a),E=r.prefixCls;return k.createElement("tfoot",{className:"".concat(E,"-summary")},o)}var S=$.b=s,f={Cell:R,Row:h}},nj2k:function(N,$,P){N.exports=P.p+"static/nodata.c3b0b86c.svg"},oRuE:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("OLod"))})(this,function(k){return k.pad.Iso10126={pad:function(u,C){var R=C*4,h=R-u.sigBytes%R;u.concat(k.lib.WordArray.random(h-1)).concat(k.lib.WordArray.create([h<<24],1))},unpad:function(u){var C=u.words[u.sigBytes-1>>>2]&255;u.sigBytes-=C}},k.pad.Iso10126})},osHv:function(N,$,P){(function(k){k(P("VrN/"))})(function(k){"use strict";var u=k.Pos;function C(d,n){return d.line-n.line||d.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(d,n,l,c){this.line=n,this.ch=l,this.cm=d,this.text=d.getLine(n),this.min=c?Math.max(c.from,d.firstLine()):d.firstLine(),this.max=c?Math.min(c.to-1,d.lastLine()):d.lastLine()}function f(d,n){var l=d.cm.getTokenTypeAt(u(d.line,n));return l&&/\btag\b/.test(l)}function a(d){return d.line>=d.max?void 0:(d.ch=0,d.text=d.cm.getLine(++d.line),!0)}function o(d){return d.line<=d.min?void 0:(d.text=d.cm.getLine(--d.line),d.ch=d.text.length,!0)}function r(d){for(;;){var n=d.text.indexOf(">",d.ch);if(n==-1){if(a(d))continue;return}if(!f(d,n+1)){d.ch=n+1;continue}var l=d.text.lastIndexOf("/",n),c=l>-1&&!/\S/.test(d.text.slice(l+1,n));return d.ch=n+1,c?"selfClose":"regular"}}function E(d){for(;;){var n=d.ch?d.text.lastIndexOf("<",d.ch-1):-1;if(n==-1){if(o(d))continue;return}if(!f(d,n+1)){d.ch=n;continue}s.lastIndex=n,d.ch=n;var l=s.exec(d.text);if(l&&l.index==n)return l}}function g(d){for(;;){s.lastIndex=d.ch;var n=s.exec(d.text);if(!n){if(a(d))continue;return}if(!f(d,n.index+1)){d.ch=n.index+1;continue}return d.ch=n.index+n[0].length,n}}function m(d){for(;;){var n=d.ch?d.text.lastIndexOf(">",d.ch-1):-1;if(n==-1){if(o(d))continue;return}if(!f(d,n+1)){d.ch=n;continue}var l=d.text.lastIndexOf("/",n),c=l>-1&&!/\S/.test(d.text.slice(l+1,n));return d.ch=n+1,c?"selfClose":"regular"}}function w(d,n){for(var l=[];;){var c=g(d),T,v=d.line,i=d.ch-(c?c[0].length:0);if(!c||!(T=r(d)))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(d.line,d.ch)}}else l.push(c[2])}}function p(d,n){for(var l=[];;){var c=m(d);if(!c)return;if(c=="selfClose"){E(d);continue}var T=d.line,v=d.ch,i=E(d);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(d.line,d.ch),to:u(T,v)}}}}k.registerHelper("fold","xml",function(d,n){for(var l=new S(d,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}}}),k.findMatchingTag=function(d,n,l){var c=new S(d,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&&E(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(d,v.line,v.ch,l),{open:L,close:w(c,i[2]),at:"open"})},k.findEnclosingTag=function(d,n,l,c){for(var T=new S(d,n.line,n.ch,l);;){var v=p(T,c);if(!v)break;var i=new S(d,n.line,n.ch,l),L=w(i,v.tag);if(L)return{open:v,close:L}}},k.scanForClosingTag=function(d,n,l,c){var T=new S(d,n.line,n.ch,c?{from:0,to:c}:null);return w(T,l)}})},p5ED:function(N,$,P){"use strict";var k=P("+L6B"),u=P("2/Rp"),C=P("5Dmo"),R=P("3S7+"),h=P("k1fw"),s=P("tJVT"),S=P("q1tI"),f=P.n(S),a=P("vHTk"),o=P.n(a),r=P("yEEn"),E=P("ZW9T"),g=P("1vsH");$.a=function(m){var w=m.name,p=m.data,d=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,b=Object(S.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),x=Object(s.a)(b,2),y=x[0],_=x[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(J){var ee=J.split("=");ee[0]==="_educoder_session"&&G(ee[1])})},[]);var H=function(){if(p.startsWith("http")||p.startsWith("/")){z();return}Object(g.y)(l||"educoder",p,l)},z=function(){Object(g.w)(l||w,p)};return console.log("data:",p,"fileanme:",l," name:",w),f.a.createElement("div",{style:Object(h.a)({},v||{}),className:"".concat(A&&o.a.bgBlack," ").concat(n?o.a.wrp:"hide")},i&&f.a.createElement("div",{className:o.a.close,ref:K},f.a.createElement(R.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return K.current}},f.a.createElement("span",{onClick:z},f.a.createElement("i",{className:"icon-quxiaozhiding"}))),f.a.createElement(R.a,{title:"\u5173\u95ED",getPopupContainer:function(){return K.current}},f.a.createElement("span",{className:"",onClick:L},f.a.createElement("i",{className:"icon-guanbi1"})))),f.a.createElement("div",{className:"".concat(o.a[T]," ").concat(T," ").concat(o.a.monaco," ").concat(n==="txt"?"show":"hide")},n==="txt"&&f.a.createElement(E.b,c)),n==="audio"&&f.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"&&f.a.createElement(f.a.Fragment,null,p!=null&&p.startsWith("/")?f.a.createElement("video",{controls:!0,src:"".concat(p),autoPlay:!0}):f.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(p),autoPlay:!0})),n==="pdf"&&f.a.createElement("embed",{className:o.a.embed,src:p}),n==="image"&&f.a.createElement(f.a.Fragment,null,f.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"&&f.a.createElement("div",null,f.a.createElement(u.a,{type:"primary",size:"large",onClick:H},f.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(n==="download"||n==="office")&&f.a.createElement(u.a,{type:"primary",size:"large",onClick:H},f.a.createElement(r.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(N,$,P){},pA7S:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("ETIr"),P("cv67"),P("K3mO"),P("OLod"))})(this,function(k){return function(){var u=k,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],f=[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],E=s.DES=h.extend({_doReset:function(){for(var p=this._key,d=p.words,n=[],l=0;l<56;l++){var c=S[l]-1;n[l]=d[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[(f[l]-1+L)%28]<<31-l%6,i[4+(l/6|0)]|=n[28+(f[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,d){this._doCryptBlock(p,d,this._subKeys)},decryptBlock:function(p,d){this._doCryptBlock(p,d,this._invSubKeys)},_doCryptBlock:function(p,d,n){this._lBlock=p[d],this._rBlock=p[d+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[d]=this._lBlock,p[d+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function g(p,d){var n=(this._lBlock>>>p^this._rBlock)&d;this._rBlock^=n,this._lBlock^=n<>>p^this._lBlock)&d;this._lBlock^=n,this._rBlock^=n<192.");var n=d.slice(0,2),l=d.length<4?d.slice(0,2):d.slice(2,4),c=d.length<6?d.slice(0,2):d.slice(4,6);this._des1=E.createEncryptor(R.create(n)),this._des2=E.createEncryptor(R.create(l)),this._des3=E.createEncryptor(R.create(c))},encryptBlock:function(p,d){this._des1.encryptBlock(p,d),this._des2.decryptBlock(p,d),this._des3.encryptBlock(p,d)},decryptBlock:function(p,d){this._des3.decryptBlock(p,d),this._des2.encryptBlock(p,d),this._des1.decryptBlock(p,d)},keySize:192/32,ivSize:64/32,blockSize:64/32});u.TripleDES=h._createHelper(w)}(),k.TripleDES})},qBft:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("OLod"))})(this,function(k){return k.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}},k.pad.Ansix923})},qM6L:function(N,$,P){(function(k,u){N.exports=$=u(P("Ib8C"))})(this,function(k){return function(){var u=k,C=u.lib,R=C.WordArray,h=u.enc,s=h.Utf16=h.Utf16BE={stringify:function(f){for(var a=f.words,o=f.sigBytes,r=[],E=0;E>>2]>>>16-E%4*8&65535;r.push(String.fromCharCode(g))}return r.join("")},parse:function(f){for(var a=f.length,o=[],r=0;r>>1]|=f.charCodeAt(r)<<16-r%2*16;return R.create(o,a*2)}};h.Utf16LE={stringify:function(f){for(var a=f.words,o=f.sigBytes,r=[],E=0;E>>2]>>>16-E%4*8&65535);r.push(String.fromCharCode(g))}return r.join("")},parse:function(f){for(var a=f.length,o=[],r=0;r>>1]|=S(f.charCodeAt(r)<<16-r%2*16);return R.create(o,a*2)}};function S(f){return f<<8&4278255360|f>>>8&16711935}}(),k.enc.Utf16})},qu8F:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("OLod"))})(this,function(k){/** @preserve * Counter block mode compatible with Dr Brian Gladman fileenc.c * derived from CryptoJS.mode.CTR * Jan Hruby jhruby.web@gmail.com */return k.mode.CTRGladman=function(){var u=k.lib.BlockCipherMode.extend();function C(s){if((s>>24&255)===255){var S=s>>16&255,f=s>>8&255,a=s&255;S===255?(S=0,f===255?(f=0,a===255?a=0:++a):++f):++S,s=0,s+=S<<16,s+=f<<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 f=this._cipher,a=f.blockSize,o=this._iv,r=this._counter;o&&(r=this._counter=o.slice(0),this._iv=void 0),R(r);var E=r.slice(0);f.encryptBlock(E,0);for(var g=0;g=C.length?{done:!0}:{done:!1,value:C[s++]}},e:function(E){throw E},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 f=!0,a=!1,o;return{s:function(){h=C[Symbol.iterator]()},n:function(){var E=h.next();return f=E.done,E},e:function(E){a=!0,o=E},f:function(){try{!f&&h.return!=null&&h.return()}finally{if(a)throw o}}}}},rUJ1:function(N,$){const P=/[&<>"']/,k=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,C=/[<>"']|&(?!#?\w+;)/g,R={"&":"&","<":"<",">":">",'"':""","'":"'"},h=A=>R[A];function s(A,b){if(b){if(P.test(A))return A.replace(k,h)}else if(u.test(A))return A.replace(C,h);return A}const S=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function f(A){return A.replace(S,(b,x)=>(x=x.toLowerCase(),x==="colon"?":":x.charAt(0)==="#"?x.charAt(1)==="x"?String.fromCharCode(parseInt(x.substring(2),16)):String.fromCharCode(+x.substring(1)):""))}const a=/(^|[^\[])\^/g;function o(A,b){A=A.source||A,b=b||"";const x={replace:(y,_)=>(_=_.source||_,_=_.replace(a,"$1"),A=A.replace(y,_),x),getRegex:()=>new RegExp(A,b)};return x}const r=/[^\w:]/g,E=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function g(A,b,x){if(A){let y;try{y=decodeURIComponent(f(x)).replace(r,"").toLowerCase()}catch(_){return null}if(y.indexOf("javascript:")===0||y.indexOf("vbscript:")===0||y.indexOf("data:")===0)return null}b&&!E.test(x)&&(x=n(b,x));try{x=encodeURI(x).replace(/%25/g,"%")}catch(y){return null}return x}const m={},w=/^[^:]+:\/*[^/]*$/,p=/^([^:]+:)[\s\S]*$/,d=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(A,b){m[" "+A]||(w.test(A)?m[" "+A]=A+"/":m[" "+A]=v(A,"/",!0)),A=m[" "+A];const x=A.indexOf(":")===-1;return b.substring(0,2)==="//"?x?b:A.replace(p,"$1")+b:b.charAt(0)==="/"?x?b:A.replace(d,"$1")+b:A+b}const l={exec:function(){}};function c(A){let b=1,x,y;for(;b{let G=!1,K=j;for(;--K>=0&&M[K]==="\\";)G=!G;return G?"|":" |"}),y=x.split(/ \|/);let _=0;if(y.length>b)y.splice(b);else for(;y.length0&&(Rt.children=[],be(jt,Rt.children))})}function Z(gt,Ct){for(var dt=[],or=0;or0){dt[0]=jt.id;for(var Rt=0;Rt0&&Ut[0]!==void 0?Ut[0]:"",dn(!0),Cr.next=4,Object(he.a)("/api/tag_disciplines.json",{method:"get",params:{target:dt,search:Rr}});case 4:zt=Cr.sent,nt(zt.tag_disciplines||[]),dn(!1);case 7:case"end":return Cr.stop()}},lr)}));return function(){return tr.apply(this,arguments)}}(),er=function(lr){var Rr=lr.name;z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:q.a.createElement("div",null,q.a.createElement(W.a,{defaultValue:Rr,placeholder:"\u8BF7\u8F93\u5165".concat(fr,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20,onChange:function(Ut){Rr=Ut.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var zt=Object(y.a)(J.a.mark(function rr(){var Cr;return J.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:if(Rr){on.next=3;break}return x.b.warn("\u9898\u76EE".concat(fr,"\u4E0D\u80FD\u4E3A\u7A7A")),on.abrupt("return",Promise.reject());case 3:return on.next=5,Object(he.a)("/api/tag_disciplines/".concat(lr.id,"/rename.json"),{method:"post",body:{id:lr.id,name:Rr}});case 5:Cr=on.sent,(Cr==null?void 0:Cr.status)===0&&Mt();case 7:case"end":return on.stop()}},rr)}));function Ut(){return zt.apply(this,arguments)}return Ut}()})},dr=function(lr){z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:dt==="practice"?q.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",q.a.createElement("span",{className:"c-light-primary"},lr.name),"\u201D\u5220\u9664\u5417\uFF1F",q.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):q.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",q.a.createElement("span",{className:"c-light-primary"},lr.name),"\u201D\u5220\u9664\u5417\uFF1F",q.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 Rr=Object(y.a)(J.a.mark(function Ut(){var rr;return J.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:return zr.next=2,Object(he.a)("/api/tag_disciplines/".concat(lr.id,".json"),{method:"delete",body:{id:lr.id}});case 2:rr=zr.sent,(rr==null?void 0:rr.status)===0&&Mt();case 4:case"end":return zr.stop()}},Ut)}));function zt(){return Rr.apply(this,arguments)}return zt}()})},en=function(lr){Mt(lr)},fr=dt==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return q.a.createElement(z.a,{afterClose:function(){jr(!1),dn(!1),Dr(""),Zr("1"),nt([])},centered:!0,keyboard:!1,width:600,title:"".concat(fr,"\u7BA1\u7406"),visible:!!dt,className:ut.a.customModal,footer:null,onCancel:Mr},q.a.createElement("section",{className:ut.a.wrap},q.a.createElement(Xe.a,{activeKey:gn,onChange:function(lr){Dr(""),Zr(lr),Mt()}},q.a.createElement(Xe.a.TabPane,{tab:"\u65B0\u589E".concat(fr),key:"1"},q.a.createElement(W.a,{value:Ur,onChange:function(lr){return Dr(lr.target.value)},className:ut.a.in,placeholder:"\u8F93\u5165".concat(fr,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20}),q.a.createElement("div",{className:ut.a.btns},q.a.createElement(T.a,{onClick:Mr,className:"mr20"},"\u53D6\u6D88 "),q.a.createElement(T.a,{loading:Ot,onClick:wt,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),q.a.createElement(Xe.a.TabPane,{tab:"\u5DF2\u6709".concat(fr),key:"2"},q.a.createElement(W.a.Search,{allowClear:!0,onSearch:en,value:Ur,onChange:function(lr){return Dr(lr.target.value)},className:ut.a.in,placeholder:"\u8F93\u5165".concat(fr,"\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2")}),q.a.createElement(l.a,{dataSource:Lt,bordered:!1,loading:Ar,scroll:Lt.length>7?{y:300}:{},style:{padding:"0 40px 20px 40px"},columns:[{title:"".concat(fr,"\u540D\u79F0"),dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:function(lr,Rr){return q.a.createElement("span",null,q.a.createElement("span",{onClick:function(){return er(Rr)},className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),q.a.createElement("span",{onClick:function(){return dr(Rr)},className:"current c-grey-666"},"\u5220\u9664"))}}],pagination:!1})))))},ct=mt,_t=P("m3rI"),At=P("B7Ph"),Et=P("wd/R"),Qt=P.n(Et),qt=P("1vsH"),Jt=P("9Bee"),mr=P("xKgJ"),Pt=W.a.TextArea,cr=z.a.confirm,ir=K.a.Panel,Ht={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0},$t;(function(gt){gt[gt.SET_INITAL_DATA=0]="SET_INITAL_DATA",gt[gt.SET_LOADING=1]="SET_LOADING",gt[gt.SET_STATUS=2]="SET_STATUS"})($t||($t={}));var Kr="#### \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 En(gt,Ct){switch(Ct.type){case $t.SET_INITAL_DATA:return Object(M.a)(Object(M.a)({},gt),Ct.payload);case $t.SET_LOADING:return Object(M.a)(Object(M.a)({},gt),{},{loading:Ct.payload});case $t.SET_STATUS:return Object(M.a)(Object(M.a)({},gt),{},{status:Ct.payload});default:throw new Error}}var Nr=$.default=function(){var gt,Ct,dt,or=Object(te.h)(),Mr=Object(te.g)(),jt=Object(te.i)(),Rt=jt.id,Ar=I.a.useForm(),dn=Object(j.a)(Ar,1),Sr=dn[0],st=Object(ee.useState)(),Ot=Object(j.a)(st,2),jr=Ot[0],$r=Ot[1],ft=Object(ee.useState)(!1),gn=Object(j.a)(ft,2),Zr=gn[0],St=gn[1],kr=Object(ee.useState)([]),Ur=Object(j.a)(kr,2),Dr=Ur[0],sr=Ur[1],wn=Object(ee.useState)([]),Lt=Object(j.a)(wn,2),nt=Lt[0],wt=Lt[1],Mt=Object(ee.useState)([]),er=Object(j.a)(Mt,2),dr=er[0],en=er[1],fr=Object(ee.useState)([]),tr=Object(j.a)(fr,2),lr=tr[0],Rr=tr[1],zt=Object(ee.useState)([]),Ut=Object(j.a)(zt,2),rr=Ut[0],Cr=Ut[1],zr=Object(ee.useState)("C"),on=Object(j.a)(zr,2),Ln=on[0],Va=on[1],ri=Object(ee.useReducer)(En,Ht),Pa=Object(j.a)(ri,2),ea=Pa[0],vn=Pa[1],Ca=ea.loading,Jr=ea.data,ta=ea.user,Nn=ea.status,sn=Jr==null?void 0:Jr.hack_sets,Mn=Jr==null||((gt=Jr.hack)===null||gt===void 0)?void 0:gt.test_set_average,da=Object(ee.useState)(!1),ya=Object(j.a)(da,2),ia=ya[0],Ba=ya[1],Oa=Object(ee.useRef)([]),ra=Object(ee.useState)(!1),Wa=Object(j.a)(ra,2),Ft=Wa[0],Kt=Wa[1],Gt=Object(ee.useState)(!1),gr=Object(j.a)(Gt,2),Pr=gr[0],Xr=gr[1],Vr=Object(ee.useRef)(!0),yn=Object(ee.useState)({}),rn=Object(j.a)(yn,2),xr=rn[0],fn=rn[1];Object(ee.useEffect)(function(){return Object(Ee.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(Ee.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(Ee.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(Ee.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}},[]),Object(ee.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)});var fa=function(){var Xt=Object(y.a)(J.a.mark(function Tt(){var Zt,nr;return J.a.wrap(function(yr){for(;;)switch(yr.prev=yr.next){case 0:return yr.next=2,Object(he.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}});case 2:return Zt=yr.sent,yr.next=5,Object(he.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});case 5:nr=yr.sent,wt(Zt.tag_disciplines||[]),en(nr.tag_disciplines||[]);case 8:case"end":return yr.stop()}},Tt)}));return function(){return Xt.apply(this,arguments)}}(),hn=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}],oa=Object(ee.useCallback)(Object(y.a)(J.a.mark(function Xt(){var Tt,Zt,nr,Gr,yr,Tn,pn,xa,kn,jn,Hn,Ua,Re,Fe,ze,ke,fe,Ae,ve,Pe,Ne,We,Be,Je,it,pt,ht;return J.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:if(vn({type:$t.SET_LOADING,payload:!0}),!Rt){Nt.next=19;break}return Nt.next=4,Ke(Rt);case 4:Tt=Nt.sent,Zt=Tt.user,nr=Tt.language,Gr=Tt.practice_sets,yr=Tt.practice_codes,Tn=Tt.description,pn=Tt.difficulty,xa=Tt.name,kn=Tt.open_or_not,jn=Tt.time_limit,Hn=Tt.test_set_average,Ua=Tt.test_set_score,Re=Tt.status,Fe=Tt.tag_discipline_ids,ze=Tt.source_discipline_ids,ke=Tt.item_banks_group_id,fe=Tt.is_file,Ae=fe===void 0?!1:fe,ve=Tt.hide_actual_output,Pe=Tt.review_privilege,Ne=Tt.review_description,We={review_privilege:Pe,status:Re,review_description:Ne,name:xa},fn(We),Ba(ve),Be=Ae?[{input:"",output:"",score:100,position:1}]:Gr,Ae?(sr(Gr),Sr.setFieldsValue({hack_sets:Be})):sr([]),Je={loading:!0,user:Zt,status:Re,data:{hack:{difficulty:pn,name:xa,description:Tn,open_or_not:kn,time_limit:jn,test_set_average:Hn,test_set_score:Ua,tag_discipline_ids:Fe,source_discipline_ids:ze,is_file:Ae},hack_sets:Be}},vn({type:$t.SET_INITAL_DATA,payload:Je}),$r({hack:{difficulty:pn,name:xa,description:Tn,open_or_not:kn,time_limit:jn,test_set_average:Hn,test_set_score:Ua,tag_discipline_ids:Fe,source_discipline_ids:ze,is_file:Ae}}),it=yr==null?void 0:yr.map(function(ar){return Object(M.a)(Object(M.a)({},ar),{},{code:ae.Base64.decode(ar==null?void 0:ar.code)})}),Cr(it),Oa.current=it,Nt.next=27;break;case 19:return Nt.next=21,Se();case 21:pt=Nt.sent,ht=pt.user,vn({type:$t.SET_INITAL_DATA,payload:{loading:!0,status:0,user:ht,data:{hack:{difficulty:"",time_limit:3,description:Kr,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),$r({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),Cr(hn),Oa.current=hn;case 27:vn({type:$t.SET_LOADING,payload:!1});case 28:case"end":return Nt.stop()}},Xt)})),[Rt]);Object(ee.useEffect)(function(){try{oa(),fa()}catch(Xt){console.log(Xt,"----")}},[]);function sa(Xt,Tt){return ba.apply(this,arguments)}function ba(){return ba=Object(y.a)(J.a.mark(function Xt(Tt,Zt){var nr,Gr,yr,Tn,pn,xa,kn,jn,Hn,Ua,Re,Fe,ze,ke,fe,Ae,ve,Pe;return J.a.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:Gr=Object(M.a)({},Tt),yr=Gr.hack_sets,Tn=Gr.hack,Tn.hide_actual_output=ia,pn=[],xa=[],kn=0,jn=Tn!=null&&Tn.is_file?Dr.map(function(Be,Je){return Object(M.a)(Object(M.a)({},Be),{},{position:Je+1})}):yr.map(function(Be){return Object(M.a)(Object(M.a)({},Be),{},{is_file:!1})}),Hn=Object(w.a)(jn);try{for(Hn.s();!(Ua=Hn.n()).done;)Re=Ua.value,kn+=Re.score,Re.id&&Re.id>=0?pn.push(Re):xa.push(Re)}catch(Be){Hn.e(Be)}finally{Hn.f()}if(jn!=null&&jn.length){We.next=11;break}return x.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),We.abrupt("return");case 11:if(!(kn!==100&&!Tn.test_set_score)){We.next=14;break}return x.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),We.abrupt("return");case 14:if(!(jn!=null&&jn.some(function(Be){return!Be.output}))){We.next=17;break}return x.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),We.abrupt("return");case 17:if(Vr.current?Kt(!0):Xr(!0),ze=rr==null?void 0:rr.map(function(Be){return Object(M.a)(Object(M.a)({},Be),{},{code:ae.Base64.encode(Be==null?void 0:Be.code)})}),!Rt){We.next=25;break}return We.next=22,Ge(Rt,{practice:Tn,practice_codes:ze,practice_sets:xa,update_practice_sets:pn});case 22:Fe=We.sent,We.next=28;break;case 25:return We.next=27,ce({practice:Tn,practice_codes:ze,practice_sets:jn,publish:!Vr.current});case 27:Fe=We.sent;case 28:if(Kt(!1),Xr(!1),!(((nr=Fe)===null||nr===void 0?void 0:nr.status)===0)){We.next=46;break}if(!((ke=Fe)!==null&&ke!==void 0&&(fe=ke.similar_practice)!==null&&fe!==void 0&&fe.length)){We.next=35;break}return St(!0),Rr((Ae=Fe)===null||Ae===void 0?void 0:Ae.similar_practice),We.abrupt("return");case 35:if(!Rt){We.next=44;break}if(x.b.success("\u4FDD\u5B58\u6210\u529F"),Vr.current){We.next=42;break}return We.next=40,Object(he.a)("/api/practices/".concat(Rt,"/start"),{method:"get"});case 40:ve=We.sent,(ve==null?void 0:ve.status)===0&&Mr.push("/problems/".concat(ve==null?void 0:ve.identifier,"/oj/").concat(Rt));case 42:We.next=46;break;case 44:x.b.success("\u65B0\u5EFA\u6210\u529F"),Mr.replace("/problems/".concat((Pe=Fe)===null||Pe===void 0?void 0:Pe.identifier,"/ojedit"));case 46:case"end":return We.stop()}},Xt)})),ba.apply(this,arguments)}function hi(){Mr.replace("/problems")}var Ha=function(Tt){var Zt=Math.floor(100/Tt.length),nr=Zt+100%Tt.length;Tt=Tt.map(function(Gr,yr){return yr===Tt.length-1?Object(M.a)(Object(M.a)({},Gr),{},{score:nr}):Object(M.a)(Object(M.a)({},Gr),{},{score:Zt})}),sr(Tt)};function Ci(Xt){Xt.target.value||Ha(Dr),vn({type:$t.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Jr),{},{hack:Object(M.a)(Object(M.a)({},Jr.hack),{},{test_set_score:Xt.target.value})})}})}function ni(Xt){vn({type:$t.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Jr),{},{hack:Object(M.a)(Object(M.a)({},Jr.hack),{},{is_file:Xt.target.value})})}})}function ai(Xt){Ba(Xt.target.checked)}function pi(Xt){var Tt=Xt.target.value;Tt&&Ha(Dr),vn({type:$t.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Jr),{},{hack:Object(M.a)(Object(M.a)({},Jr.hack),{},{test_set_average:Tt})})}})}function Aa(){var Xt=Sr.getFieldValue("hack_sets"),Tt=Xt.length+1,Zt=Math.floor(100/Tt),nr=100%Tt;Xt.map(function(Gr,yr){return Mn&&(Gr.score=Zt),Gr.position=yr+1,Gr}),Xt.push({input:"",output:"",position:Tt,score:Mn?Zt+nr:0}),Sr.setFieldsValue({hack_sets:Xt}),vn({type:$t.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Jr),{},{hack_sets:Xt})}})}Object(ee.useEffect)(function(){if(Mn){var Xt=sn==null?void 0:sn.length,Tt=Math.floor(100/Xt),Zt=100%Xt;sn==null||sn.map(function(nr,Gr){return nr.score=Tt,nr.position=Gr+1,Gr===Xt-1&&(nr.score=Tt+Zt),nr}),vn({type:$t.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Jr),{},{hack_sets:sn})}}),Sr.setFieldsValue({hack_sets:sn})}},[Mn]);function Ia(Xt){var Tt=Sr.getFieldValue("hack_sets"),Zt=(Tt==null?void 0:Tt.length)-1,nr=Math.ceil(100/Zt),Gr=100%Zt;Tt.splice(Xt,1),Tt==null||Tt.map(function(yr,Tn){return Mn&&(yr.score=nr,Tn===Zt-1&&(yr.score=nr+Gr)),yr.position=Tn+1,yr}),vn({type:$t.SET_INITAL_DATA,payload:{data:Object(M.a)(Object(M.a)({},Jr),{},{hack_sets:Tt})}}),Sr.setFieldsValue({hack_sets:Tt})}function _i(Xt){Va(Xt)}var ii=function(Tt){var Zt,nr=(Zt=Oa.current)===null||Zt===void 0?void 0:Zt.findIndex(function(Gr){return Gr.language===Ln});Oa.current[nr].code=Tt,Cr(Oa.current)},Fr=function(Tt){$r(Object(M.a)({},Sr.getFieldsValue()))},wr=function(){var Xt=Object(y.a)(J.a.mark(function Tt(Zt){var nr;return J.a.wrap(function(yr){for(;;)switch(yr.prev=yr.next){case 0:return yr.next=2,Object(he.a)("/api/practices/".concat(Zt,"/start"),{method:"get"});case 2:nr=yr.sent,(nr==null?void 0:nr.status)===0&&Object(qt.R)("/problems/".concat(nr==null?void 0:nr.identifier,"/oj/").concat(Zt));case 4:case"end":return yr.stop()}},Tt)}));return function(Zt){return Xt.apply(this,arguments)}}(),vr=function(){var Xt=Object(y.a)(J.a.mark(function Tt(){var Zt,nr,Gr,yr,Tn,pn;return J.a.wrap(function(kn){for(;;)switch(kn.prev=kn.next){case 0:return kn.next=2,Ke(Rt);case 2:Zt=kn.sent,nr=Zt.name,Gr=Zt.status,yr=Zt.review_privilege,Tn=Zt.review_description,pn={review_privilege:yr,status:Gr,review_description:Tn,name:nr},fn(pn);case 6:case"end":return kn.stop()}},Tt)}));return function(){return Xt.apply(this,arguments)}}(),Qn=function(){var Tt="";z.a.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:q.a.createElement("div",{className:"mt20"},q.a.createElement(Q.a,{className:pe.a.MdEditor,defaultValue:Tt,onChange:function(nr){Tt=nr}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Zt=Object(y.a)(J.a.mark(function Gr(){var yr;return J.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:if(Tt){pn.next=3;break}return x.b.warn("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),pn.abrupt("return",Promise.reject());case 3:return pn.next=5,Object(he.a)("/api/practices/".concat(Rt,"/review.json"),{method:"post",body:{op:"fail",description:Tt}});case 5:yr=pn.sent,(yr==null?void 0:yr.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),vr());case 7:case"end":return pn.stop()}},Gr)}));function nr(){return Zt.apply(this,arguments)}return nr}()})},Na=function(){var Xt=Object(y.a)(J.a.mark(function Tt(){return J.a.wrap(function(nr){for(;;)switch(nr.prev=nr.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(xr==null?void 0:xr.name,"\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Gr=Object(y.a)(J.a.mark(function Tn(){var pn;return J.a.wrap(function(kn){for(;;)switch(kn.prev=kn.next){case 0:return kn.next=2,Object(he.a)("/api/practices/".concat(Rt,"/review.json"),{method:"post",body:{op:"pass"}});case 2:pn=kn.sent,(pn==null?void 0:pn.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),vr());case 4:case"end":return kn.stop()}},Tn)}));function yr(){return Gr.apply(this,arguments)}return yr}()});case 1:case"end":return nr.stop()}},Tt)}));return function(){return Xt.apply(this,arguments)}}(),ja=function(){var Tt=z.a.confirm({icon:null,width:700,className:"".concat(pe.a.cusModal," custom-modal-divider"),centered:!0,title:q.a.createElement(i.a,null,q.a.createElement(A.a,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),q.a.createElement(A.a,null,q.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return Tt.destroy()}}))),content:q.a.createElement("div",null,q.a.createElement(Jt.a,{className:"mt20",value:(xr==null?void 0:xr.review_description)||""}))})};return q.a.createElement(d.a,{spinning:Ca,size:"large",className:pe.a["oj-custom-large-spin"]},Jr?q.a.createElement(ee.Fragment,null,q.a.createElement("header",{className:pe.a.header},q.a.createElement("div",null,q.a.createElement("img",{src:"".concat(_t.a.IMG_SERVER,"/images/").concat(ta==null?void 0:ta.image_url),alt:"user",width:30}),q.a.createElement("span",null,ta==null?void 0:ta.name)),q.a.createElement("h2",null," ",Jr==null||((Ct=Jr.hack)===null||Ct===void 0)?void 0:Ct.name," "),Rt?q.a.createElement("a",{className:pe.a.btn_back,onClick:hi}," ",q.a.createElement(Y.a,null),"\u9000\u51FA"):null),q.a.createElement(I.a,{form:Sr,initialValues:Jr,layout:"vertical",className:pe.a["oj-form-container"],onValuesChange:Fr,onFinish:sa},q.a.createElement(rt.a,{hideResize:!0,className:pe.a["oj-problems"],leftChild:q.a.createElement(Wn,{formValue:jr,onRemoveTestCase:Ia,onAddTestCase:Aa,hack:Jr.hack,onChangeScore:Ci,onChangehide:ai,onChangeAverage:pi,onChangeFile:ni,uploadData:Dr,setUploadData:sr,handleUploadRatio:Ha,ischecked:ia,pointData:nt,sourceData:dr,getPointData:fa}),rightChild:q.a.createElement(we,{value:rr==null||((dt=rr.find(function(Xt){return Xt.language===Ln}))===null||dt===void 0)?void 0:dt.code,onChange:ii,onLanguage:_i,languageItems:rr,language:Ln})}),q.a.createElement("div",{className:pe.a.footer},!!Rt&&q.a.createElement("div",{className:pe.a.result},q.a.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),xr!=null&&xr.review_privilege?q.a.createElement(q.a.Fragment,null,q.a.createElement("div",{onClick:Na,className:pe.a.pass},"\u901A\u8FC7"),q.a.createElement("div",{onClick:Qn,className:pe.a.noPass},"\u4E0D\u901A\u8FC7")):q.a.createElement(q.a.Fragment,null,(xr==null?void 0:xr.status)===0&&q.a.createElement("div",{className:pe.a.passText},q.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(xr==null?void 0:xr.status)===1&&q.a.createElement("div",{className:pe.a.passText},q.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(xr==null?void 0:xr.status)===2&&q.a.createElement("div",{className:pe.a.passText},q.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(xr==null?void 0:xr.status)===3&&q.a.createElement("div",{className:pe.a.passText},q.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(xr==null?void 0:xr.status)===4&&q.a.createElement("div",{className:pe.a.passText},q.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(xr==null?void 0:xr.status)===5&&q.a.createElement("div",{className:pe.a.noPassText},q.a.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",q.a.createElement("span",{onClick:ja},"\u67E5\u770B\u539F\u56E0")))),q.a.createElement(T.a,{type:"primary",ghost:!0,onClick:hi},"\u9000\u51FA\u7F16\u8F91"),q.a.createElement(T.a,{disabled:Pr,loading:Ft,type:"primary",onClick:function(){Vr.current=!0,Sr.submit()}},"\u4FDD\u5B58 "),Rt?q.a.createElement(T.a,{disabled:Ft,loading:Pr,style:{background:"#2FC25B",border:0},type:"primary",onClick:function(){Vr.current=!1,Sr.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):q.a.createElement(T.a,{disabled:Ft,loading:Pr,type:"primary",onClick:function(){Vr.current=!1,Sr.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,q.a.createElement(z.a,{centered:!0,destroyOnClose:!0,footer:null,visible:Zr,onCancel:function(){return St(!1)},title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},q.a.createElement("div",null,q.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"),q.a.createElement(l.a,{dataSource:lr,bordered:!1,scroll:lr.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:function(Tt,Zt){return q.a.createElement("span",{onClick:function(){return wr(Zt==null?void 0:Zt.identifier)},style:{textDecorationLine:"underline"},className:"current c-light-primary"},Tt)}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:function(Tt){var Zt;return(Zt=Qt()(Tt))===null||Zt===void 0?void 0:Zt.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function Wn(gt){var Ct,dt,or=gt.ischecked,Mr=gt.formValue,jt=gt.hack,Rt=gt.onChangeAverage,Ar=gt.onChangeScore,dn=gt.onChangehide,Sr=gt.onChangeFile,st=gt.onAddTestCase,Ot=gt.onRemoveTestCase,jr=gt.uploadData,$r=gt.setUploadData,ft=gt.handleUploadRatio,gn=gt.pointData,Zr=gt.sourceData,St=gt.getPointData,kr=jt.test_set_average,Ur=jt.test_set_score,Dr=Object(ee.useState)(!1),sr=Object(j.a)(Dr,2),wn=sr[0],Lt=sr[1],nt=Object(ee.useState)(!1),wt=Object(j.a)(nt,2),Mt=wt[0],er=wt[1],dr=function(Ut,rr){var Cr=Object(m.a)(jr);Cr.splice(rr,1),kr?ft(Cr):$r(Cr)},en=function(Ut,rr){console.log(Ut,rr);var Cr=jr.map(function(zr,on){return on===rr?Object(M.a)(Object(M.a)({},zr),{},{score:Ut.target.value?Number(Ut.target.value):0}):zr});$r(Cr)},fr=function(Ut){var rr=jr.concat(Ut);jt.test_set_average?ft(rr):$r(rr)};function tr(zt){zt.stopPropagation()}function lr(){if(Object(mr.v)()){er("practice");return}var zt="";z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:q.a.createElement("div",null,q.a.createElement(W.a,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(rr){zt=rr.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Ut=Object(y.a)(J.a.mark(function Cr(){var zr;return J.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:return Ln.next=2,Object(he.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:zt}});case 2:zr=Ln.sent,(zr==null?void 0:zr.status)===0&&St();case 4:case"end":return Ln.stop()}},Cr)}));function rr(){return Ut.apply(this,arguments)}return rr}()})}function Rr(){if(Object(mr.v)()){er("practice_source");return}var zt="";z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:q.a.createElement("div",null,q.a.createElement(W.a,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(rr){zt=rr.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Ut=Object(y.a)(J.a.mark(function Cr(){var zr;return J.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:return Ln.next=2,Object(he.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:zt}});case 2:zr=Ln.sent,(zr==null?void 0:zr.status)===0&&St();case 4:case"end":return Ln.stop()}},Cr)}));function rr(){return Ut.apply(this,arguments)}return rr}()})}return q.a.createElement("div",{className:pe.a["oj-left-panel"]},q.a.createElement("div",{className:pe.a["oj-form-info"]},q.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:pe.a.inputOne},q.a.createElement(W.a,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:q.a.createElement("span",null,(Mr==null||((Ct=Mr.hack)===null||Ct===void 0||((dt=Ct.name)===null||dt===void 0))?void 0:dt.length)||0,"/",q.a.createElement("span",{className:"c-grey-999"},"60"))})),q.a.createElement(I.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},q.a.createElement(Q.a,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),q.a.createElement("div",{className:pe.a.row},q.a.createElement("div",{className:pe.a.a},q.a.createElement(I.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},q.a.createElement(g.a,null,re(ie.difficulty)))),q.a.createElement("div",{className:pe.a.b},q.a.createElement(I.a.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},q.a.createElement(g.a,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(Ut){return Ut.parentNode}},Zr.map(function(zt){return q.a.createElement(g.a.Option,{key:zt.id,value:zt.id},zt.name)}))),q.a.createElement(T.a,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:function(){return Rr()}},Object(mr.v)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),q.a.createElement("div",{className:pe.a.row},q.a.createElement("div",{className:pe.a.b,style:{width:"100%",marginLeft:0}},q.a.createElement(I.a.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},q.a.createElement(g.a,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(Ut){return Ut.parentNode}},gn.map(function(zt){return q.a.createElement(g.a.Option,{key:zt.id,value:zt.id},zt.name)}))),q.a.createElement(T.a,{type:"primary",ghost:!0,onClick:function(){return lr()}},Object(mr.v)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),q.a.createElement("div",{className:pe.a.field},q.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:pe.a.inputTwo,extra:q.a.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",q.a.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},q.a.createElement(r.a,{style:{width:185},min:3}))),q.a.createElement("div",{className:"tst-case-info"},q.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!jt.is_file&&q.a.createElement(T.a,{style:{height:40},type:"primary",ghost:!0,onClick:st},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),q.a.createElement(I.a.Item,{name:["hack","test_set_score"]},q.a.createElement(a.a.Group,{onChange:Ar},q.a.createElement(a.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",q.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")),q.a.createElement(a.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",q.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")))),q.a.createElement(S.a,{style:{marginBottom:"5px"},checked:or,onChange:dn},"\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"),q.a.createElement(I.a.Item,{className:pe.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},q.a.createElement(a.a.Group,{onChange:Sr},q.a.createElement(h.a,{direction:"horizontal"},q.a.createElement(a.a,{value:!1},"\u6587\u672C"),q.a.createElement(a.a,{value:!0},"\u6587\u4EF6")))),!jt.test_set_score&&q.a.createElement(I.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},q.a.createElement(a.a.Group,{onChange:Rt},q.a.createElement(a.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),q.a.createElement(a.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),jt.is_file&&q.a.createElement("div",{className:pe.a.upBtn},q.a.createElement(T.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return Lt(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),q.a.createElement(At.a,{disabled:jt==null?void 0:jt.test_set_average,inputChange:en,showScore:!jt.test_set_score,data:jr,onRemove:dr})),!jt.is_file&&q.a.createElement(I.a.List,{name:"hack_sets"},function(zt,Ut){return Object(C.a)(Ut),q.a.createElement(K.a,{accordion:!0},zt.map(function(rr,Cr){return q.a.createElement(ir,{key:"".concat(rr.key,"--").concat(Cr),header:q.a.createElement("a",{className:pe.a["test-case-name"]},q.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",Cr+1),Ur?null:q.a.createElement(q.a.Fragment,null,q.a.createElement(I.a.Item,{name:[rr.name,"score"],fieldKey:[rr.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(Cr+1,"\u8BC4\u5206")}]},q.a.createElement(r.a,{onClick:tr,min:0,max:100,disabled:kr})),q.a.createElement("span",null,"%"))),extra:Cr>0?q.a.createElement("div",{onClick:tr},q.a.createElement(u.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(Cr+1),onConfirm:function(){Ot(Cr)}},q.a.createElement(X.a,{className:pe.a["btn-remove-case"]}))):null},q.a.createElement(I.a.Item,{label:"\u8F93\u5165",name:[rr.name,"input"],fieldKey:[rr.fieldKey,"input"]},q.a.createElement(Pt,null)),q.a.createElement(I.a.Item,{label:"\u8F93\u51FA",name:[rr.name,"output"],fieldKey:[rr.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},q.a.createElement(Pt,null)))}))}))),q.a.createElement(At.b,{rootIdentifier:null,visible:wn,onClose:function(){return Lt(!1)},onOK:fr}),q.a.createElement(ct,{visible:Mt,onCancel:function(){er(!1),St()},onOK:function(){er(!1),St()}}))}},rdUC:function(N,$,P){var k=P("MFOe"),u=k.Global;N.exports={name:"localStorage",read:R,write:h,each:s,remove:S,clearAll:f};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 f(){return C().clear()}},sR1s:function(N,$,P){"use strict";P.d($,"b",function(){return R}),P.d($,"a",function(){return h}),P.d($,"c",function(){return s}),P.d($,"d",function(){return S});var k=P("U8pU"),u="RC_TABLE_KEY";function C(f){return f==null?[]:Array.isArray(f)?f:[f]}function R(f,a){if(!a&&typeof a!="number")return f;for(var o=C(a),r=f,E=0;E1)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)})})}}]),d}(s.Component);m.displayName="ResizeObserver",$.a=m},uGsb:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("MlIO"),P("1uat"))})(this,function(k){return function(){var u=k,C=u.x64,R=C.Word,h=C.WordArray,s=u.algo,S=s.SHA512,f=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(f),u.HmacSHA384=S._createHmacHelper(f)}(),k.SHA384})},uGxW:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("OLod"))})(this,function(k){return k.pad.NoPadding={pad:function(){},unpad:function(){}},k.pad.NoPadding})},uQRt:function(N,$,P){N.exports=k;function k(){return P("gaXo"),{}}},ulZh:function(N,$,P){typeof window!="undefined"&&function(u,C){N.exports=C()}(this,function(){return function(k){var u={};function C(R){if(u[R])return u[R].exports;var h=u[R]={i:R,l:!1,exports:{}};return k[R].call(h.exports,h,h.exports,C),h.l=!0,h.exports}return C.m=k,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(f){return R[f]}.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(k,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,E,g){this.fn=r,this.context=E,this.once=g||!1}function f(r,E,g,m,w){if(typeof g!="function")throw new TypeError("The listener must be a function");var p=new S(g,m||r,w),d=h?h+E:E;return r._events[d]?r._events[d].fn?r._events[d]=[r._events[d],p]:r._events[d].push(p):(r._events[d]=p,r._eventsCount++),r}function a(r,E){--r._eventsCount===0?r._events=new s:delete r._events[E]}function o(){this._events=new s,this._eventsCount=0}o.prototype.eventNames=function(){var E=[],g,m;if(this._eventsCount===0)return E;for(m in g=this._events)R.call(g,m)&&E.push(h?m.slice(1):m);return Object.getOwnPropertySymbols?E.concat(Object.getOwnPropertySymbols(g)):E},o.prototype.listeners=function(E){var g=h?h+E:E,m=this._events[g];if(!m)return[];if(m.fn)return[m.fn];for(var w=0,p=m.length,d=new Array(p);w0},!1)}function r(E,g){for(var m={main:[g]},w={main:[]},p={main:{}};o(m);)for(var d=Object.keys(m),n=0;n=2*L/b||M<=K)return;var H=Number.POSITIVE_INFINITY,z;for(z=d.level-1;z>y;z--){var B=x[z].maxBitrate;if(H=L*B/(8*.8*j),H=M)return;var W=this.bwEstimator.getEstimate();o.logger.warn("Fragment "+d.sn+(n?" part "+n.index:"")+" of level "+d.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(),d.loader&&(this.fragCurrent=this.partCurrent=null,d.loader.abort()),l.trigger(s.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:d,part:n,stats:i})},w.onFragLoaded=function(d,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 b={stats:T,frag:l,part:c,id:l.type};this.onFragBuffered(s.Events.FRAG_BUFFERED,b),l.bitrateTest=!1}}},w.onFragBuffered=function(d,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(d,n){switch(n.details){case f.ErrorDetails.FRAG_LOAD_ERROR:case f.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},w.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},w.getNextABRAutoLevel=function(){var d=this.fragCurrent,n=this.partCurrent,l=this.hls,c=l.maxAutoLevel,T=l.config,v=l.minAutoLevel,i=l.media,L=n?n.duration:d?d.duration:0,A=i?i.currentTime:0,b=i&&i.playbackRate!==0?Math.abs(i.playbackRate):1,x=this.bwEstimator?this.bwEstimator.getEstimate():T.abrEwmaDefaultEstimate,y=(S.BufferHelper.bufferInfo(i,A,T.maxBufferHole).end-A)/b,_=this.findBestLevel(x,v,c,y,T.abrBandWidthFactor,T.abrBandWidthUpFactor);if(_>=0)return _;o.logger.trace((y?"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(!y){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(x,v,c,y+I,j,M),Math.max(_,0)},w.findBestLevel=function(d,n,l,c,T,v){for(var i,L=this.fragCurrent,A=this.partCurrent,b=this.lastLoadedFragLevel,x=this.hls.levels,y=x[b],_=!!(y!=null&&(i=y.details)!==null&&i!==void 0&&i.live),I=y==null?void 0:y.codecSet,j=A?A.duration:L?L.duration:0,M=l;M>=n;M--){var G=x[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<=b?z=T*d:z=v*d;var B=x[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&&y===-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=y,this.tick()},b.doTick=function(){switch(this.state){case h.State.IDLE:this.doTickIdle();break;case h.State.WAITING_TRACK:{var y,_=this.levels,I=this.trackId,j=_==null||((y=_[I])===null||y===void 0)?void 0:y.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 J=W.flush(),ee={frag:z,part:B,payload:J,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 q=this.getLoadPosition(),ye=S.BufferHelper.bufferInfo(this.mediaBuffer,q,this.config.maxBufferHole),pe=Object(w.fragmentWithinToleranceTest)(ye.end,this.config.maxFragLookUpTolerance,z);pe<0&&(n.logger.log("Waiting fragment cc ("+z.cc+") @ "+z.start+" cancelled because another fragment at "+ye.end+" is needed"),this.clearWaitingFragment())}}else this.state=h.State.IDLE}}this.onTickEnd()},b.clearWaitingFragment=function(){var y=this.waitingData;y&&(this.fragmentTracker.removeFragment(y.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=h.State.IDLE)},b.onTickEnd=function(){var y=this.media;if(!y||!y.readyState)return;var _=this.mediaBuffer?this.mediaBuffer:y,I=_.buffered;!this.loadedmetadata&&I.length&&(this.loadedmetadata=!0),this.lastCurrentTime=y.currentTime},b.doTickIdle=function(){var y,_,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(),J=this.audioSwitch;if(W>=F&&!J)return;if(!J&&this._streamEnded(B,z)){I.trigger(s.Events.BUFFER_EOS,{type:"audio"}),this.state=h.State.ENDED;return}var ee=z.fragments,q=ee[0].start,ye=B.end;if(J){var pe=this.getLoadPosition();ye=pe,z.PTSKnown&&peq||B.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),M.currentTime=q+.05))}var le=this.getNextFragment(ye,z);if(!le){this.bufferFlushed=!0;return}((y=le.decryptdata)===null||y===void 0?void 0:y.keyFormat)==="identity"&&!((_=le.decryptdata)!==null&&_!==void 0&&_.key)?this.loadKey(le,z):this.loadFragment(le,z,ye)},b.getMaxBufferLength=function(){var y=L.prototype.getMaxBufferLength.call(this),_=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,o.PlaylistLevelType.MAIN);return _===null?y:Math.max(y,_.len)},b.onMediaDetaching=function(){this.videoBuffer=null,L.prototype.onMediaDetaching.call(this)},b.onAudioTracksUpdated=function(y,_){var I=_.audioTracks;this.resetTransmuxer(),this.levels=I.map(function(j){return new a.Level(j)})},b.onAudioTrackSwitching=function(y,_){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()},b.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},b.onLevelLoaded=function(y,_){this.mainDetails=_.details},b.onAudioTrackLoaded=function(y,_){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()},b._handleFragmentLoadProgress=function(y){var _,I=y.frag,j=y.part,M=y.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 J=this.initPTS[I.cc],ee=(_=I.initSegment)===null||_===void 0?void 0:_.data;if(J!==void 0){var q=!1,ye=j?j.index:-1,pe=ye!==-1,le=new m.ChunkMetadata(I.level,I.sn,I.stats.chunkCount,M.byteLength,ye,pe);F.push(M,ee,W,"",I,j,B.totalduration,q,le,J)}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 Oe=this.waitingData=this.waitingData||{frag:I,part:j,cache:new E.default,complete:!1},xe=Oe.cache;xe.push(new Uint8Array(M)),this.waitingVideoCC=this.videoTrackCC,this.state=h.State.WAITING_INIT_PTS}},b._handleFragmentLoadComplete=function(y){if(this.waitingData){this.waitingData.complete=!0;return}L.prototype._handleFragmentLoadComplete.call(this,y)},b.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},b.onBufferCreated=function(y,_){var I=_.tracks.audio;I&&(this.mediaBuffer=I.buffer),_.tracks.video&&(this.videoBuffer=_.tracks.video.buffer)},b.onFragBuffered=function(y,_){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)},b.onError=function(y,_){switch(_.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:case d.ErrorDetails.KEY_LOAD_ERROR:case d.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(o.PlaylistLevelType.AUDIO,_);break;case d.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case d.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 d.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}},b.onBufferFlushed=function(y,_){var I=_.type;I===r.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},b._handleTransmuxComplete=function(y){var _,I="audio",j=this.hls,M=y.remuxResult,G=y.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,J=M.initSegment;if(this.fragContextChanged(H))return;if(this.state=h.State.PARSING,this.audioSwitch&&B&&this.completeAudioSwitch(),J!=null&&J.tracks&&(this._bufferInitSegment(J.tracks,H,G),j.trigger(s.Events.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:I,tracks:J.tracks})),B){var ee=B.startPTS,q=B.endPTS,ye=B.startDTS,pe=B.endDTS;z&&(z.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:ee,endPTS:q,startDTS:ye,endDTS:pe}),H.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,ee,q,ye,pe),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 Oe=l({frag:H,id:I},W);j.trigger(s.Events.FRAG_PARSING_USERDATA,Oe)}},b._bufferInitSegment=function(y,_,I){if(this.state!==h.State.PARSING)return;y.video&&delete y.video;var j=y.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,y);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()},b.loadFragment=function(y,_,I){var j=this.fragmentTracker.getState(y);this.fragCurrent=y,(this.audioSwitch||j===f.FragmentState.NOT_LOADED||j===f.FragmentState.PARTIAL)&&(y.sn==="initSegment"?this._loadInitSegment(y):_.live&&!Object(R.isFiniteNumber)(this.initPTS[y.cc])?(this.log("Waiting for video PTS in continuity counter "+y.cc+" of live stream before loading audio fragment "+y.sn+" of level "+this.trackId),this.state=h.State.WAITING_INIT_PTS):(this.startFragRequested=!0,L.prototype.loadFragment.call(this,y,_,I)))},b.completeAudioSwitch=function(){var y=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,y.trigger(s.Events.AUDIO_TRACK_SWITCHED,{id:I})},A}(h.default);u.default=i},"./src/controller/audio-track-controller.ts":function(k,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 f(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 "+d);var c=n[d],T=c.id,v=c.groupId,i=v===void 0?"":v,L=c.name,A=c.type,b=c.url;if(this.trackId=d,this.trackName=L,this.selectDefaultTrack=!1,this.hls.trigger(R.Events.AUDIO_TRACK_SWITCHING,{id:T,groupId:i,name:L,type:A,url:b}),c.details&&!c.details.live)return;var x=this.switchParams(c.url,l==null?void 0:l.details);this.loadPlaylist(x)},w.selectInitialTrack=function(){var d=this.tracksInGroup;console.assert(d.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(d){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,d=m.details,n=m.stats,l=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(d.advancedDateTime=Date.now()-l,d.live||w!=null&&w.live){if(d.reloaded(w),w&&this.log("live playlist "+g+" "+(d.advanced?"REFRESHED "+d.lastPartSn+"-"+d.lastPartIndex:"MISSED")),w&&d.fragments.length>0&&Object(s.mergeDetails)(w,d),!this.canLoad||!d.live)return;var c,T=void 0,v=void 0;if(d.canBlockReload&&d.endSN&&d.advanced){var i=this.hls.config.lowLatencyMode,L=d.lastPartSn,A=d.endSN,b=d.lastPartIndex,x=b!==-1,y=L===A,_=i?0:b;x?(T=y?A+1:L,v=y?_:b+1):T=A+1;var I=d.age,j=I+d.ageHeader,M=Math.min(j-d.partTarget,d.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: "+d.age),M=0;else{var G=Math.floor(M/d.targetduration);if(T+=G,v!==void 0){var K=Math.round(M%d.targetduration/d.partTarget);v+=K}this.log("CDN Tune-in age: "+d.ageHeader+"s last advanced "+I.toFixed(2)+"s goal: "+M+" skip sn "+G+" to part "+v)}d.tuneInGoal=M}if(c=this.getDeliveryDirectives(d,m.deliveryDirectives,T,v),i||!y){this.loadPlaylist(c);return}}else c=this.getDeliveryDirectives(d,m.deliveryDirectives,T,v);var H=Object(s.computeReloadInterval)(d,n);T!==void 0&&d.canBlockReload&&(H-=d.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 d=Object(h.getSkipValue)(g,w);return m!=null&&m.skip&&g.deltaUpdateFailed&&(w=m.msn,p=m.part,d=h.HlsSkip.No),new h.HlsUrlParameters(w,p,d)},r.retryLoadingOrFail=function(g){var m=this,w=this.hls.config,p=this.retryCount-1&&(d=g.context)!==null&&d!==void 0&&d.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(k,u,C){"use strict";C.r(u),C.d(u,"State",function(){return A}),C.d(u,"default",function(){return b});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"),f=C("./src/utils/logger.ts"),a=C("./src/events.ts"),o=C("./src/errors.ts"),r=C("./src/types/transmuxer.ts"),E=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"),d=C("./src/crypt/decrypter.ts"),n=C("./src/utils/time-ranges.ts"),l=C("./src/types/loader.ts");function c(x,y){for(var _=0;_J;(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 J(ee){var q=M[ee];H.fragmentLoader.loadPart(j,q,K).then(function(ye){W[q.index]=ye;var pe=ye.part;H.hls.trigger(a.Events.FRAG_LOADED,ye);var le=M[ee+1];if(le&&le.fragment===j)J(ee+1);else return z({frag:j,part:pe,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(E.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 J=B.initialLiveManifestSize;if(z-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,J=!!(K.lowLatencyMode&&G.partList&&W);J&&W&&!this.bitrateTest&&(z=z.concat(W),B=W.sn);var ee;if(jM-F?0:F;ee=Object(m.findFragmentByPTS)(H,z,j,q)}else ee=z[z.length-1];if(ee){var ye=ee.sn-G.startSN,pe=H&&ee.level===H.level,le=z[ye+1],Oe=this.fragmentTracker.getState(ee);if(Oe===s.FragmentState.BACKTRACKED){ee=null;for(var xe=ye;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&&!J&&(pe&&(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))}}]),y}(h.default)},"./src/controller/buffer-controller.ts":function(k,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"),f=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"),E=Object(a.getMediaSource)(),g=/([ha]vc.)(?:\.[^.,]+)+/,m=function(){function w(d){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=d,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&&E){var T=this.mediaSource=new E;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,b=L.levelCodec,x=L.container,y=(i.levelCodec||i.codec).replace(g,"$1"),_=(b||A).replace(g,"$1");if(y!==_){var I=x+";codecs="+(b||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,b=l.frag,x=l.part,y=l.chunkMeta,_=y.buffering[A],I=self.performance.now();_.start=I;var j=b.stats.buffering,M=x?x.stats.buffering:null;j.start===0&&(j.start=I),M&&M.start===0&&(M.start=I);var G=i.audio,K=A==="audio"&&y.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=b.start-B.timestampOffset;Math.abs(W)>=.1&&(s.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+b.start+" (delta: "+W+") sn: "+b.sn+")"),B.timestampOffset=b.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 J in W)F[J]=f.BufferHelper.getBuffered(W[J]);c.appendError=0,c.hls.trigger(h.Events.BUFFER_APPENDED,{type:A,frag:b,part:x,chunkMeta:y,parent:b.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:b.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(b){s.logger.warn("[buffer-controller]: Failed to remove from "+L+" SourceBuffer",b)}}};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 x=self.performance.now();T.stats.buffering.end=x,v&&(v.stats.buffering.end=x);var y=v?v.stats:T.stats;c.hls.trigger(h.Events.FRAG_BUFFERED,{frag:T,part:v,stats:y,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,b=Math.max(i,A),x=Math.floor(L/A)*A-b;v.forEach(function(y){var _=T[y];if(_){var I=f.BufferHelper.getBuffered(_);I.length>0&&x>I.start(0)&&(n.trigger(h.Events.BACK_BUFFER_REACHED,{bufferEnd:x}),l.live&&n.trigger(h.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:x}),n.trigger(h.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:x,type:y}))}})},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 b=l[v]=c.addSourceBuffer(A),x=v;this.addBufferListener(x,"updatestart",this._onSBUpdateStart),this.addBufferListener(x,"updateend",this._onSBUpdateEnd),this.addBufferListener(x,"error",this._onSBUpdateError),this.tracks[v]={buffer:b,codec:L,container:i.container,levelCodec:i.levelCodec,id:i.id},T++}catch(y){s.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+y.message),this.hls.trigger(h.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:y,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 b=Object(R.isFiniteNumber)(T.duration)?T.duration:Infinity,x=Object(R.isFiniteNumber)(v.duration)?v.duration:Infinity,y=Math.max(0,l),_=Math.min(c,b,x);_>y?(s.logger.log("[buffer-controller]: Removing ["+y+","+_+"] from the "+n+" SourceBuffer"),console.assert(!A.updating,n+" sourceBuffer must not be updating"),A.remove(y,_)):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(k,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(f){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=f}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}),E={execute:o,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(E,a),r},S.executeNext=function(a){var o=this.buffers,r=this.queues,E=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),(!E||!E.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(k,u,C){"use strict";C.r(u);var R=C("./src/events.ts");function h(f,a){for(var o=0;o0&&this.mediaWidth>0){var r=this.hls.levels;if(r.length){var E=this.hls;E.autoLevelCapping=this.getMaxLevel(r.length-1),E.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=E.autoLevelCapping}}},a.getMaxLevel=function(r){var E=this,g=this.hls.levels;if(!g.length)return-1;var m=g.filter(function(w,p){return f.isLevelAllowed(p,E.restrictedLevels)&&p<=r});return this.clientRect=null,f.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,E={width:0,height:0};if(r){var g=r.getBoundingClientRect();E.width=g.width,E.height=g.height,!E.width&&!E.height&&(E.width=g.right-g.left||r.width||0,E.height=g.bottom-g.top||r.height||0)}return this.clientRect=E,E},f.isLevelAllowed=function(r,E){return E===void 0&&(E=[]),E.indexOf(r)===-1},f.getMaxLevelByMediaSize=function(r,E,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=E||d.height>=g)&&m(d,r[p+1])){w=p;break}}return w},s(f,[{key:"mediaWidth",get:function(){return this.getDimensions().width*f.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*f.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var r=1;try{r=self.devicePixelRatio}catch(E){}return r}}]),f}();u.default=S},"./src/controller/cmcd-controller.ts":function(k,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 f(w,p){for(var d=0;d=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 E(w,p);var d=Object.prototype.toString.call(w).slice(8,-1);if(d==="Object"&&w.constructor&&(d=w.constructor.name),d==="Map"||d==="Set")return Array.from(w);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return E(w,p)}function E(w,p){(p==null||p>w.length)&&(p=w.length);for(var d=0,n=new Array(p);dl&&(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,b){l(L),this.loader.load(L,A,b)},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,b){l(L),this.loader.load(L,A,b)},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(),b=o(A),x;!(x=b()).done;){var y=x.value,_=n[y];if(!c(_))continue;if(y==="v"&&_===1)continue;if(y=="pr"&&_===1)continue;var I=L[y];I&&(_=I(_));var j=typeof _,M=void 0;y==="ot"||y==="sf"||y==="st"?M=y+"="+_:j==="boolean"?M=y:j==="number"?M=y+"="+_:M=y+"="+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(d,n){switch(d.mediaKeySystemDomain){case S.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+d.mediaKeySystemDomain)},w._requestLicense=function(d,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,d,n);s.logger.log("Sending license request to URL: "+c);var v=this._generateLicenseRequestChallenge(l,d);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(d,n){if(!this._emeEnabled)return;var l=n.media;this._media=l,l.addEventListener("encrypted",this._onMediaEncrypted)},w.onMediaDetached=function(){var d=this._media,n=this._mediaKeysList;if(!d)return;d.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 d.setMediaKeys(null)}).catch(function(){})},w.onManifestParsed=function(d,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(k,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 f=S.prototype;return f.setStreamController=function(o){this.streamController=o},f.registerListeners=function(){this.hls.on(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},f.unregisterListeners=function(){this.hls.off(R.Events.MEDIA_ATTACHING,this.onMediaAttaching)},f.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},f.onMediaAttaching=function(o,r){var E=this.hls.config;if(E.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),E.fpsDroppedMonitoringPeriod)}},f.checkFPS=function(o,r,E){var g=performance.now();if(r){if(this.lastTime){var m=g-this.lastTime,w=E-this.lastDroppedFrames,p=r-this.lastDecodedFrames,d=1e3*w/m,n=this.hls;if(n.trigger(R.Events.FPS_DROP,{currentDropped:w,currentDecoded:p,totalDroppedFrames:E}),d>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=E,this.lastDecodedFrames=r}},f.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(k,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 f}),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,E,g){if(E===null||!Array.isArray(r)||!r.length||!Object(R.isFiniteNumber)(E))return null;var m=r[0].programDateTime;if(E<(m||0))return null;var w=r[r.length-1].endProgramDateTime;if(E>=(w||0))return null;g=g||0;for(var p=0;pr&&g.start?-1:0}function a(r,E,g){var m=Math.min(E,g.duration+(g.deltaPTS?g.deltaPTS:0))*1e3,w=g.endProgramDateTime||0;return w-m>r}function o(r,E){return h.default.search(r,function(g){return g.ccE?-1:0})}},"./src/controller/fragment-tracker.ts":function(k,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(E){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=E,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 d=p.length;d--;){var n=p[d],l=n?n.end:w.appendedPTS;if(n.start<=g&&l!==void 0&&g<=l)return d>9&&(this.activeParts=p.slice(d-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),d=p.length;d--;){var n=w[p[d]];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(d){var n=p.fragments[d];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,d=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=d!==null||T.partial===!0;l.range[c]=m.getBufferedTimes(p,d,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 d={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){d.time.push({startPTS:Math.max(n,p.start(v)),endPTS:Math.min(l,p.end(v))});break}else if(ni)d.partial=!0,d.time.push({startPTS:Math.max(n,p.start(v)),endPTS:Math.min(l,p.end(v))});else if(l<=i)break}return d},r.getPartialFragment=function(g){var m=null,w,p,d,n=0,l=this.bufferPadding,c=this.fragments;return Object.keys(c).forEach(function(T){var v=c[T];if(!v)return;f(v)&&(p=v.body.start-l,d=v.body.end+l,g>=p&&g<=d&&(w=Math.min(g-p,d-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?f(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 d=p.backtrack=m||p.loaded;return p.loaded=null,d},r.getBacktrackData=function(g){var m=a(g),w=this.fragments[m];if(w){var p,d=w.backtrack;if(d!=null&&(p=d.payload)!==null&&p!==void 0&&p.byteLength)return d;this.removeFragment(g)}return null},r.isTimeBuffered=function(g,m,w){for(var p,d,n=0;n=p&&m<=d)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 d=a(w);this.fragments[d]={body:w,loaded:m,backtrack:null,buffered:!1,range:Object.create(null)}},r.onBufferAppended=function(g,m){var w=this,p=m.frag,d=m.part,n=m.timeRanges;if(p.type===h.PlaylistLevelType.MAIN)if(this.activeFragment=p,d){var l=this.activeParts;l||(this.activeParts=l=[]),l.push(d)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(c){var T=n[c];if(w.detectEvictedFragments(c,T),!d)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 f(o){var r,E;return o.buffered&&(((r=o.range.video)===null||r===void 0?void 0:r.partial)||((E=o.range.audio)===null||E===void 0?void 0:E.partial))}function a(o){return o.type+"_"+o.level+"_"+o.urlId+"_"+o.sn}},"./src/controller/gap-controller.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"STALL_MINIMUM_DURATION_MS",function(){return f}),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 E});var R=C("./src/utils/buffer-helper.ts"),h=C("./src/errors.ts"),s=C("./src/events.ts"),S=C("./src/utils/logger.ts"),f=250,a=2,o=.1,r=.05,E=function(){function g(w,p,d,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=d,this.hls=n}var m=g.prototype;return m.destroy=function(){this.hls=this.fragmentTracker=this.media=null},m.poll=function(p){var d=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),b=A.len>0,x=A.nextStart||0;if(!b&&!x)return;if(T){var y=A.len>a,_=!x||x-c>a&&!this.fragmentTracker.getPartialFragment(c);if(y||_)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var I,j=Math.max(x,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>=f&&this._reportStall(A.len);var B=R.BufferHelper.bufferInfo(n,c,d.maxBufferHole);this._tryFixBufferStall(B,z)},m._tryFixBufferStall=function(p,d){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&&d>n.highBufferWatchdogPeriod*1e3&&(S.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},m._reportStall=function(p){var d=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+")"),d.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 d=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},f(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,d=this.config,n=d.liveSyncDuration,l=d.liveSyncDurationCount,c=d.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,d=g-m-this.edgeStalled,n=p-w.totalduration,l=p-(this.config.lowLatencyMode&&w.partTarget||w.targetduration);return Math.min(Math.max(n,d),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(k,u,C){"use strict";C.r(u),C.d(u,"default",function(){return d});var R=C("./src/types/level.ts"),h=C("./src/events.ts"),s=C("./src/errors.ts"),S=C("./src/utils/codecs.ts"),f=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){x=L[0].bitrate,L.sort(function(z,B){return z.bitrate-B.bitrate}),this._levels=L;for(var G=0;Gthis.hls.config.fragLoadingMaxRetry&&(y=i.frag.level)):y=i.frag.level}break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:L&&(L.deliveryDirectives&&(x=!1),y=L.level),b=!0;break;case s.ErrorDetails.REMUX_ALLOC_ERROR:y=i.level,b=!0;break}y!==void 0&&this.recoverLevel(i,y,b,x)},c.recoverLevel=function(v,i,L,A){var b=v.details,x=this._levels[i];if(x.loadError++,L){var y=this.retryLoadingOrFail(v);if(y)v.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(A){var _=x.url.length;if(_>1&&x.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(b+": 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(b){b.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,b=i.details,x=this._levels[A];if(!x){var y;this.warn("Invalid level index "+A),(y=i.deliveryDirectives)!==null&&y!==void 0&&y.skip&&(b.deltaUpdateFailed=!0);return}A===this.currentLevelIndex?(x.fragmentError===0&&(x.loadError=0,this.retryCount=0),this.playlistLoaded(A,i,x.details)):(L=i.deliveryDirectives)!==null&&L!==void 0&&L.skip&&(b.deltaUpdateFailed=!0)},c.onAudioTrackSwitched=function(v,i){var L=this.hls.levels[this.currentLevelIndex];if(!L)return;if(L.audioGroupIds){for(var A=-1,b=this.hls.audioTracks[i.id].groupId,x=0;x0){var A=L.urlId,b=L.url[A];if(v)try{b=v.addDirectives(b)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Attempt loading level index "+i+(v?" at sn "+v.msn+" part "+v.part:"")+" with URL-id "+A+" "+b),this.clearTimer(),this.hls.trigger(h.Events.LEVEL_LOADING,{url:b,level:i,id:A,deliveryDirectives:v||null})}},c.removeLevel=function(v,i){var L=function(x,y){return y!==i},A=this._levels.filter(function(b,x){return x!==v?!0:b.url.length>1&&i!==void 0?(b.url=b.url.filter(L),b.audioGroupIds&&(b.audioGroupIds=b.audioGroupIds.filter(L)),b.textGroupIds&&(b.textGroupIds=b.textGroupIds.filter(L)),b.urlId=0,!0):!1}).map(function(b,x){var y=b.details;return y!=null&&y.fragments&&y.fragments.forEach(function(_){_.level=x}),b});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 b=this.currentLevelIndex,x=L[b],y=L[v];this.log("switching to level "+v+" from "+b),this.currentLevelIndex=v;var _=r({},y,{level:v,maxBitrate:y.maxBitrate,uri:y.uri,urlId:y.urlId});delete _._urlId,this.hls.trigger(h.Events.LEVEL_SWITCHING,_);var I=y.details;if(!I||I.live){var j=this.switchParams(y.uri,x==null?void 0:x.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(k,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 f}),C.d(u,"updateFragPTSDTS",function(){return o}),C.d(u,"mergeDetails",function(){return r}),C.d(u,"mapPartIntersection",function(){return E}),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 d}),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 f(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 b=T,x=v,y=c.startPTS,_=c.endPTS;if(Object(R.isFiniteNumber)(y)){var I=Math.abs(y-T);Object(R.isFiniteNumber)(c.deltaPTS)?c.deltaPTS=Math.max(I,c.deltaPTS):c.deltaPTS=I,b=Math.max(T,y),T=Math.min(T,y),i=Math.min(i,c.startDTS),x=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=b,c.startDTS=i,c.endPTS=v,c.minEndPTS=x,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,b;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&&(b=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 x=c.fragmentHint?c.fragments.concat(c.fragmentHint):c.fragments;x.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 y=c.skippedSegments;y--;)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),E(l.partList,c.partList,function(G,K){K.elementaryStreams=G.elementaryStreams,K.stats=G.stats}),b?o(c,b,b.startPTS,b.endPTS,b.startDTS,b.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 E(l,c,T){if(l&&c)for(var v=0,i=0,L=l.length;i<=L;i++){var A=l[i],b=c[i+v];A&&b&&A.index===b.index&&A.fragment.sn===b.fragment.sn?T(A,b):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,b=c.fragmentHint?c.fragments.concat(c.fragmentHint):c.fragments,x=l.fragmentHint?l.fragments.concat(l.fragmentHint):l.fragments,y=i;y<=L;y++){var _=x[A+y],I=b[y];v&&!I&&y=v.length)return;w(c,v[T].start)}function w(l,c){if(c){for(var T=l.fragments,v=l.skippedSegments;v0&&i0&&x===-1&&(this.log("Override startPosition with lastCurrentTime @"+y.toFixed(3)),x=y),this.state=h.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,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 x,y=this.levels,_=this.level,I=y==null||((x=y[_])===null||x===void 0)?void 0:x.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 x,y,_=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 J={};this.altAudio&&(J.type="video"),this.hls.trigger(S.Events.BUFFER_EOS,J),this.state=h.State.ENDED;return}var ee=B.end,q=this.getNextFragment(ee,z);if(this.couldBacktrack&&!this.fragPrevious&&q&&q.sn!=="initSegment"){var ye=q.sn-z.startSN;ye>1&&(q=z.fragments[ye-1],this.fragmentTracker.removeFragment(q))}if(q&&this.fragmentTracker.getState(q)===a.FragmentState.OK&&this.nextLoadPosition>ee){var pe=this.audioOnly&&!this.altAudio?r.ElementaryStreamTypes.AUDIO:r.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(M,pe,o.PlaylistLevelType.MAIN),q=this.getNextFragment(this.nextLoadPosition,z)}if(!q)return;q.initSegment&&!q.initSegment.data&&!this.bitrateTest&&(q=q.initSegment),((x=q.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((y=q.decryptdata)!==null&&y!==void 0&&y.key)?this.loadKey(q,z):this.loadFragment(q,z,ee)},A.loadFragment=function(x,y,_){var I,j=this.fragmentTracker.getState(x);if(this.fragCurrent=x,j===a.FragmentState.BACKTRACKED){var M=this.fragmentTracker.getBacktrackData(x);if(M){this._handleFragmentLoadProgress(M),this._handleFragmentLoadComplete(M);return}else j=a.FragmentState.NOT_LOADED}j===a.FragmentState.NOT_LOADED||j===a.FragmentState.PARTIAL?x.sn==="initSegment"?this._loadInitSegment(x):this.bitrateTest?(x.bitrateTest=!0,this.log("Fragment "+x.sn+" of level "+x.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(x)):(this.startFragRequested=!0,i.prototype.loadFragment.call(this,x,y,_)):j===a.FragmentState.APPENDING?this.reduceMaxBufferLength(x.duration)&&this.fragmentTracker.removeFragment(x):((I=this.media)===null||I===void 0?void 0:I.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},A.getAppendedFrag=function(x){var y=this.fragmentTracker.getAppendedFrag(x,o.PlaylistLevelType.MAIN);return y&&"fragment"in y?y.fragment:y},A.getBufferedFrag=function(x){return this.fragmentTracker.getBufferedFrag(x,o.PlaylistLevelType.MAIN)},A.followingBufferedFrag=function(x){return x?this.getBufferedFrag(x.end+.5):null},A.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},A.nextLevelSwitch=function(){var x=this.levels,y=this.media;if(y!=null&&y.readyState){var _,I=this.getAppendedFrag(y.currentTime);if(I&&I.start>1&&this.flushMainBuffer(0,I.start-1),!y.paused&&x){var j=this.hls.nextLoadLevel,M=x[j],G=this.fragLastKbps;G&&this.fragCurrent?_=this.fragCurrent.duration*M.maxBitrate/(1e3*G)+1:_=0}else _=0;var K=this.getBufferedFrag(y.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 x=this.fragCurrent;this.fragCurrent=null,x!=null&&x.loader&&x.loader.abort(),this.state===h.State.KEY_LOADING&&(this.state=h.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},A.flushMainBuffer=function(x,y){i.prototype.flushMainBuffer.call(this,x,y,this.altAudio?"video":null)},A.onMediaAttached=function(x,y){i.prototype.onMediaAttached.call(this,x,y);var _=y.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 x=this.media;x&&(x.removeEventListener("playing",this.onvplaying),x.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 x=this.media,y=x?x.currentTime:null;Object(R.isFiniteNumber)(y)&&this.log("Media seeked to "+y.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(x,y){var _=!1,I=!1,j;y.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=y.levels,this.startFragRequested=!1},A.onLevelLoading=function(x,y){var _=this.levels;if(!_||this.state!==h.State.IDLE)return;var I=_[y.level];(!I.details||I.details.live&&this.levelLastLoaded!==y.level||this.waitForCdnTuneIn(I.details))&&(this.state=h.State.WAITING_LEVEL)},A.onLevelLoaded=function(x,y){var _,I=this.levels,j=y.level,M=y.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!==y.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(x){var y,_=x.frag,I=x.part,j=x.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=(y=_.initSegment)===null||y===void 0?void 0:y.data,W=this._getAudioCodec(G),F=this.transmuxer=this.transmuxer||new E.default(this.hls,o.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),J=I?I.index:-1,ee=J!==-1,q=new g.ChunkMetadata(_.level,_.sn,_.stats.chunkCount,j.byteLength,J,ee),ye=this.initPTS[_.cc];F.push(j,B,W,H,_,I,K.totalduration,z,q,ye)},A.onAudioTrackSwitching=function(x,y){var _=this.altAudio,I=!!y.url,j=y.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(x,y){var _=y.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(x,y){var _=y.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(x,y){var _=y.frag,I=y.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(x,y){switch(y.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,y);break;case w.ErrorDetails.LEVEL_LOAD_ERROR:case w.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==h.State.ERROR&&(y.fatal?(this.warn(""+y.details),this.state=h.State.ERROR):!y.levelRetry&&this.state===h.State.WAITING_LEVEL&&(this.state=h.State.IDLE));break;case w.ErrorDetails.BUFFER_FULL_ERROR:if(y.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 x=this.media,y=this.gapController;if(!x||!y||!x.readyState)return;var _=f.BufferHelper.getBuffered(x);!this.loadedmetadata&&_.length?(this.loadedmetadata=!0,this.seekToStartPos()):y.poll(this.lastCurrentTime),this.lastCurrentTime=x.currentTime},A.onFragLoadEmergencyAborted=function(){this.state=h.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},A.onBufferFlushed=function(x,y){var _=y.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(x,y){this.levels=y.levels},A.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},A.seekToStartPos=function(){var x=this.media,y=x.currentTime,_=this.startPosition;if(_>=0&&y<_){if(x.seeking){p.logger.log("could not seek to "+_+", already seeking at "+y);return}var I=f.BufferHelper.getBuffered(x),j=I.length?I.start(0):0,M=j-_;M>0&&(M1&&x.seeking===!1){var _=x.currentTime;if(f.BufferHelper.isBuffered(x,_)?y=this.getAppendedFrag(_):f.BufferHelper.isBuffered(x,_+.1)&&(y=this.getAppendedFrag(_+.1)),y){var I=this.fragPlaying,j=y.level;(!I||y.sn!==I.sn||I.level!==j||y.urlId!==I.urlId)&&(this.hls.trigger(S.Events.FRAG_CHANGED,{frag:y}),(!I||I.level!==j)&&this.hls.trigger(S.Events.LEVEL_SWITCHED,{level:j}),this.fragPlaying=y)}}},n(L,[{key:"nextLevel",get:function(){var x=this.nextBufferedFrag;return x?x.level:-1}},{key:"currentLevel",get:function(){var x=this.media;if(x){var y=this.getAppendedFrag(x.currentTime);if(y)return y.level}return-1}},{key:"nextBufferedFrag",get:function(){var x=this.media;if(x){var y=this.getAppendedFrag(x.currentTime);return this.followingBufferedFrag(y)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),L}(h.default)},"./src/controller/subtitle-stream-controller.ts":function(k,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"),f=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"),E=C("./src/types/loader.ts"),g=C("./src/types/level.ts");function m(c,T){for(var v=0;v=y[j].start&&I<=y[j].end){_=y[j];break}var M=b.start+b.duration;_?_.end=M:(_={start:I,end:M},y.push(_)),this.fragmentTracker.fragBuffered(b)},v.onBufferFlushing=function(L,A){var b=A.startOffset,x=A.endOffset;if(b===0&&x!==Number.POSITIVE_INFINITY){var y=this.currentTrackId,_=this.levels;if(!_.length||!_[y]||!_[y].details)return;var I=_[y].details,j=I.targetduration,M=x-j;if(M<=0)return;A.endOffsetSubtitles=Math.max(0,M),this.tracksBuffered.forEach(function(G){for(var K=0;K=I.length||y!==_||!j)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,x.live||(b=j.details)!==null&&b!==void 0&&b.live){var M=this.mainDetails;if(x.deltaUpdateFailed||!M)return;var G=M.fragments[0];if(!j.details)x.hasProgramDateTime&&M.hasProgramDateTime?Object(f.alignMediaPlaylistByPDT)(x,M):G&&Object(a.addSliding)(x,G.start);else{var K=this.alignPlaylists(x,j.details);K===0&&G&&Object(a.addSliding)(x,G.start)}}if(j.details=x,this.levelLastLoaded=y,this.tick(),x.live&&!this.fragCurrent&&this.media&&this.state===r.State.IDLE){var H=Object(S.findFragmentByPTS)(null,x.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,b=L.payload,x=A.decryptdata,y=this.hls;if(this.fragContextChanged(A))return;if(b&&b.byteLength>0&&x&&x.key&&x.iv&&x.method==="AES-128"){var _=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(b),x.key.buffer,x.iv.buffer).then(function(I){var j=performance.now();y.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,b=this.levels;if(!b.length||!b[A]||!b[A].details)return;var x=b[A].details,y=x.targetduration,_=this.config,I=this.media,j=s.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,I.currentTime-y,_.maxBufferHole),M=j.end,G=j.len,K=this.getMaxBufferLength()+y;if(G>K)return;console.assert(x,"Subtitle track details are defined on idle subtitle stream controller tick");var H=x.fragments,z=H.length,B=x.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,b=v.name,x=v.type,y=v.url;this.hls.trigger(R.Events.SUBTITLE_TRACK_SWITCH,{id:i,groupId:A,name:b,type:x,url:y});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&&(x[0]=Math.min(x[0],T),x[1]=Math.max(x[1],v),A=!0,y/(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,b=T.timescale,x=this.unparsedVttFrags;L==="main"&&(this.initPTS[i.cc]=A,this.timescale[i.cc]=b),x.length&&(this.unparsedVttFrags=[],x.forEach(function(y){v.onFragLoaded(h.Events.FRAG_LOADED,y)}))},n.getExistingTrack=function(c){var T=this.media;if(T)for(var v=0;v>>8^b&255^99,o[i]=b,r[b]=i;var x=v[i],y=v[x],_=v[y],I=v[b]*257^b*16843008;g[i]=I<<24|I>>>8,m[i]=I<<16|I>>>16,w[i]=I<<8|I>>>24,p[i]=I,I=_*16843009^y*65537^x*257^i*16843008,n[b]=I<<24|I>>>8,l[b]=I<<16|I>>>16,c[b]=I<<8|I>>>24,T[b]=I,i?(i=x^v[v[v[_^x]]],L^=v[v[L]]):i=L=1}},f.expandKey=function(o){for(var r=this.uint8ArrayToUint32Array_(o),E=!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(x)?I>=6?(i=5,b=new Array(4),L=I-3):(i=2,b=new Array(2),L=I):x.indexOf("android")!==-1?(i=2,b=new Array(2),L=I):(i=5,b=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(x))||!v&&A===1)&&(i=2,b=new Array(2)),L=I)),b[0]=i<<3,b[0]|=(I&14)>>1,b[1]|=(I&1)<<7,b[1]|=A<<3,i===5&&(b[1]|=(L&14)>>1,b[2]=(L&1)<<7,b[2]|=2<<2,b[3]=0),{config:b,samplerate:_[I],channelCount:A,codec:"mp4a.40."+i,manifestCodec:y}}function f(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||E(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 d(l,c,T,v,i){var L=a(l,c),A=o(l,c);if(A-=L,A>0){var b=T+v*i;return{headerLength:L,frameLength:A,stamp:b}}}function n(l,c,T,v,i){var L=p(l.samplerate),A=d(c,T,v,i,L);if(A){var b=A.frameLength,x=A.headerLength,y=A.stamp,_=x+b,I=Math.max(0,T+_-c.length),j;I?(j=new Uint8Array(_-x),j.set(c.subarray(T+x,c.length),0)):j=c.subarray(T+x,T+_);var M={unit:j,pts:y};return I||l.samples.push(M),{sample:M,length:_,missing:I}}}},"./src/demux/base-audio-demuxer.ts":function(k,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"),f=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 E=r.prototype;return E.resetInitSegment=function(m,w,p){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},E.resetTimeStamp=function(){},E.resetContiguity=function(){},E.canParse=function(m,w){return!1},E.appendFrame=function(m,w,p){},E.demux=function(m,w){this.cachedData&&(m=Object(S.appendUint8Array)(this.cachedData,m),this.cachedData=null);var p=h.getID3Data(m,0),d=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;da?(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,E,g=0;g0?i.subarray(A,A+b):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},f=function(i,L){return R(i,L)&&S(i,L+6)+10<=i.length-L},a=function(i){for(var L=E(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(k,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 f(r,E){r.prototype=Object.create(E.prototype),r.prototype.constructor=r,a(r,E)}function a(r,E){return a=Object.setPrototypeOf||function(m,w){return m.__proto__=w,m},a(r,E)}var o=function(r){f(E,r);function E(){return r.apply(this,arguments)||this}var g=E.prototype;return g.resetInitSegment=function(w,p,d){r.prototype.resetInitSegment.call(this,w,p,d),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:w,duration:d,inputTimeScale:9e4,dropped:0}},E.probe=function(w){if(!w)return!1;for(var p=h.getID3Data(w,0)||[],d=p.length,n=w.length;d0},f.demux=function(o){var r=o,E=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,E.samples=g.valid||new Uint8Array}else E.samples=r;return{audioTrack:Object(h.dummyTrack)(),avcTrack:E,id3Track:Object(h.dummyTrack)(),textTrack:Object(h.dummyTrack)()}},f.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)()}},f.demuxSampleAes=function(o,r,E){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},f.destroy=function(){},S}();s.minProbeByteLength=1024,u.default=s},"./src/demux/mpegaudio.ts":function(k,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 E}),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]],f=[0,1,1,4];function a(w,p,d,n,l){if(d+24>p.length)return;var c=o(p,d);if(c&&d+c.frameLength<=p.length){var T=c.samplesPerFrame*9e4/c.sampleRate,v=n+l*T,i={unit:p.subarray(d,d+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 d=w[p+1]>>3&3,n=w[p+1]>>1&3,l=w[p+2]>>4&15,c=w[p+2]>>2&3;if(d!==1&&l!==0&&l!==15&&c!==3){var T=w[p+2]>>1&1,v=w[p+3]>>6,i=d===3?3-n:n===3?3:4,L=h[i*14+l-1]*1e3,A=d===3?0:d===2?1:2,b=s[A*3+c],x=v===3?1:2,y=S[d][n],_=f[n],I=y*8*_,j=Math.floor(y*L/b+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:b,channelCount:x,frameLength:j,samplesPerFrame:I}}}function r(w,p){return w[p]===255&&(w[p+1]&224)===224&&(w[p+1]&6)!==0}function E(w,p){return p+1=o.length){E();return}if(o[r].unit.length<32)continue;var g=this.decrypter.isSync();if(this.decryptAacSample(o,r,E,g),!g)return}},f.getAvcEncryptedData=function(o){for(var r=Math.floor((o.length-48)/160)*16+16,E=new Int8Array(r),g=0,m=32;m<=o.length-16;m+=160,g+=16)E.set(o.subarray(m,m+16),g);return E},f.getAvcDecryptedUnit=function(o,r){for(var E=new Uint8Array(r),g=0,m=32;m<=o.length-16;m+=160,g+=16)o.set(E.subarray(g,g+16),m);return o},f.decryptAvcSample=function(o,r,E,g,m,w){var p=Object(h.discardEPB)(m.data),d=this.getAvcEncryptedData(p),n=this;this.decryptBuffer(d.buffer,function(l){m.data=n.getAvcDecryptedUnit(p,l),w||n.decryptAvcSamples(o,r,E+1,g)})},f.decryptAvcSamples=function(o,r,E,g){if(o instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;r++,E=0){if(r>=o.length){g();return}for(var m=o[r].units;!(E>=m.length);E++){var w=m[E];if(w.data.length<=48||w.type!==1&&w.type!==5)continue;var p=this.decrypter.isSync();if(this.decryptAvcSample(o,r,E,g,w,p),!p)return}}},S}();u.default=s},"./src/demux/transmuxer-interface.ts":function(k,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"),f=C("./src/utils/logger.ts"),a=C("./src/errors.ts"),o=C("./src/utils/mediasource-helper.ts"),r=C("./node_modules/eventemitter3/index.js"),E=C.n(r),g=Object(o.getMediaSource)()||{isTypeSupported:function(){return!1}},m=function(){function w(d,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=d,this.id=n,this.onTransmuxComplete=l,this.onFlush=c;var v=d.config,i=function(y,_){_=_||{},_.frag=T.frag,_.id=T.id,d.trigger(y,_)};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"){f.logger.log("demuxing in webworker");var b;try{b=this.worker=R("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),b.addEventListener("message",this.onwmsg),b.onerror=function(x){d.trigger(s.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(x.message+" ("+x.filename+":"+x.lineno+")")})},b.postMessage({cmd:"init",typeSupported:L,vendor:A,id:n,config:JSON.stringify(v)})}catch(x){f.logger.warn("Error in worker:",x),f.logger.error("Error while initializing DemuxerWorker, fallback to inline"),b&&self.URL.revokeObjectURL(b.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,b,x){var y=this;b.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&&b.level===G.level),z=G?b.sn-G.sn:-1,B=this.part?b.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 J=new S.TransmuxState(K,W,A,H,j);if(!W||K){f.logger.log("[transmuxer-interface, "+v.type+"]: Starting new transmux session for sn: "+b.sn+" p: "+b.part+" level: "+b.level+" id: "+b.id+` discontinuity: `+K+` trackSwitch: `+H+` contiguous: `+W+` accurateTimeOffset: `+A+` timeOffset: `+j);var ee=new S.TransmuxConfig(c,T,l,L,x);this.configureTransmuxer(ee)}if(this.frag=v,this.part=i,I)I.postMessage({cmd:"demux",data:n,decryptdata:M,chunkMeta:b,state:J},n instanceof ArrayBuffer?[n]:[]);else if(_){var q=_.push(n,M,b,J);Object(S.isPromise)(q)?q.then(function(ye){y.handleTransmuxComplete(ye)}):this.handleTransmuxComplete(q)}},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(k,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"),f=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(d){var n=d.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){E(m,i,T)}):E(m,v,T);break}default:break}})}function o(m,w){if(g(w.remuxResult))return;var p=[],d=w.remuxResult,n=d.audio,l=d.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 E(m,w,p){w.forEach(function(d){o(m,d)}),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(k,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"),f=C("./src/demux/mp4demuxer.ts"),a=C("./src/demux/tsdemuxer.ts"),o=C("./src/demux/mp3demuxer.ts"),r=C("./src/remux/mp4-remuxer.ts"),E=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 d=[{demux:a.default,remux:r.default},{demux:f.default,remux:E.default},{demux:S.default,remux:r.default},{demux:o.default,remux:r.default}],n=1024;d.forEach(function(A){var b=A.demux;n=Math.max(n,b.minProbeByteLength)});var l=function(){function A(x,y,_,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=x,this.typeSupported=y,this.config=_,this.vendor=I,this.id=j}var b=A.prototype;return b.configure=function(y){this.transmuxConfig=y,this.decrypter&&this.decrypter.reset()},b.push=function(y,_,I,j){var M=this,G=I.transmuxing;G.executeStart=p();var K=new Uint8Array(y),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 J=this.getDecrypter();if(z.enableSoftwareAES){var ee=J.softwareDecrypt(K,F.key.buffer,F.iv.buffer);if(!ee)return G.executeEnd=p(),T(I);K=new Uint8Array(ee)}else return this.decryptionPromise=J.webCryptoDecrypt(K,F.key.buffer,F.iv.buffer).then(function(Y){var X=M.push(Y,null,I);return M.decryptionPromise=null,X}),this.decryptionPromise}var q=j||B,ye=q.contiguous,pe=q.discontinuity,le=q.trackSwitch,Oe=q.accurateTimeOffset,xe=q.timeOffset,ie=W.audioCodec,se=W.videoCodec,re=W.defaultInitPts,be=W.duration,Z=W.initSegmentData;if((pe||le)&&this.resetInitSegment(Z,ie,se,be),pe&&this.resetInitialTimestamp(re),ye||this.resetContiguity(),this.needsProbing(K,pe,le)){if(H.dataLength){var te=H.flush();K=Object(m.appendUint8Array)(te,K)}this.configureTransmuxer(K,W)}var Ee=this.transmux(K,F,xe,Oe,I),ae=this.currentTransmuxState;return ae.contiguous=!0,ae.discontinuity=!1,ae.trackSwitch=!1,G.executeEnd=p(),Ee},b.flush=function(y){var _=this,I=y.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(y)});var H=[],z=G.timeOffset;if(j){var B=j.flush();B&&H.push(this.push(B,null,y))}var W=M.dataLength;M.reset();var F=this.demuxer,J=this.remuxer;if(!F||!J)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(y)];var ee=F.flush(z);return v(ee)?ee.then(function(q){return _.flushRemux(H,q,y),H}):(this.flushRemux(H,ee,y),H)},b.flushRemux=function(y,_,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);y.push({remuxResult:W,chunkMeta:I}),I.transmuxing.executeEnd=p()},b.resetInitialTimestamp=function(y){var _=this.demuxer,I=this.remuxer;if(!_||!I)return;_.resetTimeStamp(y),I.resetTimeStamp(y)},b.resetContiguity=function(){var y=this.demuxer,_=this.remuxer;if(!y||!_)return;y.resetContiguity(),_.resetNextTimestamp()},b.resetInitSegment=function(y,_,I,j){var M=this.demuxer,G=this.remuxer;if(!M||!G)return;M.resetInitSegment(_,I,j),G.resetInitSegment(y,_,I)},b.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},b.transmux=function(y,_,I,j,M){var G;return _&&_.method==="SAMPLE-AES"?G=this.transmuxSampleAes(y,_,I,j,M):G=this.transmuxUnencrypted(y,I,j,M),G},b.transmuxUnencrypted=function(y,_,I,j){var M=this.demuxer.demux(y,_,!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}},b.transmuxSampleAes=function(y,_,I,j,M){var G=this;return this.demuxer.demuxSampleAes(y,_,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}})},b.configureTransmuxer=function(y,_){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,J=0,ee=d.length;J0&&b!=null&&b.key!=null&&b.iv!==null&&b.method!=null&&(x=b),x}var T=function(b){return{remuxResult:{},chunkMeta:b}};function v(A){return"then"in A&&A.then instanceof Function}var i=function(b,x,y,_,I){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=b,this.videoCodec=x,this.initSegmentData=y,this.duration=_,this.defaultInitPts=I},L=function(b,x,y,_,I){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=b,this.contiguous=x,this.accurateTimeOffset=y,this.trackSwitch=_,this.timeOffset=I}},"./src/demux/tsdemuxer.ts":function(k,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"),f=C("./src/demux/sample-aes.ts"),a=C("./src/events.ts"),o=C("./src/utils/mp4-tools.ts"),r=C("./src/utils/logger.ts"),E=C("./src/errors.ts"),g={video:1,audio:2,id3:3,text:4},m=function(){function v(L,A,b){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=L,this.config=A,this.typeSupported=b}v.probe=function(A){var b=v.syncOffset(A);return b<0?!1:(b&&r.logger.warn("MPEG2-TS detected but first sync word found @ offset "+b+", junk ahead ?"),!0)},v.syncOffset=function(A){for(var b=Math.min(1e3,A.length-3*188),x=0;x>4,ie=void 0;if(xe>1){if(ie=pe+5+A[pe+4],ie===pe+188)continue}else ie=pe+4;switch(Oe){case G:le&&(K&&(_=n(K))&&this.parseAVCPES(_,!1),K={data:[],size:0}),K&&(K.data.push(A.subarray(ie,pe+188)),K.size+=pe+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,pe+188)),B.size+=pe+188-ie);break;case z:le&&(W&&(_=n(W))&&this.parseID3PES(_),W={data:[],size:0}),W&&(W.data.push(A.subarray(ie,pe+188)),W.size+=pe+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=d(A,ie,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,x);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&&!J&&(r.logger.log("reparse from beginning"),F=!1,pe=ye-188),J=this.pmtParsed=!0;break}case 17:case 8191:break;default:F=!0;break}}else this.observer.emit(a.Events.ERROR,a.Events.ERROR,{type:E.ErrorTypes.MEDIA_ERROR,details:E.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 y&&this.extractRemainingSamples(re),re},i.flush=function(){var A=this.remainderData;this.remainderData=null;var b;return A?b=this.demux(A,-1,!1,!0):b={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(b),this.sampleAes?this.decrypt(b,this.sampleAes):b},i.extractRemainingSamples=function(A){var b=A.audioTrack,x=A.avcTrack,y=A.id3Track,_=x.pesData,I=b.pesData,j=y.pesData,M;_&&(M=n(_))?(this.parseAVCPES(M,!0),x.pesData=null):x.pesData=_,I&&(M=n(I))?(b.isAAC?this.parseAACPES(M):this.parseMPEGPES(M),b.pesData=null):(I!=null&&I.size&&r.logger.log("last AAC PES packet truncated,might overlap between fragments"),b.pesData=I),j&&(M=n(j))?(this.parseID3PES(M),y.pesData=null):y.pesData=j},i.demuxSampleAes=function(A,b,x){var y=this.demux(A,x,!0,!this.config.progressive),_=this.sampleAes=new f.default(this.observer,this.config,b);return this.decrypt(y,_)},i.decrypt=function(A,b){return new Promise(function(x){var y=A.audioTrack,_=A.avcTrack;y.samples&&y.isAAC?b.decryptAacSamples(y.samples,0,function(){_.samples?b.decryptAvcSamples(_.samples,0,0,function(){x(A)}):x(A)}):_.samples&&b.decryptAvcSamples(_.samples,0,0,function(){x(A)})})},i.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},i.parseAVCPES=function(A,b){var x=this,y=this._avcTrack,_=this.parseAVCNALu(A.data),I=!1,j=this.avcSample,M,G=!1;A.data=null,j&&_.length&&!y.audFound&&(l(j,y),j=this.avcSample=w(!1,A.pts,A.dts,"")),_.forEach(function(K){switch(K.type){case 1:{M=!0,j||(j=x.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=x.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,J=!1,ee=0;!J&&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){J=!0;var q=B.readUByte();if(q===181){var ye=B.readUShort();if(ye===49){var pe=B.readUInt();if(pe===1195456820){var le=B.readUByte();if(le===3){for(var Oe=B.readUByte(),xe=B.readUByte(),ie=31&Oe,se=[Oe,xe],re=0;re16){for(var be=[],Z=0;Z<16;Z++)be.push(B.readUByte().toString(16)),(Z===3||Z===5||Z===7||Z===9)&&be.push("-");for(var te=F-16,Ee=new Uint8Array(te),ae=0;ae=0){var B={data:A.subarray(H,j-y-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-y-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&&y>=0){var J={data:A.subarray(H,b),type:z,state:y};I.push(J)}if(I.length===0){var ee=this.getLastNalUnit();if(ee){var q=new Uint8Array(ee.data.byteLength+A.byteLength);q.set(ee.data,0),q.set(A,ee.data.byteLength),ee.data=q}}return x.naluState=y,I},i.parseAACPES=function(A){var b=0,x=this._audioTrack,y=this.aacOverFlow,_=A.data;if(y){this.aacOverFlow=null;var I=y.sample.unit.byteLength,j=Math.min(y.missing,I),M=I-j;y.sample.unit.set(_.subarray(0,j),M),x.samples.push(y.sample),b=y.missing}var G,K;for(G=b,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&&(x=(L[9]&14)*536870912+(L[10]&255)*4194304+(L[11]&254)*16384+(L[12]&255)*128+(L[13]&254)/2,M&64?(y=(L[14]&14)*536870912+(L[15]&255)*4194304+(L[16]&254)*16384+(L[17]&255)*128+(L[18]&254)/2,x-y>60*9e4&&(r.logger.warn(Math.round((x-y)/9e4)+"s delta between PTS and DTS, align them"),x=y)):y=x),b=L[8];var G=b+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-=b+3),{data:K,pts:x,dts:y,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 b=L[A-1];v.pts=b.pts,v.dts=b.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.ptsx)return _;return 0}},{key:"maxAutoLevel",get:function(){var b=this.levels,x=this.autoLevelCapping,y;return x===-1&&b&&b.length?y=b.length-1:y=x,y}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(b){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,b)}},{key:"audioTracks",get:function(){var b=this.audioTrackController;return b?b.audioTracks:[]}},{key:"audioTrack",get:function(){var b=this.audioTrackController;return b?b.audioTrack:-1},set:function(b){var x=this.audioTrackController;x&&(x.audioTrack=b)}},{key:"subtitleTracks",get:function(){var b=this.subtitleTrackController;return b?b.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var b=this.subtitleTrackController;return b?b.subtitleTrack:-1},set:function(b){var x=this.subtitleTrackController;x&&(x.subtitleTrack=b)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var b=this.subtitleTrackController;return b?b.subtitleDisplay:!1},set:function(b){var x=this.subtitleTrackController;x&&(x.subtitleDisplay=b)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(b){this.config.lowLatencyMode=b}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return 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(b){i.defaultConfig=b}}]),i}();v.defaultConfig=void 0},"./src/is-supported.ts":function(k,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 f=Object(R.getMediaSource)();if(!f)return!1;var a=h(),o=f&&typeof f.isTypeSupported=="function"&&f.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 f,a=h();return typeof(a==null||((f=a.prototype)===null||f===void 0)?void 0:f.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(k,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(d,n){d.prototype=Object.create(n.prototype),d.prototype.constructor=d,r(d,n)}function S(d){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 f(c,arguments,E(this).constructor)}return T.prototype=Object.create(c.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),r(T,c)},S(d)}function f(d,n,l){return a()?f=Reflect.construct:f=function(T,v,i){var L=[null];L.push.apply(L,v);var A=Function.bind.apply(T,L),b=new A;return i&&r(b,i.prototype),b},f.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(d){return!1}}function o(d){return Function.toString.call(d).indexOf("[native code]")!==-1}function r(d,n){return r=Object.setPrototypeOf||function(c,T){return c.__proto__=T,c},r(d,n)}function E(d){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)},E(d)}var g=Math.pow(2,17),m=function(){function d(l){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=l}var n=d.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,b=L.loader;return new Promise(function(x,y){v.loader&&v.loader.destroy();var _=v.loader=c.loader=A?new A(L):new b(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,_),x({frag:c,part:null,payload:G.data,networkDetails:z})},onError:function(G,K,H){v.resetLoader(c,_),y(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,_),y(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,_),y(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,b=L.loader;return new Promise(function(x,y){i.loader&&i.loader.destroy();var _=i.loader=c.loader=A?new A(L):new b(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),x(B)},onError:function(G,K,H){i.resetLoader(c,_),y(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,_),y(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,_),y(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),b=Math.min(Math.round(v.loaded/L),A),x=A-b,y=x*Math.round(v.loaded/b);v.total=v.loaded+y}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()},d}();function w(d,n){n===void 0&&(n=null);var l=n||d,c={frag:d,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(d){s(n,d);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=f.LevelKey.fromURI(v.uri),L.method=v.method,L.iv=this.createInitializationVector(i),L.keyFormat="identity"),L},c.setElementaryStreamInfo=function(v,i,L,A,b,x){x===void 0&&(x=!1);var y=this.elementaryStreams,_=y[v];if(!_){y[v]={startPTS:i,endPTS:L,startDTS:A,endDTS:b,partial:x};return}_.startPTS=Math.min(_.startPTS,i),_.endPTS=Math.max(_.endPTS,L),_.startDTS=Math.min(_.startDTS,A),_.endDTS=Math.max(_.endDTS,b)},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),d=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 b=c.enumeratedString("BYTERANGE");return b&&A.setByteRange(b,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(k,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 f(o){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=o,this._registerListeners()}var a=f.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 E=this.loaders[r];E&&E.destroy()}this.loaders={}},a.onKeyLoading=function(r,E){var g=E.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 d=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=d.loader,l=g.loader=this.loaders[m]=new n(d);this.decrypturl=p,this.decryptkey=null;var c={url:p,frag:g,responseType:"arraybuffer"},T={timeout:d.fragLoadingTimeOut,maxRetry:0,retryDelay:d.fragLoadingRetryDelay,maxRetryDelay:d.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,E,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,E){var g=E.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,E){var g=E.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})},f}()},"./src/loader/level-details.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"LevelDetails",function(){return f});var R=C("./src/polyfills/number.ts");function h(a,o){for(var r=0;rE.endSN||g>0||g===0&&m>0,this.updated||this.advanced?this.misses=Math.floor(E.misses*.6):this.misses=E.misses+1,this.availabilityDelay=E.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 E=this.driftEndTime-this.driftStartTime;if(E>0){var g=this.driftEnd-this.driftStart;return g*1e3/E}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var E;return(E=this.partList)!==null&&E!==void 0&&E.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var E;return(E=this.fragments)!==null&&E!==void 0&&E.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 E;return(E=this.partList)!==null&&E!==void 0&&E.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var E;return(E=this.partList)!==null&&E!==void 0&&E.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),a}()},"./src/loader/level-key.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"LevelKey",function(){return f});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 y=x.shift()+".";return y+=parseInt(x.shift()).toString(16),y+=("000"+parseInt(x.shift()).toString(16)).substr(-4),y}return b},L.resolve=function(b,x){return h.buildAbsoluteURL(x,b,{alwaysNormalize:!0})},L.parseMasterPlaylist=function(b,x){var y=[],_={},I=!1;g.lastIndex=0;for(var j;(j=g.exec(b))!=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],x)},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)),y.push(G)}else if(j[3]){var H=new o.AttrList(j[3]);H["DATA-ID"]&&(I=!0,_[H["DATA-ID"]]=H)}return{levels:y,sessionData:I?_:null}},L.parseMasterPlaylistMedia=function(b,x,y,_){_===void 0&&(_=[]);var I,j=[],M=0;for(m.lastIndex=0;(I=m.exec(b))!==null;){var G=new o.AttrList(I[1]);if(G.TYPE===y){var K={attrs:G,bitrate:0,id:M++,groupId:G["GROUP-ID"],instreamId:G["INSTREAM-ID"],name:G.NAME||G.LANGUAGE||"",type:y,default:G.bool("DEFAULT"),autoselect:G.bool("AUTOSELECT"),forced:G.bool("FORCED"),lang:G.LANGUAGE,url:G.URI?L.resolve(G.URI,x):""};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(b,x,y,_,I){var j=new f.LevelDetails(x),M=j.fragments,G=null,K=0,H=0,z=0,B=0,W=null,F=new S.Fragment(_,x),J,ee,q,ye=-1,pe=!1;for(w.lastIndex=0,j.m3u8=b;(J=w.exec(b))!==null;){pe&&(pe=!1,F=new S.Fragment(_,x),F.start=z,F.sn=K,F.cc=B,F.level=y,G&&(F.initSegment=G,F.rawProgramDateTime=G.rawProgramDateTime));var le=J[1];if(le){F.duration=parseFloat(le);var Oe=(" "+J[2]).slice(1);F.title=Oe||null,F.tagList.push(Oe?["INF",le,Oe]:["INF",le])}else if(J[3])Object(R.isFiniteNumber)(F.duration)&&(F.start=z,q&&(F.levelkey=q),F.sn=K,F.level=y,F.cc=B,F.urlId=I,M.push(F),F.relurl=(" "+J[3]).slice(1),i(F,W),W=F,z+=F.duration,K++,H=0,pe=!0);else if(J[4]){var xe=(" "+J[4]).slice(1);W?F.setByteRange(xe,W):F.setByteRange(xe)}else if(J[5])F.rawProgramDateTime=(" "+J[5]).slice(1),F.tagList.push(["PROGRAM-DATE-TIME",F.rawProgramDateTime]),ye===-1&&(ye=M.length);else{if(J=J[0].match(p),!J){r.logger.warn("No matches on slow regex match for level playlist!");continue}for(ee=1;ee-1){r.logger.warn("Keyformat "+Ke+" is not supported from the manifest");continue}else if(Ke!=="identity")continue;X&&(q=a.LevelKey.fromURL(x,Q),Q&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(X)>=0&&(q.method=X,q.keyFormat=Ke,Se&&(q.keyID=Se),ce&&(q.keyFormatVersions=ce),q.iv=he));break}case"START":{var Ye=new o.AttrList(se),Qe=Ye.decimalFloatingPoint("TIME-OFFSET");Object(R.isFiniteNumber)(Qe)&&(j.startTimeOffset=Qe);break}case"MAP":{var rt=new o.AttrList(se);F.relurl=rt.URI,rt.BYTERANGE&&F.setByteRange(rt.BYTERANGE),F.level=y,F.sn="initSegment",q&&(F.levelkey=q),F.initSegment=null,G=F,pe=!0;break}case"SERVER-CONTROL":{var qe=new o.AttrList(se);j.canBlockReload=qe.bool("CAN-BLOCK-RELOAD"),j.canSkipUntil=qe.optionalFloat("CAN-SKIP-UNTIL",0),j.canSkipDateRanges=j.canSkipUntil>0&&qe.bool("CAN-SKIP-DATERANGES"),j.partHoldBack=qe.optionalFloat("PART-HOLD-BACK",0),j.holdBack=qe.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Le=new o.AttrList(se);j.partTarget=Le.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,x,tt,Ve);Ce.push(He),F.duration+=He.duration;break}case"PRELOAD-HINT":{var $e=new o.AttrList(se);j.preloadHint=$e;break}case"RENDITION-REPORT":{var Me=new o.AttrList(se);j.renditionReports=j.renditionReports||[],j.renditionReports.push(Me);break}default:r.logger.warn("line parsed but not handled: "+J);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 De=M.length,Te=M[0],de=M[De-1];if(z+=j.skippedSegments*j.targetduration,z>0&&De&&de){j.averagetargetduration=z/De;var ge=de.sn;j.endSN=ge!=="initSegment"?ge:0,Te&&(j.startCC=Te.cc,Te.initSegment||j.fragments.every(function(we){return we.relurl&&n(we.relurl)})&&(r.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),F=new S.Fragment(_,x),F.relurl=de.relurl,F.level=y,F.sn="initSegment",Te.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,ye>0&&v(M,ye),j},L}();function c(L,A){["video","audio","text"].forEach(function(b){var x=L.filter(function(_){return Object(E.isCodecType)(_,b)});if(x.length){var y=x.filter(function(_){return _.lastIndexOf("avc1",0)===0||_.lastIndexOf("mp4a",0)===0});A[b+"Codec"]=y.length>0?y[0]:x[0],L=L.filter(function(_){return x.indexOf(_)===-1})}}),A.unknownCodecs=L}function T(L,A,b){var x=A[b];x&&(L[b]=x)}function v(L,A){for(var b=L[A],x=A;x--;){var y=L[x];if(!y)return;y.programDateTime=b.programDateTime-y.duration*1e3,b=y}}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(k,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"),f=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 E(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 d=w.url;return(d===void 0||d.indexOf("data:")===0)&&(d=p.url),d}var m=function(){function w(d){this.hls=void 0,this.loaders=Object.create(null),this.hls=d,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,b;switch(n.type){case o.PlaylistContextType.MANIFEST:i=c.manifestLoadingMaxRetry,L=c.manifestLoadingTimeOut,A=c.manifestLoadingRetryDelay,b=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,b=c.levelLoadingMaxRetryTimeout;break}if(T=this.createInternalLoader(n),(l=n.deliveryDirectives)!==null&&l!==void 0&&l.part){var x;if(n.type===o.PlaylistContextType.LEVEL&&n.level!==null?x=this.hls.levels[n.level].details:n.type===o.PlaylistContextType.AUDIO_TRACK&&n.id!==null?x=this.hls.audioTracks[n.id].details:n.type===o.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(x=this.hls.subtitleTracks[n.id].details),x){var y=x.partTarget,_=x.targetduration;y&&_&&(L=Math.min(Math.max(y*3,_*.8)*1e3,L))}}var I={timeout:L,maxRetry:i,retryDelay:A,maxRetryDelay:b,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),b=A.levels,x=A.sessionData;if(!b.length){this.handleManifestParsingError(n,c,"no level found in manifest",T);return}var y=b.map(function(K){return{id:K.attrs.AUDIO,audioCodec:K.audioCodec}}),_=b.map(function(K){return{id:K.attrs.SUBTITLES,textCodec:K.textCodec}}),I=a.default.parseMasterPlaylistMedia(i,L,"AUDIO",y),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&&b[0].audioCodec&&!b[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:b,audioTracks:I,subtitles:j,captions:M,url:L,stats:l,networkDetails:T,sessionData:x})},p.handleTrackOrLevelPlaylist=function(n,l,c,T){var v=this.hls,i=c.id,L=c.level,A=c.type,b=g(n,c),x=Object(R.isFiniteNumber)(i)?i:0,y=Object(R.isFiniteNumber)(L)?L:x,_=E(c),I=a.default.parseLevelPlaylist(n.data,b,y,_,x);if(!I.fragments.length){v.trigger(h.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:b,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:b};v.trigger(h.Events.MANIFEST_LOADED,{levels:[j],audioTracks:[],url:b,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(f.parseSegmentIndex)(new Uint8Array(n.data));if(!c)return;var T=c.references,v=l.levelDetails;T.forEach(function(i,L){var A=i.info,b=v.fragments[L];b.byteRange.length===0&&b.setByteRange(String(1+A.end-A.start)+"@"+String(A.start)),b.initSegment&&b.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,b=c.loader,x=c.levelDetails,y=c.deliveryDirectives;if(!(x!=null&&x.targetduration)){this.handleManifestParsingError(n,c,"invalid target duration",T);return}if(!b)return;x.live&&(b.getCacheAge&&(x.ageHeader=b.getCacheAge()||0),(!b.getCacheAge||isNaN(x.ageHeader))&&(x.ageHeader=0));switch(v){case o.PlaylistContextType.MANIFEST:case o.PlaylistContextType.LEVEL:this.hls.trigger(h.Events.LEVEL_LOADED,{details:x,level:i||0,id:L||0,stats:l,networkDetails:T,deliveryDirectives:y});break;case o.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(h.Events.AUDIO_TRACK_LOADED,{details:x,id:L||0,groupId:A||"",stats:l,networkDetails:T,deliveryDirectives:y});break;case o.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(h.Events.SUBTITLE_TRACK_LOADED,{details:x,id:L||0,groupId:A||"",stats:l,networkDetails:T,deliveryDirectives:y});break}},w}();u.default=m},"./src/polyfills/number.ts":function(k,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(k,u,C){"use strict";C.r(u);var R=function(){function h(){}return h.getSilentFrame=function(S,f){switch(S){case"mp4a.40.2":if(f===1)return new Uint8Array([0,200,0,128,35,128]);if(f===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(f===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(f===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(f===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(f===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(f===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(f===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(f===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(k,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 f;for(f in s.types)s.types.hasOwnProperty(f)&&(s.types[f]=[f.charCodeAt(0),f.charCodeAt(1),f.charCodeAt(2),f.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]),E=new Uint8Array([0,0,0,0,0,0,0,0]);s.STTS=s.STSC=s.STCO=E,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(f){for(var a=8,o=arguments.length,r=new Array(o>1?o-1:0),E=1;E>24&255,w[1]=a>>16&255,w[2]=a>>8&255,w[3]=a&255,w.set(f,4),g=0,a=8;g>24&255,f>>16&255,f>>8&255,f&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(f){return s.box(s.types.mdia,s.mdhd(f.timescale,f.duration),s.hdlr(f.type),s.minf(f))},s.mfhd=function(f){return s.box(s.types.mfhd,new Uint8Array([0,0,0,0,f>>24,f>>16&255,f>>8&255,f&255]))},s.minf=function(f){return f.type==="audio"?s.box(s.types.minf,s.box(s.types.smhd,s.SMHD),s.DINF,s.stbl(f)):s.box(s.types.minf,s.box(s.types.vmhd,s.VMHD),s.DINF,s.stbl(f))},s.moof=function(f,a,o){return s.box(s.types.moof,s.mfhd(f),s.traf(o,a))},s.moov=function(f){for(var a=f.length,o=[];a--;)o[a]=s.trak(f[a]);return s.box.apply(null,[s.types.moov,s.mvhd(f[0].timescale,f[0].duration)].concat(o).concat(s.mvex(f)))},s.mvex=function(f){for(var a=f.length,o=[];a--;)o[a]=s.trex(f[a]);return s.box.apply(null,[s.types.mvex].concat(o))},s.mvhd=function(f,a){a*=f;var o=Math.floor(a/(R+1)),r=Math.floor(a%(R+1)),E=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,f>>24&255,f>>16&255,f>>8&255,f&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,E)},s.sdtp=function(f){var a=f.samples||[],o=new Uint8Array(4+a.length),r,E;for(r=0;r>>8&255),a.push(g&255),a=a.concat(Array.prototype.slice.call(E));for(r=0;r>>8&255),o.push(g&255),o=o.concat(Array.prototype.slice.call(E));var m=s.box(s.types.avcC,new Uint8Array([1,a[3],a[4],a[5],252|3,224|f.sps.length].concat(a).concat([f.pps.length]).concat(o))),w=f.width,p=f.height,d=f.pixelRatio[0],n=f.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([d>>24,d>>16&255,d>>8&255,d&255,n>>24,n>>16&255,n>>8&255,n&255])))},s.esds=function(f){var a=f.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(f.config).concat([6,1,2]))},s.mp4a=function(f){var a=f.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,f.channelCount,0,16,0,0,0,0,a>>8&255,a&255,0,0]),s.box(s.types.esds,s.esds(f)))},s.mp3=function(f){var a=f.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,f.channelCount,0,16,0,0,0,0,a>>8&255,a&255,0,0]))},s.stsd=function(f){return f.type==="audio"?!f.isAAC&&f.codec==="mp3"?s.box(s.types.stsd,s.STSD,s.mp3(f)):s.box(s.types.stsd,s.STSD,s.mp4a(f)):s.box(s.types.stsd,s.STSD,s.avc1(f))},s.tkhd=function(f){var a=f.id,o=f.duration*f.timescale,r=f.width,E=f.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,E>>8&255,E&255,0,0]))},s.traf=function(f,a){var o=s.sdtp(f),r=f.id,E=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,E>>24,E>>16&255,E>>8&255,E&255,g>>24,g>>16&255,g>>8&255,g&255])),s.trun(f,o.length+16+20+8+16+8+8),o)},s.trak=function(f){return f.duration=f.duration||4294967295,s.box(s.types.trak,s.tkhd(f),s.mdia(f))},s.trex=function(f){var a=f.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(f,a){var o=f.samples||[],r=o.length,E=12+16*r,g=new Uint8Array(E),m,w,p,d,n,l;for(a+=8+E,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,d>>>24&255,d>>>16&255,d>>>8&255,d&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(f){s.types||s.init();var a=s.moov(f),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(k,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"),f=C("./src/errors.ts"),a=C("./src/utils/logger.ts"),o=C("./src/types/loader.ts"),r=C("./src/utils/timescale-conversion.ts");function E(){return E=Object.assign||function(L){for(var A=1;A0?I:j.pts},x[0].pts);return y&&a.logger.debug("PTS rollover detected"),_},A.remux=function(x,y,_,I,j,M,G,K){var H,z,B,W,F,J,ee=j,q=j,ye=x.pid>-1,pe=y.pid>-1,le=y.samples.length,Oe=x.samples.length>0,xe=le>1,ie=(!ye||Oe)&&(!pe||xe)||this.ISGenerated||G;if(ie){this.ISGenerated||(B=this.generateIS(x,y,j));var se=this.isVideoContiguous,re=-1;if(xe&&(re=T(y.samples),!se&&this.config.forceKeyFrameOnDiscontinuity))if(J=!0,re>0){a.logger.warn("[mp4-remuxer]: Dropped "+re+" out of "+le+" video samples due to a missing keyframe");var be=this.getVideoStartPts(y.samples);y.samples=y.samples.slice(re),y.dropped+=re,q+=(y.samples[0].pts-be)/(y.timescale||9e4)}else re===-1&&(a.logger.warn("[mp4-remuxer]: No keyframe found out of "+le+" video samples"),J=!1);if(this.ISGenerated){if(Oe&&xe){var Z=this.getVideoStartPts(y.samples),te=c(x.samples[0].pts,Z)-Z,Ee=te/y.inputTimeScale;ee+=Math.max(0,Ee),q+=Math.max(0,-Ee)}if(Oe){if(x.samplerate||(a.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),B=this.generateIS(x,y,j)),z=this.remuxAudio(x,ee,this.isAudioContiguous,M,pe||xe||K===o.PlaylistLevelType.AUDIO?q:void 0),xe){var ae=z?z.endPTS-z.startPTS:0;y.inputTimeScale||(a.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),B=this.generateIS(x,y,j)),H=this.remuxVideo(y,q,se,ae)}}else xe&&(H=this.remuxVideo(y,q,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:J,text:W,id3:F}},A.generateIS=function(x,y,_){var I=x.samples,j=y.samples,M=this.typeSupported,G={},K=!Object(R.isFiniteNumber)(this._initPTS),H="audio/mp4",z,B,W;if(K&&(z=B=Infinity),x.config&&I.length&&(x.timescale=x.samplerate,x.isAAC||(M.mpeg?(H="audio/mpeg",x.codec=""):M.mp3&&(x.codec="mp3")),G.audio={id:"audio",container:H,codec:x.codec,initSegment:!x.isAAC&&M.mpeg?new Uint8Array(0):s.default.initSegment([x]),metadata:{channelCount:x.channelCount}},K&&(W=x.inputTimeScale,z=B=I[0].pts-Math.round(W*_))),y.sps&&y.pps&&j.length&&(y.timescale=y.inputTimeScale,G.video={id:"main",container:"video/mp4",codec:y.codec,initSegment:s.default.initSegment([y]),metadata:{width:y.width,height:y.height}},K)){W=y.inputTimeScale;var F=this.getVideoStartPts(j),J=Math.round(W*_);B=Math.min(B,c(j[0].dts,F)-J),z=Math.min(z,F-J)}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(x,y,_,I){var j=x.inputTimeScale,M=x.samples,G=[],K=M.length,H=this._initPTS,z=this.nextAvcDts,B=8,W,F,J,ee=Number.POSITIVE_INFINITY,q=Number.NEGATIVE_INFINITY,ye=0,pe=!1;if(!_||z===null){var le=y*j,Oe=M[0].pts-c(M[0].dts,M[0].pts);z=le-Oe}for(var xe=0;xeie.pts){var se=9e4*.2;ye=Math.max(Math.min(ye,ie.pts-ie.dts),-1*se)}ie.dts0?xe-1:xe].dts&&(pe=!0)}pe&&M.sort(function(_t,At){var Et=_t.dts-At.dts,Qt=_t.pts-At.pts;return Et||Qt}),F=M[0].dts,J=M[M.length-1].dts;var re=Math.round((J-F)/(K-1));if(ye<0){if(yere,Y=Ee<-1;if(ae||Y){ae?a.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(Ee,!0)+" ms ("+Ee+"dts) hole between fragments detected, filling it"):a.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(-Ee,!0)+" ms ("+Ee+"dts) overlapping between fragments detected"),F=z;var X=M[0].pts-Ee;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)(Ee,!0)+" ms")}}n&&(F=Math.max(0,F));for(var Q=0,he=0,ce=0;ce0?Ce-1:Ce].dts;if(ge.stretchShortVideoTrack&&this.nextAudioPts!==null){var _e=Math.floor(ge.maxBufferHole*j),Ue=(I?ee+I*j:this.nextAudioPts)-Ve.pts;Ue>_e?(W=Ue-we,W<0&&(W=we),a.logger.log("[mp4-remuxer]: It is approximately "+Ue/90+" ms to the next segment; using duration "+W/90+" ms for the last video frame.")):W=we}else W=we}var Xe=Math.round(Ve.pts-Ve.dts);G.push(new v(Ve.key,W,He,Xe))}if(G.length&&p&&p<70){var at=G[0].flags;at.dependsOn=2,at.isNonSync=0}console.assert(W!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=z=J+W,this.isVideoContiguous=!0;var ut=s.default.moof(x.sequenceNumber++,F,E({},x,{samples:G})),mt="video",ct={data1:ut,data2:qe,startPTS:ee/j,endPTS:(q+W)/j,startDTS:F/j,endDTS:z/j,type:mt,hasAudio:!1,hasVideo:!0,nb:G.length,dropped:x.dropped};return x.samples=[],x.dropped=0,console.assert(qe.length,"MDAT length must not be zero"),ct},A.remuxAudio=function(x,y,_,I,j){var M=x.inputTimeScale,G=x.samplerate?x.samplerate:M,K=M/G,H=x.isAAC?m:w,z=H*K,B=this._initPTS,W=!x.isAAC&&this.typeSupported.mpeg,F=[],J=x.samples,ee=W?0:8,q=this.nextAudioPts||-1,ye=y*M;if(this.isAudioContiguous=_=_||J.length&&q>0&&(I&&Math.abs(ye-q)<9e3||Math.abs(c(J[0].pts-B,ye)-q)<20*z),J.forEach(function(Te){Te.pts=c(Te.pts-B,ye)}),!_||q<0){if(J=J.filter(function(Te){return Te.pts>=0}),!J.length)return;j===0?q=0:I?q=Math.max(0,ye):q=J[0].pts}if(x.isAAC)for(var pe=j!==void 0,le=this.config.maxAudioFramesDrift,Oe=0,xe=q;Oe=le*z&&be0){he+=ee;try{Q=new Uint8Array(he)}catch(Te){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:f.ErrorTypes.MUX_ERROR,details:f.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:he,reason:"fail allocating audio mdat "+he});return}if(!W){var qe=new DataView(Q.buffer);qe.setUint32(0,he),Q.set(s.default.types.mdat,4)}}else return;Q.set(Ye,ee);var Le=Ye.byteLength;ee+=Le,F.push(new v(!0,H,Le,0)),X=Qe}var Ce=F.length;if(!Ce)return;var Ve=F[F.length-1];this.nextAudioPts=q=X+K*Ve.duration;var tt=W?new Uint8Array(0):s.default.moof(x.sequenceNumber++,Y/K,E({},x,{samples:F}));x.samples=[];var He=Y/M,$e=q/M,Me="audio",De={data1:tt,data2:Q,startPTS:He,endPTS:$e,startDTS:He,endDTS:$e,type:Me,hasAudio:!0,hasVideo:!1,nb:Ce};return this.isAudioContiguous=!0,console.assert(Q.length,"MDAT length must not be zero"),De},A.remuxEmptyAudio=function(x,y,_,I){var j=x.inputTimeScale,M=x.samplerate?x.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(x.manifestCodec||x.codec,x.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 J=[],ee=0;ee4294967296;)L+=b;return L}function T(L){for(var A=0;A0?this.lastEndDTS=x:(S.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var y=!!L.audio,_=!!L.video,I="";y&&(I+="audio"),_&&(I+="video");var j={data1:v,startPTS:b,startDTS:b,endPTS:x,endDTS:x,type:I,hasAudio:y,hasVideo:_,nb:1,dropped:0};return T.audio=j.type==="audio"?j:void 0,T.video=j.type!=="audio"?j:void 0,T.text=d,T.id3=p,T.initSegment=i,T},r}(),a=function(E,g,m){return Object(h.getStartDTS)(E,g)-m};function o(r,E){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"||E===s.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}u.default=f},"./src/task-loop.ts":function(k,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(f){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,f),!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(k,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(f){f.MANIFEST="m",f.AUDIO="a",f.VIDEO="v",f.MUXED="av",f.INIT="i",f.CAPTION="c",f.TIMED_TEXT="tt",f.KEY="k",f.OTHER="o"})(h||(h={}));var s;(function(f){f.DASH="d",f.HLS="h",f.SMOOTH="s",f.OTHER="o"})(s||(s={}));var S;(function(f){f.VOD="v",f.LIVE="l"})(S||(S={}))},"./src/types/level.ts":function(k,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 f}),C.d(u,"Level",function(){return a});function R(o,r){for(var E=0;ENumber.MAX_SAFE_INTEGER?Infinity:r},f.hexadecimalInteger=function(o){if(this[o]){var r=(this[o]||"0x").slice(2);r=(r.length&1?"0":"")+r;for(var E=new Uint8Array(r.length/2),g=0;gNumber.MAX_SAFE_INTEGER?Infinity:r},f.decimalFloatingPoint=function(o){return parseFloat(this[o])},f.optionalFloat=function(o,r){var E=this[o];return E?parseFloat(E):r},f.enumeratedString=function(o){return this[o]},f.bool=function(o){return this[o]==="YES"},f.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,E={},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)),E[r[1]]=m}return E},S}()},"./src/utils/binary-search.ts":function(k,u,C){"use strict";C.r(u);var R={search:function(s,S){for(var f=0,a=s.length-1,o=null,r=null;f<=a;){o=(f+a)/2|0,r=s[o];var E=S(r);if(E>0)f=o+1;else if(E<0)a=o-1;else return r}return null}};u.default=R},"./src/utils/buffer-helper.ts":function(k,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),E=0;E=r.start(E)&&o<=r.end(E))return!0}}catch(g){}return!1},S.bufferInfo=function(a,o,r){try{if(a){var E=S.getBuffered(a),g=[],m;for(m=0;mw&&(E[m-1].end=a[g].end):E.push(a[g])}else E.push(a[g])}else E=a;for(var p=0,d,n=o,l=o,c=0;c=T&&o=_&&R.logger.log(this.time+" ["+_+"] "+I)},b}(),p=function(x){for(var y=[],_=0;_f&&(this.logger.log(m.DEBUG,"Too large cursor position "+this.pos),this.pos=f)},x.moveCursor=function(_){var I=this.pos+_;if(_>1)for(var j=this.pos+1;j=144&&this.backSpace();var I=s(_);if(this.pos>=f){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)},x.clearFromPos=function(_){var I;for(I=_;I0&&(_?j="["+I.join(" | ")+"]":j=I.join(` `)),j},x.getTextAndFormat=function(){return this.rows},b}(),T=function(){function b(y,_,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=y,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 x=b.prototype;return x.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},x.getHandler=function(){return this.outputFilter},x.setHandler=function(_){this.outputFilter=_},x.setPAC=function(_){this.writeScreen.setPAC(_)},x.setBkgData=function(_){this.writeScreen.setBkgData(_)},x.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=_},x.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())},x.ccRCL=function(){this.logger.log(m.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},x.ccBS=function(){if(this.logger.log(m.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},x.ccAOF=function(){},x.ccAON=function(){},x.ccDER=function(){this.logger.log(m.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},x.ccRU=function(_){this.logger.log(m.INFO,"RU("+_+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(_)},x.ccFON=function(){this.logger.log(m.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},x.ccRDC=function(){this.logger.log(m.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},x.ccTR=function(){this.logger.log(m.INFO,"TR"),this.setMode("MODE_TEXT")},x.ccRTD=function(){this.logger.log(m.INFO,"RTD"),this.setMode("MODE_TEXT")},x.ccEDM=function(){this.logger.log(m.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},x.ccCR=function(){this.logger.log(m.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},x.ccENM=function(){this.logger.log(m.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},x.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)},x.ccTO=function(_){this.logger.log(m.INFO,"TO("+_+") - Tab Offset"),this.writeScreen.moveCursor(_)},x.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)},x.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))},x.cueSplitAtTime=function(_){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,_,this.displayedMemory),this.cueStartTime=_))},b}(),v=function(){function b(y,_,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(y,_,j),new T(y+1,I,j)],this.cmdHistory=A(),this.logger=j}var x=b.prototype;return x.getHandler=function(_){return this.channels[_].getHandler()},x.setHandler=function(_,I){this.channels[_].setHandler(I)},x.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]]))}},x.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},x.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},x.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[_]:E[_];var z=this.channels[H];return z?(z.setPAC(this.interpretPAC(j,I)),i(_,I,M),this.currentChannel=H,!0):!1},x.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},x.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},x.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},x.reset=function(){for(var _=0;_=16?n--:n++;var i=Object(R.fixLineBreaks)(l.trim()),L=Object(h.generateCueId)(r,E,i);(!o||!o.cues||!o.cues.getCueById(L))&&(p=new c(r,E,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,b){return A.line==="auto"||b.line==="auto"?0:A.line>8&&b.line>8?b.line-A.line:A.line-b.line}),m.forEach(function(A){return Object(s.addCueToTrack)(o,A)})),m}};u.default=f},"./src/utils/discontinuities.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"findFirstFragWithCC",function(){return S}),C.d(u,"shouldAlignOnDiscontinuities",function(){return f}),C.d(u,"findDiscontinuousReferenceFrag",function(){return a}),C.d(u,"adjustSlidingStart",function(){return r}),C.d(u,"alignStream",function(){return E}),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(d,n){for(var l=null,c=0,T=d.length;cl.startCC||d&&d.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(k,u,C){"use strict";C.r(u);var R=function(){function h(S,f,a){f===void 0&&(f=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_=f,this.totalWeight_=a}var s=h.prototype;return s.sample=function(f,a){var o=Math.pow(this.alpha_,f);this.estimate_=a*(1-o)+o*this.estimate_,this.totalWeight_+=f},s.getTotalWeight=function(){return this.totalWeight_},s.getEstimate=function(){if(this.alpha_){var f=1-Math.pow(this.alpha_,this.totalWeight_);if(f)return this.estimate_/f}return this.estimate_},h}();u.default=R},"./src/utils/fetch-loader.ts":function(k,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,E(c,T)}function f(c){var T=typeof Map=="function"?new Map:void 0;return f=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}}),E(L,i)},f(c)}function a(c,T,v){return o()?a=Reflect.construct:a=function(L,A,b){var x=[null];x.push.apply(x,A);var y=Function.bind.apply(L,x),_=new y;return b&&E(_,b.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 E(c,T){return E=Object.setPrototypeOf||function(i,L){return i.__proto__=L,i},E(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=b&&x(L,A,y.flush(),i)):x(L,A,G,i),j()}).catch(function(){return Promise.reject()})};return I()},c}();function d(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}(f(Error));u.default=p},"./src/utils/imsc1-ttml-parser.ts":function(k,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"),f=C("./src/utils/timescale-conversion.ts"),a=C("./src/utils/webvtt-parser.ts");function o(){return o=Object.assign||function(b){for(var x=1;x"):R}function f(r){for(var E=arguments.length,g=new Array(E>1?E-1:0),m=1;m>24,T[v+1]=i>>16&255,T[v+2]=i>>8&255,T[v+3]=i&255}function E(T,v){var i=[];if(!v.length)return i;var L,A,b;"data"in T?(L=T.data,A=T.start,b=T.end):(L=T,A=0,b=L.byteLength);for(var x=A;x1?x+y:b;if(_===v[0])if(v.length===1)i.push({data:L,start:x+8,end:I});else{var j=E({data:L,start:x+8,end:I},v.slice(1));j.length&&S.apply(i,j)}x=I}return i}function g(T){var v=E(T,["moov"]),i=v[0],L=i?i.end:null,A=E(T,["sidx"]);if(!A||!A[0])return null;var b=[],x=A[0],y=x.data[0],_=y===0?8:16,I=o(x,_);_+=4;var j=0,M=0;y===0?_+=8:_+=16,_+=2;var G=x.end+M,K=a(x,_);_+=2;for(var H=0;H>>31;if(F===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var J=o(x,z);z+=4,b.push({referenceSize:W,subsegmentDuration:J,info:{duration:J/I,start:G,end:G+W-1}}),G+=W,z+=4,_=z}return{earliestPresentationTime:j,timescale:I,version:y,referencesCount:K,references:b,moovEndOffset:L}}function m(T){for(var v=[],i=E(T,["moov","trak"]),L=0;Lf)&&(this.startTime=f),this.endTime=a,this.screen=o,this.timelineController.createCaptionsTrack(this.trackName)},s.reset=function(){this.cueRanges=[]},h}()},"./src/utils/texttrack-utils.ts":function(k,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 f}),C.d(u,"getCuesInRange",function(){return o});var R=C("./src/utils/logger.ts");function h(r,E){var g;try{g=new Event("addtrack")}catch(m){g=document.createEvent("Event"),g.initEvent("addtrack",!1,!1)}g.track=r,E.dispatchEvent(g)}function s(r,E){var g=r.mode;if(g==="disabled"&&(r.mode="hidden"),r.cues&&!r.cues.getCueById(E.id))try{if(r.addCue(E),!r.cues.getCueById(E.id))throw new Error("addCue is failed for: "+E)}catch(w){R.logger.debug("[texttrack-utils]: "+w);var m=new self.TextTrackCue(E.startTime,E.endTime,E.text);m.id=E.id,r.addCue(m)}g==="disabled"&&(r.mode=g)}function S(r){var E=r.mode;if(E==="disabled"&&(r.mode="hidden"),r.cues)for(var g=r.cues.length;g--;)r.removeCue(r.cues[g]);E==="disabled"&&(r.mode=E)}function f(r,E,g){var m=r.mode;if(m==="disabled"&&(r.mode="hidden"),r.cues&&r.cues.length>0)for(var w=o(r.cues,E,g),p=0;pr[g].endTime)return-1;for(var m=0,w=g;m<=w;){var p=Math.floor((w+m)/2);if(Er[p].startTime&&m-1)for(var p=w,d=r.length;p=E&&n.endTime<=g)m.push(n);else if(n.startTime>g)return m}return m}},"./src/utils/time-ranges.ts":function(k,u,C){"use strict";C.r(u);var R={toString:function(s){for(var S="",f=s.length,a=0;a1?E-1:0),m=1;m100)throw new Error("Position must be between 0 and 100.");b=j,this.hasBeenReset=!0}})),Object.defineProperty(m,"positionAlign",a({},w,{get:function(){return x},set:function(j){var M=f(j);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");x=M,this.hasBeenReset=!0}})),Object.defineProperty(m,"size",a({},w,{get:function(){return y},set:function(j){if(j<0||j>100)throw new Error("Size must be between 0 and 100.");y=j,this.hasBeenReset=!0}})),Object.defineProperty(m,"align",a({},w,{get:function(){return _},set:function(j){var M=f(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(k,u,C){"use strict";C.r(u),C.d(u,"parseTimeStamp",function(){return s}),C.d(u,"fixLineBreaks",function(){return E}),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(d,n){if(!d)return"";if(typeof d!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(d))},m}();function s(m){function w(d,n,l,c){return(d|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(d,n){!this.get(d)&&n!==""&&(this.values[d]=n)},w.get=function(d,n,l){return l?this.has(d)?this.values[d]:n[l]:this.has(d)?this.values[d]:n},w.has=function(d){return d in this.values},w.alt=function(d,n,l){for(var c=0;c=0&&l<=100)return this.set(d,l),!0}return!1},m}();function f(m,w,p,d){var n=d?m.split(d):[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 d=m;function n(){var T=s(m);if(T===null)throw new Error("Malformed timestamp: "+d);return m=m.replace(/^[^\sa-zA-Z-]+/,""),T}function l(T,v){var i=new S;f(T,function(b,x){var y;switch(b){case"region":for(var _=p.length-1;_>=0;_--)if(p[_].id===x){i.set(b,p[_].region);break}break;case"vertical":i.alt(b,x,["rl","lr"]);break;case"line":y=x.split(","),i.integer(b,y[0]),i.percent(b,y[0])&&i.set("snapToLines",!1),i.alt(b,y[0],["auto"]),y.length===2&&i.alt("lineAlign",y[1],["start",o,"end"]);break;case"position":y=x.split(","),i.percent(b,y[0]),y.length===2&&i.alt("positionAlign",y[1],["start",o,"end","line-left","line-right","auto"]);break;case"size":i.percent(b,x);break;case"align":i.alt(b,x,["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 '-->'): "+d);m=m.substr(3),c(),w.endTime=n(),c(),l(m,w)}function E(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(d){var n=this;d&&(n.buffer+=n.decoder.decode(d,{stream:!0}));function l(){var A=n.buffer,b=0;for(A=E(A);b")===-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 d=this;try{if((d.cue||d.state==="HEADER")&&(d.buffer+=` `,d.parse()),d.state==="INITIAL"||d.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){d.onparsingerror&&d.onparsingerror(n)}return d.onflush&&d.onflush(),this},m}()},"./src/utils/webvtt-parser.ts":function(k,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"),f=C("./src/remux/mp4-remuxer.ts"),a=/\r\n|\n\r|\n|\r/g,o=function(d,n,l){return l===void 0&&(l=0),d.substr(l,n.length)===n},r=function(d){var n=parseInt(d.substr(-3)),l=parseInt(d.substr(-6,2)),c=parseInt(d.substr(-9,2)),T=d.length>9?parseInt(d.substr(0,d.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:"+d);return n+=1e3*l,n+=60*1e3*c,n+=60*60*1e3*T,n},E=function(d){for(var n=5381,l=d.length;l;)n=n*33^d.charCodeAt(--l);return(n>>>0).toString()};function g(p,d,n){return E(p.toString())+E(d.toString())+E(n)}var m=function(d,n,l){var c=d[n],T=d[c.prevCC];if(!T||!T.new&&c.new){d.ccOffset=d.presentationOffset=c.start,c.new=!1;return}for(;(v=T)!==null&&v!==void 0&&v.new;){var v;d.ccOffset+=c.start-T.start,c.new=!1,c=T,T=d[c.prevCC]}d.presentationOffset=l};function w(p,d,n,l,c,T,v,i){var L=new h.VTTParser,A=Object(s.utf8ArrayToStr)(new Uint8Array(p)).trim().replace(a,` `).split(` `),b=[],x=Object(S.toMpegTsClockFromTimescale)(d,n),y="00:00.000",_=0,I=0,j,M=!0,G=!1;L.oncue=function(K){var H=l[c],z=l.ccOffset,B=(_-x)/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(f.normalizePts)((K.startTime+z-I)*9e4,T*9e4)/9e4;K.startTime=F,K.endTime=F+W}var J=K.text.trim();K.text=decodeURIComponent(encodeURIComponent(J)),K.id||(K.id=g(K.startTime,K.endTime,J)),K.endTime>0&&b.push(K)},L.onparsingerror=function(K){j=K},L.onflush=function(){if(j){i(j);return}v(b)},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:")?y=H.substr(6):o(H,"MPEGTS:")&&(_=parseInt(H.substr(7)))});try{I=r(y)/1e3}catch(H){G=!1,j=H}return}else K===""&&(M=!1);L.parse(K+` `)}),L.flush()}},"./src/utils/xhr-loader.ts":function(k,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 f(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=f.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,E,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=E,this.callbacks=g,this.retryDelay=E.retryDelay,this.loadInternal()},a.loadInternal=function(){var r=this.config,E=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,E.url)}catch(n){g.open("GET",E.url,!0),w(g,E.url)}g.readyState||g.open("GET",E.url,!0);var p=this.context.headers;if(p)for(var d in p)g.setRequestHeader(d,p[d])}catch(n){this.callbacks.onError({code:g.status,text:n.message},E,g);return}E.rangeEnd&&g.setRequestHeader("Range","bytes="+E.rangeStart+"-"+(E.rangeEnd-1)),g.onreadystatechange=this.readystatechange.bind(this),g.onprogress=this.loadprogress.bind(this),g.responseType=E.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),g.send()},a.readystatechange=function(){var r=this.context,E=this.loader,g=this.stats;if(!r||!E)return;var m=E.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){E.onreadystatechange=null,E.onprogress=null;var p=E.status;if(p>=200&&p<300){g.loading.end=Math.max(self.performance.now(),g.loading.first);var d,n;if(r.responseType==="arraybuffer"?(d=E.response,n=d.byteLength):(d=E.responseText,n=d.length),g.loaded=g.total=n,!this.callbacks)return;var l=this.callbacks.onProgress;if(l&&l(g,r,d,E),!this.callbacks)return;var c={url:E.responseURL,data:d};this.callbacks.onSuccess(c,g,r,E)}else g.retry>=w.maxRetry||p>=400&&p<499?(R.logger.error(p+" while loading "+r.url),this.callbacks.onError({code:p,text:E.statusText},r,E)):(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 E=this.stats;E.loaded=r.loaded,r.lengthComputable&&(E.total=r.total)},a.getCacheAge=function(){var r=null;if(this.loader&&s.test(this.loader.getAllResponseHeaders())){var E=this.loader.getResponseHeader("age");r=E?parseFloat(E):null}return r},f}();u.default=S}}).default})},vHTk:function(N,$,P){N.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("ETIr"),P("cv67"),P("K3mO"),P("OLod"))})(this,function(k){return function(){var u=k,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,E=this._S=[],g=0;g<256;g++)E[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+E[g]+p)%256;var d=E[g];E[g]=E[m],E[m]=d}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,E=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,E|=a[(a[o]+a[r])%256]<<24-g*8}return this._i=o,this._j=r,E}u.RC4=R._createHelper(s);var f=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(f)}(),k.RC4})},wCXF:function(N,$,P){"use strict";P.d($,"a",function(){return Ye});var k=P("rePB"),u=P("VTBJ"),C=P("KQm4"),R=P("U8pU"),h=P("ODXe"),s=P("q1tI"),S=P("TSYQ"),f=P.n(S),a=P("Gytx"),o=P.n(a),r=P("Kwbf"),E=P("t23M"),g=P("qx4F"),m=P("6eGT"),w=P("IBYe"),p=P("Ff2n"),d=P("c+Xe"),n=P("fyJ8"),l=P("biw7");function c(Le,Ce,Ve,tt,He){var $e=Ve[Le]||{},Me=Ve[Ce]||{},De,Te;$e.fixed==="left"?De=tt.left[Le]:Me.fixed==="right"&&(Te=tt.right[Ce]);var de=!1,ge=!1,we=!1,_e=!1,Ue=Ve[Ce+1],Xe=Ve[Le-1];if(He==="rtl"){if(De!==void 0){var at=Xe&&Xe.fixed==="left";_e=!at}else if(Te!==void 0){var ut=Ue&&Ue.fixed==="right";we=!ut}}else if(De!==void 0){var mt=Ue&&Ue.fixed==="left";de=!mt}else if(Te!==void 0){var ct=Xe&&Xe.fixed==="right";ge=!ct}return{fixLeft:De,fixRight:Te,lastFixLeft:de,firstFixRight:ge,lastFixRight:we,firstFixLeft:_e,isSticky:tt.isSticky}}var T=P("sR1s");function v(Le){var Ce=Le.cells,Ve=Le.stickyOffsets,tt=Le.flattenColumns,He=Le.rowComponent,$e=Le.cellComponent,Me=Le.onHeaderRow,De=Le.index,Te=s.useContext(l.a),de=Te.prefixCls,ge=Te.direction,we;Me&&(we=Me(Ce.map(function(Ue){return Ue.column}),De));var _e=Object(T.a)(Ce.map(function(Ue){return Ue.column}));return s.createElement(He,Object.assign({},we),Ce.map(function(Ue,Xe){var at=Ue.column,ut=c(Ue.colStart,Ue.colEnd,tt,Ve,ge),mt;return at&&at.onHeaderCell&&(mt=Ue.column.onHeaderCell(at)),s.createElement(n.a,Object.assign({},Ue,{ellipsis:at.ellipsis,align:at.align,component:$e,prefixCls:de,key:_e[Xe]},ut,{additionalProps:mt,rowType:"header"}))}))}v.displayName="HeaderRow";var i=v;function L(Le){var Ce=[];function Ve(Me,De){var Te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ce[Te]=Ce[Te]||[];var de=De,ge=Me.filter(Boolean).map(function(we){var _e={key:we.key,className:we.className||"",children:we.title,column:we,colStart:de},Ue=1,Xe=we.children;return Xe&&Xe.length>0&&(Ue=Ve(Xe,de,Te+1).reduce(function(at,ut){return at+ut},0),_e.hasSubColumns=!0),"colSpan"in we&&(Ue=we.colSpan),"rowSpan"in we&&(_e.rowSpan=we.rowSpan),_e.colSpan=Ue,_e.colEnd=_e.colStart+Ue-1,Ce[Te].push(_e),de+=Ue,Ue});return ge}Ve(Le,0);for(var tt=Ce.length,He=function(De){Ce[De].forEach(function(Te){!("rowSpan"in Te)&&!Te.hasSubColumns&&(Te.rowSpan=tt-De)})},$e=0;$e=0;De-=1){var Te=Ce[De],de=Ve&&Ve[De],ge=de&&de[x.a];(Te||ge||Me)&&(He.unshift(s.createElement("col",Object.assign({key:De,style:{width:Te,minWidth:Te}},ge))),Me=!0)}return s.createElement("colgroup",null,He)}var _=y;function I(Le,Ce){return Object(s.useMemo)(function(){for(var Ve=[],tt=0;tt1?Ur-1:0),sr=1;sr=we&&(Nr=we-_e),Me({scrollLeft:Nr/we*(ge+2)}),ct.current.x=Ht.pageX},Pt=function(){var Ht=Object(Q.b)($e.current).top,$t=Ht+$e.current.offsetHeight,Kr=document.documentElement.scrollTop+window.innerHeight;$t-Object(g.a)()<=Kr||Ht>=Kr-De?mt(function(En){return Object(u.a)(Object(u.a)({},En),{},{isHiddenScrollBar:!0})}):mt(function(En){return Object(u.a)(Object(u.a)({},En),{},{isHiddenScrollBar:!1})})},cr=function(Ht){mt(function($t){return Object(u.a)(Object(u.a)({},$t),{},{scrollLeft:Ht/ge*we||0})})};return s.useImperativeHandle(Ve,function(){return{setScrollLeft:cr}}),s.useEffect(function(){var ir=Object(X.a)(document.body,"mouseup",qt,!1),Ht=Object(X.a)(document.body,"mousemove",mr,!1);return Pt(),function(){ir.remove(),Ht.remove()}},[_e,Et]),s.useEffect(function(){var ir=Object(X.a)(window,"scroll",Pt,!1),Ht=Object(X.a)(window,"resize",Pt,!1);return function(){ir.remove(),Ht.remove()}},[]),s.useEffect(function(){ut.isHiddenScrollBar||mt(function(ir){var Ht,$t;return Object(u.a)(Object(u.a)({},ir),{},{scrollLeft:$e.current.scrollLeft/((Ht=$e.current)===null||Ht===void 0?void 0:Ht.scrollWidth)*(($t=$e.current)===null||$t===void 0?void 0:$t.clientWidth)})})},[ut.isHiddenScrollBar]),ge<=we||!_e||ut.isHiddenScrollBar?null:s.createElement("div",{style:{height:Object(g.a)(),width:we,bottom:De},className:"".concat(de,"-sticky-scroll")},s.createElement("div",{onMouseDown:Jt,ref:Ue,className:f()("".concat(de,"-sticky-scroll-bar"),Object(k.a)({},"".concat(de,"-sticky-scroll-bar-active"),Et)),style:{width:"".concat(_e,"px"),transform:"translate3d(".concat(ut.scrollLeft,"px, 0, 0)")}}))},ce=s.forwardRef(he);function Se(Le,Ce){return s.useMemo(function(){var Ve=!!Le;return{isSticky:Ve,stickyClassName:Ve?"".concat(Ce,"-sticky-header"):"",offsetHeader:Object(R.a)(Le)==="object"&&Le.offsetHeader||0,offsetScroll:Object(R.a)(Le)==="object"&&Le.offsetScroll||0}},[Le,Ce])}var Ke=[],Ge={},Ye="rc-table-internal-hook",Qe=s.memo(function(Le){var Ce=Le.children;return Ce},function(Le,Ce){return o()(Le.props,Ce.props)?Le.pingLeft!==Ce.pingLeft||Le.pingRight!==Ce.pingRight:!1});function rt(Le){var Ce,Ve=Le.prefixCls,tt=Le.className,He=Le.rowClassName,$e=Le.style,Me=Le.data,De=Le.rowKey,Te=Le.scroll,de=Le.tableLayout,ge=Le.direction,we=Le.title,_e=Le.footer,Ue=Le.summary,Xe=Le.id,at=Le.showHeader,ut=Le.components,mt=Le.emptyText,ct=Le.onRow,_t=Le.onHeaderRow,At=Le.internalHooks,Et=Le.transformColumns,Qt=Le.internalRefs,qt=Le.sticky,Jt=Me||Ke,mr=!!Jt.length,Pt=s.useState(0),cr=Object(h.a)(Pt,2),ir=cr[0],Ht=cr[1];s.useEffect(function(){Ht(Object(g.a)())});var $t=s.useMemo(function(){return Object(T.c)(ut,{})},[ut]),Kr=s.useCallback(function(Fr,wr){return Object(T.b)($t,Fr)||wr},[$t]),En=s.useMemo(function(){return typeof De=="function"?De:function(Fr){var wr=Fr&&Fr[De];return wr}},[De]),Nr=Object(x.c)(Le),Wn=Nr.expandIcon,gt=Nr.expandedRowKeys,Ct=Nr.defaultExpandedRowKeys,dt=Nr.defaultExpandAllRows,or=Nr.expandedRowRender,Mr=Nr.onExpand,jt=Nr.onExpandedRowsChange,Rt=Nr.expandRowByClick,Ar=Nr.rowExpandable,dn=Nr.expandIconColumnIndex,Sr=Nr.expandedRowClassName,st=Nr.childrenColumnName,Ot=Nr.indentSize,jr=Wn||ae,$r=st||"children",ft=s.useMemo(function(){return or?"row":Le.expandable&&At===Ye&&Le.expandable.__PARENT_RENDER_ICON__||Jt.some(function(Fr){return Fr&&Object(R.a)(Fr)==="object"&&Fr[$r]})?"nest":!1},[!!or,Jt]),gn=s.useState(function(){return Ct||(dt?Y(Jt,En,$r):[])}),Zr=Object(h.a)(gn,2),St=Zr[0],kr=Zr[1],Ur=s.useMemo(function(){return new Set(gt||St||[])},[gt,St]),Dr=s.useCallback(function(Fr){var wr=En(Fr,Jt.indexOf(Fr)),vr,Qn=Ur.has(wr);Qn?(Ur.delete(wr),vr=Object(C.a)(Ur)):vr=[].concat(Object(C.a)(Ur),[wr]),kr(vr),Mr&&Mr(!Qn,Fr),jt&&jt(vr)},[En,Ur,Jt,Mr,jt]),sr=s.useState(0),wn=Object(h.a)(sr,2),Lt=wn[0],nt=wn[1],wt=Object(le.b)(Object(u.a)(Object(u.a)(Object(u.a)({},Le),Nr),{},{expandable:!!or,expandedKeys:Ur,getRowKey:En,onTriggerExpand:Dr,expandIcon:jr,expandIconColumnIndex:dn,direction:ge}),At===Ye?Et:null),Mt=Object(h.a)(wt,2),er=Mt[0],dr=Mt[1],en=s.useMemo(function(){return{columns:er,flattenColumns:dr}},[er,dr]),fr=s.useRef(),tr=s.useRef(),lr=s.useRef(),Rr=s.useState(!1),zt=Object(h.a)(Rr,2),Ut=zt[0],rr=zt[1],Cr=s.useState(!1),zr=Object(h.a)(Cr,2),on=zr[0],Ln=zr[1],Va=ie(new Map),ri=Object(h.a)(Va,2),Pa=ri[0],ea=ri[1],vn=Object(T.a)(dr),Ca=vn.map(function(Fr){return Pa.get(Fr)}),Jr=s.useMemo(function(){return Ca},[Ca.join("_")]),ta=be(Jr,dr.length,ge),Nn=Te&&Object(T.d)(Te.y),sn=Te&&Object(T.d)(Te.x),Mn=sn&&dr.some(function(Fr){var wr=Fr.fixed;return wr}),da=s.useRef(),ya=Se(qt,Ve),ia=ya.isSticky,Ba=ya.offsetHeader,Oa=ya.offsetScroll,ra=ya.stickyClassName,Wa,Ft,Kt;Nn&&(Ft={overflowY:"scroll",maxHeight:Te.y}),sn&&(Wa={overflowX:"auto"},Nn||(Ft={overflowY:"hidden"}),Kt={width:Te.x===!0?"auto":Te.x,minWidth:"100%"});var Gt=s.useCallback(function(Fr,wr){ea(function(vr){var Qn=new Map(vr);return Qn.set(Fr,wr),Qn})},[]),gr=se(null),Pr=Object(h.a)(gr,2),Xr=Pr[0],Vr=Pr[1];function yn(Fr,wr){if(!wr)return;typeof wr=="function"?wr(Fr):wr.scrollLeft!==Fr&&(wr.scrollLeft=Fr)}var rn=function(wr){var vr=wr.currentTarget,Qn=wr.scrollLeft,Na=typeof Qn=="number"?Qn:vr.scrollLeft,ja=vr||Ge;if(!Vr()||Vr()===ja){var Xt;Xr(ja),yn(Na,tr.current),yn(Na,lr.current),yn(Na,(Xt=da.current)===null||Xt===void 0?void 0:Xt.setScrollLeft)}if(vr){var Tt=vr.scrollWidth,Zt=vr.clientWidth;rr(Na>0),Ln(Na1?Ee-1:0),Y=1;Y/gm),ee=S(/^data-[\-\w.\u00B7-\uFFFF]/),q=S(/^aria-[\-\w]+$/),ye=S(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),pe=S(/^(?:\w+script|data):/i),le=S(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z};function xe(Z){if(Array.isArray(Z)){for(var te=0,Ee=Array(Z.length);te0&&arguments[0]!==void 0?arguments[0]:ie(),te=function(nt){return re(nt)};if(te.version="2.0.15",te.removed=[],!Z||!Z.document||Z.document.nodeType!==9)return te.isSupported=!1,te;var Ee=Z.document,ae=!1,Y=Z.document,X=Z.DocumentFragment,Q=Z.HTMLTemplateElement,he=Z.Node,ce=Z.NodeFilter,Se=Z.NamedNodeMap,Ke=Se===void 0?Z.NamedNodeMap||Z.MozNamedAttrMap:Se,Ge=Z.Text,Ye=Z.Comment,Qe=Z.DOMParser,rt=Z.trustedTypes;if(typeof Q=="function"){var qe=Y.createElement("template");qe.content&&qe.content.ownerDocument&&(Y=qe.content.ownerDocument)}var Le=se(rt,Ee),Ce=Le&&Wn?Le.createHTML(""):"",Ve=Y,tt=Ve.implementation,He=Ve.createNodeIterator,$e=Ve.getElementsByTagName,Me=Ve.createDocumentFragment,De=Ee.importNode,Te=_(Y).documentMode?Y.documentMode:{},de={};te.isSupported=tt&&typeof tt.createHTMLDocument!="undefined"&&Te!==9;var ge=F,we=J,_e=ee,Ue=q,Xe=pe,at=le,ut=ye,mt=null,ct=y({},[].concat(xe(I),xe(j),xe(M),xe(G),xe(K))),_t=null,At=y({},[].concat(xe(H),xe(z),xe(B),xe(W))),Et=null,Qt=null,qt=!0,Jt=!0,mr=!1,Pt=!1,cr=!1,ir=!1,Ht=!1,$t=!1,Kr=!1,En=!1,Nr=!1,Wn=!1,gt=!0,Ct=!0,dt=!1,or={},Mr=y({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","plaintext","script","style","svg","template","thead","title","video","xmp"]),jt=null,Rt=y({},["audio","video","img","source","image","track"]),Ar=null,dn=y({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Sr=null,st=Y.createElement("form"),Ot=function(nt){if(Sr&&Sr===nt)return;(!nt||(typeof nt=="undefined"?"undefined":Oe(nt))!=="object")&&(nt={}),nt=_(nt),mt="ALLOWED_TAGS"in nt?y({},nt.ALLOWED_TAGS):ct,_t="ALLOWED_ATTR"in nt?y({},nt.ALLOWED_ATTR):At,Ar="ADD_URI_SAFE_ATTR"in nt?y(_(dn),nt.ADD_URI_SAFE_ATTR):dn,jt="ADD_DATA_URI_TAGS"in nt?y(_(Rt),nt.ADD_DATA_URI_TAGS):Rt,Et="FORBID_TAGS"in nt?y({},nt.FORBID_TAGS):{},Qt="FORBID_ATTR"in nt?y({},nt.FORBID_ATTR):{},or="USE_PROFILES"in nt?nt.USE_PROFILES:!1,qt=nt.ALLOW_ARIA_ATTR!==!1,Jt=nt.ALLOW_DATA_ATTR!==!1,mr=nt.ALLOW_UNKNOWN_PROTOCOLS||!1,Pt=nt.SAFE_FOR_JQUERY||!1,cr=nt.SAFE_FOR_TEMPLATES||!1,ir=nt.WHOLE_DOCUMENT||!1,Kr=nt.RETURN_DOM||!1,En=nt.RETURN_DOM_FRAGMENT||!1,Nr=nt.RETURN_DOM_IMPORT||!1,Wn=nt.RETURN_TRUSTED_TYPE||!1,$t=nt.FORCE_BODY||!1,gt=nt.SANITIZE_DOM!==!1,Ct=nt.KEEP_CONTENT!==!1,dt=nt.IN_PLACE||!1,ut=nt.ALLOWED_URI_REGEXP||ut,cr&&(Jt=!1),En&&(Kr=!0),or&&(mt=y({},[].concat(xe(K))),_t=[],or.html===!0&&(y(mt,I),y(_t,H)),or.svg===!0&&(y(mt,j),y(_t,z),y(_t,W)),or.svgFilters===!0&&(y(mt,M),y(_t,z),y(_t,W)),or.mathMl===!0&&(y(mt,G),y(_t,B),y(_t,W))),nt.ADD_TAGS&&(mt===ct&&(mt=_(mt)),y(mt,nt.ADD_TAGS)),nt.ADD_ATTR&&(_t===At&&(_t=_(_t)),y(_t,nt.ADD_ATTR)),nt.ADD_URI_SAFE_ATTR&&y(Ar,nt.ADD_URI_SAFE_ATTR),Ct&&(mt["#text"]=!0),ir&&y(mt,["html","head","body"]),mt.table&&(y(mt,["tbody"]),delete Et.tbody),s&&s(nt),Sr=nt},jr=function(nt){p(te.removed,{element:nt});try{nt.parentNode.removeChild(nt)}catch(wt){nt.outerHTML=Ce}},$r=function(nt,wt){try{p(te.removed,{attribute:wt.getAttributeNode(nt),from:wt})}catch(Mt){p(te.removed,{attribute:null,from:wt})}wt.removeAttribute(nt)},ft=function(nt){var wt=void 0,Mt=void 0;if($t)nt=""+nt;else{var er=l(nt,/^[\r\n\t ]+/);Mt=er&&er[0]}var dr=Le?Le.createHTML(nt):nt;try{wt=new Qe().parseFromString(dr,"text/html")}catch(tr){}if(ae&&y(Et,["title"]),!wt||!wt.documentElement){wt=tt.createHTMLDocument("");var en=wt,fr=en.body;fr.parentNode.removeChild(fr.parentNode.firstElementChild),fr.outerHTML=dr}return nt&&Mt&&wt.body.insertBefore(Y.createTextNode(Mt),wt.body.childNodes[0]||null),$e.call(wt,ir?"html":"body")[0]};te.isSupported&&function(){try{var Lt=ft("</title><img>");i(/<\/title/,Lt.querySelector("title").innerHTML)&&(ae=!0)}catch(nt){}}();var gn=function(nt){return He.call(nt.ownerDocument||nt,nt,ce.SHOW_ELEMENT|ce.SHOW_COMMENT|ce.SHOW_TEXT,function(){return ce.FILTER_ACCEPT},!1)},Zr=function(nt){return nt instanceof Ge||nt instanceof Ye?!1:typeof nt.nodeName!="string"||typeof nt.textContent!="string"||typeof nt.removeChild!="function"||!(nt.attributes instanceof Ke)||typeof nt.removeAttribute!="function"||typeof nt.setAttribute!="function"||typeof nt.namespaceURI!="string"},St=function(nt){return(typeof he=="undefined"?"undefined":Oe(he))==="object"?nt instanceof he:nt&&(typeof nt=="undefined"?"undefined":Oe(nt))==="object"&&typeof nt.nodeType=="number"&&typeof nt.nodeName=="string"},kr=function(nt,wt,Mt){if(!de[nt])return;E(de[nt],function(er){er.call(te,wt,Mt,Sr)})},Ur=function(nt){var wt=void 0;if(kr("beforeSanitizeElements",nt,null),Zr(nt))return jr(nt),!0;if(l(nt.nodeName,/[\u0080-\uFFFF]/))return jr(nt),!0;var Mt=n(nt.nodeName);if(kr("uponSanitizeElement",nt,{tagName:Mt,allowedTags:mt}),(Mt==="svg"||Mt==="math")&&nt.querySelectorAll("p, br").length!==0)return jr(nt),!0;if(!mt[Mt]||Et[Mt]){if(Ct&&!Mr[Mt]&&typeof nt.insertAdjacentHTML=="function")try{var er=nt.innerHTML;nt.insertAdjacentHTML("AfterEnd",Le?Le.createHTML(er):er)}catch(dr){}return jr(nt),!0}return Mt==="noscript"&&i(/<\/noscript/i,nt.innerHTML)||Mt==="noembed"&&i(/<\/noembed/i,nt.innerHTML)?(jr(nt),!0):(Pt&&!St(nt.firstElementChild)&&(!St(nt.content)||!St(nt.content.firstElementChild))&&i(/</g,nt.textContent)&&(p(te.removed,{element:nt.cloneNode()}),nt.innerHTML?nt.innerHTML=c(nt.innerHTML,/</g,"<"):nt.innerHTML=c(nt.textContent,/</g,"<")),cr&&nt.nodeType===3&&(wt=nt.textContent,wt=c(wt,ge," "),wt=c(wt,we," "),nt.textContent!==wt&&(p(te.removed,{element:nt.cloneNode()}),nt.textContent=wt)),kr("afterSanitizeElements",nt,null),!1)},Dr=function(nt,wt,Mt){if(gt&&(wt==="id"||wt==="name")&&(Mt in Y||Mt in st))return!1;if(!(Jt&&i(_e,wt))){if(!(qt&&i(Ue,wt))){if(!_t[wt]||Qt[wt])return!1;if(!Ar[wt]){if(!i(ut,c(Mt,at,""))){if(!((wt==="src"||wt==="xlink:href"||wt==="href")&&nt!=="script"&&T(Mt,"data:")===0&&jt[nt])){if(!(mr&&!i(Xe,c(Mt,at,"")))){if(Mt)return!1}}}}}}return!0},sr=function(nt){var wt=void 0,Mt=void 0,er=void 0,dr=void 0,en=void 0;kr("beforeSanitizeAttributes",nt,null);var fr=nt.attributes;if(!fr)return;var tr={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_t};for(en=fr.length;en--;){wt=fr[en];var lr=wt,Rr=lr.name,zt=lr.namespaceURI;if(Mt=v(wt.value),er=n(Rr),tr.attrName=er,tr.attrValue=Mt,tr.keepAttr=!0,tr.forceKeepAttr=void 0,kr("uponSanitizeAttribute",nt,tr),Mt=tr.attrValue,tr.forceKeepAttr)continue;if(er==="name"&&nt.nodeName==="IMG"&&fr.id)dr=fr.id,fr=d(fr,[]),$r("id",nt),$r(Rr,nt),g(fr,dr)>en&&nt.setAttribute("id",dr.value);else{if(nt.nodeName==="INPUT"&&er==="type"&&Mt==="file"&&tr.keepAttr&&(_t[er]||!Qt[er]))continue;Rr==="id"&&nt.setAttribute(Rr,""),$r(Rr,nt)}if(!tr.keepAttr)continue;if(Pt&&i(/\/>/i,Mt)){$r(Rr,nt);continue}if(i(/svg|math/i,nt.namespaceURI)&&i(L("</("+m(h(Mr),"|")+")","i"),Mt)){$r(Rr,nt);continue}cr&&(Mt=c(Mt,ge," "),Mt=c(Mt,we," "));var Ut=nt.nodeName.toLowerCase();if(!Dr(Ut,er,Mt))continue;try{zt?nt.setAttributeNS(zt,Rr,Mt):nt.setAttribute(Rr,Mt),w(te.removed)}catch(rr){}}kr("afterSanitizeAttributes",nt,null)},wn=function Lt(nt){var wt=void 0,Mt=gn(nt);for(kr("beforeSanitizeShadowDOM",nt,null);wt=Mt.nextNode();){if(kr("uponSanitizeShadowNode",wt,null),Ur(wt))continue;wt.content instanceof X&&Lt(wt.content),sr(wt)}kr("afterSanitizeShadowDOM",nt,null)};return te.sanitize=function(Lt,nt){var wt=void 0,Mt=void 0,er=void 0,dr=void 0,en=void 0;if(Lt||(Lt="<!-->"),typeof Lt!="string"&&!St(Lt)){if(typeof Lt.toString!="function")throw A("toString is not a function");if(Lt=Lt.toString(),typeof Lt!="string")throw A("dirty is not a string, aborting")}if(!te.isSupported){if(Oe(Z.toStaticHTML)==="object"||typeof Z.toStaticHTML=="function"){if(typeof Lt=="string")return Z.toStaticHTML(Lt);if(St(Lt))return Z.toStaticHTML(Lt.outerHTML)}return Lt}if(Ht||Ot(nt),te.removed=[],typeof Lt=="string"&&(dt=!1),!dt)if(Lt instanceof he)wt=ft("<!-->"),Mt=wt.ownerDocument.importNode(Lt,!0),Mt.nodeType===1&&Mt.nodeName==="BODY"||Mt.nodeName==="HTML"?wt=Mt:wt.appendChild(Mt);else{if(!Kr&&!cr&&!ir&&Lt.indexOf("<")===-1)return Le&&Wn?Le.createHTML(Lt):Lt;if(wt=ft(Lt),!wt)return Kr?null:Ce}wt&&$t&&jr(wt.firstChild);for(var fr=gn(dt?Lt:wt);er=fr.nextNode();){if(er.nodeType===3&&er===dr)continue;if(Ur(er))continue;er.content instanceof X&&wn(er.content),sr(er),dr=er}if(dr=null,dt)return Lt;if(Kr){if(En)for(en=Me.call(wt.ownerDocument);wt.firstChild;)en.appendChild(wt.firstChild);else en=wt;return Nr&&(en=De.call(Ee,en,!0)),en}var tr=ir?wt.outerHTML:wt.innerHTML;return cr&&(tr=c(tr,ge," "),tr=c(tr,we," ")),Le&&Wn?Le.createHTML(tr):tr},te.setConfig=function(Lt){Ot(Lt),Ht=!0},te.clearConfig=function(){Sr=null,Ht=!1},te.isValidAttribute=function(Lt,nt,wt){Sr||Ot({});var Mt=n(Lt),er=n(nt);return Dr(Mt,er,wt)},te.addHook=function(Lt,nt){if(typeof nt!="function")return;de[Lt]=de[Lt]||[],p(de[Lt],nt)},te.removeHook=function(Lt){de[Lt]&&w(de[Lt])},te.removeHooks=function(Lt){de[Lt]&&(de[Lt]=[])},te.removeAllHooks=function(){de={}},te}var be=re();return be})},wRmb:function(N,$,P){"use strict";P.d($,"a",function(){return o});var k=P("rePB"),u=P("KQm4"),C=P("VTBJ"),R=P("Ff2n"),h=P("q1tI"),s=P.n(h),S=P("Kwbf"),f=P("Zm9Q"),a=P("hW8S");function o(w){return Object(f.a)(w).filter(function(p){return h.isValidElement(p)}).map(function(p){var d=p.key,n=p.props,l=n.children,c=Object(R.a)(n,["children"]),T=Object(C.a)({key:d},c);return l&&(T.children=o(l)),T})}function r(w){return w.reduce(function(p,d){var n=d.fixed,l=n===!0?"left":n,c=d.children;return c&&c.length>0?[].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)({},d),{},{fixed:l})])},[])}function E(w){for(var p=!0,d=0;d<w.length;d+=1){var n=w[d];if(p&&n.fixed!=="left")p=!1;else if(!p&&n.fixed==="left"){Object(S.a)(!1,"Index ".concat(d-1," of `columns` missing `fixed='left'` prop."));break}}for(var l=!0,c=w.length-1;c>=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 d=p.fixed,n=Object(R.a)(p,["fixed"]),l=d;return d==="left"?l="right":d==="right"&&(l="left"),Object(C.a)({fixed:l},n)})}function m(w,p){var d=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,b=w.expandIconColumnIndex,x=w.direction,y=w.expandRowByClick,_=h.useMemo(function(){return n||o(l)},[n,l]),I=h.useMemo(function(){if(c){var G,K=b||0,H=_[K],z=(G={},Object(k.a)(G,a.a,{className:"".concat(d,"-expand-icon-col")}),Object(k.a)(G,"title",""),Object(k.a)(G,"fixed",H?H.fixed:null),Object(k.a)(G,"className","".concat(d,"-row-expand-icon-cell")),Object(k.a)(G,"render",function(F,J,ee){var q=v(J,ee),ye=T.has(q),pe=A?A(J):!0,le=L({prefixCls:d,expanded:ye,expandable:pe,record:J,onExpand:i});return y?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,x]),j=h.useMemo(function(){var G=I;return p&&(G=p(G)),G.length||(G=[{render:function(){return null}}]),G},[p,I,x]),M=h.useMemo(function(){return x==="rtl"?g(r(j)):r(j)},[j,x]);return[j,M]}$.b=m},wZgz:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("ETIr"),P("cv67"),P("K3mO"),P("OLod"))})(this,function(k){return function(){var u=k,C=u.lib,R=C.BlockCipher,h=u.algo,s=[],S=[],f=[],a=[],o=[],r=[],E=[],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],b=n[v]*257^v*16843008;f[c]=b<<24|b>>>8,a[c]=b<<16|b>>>16,o[c]=b<<8|b>>>24,r[c]=b;var b=A*16843009^L*65537^i*257^c*16843008;E[v]=b<<24|b>>>8,g[v]=b<<16|b>>>16,m[v]=b<<8|b>>>24,w[v]=b,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],d=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;A<i;A++)A<T?L[A]=c[A]:(n=L[A-1],A%T?T>6&&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 b=this._invKeySchedule=[],x=0;x<i;x++){var A=i-x;if(x%4)var n=L[A];else var n=L[A-4];x<4||A<=4?b[x]=n:b[x]=E[s[n>>>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,f,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,E,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 b=this._nRounds,x=n[l]^c[0],y=n[l+1]^c[1],_=n[l+2]^c[2],I=n[l+3]^c[3],j=4,M=1;M<b;M++){var G=T[x>>>24]^v[y>>>16&255]^i[_>>>8&255]^L[I&255]^c[j++],K=T[y>>>24]^v[_>>>16&255]^i[I>>>8&255]^L[x&255]^c[j++],H=T[_>>>24]^v[I>>>16&255]^i[x>>>8&255]^L[y&255]^c[j++],z=T[I>>>24]^v[x>>>16&255]^i[y>>>8&255]^L[_&255]^c[j++];x=G,y=K,_=H,I=z}var G=(A[x>>>24]<<24|A[y>>>16&255]<<16|A[_>>>8&255]<<8|A[I&255])^c[j++],K=(A[y>>>24]<<24|A[_>>>16&255]<<16|A[I>>>8&255]<<8|A[x&255])^c[j++],H=(A[_>>>24]<<24|A[I>>>16&255]<<16|A[x>>>8&255]<<8|A[y&255])^c[j++],z=(A[I>>>24]<<24|A[x>>>16&255]<<16|A[y>>>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(d)}(),k.AES})},wbyO:function(N,$,P){(function(k,u){N.exports=$=u(P("Ib8C"))})(this,function(k){return function(){var u=k,C=u.lib,R=C.WordArray,h=u.enc,s=h.Base64url={stringify:function(f,a=!0){var o=f.words,r=f.sigBytes,E=a?this._safe_map:this._map;f.clamp();for(var g=[],m=0;m<r;m+=3)for(var w=o[m>>>2]>>>24-m%4*8&255,p=o[m+1>>>2]>>>24-(m+1)%4*8&255,d=o[m+2>>>2]>>>24-(m+2)%4*8&255,n=w<<16|p<<8|d,l=0;l<4&&m+l*.75<r;l++)g.push(E.charAt(n>>>6*(3-l)&63));var c=E.charAt(64);if(c)for(;g.length%4;)g.push(c);return g.join("")},parse:function(f,a=!0){var o=f.length,r=a?this._safe_map:this._map,E=this._reverseMap;if(!E){E=this._reverseMap=[];for(var g=0;g<r.length;g++)E[r.charCodeAt(g)]=g}var m=r.charAt(64);if(m){var w=f.indexOf(m);w!==-1&&(o=w)}return S(f,o,E)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function S(f,a,o){for(var r=[],E=0,g=0;g<a;g++)if(g%4){var m=o[f.charCodeAt(g-1)]<<g%4*2,w=o[f.charCodeAt(g)]>>>6-g%4*2,p=m|w;r[E>>>2]|=p<<24-E%4*8,E++}return R.create(r,E)}}(),k.enc.Base64url})},"y0+3":function(N,$,P){"use strict";P.d($,"a",function(){return r}),P.d($,"b",function(){return g});var k=/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]=k.test(w)),u[w]?parseFloat(p)||0:p}function s(m,w){var p=arguments.length,d=R(m);return w=C[w]?"cssFloat"in m.style?"cssFloat":"styleFloat":w,p===1?d:h(m,w,d[w]||m.style[w])}function S(m,w,p){var d=arguments.length;if(w=C[w]?"cssFloat"in m.style?"cssFloat":"styleFloat":w,d===3)return typeof p=="number"&&k.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 f(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 E(){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,$,P){var k=P("MFOe"),u=k.Global;N.exports={name:"oldFF-globalStorage",read:R,write:h,each:s,remove:S,clearAll:f};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 f(){s(function(a,o){delete C[a]})}}}]);