You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Question__AddOrEdit.32c5...

234 lines
1.4 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

(window.webpackJsonp=window.webpackJsonp||[]).push([[185,5,6,7,8,10,13],{"+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&&/<!\[CDATA\[/.test(I))return 0;var G=I&&/^<(\/)?([\w_:\.-]*)/.exec(I);if(G&&G[1])for(;M;)if(M.tagName==G[2]){M=M.prev;break}else if(S.implicitlyClosed.hasOwnProperty(M.tagName))M=M.prev;else break;else if(G)for(;M;){var K=S.contextGrabbers[M.tagName];if(K&&K.hasOwnProperty(G[2]))M=M.prev;else break}for(;M&&M.prev&&!M.startOfLine;)M=M.prev;return M?M.indent+s:_.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",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<Ye>>>0?1:0),X=X+Ce,Q=Q+Le+(X>>>0<Ce>>>0?1:0),X=X+De,Q=Q+Me+(X>>>0<De>>>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<ae>>>0?1:0),_t=_t+de,At=At+Te+(_t>>>0<de>>>0?1:0),_t=_t+ct,At=At+mt+(_t>>>0<ct>>>0?1:0),_t=_t+X,At=At+Q+(_t>>>0<X>>>0?1:0),Et=Ue+we,Qt=_e+ge+(Et>>>0<Ue>>>0?1:0);Ee=Z,ae=te,Z=re,te=be,re=ie,be=se,se=xe+_t|0,ie=Oe+At+(se>>>0<xe>>>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<ee>>>0?1:0),x=d.low=x+ye,d.high=b+q+(x>>>0<ye>>>0?1:0),_=n.low=_+le,n.high=y+pe+(_>>>0<le>>>0?1:0),j=l.low=j+xe,l.high=I+Oe+(j>>>0<xe>>>0?1:0),G=c.low=G+se,c.high=M+ie+(G>>>0<se>>>0?1:0),H=T.low=H+be,T.high=K+re+(H>>>0<be>>>0?1:0),B=v.low=B+te,v.high=z+Z+(B>>>0<te>>>0?1:0),F=i.low=F+ae,i.high=W+Ee+(F>>>0<ae>>>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<<L)-1;A<32?i^=1<<A:v^=1<<A-32}c&128?c=c<<1^113:c<<=1}E[T]=f.create(v,i)}})();var g=[];(function(){for(var w=0;w<25;w++)g[w]=f.create()})();var m=a.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var w=this._state=[],p=0;p<25;p++)w[p]=new f.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(w,p){for(var d=this._state,n=this.blockSize/2,l=0;l<n;l++){var c=w[p+2*l],T=w[p+2*l+1];c=(c<<8|c>>>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<<z|H>>>32-z,b=H<<z|K>>>32-z):(A=H<<z-32|K>>>64-z,b=K<<z-32|H>>>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<v;L++){var A=c[L],b=A.high,x=A.low;b=(b<<8|b>>>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<y;I++)_[I]=arguments[I];return x=A.call.apply(A,[this].concat(_)),x.state={goInputText:""},x.buildOptionText=function(j){return"".concat(j," ").concat(x.props.locale.items_per_page)},x.changeSize=function(j){x.props.changeSize(Number(j))},x.handleChange=function(j){x.setState({goInputText:j.target.value})},x.handleBlur=function(j){var M=x.props,G=M.goButton,K=M.quickGo,H=M.rootPrefixCls,z=x.state.goInputText;if(G||z==="")return;if(j.relatedTarget&&(j.relatedTarget.className.indexOf("".concat(H,"-prev"))>=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.current<T(void 0,y.state,y.props)},y.runIfEnter=function(G,K){if(G.key==="Enter"||G.charCode===13){for(var H=arguments.length,z=new Array(H>2?H-2:0),B=2;B<H;B++)z[B-2]=arguments[B];K.apply(void 0,z)}},y.runIfEnterPrev=function(G){y.runIfEnter(G,y.prev)},y.runIfEnterNext=function(G){y.runIfEnter(G,y.next)},y.runIfEnterJumpPrev=function(G){y.runIfEnter(G,y.jumpPrev)},y.runIfEnterJumpNext=function(G){y.runIfEnter(G,y.jumpNext)},y.handleGoTO=function(G){(G.keyCode===m.ENTER||G.type==="click")&&y.handleChange(y.state.currentInputValue)};var _=x.onChange!==n,I="current"in x;I&&!_&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var j=x.defaultCurrent;"current"in x&&(j=x.current);var M=x.defaultPageSize;return"pageSize"in x&&(M=x.pageSize),j=Math.min(j,T(M,void 0,x)),y.state={current:j,currentInputValue:j,pageSize:M},y}return Object(h.a)(b,[{key:"componentDidUpdate",value:function(y,_){var I=this.props.prefixCls;if(_.current!==this.state.current&&this.paginationNode){var j=this.paginationNode.querySelector(".".concat(I,"-item-").concat(_.current));j&&document.activeElement===j&&j.blur()}}},{key:"getValidValue",value:function(y){var _=y.target.value,I=T(void 0,this.state,this.props),j=this.state.currentInputValue,M;return _===""?M=_:isNaN(Number(_))?M=j:_>=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<te?re+1:te,Ye=Object.keys(this.props).reduce(function(de,ge){return(ge.substr(0,5)==="data-"||ge.substr(0,5)==="aria-"||ge==="role")&&(de[ge]=y.props[ge]),de},{});if(ee)return ce&&(typeof ce=="boolean"?he=a.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},z.jump_to_confirm):he=a.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ce),he=a.a.createElement("li",{title:F?"".concat(z.jump_to).concat(re,"/").concat(te):null,className:"".concat(I,"-simple-pager")},he)),a.a.createElement("ul",Object(k.a)({className:r()(I,"".concat(I,"-simple"),Object(u.a)({},"".concat(I,"-disabled"),G),j),style:M,ref:this.savePaginationNode},Ye),a.a.createElement("li",{title:F?z.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:r()("".concat(I,"-prev"),Object(u.a)({},"".concat(I,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Ke)),a.a.createElement("li",{title:F?"".concat(re,"/").concat(te):null,className:"".concat(I,"-simple-pager")},a.a.createElement("input",{type:"text",value:Z,disabled:G,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),a.a.createElement("span",{className:"".concat(I,"-slash")},"/"),te),a.a.createElement("li",{title:F?z.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:r()("".concat(I,"-next"),Object(u.a)({},"".concat(I,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Ge)),he);if(te<=3+Se*2){var Qe={locale:z,rootPrefixCls:I,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:F,itemRender:q};te||Ee.push(a.a.createElement(g,Object(k.a)({},Qe,{key:"noPager",page:te,className:"".concat(I,"-disabled")})));for(var rt=1;rt<=te;rt+=1){var qe=re===rt;Ee.push(a.a.createElement(g,Object(k.a)({},Qe,{key:rt,page:rt,active:qe})))}}else{var Le=W?z.prev_3:z.prev_5,Ce=W?z.next_3:z.next_5;ye&&(ae=a.a.createElement("li",{title:F?Le:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:r()("".concat(I,"-jump-prev"),Object(u.a)({},"".concat(I,"-jump-prev-custom-icon"),!!pe))},q(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(pe,"prev page"))),Y=a.a.createElement("li",{title:F?Ce:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:r()("".concat(I,"-jump-next"),Object(u.a)({},"".concat(I,"-jump-next-custom-icon"),!!le))},q(this.getJumpNextPage(),"jump-next",this.getItemIcon(le,"next page")))),Q=a.a.createElement(g,{locale:z,last:!0,rootPrefixCls:I,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:te,page:te,active:!1,showTitle:F,itemRender:q}),X=a.a.createElement(g,{locale:z,rootPrefixCls:I,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:F,itemRender:q});var Ve=Math.max(1,re-Se),tt=Math.min(re+Se,te);re-1<=Se&&(tt=1+Se*2),te-re<=Se&&(Ve=te-Se*2);for(var He=Ve;He<=tt;He+=1){var $e=re===He;Ee.push(a.a.createElement(g,{locale:z,rootPrefixCls:I,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:He,page:He,active:$e,showTitle:F,itemRender:q}))}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<k.modeInfo.length;u++){var C=k.modeInfo[u];C.mimes&&(C.mime=C.mimes[0])}k.findModeByMIME=function(R){R=R.toLowerCase();for(var h=0;h<k.modeInfo.length;h++){var s=k.modeInfo[h];if(s.mime==R)return s;if(s.mimes){for(var S=0;S<s.mimes.length;S++)if(s.mimes[S]==R)return s}}if(/\+xml$/.test(R))return k.findModeByMIME("application/xml");if(/\+json$/.test(R))return k.findModeByMIME("application/json")},k.findModeByExtension=function(R){R=R.toLowerCase();for(var h=0;h<k.modeInfo.length;h++){var s=k.modeInfo[h];if(s.ext){for(var S=0;S<s.ext.length;S++)if(s.ext[S]==R)return s}}},k.findModeByFileName=function(R){for(var h=0;h<k.modeInfo.length;h++){var s=k.modeInfo[h];if(s.file&&s.file.test(R))return s}var S=R.lastIndexOf("."),f=S>-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<k.modeInfo.length;h++){var s=k.modeInfo[h];if(s.name.toLowerCase()==R)return s;if(s.alias){for(var S=0;S<s.alias.length;S++)if(s.alias[S].toLowerCase()==R)return s}}}})},"9Bee":function(N,$,P){"use strict";var k=P("k1fw"),u=P("tJVT"),C=P("q1tI"),R=P.n(C),h=P("vg9a"),s=P("DlQD"),S=P.n(s),f=P("rUJ1");function a(F,J){var ee=F.match(/^(\s+)(?:```)/);if(ee===null)return J;var q=ee[1];return J.split(`
`).map(function(ye){var pe=ye.match(/^\s+/);if(pe===null)return ye;var le=Object(u.a)(pe,1),Oe=le[0];return Oe.length>=q.length?ye.slice(q.length):ye}).join(`
`)}var o=[],r=["<ul>"],E=new S.a.Renderer,g=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function m(){o.length=0,r=["<ul>"]}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("<li><a href='#"+ye.anchor+"'>"+ye.text+"</a>"),J++;var pe=[];return J=p(F,J,ye.level,pe),pe.length>0&&(q.push("<ul>"),pe.forEach(function(le){q.push(le)}),q.push("</ul>")),q.push("</li>"),J=p(F,J,ee,q),J}function d(){return p(o,0,0,r),r.push("</ul>"),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?"<p class='editormd-tex'>".concat(F,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(J,'">').concat(ee?F:Object(f.escape)(F,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(ee?F:Object(f.escape)(F,!0))+"</code></pre>"},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}),"<h"+J+' id="'+q+'">'+F+"</h"+J+">"},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=/<pre[^>]*>/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.*?>|<\/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("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(Qe){}var Ke=_(re),Ge=i();if(re.match(/\[TOC\]/)&&(Ke=Ke.replace("<p>[TOC]</p>",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<S;r++)R[h+r]^=o[r]}});return u.Decryptor=C,u}(),k.mode.CTR})},"9VGf":function(N,$,P){"use strict";P.d($,"a",function(){return C});var k=P("q1tI"),u=P.n(k);function C(R,h){var s=Object(k.useRef)();Object(k.useEffect)(function(){s.current=R}),Object(k.useEffect)(function(){function S(){s.current()}if(h!==null){var f=setInterval(S,h);return function(){return clearInterval(f)}}},[h])}},ALsQ:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("OLod"))})(this,function(k){return k.mode.CFB=function(){var u=k.lib.BlockCipherMode.extend();u.Encryptor=u.extend({processBlock:function(R,h){var s=this._cipher,S=s.blockSize;C.call(this,R,h,S,s),this._prevBlock=R.slice(h,h+S)}}),u.Decryptor=u.extend({processBlock:function(R,h){var s=this._cipher,S=s.blockSize,f=R.slice(h,h+S);C.call(this,R,h,S,s),this._prevBlock=f}});function C(R,h,s,S){var f,a=this._iv;a?(f=a.slice(0),this._iv=void 0):f=this._prevBlock,S.encryptBlock(f,0);for(var o=0;o<s;o++)R[h+o]^=f[o]}return u}(),k.mode.CFB})},B7Ph:function(N,$,P){"use strict";P.d($,"a",function(){return M});var k=P("5NDa"),u=P("5rEg"),C=P("+L6B"),R=P("2/Rp"),h=P("2qtc"),s=P("kLXV"),S=P("k1fw"),f=P("miYZ"),a=P("tsqr"),o=P("9og8"),r=P("tJVT"),E=P("oBTY"),g=P("DZo9"),m=P("8z0m"),w=P("WmNS"),p=P.n(w),d=P("q1tI"),n=P.n(d),l=P("Bvq2"),c=P.n(l),T=P("nj2k"),v=P.n(T),i=P("mxV5"),L=P.n(i),A=P("KhGG"),b=P("ErOA"),x=P("7Cbv"),y=P("1vsH"),_=m.a.Dragger,I=function(K){for(var H=function(le){return le&&le.substring(0,le.lastIndexOf("."))},z=Object(E.a)(K),B=0,W=[],F=0;F<z.length;F++){for(var J="",ee=0;ee<W.length;ee++)if(H(W[ee][0].name)==H(z[F].name)){B=1,J=ee;break}if(B==1)W[J].push(z[F]),B=0;else if(B==0){var q=new Array;q.push(z[F]),W.push(q)}}var ye=W.map(function(pe){if(pe[0].name.includes(".in"))return pe.length===2?pe:[pe[0],{}];if(pe[0].name.includes(".out"))return pe.length===2?pe.reverse():[{},pe[0]]});return ye},j=function(K){var H=K.onClose,z=K.onOK,B=K.visible,W=K.wrapClassName,F=K.rootIdentifier,J=Object(d.useState)([]),ee=Object(r.a)(J,2),q=ee[0],ye=ee[1],pe=Object(d.useState)({}),le=Object(r.a)(pe,2),Oe=le[0],xe=le[1],ie=Object(d.useState)(!1),se=Object(r.a)(ie,2),re=se[0],be=se[1],Z=Object(d.useRef)([]),te=Object(d.useRef)(0),Ee=function(){H()};Object(d.useEffect)(function(){ae()},[]),Object(d.useEffect)(function(){B&&(Z.current=[],te.current=0,ye([]))},[B]);var ae=function(){var Ke=Object(o.a)(p.a.mark(function Ge(){var Ye,Qe;return p.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return qe.prev=0,qe.next=3,Object(b.a)("/api/buckets/get_upload_token_for_big_files",{method:"get"});case 3:Ye=qe.sent,Qe=JSON.parse(Object(A.a)(Ye.data)),xe(Qe),qe.next=11;break;case 8:qe.prev=8,qe.t0=qe.catch(0),a.b.error(qe.t0);case 11:case"end":return qe.stop()}},Ge,null,[[0,8]])}));return function(){return Ke.apply(this,arguments)}}(),Y=function(Ge){return Ge&&Ge.substring(0,Ge.lastIndexOf("."))},X=function(Ge){var Ye,Qe,rt=Y((Ye=Ge[0])===null||Ye===void 0?void 0:Ye.name)||Y((Qe=Ge[1])===null||Qe===void 0?void 0:Qe.name),qe=q.filter(function(Le){return Y(Le.name)!==rt});Z.current=Object(E.a)(qe),ye(Object(E.a)(qe))},Q=function(Ge){var Ye=new L.a({endpoint:Oe.end_point,region:Oe.region,accessKeyId:Oe.access_key_id,accessKeySecret:Oe.access_key_secret,bucket:Oe.bucket,stsToken:Oe.security_token}),Qe=Ge.name,rt={container_type:"TestSet",file_name:Qe},qe=Object(x.a)(),Le="testsets/".concat(F,"/").concat(qe).concat(Qe.indexOf(".")>-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;g<o.length;g++){if(!o[g].empty())return k.Pass;var m=o[g].head,w=a.getTokenAt(m),p=k.innerMode(a.getMode(),w.state),d=p.state,n=p.mode.xmlCurrentTag&&p.mode.xmlCurrentTag(d),l=n&&n.name;if(!l)return k.Pass;var c=p.mode.configuration=="html",T=typeof E=="object"&&E.dontCloseTags||c&&u,v=typeof E=="object"&&E.indentTags||c&&C;w.end>m.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?`
`:"")+"</"+l+">",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?"/":"</",m=a.getOption("autoCloseTags"),w=typeof m=="object"&&m.dontIndentOnSlash,p=0;p<r.length;p++){if(!r[p].empty())return k.Pass;var d=r[p].head,n=a.getTokenAt(d),l=k.innerMode(a.getMode(),n.state),c=l.state;if(o&&(n.type=="string"||n.string.charAt(0)!="<"||n.start!=d.ch-1))return k.Pass;var T,v=l.mode.name!="xml"&&a.getMode().name=="htmlmixed";if(v&&l.mode.name=="javascript")T=g+"script";else if(v&&l.mode.name=="css")T=g+"style";else{var i=l.mode.xmlCurrentContext&&l.mode.xmlCurrentContext(c);if(!i||i.length&&f(a,i,i[i.length-1],d))return k.Pass;T=g+i[i.length-1]}a.getLine(d.line).charAt(n.end)!=">"&&(T+=">"),E[p]=T}if(a.replaceSelections(E),r=a.listSelections(),!w)for(var p=0;p<r.length;p++)(p==r.length-1||r[p].head.line<r[p+1].head.line)&&a.indentLine(r[p].head.line)}function s(a){return a.getOption("disableInput")?k.Pass:h(a,!0)}k.commands.closeTag=function(a){return h(a)};function S(a,o){if(a.indexOf)return a.indexOf(o);for(var r=0,E=a.length;r<E;++r)if(a[r]==o)return r;return-1}function f(a,o,r,E,g){if(!k.scanForClosingTag)return!1;var m=Math.min(a.lastLine()+1,E.line+500),w=k.scanForClosingTag(a,E,null,m);if(!w||w.tag!=r)return!1;for(var p=g?1:0,d=o.length-1;d>=0&&o[d]==r;d--)++p;E=w.to;for(var d=1;d<p;d++){var n=k.scanForClosingTag(a,E,null,m);if(!n||n.tag!=r)return!1;E=n.to}return!0}})},BjJ7:function(N,$,P){"use strict";P.d($,"d",function(){return u}),P.d($,"c",function(){return C}),P.d($,"e",function(){return R}),P.d($,"b",function(){return h}),P.d($,"a",function(){return S});var k=P("m3rI");function u(f){var a=!0;if(f.length>0){for(var o=0;o<f.length;o++)if(f[o].compile_success==0||!f[o].compile_success){a=!1;break}}else a=!1;return a}function C(f){for(var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=[],r=0;r<f.length;r++){var E=f[r],g=a?"".concat(a,"/").concat(E.name):"".concat(E.name);o.push({title:E.name,isLeaf:!(E.type==="tree"),key:g})}return o}function R(f,a,o){for(var r=0;r<f.length;r++){var E=f[r];if(E.key===a){E.children=o;break}E.children&&R(E.children,a,o)}return f}function h(f,a,o){var r;return function(){var E=this,g=arguments,m=function(){r=null,o||f.apply(E,g)},w=o&&!r;clearTimeout(r),r=setTimeout(m,a),w&&f.apply(E,g)}}var s=!0,S=k.a.API_SERVER},Bvq2:function(N,$,P){N.exports={wrap:"wrap___2zRY4",colorBlue:"colorBlue___XalpT",repeatedName:"repeatedName___2Tfh4",text:"text___1sYHg",noData:"noData___3pdB4",btn:"btn___3WWjB",btnS:"btnS___2M_9t",head:"head____NWmz",list:"list___2fE4M",del:"del___2BO6Y",info:"info___3GJ70"}},"C+DQ":function(N,$,P){},CrYA:function(N,$,P){var k=P("MFOe"),u=k.Global;N.exports={name:"sessionStorage",read:R,write:h,each:s,remove:S,clearAll:f};function C(){return u.sessionStorage}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()}},DlQD:function(N,$,P){(function(k,u){N.exports=u()})(this,function(){"use strict";function k(Me,De){for(var Te=0;Te<De.length;Te++){var de=De[Te];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(Me,de.key,de)}}function u(Me,De,Te){return De&&k(Me.prototype,De),Te&&k(Me,Te),Me}function C(Me,De){if(!Me)return;if(typeof Me=="string")return R(Me,De);var Te=Object.prototype.toString.call(Me).slice(8,-1);if(Te==="Object"&&Me.constructor&&(Te=Me.constructor.name),Te==="Map"||Te==="Set")return Array.from(Me);if(Te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Te))return R(Me,De)}function R(Me,De){(De==null||De>Me.length)&&(De=Me.length);for(var Te=0,de=new Array(De);Te<De;Te++)de[Te]=Me[Te];return de}function h(Me,De){var Te;if(typeof Symbol=="undefined"||Me[Symbol.iterator]==null){if(Array.isArray(Me)||(Te=C(Me))||De&&Me&&typeof Me.length=="number"){Te&&(Me=Te);var de=0;return function(){return de>=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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},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<arguments.length;De++){Te=arguments[De];for(de in Te)Object.prototype.hasOwnProperty.call(Te,de)&&(Me[de]=Te[de])}return Me}function M(Me,De){var Te=Me.replace(/\|/g,function(we,_e,Ue){for(var Xe=!1,at=_e;--at>=0&&Ue[at]==="\\";)Xe=!Xe;return Xe?"|":" |"}),de=Te.split(/ \|/),ge=0;if(de.length>De)de.splice(De);else for(;de.length<De;)de.push("");for(;ge<de.length;ge++)de[ge]=de[ge].trim().replace(/\\\|/g,"|");return de}function G(Me,De,Te){var de=Me.length;if(de===0)return"";for(var ge=0;ge<de;){var we=Me.charAt(de-ge-1);if(we===De&&!Te)ge++;else if(we!==De&&Te)ge++;else break}return Me.substr(0,de-ge)}function K(Me,De){if(Me.indexOf(De[1])===-1)return-1;for(var Te=Me.length,de=0,ge=0;ge<Te;ge++)if(Me[ge]==="\\")ge++;else if(Me[ge]===De[0])de++;else if(Me[ge]===De[1]&&(de--,de<0))return ge;return-1}function H(Me){Me&&Me.sanitize&&!Me.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var z={escape:d,unescape:l,edit:T,cleanUrl:L,resolveUrl:_,noopTest:I,merge:j,splitCells:M,rtrim:G,findClosingBracket:K,checkSanitizeDeprecation:H},B=S.defaults,W=z.rtrim,F=z.splitCells,J=z.escape,ee=z.findClosingBracket;function q(Me,De,Te){var de=De.href,ge=De.title?J(De.title):null,we=Me[1].replace(/\\([\[\]])/g,"$1");return Me[0].charAt(0)!=="!"?{type:"link",raw:Te,href:de,title:ge,text:we}:{type:"image",raw:Te,href:de,title:ge,text:J(we)}}function ye(Me,De){var Te=Me.match(/^(\s+)(?:```)/);if(Te===null)return De;var de=Te[1];return De.split(`
`).map(function(ge){var we=ge.match(/^\s+/);if(we===null)return ge;var _e=we[0];return _e.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;Pt<mr;Pt++)ct=ut[Pt],we=ct,_t=ct.length,ct=ct.replace(/^ *([*+-]|\d+[.)]) */,""),~ct.indexOf(`
`)&&(_t-=ct.length,ct=this.options.pedantic?ct.replace(/^ {1,4}/gm,""):ct.replace(new RegExp("^ {1,"+_t+"}","gm"),"")),Pt!==mr-1&&(At=this.rules.block.bullet.exec(ut[Pt+1])[0],(Ue?At.length===1||!Xe&&At[At.length-1]===")":At.length>1||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&&/^<a /i.test(_e[0])?ge=!0:ge&&/^<\/a>/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]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable: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=/<!--(?!-?>)[\s\S]*?-->/,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","</?(?:tag)(?: +|\\n|/?>)|<(?: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","</?(?:tag)(?: +|\\n|/?>)|<(?: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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",ie._tag).getRegex(),ie.pedantic=xe({},ie.normal,{html:Oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\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:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:le,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};se._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",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]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),se.gfm.url=Oe(se.gfm.url,"i").replace("email",se.gfm._extended_email).getRegex(),se.breaks=xe({},se.gfm,{br:Oe(se.br).replace("{2,}","*").getRegex(),text:Oe(se.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var re={block:ie,inline:se},be=S.defaults,Z=re.block,te=re.inline;function Ee(Me){return Me.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function ae(Me){var De="",Te,de,ge=Me.length;for(Te=0;Te<ge;Te++)de=Me.charCodeAt(Te),Math.random()>.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;Ue<Xe;Ue++)_e.items[Ue].tokens=this.blockTokens(_e.items[Ue].text,[],!1);ge.push(_e);continue}if(_e=this.tokenizer.html(de)){de=de.substring(_e.raw.length),ge.push(_e);continue}if(we&&(_e=this.tokenizer.def(de))){de=de.substring(_e.raw.length),this.tokens.links[_e.tag]||(this.tokens.links[_e.tag]={href:_e.href,title:_e.title});continue}if(_e=this.tokenizer.table(de)){de=de.substring(_e.raw.length),ge.push(_e);continue}if(_e=this.tokenizer.lheading(de)){de=de.substring(_e.raw.length),ge.push(_e);continue}if(we&&(_e=this.tokenizer.paragraph(de))){de=de.substring(_e.raw.length),ge.push(_e);continue}if(_e=this.tokenizer.text(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(de){var ut="Infinite loop on byte: "+de.charCodeAt(0);if(this.options.silent){console.error(ut);break}else throw new Error(ut)}}return ge},De.inline=function(de){var ge,we,_e,Ue,Xe,at,ut=de.length;for(ge=0;ge<ut;ge++){at=de[ge];switch(at.type){case"paragraph":case"text":case"heading":{at.tokens=[],this.inlineTokens(at.text,at.tokens);break}case"table":{for(at.tokens={header:[],cells:[]},Ue=at.header.length,we=0;we<Ue;we++)at.tokens.header[we]=[],this.inlineTokens(at.header[we],at.tokens.header[we]);for(Ue=at.cells.length,we=0;we<Ue;we++)for(Xe=at.cells[we],at.tokens.cells[we]=[],_e=0;_e<Xe.length;_e++)at.tokens.cells[we][_e]=[],this.inlineTokens(Xe[_e],at.tokens.cells[we][_e]);break}case"blockquote":{this.inline(at.tokens);break}case"list":{for(Ue=at.items.length,we=0;we<Ue;we++)this.inline(at.items[we].tokens);break}}}return de},De.inlineTokens=function(de,ge,we,_e,Ue){ge===void 0&&(ge=[]),we===void 0&&(we=!1),_e===void 0&&(_e=!1),Ue===void 0&&(Ue="");var Xe,at=de,ut;if(this.tokens.links){var mt=Object.keys(this.tokens.links);if(mt.length>0)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?'<pre><code class="'+this.options.langPrefix+he(_e,!0)+'">'+(we?de:he(de,!0))+`</code></pre>
`:"<pre><code>"+(we?de:he(de,!0))+`</code></pre>
`},De.blockquote=function(de){return`<blockquote>
`+de+`</blockquote>
`},De.html=function(de){return de},De.heading=function(de,ge,we,_e){return this.options.headerIds?"<h"+ge+' id="'+this.options.headerPrefix+_e.slug(we)+'">'+de+"</h"+ge+`>
`:"<h"+ge+">"+de+"</h"+ge+`>
`},De.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},De.list=function(de,ge,we){var _e=ge?"ol":"ul",Ue=ge&&we!==1?' start="'+we+'"':"";return"<"+_e+Ue+`>
`+de+"</"+_e+`>
`},De.listitem=function(de){return"<li>"+de+`</li>
`},De.checkbox=function(de){return"<input "+(de?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},De.paragraph=function(de){return"<p>"+de+`</p>
`},De.table=function(de,ge){return ge&&(ge="<tbody>"+ge+"</tbody>"),`<table>
<thead>
`+de+`</thead>
`+ge+`</table>
`},De.tablerow=function(de){return`<tr>
`+de+`</tr>
`},De.tablecell=function(de,ge){var we=ge.header?"th":"td",_e=ge.align?"<"+we+' align="'+ge.align+'">':"<"+we+">";return _e+de+"</"+we+`>
`},De.strong=function(de){return"<strong>"+de+"</strong>"},De.em=function(de){return"<em>"+de+"</em>"},De.codespan=function(de){return"<code>"+de+"</code>"},De.br=function(){return this.options.xhtml?"<br/>":"<br>"},De.del=function(de){return"<del>"+de+"</del>"},De.link=function(de,ge,we){if(de=Q(this.options.sanitize,this.options.baseUrl,de),de===null)return we;var _e='<a href="'+he(de)+'"';return ge&&(_e+=' title="'+ge+'"'),_e+=">"+we+"</a>",_e},De.image=function(de,ge,we){if(de=Q(this.options.sanitize,this.options.baseUrl,de),de===null)return we;var _e='<img src="'+de+'" alt="'+we+'"';return ge&&(_e+=' title="'+ge+'"'),_e+=this.options.xhtml?"/>":">",_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;Ue<at;Ue++)ct+=this.renderer.tablecell(this.parseInline(Et.tokens.header[Ue]),{header:!0,align:Et.align[Ue]});for(_t+=this.renderer.tablerow(ct),At="",at=Et.cells.length,Ue=0;Ue<at;Ue++){for(mt=Et.tokens.cells[Ue],ct="",ut=mt.length,Xe=0;Xe<ut;Xe++)ct+=this.renderer.tablecell(this.parseInline(mt[Xe]),{header:!1,align:Et.align[Xe]});At+=this.renderer.tablerow(ct)}we+=this.renderer.table(_t,At);continue}case"blockquote":{At=this.parse(Et.tokens),we+=this.renderer.blockquote(At);continue}case"list":{for(Qt=Et.ordered,qt=Et.start,Jt=Et.loose,at=Et.items.length,At="",Ue=0;Ue<at;Ue++)Pt=Et.items[Ue],cr=Pt.checked,ir=Pt.task,mr="",Pt.task&&(Ht=this.renderer.checkbox(cr),Jt?Pt.tokens.length>0&&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;_e<Xe;_e++){Ue=de[_e];switch(Ue.type){case"escape":{we+=ge.text(Ue.text);break}case"html":{we+=ge.html(Ue.text);break}case"link":{we+=ge.link(Ue.href,Ue.title,this.parseInline(Ue.tokens,ge));break}case"image":{we+=ge.image(Ue.href,Ue.title,Ue.text);break}case"strong":{we+=ge.strong(this.parseInline(Ue.tokens,ge));break}case"em":{we+=ge.em(this.parseInline(Ue.tokens,ge));break}case"codespan":{we+=ge.codespan(Ue.text);break}case"br":{we+=ge.br();break}case"del":{we+=ge.del(this.parseInline(Ue.tokens,ge));break}case"text":{we+=ge.text(Ue.text);break}default:{var at='Token with "'+Ue.type+'" type was not found.';if(this.options.silent){console.error(at);return}else throw new Error(at)}}}return we},Me}(),rt=z.merge,qe=z.checkSanitizeDeprecation,Le=z.escape,Ce=S.getDefaults,Ve=S.changeDefaults,tt=S.defaults;function He(Me,De,Te){if(typeof Me=="undefined"||Me===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Me!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Me)+", string expected");if(typeof De=="function"&&(Te=De,De=null),De=rt({},He.defaults,De||{}),qe(De),Te){var de=De.highlight,ge;try{ge=Y.lex(Me,De)}catch(Xe){return Te(Xe)}var we=function(at){var ut;if(!at)try{ut=Qe.parse(ge,De)}catch(mt){at=mt}return De.highlight=de,at?Te(at):Te(null,ut)};if(!de||de.length<3)return we();if(delete De.highlight,!ge.length)return we();var _e=0;He.walkTokens(ge,function(Xe){Xe.type==="code"&&(_e++,setTimeout(function(){de(Xe.text,Xe.lang,function(at,ut){if(at)return we(at);ut!=null&&ut!==Xe.text&&(Xe.text=ut,Xe.escaped=!0),_e--,_e===0&&we()})},0))}),_e===0&&we();return}try{var Ue=Y.lex(Me,De);return De.walkTokens&&He.walkTokens(Ue,De.walkTokens),Qe.parse(Ue,De)}catch(Xe){if(Xe.message+=`
Please report this to https://github.com/markedjs/marked.`,De.silent)return"<p>An error occurred:</p><pre>"+Le(Xe.message+"",!0)+"</pre>";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<at;mt++)ut[mt]=arguments[mt];var ct=Me.renderer[Ue].apply(de,ut);return ct===!1&&(ct=Xe.apply(de,ut)),ct}};for(var we in Me.renderer)ge(we);De.renderer=de}(),Me.tokenizer&&function(){var de=He.defaults.tokenizer||new pe,ge=function(Ue){var Xe=de[Ue];de[Ue]=function(){for(var at=arguments.length,ut=new Array(at),mt=0;mt<at;mt++)ut[mt]=arguments[mt];var ct=Me.tokenizer[Ue].apply(de,ut);return ct===!1&&(ct=Xe.apply(de,ut)),ct}};for(var we in Me.tokenizer)ge(we);De.tokenizer=de}(),Me.walkTokens){var Te=He.defaults.walkTokens;De.walkTokens=function(de){Me.walkTokens(de),Te&&Te(de)}}He.setOptions(De)},He.walkTokens=function(Me,De){for(var Te=h(Me),de;!(de=Te()).done;){var ge=de.value;De(ge);switch(ge.type){case"table":{for(var we=h(ge.tokens.header),_e;!(_e=we()).done;){var Ue=_e.value;He.walkTokens(Ue,De)}for(var Xe=h(ge.tokens.cells),at;!(at=Xe()).done;)for(var ut=at.value,mt=h(ut),ct;!(ct=mt()).done;){var _t=ct.value;He.walkTokens(_t,De)}break}case"list":{He.walkTokens(ge.items,De);break}default:ge.tokens&&He.walkTokens(ge.tokens,De)}}},He.Parser=Qe,He.parser=Qe.parse,He.Renderer=ce,He.TextRenderer=Se,He.Lexer=Y,He.lexer=Y.lex,He.Tokenizer=pe,He.Slugger=Ke,He.parse=He;var $e=He;return $e})},"DlR+":function(N,$,P){var k=P("MFOe"),u=k.Global,C=k.trim;N.exports={name:"cookieStorage",read:h,write:S,each:s,remove:f,clearAll:a};var R=u.document;function h(r){if(!r||!o(r))return null;var E="(?:^|.*;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(R.cookie.replace(new RegExp(E),"$1"))}function s(r){for(var E=R.cookie.split(/; ?/g),g=E.length-1;g>=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<S[0]>>>0?1:0)|0,E[2]=E[2]+886263092+(E[1]>>>0<S[1]>>>0?1:0)|0,E[3]=E[3]+1295307597+(E[2]>>>0<S[2]>>>0?1:0)|0,E[4]=E[4]+3545052371+(E[3]>>>0<S[3]>>>0?1:0)|0,E[5]=E[5]+886263092+(E[4]>>>0<S[4]>>>0?1:0)|0,E[6]=E[6]+1295307597+(E[5]>>>0<S[5]>>>0?1:0)|0,E[7]=E[7]+3545052371+(E[6]>>>0<S[6]>>>0?1:0)|0,this._b=E[7]>>>0<S[7]>>>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<w.length;p++){var d=w.charAt(p),n="'"+d+"'";h[n]||(h[n]=S(d))}}s(u.pairs+"`");function S(w){return function(p){return E(p,w)}}function f(w){var p=w.state.closeBrackets;if(!p||p.override)return p;var d=w.getModeAt(w.getCursor());return d.closeBrackets||p}function a(w){var p=f(w);if(!p||w.getOption("disableInput"))return k.Pass;for(var d=R(p,"pairs"),n=w.listSelections(),l=0;l<n.length;l++){if(!n[l].empty())return k.Pass;var c=g(w,n[l].head);if(!c||d.indexOf(c)%2!=0)return k.Pass}for(var l=n.length-1;l>=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;l<n.length;l++){if(!n[l].empty())return k.Pass;var c=g(w,n[l].head);if(!c||d.indexOf(c)%2!=0)return k.Pass}w.operation(function(){var T=w.lineSeparator()||`
`;w.replaceSelection(T+T,null),w.execCommand("goCharLeft"),n=w.listSelections();for(var v=0;v<n.length;v++){var i=n[v].head.line;w.indentLine(i,null,!0),w.indentLine(i+1,null,!0)}})}function r(w){var p=k.cmpPos(w.anchor,w.head)>0;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<i.length;b++){var x=i[b],y=x.head,_,I=w.getRange(y,C(y.line,y.ch+1));if(L&&!x.empty())_="surround";else if((v||!L)&&I==p)v&&m(w,y)?_="both":T.indexOf(p)>=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<H.length;K++)H[K]=M+H[K]+G;w.replaceSelections(H,"around"),H=w.listSelections().slice();for(var K=0;K<H.length;K++)H[K]=r(H[K]);w.setSelections(H)}else A=="both"?(w.replaceSelection(M+G,null),w.triggerElectric(M+G),w.execCommand("goCharLeft")):A=="addFour"&&(w.replaceSelection(M+M+M+M,"before"),w.execCommand("goCharRight"))})}function g(w,p){var d=w.getRange(C(p.line,p.ch-1),C(p.line,p.ch+1));return d.length==2?d:null}function m(w,p){var d=w.getTokenAt(C(p.line,p.ch+1));return/\bstring/.test(d.type)&&d.start==p.ch&&(p.ch==0||!/\bstring/.test(w.getTokenTypeAt(p)))}})},ELcG:function(N,$,P){(function(k,u){N.exports=$=u(P("Ib8C"))})(this,function(k){/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/return function(u){var C=k,R=C.lib,h=R.WordArray,s=R.Hasher,S=C.algo,f=h.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),a=h.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),o=h.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),r=h.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),E=h.create([0,1518500249,1859775393,2400959708,2840853838]),g=h.create([1352829926,1548603684,1836072691,2053994217,0]),m=S.RIPEMD160=s.extend({_doReset:function(){this._hash=h.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(T,v){for(var i=0;i<16;i++){var L=v+i,A=T[L];T[L]=(A<<8|A>>>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<<v|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<o;g+=3)for(var m=a[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<o;n++)E.push(r.charAt(d>>>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<o.length;E++)r[o.charCodeAt(E)]=E}var g=o.charAt(64);if(g){var m=f.indexOf(g);m!==-1&&(a=m)}return S(f,a,r)},_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.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<f;o++)a[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<arguments.length;B++){var W=arguments[B];for(var F in W)Object.prototype.hasOwnProperty.call(W,F)&&(z[F]=W[F])}return z},d=function(){function z(B,W){var F=[],J=!0,ee=!1,q=void 0;try{for(var ye=B[Symbol.iterator](),pe;!(J=(pe=ye.next()).done)&&!(F.push(pe.value),W&&F.length===W);J=!0);}catch(le){ee=!0,q=le}finally{try{!J&&ye.return&&ye.return()}finally{if(ee)throw q}}return F}return function(B,W){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return z(B,W);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=function(){function z(B,W){for(var F=0;F<W.length;F++){var J=W[F];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(B,J.key,J)}}return function(B,W,F){return W&&z(B.prototype,W),F&&z(B,F),B}}();function l(z,B,W){return B in z?Object.defineProperty(z,B,{value:W,enumerable:!0,configurable:!0,writable:!0}):z[B]=W,z}function c(z,B){var W={};for(var F in z){if(B.indexOf(F)>=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<q;pe++)ye[pe]=arguments[pe];return ee=(F=(J=v(this,(W=B.__proto__||Object.getPrototypeOf(B)).call.apply(W,[this].concat(ye))),J),J.state={uid:o()},J.reqs={},J.onChange=function(le){var Oe=le.target.files;J.uploadFiles(Oe),J.reset()},J.onClick=function(le){var Oe=J.fileInput;if(!Oe)return;var xe=J.props,ie=xe.children,se=xe.onClick;ie&&ie.type==="button"&&(Oe.parentNode.focus(),Oe.parentNode.querySelector("button").blur()),Oe.click(),se&&se(le)},J.onKeyDown=function(le){le.key==="Enter"&&J.onClick()},J.onFileDrop=function(le){var Oe=J.props.multiple;if(le.preventDefault(),le.type==="dragover")return;if(J.props.directory)w(Array.prototype.slice.call(le.dataTransfer.items),J.uploadFiles,function(ie){return E(ie,J.props.accept)});else{var xe=Array.prototype.slice.call(le.dataTransfer.files).filter(function(ie){return E(ie,J.props.accept)});Oe===!1&&(xe=xe.slice(0,1)),J.uploadFiles(xe)}},J.uploadFiles=function(le){var Oe=Array.prototype.slice.call(le);Oe.map(function(xe){return xe.uid=o(),xe}).forEach(function(xe){J.upload(xe,Oe)})},J.saveFileInput=function(le){J.fileInput=le},F),v(J,ee)}return n(B,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(F,J){var ee=this,q=this.props;if(!q.beforeUpload)return setTimeout(function(){return ee.post(F)},0);var ye=q.beforeUpload(F,J);ye&&ye.then?ye.then(function(pe){var le=Object.prototype.toString.call(pe);return le==="[object File]"||le==="[object Blob]"?ee.post(pe):ee.post(F)}).catch(function(pe){console.log(pe)}):ye!==!1&&setTimeout(function(){return ee.post(F)},0);return}},{key:"post",value:function(F){var J=this;if(!this._isMounted)return;var ee=this.props,q=ee.onStart,ye=ee.onProgress,pe=ee.transformFile,le=pe===void 0?function(Oe){return Oe}:pe;new Promise(function(Oe){var xe=ee.action;return typeof xe=="function"&&(xe=xe(F)),Oe(xe)}).then(function(Oe){var xe=F.uid,ie=ee.customRequest||S,se=Promise.resolve(le(F)).then(function(re){var be=ee.data;return typeof be=="function"&&(be=be(re)),Promise.all([re,be])}).catch(function(re){console.error(re)});se.then(function(re){var be=d(re,2),Z=be[0],te=be[1],Ee={action:Oe,filename:ee.name,data:te,file:Z,headers:ee.headers,withCredentials:ee.withCredentials,method:ee.method||"post",onProgress:ye?function(ae){ye(ae,F)}:null,onSuccess:function(Y,X){delete J.reqs[xe],ee.onSuccess(Y,F,X)},onError:function(Y,X){delete J.reqs[xe],ee.onError(Y,X,F)}};q(F),J.reqs[xe]=ie(Ee)})})}},{key:"reset",value:function(){this.setState({uid:o()})}},{key:"abort",value:function(F){var J=this.reqs;if(F){var ee=F;F&&F.uid&&(ee=F.uid),J[ee]&&J[ee].abort&&J[ee].abort(),delete J[ee]}else Object.keys(J).forEach(function(q){J[q]&&J[q].abort&&J[q].abort(),delete J[q]})}},{key:"render",value:function(){var F,J=this.props,ee=J.component,q=J.prefixCls,ye=J.className,pe=J.disabled,le=J.id,Oe=J.style,xe=J.multiple,ie=J.accept,se=J.children,re=J.directory,be=J.openFileDialogOnClick,Z=J.onMouseEnter,te=J.onMouseLeave,Ee=c(J,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),ae=R()((F={},l(F,q,!0),l(F,q+"-disabled",pe),l(F,ye,ye),F)),Y=pe?{}:{onClick:be?this.onClick:function(){},onKeyDown:be?this.onKeyDown:function(){},onMouseEnter:Z,onMouseLeave:te,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return u.a.createElement(ee,p({},Y,{className:ae,role:"button",style:Oe}),u.a.createElement("input",p({},L(Ee),{id:le,type:"file",ref:this.saveFileInput,onClick:function(Q){return Q.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:ie,directory:re?"directory":null,webkitdirectory:re?"webkitdirectory":null,multiple:xe,onChange:this.onChange})),se)}}]),B}(k.Component),b=A,x=Object.assign||function(z){for(var B=1;B<arguments.length;B++){var W=arguments[B];for(var F in W)Object.prototype.hasOwnProperty.call(W,F)&&(z[F]=W[F])}return z},y=function(){function z(B,W){for(var F=0;F<W.length;F++){var J=W[F];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(B,J.key,J)}}return function(B,W,F){return W&&z(B.prototype,W),F&&z(B,F),B}}();function _(z,B){if(!(z instanceof B))throw new TypeError("Cannot call a class as a function")}function I(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 j(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)}function M(){}var G=function(z){j(B,z);function B(){var W,F,J,ee;_(this,B);for(var q=arguments.length,ye=Array(q),pe=0;pe<q;pe++)ye[pe]=arguments[pe];return ee=(F=(J=I(this,(W=B.__proto__||Object.getPrototypeOf(B)).call.apply(W,[this].concat(ye))),J),J.saveUploader=function(le){J.uploader=le},F),I(J,ee)}return y(B,[{key:"abort",value:function(F){this.uploader.abort(F)}},{key:"render",value:function(){return u.a.createElement(b,x({},this.props,{ref:this.saveUploader}))}}]),B}(k.Component);G.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:M,onError:M,onSuccess:M,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var K=G,H=$.a=K},HmJG:function(N,$,P){},IBYe:function(N,$,P){"use strict";function k(u){return null}$.a=k},Ib8C:function(N,$,P){(function(k){(function(u,C){N.exports=$=C()})(this,function(){var u=u||function(C,R){var h;if(typeof window!="undefined"&&window.crypto&&(h=window.crypto),typeof self!="undefined"&&self.crypto&&(h=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(h=globalThis.crypto),!h&&typeof window!="undefined"&&window.msCrypto&&(h=window.msCrypto),!h&&typeof k!="undefined"&&k.crypto&&(h=k.crypto),!h&&!0)try{h=P(4)}catch(l){}var s=function(){if(h){if(typeof h.getRandomValues=="function")try{return h.getRandomValues(new Uint32Array(1))[0]}catch(l){}if(typeof h.randomBytes=="function")try{return h.randomBytes(4).readInt32LE()}catch(l){}}throw new Error("Native crypto module could not be used to get secure random number.")},S=Object.create||function(){function l(){}return function(c){var T;return l.prototype=c,T=new l,l.prototype=null,T}}(),f={},a=f.lib={},o=a.Base=function(){return{extend:function(l){var c=S(this);return l&&c.mixIn(l),(!c.hasOwnProperty("init")||this.init===c.init)&&(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var l=this.extend();return l.init.apply(l,arguments),l},init:function(){},mixIn:function(l){for(var c in l)l.hasOwnProperty(c)&&(this[c]=l[c]);l.hasOwnProperty("toString")&&(this.toString=l.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),r=a.WordArray=o.extend({init:function(l,c){l=this.words=l||[],c!=R?this.sigBytes=c:this.sigBytes=l.length*4},toString:function(l){return(l||g).stringify(this)},concat:function(l){var c=this.words,T=l.words,v=this.sigBytes,i=l.sigBytes;if(this.clamp(),v%4)for(var L=0;L<i;L++){var A=T[L>>>2]>>>24-L%4*8&255;c[v+L>>>2]|=A<<24-(v+L)%4*8}else for(var b=0;b<i;b+=4)c[v+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<l;T+=4)c.push(s());return new r.init(c,l)}}),E=f.enc={},g=E.Hex={stringify:function(l){for(var c=l.words,T=l.sigBytes,v=[],i=0;i<T;i++){var L=c[i>>>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<c;v+=2)T[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<T;i++){var L=c[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<c;v++)T[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;_<x;_+=L)this._doProcessBlock(v,_);c=v.splice(0,x),T.sigBytes-=y}return new r.init(c,y)},clone:function(){var l=o.clone.call(this);return l._data=this._data.clone(),l},_minBufferSize:0}),d=a.Hasher=p.extend({cfg:o.extend(),init:function(l){this.cfg=this.cfg.extend(l),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(l){return this._append(l),this._process(),this},finalize:function(l){l&&this._append(l);var c=this._doFinalize();return c},blockSize:512/32,_createHelper:function(l){return function(c,T){return new l.init(T).finalize(c)}},_createHmacHelper:function(l){return function(c,T){return new n.HMAC.init(l,T).finalize(c)}}}),n=f.algo={};return f}(Math);return u})}).call(this,P("IyRk"))},J66h:function(N,$,P){(function(k){var u,C;(function(R,h){N.exports=h(R)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof k!="undefined"?k:this,function(R){"use strict";R=R||{};var h=R.Base64,s="2.6.4",S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=function(M){for(var G={},K=0,H=M.length;K<H;K++)G[M.charAt(K)]=K;return G}(S),a=String.fromCharCode,o=function(M){if(M.length<2){var G=M.charCodeAt(0);return G<128?M:G<2048?a(192|G>>>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<z;H+=3){var B=M[H],W=M[H+1],F=M[H+2],J=B<<16|W<<8|F;K+=S.charAt(J>>>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.length<p;){r&&g.update(r),r=g.update(a).finalize(o),g.reset();for(var n=1;n<d;n++)r=g.finalize(r),g.reset();m.concat(r)}return m.sigBytes=p*4,m}});u.EvpKDF=function(a,o,r){return f.create(r).compute(a,o)}}(),k.EvpKDF})},KhGG:function(N,$,P){"use strict";P.d($,"a",function(){return i}),P.d($,"c",function(){return A});var k=P("0Owb"),u=P("miYZ"),C=P("tsqr"),R=P("oBTY"),h=P("tJVT"),s=P("PpiC"),S=P("k1fw"),f=P("9og8"),a=P("DZo9"),o=P("8z0m"),r=P("WmNS"),E=P.n(r),g=P("q1tI"),m=P.n(g),w=P("ErOA"),p=P("NFKh"),d=P.n(p),n=P("7Cbv"),l=P("9kvl"),c=P("mxV5"),T=P.n(c),v=o.a.Dragger,i=function(y){var _="bf3c199c2470cb477d907b1e0917c17b",I="5183666c72eec9e4",j=d.a.enc.Utf8.parse(_),M=d.a.enc.Utf8.parse(I),G=d.a.AES.decrypt(y,j,{iv:M,mode:d.a.mode.CBC});return G.toString(d.a.enc.Utf8)},L,A=function(){var x=Object(f.a)(E.a.mark(function y(_,I,j){var M,G,K,H,z,B,W,F,J;return E.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return I.file_name=_.name,q.next=3,Object(w.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return W=q.sent,console.log("decrypt(res.data):",i(W.data)),W.data=JSON.parse(i(W.data)),F=Object(n.a)(),J=new T.a({endpoint:W==null||((M=W.data)===null||M===void 0)?void 0:M.end_point,region:W==null||((G=W.data)===null||G===void 0)?void 0:G.region,accessKeyId:W==null||((K=W.data)===null||K===void 0)?void 0:K.access_key_id,accessKeySecret:W==null||((H=W.data)===null||H===void 0)?void 0:H.access_key_secret,bucket:W==null||((z=W.data)===null||z===void 0)?void 0:z.bucket,stsToken:W==null||((B=W.data)===null||B===void 0)?void 0:B.security_token}),q.abrupt("return",new Promise(function(ye,pe){var le;J.multipartUpload("".concat(F),new Blob([_],{type:_.type}),Object(S.a)(Object(S.a)({timeout:200*1e3,partSize:102400},j),{},{callback:{url:W==null||((le=W.data)===null||le===void 0)?void 0:le.callback_url,host:W==null?void 0:W.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(w.e)(I)}})).then(function(Oe){var xe;_.response=(xe=Oe.data)===null||xe===void 0?void 0:xe.data,ye(Oe==null?void 0:Oe.data)}).catch(function(Oe){pe(Oe),console.log("err:",Oe)})}));case 9:case"end":return q.stop()}},y)}));return function(_,I,j){return x.apply(this,arguments)}}(),b=function(y){var _=y.user,I=y.cancelUpload,j=Object(s.a)(y,["user","cancelUpload"]),M=Object(g.useState)([]),G=Object(h.a)(M,2),K=G[0],H=G[1],z=Object(g.useState)(),B=Object(h.a)(z,2),W=B[0],F=B[1],J={onRemove:function(ye){H(Object(R.a)(K.filter(function(pe){return pe.name!==ye.name}))),j.onChange(K.filter(function(pe){return pe.name!==ye.name}))},disabled:j.disabled,multiple:!0,fileList:K==null?void 0:K.map(function(q){return q.file}),customRequest:function(){},beforeUpload:function(){var q=Object(f.a)(E.a.mark(function pe(le){var Oe;return E.a.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:if(Oe=j.maxSize||1024*1024*1024*1,!K.filter(function(se){return se.name===le.name}).length){ie.next=4;break}return C.b.info("".concat(le.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),ie.abrupt("return");case 4:if(!((le==null?void 0:le.size)>Oe)){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;de<Te;de+=1){var ge=(Me+de*De+Te)%Te,we=Se[ge],_e=we.group,Ue=we.data;if(!_e&&!Ue.disabled)return ge}return-1},rt=h.useState(function(){return Qe(0)}),qe=Object(f.a)(rt,2),Le=qe[0],Ce=qe[1],Ve=function(Me){Ce(Me);var De=Se[Me];if(!De){X(null,-1);return}X(De.data.value,Me)};h.useEffect(function(){Ve(ie!==!1?Qe(0):-1)},[Se.length,Oe]),h.useEffect(function(){var $e=setTimeout(function(){if(!xe&&Z&&le.size===1){var Me=Array.from(le)[0],De=Se.findIndex(function(Te){var de=Te.data;return de.value===Me});Ve(De),Ye(De)}});return function(){return clearTimeout($e)}},[Z]);var tt=function(Me){Me!==void 0&&ae(Me,{selected:!le.has(Me)}),xe||Y(!1)};if(h.useImperativeHandle(J,function(){return{onKeyDown:function(Me){var De=Me.which;switch(De){case a.a.UP:case a.a.DOWN:{var Te=0;if(De===a.a.UP?Te=-1:De===a.a.DOWN&&(Te=1),Te!==0){var de=Qe(Le+Te,Te);Ye(de),Ve(de)}break}case a.a.ENTER:{var ge=Se[Le];ge&&!ge.data.disabled?tt(ge.data.value):tt(void 0),Z&&Me.preventDefault();break}case a.a.ESC:Y(!1)}},onKeyUp:function(){},scrollTo:function(Me){Ye(Me)}}}),Se.length===0)return h.createElement("div",{role:"listbox",id:"".concat(q,"_list"),className:"".concat(ce,"-empty"),onMouseDown:Ge},be);function He($e){var Me=Se[$e];if(!Me)return null;var De=Me.data||{},Te=De.value,de=De.label,ge=De.children,we=Object(o.a)(De,!0),_e=pe?ge:de;return Me?h.createElement("div",Object.assign({"aria-label":typeof _e=="string"?_e:null},we,{key:$e,role:"option",id:"".concat(q,"_list_").concat($e),"aria-selected":le.has(Te)}),Te):null}return h.createElement(h.Fragment,null,h.createElement("div",{role:"listbox",id:"".concat(q,"_list"),style:{height:0,width:0,overflow:"hidden"}},He(Le-1),He(Le),He(Le+1)),h.createElement(m.a,{itemKey:"key",ref:Ke,data:Se,height:se,itemHeight:re,fullHeight:!1,onMouseDown:Ge,onScroll:Q,virtual:Ee,onMouseEnter:he},function($e,Me){var De,Te=$e.group,de=$e.groupOption,ge=$e.data,we=ge.label,_e=ge.key;if(Te)return h.createElement("div",{className:g()(ce,"".concat(ce,"-group"))},we!==void 0?we:_e);var Ue=ge.disabled,Xe=ge.value,at=ge.title,ut=ge.children,mt=ge.style,ct=ge.className,_t=Object(S.a)(ge,["disabled","value","title","children","style","className"]),At=le.has(Xe),Et="".concat(ce,"-option"),Qt=g()(ce,Et,ct,(De={},Object(s.a)(De,"".concat(Et,"-grouped"),de),Object(s.a)(De,"".concat(Et,"-active"),Le===Me&&!Ue),Object(s.a)(De,"".concat(Et,"-disabled"),Ue),Object(s.a)(De,"".concat(Et,"-selected"),At),De)),qt=pe?ut:we,Jt=!te||typeof te=="function"||At;return h.createElement("div",Object.assign({},_t,{"aria-selected":At,className:Qt,title:at,onMouseMove:function(){if(Le===Me||Ue)return;Ve(Me)},onClick:function(){Ue||tt(Xe)},style:mt}),h.createElement("div",{className:"".concat(Et,"-content")},qt||Xe),h.isValidElement(te)||At,Jt&&h.createElement(w.a,{className:"".concat(ce,"-option-state"),customizeIcon:te,customizeIconProps:{isSelected:At}},At?"\u2713":null))}))},d=h.forwardRef(p);d.displayName="OptionList";var n=d,l=function(){return null};l.isSelectOption=!0;var c=l,T=function(){return null};T.isSelectOptGroup=!0;var v=T,i=P("VTBJ"),L=P("Zm9Q");function A(W){var F=W.key,J=W.props,ee=J.children,q=J.value,ye=Object(S.a)(J,["children","value"]);return Object(i.a)({key:F,value:q!==void 0?q:F,children:ee},ye)}function b(W){var F=arguments.length>1&&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<arguments.length;v++)r(Object(arguments[v]),function(i,L){n[L]=i});return n}}function S(){if(Object.create)return function(l,c,T,v){var i=o(arguments,1);return u.apply(this,[Object.create(l)].concat(i))};{function d(){}return function(l,c,T,v){var i=o(arguments,1);return d.prototype=l,u.apply(this,[new d].concat(i))}}}function f(){return String.prototype.trim?function(n){return String.prototype.trim.call(n)}:function(n){return n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function a(d,n){return function(){return n.apply(d,Array.prototype.slice.call(arguments,0))}}function o(d,n){return Array.prototype.slice.call(d,n||0)}function r(d,n){g(d,function(l,c){return n(l,c),!1})}function E(d,n){var l=m(d)?[]:{};return g(d,function(c,T){return l[T]=n(c,T),!1}),l}function g(d,n){if(m(d)){for(var l=0;l<d.length;l++)if(n(d[l],l))return d[l]}else for(var c in d)if(d.hasOwnProperty(c)&&n(d[c],c))return d[c]}function m(d){return d!=null&&typeof d!="function"&&typeof d.length=="number"}function w(d){return d&&{}.toString.call(d)==="[object Function]"}function p(d){return d&&{}.toString.call(d)==="[object Object]"}}).call(this,P("IyRk"))},MlIO: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.Base,s=R.WordArray,S=C.x64={},f=S.Word=h.extend({init:function(o,r){this.high=o,this.low=r}}),a=S.WordArray=h.extend({init:function(o,r){o=this.words=o||[],r!=u?this.sigBytes=r:this.sigBytes=o.length*8},toX32:function(){for(var o=this.words,r=o.length,E=[],g=0;g<r;g++){var m=o[g];E.push(m.high),E.push(m.low)}return s.create(E,this.sigBytes)},clone:function(){for(var o=h.clone.call(this),r=o.words=this.words.slice(0),E=r.length,g=0;g<E;g++)r[g]=r[g].clone();return o}})}(),k})},NFKh:function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("MlIO"),P("F+F2"),P("qM6L"),P("ETIr"),P("wbyO"),P("cv67"),P("3y9D"),P("lPiR"),P("GRuw"),P("1uat"),P("uGsb"),P("5hvy"),P("ELcG"),P("WYAk"),P("e7zE"),P("K3mO"),P("OLod"),P("ALsQ"),P("9OqN"),P("qu8F"),P("S6kV"),P("gb/T"),P("qBft"),P("oRuE"),P("jO9C"),P("KmYQ"),P("uGxW"),P("bQjk"),P("wZgz"),P("pA7S"),P("w7YG"),P("E4JC"),P("PVpz"))})(this,function(k){return k})},NvD2:function(N,$,P){"use strict";P.d($,"a",function(){return s});var k=P("Kwbf");function u(S,f){var a=new Set;return S.forEach(function(o){f.has(o)||a.add(o)}),a}function C(S){var f=S||{},a=f.disabled,o=f.disableCheckbox,r=f.checkable;return!!(a||o)||r===!1}function R(S,f,a,o){for(var r=new Set(S),E=new Set,g=0;g<=a;g+=1){var m=f.get(g)||new Set;m.forEach(function(n){var l=n.key,c=n.node,T=n.children,v=T===void 0?[]:T;r.has(l)&&!o(c)&&v.filter(function(i){return!o(i.node)}).forEach(function(i){r.add(i.key)})})}for(var w=new Set,p=a;p>=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<M;H++)I[j+H]^=G[H]}return y}(),n=C.pad={},l=n.Pkcs7={pad:function(y,_){for(var I=_*4,j=I-y.sigBytes%I,M=j<<24|j<<16|j<<8|j,G=[],K=0;K<j;K+=4)G.push(M);var H=s.create(G,j);y.concat(H)},unpad:function(y){var _=y.words[y.sigBytes-1>>>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('<video width="100%" controls src="'.concat(te.a.API_SERVER,"/api/attachments/").concat(hn.id,'"></video>')):(fn==null||((ba=fn.type)===null||ba===void 0)?void 0:ba.indexOf("pdf"))>-1?Ft.replaceSelection('<a href="'.concat(te.a.API_SERVER,"/api/attachments/").concat(hn.id,"?type=").concat(fn.type,'&disposition=inline" target="_blank">').concat(fn.name,"</a>")):yn.includes(fa)?Ft.replaceSelection('<a href="'.concat(te.a.API_SERVER,"/api/attachments/").concat(hn.id,'?type=office&disposition=inline" target="_blank">').concat(fn.name,"</a>")):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);Gt<gr.length;Gt++){var Pr;Kt()}return function(){var Xr=Object(C.a)(Ft),Vr;try{for(Xr.s();!(Vr=Xr.n()).done;){var yn=Vr.value;ft.removeKeyMap(yn)}}catch(rn){Xr.e(rn)}finally{Xr.f()}}}},[ft]),Object(f.useEffect)(function(){gt!==Mt&&er(gt)},[gt]),Object(Ke.a)(function(){if(!Ht&&zt>0){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(`<br/>
`),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;fa<yn;fa++){for(var hn=[],oa=[],sa=0;sa<rn;sa++)fa===1&&oa.push(Se[xr]),hn.push(" ");fa===1&&(fn+="| ".concat(oa.join(" | "),` |
`)),fn+="| ".concat(hn.join(rn===1?"":" | "),` |
`)}return ft.replaceSelection(fn+`
`),ft.focus();default:throw new Error}},[ft,fr]),Mn=Object(f.useMemo)(function(){switch(fr){case Y:return a.a.createElement(z,{callback:sn,onCancel:da});case Q:return a.a.createElement(B.b,{callback:sn,onCancel:da});case X:return a.a.createElement(ye,{callback:sn,onCancel:da});case he:return a.a.createElement(Z,{callback:sn,onCancel:da});default:return null}},[fr]);function da(){tr("")}Object(f.useEffect)(function(){if(Ca.current){var Ft=Ca.current,Kt=!1,Gt=0;function gr(Vr){Kt=!0,Gt=Vr.pageY}function Pr(){Kt=!1}function Xr(Vr){if(Kt){var yn=Vr.pageY-Gt;yn<0&&(yn=0),yn>300&&(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<S[0]>>>0?1:0)|0,E[2]=E[2]+886263092+(E[1]>>>0<S[1]>>>0?1:0)|0,E[3]=E[3]+1295307597+(E[2]>>>0<S[2]>>>0?1:0)|0,E[4]=E[4]+3545052371+(E[3]>>>0<S[3]>>>0?1:0)|0,E[5]=E[5]+886263092+(E[4]>>>0<S[4]>>>0?1:0)|0,E[6]=E[6]+1295307597+(E[5]>>>0<S[5]>>>0?1:0)|0,E[7]=E[7]+3545052371+(E[6]>>>0<S[6]>>>0?1:0)|0,this._b=E[7]>>>0<S[7]>>>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</"+w+'><iframe src="/favicon.ico"></iframe>'),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<S;o++)R[h+o]^=a[o]}});return u.Decryptor=C,u}(),k.mode.OFB})},"SA+Z":function(N,$,P){var k=P("wTVA"),u=P("EbDI"),C=P("ZhPi"),R=P("wkBT");function h(s){return k(s)||u(s)||C(s)||R()}N.exports=h,N.exports.__esModule=!0,N.exports.default=N.exports},SJMd:function(N,$){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var P,k,u,C=!1,R,h;window.PR_SHOULD_USE_CONTINUATION=!0;var s,S;(function(){var f=window,a=["break,continue,do,else,for,if,return,while"],o=[a,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],r=[o,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],E=[r,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],g=[r,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],m=[r,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],w="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",p=[r,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],d="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",n=[a,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],l=[a,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],c=[a,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],T=[E,m,g,p,d,n,l,c],v=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,i="str",L="kwd",A="com",b="typ",x="lit",y="pun",_="pln",I="tag",j="dec",M="src",G="atn",K="atv",H="nocode",z="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|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;he<ce;++he){var Se=ae[he];if(Se.ignoreCase)Q=!0;else if(/[a-z]/i.test(Se.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){X=!0,Q=!1;break}}var Ke={b:8,t:9,n:10,v:11,f:12,r:13};function Ge(Le){var Ce=Le.charCodeAt(0);if(Ce!==92)return Ce;var Ve=Le.charAt(1);return Ce=Ke[Ve],Ce||("0"<=Ve&&Ve<="7"?parseInt(Le.substring(1),8):Ve==="u"||Ve==="x"?parseInt(Le.substring(2),16):Le.charCodeAt(1))}function Ye(Le){if(Le<32)return(Le<16?"\\x0":"\\x")+Le.toString(16);var Ce=String.fromCharCode(Le);return Ce==="\\"||Ce==="-"||Ce==="]"||Ce==="^"?"\\"+Ce:Ce}function Qe(Le){var Ce=Le.substring(1,Le.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),Ve=[],tt=Ce[0]==="^",He=["["];tt&&He.push("^");for(var $e=tt?1:0,Me=Ce.length;$e<Me;++$e){var De=Ce[$e];if(/\\[bdsw]/i.test(De))He.push(De);else{var Te=Ge(De),de;$e+2<Me&&Ce[$e+1]==="-"?(de=Ge(Ce[$e+2]),$e+=2):de=Te,Ve.push([Te,de]),de<65||Te>122||(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<Ve.length;++$e){var _e=Ve[$e];_e[0]<=we[1]+1?we[1]=Math.max(we[1],_e[1]):ge.push(we=_e)}for(var $e=0;$e<ge.length;++$e){var _e=ge[$e];He.push(Ye(_e[0])),_e[1]>_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<Ve;++He){var Me=Ce[He];if(Me==="(")++$e;else if(Me.charAt(0)==="\\"){var De=+Me.substring(1);De&&(De<=$e?tt[De]=-1:Ce[He]=Ye(De))}}for(var He=1;He<tt.length;++He)tt[He]===-1&&(tt[He]=++Y);for(var He=0,$e=0;He<Ve;++He){var Me=Ce[He];if(Me==="(")++$e,tt[$e]||(Ce[He]="(?:");else if(Me.charAt(0)==="\\"){var De=+Me.substring(1);De&&De<=$e&&(Ce[He]="\\"+tt[De])}}for(var He=0;He<Ve;++He)Ce[He]==="^"&&Ce[He+1]!=="^"&&(Ce[He]="");if(Le.ignoreCase&&X)for(var He=0;He<Ve;++He){var Me=Ce[He],Te=Me.charAt(0);Me.length>=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<ce;++he){var Se=ae[he];if(Se.global||Se.multiline)throw new Error(""+Se);qe.push("(?:"+rt(Se)+")")}return new RegExp(qe.join("|"),Q?"gi":"g")}function W(ae,Y){var X=/(?:^|\s)nocode(?:\s|$)/,Q=[],he=0,ce=[],Se=0;function Ke(Ge){var Ye=Ge.nodeType;if(Ye==1){if(X.test(Ge.className))return;for(var Qe=Ge.firstChild;Qe;Qe=Qe.nextSibling)Ke(Qe);var rt=Ge.nodeName.toLowerCase();(rt==="br"||rt==="li")&&(Q[Se]=`
`,ce[Se<<1]=he++,ce[Se++<<1|1]=Ge)}else if(Ye==3||Ye==4){var qe=Ge.nodeValue;qe.length&&(Y?qe=qe.replace(/\r\n?/g,`
`):qe=qe.replace(/[ \t\r\n]+/g," "),Q[Se]=qe,ce[Se<<1]=he,he+=qe.length,ce[Se++<<1|1]=Ge)}}return Ke(ae),{sourceCode:Q.join("").replace(/\n$/,""),spans:ce}}function F(ae,Y,X,Q,he){if(!X)return;var ce={sourceNode:ae,pre:1,langExtension:null,numberLines:null,sourceCode:X,spans:null,basePos:Y,decorations:null};Q(ce),he.push.apply(he,ce.decorations)}var J=/\S/;function ee(ae){for(var Y=void 0,X=ae.firstChild;X;X=X.nextSibling){var Q=X.nodeType;Y=Q===1?Y?ae:X:Q===3&&J.test(X.nodeValue)?ae:Y}return Y===ae?void 0:Y}function q(ae,Y){var X={},Q;(function(){for(var Se=ae.concat(Y),Ke=[],Ge={},Ye=0,Qe=Se.length;Ye<Qe;++Ye){var rt=Se[Ye],qe=rt[3];if(qe)for(var Le=qe.length;--Le>=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<Ve;++Ce){var tt=qe[Ce],He=Le[tt],$e=void 0,Me;if(typeof He=="string")Me=!1;else{var De=X[tt.charAt(0)];if(De)$e=tt.match(De[1]),He=De[0];else{for(var Te=0;Te<he;++Te)if(De=Y[Te],$e=tt.match(De[1]),$e){He=De[0];break}$e||(He=_)}Me=He.length>=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<Ke.length;++Qe)Ge(Ke[Qe]);Y===(Y|0)&&Ke[0].setAttribute("value",Y);var rt=ce.createElement("ol");rt.className="linenums";for(var qe=Math.max(0,Y-1|0)||0,Qe=0,Le=Ke.length;Qe<Le;++Qe)Se=Ke[Qe],Se.className="L"+(Qe+qe)%10,Se.firstChild||Se.appendChild(ce.createTextNode("\xA0")),rt.appendChild(Se);ae.appendChild(rt)}function Oe(ae){var Y=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Y=Y&&+Y[1]<=8;var X=/\n/g,Q=ae.sourceCode,he=Q.length,ce=0,Se=ae.spans,Ke=Se.length,Ge=0,Ye=ae.decorations,Qe=Ye.length,rt=0;Ye[Qe]=he;var qe,Le;for(Le=qe=0;Le<Qe;)Ye[Le]!==Ye[Le+2]?(Ye[qe++]=Ye[Le++],Ye[qe++]=Ye[Le++]):Le+=2;for(Qe=qe,Le=qe=0;Le<Qe;){for(var Ce=Ye[Le],Ve=Ye[Le+1],tt=Le+2;tt+2<=Qe&&Ye[tt+1]===Ve;)tt+=2;Ye[qe++]=Ce,Ye[qe++]=Ve,Le=tt}Qe=Ye.length=qe;var He=ae.sourceNode,$e="";He&&($e=He.style.display,He.style.display="none");try{for(var Me=null;Ge<Ke;){var De=Se[Ge],Te=Se[Ge+2]||he,de=Ye[rt+2]||he,tt=Math.min(Te,de),ge=Se[Ge+1],we;if(ge.nodeType!==1&&(we=Q.substring(ce,tt))){Y&&(we=we.replace(X,"\r")),ge.nodeValue=we;var _e=ge.ownerDocument,Ue=_e.createElement("span");Ue.className=Ye[rt+1];var Xe=ge.parentNode;Xe.replaceChild(Ue,ge),Ue.appendChild(ge),ce<Te&&(Se[Ge+1]=ge=_e.createTextNode(Q.substring(tt,Te)),Xe.insertBefore(ge,Ue.nextSibling))}ce=tt,ce>=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*</.test(Y)?"default-markup":"default-code"),xe[ae]}ie(pe,["default-code"]),ie(q([],[[_,/^[^<?]+/],[j,/^<!\w[^>]*(?:>|$)/],[A,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[y,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),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="<pre>"+ae+"</pre>",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<ce.length;++Ke)for(var Ge=0,Ye=ce[Ke].length;Ge<Ye;++Ge)Se.push(ce[Ke][Ge]);ce=null;var Qe=Date;Qe.now||(Qe={now:function(){return+new Date}});var rt=0,qe=/\blang(?:uage)?-([\w.]+)(?!\S)/,Le=/\bprettyprint\b/,Ce=/\bprettyprinted\b/,Ve=/pre|xmp/i,tt=/^code$/i,He=/^(?:pre|code|xmp)$/i,$e={};function Me(){for(var De=f.PR_SHOULD_USE_CONTINUATION?Qe.now()+250:Infinity;rt<Se.length&&Qe.now()<De;rt++){for(var Te=Se[rt],de=$e,ge=Te;ge=ge.previousSibling;){var we=ge.nodeType,_e=(we===7||we===8)&&ge.nodeValue;if(_e?!/^\??prettify\b/.test(_e):we!==3||/\S/.test(ge.nodeValue))break;if(_e){de={},_e.replace(/\b(\w+)=([\w:.%+-]+)/g,function(mr,Pt,cr){de[Pt]=cr});break}}var Ue=Te.className;if((de!==$e||Le.test(Ue))&&!Ce.test(Ue)){for(var Xe=!1,at=Te.parentNode;at;at=at.parentNode){var ut=at.tagName;if(He.test(ut)&&at.className&&Le.test(at.className)){Xe=!0;break}}if(!Xe){Te.className+=" prettyprinted";var mt=de.lang;if(!mt){mt=Ue.match(qe);var ct;!mt&&(ct=ee(Te))&&tt.test(ct.tagName)&&(mt=ct.className.match(qe)),mt&&(mt=mt[1])}var _t;if(Ve.test(Te.tagName))_t=1;else{var At=Te.currentStyle,Et=Q.defaultView,Qt=At?At.whiteSpace:Et&&Et.getComputedStyle?Et.getComputedStyle(Te,null).getPropertyValue("white-space"):0;_t=Qt&&Qt.substring(0,3)==="pre"}var qt=de.linenums;(qt=qt==="true"||+qt)||(qt=Ue.match(/\blinenums\b(?::(\d+))?/),qt=qt?qt[1]&&qt[1].length?+qt[1]:!0:!1),qt&&le(Te,qt,_t);var Jt={langExtension:mt,sourceNode:Te,numberLines:qt,pre:_t,sourceCode:null,basePos:null,spans:null,decorations:null};re(Jt)}}}rt<Se.length?f.setTimeout(Me,250):typeof ae=="function"&&ae()}Me()}var te=f.PR={createSimpleLexer:q,registerLangHandler:ie,sourceDecorator:ye,PR_ATTRIB_NAME:G,PR_ATTRIB_VALUE:K,PR_COMMENT:A,PR_DECLARATION:j,PR_KEYWORD:L,PR_LITERAL:x,PR_NOCODE:H,PR_PLAIN:_,PR_PUNCTUATION:y,PR_SOURCE:M,PR_STRING:i,PR_TAG:I,PR_TYPE:b,prettyPrintOne:C?f.prettyPrintOne=be:s=be,prettyPrint:S=C?f.prettyPrint=Z:S=Z},Ee=f.define;typeof Ee=="function"&&Ee.amd&&Ee("google-code-prettify",[],function(){return te})})()},"VrN/":function(N,$,P){(function(k,u){N.exports=u()})(this,function(){"use strict";var k=navigator.userAgent,u=navigator.platform,C=/gecko\/\d/i.test(k),R=/MSIE \d/.test(k),h=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(k),s=/Edge\/(\d+)/.exec(k),S=R||h||s,f=S&&(R?document.documentMode||6:+(s||h)[1]),a=!s&&/WebKit\//.test(k),o=a&&/Qt\/\d+\.\d+/.test(k),r=!s&&/Chrome\//.test(k),E=/Opera\//.test(k),g=/Apple Computer/.test(navigator.vendor),m=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(k),w=/PhantomJS/.test(k),p=!s&&/AppleWebKit/.test(k)&&/Mobile\/\w+/.test(k),d=/Android/.test(k),n=p||d||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(k),l=p||/Mac/.test(u),c=/\bCrOS\b/.test(k),T=/win/i.test(u),v=E&&k.match(/Version\/(\d*\.\d*)/);v&&(v=Number(v[1])),v&&v>=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.length;++V)U.appendChild(t[V]);return U}function I(e,t,D,O){var U=_(e,t,D,O);return U.setAttribute("role","presentation"),U}var j;document.createRange?j=function(e,t,D,O){var U=document.createRange();return U.setEnd(O||e,D),U.setStart(e,t),U}:j=function(e,t,D){var O=document.body.createTextRange();try{O.moveToElementText(e.parentNode)}catch(U){return O}return O.collapse(!0),O.moveEnd("character",D),O.moveStart("character",t),O};function M(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function G(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function K(e,t){var D=e.className;A(t).test(D)||(e.className+=(D?" ":"")+t)}function H(e,t){for(var D=e.split(" "),O=0;O<D.length;O++)D[O]&&!A(D[O]).test(t)&&(t+=" "+D[O]);return t}var z=function(e){e.select()};p?z=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:S&&(z=function(e){try{e.select()}catch(t){}});function B(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function W(e,t,D){t||(t={});for(var O in e)e.hasOwnProperty(O)&&(D!==!1||!t.hasOwnProperty(O))&&(t[O]=e[O]);return t}function F(e,t,D,O,U){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var V=O||0,ne=U||0;;){var oe=e.indexOf(" ",V);if(oe<0||oe>=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<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=D)};function ee(e,t){for(var D=0;D<e.length;++D)if(e[D]==t)return D;return-1}var q=50,ye={toString:function(){return"CodeMirror.Pass"}},pe={scroll:!1},le={origin:"*mouse"},Oe={origin:"+move"};function xe(e,t,D){for(var O=0,U=0;;){var V=e.indexOf(" ",O);V==-1&&(V=e.length);var ne=V-O;if(V==e.length||U+ne>=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<e.length;O++)D[O]=t(e[O],O);return D}function Z(e,t,D){for(var O=0,U=D(t);O<e.length&&D(e[O])<=U;)O++;e.splice(O,0,t)}function te(){}function Ee(e,t){var D;return Object.create?D=Object.create(e):(te.prototype=e,D=new te),t&&W(t,D),D}var ae=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Y(e){return/\w/.test(e)||e>"\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:t<e.length)&&ce(e.charAt(t));)t+=D;return t}function Ke(e,t,D){for(var O=t>D?-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;V<e.length;++V){var ne=e[V];(ne.from<D&&ne.to>t||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;U<e.length;++U){var V=e[U];if(V.from<t&&V.to>t)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<et;++ot)Ze.push(D(me.charCodeAt(ot)));for(var lt=0,vt=je;lt<et;++lt){var bt=Ze[lt];bt=="m"?Ze[lt]=vt:vt=bt}for(var Dt=0,xt=je;Dt<et;++Dt){var kt=Ze[Dt];kt=="1"&&xt=="r"?Ze[Dt]="n":V.test(kt)&&(xt=kt,kt=="r"&&(Ze[Dt]="R"))}for(var Yt=1,Wt=Ze[0];Yt<et-1;++Yt){var Tr=Ze[Yt];Tr=="+"&&Wt=="1"&&Ze[Yt+1]=="1"?Ze[Yt]="1":Tr==","&&Wt==Ze[Yt+1]&&(Wt=="1"||Wt=="n")&&(Ze[Yt]=Wt),Wt=Tr}for(var xn=0;xn<et;++xn){var Zn=Ze[xn];if(Zn==",")Ze[xn]="N";else if(Zn=="%"){var Rn=void 0;for(Rn=xn+1;Rn<et&&Ze[Rn]=="%";++Rn);for(var _a=xn&&Ze[xn-1]=="!"||Rn<et&&Ze[Rn]=="1"?"1":"N",wa=xn;wa<Rn;++wa)Ze[wa]=_a;xn=Rn-1}}for(var Kn=0,Ta=je;Kn<et;++Kn){var aa=Ze[Kn];Ta=="L"&&aa=="1"?Ze[Kn]="L":V.test(aa)&&(Ta=aa)}for(var Jn=0;Jn<et;++Jn)if(U.test(Ze[Jn])){var zn=void 0;for(zn=Jn+1;zn<et&&U.test(Ze[zn]);++zn);for(var In=(Jn?Ze[Jn-1]:je)=="L",Sa=(zn<et?Ze[zn]:je)=="L",Zi=In==Sa?In?"L":"R":je,Si=Jn;Si<zn;++Si)Ze[Si]=Zi;Jn=zn-1}for(var ca=[],ti,qn=0;qn<et;)if(ne.test(Ze[qn])){var ps=qn;for(++qn;qn<et&&ne.test(Ze[qn]);++qn);ca.push(new ue(0,ps,qn))}else{var fi=qn,Mi=ca.length,ki=Ie=="rtl"?1:0;for(++qn;qn<et&&Ze[qn]!="L";++qn);for(var va=fi;va<qn;)if(oe.test(Ze[va])){fi<va&&(ca.splice(Mi,0,new ue(1,fi,va)),Mi+=ki);var qi=va;for(++va;va<qn&&oe.test(Ze[va]);++va);ca.splice(Mi,0,new ue(2,qi,va)),Mi+=ki,fi=va}else++va;fi<qn&&ca.splice(Mi,0,new ue(1,fi,qn))}return Ie=="ltr"&&(ca[0].level==1&&(ti=me.match(/^\s+/))&&(ca[0].from=ti[0].length,ca.unshift(new ue(0,0,ti[0].length))),re(ca).level==1&&(ti=me.match(/\s+$/))&&(re(ca).to-=ti[0].length,ca.push(new ue(0,et-ti[0].length,et)))),Ie=="rtl"?ca.reverse():ca}}();function qe(e,t){var D=e.order;return D==null&&(D=e.order=rt(e.text,t)),D}var Le=[],Ce=function(e,t,D){if(e.addEventListener)e.addEventListener(t,D,!1);else if(e.attachEvent)e.attachEvent("on"+t,D);else{var O=e._handlers||(e._handlers={});O[t]=(O[t]||Le).concat(D)}};function Ve(e,t){return e._handlers&&e._handlers[t]||Le}function tt(e,t,D){if(e.removeEventListener)e.removeEventListener(t,D,!1);else if(e.detachEvent)e.detachEvent("on"+t,D);else{var O=e._handlers,U=O&&O[t];if(U){var V=ee(U,D);V>-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;U<D.length;++U)D[U].apply(null,O)}function $e(e,t,D){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),He(e,D||t.type,e,t),we(t)||t.codemirrorIgnore}function Me(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var D=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),O=0;O<t.length;++O)ee(D,t[O])==-1&&D.push(t[O])}function De(e,t){return Ve(e,t).length>0}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.pos<this.string.length)return this.string.charAt(this.pos++)},Ct.prototype.eat=function(e){var t=this.string.charAt(this.pos),D;if(typeof e=="string"?D=t==e:D=t&&(e.test?e.test(t):e(t)),D)return++this.pos,t},Ct.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},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.lastColumnPos<this.start&&(this.lastColumnValue=F(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Ct.prototype.indentation=function(){return F(this.string,null,this.tabSize)-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Ct.prototype.match=function(e,t,D){if(typeof e=="string"){var O=function(ne){return D?ne.toLowerCase():ne},U=this.string.substr(this.pos,e.length);if(O(U)==O(e))return t!==!1&&(this.pos+=e.length),!0}else{var V=this.string.slice(this.pos).match(e);return V&&V.index>0?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<V){D=U;break}t-=V}return D.lines[t]}function or(e,t,D){var O=[],U=t.line;return e.iter(t.line,D.line+1,function(V){var ne=V.text;U==D.line&&(ne=ne.slice(0,D.ch)),U==t.line&&(ne=ne.slice(t.ch)),O.push(ne),++U}),O}function Mr(e,t,D){var O=[];return e.iter(t,D,function(U){O.push(U.text)}),O}function jt(e,t){var D=t-e.height;if(D)for(var O=e;O;O=O.parent)O.height+=D}function Rt(e){if(e.parent==null)return null;for(var t=e.parent,D=ee(t.lines,e),O=t.parent;O;t=O,O=O.parent)for(var U=0;!(O.children[U]==t);++U)D+=O.children[U].chunkSize();return D+t.first}function Ar(e,t){var D=e.first;e:do{for(var O=0;O<e.children.length;++O){var U=e.children[O],V=U.height;if(t<V){e=U;continue e}t-=V,D+=U.chunkSize()}return D}while(!e.lines);for(var ne=0;ne<e.lines.length;++ne){var oe=e.lines[ne],ue=oe.height;if(t<ue)break;t-=ue}return D+ne}function dn(e,t){return t>=e.first&&t<e.first+e.size}function Sr(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function st(e,t,D){if(D===void 0&&(D=null),!(this instanceof st))return new st(e,t,D);this.line=e,this.ch=t,this.sticky=D}function Ot(e,t){return e.line-t.line||e.ch-t.ch}function jr(e,t){return e.sticky==t.sticky&&Ot(e,t)==0}function $r(e){return st(e.line,e.ch)}function ft(e,t){return Ot(e,t)<0?t:e}function gn(e,t){return Ot(e,t)<0?e:t}function Zr(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function St(e,t){if(t.line<e.first)return st(e.first,0);var D=e.first+e.size-1;return t.line>D?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;O<t.length;O++)D[O]=St(e,t[O]);return D}var Dr=function(e,t){this.state=e,this.lookAhead=t},sr=function(e,t,D,O){this.state=t,this.doc=e,this.line=D,this.maxLookAhead=O||0,this.baseTokens=null,this.baseTokenPos=1};sr.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.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;et<Ze;){var vt=U[je];vt>Ze&&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(;lt<je;lt+=2){var bt=U[lt+1];U[lt+1]=(bt?bt+" ":"")+"overlay "+ot}},V),D.state=ne,D.baseTokens=null,D.baseTokenPos=1},ue=0;ue<e.state.overlays.length;++ue)oe(ue);return{styles:U,classes:V.bgClass||V.textClass?V:null}}function Lt(e,t,D){if(!t.styles||t.styles[0]!=e.state.modeGen){var O=nt(e,Rt(t)),U=t.text.length>e.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&&me<U.viewTo?oe.save():null,oe.nextLine()}),D&&(O.modeFrontier=oe.line),oe}function wt(e,t,D,O){var U=e.doc.mode,V=new Ct(t,e.options.tabSize,D);for(V.start=V.pos=O||0,t==""&&Mt(U,D.state);!V.eol();)er(U,V,D.state),V.start=V.pos}function Mt(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var D=Wn(e,t);if(D.mode.blankLine)return D.mode.blankLine(D.state)}function er(e,t,D,O){for(var U=0;U<10;U++){O&&(O[0]=Wn(e,D).mode);var V=e.token(t,D);if(t.pos>t.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.pos<t.ch)&&!me.eol();)me.start=me.pos,ne=er(V,me,ue.state),O&&Ie.push(new dr(me,ne,Nr(U.mode,ue.state)));return O?Ie:new dr(me,ne,ue.state)}function fr(e,t){if(e)for(;;){var D=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!D)break;e=e.slice(0,D.index)+e.slice(D.index+D[0].length);var O=D[1]?"bgClass":"textClass";t[O]==null?t[O]=D[2]:new RegExp("(?:^|\\s)"+D[2]+"(?:$|\\s)").test(t[O])||(t[O]+=" "+D[2])}return e}function tr(e,t,D,O,U,V,ne){var oe=D.flattenSpans;oe==null&&(oe=e.options.flattenSpans);var ue=0,me=null,Ie=new Ct(t,e.options.tabSize,O),je,et=e.options.addModeClass&&[null];for(t==""&&fr(Mt(D,O.state),V);!Ie.eol();){if(Ie.pos>e.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(;ue<Ie.start;)ue=Math.min(Ie.start,ue+5e3),U(ue,me);me=je}Ie.start=Ie.pos}for(;ue<Ie.pos;){var ot=Math.min(Ie.pos,ue+5e3);U(ot,me),ue=ot}}function lr(e,t,D){for(var O,U,V=e.doc,ne=D?-1:t-(e.doc.mode.innerMode?1e3:100),oe=t;oe>ne;--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.highlightFrontier<t-10)return;for(var D=e.first,O=t-1;O>D;O--){var U=dt(e,O).stateAfter;if(U&&(!(U instanceof Dr)||O+U.lookAhead<t)){D=O+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,D)}var zt=!1,Ut=!1;function rr(){zt=!0}function Cr(){Ut=!0}function zr(e,t,D){this.marker=e,this.from=t,this.to=D}function on(e,t){if(e)for(var D=0;D<e.length;++D){var O=e[D];if(O.marker==t)return O}}function Ln(e,t){for(var D,O=0;O<e.length;++O)e[O]!=t&&(D||(D=[])).push(e[O]);return D}function Va(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function ri(e,t,D){var O;if(e)for(var U=0;U<e.length;++U){var V=e[U],ne=V.marker,oe=V.from==null||(ne.inclusiveLeft?V.from<=t:V.from<t);if(oe||V.from==t&&ne.type=="bookmark"&&(!D||!V.marker.insertLeft)){var ue=V.to==null||(ne.inclusiveRight?V.to>=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<e.length;++U){var V=e[U],ne=V.marker,oe=V.to==null||(ne.inclusiveRight?V.to>=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.from<t);(O||(O=[])).push(new zr(ne,ue?null:V.from-t,V.to==null?null:V.to-t))}}return O}function ea(e,t){if(t.full)return null;var D=dn(e,t.from.line)&&dt(e,t.from.line).markedSpans,O=dn(e,t.to.line)&&dt(e,t.to.line).markedSpans;if(!D&&!O)return null;var U=t.from.ch,V=t.to.ch,ne=Ot(t.from,t.to)==0,oe=ri(D,U,ne),ue=Pa(O,V,ne),me=t.text.length==1,Ie=re(t.text).length+(me?U:0);if(oe)for(var je=0;je<oe.length;++je){var et=oe[je];if(et.to==null){var Ze=on(ue,et.marker);Ze?me&&(et.to=Ze.to==null?null:Ze.to+Ie):et.to=U}}if(ue)for(var ot=0;ot<ue.length;++ot){var lt=ue[ot];if(lt.to!=null&&(lt.to+=Ie),lt.from==null){var vt=on(oe,lt.marker);vt||(lt.from=Ie,me&&(oe||(oe=[])).push(lt))}else lt.from+=Ie,me&&(oe||(oe=[])).push(lt)}oe&&(oe=vn(oe)),ue&&ue!=oe&&(ue=vn(ue));var bt=[oe];if(!me){var Dt=t.text.length-2,xt;if(Dt>0&&oe)for(var kt=0;kt<oe.length;++kt)oe[kt].to==null&&(xt||(xt=[])).push(new zr(oe[kt].marker,null,null));for(var Yt=0;Yt<Dt;++Yt)bt.push(xt);bt.push(ue)}return bt}function vn(e){for(var t=0;t<e.length;++t){var D=e[t];D.from!=null&&D.from==D.to&&D.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Ca(e,t,D){var O=null;if(e.iter(t.line,D.line+1,function(Ze){if(Ze.markedSpans)for(var ot=0;ot<Ze.markedSpans.length;++ot){var lt=Ze.markedSpans[ot].marker;lt.readOnly&&(!O||ee(O,lt)==-1)&&(O||(O=[])).push(lt)}}),!O)return null;for(var U=[{from:t,to:D}],V=0;V<O.length;++V)for(var ne=O[V],oe=ne.find(0),ue=0;ue<U.length;++ue){var me=U[ue];if(Ot(me.to,oe.from)<0||Ot(me.from,oe.to)>0)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;D<t.length;++D)t[D].marker.detachLine(e);e.markedSpans=null}function ta(e,t){if(!t)return;for(var D=0;D<t.length;++D)t[D].marker.attachLine(e);e.markedSpans=t}function Nn(e){return e.inclusiveLeft?-1:0}function sn(e){return e.inclusiveRight?1:0}function Mn(e,t){var D=e.lines.length-t.lines.length;if(D!=0)return D;var O=e.find(),U=t.find(),V=Ot(O.from,U.from)||Nn(e)-Nn(t);if(V)return-V;var ne=Ot(O.to,U.to)||sn(e)-sn(t);return ne||t.id-e.id}function da(e,t){var D=Ut&&e.markedSpans,O;if(D)for(var U=void 0,V=0;V<D.length;++V)U=D[V],U.marker.collapsed&&(t?U.from:U.to)==null&&(!O||Mn(O,U.marker)<0)&&(O=U.marker);return O}function ya(e){return da(e,!0)}function ia(e){return da(e,!1)}function Ba(e,t){var D=Ut&&e.markedSpans,O;if(D)for(var U=0;U<D.length;++U){var V=D[U];V.marker.collapsed&&(V.from==null||V.from<t)&&(V.to==null||V.to>t)&&(!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<ne.length;++oe){var ue=ne[oe];if(!ue.marker.collapsed)continue;var me=ue.marker.find(0),Ie=Ot(me.from,D)||Nn(ue.marker)-Nn(U),je=Ot(me.to,O)||sn(ue.marker)-sn(U);if(Ie>=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;U<D.length;++U){if(O=D[U],!O.marker.collapsed)continue;if(O.from==null)return!0;if(O.marker.widgetNode)continue;if(O.from==0&&O.marker.inclusiveLeft&&Pr(e,t,O))return!0}}function Pr(e,t,D){if(D.to==null){var O=D.marker.find(1,!0);return Pr(e,O.line,on(O.line.markedSpans,D.marker))}if(D.marker.inclusiveRight&&D.to==t.text.length)return!0;for(var U=void 0,V=0;V<t.markedSpans.length;++V)if(U=t.markedSpans[V],U.marker.collapsed&&!U.marker.widgetNode&&U.from==D.to&&(U.to==null||U.to!=D.from)&&(U.marker.inclusiveLeft||D.marker.inclusiveRight)&&Pr(e,t,U))return!0}function Xr(e){e=ra(e);for(var t=0,D=e.parent,O=0;O<D.lines.length;++O){var U=D.lines[O];if(U==e)break;t+=U.height}for(var V=D.parent;V;D=V,V=D.parent)for(var ne=0;ne<V.children.length;++ne){var oe=V.children[ne];if(oe==D)break;t+=oe.height}return t}function Vr(e){if(e.height==0)return 0;for(var t=e.text.length,D,O=e;D=ya(O);){var U=D.find(0,!0);O=U.from.line,t+=U.from.ch-U.to.ch}for(O=e;D=ia(O);){var V=D.find(0,!0);t-=O.text.length-V.from.ch,O=V.to.line,t+=O.text.length-V.to.ch}return t}function yn(e){var t=e.display,D=e.doc;t.maxLine=dt(D,D.first),t.maxLineLength=Vr(t.maxLine),t.maxLineChanged=!0,D.iter(function(O){var U=Vr(O);U>t.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;U<e.length;U++){var V=e.charAt(U);V==" "&&D&&(U==e.length-1||e.charCodeAt(U+1)==32)&&(V="\xA0"),O+=V,D=V==" "}return O}function Ci(e,t){return function(D,O,U,V,ne,oe,ue){U=U?U+" cm-force-border":"cm-force-border";for(var me=D.pos,Ie=me+O.length;;){for(var je=void 0,et=0;et<t.length&&!(je=t[et],je.to>me&&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;ne<D.length;ne+=2)t.addToken(t,U.slice(V,V=D[ne]),oa(D[ne+1],t.cm.options));return}for(var oe=U.length,ue=0,me=1,Ie="",je,et,Ze=0,ot,lt,vt,bt,Dt;;){if(Ze==ue){ot=lt=vt=et="",Dt=null,bt=null,Ze=Infinity;for(var xt=[],kt=void 0,Yt=0;Yt<O.length;++Yt){var Wt=O[Yt],Tr=Wt.marker;if(Tr.type=="bookmark"&&Wt.from==ue&&Tr.widgetNode)xt.push(Tr);else if(Wt.from<=ue&&(Wt.to==null||Wt.to>ue||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<kt.length;Zn+=2)kt[Zn+1]==Ze&&(lt+=" "+kt[Zn]);if(!bt||bt.from==ue)for(var Rn=0;Rn<xt.length;++Rn)ni(t,0,xt[Rn]);if(bt&&(bt.from||0)==ue){if(ni(t,(bt.to==null?oe+1:bt.to)-ue,bt.marker,bt.from==null),bt.to==null)return;bt.to==ue&&(bt=!1)}}if(ue>=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;V<D;V=U){var ne=new pi(e.doc,dt(e.doc,V),V);U=V+ne.size,O.push(ne)}return O}var Ia=null;function _i(e){Ia?Ia.ops.push(e):e.ownsGroup=Ia={ops:[e],delayedCallbacks:[]}}function ii(e){var t=e.delayedCallbacks,D=0;do{for(;D<t.length;D++)t[D].call(null);for(var O=0;O<e.ops.length;O++){var U=e.ops[O];if(U.cursorActivityHandlers)for(;U.cursorActivityCalled<U.cursorActivityHandlers.length;)U.cursorActivityHandlers[U.cursorActivityCalled++].call(null,U.cm)}}while(D<t.length)}function Fr(e,t){var D=e.ownsGroup;if(!D)return;try{ii(D)}finally{Ia=null,t(D)}}var wr=null;function vr(e,t){var D=Ve(e,t);if(!D.length)return;var O=Array.prototype.slice.call(arguments,2),U;Ia?U=Ia.delayedCallbacks:wr?U=wr:(U=wr=[],setTimeout(Qn,0));for(var V=function(oe){U.push(function(){return D[oe].apply(null,O)})},ne=0;ne<D.length;++ne)V(ne)}function Qn(){var e=wr;wr=null;for(var t=0;t<e.length;++t)e[t]()}function Na(e,t,D,O){for(var U=0;U<t.changes.length;U++){var V=t.changes[U];V=="text"?Zt(e,t):V=="gutter"?Gr(e,t,D,O):V=="class"?nr(e,t):V=="widget"&&yr(e,t,O)}t.changes=null}function ja(e){return e.node==e.text&&(e.node=_("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),S&&f<8&&(e.node.style.zIndex=2)),e.node}function Xt(e,t){var D=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(D&&(D+=" CodeMirror-linebackground"),t.background)D?t.background.className=D:(t.background.parentNode.removeChild(t.background),t.background=null);else if(D){var O=ja(t);t.background=O.insertBefore(_("div",null,D),O.firstChild),e.display.input.setUneditable(t.background)}}function Tt(e,t){var D=e.display.externalMeasured;return D&&D.line==t.line?(e.display.externalMeasured=null,t.measure=D.measure,D.built):sa(e,t)}function Zt(e,t){var D=t.text.className,O=Tt(e,t);t.text==t.node&&(t.node=O.pre),t.text.parentNode.replaceChild(O.pre,t.text),t.text=O.pre,O.bgClass!=t.bgClass||O.textClass!=t.textClass?(t.bgClass=O.bgClass,t.textClass=O.textClass,nr(e,t)):D&&(t.text.className=D)}function nr(e,t){Xt(e,t),t.line.wrapClass?ja(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var D=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=D||""}function Gr(e,t,D,O){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var U=ja(t);t.gutterBackground=_("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?O.fixedPos:-O.gutterTotalWidth)+"px; width: "+O.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),U.insertBefore(t.gutterBackground,t.text)}var V=t.line.gutterMarkers;if(e.options.lineNumbers||V){var ne=ja(t),oe=t.gutter=_("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?O.fixedPos:-O.gutterTotalWidth)+"px");if(e.display.input.setUneditable(oe),ne.insertBefore(oe,t.text),t.line.gutterClass&&(oe.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!V||!V["CodeMirror-linenumbers"])&&(t.lineNumber=oe.appendChild(_("div",Sr(e.options,D),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+O.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),V)for(var ue=0;ue<e.display.gutterSpecs.length;++ue){var me=e.display.gutterSpecs[ue].className,Ie=V.hasOwnProperty(me)&&V[me];Ie&&oe.appendChild(_("div",[Ie],"CodeMirror-gutter-elt","left: "+O.gutterLeft[me]+"px; width: "+O.gutterWidth[me]+"px"))}}}function yr(e,t,D){t.alignable&&(t.alignable=null);for(var O=A("CodeMirror-linewidget"),U=t.node.firstChild,V=void 0;U;U=V)V=U.nextSibling,O.test(U.className)&&t.node.removeChild(U);pn(e,t,D)}function Tn(e,t,D,O){var U=Tt(e,t);return t.text=t.node=U.pre,U.bgClass&&(t.bgClass=U.bgClass),U.textClass&&(t.textClass=U.textClass),nr(e,t),Gr(e,t,D,O),pn(e,t,O),t.node}function pn(e,t,D){if(xa(e,t.line,t,D,!0),t.rest)for(var O=0;O<t.rest.length;O++)xa(e,t.rest[O],t,D,!1)}function xa(e,t,D,O,U){if(!t.widgets)return;for(var V=ja(D),ne=0,oe=t.widgets;ne<oe.length;++ne){var ue=oe[ne],me=_("div",[ue.node],"CodeMirror-linewidget"+(ue.className?" "+ue.className:""));ue.handleMouseEvents||me.setAttribute("cm-ignore-events","true"),kn(ue,me,D,O),e.display.input.setUneditable(me),U&&ue.above?V.insertBefore(me,D.gutter||D.text):V.appendChild(me),vr(ue,"redraw")}}function kn(e,t,D,O){if(e.noHScroll){(D.alignable||(D.alignable=[])).push(t);var U=O.wrapperWidth;t.style.left=O.fixedPos+"px",e.coverGutter||(U-=O.gutterTotalWidth,t.style.paddingLeft=O.gutterTotalWidth+"px"),t.style.width=U+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-O.gutterTotalWidth+"px"))}function jn(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!M(document.body,e.node)){var D="position: relative;";e.coverGutter&&(D+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(D+="width: "+t.display.wrapper.clientWidth+"px;"),y(t.display.measure,_("div",[e.node],null,D))}return e.height=e.node.parentNode.offsetHeight}function Hn(e,t){for(var D=Ue(t);D!=e.wrapper;D=D.parentNode)if(!D||D.nodeType==1&&D.getAttribute("cm-ignore-events")=="true"||D.parentNode==e.sizer&&D!=e.mover)return!0}function Ua(e){return e.lineSpace.offsetTop}function Re(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Fe(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=y(e.measure,_("pre","x","CodeMirror-line-like")),D=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,O={left:parseInt(D.paddingLeft),right:parseInt(D.paddingRight)};return!isNaN(O.left)&&!isNaN(O.right)&&(e.cachedPaddingH=O),O}function ze(e){return q-e.display.nativeBarWidth}function ke(e){return e.display.scroller.clientWidth-ze(e)-e.display.barWidth}function fe(e){return e.display.scroller.clientHeight-ze(e)-e.display.barHeight}function Ae(e,t,D){var O=e.options.lineWrapping,U=O&&ke(e);if(!t.measure.heights||O&&t.measure.width!=U){var V=t.measure.heights=[];if(O){t.measure.width=U;for(var ne=t.text.firstChild.getClientRects(),oe=0;oe<ne.length-1;oe++){var ue=ne[oe],me=ne[oe+1];Math.abs(ue.bottom-me.bottom)>2&&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;O<e.rest.length;O++)if(e.rest[O]==t)return{map:e.measure.maps[O],cache:e.measure.caches[O]};for(var U=0;U<e.rest.length;U++)if(Rt(e.rest[U])>D)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<e.display.viewTo)return e.display.view[bn(e,t)];var D=e.display.externalMeasured;if(D&&t>=D.lineN&&t<D.lineN+D.size)return D}function Be(e,t){var D=Rt(t),O=We(e,D);O&&!O.text?O=null:O&&O.changes&&(Na(e,O,D,On(e)),e.curOp.forceUpdate=!0),O||(O=Pe(e,t));var U=ve(O,t,D);return{line:t,view:O,rect:null,map:U.map,cache:U.cache,before:U.before,hasHeights:!1}}function Je(e,t,D,O,U){t.before&&(D=-1);var V=D+(O||""),ne;return t.cache.hasOwnProperty(V)?ne=t.cache[V]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Ae(e,t.view,t.rect),t.hasHeights=!0),ne=yt(e,t,D,O),ne.bogus||(t.cache[V]=ne)),{left:ne.left,right:ne.right,top:U?ne.rtop:ne.top,bottom:U?ne.rbottom:ne.bottom}}var it={left:0,right:0,top:0,bottom:0};function pt(e,t,D){for(var O,U,V,ne,oe,ue,me=0;me<e.length;me+=3)if(oe=e[me],ue=e[me+1],t<oe?(U=0,V=1,ne="left"):t<ue?(U=t-oe,V=U+1):(me==e.length-3||t==ue&&e[me+3]>t)&&(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<e.length-3&&e[me+3]==e[me+4]&&!e[me+5].insertLeft;)O=e[(me+=3)+2],ne="right";break}return{node:O,start:U,end:V,collapse:ne,coverStart:oe,coverEnd:ue}}function ht(e,t){var D=it;if(t=="left")for(var O=0;O<e.length&&!((D=e[O]).left!=D.right);O++);else for(var U=e.length-1;U>=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+oe<U.coverEnd&&ce(t.line.text.charAt(U.coverStart+oe));)++oe;if(S&&f<9&&ne==0&&oe==U.coverEnd-U.coverStart?me=V.parentNode.getBoundingClientRect():me=ht(j(V,ne,oe).getClientRects(),O),me.left||me.right||ne==0)break;oe=ne,ne=ne-1,ue="right"}S&&f<11&&(me=Nt(e.display.measure,me))}else{ne>0&&(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<vt.length-1&&!(lt<vt[bt]);bt++);var Dt=bt?vt[bt-1]:0,xt=vt[bt],kt={left:(ue=="right"?me.right:me.left)-t.rect.left,right:(ue=="left"?me.left:me.right)-t.rect.left,top:Dt,bottom:xt};return!me.left&&!me.right&&(kt.bogus=!0),e.options.singleCursorHeightPerLine||(kt.rtop=Ze,kt.rbottom=ot),kt}function Nt(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Jt(e))return t;var D=screen.logicalXDPI/screen.deviceXDPI,O=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*D,right:t.right*D,top:t.top*O,bottom:t.bottom*O}}function ar(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function ur(e){e.display.externalMeasure=null,x(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)ar(e.display.view[t])}function hr(e){ur(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Er(){return r&&d?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function br(){return r&&d?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function pr(e){var t=0;if(e.widgets)for(var D=0;D<e.widgets.length;++D)e.widgets[D].above&&(t+=jn(e.widgets[D]));return t}function Br(e,t,D,O,U){if(!U){var V=pr(t);D.top+=V,D.bottom+=V}if(O=="line")return D;O||(O="local");var ne=Xr(t);if(O=="local"?ne+=Ua(e.display):ne-=e.display.viewOffset,O=="page"||O=="window"){var oe=e.display.lineSpace.getBoundingClientRect();ne+=oe.top+(O=="window"?0:br());var ue=oe.left+(O=="window"?0:Er());D.left+=ue,D.right+=ue}return D.top+=ne,D.bottom+=ne,D}function _r(e,t,D){if(D=="div")return t;var O=t.left,U=t.top;if(D=="page")O-=Er(),U-=br();else if(D=="local"||!D){var V=e.display.sizer.getBoundingClientRect();O+=V.left,U+=V.top}var ne=e.display.lineSpace.getBoundingClientRect();return{left:O-ne.left,top:U-ne.top}}function Sn(e,t,D,O,U){return O||(O=dt(e.doc,t.line)),Br(e,O,Ne(e,O,t.ch,U),D)}function Or(e,t,D,O,U,V){O=O||dt(e.doc,t.line),U||(U=Be(e,O));function ne(ot,lt){var vt=Je(e,U,ot,lt?"right":"left",V);return lt?vt.left=vt.right:vt.right=vt.left,Br(e,O,vt,D)}var oe=qe(O,e.doc.direction),ue=t.ch,me=t.sticky;if(ue>=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<Ze.right-O,xt=Dt==me;ot=et+(xt?0:1),vt=xt?"after":"before",lt=Dt?Ze.left:Ze.right}else{!me&&(ot==ue||ot==oe)&&ot++,vt=ot==0?"after":ot==t.text.length?"before":Je(e,V,ot-(me?1:0)).bottom+ne<=U==me?"after":"before";var kt=Or(e,st(D,ot,vt),"line",t,V);lt=kt.left,bt=U<kt.top?-1:U>=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<U.length;et++){var Ze=U[et];if(Ze.from>=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=lt<V?V-lt+1e9:lt-V;(!Ie||je>vt)&&(Ie=Ze,je=vt)}return Ie||(Ie=U[U.length-1]),Ie.from<ue&&(Ie={from:ue,to:Ie.to,level:Ie.level}),Ie.to>me&&(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;ne<U.widgets.length;ne++)U.widgets[ne].height&&(V+=U.widgets[ne].height);return D?V+(Math.ceil(U.text.length/O)||1)*t:V+t}}function ha(e){var t=e.doc,D=Da(e);t.iter(function(O){var U=D(O);U!=O.height&&jt(O,U)})}function Xn(e,t,D,O){var U=e.display;if(!D&&Ue(t).getAttribute("cm-not-content")=="true")return null;var V,ne,oe=U.lineSpace.getBoundingClientRect();try{V=t.clientX-oe.left,ne=t.clientY-oe.top}catch(je){return null}var ue=Lr(e,V,ne),me;if(O&&ue.xRel>0&&(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;O<D.length;O++)if(t-=D[O].size,t<0)return O}function un(e,t,D,O){t==null&&(t=e.doc.first),D==null&&(D=e.doc.first+e.doc.size),O||(O=0);var U=e.display;if(O&&D<U.viewTo&&(U.updateLineNumbers==null||U.updateLineNumbers>t)&&(U.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=U.viewTo)Ut&&Kt(e.doc,t)<U.viewTo&&_n(e);else if(D<=U.viewFrom)Ut&&Gt(e.doc,D+O)>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<me.lineN?me.lineN+=O:t<me.lineN+me.size&&(U.externalMeasured=null))}function An(e,t,D){e.curOp.viewChanged=!0;var O=e.display,U=e.display.externalMeasured;if(U&&t>=U.lineN&&t<U.lineN+U.size&&(O.externalMeasured=null),t<O.viewFrom||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;ue<U;ue++)oe+=ne[ue].size;if(oe!=t){if(O>0){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.viewFrom<t&&(O.view=O.view.slice(bn(e,t))),O.viewFrom=t,O.viewTo<D?O.view=O.view.concat(Aa(e,O.viewTo,D)):O.viewTo>D&&(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<t.length;O++){var U=t[O];!U.hidden&&(!U.node||U.changes)&&++D}return D}function an(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Fa(e,t){t===void 0&&(t=!0);for(var D=e.doc,O={},U=O.cursors=document.createDocumentFragment(),V=O.selection=document.createDocumentFragment(),ne=0;ne<D.sel.ranges.length;ne++){if(!t&&ne==D.sel.primIndex)continue;var oe=D.sel.ranges[ne];if(oe.from().line>=e.display.viewTo||oe.to().line<e.display.viewFrom)continue;var ue=oe.empty();(ue||e.options.showCursorWhenSelecting)&&Ja(e,oe.head,U),ue||tn(e,oe,V)}return O}function Ja(e,t,D){var O=Or(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),U=D.appendChild(_("div","\xA0","CodeMirror-cursor"));if(U.style.left=O.left+"px",U.style.top=O.top+"px",U.style.height=Math.max(0,O.bottom-O.top)*e.options.cursorHeight+"px",O.other){var V=D.appendChild(_("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));V.style.display="",V.style.left=O.other.left+"px",V.style.top=O.other.top+"px",V.style.height=(O.other.bottom-O.other.top)*.85+"px"}}function mn(e,t){return e.top-t.top||e.left-t.left}function tn(e,t,D){var O=e.display,U=e.doc,V=document.createDocumentFragment(),ne=Fe(e.display),oe=ne.left,ue=Math.max(O.sizerWidth,ke(e)-O.sizer.offsetLeft)-ne.right,me=U.direction=="ltr";function Ie(xt,kt,Yt,Wt){kt<0&&(kt=0),kt=Math.round(kt),Wt=Math.round(Wt),V.appendChild(_("div",null,"CodeMirror-selected","position: absolute; left: "+xt+`px;
top: `+kt+"px; width: "+(Yt==null?ue-xt:Yt)+`px;
height: `+(Wt-kt)+"px"))}function je(xt,kt,Yt){var Wt=dt(U,xt),Tr=Wt.text.length,xn,Zn;function Rn(Kn,Ta){return Sn(e,st(xt,Kn),"div",Wt,Ta)}function _a(Kn,Ta,aa){var Jn=It(e,Wt,null,Kn),zn=Ta=="ltr"==(aa=="after")?"left":"right",In=aa=="after"?Jn.begin:Jn.end-(/\s/.test(Wt.text.charAt(Jn.end-1))?2:1);return Rn(In,zn)[zn]}var wa=qe(Wt,U.direction);return Ge(wa,kt||0,Yt==null?Tr:Yt,function(Kn,Ta,aa,Jn){var zn=aa=="ltr",In=Rn(Kn,zn?"left":"right"),Sa=Rn(Ta-1,zn?"right":"left"),Zi=kt==null&&Kn==0,Si=Yt==null&&Ta==Tr,ca=Jn==0,ti=!wa||Jn==wa.length-1;if(Sa.top-In.top<=3){var qn=(me?Zi:Si)&&ca,ps=(me?Si:Zi)&&ti,fi=qn?oe:(zn?In:Sa).left,Mi=ps?ue:(zn?Sa:In).right;Ie(fi,In.top,Mi-fi,In.bottom)}else{var ki,va,qi,ms;zn?(ki=me&&Zi&&ca?oe:In.left,va=me?ue:_a(Kn,aa,"before"),qi=me?oe:_a(Ta,aa,"after"),ms=me&&Si&&ti?ue:Sa.right):(ki=me?_a(Kn,aa,"before"):oe,va=!me&&Zi&&ca?ue:In.right,qi=!me&&Si&&ti?oe:Sa.left,ms=me?_a(Ta,aa,"after"):ue),Ie(ki,In.top,va-ki,In.bottom),In.bottom<Sa.top&&Ie(oe,In.bottom,null,Sa.top),Ie(qi,Sa.top,ms-qi,Sa.bottom)}(!xn||mn(In,xn)<0)&&(xn=In),mn(Sa,xn)<0&&(xn=Sa),(!Zn||mn(In,Zn)<0)&&(Zn=In),mn(Sa,Zn)<0&&(Zn=Sa)}),{start:xn,end:Zn}}var et=t.from(),Ze=t.to();if(et.line==Ze.line)je(et.line,et.ch,Ze.ch);else{var ot=dt(U,et.line),lt=dt(U,Ze.line),vt=ra(ot)==ra(lt),bt=je(et.line,et.ch,vt?ot.text.length+1:null).end,Dt=je(Ze.line,vt?0:null,Ze.ch).start;vt&&(bt.top<Dt.top-2?(Ie(bt.right,bt.top,null,bt.bottom),Ie(oe,Dt.top,Dt.left,Dt.bottom)):Ie(bt.right,bt.top,Dt.left-bt.right,bt.bottom)),bt.bottom<Dt.top&&Ie(oe,bt.bottom,null,Dt.top)}D.appendChild(V)}function Vn(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var D=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?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<t.view.length;O++){var U=t.view[O],V=e.options.lineWrapping,ne=void 0,oe=0;if(U.hidden)continue;if(S&&f<8){var ue=U.node.offsetTop+U.node.offsetHeight;ne=ue-D,D=ue}else{var me=U.node.getBoundingClientRect();ne=me.bottom-me.top,!V&&U.text.firstChild&&(oe=U.text.firstChild.getBoundingClientRect().right-me.left-1)}var Ie=U.line.height-ne;if((Ie>.005||Ie<-.005)&&(jt(U.line,ne),to(U.line),U.rest))for(var je=0;je<U.rest.length;je++)to(U.rest[je]);if(oe>e.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<e.widgets.length;++t){var D=e.widgets[t],O=D.node.parentNode;O&&(D.height=O.offsetHeight)}}function Ii(e,t,D){var O=D&&D.top!=null?Math.max(0,D.top):e.scroller.scrollTop;O=Math.floor(O-Ua(e));var U=D&&D.bottom!=null?D.bottom:O+e.wrapper.clientHeight,V=Ar(t,O),ne=Ar(t,U);if(D&&D.ensure){var oe=D.ensure.from.line,ue=D.ensure.to.line;oe<V?(V=oe,ne=Ar(t,Xr(dt(t,oe))+e.wrapper.clientHeight)):Math.min(ue,t.lastLine())>=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.top<O,me=t.bottom>oe-O;if(t.top<U)ne.scrollTop=ue?0:t.top;else if(t.bottom>U+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.left<et?ne.scrollLeft=Math.max(0,t.left+je-(ot?0:10)):t.right>Ze+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.ops.length;O++)D.ops[O].cm.curOp=null;Oo(D)})}function Oo(e){for(var t=e.ops,D=0;D<t.length;D++)Jo(t[D]);for(var O=0;O<t.length;O++)Qo(t[O]);for(var U=0;U<t.length;U++)Zo(t[U]);for(var V=0;V<t.length;V++)oo(t[V]);for(var ne=0;ne<t.length;ne++)qo(t[ne])}function Jo(e){var t=e.cm,D=t.display;Ao(t),e.updateMaxLine&&yn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<D.viewFrom||e.scrollToPos.to.line>=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<t.doc.scrollLeft&&La(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var D=e.focus&&e.focus==G();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,D),(e.updatedDisplay||e.startHeight!=t.doc.height)&&si(t,e.barMeasure),e.updatedDisplay&&qr(t,e.barMeasure),e.selectionChanged&&Vn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),D&&Co(e.cm)}function qo(e){var t=e.cm,D=t.display,O=t.doc;if(e.updatedDisplay&&Fi(t,e.update),D.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(D.wheelStartX=D.wheelStartY=null),e.scrollTop!=null&&bi(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&La(t,e.scrollLeft,!0,!0),e.scrollToPos){var U=Yo(t,St(O,e.scrollToPos.from),St(O,e.scrollToPos.to),e.scrollToPos.margin);Vo(t,U)}var V=e.maybeHiddenMarkers,ne=e.maybeUnhiddenMarkers;if(V)for(var oe=0;oe<V.length;++oe)V[oe].lines.length||He(V[oe],"hide");if(ne)for(var ue=0;ue<ne.length;++ue)ne[ue].lines.length&&He(ne[ue],"unhide");D.wrapper.offsetHeight&&(O.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&He(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function pa(e,t){if(e.curOp)return t();qa(e);try{return t()}finally{li(e)}}function Un(e,t){return function(){if(e.curOp)return t.apply(e,arguments);qa(e);try{return t.apply(e,arguments)}finally{li(e)}}}function na(e){return function(){if(this.curOp)return e.apply(this,arguments);qa(this);try{return e.apply(this,arguments)}finally{li(this)}}}function Fn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);qa(t);try{return e.apply(this,arguments)}finally{li(t)}}}function Di(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,B(es,e))}function es(e){var t=e.doc;if(t.highlightFrontier>=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&&et<ne.length;++et)je=ne[et]!=V.styles[et];je&&U.push(O.line),V.stateAfter=O.save(),O.nextLine()}else V.text.length<=e.options.maxHighlightLength&&wt(e,V.text,O),V.stateAfter=O.line%5==0?O.save():null,O.nextLine();if(+new Date>D)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<U.length;V++)An(e,U[V],"text")})}var Ma=function(e,t,D){var O=e.display;this.viewport=t,this.visible=Ii(O,e.doc,t),this.editorIsHidden=!O.wrapper.offsetWidth,this.wrapperHeight=O.wrapper.clientHeight,this.wrapperWidth=O.wrapper.clientWidth,this.oldDisplayWidth=ke(e),this.force=D,this.dims=On(e),this.events=[]};Ma.prototype.signal=function(e,t){De(e,t)&&this.events.push(arguments)},Ma.prototype.finish=function(){for(var e=0;e<this.events.length;e++)He.apply(null,this.events[e])};function Ao(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=ze(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=ze(e)+"px",t.scrollbarsClipped=!0)}function Do(e){if(e.hasFocus())return null;var t=G();if(!t||!M(e.display.lineDiv,t))return null;var D={activeElt:t};if(window.getSelection){var O=window.getSelection();O.anchorNode&&O.extend&&M(e.display.lineDiv,O.anchorNode)&&(D.anchorNode=O.anchorNode,D.anchorOffset=O.anchorOffset,D.focusNode=O.focusNode,D.focusOffset=O.focusOffset)}return D}function Ro(e){if(!e||!e.activeElt||e.activeElt==G())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&M(document.body,e.anchorNode)&&M(document.body,e.focusNode)){var t=window.getSelection(),D=document.createRange();D.setEnd(e.anchorNode,e.anchorOffset),D.collapse(!1),t.removeAllRanges(),t.addRange(D),t.extend(e.focusNode,e.focusOffset)}}function ui(e,t){var D=e.display,O=e.doc;if(t.editorIsHidden)return _n(e),!1;if(!t.force&&t.visible.from>=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.viewFrom<V&&V-D.viewFrom<20&&(V=Math.max(O.first,D.viewFrom)),D.viewTo>ne&&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<ue.length;Ie++){var je=ue[Ie];if(!je.hidden)if(!je.node||je.node.parentNode!=V){var et=Tn(e,je,me,D);V.insertBefore(et,ne)}else{for(;ne!=je.node;)ne=oe(ne);var Ze=U&&t!=null&&t<=me&&je.lineNumber;je.changes&&(ee(je.changes,"gutter")>-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;ne<D.length;ne++)if(!D[ne].hidden){e.options.fixedGutter&&(D[ne].gutter&&(D[ne].gutter.style.left=V),D[ne].gutterBackground&&(D[ne].gutterBackground.style.left=V));var oe=D[ne].alignable;if(oe)for(var ue=0;ue<oe.length;ue++)oe[ue].style.left=V}e.options.fixedGutter&&(t.gutters.style.left=O+U+"px")}function Yn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,D=Sr(e.options,t.first+t.size-1),O=e.display;if(D.length!=O.lineNumChars){var U=O.measure.appendChild(_("div",[_("div",D)],"CodeMirror-linenumber CodeMirror-gutter-elt")),V=U.firstChild.offsetWidth,ne=U.offsetWidth-V;return O.lineGutter.style.width="",O.lineNumInnerWidth=Math.max(V,O.lineGutter.offsetWidth-ne)+1,O.lineNumWidth=O.lineNumInnerWidth+ne,O.lineNumChars=O.lineNumInnerWidth?D.length:-1,O.lineGutter.style.width=O.lineNumWidth+"px",Bi(e.display),!0}return!1}function ma(e,t){for(var D=[],O=!1,U=0;U<e.length;U++){var V=e[U],ne=null;if(typeof V!="string"&&(ne=V.style,V=V.className),V=="CodeMirror-linenumbers")if(t)O=!0;else continue;D.push({className:V,style:ne})}return t&&!O&&D.push({className:"CodeMirror-linenumbers",style:null}),D}function xi(e){var t=e.gutters,D=e.gutterSpecs;x(t),e.lineGutter=null;for(var O=0;O<D.length;++O){var U=D[O],V=U.className,ne=U.style,oe=t.appendChild(_("div",null,"CodeMirror-gutter "+V));ne&&(oe.style.cssText=ne),V=="CodeMirror-linenumbers"&&(e.lineGutter=oe,oe.style.width=(e.lineNumWidth||1)+"px")}t.style.display=D.length?"":"none",Bi(e)}function Ka(e){xi(e.display),un(e),Ir(e)}function Li(e,t,D,O){var U=this;this.input=D,U.scrollbarFiller=_("div",null,"CodeMirror-scrollbar-filler"),U.scrollbarFiller.setAttribute("cm-not-content","true"),U.gutterFiller=_("div",null,"CodeMirror-gutter-filler"),U.gutterFiller.setAttribute("cm-not-content","true"),U.lineDiv=I("div",null,"CodeMirror-code"),U.selectionDiv=_("div",null,null,"position: relative; z-index: 1"),U.cursorDiv=_("div",null,"CodeMirror-cursors"),U.measure=_("div",null,"CodeMirror-measure"),U.lineMeasure=_("div",null,"CodeMirror-measure"),U.lineSpace=I("div",[U.measure,U.lineMeasure,U.selectionDiv,U.cursorDiv,U.lineDiv],null,"position: relative; outline: none");var V=I("div",[U.lineSpace],"CodeMirror-lines");U.mover=_("div",[V],null,"position: relative"),U.sizer=_("div",[U.mover],"CodeMirror-sizer"),U.sizerWidth=null,U.heightForcer=_("div",null,null,"position: absolute; height: "+q+"px; width: 1px;"),U.gutters=_("div",null,"CodeMirror-gutters"),U.lineGutter=null,U.scroller=_("div",[U.sizer,U.heightForcer,U.gutters],"CodeMirror-scroll"),U.scroller.setAttribute("tabIndex","-1"),U.wrapper=_("div",[U.scrollbarFiller,U.gutterFiller,U.scroller],"CodeMirror"),S&&f<8&&(U.gutters.style.zIndex=-1,U.scroller.style.paddingRight=0),!a&&!(C&&n)&&(U.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(U.wrapper):e(U.wrapper)),U.viewFrom=U.viewTo=t.first,U.reportedViewFrom=U.reportedViewTo=t.first,U.view=[],U.renderedView=null,U.externalMeasured=null,U.viewOffset=0,U.lastWrapHeight=U.lastWrapWidth=0,U.updateLineNumbers=null,U.nativeBarWidth=U.barHeight=U.barWidth=0,U.scrollbarsClipped=!1,U.lineNumWidth=U.lineNumInnerWidth=U.lineNumChars=null,U.alignWidgets=!1,U.cachedCharWidth=U.cachedTextHeight=U.cachedPaddingH=null,U.maxLine=null,U.maxLineLength=0,U.maxLineChanged=!1,U.wheelDX=U.wheelDY=U.wheelStartX=U.wheelStartY=null,U.shift=!1,U.selForContextMenu=null,U.activeTouch=null,U.gutterSpecs=ma(O.gutters,O.lineNumbers),xi(U),D.init(U)}var ei=0,$n=null;S?$n=-.53:C?$n=15:r?$n=-.7:g&&($n=-1/3);function Wi(e){var t=e.wheelDeltaX,D=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),D==null&&e.detail&&e.axis==e.VERTICAL_AXIS?D=e.detail:D==null&&(D=e.wheelDelta),{x:t,y:D}}function so(e){var t=Wi(e);return t.x*=$n,t.y*=$n,t}function lo(e,t){var D=Wi(t),O=D.x,U=D.y,V=e.display,ne=V.scroller,oe=ne.scrollWidth>ne.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<Ie.length;je++)if(Ie[je].node==me){e.display.currentWheelTarget=me;break e}}if(O&&!C&&!E&&$n!=null){U&&ue&&yi(e,Math.max(0,ne.scrollTop+U*$n)),La(e,Math.max(0,ne.scrollLeft+O*$n)),(!U||U&&ue)&&de(t),V.wheelStartX=null;return}if(U&&$n!=null){var et=U*$n,Ze=e.doc.scrollTop,ot=Ze+V.wrapper.clientHeight;et<0?Ze=Math.max(0,Ze+et-50):ot=Math.min(e.doc.height,ot+et+50),Ri(e,{top:Ze,bottom:ot})}ei<20&&(V.wheelStartX==null?(V.wheelStartX=ne.scrollLeft,V.wheelStartY=ne.scrollTop,V.wheelDX=O,V.wheelDY=U,setTimeout(function(){if(V.wheelStartX==null)return;var lt=ne.scrollLeft-V.wheelStartX,vt=ne.scrollTop-V.wheelStartY,bt=vt&&V.wheelDY&&vt/V.wheelDY||lt&&V.wheelDX&&lt/V.wheelDX;if(V.wheelStartX=V.wheelStartY=null,!bt)return;$n=($n*ei+bt)/(ei+1),++ei},200)):(V.wheelDX+=O,V.wheelDY+=U))}var ga=function(e,t){this.ranges=e,this.primIndex=t};ga.prototype.primary=function(){return this.ranges[this.primIndex]},ga.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var D=this.ranges[t],O=e.ranges[t];if(!jr(D.anchor,O.anchor)||!jr(D.head,O.head))return!1}return!0},ga.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Qr($r(this.ranges[t].anchor),$r(this.ranges[t].head));return new ga(e,this.primIndex)},ga.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ga.prototype.contains=function(e,t){t||(t=e);for(var D=0;D<this.ranges.length;D++){var O=this.ranges[D];if(Ot(t,O.from())>=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;V<t.length;V++){var ne=t[V],oe=t[V-1],ue=Ot(oe.to(),ne.from());if(O&&!ne.empty()?ue>0: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;O<e.sel.ranges.length;O++){var U=e.sel.ranges[O];D.push(new Qr(uo(U.anchor,t),uo(U.head,t)))}return ka(e.cm,D,e.sel.primIndex)}function Mo(e,t,D){return e.line==t.line?st(D.line,e.ch-t.ch+D.ch):st(D.line+(e.line-t.line),e.ch)}function ko(e,t,D){for(var O=[],U=st(e.first,0),V=U,ne=0;ne<t.length;ne++){var oe=t[ne],ue=Mo(oe.from,U,V),me=Mo(Ga(oe),U,V);if(U=oe.to,V=me,D=="around"){var Ie=e.sel.ranges[ne],je=Ot(Ie.head,Ie.anchor)<0;O[ne]=new Qr(je?me:ue,je?ue:me)}else O[ne]=new Qr(ue,ue)}return new ga(O,e.sel.primIndex)}function ci(e){e.doc.mode=$t(e.options,e.doc.modeOption),co(e)}function co(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Di(e,100),e.state.modeGen++,e.curOp&&un(e)}function gs(e,t){return t.from.ch==0&&t.to.ch==0&&re(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,t,D,O){function U(Dt){return D?D[Dt]:null}function V(Dt,xt,kt){xr(Dt,xt,kt,O),vr(Dt,"change",Dt,t)}function ne(Dt,xt){for(var kt=[],Yt=Dt;Yt<xt;++Yt)kt.push(new rn(me[Yt],U(Yt),O));return kt}var oe=t.from,ue=t.to,me=t.text,Ie=dt(e,oe.line),je=dt(e,ue.line),et=re(me),Ze=U(me.length-1),ot=ue.line-oe.line;if(t.full)e.insert(0,ne(0,me.length)),e.remove(me.length,e.size-me.length);else if(gs(e,t)){var lt=ne(0,me.length-1);V(je,je.text,Ze),ot&&e.remove(oe.line,ot),lt.length&&e.insert(oe.line,lt)}else if(Ie==je)if(me.length==1)V(Ie,Ie.text.slice(0,oe.ch)+et+Ie.text.slice(ue.ch),Ze);else{var vt=ne(1,me.length-1);vt.push(new rn(et+Ie.text.slice(ue.ch),Ze,O)),V(Ie,Ie.text.slice(0,oe.ch)+me[0],U(0)),e.insert(oe.line+1,vt)}else if(me.length==1)V(Ie,Ie.text.slice(0,oe.ch)+me[0]+je.text.slice(ue.ch),U(0)),e.remove(oe.line+1,ot);else{V(Ie,Ie.text.slice(0,oe.ch)+me[0],U(0)),V(je,et+je.text.slice(ue.ch),Ze);var bt=ne(1,me.length-1);ot>1&&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;oe<U.linked.length;++oe){var ue=U.linked[oe];if(ue.doc==V)continue;var me=ne&&ue.sharedHist;if(D&&!me)continue;t(ue.doc,me),O(ue.doc,U,me)}}O(e,null,!0)}function vs(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ha(e),ci(e),ys(e),e.options.lineWrapping||yn(e),e.options.mode=t.modeOption,un(e)}function ys(e){(e.doc.direction=="rtl"?K:b)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){pa(e,function(){ys(e),un(e)})}function Po(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function rs(e,t){var D={from:$r(t.from),to:Ga(t),text:or(e,t.from,t.to)};return Es(e,D,t.from.line,t.to.line+1),Ei(e,function(O){return Es(O,D,t.from.line,t.to.line+1)},!0),D}function bs(e){for(;e.length;){var t=re(e);if(t.ranges)e.pop();else break}}function ml(e,t){if(t)return bs(e.done),re(e.done);if(e.done.length&&!re(e.done).ranges)return re(e.done);if(e.done.length>1&&!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<e.length;++D)e[D].marker.explicitlyCleared?t||(t=e.slice(0,D)):t&&t.push(e[D]);return t?t.length?t:null:e}function bl(e,t){var D=t["spans_"+e.id];if(!D)return null;for(var O=[],U=0;U<t.text.length;++U)O.push(yl(D[U]));return O}function ws(e,t){var D=bl(e,t),O=ea(e,t);if(!D)return O;if(!O)return D;for(var U=0;U<D.length;++U){var V=D[U],ne=O[U];if(V&&ne){e:for(var oe=0;oe<ne.length;++oe){for(var ue=ne[oe],me=0;me<V.length;++me)if(V[me].marker==ue.marker)continue e;V.push(ue)}}else ne&&(D[U]=ne)}return D}function Ki(e,t,D){for(var O=[],U=0;U<e.length;++U){var V=e[U];if(V.ranges){O.push(D?ga.prototype.deepCopy.call(V):V);continue}var ne=V.changes,oe=[];O.push({changes:oe});for(var ue=0;ue<ne.length;++ue){var me=ne[ue],Ie=void 0;if(oe.push({from:me.from,to:me.to,text:me.text}),t)for(var je in me)(Ie=je.match(/^spans_(\d+)$/))&&(ee(t,Number(Ie[1]))>-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<e.sel.ranges.length;V++)O[V]=ns(e.sel.ranges[V],t[V],null,U);var ne=ka(e.cm,O,e.sel.primIndex);ua(e,ne,D)}function as(e,t,D,O){var U=e.sel.ranges.slice(0);U[t]=D,ua(e,ka(e.cm,U,e.sel.primIndex),O)}function Ss(e,t,D,O){ua(e,za(t,D),O)}function xl(e,t,D){var O={ranges:t.ranges,update:function(U){this.ranges=[];for(var V=0;V<U.length;V++)this.ranges[V]=new Qr(St(e,U[V].anchor),St(e,U[V].head))},origin:D&&D.origin};return He(e,"beforeSelectionChange",e,O),e.cm&&He(e.cm,"beforeSelectionChange",e.cm,O),O.ranges!=t.ranges?ka(e.cm,O.ranges,O.ranges.length-1):t}function Cs(e,t,D){var O=e.history.done,U=re(O);U&&U.ranges?(O[O.length-1]=t,jo(e,t,D)):ua(e,t,D)}function ua(e,t,D){jo(e,t,D),vl(e,e.sel,e.cm?e.cm.curOp.id:NaN,D)}function jo(e,t,D){(De(e,"beforeSelectionChange")||e.cm&&De(e.cm,"beforeSelectionChange"))&&(t=xl(e,t,D));var O=D&&D.bias||(Ot(t.primary().head,e.sel.primary().head)<0?-1:1);_s(e,As(e,t,O,!0)),!(D&&D.scroll===!1)&&e.cm&&gi(e.cm)}function _s(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Me(e.cm)),vr(e,"cursorActivity",e)}function Os(e){_s(e,As(e,e.sel,null,!1))}function As(e,t,D,O){for(var U,V=0;V<t.ranges.length;V++){var ne=t.ranges[V],oe=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[V],ue=Uo(e,ne.anchor,oe&&oe.anchor,D,O),me=Uo(e,ne.head,oe&&oe.head,D,O);(U||ue!=ne.anchor||me!=ne.head)&&(U||(U=t.ranges.slice(0,V)),U[V]=new Qr(ue,me))}return U?ka(e.cm,U,t.primIndex):t}function zi(e,t,D,O,U){var V=dt(e,t.line);if(V.markedSpans)for(var ne=0;ne<V.markedSpans.length;++ne){var oe=V.markedSpans[ne],ue=oe.marker,me="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,Ie="selectRight"in ue?!ue.selectRight:ue.inclusiveRight;if((oe.from==null||(me?oe.from<=t.ch:oe.from<t.ch))&&(oe.to==null||(Ie?oe.to>=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<e.first+e.size-1?st(t.line+1,0):null:new st(t.line,t.ch+D)}function Rs(e){e.setSelection(st(e.firstLine(),0),st(e.lastLine()),pe)}function Ls(e,t,D){var O={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return O.canceled=!0}};return D&&(O.update=function(U,V,ne,oe){U&&(O.from=St(e,U)),V&&(O.to=St(e,V)),ne&&(O.text=ne),oe!==void 0&&(O.origin=oe)}),He(e,"beforeChange",e,O),e.cm&&He(e.cm,"beforeChange",e.cm,O),O.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:O.from,to:O.to,text:O.text,origin:O.origin}}function Gi(e,t,D){if(e.cm){if(!e.cm.curOp)return Un(e.cm,Gi)(e,t,D);if(e.cm.state.suppressEdits)return}if((De(e,"beforeChange")||e.cm&&De(e.cm,"beforeChange"))&&(t=Ls(e,t,!0),!t))return;var O=zt&&!D&&Ca(e,t.from,t.to);if(O)for(var U=O.length-1;U>=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<oe.length&&!(V=oe[me],D?V.ranges&&!V.equals(e.sel):!V.ranges);me++);if(me==oe.length)return;for(U.lastOrigin=U.lastSelOrigin=null;;)if(V=oe.pop(),V.ranges){if(Io(V,ue),D&&!V.equals(e.sel)){ua(e,V,{clearRedo:!1});return}ne=V}else if(O){oe.push(V);return}else break;var Ie=[];Io(ne,ue),ue.push({changes:Ie,generation:U.generation}),U.generation=V.generation||++U.maxGeneration;for(var je=De(e,"beforeChange")||e.cm&&De(e.cm,"beforeChange"),et=function(lt){var vt=V.changes[lt];if(vt.origin=t,je&&!Ls(e,vt,!1))return oe.length=0,{};Ie.push(rs(e,vt));var bt=lt?Hi(e,vt):re(oe);fo(e,vt,bt,ws(e,vt)),!lt&&e.cm&&e.cm.scrollIntoView({from:vt.from,to:Ga(vt)});var Dt=[];Ei(e,function(xt,kt){!kt&&ee(Dt,xt.history)==-1&&(Ns(xt.history,vt),Dt.push(xt.history)),fo(xt,vt,null,ws(xt,vt))})},Ze=V.changes.length-1;Ze>=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;O<D.viewTo;O++)An(e.cm,O,"gutter")}}function fo(e,t,D,O){if(e.cm&&!e.cm.curOp)return Un(e.cm,fo)(e,t,D,O);if(t.to.line<e.first){ks(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var U=t.text.length-1-(e.first-t.from.line);ks(e,U),t={from:st(e.first,0),to:st(t.to.line+U,t.to.ch),text:[re(t.text)],origin:t.origin}}var V=e.lastLine();t.to.line>V&&(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){D<e.line?e.line+=O:t<e.line&&(e.line=t,e.ch=0)}function Is(e,t,D,O){for(var U=0;U<e.length;++U){var V=e[U],ne=!0;if(V.ranges){V.copied||(V=e[U]=V.deepCopy(),V.copied=!0);for(var oe=0;oe<V.ranges.length;oe++)Ps(V.ranges[oe].anchor,t,D,O),Ps(V.ranges[oe].head,t,D,O);continue}for(var ue=0;ue<V.changes.length;++ue){var me=V.changes[ue];if(D<me.from.line)me.from=st(me.from.line+O,me.from.ch),me.to=st(me.to.line+O,me.to.ch);else if(t<=me.to.line){ne=!1;break}}ne||(e.splice(0,U+1),U=0)}}function Ns(e,t){var D=t.from.line,O=t.to.line,U=t.text.length-(O-D)-1;Is(e.done,D,O,U),Is(e.undone,D,O,U)}function ho(e,t,D,O){var U=t,V=t;return typeof t=="number"?V=dt(e,Zr(e,t)):U=Rt(t),U==null?null:(O(V,U)&&e.cm&&An(e.cm,U,D),V)}function po(e){this.lines=e,this.parent=null;for(var t=0,D=0;D<e.length;++D)e[D].parent=this,t+=e[D].height;this.height=t}po.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var D=e,O=e+t;D<O;++D){var U=this.lines[D];this.height-=U.height,fn(U),vr(U,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,D){this.height+=D,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var O=0;O<t.length;++O)t[O].parent=this},iterN:function(e,t,D){for(var O=e+t;e<O;++e)if(D(this.lines[e]))return!0}};function mo(e){this.children=e;for(var t=0,D=0,O=0;O<e.length;++O){var U=e[O];t+=U.chunkSize(),D+=U.height,U.parent=this}this.size=t,this.height=D,this.parent=null}mo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var D=0;D<this.children.length;++D){var O=this.children[D],U=O.chunkSize();if(e<U){var V=Math.min(t,U-e),ne=O.height;if(O.removeInner(e,V),this.height-=ne-O.height,U==V&&(this.children.splice(D--,1),O.parent=null),(t-=V)==0)break;e=0}else e-=U}if(this.size-t<25&&(this.children.length>1||!(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;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,D){this.size+=t.length,this.height+=D;for(var O=0;O<this.children.length;++O){var U=this.children[O],V=U.chunkSize();if(e<=V){if(U.insertInner(e,t,D),U.lines&&U.lines.length>50){for(var ne=U.lines.length%25+25,oe=ne;oe<U.lines.length;){var ue=new po(U.lines.slice(oe,oe+=25));U.height-=ue.height,this.children.splice(++O,0,ue),ue.parent=this}U.lines=U.lines.slice(0,ne),this.maybeSpill()}break}e-=V}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),D=new mo(t);if(e.parent){e.size-=D.size,e.height-=D.height;var U=ee(e.parent.children,e);e.parent.children.splice(U+1,0,D)}else{var O=new mo(e.children);O.parent=e,e.children=[O,D],e=O}D.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,D){for(var O=0;O<this.children.length;++O){var U=this.children[O],V=U.chunkSize();if(e<V){var ne=Math.min(t,V-e);if(U.iterN(e,ne,D))return!0;if((t-=ne)==0)break;e=0}else e-=V}}};var go=function(e,t,D){if(D)for(var O in D)D.hasOwnProperty(O)&&(this[O]=D[O]);this.doc=e,this.node=t};go.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,D=this.line,O=Rt(D);if(O==null||!t)return;for(var U=0;U<t.length;++U)t[U]==this&&t.splice(U--,1);t.length||(D.widgets=null);var V=jn(this);jt(D,Math.max(0,D.height-V)),e&&(pa(e,function(){js(e,D,-V),An(e,O,"widget")}),vr(e,"lineWidgetCleared",e,this,O))},go.prototype.changed=function(){var e=this,t=this.height,D=this.doc.cm,O=this.line;this.height=null;var U=jn(this)-t;if(!U)return;gr(this.doc,O)||jt(O,O.height+U),D&&pa(D,function(){D.curOp.forceUpdate=!0,js(D,O,U),vr(D,"lineWidgetChanged",D,e,Rt(O))})},Te(go);function js(e,t,D){Xr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&no(e,D)}function wl(e,t,D,O){var U=new go(e,D,O),V=e.cm;return V&&U.noHScroll&&(V.display.alignWidgets=!0),ho(e,t,"widget",function(ne){var oe=ne.widgets||(ne.widgets=[]);if(U.insertAt==null?oe.push(U):oe.splice(Math.min(oe.length-1,Math.max(0,U.insertAt)),0,U),U.line=ne,V&&!gr(e,ne)){var ue=Xr(ne)<e.scrollTop;jt(ne,ne.height+jn(U)),ue&&no(V,U.height),V.curOp.forceUpdate=!0}return!0}),V&&vr(V,"lineWidgetAdded",V,U,typeof t=="number"?t:Rt(t)),U}var Us=0,wi=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Us};wi.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&qa(e),De(this,"clear")){var D=this.find();D&&vr(this,"clear",D.from,D.to)}for(var O=null,U=null,V=0;V<this.lines.length;++V){var ne=this.lines[V],oe=on(ne.markedSpans,this);e&&!this.collapsed?An(e,Rt(ne),"text"):e&&(oe.to!=null&&(U=Rt(ne)),oe.from!=null&&(O=Rt(ne))),ne.markedSpans=Ln(ne.markedSpans,oe),oe.from==null&&this.collapsed&&!gr(this.doc,ne)&&e&&jt(ne,Pn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var me=ra(this.lines[ue]),Ie=Vr(me);Ie>e.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;U<this.lines.length;++U){var V=this.lines[U],ne=on(V.markedSpans,this);if(ne.from!=null&&(D=st(t?V:Rt(V),ne.from),e==-1))return D;if(ne.to!=null&&(O=st(t?V:Rt(V),ne.to),e==1))return O}return D&&{from:D,to:O}},wi.prototype.changed=function(){var e=this,t=this.find(-1,!0),D=this,O=this.doc.cm;if(!t||!O)return;pa(O,function(){var U=t.line,V=Rt(t.line),ne=We(O,V);if(ne&&(ar(ne),O.curOp.selectionChanged=O.curOp.forceUpdate=!0),O.curOp.updateMaxLine=!0,!gr(D.doc,U)&&D.height!=null){var oe=D.height;D.height=null;var ue=jn(D)-oe;ue&&jt(U,U.height+ue)}vr(O,"markerChanged",O,e)})},wi.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||ee(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},wi.prototype.detachLine=function(e){if(this.lines.splice(ee(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Te(wi);function Vi(e,t,D,O,U){if(O&&O.shared)return Tl(e,t,D,O,U);if(e.cm&&!e.cm.curOp)return Un(e.cm,Vi)(e,t,D,O,U);var V=new wi(e,U),ne=Ot(t,D);if(O&&W(O,V,!1),ne>0||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<e.length;++D)e[D].parent=this};vo.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();vr(this,"clear")},vo.prototype.find=function(e,t){return this.primary.find(e,t)},Te(vo);function Tl(e,t,D,O,U){O=W(O),O.shared=!1;var V=[Vi(e,t,D,O,U)],ne=V[0],oe=O.widgetNode;return Ei(e,function(ue){oe&&(O.widgetNode=oe.cloneNode(!0)),V.push(Vi(ue,St(ue,t),St(ue,D),O,U));for(var me=0;me<ue.linked.length;++me)if(ue.linked[me].isParent)return;ne=re(V)}),new vo(V,ne)}function Fs(e){return e.findMarks(st(e.first,0),e.clipPos(st(e.lastLine())),function(t){return t.parent})}function Sl(e,t){for(var D=0;D<t.length;D++){var O=t[D],U=O.find(),V=e.clipPos(U.from),ne=e.clipPos(U.to);if(Ot(V,ne)){var oe=Vi(e,V,ne,O.primary,O.primary.type);O.markers.push(oe),oe.parent=O}}}function Cl(e){for(var t=function(O){var U=e[O],V=[U.primary.doc];Ei(U.primary.doc,function(ue){return V.push(ue)});for(var ne=0;ne<U.markers.length;ne++){var oe=U.markers[ne];ee(V,oe.doc)==-1&&(oe.parent=null,U.markers.splice(ne--,1))}},D=0;D<e.length;D++)t(D)}var _l=0,Ea=function(e,t,D,O,U){if(!(this instanceof Ea))return new Ea(e,t,D,O,U);D==null&&(D=0),mo.call(this,[new po([new rn("",null)])]),this.first=D,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=D;var V=st(D,0);this.sel=za(V),this.history=new Po(null),this.id=++_l,this.modeOption=t,this.lineSep=O,this.direction=U=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ts(this,{from:V,to:V,text:e}),ua(this,za(V),pe)};Ea.prototype=Ee(mo.prototype,{constructor:Ea,iter:function(e,t,D){D?this.iterN(e-this.first,t-e,D):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var D=0,O=0;O<t.length;++O)D+=t[O].height;this.insertInner(e-this.first,t,D)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Mr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Fn(function(e){var t=st(this.first,0),D=this.first+this.size-1;Gi(this,{from:t,to:st(D,dt(this,D).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&vi(this.cm,0,0),ua(this,za(t),pe)}),replaceRange:function(e,t,D,O){t=St(this,t),D=D?St(this,D):t,Xi(this,e,t,D,O)},getRange:function(e,t,D){var O=or(this,St(this,e),St(this,t));return D===!1?O:O.join(D||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(dn(this,e))return dt(this,e)},getLineNumber:function(e){return Rt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=dt(this,e)),ra(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return St(this,e)},getCursor:function(e){var t=this.sel.primary(),D;return e==null||e=="head"?D=t.head:e=="anchor"?D=t.anchor:e=="end"||e=="to"||e===!1?D=t.to():D=t.from(),D},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Fn(function(e,t,D){Ss(this,St(this,typeof e=="number"?st(e,t||0):e),null,D)}),setSelection:Fn(function(e,t,D){Ss(this,St(this,e),St(this,t||e),D)}),extendSelection:Fn(function(e,t,D){No(this,St(this,e),t&&St(this,t),D)}),extendSelections:Fn(function(e,t){Ts(this,Ur(this,e),t)}),extendSelectionsBy:Fn(function(e,t){var D=be(this.sel.ranges,e);Ts(this,Ur(this,D),t)}),setSelections:Fn(function(e,t,D){if(!e.length)return;for(var O=[],U=0;U<e.length;U++)O[U]=new Qr(St(this,e[U].anchor),St(this,e[U].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),ua(this,ka(this.cm,O,t),D)}),addSelection:Fn(function(e,t,D){var O=this.sel.ranges.slice(0);O.push(new Qr(St(this,e),St(this,t||e))),ua(this,ka(this.cm,O,O.length-1),D)}),getSelection:function(e){for(var t=this.sel.ranges,D,O=0;O<t.length;O++){var U=or(this,t[O].from(),t[O].to());D=D?D.concat(U):U}return e===!1?D:D.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],D=this.sel.ranges,O=0;O<D.length;O++){var U=or(this,D[O].from(),D[O].to());e!==!1&&(U=U.join(e||this.lineSeparator())),t[O]=U}return t},replaceSelection:function(e,t,D){for(var O=[],U=0;U<this.sel.ranges.length;U++)O[U]=e;this.replaceSelections(O,t,D||"+input")},replaceSelections:Fn(function(e,t,D){for(var O=[],U=this.sel,V=0;V<U.ranges.length;V++){var ne=U.ranges[V];O[V]={from:ne.from(),to:ne.to(),text:this.splitLines(e[V]),origin:D}}for(var oe=t&&t!="end"&&ko(this,O,t),ue=O.length-1;ue>=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.done.length;O++)e.done[O].ranges||++t;for(var U=0;U<e.undone.length;U++)e.undone[U].ranges||++D;return{undo:t,redo:D}},clearHistory:function(){var e=this;this.history=new Po(this.history.maxGeneration),Ei(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Ki(this.history.done),undone:Ki(this.history.undone)}},setHistory:function(e){var t=this.history=new Po(this.history.maxGeneration);t.done=Ki(e.done.slice(0),null,!0),t.undone=Ki(e.undone.slice(0),null,!0)},setGutterMarker:Fn(function(e,t,D){return ho(this,e,"gutter",function(O){var U=O.gutterMarkers||(O.gutterMarkers={});return U[t]=D,!D&&Q(U)&&(O.gutterMarkers=null),!0})}),clearGutter:Fn(function(e){var t=this;this.iter(function(D){D.gutterMarkers&&D.gutterMarkers[e]&&ho(t,D,"gutter",function(){return D.gutterMarkers[e]=null,Q(D.gutterMarkers)&&(D.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!dn(this,e))return null;if(t=e,e=dt(this,e),!e)return null}else if(t=Rt(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Fn(function(e,t,D){return ho(this,e,t=="gutter"?"gutter":"class",function(O){var U=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!O[U])O[U]=D;else{if(A(D).test(O[U]))return!1;O[U]+=" "+D}return!0})}),removeLineClass:Fn(function(e,t,D){return ho(this,e,t=="gutter"?"gutter":"class",function(O){var U=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",V=O[U];if(V)if(D==null)O[U]=null;else{var ne=V.match(A(D));if(!ne)return!1;var oe=ne.index+ne[0].length;O[U]=V.slice(0,ne.index)+(!ne.index||oe==V.length?"":" ")+V.slice(oe)||null}else return!1;return!0})}),addLineWidget:Fn(function(e,t,D){return wl(this,e,t,D)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,D){return Vi(this,St(this,e),St(this,t),D,D&&D.type||"range")},setBookmark:function(e,t){var D={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=St(this,e),Vi(this,e,e,D,"bookmark")},findMarksAt:function(e){e=St(this,e);var t=[],D=dt(this,e.line).markedSpans;if(D)for(var O=0;O<D.length;++O){var U=D[O];(U.from==null||U.from<=e.ch)&&(U.to==null||U.to>=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<ne.length;oe++){var ue=ne[oe];!(ue.to!=null&&U==e.line&&e.ch>=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;O<D.length;++O)D[O].from!=null&&e.push(D[O].marker)}),e},posFromIndex:function(e){var t,D=this.first,O=this.lineSeparator().length;return this.iter(function(U){var V=U.text.length+O;if(V>e)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.line<this.first||e.ch<0)return 0;var D=this.lineSeparator().length;return this.iter(this.first,e.line,function(O){t+=O.text.length+D}),t},copy:function(e){var t=new Ea(Mr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,D=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<D&&(D=e.to);var O=new Ea(Mr(this,t,D),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(O.history=this.history),(this.linked||(this.linked=[])).push({doc:O,sharedHist:e.sharedHist}),O.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Sl(O,Fs(this)),O},unlinkDoc:function(e){if(e instanceof Dn&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var D=this.linked[t];if(D.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),Cl(Fs(this));break}if(e.history==this.history){var O=[e.id];Ei(e,function(U){return O.push(U.id)},!0),e.history=new Po(null),e.history.done=Ki(this.history.done,O),e.history.undone=Ki(this.history.undone,O)}},iterLinkedDocs:function(e){Ei(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):At(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Fn(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&pl(this.cm)})}),Ea.prototype.eachLine=Ea.prototype.iter;var Bs=0;function Ol(e){var t=this;if(Ws(t),$e(t,e)||Hn(t.display,e))return;de(e),S&&(Bs=+new Date);var D=Xn(t,e,!0),O=e.dataTransfer.files;if(!D||t.isReadOnly())return;if(O&&O.length&&window.FileReader&&window.File)for(var U=O.length,V=Array(U),ne=0,oe=function(){++ne==U&&Un(t,function(){D=St(t.doc,D);var Ze={from:D,to:D,text:t.doc.splitLines(V.filter(function(ot){return ot!=null}).join(t.doc.lineSeparator())),origin:"paste"};Gi(t.doc,Ze),Cs(t.doc,za(St(t.doc,D),St(t.doc,Ga(Ze))))})()},ue=function(Ze,ot){if(t.options.allowDropFileTypes&&ee(t.options.allowDropFileTypes,Ze.type)==-1){oe();return}var lt=new FileReader;lt.onerror=function(){return oe()},lt.onload=function(){var vt=lt.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(vt)){oe();return}V[ot]=vt,oe()},lt.readAsText(Ze)},me=0;me<O.length;me++)ue(O[me],me);else{if(t.state.draggingText&&t.doc.sel.contains(D)>-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<je.length;++et)Xi(t.doc,"",je[et].anchor,je[et].head,"drag");t.replaceSelection(Ie,"around","paste"),t.display.input.focus()}}catch(Ze){}}}function Al(e,t){if(S&&(!e.state.draggingText||+new Date-Bs<100)){_e(t);return}if($e(e,t)||Hn(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!g){var D=_("img",null,null,"position: fixed; left: 0; top: 0;");D.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",E&&(D.width=D.height=1,e.display.wrapper.appendChild(D),D._top=D.offsetTop),t.dataTransfer.setDragImage(D,0,0),E&&D.parentNode.removeChild(D)}}function Dl(e,t){var D=Xn(e,t);if(!D)return;var O=document.createDocumentFragment();Ja(e,D,O),e.display.dragCursor||(e.display.dragCursor=_("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),y(e.display.dragCursor,O)}function Ws(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Hs(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),D=[],O=0;O<t.length;O++){var U=t[O].CodeMirror;U&&D.push(U)}D.length&&D[0].operation(function(){for(var V=0;V<D.length;V++)e(D[V])})}var Ks=!1;function Rl(){if(Ks)return;Ll(),Ks=!0}function Ll(){var e;Ce(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Hs(Ml)},100))}),Ce(window,"blur",function(){return Hs(mi)})}function Ml(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ti={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},yo=0;yo<10;yo++)Ti[yo+48]=Ti[yo+96]=String(yo);for(var Bo=65;Bo<=90;Bo++)Ti[Bo]=String.fromCharCode(Bo);for(var bo=1;bo<=12;bo++)Ti[bo+111]=Ti[bo+63235]="F"+bo;var di={};di.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},di.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},di.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},di.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},di.default=l?di.macDefault:di.pcDefault;function kl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var D,O,U,V,ne=0;ne<t.length-1;ne++){var oe=t[ne];if(/^(cmd|meta|m)$/i.test(oe))V=!0;else if(/^a(lt)?$/i.test(oe))D=!0;else if(/^(c|ctrl|control)$/i.test(oe))O=!0;else if(/^s(hift)?$/i.test(oe))U=!0;else throw new Error("Unrecognized modifier name: "+oe)}return D&&(e="Alt-"+e),O&&(e="Ctrl-"+e),V&&(e="Cmd-"+e),U&&(e="Shift-"+e),e}function Pl(e){var t={};for(var D in e)if(e.hasOwnProperty(D)){var O=e[D];if(/^(name|fallthrough|(de|at)tach)$/.test(D))continue;if(O=="..."){delete e[D];continue}for(var U=be(D.split(" "),kl),V=0;V<U.length;V++){var ne=void 0,oe=void 0;V==U.length-1?(oe=U.join(" "),ne=O):(oe=U.slice(0,V+1).join(" "),ne="...");var ue=t[oe];if(!ue)t[oe]=ne;else if(ue!=ne)throw new Error("Inconsistent bindings for "+oe)}delete e[D]}for(var me in t)e[me]=t[me];return e}function Yi(e,t,D,O){t=Wo(t);var U=t.call?t.call(e,O):t[e];if(U===!1)return"nothing";if(U==="...")return"multi";if(U!=null&&D(U))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Yi(e,t.fallthrough,D,O);for(var V=0;V<t.fallthrough.length;V++){var ne=Yi(e,t.fallthrough[V],D,O);if(ne)return ne}}}function zs(e){var t=typeof e=="string"?e:Ti[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Gs(e,t,D){var O=e;return t.altKey&&O!="Alt"&&(e="Alt-"+e),(i?t.metaKey:t.ctrlKey)&&O!="Ctrl"&&(e="Ctrl-"+e),(i?t.ctrlKey:t.metaKey)&&O!="Mod"&&(e="Cmd-"+e),!D&&t.shiftKey&&O!="Shift"&&(e="Shift-"+e),e}function Xs(e,t){if(E&&e.keyCode==34&&e.char)return!1;var D=Ti[e.keyCode];return D==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(D=e.code),Gs(D,e,t))}function Wo(e){return typeof e=="string"?di[e]:e}function $i(e,t){for(var D=e.doc.sel.ranges,O=[],U=0;U<D.length;U++){for(var V=t(D[U]);O.length&&Ot(V.from,re(O).to)<=0;){var ne=O.pop();if(Ot(ne.from,V.from)<0){V.from=ne.from;break}}O.push(V)}pa(e,function(){for(var oe=O.length-1;oe>=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<D.ch))return os(t,D,O);var oe=function(bt,Dt){return is(t,bt instanceof st?bt.ch:bt,Dt)},ue,me=function(bt){return e.options.lineWrapping?(ue=ue||Be(e,t),It(e,t,ue,bt)):{begin:0,end:t.text.length}},Ie=me(D.sticky=="before"?oe(D,-1):D.ch);if(e.doc.direction=="rtl"||ne.level==1){var je=ne.level==1==O<0,et=oe(D,je?1:-1);if(et!=null&&(je?et<=ne.to&&et<=Ie.end:et>=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&&bt<U.length;bt+=Dt){var Yt=U[bt],Wt=Dt>0==(Yt.level!=1),Tr=Wt?xt.begin:oe(xt.end,-1);if(Yt.from<=Tr&&Tr<Yt.to)return kt(Tr,Wt);if(Tr=Wt?Yt.from:oe(Yt.to,-1),xt.begin<=Tr&&Tr<xt.end)return kt(Tr,Wt)}},lt=ot(V+O,O,Ie);if(lt)return lt;var vt=O>0?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.line<e.lastLine()?{from:t.head,to:st(t.head.line+1,0)}:{from:t.head,to:st(t.head.line,D)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return $i(e,function(t){return{from:st(t.from().line,0),to:St(e.doc,st(t.to().line+1,0))}})},delLineLeft:function(e){return $i(e,function(t){return{from:st(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return $i(e,function(t){var D=e.charCoords(t.head,"div").top+5,O=e.coordsChar({left:0,top:D},"div");return{from:O,to:t.from()}})},delWrappedLineRight:function(e){return $i(e,function(t){var D=e.charCoords(t.head,"div").top+5,O=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:D},"div");return{from:t.from(),to:O}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(st(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(st(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Vs(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Ys(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Nl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var D=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:D},"div")},Oe)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var D=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:D},"div")},Oe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var D=e.cursorCoords(t.head,"div").top+5,O=e.coordsChar({left:0,top:D},"div");return O.ch<e.getLine(O.line).search(/\S/)?Ys(e,t.head):O},Oe)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],D=e.listSelections(),O=e.options.tabSize,U=0;U<D.length;U++){var V=D[U].from(),ne=F(e.getLine(V.line),V.ch,O);t.push(se(O-ne%O))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return pa(e,function(){for(var t=e.listSelections(),D=[],O=0;O<t.length;O++){if(!t[O].empty())continue;var U=t[O].head,V=dt(e.doc,U.line).text;if(V){if(U.ch==V.length&&(U=new st(U.line,U.ch-1)),U.ch>0)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;O<t.length;O++)e.indentLine(t[O].from().line,null,!0);gi(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Vs(e,t){var D=dt(e.doc,t),O=ra(D);return O!=D&&(t=Rt(O)),ss(!0,e,O,t,1)}function Nl(e,t){var D=dt(e.doc,t),O=Wa(D);return O!=D&&(t=Rt(O)),ss(!0,e,D,t,-1)}function Ys(e,t){var D=Vs(e,t.line),O=dt(e.doc,D.line),U=qe(O,e.doc.direction);if(!U||U[0].level==0){var V=Math.max(D.ch,O.text.search(/\S/)),ne=t.line==D.line&&t.ch<=V&&t.ch;return st(D.line,ne?0:V,D.sticky)}return D}function Ho(e,t,D){if(typeof t=="string"&&(t=xo[t],!t))return!1;e.display.input.ensurePolled();var O=e.display.shift,U=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),D&&(e.display.shift=!1),U=t(e)!=ye}finally{e.display.shift=O,e.state.suppressEdits=!1}return U}function jl(e,t,D){for(var O=0;O<e.state.keyMaps.length;O++){var U=Yi(t,e.state.keyMaps[O],D,e);if(U)return U}return e.options.extraKeys&&Yi(t,e.options.extraKeys,D,e)||Yi(t,e.options.keyMap,D,e)}var Ul=new J;function Eo(e,t,D,O){var U=e.state.keySeq;if(U){if(zs(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ul.set(50,function(){e.state.keySeq==U&&(e.state.keySeq=null,e.display.input.reset())}),$s(e,U+" "+t,D,O))return!0}return $s(e,t,D,O)}function $s(e,t,D,O){var U=jl(e,t,O);return U=="multi"&&(e.state.keySeq=t),U=="handled"&&vr(e,"keyHandled",e,t,D),(U=="handled"||U=="multi")&&(de(D),Vn(e)),!!U}function Js(e,t){var D=Xs(t,!0);return D?t.shiftKey&&!e.state.keySeq?Eo(e,"Shift-"+D,t,function(O){return Ho(e,O,!0)})||Eo(e,D,t,function(O){if(typeof O=="string"?/^go[A-Z]/.test(O):O.motion)return Ho(e,O)}):Eo(e,D,t,function(O){return Ho(e,O)}):!1}function Fl(e,t,D){return Eo(e,"'"+D+"'",t,function(O){return Ho(e,O,!0)})}var ls=null;function Qs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=G(),$e(t,e))return;S&&f<11&&e.keyCode==27&&(e.returnValue=!1);var D=e.keyCode;t.display.shift=D==16||e.shiftKey;var O=Js(t,e);E&&(ls=O?D:null,!O&&D==88&&!Qt&&(l?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),C&&!l&&!O&&D==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),D==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Bl(t)}function Bl(e){var t=e.display.lineDiv;K(t,"CodeMirror-crosshair");function D(O){(O.keyCode==18||!O.altKey)&&(b(t,"CodeMirror-crosshair"),tt(document,"keyup",D),tt(document,"mouseover",D))}Ce(document,"keyup",D),Ce(document,"mouseover",D)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),$e(this,e)}function el(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Hn(t.display,e)||$e(t,e)||e.ctrlKey&&!e.altKey||l&&e.metaKey)return;var D=e.keyCode,O=e.charCode;if(E&&D==ls){ls=null,de(e);return}if(E&&(!e.which||e.which<10)&&Js(t,e))return;var U=String.fromCharCode(O==null?D:O);if(U=="\b")return;if(Fl(t,e,U))return;t.display.input.onKeyPress(e)}var Wl=400,us=function(e,t,D){this.time=e,this.pos=t,this.button=D};us.prototype.compare=function(e,t,D){return this.time+Wl>e&&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.line<Wt.from)&&setTimeout(Un(e,function(){ot==kt&&lt(xt)}),150)}else{var Tr=xt.clientY<Ze.top?-20:xt.clientY>Ze.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<e.display.gutterSpecs.length;++ue){var me=ne.gutters.childNodes[ue];if(me&&me.getBoundingClientRect().right>=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;oe<ds.length;++oe)ds[oe](this);li(this),a&&t.lineWrapping&&getComputedStyle(V.lineDiv).textRendering=="optimizelegibility"&&(V.lineDiv.style.textRendering="auto")}Dn.defaults=ol,Dn.optionHandlers=Ko;function ql(e){var t=e.display;Ce(t.scroller,"mousedown",Un(e,tl)),S&&f<11?Ce(t.scroller,"dblclick",Un(e,function(ue){if($e(e,ue))return;var me=Xn(e,ue);if(!me||cs(e,ue)||Hn(e.display,ue))return;de(ue);var Ie=e.findWordAt(me);No(e.doc,Ie.anchor,Ie.head)})):Ce(t.scroller,"dblclick",function(ue){return $e(e,ue)||de(ue)}),Ce(t.scroller,"contextmenu",function(ue){return al(e,ue)}),Ce(t.input.getField(),"contextmenu",function(ue){t.scroller.contains(ue.target)||al(e,ue)});var D,O={end:0};function U(){t.activeTouch&&(D=setTimeout(function(){return t.activeTouch=null},1e3),O=t.activeTouch,O.end=+new Date)}function V(ue){if(ue.touches.length!=1)return!1;var me=ue.touches[0];return me.radiusX<=1&&me.radiusY<=1}function ne(ue,me){if(me.left==null)return!0;var Ie=me.left-ue.left,je=me.top-ue.top;return Ie*Ie+je*je>20*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(et<Ie&&(je+=se(Ie-et)),je!=me)return Xi(U,je,st(t,0),st(t,me.length),"+input"),oe.stateAfter=null,!0;for(var ot=0;ot<U.sel.ranges.length;ot++){var lt=U.sel.ranges[ot];if(lt.head.line==t&&lt.head.ch<me.length){var vt=st(t,me.length);as(U,ot,new Qr(vt,vt));break}}}var Xa=null;function zo(e){Xa=e}function fs(e,t,D,O,U){var V=e.doc;e.display.shift=!1,O||(O=V.sel);var ne=+new Date-200,oe=U=="paste"||e.state.pasteIncoming>ne,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<Xa.text.length;Ie++)me.push(V.splitLines(Xa.text[Ie]))}}else ue.length==O.ranges.length&&e.options.pasteLinesPerSelection&&(me=be(ue,function(bt){return[bt]}));for(var je=e.curOp.updateInput,et=O.ranges.length-1;et>=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<V.electricChars.length;oe++)if(t.indexOf(V.electricChars.charAt(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;O<e.doc.sel.ranges.length;O++){var U=e.doc.sel.ranges[O].head.line,V={anchor:st(U,0),head:st(U+1,0)};D.push(V),t.push(e.getRange(V.anchor,V.head))}return{text:t,ranges:D}}function cl(e,t,D,O){e.setAttribute("autocorrect",D?"":"off"),e.setAttribute("autocapitalize",O?"":"off"),e.setAttribute("spellcheck",!!t)}function dl(){var e=_("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=_("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return a?e.style.width="1000px":e.setAttribute("wrap","off"),p&&(e.style.border="1px solid black"),cl(e),t}function eu(e){var t=e.optionHandlers,D=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(O,U){var V=this.options,ne=V[O];if(V[O]==U&&O!="mode")return;V[O]=U,t.hasOwnProperty(O)&&Un(this,t[O])(this,U,ne),He(this,"optionChange",this,O)},getOption:function(O){return this.options[O]},getDoc:function(){return this.doc},addKeyMap:function(O,U){this.state.keyMaps[U?"push":"unshift"](Wo(O))},removeKeyMap:function(O){for(var U=this.state.keyMaps,V=0;V<U.length;++V)if(U[V]==O||U[V].name==O)return U.splice(V,1),!0},addOverlay:na(function(O,U){var V=O.token?O:e.getMode(this.options,O);if(V.startState)throw new Error("Overlays may not be stateful.");Z(this.state.overlays,{mode:V,modeSpec:O,opaque:U&&U.opaque,priority:U&&U.priority||0},function(ne){return ne.priority}),this.state.modeGen++,un(this)}),removeOverlay:na(function(O){for(var U=this.state.overlays,V=0;V<U.length;++V){var ne=U[V].modeSpec;if(ne==O||typeof O=="string"&&ne.name==O){U.splice(V,1),this.state.modeGen++,un(this);return}}}),indentLine:na(function(O,U,V){typeof U!="string"&&typeof U!="number"&&(U==null?U=this.options.smartIndent?"smart":"prev":U=U?"add":"subtract"),dn(this.doc,O)&&So(this,O,U,V)}),indentSelection:na(function(O){for(var U=this.doc.sel.ranges,V=-1,ne=0;ne<U.length;ne++){var oe=U[ne];if(oe.empty())oe.head.line>V&&(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;je<V;++je)So(this,je,O);var et=this.doc.sel.ranges;ue.ch==0&&U.length==et.length&&et[ne].from().ch>0&&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]<oe)V=me+1;else{ue=U[me*2+2];break}}var Ie=ue?ue.indexOf("overlay "):-1;return Ie<0?ue:Ie==0?null:ue.slice(0,Ie-1)},getModeAt:function(O){var U=this.doc.mode;return U.innerMode?e.innerMode(U,this.getTokenAt(O).state).mode:U},getHelper:function(O,U){return this.getHelpers(O,U)[0]},getHelpers:function(O,U){var V=[];if(!D.hasOwnProperty(U))return V;var ne=D[U],oe=this.getModeAt(O);if(typeof oe[U]=="string")ne[oe[U]]&&V.push(ne[oe[U]]);else if(oe[U])for(var ue=0;ue<oe[U].length;ue++){var me=ne[oe[U][ue]];me&&V.push(me)}else oe.helperType&&ne[oe.helperType]?V.push(ne[oe.helperType]):ne[oe.name]&&V.push(ne[oe.name]);for(var Ie=0;Ie<ne._global.length;Ie++){var je=ne._global[Ie];je.pred(oe,this)&&ee(V,je.val)==-1&&V.push(je.val)}return V},getStateAfter:function(O,U){var V=this.doc;return O=Zr(V,O==null?V.first+V.size-1:O),nt(this,O+1,U).state},cursorCoords:function(O,U){var V,ne=this.doc.sel.primary();return O==null?V=ne.head:typeof O=="object"?V=St(this.doc,O):V=O?ne.from():ne.to(),Or(this,V,U||"page")},charCoords:function(O,U){return Sn(this,St(this.doc,O),U||"page")},coordsChar:function(O,U){return O=_r(this,O,U||"page"),Lr(this,O.left,O.top)},lineAtHeight:function(O,U){return O=_r(this,{top:O,left:0},U||"page").top,Ar(this.doc,O+this.display.viewOffset)},heightAtLine:function(O,U,V){var ne=!1,oe;if(typeof O=="number"){var ue=this.doc.first+this.doc.size-1;O<this.doc.first?O=this.doc.first:O>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;me<U&&!(ue=hs(this.doc,ue,oe,V,ne),ue.hitSide);++me);return ue},moveH:na(function(O,U){var V=this;this.extendSelectionsBy(function(ne){return V.display.shift||V.doc.extend||ne.empty()?hs(V.doc,ne.head,O,U,V.options.rtlMoveVisually):O<0?ne.from():ne.to()},Oe)}),deleteH:na(function(O,U){var V=this.doc.sel,ne=this.doc;V.somethingSelected()?ne.replaceSelection("",null,"+delete"):$i(this,function(oe){var ue=hs(ne,oe.head,O,U,!1);return O<0?{from:ue,to:oe.head}:{from:oe.head,to:ue}})}),findPosV:function(O,U,V,ne){var oe=1,ue=ne;U<0&&(oe=-1,U=-U);for(var me=St(this.doc,O),Ie=0;Ie<U;++Ie){var je=Or(this,me,"div");if(ue==null?ue=je.left:je.left=ue,me=fl(this,je,oe,V),me.hitSide)break}return me},moveV:na(function(O,U){var V=this,ne=this.doc,oe=[],ue=!this.display.shift&&!ne.extend&&ne.sel.somethingSelected();if(ne.extendSelectionsBy(function(Ie){if(ue)return O<0?Ie.from():Ie.to();var je=Or(V,Ie.head,"div");Ie.goalColumn!=null&&(je.left=Ie.goalColumn),oe.push(je.left);var et=fl(V,je,O,U);return U=="page"&&Ie==ne.sel.primary()&&no(V,Sn(V,et,"div").top-je.top),et},Oe),oe.length)for(var me=0;me<ne.sel.ranges.length;me++)ne.sel.ranges[me].goalColumn=oe[me]}),findWordAt:function(O){var U=this.doc,V=dt(U,O.line).text,ne=O.ch,oe=O.ch;if(V){var ue=this.getHelper(O,"wordChars");(O.sticky=="before"||oe==V.length)&&ne?--ne:++oe;for(var me=V.charAt(ne),Ie=X(me,ue)?function(je){return X(je,ue)}:/\s/.test(me)?function(je){return/\s/.test(je)}:function(je){return!/\s/.test(je)&&!X(je)};ne>0&&Ie(V.charAt(ne-1));)--ne;for(;oe<V.length&&Ie(V.charAt(oe));)++oe}return new Qr(st(O.line,ne),st(O.line,oe))},toggleOverwrite:function(O){if(O!=null&&O==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?K(this.display.cursorDiv,"CodeMirror-overwrite"):b(this.display.cursorDiv,"CodeMirror-overwrite"),He(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==G()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:na(function(O,U){vi(this,O,U)}),getScrollInfo:function(){var O=this.display.scroller;return{left:O.scrollLeft,top:O.scrollTop,height:O.scrollHeight-ze(this)-this.display.barHeight,width:O.scrollWidth-ze(this)-this.display.barWidth,clientHeight:fe(this),clientWidth:ke(this)}},scrollIntoView:na(function(O,U){O==null?(O={from:this.doc.sel.primary().head,to:null},U==null&&(U=this.options.cursorScrollMargin)):typeof O=="number"?O={from:st(O,0),to:null}:O.from==null&&(O={from:O,to:null}),O.to||(O.to=O.from),O.margin=U||0,O.from.line!=null?$o(this,O):Oi(this,O.from,O.to,O.margin)}),setSize:na(function(O,U){var V=this,ne=function(ue){return typeof ue=="number"||/^\d+$/.test(String(ue))?ue+"px":ue};O!=null&&(this.display.wrapper.style.width=ne(O)),U!=null&&(this.display.wrapper.style.height=ne(U)),this.options.lineWrapping&&ur(this);var oe=this.display.viewFrom;this.doc.iter(oe,this.display.viewTo,function(ue){if(ue.widgets){for(var me=0;me<ue.widgets.length;me++)if(ue.widgets[me].noHScroll){An(V,oe,"widget");break}}++oe}),this.curOp.forceUpdate=!0,He(this,"refresh",this)}),operation:function(O){return pa(this,O)},startOperation:function(){return qa(this)},endOperation:function(){return li(this)},refresh:na(function(){var O=this.display.cachedTextHeight;un(this),this.curOp.forceUpdate=!0,hr(this),vi(this,this.doc.scrollLeft,this.doc.scrollTop),Bi(this.display),(O==null||Math.abs(O-Pn(this.display))>.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||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&&lt==`
`?"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){e.removeAllRanges();return}var V=Go(t,e.anchorNode,e.anchorOffset),ne=Go(t,e.focusNode,e.focusOffset);if(V&&!V.bad&&ne&&!ne.bad&&Ot(gn(V,ne),O)==0&&Ot(ft(V,ne),U)==0)return;var oe=t.display.view,ue=O.line>=t.display.viewFrom&&hl(t,O)||{node:oe[0].measure.map[2],offset:0},me=U.line<t.display.viewTo&&hl(t,U);if(!me){var Ie=oe[oe.length-1].measure,je=Ie.maps?Ie.maps[Ie.maps.length-1]:Ie.map;me={node:je[je.length-1],offset:je[je.length-2]-je[je.length-3]}}if(!ue||!me){e.removeAllRanges();return}var et=e.rangeCount&&e.getRangeAt(0),Ze;try{Ze=j(ue.node,ue.offset,me.offset,me.node)}catch(ot){}Ze&&(!C&&t.state.focused?(e.collapse(ue.node,ue.offset),Ze.collapsed||(e.removeAllRanges(),e.addRange(Ze))):(e.removeAllRanges(),e.addRange(Ze)),et&&e.anchorNode==null?e.addRange(et):C&&this.startGracePeriod()),this.rememberSelection()},cn.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},cn.prototype.showMultipleSelections=function(e){y(this.cm.display.cursorDiv,e.cursors),y(this.cm.display.selectionDiv,e.selection)},cn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},cn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return M(this.div,t)},cn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},cn.prototype.blur=function(){this.div.blur()},cn.prototype.getField=function(){return this.div},cn.prototype.supportsTouch=function(){return!0},cn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():pa(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},cn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},cn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(d&&r&&this.cm.display.gutterSpecs.length&&tu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var D=Go(t,e.anchorNode,e.anchorOffset),O=Go(t,e.focusNode,e.focusOffset);D&&O&&pa(t,function(){ua(t.doc,za(D,O),pe),(D.bad||O.bad)&&(t.curOp.selectionChanged=!0)})},cn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,D=e.doc.sel.primary(),O=D.from(),U=D.to();if(O.ch==0&&O.line>e.firstLine()&&(O=st(O.line-1,dt(e.doc,O.line-1).length)),U.ch==dt(e.doc,U.line).text.length&&U.line<e.lastLine()&&(U=st(U.line+1,0)),O.line<t.viewFrom||U.line>t.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);Ze<bt&&lt.charCodeAt(Ze)==vt.charCodeAt(Ze);)++Ze;for(var Dt=re(je),xt=re(et),kt=Math.min(Dt.length-(je.length==1?Ze:0),xt.length-(et.length==1?Ze:0));ot<kt&&Dt.charCodeAt(Dt.length-ot-1)==xt.charCodeAt(xt.length-ot-1);)++ot;if(je.length==1&&et.length==1&&ne==O.line)for(;Ze&&Ze>O.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<Ze.childNodes.length;xt++)et(Ze.childNodes[xt]);/^(pre|p)$/i.test(Ze.nodeName)&&(ue=!0),Dt&&(ne=!0)}else Ze.nodeType==3&&je(Ze.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(et(t),t==D);)t=t.nextSibling,ue=!1;return V}function Go(e,t,D){var O;if(t==e.display.lineDiv){if(O=e.display.lineDiv.childNodes[D],!O)return Qi(e.clipPos(st(e.display.viewTo-1)),!0);t=null,D=0}else for(O=t;;O=O.parentNode){if(!O||O==e.display.lineDiv)return null;if(O.parentNode&&O.parentNode==e.display.lineDiv)break}for(var U=0;U<e.display.view.length;U++){var V=e.display.view[U];if(V.node==O)return nu(V,t,D)}}function nu(e,t,D){var O=e.text.firstChild,U=!1;if(!t||!M(O,t))return Qi(st(Rt(e.line),0),!0);if(t==O&&(U=!0,t=O.childNodes[D],D=0,!t)){var V=e.rest?re(e.rest):e.line;return Qi(st(Rt(V),V.text.length),U)}var ne=t.nodeType==3?t:null,oe=t;for(!ne&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(ne=t.firstChild,D&&(D=ne.nodeValue.length));oe.parentNode!=O;)oe=oe.parentNode;var ue=e.measure,me=ue.maps;function Ie(vt,bt,Dt){for(var xt=-1;xt<(me?me.length:0);xt++)for(var kt=xt<0?ue.map:me[xt],Yt=0;Yt<kt.length;Yt+=3){var Wt=kt[Yt+2];if(Wt==vt||Wt==bt){var Tr=Rt(xt<0?e.line:e.rest[xt]),xn=kt[Yt]+Dt;return(Dt<0||Wt!=vt)&&(xn=kt[Yt+(Dt?1:0)]),st(Tr,xn)}}}var je=Ie(ne,oe,D);if(je)return Qi(je,U);for(var et=oe.nextSibling,Ze=ne?ne.nodeValue.length-D:0;et;et=et.nextSibling){if(je=Ie(et,et.firstChild,0),je)return Qi(st(je.line,je.ch-Ze),U);Ze+=et.textContent.length}for(var ot=oe.previousSibling,lt=D;ot;ot=ot.previousSibling){if(je=Ie(ot,ot.firstChild,-1),je)return Qi(st(je.line,je.ch+lt),U);lt+=ot.textContent.length}}var Bn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new J,this.hasSelection=!1,this.composing=null};Bn.prototype.init=function(e){var t=this,D=this,O=this.cm;this.createField(e);var U=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),p&&(U.style.width="0px"),Ce(U,"input",function(){S&&f>=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);ne<oe&&O.charCodeAt(ne)==U.charCodeAt(ne);)++ne;return pa(t,function(){fs(t,U.slice(ne),O.length-ne,null,e.composing?"*compose":null),U.length>1e3||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;d<r;d++)w[d]^=1549556828,p[d]^=909522486;g.sigBytes=m.sigBytes=E,this.reset()},reset:function(){var a=this._hasher;a.reset(),a.update(this._iKey)},update:function(a){return this._hasher.update(a),this},finalize:function(a){var o=this._hasher,r=o.finalize(a);o.reset();var E=o.finalize(this._oKey.clone().concat(r));return E}})})()})},WaYH:function(N,$,P){"use strict";var k=P("rePB"),u=P("Ff2n"),C=P("VTBJ"),R=P("1OyB"),h=P("vuIU"),s=P("JX7q"),S=P("Ji7U"),f=P("LK+K"),a=P("q1tI"),o=P("TSYQ"),r=P.n(o),E=P("sboe"),g=P("OZM5"),m=function(L){var A=L.prefixCls,b=L.level,x=L.isStart,y=L.isEnd;if(!b)return null;for(var _="".concat(A,"-indent-unit"),I=[],j=0;j<b;j+=1){var M;I.push(a.createElement("span",{key:j,className:r()(_,(M={},Object(k.a)(M,"".concat(_,"-start"),x[j+1]),Object(k.a)(M,"".concat(_,"-end"),y[j+1]),Object(k.a)(M,"".concat(_,"-end-first-level"),!j&&y[0]),M))}))}return a.createElement("span",{"aria-hidden":"true",className:"".concat(A,"-indent")},I)},w=m,p=P("815F"),d="open",n="close",l="---",c=function(i){Object(S.a)(A,i);var L=Object(f.a)(A);function A(){var b;return Object(R.a)(this,A),b=L.apply(this,arguments),b.state={dragNodeHighlight:!1},b.onSelectorClick=function(x){var y=b.props.context.onNodeClick;y(x,Object(p.b)(b.props)),b.isSelectable()?b.onSelect(x):b.onCheck(x)},b.onSelectorDoubleClick=function(x){var y=b.props.context.onNodeDoubleClick;y(x,Object(p.b)(b.props))},b.onSelect=function(x){if(b.isDisabled())return;var y=b.props.context.onNodeSelect;x.preventDefault(),y(x,Object(p.b)(b.props))},b.onCheck=function(x){if(b.isDisabled())return;var y=b.props,_=y.disableCheckbox,I=y.checked,j=b.props.context.onNodeCheck;if(!b.isCheckable()||_)return;x.preventDefault();var M=!I;j(x,Object(p.b)(b.props),M)},b.onMouseEnter=function(x){var y=b.props.context.onNodeMouseEnter;y(x,Object(p.b)(b.props))},b.onMouseLeave=function(x){var y=b.props.context.onNodeMouseLeave;y(x,Object(p.b)(b.props))},b.onContextMenu=function(x){var y=b.props.context.onNodeContextMenu;y(x,Object(p.b)(b.props))},b.onDragStart=function(x){var y=b.props.context.onNodeDragStart;x.stopPropagation(),b.setState({dragNodeHighlight:!0}),y(x,Object(s.a)(b));try{x.dataTransfer.setData("text/plain","")}catch(_){}},b.onDragEnter=function(x){var y=b.props.context.onNodeDragEnter;x.preventDefault(),x.stopPropagation(),y(x,Object(s.a)(b))},b.onDragOver=function(x){var y=b.props.context.onNodeDragOver;x.preventDefault(),x.stopPropagation(),y(x,Object(s.a)(b))},b.onDragLeave=function(x){var y=b.props.context.onNodeDragLeave;x.stopPropagation(),y(x,Object(s.a)(b))},b.onDragEnd=function(x){var y=b.props.context.onNodeDragEnd;x.stopPropagation(),b.setState({dragNodeHighlight:!1}),y(x,Object(s.a)(b))},b.onDrop=function(x){var y=b.props.context.onNodeDrop;x.preventDefault(),x.stopPropagation(),b.setState({dragNodeHighlight:!1}),y(x,Object(s.a)(b))},b.onExpand=function(x){var y=b.props.context.onNodeExpand;y(x,Object(p.b)(b.props))},b.setSelectHandle=function(x){b.selectHandle=x},b.getNodeState=function(){var x=b.props.expanded;return b.isLeaf()?null:x?d:n},b.hasChildren=function(){var x=b.props.eventKey,y=b.props.context.keyEntities,_=y[x]||{},I=_.children;return!!(I||[]).length},b.isLeaf=function(){var x=b.props,y=x.isLeaf,_=x.loaded,I=b.props.context.loadData,j=b.hasChildren();return y===!1?!1:y||!I&&!j||I&&_&&!j},b.isDisabled=function(){var x=b.props.disabled,y=b.props.context.disabled;return!!(y||x)},b.isCheckable=function(){var x=b.props.checkable,y=b.props.context.checkable;return!y||x===!1?!1:y},b.syncLoadData=function(x){var y=x.expanded,_=x.loading,I=x.loaded,j=b.props.context,M=j.loadData,G=j.onNodeLoad;if(_)return;M&&y&&!b.isLeaf()&&(!b.hasChildren()&&!I&&G(Object(p.b)(b.props)))},b.renderSwitcher=function(){var x=b.props,y=x.expanded,_=x.switcherIcon,I=b.props.context,j=I.prefixCls,M=I.switcherIcon,G=_||M;if(b.isLeaf())return a.createElement("span",{className:r()("".concat(j,"-switcher"),"".concat(j,"-switcher-noop"))},typeof G=="function"?G(Object(C.a)(Object(C.a)({},b.props),{},{isLeaf:!0})):G);var K=r()("".concat(j,"-switcher"),"".concat(j,"-switcher_").concat(y?d:n));return a.createElement("span",{onClick:b.onExpand,className:K},typeof G=="function"?G(Object(C.a)(Object(C.a)({},b.props),{},{isLeaf:!1})):G)},b.renderCheckbox=function(){var x=b.props,y=x.checked,_=x.halfChecked,I=x.disableCheckbox,j=b.props.context.prefixCls,M=b.isDisabled(),G=b.isCheckable();if(!G)return null;var K=typeof G!="boolean"?G:null;return a.createElement("span",{className:r()("".concat(j,"-checkbox"),y&&"".concat(j,"-checkbox-checked"),!y&&_&&"".concat(j,"-checkbox-indeterminate"),(M||I)&&"".concat(j,"-checkbox-disabled")),onClick:b.onCheck},K)},b.renderIcon=function(){var x=b.props.loading,y=b.props.context.prefixCls;return a.createElement("span",{className:r()("".concat(y,"-iconEle"),"".concat(y,"-icon__").concat(b.getNodeState()||"docu"),x&&"".concat(y,"-icon_loading"))})},b.renderSelector=function(){var x=b.state.dragNodeHighlight,y=b.props,_=y.title,I=y.selected,j=y.icon,M=y.loading,G=y.data,K=b.props.context,H=K.prefixCls,z=K.showIcon,B=K.icon,W=K.draggable,F=K.loadData,J=K.titleRender,ee=b.isDisabled(),q="".concat(H,"-node-content-wrapper"),ye;if(z){var pe=j||B;ye=pe?a.createElement("span",{className:r()("".concat(H,"-iconEle"),"".concat(H,"-icon__customize"))},typeof pe=="function"?pe(b.props):pe):b.renderIcon()}else F&&M&&(ye=b.renderIcon());var le;typeof _=="function"?le=_(G):J?le=J(G):le=_;var Oe=a.createElement("span",{className:"".concat(H,"-title")},le);return a.createElement("span",{ref:b.setSelectHandle,title:typeof _=="string"?_:"",className:r()("".concat(q),"".concat(q,"-").concat(b.getNodeState()||"normal"),!ee&&(I||x)&&"".concat(H,"-node-selected"),!ee&&W&&"draggable"),draggable:!ee&&W||void 0,"aria-grabbed":!ee&&W||void 0,onMouseEnter:b.onMouseEnter,onMouseLeave:b.onMouseLeave,onContextMenu:b.onContextMenu,onClick:b.onSelectorClick,onDoubleClick:b.onSelectorDoubleClick,onDragStart:W?b.onDragStart:void 0},ye,Oe)},b}return Object(h.a)(A,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var x=this.props.selectable,y=this.props.context.selectable;return typeof x=="boolean"?x:y}},{key:"render",value:function(){var x,y=this.props,_=y.eventKey,I=y.className,j=y.style,M=y.dragOver,G=y.dragOverGapTop,K=y.dragOverGapBottom,H=y.isLeaf,z=y.isStart,B=y.isEnd,W=y.expanded,F=y.selected,J=y.checked,ee=y.halfChecked,q=y.loading,ye=y.domRef,pe=y.active,le=y.onMouseMove,Oe=Object(u.a)(y,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),xe=this.props.context,ie=xe.prefixCls,se=xe.filterTreeNode,re=xe.draggable,be=xe.keyEntities,Z=this.isDisabled(),te=Object(g.f)(Oe),Ee=be[_]||{},ae=Ee.level,Y=B[B.length-1];return a.createElement("div",Object.assign({ref:ye,className:r()(I,"".concat(ie,"-treenode"),(x={},Object(k.a)(x,"".concat(ie,"-treenode-disabled"),Z),Object(k.a)(x,"".concat(ie,"-treenode-switcher-").concat(W?"open":"close"),!H),Object(k.a)(x,"".concat(ie,"-treenode-checkbox-checked"),J),Object(k.a)(x,"".concat(ie,"-treenode-checkbox-indeterminate"),ee),Object(k.a)(x,"".concat(ie,"-treenode-selected"),F),Object(k.a)(x,"".concat(ie,"-treenode-loading"),q),Object(k.a)(x,"".concat(ie,"-treenode-active"),pe),Object(k.a)(x,"".concat(ie,"-treenode-leaf-last"),Y),Object(k.a)(x,"drag-over",!Z&&M),Object(k.a)(x,"drag-over-gap-top",!Z&&G),Object(k.a)(x,"drag-over-gap-bottom",!Z&&K),Object(k.a)(x,"filter-node",se&&se(Object(p.b)(this.props))),x)),style:j,onDragEnter:re?this.onDragEnter:void 0,onDragOver:re?this.onDragOver:void 0,onDragLeave:re?this.onDragLeave:void 0,onDrop:re?this.onDrop:void 0,onDragEnd:re?this.onDragEnd:void 0,onMouseMove:le},te),a.createElement(w,{prefixCls:ie,level:ae,isStart:z,isEnd:B}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),A}(a.Component),T=function(L){return a.createElement(E.a.Consumer,null,function(A){return a.createElement(c,Object.assign({},L,{context:A}))})};T.displayName="TreeNode",T.defaultProps={title:l},T.isTreeNode=1;var v=$.a=T},XIdC:function(N,$,P){"use strict";var k=P("rePB"),u=P("ODXe"),C=P("Ff2n"),R=P("q1tI"),h=P.n(R),s=P("TSYQ"),S=P.n(s),f=P("6cGi"),a=P("4IlW"),o=R.forwardRef(function(r,E){var g,m=r.prefixCls,w=m===void 0?"rc-switch":m,p=r.className,d=r.checked,n=r.defaultChecked,l=r.disabled,c=r.loadingIcon,T=r.checkedChildren,v=r.unCheckedChildren,i=r.onClick,L=r.onChange,A=r.onKeyDown,b=Object(C.a)(r,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),x=Object(f.a)(!1,{value:d,defaultValue:n}),y=Object(u.a)(x,2),_=y[0],I=y[1];function j(H,z){var B=_;return l||(B=H,I(B),L==null||L(B,z)),B}function M(H){H.which===a.a.LEFT?j(!1,H):H.which===a.a.RIGHT&&j(!0,H),A==null||A(H)}function G(H){var z=j(!_,H);i==null||i(z,H)}var K=S()(w,p,(g={},Object(k.a)(g,"".concat(w,"-checked"),_),Object(k.a)(g,"".concat(w,"-disabled"),l),g));return R.createElement("button",Object.assign({},b,{type:"button",role:"switch","aria-checked":_,disabled:l,className:K,ref:E,onKeyDown:M,onClick:G}),c,R.createElement("span",{className:"".concat(w,"-inner")},_?T:v))});o.displayName="Switch",$.a=o},Y1PL:function(N,$,P){"use strict";P.r($),P.d($,"ResizableTextArea",function(){return ee});var k=P("wx14"),u=P("1OyB"),C=P("vuIU"),R=P("Ji7U"),h=P("LK+K"),s=P("q1tI"),S=P("VTBJ"),f=P("rePB"),a=P("Zm9Q"),o=P("Kwbf"),r=P("c+Xe"),E=P("m+aA"),g=P("bdgK"),m=new Map;function w(pe){pe.forEach(function(le){var Oe,xe=le.target;(Oe=m.get(xe))===null||Oe===void 0||Oe.forEach(function(ie){return ie(xe)})})}var p=new g.default(w),d=null,n=null;function l(pe,le){m.has(pe)||(m.set(pe,new Set),p.observe(pe)),m.get(pe).add(le)}function c(pe,le){m.has(pe)&&(m.get(pe).delete(le),m.get(pe).size||(p.unobserve(pe),m.delete(pe)))}var T=function(pe){Object(R.a)(Oe,pe);var le=Object(h.a)(Oe);function Oe(){return Object(u.a)(this,Oe),le.apply(this,arguments)}return Object(C.a)(Oe,[{key:"render",value:function(){return this.props.children}}]),Oe}(s.Component),v=s.createContext(null);function i(pe){var le=pe.children,Oe=pe.onBatchResize,xe=s.useRef(0),ie=s.useRef([]),se=s.useContext(v),re=s.useCallback(function(be,Z,te){xe.current+=1;var Ee=xe.current;ie.current.push({size:be,element:Z,data:te}),Promise.resolve().then(function(){Ee===xe.current&&(Oe==null||Oe(ie.current),ie.current=[])}),se==null||se(be,Z,te)},[Oe,se]);return s.createElement(v.Provider,{value:re},le)}function L(pe){var le=pe.children,Oe=pe.disabled,xe=s.useRef(null),ie=s.useRef(null),se=s.useContext(v),re=s.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),be=s.isValidElement(le)&&Object(r.c)(le),Z=be?le.ref:null,te=s.useMemo(function(){return Object(r.a)(Z,xe)},[Z,xe]),Ee=s.useRef(pe);Ee.current=pe;var ae=s.useCallback(function(Y){var X=Ee.current,Q=X.onResize,he=X.data,ce=Y.getBoundingClientRect(),Se=ce.width,Ke=ce.height,Ge=Y.offsetWidth,Ye=Y.offsetHeight,Qe=Math.floor(Se),rt=Math.floor(Ke);if(re.current.width!==Qe||re.current.height!==rt||re.current.offsetWidth!==Ge||re.current.offsetHeight!==Ye){var qe={width:Qe,height:rt,offsetWidth:Ge,offsetHeight:Ye};re.current=qe;var Le=Ge===Math.round(Se)?Se:Ge,Ce=Ye===Math.round(Ke)?Ke:Ye,Ve=Object(S.a)(Object(S.a)({},qe),{},{offsetWidth:Le,offsetHeight:Ce});se==null||se(Ve,Y,he),Q&&Promise.resolve().then(function(){Q(Ve,Y)})}},[]);return s.useEffect(function(){var Y=Object(E.a)(xe.current)||Object(E.a)(ie.current);return Y&&!Oe&&l(Y,ae),function(){return c(Y,ae)}},[xe.current,Oe]),s.createElement(T,{ref:ie},be?s.cloneElement(le,{ref:te}):le)}var A="rc-observer-key";function b(pe){var le=pe.children,Oe=Object(a.a)(le);return Oe.map(function(xe,ie){var se=(xe==null?void 0:xe.key)||"".concat(A,"-").concat(ie);return s.createElement(L,Object(k.a)({},pe,{key:se}),xe)})}b.Collection=i;var x=b,y=P("bT9E"),_=P("TSYQ"),I=P.n(_),j=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important
`,M=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],G={},K;function H(pe){var le=arguments.length>1&&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;L<v.length;L++){var A=d[v[L]];if(A)return A}return i[0]}return d[i]||i}var l=null,c=$.b=function(v){var i=v.width,L=i===void 0?"100%":i,A=v.height,b=A===void 0?"100%":A,x=v.value,y=v.language,_=y===void 0?"javascript":y,I=v.style,j=I===void 0?{}:I,M=v.options,G=M===void 0?{}:M,K=v.overrideServices,H=K===void 0?{}:K,z=v.theme,B=z===void 0?"vs-dark":z,W=v.onEditBlur,F=v.onSave,J=v.autoHeight,ee=J===void 0?!1:J,q=v.forbidCopy,ye=q===void 0?!1:q,pe=v.onChange,le=pe===void 0?w:pe,Oe=v.editorDidMount,xe=Oe===void 0?w:Oe,ie=v.onFocus,se=ie===void 0?w:ie,re=v.filename,be=re===void 0?"educoder.txt":re,Z=Object(s.a)(v,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),te=Object(S.useRef)(),Ee=Object(S.useRef)({}),ae=Object(S.useRef)(),Y=Object(S.useRef)(!1),X=Object(S.useRef)(),Q=Object(S.useState)(!1),he=Object(h.a)(Q,2),ce=he[0],Se=he[1];function Ke(){var we;return te.current&&(we=new a.default(function(_e){var Ue=Object(R.a)(_e),Xe;try{for(Ue.s();!(Xe=Ue.n()).done;){var at=Xe.value;(at.target.offsetHeight>0||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(_e<b?b:_e)}else de(b)};function Le(we){var _e=document.createEvent("MouseEvents");_e.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),we.dispatchEvent(_e)}function Ce(we,_e){var Ue=window.URL||window.webkitURL||window,Xe=new Blob([_e]),at=document.createElementNS("http://www.w3.org/1999/xhtml","a");at.href=Ue.createObjectURL(Xe),at.download=we,Le(at)}Object(S.useEffect)(function(){qe()},[qe]),Object(S.useEffect)(function(){te.current&&!ce&&P.e(26).then(P.t.bind(null,"M/lh",7)).then(function(we){try{l=we,Ee.current.instance=l.editor.create(te.current,{value:x,language:n(_),theme:B,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},H);var _e=Ee.current.instance;if(xe(_e,l),setTimeout(function(){qe(),Ee.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Ce(be||"educoder.txt",_e.getValue())}})},500),Ee.current.subscription=_e.onDidChangeModelContent(function(Xe){Y.current?clearTimeout(X.current):(qe(),le(_e.getValue(),Xe)),X.current=setTimeout(function(){Y.current=!1},500)}),window.Monaco||r(l),ye&&(_e.addCommand(l.KeyMod.CtrlCmd|l.KeyMod.Shift|l.KeyCode.KEY_V,function(){return Ge(),null}),_e.addCommand(l.KeyMod.CtrlCmd|l.KeyCode.KEY_C,function(){return Ge(),null})),window.Monaco=l,W&&_e.onDidBlurEditorWidget(function(){W(_e.getValue())}),se&&_e.onDidFocusEditorText(function(){se(_e.getValue())}),ye){_e.addCommand(l.KeyMod.CtrlCmd|l.KeyCode.KEY_V,function(){return Ge(),null}),_e.onDidPaste(function(Xe){Ee.current.pastePos=Xe});try{window.addEventListener("paste",Qe)}catch(Xe){}}var Ue=Ke();return Se(!0),function(){var Xe=Ee.current.instance;Xe.dispose();var at=Xe.getModel();at&&at.dispose(),Ee.current.subscription&&Ee.current.subscription.dispose(),ye&&window.removeEventListener("paste",Qe),Ue.unobserve(te.current)}}catch(Xe){}})},[]),Object(S.useEffect)(function(){var we=Ee.current.instance;if(we&&ce)return document.addEventListener("keydown",rt,!1),function(){document.removeEventListener("keydown",rt)}},[F,ce]),Object(S.useEffect)(function(){var we=Ee.current.instance;if(we&&ce){var _e=n(_);l.editor.setModelLanguage(we.getModel(),_e),console.log("language:",_,we.getModel(),_e)}},[_,ce]),Object(S.useEffect)(function(){var we=Ee.current.instance;we&&ce&&l.editor.setTheme(B)},[B,ce]),Object(S.useEffect)(function(){var we=Ee.current.instance;we&&ce&&(we.updateOptions(Object(k.a)({},G)),setTimeout(function(){we.getModel().updateOptions(Object(k.a)({},G))},200))},[JSON.stringify(G),ce]),Object(S.useEffect)(function(){var we=Ee.current.instance;we&&ce&&we.layout()},[L,b,ce]);var Ve=Object(S.useState)(m(L)),tt=Object(h.a)(Ve,2),He=tt[0],$e=tt[1],Me=Object(S.useState)(m(b)),De=Object(h.a)(Me,2),Te=De[0],de=De[1],ge=Object(k.a)(Object(k.a)({},j),{},{width:He,height:Te});return f.a.createElement("div",{className:"my-monaco-editor",ref:te,style:ge})};function T(v){var i=v.width,L=i===void 0?"100%":i,A=v.height,b=A===void 0?"100%":A,x=v.original,y=v.modified,_=v.language,I=v.options,j=I===void 0?{}:I,M=Object(S.useRef)(),G=Object(S.useState)(null),K=Object(h.a)(G,2),H=K[0],z=K[1];function B(ee){var q;return M.current&&(q=new a.default(function(ye){var pe=Object(R.a)(ye),le;try{for(pe.s();!(le=pe.n()).done;){var Oe=le.value;(Oe.target.offsetHeight>0||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.clientHeight<r.scrollHeight||r.clientWidth<r.scrollWidth){var g=getComputedStyle(r,null);return u(g.overflowY,E)||u(g.overflowX,E)||function(m){var w=function(p){if(!p.ownerDocument||!p.ownerDocument.defaultView)return null;try{return p.ownerDocument.defaultView.frameElement}catch(d){return null}}(m);return!!w&&(w.clientHeight<m.scrollHeight||w.clientWidth<m.scrollWidth)}(r)}return!1}function R(r,E,g,m,w,p,d,n){return p<r&&d>E||p>r&&d<E?0:p<=r&&n<=g||d>=E&&n>=g?p-r-m:d>E&&n<g||p<r&&n>g?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<T.length;B++){var W=T[B],F=W.getBoundingClientRect(),J=F.height,ee=F.width,q=F.top,ye=F.right,pe=F.bottom,le=F.left;if(m==="if-needed"&&I>=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+(be<Z?6:0);break;case be:ae=(Z-re)/Q+2;break;case Z:ae=(re-be)/Q+4;break}ae/=6}return{h:ae,s:Y,l:X}}function m(re,be,Z){var te,Ee,ae;re=B(re,360),be=B(be,100),Z=B(Z,100);function Y(he,ce,Se){return Se<0&&(Se+=1),Se>1&&(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<Z?6:0);break;case be:ae=(Z-re)/Q+2;break;case Z:ae=(re-be)/Q+4;break}ae/=6}return{h:ae,s:Y,v:X}}function p(re,be,Z){re=B(re,360)*6,be=B(be,100),Z=B(Z,100);var te=u.floor(re),Ee=re-te,ae=Z*(1-be),Y=Z*(1-Ee*be),X=Z*(1-(1-Ee)*be),Q=te%6,he=[Z,Y,ae,ae,X,Z][Q],ce=[X,Z,Z,Y,ae,ae][Q],Se=[ae,ae,X,Z,Z,Y][Q];return{r:he*255,g:ce*255,b:Se*255}}function d(re,be,Z,te){var Ee=[q(s(re).toString(16)),q(s(be).toString(16)),q(s(Z).toString(16))];return te&&Ee[0].charAt(0)==Ee[0].charAt(1)&&Ee[1].charAt(0)==Ee[1].charAt(1)&&Ee[2].charAt(0)==Ee[2].charAt(1)?Ee[0].charAt(0)+Ee[1].charAt(0)+Ee[2].charAt(0):Ee.join("")}function n(re,be,Z,te,Ee){var ae=[q(s(re).toString(16)),q(s(be).toString(16)),q(s(Z).toString(16)),q(pe(te))];return Ee&&ae[0].charAt(0)==ae[0].charAt(1)&&ae[1].charAt(0)==ae[1].charAt(1)&&ae[2].charAt(0)==ae[2].charAt(1)&&ae[3].charAt(0)==ae[3].charAt(1)?ae[0].charAt(0)+ae[1].charAt(0)+ae[2].charAt(0)+ae[3].charAt(0):ae.join("")}function l(re,be,Z,te){var Ee=[q(pe(te)),q(s(re).toString(16)),q(s(be).toString(16)),q(s(Z).toString(16))];return Ee.join("")}o.equals=function(re,be){return!re||!be?!1:o(re).toRgbString()==o(be).toRgbString()},o.random=function(){return o.fromRatio({r:a(),g:a(),b:a()})};function c(re,be){be=be===0?0:be||10;var Z=o(re).toHsl();return Z.s-=be/100,Z.s=W(Z.s),o(Z)}function T(re,be){be=be===0?0:be||10;var Z=o(re).toHsl();return Z.s+=be/100,Z.s=W(Z.s),o(Z)}function v(re){return o(re).desaturate(100)}function i(re,be){be=be===0?0:be||10;var Z=o(re).toHsl();return Z.l+=be/100,Z.l=W(Z.l),o(Z)}function L(re,be){be=be===0?0:be||10;var Z=o(re).toRgb();return Z.r=f(0,S(255,Z.r-s(255*-(be/100)))),Z.g=f(0,S(255,Z.g-s(255*-(be/100)))),Z.b=f(0,S(255,Z.b-s(255*-(be/100)))),o(Z)}function A(re,be){be=be===0?0:be||10;var Z=o(re).toHsl();return Z.l-=be/100,Z.l=W(Z.l),o(Z)}function b(re,be){var Z=o(re).toHsl(),te=(Z.h+be)%360;return Z.h=te<0?360+te:te,o(Z)}function x(re){var be=o(re).toHsl();return be.h=(be.h+180)%360,o(be)}function y(re){var be=o(re).toHsl(),Z=be.h;return[o(re),o({h:(Z+120)%360,s:be.s,l:be.l}),o({h:(Z+240)%360,s:be.s,l:be.l})]}function _(re){var be=o(re).toHsl(),Z=be.h;return[o(re),o({h:(Z+90)%360,s:be.s,l:be.l}),o({h:(Z+180)%360,s:be.s,l:be.l}),o({h:(Z+270)%360,s:be.s,l:be.l})]}function I(re){var be=o(re).toHsl(),Z=be.h;return[o(re),o({h:(Z+72)%360,s:be.s,l:be.l}),o({h:(Z+216)%360,s:be.s,l:be.l})]}function j(re,be,Z){be=be||6,Z=Z||30;var te=o(re).toHsl(),Ee=360/Z,ae=[o(re)];for(te.h=(te.h-(Ee*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;he<be.length;he++)ae=o.readability(re,be[he]),ae>Ee&&(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<<l|T>>>32-l)+w}function r(m,w,p,d,n,l,c){var T=m+(w&d|p&~d)+n+c;return(T<<l|T>>>32-l)+w}function E(m,w,p,d,n,l,c){var T=m+(w^p^d)+n+c;return(T<<l|T>>>32-l)+w}function g(m,w,p,d,n,l,c){var T=m+(p^(w|~d))+n+c;return(T<<l|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;_<arguments.length;_++){var I=arguments[_]!=null?arguments[_]:{};_%2?g(Object(I),!0).forEach(function(j){Object(u.a)(y,j,I[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(I)):g(Object(I)).forEach(function(j){Object.defineProperty(y,j,Object.getOwnPropertyDescriptor(I,j))})}return y}function w(y){var _=p();return function(){var j=Object(S.a)(y),M;if(_){var G=Object(S.a)(this).constructor;M=Reflect.construct(j,arguments,G)}else M=j.apply(this,arguments);return Object(s.a)(this,M)}}function p(){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(y){return!1}}function d(){}function n(y){y.preventDefault()}var l=function(_){return _.replace(/[^\w.-]+/g,"")},c=200,T=600,v=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,i=function(_){return _!=null},L=function(_,I){return I===_||typeof I=="number"&&typeof _=="number"&&isNaN(I)&&isNaN(_)},A=function(y){Object(h.a)(I,y);var _=w(I);function I(j){var M;Object(C.a)(this,I),M=_.call(this,j),M.onKeyDown=function(H){var z=M.props,B=z.onKeyDown,W=z.onPressEnter;if(H.keyCode===E.a.UP){var F=M.getRatio(H);M.up(H,F,null),M.stop()}else if(H.keyCode===E.a.DOWN){var J=M.getRatio(H);M.down(H,J,null),M.stop()}else H.keyCode===E.a.ENTER&&W&&W(H);if(M.recordCursorPosition(),M.lastKeyCode=H.keyCode,B){for(var ee=arguments.length,q=new Array(ee>1?ee-1:0),ye=1;ye<ee;ye++)q[ye-1]=arguments[ye];B.apply(void 0,[H].concat(q))}},M.onKeyUp=function(H){var z=M.props.onKeyUp;if(M.stop(),M.recordCursorPosition(),z){for(var B=arguments.length,W=new Array(B>1?B-1:0),F=1;F<B;F++)W[F-1]=arguments[F];z.apply(void 0,[H].concat(W))}},M.onChange=function(H){var z=M.props.onChange;M.state.focused&&(M.inputting=!0),M.rawInput=M.props.parser(M.getValueFromEvent(H)),M.setState({inputValue:M.rawInput}),z(M.toNumber(M.rawInput))},M.onMouseUp=function(){var H=M.props.onMouseUp;M.recordCursorPosition(),H&&H.apply(void 0,arguments)},M.onFocus=function(){var H;M.setState({focused:!0}),(H=M.props).onFocus.apply(H,arguments)},M.onBlur=function(){var H=M.props.onBlur;M.inputting=!1,M.setState({focused:!1});var z=M.getCurrentValidValue(M.state.inputValue),B=M.setValue(z,d);if(H){var W=M.input.value,F=M.getInputDisplayValue({focus:!1,value:B});M.input.value=F&&Number(F),H.apply(void 0,arguments),M.input.value=W}},M.getRatio=function(H){var z=1;return H.metaKey||H.ctrlKey?z=.1:H.shiftKey&&(z=10),z},M.getFullNum=function(H){return isNaN(H)?H:/e/i.test(String(H))?Number(H).toFixed(18).replace(/\.?0+$/,""):H},M.getPrecision=function(H){if(i(M.props.precision))return M.props.precision;var z=String(H);if(z.indexOf("e-")>=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"&&ee<B&&H&&H(B)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var q=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===E.a.BACKSPACE?q=this.cursorStart-1:this.lastKeyCode===E.a.DELETE&&(q=this.cursorStart):q=this.input.value.length,this.fixCaret(q,q)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case E.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case E.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(ye){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(M){var G=M;return G===""?G="":this.isNotCompleteNumber(parseFloat(G))?G=this.state.value:G=this.getValidValue(G),this.toNumber(G)}},{key:"getValueFromEvent",value:function(M){var G=M.target.value.trim().replace(/。/g,".");return i(this.props.decimalSeparator)&&(G=G.replace(this.props.decimalSeparator,".")),G}},{key:"getValidValue",value:function(M){var G=arguments.length>1&&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:(H<G&&(H=G),H>K&&(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||F<B.min;if(F>B.max?F=B.max:F<B.min&&(F=B.min),this.setValue(F,null),this.setState({focused:!0},function(){K.pressingUpOrDown=!1}),J)return;this.autoStepTimer=setTimeout(function(){K[M](G,H,!0)},z?c:T)}},{key:"fixCaret",value:function(M,G){if(M===void 0||G===void 0||!this.input||!this.input.value)return;try{var K=this.input.selectionStart,H=this.input.selectionEnd;(M!==K||G!==H)&&this.input.setSelectionRange(M,G)}catch(z){}}},{key:"render",value:function(){var M,G=this.props,K=G.prefixCls,H=G.disabled,z=G.readOnly,B=G.useTouch,W=G.autoComplete,F=G.upHandler,J=G.downHandler,ee=G.className,q=G.max,ye=G.min,pe=G.style,le=G.title,Oe=G.onMouseEnter,xe=G.onMouseLeave,ie=G.onMouseOver,se=G.onMouseOut,re=G.required,be=G.onClick,Z=G.tabIndex,te=G.type,Ee=G.placeholder,ae=G.id,Y=G.inputMode,X=G.pattern,Q=G.step,he=G.maxLength,ce=G.autoFocus,Se=G.name,Ke=G.onPaste,Ge=G.onInput,Ye=Object(k.a)(G,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),Qe=this.state,rt=Qe.value,qe=Qe.focused,Le=r()(K,(M={},Object(u.a)(M,ee,!!ee),Object(u.a)(M,"".concat(K,"-disabled"),H),Object(u.a)(M,"".concat(K,"-focused"),qe),M)),Ce={};Object.keys(Ye).forEach(function(_e){(_e.substr(0,5)==="data-"||_e.substr(0,5)==="aria-"||_e==="role")&&(Ce[_e]=Ye[_e])});var Ve=!z&&!H,tt=this.getInputDisplayValue(null),He=(rt||rt===0)&&(isNaN(rt)||Number(rt)>=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<n;){var c=g.update(r).finalize(w);g.reset();for(var T=c.words,v=T.length,i=c,L=1;L<l;L++){i=g.finalize(i),g.reset();for(var A=i.words,b=0;b<v;b++)T[b]^=A[b]}m.concat(c),d[0]++}return m.sigBytes=n*4,m}});u.PBKDF2=function(o,r,E){return a.create(E).compute(o,r)}}(),k.PBKDF2})},eRFJ:function(N,$,P){N.exports={header:"header___2DEfS",field:"field___2KFR1","oj-form-container":"oj-form-container___11-CJ","oj-left-panel":"oj-left-panel___2_COu","oj-form-info":"oj-form-info___3RmjJ",footer:"footer___13GF0",result:"result___2TPH2",passText:"passText___m4yU3",noPassText:"noPassText___bU8yW",pass:"pass___1qwzN",noPass:"noPass___35fR7","test-case-name":"test-case-name___JX6gg","btn-remove-case":"btn-remove-case___20q0s","icon-tag":"icon-tag___ahN2d",btn_back:"btn_back___2GR2u",testJi:"testJi___lY3ok",upBtn:"upBtn___14ov-","oj-problems":"oj-problems___3xexO",row:"row____2CFx",a:"a___1o_MZ",b:"b___2s_8T",inputTwo:"inputTwo___2QE50",inputOne:"inputOne___3VLjS",cusModal:"cusModal___3HaCu","oj-custom-large-spin":"oj-custom-large-spin___18Uw5",MdEditor:"MdEditor___2TQ6G"}},fcSX:function(N,$,P){"use strict";var k=P("Ff2n"),u=P("1OyB"),C=P("vuIU"),R=P("Ji7U"),h=P("md7G"),s=P("foSv"),S=P("1W/9"),f=P("q1tI"),a=P("rePB"),o=P("JX7q"),r=P("TSYQ"),E=P.n(r),g=P("qx4F"),m=P("4IlW");function w(H){return Array.isArray(H)?H:[H]}var p={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},d=Object.keys(p).filter(function(H){if(typeof document=="undefined")return!1;var z=document.getElementsByTagName("html")[0];return H in(z?z.style:{})})[0],n=p[d];function l(H,z,B,W){H.addEventListener?H.addEventListener(z,B,W):H.attachEvent&&H.attachEvent("on".concat(z),B)}function c(H,z,B,W){H.removeEventListener?H.removeEventListener(z,B,W):H.attachEvent&&H.detachEvent("on".concat(z),B)}function T(H,z){var B=typeof H=="function"?H(z):H;return Array.isArray(B)?B.length===2?B:[B[0],B[1]]:[B]}var v=function(z){return!isNaN(parseFloat(z))&&isFinite(z)},i=!(typeof window!="undefined"&&window.document&&window.document.createElement),L=function H(z,B,W,F){if(!B||B===document||B instanceof Document)return!1;if(B===z.parentNode)return!0;var J=Math.max(Math.abs(W),Math.abs(F))===Math.abs(F),ee=Math.max(Math.abs(W),Math.abs(F))===Math.abs(W),q=B.scrollHeight-B.clientHeight,ye=B.scrollWidth-B.clientWidth,pe=document.defaultView.getComputedStyle(B),le=pe.overflowY==="auto"||pe.overflowY==="scroll",Oe=pe.overflowX==="auto"||pe.overflowX==="scroll",xe=q&&le,ie=ye&&Oe;return J&&(!xe||xe&&(B.scrollTop>=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;P<C;P+=1)h[P]=str(P,s)||"null";return u=h.length===0?"[]":gap?`[
`+gap+h.join(`,
`+gap)+`
`+R+"]":"["+h.join(",")+"]",gap=R,u}if(rep&&typeof rep=="object")for(C=rep.length,P=0;P<C;P+=1)typeof rep[P]=="string"&&(k=rep[P],u=str(k,s),u&&h.push(quote(k)+(gap?": ":":")+u));else for(k in s)Object.prototype.hasOwnProperty.call(s,k)&&(u=str(k,s),u&&h.push(quote(k)+(gap?": ":":")+u));return u=h.length===0?"{}":gap?`{
`+gap+h.join(`,
`+gap)+`
`+R+"}":"{"+h.join(",")+"}",gap=R,u}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(N,$,P){var k;if(gap="",indent="",typeof P=="number")for(k=0;k<P;k+=1)indent+=" ";else typeof P=="string"&&(indent=P);if(rep=$,$&&typeof $!="function"&&(typeof $!="object"||typeof $.length!="number"))throw new Error("JSON.stringify");return str("",{"":N})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(N,$){var P,k,u=N[$];if(u&&typeof u=="object")for(P in u)Object.prototype.hasOwnProperty.call(u,P)&&(k=walk(u,P),k!==void 0?u[P]=k:delete u[P]);return reviver.call(N,$,u)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(N){return"\\u"+("0000"+N.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},"gb/T":function(N,$,P){(function(k,u,C){N.exports=$=u(P("Ib8C"),P("OLod"))})(this,function(k){return k.mode.ECB=function(){var u=k.lib.BlockCipherMode.extend();return u.Encryptor=u.extend({processBlock:function(C,R){this._cipher.encryptBlock(C,R)}}),u.Decryptor=u.extend({processBlock:function(C,R){this._cipher.decryptBlock(C,R)}}),u}(),k.mode.ECB})},h78n:function(N,$,P){"use strict";P.d($,"a",function(){return M});var k=P("q1tI"),u=P.n(k),C=P("TSYQ"),R=P.n(C),h={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},s=function(H){var z=H.map(function(){return Object(k.useRef)()}),B=Object(k.useRef)();return Object(k.useEffect)(function(){var W=Date.now(),F=!1;Object.keys(z).forEach(function(J){var ee=z[J].current;if(!ee)return;F=!0;var q=ee.style;q.transitionDuration=".3s, .3s, .3s, .06s",B.current&&W-B.current<100&&(q.transitionDuration="0s, 0s")}),F&&(B.current=Date.now())}),[z]};function S(){return S=Object.assign||function(K){for(var H=1;H<arguments.length;H++){var z=arguments[H];for(var B in z)Object.prototype.hasOwnProperty.call(z,B)&&(K[B]=z[B])}return K},S.apply(this,arguments)}function f(K,H){return g(K)||E(K,H)||o(K,H)||a()}function a(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o(K,H){if(!K)return;if(typeof K=="string")return r(K,H);var z=Object.prototype.toString.call(K).slice(8,-1);if(z==="Object"&&K.constructor&&(z=K.constructor.name),z==="Map"||z==="Set")return Array.from(K);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return r(K,H)}function r(K,H){(H==null||H>K.length)&&(H=K.length);for(var z=0,B=new Array(H);z<H;z++)B[z]=K[z];return B}function E(K,H){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(K)))return;var z=[],B=!0,W=!1,F=void 0;try{for(var J=K[Symbol.iterator](),ee;!(B=(ee=J.next()).done)&&!(z.push(ee.value),H&&z.length===H);B=!0);}catch(q){W=!0,F=q}finally{try{!B&&J.return!=null&&J.return()}finally{if(W)throw F}}return z}function g(K){if(Array.isArray(K))return K}function m(K,H){if(K==null)return{};var z=w(K,H),B,W;if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(K);for(W=0;W<F.length;W++){if(B=F[W],H.indexOf(B)>=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<B.length;F++){if(W=B[F],H.indexOf(W)>=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;H<arguments.length;H++){var z=arguments[H];for(var B in z)Object.prototype.hasOwnProperty.call(z,B)&&(K[B]=z[B])}return K},n.apply(this,arguments)}function l(K,H){return L(K)||i(K,H)||T(K,H)||c()}function c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T(K,H){if(!K)return;if(typeof K=="string")return v(K,H);var z=Object.prototype.toString.call(K).slice(8,-1);if(z==="Object"&&K.constructor&&(z=K.constructor.name),z==="Map"||z==="Set")return Array.from(K);if(z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(z))return v(K,H)}function v(K,H){(H==null||H>K.length)&&(H=K.length);for(var z=0,B=new Array(H);z<H;z++)B[z]=K[z];return B}function i(K,H){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(K)))return;var z=[],B=!0,W=!1,F=void 0;try{for(var J=K[Symbol.iterator](),ee;!(B=(ee=J.next()).done)&&!(z.push(ee.value),H&&z.length===H);B=!0);}catch(q){W=!0,F=q}finally{try{!B&&J.return!=null&&J.return()}finally{if(W)throw F}}return z}function L(K){if(Array.isArray(K))return K}function A(K,H){if(K==null)return{};var z=b(K,H),B,W;if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(K);for(W=0;W<F.length;W++){if(B=F[W],H.indexOf(B)>=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<B.length;F++){if(W=B[F],H.indexOf(W)>=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;ve<fe;ve++)Ae[ve]=arguments[ve];ze.current||(E.a.cancel(Fe.current),Fe.current=E()(function(){Re.apply(void 0,Ae)}))}return Object(h.useEffect)(function(){return function(){ze.current=!0,E.a.cancel(Fe.current)}},[]),ke}function w(Re){var Fe=Object(h.useRef)([]),ze=Object(h.useState)({}),ke=Object(u.a)(ze,2),fe=ke[1],Ae=Object(h.useRef)(typeof Re=="function"?Re():Re),ve=m(function(){var Ne=Ae.current;Fe.current.forEach(function(We){Ne=We(Ne)}),Fe.current=[],Ae.current=Ne,fe({})});function Pe(Ne){Fe.current.push(Ne),ve()}return[Ae.current,Pe]}var p=P("4IlW");function d(Re,Fe){var ze,ke=Re.prefixCls,fe=Re.id,Ae=Re.active,ve=Re.rtl,Pe=Re.tab,Ne=Pe.key,We=Pe.tab,Be=Pe.disabled,Je=Pe.closeIcon,it=Re.tabBarGutter,pt=Re.tabPosition,ht=Re.closable,yt=Re.renderWrapper,Nt=Re.removeAriaLabel,ar=Re.editable,ur=Re.onClick,hr=Re.onRemove,Er=Re.onFocus,br="".concat(ke,"-tab");h.useEffect(function(){return hr},[]);var pr={};pt==="top"||pt==="bottom"?pr[ve?"marginLeft":"marginRight"]=it:pr.marginBottom=it;var Br=ar&&ht!==!1&&!Be;function _r(Vt){if(Be)return;ur(Vt)}function Sn(Vt){Vt.preventDefault(),Vt.stopPropagation(),ar.onEdit("remove",{key:Ne,event:Vt})}var Or=h.createElement("div",{key:Ne,ref:Fe,className:S()(br,(ze={},Object(k.a)(ze,"".concat(br,"-with-remove"),Br),Object(k.a)(ze,"".concat(br,"-active"),Ae),Object(k.a)(ze,"".concat(br,"-disabled"),Be),ze)),style:pr,onClick:_r},h.createElement("div",{role:"tab","aria-selected":Ae,id:fe&&"".concat(fe,"-tab-").concat(Ne),className:"".concat(br,"-btn"),"aria-controls":fe&&"".concat(fe,"-panel-").concat(Ne),"aria-disabled":Be,tabIndex:Be?null:0,onClick:function(Bt){Bt.stopPropagation(),_r(Bt)},onKeyDown:function(Bt){[p.a.SPACE,p.a.ENTER].includes(Bt.which)&&(Bt.preventDefault(),_r(Bt))},onFocus:Er},We),Br&&h.createElement("button",{type:"button","aria-label":Nt||"remove",tabIndex:0,className:"".concat(br,"-remove"),onClick:function(Bt){Bt.stopPropagation(),Sn(Bt)}},Je||ar.removeIcon||"\xD7"));return yt&&(Or=yt(Or)),Or}var n=h.forwardRef(d),l={width:0,height:0,left:0,top:0};function c(Re,Fe,ze){return Object(h.useMemo)(function(){for(var ke,fe=new Map,Ae=Fe.get((ke=Re[0])===null||ke===void 0?void 0:ke.key)||l,ve=Ae.left+Ae.width,Pe=0;Pe<Re.length;Pe+=1){var Ne=Re[Pe].key,We=Fe.get(Ne);if(!We){var Be;We=Fe.get((Be=Re[Pe-1])===null||Be===void 0?void 0:Be.key)||l}var Je=fe.get(Ne)||Object(R.a)({},We);Je.right=ve-Je.left-Je.width,fe.set(Ne,Je)}return fe},[Re.map(function(ke){return ke.key}).join("_"),Fe,ze])}var T={width:0,height:0,left:0,top:0,right:0};function v(Re,Fe,ze,ke,fe){var Ae=fe.tabs,ve=fe.tabPosition,Pe=fe.rtl,Ne,We,Be;["top","bottom"].includes(ve)?(Ne="width",We=Pe?"right":"left",Be=Math.abs(Fe.left)):(Ne="height",We="top",Be=-Fe.top);var Je=Fe[Ne],it=ze[Ne],pt=ke[Ne],ht=Je;return it+pt>Je&&(ht=Je-pt),Object(h.useMemo)(function(){if(!Ae.length)return[0,0];for(var yt=Ae.length,Nt=yt,ar=0;ar<yt;ar+=1){var ur=Re.get(Ae[ar].key)||T;if(ur[We]+ur[Ne]>Be+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]<Be){hr=Er+1;break}}return[hr,Nt]},[Re,Be,ht,ve,Ae.map(function(yt){return yt.key}).join("_"),Pe])}var i=P("wx14"),L=P("1OyB"),A=P("vuIU"),b=P("JX7q"),x=P("Ji7U"),y=P("LK+K"),_=P("I8Z2"),I=P("bT9E"),j=P("2GS6"),M=P("Gytx"),G=P.n(M),K=P("U8pU"),H=/iPhone/i,z=/iPod/i,B=/iPad/i,W=/\bAndroid(?:.+)Mobile\b/i,F=/Android/i,J=/\bAndroid(?:.+)SD4930UR\b/i,ee=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,q=/Windows Phone/i,ye=/\bWindows(?:.+)ARM\b/i,pe=/BlackBerry/i,le=/BB10/i,Oe=/Opera Mini/i,xe=/\b(CriOS|Chrome)(?:.+)Mobile/i,ie=/Mobile(?:.+)Firefox\b/i;function se(Re,Fe){return Re.test(Fe)}function re(Re){var Fe=Re||(typeof navigator!="undefined"?navigator.userAgent:""),ze=(Fe||"").split("[FBAN");if(typeof ze[1]!="undefined"){var ke=ze,fe=Object(u.a)(ke,1);Fe=fe[0]}if(ze=Fe.split("Twitter"),typeof ze[1]!="undefined"){var Ae=ze,ve=Object(u.a)(Ae,1);Fe=ve[0]}var Pe={apple:{phone:se(H,Fe)&&!se(q,Fe),ipod:se(z,Fe),tablet:!se(H,Fe)&&se(B,Fe)&&!se(q,Fe),device:(se(H,Fe)||se(z,Fe)||se(B,Fe))&&!se(q,Fe)},amazon:{phone:se(J,Fe),tablet:!se(J,Fe)&&se(ee,Fe),device:se(J,Fe)||se(ee,Fe)},android:{phone:!se(q,Fe)&&se(J,Fe)||!se(q,Fe)&&se(W,Fe),tablet:!se(q,Fe)&&!se(J,Fe)&&!se(W,Fe)&&(se(ee,Fe)||se(F,Fe)),device:!se(q,Fe)&&(se(J,Fe)||se(ee,Fe)||se(W,Fe)||se(F,Fe))||se(/\bokhttp\b/i,Fe)},windows:{phone:se(q,Fe),tablet:se(ye,Fe),device:se(q,Fe)||se(ye,Fe)},other:{blackberry:se(pe,Fe),blackberry10:se(le,Fe),opera:se(Oe,Fe),firefox:se(ie,Fe),chrome:se(xe,Fe),device:se(pe,Fe)||se(le,Fe)||se(Oe,Fe)||se(ie,Fe)||se(xe,Fe)},any:null,phone:null,tablet:null};return Pe.any=Pe.apple.device||Pe.android.device||Pe.windows.device||Pe.other.device,Pe.phone=Pe.apple.phone||Pe.android.phone||Pe.windows.phone,Pe.tablet=Pe.apple.tablet||Pe.android.tablet||Pe.windows.tablet,Pe}var be=Object(R.a)(Object(R.a)({},re()),{},{isMobile:re}),Z=be;function te(){}function Ee(Re,Fe,ze){var ke=Fe||"";return Re.key||"".concat(ke,"item_").concat(ze)}function ae(Re){return"".concat(Re,"-menu-")}function Y(Re,Fe){var ze=-1;h.Children.forEach(Re,function(ke){ze+=1,ke&&ke.type&&ke.type.isMenuItemGroup?h.Children.forEach(ke.props.children,function(fe){ze+=1,Fe(fe,ze)}):Fe(ke,ze)})}function X(Re,Fe,ze){if(!Re||ze.find)return;h.Children.forEach(Re,function(ke){if(ke){var fe=ke.type;if(!fe||!(fe.isSubMenu||fe.isMenuItem||fe.isMenuItemGroup))return;Fe.indexOf(ke.key)!==-1?ze.find=!0:ke.props.children&&X(ke.props.children,Fe,ze)}})}var Q=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],he=function(Fe){var ze=arguments.length>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;ve<Ae.length;ve+=1){var Pe=Ae[ve];if(tt(Re[Pe].points,fe,ke))return"".concat(Fe,"-placement-").concat(Pe)}return""}var Me=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Re=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Re)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Re==null?void 0:Re.substr(0,4)))},De=P("MNnm");function Te(Re,Fe){var ze={};return ze[Re.toLowerCase()]=Fe.toLowerCase(),ze["Webkit".concat(Re)]="webkit".concat(Fe),ze["Moz".concat(Re)]="moz".concat(Fe),ze["ms".concat(Re)]="MS".concat(Fe),ze["O".concat(Re)]="o".concat(Fe.toLowerCase()),ze}function de(Re,Fe){var ze={animationend:Te("Animation","AnimationEnd"),transitionend:Te("Transition","TransitionEnd")};return Re&&("AnimationEvent"in Fe||delete ze.animationend.animation,"TransitionEvent"in Fe||delete ze.transitionend.transition),ze}var ge=de(Object(De.a)(),typeof window!="undefined"?window:{}),we={};if(Object(De.a)()){var _e=document.createElement("div");we=_e.style}var Ue={};function Xe(Re){if(Ue[Re])return Ue[Re];var Fe=ge[Re];if(Fe)for(var ze=Object.keys(Fe),ke=ze.length,fe=0;fe<ke;fe+=1){var Ae=ze[fe];if(Object.prototype.hasOwnProperty.call(Fe,Ae)&&Ae in we)return Ue[Re]=Fe[Ae],Ue[Re]}return""}var at=Xe("animationend"),ut=Xe("transitionend"),mt=!!(at&&ut),ct=at||"animationend",_t=ut||"transitionend";function At(Re,Fe){if(!Re)return null;if(Object(K.a)(Re)==="object"){var ze=Fe.replace(/-\w/g,function(ke){return ke[1].toUpperCase()});return Re[ze]}return"".concat(Re,"-").concat(Fe)}var Et="none",Qt="appear",qt="enter",Jt="leave",mr="none",Pt="prepare",cr="start",ir="active",Ht="end";function $t(Re){var Fe=Object(h.useRef)(!1),ze=Object(h.useState)(Re),ke=Object(u.a)(ze,2),fe=ke[0],Ae=ke[1];function ve(Pe){Fe.current||Ae(Pe)}return Object(h.useEffect)(function(){return function(){Fe.current=!0}},[]),[fe,ve]}var Kr=Object(De.a)()?h.useLayoutEffect:h.useEffect,En=Kr,Nr=function(){var Re=h.useRef(null);function Fe(){Qe.a.cancel(Re.current)}function ze(ke){var fe=arguments.length>1&&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;Je<fe;Je+=1){var it=ve[Je];if(it.key===We.key){ke<Je&&(ze=ze.concat(ve.slice(ke,Je).map(function(pt){return Object(R.a)(Object(R.a)({},pt),{},{status:st})})),ke=Je),ze.push(Object(R.a)(Object(R.a)({},it),{},{status:Ot})),ke+=1,Be=!0;break}}Be||ze.push(Object(R.a)(Object(R.a)({},We),{},{status:jr}))}),ke<fe&&(ze=ze.concat(ve.slice(ke).map(function(We){return Object(R.a)(Object(R.a)({},We),{},{status:st})})));var Pe={};ze.forEach(function(We){var Be=We.key;Pe[Be]=(Pe[Be]||0)+1});var Ne=Object.keys(Pe).filter(function(We){return Pe[We]>1});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;Gn<Pn;Gn+=1){nn=(nn+Yr+Pn)%Pn;var On=ln[nn];if(!On.disabled){Br(On.key);return}}}function Wr(Yr){var ln=Yr.which;if(!ur){[p.a.DOWN,p.a.SPACE,p.a.ENTER].includes(ln)&&(hr(!0),Yr.preventDefault());return}switch(ln){case p.a.UP:Lr(-1),Yr.preventDefault();break;case p.a.DOWN:Lr(1),Yr.preventDefault();break;case p.a.ESC:hr(!1);break;case p.a.SPACE:case p.a.ENTER:pr!==null&&yt(pr,Yr);break}}Object(h.useEffect)(function(){var Yr=document.getElementById(Or);Yr&&Yr.scrollIntoView&&Yr.scrollIntoView(!1)},[pr]),Object(h.useEffect)(function(){ur||Br(null)},[ur]);var It=Object(k.a)({},ht?"marginLeft":"marginRight",pt);fe.length||(It.visibility="hidden",It.order=1);var Hr=S()(Object(k.a)({},"".concat(Sn,"-rtl"),ht)),Cn=ve?null:h.createElement(ai.a,{prefixCls:Sn,overlay:Bt,trigger:["hover"],visible:ur,transitionName:We,onVisibleChange:hr,overlayClassName:Hr,mouseEnterDelay:.1,mouseLeaveDelay:.1},h.createElement("button",{type:"button",className:"".concat(ze,"-nav-more"),style:It,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":_r,id:"".concat(ke,"-more"),"aria-expanded":ur,onKeyDown:Wr},Ne));return h.createElement("div",{className:S()("".concat(ze,"-nav-operations"),Je),style:Be,ref:Fe},Cn,h.createElement(Aa,{prefixCls:ze,locale:Ae,editable:it}))}var _i=h.forwardRef(Ia),ii=Object(h.createContext)(null),Fr=.1,wr=.01,vr=20,Qn=Math.pow(.995,vr);function Na(){var Re=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Re)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Re.substr(0,4)))}function ja(Re,Fe){var ze=Object(h.useState)(),ke=Object(u.a)(ze,2),fe=ke[0],Ae=ke[1],ve=Object(h.useState)(0),Pe=Object(u.a)(ve,2),Ne=Pe[0],We=Pe[1],Be=Object(h.useState)(0),Je=Object(u.a)(Be,2),it=Je[0],pt=Je[1],ht=Object(h.useState)(),yt=Object(u.a)(ht,2),Nt=yt[0],ar=yt[1],ur=Object(h.useRef)();function hr(Vt){var Bt=Vt.touches[0],Lr=Bt.screenX,Wr=Bt.screenY;Ae({x:Lr,y:Wr}),window.clearInterval(ur.current)}function Er(Vt){if(!fe)return;Vt.preventDefault();var Bt=Vt.touches[0],Lr=Bt.screenX,Wr=Bt.screenY;Ae({x:Lr,y:Wr});var It=Lr-fe.x,Hr=Wr-fe.y;Fe(It,Hr);var Cn=Date.now();We(Cn),pt(Cn-Ne),ar({x:It,y:Hr})}function br(){if(!fe)return;if(Ae(null),ar(null),Nt){var Vt=Nt.x/it,Bt=Nt.y/it,Lr=Math.abs(Vt),Wr=Math.abs(Bt);if(Math.max(Lr,Wr)<Fr)return;var It=Vt,Hr=Bt;ur.current=window.setInterval(function(){if(Math.abs(It)<wr&&Math.abs(Hr)<wr){window.clearInterval(ur.current);return}It*=Qn,Hr*=Qn,Fe(It*vr,Hr*vr)},vr)}}var pr=Object(h.useRef)(0),Br=Object(h.useRef)(!1),_r=Object(h.useRef)();function Sn(Vt){var Bt=Vt.deltaX,Lr=Vt.deltaY,Wr=0,It=Math.abs(Bt),Hr=Math.abs(Lr);It===Hr?Wr=_r.current==="x"?Bt:Lr:It>Hr?(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 qr<bi?[bi,!1]:qr>La?[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.right<It?Yn=Ir.right:Ir.right+Ir.width>It+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<On):(Fi=It<0,Ri=-It+tn<On):(Lo=ln<0,Bi=-ln+Qa<Xn),h.createElement("div",{ref:Fe,role:"tablist",className:S()("".concat(fe,"-nav"),ve),style:Pe,onKeyDown:function(){Ui()}},h.createElement(Zt,{position:"left",extra:it,prefixCls:fe}),h.createElement(g.a,{onResize:oo},h.createElement("div",{className:S()(ui,(ze={},Object(k.a)(ze,"".concat(ui,"-ping-left"),Fi),Object(k.a)(ze,"".concat(ui,"-ping-right"),Ri),Object(k.a)(ze,"".concat(ui,"-ping-top"),Lo),Object(k.a)(ze,"".concat(ui,"-ping-bottom"),Bi),ze)),ref:Er},h.createElement(g.a,{onResize:oo},h.createElement("div",{ref:br,className:"".concat(fe,"-nav-list"),style:{transform:"translate(".concat(It,"px, ").concat(ln,"px)"),transition:ji?"none":void 0}},Zo,h.createElement(Aa,{ref:Br,prefixCls:fe,locale:ht,editable:pt,style:{visibility:Ro?"hidden":null}}),h.createElement("div",{className:S()("".concat(fe,"-ink-bar"),Object(k.a)({},"".concat(fe,"-ink-bar-animated"),We.inkBar)),style:Di}))))),h.createElement(_i,Object.assign({},Re,{ref:pr,prefixCls:fe,tabs:Un,className:!Ro&&yi})),h.createElement(Zt,{position:"right",extra:it,prefixCls:fe}))}var Gr=h.forwardRef(nr);function yr(Re){var Fe=Re.id,ze=Re.activeKey,ke=Re.animated,fe=Re.tabPosition,Ae=Re.rtl,ve=Re.destroyInactiveTabPane,Pe=h.useContext(ii),Ne=Pe.prefixCls,We=Pe.tabs,Be=ke.tabPane,Je=We.findIndex(function(it){return it.key===ze});return h.createElement("div",{className:S()("".concat(Ne,"-content-holder"))},h.createElement("div",{className:S()("".concat(Ne,"-content"),"".concat(Ne,"-content-").concat(fe),Object(k.a)({},"".concat(Ne,"-content-animated"),Be)),style:Je&&Be?Object(k.a)({},Ae?"marginRight":"marginLeft","-".concat(Je,"00%")):null},We.map(function(it){return h.cloneElement(it.node,{key:it.key,prefixCls:Ne,tabKey:it.key,id:Fe,animated:Be,active:it.key===ze,destroyInactiveTabPane:ve})})))}function Tn(Re){var Fe=Re.prefixCls,ze=Re.forceRender,ke=Re.className,fe=Re.style,Ae=Re.id,ve=Re.active,Pe=Re.animated,Ne=Re.destroyInactiveTabPane,We=Re.tabKey,Be=Re.children,Je=h.useState(ze),it=Object(u.a)(Je,2),pt=it[0],ht=it[1];h.useEffect(function(){ve?ht(!0):Ne&&ht(!1)},[ve,Ne]);var yt={};return ve||(Pe?(yt.visibility="hidden",yt.height=0,yt.overflowY="hidden"):yt.display="none"),h.createElement("div",{id:Ae&&"".concat(Ae,"-panel-").concat(We),role:"tabpanel",tabIndex:ve?0:-1,"aria-labelledby":Ae&&"".concat(Ae,"-tab-").concat(We),"aria-hidden":!ve,style:Object(R.a)(Object(R.a)({},yt),fe),className:S()("".concat(Fe,"-tabpane"),ve&&"".concat(Fe,"-tabpane-active"),ke)},(ve||pt||ze)&&Be)}var pn=0;function xa(Re){return Object(f.a)(Re).map(function(Fe){if(h.isValidElement(Fe)){var ze=Fe.key!==void 0?String(Fe.key):void 0;return Object(R.a)(Object(R.a)({key:ze},Fe.props),{},{node:Fe})}return null}).filter(function(Fe){return Fe})}function kn(Re,Fe){var ze,ke=Re.id,fe=Re.prefixCls,Ae=fe===void 0?"rc-tabs":fe,ve=Re.className,Pe=Re.children,Ne=Re.direction,We=Re.activeKey,Be=Re.defaultActiveKey,Je=Re.editable,it=Re.animated,pt=Re.tabPosition,ht=pt===void 0?"top":pt,yt=Re.tabBarGutter,Nt=Re.tabBarStyle,ar=Re.tabBarExtraContent,ur=Re.locale,hr=Re.moreIcon,Er=Re.moreTransitionName,br=Re.destroyInactiveTabPane,pr=Re.renderTabBar,Br=Re.onChange,_r=Re.onTabClick,Sn=Re.onTabScroll,Or=Object(C.a)(Re,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),Vt=xa(Pe),Bt=Ne==="rtl",Lr;it===!1?Lr={inkBar:!1,tabPane:!1}:Lr=Object(R.a)({inkBar:!0,tabPane:!1},it!==!0?it:null);var Wr=Object(h.useState)(!1),It=Object(u.a)(Wr,2),Hr=It[0],Cn=It[1];Object(h.useEffect)(function(){Cn(Na())},[]);var Yr=Object(a.a)(function(){var an;return(an=Vt[0])===null||an===void 0?void 0:an.key},{value:We,defaultValue:Be}),ln=Object(u.a)(Yr,2),nn=ln[0],Pn=ln[1],Gn=Object(h.useState)(function(){return Vt.findIndex(function(an){return an.key===nn})}),On=Object(u.a)(Gn,2),la=On[0],Da=On[1];Object(h.useEffect)(function(){var an=Vt.findIndex(function(Ja){return Ja.key===nn});if(an===-1){var Fa;an=Math.max(0,Math.min(la,Vt.length-1)),Pn((Fa=Vt[an])===null||Fa===void 0?void 0:Fa.key)}Da(an)},[Vt.map(function(an){return an.key}).join("_"),nn,la]);var ha=Object(a.a)(null,{value:ke}),Xn=Object(u.a)(ha,2),bn=Xn[0],un=Xn[1],An=ht;Hr&&!["left","right"].includes(ht)&&(An="top"),Object(h.useEffect)(function(){ke||(un("rc-tabs-".concat(pn)),pn+=1)},[]);function _n(an,Fa){_r==null||_r(an,Fa),Pn(an),Br==null||Br(an)}var Ra={id:bn,activeKey:nn,animated:Lr,tabPosition:An,rtl:Bt,mobile:Hr},Ya,$a=Object(R.a)(Object(R.a)({},Ra),{},{editable:Je,locale:ur,moreIcon:hr,moreTransitionName:Er,tabBarGutter:yt,onTabClick:_n,onTabScroll:Sn,extra:ar,style:Nt,panes:Pe});return pr?Ya=pr($a,Gr):Ya=h.createElement(Gr,Object.assign({},$a)),h.createElement(ii.Provider,{value:{tabs:Vt,prefixCls:Ae}},h.createElement("div",Object.assign({ref:Fe,id:ke,className:S()(Ae,"".concat(Ae,"-").concat(An),(ze={},Object(k.a)(ze,"".concat(Ae,"-mobile"),Hr),Object(k.a)(ze,"".concat(Ae,"-editable"),Je),Object(k.a)(ze,"".concat(Ae,"-rtl"),Bt),ze),ve)},Or),Ya,h.createElement(yr,Object.assign({destroyInactiveTabPane:br},Ra,{animated:Lr}))))}var jn=h.forwardRef(kn);jn.TabPane=Tn;var Hn=jn,Ua=$.b=Hn},kSUc:function(N,$,P){},lOMy:function(N,$,P){},lPiR: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=[],a=[];(function(){function E(p){for(var d=u.sqrt(p),n=2;n<=d;n++)if(!(p%n))return!1;return!0}function g(p){return(p-(p|0))*4294967296|0}for(var m=2,w=0;w<64;)E(m)&&(w<8&&(f[w]=g(u.pow(m,1/2))),a[w]=g(u.pow(m,1/3)),w++),m++})();var o=[],r=S.SHA256=s.extend({_doReset:function(){this._hash=new h.init(f.slice(0))},_doProcessBlock:function(E,g){for(var m=this._hash.words,w=m[0],p=m[1],d=m[2],n=m[3],l=m[4],c=m[5],T=m[6],v=m[7],i=0;i<64;i++){if(i<16)o[i]=E[g+i]|0;else{var L=o[i-15],A=(L<<25|L>>>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<W.listStack[W.listStack.length-1];)W.listStack.pop(),W.listStack.length?W.indentation=W.listStack[W.listStack.length-1]:W.list=!1;W.list!==!1&&(W.indentationDiff=le-W.listStack[W.listStack.length-1])}var Oe=!J&&!q&&!W.prevLine.header&&(!ye||!ee)&&!W.prevLine.fencedCodeEnd,xe=(W.list===!1||q||J)&&W.indentation<=pe&&B.match(a),ie=null;if(W.indentationDiff>=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<F,ee=F+3;if(W.fencedEndRE&&W.indentation<=ee&&(J||B.match(W.fencedEndRE))){C.highlightFormatting&&(W.formatting="code-block");var q;return J||(q=b(W)),W.localMode=W.localState=null,W.block=i,W.f=y,W.fencedEndRE=null,W.code=0,W.thisLine.fencedCodeEnd=!0,J?c(B,W,W.block):q}else return W.localMode?W.localMode.token(B,W.localState):(B.skipToEnd(),S.code)}function b(B){var W=[];if(B.formatting){W.push(S.formatting),typeof B.formatting=="string"&&(B.formatting=[B.formatting]);for(var F=0;F<B.formatting.length;F++)W.push(S.formatting+"-"+B.formatting[F]),B.formatting[F]==="header"&&W.push(S.formatting+"-"+B.formatting[F]+"-"+B.header),B.formatting[F]==="quote"&&(!C.maxBlockquoteDepth||C.maxBlockquoteDepth>=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:"<!--",blockCommentEnd:"-->",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;R<k.length;R++)u(k[R]);return u}return N}()({1:[function(N,$,P){"use strict";var k=N("./browser/client");k.Buffer=N("buffer").Buffer,k.urllib=N("../shims/xhr"),k.version=N("./browser/version").version,$.exports=k},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(N,$,P){(function(k,u){"use strict";var C=N("babel-runtime/core-js/promise"),R=a(C),h=N("babel-runtime/regenerator"),s=a(h),S=N("babel-runtime/core-js/object/assign"),f=a(S);function a(G){return G&&G.__esModule?G:{default:G}}var o=N("debug")("ali-oss"),r=N("copy-to"),E=N("xml2js"),g=N("agentkeepalive"),m=N("merge-descriptors"),w=N("url"),p=N("is-type-of"),d=N("platform"),n=N("utility"),l=N("urllib"),c=N("./version"),T=N("bowser"),v=N("../common/signUtils"),i=N("../common/utils/isIP"),L=i.isIP,A=N("../common/client/initOptions"),b=N("../common/utils/createRequest"),x=b.createRequest,y=new g;function _(){var G=d.name,K=d.version;G&&G.toLowerCase&&G.toLowerCase()==="ie"&&K.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function I(){return location&&location.protocol==="https:"}function j(G,K){if(_(),!(this instanceof j))return new j(G,K);G&&G.inited?this.options=G:this.options=j.initOptions(G),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=l,this.agent=this.options.agent||y),this.ctx=K,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}$.exports=j,j.initOptions=function(K){K.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var H=(0,f.default)({secure:I(),useFetch:!1},K);return A(H)};var M=j.prototype;M.debug=o,m(M,N("./object")),m(M,N("../common/bucket/getBucketWebsite")),m(M,N("../common/bucket/putBucketWebsite")),m(M,N("../common/bucket/deleteBucketWebsite")),m(M,N("../common/bucket/getBucketLifecycle")),m(M,N("../common/bucket/putBucketLifecycle")),m(M,N("../common/bucket/deleteBucketLifecycle")),m(M,N("../common/bucket/putBucketVersioning")),m(M,N("../common/bucket/getBucketVersioning")),m(M,N("./managed-upload")),m(M,N("../common/multipart")),m(M,N("../common/parallel")),M.signature=function(K){return this.debug("authorization stringToSign: %s",K,"info"),v.computeSignature(this.options.accessKeySecret,K)},M.authorization=function(K,H,z,B){var W=v.buildCanonicalString(K.toUpperCase(),H,{headers:B,parameters:z});return v.authorization(this.options.accessKeyId,this.options.accessKeySecret,W)},M.request=function(K){var H,z,B,W,F,J;return s.default.async(function(q){for(;;)switch(q.prev=q.next){case 0:return H=x.call(this,K),this.options.useFetch||(H.params.mode="disable-fetch"),z=void 0,B=void 0,W=!!K.stream,q.prev=5,q.next=8,s.default.awrap(this.urllib.request(H.url,H.params));case 8:z=q.sent,this.debug("response %s %s, got %s, headers: %j",K.method,H.url,z.status,z.headers,"info"),q.next=15;break;case 12:q.prev=12,q.t0=q.catch(5),B=q.t0;case 15:if(F=void 0,!(z&&K.successStatuses&&K.successStatuses.indexOf(z.status)===-1)){q.next=28;break}return q.next=19,s.default.awrap(this.requestError(z));case 19:if(F=q.sent,!(F.code==="RequestTimeTooSkewed"&&!W)){q.next=25;break}return this.options.amendTimeSkewed=+new Date(F.serverTime)-new Date,q.next=24,s.default.awrap(this.request(K));case 24:return q.abrupt("return",q.sent);case 25:F.params=K,q.next=32;break;case 28:if(!B){q.next=32;break}return q.next=31,s.default.awrap(this.requestError(B));case 31:F=q.sent;case 32:if(!F){q.next=34;break}throw F;case 34:if(!K.xmlResponse){q.next=39;break}return q.next=37,s.default.awrap(this.parseXML(z.data));case 37:J=q.sent,z.data=J;case 39:return q.abrupt("return",z);case 40:case"end":return q.stop()}},null,this,[[5,12]])},M._getResource=function(K){var H="/";return K.bucket&&(H+=K.bucket+"/"),K.object&&(H+=K.object),H},M._isIP=L,M._escape=function(K){return n.encodeURIComponent(K).replace(/%2F/g,"/")},M._getReqUrl=function(K){var H={};r(this.options.endpoint).to(H);var z=this._isIP(H.hostname),B=this.options.cname;K.bucket&&!B&&!z&&(H.host=K.bucket+"."+H.host);var W="/";K.bucket&&z&&(W+=K.bucket+"/"),K.object&&(W+=this._escape(K.object).replace(/\+/g,"%2B")),H.pathname=W;var F={};if(K.query&&m(F,K.query),K.subres){var J={};p.string(K.subres)?J[K.subres]="":p.array(K.subres)?K.subres.forEach(function(ee){J[ee]=""}):J=K.subres,m(F,J)}return H.query=F,w.format(H)},M._getUserAgent=function(){var K=u&&u.browser?"js":"nodejs",H="aliyun-sdk-"+K+"/"+c.version,z=d.description;return!z&&u&&(z="Node.js "+u.version.slice(1)+" on "+u.platform+" "+u.arch),this._checkUserAgent(H+" "+z)},M._checkUserAgent=function(K){var H=K.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return H},M.checkBrowserAndVersion=function(K,H){return T.name===K&&T.version.split(".")[0]===H},M.parseXML=function(K){return new R.default(function(H,z){k.isBuffer(K)&&(K=K.toString()),E.parseString(K,{explicitRoot:!1,explicitArray:!1},function(B,W){B?z(B):H(W)})})},M.requestError=function(K){var H,z,B,W;return s.default.async(function(J){for(;;)switch(J.prev=J.next){case 0:if(H=null,!(!K.data||!K.data.length)){J.next=5;break}K.status===-1||K.status===-2?(H=new Error(K.message),H.name=K.name,H.status=K.status,H.code=K.name):(K.status===404?(H=new Error("Object not exists"),H.name="NoSuchKeyError",H.status=404,H.code="NoSuchKey"):K.status===412?(H=new Error("Pre condition failed"),H.name="PreconditionFailedError",H.status=412,H.code="PreconditionFailed"):(H=new Error("Unknow error, status: "+K.status),H.name="UnknowError",H.status=K.status),H.requestId=K.headers["x-oss-request-id"],H.host=""),J.next=33;break;case 5:return z=String(K.data),this.debug("request response error data: %s",z,"error"),B=void 0,J.prev=8,J.next=11,s.default.awrap(this.parseXML(z));case 11:if(J.t0=J.sent,J.t0){J.next=14;break}J.t0={};case 14:B=J.t0,J.next=24;break;case 17:return J.prev=17,J.t1=J.catch(8),this.debug(z,"error"),J.t1.message+=`
raw xml: `+z,J.t1.status=K.status,J.t1.requestId=K.headers["x-oss-request-id"],J.abrupt("return",J.t1);case 24:W=B.Message||"unknow request error, status: "+K.status,B.Condition&&(W+=" (condition: "+B.Condition+")"),H=new Error(W),H.name=B.Code?B.Code+"Error":"UnknowError",H.status=K.status,H.code=B.Code,H.requestId=B.RequestId,H.hostId=B.HostId,H.serverTime=B.ServerTime;case 33:return this.debug("generate error %j",H,"error"),J.abrupt("return",H);case 35:case"end":return J.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:N("../../node_modules/is-buffer/index.js")},N("_process"))},{"../../node_modules/is-buffer/index.js":197,"../common/bucket/deleteBucketLifecycle":6,"../common/bucket/deleteBucketWebsite":7,"../common/bucket/getBucketLifecycle":8,"../common/bucket/getBucketVersioning":9,"../common/bucket/getBucketWebsite":10,"../common/bucket/putBucketLifecycle":11,"../common/bucket/putBucketVersioning":12,"../common/bucket/putBucketWebsite":13,"../common/client/initOptions":15,"../common/multipart":18,"../common/parallel":33,"../common/signUtils":34,"../common/utils/createRequest":38,"../common/utils/isIP":45,"./managed-upload":3,"./object":4,"./version":5,_process:208,agentkeepalive:48,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,bowser:70,"copy-to":76,debug:288,"is-type-of":289,"merge-descriptors":200,platform:206,url:238,urllib:291,utility:290,xml2js:249}],3:[function(N,$,P){(function(k){"use strict";var u=N("babel-runtime/core-js/array/from"),C=f(u),R=N("babel-runtime/core-js/promise"),h=f(R),s=N("babel-runtime/regenerator"),S=f(s);function f(v){return v&&v.__esModule?v:{default:v}}var a=N("is-type-of"),o=N("util"),r=N("path"),E=N("mime"),g=N("copy-to"),m=N("../common/utils/isBlob"),w=m.isBlob,p=N("../common/utils/isFile"),d=p.isFile,n=P;n.multipartUpload=function(i,L,A){var b,x,y,_,I,j,M,G,K;return S.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:if(this.resetCancelFlag(),A=A||{},!(A.checkpoint&&A.checkpoint.uploadId)){z.next=6;break}return z.next=5,S.default.awrap(this._resumeMultipart(A.checkpoint,A));case 5:return z.abrupt("return",z.sent);case 6:return b=100*1024,A.mime||(d(L)?A.mime=E.getType(r.extname(L.name)):w(L)?A.mime=L.type:A.mime=E.getType(r.extname(L))),A.headers=A.headers||{},this._convertMetaToHeaders(A.meta,A.headers),z.next=12,S.default.awrap(this._getFileSize(L));case 12:if(x=z.sent,!(x<b)){z.next=25;break}return y=this._createStream(L,0,x),A.contentLength=x,z.next=18,S.default.awrap(this.putStream(i,y,A));case 18:if(_=z.sent,!(A&&A.progress)){z.next=22;break}return z.next=22,S.default.awrap(A.progress(1));case 22:return I={res:_.res,bucket:this.options.bucket,name:i,etag:_.res.headers.etag},(A.headers&&A.headers["x-oss-callback"]||A.callback)&&(I.data=_.data),z.abrupt("return",I);case 25:if(!(A.partSize&&!(parseInt(A.partSize,10)===A.partSize))){z.next=27;break}throw new Error("partSize must be int number");case 27:if(!(A.partSize&&A.partSize<b)){z.next=29;break}throw new Error("partSize must not be smaller than "+b);case 29:return z.next=31,S.default.awrap(this.initMultipartUpload(i,A));case 31:if(j=z.sent,M=j.uploadId,G=this._getPartSize(x,A.partSize),K={file:L,name:i,fileSize:x,partSize:G,uploadId:M,doneParts:[]},!(A&&A.progress)){z.next=38;break}return z.next=38,S.default.awrap(A.progress(0,K,j.res));case 38:return z.next=40,S.default.awrap(this._resumeMultipart(K,A));case 40:return z.abrupt("return",z.sent);case 41:case"end":return z.stop()}},null,this)},n._resumeMultipart=function(i,L){var A,b,x,y,_,I,j,M,G,K,H,z,B,W,F,J,ee,q;return S.default.async(function(pe){for(;;)switch(pe.prev=pe.next){case 0:if(A=this,!this.isCancel()){pe.next=3;break}throw this._makeCancelEvent();case 3:return b=i.file,x=i.fileSize,y=i.partSize,_=i.uploadId,I=i.doneParts,j=i.name,M=[],I.length>0&&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.start<this.fileBuffer.length;){var A=this.start,b=A+i;b=b>this.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;x<A;x++){var y=L*x,_=Math.min(y+L,i);b.push({start:y,end:_})}return b}}).call(this,N("buffer").Buffer)},{"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/array/from":52,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,buffer:73,"copy-to":76,"is-type-of":289,mime:202,path:205,stream:230,util:243}],4:[function(N,$,P){"use strict";var k=N("babel-runtime/core-js/promise"),u=a(k),C=N("babel-runtime/core-js/object/keys"),R=a(C),h=N("babel-runtime/core-js/object/assign"),s=a(h),S=N("babel-runtime/regenerator"),f=a(S);function a(A){return A&&A.__esModule?A:{default:A}}var o=N("utility"),r=N("fs"),E=N("is-type-of"),g=N("url"),m=N("copy-to"),w=N("path"),p=N("mime"),d=N("../common/callback"),n=N("../common/signUtils"),l=N("merge-descriptors"),c=N("../common/utils/isBlob"),T=c.isBlob,v=N("../common/utils/isFile"),i=v.isFile,L=P;L.append=function(b,x,y){var _;return f.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return y=y||{},y.position===void 0&&(y.position="0"),y.subres={append:"",position:y.position},y.method="POST",j.next=6,f.default.awrap(this.put(b,x,y));case 6:return _=j.sent,_.nextAppendPosition=_.res.headers["x-oss-next-append-position"],j.abrupt("return",_);case 9:case"end":return j.stop()}},null,this)},L.put=function(b,x,y){var _,I,j,M,G,K,H;return f.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:if(_=void 0,y=y||{},b=this._objectName(b),!E.buffer(x)){B.next=7;break}_=x,B.next=33;break;case 7:if(!(T(x)||i(x))){B.next=32;break}return y.mime||(i(x)?y.mime=p.getType(w.extname(x.name)):y.mime=x.type),I=this._createStream(x,0,x.size),B.next=12,f.default.awrap(this._getFileSize(x));case 12:return y.contentLength=B.sent,B.prev=13,B.next=16,f.default.awrap(this.putStream(b,I,y));case 16:return j=B.sent,B.abrupt("return",j);case 20:if(B.prev=20,B.t0=B.catch(13),!(B.t0.code==="RequestTimeTooSkewed")){B.next=29;break}return this.options.amendTimeSkewed=+new Date(B.t0.serverTime)-new Date,B.next=26,f.default.awrap(this.put(b,x,y));case 26:return B.abrupt("return",B.sent);case 29:throw B.t0;case 30:B.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return y.headers=y.headers||{},this._convertMetaToHeaders(y.meta,y.headers),M=y.method||"PUT",G=this._objectRequestParams(M,b,y),d.encodeCallback(G,y),G.mime=y.mime,G.content=_,G.successStatuses=[200],B.next=43,f.default.awrap(this.request(G));case 43:return K=B.sent,H={name:b,url:this._objectUrl(b),res:K.res},G.headers&&G.headers["x-oss-callback"]&&(H.data=JSON.parse(K.data.toString())),B.abrupt("return",H);case 47:case"end":return B.stop()}},null,this,[[13,20]])},L.putStream=function(b,x,y){var _,I,j,M;return f.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:return y=y||{},y.headers=y.headers||{},b=this._objectName(b),y.contentLength?y.headers["Content-Length"]=y.contentLength:y.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(y.meta,y.headers),_=y.method||"PUT",I=this._objectRequestParams(_,b,y),d.encodeCallback(I,y),I.mime=y.mime,I.stream=x,I.successStatuses=[200],K.next=13,f.default.awrap(this.request(I));case 13:return j=K.sent,M={name:b,url:this._objectUrl(b),res:j.res},I.headers&&I.headers["x-oss-callback"]&&(M.data=JSON.parse(j.data.toString())),K.abrupt("return",M);case 17:case"end":return K.stop()}},null,this)},l(L,N("../common/object/copyObject")),l(L,N("../common/object/getObjectTagging")),l(L,N("../common/object/putObjectTagging")),l(L,N("../common/object/deleteObjectTagging")),l(L,N("../common/image")),l(L,N("../common/object/getBucketVersions")),l(L,N("../common/object/getACL")),l(L,N("../common/object/putACL")),l(L,N("../common/object/head")),l(L,N("../common/object/delete")),l(L,N("../common/object/get")),l(L,N("../common/object/putSymlink")),l(L,N("../common/object/getSymlink")),l(L,N("../common/object/deleteMulti")),l(L,N("../common/object/getObjectMeta")),L.putMeta=function(b,x,y){var _;return f.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return j.next=2,f.default.awrap(this.copy(b,b,{meta:x||{},timeout:y&&y.timeout,ctx:y&&y.ctx}));case 2:return _=j.sent,j.abrupt("return",_);case 4:case"end":return j.stop()}},null,this)},L.list=function(b,x){var y,_,I,j,M;return f.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:return y=this._objectRequestParams("GET","",x),y.query=b,y.xmlResponse=!0,y.successStatuses=[200],K.next=6,f.default.awrap(this.request(y));case 6:return _=K.sent,I=_.data.Contents,j=this,I&&(Array.isArray(I)||(I=[I]),I=I.map(function(H){return{name:H.Key,url:j._objectUrl(H.Key),lastModified:H.LastModified,etag:H.ETag,type:H.Type,size:Number(H.Size),storageClass:H.StorageClass,owner:{id:H.Owner.ID,displayName:H.Owner.DisplayName}}})),M=_.data.CommonPrefixes||null,M&&(Array.isArray(M)||(M=[M]),M=M.map(function(H){return H.Prefix})),K.abrupt("return",{res:_.res,objects:I,prefixes:M,nextMarker:_.data.NextMarker||null,isTruncated:_.data.IsTruncated==="true"});case 13:case"end":return K.stop()}},null,this)},L.restore=function(b,x){var y,_;return f.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return x=x||{},x.subres=(0,s.default)({restore:""},x.subres),x.versionId&&(x.subres.versionId=x.versionId),y=this._objectRequestParams("POST",b,x),y.successStatuses=[202],j.next=7,f.default.awrap(this.request(y));case 7:return _=j.sent,j.abrupt("return",{res:_.res});case 9:case"end":return j.stop()}},null,this)},L.signatureUrl=function(b,x){x=x||{},b=this._objectName(b),x.method=x.method||"GET";var y=o.timestamp()+(x.expires||1800),_={bucket:this.options.bucket,object:b},I=this._getResource(_);this.options.stsToken&&(x["security-token"]=this.options.stsToken);var j=n._signatureForURL(this.options.accessKeySecret,x,I,y),M=g.parse(this._getReqUrl(_));return M.query={OSSAccessKeyId:this.options.accessKeyId,Expires:y,Signature:j.Signature},m(j.subResource).to(M.query),M.format()},L.getObjectUrl=function(b,x){return x?x[x.length-1]!=="/"&&(x+="/"):x=this.options.endpoint.format(),x+this._escape(this._objectName(b))},L._objectUrl=function(b){return this._getReqUrl({bucket:this.options.bucket,object:b})},L.generateObjectUrl=function(A,b){if(b)b[b.length-1]!=="/"&&(b+="/");else{b=this.options.endpoint.format();var x=g.parse(b),y=this.options.bucket;x.hostname=y+"."+x.hostname,x.host=y+"."+x.host,b=x.format()}return b+this._escape(this._objectName(A))},L._objectRequestParams=function(b,x,y){if(!this.options.bucket)throw new Error("Please create a bucket first");y=y||{},x=this._objectName(x);var _={object:x,bucket:this.options.bucket,method:b,subres:y&&y.subres,timeout:y&&y.timeout,ctx:y&&y.ctx};return y.headers&&(_.headers={},m(y.headers).to(_.headers)),_},L._objectName=function(b){return b.replace(/^\/+/,"")},L._convertMetaToHeaders=function(b,x){if(!b)return;(0,R.default)(b).forEach(function(y){x["x-oss-meta-"+y]=b[y]})},L._deleteFileSafe=function(b){var x=this;return new u.default(function(y){r.exists(b,function(_){_?r.unlink(b,function(I){I&&x.debug("unlink %j error: %s",b,I,"error"),y()}):y()})})}},{"../common/callback":14,"../common/image":16,"../common/object/copyObject":19,"../common/object/delete":20,"../common/object/deleteMulti":21,"../common/object/deleteObjectTagging":22,"../common/object/get":23,"../common/object/getACL":24,"../common/object/getBucketVersions":25,"../common/object/getObjectMeta":26,"../common/object/getObjectTagging":27,"../common/object/getSymlink":28,"../common/object/head":29,"../common/object/putACL":30,"../common/object/putObjectTagging":31,"../common/object/putSymlink":32,"../common/signUtils":34,"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,"copy-to":76,fs:71,"is-type-of":289,"merge-descriptors":200,mime:202,path:205,url:238,utility:290}],5:[function(N,$,P){"use strict";P.version="6.10.0"},{}],6:[function(N,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=C(k);function C(S){return S&&S.__esModule?S:{default:S}}var R=N("../utils/checkBucketName"),h=R.checkBucketName,s=P;s.deleteBucketLifecycle=function(f,a){var o,r;return u.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return h(f),o=this._bucketRequestParams("DELETE",f,"lifecycle",a),o.successStatuses=[204],g.next=5,u.default.awrap(this.request(o));case 5:return r=g.sent,g.abrupt("return",{res:r.res});case 7:case"end":return g.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(N,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=C(k);function C(S){return S&&S.__esModule?S:{default:S}}var R=N("../utils/checkBucketName"),h=R.checkBucketName,s=P;s.deleteBucketWebsite=function(f,a){var o,r;return u.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:return h(f),o=this._bucketRequestParams("DELETE",f,"website",a),o.successStatuses=[204],g.next=5,u.default.awrap(this.request(o));case 5:return r=g.sent,g.abrupt("return",{res:r.res});case 7:case"end":return g.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[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/isArray"),S=s.isArray,f=N("../utils/formatObjKey"),a=f.formatObjKey,o=P;o.getBucketLifecycle=function(E,g){var m,w,p;return u.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return h(E),m=this._bucketRequestParams("GET",E,"lifecycle",g),m.successStatuses=[200],m.xmlResponse=!0,n.next=6,u.default.awrap(this.request(m));case 6:return w=n.sent,p=w.data.Rule||null,p&&(S(p)||(p=[p]),p=p.map(function(l){return l.ID&&(l.id=l.ID,delete l.ID),l.Tag&&!S(l.Tag)&&(l.Tag=[l.Tag]),a(l,"firstLowerCase")})),n.abrupt("return",{rules:p,res:w.res});case 10:case"end":return n.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(N,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=C(k);function C(S){return S&&S.__esModule?S:{default:S}}var R=N("../utils/checkBucketName"),h=R.checkBucketName,s=P;s.getBucketVersioning=function(f,a){var o,r,E;return u.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return h(f),o=this._bucketRequestParams("GET",f,"versioning",a),o.xmlResponse=!0,o.successStatuses=[200],m.next=6,u.default.awrap(this.request(o));case 6:return r=m.sent,E=r.data.Status,m.abrupt("return",{status:r.status,versionStatus:E,res:r.res});case 9:case"end":return m.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[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/isObject"),S=s.isObject,f=P;f.getBucketWebsite=function(o,r){var E,g,m;return u.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:return h(o),E=this._bucketRequestParams("GET",o,"website",r),E.successStatuses=[200],E.xmlResponse=!0,p.next=6,u.default.awrap(this.request(E));case 6:return g=p.sent,m=[],g.data.RoutingRules&&g.data.RoutingRules.RoutingRule&&(S(g.data.RoutingRules.RoutingRule)?m=[g.data.RoutingRules.RoutingRule]:m=g.data.RoutingRules.RoutingRule),p.abrupt("return",{index:g.data.IndexDocument&&g.data.IndexDocument.Suffix||"",supportSubDir:g.data.IndexDocument&&g.data.IndexDocument.SupportSubDir||"false",type:g.data.IndexDocument&&g.data.IndexDocument.Type,routingRules:m,error:g.data.ErrorDocument&&g.data.ErrorDocument.Key||null,res:g.res});case 10:case"end":return p.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(N,$,P){"use strict";var k=N("babel-runtime/regenerator"),u=C(k);function C(i){return i&&i.__esModule?i:{default:i}}var R=N("../utils/checkBucketName"),h=R.checkBucketName,s=N("../utils/isArray"),S=s.isArray,f=N("../utils/deepCopy"),a=f.deepCopy,o=N("../utils/isObject"),r=o.isObject,E=N("../utils/obj2xml"),g=E.obj2xml,m=N("../utils/checkObjectTag"),w=m.checkObjectTag,p=N("../utils/getStrBytesCount"),d=p.getStrBytesCount,n=P;n.putBucketLifecycle=function(L,A,b){var x,y,_,I,j;return u.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:if(h(L),S(A)){G.next=3;break}throw new Error("rules must be Array");case 3:return x=this._bucketRequestParams("PUT",L,"lifecycle",b),y=[],_={LifecycleConfiguration:{Rule:y}},A.forEach(function(K){l(K),v(K),K.id&&(K.ID=K.id,delete K.id),y.push(K)}),I=g(_,{headers:!0,firstUpperCase:!0}),x.content=I,x.mime="xml",x.successStatuses=[200],G.next=13,u.default.awrap(this.request(x));case 13:return j=G.sent,G.abrupt("return",{res:j.res});case 15:case"end":return G.stop()}},null,this)};function l(i){i.days&&(i.expiration={days:i.days}),i.date&&(i.expiration={createdBeforeDate:i.date})}function c(i,L){var A=i.days,b=i.createdBeforeDate;if(!A&&!b)throw new Error(L+" must includes days or createdBeforeDate");if(A&&!/^[1-9][0-9]*$/.test(A))throw new Error("days must be a positive integer");if(b&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(b))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function T(i){if(!S(i)&&!r(i))throw new Error("tag must be Object or Array");i=r(i)?[i]:i;var L={},A=a(i);A.forEach(function(b){L[b.key]=b.value}),w(L)}function v(i){if(i.id&&d(i.id)>255)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=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,p=0;p<m.length;p++)d=m[p],w+=`<Part>
`,w+="<PartNumber>"+d.number+`</PartNumber>
`,w+="<ETag>"+d.etag+`</ETag>
`,w+=`</Part>
`;return w+="</CompleteMultipartUpload>",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;m<r.length;m++)w={},typeof r[m]=="string"?w.Key=s.escape(this._objectName(r[m])):(p=r[m],d=p.key,n=p.versionId,w.Key=s.escape(this._objectName(d)),w.VersionId=n),g.push(w);return l={Delete:{Quiet:!!E.quiet,Object:g}},c=f(l,{headers:!0}),E.subres=(0,R.default)({delete:""},E.subres),E.versionId&&(E.subres.versionId=E.versionId),T=this._objectRequestParams("POST","",E),T.mime="xml",T.content=c,T.xmlResponse=!0,T.successStatuses=[200],b.next=15,u.default.awrap(this.request(T));case 15:return v=b.sent,i=v.data,L=i&&i.Deleted||null,L&&(Array.isArray(L)||(L=[L])),b.abrupt("return",{res:v.res,deleted:L||[]});case 20:case"end":return b.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[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.deleteObjectTagging=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)({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(!(l<f.length)){T.next=26;break}if(!E.isCancel()){T.next=11;break}return T.abrupt("break",26);case 11:if(r?m.push(o(E,f[l],r)):m.push(o(E,f[l])),!(m.length===a||n===d&&l===f.length-1)){T.next=23;break}return T.prev=13,n+=1,T.next=17,u.default.awrap(R.default.all(m));case 17:T.next=22;break;case 19:T.prev=19,T.t0=T.catch(13),g.push(T.t0);case 22:m=[];case 23:l++,T.next=8;break;case 26:return T.abrupt("return",g);case 27:case"end":return T.stop()}},null,this,[[13,19]])},s._parallel=function(f,a,o){var r=this;return new R.default(function(E){var g=[];if(a<=0||!f){E(g);return}function m(i){return function(){if(i===null)throw new Error("Callback was already called.");var L=i;i=null;for(var A=arguments.length,b=Array(A),x=0;x<A;x++)b[x]=arguments[x];L.apply(this,b)}}function w(i){var L=-1,A=i.length;return function(){return++L<A&&!r.isCancel()?{value:i[L],key:L}:null}}var p=w(f),d=!1,n=0,l=!1;function c(i,L){n-=1,i?(d=!0,g.push(i),E(g)):L==={}||d&&n<=0?(d=!0,E(g)):l||(r.isCancel()?E(g):v())}function T(i,L){o(i).then(function(A){L(null,A)}).catch(function(A){L(A)})}function v(){for(l=!0;n<a&&!d&&!r.isCancel();){var i=p();if(i===null||g.length>0){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]<n[0]?-1:0},w=function(d){E+=g+d,r[d]&&(E+="="+r[d]),g="&"};(0,h.default)(r).sort(m).forEach(w)}return E},P.buildCanonicalString=function(o,r,E,g){E=E||{};var m=E.headers||{},w="x-oss-",p=[],d={},n=[o.toUpperCase(),m["Content-Md5"]||"",m["Content-Type"]||m["Content-Type".toLowerCase()],g||m["x-oss-date"]];return(0,h.default)(m).forEach(function(l){var c=l.toLowerCase();c.indexOf(w)===0&&(d[c]=String(m[l]).trim())}),(0,h.default)(d).sort().forEach(function(l){p.push(l+":"+d[l])}),n=n.concat(p),n.push(this.buildCanonicalizedResource(r,E.parameters)),n.join(`
`)},P.computeSignature=function(o,r){var E=S.createHmac("sha1",o);return E.update(k.from(r,"utf8")).digest("base64")},P.authorization=function(o,r,E){return"OSS "+o+":"+this.computeSignature(r,E)},P._signatureForURL=function(o){var r=arguments.length>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.length;r++)o.push(s(f[r],a))}else o={},(0,u.default)(f).forEach(function(E){o[S(E,a)]=s(f[E],a)});return o}P.formatObjKey=s;function S(f,a){return a==="firstUpperCase"?f=f.replace(/^./,function(o){return o.toUpperCase()}):a==="firstLowerCase"&&(f=f.replace(/^./,function(o){return o.toLowerCase()})),f}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(N,$,P){"use strict";Object.defineProperty(P,"__esModule",{value:!0}),P.getStrBytesCount=void 0;function k(u){for(var C=0,R=0;R<u.length;R++){var h=u.charAt(R);/^[\u00-\uff]$/.test(h)?C+=1:C+=2}return C}P.getStrBytesCount=k},{}],42:[function(N,$,P){"use strict";Object.defineProperty(P,"__esModule",{value:!0}),P.isArray=void 0,P.isArray=function(k){return Object.prototype.toString.call(k)==="[object Array]"}},{}],43:[function(N,$,P){"use strict";Object.defineProperty(P,"__esModule",{value:!0}),P.isBlob=void 0;function k(u){return typeof Blob!="undefined"&&u instanceof Blob}P.isBlob=k},{}],44:[function(N,$,P){"use strict";Object.defineProperty(P,"__esModule",{value:!0}),P.isFile=void 0,P.isFile=function(k){return typeof File!="undefined"&&k instanceof File}},{}],45:[function(N,$,P){"use strict";Object.defineProperty(P,"__esModule",{value:!0}),P.isIP=void 0,P.isIP=function(k){var u=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,C=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return u.test(k)||C.test(k)}},{}],46:[function(N,$,P){"use strict";Object.defineProperty(P,"__esModule",{value:!0}),P.isObject=void 0,P.isObject=function(k){return Object.prototype.toString.call(k)==="[object Object]"}},{}],47:[function(N,$,P){"use strict";var k=N("babel-runtime/core-js/object/keys"),u=C(k);function C(S){return S&&S.__esModule?S:{default:S}}Object.defineProperty(P,"__esModule",{value:!0}),P.obj2xml=void 0;var R=N("./formatObjKey");function h(S){return Object.prototype.toString.call(S).replace(/(.*? |])/g,"").toLowerCase()}function s(S,f){var a="";return f&&f.headers&&(a=`<?xml version="1.0" encoding="UTF-8"?>
`),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]+"</"+o+">":h(S[o])==="object"?a+="<"+o+">"+s(S[o])+"</"+o+">":h(S[o])==="array"?a+=S[o].map(function(r){return"<"+o+">"+s(r)+"</"+o+">"}).join(""):a+="<"+o+">"+S[o].toString()+"</"+o+">"}):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;h<s;++h)k[h]=R[h],u[R.charCodeAt(h)]=h;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63;function S(m){var w=m.length;if(w%4>0)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<T;v+=4)w=u[m.charCodeAt(v)]<<18|u[m.charCodeAt(v+1)]<<12|u[m.charCodeAt(v+2)]<<6|u[m.charCodeAt(v+3)],l[c++]=w>>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;l<p;l+=3)d=(m[l]<<16&16711680)+(m[l+1]<<8&65280)+(m[l+2]&255),n.push(r(d));return n.join("")}function g(m){for(var w,p=m.length,d=p%3,n=[],l=16383,c=0,T=p-d;c<T;c+=l)n.push(E(m,c,c+l>T?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<a.length;++o){var r=a[o];if(typeof r=="string"&&r in C)return!0}return!1};function R(a){return a.split(".").length}function h(a,o){var r=[],E;if(Array.prototype.map)return Array.prototype.map.call(a,o);for(E=0;E<a.length;E++)r.push(o(a[E]));return r}function s(a){for(var o=Math.max(R(a[0]),R(a[1])),r=h(a,function(E){var g=o-R(E);return E=E+new Array(g+1).join(".0"),h(E.split("."),function(m){return new Array(20-m.length).join("0")+m}).reverse()});--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<this.charLength)return"";f=f.slice(o,f.length),a=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var E=a.charCodeAt(a.length-1);if(E>=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 <http://feross.org>
* @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()<Y)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(ae=new Uint8Array(Y),ae.__proto__=u.prototype):(ae===null&&(ae=new u(Y)),ae.length=Y),ae}function u(ae,Y,X){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(ae,Y,X);if(typeof ae=="number"){if(typeof Y=="string")throw new Error("If encoding is specified then the first argument must be a string");return E(this,ae)}return a(this,ae,Y,X)}u.poolSize=8192,u._augment=function(ae){return ae.__proto__=u.prototype,ae};function a(ae,Y,X,Q){if(typeof Y=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Y instanceof ArrayBuffer?w(ae,Y,X,Q):typeof Y=="string"?g(ae,Y,X):p(ae,Y)}u.from=function(ae,Y,X){return a(null,ae,Y,X)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0}));function o(ae){if(typeof ae!="number")throw new TypeError('"size" argument must be a number');if(ae<0)throw new RangeError('"size" argument must not be negative')}function r(ae,Y,X,Q){return o(Y),Y<=0?f(ae,Y):X!==void 0?typeof Q=="string"?f(ae,Y).fill(X,Q):f(ae,Y).fill(X):f(ae,Y)}u.alloc=function(ae,Y,X){return r(null,ae,Y,X)};function E(ae,Y){if(o(Y),ae=f(ae,Y<0?0:d(Y)|0),!u.TYPED_ARRAY_SUPPORT)for(var X=0;X<Y;++X)ae[X]=0;return ae}u.allocUnsafe=function(ae){return E(null,ae)},u.allocUnsafeSlow=function(ae){return E(null,ae)};function g(ae,Y,X){if((typeof X!="string"||X==="")&&(X="utf8"),!u.isEncoding(X))throw new TypeError('"encoding" must be a valid string encoding');var Q=l(Y,X)|0;ae=f(ae,Q);var he=ae.write(Y,X);return he!==Q&&(ae=ae.slice(0,he)),ae}function m(ae,Y){var X=Y.length<0?0:d(Y.length)|0;ae=f(ae,X);for(var Q=0;Q<X;Q+=1)ae[Q]=Y[Q]&255;return ae}function w(ae,Y,X,Q){if(Y.byteLength,X<0||Y.byteLength<X)throw new RangeError("'offset' is out of bounds");if(Y.byteLength<X+(Q||0))throw new RangeError("'length' is out of bounds");return X===void 0&&Q===void 0?Y=new Uint8Array(Y):Q===void 0?Y=new Uint8Array(Y,X):Y=new Uint8Array(Y,X,Q),u.TYPED_ARRAY_SUPPORT?(ae=Y,ae.__proto__=u.prototype):ae=m(ae,Y),ae}function p(ae,Y){if(u.isBuffer(Y)){var X=d(Y.length)|0;return ae=f(ae,X),ae.length===0||Y.copy(ae,0,0,X),ae}if(Y){if(typeof ArrayBuffer!="undefined"&&Y.buffer instanceof ArrayBuffer||"length"in Y)return typeof Y.length!="number"||Ee(Y.length)?f(ae,0):m(ae,Y);if(Y.type==="Buffer"&&h(Y.data))return m(ae,Y.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(ae){if(ae>=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<Se;++ce)if(Y[ce]!==X[ce]){Q=Y[ce],he=X[ce];break}return Q<he?-1:he<Q?1:0},u.isEncoding=function(Y){switch(String(Y).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(Y,X){if(!h(Y))throw new TypeError('"list" argument must be an Array of Buffers');if(Y.length===0)return u.alloc(0);var Q;if(X===void 0)for(X=0,Q=0;Q<Y.length;++Q)X+=Y[Q].length;var he=u.allocUnsafe(X),ce=0;for(Q=0;Q<Y.length;++Q){var Se=Y[Q];if(!u.isBuffer(Se))throw new TypeError('"list" argument must be an Array of Buffers');Se.copy(he,ce),ce+=Se.length}return he};function l(ae,Y){if(u.isBuffer(ae))return ae.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ae)||ae instanceof ArrayBuffer))return ae.byteLength;typeof ae!="string"&&(ae=""+ae);var X=ae.length;if(X===0)return 0;for(var Q=!1;;)switch(Y){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":case void 0:return se(ae).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X*2;case"hex":return X>>>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;X<Y;X+=2)T(this,X,X+1);return this},u.prototype.swap32=function(){var Y=this.length;if(Y%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var X=0;X<Y;X+=4)T(this,X,X+3),T(this,X+1,X+2);return this},u.prototype.swap64=function(){var Y=this.length;if(Y%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var X=0;X<Y;X+=8)T(this,X,X+7),T(this,X+1,X+6),T(this,X+2,X+5),T(this,X+3,X+4);return this},u.prototype.toString=function(){var Y=this.length|0;return Y===0?"":arguments.length===0?j(this,0,Y):c.apply(this,arguments)},u.prototype.equals=function(Y){if(!u.isBuffer(Y))throw new TypeError("Argument must be a Buffer");return this===Y?!0:u.compare(this,Y)===0},u.prototype.inspect=function(){var Y="",X=P.INSPECT_MAX_BYTES;return this.length>0&&(Y=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&(Y+=" ... ")),"<Buffer "+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;rt<Ge;++rt)if(Ye[rt]!==Qe[rt]){Se=Ye[rt],Ke=Qe[rt];break}return Se<Ke?-1:Ke<Se?1:0};function v(ae,Y,X,Q,he){if(ae.length===0)return-1;if(typeof X=="string"?(Q=X,X=0):X>2147483647?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;Ye<Se;Ye++)if(Ge(ae,Ye)===Ge(Y,Qe===-1?0:Ye-Qe)){if(Qe===-1&&(Qe=Ye),Ye-Qe+1===Ke)return Qe*ce}else Qe!==-1&&(Ye-=Ye-Qe),Qe=-1}else for(X+Ke>Se&&(X=Se-Ke),Ye=X;Ye>=0;Ye--){for(var rt=!0,qe=0;qe<Ke;qe++)if(Ge(ae,Ye+qe)!==Ge(Y,qe)){rt=!1;break}if(rt)return Ye}return-1}u.prototype.includes=function(Y,X,Q){return this.indexOf(Y,X,Q)!==-1},u.prototype.indexOf=function(Y,X,Q){return v(this,Y,X,Q,!0)},u.prototype.lastIndexOf=function(Y,X,Q){return v(this,Y,X,Q,!1)};function L(ae,Y,X,Q){X=Number(X)||0;var he=ae.length-X;Q?(Q=Number(Q),Q>he&&(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;Se<Q;++Se){var Ke=parseInt(Y.substr(Se*2,2),16);if(isNaN(Ke))return Se;ae[X+Se]=Ke}return Se}function A(ae,Y,X,Q){return te(se(Y,ae.length-X),ae,X,Q)}function b(ae,Y,X,Q){return te(re(Y),ae,X,Q)}function x(ae,Y,X,Q){return b(ae,Y,X,Q)}function y(ae,Y,X,Q){return te(Z(Y),ae,X,Q)}function _(ae,Y,X,Q){return te(be(Y,ae.length-X),ae,X,Q)}u.prototype.write=function(Y,X,Q,he){if(X===void 0)he="utf8",Q=this.length,X=0;else if(Q===void 0&&typeof X=="string")he=X,Q=this.length,X=0;else if(isFinite(X))X=X|0,isFinite(Q)?(Q=Q|0,he===void 0&&(he="utf8")):(he=Q,Q=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ce=this.length-X;if((Q===void 0||Q>ce)&&(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;he<X;){var ce=ae[he],Se=null,Ke=ce>239?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;Q<Y;)X+=String.fromCharCode.apply(String,ae.slice(Q,Q+=M));return X}function K(ae,Y,X){var Q="";X=Math.min(ae.length,X);for(var he=Y;he<X;++he)Q+=String.fromCharCode(ae[he]&127);return Q}function H(ae,Y,X){var Q="";X=Math.min(ae.length,X);for(var he=Y;he<X;++he)Q+=String.fromCharCode(ae[he]);return Q}function z(ae,Y,X){var Q=ae.length;(!Y||Y<0)&&(Y=0),(!X||X<0||X>Q)&&(X=Q);for(var he="",ce=Y;ce<X;++ce)he+=ie(ae[ce]);return he}function B(ae,Y,X){for(var Q=ae.slice(Y,X),he="",ce=0;ce<Q.length;ce+=2)he+=String.fromCharCode(Q[ce]+Q[ce+1]*256);return he}u.prototype.slice=function(Y,X){var Q=this.length;Y=~~Y,X=X===void 0?Q:~~X,Y<0?(Y+=Q,Y<0&&(Y=0)):Y>Q&&(Y=Q),X<0?(X+=Q,X<0&&(X=0)):X>Q&&(X=Q),X<Y&&(X=Y);var he;if(u.TYPED_ARRAY_SUPPORT)he=this.subarray(Y,X),he.__proto__=u.prototype;else{var ce=X-Y;he=new u(ce,void 0);for(var Se=0;Se<ce;++Se)he[Se]=this[Se+Y]}return he};function W(ae,Y,X){if(ae%1!==0||ae<0)throw new RangeError("offset is not uint");if(ae+Y>X)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;++Se<X&&(ce*=256);)he+=this[Y+Se]*ce;return he},u.prototype.readUIntBE=function(Y,X,Q){Y=Y|0,X=X|0,Q||W(Y,X,this.length);for(var he=this[Y+--X],ce=1;X>0&&(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<X&&(ce*=256);)he+=this[Y+Se]*ce;return ce*=128,he>=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||Y<ce)throw new RangeError('"value" argument is out of bounds');if(X+Q>ae.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<Q&&(Se*=256);)this[X+Ke]=Y/Se&255;return X+Q},u.prototype.writeUIntBE=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=Q-1,Ke=1;for(this[X+Se]=Y&255;--Se>=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<ce;++he)ae[X+he]=(Y&255<<8*(Q?he:1-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<ce;++he)ae[X+he]=Y>>>(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<Q&&(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.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<Q&&(he=Q),he===Q)return 0;if(Y.length===0||this.length===0)return 0;if(X<0)throw new RangeError("targetStart out of bounds");if(Q<0||Q>=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<he-Q&&(he=Y.length-X+Q);var ce=he-Q,Se;if(this===Y&&Q<X&&X<he)for(Se=ce-1;Se>=0;--Se)Y[Se+X]=this[Se+Q];else if(ce<1e3||!u.TYPED_ARRAY_SUPPORT)for(Se=0;Se<ce;++Se)Y[Se+X]=this[Se+Q];else Uint8Array.prototype.set.call(Y,this.subarray(Q,Q+ce),X);return ce},u.prototype.fill=function(Y,X,Q,he){if(typeof Y=="string"){if(typeof X=="string"?(he=X,X=0,Q=this.length):typeof Q=="string"&&(he=Q,Q=this.length),Y.length===1){var ce=Y.charCodeAt(0);ce<256&&(Y=ce)}if(he!==void 0&&typeof he!="string")throw new TypeError("encoding must be a string");if(typeof he=="string"&&!u.isEncoding(he))throw new TypeError("Unknown encoding: "+he)}else typeof Y=="number"&&(Y=Y&255);if(X<0||this.length<X||this.length<Q)throw new RangeError("Out of range index");if(Q<=X)return this;X=X>>>0,Q=Q===void 0?this.length:Q>>>0,Y||(Y=0);var Se;if(typeof Y=="number")for(Se=X;Se<Q;++Se)this[Se]=Y;else{var Ke=u.isBuffer(Y)?Y:se(new u(Y,he).toString()),Ge=Ke.length;for(Se=0;Se<Q-X;++Se)this[Se+X]=Ke[Se%Ge]}return this};var le=/[^+\/0-9A-Za-z-_]/g;function Oe(ae){if(ae=xe(ae).replace(le,""),ae.length<2)return"";for(;ae.length%4!==0;)ae=ae+"=";return ae}function xe(ae){return ae.trim?ae.trim():ae.replace(/^\s+|\s+$/g,"")}function ie(ae){return ae<16?"0"+ae.toString(16):ae.toString(16)}function se(ae,Y){Y=Y||Infinity;for(var X,Q=ae.length,he=null,ce=[],Se=0;Se<Q;++Se){if(X=ae.charCodeAt(Se),X>55295&&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<ae.length;++X)Y.push(ae.charCodeAt(X)&255);return Y}function be(ae,Y){for(var X,Q,he,ce=[],Se=0;Se<ae.length&&!((Y-=2)<0);++Se)X=ae.charCodeAt(Se),Q=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<Q&&!(he+X>=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 <dead_horse@qq.com>
* 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;s<h.length;s++){if(S=h[s],R[S]!==void 0)continue;R[S]=this.src[S]}return R}for(var s=0;s<h.length;s++){var S=h[s];if(!C(R,S))continue;var f=this.src.__lookupGetter__(S),a=this.src.__lookupSetter__(S);f&&R.__defineGetter__(S,f),a&&R.__defineSetter__(S,a),!f&&!a&&(R[S]=this.src[S])}return R},u.prototype.toCover=function(R){for(var h=this.keys||Object.keys(this.src),s=0;s<h.length;s++){var S=h[s];delete R[S];var f=this.src.__lookupGetter__(S),a=this.src.__lookupSetter__(S);f&&R.__defineGetter__(S,f),a&&R.__defineSetter__(S,a),!f&&!a&&(R[S]=this.src[S])}},u.prototype.override=u.prototype.toCover,u.prototype.and=function(R){var h={};return this.to(h),this.src=R,this.to(h),this.src=h,this};function C(R,h){return R[h]===void 0&&R.__lookupGetter__(h)===void 0&&R.__lookupSetter__(h)===void 0}},{}],77:[function(N,$,P){N("../../modules/es6.string.iterator"),N("../../modules/es6.array.from"),$.exports=N("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(N,$,P){var k=N("../../modules/_core"),u=k.JSON||(k.JSON={stringify:JSON.stringify});$.exports=function(R){return u.stringify.apply(u,arguments)}},{"../../modules/_core":99}],79:[function(N,$,P){N("../../modules/es6.object.assign"),$.exports=N("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(N,$,P){N("../../modules/es6.object.create");var k=N("../../modules/_core").Object;$.exports=function(C,R){return k.create(C,R)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(N,$,P){N("../../modules/es6.object.define-property");var k=N("../../modules/_core").Object;$.exports=function(C,R,h){return k.defineProperty(C,R,h)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(N,$,P){N("../../modules/es7.object.entries"),$.exports=N("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(N,$,P){N("../../modules/es6.object.get-own-property-names");var k=N("../../modules/_core").Object;$.exports=function(C){return k.getOwnPropertyNames(C)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(N,$,P){N("../../modules/es6.object.get-prototype-of"),$.exports=N("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(N,$,P){N("../../modules/es6.object.keys"),$.exports=N("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(N,$,P){N("../modules/es6.object.to-string"),N("../modules/es6.string.iterator"),N("../modules/web.dom.iterable"),N("../modules/es6.promise"),N("../modules/es7.promise.finally"),N("../modules/es7.promise.try"),$.exports=N("../modules/_core").Promise},{"../modules/_core":99,"../modules/es6.object.to-string":177,"../modules/es6.promise":178,"../modules/es6.string.iterator":180,"../modules/es7.promise.finally":183,"../modules/es7.promise.try":184,"../modules/web.dom.iterable":187}],87:[function(N,$,P){N("../modules/web.immediate"),$.exports=N("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(N,$,P){N("../../modules/es6.string.from-code-point"),$.exports=N("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(N,$,P){N("../../modules/es6.function.has-instance"),$.exports=N("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(N,$,P){N("../../modules/es6.symbol"),N("../../modules/es6.object.to-string"),N("../../modules/es7.symbol.async-iterator"),N("../../modules/es7.symbol.observable"),$.exports=N("../../modules/_core").Symbol},{"../../modules/_core":99,"../../modules/es6.object.to-string":177,"../../modules/es6.symbol":181,"../../modules/es7.symbol.async-iterator":185,"../../modules/es7.symbol.observable":186}],91:[function(N,$,P){N("../../modules/es6.string.iterator"),N("../../modules/web.dom.iterable"),$.exports=N("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(N,$,P){$.exports=function(k){if(typeof k!="function")throw TypeError(k+" is not a function!");return k}},{}],93:[function(N,$,P){$.exports=function(){}},{}],94:[function(N,$,P){$.exports=function(k,u,C,R){if(!(k instanceof u)||R!==void 0&&R in k)throw TypeError(C+": incorrect invocation!");return k}},{}],95:[function(N,$,P){var k=N("./_is-object");$.exports=function(u){if(!k(u))throw TypeError(u+" is not an object!");return u}},{"./_is-object":119}],96:[function(N,$,P){var k=N("./_to-iobject"),u=N("./_to-length"),C=N("./_to-absolute-index");$.exports=function(R){return function(h,s,S){var f=k(h),a=u(f.length),o=C(S,a),r;if(R&&s!=s){for(;a>o;)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;s<h.length;s++){var S=h[s],f=k[S],a=f&&f.prototype;a&&!a[R]&&u(a,R,S),C[S]=C.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(N,$,P){var k=N("./_export"),u=N("./_task");k(k.G+k.B,{setImmediate:u.set,clearImmediate:u.clear})},{"./_export":107,"./_task":155}],189:[function(N,$,P){(function(k){"use strict";var u=N("babel-runtime/helpers/typeof"),C=R(u);function R(c){return c&&c.__esModule?c:{default:c}}function h(c){return Array.isArray?Array.isArray(c):l(c)==="[object Array]"}P.isArray=h;function s(c){return typeof c=="boolean"}P.isBoolean=s;function S(c){return c===null}P.isNull=S;function f(c){return c==null}P.isNullOrUndefined=f;function a(c){return typeof c=="number"}P.isNumber=a;function o(c){return typeof c=="string"}P.isString=o;function r(c){return(typeof c=="undefined"?"undefined":(0,C.default)(c))==="symbol"}P.isSymbol=r;function E(c){return c===void 0}P.isUndefined=E;function g(c){return l(c)==="[object RegExp]"}P.isRegExp=g;function m(c){return(typeof c=="undefined"?"undefined":(0,C.default)(c))==="object"&&c!==null}P.isObject=m;function w(c){return l(c)==="[object Date]"}P.isDate=w;function p(c){return l(c)==="[object Error]"||c instanceof Error}P.isError=p;function d(c){return typeof c=="function"}P.isFunction=d;function n(c){return c===null||typeof c=="boolean"||typeof c=="number"||typeof c=="string"||(typeof c=="undefined"?"undefined":(0,C.default)(c))==="symbol"||typeof c=="undefined"}P.isPrimitive=n,P.isBuffer=k.isBuffer;function l(c){return Object.prototype.toString.call(c)}}).call(this,{isBuffer:N("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(N,$,P){"use strict";var k=N("babel-runtime/helpers/typeof"),u=C(k);function C(R){return R&&R.__esModule?R:{default:R}}(function(R){"use strict";var h=function(){var o=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,r=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,E=/[^-+\dA-Z]/g;return function(g,m,w,p){if(arguments.length===1&&a(g)==="string"&&!/\d/.test(g)&&(m=g,g=void 0),g=g||new Date,g instanceof Date||(g=new Date(g)),isNaN(g))throw TypeError("Invalid date");m=String(h.masks[m]||m||h.masks.default);var d=m.slice(0,4);(d==="UTC:"||d==="GMT:")&&(m=m.slice(4),w=!0,d==="GMT:"&&(p=!0));var n=w?"getUTC":"get",l=g[n+"Date"](),c=g[n+"Day"](),T=g[n+"Month"](),v=g[n+"FullYear"](),i=g[n+"Hours"](),L=g[n+"Minutes"](),A=g[n+"Seconds"](),b=g[n+"Milliseconds"](),x=w?0:g.getTimezoneOffset(),y=S(g),_=f(g),I={d:l,dd:s(l),ddd:h.i18n.dayNames[c],dddd:h.i18n.dayNames[c+7],m:T+1,mm:s(T+1),mmm:h.i18n.monthNames[T],mmmm:h.i18n.monthNames[T+12],yy:String(v).slice(2),yyyy:v,h:i%12||12,hh:s(i%12||12),H:i,HH:s(i),M:L,MM:s(L),s:A,ss:s(A),l:s(b,3),L:s(Math.round(b/10)),t:i<12?"a":"p",tt:i<12?"am":"pm",T:i<12?"A":"P",TT:i<12?"AM":"PM",Z:p?"GMT":w?"UTC":(String(g).match(r)||[""]).pop().replace(E,""),o:(x>0?"-":"+")+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<r;)o="0"+o;return o}function S(o){var r=new Date(o.getFullYear(),o.getMonth(),o.getDate());r.setDate(r.getDate()-(r.getDay()+6)%7+3);var E=new Date(r.getFullYear(),0,4);E.setDate(E.getDate()-(E.getDay()+6)%7+3);var g=r.getTimezoneOffset()-E.getTimezoneOffset();r.setHours(r.getHours()-g);var m=(r-E)/(864e5*7);return 1+Math.floor(m)}function f(o){var r=o.getDay();return r===0&&(r=7),r}function a(o){return o===null?"null":o===void 0?"undefined":(typeof o=="undefined"?"undefined":(0,u.default)(o))!=="object"?typeof o=="undefined"?"undefined":(0,u.default)(o):Array.isArray(o)?"array":{}.toString.call(o).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return h}):(typeof P=="undefined"?"undefined":(0,u.default)(P))==="object"?$.exports=h:R.dateFormat=h})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(N,$,P){/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/"use strict";var k=/["'&<>]/;$.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;f<R.length;f++){switch(R.charCodeAt(f)){case 34:s="&quot;";break;case 38:s="&amp;";break;case 39:s="&#39;";break;case 60:s="&lt;";break;case 62:s="&gt;";break;default:continue}a!==f&&(S+=R.substring(a,f)),a=f+1,S+=s}return a!==f?S+R.substring(a,f):S}},{}],192:[function(N,$,P){function k(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}$.exports=k,k.EventEmitter=k,k.prototype._events=void 0,k.prototype._maxListeners=void 0,k.defaultMaxListeners=10,k.prototype.setMaxListeners=function(s){if(!C(s)||s<0||isNaN(s))throw TypeError("n must be a positive number");return this._maxListeners=s,this},k.prototype.emit=function(s){var S,f,a,o,r,E;if(this._events||(this._events={}),s==="error"&&(!this._events.error||R(this._events.error)&&!this._events.error.length)){if(S=arguments[1],S instanceof Error)throw S;var g=new Error('Uncaught, unspecified "error" event. ('+S+")");throw g.context=S,g}if(f=this._events[s],h(f))return!1;if(u(f))switch(arguments.length){case 1:f.call(this);break;case 2:f.call(this,arguments[1]);break;case 3:f.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),f.apply(this,o)}else if(R(f))for(o=Array.prototype.slice.call(arguments,1),E=f.slice(),a=E.length,r=0;r<a;r++)E[r].apply(this,o);return!0},k.prototype.addListener=function(s,S){var f;if(!u(S))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",s,u(S.listener)?S.listener:S),this._events[s]?R(this._events[s])?this._events[s].push(S):this._events[s]=[this._events[s],S]:this._events[s]=S,R(this._events[s])&&!this._events[s].warned&&(h(this._maxListeners)?f=k.defaultMaxListeners:f=this._maxListeners,f&&f>0&&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 <dead_horse@qq.com>
* 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<<f)-1,o=a>>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<<o)-1,E=r>>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<<h|f,o+=h;o>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 <https://feross.org>
* @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<k;P++)$[N.charAt(P)]=P;return $}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(N){if(N.length<2){var $=N.charCodeAt(0);return $<128?N:$<2048?fromCharCode(192|$>>>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;u<arguments.length;u++)this.define(arguments[u]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}k.prototype.define=function(u,C){for(var R in u){var h=u[R].map(function(f){return f.toLowerCase()});R=R.toLowerCase();for(var s=0;s<h.length;s++){var S=h[s];if(S[0]=="*")continue;if(!C&&S in this._types)throw new Error('Attempt to change mapping for "'+S+'" extension from "'+this._types[S]+'" to "'+R+'". Pass `force=true` to allow this, otherwise remove "'+S+'" from the list of extensions for "'+R+'".');this._types[S]=R}if(C||!this._extensions[R]){var S=h[0];this._extensions[R]=S[0]!="*"?S:S.substr(1)}}},k.prototype.getType=function(u){u=String(u);var C=u.replace(/^.*[/\\]/,"").toLowerCase(),R=C.replace(/^.*\./,"").toLowerCase(),h=C.length<u.length,s=R.length<C.length-1;return(s||!h)&&this._types[R]||null},k.prototype.getExtension=function(u){return u=/^\s*([^;\s]*)/.test(u)&&RegExp.$1,u&&this._extensions[u.toLowerCase()]||null},$.exports=k},{}],202:[function(N,$,P){"use strict";var k=N("./Mime");$.exports=new k(N("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(N,$,P){$.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["*xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/urc-ressheet+xml":["rsheet"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],204:[function(N,$,P){var k=1e3,u=k*60,C=u*60,R=C*24,h=R*7,s=R*365.25;$.exports=function(r,E){E=E||{};var g=typeof r;if(g==="string"&&r.length>0)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<w.length&&!(w[p]!=="");p++);for(var d=w.length-1;d>=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<r;g++)if(a[g]!==o[g]){E=g;break}for(var m=[],g=E;g<a.length;g++)m.push("..");return m=m.concat(o.slice(E)),m.join("/")},P.sep="/",P.delimiter=":",P.dirname=function(s){if(typeof s!="string"&&(s=s+""),s.length===0)return".";for(var S=s.charCodeAt(0),f=S===47,a=-1,o=!0,r=s.length-1;r>=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<s.length;a++)S(s[a],a,s)&&f.push(s[a]);return f}var h="ab".substr(-1)==="b"?function(s,S,f){return s.substr(S,f)}:function(s,S,f){return S<0&&(S=s.length+S),s.substr(S,f)}}).call(this,N("_process"))},{_process:208}],206:[function(N,$,P){(function(k){/*!
* Platform.js <https://mths.be/platform>
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
* Available under MIT license <https://mths.be/mit>
*/(function(){"use strict";var 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;a<f.length;)f[a++]=arguments[a];return k.nextTick(function(){C.apply(null,f)})}}}).call(this,N("_process"))},{_process:208}],208:[function(N,$,P){var k=$.exports={},u,C;function R(){throw new Error("setTimeout has not been defined")}function h(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?u=setTimeout:u=R}catch(p){u=R}try{typeof clearTimeout=="function"?C=clearTimeout:C=h}catch(p){C=h}})();function s(p){if(u===setTimeout)return setTimeout(p,0);if((u===R||!u)&&setTimeout)return u=setTimeout,setTimeout(p,0);try{return u(p,0)}catch(d){try{return u.call(null,p,0)}catch(n){return u.call(this,p,0)}}}function S(p){if(C===clearTimeout)return clearTimeout(p);if((C===h||!C)&&clearTimeout)return C=clearTimeout,clearTimeout(p);try{return C(p)}catch(d){try{return C.call(null,p)}catch(n){return C.call(this,p)}}}var f=[],a=!1,o,r=-1;function E(){if(!a||!o)return;a=!1,o.length?f=o.concat(f):r=-1,f.length&&g()}function g(){if(a)return;var p=s(E);a=!0;for(var d=f.length;d;){for(o=f,f=[];++r<d;)o&&o[r].run();r=-1,d=f.length}o=null,a=!1,S(p)}k.nextTick=function(p){var d=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)d[n-1]=arguments[n];f.push(new m(p,d)),f.length===1&&!a&&s(g)};function m(p,d){this.fun=p,this.array=d}m.prototype.run=function(){this.fun.apply(null,this.array)},k.title="browser",k.browser=!0,k.env={},k.argv=[],k.version="",k.versions={};function w(){}k.on=w,k.addListener=w,k.once=w,k.off=w,k.removeListener=w,k.removeAllListeners=w,k.emit=w,k.prependListener=w,k.prependOnceListener=w,k.listeners=function(p){return[]},k.binding=function(p){throw new Error("process.binding is not supported")},k.cwd=function(){return"/"},k.chdir=function(p){throw new Error("process.chdir is not supported")},k.umask=function(){return 0}},{}],209:[function(N,$,P){(function(k){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(u){var C=typeof P=="object"&&P&&!P.nodeType&&P,R=typeof $=="object"&&$&&!$.nodeType&&$,h=typeof k=="object"&&k;(h.global===h||h.window===h||h.self===h)&&(u=h);var s,S=2147483647,f=36,a=1,o=26,r=38,E=700,g=72,m=128,w="-",p=/^xn--/,d=/[^\x20-\x7E]/,n=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 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<F;)J=z.charCodeAt(W++),J>=55296&&J<=56319&&W<F?(ee=z.charCodeAt(W++),(ee&64512)==56320?B.push(((J&1023)<<10)+(ee&1023)+65536):(B.push(J),W--)):B.push(J);return B}function y(z){return A(z,function(B){var W="";return B>65535&&(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<ye;++pe)z.charCodeAt(pe)>=128&&L("not-basic"),B.push(z.charCodeAt(pe));for(le=ye>0?ye+1:0;le<W;){for(Oe=J,xe=1,ie=f;!(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,se<re);ie+=f)be=f-re,xe>T(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<se;++q)xe=z[q],xe<128&&ie.push(v(xe));for(F=J=ie.length,J&&ie.push(w);F<se;){for(ye=S,q=0;q<se;++q)xe=z[q],xe>=B&&xe<ye&&(ye=xe);for(re=F+1,ye-B>T((S-W)/re)&&L("overflow"),W+=(ye-B)*re,B=ye,q=0;q<se;++q)if(xe=z[q],xe<B&&++W>S&&L("overflow"),xe==B){for(pe=W,le=f;!(Oe=le<=ee?a:le>=ee+o?o:le-ee,pe<Oe);le+=f)Z=pe-Oe,be=f-Oe,ie.push(v(I(Oe+Z%be,0))),pe=T(Z/be);ie.push(v(I(pe,0))),ee=j(W,re,F==J),W=0,++F}++W,++B}return ie.join("")}function K(z){return b(z,function(B){return p.test(B)?M(B.slice(4).toLowerCase()):B})}function H(z){return b(z,function(B){return d.test(B)?"xn--"+G(B):B})}if(s={version:"1.4.1",ucs2:{decode:x,encode:y},decode:M,encode:G,toASCII:H,toUnicode:K},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return s});else if(C&&R)if($.exports==C)R.exports=s;else for(i in s)s.hasOwnProperty(i)&&(C[i]=s[i]);else u.punycode=s})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(N,$,P){"use strict";function k(C,R){return Object.prototype.hasOwnProperty.call(C,R)}$.exports=function(C,R,h,s){R=R||"&",h=h||"=";var S={};if(typeof C!="string"||C.length===0)return S;var f=/\+/g;C=C.split(R);var a=1e3;s&&typeof s.maxKeys=="number"&&(a=s.maxKeys);var o=C.length;a>0&&o>a&&(o=a);for(var r=0;r<o;++r){var E=C[r].replace(f,"%20"),g=E.indexOf(h),m,w,p,d;g>=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;f<h.length;f++)S.push(s(h[f],f));return S}var R=Object.keys||function(h){var s=[];for(var S in h)Object.prototype.hasOwnProperty.call(h,S)&&s.push(S);return s}},{}],212:[function(N,$,P){"use strict";P.decode=P.parse=N("./decode"),P.encode=P.stringify=N("./encode")},{"./decode":210,"./encode":211}],213:[function(N,$,P){$.exports=N("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(N,$,P){"use strict";var k=N("babel-runtime/core-js/object/create"),u=h(k),C=N("babel-runtime/core-js/object/keys"),R=h(C);function h(d){return d&&d.__esModule?d:{default:d}}var s=N("process-nextick-args"),S=R.default||function(d){var n=[];for(var l in d)n.push(l);return n};$.exports=m;var f=(0,u.default)(N("core-util-is"));f.inherits=N("inherits");var a=N("./_stream_readable"),o=N("./_stream_writable");f.inherits(m,a);for(var r=S(o.prototype),E=0;E<r.length;E++){var g=r[E];m.prototype[g]||(m.prototype[g]=o.prototype[g])}function m(d){if(!(this instanceof m))return new m(d);a.call(this,d),o.call(this,d),d&&d.readable===!1&&(this.readable=!1),d&&d.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,d&&d.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",w)}Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function w(){if(this.allowHalfOpen||this._writableState.ended)return;s.nextTick(p,this)}function p(d){d.end()}Object.defineProperty(m.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(n){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=n,this._writableState.destroyed=n}}),m.prototype._destroy=function(d,n){this.push(null),this.end(),s.nextTick(n,d)}},{"./_stream_readable":216,"./_stream_writable":218,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60,"core-util-is":189,inherits:196,"process-nextick-args":207}],215:[function(N,$,P){"use strict";var k=N("babel-runtime/core-js/object/create"),u=C(k);function C(S){return S&&S.__esModule?S:{default:S}}$.exports=s;var R=N("./_stream_transform"),h=(0,u.default)(N("core-util-is"));h.inherits=N("inherits"),h.inherits(s,R);function s(S){if(!(this instanceof s))return new s(S);R.call(this,S)}s.prototype._transform=function(S,f,a){a(null,S)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(N,$,P){(function(k,u){"use strict";var C=N("babel-runtime/core-js/object/get-prototype-of"),R=S(C),h=N("babel-runtime/core-js/object/create"),s=S(h);function S(Z){return Z&&Z.__esModule?Z:{default:Z}}var f=N("process-nextick-args");$.exports=x;var a=N("isarray"),o;x.ReadableState=b;var r=N("events").EventEmitter,E=function(te,Ee){return te.listeners(Ee).length},g=N("./internal/streams/stream"),m=N("safe-buffer").Buffer,w=u.Uint8Array||function(){};function p(Z){return m.from(Z)}function d(Z){return m.isBuffer(Z)||Z instanceof w}var n=(0,s.default)(N("core-util-is"));n.inherits=N("inherits");var l=N("util"),c=void 0;l&&l.debuglog?c=l.debuglog("stream"):c=function(){};var T=N("./internal/streams/BufferList"),v=N("./internal/streams/destroy"),i;n.inherits(x,g);var L=["error","close","destroy","pause","resume"];function A(Z,te,Ee){if(typeof Z.prependListener=="function")return Z.prependListener(te,Ee);!Z._events||!Z._events[te]?Z.on(te,Ee):a(Z._events[te])?Z._events[te].unshift(Ee):Z._events[te]=[Ee,Z._events[te]]}function b(Z,te){o=o||N("./_stream_duplex"),Z=Z||{};var Ee=te instanceof o;this.objectMode=!!Z.objectMode,Ee&&(this.objectMode=this.objectMode||!!Z.readableObjectMode);var ae=Z.highWaterMark,Y=Z.readableHighWaterMark,X=this.objectMode?16:16*1024;ae||ae===0?this.highWaterMark=ae:Ee&&(Y||Y===0)?this.highWaterMark=Y:this.highWaterMark=X,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new T,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=Z.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Z.encoding&&(i||(i=N("string_decoder/").StringDecoder),this.decoder=new i(Z.encoding),this.encoding=Z.encoding)}function x(Z){if(o=o||N("./_stream_duplex"),!(this instanceof x))return new x(Z);this._readableState=new b(Z,this),this.readable=!0,Z&&(typeof Z.read=="function"&&(this._read=Z.read),typeof Z.destroy=="function"&&(this._destroy=Z.destroy)),g.call(this)}Object.defineProperty(x.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(te){if(!this._readableState)return;this._readableState.destroyed=te}}),x.prototype.destroy=v.destroy,x.prototype._undestroy=v.undestroy,x.prototype._destroy=function(Z,te){this.push(null),te(Z)},x.prototype.push=function(Z,te){var Ee=this._readableState,ae;return Ee.objectMode?ae=!0:typeof Z=="string"&&(te=te||Ee.defaultEncoding,te!==Ee.encoding&&(Z=m.from(Z,te),te=""),ae=!0),y(this,Z,te,!1,ae)},x.prototype.unshift=function(Z){return y(this,Z,null,!0,!1)};function y(Z,te,Ee,ae,Y){var X=Z._readableState;if(te===null)X.reading=!1,H(Z,X);else{var Q;Y||(Q=I(X,te)),Q?Z.emit("error",Q):X.objectMode||te&&te.length>0?(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<Z.highWaterMark||Z.length===0)}x.prototype.isPaused=function(){return this._readableState.flowing===!1},x.prototype.setEncoding=function(Z){return i||(i=N("string_decoder/").StringDecoder),this._readableState.decoder=new i(Z),this._readableState.encoding=Z,this};var M=8388608;function G(Z){return Z>=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-Z<te.highWaterMark)&&(ae=!0,c("length less than watermark",ae)),te.ended||te.reading?(ae=!1,c("reading or ended",ae)):ae&&(c("do read"),te.reading=!0,te.sync=!0,te.length===0&&(te.needReadable=!0),this._read(te.highWaterMark),te.sync=!1,te.reading||(Z=K(Ee,te)));var Y;return Z>0?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.length<te.highWaterMark&&!(c("maybeReadMore read 0"),Z.read(0),Ee===te.length);)Ee=te.length;te.readingMore=!1}x.prototype._read=function(Z){this.emit("error",new Error("_read() is not implemented"))},x.prototype.pipe=function(Z,te){var Ee=this,ae=this._readableState;switch(ae.pipesCount){case 0:ae.pipes=Z;break;case 1:ae.pipes=[ae.pipes,Z];break;default:ae.pipes.push(Z);break}ae.pipesCount+=1,c("pipe count=%d opts=%j",ae.pipesCount,te);var Y=(!te||te.end!==!1)&&Z!==k.stdout&&Z!==k.stderr,X=Y?he:Le;ae.endEmitted?f.nextTick(X):Ee.once("end",X),Z.on("unpipe",Q);function Q(Ce,Ve){c("onunpipe"),Ce===Ee&&(Ve&&Ve.hasUnpiped===!1&&(Ve.hasUnpiped=!0,Ke()))}function he(){c("onend"),Z.end()}var ce=J(Ee);Z.on("drain",ce);var Se=!1;function Ke(){c("cleanup"),Z.removeListener("close",rt),Z.removeListener("finish",qe),Z.removeListener("drain",ce),Z.removeListener("error",Qe),Z.removeListener("unpipe",Q),Ee.removeListener("end",he),Ee.removeListener("end",Le),Ee.removeListener("data",Ye),Se=!0,ae.awaitDrain&&(!Z._writableState||Z._writableState.needDrain)&&ce()}var Ge=!1;Ee.on("data",Ye);function Ye(Ce){c("ondata"),Ge=!1;var Ve=Z.write(Ce);Ve===!1&&!Ge&&((ae.pipesCount===1&&ae.pipes===Z||ae.pipesCount>1&&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<Y;X++)ae[X].emit("unpipe",this,Ee);return this}var Q=be(te.pipes,Z);return Q===-1?this:(te.pipes.splice(Q,1),te.pipesCount-=1,te.pipesCount===1&&(te.pipes=te.pipes[0]),Z.emit("unpipe",this,Ee),this)},x.prototype.on=function(Z,te){var Ee=g.prototype.on.call(this,Z,te);if(Z==="data")this._readableState.flowing!==!1&&this.resume();else if(Z==="readable"){var ae=this._readableState;!ae.endEmitted&&!ae.readableListening&&(ae.readableListening=ae.needReadable=!0,ae.emittedReadable=!1,ae.reading?ae.length&&z(this):f.nextTick(ee,this))}return Ee},x.prototype.addListener=x.prototype.on;function ee(Z){c("readable nexttick read 0"),Z.read(0)}x.prototype.resume=function(){var Z=this._readableState;return Z.flowing||(c("resume"),Z.flowing=!0,q(this,Z)),this};function q(Z,te){te.resumeScheduled||(te.resumeScheduled=!0,f.nextTick(ye,Z,te))}function ye(Z,te){te.reading||(c("resume read 0"),Z.read(0)),te.resumeScheduled=!1,te.awaitDrain=0,Z.emit("resume"),pe(Z),te.flowing&&!te.reading&&Z.read(0)}x.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function pe(Z){var te=Z._readableState;for(c("flow",te.flowing);te.flowing&&Z.read()!==null;);}x.prototype.wrap=function(Z){var te=this,Ee=this._readableState,ae=!1;Z.on("end",function(){if(c("wrapped end"),Ee.decoder&&!Ee.ended){var Q=Ee.decoder.end();Q&&Q.length&&te.push(Q)}te.push(null)}),Z.on("data",function(Q){if(c("wrapped data"),Ee.decoder&&(Q=Ee.decoder.write(Q)),Ee.objectMode&&Q==null)return;if(!Ee.objectMode&&(!Q||!Q.length))return;var he=te.push(Q);he||(ae=!0,Z.pause())});for(var Y in Z)this[Y]===void 0&&typeof Z[Y]=="function"&&(this[Y]=function(Q){return function(){return Z[Q].apply(Z,arguments)}}(Y));for(var X=0;X<L.length;X++)Z.on(L[X],this.emit.bind(this,L[X]));return this._read=function(Q){c("wrapped _read",Q),ae&&(ae=!1,Z.resume())},this},Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),x._fromList=le;function le(Z,te){if(te.length===0)return null;var Ee;return te.objectMode?Ee=te.buffer.shift():!Z||Z>=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 Z<te.head.data.length?(ae=te.head.data.slice(0,Z),te.head.data=te.head.data.slice(Z)):Z===te.head.data.length?ae=te.shift():ae=Ee?xe(Z,te):ie(Z,te),ae}function xe(Z,te){var Ee=te.head,ae=1,Y=Ee.data;for(Z-=Y.length;Ee=Ee.next;){var X=Ee.data,Q=Z>X.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<ae;Ee++)if(Z[Ee]===te)return Ee;return-1}}).call(this,N("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":214,"./internal/streams/BufferList":219,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/get-prototype-of":59,"core-util-is":189,events:192,inherits:196,isarray:198,"process-nextick-args":207,"safe-buffer":228,"string_decoder/":235,util:71}],217:[function(N,$,P){"use strict";var k=N("babel-runtime/core-js/object/create"),u=C(k);function C(o){return o&&o.__esModule?o:{default:o}}$.exports=S;var R=N("./_stream_duplex"),h=(0,u.default)(N("core-util-is"));h.inherits=N("inherits"),h.inherits(S,R);function s(o,r){var E=this._transformState;E.transforming=!1;var g=E.writecb;if(!g)return this.emit("error",new Error("write callback called multiple times"));E.writechunk=null,E.writecb=null,r!=null&&this.push(r),g(o);var m=this._readableState;m.reading=!1,(m.needReadable||m.length<m.highWaterMark)&&this._read(m.highWaterMark)}function S(o){if(!(this instanceof S))return new S(o);R.call(this,o),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,o&&(typeof o.transform=="function"&&(this._transform=o.transform),typeof o.flush=="function"&&(this._flush=o.flush)),this.on("prefinish",f)}function f(){var o=this;typeof this._flush=="function"?this._flush(function(r,E){a(o,r,E)}):a(this,null,null)}S.prototype.push=function(o,r){return this._transformState.needTransform=!1,R.prototype.push.call(this,o,r)},S.prototype._transform=function(o,r,E){throw new Error("_transform() is not implemented")},S.prototype._write=function(o,r,E){var g=this._transformState;if(g.writecb=E,g.writechunk=o,g.writeencoding=r,!g.transforming){var m=this._readableState;(g.needTransform||m.needReadable||m.length<m.highWaterMark)&&this._read(m.highWaterMark)}},S.prototype._read=function(o){var r=this._transformState;r.writechunk!==null&&r.writecb&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0},S.prototype._destroy=function(o,r){var E=this;R.prototype._destroy.call(this,o,function(g){r(g),E.emit("close")})};function a(o,r,E){if(r)return o.emit("error",r);if(E!=null&&o.push(E),o._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(o._transformState.transforming)throw new Error("Calling transform done when still transforming");return o.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(N,$,P){(function(k,u){"use strict";var C=N("babel-runtime/core-js/object/define-property"),R=g(C),h=N("babel-runtime/core-js/symbol/has-instance"),s=g(h),S=N("babel-runtime/core-js/symbol"),f=g(S),a=N("babel-runtime/core-js/object/create"),o=g(a),r=N("babel-runtime/core-js/set-immediate"),E=g(r);function g(ie){return ie&&ie.__esModule?ie:{default:ie}}var m=N("process-nextick-args");$.exports=I;function w(ie,se,re){this.chunk=ie,this.encoding=se,this.callback=re,this.next=null}function p(ie){var se=this;this.next=null,this.entry=null,this.finish=function(){xe(se,ie)}}var d=!k.browser&&["v0.10","v0.9."].indexOf(k.version.slice(0,5))>-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.length<se.highWaterMark;if(Y||(se.needDrain=!0),se.writing||se.corked){var X=se.lastBufferedRequest;se.lastBufferedRequest={chunk:be,encoding:Z,isBuf:re,callback:te,next:null},X?X.next=se.lastBufferedRequest:se.bufferedRequest=se.lastBufferedRequest,se.bufferedRequestCount+=1}else H(ie,se,!1,ae,be,Z,te);return Y}function H(ie,se,re,be,Z,te,Ee){se.writelen=be,se.writecb=Ee,se.writing=!0,se.sync=!0,re?ie._writev(Z,se.onwrite):ie._write(Z,te,se.onwrite),se.sync=!1}function z(ie,se,re,be,Z){--se.pendingcb,re?(m.nextTick(Z,be),m.nextTick(le,ie,se),ie._writableState.errorEmitted=!0,ie.emit("error",be)):(Z(be),ie._writableState.errorEmitted=!0,ie.emit("error",be),le(ie,se))}function B(ie){ie.writing=!1,ie.writecb=null,ie.length-=ie.writelen,ie.writelen=0}function W(ie,se){var re=ie._writableState,be=re.sync,Z=re.writecb;if(B(re),se)z(ie,re,be,se,Z);else{var te=q(re);!te&&!re.corked&&!re.bufferProcessing&&re.bufferedRequest&&ee(ie,re),be?d(F,ie,re,te,Z):F(ie,re,te,Z)}}function F(ie,se,re,be){re||J(ie,se),se.pendingcb--,be(),le(ie,se)}function J(ie,se){se.length===0&&se.needDrain&&(se.needDrain=!1,ie.emit("drain"))}function ee(ie,se){se.bufferProcessing=!0;var re=se.bufferedRequest;if(ie._writev&&re&&re.next){var be=se.bufferedRequestCount,Z=new Array(be),te=se.corkedRequestsFree;te.entry=re;for(var Ee=0,ae=!0;re;)Z[Ee]=re,re.isBuf||(ae=!1),re=re.next,Ee+=1;Z.allBuffers=ae,H(ie,se,!0,se.length,Z,"",te.finish),se.pendingcb++,se.lastBufferedRequest=null,te.next?(se.corkedRequestsFree=te.next,te.next=null):se.corkedRequestsFree=new p(se),se.bufferedRequestCount=0}else{for(;re;){var Y=re.chunk,X=re.encoding,Q=re.callback,he=se.objectMode?1:Y.length;if(H(ie,se,!1,he,Y,X,Q),re=re.next,se.bufferedRequestCount--,se.writing)break}re===null&&(se.lastBufferedRequest=null)}se.bufferedRequest=re,se.bufferProcessing=!1}I.prototype._write=function(ie,se,re){re(new Error("_write() is not implemented"))},I.prototype._writev=null,I.prototype.end=function(ie,se,re){var be=this._writableState;typeof ie=="function"?(re=ie,ie=null,se=null):typeof se=="function"&&(re=se,se=null),ie!=null&&this.write(ie,se),be.corked&&(be.corked=1,this.uncork()),!be.ending&&!be.finished&&Oe(this,be,re)};function q(ie){return ie.ending&&ie.length===0&&ie.bufferedRequest===null&&!ie.finished&&!ie.writing}function ye(ie,se){ie._final(function(re){se.pendingcb--,re&&ie.emit("error",re),se.prefinished=!0,ie.emit("prefinish"),le(ie,se)})}function pe(ie,se){!se.prefinished&&!se.finalCalled&&(typeof ie._final=="function"?(se.pendingcb++,se.finalCalled=!0,m.nextTick(ye,ie,se)):(se.prefinished=!0,ie.emit("prefinish")))}function le(ie,se){var re=q(se);return re&&(pe(ie,se),se.pendingcb===0&&(se.finished=!0,ie.emit("finish"))),re}function Oe(ie,se,re){se.ending=!0,le(ie,se),re&&(se.finished?m.nextTick(re):ie.once("finish",re)),se.ended=!0,ie.writable=!1}function xe(ie,se,re){var be=ie.entry;for(ie.entry=null;be;){var Z=be.callback;se.pendingcb--,Z(re),be=be.next}se.corkedRequestsFree?se.corkedRequestsFree.next=ie:se.corkedRequestsFree=ie}Object.defineProperty(I.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(se){if(!this._writableState)return;this._writableState.destroyed=se}}),I.prototype.destroy=b.destroy,I.prototype._undestroy=b.undestroy,I.prototype._destroy=function(ie,se){this.end(),se(ie)}}).call(this,N("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":214,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/set-immediate":62,"babel-runtime/core-js/symbol":64,"babel-runtime/core-js/symbol/has-instance":65,"core-util-is":189,inherits:196,"process-nextick-args":207,"safe-buffer":228,"util-deprecate":240}],219:[function(N,$,P){"use strict";function k(h,s){if(!(h instanceof s))throw new TypeError("Cannot call a class as a function")}var u=N("safe-buffer").Buffer,C=N("util");function R(h,s,S){h.copy(s,S)}$.exports=function(){function h(){k(this,h),this.head=null,this.tail=null,this.length=0}return h.prototype.push=function(S){var f={data:S,next:null};this.length>0?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<K.length;)if(C.call(K,z))return W.value=K[z],W.done=!1,W;return W.value=R,W.done=!0,W};return B.next=B}}return{next:G}}o.values=M;function G(){return{value:R,done:!0}}j.prototype={constructor:j,reset:function(K){if(this.prev=0,this.next=0,this.sent=this._sent=R,this.done=!1,this.delegate=null,this.method="next",this.arg=R,this.tryEntries.forEach(I),!K)for(var H in this)H.charAt(0)==="t"&&C.call(this,H)&&!isNaN(+H.slice(1))&&(this[H]=R)},stop:function(){this.done=!0;var K=this.tryEntries[0],H=K.completion;if(H.type==="throw")throw H.arg;return this.rval},dispatchException:function(K){if(this.done)throw K;var H=this;function z(q,ye){return F.type="throw",F.arg=K,H.next=q,ye&&(H.method="next",H.arg=R),!!ye}for(var B=this.tryEntries.length-1;B>=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<W.catchLoc)return z(W.catchLoc,!0);if(this.prev<W.finallyLoc)return z(W.finallyLoc)}else if(J){if(this.prev<W.catchLoc)return z(W.catchLoc,!0)}else if(ee){if(this.prev<W.finallyLoc)return z(W.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(K,H){for(var z=this.tryEntries.length-1;z>=0;--z){var B=this.tryEntries[z];if(B.tryLoc<=this.prev&&C.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var W=B;break}}W&&(K==="break"||K==="continue")&&W.tryLoc<=H&&H<=W.finallyLoc&&(W=null);var F=W?W.completion:{};return F.type=K,F.arg=H,W?(this.method="next",this.next=W.finallyLoc,d):this.complete(F)},complete:function(K,H){if(K.type==="throw")throw K.arg;return K.type==="break"||K.type==="continue"?this.next=K.arg:K.type==="return"?(this.rval=this.arg=K.arg,this.method="return",this.next="end"):K.type==="normal"&&H&&(this.next=H),d},finish:function(K){for(var H=this.tryEntries.length-1;H>=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;ce<Se;ce++){var Ke=X[p[ce]].length;if(Ke>Q)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<he;Q++)X[p[Q]]=""}function c(X){ye(X),X.cdata!==""&&(q(X,"oncdata",X.cdata),X.cdata=""),X.script!==""&&(q(X,"onscript",X.script),X.script="")}d.prototype={end:function(){Oe(this)},write:Y,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){c(this)}};var T;try{T=N("stream").Stream}catch(X){T=function(){}}var v=w.EVENTS.filter(function(X){return X!=="error"&&X!=="end"});function i(X,Q){return new L(X,Q)}function L(X,Q){if(!(this instanceof L))return new L(X,Q);T.apply(this),this._parser=new d(X,Q),this.writable=!0,this.readable=!0;var he=this;this._parser.onend=function(){he.emit("end")},this._parser.onerror=function(ce){he.emit("error",ce),he._parser.error=null},this._decoder=null,v.forEach(function(ce){(0,a.default)(he,"on"+ce,{get:function(){return he._parser["on"+ce]},set:function(Ke){if(!Ke)return he.removeAllListeners(ce),he._parser["on"+ce]=Ke,Ke;he.on(ce,Ke)},enumerable:!0,configurable:!1})})}L.prototype=(0,g.default)(T.prototype,{constructor:{value:L}}),L.prototype.write=function(X){if(typeof k=="function"&&typeof k.isBuffer=="function"&&k.isBuffer(X)){if(!this._decoder){var Q=N("string_decoder").StringDecoder;this._decoder=new Q("utf8")}X=this._decoder.write(X)}return this._parser.write(X.toString()),this.emit("data",X),!0},L.prototype.end=function(X){return X&&X.length&&this.write(X),this._parser.end(),!0},L.prototype.on=function(X,Q){var he=this;return!he._parser["on"+X]&&v.indexOf(X)!==-1&&(he._parser["on"+X]=function(){var ce=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);ce.splice(0,0,X),he.emit.apply(he,ce)}),T.prototype.on.call(he,X,Q)};var A="[CDATA[",b="DOCTYPE",x="http://www.w3.org/XML/1998/namespace",y="http://www.w3.org/2000/xmlns/",_={xml:x,xmlns:y},I=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,j=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,M=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,G=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function K(X){return X===" "||X===`
`||X==="\r"||X===" "}function H(X){return X==='"'||X==="'"}function z(X){return X===">"||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<Ge;Ke++){var Ye=X.attribList[Ke],Qe=Ye[0],rt=Ye[1],qe=se(Qe,!0),Le=qe.prefix,Ce=qe.local,Ve=Le===""?"":he.ns[Le]||"",tt={name:Qe,value:rt,prefix:Le,local:Ce,uri:Ve};Le&&Le!=="xmlns"&&!Ve&&(xe(X,"Unbound namespace prefix: "+(0,h.default)(Le)),tt.uri=Le),X.tag.attributes[Qe]=tt,q(X,"onattribute",tt)}X.attribList.length=0}X.tag.isSelfClosing=!!Q,X.sawRoot=!0,X.tags.push(X.tag),q(X,"onopentag",X.tag),Q||(!X.noscript&&X.tagName.toLowerCase()==="script"?X.state=F.SCRIPT:X.state=F.TEXT,X.tag=null,X.tagName=""),X.attribName=X.attribValue="",X.attribList.length=0}function Z(X){if(!X.tagName){xe(X,"Weird empty close tag."),X.textNode+="</>",X.state=F.TEXT;return}if(X.script){if(X.tagName!=="script"){X.script+="</"+X.tagName+">",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.tagName+">",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<X.length&&(he=X.charAt(Q)),he}function Y(X){var Q=this;if(this.error)throw this.error;if(Q.closed)return le(Q,"Cannot write after close. Assign an onready handler.");if(X===null)return Oe(Q);(typeof X=="undefined"?"undefined":(0,S.default)(X))==="object"&&(X=X.toString());for(var he=0,ce="";!(ce=ae(X,he++),Q.c=ce,!ce);){Q.trackPosition&&(Q.position++,ce===`
`?(Q.line++,Q.column=0):Q.column++);switch(Q.state){case F.BEGIN:if(Q.state=F.BEGIN_WHITESPACE,ce==="\uFEFF")continue;Ee(Q,ce);continue;case F.BEGIN_WHITESPACE:Ee(Q,ce);continue;case F.TEXT:if(Q.sawRoot&&!Q.closedRoot){for(var Se=he-1;ce&&ce!=="<"&&ce!=="&";)ce=ae(X,he++),ce&&Q.trackPosition&&(Q.position++,ce===`
`?(Q.line++,Q.column=0):Q.column++);Q.textNode+=X.substring(Se,he-1)}ce==="<"&&!(Q.sawRoot&&Q.closedRoot&&!Q.strict)?(Q.state=F.OPEN_WAKA,Q.startTagPosition=Q.position):(!K(ce)&&(!Q.sawRoot||Q.closedRoot)&&xe(Q,"Text data outside of root node."),ce==="&"?Q.state=F.TEXT_ENTITY:Q.textNode+=ce);continue;case F.SCRIPT:ce==="<"?Q.state=F.SCRIPT_ENDING:Q.script+=ce;continue;case F.SCRIPT_ENDING:ce==="/"?Q.state=F.CLOSE_TAG:(Q.script+="<"+ce,Q.state=F.SCRIPT);continue;case F.OPEN_WAKA:if(ce==="!")Q.state=F.SGML_DECL,Q.sgmlDecl="";else if(!K(ce))if(B(I,ce))Q.state=F.OPEN_TAG,Q.tagName=ce;else if(ce==="/")Q.state=F.CLOSE_TAG,Q.tagName="";else if(ce==="?")Q.state=F.PROC_INST,Q.procInstName=Q.procInstBody="";else{if(xe(Q,"Unencoded <"),Q.startTagPosition+1<Q.position){var Ke=Q.position-Q.startTagPosition;ce=new Array(Ke).join(" ")+ce}Q.textNode+="<"+ce,Q.state=F.TEXT}continue;case F.SGML_DECL:(Q.sgmlDecl+ce).toUpperCase()===A?(q(Q,"onopencdata"),Q.state=F.CDATA,Q.sgmlDecl="",Q.cdata=""):Q.sgmlDecl+ce==="--"?(Q.state=F.COMMENT,Q.comment="",Q.sgmlDecl=""):(Q.sgmlDecl+ce).toUpperCase()===b?(Q.state=F.DOCTYPE,(Q.doctype||Q.sawRoot)&&xe(Q,"Inappropriately located doctype declaration"),Q.doctype="",Q.sgmlDecl=""):ce===">"?(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+="</"+Q.tagName,Q.tagName="",Q.state=F.SCRIPT):(K(ce)||xe(Q,"Invalid tagname in closing tag"),Q.state=F.CLOSE_TAG_SAW_WHITE);else{if(K(ce))continue;W(I,ce)?Q.script?(Q.script+="</"+ce,Q.state=F.SCRIPT):xe(Q,"Invalid tagname in closing tag."):Q.tagName=ce}continue;case F.CLOSE_TAG_SAW_WHITE:if(K(ce))continue;ce===">"?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="";++Qe<rt;){var Le=Number(arguments[Qe]);if(!isFinite(Le)||Le<0||Le>1114111||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;d<w.length;d++)p[d]=w.charCodeAt(d)&255;E.push(p)}else E.push(w,E._charset);E._pos=m.length}break;case"arraybuffer":if(g.readyState!==o.DONE||!g.response)break;m=g.response,E.push(new C(new Uint8Array(m)));break;case"moz-chunked-arraybuffer":if(m=g.response,g.readyState!==o.LOADING||!m)break;E.push(new C(new Uint8Array(m)));break;case"ms-stream":if(m=g.response,g.readyState!==o.LOADING)break;var n=new u.MSStreamReader;n.onprogress=function(){n.result.byteLength>E._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<n.length?l?l+this.text(n,c):this.text(n,c):l||""},h.prototype.end=r,h.prototype.text=o,h.prototype.fillLast=function(n){if(this.lastNeed<=n.length)return n.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,this.lastTotal-this.lastNeed,0,n.length),this.lastNeed-=n.length};function s(n){return n<=127?0:n>>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<c)return 0;var v=s(l[T]);return v>=0?(v>0&&(n.lastNeed=v-1),v):--T<c||v===-2?0:(v=s(l[T]),v>=0?(v>0&&(n.lastNeed=v-2),v):--T<c||v===-2?0:(v=s(l[T]),v>=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;h++)C[h]=u[h];return C.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(N,$,P){"use strict";var k=N("punycode"),u=N("./util");P.parse=l,P.resolve=T,P.resolveObject=v,P.format=c,P.Url=C;function C(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var R=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,S=["<",">",'"',"`"," ","\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&&b<i.indexOf("#")?"?":"#",y=i.split(x),_=/\\/g;y[0]=y[0].replace(_,"/"),i=y.join(x);var I=i;if(I=I.trim(),!A&&i.split("#").length===1){var j=s.exec(I);if(j)return this.path=I,this.href=I,this.pathname=j[1],j[2]?(this.search=j[2],L?this.query=n.parse(this.search.substr(1)):this.query=this.search.substr(1)):L&&(this.search="",this.query={}),this}var M=R.exec(I);if(M){M=M[0];var G=M.toLowerCase();this.protocol=G,I=I.substr(M.length)}if(A||M||I.match(/^\/\/[^@\/]+@[^@\/]+/)){var K=I.substr(0,2)==="//";K&&!(M&&p[M])&&(I=I.substr(2),this.slashes=!0)}if(!p[M]&&(K||M&&!d[M])){for(var H=-1,z=0;z<r.length;z++){var B=I.indexOf(r[z]);B!==-1&&(H===-1||B<H)&&(H=B)}var W,F;H===-1?F=I.lastIndexOf("@"):F=I.lastIndexOf("@",H),F!==-1&&(W=I.slice(0,F),I=I.slice(F+1),this.auth=decodeURIComponent(W)),H=-1;for(var z=0;z<o.length;z++){var B=I.indexOf(o[z]);B!==-1&&(H===-1||B<H)&&(H=B)}H===-1&&(H=I.length),this.host=I.slice(0,H),I=I.slice(H),this.parseHost(),this.hostname=this.hostname||"";var J=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!J)for(var ee=this.hostname.split(/\./),z=0,q=ee.length;z<q;z++){var ye=ee[z];if(!ye)continue;if(!ye.match(g)){for(var pe="",le=0,Oe=ye.length;le<Oe;le++)ye.charCodeAt(le)>127?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;z<q;z++){var Z=a[z];if(I.indexOf(Z)===-1)continue;var te=encodeURIComponent(Z);te===Z&&(te=escape(Z)),I=I.split(Z).join(te)}var Ee=I.indexOf("#");Ee!==-1&&(this.hash=I.substr(Ee),I=I.slice(0,Ee));var ae=I.indexOf("?");if(ae!==-1?(this.search=I.substr(ae),this.query=I.substr(ae+1),L&&(this.query=n.parse(this.query)),I=I.slice(0,ae)):L&&(this.search="",this.query={}),I&&(this.pathname=I),d[G]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var re=this.pathname||"",Y=this.search||"";this.path=re+Y}return this.href=this.format(),this};function c(i){return u.isString(i)&&(i=l(i)),i instanceof C?i.format():C.prototype.format.call(i)}C.prototype.format=function(){var i=this.auth||"";i&&(i=encodeURIComponent(i),i=i.replace(/%3A/i,":"),i+="@");var L=this.protocol||"",A=this.pathname||"",b=this.hash||"",x=!1,y="";this.host?x=i+this.host:this.hostname&&(x=i+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(x+=":"+this.port)),this.query&&u.isObject(this.query)&&Object.keys(this.query).length&&(y=n.stringify(this.query));var _=this.search||y&&"?"+y||"";return L&&L.substr(-1)!==":"&&(L+=":"),this.slashes||(!L||d[L])&&x!==!1?(x="//"+(x||""),A&&A.charAt(0)!=="/"&&(A="/"+A)):x||(x=""),b&&b.charAt(0)!=="#"&&(b="#"+b),_&&_.charAt(0)!=="?"&&(_="?"+_),A=A.replace(/[?#]/g,function(I){return encodeURIComponent(I)}),_=_.replace("#","%23"),L+x+A+_+b};function T(i,L){return l(i,!1,!0).resolve(L)}C.prototype.resolve=function(i){return this.resolveObject(l(i,!1,!0)).format()};function v(i,L){return i?l(i,!1,!0).resolveObject(L):L}C.prototype.resolveObject=function(i){if(u.isString(i)){var L=new C;L.parse(i,!1,!0),i=L}for(var A=new C,b=Object.keys(this),x=0;x<b.length;x++){var y=b[x];A[y]=this[y]}if(A.hash=i.hash,i.href==="")return A.href=A.format(),A;if(i.slashes&&!i.protocol){for(var _=Object.keys(i),I=0;I<_.length;I++){var j=_[I];j!=="protocol"&&(A[j]=i[j])}return d[A.protocol]&&A.hostname&&!A.pathname&&(A.path=A.pathname="/"),A.href=A.format(),A}if(i.protocol&&i.protocol!==A.protocol){if(!d[i.protocol]){for(var M=Object.keys(i),G=0;G<M.length;G++){var K=M[G];A[K]=i[K]}return A.href=A.format(),A}if(A.protocol=i.protocol,!i.host&&!p[i.protocol]){for(var q=(i.pathname||"").split("/");q.length&&!(i.host=q.shift()););i.host||(i.host=""),i.hostname||(i.hostname=""),q[0]!==""&&q.unshift(""),q.length<2&&q.unshift(""),A.pathname=q.join("/")}else A.pathname=i.pathname;if(A.search=i.search,A.query=i.query,A.host=i.host||"",A.auth=i.auth,A.hostname=i.hostname||i.host,A.port=i.port,A.pathname||A.search){var H=A.pathname||"",z=A.search||"";A.path=H+z}return A.slashes=A.slashes||i.slashes,A.href=A.format(),A}var B=A.pathname&&A.pathname.charAt(0)==="/",W=i.host||i.pathname&&i.pathname.charAt(0)==="/",F=W||B||A.host&&i.pathname,J=F,ee=A.pathname&&A.pathname.split("/")||[],q=i.pathname&&i.pathname.split("/")||[],ye=A.protocol&&!d[A.protocol];if(ye&&(A.hostname="",A.port=null,A.host&&(ee[0]===""?ee[0]=A.host:ee.unshift(A.host)),A.host="",i.protocol&&(i.hostname=null,i.port=null,i.host&&(q[0]===""?q[0]=i.host:q.unshift(i.host)),i.host=null),F=F&&(q[0]===""||ee[0]==="")),W)A.host=i.host||i.host===""?i.host:A.host,A.hostname=i.hostname||i.hostname===""?i.hostname:A.hostname,A.search=i.search,A.query=i.query,ee=q;else if(q.length)ee||(ee=[]),ee.pop(),ee=ee.concat(q),A.search=i.search,A.query=i.query;else if(!u.isNullOrUndefined(i.search)){if(ye){A.hostname=A.host=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 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<arguments.length;B++)z.push(s(arguments[B]));return z.join(" ")}for(var B=1,W=arguments,F=W.length,J=String(H).replace(C,function(q){if(q==="%%")return"%";if(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<F;ee=W[++B])n(ee)||!A(ee)?J+=" "+ee:J+=" "+s(ee);return J},P.deprecate=function(H,z){if(i(u.process))return function(){return P.deprecate(H,z).apply(this,arguments)};if(k.noDeprecation===!0)return H;var B=!1;function W(){if(!B){if(k.throwDeprecation)throw new Error(z);k.traceDeprecation?console.trace(z):console.error(z),B=!0}return H.apply(this,arguments)}return W};var R={},h;P.debuglog=function(H){if(i(h)&&(h=k.env.NODE_DEBUG||""),H=H.toUpperCase(),!R[H])if(new RegExp("\\b"+H+"\\b","i").test(h)){var z=k.pid;R[H]=function(){var B=P.format.apply(P,arguments);console.error("%s %d: %s",H,z,B)}}else R[H]=function(){};return R[H]};function s(H,z){var B={seen:[],stylize:f};return arguments.length>=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<q;++ee)K(z,String(ee))?J.push(m(H,z,B,W,String(ee),!0)):J.push("");return F.forEach(function(ye){ye.match(/^\d+$/)||J.push(m(H,z,B,W,ye,!0))}),J}function m(H,z,B,W,F,J){var ee,q,ye;if(ye=Object.getOwnPropertyDescriptor(z,F)||{value:z[F]},ye.get?ye.set?q=H.stylize("[Getter/Setter]","special"):q=H.stylize("[Getter]","special"):ye.set&&(q=H.stylize("[Setter]","special")),K(W,F)||(ee="["+F+"]"),q||(H.seen.indexOf(ye.value)<0?(n(B)?q=o(H,ye.value,null):q=o(H,ye.value,B-1),q.indexOf(`
`)>-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"<![CDATA["+f(g)+"]]>"},f=function(g){return g.replace("]]>","]]]]><![CDATA[>")},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;A<b;A++)x=v[A],i=x(i,L);return i},P.Parser=function(T){l(v,T);function v(i){this.parseStringPromise=n(this.parseStringPromise,this),this.parseString=n(this.parseString,this),this.reset=n(this.reset,this),this.assignOrPush=n(this.assignOrPush,this),this.processAsync=n(this.processAsync,this);var L,A,b;if(!(this instanceof P.Parser))return new P.Parser(i);this.options={},A=r["0.2"];for(L in A){if(!c.call(A,L))continue;b=A[L],this.options[L]=b}for(L in i){if(!c.call(i,L))continue;b=i[L],this.options[L]=b}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(w.normalize)),this.reset()}return v.prototype.processAsync=function(){var i,L;try{return this.remaining.length<=this.options.chunkSize?(i=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(i),this.saxParser.close()):(i=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(i),d(this.processAsync))}catch(A){if(L=A,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(L)}},v.prototype.assignOrPush=function(i,L,A){return L in i?(i[L]instanceof Array||(i[L]=[i[L]]),i[L].push(A)):this.options.explicitArray?i[L]=[A]:i[L]=A},v.prototype.reset=function(){var i,L,A,b;return this.removeAllListeners(),this.saxParser=p.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(x){return function(y){if(x.saxParser.resume(),!x.saxParser.errThrown)return x.saxParser.errThrown=!0,x.emit("error",y)}}(this),this.saxParser.onend=function(x){return function(){if(!x.saxParser.ended)return x.saxParser.ended=!0,x.emit("end",x.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,b=[],i=this.options.attrkey,L=this.options.charkey,this.saxParser.onopentag=function(x){return function(y){var _,I,j,M,G;if(j={},j[L]="",!x.options.ignoreAttrs){G=y.attributes;for(_ in G){if(!c.call(G,_))continue;!(i in j)&&!x.options.mergeAttrs&&(j[i]={}),I=x.options.attrValueProcessors?m(x.options.attrValueProcessors,y.attributes[_],_):y.attributes[_],M=x.options.attrNameProcessors?m(x.options.attrNameProcessors,_):_,x.options.mergeAttrs?x.assignOrPush(j,M,I):j[i][M]=I}}return j["#name"]=x.options.tagNameProcessors?m(x.options.tagNameProcessors,y.name):y.name,x.options.xmlns&&(j[x.options.xmlnskey]={uri:y.uri,local:y.local}),b.push(j)}}(this),this.saxParser.onclosetag=function(x){return function(){var y,_,I,j,M,G,K,H,z,B;if(G=b.pop(),M=G["#name"],(!x.options.explicitChildren||!x.options.preserveChildrenOrder)&&delete G["#name"],G.cdata===!0&&(y=G.cdata,delete G.cdata),z=b[b.length-1],G[L].match(/^\s*$/)&&!y?(_=G[L],delete G[L]):(x.options.trim&&(G[L]=G[L].trim()),x.options.normalize&&(G[L]=G[L].replace(/\s{2,}/g," ").trim()),G[L]=x.options.valueProcessors?m(x.options.valueProcessors,G[L],M):G[L],(0,s.default)(G).length===1&&L in G&&!x.EXPLICIT_CHARKEY&&(G=G[L])),g(G)&&(G=x.options.emptyTag!==""?x.options.emptyTag:_),x.options.validator!=null&&(B="/"+function(){var W,F,J;for(J=[],W=0,F=b.length;W<F;W++)j=b[W],J.push(j["#name"]);return J}().concat(M).join("/"),function(){var W;try{return G=x.options.validator(B,z&&z[M],G)}catch(F){return W=F,x.emit("error",W)}}()),x.options.explicitChildren&&!x.options.mergeAttrs&&(typeof G=="undefined"?"undefined":(0,f.default)(G))==="object"){if(!x.options.preserveChildrenOrder)j={},x.options.attrkey in G&&(j[x.options.attrkey]=G[x.options.attrkey],delete G[x.options.attrkey]),!x.options.charsAsChildren&&x.options.charkey in G&&(j[x.options.charkey]=G[x.options.charkey],delete G[x.options.charkey]),(0,R.default)(G).length>0&&(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<c;n++)if(T=v[n],T!=null)for(l in T){if(!p.call(T,l))continue;i[l]=T[l]}return i},E=function(n){return!!n&&Object.prototype.toString.call(n)==="[object Function]"},g=function(n){var l;return!!n&&((l=typeof n=="undefined"?"undefined":(0,R.default)(n))==="function"||l==="object")},o=function(n){return E(Array.isArray)?Array.isArray(n):Object.prototype.toString.call(n)==="[object Array]"},r=function(n){var l;if(o(n))return!n.length;for(l in n){if(!p.call(n,l))continue;return!1}return!0},m=function(n){var l,c;return g(n)&&(c=(0,u.default)(n))&&(l=c.constructor)&&typeof l=="function"&&l instanceof l&&Function.prototype.toString.call(l)===Function.prototype.toString.call(Object)},a=function(n){return E(n.valueOf)?n.valueOf():n},$.exports.assign=f,$.exports.isFunction=E,$.exports.isObject=g,$.exports.isArray=o,$.exports.isEmpty=r,$.exports.isPlainObject=m,$.exports.getValue=a}).call(void 0)},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/get-prototype-of":59,"babel-runtime/helpers/typeof":67}],253:[function(N,$,P){"use strict";(function(){$.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[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;R=N("./NodeType"),s=N("./XMLNode"),$.exports=h=function(){function S(f,a,o){if(this.parent=f,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),a==null)throw new Error("Missing attribute name. "+this.debugInfo(a));this.name=this.stringify.name(a),this.value=this.stringify.attValue(o),this.type=R.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(S.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(S.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(S.prototype,"textContent",{get:function(){return this.value},set:function(a){return this.value=a||""}}),Object.defineProperty(S.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(S.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(S.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(S.prototype,"specified",{get:function(){return!0}}),S.prototype.clone=function(){return(0,u.default)(this)},S.prototype.toString=function(f){return this.options.writer.attribute(this,this.options.writer.filterOptions(f))},S.prototype.debugInfo=function(f){return f=f||this.name,f==null?"parent: <"+this.parent.name+">":"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<l;n++)if(d=c[n],d.type===k.Element){this.name=d.name;break}}this.documentObject=m,a(w)&&(T=w,w=T.pubID,p=T.sysID),p==null&&(v=[w,p],p=v[0],w=v[1]),w!=null&&(this.pubID=this.stringify.dtdPubID(w)),p!=null&&(this.sysID=this.stringify.dtdSysID(p))}return Object.defineProperty(g.prototype,"entities",{get:function(){var w,p,d,n,l;for(n={},l=this.children,p=0,d=l.length;p<d;p++)w=l[p],w.type===k.EntityDeclaration&&!w.pe&&(n[w.name]=w);return new S(n)}}),Object.defineProperty(g.prototype,"notations",{get:function(){var w,p,d,n,l;for(n={},l=this.children,p=0,d=l.length;p<d;p++)w=l[p],w.type===k.NotationDeclaration&&(n[w.name]=w);return new S(n)}}),Object.defineProperty(g.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(g.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(g.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),g.prototype.element=function(m,w){var p;return p=new C(this,m,w),this.children.push(p),this},g.prototype.attList=function(m,w,p,d,n){var l;return l=new u(this,m,w,p,d,n),this.children.push(l),this},g.prototype.entity=function(m,w){var p;return p=new R(this,!1,m,w),this.children.push(p),this},g.prototype.pEntity=function(m,w){var p;return p=new R(this,!0,m,w),this.children.push(p),this},g.prototype.notation=function(m,w){var p;return p=new h(this,m,w),this.children.push(p),this},g.prototype.toString=function(m){return this.options.writer.docType(this,this.options.writer.filterOptions(m))},g.prototype.ele=function(m,w){return this.element(m,w)},g.prototype.att=function(m,w,p,d,n){return this.attList(m,w,p,d,n)},g.prototype.ent=function(m,w){return this.entity(m,w)},g.prototype.pent=function(m,w){return this.pEntity(m,w)},g.prototype.not=function(m,w){return this.notation(m,w)},g.prototype.up=function(){return this.root()||this.documentObject},g.prototype.isEqualNode=function(m){return g.__super__.isEqualNode.apply(this,arguments).isEqualNode(m)?m.name!==this.name||m.publicId!==this.publicId?!1:!(m.systemId!==this.systemId):!1},g}(f)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(N,$,P){"use strict";(function(){var k,u,C,R,h,s,S,f,a=function(E,g){for(var m in g)o.call(g,m)&&(E[m]=g[m]);function w(){this.constructor=E}return w.prototype=g.prototype,E.prototype=new w,E.__super__=g.prototype,E},o={}.hasOwnProperty;f=N("./Utility").isPlainObject,C=N("./XMLDOMImplementation"),u=N("./XMLDOMConfiguration"),h=N("./XMLNode"),k=N("./NodeType"),S=N("./XMLStringifier"),s=N("./XMLStringWriter"),$.exports=R=function(r){a(E,r);function E(g){E.__super__.constructor.call(this,null),this.name="#document",this.type=k.Document,this.documentURI=null,this.domConfig=new u,g||(g={}),g.writer||(g.writer=new s),this.options=g,this.stringify=new S(g)}return Object.defineProperty(E.prototype,"implementation",{value:new C}),Object.defineProperty(E.prototype,"doctype",{get:function(){var m,w,p,d;for(d=this.children,w=0,p=d.length;w<p;w++)if(m=d[w],m.type===k.DocType)return m;return null}}),Object.defineProperty(E.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(E.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(E.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(E.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===k.Declaration?this.children[0].encoding:null}}),Object.defineProperty(E.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===k.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(E.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===k.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(E.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(E.prototype,"origin",{get:function(){return null}}),Object.defineProperty(E.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(E.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(E.prototype,"contentType",{get:function(){return null}}),E.prototype.end=function(g){var m;return m={},g?f(g)&&(m=g,g=this.options.writer):g=this.options.writer,g.document(this,g.filterOptions(m))},E.prototype.toString=function(g){return this.options.writer.document(this,this.options.writer.filterOptions(g))},E.prototype.createElement=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createTextNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createComment=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createCDATASection=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createProcessingInstruction=function(g,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createAttribute=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createEntityReference=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.importNode=function(g,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createElementNS=function(g,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createAttributeNS=function(g,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByTagNameNS=function(g,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementById=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.adoptNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.renameNode=function(g,m,w){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getElementsByClassName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createEvent=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createNodeIterator=function(g,m,w){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.createTreeWalker=function(g,m,w){throw new Error("This DOM method is not implemented."+this.debugInfo())},E}(h)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[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,T,v,i,L,A={}.hasOwnProperty;L=N("./Utility"),v=L.isObject,T=L.isFunction,i=L.isPlainObject,c=L.getValue,k=N("./NodeType"),E=N("./XMLDocument"),m=N("./XMLElement"),R=N("./XMLCData"),h=N("./XMLComment"),p=N("./XMLRaw"),l=N("./XMLText"),w=N("./XMLProcessingInstruction"),o=N("./XMLDeclaration"),r=N("./XMLDocType"),s=N("./XMLDTDAttList"),f=N("./XMLDTDEntity"),S=N("./XMLDTDElement"),a=N("./XMLDTDNotation"),C=N("./XMLAttribute"),n=N("./XMLStringifier"),d=N("./XMLStringWriter"),u=N("./WriterState"),$.exports=g=function(){function b(x,y,_){var I;this.name="?xml",this.type=k.Document,x||(x={}),I={},x.writer?i(x.writer)&&(I=x.writer,x.writer=new d):x.writer=new d,this.options=x,this.writer=x.writer,this.writerOptions=this.writer.filterOptions(I),this.stringify=new n(x),this.onDataCallback=y||function(){},this.onEndCallback=_||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return b.prototype.createChildNode=function(x){var y,_,I,j,M,G,K,H;switch(x.type){case k.CData:this.cdata(x.value);break;case k.Comment:this.comment(x.value);break;case k.Element:I={},K=x.attribs;for(_ in K){if(!A.call(K,_))continue;y=K[_],I[_]=y.value}this.node(x.name,I);break;case k.Dummy:this.dummy();break;case k.Raw:this.raw(x.value);break;case k.Text:this.text(x.value);break;case k.ProcessingInstruction:this.instruction(x.target,x.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+x.constructor.name)}for(H=x.children,M=0,G=H.length;M<G;M++)j=H[M],this.createChildNode(j),j.type===k.Element&&this.up();return this},b.prototype.dummy=function(){return this},b.prototype.node=function(x,y,_){var I;if(x==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(x));return this.openCurrent(),x=c(x),y==null&&(y={}),y=c(y),v(y)||(I=[y,_],_=I[0],y=I[1]),this.currentNode=new m(this,x,y),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,_!=null&&this.text(_),this},b.prototype.element=function(x,y,_){var I,j,M,G,K,H;if(this.currentNode&&this.currentNode.type===k.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(x)||v(x)||T(x))for(G=this.options.noValidation,this.options.noValidation=!0,H=new E(this.options).element("TEMP_ROOT"),H.element(x),this.options.noValidation=G,K=H.children,j=0,M=K.length;j<M;j++)I=K[j],this.createChildNode(I),I.type===k.Element&&this.up();else this.node(x,y,_);return this},b.prototype.attribute=function(x,y){var _,I;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(x));if(x!=null&&(x=c(x)),v(x))for(_ in x){if(!A.call(x,_))continue;I=x[_],this.attribute(_,I)}else T(y)&&(y=y.apply()),this.options.keepNullAttributes&&y==null?this.currentNode.attribs[x]=new C(this,x,""):y!=null&&(this.currentNode.attribs[x]=new C(this,x,y));return this},b.prototype.text=function(x){var y;return this.openCurrent(),y=new l(this,x),this.onData(this.writer.text(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.cdata=function(x){var y;return this.openCurrent(),y=new R(this,x),this.onData(this.writer.cdata(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.comment=function(x){var y;return this.openCurrent(),y=new h(this,x),this.onData(this.writer.comment(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.raw=function(x){var y;return this.openCurrent(),y=new p(this,x),this.onData(this.writer.raw(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.instruction=function(x,y){var _,I,j,M,G;if(this.openCurrent(),x!=null&&(x=c(x)),y!=null&&(y=c(y)),Array.isArray(x))for(_=0,M=x.length;_<M;_++)I=x[_],this.instruction(I);else if(v(x))for(I in x){if(!A.call(x,I))continue;j=x[I],this.instruction(I,j)}else T(y)&&(y=y.apply()),G=new w(this,x,y),this.onData(this.writer.processingInstruction(G,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},b.prototype.declaration=function(x,y,_){var I;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return I=new o(this,x,y,_),this.onData(this.writer.declaration(I,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.doctype=function(x,y,_){if(this.openCurrent(),x==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new r(this,y,_),this.currentNode.rootNodeName=x,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},b.prototype.dtdElement=function(x,y){var _;return this.openCurrent(),_=new S(this,x,y),this.onData(this.writer.dtdElement(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.attList=function(x,y,_,I,j){var M;return this.openCurrent(),M=new s(this,x,y,_,I,j),this.onData(this.writer.dtdAttList(M,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.entity=function(x,y){var _;return this.openCurrent(),_=new f(this,!1,x,y),this.onData(this.writer.dtdEntity(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.pEntity=function(x,y){var _;return this.openCurrent(),_=new f(this,!0,x,y),this.onData(this.writer.dtdEntity(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.notation=function(x,y){var _;return this.openCurrent(),_=new a(this,x,y),this.onData(this.writer.dtdNotation(_,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},b.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},b.prototype.end=function(){for(;this.currentLevel>=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)+"<!DOCTYPE "+x.rootNodeName,x.pubID&&x.sysID?_+=' PUBLIC "'+x.pubID+'" "'+x.sysID+'"':x.sysID&&(_+=' SYSTEM "'+x.sysID+'"'),x.children?(_+=" [",this.writerOptions.state=u.InsideTag):(this.writerOptions.state=u.CloseTag,_+=">"),_+=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)+"</"+x.name+">"+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<v;T++)if(c=i[T],c.type===R.DocType){c.name=this.name;break}}}return Object.defineProperty(p.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(p.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(p.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(p.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(p.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(p.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(p.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(p.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new S(this.attribs)),this.attributeMap}}),p.prototype.clone=function(){var d,n,l,c;l=(0,u.default)(this),l.isRoot&&(l.documentObject=null),l.attribs={},c=this.attribs;for(n in c){if(!m.call(c,n))continue;d=c[n],l.attribs[n]=d.clone()}return l.children=[],this.children.forEach(function(T){var v;return v=T.clone(),v.parent=l,l.children.push(v)}),l},p.prototype.attribute=function(d,n){var l,c;if(d!=null&&(d=a(d)),r(d))for(l in d){if(!m.call(d,l))continue;c=d[l],this.attribute(l,c)}else o(n)&&(n=n.apply()),this.options.keepNullAttributes&&n==null?this.attribs[d]=new h(this,d,""):n!=null&&(this.attribs[d]=new h(this,d,n));return this},p.prototype.removeAttribute=function(d){var n,l,c;if(d==null)throw new Error("Missing attribute name. "+this.debugInfo());if(d=a(d),Array.isArray(d))for(l=0,c=d.length;l<c;l++)n=d[l],delete this.attribs[n];else delete this.attribs[d];return this},p.prototype.toString=function(d){return this.options.writer.element(this,this.options.writer.filterOptions(d))},p.prototype.att=function(d,n){return this.attribute(d,n)},p.prototype.a=function(d,n){return this.attribute(d,n)},p.prototype.getAttribute=function(d){return this.attribs.hasOwnProperty(d)?this.attribs[d].value:null},p.prototype.setAttribute=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.getAttributeNode=function(d){return this.attribs.hasOwnProperty(d)?this.attribs[d]:null},p.prototype.setAttributeNode=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.removeAttributeNode=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.getElementsByTagName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.getAttributeNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.setAttributeNS=function(d,n,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.removeAttributeNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.getAttributeNodeNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.setAttributeNodeNS=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.getElementsByTagNameNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.hasAttribute=function(d){return this.attribs.hasOwnProperty(d)},p.prototype.hasAttributeNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.setIdAttribute=function(d,n){return this.attribs.hasOwnProperty(d)?this.attribs[d].isId:n},p.prototype.setIdAttributeNS=function(d,n,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.setIdAttributeNode=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.getElementsByTagName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.getElementsByTagNameNS=function(d,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.getElementsByClassName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.isEqualNode=function(d){var n,l,c;if(!p.__super__.isEqualNode.apply(this,arguments).isEqualNode(d))return!1;if(d.namespaceURI!==this.namespaceURI)return!1;if(d.prefix!==this.prefix)return!1;if(d.localName!==this.localName)return!1;if(d.attribs.length!==this.attribs.length)return!1;for(n=l=0,c=this.attribs.length-1;0<=c?l<=c:l>=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<A;L++)i=b[L],i.textContent&&(x+=i.textContent);return x}else return null},set:function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),T.prototype.setParent=function(v){var i,L,A,b,x;for(this.parent=v,v&&(this.options=v.options,this.stringify=v.stringify),b=this.children,x=[],L=0,A=b.length;L<A;L++)i=b[L],x.push(i.setParent(this));return x},T.prototype.element=function(v,i,L){var A,b,x,y,_,I,j,M,G,K,H;if(I=null,i===null&&L==null&&(G=[{},null],i=G[0],L=G[1]),i==null&&(i={}),i=w(i),n(i)||(K=[i,L],L=K[0],i=K[1]),v!=null&&(v=w(v)),Array.isArray(v))for(x=0,j=v.length;x<j;x++)b=v[x],I=this.element(b);else if(d(v))I=this.element(v.apply());else if(n(v))for(_ in v){if(!c.call(v,_))continue;if(H=v[_],d(H)&&(H=H.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&_.indexOf(this.stringify.convertAttKey)===0)I=this.attribute(_.substr(this.stringify.convertAttKey.length),H);else if(!this.options.separateArrayItems&&Array.isArray(H)&&p(H))I=this.dummy();else if(n(H)&&p(H))I=this.element(_);else if(!this.options.keepNullNodes&&H==null)I=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(H))for(y=0,M=H.length;y<M;y++)b=H[y],A={},A[_]=b,I=this.element(A);else n(H)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&_.indexOf(this.stringify.convertTextKey)===0?I=this.element(H):(I=this.element(_),I.element(H)):I=this.element(_,H)}else!this.options.keepNullNodes&&L===null?I=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&v.indexOf(this.stringify.convertTextKey)===0?I=this.text(L):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&v.indexOf(this.stringify.convertCDataKey)===0?I=this.cdata(L):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&v.indexOf(this.stringify.convertCommentKey)===0?I=this.comment(L):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&v.indexOf(this.stringify.convertRawKey)===0?I=this.raw(L):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&v.indexOf(this.stringify.convertPIKey)===0?I=this.instruction(v.substr(this.stringify.convertPIKey.length),L):I=this.node(v,i,L);if(I==null)throw new Error("Could not create any elements with: "+v+". "+this.debugInfo());return I},T.prototype.insertBefore=function(v,i,L){var A,b,x,y,_;if(v!=null?v.type:void 0)return x=v,y=i,x.setParent(this),y?(b=children.indexOf(y),_=children.splice(b),children.push(x),Array.prototype.push.apply(children,_)):children.push(x),x;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(v));return b=this.parent.children.indexOf(this),_=this.parent.children.splice(b),A=this.parent.element(v,i,L),Array.prototype.push.apply(this.parent.children,_),A},T.prototype.insertAfter=function(v,i,L){var A,b,x;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(v));return b=this.parent.children.indexOf(this),x=this.parent.children.splice(b+1),A=this.parent.element(v,i,L),Array.prototype.push.apply(this.parent.children,x),A},T.prototype.remove=function(){var v,i;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return v=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[v,v-v+1].concat(i=[])),this.parent},T.prototype.node=function(v,i,L){var A,b;return v!=null&&(v=w(v)),i||(i={}),i=w(i),n(i)||(b=[i,L],L=b[0],i=b[1]),A=new f(this,v,i),L!=null&&A.text(L),this.children.push(A),A},T.prototype.text=function(v){var i;return n(v)&&this.element(v),i=new m(this,v),this.children.push(i),this},T.prototype.cdata=function(v){var i;return i=new C(this,v),this.children.push(i),this},T.prototype.comment=function(v){var i;return i=new R(this,v),this.children.push(i),this},T.prototype.commentBefore=function(v){var i,L,A;return L=this.parent.children.indexOf(this),A=this.parent.children.splice(L),i=this.parent.comment(v),Array.prototype.push.apply(this.parent.children,A),this},T.prototype.commentAfter=function(v){var i,L,A;return L=this.parent.children.indexOf(this),A=this.parent.children.splice(L+1),i=this.parent.comment(v),Array.prototype.push.apply(this.parent.children,A),this},T.prototype.raw=function(v){var i;return i=new g(this,v),this.children.push(i),this},T.prototype.dummy=function(){var v;return v=new S(this),v},T.prototype.instruction=function(v,i){var L,A,b,x,y;if(v!=null&&(v=w(v)),i!=null&&(i=w(i)),Array.isArray(v))for(x=0,y=v.length;x<y;x++)L=v[x],this.instruction(L);else if(n(v))for(L in v){if(!c.call(v,L))continue;A=v[L],this.instruction(L,A)}else d(i)&&(i=i.apply()),b=new E(this,v,i),this.children.push(b);return this},T.prototype.instructionBefore=function(v,i){var L,A,b;return A=this.parent.children.indexOf(this),b=this.parent.children.splice(A),L=this.parent.instruction(v,i),Array.prototype.push.apply(this.parent.children,b),this},T.prototype.instructionAfter=function(v,i){var L,A,b;return A=this.parent.children.indexOf(this),b=this.parent.children.splice(A+1),L=this.parent.instruction(v,i),Array.prototype.push.apply(this.parent.children,b),this},T.prototype.declaration=function(v,i,L){var A,b;return A=this.document(),b=new h(A,v,i,L),A.children.length===0?A.children.unshift(b):A.children[0].type===u.Declaration?A.children[0]=b:A.children.unshift(b),A.root()||A},T.prototype.dtd=function(v,i){var L,A,b,x,y,_,I,j,M,G;for(A=this.document(),b=new s(A,v,i),M=A.children,x=y=0,I=M.length;y<I;x=++y)if(L=M[x],L.type===u.DocType)return A.children[x]=b,b;for(G=A.children,x=_=0,j=G.length;_<j;x=++_)if(L=G[x],L.isRoot)return A.children.splice(x,0,b),b;return A.children.push(b),b},T.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},T.prototype.root=function(){var v;for(v=this;v;){if(v.type===u.Document)return v.rootObject;if(v.isRoot)return v;v=v.parent}},T.prototype.document=function(){var v;for(v=this;v;){if(v.type===u.Document)return v;v=v.parent}},T.prototype.end=function(v){return this.document().end(v)},T.prototype.prev=function(){var v;if(v=this.parent.children.indexOf(this),v<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[v-1]},T.prototype.next=function(){var v;if(v=this.parent.children.indexOf(this),v===-1||v===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[v+1]},T.prototype.importDocument=function(v){var i;return i=v.root().clone(),i.parent=this,i.isRoot=!1,this.children.push(i),this},T.prototype.debugInfo=function(v){var i,L;return v=v||this.name,v==null&&!((i=this.parent)!=null?i.name:void 0)?"":v==null?"parent: <"+this.parent.name+">":((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;A<b;A++){if(i=x[A],v===i)return!0;if(L=i.isDescendant(v),L)return!0}return!1},T.prototype.isAncestor=function(v){return v.isDescendant(this)},T.prototype.isPreceding=function(v){var i,L;return i=this.treePosition(v),L=this.treePosition(this),i===-1||L===-1?!1:i<L},T.prototype.isFollowing=function(v){var i,L;return i=this.treePosition(v),L=this.treePosition(this),i===-1||L===-1?!1:i>L},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;A<b;A++){if(L=x[A],y=i(L))return y;if(y=this.foreachTreeNode(L,i),y)return y}},T}()}).call(void 0)},{"./DocumentPosition":250,"./NodeType":251,"./Utility":252,"./XMLCData":255,"./XMLComment":257,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLNamedNodeMap":272,"./XMLNodeList":274,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],274:[function(N,$,P){"use strict";(function(){var k;$.exports=k=function(){function u(C){this.nodes=C}return Object.defineProperty(u.prototype,"length",{get:function(){return this.nodes.length||0}}),u.prototype.clone=function(){return this.nodes=null},u.prototype.item=function(C){return this.nodes[C]||null},u}()}).call(void 0)},{}],275:[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,g){if(o.__super__.constructor.call(this,r),E==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=R.ProcessingInstruction,this.target=this.stringify.insTarget(E),this.name=this.target,g&&(this.value=this.stringify.insValue(g))}return o.prototype.clone=function(){return(0,u.default)(this)},o.prototype.toString=function(r){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(r))},o.prototype.isEqualNode=function(r){return o.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)?!(r.target!==this.target):!1},o}(h)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[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("./XMLNode"),$.exports=s=function(a){S(o,a);function o(r,E){if(o.__super__.constructor.call(this,r),E==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=R.Raw,this.value=this.stringify.raw(E)}return o.prototype.clone=function(){return(0,u.default)(this)},o.prototype.toString=function(r){return this.options.writer.raw(this,this.options.writer.filterOptions(r))},o}(h)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[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;k=N("./NodeType"),R=N("./XMLWriterBase"),u=N("./WriterState"),$.exports=C=function(S){h(f,S);function f(a,o){this.stream=a,f.__super__.constructor.call(this,o)}return f.prototype.endline=function(a,o,r){return a.isLastRootNode&&o.state===u.CloseTag?"":f.__super__.endline.call(this,a,o,r)},f.prototype.document=function(a,o){var r,E,g,m,w,p,d,n,l;for(d=a.children,E=g=0,w=d.length;g<w;E=++g)r=d[E],r.isLastRootNode=E===a.children.length-1;for(o=this.filterOptions(o),n=a.children,l=[],m=0,p=n.length;m<p;m++)r=n[m],l.push(this.writeChildNode(r,o,0));return l},f.prototype.attribute=function(a,o,r){return this.stream.write(f.__super__.attribute.call(this,a,o,r))},f.prototype.cdata=function(a,o,r){return this.stream.write(f.__super__.cdata.call(this,a,o,r))},f.prototype.comment=function(a,o,r){return this.stream.write(f.__super__.comment.call(this,a,o,r))},f.prototype.declaration=function(a,o,r){return this.stream.write(f.__super__.declaration.call(this,a,o,r))},f.prototype.docType=function(a,o,r){var E,g,m,w;if(r||(r=0),this.openNode(a,o,r),o.state=u.OpenTag,this.stream.write(this.indent(a,o,r)),this.stream.write("<!DOCTYPE "+a.root().name),a.pubID&&a.sysID?this.stream.write(' PUBLIC "'+a.pubID+'" "'+a.sysID+'"'):a.sysID&&this.stream.write(' SYSTEM "'+a.sysID+'"'),a.children.length>0){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<m;g++)E=w[g],this.writeChildNode(E,o,r+1);o.state=u.CloseTag,this.stream.write("]")}return o.state=u.CloseTag,this.stream.write(o.spaceBeforeSlash+">"),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("</"+a.name+">")):(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("</"+a.name+">");else{for(this.stream.write(">"+this.endline(a,o,r)),o.state=u.InsideTag,T=a.children,p=0,d=T.length;p<d;p++)g=T[p],this.writeChildNode(g,o,r+1);o.state=u.CloseTag,this.stream.write(this.indent(a,o,r)+"</"+a.name+">")}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<r;o++)a=g[o],E+=this.writeChildNode(a,f,0);return f.pretty&&E.slice(-f.newline.length)===f.newline&&(E=E.slice(0,-f.newline.length)),E},s}(u)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(N,$,P){"use strict";(function(){var k,u=function(h,s){return function(){return h.apply(s,arguments)}},C={}.hasOwnProperty;$.exports=k=function(){function R(h){this.assertLegalName=u(this.assertLegalName,this),this.assertLegalChar=u(this.assertLegalChar,this);var s,S,f;h||(h={}),this.options=h,this.options.version||(this.options.version="1.0"),S=h.stringify||{};for(s in S){if(!C.call(S,s))continue;f=S[s],this[s]=f}}return R.prototype.name=function(h){return this.options.noValidation?h:this.assertLegalName(""+h||"")},R.prototype.text=function(h){return this.options.noValidation?h:this.assertLegalChar(this.textEscape(""+h||""))},R.prototype.cdata=function(h){return this.options.noValidation?h:(h=""+h||"",h=h.replace("]]>","]]]]><![CDATA[>"),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,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},R.prototype.attEscape=function(h){var s;return this.options.noValidation?h:(s=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,h.replace(s,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},R}()}).call(void 0)},{}],280:[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 element text. "+this.debugInfo());this.name="#text",this.type=R.Text,this.value=this.stringify.text(E)}return Object.defineProperty(o.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(o.prototype,"wholeText",{get:function(){var E,g,m;for(m="",g=this.previousSibling;g;)m=g.data+m,g=g.previousSibling;for(m+=this.data,E=this.nextSibling;E;)m=m+E.data,E=E.nextSibling;return m}}),o.prototype.clone=function(){return(0,u.default)(this)},o.prototype.toString=function(r){return this.options.writer.text(this,this.options.writer.filterOptions(r))},o.prototype.splitText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.replaceWholeText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},o}(h)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[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={}.hasOwnProperty;d=N("./Utility").assign,k=N("./NodeType"),a=N("./XMLDeclaration"),o=N("./XMLDocType"),C=N("./XMLCData"),R=N("./XMLComment"),E=N("./XMLElement"),m=N("./XMLRaw"),w=N("./XMLText"),g=N("./XMLProcessingInstruction"),r=N("./XMLDummy"),h=N("./XMLDTDAttList"),s=N("./XMLDTDElement"),S=N("./XMLDTDEntity"),f=N("./XMLDTDNotation"),u=N("./WriterState"),$.exports=p=function(){function l(c){var T,v,i;c||(c={}),this.options=c,v=c.writer||{};for(T in v){if(!n.call(v,T))continue;i=v[T],this["_"+T]=this[T],this[T]=i}}return l.prototype.filterOptions=function(c){var T,v,i,L,A,b,x,y;return c||(c={}),c=d({},this.options,c),T={writer:this},T.pretty=c.pretty||!1,T.allowEmpty=c.allowEmpty||!1,T.indent=(v=c.indent)!=null?v:" ",T.newline=(i=c.newline)!=null?i:`
`,T.offset=(L=c.offset)!=null?L:0,T.dontPrettyTextNodes=(A=(b=c.dontPrettyTextNodes)!=null?b:c.dontprettytextnodes)!=null?A:0,T.spaceBeforeSlash=(x=(y=c.spaceBeforeSlash)!=null?y:c.spacebeforeslash)!=null?x:"",T.spaceBeforeSlash===!0&&(T.spaceBeforeSlash=" "),T.suppressPrettyCount=0,T.user={},T.state=u.None,T},l.prototype.indent=function(c,T,v){var i;return!T.pretty||T.suppressPrettyCount?"":T.pretty&&(i=(v||0)+T.offset+1,i>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)+"<![CDATA[",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.comment=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.declaration=function(c,T,v){var i;return this.openNode(c,T,v),T.state=u.OpenTag,i=this.indent(c,T,v)+"<?xml",T.state=u.InsideTag,i+=' version="'+c.version+'"',c.encoding!=null&&(i+=' encoding="'+c.encoding+'"'),c.standalone!=null&&(i+=' standalone="'+c.standalone+'"'),T.state=u.CloseTag,i+=T.spaceBeforeSlash+"?>",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+="<!DOCTYPE "+c.root().name,c.pubID&&c.sysID?b+=' PUBLIC "'+c.pubID+'" "'+c.sysID+'"':c.sysID&&(b+=' SYSTEM "'+c.sysID+'"'),c.children.length>0){for(b+=" [",b+=this.endline(c,T,v),T.state=u.InsideTag,x=c.children,L=0,A=x.length;L<A;L++)i=x[L],b+=this.writeChildNode(i,T,v+1);T.state=u.CloseTag,b+="]"}return T.state=u.CloseTag,b+=T.spaceBeforeSlash+">",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+="</"+c.name+">"+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+="</"+c.name+">"+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<I;y++)L=z[y],G+=this.writeChildNode(L,T,v+1);T.state=u.CloseTag,G+=this.indent(c,T,v)+"</"+c.name+">",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)+"<?",T.state=u.InsideTag,i+=c.target,c.value&&(i+=" "+c.value),T.state=u.CloseTag,i+=T.spaceBeforeSlash+"?>",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)+"<!ATTLIST",T.state=u.InsideTag,i+=" "+c.elementName+" "+c.attributeName+" "+c.attributeType,c.defaultValueType!=="#DEFAULT"&&(i+=" "+c.defaultValueType),c.defaultValue&&(i+=' "'+c.defaultValue+'"'),T.state=u.CloseTag,i+=T.spaceBeforeSlash+">"+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)+"<!ELEMENT",T.state=u.InsideTag,i+=" "+c.name+" "+c.value,T.state=u.CloseTag,i+=T.spaceBeforeSlash+">"+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)+"<!ENTITY",T.state=u.InsideTag,c.pe&&(i+=" %"),i+=" "+c.name,c.value?i+=' "'+c.value+'"':(c.pubID&&c.sysID?i+=' PUBLIC "'+c.pubID+'" "'+c.sysID+'"':c.sysID&&(i+=' SYSTEM "'+c.sysID+'"'),c.nData&&(i+=" NDATA "+c.nData)),T.state=u.CloseTag,i+=T.spaceBeforeSlash+">"+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)+"<!NOTATION",T.state=u.InsideTag,i+=" "+c.name,c.pubID&&c.sysID?i+=' PUBLIC "'+c.pubID+'" "'+c.sysID+'"':c.pubID?i+=' PUBLIC "'+c.pubID+'"':c.sysID&&(i+=' SYSTEM "'+c.sysID+'"'),T.state=u.CloseTag,i+=T.spaceBeforeSlash+">"+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;R<arguments.length;R++){var h=arguments[R];for(var s in h)k.call(h,s)&&(C[s]=h[s])}return C}},{}],284:[function(N,$,P){"use strict";var k=N("buffer").Buffer,u=N("./sha"),C=N("./md5"),R={sha1:u,md5:C},h=64,s=k.alloc(h);s.fill(0);function S(o,r,E){k.isBuffer(r)||(r=k.from(r)),k.isBuffer(E)||(E=k.from(E)),r.length>h?r=o(r):r.length<h&&(r=k.concat([r,s],h));for(var g=k.alloc(h),m=k.alloc(h),w=0;w<h;w++)g[w]=r[w]^54,m[w]=r[w]^92;var p=o(k.concat([g,E]));return o(k.concat([m,p]))}function f(o,r){o=o||"sha1";var E=R[o],g=[],m=0;return E||a("algorithm:",o,"is not yet supported"),{update:function(p){return k.isBuffer(p)||(p=k.from(p)),g.push(p),m+=p.length,this},digest:function(p){var d=k.concat(g),n=r?S(E,r,d):E(d);return g=null,p?n.toString(p):n}}}function a(){var o=[].slice.call(arguments).join(" ");throw new Error([o,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}P.createHash=function(o){return f(o)},P.createHmac=function(o,r){return f(o,r)},P.createCredentials=function(){a("sorry,createCredentials is not implemented yet")},P.createCipher=function(){a("sorry,createCipher is not implemented yet")},P.createCipheriv=function(){a("sorry,createCipheriv is not implemented yet")},P.createDecipher=function(){a("sorry,createDecipher is not implemented yet")},P.createDecipheriv=function(){a("sorry,createDecipheriv is not implemented yet")},P.createSign=function(){a("sorry,createSign is not implemented yet")},P.createVerify=function(){a("sorry,createVerify is not implemented yet")},P.createDiffieHellman=function(){a("sorry,createDiffieHellman is not implemented yet")},P.pbkdf2=function(){a("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(N,$,P){"use strict";var k=N("buffer").Buffer,u=4,C=k.alloc(u);C.fill(0);var R=8;function h(f,a){if(f.length%u!==0){var o=f.length+(u-f.length%u);f=k.concat([f,C],o)}for(var r=[],E=a?f.readInt32BE:f.readInt32LE,g=0;g<f.length;g+=u)r.push(E.call(f,g));return r}function s(f,a,o){for(var r=k.alloc(a),E=o?r.writeInt32BE:r.writeInt32LE,g=0;g<f.length;g++)E.call(r,f[g],g*4,!0);return r}function S(f,a,o,r){k.isBuffer(f)||(f=k.from(f));var E=a(h(f,r),f.length*R);return s(E,o,r)}$.exports={hash:S}},{buffer:73}],286:[function(N,$,P){"use strict";var k=N("./helpers");function u(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function C(r,E){r[E>>5]|=128<<E%32,r[(E+64>>>9<<4)+14]=E;for(var g=1732584193,m=-271733879,w=-1732584194,p=271733878,d=0;d<r.length;d+=16){var n=g,l=m,c=w,T=p;g=h(g,m,w,p,r[d+0],7,-680876936),p=h(p,g,m,w,r[d+1],12,-389564586),w=h(w,p,g,m,r[d+2],17,606105819),m=h(m,w,p,g,r[d+3],22,-1044525330),g=h(g,m,w,p,r[d+4],7,-176418897),p=h(p,g,m,w,r[d+5],12,1200080426),w=h(w,p,g,m,r[d+6],17,-1473231341),m=h(m,w,p,g,r[d+7],22,-45705983),g=h(g,m,w,p,r[d+8],7,1770035416),p=h(p,g,m,w,r[d+9],12,-1958414417),w=h(w,p,g,m,r[d+10],17,-42063),m=h(m,w,p,g,r[d+11],22,-1990404162),g=h(g,m,w,p,r[d+12],7,1804603682),p=h(p,g,m,w,r[d+13],12,-40341101),w=h(w,p,g,m,r[d+14],17,-1502002290),m=h(m,w,p,g,r[d+15],22,1236535329),g=s(g,m,w,p,r[d+1],5,-165796510),p=s(p,g,m,w,r[d+6],9,-1069501632),w=s(w,p,g,m,r[d+11],14,643717713),m=s(m,w,p,g,r[d+0],20,-373897302),g=s(g,m,w,p,r[d+5],5,-701558691),p=s(p,g,m,w,r[d+10],9,38016083),w=s(w,p,g,m,r[d+15],14,-660478335),m=s(m,w,p,g,r[d+4],20,-405537848),g=s(g,m,w,p,r[d+9],5,568446438),p=s(p,g,m,w,r[d+14],9,-1019803690),w=s(w,p,g,m,r[d+3],14,-187363961),m=s(m,w,p,g,r[d+8],20,1163531501),g=s(g,m,w,p,r[d+13],5,-1444681467),p=s(p,g,m,w,r[d+2],9,-51403784),w=s(w,p,g,m,r[d+7],14,1735328473),m=s(m,w,p,g,r[d+12],20,-1926607734),g=S(g,m,w,p,r[d+5],4,-378558),p=S(p,g,m,w,r[d+8],11,-2022574463),w=S(w,p,g,m,r[d+11],16,1839030562),m=S(m,w,p,g,r[d+14],23,-35309556),g=S(g,m,w,p,r[d+1],4,-1530992060),p=S(p,g,m,w,r[d+4],11,1272893353),w=S(w,p,g,m,r[d+7],16,-155497632),m=S(m,w,p,g,r[d+10],23,-1094730640),g=S(g,m,w,p,r[d+13],4,681279174),p=S(p,g,m,w,r[d+0],11,-358537222),w=S(w,p,g,m,r[d+3],16,-722521979),m=S(m,w,p,g,r[d+6],23,76029189),g=S(g,m,w,p,r[d+9],4,-640364487),p=S(p,g,m,w,r[d+12],11,-421815835),w=S(w,p,g,m,r[d+15],16,530742520),m=S(m,w,p,g,r[d+2],23,-995338651),g=f(g,m,w,p,r[d+0],6,-198630844),p=f(p,g,m,w,r[d+7],10,1126891415),w=f(w,p,g,m,r[d+14],15,-1416354905),m=f(m,w,p,g,r[d+5],21,-57434055),g=f(g,m,w,p,r[d+12],6,1700485571),p=f(p,g,m,w,r[d+3],10,-1894986606),w=f(w,p,g,m,r[d+10],15,-1051523),m=f(m,w,p,g,r[d+1],21,-2054922799),g=f(g,m,w,p,r[d+8],6,1873313359),p=f(p,g,m,w,r[d+15],10,-30611744),w=f(w,p,g,m,r[d+6],15,-1560198380),m=f(m,w,p,g,r[d+13],21,1309151649),g=f(g,m,w,p,r[d+4],6,-145523070),p=f(p,g,m,w,r[d+11],10,-1120210379),w=f(w,p,g,m,r[d+2],15,718787259),m=f(m,w,p,g,r[d+9],21,-343485551),g=a(g,n),m=a(m,l),w=a(w,c),p=a(p,T)}return Array(g,m,w,p)}function R(r,E,g,m,w,p){return a(o(a(a(E,r),a(m,p)),w),g)}function h(r,E,g,m,w,p,d){return R(E&g|~E&m,r,E,w,p,d)}function s(r,E,g,m,w,p,d){return R(E&m|g&~m,r,E,w,p,d)}function S(r,E,g,m,w,p,d){return R(E^g^m,r,E,w,p,d)}function f(r,E,g,m,w,p,d){return R(g^(E|~m),r,E,w,p,d)}function a(r,E){var g=(r&65535)+(E&65535),m=(r>>16)+(E>>16)+(g>>16);return m<<16|g&65535}function o(r,E){return r<<E|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<S.length;w+=16){for(var p=o,d=r,n=E,l=g,c=m,T=0;T<80;T++){T<16?a[T]=S[w+T]:a[T]=s(a[T-3]^a[T-8]^a[T-14]^a[T-16],1);var v=h(h(s(o,5),C(T,r,E,g)),h(h(m,a[T]),R(T)));m=g,g=E,E=s(r,30),r=o,o=v}o=h(o,p),r=h(r,d),E=h(E,n),g=h(g,l),m=h(m,c)}return Array(o,r,E,g,m)}function C(S,f,a,o){return S<20?f&a|~f&o:S<40?f^a^o:S<60?f&a|f&o|a&o:f^a^o}function R(S){return S<20?1518500249:S<40?1859775393:S<60?-1894007588:-899497514}function h(S,f){var a=(S&65535)+(f&65535),o=(S>>16)+(f>>16)+(a>>16);return o<<16|a&65535}function s(S,f){return S<<f|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<z.length;B++){var W=z[B];i.hasOwnProperty(W)&&(H[W]=i[W])}H.rejectUnauthorized===!1&&!H.hasOwnProperty("secureOptions")&&(H.secureOptions=N("constants").SSL_OP_NO_TLSv1_2);var F=i.auth||_.auth;F&&(H.auth=F);var J=i.content||i.data,ee=I==="GET"||I==="HEAD"||i.dataAsQueryString;if(!i.content&&(J&&!(typeof J=="string"||u.isBuffer(J))))if(ee)J=i.nestedQuerystring?qs.stringify(J):querystring.stringify(J);else{var q=H.headers["Content-Type"]||H.headers["content-type"];q||(i.contentType==="json"?q="application/json":q="application/x-www-form-urlencoded",H.headers["Content-Type"]=q),parseContentType(q).type==="application/json"?J=(0,R.default)(J):J=i.nestedQuerystring?qs.stringify(J):querystring.stringify(J)}ee&&J&&(H.path+=(_.query?"&":"?")+J,J=null);var ye=0;if(J){var pe=J.length;u.isBuffer(J)||(pe=u.byteLength(J)),ye=H.headers["Content-Length"]=pe}i.dataType==="json"&&(H.headers.Accept="application/json"),typeof i.beforeRequest=="function"&&i.beforeRequest(H);var le=null,Oe=null,xe=null,ie=!1,se=!1,re=0,be=-1,Z=!1,te="",Ee="",ae=null;i.timing&&(ae={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function Y(){le&&(clearTimeout(le),le=null)}function X(){Oe&&(clearTimeout(Oe),Oe=null)}function Q(Ce,Ve,tt){if(X(),!L){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),b,k.pid,H.method,v),Ce&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),b,k.pid,Ce.name,Ce.message,Ce.stack);return}var He=L;L=null;var $e={};if(tt&&(be=tt.statusCode,$e=tt.headers),be===401&&$e["www-authenticate"]&&(!i.headers||!i.headers.Authorization)&&i.digestAuth){var Me=$e["www-authenticate"];if(Me.indexOf("Digest ")>=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}function m(p,d){var n=(this._rBlock>>>p^this._lBlock)&d;this._lBlock^=n,this._rBlock^=n<<p}u.DES=h._createHelper(E);var w=s.TripleDES=h.extend({_doReset:function(){var p=this._key,d=p.words;if(d.length!==2&&d.length!==4&&d.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >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<o;E+=2){var g=a[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<a;r++)o[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<o;E+=2){var g=S(a[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<a;r++)o[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<a;g++)s[S+g]^=E[g]}});return u.Decryptor=h,u}(),k.mode.CTRGladman})},"rAM+":function(N,$,P){"use strict";P.d($,"a",function(){return u});var k=P("Qw5x");function u(C,R){var h;if(typeof Symbol=="undefined"||C[Symbol.iterator]==null){if(Array.isArray(C)||(h=Object(k.a)(C))||R&&C&&typeof C.length=="number"){h&&(C=h);var s=0,S=function(){};return{s:S,n:function(){return s>=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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},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<arguments.length;b++){x=arguments[b];for(y in x)Object.prototype.hasOwnProperty.call(x,y)&&(A[y]=x[y])}return A}function T(A,b){const x=A.replace(/\|/g,(I,j,M)=>{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.length<b;)y.push("");for(;_<y.length;_++)y[_]=y[_].trim().replace(/\\\|/g,"|");return y}function v(A,b,x){const y=A.length;if(y===0)return"";let _=0;for(;_<y;){const I=A.charAt(y-_-1);if(I===b&&!x)_++;else if(I!==b&&x)_++;else break}return A.substr(0,y-_)}function i(A,b){if(A.indexOf(b[1])===-1)return-1;const x=A.length;let y=0,_=0;for(;_<x;_++)if(A[_]==="\\")_++;else if(A[_]===b[0])y++;else if(A[_]===b[1]&&(y--,y<0))return _;return-1}function L(A){A&&A.sanitize&&!A.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}N.exports={escape:s,unescape:f,edit:o,cleanUrl:g,resolveUrl:n,noopTest:l,merge:c,splitCells:T,rtrim:v,findClosingBracket:i,checkSanitizeDeprecation:L}},rWjI:function(N,$,P){"use strict";P.r($),P.d($,"Types",function(){return $t});var k=P("P2fV"),u=P("NJEC"),C=P("CiB2"),R=P("DYRE"),h=P("zeV3"),s=P("sRBo"),S=P("kaz8"),f=P("7Kak"),a=P("9yH6"),o=P("giR+"),r=P("fyUT"),E=P("OaEy"),g=P("2fM7"),m=P("oBTY"),w=P("rAM+"),p=P("T2oS"),d=P("W9HT"),n=P("g9YV"),l=P("wCAj"),c=P("+L6B"),T=P("2/Rp"),v=P("14J3"),i=P("BMrR"),L=P("jCWc"),A=P("kPKH"),b=P("miYZ"),x=P("tsqr"),y=P("9og8"),_=P("y8nQ"),I=P("Vl3Y"),j=P("tJVT"),M=P("k1fw"),G=P("fu2T"),K=P("gK9i"),H=P("2qtc"),z=P("kLXV"),B=P("5NDa"),W=P("5rEg"),F=P("WmNS"),J=P.n(F),ee=P("q1tI"),q=P.n(ee),ye=P("eRFJ"),pe=P.n(ye),le=P("jrin"),Oe,xe=g.a.Option,ie;(function(gt){gt[gt.language=0]="language",gt[gt.difficulty=1]="difficulty",gt[gt.category=2]="category",gt[gt.openOrNot=3]="openOrNot"})(ie||(ie={}));var se=(Oe={},Object(le.a)(Oe,ie.language,[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"},{title:"JavaScript",key:"JavaScript"},{title:"Ruby",key:"Ruby"}]),Object(le.a)(Oe,ie.difficulty,[{title:"\u7B80\u5355",key:1},{title:"\u9002\u4E2D",key:2},{title:"\u56F0\u96BE",key:3}]),Object(le.a)(Oe,ie.category,[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}]),Object(le.a)(Oe,ie.openOrNot,[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]),Oe);function re(gt){return se[gt].map(function(Ct){return q.a.createElement(xe,{key:Ct.title,value:Ct.key}," ",Ct.title," ")})}function be(gt,Ct){gt.map(function(dt){var or=dt.id,Mr=dt.name,jt=dt.sub_disciplines,Rt={value:or,label:Mr};Ct.push(Rt),jt&&jt.length>0&&(Rt.children=[],be(jt,Rt.children))})}function Z(gt,Ct){for(var dt=[],or=0;or<gt.length;or++){var Mr,jt=gt[or];if(((Mr=jt.sub_disciplines)===null||Mr===void 0?void 0:Mr.length)>0){dt[0]=jt.id;for(var Rt=0;Rt<jt.sub_disciplines.length;Rt++){var Ar=jt.sub_disciplines[Rt];if(Ar.id===Ct)return dt[1]=Ar.id,[dt,Ar.tag_disciplines||Ar.sub_disciplines||[]]}}}return[dt,[]]}var te=P("Ty5D"),Ee=P("9kvl"),ae=P("J66h"),Y=P("GIiI"),X=P("2BaD"),Q=P("Ot1p"),he=P("ErOA");function ce(gt){return Object(he.f)("practices.json",gt)}function Se(){return Object(he.c)("problems/new.json")}function Ke(gt){return Object(he.c)("practices/".concat(gt,"/edit.json"))}function Ge(gt,Ct){return Object(he.g)("practices/".concat(gt),Ct)}function Ye(gt,Ct){return Object(he.f)("exercises/".concat(gt,"/exercise_questions.json"),Ct)}function Qe(gt,Ct){return Object(he.g)("exercise_questions/".concat(gt,".json"),Ct)}var rt=P("cDPC"),qe=P("bbsP"),Le=P("/wGt"),Ce=P("0Owb"),Ve=P("ZW9T"),tt=P("ZD9Y"),He=P("M8RZ"),$e=P("bCnd"),Me=P("1T2W"),De=P.n(Me),Te={theme:Object($e.a)("cmCodeMode","vs-dark"),fontSize:Object($e.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object($e.a)("cmTabToSpace",!0)},de;(function(gt){gt[gt.set_font_size=0]="set_font_size",gt[gt.set_theme=1]="set_theme",gt[gt.on_tab_to_space=2]="on_tab_to_space",gt[gt.set_show_editor_setting=3]="set_show_editor_setting"})(de||(de={}));function ge(gt,Ct){switch(Ct.type){case de.set_show_editor_setting:return Object(M.a)(Object(M.a)({},gt),{},{showEditorSetting:Ct.payload});case de.set_theme:return Object(M.a)(Object(M.a)({},gt),{},{theme:Ct.payload});case de.set_font_size:return Object(M.a)(Object(M.a)({},gt),{},{fontSize:Ct.payload});case de.on_tab_to_space:return Object(M.a)(Object(M.a)({},gt),{},{tabToSpace:Ct.payload});default:throw new Error}}var we=function(gt){var Ct=gt.value,dt=gt.onChange,or=gt.language,Mr=gt.onLanguage,jt=gt.languageItems,Rt=gt.ActionBarRender,Ar=Rt===void 0?function(Dr){return q.a.createElement(_e,{languageItems:jt,onLanguage:Mr,language:or,onShowCodeSetting:Dr})}:Rt,dn=Object(ee.useReducer)(ge,Te),Sr=Object(j.a)(dn,2),st=Sr[0],Ot=Sr[1],jr=st.theme,$r=st.fontSize,ft=st.showEditorSetting,gn=st.tabToSpace;console.log(Ct,or,"value");var Zr={onFontSizeChange:function(sr){Ot({type:de.set_font_size,payload:sr}),Object($e.b)("cmFontSize",sr)},tabToSpace:gn,cmFontSize:$r,className:"oj",cmCodeMode:jr,onTabToSpace:function(sr){Ot({type:de.on_tab_to_space,payload:sr}),Object($e.b)("cmTabToSpace",sr)},onCodeModeChange:function(sr){Ot({type:de.set_theme,payload:sr}),Object($e.b)("cmCodeMode",sr)}};function St(){Ot({type:de.set_show_editor_setting,payload:!1})}function kr(){Ot({type:de.set_show_editor_setting,payload:!0})}var Ur={value:Ct,language:or,onChange:dt,theme:jr,height:"calc(100% - 56px)",options:{fontSize:$r,insertSpaces:gn}};return q.a.createElement(ee.Fragment,null,q.a.createElement("div",{className:De.a["code-panel-container"]},Ar(kr),q.a.createElement(Ve.b,Object(Ce.a)({key:or},Ur))),q.a.createElement(He.a,null,q.a.createElement(Le.a,{className:"oj",title:null,placement:"right",closable:!1,visible:ft,onClose:St},q.a.createElement(tt.a,Zr))))};function _e(gt){var Ct=gt.languageItems,dt=gt.language,or=gt.onShowCodeSetting,Mr=gt.onLanguage;return q.a.createElement("div",{className:De.a["action-oj-bar"]},Ct==null?void 0:Ct.map(function(jt){return q.a.createElement("div",{className:dt===(jt==null?void 0:jt.language)?De.a.active:"",onClick:function(){return Mr(jt==null?void 0:jt.language)},key:jt==null?void 0:jt.language},jt==null?void 0:jt.language)}),q.a.createElement("a",{onClick:or},q.a.createElement("i",{className:"iconfont icon-shezhi"})))}var Ue=P("Znn+"),Xe=P("ZTPi"),at=P("L9qf"),ut=P.n(at),mt=function(Ct){var dt=Ct.visible,or=Ct.onOK,Mr=Ct.onCancel,jt=Object(ee.useState)(!1),Rt=Object(j.a)(jt,2),Ar=Rt[0],dn=Rt[1],Sr=Object(ee.useState)(!1),st=Object(j.a)(Sr,2),Ot=st[0],jr=st[1],$r=Object(ee.useState)("1"),ft=Object(j.a)($r,2),gn=ft[0],Zr=ft[1],St=Object(ee.useState)(""),kr=Object(j.a)(St,2),Ur=kr[0],Dr=kr[1],sr=Object(ee.useState)([]),wn=Object(j.a)(sr,2),Lt=wn[0],nt=wn[1],wt=function(){var tr=Object(y.a)(J.a.mark(function lr(){var Rr;return J.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:if(Ur){Ut.next=3;break}return x.b.warn("\u9898\u76EE".concat(fr,"\u4E0D\u80FD\u4E3A\u7A7A")),Ut.abrupt("return");case 3:return jr(!0),Ut.next=6,Object(he.a)("/api/tag_disciplines.json",{method:"post",body:{target:dt,name:Ur}});case 6:if(Rr=Ut.sent,!((Rr==null?void 0:Rr.status)===0)){Ut.next=10;break}return or(),Ut.abrupt("return");case 10:jr(!1);case 11:case"end":return Ut.stop()}},lr)}));return function(){return tr.apply(this,arguments)}}(),Mt=function(){var tr=Object(y.a)(J.a.mark(function lr(){var Rr,zt,Ut=arguments;return J.a.wrap(function(Cr){for(;;)switch(Cr.prev=Cr.next){case 0:return Rr=Ut.length>0&&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;E<o.length;E+=1){if(!r)return null;var g=o[E];r=r[g]}return r}function h(f){var a=[],o={};return f.forEach(function(r){for(var E=r||{},g=E.key,m=E.dataIndex,w=g||C(m).join("-")||u;o[w];)w="".concat(w,"_next");o[w]=!0,a.push(w)}),a}function s(){var f={};function a(g,m){m&&Object.keys(m).forEach(function(w){var p=m[w];p&&Object(k.a)(p)==="object"?(g[w]=g[w]||{},a(g[w],p)):g[w]=p})}for(var o=arguments.length,r=new Array(o),E=0;E<o;E++)r[E]=arguments[E];return r.forEach(function(g){a(f,g)}),f}function S(f){return f!=null}},sboe:function(N,$,P){"use strict";P.d($,"a",function(){return C});var k=P("q1tI"),u=P.n(k),C=k.createContext(null)},t23M:function(N,$,P){"use strict";var k=P("VTBJ"),u=P("1OyB"),C=P("vuIU"),R=P("Ji7U"),h=P("LK+K"),s=P("q1tI"),S=P.n(s),f=P("m+aA"),a=P("Zm9Q"),o=P("Kwbf"),r=P("c+Xe"),E=P("bdgK"),g="rc-observer-key",m=function(w){Object(R.a)(d,w);var p=Object(h.a)(d);function d(){var n;return Object(u.a)(this,d),n=p.apply(this,arguments),n.resizeObserver=null,n.childNode=null,n.currentElement=null,n.state={width:0,height:0,offsetHeight:0,offsetWidth:0},n.onResize=function(l){var c=n.props.onResize,T=l[0].target,v=T.getBoundingClientRect(),i=v.width,L=v.height,A=T.offsetWidth,b=T.offsetHeight,x=Math.floor(i),y=Math.floor(L);if(n.state.width!==x||n.state.height!==y||n.state.offsetWidth!==A||n.state.offsetHeight!==b){var _={width:x,height:y,offsetWidth:A,offsetHeight:b};n.setState(_),c&&Promise.resolve().then(function(){c(Object(k.a)(Object(k.a)({},_),{},{offsetWidth:A,offsetHeight:b}))})}},n.setChildNode=function(l){n.childNode=l},n}return Object(C.a)(d,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var l=this.props.disabled;if(l){this.destroyObserver();return}var c=Object(f.a)(this.childNode||this),T=c!==this.currentElement;T&&(this.destroyObserver(),this.currentElement=c),!this.resizeObserver&&c&&(this.resizeObserver=new E.default(this.onResize),this.resizeObserver.observe(c))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var l=this.props.children,c=Object(a.a)(l);if(c.length>1)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);w<p;w++)d[w]=m[w].fn;return d},o.prototype.listenerCount=function(E){var g=h?h+E:E,m=this._events[g];return m?m.fn?1:m.length:0},o.prototype.emit=function(E,g,m,w,p,d){var n=h?h+E:E;if(!this._events[n])return!1;var l=this._events[n],c=arguments.length,T,v;if(l.fn){l.once&&this.removeListener(E,l.fn,void 0,!0);switch(c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,g),!0;case 3:return l.fn.call(l.context,g,m),!0;case 4:return l.fn.call(l.context,g,m,w),!0;case 5:return l.fn.call(l.context,g,m,w,p),!0;case 6:return l.fn.call(l.context,g,m,w,p,d),!0}for(v=1,T=new Array(c-1);v<c;v++)T[v-1]=arguments[v];l.fn.apply(l.context,T)}else{var i=l.length,L;for(v=0;v<i;v++){l[v].once&&this.removeListener(E,l[v].fn,void 0,!0);switch(c){case 1:l[v].fn.call(l[v].context);break;case 2:l[v].fn.call(l[v].context,g);break;case 3:l[v].fn.call(l[v].context,g,m);break;case 4:l[v].fn.call(l[v].context,g,m,w);break;default:if(!T)for(L=1,T=new Array(c-1);L<c;L++)T[L-1]=arguments[L];l[v].fn.apply(l[v].context,T)}}}return!0},o.prototype.on=function(E,g,m){return f(this,E,g,m,!1)},o.prototype.once=function(E,g,m){return f(this,E,g,m,!0)},o.prototype.removeListener=function(E,g,m,w){var p=h?h+E:E;if(!this._events[p])return this;if(!g)return a(this,p),this;var d=this._events[p];if(d.fn)d.fn===g&&(!w||d.once)&&(!m||d.context===m)&&a(this,p);else{for(var n=0,l=[],c=d.length;n<c;n++)(d[n].fn!==g||w&&!d[n].once||m&&d[n].context!==m)&&l.push(d[n]);l.length?this._events[p]=l.length===1?l[0]:l:a(this,p)}return this},o.prototype.removeAllListeners=function(E){var g;return E?(g=h?h+E:E,this._events[g]&&a(this,g)):(this._events=new s,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=h,o.EventEmitter=o,k.exports=o},"./node_modules/url-toolkit/src/url-toolkit.js":function(k,u,C){(function(R){var h=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,s=/^([^\/?#]*)([^]*)$/,S=/(?:\/|^)\.(?=\/)/g,f=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(o,r,E){if(E=E||{},o=o.trim(),r=r.trim(),!r){if(!E.alwaysNormalize)return o;var g=a.parseURL(o);if(!g)throw new Error("Error trying to parse base URL.");return g.path=a.normalizePath(g.path),a.buildURLFromParts(g)}var m=a.parseURL(r);if(!m)throw new Error("Error trying to parse relative URL.");if(m.scheme)return E.alwaysNormalize?(m.path=a.normalizePath(m.path),a.buildURLFromParts(m)):r;var w=a.parseURL(o);if(!w)throw new Error("Error trying to parse base URL.");if(!w.netLoc&&w.path&&w.path[0]!=="/"){var p=s.exec(w.path);w.netLoc=p[1],w.path=p[2]}w.netLoc&&!w.path&&(w.path="/");var d={scheme:w.scheme,netLoc:m.netLoc,path:null,params:m.params,query:m.query,fragment:m.fragment};if(!m.netLoc&&(d.netLoc=w.netLoc,m.path[0]!=="/"))if(!m.path)d.path=w.path,m.params||(d.params=w.params,m.query||(d.query=w.query));else{var n=w.path,l=n.substring(0,n.lastIndexOf("/")+1)+m.path;d.path=a.normalizePath(l)}return d.path===null&&(d.path=E.alwaysNormalize?a.normalizePath(m.path):m.path),a.buildURLFromParts(d)},parseURL:function(o){var r=h.exec(o);return r?{scheme:r[1]||"",netLoc:r[2]||"",path:r[3]||"",params:r[4]||"",query:r[5]||"",fragment:r[6]||""}:null},normalizePath:function(o){for(o=o.split("").reverse().join("").replace(S,"");o.length!==(o=o.replace(f,"")).length;);return o.split("").reverse().join("")},buildURLFromParts:function(o){return o.scheme+o.netLoc+o.path+o.params+o.query+o.fragment}};k.exports=a})(this)},"./node_modules/webworkify-webpack/index.js":function(k,u,C){function R(E){var g={};function m(p){if(g[p])return g[p].exports;var d=g[p]={i:p,l:!1,exports:{}};return E[p].call(d.exports,d,d.exports,m),d.l=!0,d.exports}m.m=E,m.c=g,m.i=function(p){return p},m.d=function(p,d,n){m.o(p,d)||Object.defineProperty(p,d,{configurable:!1,enumerable:!0,get:n})},m.r=function(p){Object.defineProperty(p,"__esModule",{value:!0})},m.n=function(p){var d=p&&p.__esModule?function(){return p.default}:function(){return p};return m.d(d,"a",d),d},m.o=function(p,d){return Object.prototype.hasOwnProperty.call(p,d)},m.p="/",m.oe=function(p){throw console.error(p),p};var w=m(m.s=ENTRY_MODULE);return w.default||w}var h="[\\.|\\-|\\+|\\w|/|@]+",s="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+h+").*?\\)";function S(E){return(E+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function f(E){return!isNaN(1*E)}function a(E,g,m){var w={};w[m]=[];var p=g.toString(),d=p.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!d)return w;for(var n=d[1],l=new RegExp("(\\\\n|\\W)"+S(n)+s,"g"),c;c=l.exec(p);){if(c[3]==="dll-reference")continue;w[m].push(c[3])}for(l=new RegExp("\\("+S(n)+'\\("(dll-reference\\s('+h+'))"\\)\\)'+s,"g");c=l.exec(p);)E[c[2]]||(w[m].push(c[1]),E[c[2]]=C(c[1]).m),w[c[2]]=w[c[2]]||[],w[c[2]].push(c[4]);for(var T=Object.keys(w),v=0;v<T.length;v++)for(var i=0;i<w[T[v]].length;i++)f(w[T[v]][i])&&(w[T[v]][i]=1*w[T[v]][i]);return w}function o(E){var g=Object.keys(E);return g.reduce(function(m,w){return m||E[w].length>0},!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<d.length;n++){var l=d[n],c=m[l],T=c.pop();if(p[l]=p[l]||{},p[l][T]||!E[l][T])continue;p[l][T]=!0,w[l]=w[l]||[],w[l].push(T);for(var v=a(E,E[l][T],l),i=Object.keys(v),L=0;L<i.length;L++)m[i[L]]=m[i[L]]||[],m[i[L]]=m[i[L]].concat(v[i[L]])}return w}k.exports=function(E,g){g=g||{};var m={main:C.m},w=g.all?{main:Object.keys(m.main)}:r(m,E),p="";Object.keys(w).filter(function(T){return T!=="main"}).forEach(function(T){for(var v=0;w[T][v];)v++;w[T].push(v),m[T][v]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",p=p+"var "+T+" = ("+R.toString().replace("ENTRY_MODULE",JSON.stringify(v))+")({"+w[T].map(function(i){return""+JSON.stringify(i)+": "+m[T][i].toString()}).join(",")+`});
`}),p=p+"new (("+R.toString().replace("ENTRY_MODULE",JSON.stringify(E))+")({"+w.main.map(function(T){return""+JSON.stringify(T)+": "+m.main[T].toString()}).join(",")+"}))(self);";var d=new window.Blob([p],{type:"text/javascript"});if(g.bare)return d;var n=window.URL||window.webkitURL||window.mozURL||window.msURL,l=n.createObjectURL(d),c=new window.Worker(l);return c.objectURL=l,c}},"./src/config.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"hlsDefaultConfig",function(){return L}),C.d(u,"mergeConfig",function(){return b}),C.d(u,"enableStreamingMode",function(){return x});var R=C("./src/controller/abr-controller.ts"),h=C("./src/controller/audio-stream-controller.ts"),s=C("./src/controller/audio-track-controller.ts"),S=C("./src/controller/subtitle-stream-controller.ts"),f=C("./src/controller/subtitle-track-controller.ts"),a=C("./src/controller/buffer-controller.ts"),o=C("./src/controller/timeline-controller.ts"),r=C("./src/controller/cap-level-controller.ts"),E=C("./src/controller/fps-controller.ts"),g=C("./src/controller/eme-controller.ts"),m=C("./src/controller/cmcd-controller.ts"),w=C("./src/utils/xhr-loader.ts"),p=C("./src/utils/fetch-loader.ts"),d=C("./src/utils/cues.ts"),n=C("./src/utils/mediakeys-helper.ts"),l=C("./src/utils/logger.ts");function c(){return c=Object.assign||function(y){for(var _=1;_<arguments.length;_++){var I=arguments[_];for(var j in I)Object.prototype.hasOwnProperty.call(I,j)&&(y[j]=I[j])}return y},c.apply(this,arguments)}function T(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 v(y){for(var _=1;_<arguments.length;_++){var I=arguments[_]!=null?arguments[_]:{};_%2?T(Object(I),!0).forEach(function(j){i(y,j,I[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(I)):T(Object(I)).forEach(function(j){Object.defineProperty(y,j,Object.getOwnPropertyDescriptor(I,j))})}return y}function i(y,_,I){return _ in y?Object.defineProperty(y,_,{value:I,enumerable:!0,configurable:!0,writable:!0}):y[_]=I,y}var L=v(v({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:w.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:R.default,bufferController:a.default,capLevelController:r.default,fpsController:E.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:n.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},A()),{},{subtitleStreamController:S.SubtitleStreamController,subtitleTrackController:f.default,timelineController:o.TimelineController,audioStreamController:h.default,audioTrackController:s.default,emeController:g.default,cmcdController:m.default});function A(){return{cueHandler:d.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function b(y,_){if((_.liveSyncDurationCount||_.liveMaxLatencyDurationCount)&&(_.liveSyncDuration||_.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(_.liveMaxLatencyDurationCount!==void 0&&(_.liveSyncDurationCount===void 0||_.liveMaxLatencyDurationCount<=_.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(_.liveMaxLatencyDuration!==void 0&&(_.liveSyncDuration===void 0||_.liveMaxLatencyDuration<=_.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return c({},y,_)}function x(y){var _=y.loader;if(_!==p.default&&_!==w.default)l.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),y.progressive=!1;else{var I=Object(p.fetchSupported)();I&&(y.loader=p.default,y.progressive=!0,y.enableSoftwareAES=!0,l.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(k,u,C){"use strict";C.r(u);var R=C("./src/polyfills/number.ts"),h=C("./src/utils/ewma-bandwidth-estimator.ts"),s=C("./src/events.ts"),S=C("./src/utils/buffer-helper.ts"),f=C("./src/errors.ts"),a=C("./src/types/loader.ts"),o=C("./src/utils/logger.ts");function r(m,w){for(var p=0;p<w.length;p++){var d=w[p];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(m,d.key,d)}}function E(m,w,p){return w&&r(m.prototype,w),p&&r(m,p),m}var g=function(){function m(p){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=p;var d=p.config;this.bwEstimator=new h.default(d.abrEwmaSlowVoD,d.abrEwmaFastVoD,d.abrEwmaDefaultEstimate),this.registerListeners()}var w=m.prototype;return w.registerListeners=function(){var d=this.hls;d.on(s.Events.FRAG_LOADING,this.onFragLoading,this),d.on(s.Events.FRAG_LOADED,this.onFragLoaded,this),d.on(s.Events.FRAG_BUFFERED,this.onFragBuffered,this),d.on(s.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.on(s.Events.ERROR,this.onError,this)},w.unregisterListeners=function(){var d=this.hls;d.off(s.Events.FRAG_LOADING,this.onFragLoading,this),d.off(s.Events.FRAG_LOADED,this.onFragLoaded,this),d.off(s.Events.FRAG_BUFFERED,this.onFragBuffered,this),d.off(s.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.off(s.Events.ERROR,this.onError,this)},w.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},w.onFragLoading=function(d,n){var l=n.frag;if(l.type===a.PlaylistLevelType.MAIN&&!this.timer){var c;this.fragCurrent=l,this.partCurrent=(c=n.part)!=null?c:null,this.timer=self.setInterval(this.onCheck,100)}},w.onLevelLoaded=function(d,n){var l=this.hls.config;n.details.live?this.bwEstimator.update(l.abrEwmaSlowLive,l.abrEwmaFastLive):this.bwEstimator.update(l.abrEwmaSlowVoD,l.abrEwmaFastVoD)},w._abandonRulesCheck=function(){var d=this.fragCurrent,n=this.partCurrent,l=this.hls,c=l.autoLevelEnabled,T=l.config,v=l.media;if(!d||!v)return;var i=n?n.stats:d.stats,L=n?n.duration:d.duration;if(i.aborted){o.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!c||v.paused||!v.playbackRate||!v.readyState)return;var A=performance.now()-i.loading.start,b=Math.abs(v.playbackRate);if(A<=500*L/b)return;var x=l.levels,y=l.minAutoLevel,_=x[d.level],I=i.total||Math.max(i.loaded,Math.round(L*_.maxBitrate/8)),j=Math.max(1,i.bwEstimate?i.bwEstimate/8:i.loaded*1e3/A),M=(I-i.loaded)/j,G=v.currentTime,K=(S.BufferHelper.bufferInfo(v,G,T.maxBufferHole).end-G)/b;if(K>=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<K)break}if(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||W<c))return M}return-1},E(m,[{key:"nextAutoLevel",get:function(){var d=this._nextAutoLevel,n=this.bwEstimator;if(d!==-1&&(!n||!n.canEstimate()))return d;var l=this.getNextABRAutoLevel();return d!==-1&&(l=Math.min(d,l)),l},set:function(d){this._nextAutoLevel=d}}]),m}();u.default=g},"./src/controller/audio-stream-controller.ts":function(k,u,C){"use strict";C.r(u);var R=C("./src/polyfills/number.ts"),h=C("./src/controller/base-stream-controller.ts"),s=C("./src/events.ts"),S=C("./src/utils/buffer-helper.ts"),f=C("./src/controller/fragment-tracker.ts"),a=C("./src/types/level.ts"),o=C("./src/types/loader.ts"),r=C("./src/loader/fragment.ts"),E=C("./src/demux/chunk-cache.ts"),g=C("./src/demux/transmuxer-interface.ts"),m=C("./src/types/transmuxer.ts"),w=C("./src/controller/fragment-finders.ts"),p=C("./src/utils/discontinuities.ts"),d=C("./src/errors.ts"),n=C("./src/utils/logger.ts");function l(){return l=Object.assign||function(L){for(var A=1;A<arguments.length;A++){var b=arguments[A];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(L[x]=b[x])}return L},l.apply(this,arguments)}function c(L,A){L.prototype=Object.create(A.prototype),L.prototype.constructor=L,T(L,A)}function T(L,A){return T=Object.setPrototypeOf||function(x,y){return x.__proto__=y,x},T(L,A)}var v=100,i=function(L){c(A,L);function A(x,y){var _;return _=L.call(this,x,y,"[audio-stream-controller]")||this,_.videoBuffer=null,_.videoTrackCC=-1,_.waitingVideoCC=-1,_.audioSwitch=!1,_.trackId=-1,_.waitingData=null,_.mainDetails=null,_.bufferFlushed=!1,_._registerListeners(),_}var b=A.prototype;return b.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},b._registerListeners=function(){var y=this.hls;y.on(s.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.on(s.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.on(s.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.on(s.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(s.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),y.on(s.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.on(s.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),y.on(s.Events.ERROR,this.onError,this),y.on(s.Events.BUFFER_RESET,this.onBufferReset,this),y.on(s.Events.BUFFER_CREATED,this.onBufferCreated,this),y.on(s.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.on(s.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),y.on(s.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b._unregisterListeners=function(){var y=this.hls;y.off(s.Events.MEDIA_ATTACHED,this.onMediaAttached,this),y.off(s.Events.MEDIA_DETACHING,this.onMediaDetaching,this),y.off(s.Events.MANIFEST_LOADING,this.onManifestLoading,this),y.off(s.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(s.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),y.off(s.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),y.off(s.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),y.off(s.Events.ERROR,this.onError,this),y.off(s.Events.BUFFER_RESET,this.onBufferReset,this),y.off(s.Events.BUFFER_CREATED,this.onBufferCreated,this),y.off(s.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),y.off(s.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),y.off(s.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b.onInitPtsFound=function(y,_){var I=_.frag,j=_.id,M=_.initPTS;if(j==="main"){var G=I.cc;this.initPTS[I.cc]=M,this.log("InitPTS for cc: "+G+" found from main: "+M),this.videoTrackCC=G,this.state===h.State.WAITING_INIT_PTS&&this.tick()}},b.startLoad=function(y){if(!this.levels){this.startPosition=y,this.state=h.State.STOPPED;return}var _=this.lastCurrentTime;this.stopLoad(),this.setInterval(v),this.fragLoadError=0,_>0&&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&&pe<q&&((B.end>q||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<m.length;w++){var p=m[w];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(g,p.key,p)}}function a(g,m,w){return m&&f(g.prototype,m),w&&f(g,w),g}function o(g,m){g.prototype=Object.create(m.prototype),g.prototype.constructor=g,r(g,m)}function r(g,m){return r=Object.setPrototypeOf||function(p,d){return p.__proto__=d,p},r(g,m)}var E=function(g){o(m,g);function m(p){var d;return d=g.call(this,p,"[audio-track-controller]")||this,d.tracks=[],d.groupId=null,d.tracksInGroup=[],d.trackId=-1,d.trackName="",d.selectDefaultTrack=!0,d.registerListeners(),d}var w=m.prototype;return w.registerListeners=function(){var d=this.hls;d.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.on(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.on(R.Events.LEVEL_LOADING,this.onLevelLoading,this),d.on(R.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),d.on(R.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),d.on(R.Events.ERROR,this.onError,this)},w.unregisterListeners=function(){var d=this.hls;d.off(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.off(R.Events.LEVEL_LOADING,this.onLevelLoading,this),d.off(R.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),d.off(R.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),d.off(R.Events.ERROR,this.onError,this)},w.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,g.prototype.destroy.call(this)},w.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},w.onManifestParsed=function(d,n){this.tracks=n.audioTracks||[]},w.onAudioTrackLoaded=function(d,n){var l=n.id,c=n.details,T=this.tracksInGroup[l];if(!T){this.warn("Invalid audio track id "+l);return}var v=T.details;T.details=n.details,this.log("audioTrack "+l+" loaded ["+c.startSN+"-"+c.endSN+"]"),l===this.trackId&&(this.retryCount=0,this.playlistLoaded(l,n,v))},w.onLevelLoading=function(d,n){this.switchLevel(n.level)},w.onLevelSwitching=function(d,n){this.switchLevel(n.level)},w.switchLevel=function(d){var n=this.hls.levels[d];if(!(n!=null&&n.audioGroupIds))return;var l=n.audioGroupIds[n.urlId];if(this.groupId!==l){this.groupId=l;var c=this.tracks.filter(function(v){return!l||v.groupId===l});this.selectDefaultTrack&&!c.some(function(v){return v.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=c;var T={audioTracks:c};this.log("Updating audio tracks, "+c.length+' track(s) found in "'+l+'" group-id'),this.hls.trigger(R.Events.AUDIO_TRACKS_UPDATED,T),this.selectInitialTrack()}},w.onError=function(d,n){if(g.prototype.onError.call(this,d,n),n.fatal||!n.context)return;n.context.type===S.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},w.setAudioTrack=function(d){var n=this.tracksInGroup;if(d<0||d>=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;l<n.length;l++){var c=n[l];if((!this.selectDefaultTrack||c.default)&&(!d||d===c.name))return c.id}return-1},w.loadPlaylist=function(d){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var l=n.id,c=n.groupId,T=n.url;if(d)try{T=d.addDirectives(T)}catch(v){this.warn("Could not construct new URL with HLS Delivery Directives: "+v)}this.log("loading audio-track playlist for id: "+l),this.clearTimer(),this.hls.trigger(R.Events.AUDIO_TRACK_LOADING,{url:T,id:l,groupId:c,deliveryDirectives:d||null})}},a(m,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(d){this.selectDefaultTrack=!1,this.setAudioTrack(d)}}]),m}(s.default);u.default=E},"./src/controller/base-playlist-controller.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"default",function(){return a});var R=C("./src/polyfills/number.ts"),h=C("./src/types/level.ts"),s=C("./src/controller/level-helper.ts"),S=C("./src/utils/logger.ts"),f=C("./src/errors.ts"),a=function(){function o(E,g){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=S.logger.log.bind(S.logger,g+":"),this.warn=S.logger.warn.bind(S.logger,g+":"),this.hls=E}var r=o.prototype;return r.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},r.onError=function(g,m){m.fatal&&m.type===f.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},r.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},r.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},r.stopLoad=function(){this.canLoad=!1,this.clearTimer()},r.switchParams=function(g,m){var w=m==null?void 0:m.renditionReports;if(w)for(var p=0;p<w.length;p++){var d=w[p],n=""+d.URI;if(n===g.substr(-n.length)){var l=parseInt(d["LAST-MSN"]),c=parseInt(d["LAST-PART"]);if(m&&this.hls.config.lowLatencyMode){var T=Math.min(m.age-m.partTarget,m.targetduration);c!==void 0&&T>m.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<w.levelLoadingMaxRetry;if(p){var d;if(this.retryCount++,g.details.indexOf("LoadTimeOut")>-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;_<y.length;_++){var I=y[_];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(x,I.key,I)}}function T(x,y,_){return y&&c(x.prototype,y),_&&c(x,_),x}function v(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function i(x,y){x.prototype=Object.create(y.prototype),x.prototype.constructor=x,L(x,y)}function L(x,y){return L=Object.setPrototypeOf||function(I,j){return I.__proto__=j,I},L(x,y)}var A={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},b=function(x){i(y,x);function y(I,j,M){var G;return G=x.call(this)||this,G.hls=void 0,G.fragPrevious=null,G.fragCurrent=null,G.fragmentTracker=void 0,G.transmuxer=null,G._state=A.STOPPED,G.media=void 0,G.mediaBuffer=void 0,G.config=void 0,G.bitrateTest=!1,G.lastCurrentTime=0,G.nextLoadPosition=0,G.startPosition=0,G.loadedmetadata=!1,G.fragLoadError=0,G.retryDate=0,G.levels=null,G.fragmentLoader=void 0,G.levelLastLoaded=null,G.startFragRequested=!1,G.decrypter=void 0,G.initPTS=[],G.onvseeking=null,G.onvended=null,G.logPrefix="",G.log=void 0,G.warn=void 0,G.logPrefix=M,G.log=f.logger.log.bind(f.logger,M+":"),G.warn=f.logger.warn.bind(f.logger,M+":"),G.hls=I,G.fragmentLoader=new p.default(I.config),G.fragmentTracker=j,G.config=I.config,G.decrypter=new d.default(I,I.config),I.on(a.Events.KEY_LOADED,G.onKeyLoaded,v(G)),G}var _=y.prototype;return _.doTick=function(){this.onTickEnd()},_.onTickEnd=function(){},_.startLoad=function(j){},_.stopLoad=function(){this.fragmentLoader.abort();var j=this.fragCurrent;j&&this.fragmentTracker.removeFragment(j),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=A.STOPPED},_._streamEnded=function(j,M){var G=this.fragCurrent,K=this.fragmentTracker;if(!M.live&&G&&G.sn===M.endSN&&!j.nextStart){var H=K.getState(G);return H===s.FragmentState.PARTIAL||H===s.FragmentState.OK}return!1},_.onMediaAttached=function(j,M){var G=this.media=this.mediaBuffer=M.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),G.addEventListener("seeking",this.onvseeking),G.addEventListener("ended",this.onvended);var K=this.config;this.levels&&K.autoStartLoad&&this.state===A.STOPPED&&this.startLoad(K.startPosition)},_.onMediaDetaching=function(){var j=this.media;j!=null&&j.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),j&&(j.removeEventListener("seeking",this.onvseeking),j.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},_.onMediaSeeking=function(){var j=this.config,M=this.fragCurrent,G=this.media,K=this.mediaBuffer,H=this.state,z=G?G.currentTime:0,B=S.BufferHelper.bufferInfo(K||G,z,j.maxBufferHole);if(this.log("media seeking to "+(Object(R.isFiniteNumber)(z)?z.toFixed(3):z)+", state: "+H),H===A.ENDED)this.resetLoadingState();else if(M&&!B.len){var W=j.maxFragLookUpTolerance,F=M.start-W,J=M.start+M.duration+W,ee=z>J;(z<F||ee)&&(ee&&M.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),M.loader.abort()),this.resetLoadingState())}G&&(this.lastCurrentTime=z),!this.loadedmetadata&&!B.len&&(this.nextLoadPosition=this.startPosition=z),this.tickImmediate()},_.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},_.onKeyLoaded=function(j,M){if(this.state!==A.KEY_LOADING||M.frag!==this.fragCurrent||!this.levels)return;this.state=A.IDLE;var G=this.levels[M.frag.level].details;G&&this.loadFragment(M.frag,G,M.frag.start)},_.onHandlerDestroying=function(){this.stopLoad(),x.prototype.onHandlerDestroying.call(this)},_.onHandlerDestroyed=function(){this.state=A.STOPPED,this.hls.off(a.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,x.prototype.onHandlerDestroyed.call(this)},_.loadKey=function(j,M){this.log("Loading key for "+j.sn+" of ["+M.startSN+"-"+M.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+j.level),this.state=A.KEY_LOADING,this.fragCurrent=j,this.hls.trigger(a.Events.KEY_LOADING,{frag:j})},_.loadFragment=function(j,M,G){this._loadFragForPlayback(j,M,G)},_._loadFragForPlayback=function(j,M,G){var K=this,H=function(B){if(K.fragContextChanged(j)){K.warn("Fragment "+j.sn+(B.part?" p: "+B.part.index:"")+" of level "+j.level+" was dropped during download."),K.fragmentTracker.removeFragment(j);return}j.stats.chunkCount++,K._handleFragmentLoadProgress(B)};this._doFragLoad(j,M,G,H).then(function(z){if(!z)return;K.fragLoadError=0;var B=K.state;if(K.fragContextChanged(j)){(B===A.FRAG_LOADING||B===A.BACKTRACKING||!K.fragCurrent&&B===A.PARSING)&&(K.fragmentTracker.removeFragment(j),K.state=A.IDLE);return}if("payload"in z&&(K.log("Loaded fragment "+j.sn+" of level "+j.level),K.hls.trigger(a.Events.FRAG_LOADED,z),K.state===A.BACKTRACKING)){K.fragmentTracker.backtrack(j,z),K.resetFragmentLoading(j);return}K._handleFragmentLoadComplete(z)}).catch(function(z){K.warn(z),K.resetFragmentLoading(j)})},_.flushMainBuffer=function(j,M,G){if(G===void 0&&(G=null),!(j-M))return;var K={startOffset:j,endOffset:M,type:G};this.fragLoadError=0,this.hls.trigger(a.Events.BUFFER_FLUSHING,K)},_._loadInitSegment=function(j){var M=this;this._doFragLoad(j).then(function(G){if(!G||M.fragContextChanged(j)||!M.levels)throw new Error("init load aborted");return G}).then(function(G){var K=M.hls,H=G.payload,z=j.decryptdata;if(H&&H.byteLength>0&&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<z.end)return S.BufferHelper.bufferInfo(j,K,Math.max(H.nextStart,G.maxBufferHole))}return H},_.getMaxBufferLength=function(j){var M=this.config,G;return j?G=Math.max(8*M.maxBufferSize/j,M.maxBufferLength):G=M.maxBufferLength,Math.min(G,M.maxMaxBufferLength)},_.reduceMaxBufferLength=function(j){var M=this.config,G=j||M.maxBufferLength;return M.maxMaxBufferLength>=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<J)return this.warn("Not enough fragments to start playback (have: "+z+", need: "+J+")"),null;!M.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(F=this.getInitialLiveFragment(M,H),this.startPosition=F?this.hls.liveSyncPosition||F.start:j)}else j<=W&&(F=H[0]);if(!F){var ee=B.lowLatencyMode?M.partEnd:M.fragmentEnd;F=this.getFragmentAtPosition(j,ee,M)}return(G=F)!==null&&G!==void 0&&G.initSegment&&!((K=F)!==null&&K!==void 0&&K.initSegment.data)&&!this.bitrateTest&&(F=F.initSegment),F},_.getNextPart=function(j,M,G){for(var K=-1,H=!1,z=!0,B=0,W=j.length;B<W;B++){var F=j[B];if(z=z&&!F.independent,K>-1&&G<F.start)break;var J=F.loaded;!J&&(H||F.independent||z)&&F.fragment===M&&(K=B),H=J}return K},_.loadedEndOfParts=function(j,M){var G=j[j.length-1];return G&&M>G.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(j<M){var q=j>M-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<B&&this.fragmentTracker.getState(le)!==s.FragmentState.OK?(this.log("SN "+ee.sn+" just loaded, load next one: "+le.sn),ee=le):ee=null))}return ee},_.synchronizeToLiveEdge=function(j){var M=this.config,G=this.media;if(!G)return;var K=this.hls.liveSyncPosition,H=G.currentTime,z=j.fragments[0].start,B=j.edge,W=H>=z-M.maxFragLookUpTolerance&&H<=B;if(K!==null&&G.duration>K&&(H<K||!W)){var F=M.liveMaxLatencyDuration!==void 0?M.liveMaxLatencyDuration:M.liveMaxLatencyDurationCount*j.targetduration;(!W&&G.readyState<4||H<B-F)&&(this.loadedmetadata||(this.nextLoadPosition=K),G.readyState&&(this.warn("Playback: "+H.toFixed(3)+" is located too far from the end of live sliding playlist: "+B+", reset currentTime to : "+K.toFixed(3)),G.currentTime=K))}},_.alignPlaylists=function(j,M){var G=this.levels,K=this.levelLastLoaded,H=this.fragPrevious,z=K!==null?G[K]:null,B=j.fragments.length;if(!B)return this.warn("No fragments in live playlist"),0;var W=j.fragments[0].start,F=!M,J=j.alignedSliding&&Object(R.isFiniteNumber)(W);if(F||!J&&!W){Object(g.alignStream)(H,z,j);var ee=j.fragments[0].start;return this.log("Live playlist sliding: "+ee.toFixed(2)+" start-sn: "+(M?M.startSN:"na")+"->"+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<M&&(G=-1),G===-1||this.lastCurrentTime===-1){var K=j.startTimeOffset;Object(R.isFiniteNumber)(K)?(G=M+K,K<0&&(G+=j.totalduration),G=Math.min(Math.max(M,G),M+j.totalduration),this.log("Start time offset "+K+" found in playlist, adjust startPosition to "+G),this.startPosition=G):j.live?G=this.hls.liveSyncPosition||M:this.startPosition=G=0,this.lastCurrentTime=G}this.nextLoadPosition=G},_.getLoadPosition=function(){var j=this.media,M=0;return this.loadedmetadata&&j?M=j.currentTime:this.nextLoadPosition&&(M=this.nextLoadPosition),M},_.handleFragLoadAborted=function(j,M){this.transmuxer&&j.sn!=="initSegment"&&j.stats.aborted&&(this.warn("Fragment "+j.sn+(M?" part"+M.index:"")+" of level "+j.level+" was aborted"),this.resetFragmentLoading(j))},_.resetFragmentLoading=function(j){(!this.fragCurrent||!this.fragContextChanged(j))&&(this.state=A.IDLE)},_.onFragmentOrKeyLoadError=function(j,M){if(M.fatal)return;var G=M.frag;if(!G||G.type!==j)return;var K=this.fragCurrent;console.assert(K&&G.sn===K.sn&&G.level===K.level&&G.urlId===K.urlId,"Frag load error must match current frag to retry");var H=this.config;if(this.fragLoadError+1<=H.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(G.level))return;var z=Math.min(Math.pow(2,this.fragLoadError)*H.fragLoadingRetryDelay,H.fragLoadingMaxRetryTimeout);this.warn("Fragment "+G.sn+" of "+j+" "+G.level+" failed to load, retrying in "+z+"ms"),this.retryDate=self.performance.now()+z,this.fragLoadError++,this.state=A.FRAG_LOADING_WAITING_RETRY}else M.levelRetry?(j===l.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=A.IDLE):(f.logger.error(M.details+" reaches max retry, redispatch as fatal ..."),M.fatal=!0,this.hls.stopLoad(),this.state=A.ERROR)},_.afterBufferFlushed=function(j,M,G){if(!j)return;var K=S.BufferHelper.getBuffered(j);this.fragmentTracker.detectEvictedFragments(M,K,G),this.state===A.ENDED&&this.resetLoadingState()},_.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=A.IDLE},_.resetLiveStartWhenNotLoaded=function(j){if(!this.loadedmetadata){this.startFragRequested=!1;var M=this.levels?this.levels[j].details:null;if(M!=null&&M.live)return this.startPosition=-1,this.setStartPosition(M,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},_.updateLevelTiming=function(j,M,G,K){var H=this,z=G.details;console.assert(!!z,"level.details must be defined");var B=Object.keys(j.elementaryStreams).reduce(function(W,F){var J=j.elementaryStreams[F];if(J){var ee=J.endPTS-J.startPTS;if(ee<=0)return H.warn("Could not parse fragment "+j.sn+" "+F+" duration reliably ("+ee+") resetting transmuxer to fallback to playlist timing"),H.resetTransmuxer(),W||!1;var q=K?0:Object(w.updateFragPTSDTS)(z,j,J.startPTS,J.endPTS,J.startDTS,J.endDTS);return H.hls.trigger(a.Events.LEVEL_PTS_UPDATED,{details:z,level:G,drift:q,type:F,frag:j,start:J.startPTS,end:J.endPTS}),!0}return W},!1);B?(this.state=A.PARSED,this.hls.trigger(a.Events.FRAG_PARSED,{frag:j,part:M})):this.resetLoadingState()},_.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},T(y,[{key:"state",get:function(){return this._state},set:function(j){var M=this._state;M!==j&&(this._state=j,this.log(M+"->"+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;o<a.length;o++){var r=a[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(f,r.key,r)}}function s(f,a,o){return a&&h(f.prototype,a),o&&h(f,o),f}var S=function(){function f(o){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=o,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var a=f.prototype;return a.setStreamController=function(r){this.streamController=r},a.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},a.registerListeners=function(){var r=this.hls;r.on(R.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.on(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(R.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},a.unregisterListener=function(){var r=this.hls;r.off(R.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.off(R.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(R.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},a.onFpsDropLevelCapping=function(r,E){f.isLevelAllowed(E.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(E.droppedLevel)},a.onMediaAttaching=function(r,E){this.media=E.media instanceof HTMLVideoElement?E.media:null},a.onManifestParsed=function(r,E){var g=this.hls;this.restrictedLevels=[],this.firstLevel=E.firstLevel,g.config.capLevelToPlayerSize&&E.video&&this.startCapping()},a.onBufferCodecs=function(r,E){var g=this.hls;g.config.capLevelToPlayerSize&&E.video&&this.startCapping()},a.onMediaDetaching=function(){this.stopCapping()},a.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&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<r.length;p+=1){var d=r[p];if((d.width>=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<p.length;d++){var n=p[d];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(w,n.key,n)}}function a(w,p,d){return p&&f(w.prototype,p),d&&f(w,d),w}function o(w,p){var d=typeof Symbol!="undefined"&&w[Symbol.iterator]||w["@@iterator"];if(d)return(d=d.call(w)).next.bind(d);if(Array.isArray(w)||(d=r(w))||p&&w&&typeof w.length=="number"){d&&(w=d);var n=0;return function(){return n>=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);d<p;d++)n[d]=w[d];return n}function g(){return g=Object.assign||function(w){for(var p=1;p<arguments.length;p++){var d=arguments[p];for(var n in d)Object.prototype.hasOwnProperty.call(d,n)&&(w[n]=d[n])}return w},g.apply(this,arguments)}var m=function(){function w(d){var n=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){n.initialized&&(n.starved=!0),n.buffering=!0},this.onPlaying=function(){n.initialized||(n.initialized=!0),n.buffering=!1},this.applyPlaylistData=function(T){try{n.apply(T,{ot:h.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(v){S.logger.warn("Could not generate manifest CMCD data.",v)}},this.applyFragmentData=function(T){try{var v=T.frag,i=n.hls.levels[v.level],L=n.getObjectType(v),A={d:v.duration*1e3,ot:L};(L===h.CMCDObjectType.VIDEO||L===h.CMCDObjectType.AUDIO||L==h.CMCDObjectType.MUXED)&&(A.br=i.bitrate/1e3,A.tb=n.getTopBandwidth(L),A.bl=n.getBufferLength(L)),n.apply(T,A)}catch(b){S.logger.warn("Could not generate segment CMCD data.",b)}},this.hls=d;var l=this.config=d.config,c=l.cmcd;c!=null&&(l.pLoader=this.createPlaylistLoader(),l.fLoader=this.createFragmentLoader(),this.sid=c.sessionId||w.uuid(),this.cid=c.contentId,this.useHeaders=c.useHeaders===!0,this.registerListeners())}var p=w.prototype;return p.registerListeners=function(){var n=this.hls;n.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(R.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.on(R.Events.BUFFER_CREATED,this.onBufferCreated,this)},p.unregisterListeners=function(){var n=this.hls;n.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(R.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.off(R.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},p.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},p.onMediaAttached=function(n,l){this.media=l.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},p.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},p.onBufferCreated=function(n,l){var c,T;this.audioBuffer=(c=l.tracks.audio)===null||c===void 0?void 0:c.buffer,this.videoBuffer=(T=l.tracks.video)===null||T===void 0?void 0:T.buffer},p.createData=function(){var n;return{v:h.CMCDVersion,sf:h.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(n=this.media)===null||n===void 0?void 0:n.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},p.apply=function(n,l){l===void 0&&(l={}),g(l,this.createData());var c=l.ot===h.CMCDObjectType.INIT||l.ot===h.CMCDObjectType.VIDEO||l.ot===h.CMCDObjectType.MUXED;if(this.starved&&c&&(l.bs=!0,l.su=!0,this.starved=!1),l.su==null&&(l.su=this.buffering),this.useHeaders){var T=w.toHeaders(l);if(!Object.keys(T).length)return;n.headers||(n.headers={}),g(n.headers,T)}else{var v=w.toQuery(l);if(!v)return;n.url=w.appendQueryToUri(n.url,v)}},p.getObjectType=function(n){var l=n.type;return l==="subtitle"?h.CMCDObjectType.TIMED_TEXT:n.sn==="initSegment"?h.CMCDObjectType.INIT:l==="audio"?h.CMCDObjectType.AUDIO:l==="main"?this.hls.audioTracks.length?h.CMCDObjectType.VIDEO:h.CMCDObjectType.MUXED:void 0},p.getTopBandwidth=function(n){for(var l=0,c=n===h.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,T=o(c),v;!(v=T()).done;){var i=v.value;i.bitrate>l&&(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;L<A.length;L++){var b=A[L],x=i[b]!=null?i[b]:1;v[x][b]=n[b]}for(var y=0;y<v.length;y++){var _=w.serialize(v[y]);_&&(c["CMCD-"+T[y]]=_)}return c},w.toQuery=function(n){return"CMCD="+encodeURIComponent(w.serialize(n))},w.appendQueryToUri=function(n,l){if(!l)return n;var c=n.includes("?")?"&":"?";return""+n+c+l},w}()},"./src/controller/eme-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/utils/logger.ts"),S=C("./src/utils/mediakeys-helper.ts");function f(m,w){for(var p=0;p<w.length;p++){var d=w[p];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(m,d.key,d)}}function a(m,w,p){return w&&f(m.prototype,w),p&&f(m,p),m}var o=3,r=function(w,p,d){var n={audioCapabilities:[],videoCapabilities:[]};return w.forEach(function(l){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+l+'"',robustness:d.audioRobustness||""})}),p.forEach(function(l){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+l+'"',robustness:d.videoRobustness||""})}),[n]},E=function(w,p,d,n){switch(w){case S.KeySystems.WIDEVINE:return r(p,d,n);default:throw new Error("Unknown key-system: "+w)}},g=function(){function m(p){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=p,this._config=p.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var w=m.prototype;return w.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},w._registerListeners=function(){this.hls.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(R.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(R.Events.MANIFEST_PARSED,this.onManifestParsed,this)},w._unregisterListeners=function(){this.hls.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(R.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(R.Events.MANIFEST_PARSED,this.onManifestParsed,this)},w.getLicenseServerUrl=function(d){switch(d){case S.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+d+'"')},w._attemptKeySystemAccess=function(d,n,l){var c=this,T=E(d,n,l,this._drmSystemOptions);s.logger.log("Requesting encrypted media key-system access");var v=this.requestMediaKeySystemAccess(d,T);this.mediaKeysPromise=v.then(function(i){return c._onMediaKeySystemAccessObtained(d,i)}),v.catch(function(i){s.logger.error('Failed to obtain key-system "'+d+'" access:',i)})},w._onMediaKeySystemAccessObtained=function(d,n){var l=this;s.logger.log('Access for key-system "'+d+'" obtained');var c={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:n,mediaKeySystemDomain:d};this._mediaKeysList.push(c);var T=Promise.resolve().then(function(){return n.createMediaKeys()}).then(function(v){return c.mediaKeys=v,s.logger.log('Media-keys created for key-system "'+d+'"'),l._onMediaKeysCreated(),v});return T.catch(function(v){s.logger.error("Failed to create media-keys:",v)}),T},w._onMediaKeysCreated=function(){var d=this;this._mediaKeysList.forEach(function(n){n.mediaKeysSession||(n.mediaKeysSession=n.mediaKeys.createSession(),d._onNewMediaKeySession(n.mediaKeysSession))})},w._onNewMediaKeySession=function(d){var n=this;s.logger.log("New key-system session "+d.sessionId),d.addEventListener("message",function(l){n._onKeySessionMessage(d,l.message)},!1)},w._onKeySessionMessage=function(d,n){s.logger.log("Got EME message event, creating license request"),this._requestLicense(n,function(l){s.logger.log("Received license data (length: "+(l&&l.byteLength)+"), updating key-session"),d.update(l)})},w.onMediaEncrypted=function(d){var n=this;if(s.logger.log('Media is encrypted using "'+d.initDataType+'" init data type'),!this.mediaKeysPromise){s.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var l=function(T){if(!n._media)return;n._attemptSetMediaKeys(T),n._generateRequestWithPreferredKeySession(d.initDataType,d.initData)};this.mediaKeysPromise.then(l).catch(l)},w._attemptSetMediaKeys=function(d){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var n=this._mediaKeysList[0];if(!n||!n.mediaKeys){s.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}s.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(n.mediaKeys),this._hasSetMediaKeys=!0}},w._generateRequestWithPreferredKeySession=function(d,n){var l=this,c=this._mediaKeysList[0];if(!c){s.logger.error("Fatal: Media is encrypted but not any 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}if(c.mediaKeysSessionInitialized){s.logger.warn("Key-Session already initialized but requested again");return}var T=c.mediaKeysSession;if(!T){s.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!n){s.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}s.logger.log('Generating key-session request for "'+d+'" init data type'),c.mediaKeysSessionInitialized=!0,T.generateRequest(d,n).then(function(){s.logger.debug("Key-session generation succeeded")}).catch(function(v){s.logger.error("Error generating key-session request:",v),l.hls.trigger(R.Events.ERROR,{type:h.ErrorTypes.KEY_SYSTEM_ERROR,details:h.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},w._createLicenseXhr=function(d,n,l){var c=new XMLHttpRequest;c.responseType="arraybuffer",c.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,c,d,n,l);var T=this._licenseXhrSetup;if(T)try{T.call(this.hls,c,d),T=void 0}catch(v){s.logger.error(v)}try{c.readyState||c.open("POST",d,!0),T&&T.call(this.hls,c,d)}catch(v){throw new Error("issue setting up KeySystem license XHR "+v)}return c},w._onLicenseRequestReadyStageChange=function(d,n,l,c){switch(d.readyState){case 4:if(d.status===200){this._requestLicenseFailureCount=0,s.logger.log("License request succeeded");var T=d.response,v=this._licenseResponseCallback;if(v)try{T=v.call(this.hls,d,n)}catch(L){s.logger.error(L)}c(T)}else{if(s.logger.error("License Request XHR failed ("+n+"). Status: "+d.status+" ("+d.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>o){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;p<r.length;++p){var d=r[p];if(a(E,g,d))return d}return null}function S(r,E,g,m){g===void 0&&(g=0),m===void 0&&(m=0);var w=null;if(r?w=E[r.sn-E[0].sn+1]||null:g===0&&E[0].start===0&&(w=E[0]),w&&f(g,m,w)===0)return w;var p=h.default.search(E,f.bind(null,g,m));return p||w}function f(r,E,g){r===void 0&&(r=0),E===void 0&&(E=0);var m=Math.min(E,g.duration+(g.deltaPTS?g.deltaPTS:0));return g.start+g.duration-m<=r?1:g.start-m>r&&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.cc<E?1:g.cc>E?-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<p.length;v++){var i=p.start(v)-this.bufferPadding,L=p.end(v)+this.bufferPadding;if(T>=i&&c<=L){d.time.push({startPTS:Math.max(n,p.start(v)),endPTS:Math.min(l,p.end(v))});break}else if(n<L&&l>i)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<w.length;n++){if(p=w.start(n)-this.bufferPadding,d=w.end(n)+this.bufferPadding,g>=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;v<T.length;v++)p.appendedPTS=Math.max(T.end(v),p.appendedPTS||0)})},r.onFragBuffered=function(g,m){this.detectPartialFragments(m)},r.hasFragment=function(g){var m=a(g);return!!this.fragments[m]},r.removeFragmentsInRange=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){var l=n.body;l.type===w&&l.start<m&&l.end>g&&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<v.length;i++){var L=v.start(i);if(c+d.maxBufferHole>=T&&c<L){var A=Math.max(L+r,l.currentTime+o);return S.logger.warn("skipping hole, adjusting currentTime from "+c+" to "+A),this.moved=!0,this.stalled=null,l.currentTime=A,p&&n.trigger(s.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+c+" to "+A,frag:p}),A}T=v.end(i)}return 0},m._tryNudgeBuffer=function(){var p=this.config,d=this.hls,n=this.media,l=n.currentTime,c=(this.nudgeRetry||0)+1;if(this.nudgeRetry=c,c<p.nudgeMaxRetry){var T=l+c*p.nudgeOffset;S.logger.warn("Nudging 'currentTime' from "+l+" to "+T),n.currentTime=T,d.trigger(s.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else S.logger.error("Playhead still not moving while enough data buffered @"+l+" after "+p.nudgeMaxRetry+" nudges"),d.trigger(s.Events.ERROR,{type:h.ErrorTypes.MEDIA_ERROR,details:h.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},g}()},"./src/controller/id3-track-controller.ts":function(k,u,C){"use strict";C.r(u);var R=C("./src/events.ts"),h=C("./src/utils/texttrack-utils.ts"),s=C("./src/demux/id3.ts"),S=.25,f=function(){function a(r){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=r,this._registerListeners()}var o=a.prototype;return o.destroy=function(){this._unregisterListeners()},o._registerListeners=function(){var E=this.hls;E.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.on(R.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),E.on(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},o._unregisterListeners=function(){var E=this.hls;E.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(R.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),E.off(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},o.onMediaAttached=function(E,g){this.media=g.media},o.onMediaDetaching=function(){if(!this.id3Track)return;Object(h.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},o.getID3Track=function(E){if(!this.media)return;for(var g=0;g<E.length;g++){var m=E[g];if(m.kind==="metadata"&&m.label==="id3")return Object(h.sendAddTrackEvent)(m,this.media),m}return this.media.addTextTrack("metadata","id3")},o.onFragParsingMetadata=function(E,g){if(!this.media)return;var m=g.frag,w=g.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var p=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,d=0;d<w.length;d++){var n=s.getID3Frames(w[d].data);if(n){var l=w[d].pts,c=d<w.length-1?w[d+1].pts:m.end,T=c-l;T<=0&&(c=l+S);for(var v=0;v<n.length;v++){var i=n[v];if(!s.isTimeStampFrame(i)){var L=new p(l,c,"");L.value=i,this.id3Track.addCue(L)}}}}},o.onBufferFlushing=function(E,g){var m=g.startOffset,w=g.endOffset,p=g.type;if(!p||p==="audio"){var d=this.id3Track;d&&Object(h.removeCuesInRange)(d,m,w)}},a}();u.default=f},"./src/controller/latency-controller.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"default",function(){return a});var R=C("./src/errors.ts"),h=C("./src/events.ts"),s=C("./src/utils/logger.ts");function S(o,r){for(var E=0;E<r.length;E++){var g=r[E];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(o,g.key,g)}}function f(o,r,E){return r&&S(o.prototype,r),E&&S(o,E),o}var a=function(){function o(E){var g=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return g.timeupdate()},this.hls=E,this.config=E.config,this.registerListeners()}var r=o.prototype;return r.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},r.registerListeners=function(){this.hls.on(h.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(h.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(h.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(h.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(h.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){this.hls.off(h.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(h.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(h.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(h.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(h.Events.ERROR,this.onError)},r.onMediaAttached=function(g,m){this.media=m.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},r.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},r.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},r.onLevelUpdated=function(g,m){var w=m.details;this.levelDetails=w,w.advanced&&this.timeupdate(),!w.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},r.onError=function(g,m){if(m.details!==R.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,s.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},r.timeupdate=function(){var g=this.media,m=this.levelDetails;if(!g||!m)return;this.currentTime=g.currentTime;var w=this.computeLatency();if(w===null)return;this._latency=w;var p=this.config,d=p.lowLatencyMode,n=p.maxLiveSyncPlaybackRate;if(!d||n===1)return;var l=this.targetLatency;if(l===null)return;var c=w-l,T=Math.min(this.maxLatency,l+m.targetduration),v=c<T;if(m.live&&v&&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;l<arguments.length;l++){var c=arguments[l];for(var T in c)Object.prototype.hasOwnProperty.call(c,T)&&(n[T]=c[T])}return n},r.apply(this,arguments)}function E(n,l){for(var c=0;c<l.length;c++){var T=l[c];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(n,T.key,T)}}function g(n,l,c){return l&&E(n.prototype,l),c&&E(n,c),n}function m(n,l){n.prototype=Object.create(l.prototype),n.prototype.constructor=n,w(n,l)}function w(n,l){return w=Object.setPrototypeOf||function(T,v){return T.__proto__=v,T},w(n,l)}var p=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),d=function(n){m(l,n);function l(T){var v;return v=n.call(this,T,"[level-controller]")||this,v._levels=[],v._firstLevel=-1,v._startLevel=void 0,v.currentLevelIndex=-1,v.manualLevelIndex=-1,v.onParsedComplete=void 0,v._registerListeners(),v}var c=l.prototype;return c._registerListeners=function(){var v=this.hls;v.on(h.Events.MANIFEST_LOADED,this.onManifestLoaded,this),v.on(h.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.on(h.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.on(h.Events.FRAG_LOADED,this.onFragLoaded,this),v.on(h.Events.ERROR,this.onError,this)},c._unregisterListeners=function(){var v=this.hls;v.off(h.Events.MANIFEST_LOADED,this.onManifestLoaded,this),v.off(h.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.off(h.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.off(h.Events.FRAG_LOADED,this.onFragLoaded,this),v.off(h.Events.ERROR,this.onError,this)},c.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,n.prototype.destroy.call(this)},c.startLoad=function(){var v=this._levels;v.forEach(function(i){i.loadError=0}),n.prototype.startLoad.call(this)},c.onManifestLoaded=function(v,i){var L=[],A=[],b=[],x,y={},_,I=!1,j=!1,M=!1;if(i.levels.forEach(function(z){var B=z.attrs;I=I||!!(z.width&&z.height),j=j||!!z.videoCodec,M=M||!!z.audioCodec,p&&z.audioCodec&&z.audioCodec.indexOf("mp4a.40.34")!==-1&&(z.audioCodec=void 0);var W=z.bitrate+"-"+z.attrs.RESOLUTION+"-"+z.attrs.CODECS;_=y[W],_?_.url.push(z.url):(_=new R.Level(z),y[W]=_,L.push(_)),B&&(B.AUDIO&&Object(f.addGroupId)(_,"audio",B.AUDIO),B.SUBTITLES&&Object(f.addGroupId)(_,"text",B.SUBTITLES))}),(I||j)&&M&&(L=L.filter(function(z){var B=z.videoCodec,W=z.width,F=z.height;return!!B||!!(W&&F)})),L=L.filter(function(z){var B=z.audioCodec,W=z.videoCodec;return(!B||Object(S.isCodecSupportedInMp4)(B,"audio"))&&(!W||Object(S.isCodecSupportedInMp4)(W,"video"))}),i.audioTracks&&(A=i.audioTracks.filter(function(z){return!z.audioCodec||Object(S.isCodecSupportedInMp4)(z.audioCodec,"audio")}),Object(f.assignTrackIdsByGroup)(A)),i.subtitles&&(b=i.subtitles,Object(f.assignTrackIdsByGroup)(b)),L.length>0){x=L[0].bitrate,L.sort(function(z,B){return z.bitrate-B.bitrate}),this._levels=L;for(var G=0;G<L.length;G++)if(L[G].bitrate===x){this._firstLevel=G,this.log("manifest loaded, "+L.length+" level(s) found, first bitrate: "+x);break}var K=M&&!j,H={levels:L,audioTracks:A,subtitleTracks:b,firstLevel:this._firstLevel,stats:i.stats,audio:M,video:j,altAudio:!K&&A.some(function(z){return!!z.url})};this.hls.trigger(h.Events.MANIFEST_PARSED,H),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(h.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:i.url,reason:"no level with compatible codecs found in manifest"})},c.onError=function(v,i){if(n.prototype.onError.call(this,v,i),i.fatal)return;var L=i.context,A=this._levels[this.currentLevelIndex];if(L&&(L.type===o.PlaylistContextType.AUDIO_TRACK&&A.audioGroupIds&&L.groupId===A.audioGroupIds[A.urlId]||L.type===o.PlaylistContextType.SUBTITLE_TRACK&&A.textGroupIds&&L.groupId===A.textGroupIds[A.urlId])){this.redundantFailover(this.currentLevelIndex);return}var b=!1,x=!0,y;switch(i.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:if(i.frag){var _=this._levels[i.frag.level];_?(_.fragmentError++,_.fragmentError>this.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;x<L.audioGroupIds.length;x++)if(L.audioGroupIds[x]===b){A=x;break}A!==L.urlId&&(L.urlId=A,this.startLoad())}},c.loadPlaylist=function(v){var i=this.currentLevelIndex,L=this._levels[i];if(this.canLoad&&L&&L.url.length>0){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||M<l.startSN||M>l.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<H.length-1;G++)a(H[G],H[G+1]);return l.fragmentHint&&a(H[H.length-1],l.fragmentHint),l.PTSKnown=l.alignedSliding=!0,j}function r(l,c){for(var T=null,v=l.fragments,i=v.length-1;i>=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&&(I=c.fragments[y]=_),_&&I&&T(_,I)}}function m(l,c){var T=c.startSN+c.skippedSegments-l.startSN,v=l.fragments;if(T<0||T>=v.length)return;w(c,v[T].start)}function w(l,c){if(c){for(var T=l.fragments,v=l.skippedSegments;v<T.length;v++)T[v].start+=c;l.fragmentHint&&(l.fragmentHint.start+=c)}}function p(l,c){var T=1e3*l.levelTargetDuration,v=T/2,i=l.age,L=i>0&&i<T*3,A=c.loading.end-c.loading.start,b,x=l.availabilityDelay;if(l.updated===!1)if(L){var y=333*l.misses;b=Math.max(Math.min(v,A*2),y),l.availabilityDelay=(l.availabilityDelay||0)+b}else b=v;else L?(x=Math.min(x||T/2,i),l.availabilityDelay=x,b=x+T-i):b=T-A;return Math.round(b)}function d(l,c,T){if(!l||!l.details)return null;var v=l.details,i=v.fragments[c-v.startSN];return i||(i=v.fragmentHint,i&&i.sn===c?i:c<v.startSN&&T&&T.sn===c?T:null)}function n(l,c,T){if(!l||!l.details)return null;var v=l.details.partList;if(v)for(var i=v.length;i--;){var L=v[i];if(L.index===T&&L.fragment.sn===c)return L}return null}},"./src/controller/stream-controller.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"default",function(){return v});var R=C("./src/polyfills/number.ts"),h=C("./src/controller/base-stream-controller.ts"),s=C("./src/is-supported.ts"),S=C("./src/events.ts"),f=C("./src/utils/buffer-helper.ts"),a=C("./src/controller/fragment-tracker.ts"),o=C("./src/types/loader.ts"),r=C("./src/loader/fragment.ts"),E=C("./src/demux/transmuxer-interface.ts"),g=C("./src/types/transmuxer.ts"),m=C("./src/controller/gap-controller.ts"),w=C("./src/errors.ts"),p=C("./src/utils/logger.ts");function d(i,L){for(var A=0;A<L.length;A++){var b=L[A];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(i,b.key,b)}}function n(i,L,A){return L&&d(i.prototype,L),A&&d(i,A),i}function l(i,L){i.prototype=Object.create(L.prototype),i.prototype.constructor=i,c(i,L)}function c(i,L){return c=Object.setPrototypeOf||function(b,x){return b.__proto__=x,b},c(i,L)}var T=100,v=function(i){l(L,i);function L(b,x){var y;return y=i.call(this,b,x,"[stream-controller]")||this,y.audioCodecSwap=!1,y.gapController=null,y.level=-1,y._forceStartLoad=!1,y.altAudio=!1,y.audioOnly=!1,y.fragPlaying=null,y.onvplaying=null,y.onvseeked=null,y.fragLastKbps=0,y.stalled=!1,y.couldBacktrack=!1,y.audioCodecSwitch=!1,y.videoBuffer=null,y._registerListeners(),y}var A=L.prototype;return A._registerListeners=function(){var x=this.hls;x.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.on(S.Events.LEVEL_LOADING,this.onLevelLoading,this),x.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.on(S.Events.ERROR,this.onError,this),x.on(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.on(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.on(S.Events.BUFFER_CREATED,this.onBufferCreated,this),x.on(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.on(S.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},A._unregisterListeners=function(){var x=this.hls;x.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.off(S.Events.ERROR,this.onError,this),x.off(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.off(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.off(S.Events.BUFFER_CREATED,this.onBufferCreated,this),x.off(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.off(S.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},A.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},A.startLoad=function(x){if(this.levels){var y=this.lastCurrentTime,_=this.hls;if(this.stopLoad(),this.setInterval(T),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var I=_.startLevel;I===-1&&(_.config.testBandwidth?(I=0,this.bitrateTest=!0):I=_.nextAutoLevel),this.level=_.nextLoadLevel=I,this.loadedmetadata=!1}y>0&&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&&(M<this.config.maxBufferHole||M<this.config.maxFragLookUpTolerance)&&(p.logger.log("adjusting start position by "+M+" to match buffer start"),_+=M,this.startPosition=_),this.log("seek to target start position "+_+" from current time "+y),x.currentTime=_}},A._getAudioCodec=function(x){var y=this.config.defaultAudioCodec||x.audioCodec;return this.audioCodecSwap&&y&&(this.log("Swapping audio codec"),y.indexOf("mp4a.40.5")!==-1?y="mp4a.40.2":y="mp4a.40.5"),y},A._loadBitrateTestFrag=function(x){var y=this;this._doFragLoad(x).then(function(_){var I=y.hls;if(!_||I.nextLoadLevel||y.fragContextChanged(x))return;y.fragLoadError=0,y.state=h.State.IDLE,y.startFragRequested=!1,y.bitrateTest=!1;var j=x.stats;j.parsing.start=j.parsing.end=j.buffering.start=j.buffering.end=self.performance.now(),I.trigger(S.Events.FRAG_LOADED,_)})},A._handleTransmuxComplete=function(x){var y,_="main",I=this.hls,j=x.remuxResult,M=x.chunkMeta,G=this.getCurrentContext(M);if(!G){this.warn("The loading context changed while buffering fragment "+M.sn+" of level "+M.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(M.level);return}var K=G.frag,H=G.part,z=G.level,B=j.video,W=j.text,F=j.id3,J=j.initSegment,ee=this.altAudio?void 0:j.audio;if(this.fragContextChanged(K))return;if(this.state=h.State.PARSING,J){J.tracks&&(this._bufferInitSegment(z,J.tracks,K,M),I.trigger(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:K,id:_,tracks:J.tracks}));var q=J.initPTS,ye=J.timescale;Object(R.isFiniteNumber)(q)&&(this.initPTS[K.cc]=q,I.trigger(S.Events.INIT_PTS_FOUND,{frag:K,id:_,initPTS:q,timescale:ye}))}if(B&&j.independent!==!1){if(z.details){var pe=B.startPTS,le=B.endPTS,Oe=B.startDTS,xe=B.endDTS;if(H)H.elementaryStreams[B.type]={startPTS:pe,endPTS:le,startDTS:Oe,endDTS:xe};else if(B.firstKeyFrame&&B.independent&&(this.couldBacktrack=!0),B.dropped&&B.independent){var ie=this.getLoadPosition()+this.config.maxBufferHole;if(ie<pe){this.backtrack(K);return}K.setElementaryStreamInfo(B.type,K.start,le,K.start,xe,!0)}K.setElementaryStreamInfo(B.type,pe,le,Oe,xe),this.bufferFragmentData(B,K,H,M)}}else if(j.independent===!1){this.backtrack(K);return}if(ee){var se=ee.startPTS,re=ee.endPTS,be=ee.startDTS,Z=ee.endDTS;H&&(H.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:se,endPTS:re,startDTS:be,endDTS:Z}),K.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,se,re,be,Z),this.bufferFragmentData(ee,K,H,M)}if(F!=null&&(y=F.samples)!==null&&y!==void 0&&y.length){var te={frag:K,id:_,samples:F.samples};I.trigger(S.Events.FRAG_PARSING_METADATA,te)}if(W){var Ee={frag:K,id:_,samples:W.samples};I.trigger(S.Events.FRAG_PARSING_USERDATA,Ee)}},A._bufferInitSegment=function(x,y,_,I){var j=this;if(this.state!==h.State.PARSING)return;this.audioOnly=!!y.audio&&!y.video,this.altAudio&&!this.audioOnly&&delete y.audio;var M=y.audio,G=y.video,K=y.audiovideo;if(M){var H=x.audioCodec,z=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(H&&(H.indexOf("mp4a.40.5")!==-1?H="mp4a.40.2":H="mp4a.40.5"),M.metadata.channelCount!==1&&z.indexOf("firefox")===-1&&(H="mp4a.40.5")),z.indexOf("android")!==-1&&M.container!=="audio/mpeg"&&(H="mp4a.40.2",this.log("Android: force audio codec to "+H)),x.audioCodec&&x.audioCodec!==H&&this.log('Swapping manifest audio codec "'+x.audioCodec+'" for "'+H+'"'),M.levelCodec=H,M.id="main",this.log("Init audio buffer, container:"+M.container+", codecs[selected/level/parsed]=["+(H||"")+"/"+(x.audioCodec||"")+"/"+M.codec+"]")}G&&(G.levelCodec=x.videoCodec,G.id="main",this.log("Init video buffer, container:"+G.container+", codecs[level/parsed]=["+(x.videoCodec||"")+"/"+G.codec+"]")),K&&this.log("Init audiovideo buffer, container:"+K.container+", codecs[level/parsed]=["+(x.attrs.CODECS||"")+"/"+K.codec+"]"),this.hls.trigger(S.Events.BUFFER_CODECS,y),Object.keys(y).forEach(function(B){var W=y[B],F=W.initSegment;F!=null&&F.byteLength&&j.hls.trigger(S.Events.BUFFER_APPENDING,{type:B,data:F,frag:_,part:null,chunkMeta:I,parent:_.type})}),this.tick()},A.backtrack=function(x){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(x);var y=this.fragmentTracker.backtrack(x);this.fragPrevious=null,this.nextLoadPosition=x.start,y?this.resetFragmentLoading(x):this.state=h.State.BACKTRACKING},A.checkFragmentChanged=function(){var x=this.media,y=null;if(x&&x.readyState>1&&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<T.length;v++){var i=T[v];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(c,i.key,i)}}function w(c,T,v){return T&&m(c.prototype,T),v&&m(c,v),c}function p(c,T){c.prototype=Object.create(T.prototype),c.prototype.constructor=c,d(c,T)}function d(c,T){return d=Object.setPrototypeOf||function(i,L){return i.__proto__=L,i},d(c,T)}var n=500,l=function(c){p(T,c);function T(i,L){var A;return A=c.call(this,i,L,"[subtitle-stream-controller]")||this,A.levels=[],A.currentTrackId=-1,A.tracksBuffered=[],A.mainDetails=null,A._registerListeners(),A}var v=T.prototype;return v.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},v._registerListeners=function(){var L=this.hls;L.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.on(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.on(R.Events.ERROR,this.onError,this),L.on(R.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.on(R.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.on(R.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.on(R.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.on(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},v._unregisterListeners=function(){var L=this.hls;L.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),L.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),L.off(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),L.off(R.Events.LEVEL_LOADED,this.onLevelLoaded,this),L.off(R.Events.ERROR,this.onError,this),L.off(R.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),L.off(R.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),L.off(R.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),L.off(R.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),L.off(R.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},v.startLoad=function(){this.stopLoad(),this.state=r.State.IDLE,this.setInterval(n),this.tick()},v.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},v.onLevelLoaded=function(L,A){this.mainDetails=A.details},v.onSubtitleFragProcessed=function(L,A){var b=A.frag,x=A.success;if(this.fragPrevious=b,this.state=r.State.IDLE,!x)return;var y=this.tracksBuffered[this.currentTrackId];if(!y)return;for(var _,I=b.start,j=0;j<y.length;j++)if(I>=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<G.length;){if(G[K].end<=M){G.shift();continue}else if(G[K].start<M)G[K].start=M;else break;K++}}),this.fragmentTracker.removeFragmentsInRange(b,M,E.PlaylistLevelType.SUBTITLE)}},v.onError=function(L,A){var b,x=A.frag;if(!x||x.type!==E.PlaylistLevelType.SUBTITLE)return;(b=this.fragCurrent)!==null&&b!==void 0&&b.loader&&this.fragCurrent.loader.abort(),this.state=r.State.IDLE},v.onSubtitleTracksUpdated=function(L,A){var b=this,x=A.subtitleTracks;this.tracksBuffered=[],this.levels=x.map(function(y){return new g.Level(y)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(y){b.tracksBuffered[y.id]=[]}),this.mediaBuffer=null},v.onSubtitleTrackSwitch=function(L,A){if(this.currentTrackId=A.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var b=this.levels[this.currentTrackId];b!=null&&b.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,b&&this.setInterval(n)},v.onSubtitleTrackLoaded=function(L,A){var b,x=A.details,y=A.id,_=this.currentTrackId,I=this.levels;if(!I.length)return;var j=I[_];if(y>=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<B){var J=_.maxFragLookUpTolerance;F&&x.hasProgramDateTime&&(W=Object(S.findFragmentByPDT)(H,F.endProgramDateTime,J)),W||(W=Object(S.findFragmentByPTS)(F,H,M,J),!W&&F&&F.start<H[0].start&&(W=H[0]))}else W=H[z-1];(L=W)!==null&&L!==void 0&&L.encrypted?(h.logger.log("Loading key for "+W.sn),this.state=r.State.KEY_LOADING,this.hls.trigger(R.Events.KEY_LOADING,{frag:W})):W&&this.fragmentTracker.getState(W)===o.FragmentState.NOT_LOADED&&this.loadFragment(W,x,M)}},v.loadFragment=function(L,A,b){this.fragCurrent=L,c.prototype.loadFragment.call(this,L,A,b)},w(T,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),T}(r.default)},"./src/controller/subtitle-track-controller.ts":function(k,u,C){"use strict";C.r(u);var R=C("./src/events.ts"),h=C("./src/utils/texttrack-utils.ts"),s=C("./src/controller/base-playlist-controller.ts"),S=C("./src/types/loader.ts");function f(m,w){for(var p=0;p<w.length;p++){var d=w[p];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(m,d.key,d)}}function a(m,w,p){return w&&f(m.prototype,w),p&&f(m,p),m}function o(m,w){m.prototype=Object.create(w.prototype),m.prototype.constructor=m,r(m,w)}function r(m,w){return r=Object.setPrototypeOf||function(d,n){return d.__proto__=n,d},r(m,w)}var E=function(m){o(w,m);function w(d){var n;return n=m.call(this,d,"[subtitle-track-controller]")||this,n.media=null,n.tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.selectDefaultTrack=!0,n.queuedDefaultTrack=-1,n.trackChangeListener=function(){return n.onTextTracksChanged()},n.asyncPollTrackChange=function(){return n.pollTrackChange(0)},n.useTextTrackPolling=!1,n.subtitlePollingInterval=-1,n.subtitleDisplay=!0,n.registerListeners(),n}var p=w.prototype;return p.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,m.prototype.destroy.call(this)},p.registerListeners=function(){var n=this.hls;n.on(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(R.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(R.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.on(R.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.on(R.Events.ERROR,this.onError,this)},p.unregisterListeners=function(){var n=this.hls;n.off(R.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(R.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(R.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(R.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(R.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(R.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.off(R.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.off(R.Events.ERROR,this.onError,this)},p.onMediaAttached=function(n,l){if(this.media=l.media,!this.media)return;this.queuedDefaultTrack>-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<l.length;c++){var T=l[c];if((!this.selectDefaultTrack||T.default)&&(!n||n===T.name))return T.id}return-1},p.onError=function(n,l){if(m.prototype.onError.call(this,n,l),l.fatal||!l.context)return;l.context.type===S.PlaylistContextType.SUBTITLE_TRACK&&l.context.id===this.trackId&&l.context.groupId===this.groupId&&this.retryLoadingOrFail(l)},p.loadPlaylist=function(n){var l=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(l)){var c=l.id,T=l.groupId,v=l.url;if(n)try{v=n.addDirectives(v)}catch(i){this.warn("Could not construct new URL with HLS Delivery Directives: "+i)}this.log("Loading subtitle playlist for id "+c),this.hls.trigger(R.Events.SUBTITLE_TRACK_LOADING,{url:v,id:c,groupId:T,deliveryDirectives:n||null})}},p.toggleTrackModes=function(n){var l=this,c=this.media,T=this.subtitleDisplay,v=this.trackId;if(!c)return;var i=g(c.textTracks),L=i.filter(function(x){return x.groupId===l.groupId});if(n===-1)[].slice.call(i).forEach(function(x){x.mode="disabled"});else{var A=L[v];A&&(A.mode="disabled")}var b=L[n];b&&(b.mode=T?"showing":"hidden")},p.setSubtitleTrack=function(n,l){var c,T=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=n;return}if(this.trackId!==n&&this.toggleTrackModes(n),this.trackId===n&&(n===-1||(c=T[n])!==null&&c!==void 0&&c.details)||n<-1||n>=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<l.length;c++)if(l[c].mode==="hidden")n=c;else if(l[c].mode==="showing"){n=c;break}this.subtitleTrack!==n&&(this.subtitleTrack=n)},a(w,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(n){this.selectDefaultTrack=!1;var l=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(n,l)}}]),w}(s.default);function g(m){for(var w=[],p=0;p<m.length;p++){var d=m[p];d.kind==="subtitles"&&d.label&&w.push(m[p])}return w}u.default=E},"./src/controller/timeline-controller.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"TimelineController",function(){return g});var R=C("./src/polyfills/number.ts"),h=C("./src/events.ts"),s=C("./src/utils/cea-608-parser.ts"),S=C("./src/utils/output-filter.ts"),f=C("./src/utils/webvtt-parser.ts"),a=C("./src/utils/texttrack-utils.ts"),o=C("./src/utils/imsc1-ttml-parser.ts"),r=C("./src/types/loader.ts"),E=C("./src/utils/logger.ts"),g=function(){function d(l){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=p(),this.captionsProperties=void 0,this.hls=l,this.config=l.config,this.Cues=l.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var c=new S.default(this,"textTrack1"),T=new S.default(this,"textTrack2"),v=new S.default(this,"textTrack3"),i=new S.default(this,"textTrack4");this.cea608Parser1=new s.default(1,c,T),this.cea608Parser2=new s.default(3,v,i)}l.on(h.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),l.on(h.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(h.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(h.Events.MANIFEST_LOADED,this.onManifestLoaded,this),l.on(h.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),l.on(h.Events.FRAG_LOADING,this.onFragLoading,this),l.on(h.Events.FRAG_LOADED,this.onFragLoaded,this),l.on(h.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),l.on(h.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),l.on(h.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.on(h.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),l.on(h.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var n=d.prototype;return n.destroy=function(){var c=this.hls;c.off(h.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),c.off(h.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(h.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.off(h.Events.MANIFEST_LOADED,this.onManifestLoaded,this),c.off(h.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),c.off(h.Events.FRAG_LOADING,this.onFragLoading,this),c.off(h.Events.FRAG_LOADED,this.onFragLoaded,this),c.off(h.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),c.off(h.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),c.off(h.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),c.off(h.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),c.off(h.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},n.addCues=function(c,T,v,i,L){for(var A=!1,b=L.length;b--;){var x=L[b],y=w(x[0],x[1],T,v);if(y>=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<T.textTracks.length;v++){var i=T.textTracks[v];if(i[c])return i}return null},n.createCaptionsTrack=function(c){this.config.renderTextTracksNatively?this.createNativeTrack(c):this.createNonNativeTrack(c)},n.createNativeTrack=function(c){if(this.captionsTracks[c])return;var T=this.captionsProperties,v=this.captionsTracks,i=this.media,L=T[c],A=L.label,b=L.languageCode,x=this.getExistingTrack(c);if(x)v[c]=x,Object(a.clearCurrentCues)(v[c]),Object(a.sendAddTrackEvent)(v[c],i);else{var y=this.createTextTrack("captions",A,b);y&&(y[c]=!0,v[c]=y)}},n.createNonNativeTrack=function(c){if(this.nonNativeCaptionsTracks[c])return;var T=this.captionsProperties[c];if(!T)return;var v=T.label,i={_id:c,label:v,kind:"captions",default:T.media?!!T.media.default:!1,closedCaptions:T.media};this.nonNativeCaptionsTracks[c]=i,this.hls.trigger(h.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[i]})},n.createTextTrack=function(c,T,v){var i=this.media;return i?i.addTextTrack(c,T,v):void 0},n.onMediaAttaching=function(c,T){this.media=T.media,this._cleanTracks()},n.onMediaDetaching=function(){var c=this.captionsTracks;Object.keys(c).forEach(function(T){Object(a.clearCurrentCues)(c[T]),delete c[T]}),this.nonNativeCaptionsTracks={}},n.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=p(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},n._cleanTracks=function(){var c=this.media;if(!c)return;var T=c.textTracks;if(T)for(var v=0;v<T.length;v++)Object(a.clearCurrentCues)(T[v])},n.onSubtitleTracksUpdated=function(c,T){var v=this;this.textTracks=[];var i=T.subtitleTracks||[],L=i.some(function(y){return y.textCodec===o.IMSC1_CODEC});if(this.config.enableWebVTT||L&&this.config.enableIMSC1){var A=this.tracks&&i&&this.tracks.length===i.length;if(this.tracks=i||[],this.config.renderTextTracksNatively){var b=this.media?this.media.textTracks:[];this.tracks.forEach(function(y,_){var I;if(_<b.length){for(var j=null,M=0;M<b.length;M++)if(m(b[M],y)){j=b[M];break}j&&(I=j)}I?Object(a.clearCurrentCues)(I):(I=v.createTextTrack("subtitles",y.name,y.lang),I&&(I.mode="disabled")),I&&(I.groupId=y.groupId,v.textTracks.push(I))})}else if(!A&&this.tracks&&this.tracks.length){var x=this.tracks.map(function(y){return{label:y.name,kind:y.type.toLowerCase(),default:y.default,subtitleTrack:y}});this.hls.trigger(h.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:x})}}},n.onManifestLoaded=function(c,T){var v=this;this.config.enableCEA708Captions&&T.captions&&T.captions.forEach(function(i){var L=/(?:CC|SERVICE)([1-4])/.exec(i.instreamId);if(!L)return;var A="textTrack"+L[1],b=v.captionsProperties[A];if(!b)return;b.label=i.name,i.lang&&(b.languageCode=i.lang),b.media=i})},n.onFragLoading=function(c,T){var v=this.cea608Parser1,i=this.cea608Parser2,L=this.lastSn,A=this.lastPartIndex;if(!this.enabled||!(v&&i))return;if(T.frag.type===r.PlaylistLevelType.MAIN){var b,x,y=T.frag.sn,_=(b=T==null||((x=T.part)===null||x===void 0)?void 0:x.index)!=null?b:-1;y===L+1||y===L&&_===A+1||(v.reset(),i.reset()),this.lastSn=y,this.lastPartIndex=_}},n.onFragLoaded=function(c,T){var v=T.frag,i=T.payload,L=this.initPTS,A=this.unparsedVttFrags;if(v.type===r.PlaylistLevelType.SUBTITLE)if(i.byteLength){if(!Object(R.isFiniteNumber)(L[v.cc])){A.push(T),L.length&&this.hls.trigger(h.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:v,error:new Error("Missing initial subtitle PTS")});return}var b=v.decryptdata;if(b==null||b.key==null||b.method!=="AES-128"){var x=this.tracks[v.level],y=this.vttCCs;y[v.cc]||(y[v.cc]={start:v.start,prevCC:this.prevCC,new:!0},this.prevCC=v.cc),x&&x.textCodec===o.IMSC1_CODEC?this._parseIMSC1(v,i):this._parseVTTs(v,i,y)}}else this.hls.trigger(h.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:v,error:new Error("Empty subtitle payload")})},n._parseIMSC1=function(c,T){var v=this,i=this.hls;Object(o.parseIMSC1)(T,this.initPTS[c.cc],this.timescale[c.cc],function(L){v._appendCues(L,c.level),i.trigger(h.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:c})},function(L){E.logger.log("Failed to parse IMSC1: "+L),i.trigger(h.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:c,error:L})})},n._parseVTTs=function(c,T,v){var i=this,L=this.hls;Object(f.parseWebVTT)(T,this.initPTS[c.cc],this.timescale[c.cc],v,c.cc,c.start,function(A){i._appendCues(A,c.level),L.trigger(h.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:c})},function(A){i._fallbackToIMSC1(c,T),E.logger.log("Failed to parse VTT cue: "+A),L.trigger(h.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:c,error:A})})},n._fallbackToIMSC1=function(c,T){var v=this,i=this.tracks[c.level];i.textCodec||Object(o.parseIMSC1)(T,this.initPTS[c.cc],this.timescale[c.cc],function(){i.textCodec=o.IMSC1_CODEC,v._parseIMSC1(c,T)},function(){i.textCodec="wvtt"})},n._appendCues=function(c,T){var v=this.hls;if(this.config.renderTextTracksNatively){var i=this.textTracks[T];if(i.mode==="disabled")return;c.forEach(function(b){return Object(a.addCueToTrack)(i,b)})}else{var L=this.tracks[T],A=L.default?"default":"subtitles"+T;v.trigger(h.Events.CUES_PARSED,{type:"subtitles",cues:c,track:A})}},n.onFragDecrypted=function(c,T){var v=T.frag;if(v.type===r.PlaylistLevelType.SUBTITLE){if(!Object(R.isFiniteNumber)(this.initPTS[v.cc])){this.unparsedVttFrags.push(T);return}this.onFragLoaded(h.Events.FRAG_LOADED,T)}},n.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},n.onFragParsingUserdata=function(c,T){var v=this.cea608Parser1,i=this.cea608Parser2;if(!this.enabled||!(v&&i))return;for(var L=0;L<T.samples.length;L++){var A=T.samples[L].bytes;if(A){var b=this.extractCea608Data(A);v.addData(T.samples[L].pts,b[0]),i.addData(T.samples[L].pts,b[1])}}},n.onBufferFlushing=function(c,T){var v=T.startOffset,i=T.endOffset,L=T.endOffsetSubtitles,A=T.type,b=this.media;if(!b||b.currentTime<i)return;if(!A||A==="video"){var x=this.captionsTracks;Object.keys(x).forEach(function(_){return Object(a.removeCuesInRange)(x[_],v,i)})}if(this.config.renderTextTracksNatively&&(v===0&&L!==void 0)){var y=this.textTracks;Object.keys(y).forEach(function(_){return Object(a.removeCuesInRange)(y[_],v,L)})}},n.extractCea608Data=function(c){for(var T=c[0]&31,v=2,i=[[],[]],L=0;L<T;L++){var A=c[v++],b=127&c[v++],x=127&c[v++],y=(4&A)!==0,_=3&A;if(b===0&&x===0)continue;y&&((_===0||_===1)&&(i[_].push(b),i[_].push(x)))}return i},d}();function m(d,n){return d&&d.label===n.name&&!(d.textTrack1||d.textTrack2)}function w(d,n,l,c){return Math.min(n,c)-Math.max(d,l)}function p(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"default",function(){return R});var R=function(){function h(S,f){this.subtle=void 0,this.aesIV=void 0,this.subtle=S,this.aesIV=f}var s=h.prototype;return s.decrypt=function(f,a){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},a,f)},h}()},"./src/crypt/aes-decryptor.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"removePadding",function(){return h}),C.d(u,"default",function(){return s});var R=C("./src/utils/typed-array.ts");function h(S){var f=S.byteLength,a=f&&new DataView(S.buffer).getUint8(f-1);return a?Object(R.sliceUint8)(S,0,f-a):S}var s=function(){function S(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var f=S.prototype;return f.uint8ArrayToUint32Array_=function(o){for(var r=new DataView(o),E=new Uint32Array(4),g=0;g<4;g++)E[g]=r.getUint32(g*4);return E},f.initTable=function(){var o=this.sBox,r=this.invSBox,E=this.subMix,g=E[0],m=E[1],w=E[2],p=E[3],d=this.invSubMix,n=d[0],l=d[1],c=d[2],T=d[3],v=new Uint32Array(256),i=0,L=0,A=0;for(A=0;A<256;A++)A<128?v[A]=A<<1:v[A]=A<<1^283;for(A=0;A<256;A++){var b=L^L<<1^L<<2^L<<3^L<<4;b=b>>>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<r.length&&E;)E=r[g]===this.key[g],g++;if(E)return;this.key=r;var m=this.keySize=r.length;if(m!==4&&m!==6&&m!==8)throw new Error("Invalid aes key size="+m);var w=this.ksRows=(m+6+1)*4,p,d,n=this.keySchedule=new Uint32Array(w),l=this.invKeySchedule=new Uint32Array(w),c=this.sBox,T=this.rcon,v=this.invSubMix,i=v[0],L=v[1],A=v[2],b=v[3],x,y;for(p=0;p<w;p++){if(p<m){x=n[p]=r[p];continue}y=x,p%m===0?(y=y<<8|y>>>24,y=c[y>>>24]<<24|c[y>>>16&255]<<16|c[y>>>8&255]<<8|c[y&255],y^=T[p/m|0]<<24):m>6&&p%m===4&&(y=c[y>>>24]<<24|c[y>>>16&255]<<16|c[y>>>8&255]<<8|c[y&255]),n[p]=x=(n[p-m]^y)>>>0}for(d=0;d<w;d++)p=w-d,d&3?y=n[p]:y=n[p-4],d<4||p<=4?l[d]=y:l[d]=i[c[y>>>24]]^L[c[y>>>16&255]]^A[c[y>>>8&255]]^b[c[y&255]],l[d]=l[d]>>>0},f.networkToHostOrderSwap=function(o){return o<<24|(o&65280)<<8|(o&16711680)>>8|o>>>24},f.decrypt=function(o,r,E){for(var g=this.keySize+6,m=this.invKeySchedule,w=this.invSBox,p=this.invSubMix,d=p[0],n=p[1],l=p[2],c=p[3],T=this.uint8ArrayToUint32Array_(E),v=T[0],i=T[1],L=T[2],A=T[3],b=new Int32Array(o),x=new Int32Array(b.length),y,_,I,j,M,G,K,H,z,B,W,F,J,ee,q=this.networkToHostOrderSwap;r<b.length;){for(z=q(b[r]),B=q(b[r+1]),W=q(b[r+2]),F=q(b[r+3]),M=z^m[0],G=F^m[1],K=W^m[2],H=B^m[3],J=4,ee=1;ee<g;ee++)y=d[M>>>24]^n[G>>16&255]^l[K>>8&255]^c[H&255]^m[J],_=d[G>>>24]^n[K>>16&255]^l[H>>8&255]^c[M&255]^m[J+1],I=d[K>>>24]^n[H>>16&255]^l[M>>8&255]^c[G&255]^m[J+2],j=d[H>>>24]^n[M>>16&255]^l[G>>8&255]^c[K&255]^m[J+3],M=y,G=_,K=I,H=j,J=J+4;y=w[M>>>24]<<24^w[G>>16&255]<<16^w[K>>8&255]<<8^w[H&255]^m[J],_=w[G>>>24]<<24^w[K>>16&255]<<16^w[H>>8&255]<<8^w[M&255]^m[J+1],I=w[K>>>24]<<24^w[H>>16&255]<<16^w[M>>8&255]<<8^w[G&255]^m[J+2],j=w[H>>>24]<<24^w[M>>16&255]<<16^w[G>>8&255]<<8^w[K&255]^m[J+3],x[r]=q(y^v),x[r+1]=q(j^i),x[r+2]=q(I^L),x[r+3]=q(_^A),v=z,i=B,L=W,A=F,r=r+4}return x.buffer},S}()},"./src/crypt/decrypter.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"default",function(){return r});var R=C("./src/crypt/aes-crypto.ts"),h=C("./src/crypt/fast-aes-key.ts"),s=C("./src/crypt/aes-decryptor.ts"),S=C("./src/utils/logger.ts"),f=C("./src/utils/mp4-tools.ts"),a=C("./src/utils/typed-array.ts"),o=16,r=function(){function E(m,w,p){var d=p===void 0?{}:p,n=d.removePKCS7Padding,l=n===void 0?!0:n;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=m,this.config=w,this.removePKCS7Padding=l,l)try{var c=self.crypto;c&&(this.subtle=c.subtle||c.webkitSubtle)}catch(T){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var g=E.prototype;return g.destroy=function(){this.observer=null},g.isSync=function(){return this.config.enableSoftwareAES},g.flush=function(){var w=this.currentResult;if(!w){this.reset();return}var p=new Uint8Array(w);return this.reset(),this.removePKCS7Padding?Object(s.removePadding)(p):p},g.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},g.decrypt=function(w,p,d,n){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(w),p,d);var l=this.flush();l&&n(l.buffer)}else this.webCryptoDecrypt(new Uint8Array(w),p,d).then(n)},g.softwareDecrypt=function(w,p,d){var n=this.currentIV,l=this.currentResult,c=this.remainderData;this.logOnce("JS AES decrypt"),c&&(w=Object(f.appendUint8Array)(c,w),this.remainderData=null);var T=this.getValidChunk(w);if(!T.length)return null;n&&(d=n);var v=this.softwareDecrypter;v||(v=this.softwareDecrypter=new s.default),v.expandKey(p);var i=l;return this.currentResult=v.decrypt(T.buffer,0,d),this.currentIV=Object(a.sliceUint8)(T,-16).buffer,i||null},g.webCryptoDecrypt=function(w,p,d){var n=this,l=this.subtle;return(this.key!==p||!this.fastAesKey)&&(this.key=p,this.fastAesKey=new h.default(l,p)),this.fastAesKey.expandKey().then(function(c){if(!l)return Promise.reject(new Error("web crypto not initialized"));var T=new R.default(l,d);return T.decrypt(w.buffer,c)}).catch(function(c){return n.onWebCryptoError(c,w,p,d)})},g.onWebCryptoError=function(w,p,d,n){return S.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",w),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(p,d,n)},g.getValidChunk=function(w){var p=w,d=w.length-w.length%o;return d!==w.length&&(p=Object(a.sliceUint8)(w,0,d),this.remainderData=Object(a.sliceUint8)(w,d)),p},g.logOnce=function(w){if(!this.logEnabled)return;S.logger.log("[decrypter.ts]: "+w),this.logEnabled=!1},E}()},"./src/crypt/fast-aes-key.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"default",function(){return R});var R=function(){function h(S,f){this.subtle=void 0,this.key=void 0,this.subtle=S,this.key=f}var s=h.prototype;return s.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},h}()},"./src/demux/aacdemuxer.ts":function(k,u,C){"use strict";C.r(u);var R=C("./src/demux/base-audio-demuxer.ts"),h=C("./src/demux/adts.ts"),s=C("./src/utils/logger.ts"),S=C("./src/demux/id3.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(m,w){var p;return p=r.call(this)||this,p.observer=void 0,p.config=void 0,p.observer=m,p.config=w,p}var g=E.prototype;return g.resetInitSegment=function(w,p,d){r.prototype.resetInitSegment.call(this,w,p,d),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:w,duration:d,inputTimeScale:9e4,dropped:0}},E.probe=function(w){if(!w)return!1;for(var p=S.getID3Data(w,0)||[],d=p.length,n=w.length;d<n;d++)if(h.probe(w,d))return s.logger.log("ADTS sync word found !"),!0;return!1},g.canParse=function(w,p){return h.canParse(w,p)},g.appendFrame=function(w,p,d){h.initTrackConfig(w,this.observer,p,d,w.manifestCodec);var n=h.appendFrame(w,p,d,this.initPTS,this.frameIndex);if(n&&n.missing===0)return n},E}(R.default);o.minProbeByteLength=9,u.default=o},"./src/demux/adts.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"getAudioConfig",function(){return S}),C.d(u,"isHeaderPattern",function(){return f}),C.d(u,"getHeaderLength",function(){return a}),C.d(u,"getFullFrameLength",function(){return o}),C.d(u,"canGetFrameLength",function(){return r}),C.d(u,"isHeader",function(){return E}),C.d(u,"canParse",function(){return g}),C.d(u,"probe",function(){return m}),C.d(u,"initTrackConfig",function(){return w}),C.d(u,"getFrameDuration",function(){return p}),C.d(u,"parseFrameHeader",function(){return d}),C.d(u,"appendFrame",function(){return n});var R=C("./src/utils/logger.ts"),h=C("./src/errors.ts"),s=C("./src/events.ts");function S(l,c,T,v){var i,L,A,b,x=navigator.userAgent.toLowerCase(),y=v,_=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];i=((c[T+2]&192)>>>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}function E(l,c){return c+1<l.length&&f(l,c)}function g(l,c){return r(l,c)&&f(l,c)&&o(l,c)<=l.length-c}function m(l,c){if(E(l,c)){var T=a(l,c);if(c+T>=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;d<i;){if(this.canParse(m,d)){var L=this.appendFrame(c,m,d);L?(this.frameIndex++,l=L.sample.pts,d+=L.length,n=d):d=i}else h.canParse(m,d)?(p=h.getID3Data(m,d),T.samples.push({pts:l,dts:l,data:p}),d+=p.length,n=d):d++;if(d===i&&n!==i){var A=Object(f.sliceUint8)(m,n);this.cachedData?this.cachedData=Object(S.appendUint8Array)(this.cachedData,A):this.cachedData=A}}return{audioTrack:c,avcTrack:Object(s.dummyTrack)(),id3Track:T,textTrack:Object(s.dummyTrack)()}},E.demuxSampleAes=function(m,w,p){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},E.flush=function(m){var w=this.cachedData;return w&&(this.cachedData=null,this.demux(w,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(s.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(s.dummyTrack)()}},E.destroy=function(){},r}(),o=function(E,g){return Object(R.isFiniteNumber)(E)?E*90:g*9e4};u.default=a},"./src/demux/chunk-cache.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"default",function(){return R});var R=function(){function s(){this.chunks=[],this.dataLength=0}var S=s.prototype;return S.push=function(a){this.chunks.push(a),this.dataLength+=a.length},S.flush=function(){var a=this.chunks,o=this.dataLength,r;if(a.length)a.length===1?r=a[0]:r=h(a,o);else return new Uint8Array(0);return this.reset(),r},S.reset=function(){this.chunks.length=0,this.dataLength=0},s}();function h(s,S){for(var f=new Uint8Array(S),a=0,o=0;o<s.length;o++){var r=s[o];f.set(r,a),a+=r.length}return f}},"./src/demux/dummy-demuxed-track.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"dummyTrack",function(){return R});function R(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(k,u,C){"use strict";C.r(u);var R=C("./src/utils/logger.ts"),h=function(){function s(f){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=f,this.bytesAvailable=f.byteLength,this.word=0,this.bitsAvailable=0}var S=s.prototype;return S.loadWord=function(){var a=this.data,o=this.bytesAvailable,r=a.byteLength-o,E=new Uint8Array(4),g=Math.min(4,o);if(g===0)throw new Error("no bytes available");E.set(a.subarray(r,r+g)),this.word=new DataView(E.buffer).getUint32(0),this.bitsAvailable=g*8,this.bytesAvailable-=g},S.skipBits=function(a){var o;this.bitsAvailable>a?(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<<o|this.readBits(o):r},S.skipLZ=function(){var a;for(a=0;a<this.bitsAvailable;++a)if((this.word&2147483648>>>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;g<a;g++)r!==0&&(E=this.readEG(),r=(o+E+256)%256),o=r===0?o:r},S.readSPS=function(){var a=0,o=0,r=0,E=0,g,m,w,p=this.readUByte.bind(this),d=this.readBits.bind(this),n=this.readUEG.bind(this),l=this.readBoolean.bind(this),c=this.skipBits.bind(this),T=this.skipEG.bind(this),v=this.skipUEG.bind(this),i=this.skipScalingList.bind(this);p();var L=p();if(d(5),c(3),p(),v(),L===100||L===110||L===122||L===244||L===44||L===83||L===86||L===118||L===128){var A=n();if(A===3&&c(1),v(),v(),c(1),l())for(m=A!==3?8:12,w=0;w<m;w++)l()&&(w<6?i(16):i(64))}v();var b=n();if(b===0)n();else if(b===1)for(c(1),T(),T(),g=n(),w=0;w<g;w++)T();v(),c(1);var x=n(),y=n(),_=d(1);_===0&&c(1),c(1),l()&&(a=n(),o=n(),r=n(),E=n());var I=[1,1];if(l()&&l()){var j=p();switch(j){case 1:I=[1,1];break;case 2:I=[12,11];break;case 3:I=[10,11];break;case 4:I=[16,11];break;case 5:I=[40,33];break;case 6:I=[24,11];break;case 7:I=[20,11];break;case 8:I=[32,11];break;case 9:I=[80,33];break;case 10:I=[18,11];break;case 11:I=[15,11];break;case 12:I=[64,33];break;case 13:I=[160,99];break;case 14:I=[4,3];break;case 15:I=[3,2];break;case 16:I=[2,1];break;case 255:{I=[p()<<8|p(),p()<<8|p()];break}}}return{width:Math.ceil((x+1)*16-a*2-o*2),height:(2-_)*(y+1)*16-(_?2:4)*(r+E),pixelRatio:I}},S.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},s}();u.default=h},"./src/demux/id3.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"isHeader",function(){return R}),C.d(u,"isFooter",function(){return h}),C.d(u,"getID3Data",function(){return s}),C.d(u,"canParse",function(){return f}),C.d(u,"getTimeStamp",function(){return a}),C.d(u,"isTimeStampFrame",function(){return o}),C.d(u,"getID3Frames",function(){return E}),C.d(u,"decodeFrame",function(){return g}),C.d(u,"utf8ArrayToStr",function(){return n}),C.d(u,"testables",function(){return l});var R=function(i,L){return L+10<=i.length&&(i[L]===73&&i[L+1]===68&&i[L+2]===51&&(i[L+3]<255&&i[L+4]<255&&(i[L+6]<128&&i[L+7]<128&&i[L+8]<128&&i[L+9]<128)))},h=function(i,L){return L+10<=i.length&&(i[L]===51&&i[L+1]===68&&i[L+2]===73&&(i[L+3]<255&&i[L+4]<255&&(i[L+6]<128&&i[L+7]<128&&i[L+8]<128&&i[L+9]<128)))},s=function(i,L){for(var A=L,b=0;R(i,L);){b+=10;var x=S(i,L+6);b+=x,h(i,L+10)&&(b+=10),L+=b}return b>0?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<L.length;A++){var b=L[A];if(o(b))return d(b)}return},o=function(i){return i&&i.key==="PRIV"&&i.info==="com.apple.streaming.transportStreamTimestamp"},r=function(i){var L=String.fromCharCode(i[0],i[1],i[2],i[3]),A=S(i,4),b=10;return{type:L,size:A,data:i.subarray(b,b+A)}},E=function(i){for(var L=0,A=[];R(i,L);){var b=S(i,L+6);L+=10;for(var x=L+b;L+8<x;){var y=r(i.subarray(L)),_=g(y);_&&A.push(_),L+=y.size+10}h(i,L)&&(L+=10)}return A},g=function(i){return i.type==="PRIV"?m(i):i.type[0]==="W"?p(i):w(i)},m=function(i){if(i.size<2)return;var L=n(i.data,!0),A=new Uint8Array(i.data.subarray(L.length+1));return{key:i.type,info:L,data:A.buffer}},w=function(i){if(i.size<2)return;if(i.type==="TXXX"){var L=1,A=n(i.data.subarray(L),!0);L+=A.length+1;var b=n(i.data.subarray(L));return{key:i.type,info:A,data:b}}var x=n(i.data.subarray(1));return{key:i.type,data:x}},p=function(i){if(i.type==="WXXX"){if(i.size<2)return;var L=1,A=n(i.data.subarray(L),!0);L+=A.length+1;var b=n(i.data.subarray(L));return{key:i.type,info:A,data:b}}var x=n(i.data);return{key:i.type,data:x}},d=function(i){if(i.data.byteLength===8){var L=new Uint8Array(i.data),A=L[3]&1,b=(L[4]<<23)+(L[5]<<15)+(L[6]<<7)+L[7];return b/=45,A&&(b+=4772185884e-2),Math.round(b)}return},n=function(i,L){L===void 0&&(L=!1);var A=T();if(A){var b=A.decode(i);if(L){var x=b.indexOf("\0");return x!==-1?b.substring(0,x):b}return b.replace(/\0/g,"")}for(var y=i.length,_,I,j,M="",G=0;G<y;){if(_=i[G++],_===0&&L)return M;if(_===0||_===3)continue;switch(_>>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;d<n;d++)if(S.probe(w,d))return s.logger.log("MPEG Audio sync word found !"),!0;return!1},g.canParse=function(w,p){return S.canParse(w,p)},g.appendFrame=function(w,p,d){return this.initPTS===null?void 0:S.appendFrame(w,p,d,this.initPTS,this.frameIndex)},E}(R.default);o.minProbeByteLength=4,u.default=o},"./src/demux/mp4demuxer.ts":function(k,u,C){"use strict";C.r(u);var R=C("./src/utils/mp4-tools.ts"),h=C("./src/demux/dummy-demuxed-track.ts"),s=function(){function S(a,o){this.remainderData=null,this.config=void 0,this.config=o}var f=S.prototype;return f.resetTimeStamp=function(){},f.resetInitSegment=function(){},f.resetContiguity=function(){},S.probe=function(o){return Object(R.findBox)({data:o,start:0,end:Math.min(o.length,16384)},["moof"]).length>0},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<w.length&&r(w,p)}function g(w,p){var d=4;return r(w,p)&&d<=w.length-p}function m(w,p){if(p+1<w.length&&r(w,p)){var d=4,n=o(w,p),l=d;n!=null&&n.frameLength&&(l=n.frameLength);var c=p+l;return c===w.length||E(w,c)}return!1}},"./src/demux/sample-aes.ts":function(k,u,C){"use strict";C.r(u);var R=C("./src/crypt/decrypter.ts"),h=C("./src/demux/tsdemuxer.ts"),s=function(){function S(a,o,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new R.default(a,o,{removePKCS7Padding:!1})}var f=S.prototype;return f.decryptBuffer=function(o,r){this.decrypter.decrypt(o,this.keyData.key.buffer,this.keyData.iv.buffer,r)},f.decryptAacSample=function(o,r,E,g){var m=o[r].unit,w=m.subarray(16,m.length-m.length%16),p=w.buffer.slice(w.byteOffset,w.byteOffset+w.length),d=this;this.decryptBuffer(p,function(n){var l=new Uint8Array(n);m.set(l,16),g||d.decryptAacSamples(o,r+1,E)})},f.decryptAacSamples=function(o,r,E){for(;;r++){if(r>=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;J<ee;J++)if(d[J].demux.probe(y)){F=d[J];break}F||(w.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),F={demux:f.default,remux:E.default});var q=this.demuxer,ye=this.remuxer,pe=F.remux,le=F.demux;(!ye||!(ye instanceof pe))&&(this.remuxer=new pe(j,I,M,G)),(!q||!(q instanceof le))&&(this.demuxer=new le(j,I,M),this.probe=le.probe),this.resetInitSegment(B,K,W,z),this.resetInitialTimestamp(H)},b.needsProbing=function(y,_,I){return!this.demuxer||!this.remuxer||_||I},b.getDecrypter=function(){var y=this.decrypter;return y||(y=this.decrypter=new s.default(this.observer,this.config)),y},A}();function c(A,b){var x=null;return A.byteLength>0&&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<b;){if(A[x]===71&&A[x+188]===71&&A[x+2*188]===71)return x;x++}return-1},v.createTrack=function(A,b){return{container:A==="video"||A==="audio"?"video/mp2t":void 0,type:A,id:g[A],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:A==="audio"?b:void 0}};var i=v.prototype;return i.resetInitSegment=function(A,b,x){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=v.createTrack("video",x),this._audioTrack=v.createTrack("audio",x),this._id3Track=v.createTrack("id3",x),this._txtTrack=v.createTrack("text",x),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=A,this.videoCodec=b,this._duration=x},i.resetTimeStamp=function(){},i.resetContiguity=function(){var A=this._audioTrack,b=this._avcTrack,x=this._id3Track;A&&(A.pesData=null),b&&(b.pesData=null),x&&(x.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},i.demux=function(A,b,x,y){x===void 0&&(x=!1),y===void 0&&(y=!1),x||(this.sampleAes=null);var _,I=this._avcTrack,j=this._audioTrack,M=this._id3Track,G=I.pid,K=I.pesData,H=j.pid,z=M.pid,B=j.pesData,W=M.pesData,F=!1,J=this.pmtParsed,ee=this._pmtId,q=A.length;if(this.remainderData&&(A=Object(o.appendUint8Array)(this.remainderData,A),q=A.length,this.remainderData=null),q<188&&!y)return this.remainderData=A,{audioTrack:j,avcTrack:I,id3Track:M,textTrack:this._txtTrack};var ye=Math.max(0,v.syncOffset(A));q-=(q+ye)%188,q<A.byteLength&&!y&&(this.remainderData=new Uint8Array(A.buffer,q,A.buffer.byteLength-q));for(var pe=ye;pe<q;pe+=188)if(A[pe]===71){var le=!!(A[pe+1]&64),Oe=((A[pe+1]&31)<<8)+A[pe+2],xe=(A[pe+3]&48)>>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;re<ie;re++)se.push(B.readUByte()),se.push(B.readUByte()),se.push(B.readUByte());c(x._txtTrack.samples,{type:3,pts:A.pts,bytes:se})}}}}}else if(W===5&&B.bytesAvailable!==0){if(J=!0,F>16){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<te;ae++)Ee[ae]=B.readUByte();c(x._txtTrack.samples,{pts:A.pts,payloadType:W,uuid:be.join(""),userData:Object(S.utf8ArrayToStr)(Ee),userDataBytes:Ee})}}else if(F<B.bytesAvailable)for(var Y=0;Y<F;Y++)B.readUByte()}break}case 7:if(M=!0,G=!0,I&&j&&(j.debug+="SPS "),!y.sps){var X=new s.default(K.data),Q=X.readSPS();y.width=Q.width,y.height=Q.height,y.pixelRatio=Q.pixelRatio,y.sps=[K.data],y.duration=x._duration;for(var he=K.data.subarray(1,4),ce="avc1.",Se=0;Se<3;Se++){var Ke=he[Se].toString(16);Ke.length<2&&(Ke="0"+Ke),ce+=Ke}y.codec=ce}break;case 8:M=!0,I&&j&&(j.debug+="PPS "),y.pps||(y.pps=[K.data]);break;case 9:M=!1,y.audFound=!0,j&&l(j,y),j=x.avcSample=w(!1,A.pts,A.dts,I?"AUD ":"");break;case 12:M=!1;break;default:M=!1,j&&(j.debug+="unknown NAL "+K.type+" ");break}if(j&&M){var Ge=j.units;Ge.push(K)}}),b&&j&&(l(j,y),this.avcSample=null)},i.getLastNalUnit=function(){var A,b=this.avcSample,x;if(!b||b.units.length===0){var y=this._avcTrack.samples;b=y[y.length-1]}if((A=b)!==null&&A!==void 0&&A.units){var _=b.units;x=_[_.length-1]}return x},i.parseAVCNALu=function(A){var b=A.byteLength,x=this._avcTrack,y=x.naluState||0,_=y,I=[],j=0,M,G,K,H=-1,z=0;for(y===-1&&(H=0,z=A[0]&31,y=0,j=1);j<b;){if(M=A[j++],!y){y=M?0:1;continue}if(y===1){y=M?0:2;continue}if(!M)y=3;else if(M===1){if(H>=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<b?(K=A[j]&31,H=j,z=K,y=0):y=-1}else y=0}if(H>=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;G<K-1&&!R.isHeader(_,G);G++);if(G!==b){var H,z;if(G<K-1?(H="AAC PES did not start with ADTS header,offset:"+G,z=!1):(H="no ADTS header found in AAC PES",z=!0),r.logger.warn("parsing error:"+H),this.observer.emit(a.Events.ERROR,a.Events.ERROR,{type:E.ErrorTypes.MEDIA_ERROR,details:E.ErrorDetails.FRAG_PARSING_ERROR,fatal:z,reason:H}),z)return}R.initTrackConfig(x,this.observer,_,G,this.audioCodec);var B;if(A.pts!==void 0)B=A.pts;else if(y){var W=R.getFrameDuration(x.samplerate);B=y.sample.pts+W}else{r.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var F=0;G<K;)if(R.isHeader(_,G)){if(G+5<K){var J=R.appendFrame(x,_,G,B,F);if(J)if(J.missing)this.aacOverFlow=J;else{G+=J.length,F++;continue}}break}else G++},i.parseMPEGPES=function(A){var b=A.data,x=b.length,y=0,_=0,I=A.pts;if(I===void 0){r.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;_<x;)if(h.isHeader(b,_)){var j=h.appendFrame(this._audioTrack,b,_,I,y);if(j)_+=j.length,y++;else break}else _++},i.parseID3PES=function(A){if(A.pts===void 0){r.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(A)},v}();m.minProbeByteLength=188;function w(v,i,L,A){return{key:v,frame:!1,pts:i,dts:L,units:[],debug:A,length:0}}function p(v,i){return(v[i+10]&31)<<8|v[i+11]}function d(v,i,L,A){var b={audio:-1,avc:-1,id3:-1,isAAC:!0},x=(v[i+1]&15)<<8|v[i+2],y=i+3+x-4,_=(v[i+10]&15)<<8|v[i+11];for(i+=12+_;i<y;){var I=(v[i+1]&31)<<8|v[i+2];switch(v[i]){case 207:if(!A){r.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:b.audio===-1&&(b.audio=I);break;case 21:b.id3===-1&&(b.id3=I);break;case 219:if(!A){r.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:b.avc===-1&&(b.avc=I);break;case 3:case 4:L?b.audio===-1&&(b.audio=I,b.isAAC=!1):r.logger.log("MPEG audio found, not supported in this browser");break;case 36:r.logger.warn("Unsupported HEVC stream type found");break;default:break}i+=((v[i+3]&15)<<8|v[i+4])+5}return b}function n(v){var i=0,L,A,b,x,y,_=v.data;if(!v||v.size===0)return null;for(;_[0].length<19&&_.length>1;){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;H<z;H++){L=_[H];var B=L.byteLength;if(G)if(G>B){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.pts<v[A].pts){v.splice(A,0,i);break}}else v.push(i)}function T(v){for(var i=v.byteLength,L=[],A=1;A<i-2;)v[A]===0&&v[A+1]===0&&v[A+2]===3?(L.push(A+2),A+=2):A++;if(L.length===0)return v;var b=i-L.length,x=new Uint8Array(b),y=0;for(A=0;A<b;y++,A++)y===L[0]&&(y++,L.shift()),x[A]=v[y];return x}u.default=m},"./src/errors.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"ErrorTypes",function(){return R}),C.d(u,"ErrorDetails",function(){return h});var R;(function(s){s.NETWORK_ERROR="networkError",s.MEDIA_ERROR="mediaError",s.KEY_SYSTEM_ERROR="keySystemError",s.MUX_ERROR="muxError",s.OTHER_ERROR="otherError"})(R||(R={}));var h;(function(s){s.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",s.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",s.KEY_SYSTEM_NO_SESSION="keySystemNoSession",s.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",s.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",s.MANIFEST_LOAD_ERROR="manifestLoadError",s.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",s.MANIFEST_PARSING_ERROR="manifestParsingError",s.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",s.LEVEL_EMPTY_ERROR="levelEmptyError",s.LEVEL_LOAD_ERROR="levelLoadError",s.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",s.LEVEL_SWITCH_ERROR="levelSwitchError",s.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",s.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",s.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",s.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",s.FRAG_LOAD_ERROR="fragLoadError",s.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",s.FRAG_DECRYPT_ERROR="fragDecryptError",s.FRAG_PARSING_ERROR="fragParsingError",s.REMUX_ALLOC_ERROR="remuxAllocError",s.KEY_LOAD_ERROR="keyLoadError",s.KEY_LOAD_TIMEOUT="keyLoadTimeOut",s.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",s.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",s.BUFFER_APPEND_ERROR="bufferAppendError",s.BUFFER_APPENDING_ERROR="bufferAppendingError",s.BUFFER_STALLED_ERROR="bufferStalledError",s.BUFFER_FULL_ERROR="bufferFullError",s.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",s.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",s.INTERNAL_EXCEPTION="internalException",s.INTERNAL_ABORTED="aborted",s.UNKNOWN="unknown"})(h||(h={}))},"./src/events.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"Events",function(){return R});var R;(function(h){h.MEDIA_ATTACHING="hlsMediaAttaching",h.MEDIA_ATTACHED="hlsMediaAttached",h.MEDIA_DETACHING="hlsMediaDetaching",h.MEDIA_DETACHED="hlsMediaDetached",h.BUFFER_RESET="hlsBufferReset",h.BUFFER_CODECS="hlsBufferCodecs",h.BUFFER_CREATED="hlsBufferCreated",h.BUFFER_APPENDING="hlsBufferAppending",h.BUFFER_APPENDED="hlsBufferAppended",h.BUFFER_EOS="hlsBufferEos",h.BUFFER_FLUSHING="hlsBufferFlushing",h.BUFFER_FLUSHED="hlsBufferFlushed",h.MANIFEST_LOADING="hlsManifestLoading",h.MANIFEST_LOADED="hlsManifestLoaded",h.MANIFEST_PARSED="hlsManifestParsed",h.LEVEL_SWITCHING="hlsLevelSwitching",h.LEVEL_SWITCHED="hlsLevelSwitched",h.LEVEL_LOADING="hlsLevelLoading",h.LEVEL_LOADED="hlsLevelLoaded",h.LEVEL_UPDATED="hlsLevelUpdated",h.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",h.LEVELS_UPDATED="hlsLevelsUpdated",h.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",h.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",h.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",h.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",h.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",h.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",h.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",h.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",h.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",h.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",h.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",h.CUES_PARSED="hlsCuesParsed",h.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",h.INIT_PTS_FOUND="hlsInitPtsFound",h.FRAG_LOADING="hlsFragLoading",h.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",h.FRAG_LOADED="hlsFragLoaded",h.FRAG_DECRYPTED="hlsFragDecrypted",h.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",h.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",h.FRAG_PARSING_METADATA="hlsFragParsingMetadata",h.FRAG_PARSED="hlsFragParsed",h.FRAG_BUFFERED="hlsFragBuffered",h.FRAG_CHANGED="hlsFragChanged",h.FPS_DROP="hlsFpsDrop",h.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",h.ERROR="hlsError",h.DESTROYING="hlsDestroying",h.KEY_LOADING="hlsKeyLoading",h.KEY_LOADED="hlsKeyLoaded",h.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",h.BACK_BUFFER_REACHED="hlsBackBufferReached"})(R||(R={}))},"./src/hls.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"default",function(){return v});var R=C("./node_modules/url-toolkit/src/url-toolkit.js"),h=C.n(R),s=C("./src/loader/playlist-loader.ts"),S=C("./src/loader/key-loader.ts"),f=C("./src/controller/id3-track-controller.ts"),a=C("./src/controller/latency-controller.ts"),o=C("./src/controller/level-controller.ts"),r=C("./src/controller/fragment-tracker.ts"),E=C("./src/controller/stream-controller.ts"),g=C("./src/is-supported.ts"),m=C("./src/utils/logger.ts"),w=C("./src/config.ts"),p=C("./node_modules/eventemitter3/index.js"),d=C.n(p),n=C("./src/events.ts"),l=C("./src/errors.ts");function c(i,L){for(var A=0;A<L.length;A++){var b=L[A];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(i,b.key,b)}}function T(i,L,A){return L&&c(i.prototype,L),A&&c(i,A),i}var v=function(){i.isSupported=function(){return Object(g.isSupported)()};function i(A){A===void 0&&(A={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new p.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var b=this.config=Object(w.mergeConfig)(i.DefaultConfig,A);this.userConfig=A,Object(m.enableLogs)(b.debug),this._autoLevelCapping=-1,b.progressive&&Object(w.enableStreamingMode)(b);var x=b.abrController,y=b.bufferController,_=b.capLevelController,I=b.fpsController,j=this.abrController=new x(this),M=this.bufferController=new y(this),G=this.capLevelController=new _(this),K=new I(this),H=new s.default(this),z=new S.default(this),B=new f.default(this),W=this.levelController=new o.default(this),F=new r.FragmentTracker(this),J=this.streamController=new E.default(this,F);G.setStreamController(J),K.setStreamController(J);var ee=[W,J];this.networkControllers=ee;var q=[H,z,j,M,G,K,B,F];this.audioTrackController=this.createController(b.audioTrackController,null,ee),this.createController(b.audioStreamController,F,ee),this.subtitleTrackController=this.createController(b.subtitleTrackController,null,ee),this.createController(b.subtitleStreamController,F,ee),this.createController(b.timelineController,null,q),this.emeController=this.createController(b.emeController,null,q),this.cmcdController=this.createController(b.cmcdController,null,q),this.latencyController=this.createController(a.default,null,q),this.coreComponents=q}var L=i.prototype;return L.createController=function(b,x,y){if(b){var _=x?new b(this,x):new b(this);return y&&y.push(_),_}return null},L.on=function(b,x,y){y===void 0&&(y=this),this._emitter.on(b,x,y)},L.once=function(b,x,y){y===void 0&&(y=this),this._emitter.once(b,x,y)},L.removeAllListeners=function(b){this._emitter.removeAllListeners(b)},L.off=function(b,x,y,_){y===void 0&&(y=this),this._emitter.off(b,x,y,_)},L.listeners=function(b){return this._emitter.listeners(b)},L.emit=function(b,x,y){return this._emitter.emit(b,x,y)},L.trigger=function(b,x){if(this.config.debug)return this.emit(b,b,x);try{return this.emit(b,b,x)}catch(y){m.logger.error("An internal error happened while handling event "+b+'. Error message: "'+y.message+'". Here is a stacktrace:',y),this.trigger(n.Events.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:b,error:y})}return!1},L.listenerCount=function(b){return this._emitter.listenerCount(b)},L.destroy=function(){m.logger.log("destroy"),this.trigger(n.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(b){return b.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(b){return b.destroy()}),this.coreComponents.length=0},L.attachMedia=function(b){m.logger.log("attachMedia"),this._media=b,this.trigger(n.Events.MEDIA_ATTACHING,{media:b})},L.detachMedia=function(){m.logger.log("detachMedia"),this.trigger(n.Events.MEDIA_DETACHING,void 0),this._media=null},L.loadSource=function(b){this.stopLoad();var x=this.media,y=this.url,_=this.url=R.buildAbsoluteURL(self.location.href,b,{alwaysNormalize:!0});m.logger.log("loadSource:"+_),x&&y&&y!==_&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(x)),this.trigger(n.Events.MANIFEST_LOADING,{url:b})},L.startLoad=function(b){b===void 0&&(b=-1),m.logger.log("startLoad("+b+")"),this.networkControllers.forEach(function(x){x.startLoad(b)})},L.stopLoad=function(){m.logger.log("stopLoad"),this.networkControllers.forEach(function(b){b.stopLoad()})},L.swapAudioCodec=function(){m.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},L.recoverMediaError=function(){m.logger.log("recoverMediaError");var b=this._media;this.detachMedia(),b&&this.attachMedia(b)},L.removeLevel=function(b,x){x===void 0&&(x=0),this.levelController.removeLevel(b,x)},T(i,[{key:"levels",get:function(){var b=this.levelController.levels;return b||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(b){m.logger.log("set currentLevel:"+b),this.loadLevel=b,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(b){m.logger.log("set nextLevel:"+b),this.levelController.manualLevel=b,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(b){m.logger.log("set loadLevel:"+b),this.levelController.manualLevel=b}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(b){this.levelController.nextLoadLevel=b}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(b){m.logger.log("set firstLevel:"+b),this.levelController.firstLevel=b}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(b){m.logger.log("set startLevel:"+b),b!==-1&&(b=Math.max(b,this.minAutoLevel)),this.levelController.startLevel=b}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(b){var x=!!b;x!==this.config.capLevelToPlayerSize&&(x?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=x)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(b){this._autoLevelCapping!==b&&(m.logger.log("set autoLevelCapping:"+b),this._autoLevelCapping=b)}},{key:"bandwidthEstimate",get:function(){var b=this.abrController.bwEstimator;return b?b.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var b=this.levels,x=this.config.minAutoBitrate;if(!b)return 0;for(var y=b.length,_=0;_<y;_++)if(b[_].maxBitrate>x)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<T;i++)v[i-1]=arguments[i];return c=d.call.apply(d,[this].concat(v))||this,c.data=void 0,c.data=l,c}return n}(S(Error))},"./src/loader/fragment.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"ElementaryStreamTypes",function(){return m}),C.d(u,"BaseSegment",function(){return w}),C.d(u,"Fragment",function(){return p}),C.d(u,"Part",function(){return d});var R=C("./src/polyfills/number.ts"),h=C("./node_modules/url-toolkit/src/url-toolkit.js"),s=C.n(h),S=C("./src/utils/logger.ts"),f=C("./src/loader/level-key.ts"),a=C("./src/loader/load-stats.ts");function o(n,l){n.prototype=Object.create(l.prototype),n.prototype.constructor=n,r(n,l)}function r(n,l){return r=Object.setPrototypeOf||function(T,v){return T.__proto__=v,T},r(n,l)}function E(n,l){for(var c=0;c<l.length;c++){var T=l[c];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(n,T.key,T)}}function g(n,l,c){return l&&E(n.prototype,l),c&&E(n,c),n}var m;(function(n){n.AUDIO="audio",n.VIDEO="video",n.AUDIOVIDEO="audiovideo"})(m||(m={}));var w=function(){function n(c){var T;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(T={},T[m.AUDIO]=null,T[m.VIDEO]=null,T[m.AUDIOVIDEO]=null,T),this.baseurl=c}var l=n.prototype;return l.setByteRange=function(T,v){var i=T.split("@",2),L=[];i.length===1?L[0]=v?v.byteRangeEndOffset:0:L[0]=parseInt(i[1]),L[1]=parseInt(i[0])+L[0],this._byteRange=L},g(n,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(h.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(T){this._url=T}}]),n}(),p=function(n){o(l,n);function l(T,v){var i;return i=n.call(this,v)||this,i._decryptdata=null,i.rawProgramDateTime=null,i.programDateTime=null,i.tagList=[],i.duration=0,i.sn=0,i.levelkey=void 0,i.type=void 0,i.loader=null,i.level=-1,i.cc=0,i.startPTS=void 0,i.endPTS=void 0,i.appendedPTS=void 0,i.startDTS=void 0,i.endDTS=void 0,i.start=0,i.deltaPTS=void 0,i.maxStartPTS=void 0,i.minEndPTS=void 0,i.stats=new a.LoadStats,i.urlId=0,i.data=void 0,i.bitrateTest=!1,i.title=null,i.initSegment=null,i.type=T,i}var c=l.prototype;return c.createInitializationVector=function(v){for(var i=new Uint8Array(16),L=12;L<16;L++)i[L]=v>>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;r<o.length;r++){var E=o[r];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(a,E.key,E)}}function s(a,o,r){return o&&h(a.prototype,o),r&&h(a,r),a}var S=10,f=function(){function a(r){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=r}var o=a.prototype;return o.reloaded=function(E){if(!E){this.advanced=!0,this.updated=!0;return}var g=this.lastPartSn-E.lastPartSn,m=this.lastPartIndex-E.lastPartIndex;this.updated=this.endSN!==E.endSN||!!m||!!g,this.advanced=this.endSN>E.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;r<o.length;r++){var E=o[r];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(a,E.key,E)}}function S(a,o,r){return o&&s(a.prototype,o),r&&s(a,r),a}var f=function(){a.fromURL=function(r,E){return new a(r,E)},a.fromURI=function(r){return new a(r)};function a(o,r){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,r?this._uri=Object(R.buildAbsoluteURL)(o,r,{alwaysNormalize:!0}):this._uri=o}return S(a,[{key:"uri",get:function(){return this._uri}}]),a}()},"./src/loader/load-stats.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"LoadStats",function(){return R});var R=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"default",function(){return l});var R=C("./src/polyfills/number.ts"),h=C("./node_modules/url-toolkit/src/url-toolkit.js"),s=C.n(h),S=C("./src/loader/fragment.ts"),f=C("./src/loader/level-details.ts"),a=C("./src/loader/level-key.ts"),o=C("./src/utils/attr-list.ts"),r=C("./src/utils/logger.ts"),E=C("./src/utils/codecs.ts"),g=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,m=/#EXT-X-MEDIA:(.*)/g,w=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),p=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),d=/\.(mp4|m4s|m4v|m4a)$/i;function n(L){var A,b;return d.test((A=(b=h.parseURL(L))===null||b===void 0?void 0:b.path)!=null?A:"")}var l=function(){function L(){}return L.findGroup=function(b,x){for(var y=0;y<b.length;y++){var _=b[y];if(_.id===x)return _}},L.convertAVC1ToAVCOTI=function(b){var x=b.split(".");if(x.length>2){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<J.length&&!(typeof J[ee]!="undefined");ee++);var ie=(" "+J[ee]).slice(1),se=(" "+J[ee+1]).slice(1),re=J[ee+2]?(" "+J[ee+2]).slice(1):"";switch(ie){case"PLAYLIST-TYPE":j.type=se.toUpperCase();break;case"MEDIA-SEQUENCE":K=j.startSN=parseInt(se);break;case"SKIP":{var be=new o.AttrList(se),Z=be.decimalInteger("SKIPPED-SEGMENTS");if(Object(R.isFiniteNumber)(Z)){j.skippedSegments=Z;for(var te=Z;te--;)M.unshift(null);K+=Z}var Ee=be.enumeratedString("RECENTLY-REMOVED-DATERANGES");Ee&&(j.recentlyRemovedDateranges=Ee.split(" "));break}case"TARGETDURATION":j.targetduration=parseFloat(se);break;case"VERSION":j.version=parseInt(se);break;case"EXTM3U":break;case"ENDLIST":j.live=!1;break;case"#":(se||re)&&F.tagList.push(re?[se,re]:[se]);break;case"DIS":B++;case"GAP":F.tagList.push([ie]);break;case"BITRATE":F.tagList.push([ie,se]);break;case"DISCONTINUITY-SEQ":B=parseInt(se);break;case"KEY":{var ae,Y=new o.AttrList(se),X=Y.enumeratedString("METHOD"),Q=Y.URI,he=Y.hexadecimalInteger("IV"),ce=Y.enumeratedString("KEYFORMATVERSIONS"),Se=Y.enumeratedString("KEYID"),Ke=(ae=Y.enumeratedString("KEYFORMAT"))!=null?ae:"identity",Ge=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Ge.indexOf(Ke)>-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<o;E++)r[E-1]=arguments[E];for(var g=r.length,m=g;g--;)a+=r[g].byteLength;var w=new Uint8Array(a);for(w[0]=a>>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<m;g++)w.set(r[g],a),a+=r[g].byteLength;return w},s.hdlr=function(f){return s.box(s.types.hdlr,s.HDLR_TYPES[f])},s.mdat=function(f){return s.box(s.types.mdat,f)},s.mdhd=function(f,a){a*=f;var o=Math.floor(a/(R+1)),r=Math.floor(a%(R+1));return s.box(s.types.mdhd,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,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<a.length;r++)E=a[r].flags,o[r+4]=E.dependsOn<<4|E.isDependedOn<<2|E.hasRedundancy;return s.box(s.types.sdtp,o)},s.stbl=function(f){return s.box(s.types.stbl,s.stsd(f),s.box(s.types.stts,s.STTS),s.box(s.types.stsc,s.STSC),s.box(s.types.stsz,s.STSZ),s.box(s.types.stco,s.STCO))},s.avc1=function(f){var a=[],o=[],r,E,g;for(r=0;r<f.sps.length;r++)E=f.sps[r],g=E.byteLength,a.push(g>>>8&255),a.push(g&255),a=a.concat(Array.prototype.slice.call(E));for(r=0;r<f.pps.length;r++)E=f.pps[r],g=E.byteLength,o.push(g>>>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<r;m++)w=o[m],p=w.duration,d=w.size,n=w.flags,l=w.cts,g.set([p>>>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;A<arguments.length;A++){var b=arguments[A];for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(L[x]=b[x])}return L},E.apply(this,arguments)}var g=10*1e3,m=1024,w=1152,p=null,d=null,n=!1,l=function(){function L(b,x,y,_){if(_===void 0&&(_=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=b,this.config=x,this.typeSupported=y,this.ISGenerated=!1,p===null){var I=navigator.userAgent||"",j=I.match(/Chrome\/(\d+)/i);p=j?parseInt(j[1]):0}if(d===null){var M=navigator.userAgent.match(/Safari\/(\d+)/i);d=M?parseInt(M[1]):0}n=!!p&&p<75||!!d&&d<600}var A=L.prototype;return A.destroy=function(){},A.resetTimeStamp=function(x){a.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=x},A.resetNextTimestamp=function(){a.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},A.resetInitSegment=function(){a.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},A.getVideoStartPts=function(x){var y=!1,_=x.reduce(function(I,j){var M=j.pts-I;return M<-4294967296?(y=!0,c(I,j.pts)):M>0?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;xe<K;xe++){var ie=M[xe];if(ie.pts=c(ie.pts-H,z),ie.dts=c(ie.dts-H,z),ie.dts>ie.pts){var se=9e4*.2;ye=Math.max(Math.min(ye,ie.pts-ie.dts),-1*se)}ie.dts<M[xe>0?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(ye<re*-2){a.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(r.toMsFromMpegTsClock)(-re,!0)+" ms");for(var be=ye,Z=0;Z<K;Z++)M[Z].dts=be=Math.max(be,M[Z].pts-re),M[Z].pts=Math.max(be,M[Z].pts)}else{a.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(r.toMsFromMpegTsClock)(ye,!0)+" ms to overcome this issue");for(var te=0;te<K;te++)M[te].dts=M[te].dts+ye}F=M[0].dts}if(_){var Ee=F-z,ae=Ee>re,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;ce<K;ce++){for(var Se=M[ce],Ke=Se.units,Ge=Ke.length,Ye=0,Qe=0;Qe<Ge;Qe++)Ye+=Ke[Qe].data.length;he+=Ye,Q+=Ge,Se.length=Ye,Se.dts=Math.max(Se.dts,F),Se.pts=Math.max(Se.pts,Se.dts,0),ee=Math.min(Se.pts,ee),q=Math.max(Se.pts,q)}J=M[K-1].dts;var rt=he+4*Q+8,qe;try{qe=new Uint8Array(rt)}catch(_t){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:f.ErrorTypes.MUX_ERROR,details:f.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:rt,reason:"fail allocating video mdat "+rt});return}var Le=new DataView(qe.buffer);Le.setUint32(0,rt),qe.set(s.default.types.mdat,4);for(var Ce=0;Ce<K;Ce++){for(var Ve=M[Ce],tt=Ve.units,He=0,$e=0,Me=tt.length;$e<Me;$e++){var De=tt[$e],Te=De.data,de=De.data.byteLength;Le.setUint32(B,de),B+=4,qe.set(Te,B),B+=de,He+=4+de}if(Ce<K-1)W=M[Ce+1].dts-Ve.dts;else{var ge=this.config,we=Ve.dts-M[Ce>0?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<J.length;Oe++){var ie=J[Oe],se=ie.pts,re=se-xe,be=Math.abs(1e3*re/M);if(re<=-le*z&&pe)Oe===0&&(a.logger.warn("Audio frame @ "+(se/M).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*re/M)+" ms."),this.nextAudioPts=q=xe=se);else if(re>=le*z&&be<g&&pe){var Z=Math.round(re/z);xe=se-Z*z,xe<0&&(Z--,xe+=z),Oe===0&&(this.nextAudioPts=q=xe),a.logger.warn("[mp4-remuxer]: Injecting "+Z+" audio frame @ "+(xe/M).toFixed(3)+"s due to "+Math.round(1e3*re/M)+" ms gap.");for(var te=0;te<Z;te++){var Ee=Math.max(xe,0),ae=h.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);ae||(a.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ae=ie.unit.subarray()),J.splice(Oe,0,{unit:ae,pts:Ee}),xe+=z,Oe++}}ie.pts=xe,xe+=z}for(var Y=null,X=null,Q,he=0,ce=J.length;ce--;)he+=J[ce].unit.byteLength;for(var Se=0,Ke=J.length;Se<Ke;Se++){var Ge=J[Se],Ye=Ge.unit,Qe=Ge.pts;if(X!==null){var rt=F[Se-1];rt.duration=Math.round((Qe-X)/K)}else if(_&&x.isAAC&&(Qe=q),Y=Qe,he>0){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;ee<W;ee++){var q=H+ee*B;J.push({unit:F,pts:q,dts:q})}return x.samples=J,this.remuxAudio(x,y,_,!1)},A.remuxID3=function(x,y){var _=x.samples.length;if(!_)return;for(var I=x.inputTimeScale,j=this._initPTS,M=this._initDTS,G=0;G<_;G++){var K=x.samples[G];K.pts=c(K.pts-j,y*I)/I,K.dts=c(K.dts-M,y*I)/I}var H=x.samples;return x.samples=[],{samples:H}},A.remuxText=function(x,y){var _=x.samples.length;if(!_)return;for(var I=x.inputTimeScale,j=this._initPTS,M=0;M<_;M++){var G=x.samples[M];G.pts=c(G.pts-j,y*I)/I}x.samples.sort(function(H,z){return H.pts-z.pts});var K=x.samples;return x.samples=[],{samples:K}},L}();function c(L,A){var b;if(A===null)return L;for(A<L?b=-8589934592:b=8589934592;Math.abs(L-A)>4294967296;)L+=b;return L}function T(L){for(var A=0;A<L.length;A++)if(L[A].key)return A;return-1}var v=function(A,b,x,y){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=b,this.size=x,this.cts=y,this.flags=new i(A)},i=function(A){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=A?2:1,this.isNonSync=A?0:1}},"./src/remux/passthrough-remuxer.ts":function(k,u,C){"use strict";C.r(u);var R=C("./src/polyfills/number.ts"),h=C("./src/utils/mp4-tools.ts"),s=C("./src/loader/fragment.ts"),S=C("./src/utils/logger.ts"),f=function(){function r(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var E=r.prototype;return E.destroy=function(){},E.resetTimeStamp=function(m){this.initPTS=m,this.lastEndDTS=null},E.resetNextTimestamp=function(){this.lastEndDTS=null},E.resetInitSegment=function(m,w,p){this.audioCodec=w,this.videoCodec=p,this.generateInitSegment(m),this.emitInitSegment=!0},E.generateInitSegment=function(m){var w=this.audioCodec,p=this.videoCodec;if(!m||!m.byteLength){this.initTracks=void 0,this.initData=void 0;return}var d=this.initData=Object(h.parseInitSegment)(m);w||(w=o(d.audio,s.ElementaryStreamTypes.AUDIO)),p||(p=o(d.video,s.ElementaryStreamTypes.VIDEO));var n={};d.audio&&d.video?n.audiovideo={container:"video/mp4",codec:w+","+p,initSegment:m,id:"main"}:d.audio?n.audio={container:"audio/mp4",codec:w,initSegment:m,id:"audio"}:d.video?n.video={container:"video/mp4",codec:p,initSegment:m,id:"main"}:S.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n},E.remux=function(m,w,p,d,n){var l=this.initPTS,c=this.lastEndDTS,T={audio:void 0,video:void 0,text:d,id3:p,initSegment:void 0};Object(R.isFiniteNumber)(c)||(c=this.lastEndDTS=n||0);var v=w.samples;if(!v||!v.length)return T;var i={initPTS:void 0,timescale:1},L=this.initData;if((!L||!L.length)&&(this.generateInitSegment(v),L=this.initData),!L||!L.length)return S.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),T;this.emitInitSegment&&(i.tracks=this.initTracks,this.emitInitSegment=!1),Object(R.isFiniteNumber)(l)||(this.initPTS=i.initPTS=l=a(L,v,c));var A=Object(h.getDuration)(v,L),b=c,x=A+b;Object(h.offsetStartDTS)(L,v,l),A>0?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;E<r.length;E++){var g=r[E];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(o,g.key,g)}}function h(o,r,E){return r&&R(o.prototype,r),E&&R(o,E),o}var s;(function(o){o.No="",o.Yes="YES",o.v2="v2"})(s||(s={}));function S(o,r){var E=o.canSkipUntil,g=o.canSkipDateRanges,m=o.endSN,w=r!==void 0?r-m:0;return E&&w<E?g?s.v2:s.Yes:s.No}var f=function(){function o(E,g,m){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=E,this.part=g,this.skip=m}var r=o.prototype;return r.addDirectives=function(g){var m=new self.URL(g);return this.msn!==void 0&&m.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&m.searchParams.set("_HLS_part",this.part.toString()),this.skip&&m.searchParams.set("_HLS_skip",this.skip),m.toString()},o}(),a=function(){function o(r){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[r.url],this.attrs=r.attrs,this.bitrate=r.bitrate,r.details&&(this.details=r.details),this.id=r.id||0,this.name=r.name,this.width=r.width||0,this.height=r.height||0,this.audioCodec=r.audioCodec,this.videoCodec=r.videoCodec,this.unknownCodecs=r.unknownCodecs,this.codecSet=[r.videoCodec,r.audioCodec].filter(function(E){return E}).join(",").replace(/\.[^.,]+/g,"")}return h(o,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(E){var g=E%this.url.length;this._urlId!==g&&(this.details=void 0,this._urlId=g)}}]),o}()},"./src/types/loader.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"PlaylistContextType",function(){return R}),C.d(u,"PlaylistLevelType",function(){return h});var R;(function(s){s.MANIFEST="manifest",s.LEVEL="level",s.AUDIO_TRACK="audioTrack",s.SUBTITLE_TRACK="subtitleTrack"})(R||(R={}));var h;(function(s){s.MAIN="main",s.AUDIO="audio",s.SUBTITLE="subtitle"})(h||(h={}))},"./src/types/transmuxer.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"ChunkMetadata",function(){return R});var R=function(S,f,a,o,r,E){o===void 0&&(o=0),r===void 0&&(r=-1),E===void 0&&(E=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=h(),this.buffering={audio:h(),video:h(),audiovideo:h()},this.level=S,this.sn=f,this.id=a,this.size=o,this.part=r,this.partial=E};function h(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"AttrList",function(){return s});var R=/^(\d+)x(\d+)$/,h=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,s=function(){function S(a){typeof a=="string"&&(a=S.parseAttrList(a));for(var o in a)a.hasOwnProperty(o)&&(this[o]=a[o])}var f=S.prototype;return f.decimalInteger=function(o){var r=parseInt(this[o],10);return r>Number.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;g<r.length/2;g++)E[g]=parseInt(r.slice(g*2,g*2+2),16);return E}else return null},f.hexadecimalIntegerAsNumber=function(o){var r=parseInt(this[o],16);return r>Number.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.length;E++)if(o>=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;m<E.length;m++)g.push({start:E.start(m),end:E.end(m)});return this.bufferedInfo(g,o,r)}}catch(w){}return{len:0,start:o,end:o,nextStart:void 0}},S.bufferedInfo=function(a,o,r){o=Math.max(0,o),a.sort(function(i,L){var A=i.start-L.start;return A||L.end-i.end});var E=[];if(r)for(var g=0;g<a.length;g++){var m=E.length;if(m){var w=E[m-1].end;a[g].start-w<r?a[g].end>w&&(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<E.length;c++){var T=E[c].start,v=E[c].end;if(o+r>=T&&o<v)n=T,l=v,p=l-o;else if(o+r<T){d=T;break}}return{len:p,start:n||0,end:l||0,nextStart:d}},S.getBuffered=function(a){try{return a.buffered}catch(o){return R.logger.log("failed to get media.buffered",o),h}},S}()},"./src/utils/cea-608-parser.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"Row",function(){return l}),C.d(u,"CaptionScreen",function(){return c});var R=C("./src/utils/logger.ts"),h={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},s=function(x){var y=x;return h.hasOwnProperty(x)&&(y=h[x]),String.fromCharCode(y)},S=15,f=100,a={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},o={17:2,18:4,21:6,22:8,23:10,19:13,20:15},r={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},E={25:2,26:4,29:6,30:8,31:10,27:13,28:15},g=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],m;(function(b){b[b.ERROR=0]="ERROR",b[b.TEXT=1]="TEXT",b[b.WARNING=2]="WARNING",b[b.INFO=2]="INFO",b[b.DEBUG=3]="DEBUG",b[b.DATA=3]="DATA"})(m||(m={}));var w=function(){function b(){this.time=null,this.verboseLevel=m.ERROR}var x=b.prototype;return x.log=function(_,I){this.verboseLevel>=_&&R.logger.log(this.time+" ["+_+"] "+I)},b}(),p=function(x){for(var y=[],_=0;_<x.length;_++)y.push(x[_].toString(16));return y},d=function(){function b(y,_,I,j,M){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=y||"white",this.underline=_||!1,this.italics=I||!1,this.background=j||"black",this.flash=M||!1}var x=b.prototype;return x.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},x.setStyles=function(_){for(var I=["foreground","underline","italics","background","flash"],j=0;j<I.length;j++){var M=I[j];_.hasOwnProperty(M)&&(this[M]=_[M])}},x.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},x.equals=function(_){return this.foreground===_.foreground&&this.underline===_.underline&&this.italics===_.italics&&this.background===_.background&&this.flash===_.flash},x.copy=function(_){this.foreground=_.foreground,this.underline=_.underline,this.italics=_.italics,this.background=_.background,this.flash=_.flash},x.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},b}(),n=function(){function b(y,_,I,j,M,G){this.uchar=void 0,this.penState=void 0,this.uchar=y||" ",this.penState=new d(_,I,j,M,G)}var x=b.prototype;return x.reset=function(){this.uchar=" ",this.penState.reset()},x.setChar=function(_,I){this.uchar=_,this.penState.copy(I)},x.setPenState=function(_){this.penState.copy(_)},x.equals=function(_){return this.uchar===_.uchar&&this.penState.equals(_.penState)},x.copy=function(_){this.uchar=_.uchar,this.penState.copy(_.penState)},x.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},b}(),l=function(){function b(y){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var _=0;_<f;_++)this.chars.push(new n);this.logger=y,this.pos=0,this.currPenState=new d}var x=b.prototype;return x.equals=function(_){for(var I=!0,j=0;j<f;j++)if(!this.chars[j].equals(_.chars[j])){I=!1;break}return I},x.copy=function(_){for(var I=0;I<f;I++)this.chars[I].copy(_.chars[I])},x.isEmpty=function(){for(var _=!0,I=0;I<f;I++)if(!this.chars[I].isEmpty()){_=!1;break}return _},x.setCursor=function(_){this.pos!==_&&(this.pos=_),this.pos<0?(this.logger.log(m.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>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<I+1;j++)this.chars[j].setPenState(this.currPenState);this.setCursor(I)},x.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},x.insertChar=function(_){_>=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=_;I<f;I++)this.chars[I].reset()},x.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},x.clearToEndOfRow=function(){this.clearFromPos(this.pos)},x.getTextString=function(){for(var _=[],I=!0,j=0;j<f;j++){var M=this.chars[j].uchar;M!==" "&&(I=!1),_.push(M)}return I?"":_.join("")},x.setPenStyles=function(_){this.currPenState.setStyles(_);var I=this.chars[this.pos];I.setPenState(this.currPenState)},b}(),c=function(){function b(y){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var _=0;_<S;_++)this.rows.push(new l(y));this.logger=y,this.currRow=S-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var x=b.prototype;return x.reset=function(){for(var _=0;_<S;_++)this.rows[_].clear();this.currRow=S-1},x.equals=function(_){for(var I=!0,j=0;j<S;j++)if(!this.rows[j].equals(_.rows[j])){I=!1;break}return I},x.copy=function(_){for(var I=0;I<S;I++)this.rows[I].copy(_.rows[I])},x.isEmpty=function(){for(var _=!0,I=0;I<S;I++)if(!this.rows[I].isEmpty()){_=!1;break}return _},x.backSpace=function(){var _=this.rows[this.currRow];_.backSpace()},x.clearToEndOfRow=function(){var _=this.rows[this.currRow];_.clearToEndOfRow()},x.insertChar=function(_){var I=this.rows[this.currRow];I.insertChar(_)},x.setPen=function(_){var I=this.rows[this.currRow];I.setPenStyles(_)},x.moveCursor=function(_){var I=this.rows[this.currRow];I.moveCursor(_)},x.setCursor=function(_){this.logger.log(m.INFO,"setCursor: "+_);var I=this.rows[this.currRow];I.setCursor(_)},x.setPAC=function(_){this.logger.log(m.INFO,"pacData = "+JSON.stringify(_));var I=_.row-1;if(this.nrRollUpRows&&I<this.nrRollUpRows-1&&(I=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==I){for(var j=0;j<S;j++)this.rows[j].clear();var M=this.currRow+1-this.nrRollUpRows,G=this.lastOutputScreen;if(G){var K=G.rows[M].cueStartTime,H=this.logger.time;if(K&&H!==null&&K<H)for(var z=0;z<this.nrRollUpRows;z++)this.rows[I-this.nrRollUpRows+z+1].copy(G.rows[M+z])}}this.currRow=I;var B=this.rows[this.currRow];if(_.indent!==null){var W=_.indent,F=Math.max(W-1,0);B.setCursor(_.indent),_.color=B.chars[F].penState.foreground}var J={foreground:_.color,underline:_.underline,italics:_.italics,background:"black",flash:!1};this.setPen(J)},x.setBkgData=function(_){this.logger.log(m.INFO,"bkgData = "+JSON.stringify(_)),this.backSpace(),this.setPen(_),this.insertChar(32)},x.setRollUpRows=function(_){this.nrRollUpRows=_},x.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(m.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(m.TEXT,this.getDisplayText());var _=this.currRow+1-this.nrRollUpRows,I=this.rows.splice(_,1)[0];I.clear(),this.rows.splice(this.currRow,0,I),this.logger.log(m.INFO,"Rolling up")},x.getDisplayText=function(_){_=_||!1;for(var I=[],j="",M=-1,G=0;G<S;G++){var K=this.rows[G].getTextString();K&&(M=G+1,_?I.push("Row "+M+": '"+K+"'"):I.push(K.trim()))}return I.length>0&&(_?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<I.length;H+=2){if(M=I[H]&127,G=I[H+1]&127,M===0&&G===0)continue;if(this.logger.log(m.DATA,"["+p([I[H],I[H+1]])+"] -> ("+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;_<Object.keys(this.channels).length;_++){var I=this.channels[_];I&&I.reset()}this.cmdHistory=A()},x.cueSplitAtTime=function(_){for(var I=0;I<this.channels.length;I++){var j=this.channels[I];j&&j.cueSplitAtTime(_)}},b}();function i(b,x,y){y.a=b,y.b=x}function L(b,x,y){return y.a===b&&y.b===x}function A(){return{a:null,b:null}}u.default=v},"./src/utils/codecs.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"isCodecType",function(){return h}),C.d(u,"isCodecSupportedInMp4",function(){return s});var R={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function h(S,f){var a=R[f];return!!a&&a[S.slice(0,4)]===!0}function s(S,f){return MediaSource.isTypeSupported((f||"video")+'/mp4;codecs="'+S+'"')}},"./src/utils/cues.ts":function(k,u,C){"use strict";C.r(u);var R=C("./src/utils/vttparser.ts"),h=C("./src/utils/webvtt-parser.ts"),s=C("./src/utils/texttrack-utils.ts"),S=/\s/,f={newCue:function(o,r,E,g){for(var m=[],w,p,d,n,l,c=self.VTTCue||self.TextTrackCue,T=0;T<g.rows.length;T++)if(w=g.rows[T],d=!0,n=0,l="",!w.isEmpty()){for(var v=0;v<w.chars.length;v++)S.test(w.chars[v].uchar)&&d?n++:(l+=w.chars[v].uchar,d=!1);w.cueStartTime=r,r===E&&(E+=1e-4),n>=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;c<T;c++){var v=d[c];if(v&&v.cc===n){l=v;break}}return l}function f(d,n,l){return!!(n.details&&(l.endCC>l.startCC||d&&d.cc<l.startCC))}function a(d,n){var l=d.fragments,c=n.fragments;if(!c.length||!l.length){h.logger.log("No fragments to align");return}var T=S(l,c[0].cc);if(!T||T&&!T.startPTS){h.logger.log("No frag in previous level to align on");return}return T}function o(d,n){if(d){var l=d.start+n;d.start=d.startPTS=l,d.endPTS=l+d.duration}}function r(d,n){for(var l=n.fragments,c=0,T=l.length;c<T;c++)o(l[c],d);n.fragmentHint&&o(n.fragmentHint,d),n.alignedSliding=!0}function E(d,n,l){if(!n)return;g(d,l,n),!l.alignedSliding&&n.details&&m(l,n.details),!l.alignedSliding&&n.details&&!l.skippedSegments&&Object(s.adjustSliding)(n.details,l)}function g(d,n,l){if(f(d,l,n)){var c=a(l.details,n);c&&Object(R.isFiniteNumber)(c.start)&&(h.logger.log("Adjusting PTS using last level due to CC increase within current level "+n.url),r(c.start,n))}}function m(d,n){if(!n.fragments.length||!d.hasProgramDateTime||!n.hasProgramDateTime)return;var l=n.fragments[0].programDateTime,c=d.fragments[0].programDateTime,T=(c-l)/1e3+n.fragments[0].start;T&&Object(R.isFiniteNumber)(T)&&(h.logger.log("Adjusting PTS using programDateTime delta "+(c-l)+"ms, sliding:"+T.toFixed(3)+" "+d.url+" "),r(T,d))}function w(d,n){var l=d.programDateTime;if(!l)return;var c=(l-n)/1e3;d.start=d.startPTS=c,d.endPTS=c+d.duration}function p(d,n){if(!n.fragments.length||!d.hasProgramDateTime||!n.hasProgramDateTime)return;var l=n.fragments[0].programDateTime,c=n.fragments[0].start,T=l-c*1e3;d.fragments.forEach(function(v){w(v,T)}),d.fragmentHint&&w(d.fragmentHint,T),d.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(k,u,C){"use strict";C.r(u);var R=C("./src/utils/ewma.ts"),h=function(){function s(f,a,o){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=o,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new R.default(f),this.fast_=new R.default(a)}var S=s.prototype;return S.update=function(a,o){var r=this.slow_,E=this.fast_;this.slow_.halfLife!==a&&(this.slow_=new R.default(a,r.getEstimate(),r.getTotalWeight())),this.fast_.halfLife!==o&&(this.fast_=new R.default(o,E.getEstimate(),E.getTotalWeight()))},S.sample=function(a,o){a=Math.max(a,this.minDelayMs_);var r=8*o,E=a/1e3,g=r/E;this.fast_.sample(E,g),this.slow_.sample(E,g)},S.canEstimate=function(){var a=this.fast_;return a&&a.getTotalWeight()>=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<arguments.length;T++){var v=arguments[T];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(c[i]=v[i])}return c},m.apply(this,arguments)}function w(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(c){}return!1}var p=function(){function c(v){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=v.fetchSetup||n,this.controller=new self.AbortController,this.stats=new h.LoadStats}var T=c.prototype;return T.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},T.abortInternal=function(){var i=this.response;(!i||!i.ok)&&(this.stats.aborted=!0,this.controller.abort())},T.abort=function(){var i;this.abortInternal(),(i=this.callbacks)!==null&&i!==void 0&&i.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},T.load=function(i,L,A){var b=this,x=this.stats;if(x.loading.start)throw new Error("Loader can only be used once.");x.loading.start=self.performance.now();var y=d(i,this.controller.signal),_=A.onProgress,I=i.responseType==="arraybuffer",j=I?"byteLength":"length";this.context=i,this.config=L,this.callbacks=A,this.request=this.fetchSetup(i,y),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){b.abortInternal(),A.onTimeout(x,i,b.response)},L.timeout),self.fetch(this.request).then(function(M){if(b.response=b.loader=M,!M.ok){var G=M.status,K=M.statusText;throw new l(K||"fetch, bad network response",G,M)}return x.loading.first=Math.max(self.performance.now(),x.loading.start),x.total=parseInt(M.headers.get("Content-Length")||"0"),_&&Object(R.isFiniteNumber)(L.highWaterMark)?b.loadProgressively(M,x,i,L.highWaterMark,_):I?M.arrayBuffer():M.text()}).then(function(M){var G=b.response;self.clearTimeout(b.requestTimeout),x.loading.end=Math.max(self.performance.now(),x.loading.first),x.loaded=x.total=M[j];var K={url:G.url,data:M};_&&!Object(R.isFiniteNumber)(L.highWaterMark)&&_(x,i,M,G),A.onSuccess(K,x,i,G)}).catch(function(M){if(self.clearTimeout(b.requestTimeout),x.aborted)return;var G=M.code||0;A.onError({code:G,text:M.message},i,M.details)})},T.getCacheAge=function(){var i=null;if(this.response){var L=this.response.headers.get("age");i=L?parseFloat(L):null}return i},T.loadProgressively=function(i,L,A,b,x){b===void 0&&(b=0);var y=new s.default,_=i.body.getReader(),I=function j(){return _.read().then(function(M){if(M.done)return y.dataLength&&x(L,A,y.flush(),i),Promise.resolve(new ArrayBuffer(0));var G=M.value,K=G.length;return L.loaded+=K,K<b||y.dataLength?(y.push(G),y.dataLength>=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<arguments.length;x++){var y=arguments[x];for(var _ in y)Object.prototype.hasOwnProperty.call(y,_)&&(b[_]=y[_])}return b},o.apply(this,arguments)}var r="stpp.ttml.im1t",E=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,g=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,m={left:"start",center:"center",right:"end",start:"start",end:"end"};function w(b,x,y,_,I){var j=Object(R.findBox)(new Uint8Array(b),["mdat"]);if(j.length===0){I(new Error("Could not parse IMSC1 mdat"));return}var M=j[0],G=Object(S.utf8ArrayToStr)(new Uint8Array(b,M.start,M.end-M.start)),K=Object(f.toTimescaleFromScale)(x,1,y);try{_(p(G,K))}catch(H){I(H)}}function p(b,x){var y=new DOMParser,_=y.parseFromString(b,"text/xml"),I=_.getElementsByTagName("tt")[0];if(!I)throw new Error("Invalid ttml");var j={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},M=Object.keys(j).reduce(function(B,W){return B[W]=I.getAttribute("ttp:"+W)||j[W],B},{}),G=I.getAttribute("xml:space")!=="preserve",K=n(d(I,"styling","style")),H=n(d(I,"layout","region")),z=d(I,"body","[begin]");return[].map.call(z,function(B){var W=l(B,G);if(!W||!B.hasAttribute("begin"))return null;var F=i(B.getAttribute("begin"),M),J=i(B.getAttribute("dur"),M),ee=i(B.getAttribute("end"),M);if(F===null)throw v(B);if(ee===null){if(J===null)throw v(B);ee=F+J}var q=new s.default(F-x,ee-x,W);q.id=Object(a.generateCueId)(q.startTime,q.endTime,q.text);var ye=H[B.getAttribute("region")],pe=K[B.getAttribute("style")];q.position=10,q.size=80;var le=c(ye,pe),Oe=le.textAlign;if(Oe){var xe=m[Oe];xe&&(q.lineAlign=xe),q.align=Oe}return o(q,le),q}).filter(function(B){return B!==null})}function d(b,x,y){var _=b.getElementsByTagName(x)[0];return _?[].slice.call(_.querySelectorAll(y)):[]}function n(b){return b.reduce(function(x,y){var _=y.getAttribute("xml:id");return _&&(x[_]=y),x},{})}function l(b,x){return[].slice.call(b.childNodes).reduce(function(y,_,I){var j;return _.nodeName==="br"&&I?y+`
`:(j=_.childNodes)!==null&&j!==void 0&&j.length?l(_,x):x?y+_.textContent.trim().replace(/\s+/g," "):y+_.textContent},"")}function c(b,x){var y="http://www.w3.org/ns/ttml#styling",_=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return _.reduce(function(I,j){var M=T(x,y,j)||T(b,y,j);return M&&(I[j]=M),I},{})}function T(b,x,y){return b.hasAttributeNS(x,y)?b.getAttributeNS(x,y):null}function v(b){return new Error("Could not parse ttml timestamp "+b)}function i(b,x){if(!b)return null;var y=Object(h.parseTimeStamp)(b);return y===null&&(E.test(b)?y=L(b,x):g.test(b)&&(y=A(b,x))),y}function L(b,x){var y=E.exec(b),_=(y[4]|0)+(y[5]|0)/x.subFrameRate;return(y[1]|0)*3600+(y[2]|0)*60+(y[3]|0)+_/x.frameRate}function A(b,x){var y=g.exec(b),_=Number(y[1]),I=y[2];switch(I){case"h":return _*3600;case"m":return _*60;case"ms":return _*1e3;case"f":return _/x.frameRate;case"t":return _/x.tickRate}return _}},"./src/utils/logger.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"enableLogs",function(){return a}),C.d(u,"logger",function(){return o});var R=function(){},h={trace:R,debug:R,log:R,warn:R,info:R,error:R},s=h;function S(r){var E=self.console[r];return E?E.bind(self.console,"["+r+"] >"):R}function f(r){for(var E=arguments.length,g=new Array(E>1?E-1:0),m=1;m<E;m++)g[m-1]=arguments[m];g.forEach(function(w){s[w]=r[w]?r[w].bind(r):S(w)})}function a(r){if(self.console&&r===!0||typeof r=="object"){f(r,"debug","log","info","warn","error");try{s.log()}catch(E){s=h}}else s=h}var o=s},"./src/utils/mediakeys-helper.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"KeySystems",function(){return R}),C.d(u,"requestMediaKeySystemAccess",function(){return h});var R;(function(s){s.WIDEVINE="com.widevine.alpha",s.PLAYREADY="com.microsoft.playready"})(R||(R={}));var h=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"getMediaSource",function(){return R});function R(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"bin2str",function(){return f}),C.d(u,"readUint16",function(){return a}),C.d(u,"readUint32",function(){return o}),C.d(u,"writeUint32",function(){return r}),C.d(u,"findBox",function(){return E}),C.d(u,"parseSegmentIndex",function(){return g}),C.d(u,"parseInitSegment",function(){return m}),C.d(u,"getStartDTS",function(){return w}),C.d(u,"getDuration",function(){return p}),C.d(u,"computeRawDurationFromSamples",function(){return d}),C.d(u,"offsetStartDTS",function(){return n}),C.d(u,"segmentValidRange",function(){return l}),C.d(u,"appendUint8Array",function(){return c});var R=C("./src/utils/typed-array.ts"),h=C("./src/loader/fragment.ts"),s=Math.pow(2,32)-1,S=[].push;function f(T){return String.fromCharCode.apply(null,T)}function a(T,v){"data"in T&&(v+=T.start,T=T.data);var i=T[v]<<8|T[v+1];return i<0?65536+i:i}function o(T,v){"data"in T&&(v+=T.start,T=T.data);var i=T[v]<<24|T[v+1]<<16|T[v+2]<<8|T[v+3];return i<0?4294967296+i:i}function r(T,v,i){"data"in T&&(v+=T.start,T=T.data),T[v]=i>>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;x<b;){var y=o(L,x),_=f(L.subarray(x+4,x+8)),I=y>1?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<K;H++){var z=_,B=o(x,z);z+=4;var W=B&2147483647,F=(B&2147483648)>>>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;L<i.length;L++){var A=i[L],b=E(A,["tkhd"])[0];if(b){var x=b.data[b.start],y=x===0?12:20,_=o(b,y),I=E(A,["mdia","mdhd"])[0];if(I){x=I.data[I.start],y=x===0?12:20;var j=o(I,y),M=E(A,["mdia","hdlr"])[0];if(M){var G=f(M.data.subarray(M.start+8,M.start+12)),K={soun:h.ElementaryStreamTypes.AUDIO,vide:h.ElementaryStreamTypes.VIDEO}[G];if(K){var H=E(A,["mdia","minf","stbl","stsd"])[0],z=void 0;H&&(z=f(H.data.subarray(H.start+12,H.start+16))),v[_]={timescale:j,type:K},v[K]={timescale:j,id:_,codec:z}}}}}}var B=E(T,["moov","mvex","trex"]);return B.forEach(function(W){var F=o(W,4),J=v[F];J&&(J.default={duration:o(W,12),flags:o(W,20)})}),v}function w(T,v){return E(v,["moof","traf"]).reduce(function(i,L){var A=E(L,["tfdt"])[0],b=A.data[A.start],x=E(L,["tfhd"]).reduce(function(y,_){var I=o(_,4),j=T[I];if(j){var M=o(A,4);b===1&&(M*=Math.pow(2,32),M+=o(A,8));var G=j.timescale||9e4,K=M/G;if(isFinite(K)&&(y===null||K<y))return K}return y},null);return x!==null&&isFinite(x)&&(i===null||x<i)?x:i},null)||0}function p(T,v){for(var i=0,L=0,A=0,b=E(T,["moof","traf"]),x=0;x<b.length;x++){var y=b[x],_=E(y,["tfhd"])[0],I=o(_,4),j=v[I];if(!j)continue;var M=j.default,G=o(_,0)|(M==null?void 0:M.flags),K=M==null?void 0:M.duration;G&8&&(G&2?K=o(_,12):K=o(_,8));for(var H=j.timescale||9e4,z=E(y,["trun"]),B=0;B<z.length;B++){if(K){var W=o(z[B],4);i=K*W}else i=d(z[B]);j.type===h.ElementaryStreamTypes.VIDEO?L+=i/H:j.type===h.ElementaryStreamTypes.AUDIO&&(A+=i/H)}}if(L===0&&A===0){var F=g(T);if(F!=null&&F.references)return F.references.reduce(function(J,ee){return J+ee.info.duration||0},0)}return L||A}function d(T){var v=o(T,0),i=8;v&1&&(i+=4),v&4&&(i+=4);for(var L=0,A=o(T,4),b=0;b<A;b++){if(v&256){var x=o(T,i);L+=x,i+=4}v&512&&(i+=4),v&1024&&(i+=4),v&2048&&(i+=4)}return L}function n(T,v,i){E(v,["moof","traf"]).forEach(function(L){E(L,["tfhd"]).forEach(function(A){var b=o(A,4),x=T[b];if(!x)return;var y=x.timescale||9e4;E(L,["tfdt"]).forEach(function(_){var I=_.data[_.start],j=o(_,4);if(I===0)r(_,4,j-i*y);else{j*=Math.pow(2,32),j+=o(_,8),j-=i*y,j=Math.max(j,0);var M=Math.floor(j/(s+1)),G=Math.floor(j%(s+1));r(_,4,M),r(_,8,G)}})})})}function l(T){var v={valid:null,remainder:null},i=E(T,["moof"]);if(i){if(i.length<2)return v.remainder=T,v}else return v;var L=i[i.length-1];return v.valid=Object(R.sliceUint8)(T,0,L.start-8),v.remainder=Object(R.sliceUint8)(T,L.start-8),v}function c(T,v){var i=new Uint8Array(T.length+v.length);return i.set(T),i.set(v,T.length),i}},"./src/utils/output-filter.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"default",function(){return R});var R=function(){function h(S,f){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=S,this.trackName=f}var s=h.prototype;return s.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},s.newCue=function(f,a,o){(this.startTime===null||this.startTime>f)&&(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;p<w.length;p++)r.removeCue(w[p]);m==="disabled"&&(r.mode=m)}function a(r,E){if(E<r[0].startTime)return 0;var g=r.length-1;if(E>r[g].endTime)return-1;for(var m=0,w=g;m<=w;){var p=Math.floor((w+m)/2);if(E<r[p].startTime)w=p-1;else if(E>r[p].startTime&&m<g)m=p+1;else return p}return r[m].startTime-E<E-r[w].startTime?m:w}function o(r,E,g){var m=[],w=a(r,E);if(w>-1)for(var p=w,d=r.length;p<d;p++){var n=r[p];if(n.startTime>=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;a<f;a++)S+="["+s.start(a).toFixed(3)+","+s.end(a).toFixed(3)+"]";return S}};u.default=R},"./src/utils/timescale-conversion.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"toTimescaleFromBase",function(){return h}),C.d(u,"toTimescaleFromScale",function(){return s}),C.d(u,"toMsFromMpegTsClock",function(){return S}),C.d(u,"toMpegTsClockFromTimescale",function(){return f});var R=9e4;function h(a,o,r,E){r===void 0&&(r=1),E===void 0&&(E=!1);var g=a*o*r;return E?Math.round(g):g}function s(a,o,r,E){return r===void 0&&(r=1),E===void 0&&(E=!1),h(a,o,1/r,E)}function S(a,o){return o===void 0&&(o=!1),h(a,1e3,1/R,o)}function f(a,o){return o===void 0&&(o=1),h(a,R,1/o)}},"./src/utils/typed-array.ts":function(k,u,C){"use strict";C.r(u),C.d(u,"sliceUint8",function(){return R});function R(h,s,S){return Uint8Array.prototype.slice?h.slice(s,S):new Uint8Array(Array.prototype.slice.call(h,s,S))}},"./src/utils/vttcue.ts":function(k,u,C){"use strict";C.r(u),u.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var R=["","lr","rl"],h=["start","middle","end","left","right"];function s(r,E){if(typeof E!="string")return!1;if(!Array.isArray(r))return!1;var g=E.toLowerCase();return~r.indexOf(g)?g:!1}function S(r){return s(R,r)}function f(r){return s(h,r)}function a(r){for(var E=arguments.length,g=new Array(E>1?E-1:0),m=1;m<E;m++)g[m-1]=arguments[m];for(var w=1;w<arguments.length;w++){var p=arguments[w];for(var d in p)r[d]=p[d]}return r}function o(r,E,g){var m=this,w={enumerable:!0};m.hasBeenReset=!1;var p="",d=!1,n=r,l=E,c=g,T=null,v="",i=!0,L="auto",A="start",b=50,x="middle",y=50,_="middle";Object.defineProperty(m,"id",a({},w,{get:function(){return p},set:function(j){p=""+j}})),Object.defineProperty(m,"pauseOnExit",a({},w,{get:function(){return d},set:function(j){d=!!j}})),Object.defineProperty(m,"startTime",a({},w,{get:function(){return n},set:function(j){if(typeof j!="number")throw new TypeError("Start time must be set to a number.");n=j,this.hasBeenReset=!0}})),Object.defineProperty(m,"endTime",a({},w,{get:function(){return l},set:function(j){if(typeof j!="number")throw new TypeError("End time must be set to a number.");l=j,this.hasBeenReset=!0}})),Object.defineProperty(m,"text",a({},w,{get:function(){return c},set:function(j){c=""+j,this.hasBeenReset=!0}})),Object.defineProperty(m,"region",a({},w,{get:function(){return T},set:function(j){T=j,this.hasBeenReset=!0}})),Object.defineProperty(m,"vertical",a({},w,{get:function(){return v},set:function(j){var M=S(j);if(M===!1)throw new SyntaxError("An invalid or illegal string was specified.");v=M,this.hasBeenReset=!0}})),Object.defineProperty(m,"snapToLines",a({},w,{get:function(){return i},set:function(j){i=!!j,this.hasBeenReset=!0}})),Object.defineProperty(m,"line",a({},w,{get:function(){return L},set:function(j){if(typeof j!="number"&&j!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");L=j,this.hasBeenReset=!0}})),Object.defineProperty(m,"lineAlign",a({},w,{get:function(){return A},set:function(j){var M=f(j);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");A=M,this.hasBeenReset=!0}})),Object.defineProperty(m,"position",a({},w,{get:function(){return b},set:function(j){if(j<0||j>100)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<l.length;++c)if(n===l[c]){this.set(d,n);break}},w.integer=function(d,n){/^-?\d+$/.test(n)&&this.set(d,parseInt(n,10))},w.percent=function(d,n){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(n)){var l=parseFloat(n);if(l>=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(/<br(?: \/)?>/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<A.length&&A[b]!=="\r"&&A[b]!==`
`;)++b;var x=A.substr(0,b);return A[b]==="\r"&&++b,A[b]===`
`&&++b,n.buffer=A.substr(b),x}function c(A){f(A,function(b,x){},/:/)}try{var T="";if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;T=l();var v=T.match(/^()?WEBVTT([ \t].*)?$/);if(!v||!v[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var i=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;i?i=!1:T=l();switch(n.state){case"HEADER":/:/.test(T)?c(T):T||(n.state="ID");continue;case"NOTE":T||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(T)){n.state="NOTE";break}if(!T)continue;if(n.cue=new R.default(0,0,""),n.state="CUE",T.indexOf("-->")===-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<tt;$e+=1)He($e);return Ce}function A(Le){var Ce=Le.stickyOffsets,Ve=Le.columns,tt=Le.flattenColumns,He=Le.onHeaderRow,$e=s.useContext(l.a),Me=$e.prefixCls,De=$e.getComponent,Te=s.useMemo(function(){return L(Ve)},[Ve]),de=De(["header","wrapper"],"thead"),ge=De(["header","row"],"tr"),we=De(["header","cell"],"th");return s.createElement(de,{className:"".concat(Me,"-thead")},Te.map(function(_e,Ue){var Xe=s.createElement(i,{key:Ue,flattenColumns:tt,cells:_e,stickyOffsets:Ce,rowComponent:ge,cellComponent:we,onHeaderRow:He,index:Ue});return Xe}))}var b=A,x=P("hW8S");function y(Le){for(var Ce=Le.colWidths,Ve=Le.columns,tt=Le.columCount,He=[],$e=tt||Ve.length,Me=!1,De=$e-1;De>=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;tt<Ce;tt+=1){var He=Le[tt];if(He!==void 0)Ve[tt]=He;else return null}return Ve},[Le.join("_"),Ce])}var j=s.forwardRef(function(Le,Ce){var Ve=Le.noData,tt=Le.columns,He=Le.flattenColumns,$e=Le.colWidths,Me=Le.columCount,De=Le.stickyOffsets,Te=Le.direction,de=Le.fixHeader,ge=Le.offsetHeader,we=Le.stickyClassName,_e=Le.onScroll,Ue=Object(p.a)(Le,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Xe=s.useContext(l.a),at=Xe.prefixCls,ut=Xe.scrollbarSize,mt=Xe.isSticky,ct=mt&&!de?0:ut,_t=s.useRef(null),At=s.useCallback(function(cr){Object(d.b)(Ce,cr),Object(d.b)(_t,cr)},[]);s.useEffect(function(){var cr;function ir(Ht){var $t=Ht.currentTarget,Kr=Ht.deltaX;Kr&&(_e({currentTarget:$t,scrollLeft:$t.scrollLeft+Kr}),Ht.preventDefault())}return(cr=_t.current)===null||cr===void 0||cr.addEventListener("wheel",ir),function(){var Ht;(Ht=_t.current)===null||Ht===void 0||Ht.removeEventListener("wheel",ir)}},[]);var Et=He[He.length-1],Qt={fixed:Et?Et.fixed:null,onHeaderCell:function(){return{className:"".concat(at,"-cell-scrollbar")}}},qt=Object(s.useMemo)(function(){return ct?[].concat(Object(C.a)(tt),[Qt]):tt},[ct,tt]),Jt=Object(s.useMemo)(function(){return ct?[].concat(Object(C.a)(He),[Qt]):He},[ct,He]),mr=Object(s.useMemo)(function(){var cr=De.right,ir=De.left;return Object(u.a)(Object(u.a)({},De),{},{left:Te==="rtl"?[].concat(Object(C.a)(ir.map(function(Ht){return Ht+ct})),[0]):ir,right:Te==="rtl"?cr:[].concat(Object(C.a)(cr.map(function(Ht){return Ht+ct})),[0]),isSticky:mt})},[ct,De,mt]),Pt=I($e,Me);return s.createElement("div",{style:Object(u.a)({overflow:"hidden"},mt?{top:ge}:{}),ref:At,className:f()("".concat(at,"-header"),Object(k.a)({},we,!!we))},s.createElement("table",{style:{tableLayout:"fixed",visibility:Ve||Pt?null:"hidden"}},s.createElement(_,{colWidths:Pt?[].concat(Object(C.a)(Pt),[ct]):[],columCount:Me+1,columns:Jt}),s.createElement(b,Object.assign({},Ue,{stickyOffsets:mr,columns:qt,flattenColumns:Jt}))))});j.displayName="FixedHeader";var M=j,G=s.createContext(null),K=G;function H(Le){var Ce=Le.prefixCls,Ve=Le.children,tt=Le.component,He=Le.cellComponent,$e=Le.fixHeader,Me=Le.fixColumn,De=Le.horizonScroll,Te=Le.className,de=Le.expanded,ge=Le.componentWidth,we=Le.colSpan,_e=s.useContext(l.a),Ue=_e.scrollbarSize;return s.useMemo(function(){var Xe=Ve;return Me&&(Xe=s.createElement("div",{style:{width:ge-($e?Ue:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ce,"-expanded-row-fixed")},Xe)),s.createElement(tt,{className:Te,style:{display:de?null:"none"}},s.createElement(n.a,{component:He,prefixCls:Ce,colSpan:we},Xe))},[Ve,tt,$e,De,Te,de,ge,we,Ue])}var z=H;function B(Le){var Ce=Le.className,Ve=Le.style,tt=Le.record,He=Le.index,$e=Le.rowKey,Me=Le.getRowKey,De=Le.rowExpandable,Te=Le.expandedKeys,de=Le.onRow,ge=Le.indent,we=ge===void 0?0:ge,_e=Le.rowComponent,Ue=Le.cellComponent,Xe=Le.childrenColumnName,at=s.useContext(l.a),ut=at.prefixCls,mt=at.fixedInfoList,ct=s.useContext(K),_t=ct.fixHeader,At=ct.fixColumn,Et=ct.horizonScroll,Qt=ct.componentWidth,qt=ct.flattenColumns,Jt=ct.expandableType,mr=ct.expandRowByClick,Pt=ct.onTriggerExpand,cr=ct.rowClassName,ir=ct.expandedRowClassName,Ht=ct.indentSize,$t=ct.expandIcon,Kr=ct.expandedRowRender,En=ct.expandIconColumnIndex,Nr=s.useState(!1),Wn=Object(h.a)(Nr,2),gt=Wn[0],Ct=Wn[1],dt=Te&&Te.has(Le.recordKey);s.useEffect(function(){dt&&Ct(!0)},[dt]);var or=Jt==="row"&&(!De||De(tt)),Mr=Jt==="nest",jt=Xe&&tt&&tt[Xe],Rt=or||Mr,Ar;de&&(Ar=de(tt,He));var dn=function(St){if(mr&&Rt&&Pt(tt,St),Ar&&Ar.onClick){for(var kr,Ur=arguments.length,Dr=new Array(Ur>1?Ur-1:0),sr=1;sr<Ur;sr++)Dr[sr-1]=arguments[sr];(kr=Ar).onClick.apply(kr,[St].concat(Dr))}},Sr;typeof cr=="string"?Sr=cr:typeof cr=="function"&&(Sr=cr(tt,He,we));var st=Object(T.a)(qt),Ot=s.createElement(_e,Object.assign({},Ar,{"data-row-key":$e,className:f()(Ce,"".concat(ut,"-row"),"".concat(ut,"-row-level-").concat(we),Sr,Ar&&Ar.className),style:Object(u.a)(Object(u.a)({},Ve),Ar?Ar.style:null),onClick:dn}),qt.map(function(Zr,St){var kr=Zr.render,Ur=Zr.dataIndex,Dr=Zr.className,sr=st[St],wn=mt[St],Lt;St===(En||0)&&Mr&&(Lt=s.createElement(s.Fragment,null,s.createElement("span",{style:{paddingLeft:"".concat(Ht*we,"px")},className:"".concat(ut,"-row-indent indent-level-").concat(we)}),$t({prefixCls:ut,expanded:dt,expandable:jt,record:tt,onExpand:Pt})));var nt;return Zr.onCell&&(nt=Zr.onCell(tt,He)),s.createElement(n.a,Object.assign({className:Dr,ellipsis:Zr.ellipsis,align:Zr.align,component:Ue,prefixCls:ut,key:sr,record:tt,index:He,dataIndex:Ur,render:kr,shouldCellUpdate:Zr.shouldCellUpdate},wn,{appendNode:Lt,additionalProps:nt}))})),jr;if(or&&(gt||dt)){var $r=Kr(tt,He,we+1,dt),ft=ir&&ir(tt,He,we);jr=s.createElement(z,{expanded:dt,className:f()("".concat(ut,"-expanded-row"),"".concat(ut,"-expanded-row-level-").concat(we+1),ft),prefixCls:ut,fixHeader:_t,fixColumn:At,horizonScroll:Et,component:_e,componentWidth:Qt,cellComponent:Ue,colSpan:qt.length},$r)}var gn;return jt&&dt&&(gn=(tt[Xe]||[]).map(function(Zr,St){var kr=Me(Zr,St);return s.createElement(B,Object.assign({},Le,{key:kr,rowKey:kr,record:Zr,recordKey:kr,index:St,indent:we+1}))})),s.createElement(s.Fragment,null,Ot,jr,gn)}B.displayName="BodyRow";var W=B,F=s.createContext(null),J=F;function ee(Le){var Ce=Le.columnKey,Ve=Le.onColumnResize,tt=s.useRef();return s.useEffect(function(){tt.current&&Ve(Ce,tt.current.offsetWidth)},[]),s.createElement(E.a,{onResize:function($e){var Me=$e.offsetWidth;Ve(Ce,Me)}},s.createElement("td",{ref:tt,style:{padding:0,border:0,height:0}},s.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function q(Le){var Ce=Le.data,Ve=Le.getRowKey,tt=Le.measureColumnWidth,He=Le.expandedKeys,$e=Le.onRow,Me=Le.rowExpandable,De=Le.emptyNode,Te=Le.childrenColumnName,de=s.useContext(J),ge=de.onColumnResize,we=s.useContext(l.a),_e=we.prefixCls,Ue=we.getComponent,Xe=s.useContext(K),at=Xe.fixHeader,ut=Xe.horizonScroll,mt=Xe.flattenColumns,ct=Xe.componentWidth;return s.useMemo(function(){var _t=Ue(["body","wrapper"],"tbody"),At=Ue(["body","row"],"tr"),Et=Ue(["body","cell"],"td"),Qt;Ce.length?Qt=Ce.map(function(Jt,mr){var Pt=Ve(Jt,mr);return s.createElement(W,{key:Pt,rowKey:Pt,record:Jt,recordKey:Pt,index:mr,rowComponent:At,cellComponent:Et,expandedKeys:He,onRow:$e,getRowKey:Ve,rowExpandable:Me,childrenColumnName:Te})}):Qt=s.createElement(z,{expanded:!0,className:"".concat(_e,"-placeholder"),prefixCls:_e,fixHeader:at,fixColumn:ut,horizonScroll:ut,component:At,componentWidth:ct,cellComponent:Et,colSpan:mt.length},De);var qt=Object(T.a)(mt);return s.createElement(_t,{className:"".concat(_e,"-tbody")},tt&&s.createElement("tr",{"aria-hidden":"true",className:"".concat(_e,"-measure-row"),style:{height:0}},qt.map(function(Jt){return s.createElement(ee,{key:Jt,columnKey:Jt,onColumnResize:ge})})),Qt)},[Ce,_e,$e,tt,He,Ve,Ue,ct,De,mt])}var ye=s.memo(q);ye.displayName="Body";var pe=ye,le=P("wRmb"),Oe=P("xEkU"),xe=P.n(Oe);function ie(Le){var Ce=Object(s.useRef)(Le),Ve=Object(s.useState)({}),tt=Object(h.a)(Ve,2),He=tt[1],$e=Object(s.useRef)(null),Me=Object(s.useRef)([]);function De(Te){$e.current===null&&(Me.current=[],$e.current=xe()(function(){Me.current.forEach(function(de){Ce.current=de(Ce.current)}),$e.current=null,He({})})),Me.current.push(Te)}return Object(s.useEffect)(function(){return function(){xe.a.cancel($e.current)}},[]),[Ce.current,De]}function se(Le){var Ce=Object(s.useRef)(Le),Ve=Object(s.useRef)(null);function tt(){window.clearTimeout(Ve.current)}function He(Me){Ce.current=Me,tt(),Ve.current=window.setTimeout(function(){Ce.current=null,Ve.current=null},100)}function $e(){return Ce.current}return Object(s.useEffect)(function(){return tt},[]),[He,$e]}function re(Le,Ce,Ve){var tt=Object(s.useMemo)(function(){for(var He=[],$e=[],Me=0,De=0,Te=0;Te<Ce;Te+=1)if(Ve==="rtl"){$e[Te]=De,De+=Le[Te]||0;var de=Ce-Te-1;He[de]=Me,Me+=Le[de]||0}else{He[Te]=Me,Me+=Le[Te]||0;var ge=Ce-Te-1;$e[ge]=De,De+=Le[ge]||0}return{left:He,right:$e}},[Le,Ce,Ve]);return tt}var be=re;function Z(Le){var Ce=Le.className,Ve=Le.children;return s.createElement("div",{className:Ce},Ve)}var te=Z,Ee=P("n6Qo");function ae(Le){var Ce,Ve=Le.prefixCls,tt=Le.record,He=Le.onExpand,$e=Le.expanded,Me=Le.expandable,De="".concat(Ve,"-row-expand-icon");if(!Me)return s.createElement("span",{className:f()(De,"".concat(Ve,"-row-spaced"))});var Te=function(ge){He(tt,ge),ge.stopPropagation()};return s.createElement("span",{className:f()(De,(Ce={},Object(k.a)(Ce,"".concat(Ve,"-row-expanded"),$e),Object(k.a)(Ce,"".concat(Ve,"-row-collapsed"),!$e),Ce)),onClick:Te})}function Y(Le,Ce,Ve){var tt=[];function He($e){($e||[]).forEach(function(Me,De){tt.push(Ce(Me,De)),He(Me[Ve])})}return He(Le),tt}var X=P("zT1h"),Q=P("y0+3"),he=function(Ce,Ve){var tt,He,$e=Ce.scrollBodyRef,Me=Ce.onScroll,De=Ce.offsetScroll,Te=s.useContext(l.a),de=Te.prefixCls,ge=((tt=$e.current)===null||tt===void 0?void 0:tt.scrollWidth)||0,we=((He=$e.current)===null||He===void 0?void 0:He.clientWidth)||0,_e=ge&&we*(we/ge),Ue=s.useRef(),Xe=ie({scrollLeft:0,isHiddenScrollBar:!1}),at=Object(h.a)(Xe,2),ut=at[0],mt=at[1],ct=s.useRef({delta:0,x:0}),_t=s.useState(!1),At=Object(h.a)(_t,2),Et=At[0],Qt=At[1],qt=function(){Qt(!1)},Jt=function(Ht){Ht.persist(),ct.current.delta=Ht.pageX-ut.scrollLeft,ct.current.x=0,Qt(!0),Ht.preventDefault()},mr=function(Ht){var $t,Kr=Ht||(($t=window)===null||$t===void 0?void 0:$t.event),En=Kr.buttons;if(!Et||En===0){Et&&Qt(!1);return}var Nr=ct.current.x+Ht.pageX-ct.current.x-ct.current.delta;Nr<=0&&(Nr=0),Nr+_e>=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(Na<Tt-Zt)}},xr=function(){lr.current&&rn({currentTarget:lr.current})},fn=function(wr){var vr=wr.width;xr(),nt(fr.current?fr.current.offsetWidth:vr)};s.useEffect(function(){return xr},[]),s.useEffect(function(){sn&&xr()},[sn]),s.useEffect(function(){At===Ye&&Qt&&(Qt.body.current=lr.current)});var fa=Kr(["table"],"table"),hn=s.useMemo(function(){return de||(Mn?Te.x==="max-content"?"auto":"fixed":Nn||dr.some(function(Fr){var wr=Fr.ellipsis;return wr})?"fixed":"auto")},[Nn,Mn,dr,de]),oa,sa={colWidths:Jr,columCount:dr.length,stickyOffsets:ta,onHeaderRow:_t,fixHeader:Nn},ba=s.useMemo(function(){return mr?null:typeof mt=="function"?mt():mt},[mr,mt]),hi=s.createElement(pe,{data:Jt,measureColumnWidth:Nn||sn||ia,expandedKeys:Ur,rowExpandable:Ar,getRowKey:En,onRow:ct,emptyNode:ba,childrenColumnName:$r}),Ha=s.createElement(_,{colWidths:dr.map(function(Fr){var wr=Fr.width;return wr}),columns:dr}),Ci=Ue&&s.createElement(Ee.b,null,Ue(Jt)),ni=Kr(["body"]);if(Nn||ia){var ai;typeof ni=="function"?(ai=ni(Jt,{scrollbarSize:ir,ref:lr,onScroll:rn}),sa.colWidths=dr.map(function(Fr,wr){var vr=Fr.width,Qn=wr===er.length-1?vr-ir:vr;return typeof Qn=="number"&&!Number.isNaN(Qn)?Qn:(Object(r.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):ai=s.createElement("div",{style:Object(u.a)(Object(u.a)({},Wa),Ft),onScroll:rn,ref:lr,className:f()("".concat(Ve,"-body"))},s.createElement(fa,{style:Object(u.a)(Object(u.a)({},Kt),{},{tableLayout:hn})},Ha,hi,Ci),ia&&s.createElement(ce,{ref:da,offsetScroll:Oa,scrollBodyRef:lr,onScroll:rn})),oa=s.createElement(s.Fragment,null,at!==!1&&s.createElement(M,Object.assign({noData:!Jt.length},sa,en,{direction:ge,offsetHeader:Ba,stickyClassName:ra,ref:tr,onScroll:rn})),ai)}else oa=s.createElement("div",{style:Object(u.a)(Object(u.a)({},Wa),Ft),className:f()("".concat(Ve,"-content")),onScroll:rn,ref:lr},s.createElement(fa,{style:Object(u.a)(Object(u.a)({},Kt),{},{tableLayout:hn})},Ha,at!==!1&&s.createElement(b,Object.assign({},sa,en)),hi,Ci));var pi=Object(x.b)(Le),Aa=s.createElement("div",Object.assign({className:f()(Ve,tt,(Ce={},Object(k.a)(Ce,"".concat(Ve,"-rtl"),ge==="rtl"),Object(k.a)(Ce,"".concat(Ve,"-ping-left"),Ut),Object(k.a)(Ce,"".concat(Ve,"-ping-right"),on),Object(k.a)(Ce,"".concat(Ve,"-layout-fixed"),de==="fixed"),Object(k.a)(Ce,"".concat(Ve,"-fixed-header"),Nn),Object(k.a)(Ce,"".concat(Ve,"-fixed-column"),Mn),Object(k.a)(Ce,"".concat(Ve,"-scroll-horizontal"),sn),Object(k.a)(Ce,"".concat(Ve,"-has-fix-left"),dr[0]&&dr[0].fixed),Object(k.a)(Ce,"".concat(Ve,"-has-fix-right"),dr[dr.length-1]&&dr[dr.length-1].fixed==="right"),Ce)),style:$e,id:Xe,ref:fr},pi),s.createElement(Qe,{pingLeft:Ut,pingRight:on,props:Object(u.a)(Object(u.a)({},Le),{},{stickyOffsets:ta,mergedExpandedKeys:Ur})},we&&s.createElement(te,{className:"".concat(Ve,"-title")},we(Jt)),s.createElement("div",{className:"".concat(Ve,"-container")},oa),_e&&s.createElement(te,{className:"".concat(Ve,"-footer")},_e(Jt))));sn&&(Aa=s.createElement(E.a,{onResize:fn},Aa));var Ia=s.useMemo(function(){return{prefixCls:Ve,getComponent:Kr,scrollbarSize:ir,direction:ge,fixedInfoList:dr.map(function(Fr,wr){return c(wr,wr,dr,ta,ge)}),isSticky:ia}},[Ve,Kr,ir,ge,dr,ta,ge,ia]),_i=s.useMemo(function(){return Object(u.a)(Object(u.a)({},en),{},{tableLayout:hn,rowClassName:He,expandedRowClassName:Sr,componentWidth:Lt,fixHeader:Nn,fixColumn:Mn,horizonScroll:sn,expandIcon:jr,expandableType:ft,expandRowByClick:Rt,expandedRowRender:or,onTriggerExpand:Dr,expandIconColumnIndex:dn,indentSize:Ot})},[en,hn,He,Sr,Lt,Nn,Mn,sn,jr,ft,Rt,or,Dr,dn,Ot]),ii=s.useMemo(function(){return{onColumnResize:Gt}},[Gt]);return s.createElement(l.a.Provider,{value:Ia},s.createElement(K.Provider,{value:_i},s.createElement(J.Provider,{value:ii},Aa)))}rt.Column=w.a,rt.ColumnGroup=m.a,rt.Summary=Ee.a,rt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var qe=$.b=rt},wMS7:function(N,$,P){/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.0.8/LICENSE */(function(k,u){N.exports=u()})(this,function(){"use strict";function k(Z){if(Array.isArray(Z)){for(var te=0,Ee=Array(Z.length);te<Z.length;te++)Ee[te]=Z[te];return Ee}else return Array.from(Z)}var u=Object.hasOwnProperty,C=Object.setPrototypeOf,R=Object.isFrozen,h=Object.keys,s=Object.freeze,S=Object.seal,f=Object.create,a=typeof Reflect!="undefined"&&Reflect,o=a.apply,r=a.construct;o||(o=function(te,Ee,ae){return te.apply(Ee,ae)}),s||(s=function(te){return te}),S||(S=function(te){return te}),r||(r=function(te,Ee){return new(Function.prototype.bind.apply(te,[null].concat(k(Ee))))});var E=b(Array.prototype.forEach),g=b(Array.prototype.indexOf),m=b(Array.prototype.join),w=b(Array.prototype.pop),p=b(Array.prototype.push),d=b(Array.prototype.slice),n=b(String.prototype.toLowerCase),l=b(String.prototype.match),c=b(String.prototype.replace),T=b(String.prototype.indexOf),v=b(String.prototype.trim),i=b(RegExp.prototype.test),L=x(RegExp),A=x(TypeError);function b(Z){return function(te){for(var Ee=arguments.length,ae=Array(Ee>1?Ee-1:0),Y=1;Y<Ee;Y++)ae[Y-1]=arguments[Y];return o(Z,te,ae)}}function x(Z){return function(){for(var te=arguments.length,Ee=Array(te),ae=0;ae<te;ae++)Ee[ae]=arguments[ae];return r(Z,Ee)}}function y(Z,te){C&&C(Z,null);for(var Ee=te.length;Ee--;){var ae=te[Ee];if(typeof ae=="string"){var Y=n(ae);Y!==ae&&(R(te)||(te[Ee]=Y),ae=Y)}Z[ae]=!0}return Z}function _(Z){var te=f(null),Ee=void 0;for(Ee in Z)o(u,Z,[Ee])&&(te[Ee]=Z[Ee]);return te}var I=s(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),j=s(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"]),M=s(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),G=s(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),K=s(["#text"]),H=s(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns"]),z=s(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),B=s(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),W=s(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),F=S(/\{\{[\s\S]*|[\s\S]*\}\}/gm),J=S(/<%[\s\S]*|[\s\S]*%>/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);te<Z.length;te++)Ee[te]=Z[te];return Ee}else return Array.from(Z)}var ie=function(){return typeof window=="undefined"?null:window},se=function(te,Ee){if((typeof te=="undefined"?"undefined":Oe(te))!=="object"||typeof te.createPolicy!="function")return null;var ae=null,Y="data-tt-policy-suffix";Ee.currentScript&&Ee.currentScript.hasAttribute(Y)&&(ae=Ee.currentScript.getAttribute(Y));var X="dompurify"+(ae?"#"+ae:"");try{return te.createPolicy(X,{createHTML:function(he){return he}})}catch(Q){return console.warn("TrustedTypes policy "+X+" could not be created."),null}};function re(){var Z=arguments.length>0&&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="<remove></remove>"+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("<x/><title>&lt;/title&gt;&lt;img&gt;");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,"&lt;"):nt.innerHTML=c(nt.textContent,/</g,"&lt;")),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]})}}}]);