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.6b79...

298 lines
1.5 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([[211,5,6,7,8,13],{"+NIl":function(F,$,j){(function(N){N(j("VrN/"))})(function(N){"use strict";N.defineMode("stex",function(v,O){"use strict";function M(i,o){i.cmdState.push(o)}function y(i){return i.cmdState.length>0?i.cmdState[i.cmdState.length-1]:null}function m(i){var o=i.cmdState.pop();o&&o.closeBracket()}function S(i){for(var o=i.cmdState,s=o.length-1;s>=0;s--){var u=o[s];if(u.name=="DEFAULT")continue;return u}return{styleIdentifier:function(){return null}}}function b(i,o,s){return function(){this.name=i,this.bracketNo=0,this.style=o,this.styles=s,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var p={};p.importmodule=b("importmodule","tag",["string","builtin"]),p.documentclass=b("documentclass","tag",["","atom"]),p.usepackage=b("usepackage","tag",["atom"]),p.begin=b("begin","tag",["atom"]),p.end=b("end","tag",["atom"]),p.label=b("label","tag",["atom"]),p.ref=b("ref","tag",["atom"]),p.eqref=b("eqref","tag",["atom"]),p.cite=b("cite","tag",["atom"]),p.bibitem=b("bibitem","tag",["atom"]),p.Bibitem=b("Bibitem","tag",["atom"]),p.RBibitem=b("RBibitem","tag",["atom"]),p.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function d(i,o){i.f=o}function t(i,o){var s;if(i.match(/^\\[a-zA-Z@]+/)){var u=i.current().slice(1);return s=p.hasOwnProperty(u)?p[u]:p.DEFAULT,s=new s,M(o,s),d(o,r),s.style}if(i.match(/^\\[$&%#{}_]/))return"tag";if(i.match(/^\\[,;!\/\\]/))return"tag";if(i.match("\\["))return d(o,function(c,f){return l(c,f,"\\]")}),"keyword";if(i.match("\\("))return d(o,function(c,f){return l(c,f,"\\)")}),"keyword";if(i.match("$$"))return d(o,function(c,f){return l(c,f,"$$")}),"keyword";if(i.match("$"))return d(o,function(c,f){return l(c,f,"$")}),"keyword";var a=i.next();if(a=="%")return i.skipToEnd(),"comment";if(a=="}"||a=="]"){if(s=y(o),s)s.closeBracket(a),d(o,r);else return"error";return"bracket"}else return a=="{"||a=="["?(s=p.DEFAULT,s=new s,M(o,s),"bracket"):/\d/.test(a)?(i.eatWhile(/[\w.%]/),"atom"):(i.eatWhile(/[\w\-_]/),s=S(o),s.name=="begin"&&(s.argument=i.current()),s.styleIdentifier())}function l(i,o,s){if(i.eatSpace())return null;if(s&&i.match(s))return d(o,t),"keyword";if(i.match(/^\\[a-zA-Z@]+/))return"tag";if(i.match(/^[a-zA-Z]+/))return"variable-2";if(i.match(/^\\[$&%#{}_]/))return"tag";if(i.match(/^\\[,;!\/]/))return"tag";if(i.match(/^[\^_&]/))return"tag";if(i.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(i.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var u=i.next();return u=="{"||u=="}"||u=="["||u=="]"||u=="("||u==")"?"bracket":u=="%"?(i.skipToEnd(),"comment"):"error"}function r(i,o){var s=i.peek(),u;return s=="{"||s=="["?(u=y(o),u.openBracket(s),i.eat(s),d(o,t),"bracket"):/[ \t\r]/.test(s)?(i.eat(s),null):(d(o,t),m(o),t(i,o))}return{startState:function(){var i=O.inMathMode?function(o,s){return l(o,s)}:t;return{cmdState:[],f:i}},copyState:function(i){return{cmdState:i.cmdState.slice(),f:i.f}},token:function(i,o){return o.f(i,o)},blankLine:function(i){i.f=t,i.cmdState.length=0},lineComment:"%"}}),N.defineMIME("text/x-stex","stex"),N.defineMIME("text/x-latex","stex")})},"+ua5":function(F,$,j){},"19Vz":function(F,$,j){(function(N){N(j("VrN/"))})(function(N){N.defineOption("placeholder","",function(b,p,d){var t=d&&d!=N.Init;if(p&&!t)b.on("blur",y),b.on("change",m),b.on("swapDoc",m),N.on(b.getInputField(),"compositionupdate",b.state.placeholderCompose=function(){M(b)}),m(b);else if(!p&&t){b.off("blur",y),b.off("change",m),b.off("swapDoc",m),N.off(b.getInputField(),"compositionupdate",b.state.placeholderCompose),v(b);var l=b.getWrapperElement();l.className=l.className.replace(" CodeMirror-empty","")}p&&!b.hasFocus()&&y(b)});function v(b){b.state.placeholder&&(b.state.placeholder.parentNode.removeChild(b.state.placeholder),b.state.placeholder=null)}function O(b){v(b);var p=b.state.placeholder=document.createElement("pre");p.style.cssText="height: 0; overflow: visible",p.style.direction=b.getOption("direction"),p.className="CodeMirror-placeholder CodeMirror-line-like";var d=b.getOption("placeholder");typeof d=="string"&&(d=document.createTextNode(d)),p.appendChild(d),b.display.lineSpace.insertBefore(p,b.display.lineSpace.firstChild)}function M(b){setTimeout(function(){var p=!1,d=b.getInputField();d.nodeName=="TEXTAREA"?p=!d.value:b.lineCount()==1&&(p=!/[^\u200b]/.test(d.querySelector(".CodeMirror-line").textContent)),p?O(b):v(b)},20)}function y(b){S(b)&&O(b)}function m(b){var p=b.getWrapperElement(),d=S(b);p.className=p.className.replace(" CodeMirror-empty","")+(d?" CodeMirror-empty":""),d?O(b):v(b)}function S(b){return b.lineCount()===1&&b.getLine(0)===""}})},"1T2W":function(F,$,j){F.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"1eCo":function(F,$,j){(function(N){N(j("VrN/"))})(function(N){"use strict";var v={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},O={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};N.defineMode("xml",function(M,y){var m=M.indentUnit,S={},b=y.htmlMode?v:O;for(var p in b)S[p]=b[p];for(var p in y)S[p]=y[p];var d,t;function l(T,k){function L(K){return k.tokenize=K,K(T,k)}var A=T.next();if(A=="<")return T.eat("!")?T.eat("[")?T.match("CDATA[")?L(o("atom","]]>")):null:T.match("--")?L(o("comment","-->")):T.match("DOCTYPE",!0,!0)?(T.eatWhile(/[\w\._\-]/),L(s(1))):null:T.eat("?")?(T.eatWhile(/[\w\._\-]/),k.tokenize=o("meta","?>"),"meta"):(d=T.eat("/")?"closeTag":"openTag",k.tokenize=r,"tag bracket");if(A=="&"){var G;return T.eat("#")?T.eat("x")?G=T.eatWhile(/[a-fA-F\d]/)&&T.eat(";"):G=T.eatWhile(/[\d]/)&&T.eat(";"):G=T.eatWhile(/[\w\.\-:]/)&&T.eat(";"),G?"atom":"error"}else return T.eatWhile(/[^&<]/),null}l.isInText=!0;function r(T,k){var L=T.next();if(L==">"||L=="/"&&T.eat(">"))return k.tokenize=l,d=L==">"?"endTag":"selfcloseTag","tag bracket";if(L=="=")return d="equals",null;if(L=="<"){k.tokenize=l,k.state=f,k.tagName=k.tagStart=null;var A=k.tokenize(T,k);return A?A+" tag error":"tag error"}else return/[\'\"]/.test(L)?(k.tokenize=i(L),k.stringStartCol=T.column(),k.tokenize(T,k)):(T.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function i(T){var k=function(L,A){for(;!L.eol();)if(L.next()==T){A.tokenize=r;break}return"string"};return k.isInAttribute=!0,k}function o(T,k){return function(L,A){for(;!L.eol();){if(L.match(k)){A.tokenize=l;break}L.next()}return T}}function s(T){return function(k,L){for(var A;(A=k.next())!=null;){if(A=="<")return L.tokenize=s(T+1),L.tokenize(k,L);if(A==">")if(T==1){L.tokenize=l;break}else return L.tokenize=s(T-1),L.tokenize(k,L)}return"meta"}}function u(T,k,L){this.prev=T.context,this.tagName=k,this.indent=T.indented,this.startOfLine=L,(S.doNotIndent.hasOwnProperty(k)||T.context&&T.context.noIndent)&&(this.noIndent=!0)}function a(T){T.context&&(T.context=T.context.prev)}function c(T,k){for(var L;;){if(!T.context)return;if(L=T.context.tagName,!S.contextGrabbers.hasOwnProperty(L)||!S.contextGrabbers[L].hasOwnProperty(k))return;a(T)}}function f(T,k,L){return T=="openTag"?(L.tagStart=k.column(),w):T=="closeTag"?_:f}function w(T,k,L){return T=="word"?(L.tagName=k.current(),t="tag",C):S.allowMissingTagName&&T=="endTag"?(t="tag bracket",C(T,k,L)):(t="error",w)}function _(T,k,L){if(T=="word"){var A=k.current();return L.context&&L.context.tagName!=A&&S.implicitlyClosed.hasOwnProperty(L.context.tagName)&&a(L),L.context&&L.context.tagName==A||S.matchClosing===!1?(t="tag",h):(t="tag error",R)}else return S.allowMissingTagName&&T=="endTag"?(t="tag bracket",h(T,k,L)):(t="error",R)}function h(T,k,L){return T!="endTag"?(t="error",h):(a(L),f)}function R(T,k,L){return t="error",h(T,k,L)}function C(T,k,L){if(T=="word")return t="attribute",g;if(T=="endTag"||T=="selfcloseTag"){var A=L.tagName,G=L.tagStart;return L.tagName=L.tagStart=null,T=="selfcloseTag"||S.autoSelfClosers.hasOwnProperty(A)?c(L,A):(c(L,A),L.context=new u(L,A,G==L.indented)),f}return t="error",C}function g(T,k,L){return T=="equals"?x:(S.allowMissing||(t="error"),C(T,k,L))}function x(T,k,L){return T=="string"?E:T=="word"&&S.allowUnquoted?(t="string",C):(t="error",C(T,k,L))}function E(T,k,L){return T=="string"?E:C(T,k,L)}return{startState:function(T){var k={tokenize:l,state:f,indented:T||0,tagName:null,tagStart:null,context:null};return T!=null&&(k.baseIndent=T),k},token:function(T,k){if(!k.tagName&&T.sol()&&(k.indented=T.indentation()),T.eatSpace())return null;d=null;var L=k.tokenize(T,k);return(L||d)&&L!="comment"&&(t=null,k.state=k.state(d||L,T,k),t&&(L=t=="error"?L+" error":t)),L},indent:function(T,k,L){var A=T.context;if(T.tokenize.isInAttribute)return T.tagStart==T.indented?T.stringStartCol+1:T.indented+m;if(A&&A.noIndent)return N.Pass;if(T.tokenize!=r&&T.tokenize!=l)return L?L.match(/^(\s*)/)[0].length:0;if(T.tagName)return S.multilineTagIndentPastTag!==!1?T.tagStart+T.tagName.length+2:T.tagStart+m*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/<!\[CDATA\[/.test(k))return 0;var G=k&&/^<(\/)?([\w_:\.-]*)/.exec(k);if(G&&G[1])for(;A;)if(A.tagName==G[2]){A=A.prev;break}else if(S.implicitlyClosed.hasOwnProperty(A.tagName))A=A.prev;else break;else if(G)for(;A;){var K=S.contextGrabbers[A.tagName];if(K&&K.hasOwnProperty(G[2]))A=A.prev;else break}for(;A&&A.prev&&!A.startOfLine;)A=A.prev;return A?A.indent+m:T.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(T){T.state==x&&(T.state=C)},xmlCurrentTag:function(T){return T.tagName?{name:T.tagName,close:T.type=="closeTag"}:null},xmlCurrentContext:function(T){for(var k=[],L=T.context;L;L=L.prev)L.tagName&&k.push(L.tagName);return k.reverse()}}}),N.defineMIME("text/xml","xml"),N.defineMIME("application/xml","xml"),N.mimeModes.hasOwnProperty("text/html")||N.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("MlIO"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.Hasher,y=v.x64,m=y.Word,S=y.WordArray,b=v.algo;function p(){return m.create.apply(m,arguments)}var d=[p(1116352408,3609767458),p(1899447441,602891725),p(3049323471,3964484399),p(3921009573,2173295548),p(961987163,4081628472),p(1508970993,3053834265),p(2453635748,2937671579),p(2870763221,3664609560),p(3624381080,2734883394),p(310598401,1164996542),p(607225278,1323610764),p(1426881987,3590304994),p(1925078388,4068182383),p(2162078206,991336113),p(2614888103,633803317),p(3248222580,3479774868),p(3835390401,2666613458),p(4022224774,944711139),p(264347078,2341262773),p(604807628,2007800933),p(770255983,1495990901),p(1249150122,1856431235),p(1555081692,3175218132),p(1996064986,2198950837),p(2554220882,3999719339),p(2821834349,766784016),p(2952996808,2566594879),p(3210313671,3203337956),p(3336571891,1034457026),p(3584528711,2466948901),p(113926993,3758326383),p(338241895,168717936),p(666307205,1188179964),p(773529912,1546045734),p(1294757372,1522805485),p(1396182291,2643833823),p(1695183700,2343527390),p(1986661051,1014477480),p(2177026350,1206759142),p(2456956037,344077627),p(2730485921,1290863460),p(2820302411,3158454273),p(3259730800,3505952657),p(3345764771,106217008),p(3516065817,3606008344),p(3600352804,1432725776),p(4094571909,1467031594),p(275423344,851169720),p(430227734,3100823752),p(506948616,1363258195),p(659060556,3750685593),p(883997877,3785050280),p(958139571,3318307427),p(1322822218,3812723403),p(1537002063,2003034995),p(1747873779,3602036899),p(1955562222,1575990012),p(2024104815,1125592928),p(2227730452,2716904306),p(2361852424,442776044),p(2428436474,593698344),p(2756734187,3733110249),p(3204031479,2999351573),p(3329325298,3815920427),p(3391569614,3928383900),p(3515267271,566280711),p(3940187606,3454069534),p(4118630271,4000239992),p(116418474,1914138554),p(174292421,2731055270),p(289380356,3203993006),p(460393269,320620315),p(685471733,587496836),p(852142971,1086792851),p(1017036298,365543100),p(1126000580,2618297676),p(1288033470,3409855158),p(1501505948,4234509866),p(1607167915,987167468),p(1816402316,1246189591)],t=[];(function(){for(var r=0;r<80;r++)t[r]=p()})();var l=b.SHA512=M.extend({_doReset:function(){this._hash=new S.init([new m.init(1779033703,4089235720),new m.init(3144134277,2227873595),new m.init(1013904242,4271175723),new m.init(2773480762,1595750129),new m.init(1359893119,2917565137),new m.init(2600822924,725511199),new m.init(528734635,4215389547),new m.init(1541459225,327033209)])},_doProcessBlock:function(r,i){for(var o=this._hash.words,s=o[0],u=o[1],a=o[2],c=o[3],f=o[4],w=o[5],_=o[6],h=o[7],R=s.high,C=s.low,g=u.high,x=u.low,E=a.high,T=a.low,k=c.high,L=c.low,A=f.high,G=f.low,K=w.high,W=w.low,z=_.high,U=_.low,P=h.high,H=h.low,V=R,q=C,Z=g,ce=x,he=E,ae=T,xe=k,ge=L,oe=A,se=G,te=K,be=W,ee=z,ie=U,Ee=P,ne=H,J=0;J<80;J++){var X,Q,me=t[J];if(J<16)Q=me.high=r[i+J*2]|0,X=me.low=r[i+J*2+1]|0;else{var fe=t[J-15],Te=fe.high,ze=fe.low,Je=(Te>>>1|ze<<31)^(Te>>>8|ze<<24)^Te>>>7,qe=(ze>>>1|Te<<31)^(ze>>>8|Te<<24)^(ze>>>7|Te<<25),Xe=t[J-2],et=Xe.high,rt=Xe.low,Le=(et>>>19|rt<<13)^(et<<3|rt>>>29)^et>>>6,Oe=(rt>>>19|et<<13)^(rt<<3|et>>>29)^(rt>>>6|et<<26),Ve=t[J-7],Ze=Ve.high,Ne=Ve.low,Ge=t[J-16],De=Ge.high,we=Ge.low;X=qe+Ne,Q=Je+Ze+(X>>>0<qe>>>0?1:0),X=X+Oe,Q=Q+Le+(X>>>0<Oe>>>0?1:0),X=X+we,Q=Q+De+(X>>>0<we>>>0?1:0),me.high=Q,me.low=X}var Ae=oe&te^~oe&ee,de=se&be^~se&ie,_e=V&Z^V&he^Z&he,Se=q&ce^q&ae^ce&ae,Ie=(V>>>28|q<<4)^(V<<30|q>>>2)^(V<<25|q>>>7),ke=(q>>>28|V<<4)^(q<<30|V>>>2)^(q<<25|V>>>7),Ye=(oe>>>14|se<<18)^(oe>>>18|se<<14)^(oe<<23|se>>>9),nt=(se>>>14|oe<<18)^(se>>>18|oe<<14)^(se<<23|oe>>>9),lt=d[J],at=lt.high,ot=lt.low,Ct=ne+nt,bt=Ee+Ye+(Ct>>>0<ne>>>0?1:0),Ct=Ct+de,bt=bt+Ae+(Ct>>>0<de>>>0?1:0),Ct=Ct+ot,bt=bt+at+(Ct>>>0<ot>>>0?1:0),Ct=Ct+X,bt=bt+Q+(Ct>>>0<X>>>0?1:0),ft=ke+Se,jt=Ie+_e+(ft>>>0<ke>>>0?1:0);Ee=ee,ne=ie,ee=te,ie=be,te=oe,be=se,se=ge+Ct|0,oe=xe+bt+(se>>>0<ge>>>0?1:0)|0,xe=he,ge=ae,he=Z,ae=ce,Z=V,ce=q,q=Ct+ft|0,V=bt+jt+(q>>>0<Ct>>>0?1:0)|0}C=s.low=C+q,s.high=R+V+(C>>>0<q>>>0?1:0),x=u.low=x+ce,u.high=g+Z+(x>>>0<ce>>>0?1:0),T=a.low=T+ae,a.high=E+he+(T>>>0<ae>>>0?1:0),L=c.low=L+ge,c.high=k+xe+(L>>>0<ge>>>0?1:0),G=f.low=G+se,f.high=A+oe+(G>>>0<se>>>0?1:0),W=w.low=W+be,w.high=K+te+(W>>>0<be>>>0?1:0),U=_.low=U+ie,_.high=z+ee+(U>>>0<ie>>>0?1:0),H=h.low=H+ne,h.high=P+Ee+(H>>>0<ne>>>0?1:0)},_doFinalize:function(){var r=this._data,i=r.words,o=this._nDataBytes*8,s=r.sigBytes*8;i[s>>>5]|=128<<24-s%32,i[(s+128>>>10<<5)+30]=Math.floor(o/4294967296),i[(s+128>>>10<<5)+31]=o,r.sigBytes=i.length*4,this._process();var u=this._hash.toX32();return u},clone:function(){var r=M.clone.call(this);return r._hash=this._hash.clone(),r},blockSize:1024/32});v.SHA512=M._createHelper(l),v.HmacSHA512=M._createHmacHelper(l)}(),N.SHA512})},"3y9D":function(F,$,j){(function(N,v){F.exports=$=v(j("Ib8C"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.WordArray,y=O.Hasher,m=v.algo,S=[],b=m.SHA1=y.extend({_doReset:function(){this._hash=new M.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(p,d){for(var t=this._hash.words,l=t[0],r=t[1],i=t[2],o=t[3],s=t[4],u=0;u<80;u++){if(u<16)S[u]=p[d+u]|0;else{var a=S[u-3]^S[u-8]^S[u-14]^S[u-16];S[u]=a<<1|a>>>31}var c=(l<<5|l>>>27)+s+S[u];u<20?c+=(r&i|~r&o)+1518500249:u<40?c+=(r^i^o)+1859775393:u<60?c+=(r&i|r&o|i&o)-1894007588:c+=(r^i^o)-899497514,s=o,o=i,i=r<<30|r>>>2,r=l,l=c}t[0]=t[0]+l|0,t[1]=t[1]+r|0,t[2]=t[2]+i|0,t[3]=t[3]+o|0,t[4]=t[4]+s|0},_doFinalize:function(){var p=this._data,d=p.words,t=this._nDataBytes*8,l=p.sigBytes*8;return d[l>>>5]|=128<<24-l%32,d[(l+64>>>9<<4)+14]=Math.floor(t/4294967296),d[(l+64>>>9<<4)+15]=t,p.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var p=y.clone.call(this);return p._hash=this._hash.clone(),p}});v.SHA1=y._createHelper(b),v.HmacSHA1=y._createHmacHelper(b)}(),N.SHA1})},4:function(F,$){},"5VLF":function(F,$,j){"use strict";var N,v;function O(M,y,m){var S=function(b,p){return M.js_beautify(b,p)};return S.js=M.js_beautify,S.css=y.css_beautify,S.html=m.html_beautify,S.js_beautify=M.js_beautify,S.css_beautify=y.css_beautify,S.html_beautify=m.html_beautify,S}!(N=[j("6UM0"),j("TXwP"),j("psGv")],v=function(M,y,m){return O(M,y,m)}.apply($,N),v!==void 0&&(F.exports=v))},"5hvy":function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("MlIO"))})(this,function(N){return function(v){var O=N,M=O.lib,y=M.WordArray,m=M.Hasher,S=O.x64,b=S.Word,p=O.algo,d=[],t=[],l=[];(function(){for(var o=1,s=0,u=0;u<24;u++){d[o+5*s]=(u+1)*(u+2)/2%64;var a=s%5,c=(2*o+3*s)%5;o=a,s=c}for(var o=0;o<5;o++)for(var s=0;s<5;s++)t[o+5*s]=s+(2*o+3*s)%5*5;for(var f=1,w=0;w<24;w++){for(var _=0,h=0,R=0;R<7;R++){if(f&1){var C=(1<<R)-1;C<32?h^=1<<C:_^=1<<C-32}f&128?f=f<<1^113:f<<=1}l[w]=b.create(_,h)}})();var r=[];(function(){for(var o=0;o<25;o++)r[o]=b.create()})();var i=p.SHA3=m.extend({cfg:m.cfg.extend({outputLength:512}),_doReset:function(){for(var o=this._state=[],s=0;s<25;s++)o[s]=new b.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(o,s){for(var u=this._state,a=this.blockSize/2,c=0;c<a;c++){var f=o[s+2*c],w=o[s+2*c+1];f=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360;var _=u[c];_.high^=w,_.low^=f}for(var h=0;h<24;h++){for(var R=0;R<5;R++){for(var C=0,g=0,x=0;x<5;x++){var _=u[R+5*x];C^=_.high,g^=_.low}var E=r[R];E.high=C,E.low=g}for(var R=0;R<5;R++)for(var T=r[(R+4)%5],k=r[(R+1)%5],L=k.high,A=k.low,C=T.high^(L<<1|A>>>31),g=T.low^(A<<1|L>>>31),x=0;x<5;x++){var _=u[R+5*x];_.high^=C,_.low^=g}for(var G=1;G<25;G++){var C,g,_=u[G],K=_.high,W=_.low,z=d[G];z<32?(C=K<<z|W>>>32-z,g=W<<z|K>>>32-z):(C=W<<z-32|K>>>64-z,g=K<<z-32|W>>>64-z);var U=r[t[G]];U.high=C,U.low=g}var P=r[0],H=u[0];P.high=H.high,P.low=H.low;for(var R=0;R<5;R++)for(var x=0;x<5;x++){var G=R+5*x,_=u[G],V=r[G],q=r[(R+1)%5+5*x],Z=r[(R+2)%5+5*x];_.high=V.high^~q.high&Z.high,_.low=V.low^~q.low&Z.low}var _=u[0],ce=l[h];_.high^=ce.high,_.low^=ce.low}},_doFinalize:function(){var o=this._data,s=o.words,u=this._nDataBytes*8,a=o.sigBytes*8,c=this.blockSize*32;s[a>>>5]|=1<<24-a%32,s[(v.ceil((a+1)/c)*c>>>5)-1]|=128,o.sigBytes=s.length*4,this._process();for(var f=this._state,w=this.cfg.outputLength/8,_=w/8,h=[],R=0;R<_;R++){var C=f[R],g=C.high,x=C.low;g=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,h.push(x),h.push(g)}return new y.init(h,w)},clone:function(){for(var o=m.clone.call(this),s=o._state=this._state.slice(0),u=0;u<25;u++)s[u]=s[u].clone();return o}});O.SHA3=m._createHelper(i),O.HmacSHA3=m._createHmacHelper(i)}(Math),N.SHA3})},"5nXd":function(F,$,j){var N=j("MFOe"),v=N.slice,O=N.pluck,M=N.each,y=N.bind,m=N.create,S=N.isList,b=N.isFunction,p=N.isObject;F.exports={createStore:l};var d={version:"2.0.12",enabled:!1,get:function(r,i){var o=this.storage.read(this._namespacePrefix+r);return this._deserialize(o,i)},set:function(r,i){return i===void 0?this.remove(r):(this.storage.write(this._namespacePrefix+r,this._serialize(i)),i)},remove:function(r){this.storage.remove(this._namespacePrefix+r)},each:function(r){var i=this;this.storage.each(function(o,s){r.call(i,i._deserialize(o),(s||"").replace(i._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(r){return this._namespacePrefix=="__storejs_"+r+"_"},createStore:function(){return l.apply(this,arguments)},addPlugin:function(r){this._addPlugin(r)},namespace:function(r){return l(this.storage,this.plugins,r)}};function t(){var r=typeof console=="undefined"?null:console;if(!r)return;var i=r.warn?r.warn:r.log;i.apply(r,arguments)}function l(r,i,o){o||(o=""),r&&!S(r)&&(r=[r]),i&&!S(i)&&(i=[i]);var s=o?"__storejs_"+o+"_":"",u=o?new RegExp("^"+s):null,a=/^[a-zA-Z0-9_\-]*$/;if(!a.test(o))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var c={_namespacePrefix:s,_namespaceRegexp:u,_testStorage:function(w){try{var _="__storejs__test__";w.write(_,_);var h=w.read(_)===_;return w.remove(_),h}catch(R){return!1}},_assignPluginFnProp:function(w,_){var h=this[_];this[_]=function(){var C=v(arguments,0),g=this;function x(){return h?(M(arguments,function(T,k){C[k]=T}),h.apply(g,C)):void 0}var E=[x].concat(C);return w.apply(g,E)}},_serialize:function(w){return JSON.stringify(w)},_deserialize:function(w,_){if(!w)return _;var h="";try{h=JSON.parse(w)}catch(R){h=w}return h!==void 0?h:_},_addStorage:function(w){if(this.enabled)return;this._testStorage(w)&&(this.storage=w,this.enabled=!0)},_addPlugin:function(w){var _=this;if(S(w)){M(w,function(C){_._addPlugin(C)});return}var h=O(this.plugins,function(C){return w===C});if(h)return;if(this.plugins.push(w),!b(w))throw new Error("Plugins must be function values that return objects");var R=w.call(this);if(!p(R))throw new Error("Plugins must return an object of function properties");M(R,function(C,g){if(!b(C))throw new Error("Bad plugin property: "+g+" from plugin "+w.name+". Plugins should only return functions.");_._assignPluginFnProp(C,g)})},addStorage:function(w){t("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(w)}},f=m(c,d,{plugins:[]});return f.raw={},M(f,function(w,_){b(w)&&(f.raw[_]=y(f,w))}),M(r,function(w){f._addStorage(w)}),M(i,function(w){f._addPlugin(w)}),f}},"6+eU":function(F,$,j){"use strict";j.d($,"a",function(){return h});var N=j("wx14"),v=j("rePB"),O=j("VTBJ"),M=j("1OyB"),y=j("vuIU"),m=j("Ji7U"),S=j("LK+K"),b=j("cDcd"),p=j.n(b),d=j("TSYQ"),t=j.n(d),l=function(C){var g,x="".concat(C.rootPrefixCls,"-item"),E=t()(x,"".concat(x,"-").concat(C.page),(g={},Object(v.a)(g,"".concat(x,"-active"),C.active),Object(v.a)(g,C.className,!!C.className),Object(v.a)(g,"".concat(x,"-disabled"),!C.page),g)),T=function(){C.onClick(C.page)},k=function(A){C.onKeyPress(A,C.onClick,C.page)};return p.a.createElement("li",{title:C.showTitle?C.page:null,className:E,onClick:T,onKeyPress:k,tabIndex:"0"},C.itemRender(C.page,"page",p.a.createElement("a",{rel:"nofollow"},C.page)))},r=l,i={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},o=function(R){Object(m.a)(g,R);var C=Object(S.a)(g);function g(){var x;Object(M.a)(this,g);for(var E=arguments.length,T=new Array(E),k=0;k<E;k++)T[k]=arguments[k];return x=C.call.apply(C,[this].concat(T)),x.state={goInputText:""},x.buildOptionText=function(L){return"".concat(L," ").concat(x.props.locale.items_per_page)},x.changeSize=function(L){x.props.changeSize(Number(L))},x.handleChange=function(L){x.setState({goInputText:L.target.value})},x.handleBlur=function(L){var A=x.props,G=A.goButton,K=A.quickGo,W=A.rootPrefixCls,z=x.state.goInputText;if(G||z==="")return;if(L.relatedTarget&&(L.relatedTarget.className.indexOf("".concat(W,"-prev"))>=0||L.relatedTarget.className.indexOf("".concat(W,"-next"))>=0))return;x.setState({goInputText:""}),K(x.getValidValue())},x.go=function(L){var A=x.state.goInputText;if(A==="")return;(L.keyCode===i.ENTER||L.type==="click")&&(x.setState({goInputText:""}),x.props.quickGo(x.getValidValue()))},x}return Object(y.a)(g,[{key:"getValidValue",value:function(){var E=this.state,T=E.goInputText,k=E.current;return!T||isNaN(T)?k:Number(T)}},{key:"getPageSizeOptions",value:function(){var E=this.props,T=E.pageSize,k=E.pageSizeOptions;return k.some(function(L){return L.toString()===T.toString()})?k:k.concat([T.toString()]).sort(function(L,A){var G=isNaN(Number(L))?0:Number(L),K=isNaN(Number(A))?0:Number(A);return G-K})}},{key:"render",value:function(){var E=this,T=this.props,k=T.pageSize,L=T.locale,A=T.rootPrefixCls,G=T.changeSize,K=T.quickGo,W=T.goButton,z=T.selectComponentClass,U=T.buildOptionText,P=T.selectPrefixCls,H=T.disabled,V=this.state.goInputText,q="".concat(A,"-options"),Z=z,ce=null,he=null,ae=null;if(!G&&!K)return null;var xe=this.getPageSizeOptions();if(G&&Z){var ge=xe.map(function(oe,se){return p.a.createElement(Z.Option,{key:se,value:oe.toString()},(U||E.buildOptionText)(oe))});ce=p.a.createElement(Z,{disabled:H,prefixCls:P,showSearch:!1,className:"".concat(q,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(k||xe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(se){return se.parentNode}},ge)}return K&&(W&&(ae=typeof W=="boolean"?p.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:H,className:"".concat(q,"-quick-jumper-button")},L.jump_to_confirm):p.a.createElement("span",{onClick:this.go,onKeyUp:this.go},W)),he=p.a.createElement("div",{className:"".concat(q,"-quick-jumper")},L.jump_to,p.a.createElement("input",{disabled:H,type:"text",value:V,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),L.page,ae)),p.a.createElement("li",{className:"".concat(q)},ce,he)}}]),g}(p.a.Component);o.defaultProps={pageSizeOptions:["10","20","50","100"]};var s=o,u=j("N2Kk");function a(){}function c(R){return typeof R=="number"&&isFinite(R)&&Math.floor(R)===R}function f(R,C,g){return g}function w(R,C,g){var x=typeof R=="undefined"?C.pageSize:R;return Math.floor((g.total-1)/x)+1}var _=function(R){Object(m.a)(g,R);var C=Object(S.a)(g);function g(x){var E;Object(M.a)(this,g),E=C.call(this,x),E.getJumpPrevPage=function(){return Math.max(1,E.state.current-(E.props.showLessItems?3:5))},E.getJumpNextPage=function(){return Math.min(w(void 0,E.state,E.props),E.state.current+(E.props.showLessItems?3:5))},E.getItemIcon=function(G,K){var W=E.props.prefixCls,z=G||p.a.createElement("button",{type:"button","aria-label":K,className:"".concat(W,"-item-link")});return typeof G=="function"&&(z=p.a.createElement(G,Object(O.a)({},E.props))),z},E.savePaginationNode=function(G){E.paginationNode=G},E.isValid=function(G){return c(G)&&G!==E.state.current},E.shouldDisplayQuickJumper=function(){var G=E.props,K=G.showQuickJumper,W=G.pageSize,z=G.total;return z<=W?!1:K},E.handleKeyDown=function(G){(G.keyCode===i.ARROW_UP||G.keyCode===i.ARROW_DOWN)&&G.preventDefault()},E.handleKeyUp=function(G){var K=E.getValidValue(G),W=E.state.currentInputValue;K!==W&&E.setState({currentInputValue:K}),G.keyCode===i.ENTER?E.handleChange(K):G.keyCode===i.ARROW_UP?E.handleChange(K-1):G.keyCode===i.ARROW_DOWN&&E.handleChange(K+1)},E.changePageSize=function(G){var K=E.state.current,W=w(G,E.state,E.props);K=K>W?W:K,W===0&&(K=E.state.current),typeof G=="number"&&("pageSize"in E.props||E.setState({pageSize:G}),"current"in E.props||E.setState({current:K,currentInputValue:K})),E.props.onShowSizeChange(K,G),"onChange"in E.props&&E.props.onChange&&E.props.onChange(K,G)},E.handleChange=function(G){var K=E.props.disabled,W=G;if(E.isValid(W)&&!K){var z=w(void 0,E.state,E.props);W>z?W=z:W<1&&(W=1),"current"in E.props||E.setState({current:W,currentInputValue:W});var U=E.state.pageSize;return E.props.onChange(W,U),W}return E.state.current},E.prev=function(){E.hasPrev()&&E.handleChange(E.state.current-1)},E.next=function(){E.hasNext()&&E.handleChange(E.state.current+1)},E.jumpPrev=function(){E.handleChange(E.getJumpPrevPage())},E.jumpNext=function(){E.handleChange(E.getJumpNextPage())},E.hasPrev=function(){return E.state.current>1},E.hasNext=function(){return E.state.current<w(void 0,E.state,E.props)},E.runIfEnter=function(G,K){if(G.key==="Enter"||G.charCode===13){for(var W=arguments.length,z=new Array(W>2?W-2:0),U=2;U<W;U++)z[U-2]=arguments[U];K.apply(void 0,z)}},E.runIfEnterPrev=function(G){E.runIfEnter(G,E.prev)},E.runIfEnterNext=function(G){E.runIfEnter(G,E.next)},E.runIfEnterJumpPrev=function(G){E.runIfEnter(G,E.jumpPrev)},E.runIfEnterJumpNext=function(G){E.runIfEnter(G,E.jumpNext)},E.handleGoTO=function(G){(G.keyCode===i.ENTER||G.type==="click")&&E.handleChange(E.state.currentInputValue)};var T=x.onChange!==a,k="current"in x;k&&!T&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var L=x.defaultCurrent;"current"in x&&(L=x.current);var A=x.defaultPageSize;return"pageSize"in x&&(A=x.pageSize),L=Math.min(L,w(A,void 0,x)),E.state={current:L,currentInputValue:L,pageSize:A},E}return Object(y.a)(g,[{key:"componentDidUpdate",value:function(E,T){var k=this.props.prefixCls;if(T.current!==this.state.current&&this.paginationNode){var L=this.paginationNode.querySelector(".".concat(k,"-item-").concat(T.current));L&&document.activeElement===L&&L.blur()}}},{key:"getValidValue",value:function(E){var T=E.target.value,k=w(void 0,this.state,this.props),L=this.state.currentInputValue,A;return T===""?A=T:isNaN(Number(T))?A=L:T>=k?A=k:A=Number(T),A}},{key:"getShowSizeChanger",value:function(){var E=this.props,T=E.showSizeChanger,k=E.total,L=E.totalBoundaryShowSizeChanger;return typeof T!="undefined"?T:k>L}},{key:"renderPrev",value:function(E){var T=this.props,k=T.prevIcon,L=T.itemRender,A=L(E,"prev",this.getItemIcon(k,"prev page")),G=!this.hasPrev();return Object(b.isValidElement)(A)?Object(b.cloneElement)(A,{disabled:G}):A}},{key:"renderNext",value:function(E){var T=this.props,k=T.nextIcon,L=T.itemRender,A=L(E,"next",this.getItemIcon(k,"next page")),G=!this.hasNext();return Object(b.isValidElement)(A)?Object(b.cloneElement)(A,{disabled:G}):A}},{key:"render",value:function(){var E=this,T=this.props,k=T.prefixCls,L=T.className,A=T.style,G=T.disabled,K=T.hideOnSinglePage,W=T.total,z=T.locale,U=T.showQuickJumper,P=T.showLessItems,H=T.showTitle,V=T.showTotal,q=T.simple,Z=T.itemRender,ce=T.showPrevNextJumpers,he=T.jumpPrevIcon,ae=T.jumpNextIcon,xe=T.selectComponentClass,ge=T.selectPrefixCls,oe=T.pageSizeOptions,se=this.state,te=se.current,be=se.pageSize,ee=se.currentInputValue;if(K===!0&&W<=be)return null;var ie=w(void 0,this.state,this.props),Ee=[],ne=null,J=null,X=null,Q=null,me=null,fe=U&&U.goButton,Te=P?1:2,ze=te-1>0?te-1:0,Je=te+1<ie?te+1:ie,qe=Object.keys(this.props).reduce(function(de,_e){return(_e.substr(0,5)==="data-"||_e.substr(0,5)==="aria-"||_e==="role")&&(de[_e]=E.props[_e]),de},{});if(q)return fe&&(typeof fe=="boolean"?me=p.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},z.jump_to_confirm):me=p.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},fe),me=p.a.createElement("li",{title:H?"".concat(z.jump_to).concat(te,"/").concat(ie):null,className:"".concat(k,"-simple-pager")},me)),p.a.createElement("ul",Object(N.a)({className:t()(k,"".concat(k,"-simple"),Object(v.a)({},"".concat(k,"-disabled"),G),L),style:A,ref:this.savePaginationNode},qe),p.a.createElement("li",{title:H?z.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:t()("".concat(k,"-prev"),Object(v.a)({},"".concat(k,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(ze)),p.a.createElement("li",{title:H?"".concat(te,"/").concat(ie):null,className:"".concat(k,"-simple-pager")},p.a.createElement("input",{type:"text",value:ee,disabled:G,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),p.a.createElement("span",{className:"".concat(k,"-slash")},"/"),ie),p.a.createElement("li",{title:H?z.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:t()("".concat(k,"-next"),Object(v.a)({},"".concat(k,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Je)),me);if(ie<=3+Te*2){var Xe={locale:z,rootPrefixCls:k,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:H,itemRender:Z};ie||Ee.push(p.a.createElement(r,Object(N.a)({},Xe,{key:"noPager",page:ie,className:"".concat(k,"-disabled")})));for(var et=1;et<=ie;et+=1){var rt=te===et;Ee.push(p.a.createElement(r,Object(N.a)({},Xe,{key:et,page:et,active:rt})))}}else{var Le=P?z.prev_3:z.prev_5,Oe=P?z.next_3:z.next_5;ce&&(ne=p.a.createElement("li",{title:H?Le:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:t()("".concat(k,"-jump-prev"),Object(v.a)({},"".concat(k,"-jump-prev-custom-icon"),!!he))},Z(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(he,"prev page"))),J=p.a.createElement("li",{title:H?Oe:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:t()("".concat(k,"-jump-next"),Object(v.a)({},"".concat(k,"-jump-next-custom-icon"),!!ae))},Z(this.getJumpNextPage(),"jump-next",this.getItemIcon(ae,"next page")))),Q=p.a.createElement(r,{locale:z,last:!0,rootPrefixCls:k,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ie,page:ie,active:!1,showTitle:H,itemRender:Z}),X=p.a.createElement(r,{locale:z,rootPrefixCls:k,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:H,itemRender:Z});var Ve=Math.max(1,te-Te),Ze=Math.min(te+Te,ie);te-1<=Te&&(Ze=1+Te*2),ie-te<=Te&&(Ve=ie-Te*2);for(var Ne=Ve;Ne<=Ze;Ne+=1){var Ge=te===Ne;Ee.push(p.a.createElement(r,{locale:z,rootPrefixCls:k,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ne,page:Ne,active:Ge,showTitle:H,itemRender:Z}))}te-1>=Te*2&&te!==1+2&&(Ee[0]=Object(b.cloneElement)(Ee[0],{className:"".concat(k,"-item-after-jump-prev")}),Ee.unshift(ne)),ie-te>=Te*2&&te!==ie-2&&(Ee[Ee.length-1]=Object(b.cloneElement)(Ee[Ee.length-1],{className:"".concat(k,"-item-before-jump-next")}),Ee.push(J)),Ve!==1&&Ee.unshift(X),Ze!==ie&&Ee.push(Q)}var De=null;V&&(De=p.a.createElement("li",{className:"".concat(k,"-total-text")},V(W,[W===0?0:(te-1)*be+1,te*be>W?W:te*be])));var we=!this.hasPrev()||!ie,Ae=!this.hasNext()||!ie;return p.a.createElement("ul",Object(N.a)({className:t()(k,L,Object(v.a)({},"".concat(k,"-disabled"),G)),style:A,unselectable:"unselectable",ref:this.savePaginationNode},qe),De,p.a.createElement("li",{title:H?z.prev_page:null,onClick:this.prev,tabIndex:we?null:0,onKeyPress:this.runIfEnterPrev,className:t()("".concat(k,"-prev"),Object(v.a)({},"".concat(k,"-disabled"),we)),"aria-disabled":we},this.renderPrev(ze)),Ee,p.a.createElement("li",{title:H?z.next_page:null,onClick:this.next,tabIndex:Ae?null:0,onKeyPress:this.runIfEnterNext,className:t()("".concat(k,"-next"),Object(v.a)({},"".concat(k,"-disabled"),Ae)),"aria-disabled":Ae},this.renderNext(Je)),p.a.createElement(s,{disabled:G,locale:z,rootPrefixCls:k,selectComponentClass:xe,selectPrefixCls:ge,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:te,pageSize:be,pageSizeOptions:oe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:fe}))}}],[{key:"getDerivedStateFromProps",value:function(E,T){var k={};if("current"in E&&(k.current=E.current,E.current!==T.current&&(k.currentInputValue=k.current)),"pageSize"in E&&E.pageSize!==T.pageSize){var L=T.current,A=w(E.pageSize,T,E);L=L>A?A:L,"current"in E||(k.current=L,k.currentInputValue=L),k.pageSize=E.pageSize}return k}}]),g}(p.a.Component);_.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:a,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:a,locale:u.a,style:{},itemRender:f,totalBoundaryShowSizeChanger:50};var h=_},"6RRn":function(F,$,j){"use strict";var N=j("wCXF"),v=j("n6Qo");j.d($,"b",function(){return v.a});var O=j("IBYe"),M=j("6eGT"),y=j("hW8S");j.d($,"a",function(){return y.a}),$.c=N.b},"6UM0":function(F,$,j){var N,v;(function(){var O;(function(){"use strict";var y=[function(p,d,t){var l=t(1).Beautifier,r=t(5).Options;function i(o,s){var u=new l(o,s);return u.beautify()}p.exports=i,p.exports.defaultOptions=function(){return new r}},function(p,d,t){var l=t(2).Output,r=t(3).Token,i=t(4),o=t(5).Options,s=t(7).Tokenizer,u=t(7).line_starters,a=t(7).positionable_operators,c=t(7).TOKEN;function f(P,H){return H.indexOf(P)!==-1}function w(P){return P.replace(/^\s+/g,"")}function _(P){for(var H={},V=0;V<P.length;V++)H[P[V].replace(/-/g,"_")]=P[V];return H}function h(P,H){return P&&P.type===c.RESERVED&&P.text===H}function R(P,H){return P&&P.type===c.RESERVED&&f(P.text,H)}var C=["case","return","do","if","throw","else","await","break","continue","async"],g=["before-newline","after-newline","preserve-newline"],x=_(g),E=[x.before_newline,x.preserve_newline],T={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function k(P,H){if(H.multiline_frame||H.mode===T.ForInitializer||H.mode===T.Conditional)return;P.remove_indent(H.start_line_index)}function L(P){P=P.replace(i.allLineBreaks,`
`);for(var H=[],V=P.indexOf(`
`);V!==-1;)H.push(P.substring(0,V)),P=P.substring(V+1),V=P.indexOf(`
`);return P.length&&H.push(P),H}function A(P){return P===T.ArrayLiteral}function G(P){return f(P,[T.Expression,T.ForInitializer,T.Conditional])}function K(P,H){for(var V=0;V<P.length;V++){var q=P[V].trim();if(q.charAt(0)!==H)return!1}return!0}function W(P,H){for(var V=0,q=P.length,Z;V<q;V++)if(Z=P[V],Z&&Z.indexOf(H)!==0)return!1;return!0}function z(P,H){H=H||{},this._source_text=P||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new o(H)}z.prototype.create_flags=function(P,H){var V=0;P&&(V=P.indentation_level,!this._output.just_added_newline()&&P.line_indent_level>V&&(V=P.line_indent_level));var q={mode:H,parent:P,last_token:P?P.last_token:new r(c.START_BLOCK,""),last_word:P?P.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:V,alignment:0,line_indent_level:P?P.line_indent_level:V,start_line_index:this._output.get_line_number(),ternary_depth:0};return q},z.prototype._reset=function(P){var H=P.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new l(this._options,H),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(T.BlockStatement);var V=new s(P,this._options);return this._tokens=V.tokenize(),P},z.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var P,H=this._reset(this._source_text),V=this._options.eol;this._options.eol==="auto"&&(V=`
`,H&&i.lineBreak.test(H||"")&&(V=H.match(i.lineBreak)[0]));for(var q=this._tokens.next();q;)this.handle_token(q),this._last_last_text=this._flags.last_token.text,this._flags.last_token=q,q=this._tokens.next();return P=this._output.get_code(V),P},z.prototype.handle_token=function(P,H){P.type===c.START_EXPR?this.handle_start_expr(P):P.type===c.END_EXPR?this.handle_end_expr(P):P.type===c.START_BLOCK?this.handle_start_block(P):P.type===c.END_BLOCK?this.handle_end_block(P):P.type===c.WORD?this.handle_word(P):P.type===c.RESERVED?this.handle_word(P):P.type===c.SEMICOLON?this.handle_semicolon(P):P.type===c.STRING?this.handle_string(P):P.type===c.EQUALS?this.handle_equals(P):P.type===c.OPERATOR?this.handle_operator(P):P.type===c.COMMA?this.handle_comma(P):P.type===c.BLOCK_COMMENT?this.handle_block_comment(P,H):P.type===c.COMMENT?this.handle_comment(P,H):P.type===c.DOT?this.handle_dot(P):P.type===c.EOF?this.handle_eof(P):P.type===c.UNKNOWN?this.handle_unknown(P,H):this.handle_unknown(P,H)},z.prototype.handle_whitespace_and_comments=function(P,H){var V=P.newlines,q=this._options.keep_array_indentation&&A(this._flags.mode);if(P.comments_before)for(var Z=P.comments_before.next();Z;)this.handle_whitespace_and_comments(Z,H),this.handle_token(Z,H),Z=P.comments_before.next();if(q)for(var ce=0;ce<V;ce+=1)this.print_newline(ce>0,H);else if(this._options.max_preserve_newlines&&V>this._options.max_preserve_newlines&&(V=this._options.max_preserve_newlines),this._options.preserve_newlines&&V>1){this.print_newline(!1,H);for(var he=1;he<V;he+=1)this.print_newline(!0,H)}};var U=["async","break","continue","return","throw","yield"];z.prototype.allow_wrap_or_preserved_newline=function(P,H){if(H=H===void 0?!1:H,this._output.just_added_newline())return;var V=this._options.preserve_newlines&&P.newlines||H,q=f(this._flags.last_token.text,a)||f(P.text,a);if(q){var Z=f(this._flags.last_token.text,a)&&f(this._options.operator_position,E)||f(P.text,a);V=V&&Z}if(V)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(R(this._flags.last_token,U))return;this._output.set_wrap_point()}},z.prototype.print_newline=function(P,H){if(!H&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==c.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var V=this._tokens.peek();this._flags.mode===T.Statement&&!(this._flags.if_block&&h(V,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(P)&&(this._flags.multiline_frame=!0)},z.prototype.print_token_line_indentation=function(P){this._output.just_added_newline()&&(this._options.keep_array_indentation&&P.newlines&&(P.text==="["||A(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(P.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},z.prototype.print_token=function(P){if(this._output.raw){this._output.add_raw_token(P);return}if(this._options.comma_first&&P.previous&&P.previous.type===c.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var H=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(H),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(P),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(P),this._output.non_breaking_space=!0,this._output.add_token(P.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},z.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},z.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},z.prototype.set_mode=function(P){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,P),this._flags=this.create_flags(this._previous_flags,P),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},z.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===T.Statement&&k(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},z.prototype.start_of_object_property=function(){return this._flags.parent.mode===T.ObjectLiteral&&this._flags.mode===T.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"]))},z.prototype.start_of_statement=function(P){var H=!1;return H=H||R(this._flags.last_token,["var","let","const"])&&P.type===c.WORD,H=H||h(this._flags.last_token,"do"),H=H||!(this._flags.parent.mode===T.ObjectLiteral&&this._flags.mode===T.Statement)&&R(this._flags.last_token,U)&&!P.newlines,H=H||h(this._flags.last_token,"else")&&!(h(P,"if")&&!P.comments_before),H=H||this._flags.last_token.type===c.END_EXPR&&(this._previous_flags.mode===T.ForInitializer||this._previous_flags.mode===T.Conditional),H=H||this._flags.last_token.type===c.WORD&&this._flags.mode===T.BlockStatement&&!this._flags.in_case&&!(P.text==="--"||P.text==="++")&&this._last_last_text!=="function"&&P.type!==c.WORD&&P.type!==c.RESERVED,H=H||this._flags.mode===T.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||R(this._flags.last_token,["get","set"])),H?(this.set_mode(T.Statement),this.indent(),this.handle_whitespace_and_comments(P,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P,R(P,["do","for","if","while"])),!0):!1},z.prototype.handle_start_expr=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P);var H=T.Expression;if(P.text==="["){if(this._flags.last_token.type===c.WORD||this._flags.last_token.text===")"){R(this._flags.last_token,u)&&(this._output.space_before_token=!0),this.print_token(P),this.set_mode(H),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}H=T.ArrayLiteral,A(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),f(this._flags.last_token.type,[c.START_EXPR,c.END_EXPR,c.WORD,c.OPERATOR,c.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===c.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,H=T.ForInitializer):f(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,H=T.Conditional):f(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&P.whitespace_before===""?this._output.space_before_token=!1:(f(this._flags.last_token.text,u)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===c.EQUALS||this._flags.last_token.type===c.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P);else if(this._flags.last_token.type===c.WORD){this._output.space_before_token=!1;var V=this._tokens.peek(-3);if(this._options.space_after_named_function&&V){var q=this._tokens.peek(-4);R(V,["async","function"])||V.text==="*"&&R(q,["async","function"])?this._output.space_before_token=!0:this._flags.mode===T.ObjectLiteral?(V.text==="{"||V.text===","||V.text==="*"&&(q.text==="{"||q.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(P);(this._flags.last_token.type===c.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(f(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&f(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===c.START_BLOCK?this.print_newline():(this._flags.last_token.type===c.END_EXPR||this._flags.last_token.type===c.START_EXPR||this._flags.last_token.type===c.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===c.COMMA)&&this.allow_wrap_or_preserved_newline(P,P.newlines),this.print_token(P),this.set_mode(H),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},z.prototype.handle_end_expr=function(P){for(;this._flags.mode===T.Statement;)this.restore_mode();this.handle_whitespace_and_comments(P),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(P,P.text==="]"&&A(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===c.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(P),this.restore_mode(),k(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===T.Conditional&&(this._previous_flags.mode=T.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},z.prototype.handle_start_block=function(P){this.handle_whitespace_and_comments(P);var H=this._tokens.peek(),V=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===c.END_EXPR?(this.set_mode(T.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(T.BlockStatement):V&&(f(V.text,[":",","])&&f(H.type,[c.STRING,c.WORD,c.RESERVED])||f(H.text,["get","set","..."])&&f(V.type,[c.WORD,c.RESERVED]))?f(this._last_last_text,["class","interface"])&&!f(V.text,[":",","])?this.set_mode(T.BlockStatement):this.set_mode(T.ObjectLiteral):this._flags.last_token.type===c.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(T.BlockStatement):f(this._flags.last_token.type,[c.EQUALS,c.START_EXPR,c.COMMA,c.OPERATOR])||R(this._flags.last_token,["return","throw","import","default"])?this.set_mode(T.ObjectLiteral):this.set_mode(T.BlockStatement),this._flags.last_token&&(R(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var q=!H.comments_before&&H.text==="}",Z=q&&this._flags.last_word==="function"&&this._flags.last_token.type===c.END_EXPR;if(this._options.brace_preserve_inline){var ce=0,he=null;this._flags.inline_frame=!0;do if(ce+=1,he=this._tokens.peek(ce-1),he.newlines){this._flags.inline_frame=!1;break}while(he.type!==c.EOF&&!(he.type===c.END_BLOCK&&he.opened===P))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&P.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==c.OPERATOR&&(Z||this._flags.last_token.type===c.EQUALS||R(this._flags.last_token,C)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(A(this._previous_flags.mode)&&(this._flags.last_token.type===c.START_EXPR||this._flags.last_token.type===c.COMMA)&&((this._flags.last_token.type===c.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(P),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==c.OPERATOR&&this._flags.last_token.type!==c.START_EXPR&&(this._flags.last_token.type===c.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(P),this.indent(),!q&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},z.prototype.handle_end_block=function(P){for(this.handle_whitespace_and_comments(P);this._flags.mode===T.Statement;)this.restore_mode();var H=this._flags.last_token.type===c.START_BLOCK;this._flags.inline_frame&&!H?this._output.space_before_token=!0:this._options.brace_style==="expand"?H||this.print_newline():H||(A(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(P)},z.prototype.handle_word=function(P){if(P.type===c.RESERVED){if(f(P.text,["set","get"])&&this._flags.mode!==T.ObjectLiteral)P.type=c.WORD;else if(P.text==="import"&&f(this._tokens.peek().text,["(","."]))P.type=c.WORD;else if(f(P.text,["as","from"])&&!this._flags.import_block)P.type=c.WORD;else if(this._flags.mode===T.ObjectLiteral){var H=this._tokens.peek();H.text===":"&&(P.type=c.WORD)}}if(this.start_of_statement(P)?R(this._flags.last_token,["var","let","const"])&&P.type===c.WORD&&(this._flags.declaration_statement=!0):P.newlines&&!G(this._flags.mode)&&(this._flags.last_token.type!==c.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==c.EQUALS&&(this._options.preserve_newlines||!R(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(P),this.print_newline()):this.handle_whitespace_and_comments(P),this._flags.do_block&&!this._flags.do_while)if(h(P,"while")){this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&h(P,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===T.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&R(P,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(P),this._flags.in_case=!0;return}if((this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR||this._flags.last_token.type===c.EQUALS||this._flags.last_token.type===c.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P)),h(P,"function")){(f(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(f(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===c.OPERATOR))&&(!this._output.just_added_blankline()&&!P.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===c.RESERVED||this._flags.last_token.type===c.WORD?R(this._flags.last_token,["get","set","new","export"])||R(this._flags.last_token,U)?this._output.space_before_token=!0:h(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===c.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(G(this._flags.mode)||A(this._flags.mode))||this.print_newline(),this.print_token(P),this._flags.last_word=P.text;return}var V="NONE";if(this._flags.last_token.type===c.END_BLOCK?this._previous_flags.inline_frame?V="SPACE":R(P,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&P.newlines?V="NEWLINE":(V="SPACE",this._output.space_before_token=!0):V="NEWLINE":this._flags.last_token.type===c.SEMICOLON&&this._flags.mode===T.BlockStatement?V="NEWLINE":this._flags.last_token.type===c.SEMICOLON&&G(this._flags.mode)?V="SPACE":this._flags.last_token.type===c.STRING?V="NEWLINE":this._flags.last_token.type===c.RESERVED||this._flags.last_token.type===c.WORD||this._flags.last_token.text==="*"&&(f(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&f(this._last_last_text,["{",","]))?V="SPACE":this._flags.last_token.type===c.START_BLOCK?this._flags.inline_frame?V="SPACE":V="NEWLINE":this._flags.last_token.type===c.END_EXPR&&(this._output.space_before_token=!0,V="NEWLINE"),R(P,u)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?V="SPACE":V="NEWLINE"),R(P,["else","catch","finally"]))if((!(this._flags.last_token.type===c.END_BLOCK&&this._previous_flags.mode===T.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&P.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var q=this._output.current_line;q.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else V==="NEWLINE"?R(this._flags.last_token,C)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&R(P,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==c.END_EXPR?(this._flags.last_token.type!==c.START_EXPR||!R(P,["var","let","const"]))&&this._flags.last_token.text!==":"&&(h(P,"if")&&h(P.previous,"else")?this._output.space_before_token=!0:this.print_newline()):R(P,u)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&A(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():V==="SPACE"&&(this._output.space_before_token=!0);P.previous&&(P.previous.type===c.WORD||P.previous.type===c.RESERVED)&&(this._output.space_before_token=!0),this.print_token(P),this._flags.last_word=P.text,P.type===c.RESERVED&&(P.text==="do"?this._flags.do_block=!0:P.text==="if"?this._flags.if_block=!0:P.text==="import"?this._flags.import_block=!0:this._flags.import_block&&h(P,"from")&&(this._flags.import_block=!1))},z.prototype.handle_semicolon=function(P){this.start_of_statement(P)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(P);for(var H=this._tokens.peek();this._flags.mode===T.Statement&&!(this._flags.if_block&&h(H,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(P)},z.prototype.handle_string=function(P){P.text.startsWith("`")&&P.newlines===0&&P.whitespace_before===""&&(P.previous.text===")"||this._flags.last_token.type===c.WORD)||(this.start_of_statement(P)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(P),this._flags.last_token.type===c.RESERVED||this._flags.last_token.type===c.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR||this._flags.last_token.type===c.EQUALS||this._flags.last_token.type===c.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P):P.text.startsWith("`")&&this._flags.last_token.type===c.END_EXPR&&(P.previous.text==="]"||P.previous.text===")")&&P.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(P)},z.prototype.handle_equals=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0},z.prototype.handle_comma=function(P){this.handle_whitespace_and_comments(P,!0),this.print_token(P),this._output.space_before_token=!0,this._flags.declaration_statement?(G(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(P)):this._flags.mode===T.ObjectLiteral||this._flags.mode===T.Statement&&this._flags.parent.mode===T.ObjectLiteral?(this._flags.mode===T.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(P)},z.prototype.handle_operator=function(P){var H=P.text==="*"&&(R(this._flags.last_token,["function","yield"])||f(this._flags.last_token.type,[c.START_BLOCK,c.COMMA,c.END_BLOCK,c.SEMICOLON])),V=f(P.text,["-","+"])&&(f(this._flags.last_token.type,[c.START_BLOCK,c.START_EXPR,c.EQUALS,c.OPERATOR])||f(this._flags.last_token.text,u)||this._flags.last_token.text===",");if(!this.start_of_statement(P)){var q=!H;this.handle_whitespace_and_comments(P,q)}if(P.text==="*"&&this._flags.last_token.type===c.DOT){this.print_token(P);return}if(P.text==="::"){this.print_token(P);return}if(this._flags.last_token.type===c.OPERATOR&&f(this._options.operator_position,E)&&this.allow_wrap_or_preserved_newline(P),P.text===":"&&this._flags.in_case){this.print_token(P),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==c.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var Z=!0,ce=!0,he=!1;if(P.text===":"?this._flags.ternary_depth===0?Z=!1:(this._flags.ternary_depth-=1,he=!0):P.text==="?"&&(this._flags.ternary_depth+=1),!V&&!H&&this._options.preserve_newlines&&f(P.text,a)){var ae=P.text===":",xe=ae&&he,ge=ae&&!he;switch(this._options.operator_position){case x.before_newline:this._output.space_before_token=!ge,this.print_token(P),(!ae||xe)&&this.allow_wrap_or_preserved_newline(P),this._output.space_before_token=!0;return;case x.after_newline:this._output.space_before_token=!0,!ae||xe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(P):this._output.space_before_token=!1,this.print_token(P),this._output.space_before_token=!0;return;case x.preserve_newline:ge||this.allow_wrap_or_preserved_newline(P),Z=!(this._output.just_added_newline()||ge),this._output.space_before_token=Z,this.print_token(P),this._output.space_before_token=!0;return}}if(H){this.allow_wrap_or_preserved_newline(P),Z=!1;var oe=this._tokens.peek();ce=oe&&f(oe.type,[c.WORD,c.RESERVED])}else if(P.text==="...")this.allow_wrap_or_preserved_newline(P),Z=this._flags.last_token.type===c.START_BLOCK,ce=!1;else if(f(P.text,["--","++","!","~"])||V){if((this._flags.last_token.type===c.COMMA||this._flags.last_token.type===c.START_EXPR)&&this.allow_wrap_or_preserved_newline(P),Z=!1,ce=!1,P.newlines&&(P.text==="--"||P.text==="++"||P.text==="~")){var se=R(this._flags.last_token,C)&&P.newlines;se&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(se,!0)}this._flags.last_token.text===";"&&G(this._flags.mode)&&(Z=!0),this._flags.last_token.type===c.RESERVED?Z=!0:this._flags.last_token.type===c.END_EXPR?Z=!(this._flags.last_token.text==="]"&&(P.text==="--"||P.text==="++")):this._flags.last_token.type===c.OPERATOR&&(Z=f(P.text,["--","-","++","+"])&&f(this._flags.last_token.text,["--","-","++","+"]),f(P.text,["+","-"])&&f(this._flags.last_token.text,["--","++"])&&(ce=!0)),(this._flags.mode===T.BlockStatement&&!this._flags.inline_frame||this._flags.mode===T.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Z,this.print_token(P),this._output.space_before_token=ce},z.prototype.handle_block_comment=function(P,H){if(this._output.raw){this._output.add_raw_token(P),P.directives&&P.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(P.directives){this.print_newline(!1,H),this.print_token(P),P.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!i.newline.test(P.text)&&!P.newlines){this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0;return}else this.print_block_commment(P,H)},z.prototype.print_block_commment=function(P,H){var V=L(P.text),q,Z=!1,ce=!1,he=P.whitespace_before,ae=he.length;if(this.print_newline(!1,H),this.print_token_line_indentation(P),this._output.add_token(V[0]),this.print_newline(!1,H),V.length>1){for(V=V.slice(1),Z=K(V,"*"),ce=W(V,he),Z&&(this._flags.alignment=1),q=0;q<V.length;q++)Z?(this.print_token_line_indentation(P),this._output.add_token(w(V[q]))):ce&&V[q]?(this.print_token_line_indentation(P),this._output.add_token(V[q].substring(ae))):(this._output.current_line.set_indent(-1),this._output.add_token(V[q])),this.print_newline(!1,H);this._flags.alignment=0}},z.prototype.handle_comment=function(P,H){P.newlines?this.print_newline(!1,H):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(P),this.print_newline(!1,H)},z.prototype.handle_dot=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),R(this._flags.last_token,C)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(P,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(P)},z.prototype.handle_unknown=function(P,H){this.print_token(P),P.text[P.text.length-1]===`
`&&this.print_newline(!1,H)},z.prototype.handle_eof=function(P){for(;this._flags.mode===T.Statement;)this.restore_mode();this.handle_whitespace_and_comments(P)},p.exports.Beautifier=z},function(p){function d(r){this.__parent=r,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}d.prototype.clone_empty=function(){var r=new d(this.__parent);return r.set_indent(this.__indent_count,this.__alignment_count),r},d.prototype.item=function(r){return r<0?this.__items[this.__items.length+r]:this.__items[r]},d.prototype.has_match=function(r){for(var i=this.__items.length-1;i>=0;i--)if(this.__items[i].match(r))return!0;return!1},d.prototype.set_indent=function(r,i){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=i||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},d.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},d.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},d.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__character_count-=1),!0}return!1},d.prototype.is_empty=function(){return this.__items.length===0},d.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},d.prototype.push=function(r){this.__items.push(r);var i=r.lastIndexOf(`
`);i!==-1?this.__character_count=r.length-i:this.__character_count+=r.length},d.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},d.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},d.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},d.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},d.prototype.toString=function(){var r="";return this.is_empty()?this.__parent.indent_empty_lines&&(r=this.__parent.get_indent_string(this.__indent_count)):(r=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),r+=this.__items.join("")),r};function t(r,i){this.__cache=[""],this.__indent_size=r.indent_size,this.__indent_string=r.indent_char,r.indent_with_tabs||(this.__indent_string=new Array(r.indent_size+1).join(r.indent_char)),i=i||"",r.indent_level>0&&(i=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=i,this.__base_string_length=i.length}t.prototype.get_indent_size=function(r,i){var o=this.__base_string_length;return i=i||0,r<0&&(o=0),o+=r*this.__indent_size,o+=i,o},t.prototype.get_indent_string=function(r,i){var o=this.__base_string;return i=i||0,r<0&&(r=0,o=""),i+=r*this.__indent_size,this.__ensure_cache(i),o+=this.__cache[i],o},t.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},t.prototype.__add_column=function(){var r=this.__cache.length,i=0,o="";this.__indent_size&&r>=this.__indent_size&&(i=Math.floor(r/this.__indent_size),r-=i*this.__indent_size,o=new Array(i+1).join(this.__indent_string)),r&&(o+=new Array(r+1).join(" ")),this.__cache.push(o)};function l(r,i){this.__indent_cache=new t(r,i),this.raw=!1,this._end_with_newline=r.end_with_newline,this.indent_size=r.indent_size,this.wrap_line_length=r.wrap_line_length,this.indent_empty_lines=r.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new d(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(r,i){return this.__indent_cache.get_indent_string(r,i)},l.prototype.get_indent_size=function(r,i){return this.__indent_cache.get_indent_size(r,i)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(r){this.trim(!0);var i=this.current_line.pop();i&&(i[i.length-1]===`
`&&(i=i.replace(/\n+$/g,"")),this.current_line.push(i)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
`);return r!==`
`&&(o=o.replace(/[\n]/g,r)),o},l.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},l.prototype.set_indent=function(r,i){return r=r||0,i=i||0,this.next_line.set_indent(r,i),this.__lines.length>1?(this.current_line.set_indent(r,i),!0):(this.current_line.set_indent(),!1)},l.prototype.add_raw_token=function(r){for(var i=0;i<r.newlines;i++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(r.whitespace_before),this.current_line.push(r.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},l.prototype.add_token=function(r){this.__add_space_before_token(),this.current_line.push(r),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},l.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},l.prototype.remove_indent=function(r){for(var i=this.__lines.length;r<i;)this.__lines[r]._remove_indent(),r++;this.current_line._remove_wrap_indent()},l.prototype.trim=function(r){for(r=r===void 0?!1:r,this.current_line.trim();r&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},l.prototype.just_added_newline=function(){return this.current_line.is_empty()},l.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},l.prototype.ensure_empty_line_above=function(r,i){for(var o=this.__lines.length-2;o>=0;){var s=this.__lines[o];if(s.is_empty())break;if(s.item(0).indexOf(r)!==0&&s.item(-1)!==i){this.__lines.splice(o+1,0,new d(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},p.exports.Output=l},function(p){function d(t,l,r,i){this.type=t,this.text=l,this.comments_before=null,this.newlines=r||0,this.whitespace_before=i||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}p.exports.Token=d},function(p,d){var t="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",l="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",r="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",i="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",o="(?:\\\\u[0-9a-fA-F]{4}|["+t+r+"])",s="(?:\\\\u[0-9a-fA-F]{4}|["+l+r+i+"])*";d.identifier=new RegExp(o+s,"g"),d.identifierStart=new RegExp(o),d.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+l+r+i+"])+");var u=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;d.newline=/[\n\r\u2028\u2029]/,d.lineBreak=new RegExp(`\r
|`+d.newline.source),d.allLineBreaks=new RegExp(d.lineBreak.source,"g")},function(p,d,t){var l=t(6).Options,r=["before-newline","after-newline","preserve-newline"];function i(o){l.call(this,o,"js");var s=this.raw_options.brace_style||null;s==="expand-strict"?this.raw_options.brace_style="expand":s==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var a=0;a<u.length;a++)u[a]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=u[a];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",r),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}i.prototype=new l,p.exports.Options=i},function(p){function d(r,i){this.raw_options=t(r,i),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}d.prototype._get_array=function(r,i){var o=this.raw_options[r],s=i||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(s=o.concat()):typeof o=="string"&&(s=o.split(/[^a-zA-Z0-9_\/\-]+/)),s},d.prototype._get_boolean=function(r,i){var o=this.raw_options[r],s=o===void 0?!!i:!!o;return s},d.prototype._get_characters=function(r,i){var o=this.raw_options[r],s=i||"";return typeof o=="string"&&(s=o.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),s},d.prototype._get_number=function(r,i){var o=this.raw_options[r];i=parseInt(i,10),isNaN(i)&&(i=0);var s=parseInt(o,10);return isNaN(s)&&(s=i),s},d.prototype._get_selection=function(r,i,o){var s=this._get_selection_list(r,i,o);if(s.length!==1)throw new Error("Invalid Option Value: The option '"+r+`' can only be one of the following values:
`+i+`
You passed in: '`+this.raw_options[r]+"'");return s[0]},d.prototype._get_selection_list=function(r,i,o){if(!i||i.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[i[0]],!this._is_valid_selection(o,i))throw new Error("Invalid Default Value!");var s=this._get_array(r,o);if(!this._is_valid_selection(s,i))throw new Error("Invalid Option Value: The option '"+r+`' can contain only the following values:
`+i+`
You passed in: '`+this.raw_options[r]+"'");return s},d.prototype._is_valid_selection=function(r,i){return r.length&&i.length&&!r.some(function(o){return i.indexOf(o)===-1})};function t(r,i){var o={};r=l(r);var s;for(s in r)s!==i&&(o[s]=r[s]);if(i&&r[i])for(s in r[i])o[s]=r[i][s];return o}function l(r){var i={},o;for(o in r){var s=o.replace(/-/g,"_");i[s]=r[o]}return i}p.exports.Options=d,p.exports.normalizeOpts=l,p.exports.mergeOpts=t},function(p,d,t){var l=t(8).InputScanner,r=t(9).Tokenizer,i=t(9).TOKEN,o=t(13).Directives,s=t(4),u=t(12).Pattern,a=t(14).TemplatablePattern;function c(K,W){return W.indexOf(K)!==-1}var f={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:i.START,RAW:i.RAW,EOF:i.EOF},w=new o(/\/\*/,/\*\//),_=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,h=/[0-9]/,R=/[^\d\.]/,C=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),g=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";g=g.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),g="\\?\\.(?!\\d) "+g,g=g.replace(/ /g,"|");var x=new RegExp(g),E="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),T=E.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),k=new RegExp("^(?:"+T.join("|")+")$"),L,A=function(K,W){r.call(this,K,W),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var z=new u(this._input),U=new a(this._input).read_options(this._options);this.__patterns={template:U,identifier:U.starting_with(s.identifier).matching(s.identifierMatch),number:z.matching(_),punct:z.matching(x),comment:z.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:z.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:z.matching(/<!--/),html_comment_end:z.matching(/-->/),include:z.starting_with(/#include/).until_after(s.lineBreak),shebang:z.starting_with(/#!/).until_after(s.lineBreak),xml:z.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:U.until(/['\\\n\r\u2028\u2029]/),double_quote:U.until(/["\\\n\r\u2028\u2029]/),template_text:U.until(/[`\\$]/),template_expression:U.until(/[`}\\]/)}};A.prototype=new r,A.prototype._is_comment=function(K){return K.type===f.COMMENT||K.type===f.BLOCK_COMMENT||K.type===f.UNKNOWN},A.prototype._is_opening=function(K){return K.type===f.START_BLOCK||K.type===f.START_EXPR},A.prototype._is_closing=function(K,W){return(K.type===f.END_BLOCK||K.type===f.END_EXPR)&&W&&(K.text==="]"&&W.text==="["||K.text===")"&&W.text==="("||K.text==="}"&&W.text==="{")},A.prototype._reset=function(){L=!1},A.prototype._get_next_token=function(K,W){var z=null;this._readWhitespace();var U=this._input.peek();return U===null?this._create_token(f.EOF,""):(z=z||this._read_non_javascript(U),z=z||this._read_string(U),z=z||this._read_word(K),z=z||this._read_singles(U),z=z||this._read_comment(U),z=z||this._read_regexp(U,K),z=z||this._read_xml(U,K),z=z||this._read_punctuation(),z=z||this._create_token(f.UNKNOWN,this._input.next()),z)},A.prototype._read_word=function(K){var W;if(W=this.__patterns.identifier.read(),W!=="")return W=W.replace(s.allLineBreaks,`
`),!(K.type===f.DOT||K.type===f.RESERVED&&(K.text==="set"||K.text==="get"))&&k.test(W)?(W==="in"||W==="of")&&(K.type===f.WORD||K.type===f.STRING)?this._create_token(f.OPERATOR,W):this._create_token(f.RESERVED,W):this._create_token(f.WORD,W);if(W=this.__patterns.number.read(),W!=="")return this._create_token(f.WORD,W)},A.prototype._read_singles=function(K){var W=null;return K==="("||K==="["?W=this._create_token(f.START_EXPR,K):K===")"||K==="]"?W=this._create_token(f.END_EXPR,K):K==="{"?W=this._create_token(f.START_BLOCK,K):K==="}"?W=this._create_token(f.END_BLOCK,K):K===";"?W=this._create_token(f.SEMICOLON,K):K==="."&&R.test(this._input.peek(1))?W=this._create_token(f.DOT,K):K===","&&(W=this._create_token(f.COMMA,K)),W&&this._input.next(),W},A.prototype._read_punctuation=function(){var K=this.__patterns.punct.read();if(K!=="")return K==="="?this._create_token(f.EQUALS,K):K==="?."?this._create_token(f.DOT,K):this._create_token(f.OPERATOR,K)},A.prototype._read_non_javascript=function(K){var W="";if(K==="#"){if(this._is_first_token()&&(W=this.__patterns.shebang.read(),W))return this._create_token(f.UNKNOWN,W.trim()+`
`);if(W=this.__patterns.include.read(),W)return this._create_token(f.UNKNOWN,W.trim()+`
`);K=this._input.next();var z="#";if(this._input.hasNext()&&this._input.testChar(h)){do K=this._input.next(),z+=K;while(this._input.hasNext()&&K!=="#"&&K!=="=");return K==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(z+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(z+="{}",this._input.next(),this._input.next())),this._create_token(f.WORD,z)}this._input.back()}else if(K==="<"&&this._is_first_token()){if(W=this.__patterns.html_comment_start.read(),W){for(;this._input.hasNext()&&!this._input.testChar(s.newline);)W+=this._input.next();return L=!0,this._create_token(f.COMMENT,W)}}else if(L&&K==="-"&&(W=this.__patterns.html_comment_end.read(),W))return L=!1,this._create_token(f.COMMENT,W);return null},A.prototype._read_comment=function(K){var W=null;if(K==="/"){var z="";if(this._input.peek(1)==="*"){z=this.__patterns.block_comment.read();var U=w.get_directives(z);U&&U.ignore==="start"&&(z+=w.readIgnored(this._input)),z=z.replace(s.allLineBreaks,`
`),W=this._create_token(f.BLOCK_COMMENT,z),W.directives=U}else this._input.peek(1)==="/"&&(z=this.__patterns.comment.read(),W=this._create_token(f.COMMENT,z))}return W},A.prototype._read_string=function(K){if(K==="`"||K==="'"||K==='"'){var W=this._input.next();return this.has_char_escapes=!1,K==="`"?W+=this._read_string_recursive("`",!0,"${"):W+=this._read_string_recursive(K),this.has_char_escapes&&this._options.unescape_strings&&(W=G(W)),this._input.peek()===K&&(W+=this._input.next()),W=W.replace(s.allLineBreaks,`
`),this._create_token(f.STRING,W)}return null},A.prototype._allow_regexp_or_xml=function(K){return K.type===f.RESERVED&&c(K.text,["return","case","throw","else","do","typeof","yield"])||K.type===f.END_EXPR&&K.text===")"&&K.opened.previous.type===f.RESERVED&&c(K.opened.previous.text,["if","while","for"])||c(K.type,[f.COMMENT,f.START_EXPR,f.START_BLOCK,f.START,f.END_BLOCK,f.OPERATOR,f.EQUALS,f.EOF,f.SEMICOLON,f.COMMA])},A.prototype._read_regexp=function(K,W){if(K==="/"&&this._allow_regexp_or_xml(W)){for(var z=this._input.next(),U=!1,P=!1;this._input.hasNext()&&(U||P||this._input.peek()!==K)&&!this._input.testChar(s.newline);)z+=this._input.peek(),U?U=!1:(U=this._input.peek()==="\\",this._input.peek()==="["?P=!0:this._input.peek()==="]"&&(P=!1)),this._input.next();return this._input.peek()===K&&(z+=this._input.next(),z+=this._input.read(s.identifier)),this._create_token(f.STRING,z)}return null},A.prototype._read_xml=function(K,W){if(this._options.e4x&&K==="<"&&this._allow_regexp_or_xml(W)){var z="",U=this.__patterns.xml.read_match();if(U){for(var P=U[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),H=P.indexOf("{")===0,V=0;U;){var q=!!U[1],Z=U[2],ce=!!U[U.length-1]||Z.slice(0,8)==="![CDATA[";if(!ce&&(Z===P||H&&Z.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(q?--V:++V),z+=U[0],V<=0)break;U=this.__patterns.xml.read_match()}return U||(z+=this._input.match(/[\s\S]*/g)[0]),z=z.replace(s.allLineBreaks,`
`),this._create_token(f.STRING,z)}}return null};function G(K){for(var W="",z=0,U=new l(K),P=null;U.hasNext();)if(P=U.match(/([\s]|[^\\]|\\\\)+/g),P&&(W+=P[0]),U.peek()==="\\"){if(U.next(),U.peek()==="x")P=U.match(/x([0-9A-Fa-f]{2})/g);else if(U.peek()==="u")P=U.match(/u([0-9A-Fa-f]{4})/g);else{W+="\\",U.hasNext()&&(W+=U.next());continue}if(!P)return K;if(z=parseInt(P[1],16),z>126&&z<=255&&P[0].indexOf("x")===0)return K;if(z>=0&&z<32){W+="\\"+P[0];continue}else z===34||z===39||z===92?W+="\\"+String.fromCharCode(z):W+=String.fromCharCode(z)}return W}A.prototype._read_string_recursive=function(K,W,z){var U,P;K==="'"?P=this.__patterns.single_quote:K==='"'?P=this.__patterns.double_quote:K==="`"?P=this.__patterns.template_text:K==="}"&&(P=this.__patterns.template_expression);for(var H=P.read(),V="";this._input.hasNext();){if(V=this._input.next(),V===K||!W&&s.newline.test(V)){this._input.back();break}else V==="\\"&&this._input.hasNext()?(U=this._input.peek(),U==="x"||U==="u"?this.has_char_escapes=!0:U==="\r"&&this._input.peek(1)===`
`&&this._input.next(),V+=this._input.next()):z&&(z==="${"&&V==="$"&&this._input.peek()==="{"&&(V+=this._input.next()),z===V&&(K==="`"?V+=this._read_string_recursive("}",W,"`"):V+=this._read_string_recursive("`",W,"${"),this._input.hasNext()&&(V+=this._input.next())));V+=P.read(),H+=V}return H},p.exports.Tokenizer=A,p.exports.TOKEN=f,p.exports.positionable_operators=C.slice(),p.exports.line_starters=E.slice()},function(p){var d=RegExp.prototype.hasOwnProperty("sticky");function t(l){this.__input=l||"",this.__input_length=this.__input.length,this.__position=0}t.prototype.restart=function(){this.__position=0},t.prototype.back=function(){this.__position>0&&(this.__position-=1)},t.prototype.hasNext=function(){return this.__position<this.__input_length},t.prototype.next=function(){var l=null;return this.hasNext()&&(l=this.__input.charAt(this.__position),this.__position+=1),l},t.prototype.peek=function(l){var r=null;return l=l||0,l+=this.__position,l>=0&&l<this.__input_length&&(r=this.__input.charAt(l)),r},t.prototype.__match=function(l,r){l.lastIndex=r;var i=l.exec(this.__input);return i&&!(d&&l.sticky)&&(i.index!==r&&(i=null)),i},t.prototype.test=function(l,r){return r=r||0,r+=this.__position,r>=0&&r<this.__input_length?!!this.__match(l,r):!1},t.prototype.testChar=function(l,r){var i=this.peek(r);return l.lastIndex=0,i!==null&&l.test(i)},t.prototype.match=function(l){var r=this.__match(l,this.__position);return r?this.__position+=r[0].length:r=null,r},t.prototype.read=function(l,r,i){var o="",s;return l&&(s=this.match(l),s&&(o+=s[0])),r&&(s||!l)&&(o+=this.readUntil(r,i)),o},t.prototype.readUntil=function(l,r){var i="",o=this.__position;l.lastIndex=this.__position;var s=l.exec(this.__input);return s?(o=s.index,r&&(o+=s[0].length)):o=this.__input_length,i=this.__input.substring(this.__position,o),this.__position=o,i},t.prototype.readUntilAfter=function(l){return this.readUntil(l,!0)},t.prototype.get_regexp=function(l,r){var i=null,o="g";return r&&d&&(o="y"),typeof l=="string"&&l!==""?i=new RegExp(l,o):l&&(i=new RegExp(l.source,o)),i},t.prototype.get_literal_regexp=function(l){return RegExp(l.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},t.prototype.peekUntilAfter=function(l){var r=this.__position,i=this.readUntilAfter(l);return this.__position=r,i},t.prototype.lookBack=function(l){var r=this.__position-1;return r>=l.length&&this.__input.substring(r-l.length,r).toLowerCase()===l},p.exports.InputScanner=t},function(p,d,t){var l=t(8).InputScanner,r=t(3).Token,i=t(10).TokenStream,o=t(11).WhitespacePattern,s={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},u=function(a,c){this._input=new l(a),this._options=c||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};u.prototype.tokenize=function(){this._input.restart(),this.__tokens=new i,this._reset();for(var a,c=new r(s.START,""),f=null,w=[],_=new i;c.type!==s.EOF;){for(a=this._get_next_token(c,f);this._is_comment(a);)_.add(a),a=this._get_next_token(c,f);_.isEmpty()||(a.comments_before=_,_=new i),a.parent=f,this._is_opening(a)?(w.push(f),f=a):f&&this._is_closing(a,f)&&(a.opened=f,f.closed=a,f=w.pop(),a.parent=f),a.previous=c,c.next=a,this.__tokens.add(a),c=a}return this.__tokens},u.prototype._is_first_token=function(){return this.__tokens.isEmpty()},u.prototype._reset=function(){},u.prototype._get_next_token=function(a,c){this._readWhitespace();var f=this._input.read(/.+/g);return f?this._create_token(s.RAW,f):this._create_token(s.EOF,"")},u.prototype._is_comment=function(a){return!1},u.prototype._is_opening=function(a){return!1},u.prototype._is_closing=function(a,c){return!1},u.prototype._create_token=function(a,c){var f=new r(a,c,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return f},u.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},p.exports.Tokenizer=u,p.exports.TOKEN=s},function(p){function d(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}d.prototype.restart=function(){this.__position=0},d.prototype.isEmpty=function(){return this.__tokens_length===0},d.prototype.hasNext=function(){return this.__position<this.__tokens_length},d.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__tokens[this.__position],this.__position+=1),t},d.prototype.peek=function(t){var l=null;return t=t||0,t+=this.__position,t>=0&&t<this.__tokens_length&&(l=this.__tokens[t]),l},d.prototype.add=function(t){this.__parent_token&&(t.parent=this.__parent_token),this.__tokens.push(t),this.__tokens_length+=1},p.exports.TokenStream=d},function(p,d,t){var l=t(12).Pattern;function r(i,o){l.call(this,i,o),o?this._line_regexp=this._input.get_regexp(o._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}r.prototype=new l,r.prototype.__set_whitespace_patterns=function(i,o){i+="\\t ",o+="\\n\\r",this._match_pattern=this._input.get_regexp("["+i+o+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+o+"]")},r.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var i=this._input.read(this._match_pattern);if(i===" ")this.whitespace_before_token=" ";else if(i){var o=this.__split(this._newline_regexp,i);this.newline_count=o.length-1,this.whitespace_before_token=o[this.newline_count]}return i},r.prototype.matching=function(i,o){var s=this._create();return s.__set_whitespace_patterns(i,o),s._update(),s},r.prototype._create=function(){return new r(this._input,this)},r.prototype.__split=function(i,o){i.lastIndex=0;for(var s=0,u=[],a=i.exec(o);a;)u.push(o.substring(s,a.index)),s=a.index+a[0].length,a=i.exec(o);return s<o.length?u.push(o.substring(s,o.length)):u.push(""),u},p.exports.WhitespacePattern=r},function(p){function d(t,l){this._input=t,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,l&&(this._starting_pattern=this._input.get_regexp(l._starting_pattern,!0),this._match_pattern=this._input.get_regexp(l._match_pattern,!0),this._until_pattern=this._input.get_regexp(l._until_pattern),this._until_after=l._until_after)}d.prototype.read=function(){var t=this._input.read(this._starting_pattern);return(!this._starting_pattern||t)&&(t+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),t},d.prototype.read_match=function(){return this._input.match(this._match_pattern)},d.prototype.until_after=function(t){var l=this._create();return l._until_after=!0,l._until_pattern=this._input.get_regexp(t),l._update(),l},d.prototype.until=function(t){var l=this._create();return l._until_after=!1,l._until_pattern=this._input.get_regexp(t),l._update(),l},d.prototype.starting_with=function(t){var l=this._create();return l._starting_pattern=this._input.get_regexp(t,!0),l._update(),l},d.prototype.matching=function(t){var l=this._create();return l._match_pattern=this._input.get_regexp(t,!0),l._update(),l},d.prototype._create=function(){return new d(this._input,this)},d.prototype._update=function(){},p.exports.Pattern=d},function(p){function d(t,l){t=typeof t=="string"?t:t.source,l=typeof l=="string"?l:l.source,this.__directives_block_pattern=new RegExp(t+/ beautify( \w+[:]\w+)+ /.source+l,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(t+/\sbeautify\signore:end\s/.source+l,"g")}d.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var l={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(t);r;)l[r[1]]=r[2],r=this.__directive_pattern.exec(t);return l},d.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},p.exports.Directives=d},function(p,d,t){var l=t(12).Pattern,r={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function i(o,s){l.call(this,o,s),this.__template_pattern=null,this._disabled=Object.assign({},r),this._excluded=Object.assign({},r),s&&(this.__template_pattern=this._input.get_regexp(s.__template_pattern),this._excluded=Object.assign(this._excluded,s._excluded),this._disabled=Object.assign(this._disabled,s._disabled));var u=new l(o);this.__patterns={handlebars_comment:u.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:u.starting_with(/{{{/).until_after(/}}}/),handlebars:u.starting_with(/{{/).until_after(/}}/),php:u.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:u.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:u.starting_with(/{%/).until_after(/%}/),django_value:u.starting_with(/{{/).until_after(/}}/),django_comment:u.starting_with(/{#/).until_after(/#}/),smarty:u.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:u.starting_with(/{\*/).until_after(/\*}/),smarty_literal:u.starting_with(/{literal}/).until_after(/{\/literal}/)}}i.prototype=new l,i.prototype._create=function(){return new i(this._input,this)},i.prototype._update=function(){this.__set_templated_pattern()},i.prototype.disable=function(o){var s=this._create();return s._disabled[o]=!0,s._update(),s},i.prototype.read_options=function(o){var s=this._create();for(var u in r)s._disabled[u]=o.templating.indexOf(u)===-1;return s._update(),s},i.prototype.exclude=function(o){var s=this._create();return s._excluded[o]=!0,s._update(),s},i.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var s=this._read_template();s;)this._match_pattern?s+=this._input.read(this._match_pattern):s+=this._input.readUntil(this.__template_pattern),o+=s,s=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},i.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},i.prototype._read_template=function(){var o="",s=this._input.peek();if(s==="<"){var u=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&u==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&u==="%"&&(o=o||this.__patterns.erb.read())}else s==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},p.exports.TemplatablePattern=i}],m={};function S(p){var d=m[p];if(d!==void 0)return d.exports;var t=m[p]={exports:{}};return y[p](t,t.exports,S),t.exports}var b=S(0);O=b})();var M=O;!(N=[],v=function(){return{js_beautify:M}}.apply($,N),v!==void 0&&(F.exports=v))})()},"6eGT":function(F,$,j){"use strict";function N(v){return null}$.a=N},"7Cbv":function(F,$,j){"use strict";var N=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),v=new Uint8Array(16);function O(){if(!N)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return N(v)}var M=/^(?:[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 y(r){return typeof r=="string"&&M.test(r)}for(var m=y,S=[],b=0;b<256;++b)S.push((b+256).toString(16).substr(1));function p(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(S[r[i+0]]+S[r[i+1]]+S[r[i+2]]+S[r[i+3]]+"-"+S[r[i+4]]+S[r[i+5]]+"-"+S[r[i+6]]+S[r[i+7]]+"-"+S[r[i+8]]+S[r[i+9]]+"-"+S[r[i+10]]+S[r[i+11]]+S[r[i+12]]+S[r[i+13]]+S[r[i+14]]+S[r[i+15]]).toLowerCase();if(!m(o))throw TypeError("Stringified UUID is invalid");return o}var d=p;function t(r,i,o){r=r||{};var s=r.random||(r.rng||O)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,i){o=o||0;for(var u=0;u<16;++u)i[o+u]=s[u];return i}return d(s)}var l=$.a=t},"7ahc":function(F,$,j){"use strict";j.d($,"a",function(){return w});var N=j("k1fw"),v=j("0Owb"),O=j("+L6B"),M=j("2/Rp"),y=j("y8nQ"),m=j("Vl3Y"),S=j("tJVT"),b=j("OaEy"),p=j("2fM7"),d=j("cDcd"),t=j.n(d),l=j("VrN/"),r=j.n(l),i=j("p77/"),o=j.n(i),s=j("c5Ni"),u=j.n(s),a=p.a.Option,c={labelCol:{span:4},wrapperCol:{span:20}},f={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(_){var h=_.callback,R=_.onCancel,C=Object(d.useState)("python"),g=Object(S.a)(C,2),x=g[0],E=g[1];function T(L){E(f[L][1])}function k(L){h(L)}return t.a.createElement(m.a,Object(v.a)({},c,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:k}),t.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},t.a.createElement(p.a,{onChange:T},Object.keys(f).map(function(L){return t.a.createElement(a,{key:L,value:L},f[L][0])}))),t.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},t.a.createElement(w,{mode:x})),t.a.createElement("div",{className:"flex-container flex-end"},t.a.createElement(M.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),t.a.createElement(M.a,{type:"ghost",onClick:R},"\u53D6\u6D88")))};function w(_){var h=_.value,R=_.onChange,C=_.mode,g=_.options,x=g===void 0?{}:g,E=Object(d.useRef)(),T=Object(d.useState)(),k=Object(S.a)(T,2),L=k[0],A=k[1];return Object(d.useEffect)(function(){if(L){function G(K){var W=K.getValue();R&&R(W)}return L.on("change",G),function(){L.off("change",G)}}},[L,R]),Object(d.useEffect)(function(){L&&L.setOption("mode",C)},[L,C]),Object(d.useEffect)(function(){L&&((h!==L.getValue()||h==="")&&setTimeout(function(){L.setValue(h||" ")},300))},[L,h]),Object(d.useEffect)(function(){if(E.current&&!L){var G=r.a.fromTextArea(E.current,Object(N.a)({mode:C,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},x));A(G)}},[E.current,L]),t.a.createElement("div",{className:"my-codemirror-container"},t.a.createElement("textarea",{ref:E}))}},"815F":function(F,$,j){"use strict";j.d($,"e",function(){return S}),j.d($,"c",function(){return p}),j.d($,"d",function(){return d}),j.d($,"a",function(){return l}),j.d($,"f",function(){return r}),j.d($,"b",function(){return i});var N=j("KQm4"),v=j("VTBJ"),O=j("Ff2n"),M=j("Zm9Q"),y=j("Kwbf"),m=j("OZM5");function S(o,s){return o!=null?o:s}function b(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=new Map;function u(a){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(a||[]).forEach(function(f){var w=f.key,_=f.children;Object(y.a)(w!=null,"Tree node must have a certain key: [".concat(c).concat(w,"]"));var h=String(w);Object(y.a)(!s.has(h)||w===null||w===void 0,"Same 'key' exist in the Tree: ".concat(h)),s.set(h,!0),u(_,"".concat(c).concat(h," > "))})}u(o)}function p(o){function s(u){var a=Object(M.a)(u);return a.map(function(c){if(!Object(m.i)(c))return Object(y.a)(!c,"Tree/TreeNode can only accept TreeNode as children."),null;var f=c.key,w=c.props,_=w.children,h=Object(O.a)(w,["children"]),R=Object(v.a)({key:f},h),C=s(_);return C.length&&(R.children=C),R}).filter(function(c){return c})}return s(o)}function d(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],u=new Set(s===!0?[]:s),a=[];function c(f){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return f.map(function(_,h){var R=Object(m.h)(w?w.pos:"0",h),C=S(_.key,R),g=Object(v.a)(Object(v.a)({},_),{},{parent:w,pos:R,children:null,data:_,isStart:[].concat(Object(N.a)(w?w.isStart:[]),[h===0]),isEnd:[].concat(Object(N.a)(w?w.isEnd:[]),[h===f.length-1])});return a.push(g),s===!0||u.has(C)?g.children=c(_.children||[],g):g.children=[],g})}return c(o),a}function t(o,s,u){var a;u?typeof u=="string"?a=function(w){return w[u]}:typeof u=="function"&&(a=function(w){return u(w)}):a=function(w,_){return S(w.key,_)};function c(f,w,_){var h=f?f.children:o,R=f?Object(m.h)(_.pos,w):"0";if(f){var C=a(f,R),g={node:f,index:w,pos:R,key:C,parentPos:_.node?_.pos:null,level:_.level+1};s(g)}h&&h.forEach(function(x,E){c(x,E,{node:f,pos:R,level:_?_.level+1:-1})})}c(null)}function l(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=s.initWrapper,a=s.processEntity,c=s.onProcessFinished,f=arguments.length>2?arguments[2]:void 0,w={},_={},h={posEntities:w,keyEntities:_};return u&&(h=u(h)||h),t(o,function(R){var C=R.node,g=R.index,x=R.pos,E=R.key,T=R.parentPos,k=R.level,L={node:C,index:g,key:E,pos:x,level:k},A=S(E,x);w[x]=L,_[A]=L,L.parent=w[T],L.parent&&(L.parent.children=L.parent.children||[],L.parent.children.push(L)),a&&a(L,h)},f),c&&c(h),h}function r(o,s){var u=s.expandedKeys,a=s.selectedKeys,c=s.loadedKeys,f=s.loadingKeys,w=s.checkedKeys,_=s.halfCheckedKeys,h=s.dragOverNodeKey,R=s.dropPosition,C=s.keyEntities,g=C[o],x={eventKey:o,expanded:u.indexOf(o)!==-1,selected:a.indexOf(o)!==-1,loaded:c.indexOf(o)!==-1,loading:f.indexOf(o)!==-1,checked:w.indexOf(o)!==-1,halfChecked:_.indexOf(o)!==-1,pos:String(g?g.pos:""),dragOver:h===o&&R===0,dragOverGapTop:h===o&&R===-1,dragOverGapBottom:h===o&&R===1};return x}function i(o){var s=o.data,u=o.expanded,a=o.selected,c=o.checked,f=o.loaded,w=o.loading,_=o.halfChecked,h=o.dragOver,R=o.dragOverGapTop,C=o.dragOverGapBottom,g=o.pos,x=o.active,E=Object(v.a)(Object(v.a)({},s),{},{expanded:u,selected:a,checked:c,loaded:f,loading:w,halfChecked:_,dragOver:h,dragOverGapTop:R,dragOverGapBottom:C,pos:g,active:x});return"props"in E||Object.defineProperty(E,"props",{get:function(){return Object(y.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),o}}),E}},"8EBN":function(F,$,j){(function(N){N(j("VrN/"))})(function(N){"use strict";N.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 v=0;v<N.modeInfo.length;v++){var O=N.modeInfo[v];O.mimes&&(O.mime=O.mimes[0])}N.findModeByMIME=function(M){M=M.toLowerCase();for(var y=0;y<N.modeInfo.length;y++){var m=N.modeInfo[y];if(m.mime==M)return m;if(m.mimes){for(var S=0;S<m.mimes.length;S++)if(m.mimes[S]==M)return m}}if(/\+xml$/.test(M))return N.findModeByMIME("application/xml");if(/\+json$/.test(M))return N.findModeByMIME("application/json")},N.findModeByExtension=function(M){M=M.toLowerCase();for(var y=0;y<N.modeInfo.length;y++){var m=N.modeInfo[y];if(m.ext){for(var S=0;S<m.ext.length;S++)if(m.ext[S]==M)return m}}},N.findModeByFileName=function(M){for(var y=0;y<N.modeInfo.length;y++){var m=N.modeInfo[y];if(m.file&&m.file.test(M))return m}var S=M.lastIndexOf("."),b=S>-1&&M.substring(S+1,M.length);if(b)return N.findModeByExtension(b)},N.findModeByName=function(M){M=M.toLowerCase();for(var y=0;y<N.modeInfo.length;y++){var m=N.modeInfo[y];if(m.name.toLowerCase()==M)return m;if(m.alias){for(var S=0;S<m.alias.length;S++)if(m.alias[S].toLowerCase()==M)return m}}}})},"8hTe":function(F,$,j){F.exports={button:"button___1wy9m"}},"9Bee":function(F,$,j){"use strict";var N=j("DYRE"),v=j("zeV3"),O=j("+L6B"),M=j("2/Rp"),y=j("k1fw"),m=j("tJVT"),S=j("cDcd"),b=j.n(S),p=j("vg9a"),d=j("DlQD"),t=j.n(d),l=j("rUJ1");function r(ae,xe){var ge=ae.match(/^(\s+)(?:```)/);if(ge===null)return xe;var oe=ge[1];return xe.split(`
`).map(function(se){var te=se.match(/^\s+/);if(te===null)return se;var be=Object(m.a)(te,1),ee=be[0];return ee.length>=oe.length?se.slice(oe.length):se}).join(`
`)}var i=[],o=["<ul>"],s=new t.a.Renderer,u=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function a(){i.length=0,o=["<ul>"]}var c={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function f(ae,xe,ge,oe){if(xe>=ae.length||ae[xe].level<=ge)return xe;var se=ae[xe];oe.push("<li><a href='#"+se.anchor+"'>"+se.text+"</a>"),xe++;var te=[];return xe=f(ae,xe,se.level,te),te.length>0&&(oe.push("<ul>"),te.forEach(function(be){oe.push(be)}),oe.push("</ul>")),oe.push("</li>"),xe=f(ae,xe,ge,oe),xe}function w(){return f(i,0,0,o),o.push("</ul>"),o.join("")}var _={heading:function(xe){var ge=u.exec(xe);if(ge)return{type:"heading",raw:ge[0],depth:ge[1].length,text:ge[2]}},fences:function(xe){var ge=this.rules.block.fences.exec(xe);if(ge){var oe=ge[0],se=r(oe,ge[3]||""),te=ge[2]?ge[2].trim():ge[2];if(["latex","katex","math"].indexOf(te)>=0){var be=C(),ee=se;se=be,g[be]={type:"block",expression:ee}}return{type:"code",raw:oe,lang:te,text:se}}}},h=/(?:\${2})([^\n`]+?)(?:\${2})/gi,R=0,C=function(){return"__special_katext_id_".concat(R++,"__")},g={};function x(){return g}function E(){R=0,g={}}function T(ae){return ae=ae.replace(h,function(xe,ge){var oe=C();return g[oe]={type:"inline",expression:ge},oe}),ae}var k=s.listitem;s.listitem=function(ae){return k(T(ae))};var L=s.paragraph;s.paragraph=function(ae){return L(T(ae))};var A=s.tablecell;s.tablecell=function(ae,xe){return A(T(ae),xe)},s.code=function(ae,xe,ge){var oe=(xe||"").match(/\S*/)[0];return oe?["latex","katex","math"].indexOf(oe)>=0?"<p class='editormd-tex'>".concat(ae,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(xe,'">').concat(ge?ae:Object(l.escape)(ae,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(ge?ae:Object(l.escape)(ae,!0))+"</code></pre>"},s.heading=function(ae,xe,ge){var oe=this.options.headerPrefix+ge.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return i.push({anchor:oe,level:xe,text:ae}),"<h"+xe+' id="'+oe+'">'+ae+"</h"+xe+">"},t.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),t.a.use({tokenizer:_,renderer:s});var G=t.a,K=j("SJMd"),W=j("ulZh"),z=j.n(W),U=j("m3rI"),P=j("Oy/b"),H=j("p5ED"),V=j("8hTe"),q=j.n(V),Z=/<pre[^>]*>/g;function ce(ae){var xe=document.createElement("div");return xe.innerHTML=ae,xe.childNodes.length===0?"":xe.childNodes[0].nodeValue}var he=$.a=function(ae){var xe=ae.value,ge=xe===void 0?"":xe,oe=ae.edit,se=oe===void 0?!1:oe,te=ae.className,be=ae.showTextOnly,ee=ae.showLines,ie=ae.replaces,Ee=ae.zoomImg,ne=ae.hasMask,J=ae.style,X=J===void 0?{}:J,Q=ae.stylesPrev,me=Q===void 0?{}:Q,fe=String(ge),Te=Object(S.useRef)(),ze=Object(S.useRef)(),Je=Object(S.useState)(""),qe=Object(m.a)(Je,2),Xe=qe[0],et=qe[1],rt=Object(S.useState)("office"),Le=Object(m.a)(rt,2),Oe=Le[0],Ve=Le[1],Ze=Object(S.useMemo)(function(){try{var Ae=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,de=/\"\/api\/attachments\/|\"\/attachments\/download\//g,_e=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;fe=fe.replace(Ae,"("+U.a.API_SERVER+"/api/attachments/").replace(de,'"'+U.a.API_SERVER+"/api/attachments/").replace(_e,'"'+U.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`)}catch(Ye){}var Se=G(fe),Ie=x();if(fe.match(/\[TOC\]/)&&(Se=Se.replace("<p>[TOC]</p>",w()),a()),Se=Se.replace(/(__special_katext_id_\d+__)/g,function(Ye,nt){var lt=Ie[nt],at=lt.type,ot=lt.expression;return Object(P.renderToString)(ce(ot)||"",{displayMode:at==="block",throwOnError:!1,output:"html"})}),Se=Se.replace(/▁/g,"\u2581\u2581\u2581"),E(),be){var ke=document.createElement("div");return ke.innerHTML=Se,ke.innerText}return setTimeout(function(){return De()},500),Se},[fe]),Ne=Object(S.useRef)();c.WebkitLineClamp=ee,ee&&(X=Object(y.a)(Object(y.a)({},X),c));function Ge(Ae){var de=Ae.target;if(de.tagName.toUpperCase()==="IMG"){if(Ee){var _e=de.getAttribute("src");et(_e),Ve("image")}}else if(de.tagName.toUpperCase()==="A"){var Se=de.getAttribute("href");if(Se.indexOf("office")>-1)Ae.preventDefault(),et(Se),Ve("office");else if(Se.indexOf("application/pdf")>-1)Ae.preventDefault(),et(Se),Ve("pdf");else if(Se.indexOf("text/html")>-1)Ae.preventDefault(),et(Se),Ve("html");else if(Se.startsWith("#")){Ae.preventDefault();var Ie=document.getElementById(Se.replace("#",""));Ie&&Ie.scrollIntoView(!0)}}}var De=function(){var de,_e=(de=Ne.current)===null||de===void 0?void 0:de.querySelectorAll("video");_e==null||_e.forEach(function(Se){if(Se.oncontextmenu=function(){return!1},Se.src.indexOf(".m3u8")>-1&&!Se.canPlayType("application/vnd.apple.mpegurl")){if(z.a.isSupported()){var Ie=new z.a;Ie.loadSource(Se.src),Ie.attachMedia(Se)}}})};Object(S.useEffect)(function(){if(Ne.current&&Ze&&(Ze.match(Z)&&window.PR.prettyPrint()),Ne.current)return Ne.current.addEventListener("click",Ge),function(){Ne.current.removeEventListener("click",Ge),E(),a()}},[Ze,Ne.current,Ge]);var we=function(de){if(!se)return;de.target.nodeName==="IMG"?(Te.current.style.display="flex",Te.current.style.width=de.target.clientWidth+"px",Te.current.style.height=de.target.clientHeight+"px",Te.current.style.top=de.target.offsetTop+"px",Te.current.style.left=de.target.offsetLeft+"px",ze.current.src=de.target.getAttribute("src")):Te.current.style.display="none"};return b.a.createElement("div",{style:{position:"relative"}},b.a.createElement("div",{ref:Ne,style:Object(y.a)({},X),className:"".concat(te||""," markdown-body ").concat(q.a.mdBody),onMouseOver:we,dangerouslySetInnerHTML:{__html:Ze}}),b.a.createElement("div",{ref:Te,className:q.a.button},b.a.createElement(v.a,null,b.a.createElement(M.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),b.a.createElement(M.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),b.a.createElement("img",{ref:ze,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),b.a.createElement(H.a,{close:!0,data:Xe,type:Xe!=null&&Xe.length?Oe:"",style:Object(y.a)({},me),onClose:function(){return et("")}}))}},"9OqN":function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.mode.CTR=function(){var v=N.lib.BlockCipherMode.extend(),O=v.Encryptor=v.extend({processBlock:function(M,y){var m=this._cipher,S=m.blockSize,b=this._iv,p=this._counter;b&&(p=this._counter=b.slice(0),this._iv=void 0);var d=p.slice(0);m.encryptBlock(d,0),p[S-1]=p[S-1]+1|0;for(var t=0;t<S;t++)M[y+t]^=d[t]}});return v.Decryptor=O,v}(),N.mode.CTR})},"9VGf":function(F,$,j){"use strict";j.d($,"a",function(){return O});var N=j("cDcd"),v=j.n(N);function O(M,y){var m=Object(N.useRef)();Object(N.useEffect)(function(){m.current=M}),Object(N.useEffect)(function(){function S(){m.current()}if(y!==null){var b=setInterval(S,y);return function(){return clearInterval(b)}}},[y])}},ALsQ:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.mode.CFB=function(){var v=N.lib.BlockCipherMode.extend();v.Encryptor=v.extend({processBlock:function(M,y){var m=this._cipher,S=m.blockSize;O.call(this,M,y,S,m),this._prevBlock=M.slice(y,y+S)}}),v.Decryptor=v.extend({processBlock:function(M,y){var m=this._cipher,S=m.blockSize,b=M.slice(y,y+S);O.call(this,M,y,S,m),this._prevBlock=b}});function O(M,y,m,S){var b,p=this._iv;p?(b=p.slice(0),this._iv=void 0):b=this._prevBlock,S.encryptBlock(b,0);for(var d=0;d<m;d++)M[y+d]^=b[d]}return v}(),N.mode.CFB})},B7Ph:function(F,$,j){"use strict";j.d($,"a",function(){return q});var N=j("5NDa"),v=j("5rEg"),O=j("sRBo"),M=j("kaz8"),y=j("5Dmo"),m=j("3S7+"),S=j("14J3"),b=j("BMrR"),p=j("7Kak"),d=j("9yH6"),t=j("+L6B"),l=j("2/Rp"),r=j("2qtc"),i=j("kLXV"),o=j("miYZ"),s=j("tsqr"),u=j("k1fw"),a=j("9og8"),c=j("tJVT"),f=j("oBTY"),w=j("DZo9"),_=j("8z0m"),h=j("WmNS"),R=j.n(h),C=j("cDcd"),g=j.n(C),x=j("Bvq2"),E=j.n(x),T=j("nj2k"),k=j.n(T),L=j("mxV5"),A=j.n(L),G=j("KhGG"),K=j("ErOA"),W=j("7Cbv"),z=j("1vsH"),U=j("p5ED"),P=_.a.Dragger,H=function(ce){for(var he=function(Ee){return Ee&&Ee.substring(0,Ee.lastIndexOf("."))},ae=Object(f.a)(ce),xe=0,ge=[],oe=0;oe<ae.length;oe++){for(var se="",te=0;te<ge.length;te++)if(he(ge[te][0].name)==he(ae[oe].name)){xe=1,se=te;break}if(xe==1)ge[se].push(ae[oe]),xe=0;else if(xe==0){var be=new Array;be.push(ae[oe]),ge.push(be)}}var ee=ge.map(function(ie){if(ie[0].name.includes(".in"))return ie.length===2?ie:[ie[0],{}];if(ie[0].name.includes(".out"))return ie.length===2?ie.reverse():[{},ie[0]]});return ee},V=function(ce){var he=ce.onClose,ae=ce.onOK,xe=ce.visible,ge=ce.wrapClassName,oe=ce.rootIdentifier,se=ce.multiple,te=se===void 0?!1:se,be=ce.defaultMultipleValue,ee=be===void 0?!0:be,ie=Object(C.useState)([]),Ee=Object(c.a)(ie,2),ne=Ee[0],J=Ee[1],X=Object(C.useState)({}),Q=Object(c.a)(X,2),me=Q[0],fe=Q[1],Te=Object(C.useState)(!1),ze=Object(c.a)(Te,2),Je=ze[0],qe=ze[1],Xe=Object(C.useState)(!0),et=Object(c.a)(Xe,2),rt=et[0],Le=et[1],Oe=Object(C.useState)(null),Ve=Object(c.a)(Oe,2),Ze=Ve[0],Ne=Ve[1],Ge=Object(C.useRef)([]),De=Object(C.useRef)(0),we=function(){he()};Object(C.useEffect)(function(){Ae()},[]),Object(C.useEffect)(function(){xe&&(Ge.current=[],De.current=0,J([]),Le(ee))},[xe]);var Ae=function(){var lt=Object(a.a)(R.a.mark(function at(){var ot,Ct;return R.a.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return ft.prev=0,ft.next=3,Object(K.a)("/api/buckets/get_upload_token_for_big_files",{method:"get"});case 3:ot=ft.sent,(ot==null?void 0:ot.status)===0&&(ot!=null&&ot.is_oss?(Ct=JSON.parse(Object(G.a)(ot.data)),fe(Ct),Ne(!1)):Ne(!0)),ft.next=9;break;case 7:ft.prev=7,ft.t0=ft.catch(0);case 9:case"end":return ft.stop()}},at,null,[[0,7]])}));return function(){return lt.apply(this,arguments)}}(),de=function(at){return at&&at.substring(0,at.lastIndexOf("."))},_e=function(at){var ot,Ct,bt=de((ot=at[0])===null||ot===void 0?void 0:ot.name)||de((Ct=at[1])===null||Ct===void 0?void 0:Ct.name),ft=ne.filter(function(jt){return de(jt.name)!==bt});Ge.current=Object(f.a)(ft),J(Object(f.a)(ft))},Se=function(at){if(!rt){var ot=new FormData;ot.append("file",at.file);var Ct=Object(K.a)("/api/attachments/get_file_content.json",{method:"post",body:ot},!0);Ct.then(function(Et){if(Et.status===0){De.current=De.current+1;var Vt=Ge.current.map(function(dt){if(dt.name===at.name){var At,Mt=Object(u.a)({},dt);return at!=null&&(At=at.name)!==null&&At!==void 0&&At.includes(".in")?Mt.input=Et==null?void 0:Et.content:Mt.output=Et==null?void 0:Et.content,Mt}return dt});if(Ge.current=Object(f.a)(Vt),J(Object(f.a)(Vt)),De.current>0&&De.current===ne.length){qe(!1);var pt=H(Vt);pt=pt.filter(function(dt){var At,Mt;return!!((At=dt[0])!==null&&At!==void 0&&At.name&&(Mt=dt[1])!==null&&Mt!==void 0&&Mt.name)}),pt=pt.map(function(dt){return Object(u.a)(Object(u.a)(Object(u.a)({},dt[0]),dt[1]),{},{is_file:!1})}),ae(pt),he()}}else qe(!1),he()});return}if(Ze){var bt=new FormData;bt.append("file",at.file);var ft=Object(K.a)("/api/attachments.json",{method:"post",body:bt},!0);ft.then(function(Et){if(Et.filename){De.current=De.current+1;var Vt=Ge.current.map(function(dt){if(dt.name===(Et==null?void 0:Et.filename)){var At,Mt=Object(u.a)(Object(u.a)({},dt),{},{is_oss:!Ze});return Et!=null&&(At=Et.filename)!==null&&At!==void 0&&At.includes(".in")?(Mt.in_object_key=Et==null?void 0:Et.object,Mt.in_object_size=Et==null?void 0:Et.size,Mt.input=Et==null?void 0:Et.filename,Mt.in_file=at):(Mt.out_object_key=Et==null?void 0:Et.object,Mt.out_object_size=Et==null?void 0:Et.size,Mt.output=Et==null?void 0:Et.filename,Mt.out_file=at),Mt}return dt});if(Ge.current=Object(f.a)(Vt),J(Object(f.a)(Vt)),De.current>0&&De.current===ne.length){qe(!1);var pt=H(Vt);pt=pt.filter(function(dt){var At,Mt;return!!((At=dt[0])!==null&&At!==void 0&&At.name&&(Mt=dt[1])!==null&&Mt!==void 0&&Mt.name)}),pt=pt.map(function(dt){return Object(u.a)(Object(u.a)(Object(u.a)({},dt[0]),dt[1]),{},{is_file:!0})}),ae(pt),he()}}else qe(!1),he()});return}var jt=new A.a({endpoint:me.end_point,region:me.region,accessKeyId:me.access_key_id,accessKeySecret:me.access_key_secret,bucket:me.bucket,stsToken:me.security_token}),Pt=at.name,Xt={container_type:"TestSet",file_name:Pt},Qt=Object(W.a)(),kt="testsets/".concat(oe,"/").concat(Qt).concat(Pt.indexOf(".")>-1?"."+Pt.split(".").pop():"");oe===null&&(kt="testsets/".concat(Qt).concat(Pt.indexOf(".")>-1?"."+Pt.split(".").pop():"")),jt.multipartUpload(kt,new Blob([at.file],{type:at.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Pt+""},url:me==null?void 0:me.callback_url,host:me==null?void 0:me.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(K.e)(Xt)}}).then(function(Et){if(Et.data.status===0){De.current=De.current+1;var Vt=Ge.current.map(function(dt){var At,Mt;if(dt.name===((At=Et.data)===null||At===void 0||((Mt=At.data)===null||Mt===void 0)?void 0:Mt.file_name)){var rr,Fn,yt,St=Object(u.a)(Object(u.a)({},dt),{},{is_oss:!Ze});if((rr=Et.data)!==null&&rr!==void 0&&(Fn=rr.data)!==null&&Fn!==void 0&&(yt=Fn.file_name)!==null&&yt!==void 0&&yt.includes(".in")){var vt,yr,Tr,Bt,Rt,br;St.in_object_key=(vt=Et.data)===null||vt===void 0||((yr=vt.data)===null||yr===void 0)?void 0:yr.object,St.in_object_size=(Tr=Et.data)===null||Tr===void 0||((Bt=Tr.data)===null||Bt===void 0)?void 0:Bt.size,St.input=(Rt=Et.data)===null||Rt===void 0||((br=Rt.data)===null||br===void 0)?void 0:br.file_name,St.in_file=at}else{var $r,Cr,ut,It,Br,Vr;St.out_object_key=($r=Et.data)===null||$r===void 0||((Cr=$r.data)===null||Cr===void 0)?void 0:Cr.object,St.out_object_size=(ut=Et.data)===null||ut===void 0||((It=ut.data)===null||It===void 0)?void 0:It.size,St.output=(Br=Et.data)===null||Br===void 0||((Vr=Br.data)===null||Vr===void 0)?void 0:Vr.file_name,St.out_file=at}return St}return dt});if(Ge.current=Object(f.a)(Vt),J(Object(f.a)(Vt)),De.current>0&&De.current===ne.length){qe(!1);var pt=H(Vt);pt=pt.filter(function(dt){var At,Mt;return!!((At=dt[0])!==null&&At!==void 0&&At.name&&(Mt=dt[1])!==null&&Mt!==void 0&&Mt.name)}),pt=pt.map(function(dt){return Object(u.a)(Object(u.a)(Object(u.a)({},dt[0]),dt[1]),{},{is_file:!0})}),ae(pt),he()}}})},Ie=function(at){return new Promise(function(ot,Ct){for(var bt=0,ft=[],jt=function(Qt){at[Qt].file.slice(0,1).arrayBuffer().then(function(){bt++,bt===at.length&&(ft.length?(s.b.warn("".concat(ft.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Ct()):ot(at))}).catch(function(kt){console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",kt),bt++,ft.push(at[Qt].name),bt===at.length&&(ft.length?(s.b.warn("".concat(ft.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Ct()):ot(at))})},Pt=0;Pt<at.length;Pt++)jt(Pt)})},ke=function(){var lt=Object(a.a)(R.a.mark(function at(){var ot;return R.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:if(!(ne.length===0)){bt.next=3;break}return s.b.warn("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6"),bt.abrupt("return");case 3:return bt.next=5,Ie(ne);case 5:if(qe(!0),ot=H(ne),!ot.some(function(ft){var jt,Pt;return!((jt=ft[0])!==null&&jt!==void 0&&jt.name&&(Pt=ft[1])!==null&&Pt!==void 0&&Pt.name)})){bt.next=10;break}return i.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 ft=Object(a.a)(R.a.mark(function Pt(){return R.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:ne.map(function(){var kt=Object(a.a)(R.a.mark(function Et(Vt){return R.a.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:Se(Vt);case 1:case"end":return dt.stop()}},Et)}));return function(Et){return kt.apply(this,arguments)}}());case 1:case"end":return Qt.stop()}},Pt)}));function jt(){return ft.apply(this,arguments)}return jt}(),onCancel:function(){qe(!1)}}),bt.abrupt("return");case 10:ne.map(function(){var ft=Object(a.a)(R.a.mark(function jt(Pt){return R.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:Se(Pt);case 1:case"end":return Qt.stop()}},jt)}));return function(jt){return ft.apply(this,arguments)}}());case 11:case"end":return bt.stop()}},at)}));return function(){return lt.apply(this,arguments)}}(),Ye={name:"file",fileList:ne,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:function(at){if(ne!=null&&ne.some(function(Ct){return Ct.name===at.name}))return s.b.info("".concat(at.name,"\u6587\u4EF6\u5DF2\u5B58\u5728")),!1;if(at.size/1024/1024>100)return s.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(at.name))return s.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var ot={name:at.name,uid:at.uid,file:at,percent:0};return ne.push(ot),Ge.current=Object(f.a)(ne),J(Object(f.a)(ne)),!1}},nt=H(ne);return console.log(ne,nt,"fileList"),g.a.createElement(i.a,{visible:xe,wrapClassName:ge,onOk:ke,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:Je},onCancel:we,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},g.a.createElement("div",{className:E.a.wrap},ne.length?g.a.createElement("div",null,g.a.createElement(b.a,{justify:"space-between",align:"middle",className:"mb20"},g.a.createElement("div",{style:{visibility:te?"visible":"hidden"}},"\u6D4B\u8BD5\u7528\u4F8B\u7C7B\u578B\uFF1A",g.a.createElement(d.a.Group,{className:"ml10",value:rt,onChange:function(at){return Le(at.target.value)}},g.a.createElement(d.a,{value:!1},"\u6587\u672C"),g.a.createElement(d.a,{value:!0},"\u6587\u4EF6"))),g.a.createElement(_.a,Ye,g.a.createElement(l.a,{className:E.a.btnS},"\u4E0A\u4F20\u6587\u4EF6"))),g.a.createElement(q,{data:nt,onRemove:_e})):g.a.createElement("div",{className:E.a.noData},g.a.createElement("img",{src:k.a,alt:""}),g.a.createElement(_.a,Ye,g.a.createElement(l.a,{className:E.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),g.a.createElement("div",{className:E.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",g.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",g.a.createElement("br",null),"2\u3001\u4E0A\u4F20\u7684\u6587\u4EF6\u7F16\u7801\u4EC5\u652F\u6301UTF-8\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6587\u672C\u4E71\u7801\u3002",g.a.createElement("br",null),"3\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",g.a.createElement("br",null),"4\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002",g.a.createElement("br",null))))},q=function(ce){var he=ce.data,ae=he===void 0?[]:he,xe=ce.onRemove,ge=ce.width,oe=ge===void 0?"auto":ge,se=ce.showScore,te=se===void 0?!1:se,be=ce.disabled,ee=be===void 0?!1:be,ie=ce.inputChange,Ee=ce.onEvaluatingChange,ne=ce.showEvaluatingSetting,J=ne===void 0?!1:ne,X={value:"",filename:"",dataUrl:""},Q=Object(C.useState)(Object(u.a)({},X)),me=Object(c.a)(Q,2),fe=me[0],Te=me[1],ze=function(et){var rt=document.createElement("a");document.body.appendChild(rt);var Le=URL.createObjectURL(et.file);rt.href=Le,rt.download=et.name,rt.click(),URL.revokeObjectURL(Le),document.body.removeChild(rt)},Je=function(et,rt){Object(z.y)(et,rt)},qe=function(et,rt){i.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:g.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){xe(et,rt)},onCancel:function(){}})};return ae.length?g.a.createElement("div",{style:{width:oe}},g.a.createElement("div",{className:E.a.head},J&&g.a.createElement("div",{style:{width:"10%"}},"\u9690\u85CF",g.a.createElement(m.a,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},g.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),g.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),g.a.createElement("div",{style:{width:te?"25%":"35%",padding:"0 12px"}},"\u8F93\u5165"),g.a.createElement("div",{style:{width:te?"25%":"35%",padding:"0 12px"}},"\u8F93\u51FA"),te&&g.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),J&&g.a.createElement("div",{style:{width:"20%"}},"\u9884\u671F\u8F93\u51FA",g.a.createElement(m.a,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},g.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),J&&g.a.createElement("div",{style:{width:"20%"}},"\u7279\u6B8A\u5224\u5B9A",g.a.createElement(m.a,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},g.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),g.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),ae.map(function(Xe,et){var rt,Le,Oe,Ve;return g.a.createElement("div",{key:et,className:E.a.list},J&&g.a.createElement("div",{style:{width:"10%"}},g.a.createElement(M.a,{checked:!!Xe.hidden,onChange:function(Ne){Ee(Ne.target.checked?1:0,et,"hidden")}})),g.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",et+1),g.a.createElement("div",{className:E.a.info,style:{width:te?"25%":"35%"}},g.a.createElement("span",{title:Xe.input||((rt=Xe[0])===null||rt===void 0?void 0:rt.name),onClick:Object(a.a)(R.a.mark(function Ze(){var Ne,Ge;return R.a.wrap(function(we){for(;;)switch(we.prev=we.next){case 0:if(Xe.input?Xe.input_file_url?Ne=Xe.input_file_url:Ne=Xe.in_file:Ne=Xe[0],!(typeof Ne=="string")){we.next=14;break}return we.next=4,fetch(Ne,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return Ge=we.sent,we.t0=Te,we.next=8,Ge.text();case 8:we.t1=we.sent,we.t2=Ne,we.t3={value:we.t1,filename:"",dataUrl:we.t2},(0,we.t0)(we.t3),we.next=18;break;case 14:return we.next=16,Object(z.H)(Ne.file);case 16:Ge=we.sent,Te({value:Ge.text,filename:Ne.name,dataUrl:Ge.link});case 18:case"end":return we.stop()}},Ze)}))},Xe.input||((Le=Xe[0])===null||Le===void 0?void 0:Le.name))),g.a.createElement("div",{className:E.a.info,style:{width:te?"25%":"35%"}},g.a.createElement("span",{title:Xe.output||((Oe=Xe[1])===null||Oe===void 0?void 0:Oe.name),onClick:Object(a.a)(R.a.mark(function Ze(){var Ne,Ge;return R.a.wrap(function(we){for(;;)switch(we.prev=we.next){case 0:if(Xe.input?Xe.output_file_url?Ne=Xe.output_file_url:Ne=Xe.out_file:Ne=Xe[1],!(typeof Ne=="string")){we.next=14;break}return we.next=4,fetch(Ne,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return Ge=we.sent,we.t0=Te,we.next=8,Ge.text();case 8:we.t1=we.sent,we.t2=Ne,we.t3={value:we.t1,filename:"",dataUrl:we.t2},(0,we.t0)(we.t3),we.next=18;break;case 14:return we.next=16,Object(z.H)(Ne.file);case 16:Ge=we.sent,Te({value:Ge.text,filename:Ne.name,dataUrl:Ge.link});case 18:case"end":return we.stop()}},Ze)}))},Xe.output||((Ve=Xe[1])===null||Ve===void 0?void 0:Ve.name))),te&&g.a.createElement("div",{style:{width:"20%"}},g.a.createElement(v.a,{disabled:ee,style:{width:"70%"},onChange:function(Ne){return ie(Ne,et)},value:Xe.score}),g.a.createElement("span",null,"\xA0%")),J&&g.a.createElement("div",{style:{width:"20%"}},g.a.createElement(M.a,{checked:Xe.is_invisible||!1,onChange:function(Ne){Ee(Ne.target.checked,et,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),J&&g.a.createElement("div",{style:{width:"20%"}},g.a.createElement(M.a,{checked:Xe.last_match_rule||!1,onChange:function(Ne){Ee(Ne.target.checked,et,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),g.a.createElement("div",{onClick:function(){return qe(Xe,et)},style:{width:"10%"}},g.a.createElement("span",{className:E.a.del},"\u5220\u9664")))}),g.a.createElement(U.a,{close:!0,data:fe.dataUrl,filename:fe.filename,type:fe.dataUrl.length?"txt":"",onClose:function(){return Te(Object(u.a)({},X))},monacoEditor:{value:fe.value,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):g.a.createElement(g.a.Fragment,null)};$.b=V},BU3w:function(F,$,j){"use strict";j.d($,"a",function(){return m});var N=j("MNnm"),v="rc-util-key";function O(S){if(S.attachTo)return S.attachTo;var b=document.querySelector("head");return b||document.body}function M(S){var b,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(N.a)())return null;var d=document.createElement("style");if((b=p.csp)===null||b===void 0?void 0:b.nonce){var t;d.nonce=(t=p.csp)===null||t===void 0?void 0:t.nonce}d.innerHTML=S;var l=O(p),r=l.firstChild;return p.prepend&&l.prepend?l.prepend(d):p.prepend&&r?l.insertBefore(d,r):l.appendChild(d),d}var y=new Map;function m(S,b){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d=O(p);if(!y.has(d)){var t=M("",p),l=t.parentNode;y.set(d,l),l.removeChild(t)}var r=Array.from(y.get(d).children).find(function(a){return a.tagName==="STYLE"&&a[v]===b});if(r){var i,o;if(((i=p.csp)===null||i===void 0?void 0:i.nonce)&&r.nonce!==((o=p.csp)===null||o===void 0?void 0:o.nonce)){var s;r.nonce=(s=p.csp)===null||s===void 0?void 0:s.nonce}return r.innerHTML!==S&&(r.innerHTML=S),r}var u=M(S,p);return u[v]=b,u}},Bd2K:function(F,$,j){(function(N){N(j("VrN/"),j("osHv"))})(function(N){N.defineOption("autoCloseTags",!1,function(p,d,t){if(t!=N.Init&&t&&p.removeKeyMap("autoCloseTags"),!d)return;var l={name:"autoCloseTags"};(typeof d!="object"||d.whenClosing!==!1)&&(l["'/'"]=function(r){return m(r)}),(typeof d!="object"||d.whenOpening!==!1)&&(l["'>'"]=function(r){return M(r)}),p.addKeyMap(l)});var v=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],O=["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 M(p){if(p.getOption("disableInput"))return N.Pass;for(var d=p.listSelections(),t=[],l=p.getOption("autoCloseTags"),r=0;r<d.length;r++){if(!d[r].empty())return N.Pass;var i=d[r].head,o=p.getTokenAt(i),s=N.innerMode(p.getMode(),o.state),u=s.state,a=s.mode.xmlCurrentTag&&s.mode.xmlCurrentTag(u),c=a&&a.name;if(!c)return N.Pass;var f=s.mode.configuration=="html",w=typeof l=="object"&&l.dontCloseTags||f&&v,_=typeof l=="object"&&l.indentTags||f&&O;o.end>i.ch&&(c=c.slice(0,c.length-o.end+i.ch));var h=c.toLowerCase();if(!c||o.type=="string"&&(o.end!=i.ch||!/[\"\']/.test(o.string.charAt(o.string.length-1))||o.string.length==1)||o.type=="tag"&&a.close||o.string.indexOf("/")==i.ch-o.start-1||w&&S(w,h)>-1||b(p,s.mode.xmlCurrentContext&&s.mode.xmlCurrentContext(u)||[],c,i,!0))return N.Pass;var R=typeof l=="object"&&l.emptyTags;if(R&&S(R,c)>-1){t[r]={text:"/>",newPos:N.Pos(i.line,i.ch+2)};continue}var C=_&&S(_,h)>-1;t[r]={indent:C,text:">"+(C?`
`:"")+"</"+c+">",newPos:C?N.Pos(i.line+1,0):N.Pos(i.line,i.ch+1)}}for(var g=typeof l=="object"&&l.dontIndentOnAutoClose,r=d.length-1;r>=0;r--){var x=t[r];p.replaceRange(x.text,d[r].head,d[r].anchor,"+insert");var E=p.listSelections().slice(0);E[r]={head:x.newPos,anchor:x.newPos},p.setSelections(E),!g&&x.indent&&(p.indentLine(x.newPos.line,null,!0),p.indentLine(x.newPos.line+1,null,!0))}}function y(p,d){for(var t=p.listSelections(),l=[],r=d?"/":"</",i=p.getOption("autoCloseTags"),o=typeof i=="object"&&i.dontIndentOnSlash,s=0;s<t.length;s++){if(!t[s].empty())return N.Pass;var u=t[s].head,a=p.getTokenAt(u),c=N.innerMode(p.getMode(),a.state),f=c.state;if(d&&(a.type=="string"||a.string.charAt(0)!="<"||a.start!=u.ch-1))return N.Pass;var w,_=c.mode.name!="xml"&&p.getMode().name=="htmlmixed";if(_&&c.mode.name=="javascript")w=r+"script";else if(_&&c.mode.name=="css")w=r+"style";else{var h=c.mode.xmlCurrentContext&&c.mode.xmlCurrentContext(f);if(!h||h.length&&b(p,h,h[h.length-1],u))return N.Pass;w=r+h[h.length-1]}p.getLine(u.line).charAt(a.end)!=">"&&(w+=">"),l[s]=w}if(p.replaceSelections(l),t=p.listSelections(),!o)for(var s=0;s<t.length;s++)(s==t.length-1||t[s].head.line<t[s+1].head.line)&&p.indentLine(t[s].head.line)}function m(p){return p.getOption("disableInput")?N.Pass:y(p,!0)}N.commands.closeTag=function(p){return y(p)};function S(p,d){if(p.indexOf)return p.indexOf(d);for(var t=0,l=p.length;t<l;++t)if(p[t]==d)return t;return-1}function b(p,d,t,l,r){if(!N.scanForClosingTag)return!1;var i=Math.min(p.lastLine()+1,l.line+500),o=N.scanForClosingTag(p,l,null,i);if(!o||o.tag!=t)return!1;for(var s=r?1:0,u=d.length-1;u>=0&&d[u]==t;u--)++s;l=o.to;for(var u=1;u<s;u++){var a=N.scanForClosingTag(p,l,null,i);if(!a||a.tag!=t)return!1;l=a.to}return!0}})},BjJ7:function(F,$,j){"use strict";j.d($,"d",function(){return v}),j.d($,"c",function(){return O}),j.d($,"e",function(){return M}),j.d($,"b",function(){return y}),j.d($,"a",function(){return S});var N=j("m3rI");function v(b){var p=!0;if(b.length>0){for(var d=0;d<b.length;d++)if(b[d].compile_success==0||!b[d].compile_success){p=!1;break}}else p=!1;return p}function O(b){for(var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",d=[],t=0;t<b.length;t++){var l=b[t],r=p?"".concat(p,"/").concat(l.name):"".concat(l.name);d.push({title:l.name,isLeaf:!(l.type==="tree"),key:r})}return d}function M(b,p,d){for(var t=0;t<b.length;t++){var l=b[t];if(l.key===p){l.children=d;break}l.children&&M(l.children,p,d)}return b}function y(b,p,d){var t;return function(){var l=this,r=arguments,i=function(){t=null,d||b.apply(l,r)},o=d&&!t;clearTimeout(t),t=setTimeout(i,p),o&&b.apply(l,r)}}var m=!0,S=N.a.API_SERVER},Bvq2:function(F,$,j){F.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(F,$,j){},CrYA:function(F,$,j){var N=j("MFOe"),v=N.Global;F.exports={name:"sessionStorage",read:M,write:y,each:m,remove:S,clearAll:b};function O(){return v.sessionStorage}function M(p){return O().getItem(p)}function y(p,d){return O().setItem(p,d)}function m(p){for(var d=O().length-1;d>=0;d--){var t=O().key(d);p(M(t),t)}}function S(p){return O().removeItem(p)}function b(){return O().clear()}},DlQD:function(F,$,j){(function(N,v){F.exports=v()})(this,function(){"use strict";function N(De,we){for(var Ae=0;Ae<we.length;Ae++){var de=we[Ae];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(De,de.key,de)}}function v(De,we,Ae){return we&&N(De.prototype,we),Ae&&N(De,Ae),De}function O(De,we){if(!De)return;if(typeof De=="string")return M(De,we);var Ae=Object.prototype.toString.call(De).slice(8,-1);if(Ae==="Object"&&De.constructor&&(Ae=De.constructor.name),Ae==="Map"||Ae==="Set")return Array.from(De);if(Ae==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ae))return M(De,we)}function M(De,we){(we==null||we>De.length)&&(we=De.length);for(var Ae=0,de=new Array(we);Ae<we;Ae++)de[Ae]=De[Ae];return de}function y(De,we){var Ae;if(typeof Symbol=="undefined"||De[Symbol.iterator]==null){if(Array.isArray(De)||(Ae=O(De))||we&&De&&typeof De.length=="number"){Ae&&(De=Ae);var de=0;return function(){return de>=De.length?{done:!0}:{done:!1,value:De[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 Ae=De[Symbol.iterator](),Ae.next.bind(Ae)}function m(De,we){return we={exports:{}},De(we,we.exports),we.exports}var S=m(function(De){function we(){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 Ae(de){De.exports.defaults=de}De.exports={defaults:we(),getDefaults:we,changeDefaults:Ae}}),b=S.defaults,p=S.getDefaults,d=S.changeDefaults,t=/[&<>"']/,l=/[&<>"']/g,r=/[<>"']|&(?!#?\w+;)/,i=/[<>"']|&(?!#?\w+;)/g,o={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},s=function(we){return o[we]};function u(De,we){if(we){if(t.test(De))return De.replace(l,s)}else if(r.test(De))return De.replace(i,s);return De}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function c(De){return De.replace(a,function(we,Ae){return Ae=Ae.toLowerCase(),Ae==="colon"?":":Ae.charAt(0)==="#"?Ae.charAt(1)==="x"?String.fromCharCode(parseInt(Ae.substring(2),16)):String.fromCharCode(+Ae.substring(1)):""})}var f=/(^|[^\[])\^/g;function w(De,we){De=De.source||De,we=we||"";var Ae={replace:function(_e,Se){return Se=Se.source||Se,Se=Se.replace(f,"$1"),De=De.replace(_e,Se),Ae},getRegex:function(){return new RegExp(De,we)}};return Ae}var _=/[^\w:]/g,h=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function R(De,we,Ae){if(De){var de;try{de=decodeURIComponent(c(Ae)).replace(_,"").toLowerCase()}catch(_e){return null}if(de.indexOf("javascript:")===0||de.indexOf("vbscript:")===0||de.indexOf("data:")===0)return null}we&&!h.test(Ae)&&(Ae=T(we,Ae));try{Ae=encodeURI(Ae).replace(/%25/g,"%")}catch(_e){return null}return Ae}var C={},g=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,E=/^([^:]+:\/*[^/]*)[\s\S]*$/;function T(De,we){C[" "+De]||(g.test(De)?C[" "+De]=De+"/":C[" "+De]=G(De,"/",!0)),De=C[" "+De];var Ae=De.indexOf(":")===-1;return we.substring(0,2)==="//"?Ae?we:De.replace(x,"$1")+we:we.charAt(0)==="/"?Ae?we:De.replace(E,"$1")+we:De+we}var k={exec:function(){}};function L(De){for(var we=1,Ae,de;we<arguments.length;we++){Ae=arguments[we];for(de in Ae)Object.prototype.hasOwnProperty.call(Ae,de)&&(De[de]=Ae[de])}return De}function A(De,we){var Ae=De.replace(/\|/g,function(Se,Ie,ke){for(var Ye=!1,nt=Ie;--nt>=0&&ke[nt]==="\\";)Ye=!Ye;return Ye?"|":" |"}),de=Ae.split(/ \|/),_e=0;if(de.length>we)de.splice(we);else for(;de.length<we;)de.push("");for(;_e<de.length;_e++)de[_e]=de[_e].trim().replace(/\\\|/g,"|");return de}function G(De,we,Ae){var de=De.length;if(de===0)return"";for(var _e=0;_e<de;){var Se=De.charAt(de-_e-1);if(Se===we&&!Ae)_e++;else if(Se!==we&&Ae)_e++;else break}return De.substr(0,de-_e)}function K(De,we){if(De.indexOf(we[1])===-1)return-1;for(var Ae=De.length,de=0,_e=0;_e<Ae;_e++)if(De[_e]==="\\")_e++;else if(De[_e]===we[0])de++;else if(De[_e]===we[1]&&(de--,de<0))return _e;return-1}function W(De){De&&De.sanitize&&!De.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:u,unescape:c,edit:w,cleanUrl:R,resolveUrl:T,noopTest:k,merge:L,splitCells:A,rtrim:G,findClosingBracket:K,checkSanitizeDeprecation:W},U=S.defaults,P=z.rtrim,H=z.splitCells,V=z.escape,q=z.findClosingBracket;function Z(De,we,Ae){var de=we.href,_e=we.title?V(we.title):null,Se=De[1].replace(/\\([\[\]])/g,"$1");return De[0].charAt(0)!=="!"?{type:"link",raw:Ae,href:de,title:_e,text:Se}:{type:"image",raw:Ae,href:de,title:_e,text:V(Se)}}function ce(De,we){var Ae=De.match(/^(\s+)(?:```)/);if(Ae===null)return we;var de=Ae[1];return we.split(`
`).map(function(_e){var Se=_e.match(/^\s+/);if(Se===null)return _e;var Ie=Se[0];return Ie.length>=de.length?_e.slice(de.length):_e}).join(`
`)}var he=function(){function De(Ae){this.options=Ae||U}var we=De.prototype;return we.space=function(de){var _e=this.rules.block.newline.exec(de);if(_e)return _e[0].length>1?{type:"space",raw:_e[0]}:{raw:`
`}},we.code=function(de,_e){var Se=this.rules.block.code.exec(de);if(Se){var Ie=_e[_e.length-1];if(Ie&&Ie.type==="paragraph")return{raw:Se[0],text:Se[0].trimRight()};var ke=Se[0].replace(/^ {4}/gm,"");return{type:"code",raw:Se[0],codeBlockStyle:"indented",text:this.options.pedantic?ke:P(ke,`
`)}}},we.fences=function(de){var _e=this.rules.block.fences.exec(de);if(_e){var Se=_e[0],Ie=ce(Se,_e[3]||"");return{type:"code",raw:Se,lang:_e[2]?_e[2].trim():_e[2],text:Ie}}},we.heading=function(de){var _e=this.rules.block.heading.exec(de);if(_e)return{type:"heading",raw:_e[0],depth:_e[1].length,text:_e[2]}},we.nptable=function(de){var _e=this.rules.block.nptable.exec(de);if(_e){var Se={type:"table",header:H(_e[1].replace(/^ *| *\| *$/g,"")),align:_e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:_e[3]?_e[3].replace(/\n$/,"").split(`
`):[],raw:_e[0]};if(Se.header.length===Se.align.length){var Ie=Se.align.length,ke;for(ke=0;ke<Ie;ke++)/^ *-+: *$/.test(Se.align[ke])?Se.align[ke]="right":/^ *:-+: *$/.test(Se.align[ke])?Se.align[ke]="center":/^ *:-+ *$/.test(Se.align[ke])?Se.align[ke]="left":Se.align[ke]=null;for(Ie=Se.cells.length,ke=0;ke<Ie;ke++)Se.cells[ke]=H(Se.cells[ke],Se.header.length);return Se}}},we.hr=function(de){var _e=this.rules.block.hr.exec(de);if(_e)return{type:"hr",raw:_e[0]}},we.blockquote=function(de){var _e=this.rules.block.blockquote.exec(de);if(_e){var Se=_e[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:_e[0],text:Se}}},we.list=function(de){var _e=this.rules.block.list.exec(de);if(_e){for(var Se=_e[0],Ie=_e[2],ke=Ie.length>1,Ye=Ie[Ie.length-1]===")",nt={type:"list",raw:Se,ordered:ke,start:ke?+Ie.slice(0,-1):"",loose:!1,items:[]},lt=_e[0].match(this.rules.block.item),at=!1,ot,Ct,bt,ft,jt,Pt,Xt,Qt=lt.length,kt=0;kt<Qt;kt++)ot=lt[kt],Se=ot,Ct=ot.length,ot=ot.replace(/^ *([*+-]|\d+[.)]) */,""),~ot.indexOf(`
`)&&(Ct-=ot.length,ot=this.options.pedantic?ot.replace(/^ {1,4}/gm,""):ot.replace(new RegExp("^ {1,"+Ct+"}","gm"),"")),kt!==Qt-1&&(bt=this.rules.block.bullet.exec(lt[kt+1])[0],(ke?bt.length===1||!Ye&&bt[bt.length-1]===")":bt.length>1||this.options.smartLists&&bt!==Ie)&&(ft=lt.slice(kt+1).join(`
`),nt.raw=nt.raw.substring(0,nt.raw.length-ft.length),kt=Qt-1)),jt=at||/\n\n(?!\s*$)/.test(ot),kt!==Qt-1&&(at=ot.charAt(ot.length-1)===`
`,jt||(jt=at)),jt&&(nt.loose=!0),Pt=/^\[[ xX]\] /.test(ot),Xt=void 0,Pt&&(Xt=ot[1]!==" ",ot=ot.replace(/^\[[ xX]\] +/,"")),nt.items.push({type:"list_item",raw:Se,task:Pt,checked:Xt,loose:jt,text:ot});return nt}},we.html=function(de){var _e=this.rules.block.html.exec(de);if(_e)return{type:this.options.sanitize?"paragraph":"html",raw:_e[0],pre:!this.options.sanitizer&&(_e[1]==="pre"||_e[1]==="script"||_e[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(_e[0]):V(_e[0]):_e[0]}},we.def=function(de){var _e=this.rules.block.def.exec(de);if(_e){_e[3]&&(_e[3]=_e[3].substring(1,_e[3].length-1));var Se=_e[1].toLowerCase().replace(/\s+/g," ");return{tag:Se,raw:_e[0],href:_e[2],title:_e[3]}}},we.table=function(de){var _e=this.rules.block.table.exec(de);if(_e){var Se={type:"table",header:H(_e[1].replace(/^ *| *\| *$/g,"")),align:_e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:_e[3]?_e[3].replace(/\n$/,"").split(`
`):[]};if(Se.header.length===Se.align.length){Se.raw=_e[0];var Ie=Se.align.length,ke;for(ke=0;ke<Ie;ke++)/^ *-+: *$/.test(Se.align[ke])?Se.align[ke]="right":/^ *:-+: *$/.test(Se.align[ke])?Se.align[ke]="center":/^ *:-+ *$/.test(Se.align[ke])?Se.align[ke]="left":Se.align[ke]=null;for(Ie=Se.cells.length,ke=0;ke<Ie;ke++)Se.cells[ke]=H(Se.cells[ke].replace(/^ *\| *| *\| *$/g,""),Se.header.length);return Se}}},we.lheading=function(de){var _e=this.rules.block.lheading.exec(de);if(_e)return{type:"heading",raw:_e[0],depth:_e[2].charAt(0)==="="?1:2,text:_e[1]}},we.paragraph=function(de){var _e=this.rules.block.paragraph.exec(de);if(_e)return{type:"paragraph",raw:_e[0],text:_e[1].charAt(_e[1].length-1)===`
`?_e[1].slice(0,-1):_e[1]}},we.text=function(de,_e){var Se=this.rules.block.text.exec(de);if(Se){var Ie=_e[_e.length-1];return Ie&&Ie.type==="text"?{raw:Se[0],text:Se[0]}:{type:"text",raw:Se[0],text:Se[0]}}},we.escape=function(de){var _e=this.rules.inline.escape.exec(de);if(_e)return{type:"escape",raw:_e[0],text:V(_e[1])}},we.tag=function(de,_e,Se){var Ie=this.rules.inline.tag.exec(de);if(Ie)return!_e&&/^<a /i.test(Ie[0])?_e=!0:_e&&/^<\/a>/i.test(Ie[0])&&(_e=!1),!Se&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ie[0])?Se=!0:Se&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ie[0])&&(Se=!1),{type:this.options.sanitize?"text":"html",raw:Ie[0],inLink:_e,inRawBlock:Se,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ie[0]):V(Ie[0]):Ie[0]}},we.link=function(de){var _e=this.rules.inline.link.exec(de);if(_e){var Se=q(_e[2],"()");if(Se>-1){var Ie=_e[0].indexOf("!")===0?5:4,ke=Ie+_e[1].length+Se;_e[2]=_e[2].substring(0,Se),_e[0]=_e[0].substring(0,ke).trim(),_e[3]=""}var Ye=_e[2],nt="";if(this.options.pedantic){var lt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ye);lt?(Ye=lt[1],nt=lt[3]):nt=""}else nt=_e[3]?_e[3].slice(1,-1):"";Ye=Ye.trim().replace(/^<([\s\S]*)>$/,"$1");var at=Z(_e,{href:Ye&&Ye.replace(this.rules.inline._escapes,"$1"),title:nt&&nt.replace(this.rules.inline._escapes,"$1")},_e[0]);return at}},we.reflink=function(de,_e){var Se;if((Se=this.rules.inline.reflink.exec(de))||(Se=this.rules.inline.nolink.exec(de))){var Ie=(Se[2]||Se[1]).replace(/\s+/g," ");if(Ie=_e[Ie.toLowerCase()],!Ie||!Ie.href){var ke=Se[0].charAt(0);return{type:"text",raw:ke,text:ke}}var Ye=Z(Se,Ie,Se[0]);return Ye}},we.strong=function(de,_e,Se){Se===void 0&&(Se="");var Ie=this.rules.inline.strong.start.exec(de);if(Ie&&(!Ie[1]||Ie[1]&&(Se===""||this.rules.inline.punctuation.exec(Se)))){_e=_e.slice(-1*de.length);var ke=Ie[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ke.lastIndex=0;for(var Ye;(Ie=ke.exec(_e))!=null;)if(Ye=this.rules.inline.strong.middle.exec(_e.slice(0,Ie.index+3)),Ye)return{type:"strong",raw:de.slice(0,Ye[0].length),text:de.slice(2,Ye[0].length-2)}}},we.em=function(de,_e,Se){Se===void 0&&(Se="");var Ie=this.rules.inline.em.start.exec(de);if(Ie&&(!Ie[1]||Ie[1]&&(Se===""||this.rules.inline.punctuation.exec(Se)))){_e=_e.slice(-1*de.length);var ke=Ie[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ke.lastIndex=0;for(var Ye;(Ie=ke.exec(_e))!=null;)if(Ye=this.rules.inline.em.middle.exec(_e.slice(0,Ie.index+2)),Ye)return{type:"em",raw:de.slice(0,Ye[0].length),text:de.slice(1,Ye[0].length-1)}}},we.codespan=function(de){var _e=this.rules.inline.code.exec(de);if(_e){var Se=_e[2].replace(/\n/g," "),Ie=/[^ ]/.test(Se),ke=Se.startsWith(" ")&&Se.endsWith(" ");return Ie&&ke&&(Se=Se.substring(1,Se.length-1)),Se=V(Se,!0),{type:"codespan",raw:_e[0],text:Se}}},we.br=function(de){var _e=this.rules.inline.br.exec(de);if(_e)return{type:"br",raw:_e[0]}},we.del=function(de){var _e=this.rules.inline.del.exec(de);if(_e)return{type:"del",raw:_e[0],text:_e[1]}},we.autolink=function(de,_e){var Se=this.rules.inline.autolink.exec(de);if(Se){var Ie,ke;return Se[2]==="@"?(Ie=V(this.options.mangle?_e(Se[1]):Se[1]),ke="mailto:"+Ie):(Ie=V(Se[1]),ke=Ie),{type:"link",raw:Se[0],text:Ie,href:ke,tokens:[{type:"text",raw:Ie,text:Ie}]}}},we.url=function(de,_e){var Se;if(Se=this.rules.inline.url.exec(de)){var Ie,ke;if(Se[2]==="@")Ie=V(this.options.mangle?_e(Se[0]):Se[0]),ke="mailto:"+Ie;else{var Ye;do Ye=Se[0],Se[0]=this.rules.inline._backpedal.exec(Se[0])[0];while(Ye!==Se[0]);Ie=V(Se[0]),Se[1]==="www."?ke="http://"+Ie:ke=Ie}return{type:"link",raw:Se[0],text:Ie,href:ke,tokens:[{type:"text",raw:Ie,text:Ie}]}}},we.inlineText=function(de,_e,Se){var Ie=this.rules.inline.text.exec(de);if(Ie){var ke;return _e?ke=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ie[0]):V(Ie[0]):Ie[0]:ke=V(this.options.smartypants?Se(Ie[0]):Ie[0]),{type:"text",raw:Ie[0],text:ke}}},De}(),ae=z.noopTest,xe=z.edit,ge=z.merge,oe={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:ae,table:ae,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};oe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,oe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,oe.def=xe(oe.def).replace("label",oe._label).replace("title",oe._title).getRegex(),oe.bullet=/(?:[*+-]|\d{1,9}[.)])/,oe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,oe.item=xe(oe.item,"gm").replace(/bull/g,oe.bullet).getRegex(),oe.list=xe(oe.list).replace(/bull/g,oe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+oe.def.source+")").getRegex(),oe._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",oe._comment=/<!--(?!-?>)[\s\S]*?-->/,oe.html=xe(oe.html,"i").replace("comment",oe._comment).replace("tag",oe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),oe.paragraph=xe(oe._paragraph).replace("hr",oe.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",oe._tag).getRegex(),oe.blockquote=xe(oe.blockquote).replace("paragraph",oe.paragraph).getRegex(),oe.normal=ge({},oe),oe.gfm=ge({},oe.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*|$)"}),oe.gfm.nptable=xe(oe.gfm.nptable).replace("hr",oe.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",oe._tag).getRegex(),oe.gfm.table=xe(oe.gfm.table).replace("hr",oe.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",oe._tag).getRegex(),oe.pedantic=ge({},oe.normal,{html:xe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",oe._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:ae,paragraph:xe(oe.normal._paragraph).replace("hr",oe.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",oe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var se={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ae,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:ae,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};se._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",se.punctuation=xe(se.punctuation).replace(/punctuation/g,se._punctuation).getRegex(),se._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",se._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",se.em.start=xe(se.em.start).replace(/punctuation/g,se._punctuation).getRegex(),se.em.middle=xe(se.em.middle).replace(/punctuation/g,se._punctuation).replace(/overlapSkip/g,se._overlapSkip).getRegex(),se.em.endAst=xe(se.em.endAst,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.em.endUnd=xe(se.em.endUnd,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.strong.start=xe(se.strong.start).replace(/punctuation/g,se._punctuation).getRegex(),se.strong.middle=xe(se.strong.middle).replace(/punctuation/g,se._punctuation).replace(/blockSkip/g,se._blockSkip).getRegex(),se.strong.endAst=xe(se.strong.endAst,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.strong.endUnd=xe(se.strong.endUnd,"g").replace(/punctuation/g,se._punctuation).getRegex(),se.blockSkip=xe(se._blockSkip,"g").getRegex(),se.overlapSkip=xe(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=xe(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=xe(se.tag).replace("comment",oe._comment).replace("attribute",se._attribute).getRegex(),se._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,se._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,se._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,se.link=xe(se.link).replace("label",se._label).replace("href",se._href).replace("title",se._title).getRegex(),se.reflink=xe(se.reflink).replace("label",se._label).getRegex(),se.reflinkSearch=xe(se.reflinkSearch,"g").replace("reflink",se.reflink).replace("nolink",se.nolink).getRegex(),se.normal=ge({},se),se.pedantic=ge({},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:xe(/^!?\[(label)\]\((.*?)\)/).replace("label",se._label).getRegex(),reflink:xe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",se._label).getRegex()}),se.gfm=ge({},se.normal,{escape:xe(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=xe(se.gfm.url,"i").replace("email",se.gfm._extended_email).getRegex(),se.breaks=ge({},se.gfm,{br:xe(se.br).replace("{2,}","*").getRegex(),text:xe(se.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var te={block:oe,inline:se},be=S.defaults,ee=te.block,ie=te.inline;function Ee(De){return De.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 ne(De){var we="",Ae,de,_e=De.length;for(Ae=0;Ae<_e;Ae++)de=De.charCodeAt(Ae),Math.random()>.5&&(de="x"+de.toString(16)),we+="&#"+de+";";return we}var J=function(){function De(Ae){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ae||be,this.options.tokenizer=this.options.tokenizer||new he,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var de={block:ee.normal,inline:ie.normal};this.options.pedantic?(de.block=ee.pedantic,de.inline=ie.pedantic):this.options.gfm&&(de.block=ee.gfm,this.options.breaks?de.inline=ie.breaks:de.inline=ie.gfm),this.tokenizer.rules=de}De.lex=function(de,_e){var Se=new De(_e);return Se.lex(de)};var we=De.prototype;return we.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},we.blockTokens=function(de,_e,Se){_e===void 0&&(_e=[]),Se===void 0&&(Se=!0),de=de.replace(/^ +$/gm,"");for(var Ie,ke,Ye,nt;de;){if(Ie=this.tokenizer.space(de)){de=de.substring(Ie.raw.length),Ie.type&&_e.push(Ie);continue}if(Ie=this.tokenizer.code(de,_e)){de=de.substring(Ie.raw.length),Ie.type?_e.push(Ie):(nt=_e[_e.length-1],nt.raw+=`
`+Ie.raw,nt.text+=`
`+Ie.text);continue}if(Ie=this.tokenizer.fences(de)){de=de.substring(Ie.raw.length),_e.push(Ie);continue}if(Ie=this.tokenizer.heading(de)){de=de.substring(Ie.raw.length),_e.push(Ie);continue}if(Ie=this.tokenizer.nptable(de)){de=de.substring(Ie.raw.length),_e.push(Ie);continue}if(Ie=this.tokenizer.hr(de)){de=de.substring(Ie.raw.length),_e.push(Ie);continue}if(Ie=this.tokenizer.blockquote(de)){de=de.substring(Ie.raw.length),Ie.tokens=this.blockTokens(Ie.text,[],Se),_e.push(Ie);continue}if(Ie=this.tokenizer.list(de)){for(de=de.substring(Ie.raw.length),Ye=Ie.items.length,ke=0;ke<Ye;ke++)Ie.items[ke].tokens=this.blockTokens(Ie.items[ke].text,[],!1);_e.push(Ie);continue}if(Ie=this.tokenizer.html(de)){de=de.substring(Ie.raw.length),_e.push(Ie);continue}if(Se&&(Ie=this.tokenizer.def(de))){de=de.substring(Ie.raw.length),this.tokens.links[Ie.tag]||(this.tokens.links[Ie.tag]={href:Ie.href,title:Ie.title});continue}if(Ie=this.tokenizer.table(de)){de=de.substring(Ie.raw.length),_e.push(Ie);continue}if(Ie=this.tokenizer.lheading(de)){de=de.substring(Ie.raw.length),_e.push(Ie);continue}if(Se&&(Ie=this.tokenizer.paragraph(de))){de=de.substring(Ie.raw.length),_e.push(Ie);continue}if(Ie=this.tokenizer.text(de,_e)){de=de.substring(Ie.raw.length),Ie.type?_e.push(Ie):(nt=_e[_e.length-1],nt.raw+=`
`+Ie.raw,nt.text+=`
`+Ie.text);continue}if(de){var lt="Infinite loop on byte: "+de.charCodeAt(0);if(this.options.silent){console.error(lt);break}else throw new Error(lt)}}return _e},we.inline=function(de){var _e,Se,Ie,ke,Ye,nt,lt=de.length;for(_e=0;_e<lt;_e++){nt=de[_e];switch(nt.type){case"paragraph":case"text":case"heading":{nt.tokens=[],this.inlineTokens(nt.text,nt.tokens);break}case"table":{for(nt.tokens={header:[],cells:[]},ke=nt.header.length,Se=0;Se<ke;Se++)nt.tokens.header[Se]=[],this.inlineTokens(nt.header[Se],nt.tokens.header[Se]);for(ke=nt.cells.length,Se=0;Se<ke;Se++)for(Ye=nt.cells[Se],nt.tokens.cells[Se]=[],Ie=0;Ie<Ye.length;Ie++)nt.tokens.cells[Se][Ie]=[],this.inlineTokens(Ye[Ie],nt.tokens.cells[Se][Ie]);break}case"blockquote":{this.inline(nt.tokens);break}case"list":{for(ke=nt.items.length,Se=0;Se<ke;Se++)this.inline(nt.items[Se].tokens);break}}}return de},we.inlineTokens=function(de,_e,Se,Ie,ke){_e===void 0&&(_e=[]),Se===void 0&&(Se=!1),Ie===void 0&&(Ie=!1),ke===void 0&&(ke="");var Ye,nt=de,lt;if(this.tokens.links){var at=Object.keys(this.tokens.links);if(at.length>0)for(;(lt=this.tokenizer.rules.inline.reflinkSearch.exec(nt))!=null;)at.includes(lt[0].slice(lt[0].lastIndexOf("[")+1,-1))&&(nt=nt.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+nt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(lt=this.tokenizer.rules.inline.blockSkip.exec(nt))!=null;)nt=nt.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+nt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;de;){if(Ye=this.tokenizer.escape(de)){de=de.substring(Ye.raw.length),_e.push(Ye);continue}if(Ye=this.tokenizer.tag(de,Se,Ie)){de=de.substring(Ye.raw.length),Se=Ye.inLink,Ie=Ye.inRawBlock,_e.push(Ye);continue}if(Ye=this.tokenizer.link(de)){de=de.substring(Ye.raw.length),Ye.type==="link"&&(Ye.tokens=this.inlineTokens(Ye.text,[],!0,Ie)),_e.push(Ye);continue}if(Ye=this.tokenizer.reflink(de,this.tokens.links)){de=de.substring(Ye.raw.length),Ye.type==="link"&&(Ye.tokens=this.inlineTokens(Ye.text,[],!0,Ie)),_e.push(Ye);continue}if(Ye=this.tokenizer.strong(de,nt,ke)){de=de.substring(Ye.raw.length),Ye.tokens=this.inlineTokens(Ye.text,[],Se,Ie),_e.push(Ye);continue}if(Ye=this.tokenizer.em(de,nt,ke)){de=de.substring(Ye.raw.length),Ye.tokens=this.inlineTokens(Ye.text,[],Se,Ie),_e.push(Ye);continue}if(Ye=this.tokenizer.codespan(de)){de=de.substring(Ye.raw.length),_e.push(Ye);continue}if(Ye=this.tokenizer.br(de)){de=de.substring(Ye.raw.length),_e.push(Ye);continue}if(Ye=this.tokenizer.del(de)){de=de.substring(Ye.raw.length),Ye.tokens=this.inlineTokens(Ye.text,[],Se,Ie),_e.push(Ye);continue}if(Ye=this.tokenizer.autolink(de,ne)){de=de.substring(Ye.raw.length),_e.push(Ye);continue}if(!Se&&(Ye=this.tokenizer.url(de,ne))){de=de.substring(Ye.raw.length),_e.push(Ye);continue}if(Ye=this.tokenizer.inlineText(de,Ie,Ee)){de=de.substring(Ye.raw.length),ke=Ye.raw.slice(-1),_e.push(Ye);continue}if(de){var ot="Infinite loop on byte: "+de.charCodeAt(0);if(this.options.silent){console.error(ot);break}else throw new Error(ot)}}return _e},v(De,null,[{key:"rules",get:function(){return{block:ee,inline:ie}}}]),De}(),X=S.defaults,Q=z.cleanUrl,me=z.escape,fe=function(){function De(Ae){this.options=Ae||X}var we=De.prototype;return we.code=function(de,_e,Se){var Ie=(_e||"").match(/\S*/)[0];if(this.options.highlight){var ke=this.options.highlight(de,Ie);ke!=null&&ke!==de&&(Se=!0,de=ke)}return Ie?'<pre><code class="'+this.options.langPrefix+me(Ie,!0)+'">'+(Se?de:me(de,!0))+`</code></pre>
`:"<pre><code>"+(Se?de:me(de,!0))+`</code></pre>
`},we.blockquote=function(de){return`<blockquote>
`+de+`</blockquote>
`},we.html=function(de){return de},we.heading=function(de,_e,Se,Ie){return this.options.headerIds?"<h"+_e+' id="'+this.options.headerPrefix+Ie.slug(Se)+'">'+de+"</h"+_e+`>
`:"<h"+_e+">"+de+"</h"+_e+`>
`},we.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},we.list=function(de,_e,Se){var Ie=_e?"ol":"ul",ke=_e&&Se!==1?' start="'+Se+'"':"";return"<"+Ie+ke+`>
`+de+"</"+Ie+`>
`},we.listitem=function(de){return"<li>"+de+`</li>
`},we.checkbox=function(de){return"<input "+(de?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},we.paragraph=function(de){return"<p>"+de+`</p>
`},we.table=function(de,_e){return _e&&(_e="<tbody>"+_e+"</tbody>"),`<table>
<thead>
`+de+`</thead>
`+_e+`</table>
`},we.tablerow=function(de){return`<tr>
`+de+`</tr>
`},we.tablecell=function(de,_e){var Se=_e.header?"th":"td",Ie=_e.align?"<"+Se+' align="'+_e.align+'">':"<"+Se+">";return Ie+de+"</"+Se+`>
`},we.strong=function(de){return"<strong>"+de+"</strong>"},we.em=function(de){return"<em>"+de+"</em>"},we.codespan=function(de){return"<code>"+de+"</code>"},we.br=function(){return this.options.xhtml?"<br/>":"<br>"},we.del=function(de){return"<del>"+de+"</del>"},we.link=function(de,_e,Se){if(de=Q(this.options.sanitize,this.options.baseUrl,de),de===null)return Se;var Ie='<a href="'+me(de)+'"';return _e&&(Ie+=' title="'+_e+'"'),Ie+=">"+Se+"</a>",Ie},we.image=function(de,_e,Se){if(de=Q(this.options.sanitize,this.options.baseUrl,de),de===null)return Se;var Ie='<img src="'+de+'" alt="'+Se+'"';return _e&&(Ie+=' title="'+_e+'"'),Ie+=this.options.xhtml?"/>":">",Ie},we.text=function(de){return de},De}(),Te=function(){function De(){}var we=De.prototype;return we.strong=function(de){return de},we.em=function(de){return de},we.codespan=function(de){return de},we.del=function(de){return de},we.html=function(de){return de},we.text=function(de){return de},we.link=function(de,_e,Se){return""+Se},we.image=function(de,_e,Se){return""+Se},we.br=function(){return""},De}(),ze=function(){function De(){this.seen={}}var we=De.prototype;return we.slug=function(de){var _e=de.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(_e)){var Se=_e;do this.seen[Se]++,_e=Se+"-"+this.seen[Se];while(this.seen.hasOwnProperty(_e))}return this.seen[_e]=0,_e},De}(),Je=S.defaults,qe=z.unescape,Xe=function(){function De(Ae){this.options=Ae||Je,this.options.renderer=this.options.renderer||new fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Te,this.slugger=new ze}De.parse=function(de,_e){var Se=new De(_e);return Se.parse(de)};var we=De.prototype;return we.parse=function(de,_e){_e===void 0&&(_e=!0);var Se="",Ie,ke,Ye,nt,lt,at,ot,Ct,bt,ft,jt,Pt,Xt,Qt,kt,Et,Vt,pt,dt=de.length;for(Ie=0;Ie<dt;Ie++){ft=de[Ie];switch(ft.type){case"space":continue;case"hr":{Se+=this.renderer.hr();continue}case"heading":{Se+=this.renderer.heading(this.parseInline(ft.tokens),ft.depth,qe(this.parseInline(ft.tokens,this.textRenderer)),this.slugger);continue}case"code":{Se+=this.renderer.code(ft.text,ft.lang,ft.escaped);continue}case"table":{for(Ct="",ot="",nt=ft.header.length,ke=0;ke<nt;ke++)ot+=this.renderer.tablecell(this.parseInline(ft.tokens.header[ke]),{header:!0,align:ft.align[ke]});for(Ct+=this.renderer.tablerow(ot),bt="",nt=ft.cells.length,ke=0;ke<nt;ke++){for(at=ft.tokens.cells[ke],ot="",lt=at.length,Ye=0;Ye<lt;Ye++)ot+=this.renderer.tablecell(this.parseInline(at[Ye]),{header:!1,align:ft.align[Ye]});bt+=this.renderer.tablerow(ot)}Se+=this.renderer.table(Ct,bt);continue}case"blockquote":{bt=this.parse(ft.tokens),Se+=this.renderer.blockquote(bt);continue}case"list":{for(jt=ft.ordered,Pt=ft.start,Xt=ft.loose,nt=ft.items.length,bt="",ke=0;ke<nt;ke++)kt=ft.items[ke],Et=kt.checked,Vt=kt.task,Qt="",kt.task&&(pt=this.renderer.checkbox(Et),Xt?kt.tokens.length>0&&kt.tokens[0].type==="text"?(kt.tokens[0].text=pt+" "+kt.tokens[0].text,kt.tokens[0].tokens&&kt.tokens[0].tokens.length>0&&kt.tokens[0].tokens[0].type==="text"&&(kt.tokens[0].tokens[0].text=pt+" "+kt.tokens[0].tokens[0].text)):kt.tokens.unshift({type:"text",text:pt}):Qt+=pt),Qt+=this.parse(kt.tokens,Xt),bt+=this.renderer.listitem(Qt,Vt,Et);Se+=this.renderer.list(bt,jt,Pt);continue}case"html":{Se+=this.renderer.html(ft.text);continue}case"paragraph":{Se+=this.renderer.paragraph(this.parseInline(ft.tokens));continue}case"text":{for(bt=ft.tokens?this.parseInline(ft.tokens):ft.text;Ie+1<dt&&de[Ie+1].type==="text";)ft=de[++Ie],bt+=`
`+(ft.tokens?this.parseInline(ft.tokens):ft.text);Se+=_e?this.renderer.paragraph(bt):bt;continue}default:{var At='Token with "'+ft.type+'" type was not found.';if(this.options.silent){console.error(At);return}else throw new Error(At)}}}return Se},we.parseInline=function(de,_e){_e=_e||this.renderer;var Se="",Ie,ke,Ye=de.length;for(Ie=0;Ie<Ye;Ie++){ke=de[Ie];switch(ke.type){case"escape":{Se+=_e.text(ke.text);break}case"html":{Se+=_e.html(ke.text);break}case"link":{Se+=_e.link(ke.href,ke.title,this.parseInline(ke.tokens,_e));break}case"image":{Se+=_e.image(ke.href,ke.title,ke.text);break}case"strong":{Se+=_e.strong(this.parseInline(ke.tokens,_e));break}case"em":{Se+=_e.em(this.parseInline(ke.tokens,_e));break}case"codespan":{Se+=_e.codespan(ke.text);break}case"br":{Se+=_e.br();break}case"del":{Se+=_e.del(this.parseInline(ke.tokens,_e));break}case"text":{Se+=_e.text(ke.text);break}default:{var nt='Token with "'+ke.type+'" type was not found.';if(this.options.silent){console.error(nt);return}else throw new Error(nt)}}}return Se},De}(),et=z.merge,rt=z.checkSanitizeDeprecation,Le=z.escape,Oe=S.getDefaults,Ve=S.changeDefaults,Ze=S.defaults;function Ne(De,we,Ae){if(typeof De=="undefined"||De===null)throw new Error("marked(): input parameter is undefined or null");if(typeof De!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(De)+", string expected");if(typeof we=="function"&&(Ae=we,we=null),we=et({},Ne.defaults,we||{}),rt(we),Ae){var de=we.highlight,_e;try{_e=J.lex(De,we)}catch(Ye){return Ae(Ye)}var Se=function(nt){var lt;if(!nt)try{lt=Xe.parse(_e,we)}catch(at){nt=at}return we.highlight=de,nt?Ae(nt):Ae(null,lt)};if(!de||de.length<3)return Se();if(delete we.highlight,!_e.length)return Se();var Ie=0;Ne.walkTokens(_e,function(Ye){Ye.type==="code"&&(Ie++,setTimeout(function(){de(Ye.text,Ye.lang,function(nt,lt){if(nt)return Se(nt);lt!=null&&lt!==Ye.text&&(Ye.text=lt,Ye.escaped=!0),Ie--,Ie===0&&Se()})},0))}),Ie===0&&Se();return}try{var ke=J.lex(De,we);return we.walkTokens&&Ne.walkTokens(ke,we.walkTokens),Xe.parse(ke,we)}catch(Ye){if(Ye.message+=`
Please report this to https://github.com/markedjs/marked.`,we.silent)return"<p>An error occurred:</p><pre>"+Le(Ye.message+"",!0)+"</pre>";throw Ye}}Ne.options=Ne.setOptions=function(De){return et(Ne.defaults,De),Ve(Ne.defaults),Ne},Ne.getDefaults=Oe,Ne.defaults=Ze,Ne.use=function(De){var we=et({},De);if(De.renderer&&function(){var de=Ne.defaults.renderer||new fe,_e=function(ke){var Ye=de[ke];de[ke]=function(){for(var nt=arguments.length,lt=new Array(nt),at=0;at<nt;at++)lt[at]=arguments[at];var ot=De.renderer[ke].apply(de,lt);return ot===!1&&(ot=Ye.apply(de,lt)),ot}};for(var Se in De.renderer)_e(Se);we.renderer=de}(),De.tokenizer&&function(){var de=Ne.defaults.tokenizer||new he,_e=function(ke){var Ye=de[ke];de[ke]=function(){for(var nt=arguments.length,lt=new Array(nt),at=0;at<nt;at++)lt[at]=arguments[at];var ot=De.tokenizer[ke].apply(de,lt);return ot===!1&&(ot=Ye.apply(de,lt)),ot}};for(var Se in De.tokenizer)_e(Se);we.tokenizer=de}(),De.walkTokens){var Ae=Ne.defaults.walkTokens;we.walkTokens=function(de){De.walkTokens(de),Ae&&Ae(de)}}Ne.setOptions(we)},Ne.walkTokens=function(De,we){for(var Ae=y(De),de;!(de=Ae()).done;){var _e=de.value;we(_e);switch(_e.type){case"table":{for(var Se=y(_e.tokens.header),Ie;!(Ie=Se()).done;){var ke=Ie.value;Ne.walkTokens(ke,we)}for(var Ye=y(_e.tokens.cells),nt;!(nt=Ye()).done;)for(var lt=nt.value,at=y(lt),ot;!(ot=at()).done;){var Ct=ot.value;Ne.walkTokens(Ct,we)}break}case"list":{Ne.walkTokens(_e.items,we);break}default:_e.tokens&&Ne.walkTokens(_e.tokens,we)}}},Ne.Parser=Xe,Ne.parser=Xe.parse,Ne.Renderer=fe,Ne.TextRenderer=Te,Ne.Lexer=J,Ne.lexer=J.lex,Ne.Tokenizer=he,Ne.Slugger=ze,Ne.parse=Ne;var Ge=Ne;return Ge})},"DlR+":function(F,$,j){var N=j("MFOe"),v=N.Global,O=N.trim;F.exports={name:"cookieStorage",read:y,write:S,each:m,remove:b,clearAll:p};var M=v.document;function y(t){if(!t||!d(t))return null;var l="(?:^|.*;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(M.cookie.replace(new RegExp(l),"$1"))}function m(t){for(var l=M.cookie.split(/; ?/g),r=l.length-1;r>=0;r--){if(!O(l[r]))continue;var i=l[r].split("="),o=unescape(i[0]),s=unescape(i[1]);t(s,o)}}function S(t,l){if(!t)return;M.cookie=escape(t)+"="+escape(l)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function b(t){if(!t||!d(t))return;M.cookie=escape(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function p(){m(function(t,l){b(l)})}function d(t){return new RegExp("(?:^|;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(M.cookie)}},E4JC:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.StreamCipher,y=v.algo,m=[],S=[],b=[],p=y.Rabbit=M.extend({_doReset:function(){for(var t=this._key.words,l=this.cfg.iv,r=0;r<4;r++)t[r]=(t[r]<<8|t[r]>>>24)&16711935|(t[r]<<24|t[r]>>>8)&4278255360;var i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],o=this._C=[t[2]<<16|t[2]>>>16,t[0]&4294901760|t[1]&65535,t[3]<<16|t[3]>>>16,t[1]&4294901760|t[2]&65535,t[0]<<16|t[0]>>>16,t[2]&4294901760|t[3]&65535,t[1]<<16|t[1]>>>16,t[3]&4294901760|t[0]&65535];this._b=0;for(var r=0;r<4;r++)d.call(this);for(var r=0;r<8;r++)o[r]^=i[r+4&7];if(l){var s=l.words,u=s[0],a=s[1],c=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,f=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,w=c>>>16|f&4294901760,_=f<<16|c&65535;o[0]^=c,o[1]^=w,o[2]^=f,o[3]^=_,o[4]^=c,o[5]^=w,o[6]^=f,o[7]^=_;for(var r=0;r<4;r++)d.call(this)}},_doProcessBlock:function(t,l){var r=this._X;d.call(this),m[0]=r[0]^r[5]>>>16^r[3]<<16,m[1]=r[2]^r[7]>>>16^r[5]<<16,m[2]=r[4]^r[1]>>>16^r[7]<<16,m[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)m[i]=(m[i]<<8|m[i]>>>24)&16711935|(m[i]<<24|m[i]>>>8)&4278255360,t[l+i]^=m[i]},blockSize:128/32,ivSize:64/32});function d(){for(var t=this._X,l=this._C,r=0;r<8;r++)S[r]=l[r];l[0]=l[0]+1295307597+this._b|0,l[1]=l[1]+3545052371+(l[0]>>>0<S[0]>>>0?1:0)|0,l[2]=l[2]+886263092+(l[1]>>>0<S[1]>>>0?1:0)|0,l[3]=l[3]+1295307597+(l[2]>>>0<S[2]>>>0?1:0)|0,l[4]=l[4]+3545052371+(l[3]>>>0<S[3]>>>0?1:0)|0,l[5]=l[5]+886263092+(l[4]>>>0<S[4]>>>0?1:0)|0,l[6]=l[6]+1295307597+(l[5]>>>0<S[5]>>>0?1:0)|0,l[7]=l[7]+3545052371+(l[6]>>>0<S[6]>>>0?1:0)|0,this._b=l[7]>>>0<S[7]>>>0?1:0;for(var r=0;r<8;r++){var i=t[r]+l[r],o=i&65535,s=i>>>16,u=((o*o>>>17)+o*s>>>15)+s*s,a=((i&4294901760)*i|0)+((i&65535)*i|0);b[r]=u^a}t[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0,t[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0,t[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0,t[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0,t[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0,t[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0,t[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0,t[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}v.Rabbit=M._createHelper(p)}(),N.Rabbit})},ELLl:function(F,$,j){(function(N){N(j("VrN/"))})(function(N){var v={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},O=N.Pos;N.defineOption("autoCloseBrackets",!1,function(o,s,u){u&&u!=N.Init&&(o.removeKeyMap(y),o.state.closeBrackets=null),s&&(m(M(s,"pairs")),o.state.closeBrackets=s,o.addKeyMap(y))});function M(o,s){return s=="pairs"&&typeof o=="string"?o:typeof o=="object"&&o[s]!=null?o[s]:v[s]}var y={Backspace:p,Enter:d};function m(o){for(var s=0;s<o.length;s++){var u=o.charAt(s),a="'"+u+"'";y[a]||(y[a]=S(u))}}m(v.pairs+"`");function S(o){return function(s){return l(s,o)}}function b(o){var s=o.state.closeBrackets;if(!s||s.override)return s;var u=o.getModeAt(o.getCursor());return u.closeBrackets||s}function p(o){var s=b(o);if(!s||o.getOption("disableInput"))return N.Pass;for(var u=M(s,"pairs"),a=o.listSelections(),c=0;c<a.length;c++){if(!a[c].empty())return N.Pass;var f=r(o,a[c].head);if(!f||u.indexOf(f)%2!=0)return N.Pass}for(var c=a.length-1;c>=0;c--){var w=a[c].head;o.replaceRange("",O(w.line,w.ch-1),O(w.line,w.ch+1),"+delete")}}function d(o){var s=b(o),u=s&&M(s,"explode");if(!u||o.getOption("disableInput"))return N.Pass;for(var a=o.listSelections(),c=0;c<a.length;c++){if(!a[c].empty())return N.Pass;var f=r(o,a[c].head);if(!f||u.indexOf(f)%2!=0)return N.Pass}o.operation(function(){var w=o.lineSeparator()||`
`;o.replaceSelection(w+w,null),o.execCommand("goCharLeft"),a=o.listSelections();for(var _=0;_<a.length;_++){var h=a[_].head.line;o.indentLine(h,null,!0),o.indentLine(h+1,null,!0)}})}function t(o){var s=N.cmpPos(o.anchor,o.head)>0;return{anchor:new O(o.anchor.line,o.anchor.ch+(s?-1:1)),head:new O(o.head.line,o.head.ch+(s?1:-1))}}function l(o,s){var u=b(o);if(!u||o.getOption("disableInput"))return N.Pass;var a=M(u,"pairs"),c=a.indexOf(s);if(c==-1)return N.Pass;for(var f=M(u,"closeBefore"),w=M(u,"triples"),_=a.charAt(c+1)==s,h=o.listSelections(),R=c%2==0,C,g=0;g<h.length;g++){var x=h[g],E=x.head,T,k=o.getRange(E,O(E.line,E.ch+1));if(R&&!x.empty())T="surround";else if((_||!R)&&k==s)_&&i(o,E)?T="both":w.indexOf(s)>=0&&o.getRange(E,O(E.line,E.ch+3))==s+s+s?T="skipThree":T="skip";else if(_&&E.ch>1&&w.indexOf(s)>=0&&o.getRange(O(E.line,E.ch-2),E)==s+s){if(E.ch>2&&/\bstring/.test(o.getTokenTypeAt(O(E.line,E.ch-2))))return N.Pass;T="addFour"}else if(_){var L=E.ch==0?" ":o.getRange(O(E.line,E.ch-1),E);if(!N.isWordChar(k)&&L!=s&&!N.isWordChar(L))T="both";else return N.Pass}else if(R&&(k.length===0||/\s/.test(k)||f.indexOf(k)>-1))T="both";else return N.Pass;if(!C)C=T;else if(C!=T)return N.Pass}var A=c%2?a.charAt(c-1):s,G=c%2?s:a.charAt(c+1);o.operation(function(){if(C=="skip")o.execCommand("goCharRight");else if(C=="skipThree")for(var K=0;K<3;K++)o.execCommand("goCharRight");else if(C=="surround"){for(var W=o.getSelections(),K=0;K<W.length;K++)W[K]=A+W[K]+G;o.replaceSelections(W,"around"),W=o.listSelections().slice();for(var K=0;K<W.length;K++)W[K]=t(W[K]);o.setSelections(W)}else C=="both"?(o.replaceSelection(A+G,null),o.triggerElectric(A+G),o.execCommand("goCharLeft")):C=="addFour"&&(o.replaceSelection(A+A+A+A,"before"),o.execCommand("goCharRight"))})}function r(o,s){var u=o.getRange(O(s.line,s.ch-1),O(s.line,s.ch+1));return u.length==2?u:null}function i(o,s){var u=o.getTokenAt(O(s.line,s.ch+1));return/\bstring/.test(u.type)&&u.start==s.ch&&(s.ch==0||!/\bstring/.test(o.getTokenTypeAt(s)))}})},ELcG:function(F,$,j){(function(N,v){F.exports=$=v(j("Ib8C"))})(this,function(N){/** @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(v){var O=N,M=O.lib,y=M.WordArray,m=M.Hasher,S=O.algo,b=y.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]),p=y.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]),d=y.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]),t=y.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]),l=y.create([0,1518500249,1859775393,2400959708,2840853838]),r=y.create([1352829926,1548603684,1836072691,2053994217,0]),i=S.RIPEMD160=m.extend({_doReset:function(){this._hash=y.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(w,_){for(var h=0;h<16;h++){var R=_+h,C=w[R];w[R]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}var g=this._hash.words,x=l.words,E=r.words,T=b.words,k=p.words,L=d.words,A=t.words,G,K,W,z,U,P,H,V,q,Z;P=G=g[0],H=K=g[1],V=W=g[2],q=z=g[3],Z=U=g[4];for(var ce,h=0;h<80;h+=1)ce=G+w[_+T[h]]|0,h<16?ce+=o(K,W,z)+x[0]:h<32?ce+=s(K,W,z)+x[1]:h<48?ce+=u(K,W,z)+x[2]:h<64?ce+=a(K,W,z)+x[3]:ce+=c(K,W,z)+x[4],ce=ce|0,ce=f(ce,L[h]),ce=ce+U|0,G=U,U=z,z=f(W,10),W=K,K=ce,ce=P+w[_+k[h]]|0,h<16?ce+=c(H,V,q)+E[0]:h<32?ce+=a(H,V,q)+E[1]:h<48?ce+=u(H,V,q)+E[2]:h<64?ce+=s(H,V,q)+E[3]:ce+=o(H,V,q)+E[4],ce=ce|0,ce=f(ce,A[h]),ce=ce+Z|0,P=Z,Z=q,q=f(V,10),V=H,H=ce;ce=g[1]+W+q|0,g[1]=g[2]+z+Z|0,g[2]=g[3]+U+P|0,g[3]=g[4]+G+H|0,g[4]=g[0]+K+V|0,g[0]=ce},_doFinalize:function(){var w=this._data,_=w.words,h=this._nDataBytes*8,R=w.sigBytes*8;_[R>>>5]|=128<<24-R%32,_[(R+64>>>9<<4)+14]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,w.sigBytes=(_.length+1)*4,this._process();for(var C=this._hash,g=C.words,x=0;x<5;x++){var E=g[x];g[x]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360}return C},clone:function(){var w=m.clone.call(this);return w._hash=this._hash.clone(),w}});function o(w,_,h){return w^_^h}function s(w,_,h){return w&_|~w&h}function u(w,_,h){return(w|~_)^h}function a(w,_,h){return w&h|_&~h}function c(w,_,h){return w^(_|~h)}function f(w,_){return w<<_|w>>>32-_}O.RIPEMD160=m._createHelper(i),O.HmacRIPEMD160=m._createHmacHelper(i)}(Math),N.RIPEMD160})},ETIr:function(F,$,j){(function(N,v){F.exports=$=v(j("Ib8C"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.WordArray,y=v.enc,m=y.Base64={stringify:function(b){var p=b.words,d=b.sigBytes,t=this._map;b.clamp();for(var l=[],r=0;r<d;r+=3)for(var i=p[r>>>2]>>>24-r%4*8&255,o=p[r+1>>>2]>>>24-(r+1)%4*8&255,s=p[r+2>>>2]>>>24-(r+2)%4*8&255,u=i<<16|o<<8|s,a=0;a<4&&r+a*.75<d;a++)l.push(t.charAt(u>>>6*(3-a)&63));var c=t.charAt(64);if(c)for(;l.length%4;)l.push(c);return l.join("")},parse:function(b){var p=b.length,d=this._map,t=this._reverseMap;if(!t){t=this._reverseMap=[];for(var l=0;l<d.length;l++)t[d.charCodeAt(l)]=l}var r=d.charAt(64);if(r){var i=b.indexOf(r);i!==-1&&(p=i)}return S(b,p,t)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function S(b,p,d){for(var t=[],l=0,r=0;r<p;r++)if(r%4){var i=d[b.charCodeAt(r-1)]<<r%4*2,o=d[b.charCodeAt(r)]>>>6-r%4*2,s=i|o;t[l>>>2]|=s<<24-l%4*8,l++}return M.create(t,l)}}(),N.enc.Base64})},"F+F2":function(F,$,j){(function(N,v){F.exports=$=v(j("Ib8C"))})(this,function(N){return function(){if(typeof ArrayBuffer!="function")return;var v=N,O=v.lib,M=O.WordArray,y=M.init,m=M.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 b=S.byteLength,p=[],d=0;d<b;d++)p[d>>>2]|=S[d]<<24-d%4*8;y.call(this,p,b)}else y.apply(this,arguments)};m.prototype=M}(),N.lib.WordArray})},GRuw:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("lPiR"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.WordArray,y=v.algo,m=y.SHA256,S=y.SHA224=m.extend({_doReset:function(){this._hash=new M.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var b=m._doFinalize.call(this);return b.sigBytes-=4,b}});v.SHA224=m._createHelper(S),v.HmacSHA224=m._createHmacHelper(S)}(),N.SHA224})},GfqC:function(F,$,j){"use strict";var N=j("cDcd"),v=j.n(N),O=j("TSYQ"),M=j.n(O);function y(z,U){var P="cannot "+z.method+" "+z.action+" "+U.status+"'",H=new Error(P);return H.status=U.status,H.method=z.method,H.url=z.action,H}function m(z){var U=z.responseText||z.response;if(!U)return U;try{return JSON.parse(U)}catch(P){return U}}function S(z){var U=new XMLHttpRequest;z.onProgress&&U.upload&&(U.upload.onprogress=function(q){q.total>0&&(q.percent=q.loaded/q.total*100),z.onProgress(q)});var P=new FormData;z.data&&Object.keys(z.data).forEach(function(V){var q=z.data[V];if(Array.isArray(q)){q.forEach(function(Z){P.append(V+"[]",Z)});return}P.append(V,z.data[V])}),z.file instanceof Blob?P.append(z.filename,z.file,z.file.name):P.append(z.filename,z.file),U.onerror=function(q){z.onError(q)},U.onload=function(){return U.status<200||U.status>=300?z.onError(y(z,U),m(U)):z.onSuccess(m(U),U)},U.open(z.method,z.action,!0),z.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var H=z.headers||{};return H["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(H).forEach(function(V){H[V]!==null&&U.setRequestHeader(V,H[V])}),U.send(P),{abort:function(){U.abort()}}}var b=+new Date,p=0;function d(){return"rc-upload-"+b+"-"+ ++p}function t(z,U){return z.indexOf(U,z.length-U.length)!==-1}var l=function(z,U){if(z&&U){var P=Array.isArray(U)?U:U.split(","),H=z.name||"",V=z.type||"",q=V.replace(/\/.*$/,"");return P.some(function(Z){var ce=Z.trim();return ce.charAt(0)==="."?t(H.toLowerCase(),ce.toLowerCase()):/\/\*$/.test(ce)?q===ce.replace(/\/.*$/,""):V===ce})}return!0};function r(z,U){var P=z.createReader(),H=[];function V(){P.readEntries(function(q){var Z=Array.prototype.slice.apply(q);H=H.concat(Z);var ce=!Z.length;ce?U(H):V()})}V()}var i=function(U,P,H){var V=function q(Z,ce){ce=ce||"",Z.isFile?Z.file(function(he){H(he)&&(Z.fullPath&&!he.webkitRelativePath&&(Object.defineProperties(he,{webkitRelativePath:{writable:!0}}),he.webkitRelativePath=Z.fullPath.replace(/^\//,""),Object.defineProperties(he,{webkitRelativePath:{writable:!1}})),P([he]))}):Z.isDirectory&&r(Z,function(he){he.forEach(function(ae){q(ae,""+ce+Z.name+"/")})})};U.forEach(function(q){V(q.webkitGetAsEntry())})},o=i,s=Object.assign||function(z){for(var U=1;U<arguments.length;U++){var P=arguments[U];for(var H in P)Object.prototype.hasOwnProperty.call(P,H)&&(z[H]=P[H])}return z},u=function(){function z(U,P){var H=[],V=!0,q=!1,Z=void 0;try{for(var ce=U[Symbol.iterator](),he;!(V=(he=ce.next()).done)&&!(H.push(he.value),P&&H.length===P);V=!0);}catch(ae){q=!0,Z=ae}finally{try{!V&&ce.return&&ce.return()}finally{if(q)throw Z}}return H}return function(U,P){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return z(U,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function z(U,P){for(var H=0;H<P.length;H++){var V=P[H];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(U,V.key,V)}}return function(U,P,H){return P&&z(U.prototype,P),H&&z(U,H),U}}();function c(z,U,P){return U in z?Object.defineProperty(z,U,{value:P,enumerable:!0,configurable:!0,writable:!0}):z[U]=P,z}function f(z,U){var P={};for(var H in z){if(U.indexOf(H)>=0)continue;if(!Object.prototype.hasOwnProperty.call(z,H))continue;P[H]=z[H]}return P}function w(z,U){if(!(z instanceof U))throw new TypeError("Cannot call a class as a function")}function _(z,U){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:z}function h(z,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);z.prototype=Object.create(U&&U.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(z,U):z.__proto__=U)}var R=function(U){return Object.keys(U).reduce(function(P,H){return(H.substr(0,5)==="data-"||H.substr(0,5)==="aria-"||H==="role")&&(P[H]=U[H]),P},{})},C=function(z){h(U,z);function U(){var P,H,V,q;w(this,U);for(var Z=arguments.length,ce=Array(Z),he=0;he<Z;he++)ce[he]=arguments[he];return q=(H=(V=_(this,(P=U.__proto__||Object.getPrototypeOf(U)).call.apply(P,[this].concat(ce))),V),V.state={uid:d()},V.reqs={},V.onChange=function(ae){var xe=ae.target.files;V.uploadFiles(xe),V.reset()},V.onClick=function(ae){var xe=V.fileInput;if(!xe)return;var ge=V.props,oe=ge.children,se=ge.onClick;oe&&oe.type==="button"&&(xe.parentNode.focus(),xe.parentNode.querySelector("button").blur()),xe.click(),se&&se(ae)},V.onKeyDown=function(ae){ae.key==="Enter"&&V.onClick()},V.onFileDrop=function(ae){var xe=V.props.multiple;if(ae.preventDefault(),ae.type==="dragover")return;if(V.props.directory)o(Array.prototype.slice.call(ae.dataTransfer.items),V.uploadFiles,function(oe){return l(oe,V.props.accept)});else{var ge=Array.prototype.slice.call(ae.dataTransfer.files).filter(function(oe){return l(oe,V.props.accept)});xe===!1&&(ge=ge.slice(0,1)),V.uploadFiles(ge)}},V.uploadFiles=function(ae){var xe=Array.prototype.slice.call(ae);xe.map(function(ge){return ge.uid=d(),ge}).forEach(function(ge){V.upload(ge,xe)})},V.saveFileInput=function(ae){V.fileInput=ae},H),_(V,q)}return a(U,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(H,V){var q=this,Z=this.props;if(!Z.beforeUpload)return setTimeout(function(){return q.post(H)},0);var ce=Z.beforeUpload(H,V);ce&&ce.then?ce.then(function(he){var ae=Object.prototype.toString.call(he);return ae==="[object File]"||ae==="[object Blob]"?q.post(he):q.post(H)}).catch(function(he){console.log(he)}):ce!==!1&&setTimeout(function(){return q.post(H)},0);return}},{key:"post",value:function(H){var V=this;if(!this._isMounted)return;var q=this.props,Z=q.onStart,ce=q.onProgress,he=q.transformFile,ae=he===void 0?function(xe){return xe}:he;new Promise(function(xe){var ge=q.action;return typeof ge=="function"&&(ge=ge(H)),xe(ge)}).then(function(xe){var ge=H.uid,oe=q.customRequest||S,se=Promise.resolve(ae(H)).then(function(te){var be=q.data;return typeof be=="function"&&(be=be(te)),Promise.all([te,be])}).catch(function(te){console.error(te)});se.then(function(te){var be=u(te,2),ee=be[0],ie=be[1],Ee={action:xe,filename:q.name,data:ie,file:ee,headers:q.headers,withCredentials:q.withCredentials,method:q.method||"post",onProgress:ce?function(ne){ce(ne,H)}:null,onSuccess:function(J,X){delete V.reqs[ge],q.onSuccess(J,H,X)},onError:function(J,X){delete V.reqs[ge],q.onError(J,X,H)}};Z(H),V.reqs[ge]=oe(Ee)})})}},{key:"reset",value:function(){this.setState({uid:d()})}},{key:"abort",value:function(H){var V=this.reqs;if(H){var q=H;H&&H.uid&&(q=H.uid),V[q]&&V[q].abort&&V[q].abort(),delete V[q]}else Object.keys(V).forEach(function(Z){V[Z]&&V[Z].abort&&V[Z].abort(),delete V[Z]})}},{key:"render",value:function(){var H,V=this.props,q=V.component,Z=V.prefixCls,ce=V.className,he=V.disabled,ae=V.id,xe=V.style,ge=V.multiple,oe=V.accept,se=V.children,te=V.directory,be=V.openFileDialogOnClick,ee=V.onMouseEnter,ie=V.onMouseLeave,Ee=f(V,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),ne=M()((H={},c(H,Z,!0),c(H,Z+"-disabled",he),c(H,ce,ce),H)),J=he?{}:{onClick:be?this.onClick:function(){},onKeyDown:be?this.onKeyDown:function(){},onMouseEnter:ee,onMouseLeave:ie,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return v.a.createElement(q,s({},J,{className:ne,role:"button",style:xe}),v.a.createElement("input",s({},R(Ee),{id:ae,type:"file",ref:this.saveFileInput,onClick:function(Q){return Q.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:oe,directory:te?"directory":null,webkitdirectory:te?"webkitdirectory":null,multiple:ge,onChange:this.onChange})),se)}}]),U}(N.Component),g=C,x=Object.assign||function(z){for(var U=1;U<arguments.length;U++){var P=arguments[U];for(var H in P)Object.prototype.hasOwnProperty.call(P,H)&&(z[H]=P[H])}return z},E=function(){function z(U,P){for(var H=0;H<P.length;H++){var V=P[H];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(U,V.key,V)}}return function(U,P,H){return P&&z(U.prototype,P),H&&z(U,H),U}}();function T(z,U){if(!(z instanceof U))throw new TypeError("Cannot call a class as a function")}function k(z,U){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:z}function L(z,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);z.prototype=Object.create(U&&U.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(z,U):z.__proto__=U)}function A(){}var G=function(z){L(U,z);function U(){var P,H,V,q;T(this,U);for(var Z=arguments.length,ce=Array(Z),he=0;he<Z;he++)ce[he]=arguments[he];return q=(H=(V=k(this,(P=U.__proto__||Object.getPrototypeOf(U)).call.apply(P,[this].concat(ce))),V),V.saveUploader=function(ae){V.uploader=ae},H),k(V,q)}return E(U,[{key:"abort",value:function(H){this.uploader.abort(H)}},{key:"render",value:function(){return v.a.createElement(g,x({},this.props,{ref:this.saveUploader}))}}]),U}(N.Component);G.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:A,onError:A,onSuccess:A,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var K=G,W=$.a=K},HmJG:function(F,$,j){},IBYe:function(F,$,j){"use strict";function N(v){return null}$.a=N},Ib8C:function(F,$,j){(function(N){(function(v,O){F.exports=$=O()})(this,function(){var v=v||function(O,M){var y;if(typeof window!="undefined"&&window.crypto&&(y=window.crypto),typeof self!="undefined"&&self.crypto&&(y=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(y=globalThis.crypto),!y&&typeof window!="undefined"&&window.msCrypto&&(y=window.msCrypto),!y&&typeof N!="undefined"&&N.crypto&&(y=N.crypto),!y&&!0)try{y=j(4)}catch(c){}var m=function(){if(y){if(typeof y.getRandomValues=="function")try{return y.getRandomValues(new Uint32Array(1))[0]}catch(c){}if(typeof y.randomBytes=="function")try{return y.randomBytes(4).readInt32LE()}catch(c){}}throw new Error("Native crypto module could not be used to get secure random number.")},S=Object.create||function(){function c(){}return function(f){var w;return c.prototype=f,w=new c,c.prototype=null,w}}(),b={},p=b.lib={},d=p.Base=function(){return{extend:function(c){var f=S(this);return c&&f.mixIn(c),(!f.hasOwnProperty("init")||this.init===f.init)&&(f.init=function(){f.$super.init.apply(this,arguments)}),f.init.prototype=f,f.$super=this,f},create:function(){var c=this.extend();return c.init.apply(c,arguments),c},init:function(){},mixIn:function(c){for(var f in c)c.hasOwnProperty(f)&&(this[f]=c[f]);c.hasOwnProperty("toString")&&(this.toString=c.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),t=p.WordArray=d.extend({init:function(c,f){c=this.words=c||[],f!=M?this.sigBytes=f:this.sigBytes=c.length*4},toString:function(c){return(c||r).stringify(this)},concat:function(c){var f=this.words,w=c.words,_=this.sigBytes,h=c.sigBytes;if(this.clamp(),_%4)for(var R=0;R<h;R++){var C=w[R>>>2]>>>24-R%4*8&255;f[_+R>>>2]|=C<<24-(_+R)%4*8}else for(var g=0;g<h;g+=4)f[_+g>>>2]=w[g>>>2];return this.sigBytes+=h,this},clamp:function(){var c=this.words,f=this.sigBytes;c[f>>>2]&=4294967295<<32-f%4*8,c.length=O.ceil(f/4)},clone:function(){var c=d.clone.call(this);return c.words=this.words.slice(0),c},random:function(c){for(var f=[],w=0;w<c;w+=4)f.push(m());return new t.init(f,c)}}),l=b.enc={},r=l.Hex={stringify:function(c){for(var f=c.words,w=c.sigBytes,_=[],h=0;h<w;h++){var R=f[h>>>2]>>>24-h%4*8&255;_.push((R>>>4).toString(16)),_.push((R&15).toString(16))}return _.join("")},parse:function(c){for(var f=c.length,w=[],_=0;_<f;_+=2)w[_>>>3]|=parseInt(c.substr(_,2),16)<<24-_%8*4;return new t.init(w,f/2)}},i=l.Latin1={stringify:function(c){for(var f=c.words,w=c.sigBytes,_=[],h=0;h<w;h++){var R=f[h>>>2]>>>24-h%4*8&255;_.push(String.fromCharCode(R))}return _.join("")},parse:function(c){for(var f=c.length,w=[],_=0;_<f;_++)w[_>>>2]|=(c.charCodeAt(_)&255)<<24-_%4*8;return new t.init(w,f)}},o=l.Utf8={stringify:function(c){try{return decodeURIComponent(escape(i.stringify(c)))}catch(f){throw new Error("Malformed UTF-8 data")}},parse:function(c){return i.parse(unescape(encodeURIComponent(c)))}},s=p.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new t.init,this._nDataBytes=0},_append:function(c){typeof c=="string"&&(c=o.parse(c)),this._data.concat(c),this._nDataBytes+=c.sigBytes},_process:function(c){var f,w=this._data,_=w.words,h=w.sigBytes,R=this.blockSize,C=R*4,g=h/C;c?g=O.ceil(g):g=O.max((g|0)-this._minBufferSize,0);var x=g*R,E=O.min(x*4,h);if(x){for(var T=0;T<x;T+=R)this._doProcessBlock(_,T);f=_.splice(0,x),w.sigBytes-=E}return new t.init(f,E)},clone:function(){var c=d.clone.call(this);return c._data=this._data.clone(),c},_minBufferSize:0}),u=p.Hasher=s.extend({cfg:d.extend(),init:function(c){this.cfg=this.cfg.extend(c),this.reset()},reset:function(){s.reset.call(this),this._doReset()},update:function(c){return this._append(c),this._process(),this},finalize:function(c){c&&this._append(c);var f=this._doFinalize();return f},blockSize:512/32,_createHelper:function(c){return function(f,w){return new c.init(w).finalize(f)}},_createHmacHelper:function(c){return function(f,w){return new a.HMAC.init(c,w).finalize(f)}}}),a=b.algo={};return b}(Math);return v})}).call(this,j("IyRk"))},J66h:function(F,$,j){(function(N){var v,O;(function(M,y){F.exports=y(M)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof N!="undefined"?N:this,function(M){"use strict";M=M||{};var y=M.Base64,m="2.6.4",S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b=function(A){for(var G={},K=0,W=A.length;K<W;K++)G[A.charAt(K)]=K;return G}(S),p=String.fromCharCode,d=function(A){if(A.length<2){var G=A.charCodeAt(0);return G<128?A:G<2048?p(192|G>>>6)+p(128|G&63):p(224|G>>>12&15)+p(128|G>>>6&63)+p(128|G&63)}else{var G=65536+(A.charCodeAt(0)-55296)*1024+(A.charCodeAt(1)-56320);return p(240|G>>>18&7)+p(128|G>>>12&63)+p(128|G>>>6&63)+p(128|G&63)}},t=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,l=function(A){return A.replace(t,d)},r=function(A){var G=[0,2,1][A.length%3],K=A.charCodeAt(0)<<16|(A.length>1?A.charCodeAt(1):0)<<8|(A.length>2?A.charCodeAt(2):0),W=[S.charAt(K>>>18),S.charAt(K>>>12&63),G>=2?"=":S.charAt(K>>>6&63),G>=1?"=":S.charAt(K&63)];return W.join("")},i=M.btoa&&typeof M.btoa=="function"?function(A){return M.btoa(A)}:function(A){if(A.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return A.replace(/[\s\S]{1,3}/g,r)},o=function(A){return i(l(String(A)))},s=function(A){return A.replace(/[+\/]/g,function(G){return G=="+"?"-":"_"}).replace(/=/g,"")},u=function(A,G){return G?s(o(A)):o(A)},a=function(A){return u(A,!0)},c;M.Uint8Array&&(c=function(A,G){for(var K="",W=0,z=A.length;W<z;W+=3){var U=A[W],P=A[W+1],H=A[W+2],V=U<<16|P<<8|H;K+=S.charAt(V>>>18)+S.charAt(V>>>12&63)+(typeof P!="undefined"?S.charAt(V>>>6&63):"=")+(typeof H!="undefined"?S.charAt(V&63):"=")}return G?s(K):K});var f=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,w=function(A){switch(A.length){case 4:var G=(7&A.charCodeAt(0))<<18|(63&A.charCodeAt(1))<<12|(63&A.charCodeAt(2))<<6|63&A.charCodeAt(3),K=G-65536;return p((K>>>10)+55296)+p((K&1023)+56320);case 3:return p((15&A.charCodeAt(0))<<12|(63&A.charCodeAt(1))<<6|63&A.charCodeAt(2));default:return p((31&A.charCodeAt(0))<<6|63&A.charCodeAt(1))}},_=function(A){return A.replace(f,w)},h=function(A){var G=A.length,K=G%4,W=(G>0?b[A.charAt(0)]<<18:0)|(G>1?b[A.charAt(1)]<<12:0)|(G>2?b[A.charAt(2)]<<6:0)|(G>3?b[A.charAt(3)]:0),z=[p(W>>>16),p(W>>>8&255),p(W&255)];return z.length-=[0,0,2,1][K],z.join("")},R=M.atob&&typeof M.atob=="function"?function(A){return M.atob(A)}:function(A){return A.replace(/\S{1,4}/g,h)},C=function(A){return R(String(A).replace(/[^A-Za-z0-9\+\/]/g,""))},g=function(A){return _(R(A))},x=function(A){return String(A).replace(/[-_]/g,function(G){return G=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},E=function(A){return g(x(A))},T;M.Uint8Array&&(T=function(A){return Uint8Array.from(C(x(A)),function(G){return G.charCodeAt(0)})});var k=function(){var A=M.Base64;return M.Base64=y,A};if(M.Base64={VERSION:m,atob:C,btoa:i,fromBase64:E,toBase64:u,utob:l,encode:u,encodeURI:a,btou:_,decode:E,noConflict:k,fromUint8Array:c,toUint8Array:T},typeof Object.defineProperty=="function"){var L=function(A){return{value:A,enumerable:!1,writable:!0,configurable:!0}};M.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",L(function(){return E(this)})),Object.defineProperty(String.prototype,"toBase64",L(function(A){return u(this,A)})),Object.defineProperty(String.prototype,"toBase64URI",L(function(){return u(this,!0)}))}}return M.Meteor&&(Base64=M.Base64),F.exports?F.exports.Base64=M.Base64:!(v=[],O=function(){return M.Base64}.apply($,v),O!==void 0&&(F.exports=O)),{Base64:M.Base64}})}).call(this,j("IyRk"))},K3mO:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("3y9D"),j("WYAk"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.Base,y=O.WordArray,m=v.algo,S=m.MD5,b=m.EvpKDF=M.extend({cfg:M.extend({keySize:128/32,hasher:S,iterations:1}),init:function(p){this.cfg=this.cfg.extend(p)},compute:function(p,d){for(var t,l=this.cfg,r=l.hasher.create(),i=y.create(),o=i.words,s=l.keySize,u=l.iterations;o.length<s;){t&&r.update(t),t=r.update(p).finalize(d),r.reset();for(var a=1;a<u;a++)t=r.finalize(t),r.reset();i.concat(t)}return i.sigBytes=s*4,i}});v.EvpKDF=function(p,d,t){return b.create(t).compute(p,d)}}(),N.EvpKDF})},KhGG:function(F,$,j){"use strict";j.d($,"a",function(){return h}),j.d($,"c",function(){return g});var N=j("0Owb"),v=j("miYZ"),O=j("tsqr"),M=j("oBTY"),y=j("tJVT"),m=j("PpiC"),S=j("k1fw"),b=j("9og8"),p=j("DZo9"),d=j("8z0m"),t=j("WmNS"),l=j.n(t),r=j("cDcd"),i=j.n(r),o=j("ErOA"),s=j("NFKh"),u=j.n(s),a=j("7Cbv"),c=j("9kvl"),f=j("mxV5"),w=j.n(f),_=d.a.Dragger,h=function(T){var k="bf3c199c2470cb477d907b1e0917c17b",L="5183666c72eec9e4",A=u.a.enc.Utf8.parse(k),G=u.a.enc.Utf8.parse(L),K=u.a.AES.decrypt(T,A,{iv:G,mode:u.a.mode.CBC});return K.toString(u.a.enc.Utf8)},R,C=function(){var E=Object(b.a)(l.a.mark(function T(k){var L,A,G,K,W,z,U,P,H,V,q;return l.a.wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return U=k.identifier,P=k.oldFilename,H=k.newFilename,ce.next=3,Object(o.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 3:return V=ce.sent,V.data=JSON.parse(h(V.data)),q=new w.a({endpoint:V==null||((L=V.data)===null||L===void 0)?void 0:L.end_point,region:V==null||((A=V.data)===null||A===void 0)?void 0:A.region,accessKeyId:V==null||((G=V.data)===null||G===void 0)?void 0:G.access_key_id,accessKeySecret:V==null||((K=V.data)===null||K===void 0)?void 0:K.access_key_secret,bucket:V==null||((W=V.data)===null||W===void 0)?void 0:W.bucket,stsToken:V==null||((z=V.data)===null||z===void 0)?void 0:z.security_token}),ce.abrupt("return",new Promise(function(he,ae){console.log(11111,"".concat(U,"/").concat(P),"".concat(U,"/").concat(H),V.data),q.copy("/".concat(U,"/").concat(P),"/".concat(U,"/").concat(H)).then(function(xe){console.log("\u62F7\u8D1D\u6210\u529F",xe)}).catch(function(xe){console.log(xe);debugger})}));case 7:case"end":return ce.stop()}},T)}));return function(k){return E.apply(this,arguments)}}(),g=function(){var E=Object(b.a)(l.a.mark(function T(k,L,A){var G,K,W,z,U,P,H,V,q,Z;return l.a.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return L.file_name=k.name,he.next=3,Object(o.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return H=he.sent,console.log("decrypt(res.data):",h(H.data)),H.data=JSON.parse(h(H.data)),V=k.name.split("."),V.pop(),q=L.realFileName?V:Object(a.a)(),Z=new w.a({endpoint:H==null||((G=H.data)===null||G===void 0)?void 0:G.end_point,region:H==null||((K=H.data)===null||K===void 0)?void 0:K.region,accessKeyId:H==null||((W=H.data)===null||W===void 0)?void 0:W.access_key_id,accessKeySecret:H==null||((z=H.data)===null||z===void 0)?void 0:z.access_key_secret,bucket:H==null||((U=H.data)===null||U===void 0)?void 0:U.bucket,stsToken:H==null||((P=H.data)===null||P===void 0)?void 0:P.security_token}),he.abrupt("return",new Promise(function(ae,xe){var ge;Z.multipartUpload("".concat(q),new Blob([k],{type:k.type}),Object(S.a)(Object(S.a)({timeout:200*1e3,partSize:102400},A),{},{callback:{url:H==null||((ge=H.data)===null||ge===void 0)?void 0:ge.callback_url,host:H==null?void 0:H.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(o.e)(L)}})).then(function(oe){var se;k.response=(se=oe.data)===null||se===void 0?void 0:se.data,ae(oe==null?void 0:oe.data)}).catch(function(oe){xe(oe),console.log("err:",oe)})}));case 11:case"end":return he.stop()}},T)}));return function(k,L,A){return E.apply(this,arguments)}}(),x=function(T){var k=T.user,L=T.cancelUpload,A=Object(m.a)(T,["user","cancelUpload"]),G=Object(r.useState)([]),K=Object(y.a)(G,2),W=K[0],z=K[1],U=Object(r.useState)(),P=Object(y.a)(U,2),H=P[0],V=P[1],q={onRemove:function(he){z(Object(M.a)(W.filter(function(ae){return ae.name!==he.name}))),A.onChange(W.filter(function(ae){return ae.name!==he.name}))},disabled:A.disabled,multiple:!0,fileList:W==null?void 0:W.map(function(ce){return ce.file}),customRequest:function(){},beforeUpload:function(){var ce=Object(b.a)(l.a.mark(function ae(xe){var ge;return l.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(ge=A.maxSize||1024*1024*1024*1,!W.filter(function(te){return te.name===xe.name}).length){se.next=4;break}return O.b.info("".concat(xe.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),se.abrupt("return");case 4:if(!((xe==null?void 0:xe.size)>ge)){se.next=7;break}return O.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(ge/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),se.abrupt("return",!1);case 7:return W.push({name:xe.name,file:xe}),z(Object(M.a)(W)),A.onChange(W),se.abrupt("return",!1);case 11:case"end":return se.stop()}},ae)}));function he(ae){return ce.apply(this,arguments)}return he}()},Z=function(){var ce=Object(b.a)(l.a.mark(function he(ae,xe){var ge,oe,se,te,be,ee,ie,Ee,ne,J;return l.a.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return xe.file_name=ae.name,ie=ae.name,Q.next=4,Object(o.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(Ee=Q.sent,Ee.data=JSON.parse(h(Ee.data)),!((Ee==null?void 0:Ee.status)!==0)){Q.next=12;break}return W[W.findIndex(function(me){return me.name===ie})].status="error",W[W.findIndex(function(me){return me.name===ie})].file.status="error",A.onChange(W),O.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),Q.abrupt("return");case 12:return H=new w.a({endpoint:Ee==null||((ge=Ee.data)===null||ge===void 0)?void 0:ge.end_point,region:Ee==null||((oe=Ee.data)===null||oe===void 0)?void 0:oe.region,accessKeyId:Ee==null||((se=Ee.data)===null||se===void 0)?void 0:se.access_key_id,accessKeySecret:Ee==null||((te=Ee.data)===null||te===void 0)?void 0:te.access_key_secret,bucket:Ee==null||((be=Ee.data)===null||be===void 0)?void 0:be.bucket,stsToken:Ee==null||((ee=Ee.data)===null||ee===void 0)?void 0:ee.security_token}),console.log(ae,"file"),V(H),ne=ae.name.split("."),ne.pop(),J=xe.realFileName?ne:Object(a.a)(),Q.abrupt("return",new Promise(function(me,fe){try{var Te;H.multipartUpload("".concat(A.identifier,"/").concat(J).concat(ie.indexOf(".")>-1?"."+ie.split(".").pop():""),new Blob([ae.file],{type:ae.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Je,qe,Xe){try{console.log("\u8FDB\u5EA6",Je,qe,Xe);var et=W.findIndex(function(rt){return rt.name===ie});W[et].file.percent=Je*100,W[et].tempCheckpoint=qe,z(Object(M.a)(W))}catch(rt){}},checkpoint:W[W.findIndex(function(ze){return ze.name===ie})].tempCheckpoint,callback:{customValue:{id:ie+""},url:Ee==null||((Te=Ee.data)===null||Te===void 0)?void 0:Te.callback_url,host:Ee==null?void 0:Ee.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(o.e)(xe)}}).then(function(ze){var Je,qe=W.findIndex(function(Oe){return Oe.name===ie}),Xe="done";if(((Je=ze.data)===null||Je===void 0?void 0:Je.status)===0){var et;ae.response=(et=ze.data)===null||et===void 0?void 0:et.data;var rt=W.findIndex(function(Oe){return Oe.name===ie});W[rt].status="done",W[rt].file.status="done"}else{var Le;O.b.warn((Le=ze.data)===null||Le===void 0?void 0:Le.message),Xe="error"}W[qe].status=Xe,W[qe].file.status=Xe,A.onChange(W),me(ze==null?void 0:ze.data)}).catch(function(ze){W[W.findIndex(function(Je){return Je.name===ie})].status="error",W[W.findIndex(function(Je){return Je.name===ie})].file.status="error",O.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),z(Object(M.a)(W)),A.onChange(W),fe(ze),console.log("err:",ze)})}catch(ze){}}));case 19:case"end":return Q.stop()}},he)}));return function(ae,xe){return ce.apply(this,arguments)}}();return Object(r.useEffect)(function(){W.every(function(ce){return ce==="done"||ce==="error"})&&A.onComplete(W)},[W]),Object(r.useEffect)(function(){if(L){var ce;(ce=H)===null||ce===void 0||ce.cancel()}},[L]),Object(r.useEffect)(function(){A.uploading&&W.map(function(){var ce=Object(b.a)(l.a.mark(function he(ae){var xe,ge;return l.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(!((!ae.status||ae.status==="error")&&!L)){se.next=6;break}return ae.status="uploading",ae.file.status="uploading",se.next=5,Z(ae,{login:k==null||((xe=k.userInfo)===null||xe===void 0)?void 0:xe.login,container_type:A.container_type,container_id:A.container_id,description:A.description,realFileName:A.realFileName});case 5:ge=se.sent;case 6:case"end":return se.stop()}},he)}));return function(he){return ce.apply(this,arguments)}}())},[A.uploading]),i.a.createElement(_,Object(N.a)({},q,{height:A.height,className:A.className}),i.a.createElement("p",{className:"ant-upload-hint"},A.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};$.b=Object(c.a)(function(E){var T=E.loading,k=E.globalSetting,L=E.user;return{globalSetting:k,loading:T.models.competitions,user:L}})(x)},KmYQ:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.ZeroPadding={pad:function(v,O){var M=O*4;v.clamp(),v.sigBytes+=M-(v.sigBytes%M||M)},unpad:function(v){for(var O=v.words,M=v.sigBytes-1,M=v.sigBytes-1;M>=0;M--)if(O[M>>>2]>>>24-M%4*8&255){v.sigBytes=M+1;break}}},N.pad.ZeroPadding})},L9qf:function(F,$,j){F.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(F,$,j){"use strict";j.d($,"b",function(){return f}),j.d($,"a",function(){return _});var N=j("1OyB"),v=j("vuIU"),O=j("Ji7U"),M=j("LK+K"),y=j("cDcd"),m=j("rePB"),S=j("Ff2n"),b=j("ODXe"),p=j("4IlW"),d=j("bX4T"),t=j("YrtM"),l=j("TSYQ"),r=j.n(l),i=j("+nKL"),o=j("8OUc"),s=function(H,V){var q=H.prefixCls,Z=H.id,ce=H.flattenOptions,he=H.childrenAsData,ae=H.values,xe=H.searchValue,ge=H.multiple,oe=H.defaultActiveFirstOption,se=H.height,te=H.itemHeight,be=H.notFoundContent,ee=H.open,ie=H.menuItemSelectedIcon,Ee=H.virtual,ne=H.onSelect,J=H.onToggleOpen,X=H.onActiveValue,Q=H.onScroll,me=H.onMouseEnter,fe="".concat(q,"-item"),Te=Object(t.a)(function(){return ce},[ee,ce],function(Ge,De){return De[0]&&Ge[1]!==De[1]}),ze=y.useRef(null),Je=function(De){De.preventDefault()},qe=function(De){ze.current&&ze.current.scrollTo({index:De})},Xe=function(De){for(var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ae=Te.length,de=0;de<Ae;de+=1){var _e=(De+de*we+Ae)%Ae,Se=Te[_e],Ie=Se.group,ke=Se.data;if(!Ie&&!ke.disabled)return _e}return-1},et=y.useState(function(){return Xe(0)}),rt=Object(b.a)(et,2),Le=rt[0],Oe=rt[1],Ve=function(De){Oe(De);var we=Te[De];if(!we){X(null,-1);return}X(we.data.value,De)};y.useEffect(function(){Ve(oe!==!1?Xe(0):-1)},[Te.length,xe]),y.useEffect(function(){var Ge=setTimeout(function(){if(!ge&&ee&&ae.size===1){var De=Array.from(ae)[0],we=Te.findIndex(function(Ae){var de=Ae.data;return de.value===De});Ve(we),qe(we)}});return function(){return clearTimeout(Ge)}},[ee]);var Ze=function(De){De!==void 0&&ne(De,{selected:!ae.has(De)}),ge||J(!1)};if(y.useImperativeHandle(V,function(){return{onKeyDown:function(De){var we=De.which;switch(we){case p.a.UP:case p.a.DOWN:{var Ae=0;if(we===p.a.UP?Ae=-1:we===p.a.DOWN&&(Ae=1),Ae!==0){var de=Xe(Le+Ae,Ae);qe(de),Ve(de)}break}case p.a.ENTER:{var _e=Te[Le];_e&&!_e.data.disabled?Ze(_e.data.value):Ze(void 0),ee&&De.preventDefault();break}case p.a.ESC:J(!1)}},onKeyUp:function(){},scrollTo:function(De){qe(De)}}}),Te.length===0)return y.createElement("div",{role:"listbox",id:"".concat(Z,"_list"),className:"".concat(fe,"-empty"),onMouseDown:Je},be);function Ne(Ge){var De=Te[Ge];if(!De)return null;var we=De.data||{},Ae=we.value,de=we.label,_e=we.children,Se=Object(d.a)(we,!0),Ie=he?_e:de;return De?y.createElement("div",Object.assign({"aria-label":typeof Ie=="string"?Ie:null},Se,{key:Ge,role:"option",id:"".concat(Z,"_list_").concat(Ge),"aria-selected":ae.has(Ae)}),Ae):null}return y.createElement(y.Fragment,null,y.createElement("div",{role:"listbox",id:"".concat(Z,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ne(Le-1),Ne(Le),Ne(Le+1)),y.createElement(i.a,{itemKey:"key",ref:ze,data:Te,height:se,itemHeight:te,fullHeight:!1,onMouseDown:Je,onScroll:Q,virtual:Ee,onMouseEnter:me},function(Ge,De){var we,Ae=Ge.group,de=Ge.groupOption,_e=Ge.data,Se=_e.label,Ie=_e.key;if(Ae)return y.createElement("div",{className:r()(fe,"".concat(fe,"-group"))},Se!==void 0?Se:Ie);var ke=_e.disabled,Ye=_e.value,nt=_e.title,lt=_e.children,at=_e.style,ot=_e.className,Ct=Object(S.a)(_e,["disabled","value","title","children","style","className"]),bt=ae.has(Ye),ft="".concat(fe,"-option"),jt=r()(fe,ft,ot,(we={},Object(m.a)(we,"".concat(ft,"-grouped"),de),Object(m.a)(we,"".concat(ft,"-active"),Le===De&&!ke),Object(m.a)(we,"".concat(ft,"-disabled"),ke),Object(m.a)(we,"".concat(ft,"-selected"),bt),we)),Pt=he?lt:Se,Xt=!ie||typeof ie=="function"||bt;return y.createElement("div",Object.assign({},Ct,{"aria-selected":bt,className:jt,title:nt,onMouseMove:function(){if(Le===De||ke)return;Ve(De)},onClick:function(){ke||Ze(Ye)},style:at}),y.createElement("div",{className:"".concat(ft,"-content")},Pt||Ye),y.isValidElement(ie)||bt,Xt&&y.createElement(o.a,{className:"".concat(fe,"-option-state"),customizeIcon:ie,customizeIconProps:{isSelected:bt}},bt?"\u2713":null))}))},u=y.forwardRef(s);u.displayName="OptionList";var a=u,c=function(){return null};c.isSelectOption=!0;var f=c,w=function(){return null};w.isSelectOptGroup=!0;var _=w,h=j("VTBJ"),R=j("Zm9Q");function C(P){var H=P.key,V=P.props,q=V.children,Z=V.value,ce=Object(S.a)(V,["children","value"]);return Object(h.a)({key:H,value:Z!==void 0?Z:H,children:q},ce)}function g(P){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(R.a)(P).map(function(V,q){if(!y.isValidElement(V)||!V.type)return null;var Z=V.type.isSelectOptGroup,ce=V.key,he=V.props,ae=he.children,xe=Object(S.a)(he,["children"]);return H||!Z?C(V):Object(h.a)(Object(h.a)({key:"__RC_SELECT_GRP__".concat(ce===null?q:ce,"__"),label:ce},xe),{},{options:g(ae)})}).filter(function(V){return V})}var x=j("2Qr1"),E=j("qNPg"),T=j("U8pU"),k=j("Kwbf"),L=j("WKfj");function A(P){var H=P.mode,V=P.options,q=P.children,Z=P.backfill,ce=P.allowClear,he=P.placeholder,ae=P.getInputElement,xe=P.showSearch,ge=P.onSearch,oe=P.defaultOpen,se=P.autoFocus,te=P.labelInValue,be=P.value,ee=P.inputValue,ie=P.optionLabelProp,Ee=H==="multiple"||H==="tags",ne=xe!==void 0?xe:Ee||H==="combobox",J=V||g(q);if(Object(k.a)(H!=="tags"||J.every(function(fe){return!fe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),H==="tags"||H==="combobox"){var X=J.some(function(fe){return fe.options?fe.options.some(function(Te){return typeof("value"in Te?Te.value:Te.key)=="number"}):typeof("value"in fe?fe.value:fe.key)=="number"});Object(k.a)(!X,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(k.a)(H!=="combobox"||!ie,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(k.a)(H==="combobox"||!Z,"`backfill` only works with `combobox` mode."),Object(k.a)(H==="combobox"||!ae,"`getInputElement` only work with `combobox` mode."),Object(k.b)(H!=="combobox"||!ae||!ce||!he,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ge&&!ne&&H!=="combobox"&&H!=="tags"&&Object(k.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(k.b)(!oe||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(L.d)(be);Object(k.a)(!te||Q.every(function(fe){return Object(T.a)(fe)==="object"&&("key"in fe||"value"in fe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(k.a)(!Ee||Array.isArray(be),"`value` should be array when `mode` is `multiple` or `tags`")}if(q){var me=null;Object(R.a)(q).some(function(fe){if(!y.isValidElement(fe)||!fe.type)return!1;var Te=fe.type;if(Te.isSelectOption)return!1;if(Te.isSelectOptGroup){var ze=Object(R.a)(fe.props.children).every(function(Je){return!y.isValidElement(Je)||!fe.type||Je.type.isSelectOption?!0:(me=Je.type,!1)});return!ze}return me=Te,!0}),me&&Object(k.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(me.displayName||me.name||me,"`.")),Object(k.a)(ee===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var G=A,K=Object(E.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:g,flattenOptions:x.d,getLabeledValue:x.e,filterOptions:x.b,isValueDisabled:x.g,findValueOption:x.c,warningProps:G,fillOptionsWithMissingValue:x.a}),W=function(P){Object(O.a)(V,P);var H=Object(M.a)(V);function V(){var q;return Object(N.a)(this,V),q=H.apply(this,arguments),q.selectRef=y.createRef(),q.focus=function(){q.selectRef.current.focus()},q.blur=function(){q.selectRef.current.blur()},q}return Object(v.a)(V,[{key:"render",value:function(){return y.createElement(K,Object.assign({ref:this.selectRef},this.props))}}]),V}(y.Component);W.Option=f,W.OptGroup=_;var z=W,U=$.c=z},M8RZ:function(F,$,j){"use strict";j.d($,"a",function(){return p});var N=j("fWQN"),v=j("mtLc"),O=j("yKVA"),M=j("879j"),y=j("cDcd"),m=j.n(y),S=j("faye"),b=j.n(S),p=function(d){Object(O.a)(l,d);var t=Object(M.a)(l);function l(r){var i;Object(N.a)(this,l),i=t.call(this,r);var o=window.document;return i.node=o.createElement("div"),o.body.appendChild(i.node),i}return Object(v.a)(l,[{key:"render",value:function(){var i=this.props.children;return Object(S.createPortal)(i,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),l}(m.a.Component)},MFOe:function(F,$,j){(function(N){var v=m(),O=S(),M=b(),y=typeof window!="undefined"?window:N;F.exports={assign:v,create:O,trim:M,bind:p,slice:d,each:t,map:l,pluck:r,isList:i,isFunction:o,isObject:s,Global:y};function m(){return Object.assign?Object.assign:function(a,c,f,w){for(var _=1;_<arguments.length;_++)t(Object(arguments[_]),function(h,R){a[R]=h});return a}}function S(){if(Object.create)return function(c,f,w,_){var h=d(arguments,1);return v.apply(this,[Object.create(c)].concat(h))};{function u(){}return function(c,f,w,_){var h=d(arguments,1);return u.prototype=c,v.apply(this,[new u].concat(h))}}}function b(){return String.prototype.trim?function(a){return String.prototype.trim.call(a)}:function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function p(u,a){return function(){return a.apply(u,Array.prototype.slice.call(arguments,0))}}function d(u,a){return Array.prototype.slice.call(u,a||0)}function t(u,a){r(u,function(c,f){return a(c,f),!1})}function l(u,a){var c=i(u)?[]:{};return r(u,function(f,w){return c[w]=a(f,w),!1}),c}function r(u,a){if(i(u)){for(var c=0;c<u.length;c++)if(a(u[c],c))return u[c]}else for(var f in u)if(u.hasOwnProperty(f)&&a(u[f],f))return u[f]}function i(u){return u!=null&&typeof u!="function"&&typeof u.length=="number"}function o(u){return u&&{}.toString.call(u)==="[object Function]"}function s(u){return u&&{}.toString.call(u)==="[object Object]"}}).call(this,j("IyRk"))},MlIO:function(F,$,j){(function(N,v){F.exports=$=v(j("Ib8C"))})(this,function(N){return function(v){var O=N,M=O.lib,y=M.Base,m=M.WordArray,S=O.x64={},b=S.Word=y.extend({init:function(d,t){this.high=d,this.low=t}}),p=S.WordArray=y.extend({init:function(d,t){d=this.words=d||[],t!=v?this.sigBytes=t:this.sigBytes=d.length*8},toX32:function(){for(var d=this.words,t=d.length,l=[],r=0;r<t;r++){var i=d[r];l.push(i.high),l.push(i.low)}return m.create(l,this.sigBytes)},clone:function(){for(var d=y.clone.call(this),t=d.words=this.words.slice(0),l=t.length,r=0;r<l;r++)t[r]=t[r].clone();return d}})}(),N})},NFKh:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("MlIO"),j("F+F2"),j("qM6L"),j("ETIr"),j("wbyO"),j("cv67"),j("3y9D"),j("lPiR"),j("GRuw"),j("1uat"),j("uGsb"),j("5hvy"),j("ELcG"),j("WYAk"),j("e7zE"),j("K3mO"),j("OLod"),j("ALsQ"),j("9OqN"),j("qu8F"),j("S6kV"),j("gb/T"),j("qBft"),j("oRuE"),j("jO9C"),j("KmYQ"),j("uGxW"),j("bQjk"),j("wZgz"),j("pA7S"),j("w7YG"),j("E4JC"),j("PVpz"))})(this,function(N){return N})},NvD2:function(F,$,j){"use strict";j.d($,"a",function(){return m});var N=j("Kwbf");function v(S,b){var p=new Set;return S.forEach(function(d){b.has(d)||p.add(d)}),p}function O(S){var b=S||{},p=b.disabled,d=b.disableCheckbox,t=b.checkable;return!!(p||d)||t===!1}function M(S,b,p,d){for(var t=new Set(S),l=new Set,r=0;r<=p;r+=1){var i=b.get(r)||new Set;i.forEach(function(a){var c=a.key,f=a.node,w=a.children,_=w===void 0?[]:w;t.has(c)&&!d(f)&&_.filter(function(h){return!d(h.node)}).forEach(function(h){t.add(h.key)})})}for(var o=new Set,s=p;s>=0;s-=1){var u=b.get(s)||new Set;u.forEach(function(a){var c=a.parent,f=a.node;if(d(f)||!a.parent||o.has(a.parent.key))return;if(d(a.parent.node)){o.add(c.key);return}var w=!0,_=!1;(c.children||[]).filter(function(h){return!d(h.node)}).forEach(function(h){var R=h.key,C=t.has(R);w&&!C&&(w=!1),!_&&(C||l.has(R))&&(_=!0)}),w&&t.add(c.key),_&&l.add(c.key),o.add(c.key)})}return{checkedKeys:Array.from(t),halfCheckedKeys:Array.from(v(l,t))}}function y(S,b,p,d,t){for(var l=new Set(S),r=new Set(b),i=0;i<=d;i+=1){var o=p.get(i)||new Set;o.forEach(function(c){var f=c.key,w=c.node,_=c.children,h=_===void 0?[]:_;!l.has(f)&&!r.has(f)&&!t(w)&&h.filter(function(R){return!t(R.node)}).forEach(function(R){l.delete(R.key)})})}r=new Set;for(var s=new Set,u=d;u>=0;u-=1){var a=p.get(u)||new Set;a.forEach(function(c){var f=c.parent,w=c.node;if(t(w)||!c.parent||s.has(c.parent.key))return;if(t(c.parent.node)){s.add(f.key);return}var _=!0,h=!1;(f.children||[]).filter(function(R){return!t(R.node)}).forEach(function(R){var C=R.key,g=l.has(C);_&&!g&&(_=!1),!h&&(g||r.has(C))&&(h=!0)}),_||l.delete(f.key),h&&r.add(f.key),s.add(f.key)})}return{checkedKeys:Array.from(l),halfCheckedKeys:Array.from(v(r,l))}}function m(S,b,p,d){var t=[],l;d?l=d:l=O;var r=new Set(S.filter(function(u){var a=!!p[u];return a||t.push(u),a})),i=new Map,o=0;Object.keys(p).forEach(function(u){var a=p[u],c=a.level,f=i.get(c);f||(f=new Set,i.set(c,f)),f.add(a),o=Math.max(o,c)}),Object(N.a)(!t.length,"Tree missing follow keys: ".concat(t.slice(0,100).map(function(u){return"'".concat(u,"'")}).join(", ")));var s;return b===!0?s=M(r,i,o,l):s=y(r,b.halfCheckedKeys,i,o,l),s}},OLod:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("K3mO"))})(this,function(N){N.lib.Cipher||function(v){var O=N,M=O.lib,y=M.Base,m=M.WordArray,S=M.BufferedBlockAlgorithm,b=O.enc,p=b.Utf8,d=b.Base64,t=O.algo,l=t.EvpKDF,r=M.Cipher=S.extend({cfg:y.extend(),createEncryptor:function(E,T){return this.create(this._ENC_XFORM_MODE,E,T)},createDecryptor:function(E,T){return this.create(this._DEC_XFORM_MODE,E,T)},init:function(E,T,k){this.cfg=this.cfg.extend(k),this._xformMode=E,this._key=T,this.reset()},reset:function(){S.reset.call(this),this._doReset()},process:function(E){return this._append(E),this._process()},finalize:function(E){E&&this._append(E);var T=this._doFinalize();return T},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function E(T){return typeof T=="string"?x:R}return function(T){return{encrypt:function(k,L,A){return E(L).encrypt(T,k,L,A)},decrypt:function(k,L,A){return E(L).decrypt(T,k,L,A)}}}}()}),i=M.StreamCipher=r.extend({_doFinalize:function(){var E=this._process(!0);return E},blockSize:1}),o=O.mode={},s=M.BlockCipherMode=y.extend({createEncryptor:function(E,T){return this.Encryptor.create(E,T)},createDecryptor:function(E,T){return this.Decryptor.create(E,T)},init:function(E,T){this._cipher=E,this._iv=T}}),u=o.CBC=function(){var E=s.extend();E.Encryptor=E.extend({processBlock:function(k,L){var A=this._cipher,G=A.blockSize;T.call(this,k,L,G),A.encryptBlock(k,L),this._prevBlock=k.slice(L,L+G)}}),E.Decryptor=E.extend({processBlock:function(k,L){var A=this._cipher,G=A.blockSize,K=k.slice(L,L+G);A.decryptBlock(k,L),T.call(this,k,L,G),this._prevBlock=K}});function T(k,L,A){var G,K=this._iv;K?(G=K,this._iv=v):G=this._prevBlock;for(var W=0;W<A;W++)k[L+W]^=G[W]}return E}(),a=O.pad={},c=a.Pkcs7={pad:function(E,T){for(var k=T*4,L=k-E.sigBytes%k,A=L<<24|L<<16|L<<8|L,G=[],K=0;K<L;K+=4)G.push(A);var W=m.create(G,L);E.concat(W)},unpad:function(E){var T=E.words[E.sigBytes-1>>>2]&255;E.sigBytes-=T}},f=M.BlockCipher=r.extend({cfg:r.cfg.extend({mode:u,padding:c}),reset:function(){var E;r.reset.call(this);var T=this.cfg,k=T.iv,L=T.mode;this._xformMode==this._ENC_XFORM_MODE?E=L.createEncryptor:(E=L.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==E?this._mode.init(this,k&&k.words):(this._mode=E.call(L,this,k&&k.words),this._mode.__creator=E)},_doProcessBlock:function(E,T){this._mode.processBlock(E,T)},_doFinalize:function(){var E,T=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(T.pad(this._data,this.blockSize),E=this._process(!0)):(E=this._process(!0),T.unpad(E)),E},blockSize:128/32}),w=M.CipherParams=y.extend({init:function(E){this.mixIn(E)},toString:function(E){return(E||this.formatter).stringify(this)}}),_=O.format={},h=_.OpenSSL={stringify:function(E){var T,k=E.ciphertext,L=E.salt;return L?T=m.create([1398893684,1701076831]).concat(L).concat(k):T=k,T.toString(d)},parse:function(E){var T,k=d.parse(E),L=k.words;return L[0]==1398893684&&L[1]==1701076831&&(T=m.create(L.slice(2,4)),L.splice(0,4),k.sigBytes-=16),w.create({ciphertext:k,salt:T})}},R=M.SerializableCipher=y.extend({cfg:y.extend({format:h}),encrypt:function(E,T,k,L){L=this.cfg.extend(L);var A=E.createEncryptor(k,L),G=A.finalize(T),K=A.cfg;return w.create({ciphertext:G,key:k,iv:K.iv,algorithm:E,mode:K.mode,padding:K.padding,blockSize:E.blockSize,formatter:L.format})},decrypt:function(E,T,k,L){L=this.cfg.extend(L),T=this._parse(T,L.format);var A=E.createDecryptor(k,L).finalize(T.ciphertext);return A},_parse:function(E,T){return typeof E=="string"?T.parse(E,this):E}}),C=O.kdf={},g=C.OpenSSL={execute:function(E,T,k,L){L||(L=m.random(64/8));var A=l.create({keySize:T+k}).compute(E,L),G=m.create(A.words.slice(T),k*4);return A.sigBytes=T*4,w.create({key:A,iv:G,salt:L})}},x=M.PasswordBasedCipher=R.extend({cfg:R.cfg.extend({kdf:g}),encrypt:function(E,T,k,L){L=this.cfg.extend(L);var A=L.kdf.execute(k,E.keySize,E.ivSize);L.iv=A.iv;var G=R.encrypt.call(this,E,T,A.key,L);return G.mixIn(A),G},decrypt:function(E,T,k,L){L=this.cfg.extend(L),T=this._parse(T,L.format);var A=L.kdf.execute(k,E.keySize,E.ivSize,T.salt);L.iv=A.iv;var G=R.decrypt.call(this,E,T,A.key,L);return G}})}()})},OZM5:function(F,$,j){"use strict";j.d($,"b",function(){return d}),j.d($,"a",function(){return t}),j.d($,"k",function(){return l}),j.d($,"h",function(){return r}),j.d($,"i",function(){return i}),j.d($,"g",function(){return o}),j.d($,"c",function(){return s}),j.d($,"d",function(){return u}),j.d($,"j",function(){return f}),j.d($,"e",function(){return w}),j.d($,"f",function(){return _});var N=j("KQm4"),v=j("U8pU"),O=j("Ff2n"),M=j("cDcd"),y=j.n(M),m=j("Kwbf"),S=j("WaYH"),b=.25,p=2;function d(h,R){var C=h.slice(),g=C.indexOf(R);return g>=0&&C.splice(g,1),C}function t(h,R){var C=h.slice();return C.indexOf(R)===-1&&C.push(R),C}function l(h){return h.split("-")}function r(h,R){return"".concat(h,"-").concat(R)}function i(h){return h&&h.type&&h.type.isTreeNode}function o(h,R){var C=[h],g=R[h];function x(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];E.forEach(function(T){var k=T.key,L=T.children;C.push(k),x(L)})}return x(g.children),C}function s(h,R){var C=h.clientY,g=R.selectHandle.getBoundingClientRect(),x=g.top,E=g.bottom,T=g.height,k=Math.max(T*b,p);return C<=x+k?-1:C>=E-k?1:0}function u(h,R){if(!h)return;var C=R.multiple;return C?h.slice():h.length?[h[0]]:h}var a=function(R){return R};function c(h,R){if(!h)return[];var C=R||{},g=C.processProps,x=g===void 0?a:g,E=Array.isArray(h)?h:[h];return E.map(function(T){var k=T.children,L=Object(O.a)(T,["children"]),A=c(k,R);return y.a.createElement(S.a,Object.assign({},x(L)),A)})}function f(h){if(!h)return null;var R;if(Array.isArray(h))R={checkedKeys:h,halfCheckedKeys:void 0};else if(Object(v.a)(h)==="object")R={checkedKeys:h.checked||void 0,halfCheckedKeys:h.halfChecked||void 0};else return Object(m.a)(!1,"`checkedKeys` is not an array or an object"),null;return R}function w(h,R){var C=new Set;function g(x){if(C.has(x))return;var E=R[x];if(!E)return;C.add(x);var T=E.parent,k=E.node;if(k.disabled)return;T&&g(T.key)}return(h||[]).forEach(function(x){g(x)}),Object(N.a)(C)}function _(h){var R={};return Object.keys(h).forEach(function(C){(C.startsWith("data-")||C.startsWith("aria-"))&&(R[C]=h[C])}),R}},Ot1p:function(F,$,j){"use strict";var N=j("2qtc"),v=j("kLXV"),O=j("rAM+"),M=j("miYZ"),y=j("tsqr"),m=j("9og8"),S=j("tJVT"),b=j("jrin"),p=j("WmNS"),d=j.n(p),t=j("cDcd"),l=j.n(t),r=j("VrN/"),i=j.n(r),o=j("bdgK"),s=j("p77/"),u=j("Bd2K"),a=j("ELLl"),c=j("19Vz"),f=j("lZu9"),w=j("+NIl"),_=j("kSUc"),h=j("9Bee"),R=function(ke){var Ye=ke.value,nt=Ye===void 0?"":Ye,lt=ke.className,at=ke.showTextOnly,ot=ke.showLines,Ct=ke.style,bt=Ct===void 0?{}:Ct,ft=Object(t.useMemo)(function(){return""},[nt]);return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{dangerouslySetInnerHTML:{__html:ft}}))},C=j("0Owb"),g=j("dejd"),x=j("C+DQ"),E=j("1vsH"),T=j("m3rI"),k=[{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 L(ke){var Ye=ke.onActionCallback,nt=ke.title,lt=ke.icon,at=ke.actionName,ot=ke.className,Ct=ot===void 0?"":ot,bt=ke.children;function ft(){Ye(at)}return l.a.createElement("a",{title:nt,className:Ct,onClick:ft},l.a.createElement("i",{className:"md-iconfont ".concat(lt)}),bt)}var A=function(ke){var Ye=ke.watch,nt=ke.showNullButton,lt=ke.onActionCallback,at=ke.fullScreen,ot=ke.insertTemp,Ct=ke.hidetoolBar,bt=ke.uuid,ft=ke.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(E.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(E.G)("_educoder_session"),"&key=").concat(bt,"&api=").concat(encodeURIComponent(T.a.PROXY_SERVER)));var jt=[].concat(k,[{title:"".concat(Ye?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ye?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return l.a.createElement("ul",{className:"markdown-toolbar-container"},!Ct&&jt.map(function(Pt,Xt){return l.a.createElement("li",{key:Xt},Pt.actionName?l.a.createElement(L,Object(C.a)({},Pt,{onActionCallback:lt})):l.a.createElement("span",{className:"v-line"}))}),nt?l.a.createElement("li",null,l.a.createElement(L,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:lt},l.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,ot&&l.a.createElement("li",null,l.a.createElement(L,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(ot),onActionCallback:lt},l.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),l.a.createElement("li",{className:"btn-full-screen"},l.a.createElement(L,{icon:"".concat(at?"icon-shrink":"icon-enlarge"),title:at?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:lt})))},G=j("M8RZ"),K=j("+L6B"),W=j("2/Rp"),z=j("y8nQ"),U=j("Vl3Y"),P=j("5NDa"),H=j("5rEg"),V={labelCol:{span:4},wrapperCol:{span:20}},q=function(ke){var Ye=ke.callback,nt=ke.onCancel;function lt(at){Ye(at)}return l.a.createElement(U.a,Object(C.a)({},V,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:lt}),l.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},l.a.createElement(H.a,null)),l.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},l.a.createElement(H.a,null)),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(W.a,{type:"ghost",onClick:nt},"\u53D6\u6D88")))},Z=j("7ahc"),ce=j("HmJG"),he=j("BjJ7"),ae=U.a.useForm,xe={width:280,marginRight:10},ge={labelCol:{span:5},wrapperCol:{span:19}},oe=function(ke){var Ye=ke.callback,nt=ke.onCancel,lt=ae(),at=Object(S.a)(lt,1),ot=at[0];function Ct(jt){Ye(jt)}function bt(jt,Pt){if(jt.status===-1){y.b.error(jt.message);return}ot.setFieldsValue({src:"/api/attachments/".concat(jt.id),type:Pt.type})}function ft(jt){var Pt=jt.target.files[0];te(Pt,bt)}return l.a.createElement(U.a,Object(C.a)({form:ot},ge,{className:"upload-image-panel",onFinish:Ct}),l.a.createElement(U.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},l.a.createElement("div",{className:"flex-container"},l.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},l.a.createElement(H.a,{style:xe})),l.a.createElement(se,{onFileChange:ft}))),l.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},l.a.createElement(H.a,{style:{width:264}})),l.a.createElement(U.a.Item,{style:{textAlign:"right"}},l.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(W.a,{type:"ghost",onClick:nt},"\u53D6\u6D88")))};function se(ke){var Ye=ke.onFileChange;return l.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",l.a.createElement("input",{type:"file",onChange:Ye}))}function te(ke,Ye){if(!ke)throw new String("\u6CA1\u6709\u6587\u4EF6");var nt=new FormData;nt.append("editormd-image-file",ke),nt.append("file_param_name","editormd-image-file"),nt.append("byxhr","true");var lt=new window.XMLHttpRequest;lt.withCredentials=!0,lt.addEventListener("load",function(at){Ye(JSON.parse(at.target.responseText),ke)},!1),lt.addEventListener("error",function(at){console.error(at)},!1),lt.open("POST","".concat(he.a,"/api/attachments.json")),lt.send(nt)}var be=j("giR+"),ee=j("fyUT"),ie=j("7Kak"),Ee=j("9yH6"),ne=Ee.a.Group,J={margin:"0 8px"},X=function(ke){var Ye=ke.callback,nt=ke.onCancel;function lt(at){Ye(at)}return l.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:lt},l.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},l.a.createElement("span",{style:J},"\u5355\u5143\u683C\u6570\uFF1A"),l.a.createElement("span",{style:J},"\u884C\u6570"),l.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},l.a.createElement(ee.a,null)),l.a.createElement("span",{style:J},"\u5217\u6570"),l.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},l.a.createElement(ee.a,null))),l.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},l.a.createElement("span",{style:J},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),l.a.createElement(U.a.Item,{name:"align"},l.a.createElement(ne,null,l.a.createElement(Ee.a,{value:"default"},l.a.createElement("i",{className:"fa fa-align-justify"})),l.a.createElement(Ee.a,{value:"left"},l.a.createElement("i",{className:"fa fa-align-left"})),l.a.createElement(Ee.a,{value:"center"},l.a.createElement("i",{className:"fa fa-align-center"})),l.a.createElement(Ee.a,{value:"right"},l.a.createElement("i",{className:"fa fa-align-right"}))))),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(W.a,{type:"ghost",onClick:nt},"\u53D6\u6D88")))},Q=j("ErOA"),me=j("7Cbv"),fe="link",Te="upload-image",ze="code-block",Je="add-table",qe="------------",Xe={default:qe,left:":".concat(qe),center:":".concat(qe,":"),right:"".concat(qe,":")},et=j("9VGf"),rt,Le;function Oe(){}var Ve=0,Ze=1e4,Ne="\u2581",Ge=`
**\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 De(ke){return/^\d+$/.test(ke)?"".concat(ke,"px"):ke}var we=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ae=we?"Cmd":"Ctrl",de=["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"],_e=(rt={},Object(b.a)(rt,Ae+"-B","bold"),Object(b.a)(rt,Ae+"-I","italic"),rt),Se=(Le={},Object(b.a)(Le,fe,"\u6DFB\u52A0\u94FE\u63A5"),Object(b.a)(Le,ze,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(b.a)(Le,Te,"\u6DFB\u52A0\u6587\u4EF6"),Object(b.a)(Le,Je,"\u6DFB\u52A0\u8868\u683C"),Le),Ie=$.a=function(ke){var Ye=ke.defaultValue,nt=Ye===void 0?"":Ye,lt=ke.onChange,at=ke.width,ot=at===void 0?"100%":at,Ct=ke.height,bt=Ct===void 0?400:Ct,ft=ke.miniToolbar,jt=ft===void 0?!1:ft,Pt=ke.isFocus,Xt=Pt===void 0?!1:Pt,Qt=ke.watch,kt=ke.insertTemp,Et=ke.mode,Vt=Et===void 0?"markdown":Et,pt=ke.id,dt=pt===void 0?"markdown-editor-id":pt,At=ke.showResizeBar,Mt=At===void 0?!1:At,rr=ke.noStorage,Fn=rr===void 0?!1:rr,yt=ke.showNullButton,St=yt===void 0?!1:yt,vt=ke.hidetoolBar,yr=vt===void 0?!1:vt,Tr=ke.fullScreen,Bt=Tr===void 0?!1:Tr,Rt=ke.onBlur,br=ke.onCMBeforeChange,$r=ke.onFullScreen,Cr=ke.className,ut=Cr===void 0?"":Cr,It=ke.disablePaste,Br=It===void 0?!1:It,Vr=ke.placeholder,An=Vr===void 0?"":Vr,fn=ke.values,zr=fn===void 0?"":fn,Dt=Object(t.useState)(null),dn=Object(S.a)(Dt,2),ct=dn[0],kr=dn[1],mr=Object(t.useState)(nt),ei=Object(S.a)(mr,2),Tn=ei[0],bn=ei[1],di=Object(t.useState)(Qt),ti=Object(S.a)(di,2),sn=ti[0],Hr=ti[1],fi=Object(t.useState)(Bt),hn=Object(S.a)(fi,2),Wr=hn[0],lr=hn[1],nn=Object(t.useState)(""),qt=Object(S.a)(nn,2),Kt=qt[0],er=qt[1],Sr=Object(t.useState)(0),jr=Object(S.a)(Sr,2),Gr=jr[0],_n=jr[1],la=Object(t.useState)(bt),Yi=Object(S.a)(la,2),$i=Yi[0],Oi=Yi[1],pn=Object(t.useState)(!1),Ki=Object(S.a)(pn,2),Zr=Ki[0],ri=Ki[1],Mn=Object(t.useRef)(Object(me.a)()),ln=Object(t.useRef)(!1),Sn=Object(t.useRef)(),hi=Object(t.useRef)(),Kn=Object(t.useRef)(),zn=Object(t.useRef)(),Li=Object(t.useRef)(),Mi=function(){var Nt=Object(m.a)(d.a.mark(function Yt(){var Ut,nr;return d.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:return Rr.next=2,Object(Q.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Mn.current}});case 2:nr=Rr.sent,nr!=null&&(Ut=nr.attachments)!==null&&Ut!==void 0&&Ut.length&&(console.log("cm:",ct,hi),nr.attachments.map(function(dr){dr.content_type.indexOf("image")>-1?ct.replaceSelection("![,](/api/attachments/".concat(dr.id,"?type=").concat(dr.content_type,")")):dr.content_type.indexOf("video")>-1?ct.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):dr.content_type.indexOf("pdf")>-1?ct.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(dr.id,"?type=").concat(dr.content_type,'&disposition=inline" target="_blank">').concat(dr.name,"</a>")):ct.replaceSelection("[".concat(dr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(dr.id,"?type=").concat(dr.content_type,")"))}));case 4:case"end":return Rr.stop()}},Yt)}));return function(){return Nt.apply(this,arguments)}}();Object(t.useEffect)(function(){bn(zr),ct==null||ct.setValue(zr)},[zr]),Object(t.useEffect)(function(){$r==null||$r(Wr)},[Wr]),Object(t.useEffect)(function(){if(hi.current){var Nt=i.a.fromTextArea(hi.current,{mode:Vt,lineNumbers:!jt,lineWrapping:!0,value:nt,autoCloseTags:!0,autoCloseBrackets:!0});Xt&&Nt.focus();function Yt(Ut,nr){if(Br){nr.preventDefault();return}var gr=nr.clipboardData;if(gr){var Rr=gr.types.toString(),dr=gr.items;if(Rr==="Files"||gr.types.indexOf("Files")>-1){if(nr.preventDefault(),Vt=="stex")return;try{var qr,Un=dr[1];((qr=dr[0])===null||qr===void 0?void 0:qr.kind)==="file"&&(Un=dr[0]);var sr=Un.getAsFile(),vi=sr.name.split(".").pop();te(sr,function(Ir){if(Ir.id){var On,Rn,li;(sr==null||((On=sr.type)===null||On===void 0)?void 0:On.indexOf("image"))>-1?Nt.replaceSelection("![,](/api/attachments/".concat(Ir.id,"?type=").concat(Ir.content_type,")")):(sr==null||((Rn=sr.type)===null||Rn===void 0)?void 0:Rn.indexOf("video"))>-1?Nt.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Ir.id,'"></video>')):(sr==null||((li=sr.type)===null||li===void 0)?void 0:li.indexOf("pdf"))>-1?Nt.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Ir.id,"?type=").concat(sr.type,'&disposition=inline" target="_blank">').concat(sr.name,"</a>")):de.includes(vi)?Nt.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Ir.id,'?type=office&disposition=inline" target="_blank">').concat(sr.name,"</a>")):Nt.replaceSelection("[".concat(sr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Ir.id,"?type=").concat(Ir.content_type,")"))}else(Ir==null?void 0:Ir.status)===401&&(document.location.href="/user/login")})}catch(Ir){y.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Nt.on("paste",Yt),Nt.on("dragleave",function(Ut,nr){Kn.current.classList.remove("mouse-hover-md")}),Nt.on("dragover",function(Ut,nr){Kn.current.classList.add("mouse-hover-md")}),Nt.on("drop",function(Ut,nr){Kn.current.classList.add("mouse-hover-md");var gr;if(gr=nr.dataTransfer.files,gr.length>0){nr.preventDefault(),nr.stopPropagation();for(var Rr=function(Un){var sr=gr[Un],vi=sr.name.split(".").pop();te(sr,function(Ir){if(Ir.id){var On,Rn,li;(sr==null||((On=sr.type)===null||On===void 0)?void 0:On.indexOf("image"))>-1?Nt.replaceSelection("![,](/api/attachments/".concat(Ir.id,"?type=").concat(Ir.content_type,")")):(sr==null||((Rn=sr.type)===null||Rn===void 0)?void 0:Rn.indexOf("video"))>-1?Nt.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Ir.id,'"></video>')):(sr==null||((li=sr.type)===null||li===void 0)?void 0:li.indexOf("pdf"))>-1?Nt.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Ir.id,"?type=").concat(sr.type,'&disposition=inline" target="_blank">').concat(sr.name,"</a>")):de.includes(vi)?Nt.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(Ir.id,'?type=office&disposition=inline" target="_blank">').concat(sr.name,"</a>")):Nt.replaceSelection("[".concat(sr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(Ir.id,"?type=").concat(Ir.content_type,")"))}else(Ir==null?void 0:Ir.status)===401&&(document.location.href="/user/login")})},dr=0;dr<gr.length;dr++)Rr(dr)}}),kr(Nt),function(){Nt.off("paste",Yt)}}},[]);var Gn=Object(t.useCallback)(function(){if(Kn.current)try{}catch(Nt){console.log(Nt,"---- to set md editor body height")}},[$i,Kn,Wr]);Object(t.useEffect)(function(){function Nt(){var Ut=new o.default(function(nr){var gr=Object(O.a)(nr),Rr;try{for(gr.s();!(Rr=gr.n()).done;){var dr=Rr.value;(dr.target.offsetHeight>0||dr.target.offsetWidth>0)&&(Gn(),ct.setSize("100%","100%"),ct.refresh())}}catch(qr){gr.e(qr)}finally{gr.f()}});return Ut.observe(hi.current.parentElement),Ut}if(ct){var Yt=Nt();return function(){Yt.unobserve(hi.current.parentElement)}}},[ct,Gn]),Object(t.useEffect)(function(){if(ct){for(var Nt=[],Yt=function(){var dr=nr[Ut];gr=Object(S.a)(dr,2);var qr=gr[0],Un=gr[1],sr=Object(b.a)({},qr,function(){Ni(Un)});Nt.push(sr),ct.addKeyMap(sr)},Ut=0,nr=Object.entries(_e);Ut<nr.length;Ut++){var gr;Yt()}return Sn.current=setInterval(function(){ln.current&&Mi()},4e3),function(){clearInterval(Sn.current);var Rr=Object(O.a)(Nt),dr;try{for(Rr.s();!(dr=Rr.n()).done;){var qr=dr.value;ct.removeKeyMap(qr)}}catch(Un){Rr.e(Un)}finally{Rr.f()}}}},[ct]),Object(t.useEffect)(function(){Bt!==Wr&&lr(Bt)},[Bt]),Object(et.a)(function(){if(!Fn&&Gr>0){var Nt=new Date().getTime(),Yt=window.sessionStorage.getItem(dt);Nt>=Gr+Ze&&(!Yt||Yt!==Tn)&&(window.sessionStorage.setItem(dt,Tn),ri(!0))}},Ze),Object(t.useEffect)(function(){Hr(Qt)},[ct,Qt]),Object(t.useEffect)(function(){ct&&(Xt&&ct.focus())},[ct,Xt]),Object(t.useEffect)(function(){if(sn&&ct){var Nt=ct.getScrollerElement();function Yt(Ut){var nr=Ut.target;if(Li.current){var gr=nr.scrollTop/nr.scrollHeight;Li.current.scrollTop=Li.current.scrollHeight*gr}}return Nt.addEventListener("scroll",Yt),function(){Nt.removeEventListener("scroll",Yt)}}},[ct,sn]),Object(t.useEffect)(function(){if(ct&&br){function Nt(Yt,Ut){br(Yt,Ut)}return ct.on("beforeChange",Nt),function(){ct.off("beforeChange",Nt)}}},[ct,br]),Object(t.useEffect)(function(){if(ct&&Rt){function Nt(){Rt(ct.getValue())}return ct.on("blur",Nt),function(){ct.off("blur",Nt)}}},[ct,Rt]),Object(t.useEffect)(function(){if(ct){function Nt(Yt){var Ut=Yt.getValue();bn(Ut),_n(new Date().getTime()),Yt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),lt&&lt(Ut)}return ct.on("change",Nt),function(){ct.off("change",Nt)}}},[ct,lt]),Object(t.useEffect)(function(){ct&&(nt==null?(ct.setValue(""),bn("")):nt!==ct.getValue()&&(ct.setValue(nt),bn(nt),ct.setCursor(ct.lineCount(),0)))},[ct,nt]);var Ni=Object(t.useCallback)(function(Nt){var Yt=ct.getCursor(),Ut=ct.getSelection(),nr=Ut.split(`
`);switch(Nt){case"bold":return ct.replaceSelection("**"+Ut+"**"),Ut===""&&ct.setCursor(Yt.line,Yt.ch+2),ct.focus();case"italic":return ct.replaceSelection("*"+Ut+"*"),Ut===""&&ct.setCursor(Yt.line,Yt.ch+1),ct.focus();case"code":return ct.replaceSelection("`"+Ut+"`"),Ut===""&&ct.setCursor(Yt.line,Yt.ch+1),ct.focus();case"inline-latex":return ct.replaceSelection("`$$"+Ut+"$$`"),Ut===""&&ct.setCursor(Yt.line,Yt.ch+3),ct.focus();case"latex":return ct.replaceSelection("```latex\n"+Ut+"\n```"),ct.setCursor(Yt.line+1,Ut.length+1),ct.focus();case"line-break":return ct.replaceSelection(`<br/>
`),ct.focus();case"list-ul":return Ut===""?ct.replaceSelection("- "+Ut):ct.replaceSelection(nr.map(function(gr){return gr===""?"":"- ".concat(gr)}).join(`
`)),ct.focus();case"list-ol":return Ut===""?ct.replaceSelection("1. "+Ut):ct.replaceSelection(nr.map(function(gr,Rr){return gr===""?"":"".concat(Rr+1,". ").concat(gr)}).join(`
`)),ct.focus();case"add-null-ch":return Ut===""&&ct.setCursor(Yt.line,Yt.ch+1),ct.replaceSelection(Ne),ct.focus();case"inster-template-1":return Ut===""&&ct.setCursor(Yt.line,Yt.ch),ct.replaceSelection(Ge),ct.focus();case"eraser":return ct.setValue(""),ct.focus();case"trigger-watch":return Hr(!sn),ct.focus();case"trigger-full-screen":return lr(!Wr),ct.focus();case fe:er(fe);return;case ze:er(ze);return;case Te:er(Te);return;case Je:er(Je);return;default:throw new Error}},[ct,sn,Wr]),pi=Object(t.useCallback)(function(Nt){er("");switch(Kt){case fe:var Yt=Nt.title,Ut=Nt.link;return ct.replaceSelection("[".concat(Yt,"](").concat(Ut,")")),ct.focus();case ze:var nr=Nt.language,gr=Nt.content;return ct.replaceSelection(["```"+nr,gr,"```"].join(`
`)),ct.focus();case Te:var Rr=Nt.src,dr=Nt.alt;return dr?ct.replaceSelection("![ ".concat(dr," ]( ").concat(Rr,' "').concat(dr,'" )')):ct.replaceSelection("![,](".concat(Rr,")")),ct.focus();case Je:for(var qr=Nt.row,Un=Nt.col,sr=Nt.align,vi=`
`,Ir=0;Ir<qr;Ir++){for(var On=[],Rn=[],li=0;li<Un;li++)Ir===1&&Rn.push(Xe[sr]),On.push(" ");Ir===1&&(vi+="| ".concat(Rn.join(" | "),` |
`)),vi+="| ".concat(On.join(Un===1?"":" | "),` |
`)}return ct.replaceSelection(vi+`
`),ct.focus();default:throw new Error}},[ct,Kt]),mi=Object(t.useMemo)(function(){switch(Kt){case fe:return l.a.createElement(q,{callback:pi,onCancel:Xn});case ze:return l.a.createElement(Z.b,{callback:pi,onCancel:Xn});case Te:return l.a.createElement(oe,{callback:pi,onCancel:Xn});case Je:return l.a.createElement(X,{callback:pi,onCancel:Xn});default:return null}},[Kt]);function Xn(){er("")}Object(t.useEffect)(function(){if(zn.current){var Nt=zn.current,Yt=!1,Ut=0;function nr(dr){Yt=!0,Ut=dr.pageY}function gr(){Yt=!1}function Rr(dr){if(Yt){var qr=dr.pageY-Ut;qr<0&&(qr=0),qr>300&&(qr=300);var Un=bt+qr+"px";Oi(Un)}}return Nt.addEventListener("mousedown",nr),document.addEventListener("mousemove",Rr),document.addEventListener("mouseup",gr),function(){Nt.removeEventListener("mousedown",nr),document.removeEventListener("mousemove",Rr),document.removeEventListener("mouseup",gr)}}},[ct,zn]),Object(t.useEffect)(function(){Oi(bt)},[bt]);var Vn=De(ot),ki=De($i),ni={width:Vn,height:ki},gi=Object(t.useMemo)(function(){if(Gr){var Nt=new Date(Gr),Yt=Nt.getHours(),Ut=Nt.getMinutes(),nr=Nt.getSeconds();return Yt=Yt<10?"0"+Yt:Yt,Ut=Ut<10?"0"+Ut:Ut,nr=nr<10?"0"+nr:nr,"".concat(Yt,":").concat(Ut,":").concat(nr)}return 0},[Gr]);function ji(){window.sessionStorage.removeItem(dt),ri(!1),_n(0)}function ii(){ri(!1),_n(0),ct.setValue(window.sessionStorage.getItem(dt))}function Pr(Nt,Yt){var Ut=ct.getValue();Ut=Ut.replace(Nt,Yt),bn(Ut),ct==null||ct.setValue(Ut)}return l.a.createElement(t.Fragment,null,l.a.createElement("div",{className:"markdown-editor-wrapper",ref:Kn},l.a.createElement("div",{className:"markdown-editor-container ".concat(ut," ").concat(sn?"on-preview":""," ").concat(jt?"mini":""," ").concat(Wr?"full-screen":""),style:ni},l.a.createElement(A,{insertTemp:kt,watch:sn,fullScreen:Wr,showNullButton:St,onActionCallback:Ni,hidetoolBar:yr,uuid:Mn.current,setOpenPhones:function(){ln.current=!0}}),l.a.createElement("div",{className:"markdown-editor-body"},l.a.createElement("div",{className:"codemirror-container"},l.a.createElement("textarea",{ref:hi,placeholder:An})),sn?l.a.createElement("div",{ref:Li,className:"preview-container"},Vt==="stex"&&l.a.createElement(R,{value:Tn}),Vt!=="stex"&&l.a.createElement(h.a,{edit:!0,value:Tn,replaces:Pr})):null))),Mt?l.a.createElement("a",{ref:zn,className:"editor-resize"}):null,l.a.createElement(G.a,null,Se[Kt]?l.a.createElement(v.a,{centered:!0,title:Se[Kt],visible:!0,onCancel:Xn,footer:null,className:"markdown-popup-form"},mi):null))}},PD8m:function(F,$){F.exports={name:"memoryStorage",read:N,write:v,each:O,remove:M,clearAll:y};var j={};function N(m){return j[m]}function v(m,S){j[m]=S}function O(m){for(var S in j)j.hasOwnProperty(S)&&m(j[S],S)}function M(m){delete j[m]}function y(m){j={}}},PVpz:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.StreamCipher,y=v.algo,m=[],S=[],b=[],p=y.RabbitLegacy=M.extend({_doReset:function(){var t=this._key.words,l=this.cfg.iv,r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,t[0]&4294901760|t[1]&65535,t[3]<<16|t[3]>>>16,t[1]&4294901760|t[2]&65535,t[0]<<16|t[0]>>>16,t[2]&4294901760|t[3]&65535,t[1]<<16|t[1]>>>16,t[3]&4294901760|t[0]&65535];this._b=0;for(var o=0;o<4;o++)d.call(this);for(var o=0;o<8;o++)i[o]^=r[o+4&7];if(l){var s=l.words,u=s[0],a=s[1],c=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,f=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,w=c>>>16|f&4294901760,_=f<<16|c&65535;i[0]^=c,i[1]^=w,i[2]^=f,i[3]^=_,i[4]^=c,i[5]^=w,i[6]^=f,i[7]^=_;for(var o=0;o<4;o++)d.call(this)}},_doProcessBlock:function(t,l){var r=this._X;d.call(this),m[0]=r[0]^r[5]>>>16^r[3]<<16,m[1]=r[2]^r[7]>>>16^r[5]<<16,m[2]=r[4]^r[1]>>>16^r[7]<<16,m[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)m[i]=(m[i]<<8|m[i]>>>24)&16711935|(m[i]<<24|m[i]>>>8)&4278255360,t[l+i]^=m[i]},blockSize:128/32,ivSize:64/32});function d(){for(var t=this._X,l=this._C,r=0;r<8;r++)S[r]=l[r];l[0]=l[0]+1295307597+this._b|0,l[1]=l[1]+3545052371+(l[0]>>>0<S[0]>>>0?1:0)|0,l[2]=l[2]+886263092+(l[1]>>>0<S[1]>>>0?1:0)|0,l[3]=l[3]+1295307597+(l[2]>>>0<S[2]>>>0?1:0)|0,l[4]=l[4]+3545052371+(l[3]>>>0<S[3]>>>0?1:0)|0,l[5]=l[5]+886263092+(l[4]>>>0<S[4]>>>0?1:0)|0,l[6]=l[6]+1295307597+(l[5]>>>0<S[5]>>>0?1:0)|0,l[7]=l[7]+3545052371+(l[6]>>>0<S[6]>>>0?1:0)|0,this._b=l[7]>>>0<S[7]>>>0?1:0;for(var r=0;r<8;r++){var i=t[r]+l[r],o=i&65535,s=i>>>16,u=((o*o>>>17)+o*s>>>15)+s*s,a=((i&4294901760)*i|0)+((i&65535)*i|0);b[r]=u^a}t[0]=b[0]+(b[7]<<16|b[7]>>>16)+(b[6]<<16|b[6]>>>16)|0,t[1]=b[1]+(b[0]<<8|b[0]>>>24)+b[7]|0,t[2]=b[2]+(b[1]<<16|b[1]>>>16)+(b[0]<<16|b[0]>>>16)|0,t[3]=b[3]+(b[2]<<8|b[2]>>>24)+b[1]|0,t[4]=b[4]+(b[3]<<16|b[3]>>>16)+(b[2]<<16|b[2]>>>16)|0,t[5]=b[5]+(b[4]<<8|b[4]>>>24)+b[3]|0,t[6]=b[6]+(b[5]<<16|b[5]>>>16)+(b[4]<<16|b[4]>>>16)|0,t[7]=b[7]+(b[6]<<8|b[6]>>>24)+b[5]|0}v.RabbitLegacy=M._createHelper(p)}(),N.RabbitLegacy})},RELg:function(F,$,j){var N=j("MFOe"),v=N.Global;F.exports={name:"oldIE-userDataStorage",write:S,read:b,each:p,remove:d,clearAll:t};var O="storejs",M=v.document,y=i(),m=(v.navigator?v.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function S(o,s){if(m)return;var u=r(o);y(function(a){a.setAttribute(u,s),a.save(O)})}function b(o){if(m)return;var s=r(o),u=null;return y(function(a){u=a.getAttribute(s)}),u}function p(o){y(function(s){for(var u=s.XMLDocument.documentElement.attributes,a=u.length-1;a>=0;a--){var c=u[a];o(s.getAttribute(c.name),c.name)}})}function d(o){var s=r(o);y(function(u){u.removeAttribute(s),u.save(O)})}function t(){y(function(o){var s=o.XMLDocument.documentElement.attributes;o.load(O);for(var u=s.length-1;u>=0;u--)o.removeAttribute(s[u].name);o.save(O)})}var l=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function r(o){return o.replace(/^\d/,"___$&").replace(l,"___")}function i(){if(!M||!M.documentElement||!M.documentElement.addBehavior)return null;var o="script",s,u,a;try{u=new ActiveXObject("htmlfile"),u.open(),u.write("<"+o+">document.w=window</"+o+'><iframe src="/favicon.ico"></iframe>'),u.close(),s=u.w.frames[0].document,a=s.createElement("div")}catch(c){a=M.createElement("div"),s=M.body}return function(c){var f=[].slice.call(arguments,0);f.unshift(a),s.appendChild(a),a.addBehavior("#default#userData"),a.load(O),c.apply(this,f),s.removeChild(a);return}}},S6kV:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.mode.OFB=function(){var v=N.lib.BlockCipherMode.extend(),O=v.Encryptor=v.extend({processBlock:function(M,y){var m=this._cipher,S=m.blockSize,b=this._iv,p=this._keystream;b&&(p=this._keystream=b.slice(0),this._iv=void 0),m.encryptBlock(p,0);for(var d=0;d<S;d++)M[y+d]^=p[d]}});return v.Decryptor=O,v}(),N.mode.OFB})},"SA+Z":function(F,$,j){var N=j("wTVA"),v=j("EbDI"),O=j("ZhPi"),M=j("wkBT");function y(m){return N(m)||v(m)||O(m)||M()}F.exports=y,F.exports.__esModule=!0,F.exports.default=F.exports},SJMd:function(F,$){/**
* @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 j,N,v,O=!1,M,y;window.PR_SHOULD_USE_CONTINUATION=!0;var m,S;(function(){var b=window,p=["break,continue,do,else,for,if,return,while"],d=[p,"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"],t=[d,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],l=[t,"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"],r=[t,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],i=[t,"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"],o="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",s=[t,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],u="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",a=[p,"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"],c=[p,"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"],f=[p,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],w=[l,i,r,s,u,a,c,f],_=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,h="str",R="kwd",C="com",g="typ",x="lit",E="pun",T="pln",k="tag",L="dec",A="src",G="atn",K="atv",W="nocode",z="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(ne){for(var J=0,X=!1,Q=!1,me=0,fe=ne.length;me<fe;++me){var Te=ne[me];if(Te.ignoreCase)Q=!0;else if(/[a-z]/i.test(Te.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){X=!0,Q=!1;break}}var ze={b:8,t:9,n:10,v:11,f:12,r:13};function Je(Le){var Oe=Le.charCodeAt(0);if(Oe!==92)return Oe;var Ve=Le.charAt(1);return Oe=ze[Ve],Oe||("0"<=Ve&&Ve<="7"?parseInt(Le.substring(1),8):Ve==="u"||Ve==="x"?parseInt(Le.substring(2),16):Le.charCodeAt(1))}function qe(Le){if(Le<32)return(Le<16?"\\x0":"\\x")+Le.toString(16);var Oe=String.fromCharCode(Le);return Oe==="\\"||Oe==="-"||Oe==="]"||Oe==="^"?"\\"+Oe:Oe}function Xe(Le){var Oe=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=[],Ze=Oe[0]==="^",Ne=["["];Ze&&Ne.push("^");for(var Ge=Ze?1:0,De=Oe.length;Ge<De;++Ge){var we=Oe[Ge];if(/\\[bdsw]/i.test(we))Ne.push(we);else{var Ae=Je(we),de;Ge+2<De&&Oe[Ge+1]==="-"?(de=Je(Oe[Ge+2]),Ge+=2):de=Ae,Ve.push([Ae,de]),de<65||Ae>122||(de<65||Ae>90||Ve.push([Math.max(65,Ae)|32,Math.min(de,90)|32]),de<97||Ae>122||Ve.push([Math.max(97,Ae)&~32,Math.min(de,122)&~32]))}}Ve.sort(function(ke,Ye){return ke[0]-Ye[0]||Ye[1]-ke[1]});for(var _e=[],Se=[],Ge=0;Ge<Ve.length;++Ge){var Ie=Ve[Ge];Ie[0]<=Se[1]+1?Se[1]=Math.max(Se[1],Ie[1]):_e.push(Se=Ie)}for(var Ge=0;Ge<_e.length;++Ge){var Ie=_e[Ge];Ne.push(qe(Ie[0])),Ie[1]>Ie[0]&&(Ie[1]+1>Ie[0]&&Ne.push("-"),Ne.push(qe(Ie[1])))}return Ne.push("]"),Ne.join("")}function et(Le){for(var Oe=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=Oe.length,Ze=[],Ne=0,Ge=0;Ne<Ve;++Ne){var De=Oe[Ne];if(De==="(")++Ge;else if(De.charAt(0)==="\\"){var we=+De.substring(1);we&&(we<=Ge?Ze[we]=-1:Oe[Ne]=qe(we))}}for(var Ne=1;Ne<Ze.length;++Ne)Ze[Ne]===-1&&(Ze[Ne]=++J);for(var Ne=0,Ge=0;Ne<Ve;++Ne){var De=Oe[Ne];if(De==="(")++Ge,Ze[Ge]||(Oe[Ne]="(?:");else if(De.charAt(0)==="\\"){var we=+De.substring(1);we&&we<=Ge&&(Oe[Ne]="\\"+Ze[we])}}for(var Ne=0;Ne<Ve;++Ne)Oe[Ne]==="^"&&Oe[Ne+1]!=="^"&&(Oe[Ne]="");if(Le.ignoreCase&&X)for(var Ne=0;Ne<Ve;++Ne){var De=Oe[Ne],Ae=De.charAt(0);De.length>=2&&Ae==="["?Oe[Ne]=Xe(De):Ae!=="\\"&&(Oe[Ne]=De.replace(/[a-zA-Z]/g,function(Se){var Ie=Se.charCodeAt(0);return"["+String.fromCharCode(Ie&~32,Ie|32)+"]"}))}return Oe.join("")}for(var rt=[],me=0,fe=ne.length;me<fe;++me){var Te=ne[me];if(Te.global||Te.multiline)throw new Error(""+Te);rt.push("(?:"+et(Te)+")")}return new RegExp(rt.join("|"),Q?"gi":"g")}function P(ne,J){var X=/(?:^|\s)nocode(?:\s|$)/,Q=[],me=0,fe=[],Te=0;function ze(Je){var qe=Je.nodeType;if(qe==1){if(X.test(Je.className))return;for(var Xe=Je.firstChild;Xe;Xe=Xe.nextSibling)ze(Xe);var et=Je.nodeName.toLowerCase();(et==="br"||et==="li")&&(Q[Te]=`
`,fe[Te<<1]=me++,fe[Te++<<1|1]=Je)}else if(qe==3||qe==4){var rt=Je.nodeValue;rt.length&&(J?rt=rt.replace(/\r\n?/g,`
`):rt=rt.replace(/[ \t\r\n]+/g," "),Q[Te]=rt,fe[Te<<1]=me,me+=rt.length,fe[Te++<<1|1]=Je)}}return ze(ne),{sourceCode:Q.join("").replace(/\n$/,""),spans:fe}}function H(ne,J,X,Q,me){if(!X)return;var fe={sourceNode:ne,pre:1,langExtension:null,numberLines:null,sourceCode:X,spans:null,basePos:J,decorations:null};Q(fe),me.push.apply(me,fe.decorations)}var V=/\S/;function q(ne){for(var J=void 0,X=ne.firstChild;X;X=X.nextSibling){var Q=X.nodeType;J=Q===1?J?ne:X:Q===3&&V.test(X.nodeValue)?ne:J}return J===ne?void 0:J}function Z(ne,J){var X={},Q;(function(){for(var Te=ne.concat(J),ze=[],Je={},qe=0,Xe=Te.length;qe<Xe;++qe){var et=Te[qe],rt=et[3];if(rt)for(var Le=rt.length;--Le>=0;)X[rt.charAt(Le)]=et;var Oe=et[1],Ve=""+Oe;Je.hasOwnProperty(Ve)||(ze.push(Oe),Je[Ve]=null)}ze.push(/[\0-\uffff]/),Q=U(ze)})();var me=J.length,fe=function(Te){for(var ze=Te.sourceCode,Je=Te.basePos,qe=Te.sourceNode,Xe=[Je,T],et=0,rt=ze.match(Q)||[],Le={},Oe=0,Ve=rt.length;Oe<Ve;++Oe){var Ze=rt[Oe],Ne=Le[Ze],Ge=void 0,De;if(typeof Ne=="string")De=!1;else{var we=X[Ze.charAt(0)];if(we)Ge=Ze.match(we[1]),Ne=we[0];else{for(var Ae=0;Ae<me;++Ae)if(we=J[Ae],Ge=Ze.match(we[1]),Ge){Ne=we[0];break}Ge||(Ne=T)}De=Ne.length>=5&&Ne.substring(0,5)==="lang-",De&&!(Ge&&typeof Ge[1]=="string")&&(De=!1,Ne=A),De||(Le[Ze]=Ne)}var de=et;if(et+=Ze.length,!De)Xe.push(Je+de,Ne);else{var _e=Ge[1],Se=Ze.indexOf(_e),Ie=Se+_e.length;Ge[2]&&(Ie=Ze.length-Ge[2].length,Se=Ie-_e.length);var ke=Ne.substring(5);H(qe,Je+de,Ze.substring(0,Se),fe,Xe),H(qe,Je+de+Se,_e,se(ke,_e),Xe),H(qe,Je+de+Ie,Ze.substring(Ie),fe,Xe)}}Te.decorations=Xe};return fe}function ce(ne){var J=[],X=[];ne.tripleQuotedStrings?J.push([h,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ne.multiLineStrings?J.push([h,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):J.push([h,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ne.verbatimStrings&&X.push([h,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Q=ne.hashComments;Q&&(ne.cStyleComments?(Q>1?J.push([C,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):J.push([C,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),X.push([h,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):J.push([C,/^#[^\r\n]*/,null,"#"])),ne.cStyleComments&&(X.push([C,/^\/\/[^\r\n]*/,null]),X.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var me=ne.regexLiterals;if(me){var fe=me>1?"":`
\r`,Te=fe?".":"[\\S\\s]",ze="/(?=[^/*"+fe+"])(?:[^/\\x5B\\x5C"+fe+"]|\\x5C"+Te+"|\\x5B(?:[^\\x5C\\x5D"+fe+"]|\\x5C"+Te+")*(?:\\x5D|$))+/";X.push(["lang-regex",RegExp("^"+z+"("+ze+")")])}var Je=ne.types;Je&&X.push([g,Je]);var qe=(""+ne.keywords).replace(/^ | $/g,"");qe.length&&X.push([R,new RegExp("^(?:"+qe.replace(/[\s,]+/g,"|")+")\\b"),null]),J.push([T,/^\s+/,null,` \r
\xA0`]);var Xe="^.[^\\s\\w.$@'\"`/\\\\]*";return ne.regexLiterals&&(Xe+="(?!s*/)"),X.push([x,/^@[a-z_$][a-z_$@0-9]*/i,null],[g,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[T,/^[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"],[T,/^\\[\s\S]?/,null],[E,new RegExp(Xe),null]),Z(J,X)}var he=ce({keywords:w,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ae(ne,J,X){for(var Q=/(?:^|\s)nocode(?:\s|$)/,me=/\r\n?|\n/,fe=ne.ownerDocument,Te=fe.createElement("li");ne.firstChild;)Te.appendChild(ne.firstChild);var ze=[Te];function Je(Oe){var Ve=Oe.nodeType;if(Ve==1&&!Q.test(Oe.className))if(Oe.nodeName==="br")qe(Oe),Oe.parentNode&&Oe.parentNode.removeChild(Oe);else for(var Ze=Oe.firstChild;Ze;Ze=Ze.nextSibling)Je(Ze);else if((Ve==3||Ve==4)&&X){var Ne=Oe.nodeValue,Ge=Ne.match(me);if(Ge){var De=Ne.substring(0,Ge.index);Oe.nodeValue=De;var we=Ne.substring(Ge.index+Ge[0].length);if(we){var Ae=Oe.parentNode;Ae.insertBefore(fe.createTextNode(we),Oe.nextSibling)}qe(Oe),De||Oe.parentNode.removeChild(Oe)}}}function qe(Oe){for(;!Oe.nextSibling;)if(Oe=Oe.parentNode,!Oe)return;function Ve(Ge,De){var we=De?Ge.cloneNode(!1):Ge,Ae=Ge.parentNode;if(Ae){var de=Ve(Ae,1),_e=Ge.nextSibling;de.appendChild(we);for(var Se=_e;Se;Se=_e)_e=Se.nextSibling,de.appendChild(Se)}return we}for(var Ze=Ve(Oe.nextSibling,0),Ne;(Ne=Ze.parentNode)&&Ne.nodeType===1;)Ze=Ne;ze.push(Ze)}for(var Xe=0;Xe<ze.length;++Xe)Je(ze[Xe]);J===(J|0)&&ze[0].setAttribute("value",J);var et=fe.createElement("ol");et.className="linenums";for(var rt=Math.max(0,J-1|0)||0,Xe=0,Le=ze.length;Xe<Le;++Xe)Te=ze[Xe],Te.className="L"+(Xe+rt)%10,Te.firstChild||Te.appendChild(fe.createTextNode("\xA0")),et.appendChild(Te);ne.appendChild(et)}function xe(ne){var J=/\bMSIE\s(\d+)/.exec(navigator.userAgent);J=J&&+J[1]<=8;var X=/\n/g,Q=ne.sourceCode,me=Q.length,fe=0,Te=ne.spans,ze=Te.length,Je=0,qe=ne.decorations,Xe=qe.length,et=0;qe[Xe]=me;var rt,Le;for(Le=rt=0;Le<Xe;)qe[Le]!==qe[Le+2]?(qe[rt++]=qe[Le++],qe[rt++]=qe[Le++]):Le+=2;for(Xe=rt,Le=rt=0;Le<Xe;){for(var Oe=qe[Le],Ve=qe[Le+1],Ze=Le+2;Ze+2<=Xe&&qe[Ze+1]===Ve;)Ze+=2;qe[rt++]=Oe,qe[rt++]=Ve,Le=Ze}Xe=qe.length=rt;var Ne=ne.sourceNode,Ge="";Ne&&(Ge=Ne.style.display,Ne.style.display="none");try{for(var De=null;Je<ze;){var we=Te[Je],Ae=Te[Je+2]||me,de=qe[et+2]||me,Ze=Math.min(Ae,de),_e=Te[Je+1],Se;if(_e.nodeType!==1&&(Se=Q.substring(fe,Ze))){J&&(Se=Se.replace(X,"\r")),_e.nodeValue=Se;var Ie=_e.ownerDocument,ke=Ie.createElement("span");ke.className=qe[et+1];var Ye=_e.parentNode;Ye.replaceChild(ke,_e),ke.appendChild(_e),fe<Ae&&(Te[Je+1]=_e=Ie.createTextNode(Q.substring(Ze,Ae)),Ye.insertBefore(_e,ke.nextSibling))}fe=Ze,fe>=Ae&&(Je+=2),fe>=de&&(et+=2)}}finally{Ne&&(Ne.style.display=Ge)}}var ge={};function oe(ne,J){for(var X=J.length;--X>=0;){var Q=J[X];ge.hasOwnProperty(Q)?b.console&&console.warn("cannot override language handler %s",Q):ge[Q]=ne}}function se(ne,J){return ne&&ge.hasOwnProperty(ne)||(ne=/^\s*</.test(J)?"default-markup":"default-code"),ge[ne]}oe(he,["default-code"]),oe(Z([],[[T,/^[^<?]+/],[L,/^<!\w[^>]*(?:>|$)/],[C,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[E,/^(?:<[%?]|[%?]>)/],["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"]),oe(Z([[T,/^[\s]+/,null,` \r
`],[K,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[k,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[G,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[E,/^[=<>\/]+/],["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"]),oe(Z([],[[K,/^[\s\S]+/]]),["uq.val"]),oe(ce({keywords:l,hashComments:!0,cStyleComments:!0,types:_}),["c","cc","cpp","cxx","cyc","m"]),oe(ce({keywords:"null,true,false"}),["json"]),oe(ce({keywords:i,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:_}),["cs"]),oe(ce({keywords:r,cStyleComments:!0}),["java"]),oe(ce({keywords:f,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),oe(ce({keywords:a,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),oe(ce({keywords:u,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),oe(ce({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),oe(ce({keywords:s,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),oe(ce({keywords:o,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),oe(Z([],[[h,/^[\s\S]+/]]),["regex"]);function te(ne){var J=ne.langExtension;try{var X=P(ne.sourceNode,ne.pre),Q=X.sourceCode;ne.sourceCode=Q,ne.spans=X.spans,ne.basePos=0,se(J,Q)(ne),xe(ne)}catch(me){b.console&&console.log(me&&me.stack||me)}}function be(ne,J,X){var Q=X||!1,me=J||null,fe=document.createElement("div");fe.innerHTML="<pre>"+ne+"</pre>",fe=fe.firstChild,Q&&ae(fe,Q,!0);var Te={langExtension:me,numberLines:Q,sourceNode:fe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return te(Te),fe.innerHTML}function ee(ne,J){var X=J||document.body,Q=X.ownerDocument||document;function me(we){return X.getElementsByTagName(we)}for(var fe=[me("pre"),me("code"),me("xmp")],Te=[],ze=0;ze<fe.length;++ze)for(var Je=0,qe=fe[ze].length;Je<qe;++Je)Te.push(fe[ze][Je]);fe=null;var Xe=Date;Xe.now||(Xe={now:function(){return+new Date}});var et=0,rt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Le=/\bprettyprint\b/,Oe=/\bprettyprinted\b/,Ve=/pre|xmp/i,Ze=/^code$/i,Ne=/^(?:pre|code|xmp)$/i,Ge={};function De(){for(var we=b.PR_SHOULD_USE_CONTINUATION?Xe.now()+250:Infinity;et<Te.length&&Xe.now()<we;et++){for(var Ae=Te[et],de=Ge,_e=Ae;_e=_e.previousSibling;){var Se=_e.nodeType,Ie=(Se===7||Se===8)&&_e.nodeValue;if(Ie?!/^\??prettify\b/.test(Ie):Se!==3||/\S/.test(_e.nodeValue))break;if(Ie){de={},Ie.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Qt,kt,Et){de[kt]=Et});break}}var ke=Ae.className;if((de!==Ge||Le.test(ke))&&!Oe.test(ke)){for(var Ye=!1,nt=Ae.parentNode;nt;nt=nt.parentNode){var lt=nt.tagName;if(Ne.test(lt)&&nt.className&&Le.test(nt.className)){Ye=!0;break}}if(!Ye){Ae.className+=" prettyprinted";var at=de.lang;if(!at){at=ke.match(rt);var ot;!at&&(ot=q(Ae))&&Ze.test(ot.tagName)&&(at=ot.className.match(rt)),at&&(at=at[1])}var Ct;if(Ve.test(Ae.tagName))Ct=1;else{var bt=Ae.currentStyle,ft=Q.defaultView,jt=bt?bt.whiteSpace:ft&&ft.getComputedStyle?ft.getComputedStyle(Ae,null).getPropertyValue("white-space"):0;Ct=jt&&jt.substring(0,3)==="pre"}var Pt=de.linenums;(Pt=Pt==="true"||+Pt)||(Pt=ke.match(/\blinenums\b(?::(\d+))?/),Pt=Pt?Pt[1]&&Pt[1].length?+Pt[1]:!0:!1),Pt&&ae(Ae,Pt,Ct);var Xt={langExtension:at,sourceNode:Ae,numberLines:Pt,pre:Ct,sourceCode:null,basePos:null,spans:null,decorations:null};te(Xt)}}}et<Te.length?b.setTimeout(De,250):typeof ne=="function"&&ne()}De()}var ie=b.PR={createSimpleLexer:Z,registerLangHandler:oe,sourceDecorator:ce,PR_ATTRIB_NAME:G,PR_ATTRIB_VALUE:K,PR_COMMENT:C,PR_DECLARATION:L,PR_KEYWORD:R,PR_LITERAL:x,PR_NOCODE:W,PR_PLAIN:T,PR_PUNCTUATION:E,PR_SOURCE:A,PR_STRING:h,PR_TAG:k,PR_TYPE:g,prettyPrintOne:O?b.prettyPrintOne=be:m=be,prettyPrint:S=O?b.prettyPrint=ee:S=ee},Ee=b.define;typeof Ee=="function"&&Ee.amd&&Ee("google-code-prettify",[],function(){return ie})})()},TXwP:function(F,$,j){var N,v;(function(){var O;(function(){"use strict";var y=[,,function(p){function d(r){this.__parent=r,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}d.prototype.clone_empty=function(){var r=new d(this.__parent);return r.set_indent(this.__indent_count,this.__alignment_count),r},d.prototype.item=function(r){return r<0?this.__items[this.__items.length+r]:this.__items[r]},d.prototype.has_match=function(r){for(var i=this.__items.length-1;i>=0;i--)if(this.__items[i].match(r))return!0;return!1},d.prototype.set_indent=function(r,i){this.is_empty()&&(this.__indent_count=r||0,this.__alignment_count=i||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},d.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},d.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},d.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var r=this.__parent.current_line;return r.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),r.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),r.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,r.__items[0]===" "&&(r.__items.splice(0,1),r.__character_count-=1),!0}return!1},d.prototype.is_empty=function(){return this.__items.length===0},d.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},d.prototype.push=function(r){this.__items.push(r);var i=r.lastIndexOf(`
`);i!==-1?this.__character_count=r.length-i:this.__character_count+=r.length},d.prototype.pop=function(){var r=null;return this.is_empty()||(r=this.__items.pop(),this.__character_count-=r.length),r},d.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},d.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},d.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},d.prototype.toString=function(){var r="";return this.is_empty()?this.__parent.indent_empty_lines&&(r=this.__parent.get_indent_string(this.__indent_count)):(r=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),r+=this.__items.join("")),r};function t(r,i){this.__cache=[""],this.__indent_size=r.indent_size,this.__indent_string=r.indent_char,r.indent_with_tabs||(this.__indent_string=new Array(r.indent_size+1).join(r.indent_char)),i=i||"",r.indent_level>0&&(i=new Array(r.indent_level+1).join(this.__indent_string)),this.__base_string=i,this.__base_string_length=i.length}t.prototype.get_indent_size=function(r,i){var o=this.__base_string_length;return i=i||0,r<0&&(o=0),o+=r*this.__indent_size,o+=i,o},t.prototype.get_indent_string=function(r,i){var o=this.__base_string;return i=i||0,r<0&&(r=0,o=""),i+=r*this.__indent_size,this.__ensure_cache(i),o+=this.__cache[i],o},t.prototype.__ensure_cache=function(r){for(;r>=this.__cache.length;)this.__add_column()},t.prototype.__add_column=function(){var r=this.__cache.length,i=0,o="";this.__indent_size&&r>=this.__indent_size&&(i=Math.floor(r/this.__indent_size),r-=i*this.__indent_size,o=new Array(i+1).join(this.__indent_string)),r&&(o+=new Array(r+1).join(" ")),this.__cache.push(o)};function l(r,i){this.__indent_cache=new t(r,i),this.raw=!1,this._end_with_newline=r.end_with_newline,this.indent_size=r.indent_size,this.wrap_line_length=r.wrap_line_length,this.indent_empty_lines=r.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new d(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}l.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},l.prototype.get_line_number=function(){return this.__lines.length},l.prototype.get_indent_string=function(r,i){return this.__indent_cache.get_indent_string(r,i)},l.prototype.get_indent_size=function(r,i){return this.__indent_cache.get_indent_size(r,i)},l.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},l.prototype.add_new_line=function(r){return this.is_empty()||!r&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},l.prototype.get_code=function(r){this.trim(!0);var i=this.current_line.pop();i&&(i[i.length-1]===`
`&&(i=i.replace(/\n+$/g,"")),this.current_line.push(i)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
`);return r!==`
`&&(o=o.replace(/[\n]/g,r)),o},l.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},l.prototype.set_indent=function(r,i){return r=r||0,i=i||0,this.next_line.set_indent(r,i),this.__lines.length>1?(this.current_line.set_indent(r,i),!0):(this.current_line.set_indent(),!1)},l.prototype.add_raw_token=function(r){for(var i=0;i<r.newlines;i++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(r.whitespace_before),this.current_line.push(r.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},l.prototype.add_token=function(r){this.__add_space_before_token(),this.current_line.push(r),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},l.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},l.prototype.remove_indent=function(r){for(var i=this.__lines.length;r<i;)this.__lines[r]._remove_indent(),r++;this.current_line._remove_wrap_indent()},l.prototype.trim=function(r){for(r=r===void 0?!1:r,this.current_line.trim();r&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},l.prototype.just_added_newline=function(){return this.current_line.is_empty()},l.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},l.prototype.ensure_empty_line_above=function(r,i){for(var o=this.__lines.length-2;o>=0;){var s=this.__lines[o];if(s.is_empty())break;if(s.item(0).indexOf(r)!==0&&s.item(-1)!==i){this.__lines.splice(o+1,0,new d(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},p.exports.Output=l},,,,function(p){function d(r,i){this.raw_options=t(r,i),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}d.prototype._get_array=function(r,i){var o=this.raw_options[r],s=i||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(s=o.concat()):typeof o=="string"&&(s=o.split(/[^a-zA-Z0-9_\/\-]+/)),s},d.prototype._get_boolean=function(r,i){var o=this.raw_options[r],s=o===void 0?!!i:!!o;return s},d.prototype._get_characters=function(r,i){var o=this.raw_options[r],s=i||"";return typeof o=="string"&&(s=o.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),s},d.prototype._get_number=function(r,i){var o=this.raw_options[r];i=parseInt(i,10),isNaN(i)&&(i=0);var s=parseInt(o,10);return isNaN(s)&&(s=i),s},d.prototype._get_selection=function(r,i,o){var s=this._get_selection_list(r,i,o);if(s.length!==1)throw new Error("Invalid Option Value: The option '"+r+`' can only be one of the following values:
`+i+`
You passed in: '`+this.raw_options[r]+"'");return s[0]},d.prototype._get_selection_list=function(r,i,o){if(!i||i.length===0)throw new Error("Selection list cannot be empty.");if(o=o||[i[0]],!this._is_valid_selection(o,i))throw new Error("Invalid Default Value!");var s=this._get_array(r,o);if(!this._is_valid_selection(s,i))throw new Error("Invalid Option Value: The option '"+r+`' can contain only the following values:
`+i+`
You passed in: '`+this.raw_options[r]+"'");return s},d.prototype._is_valid_selection=function(r,i){return r.length&&i.length&&!r.some(function(o){return i.indexOf(o)===-1})};function t(r,i){var o={};r=l(r);var s;for(s in r)s!==i&&(o[s]=r[s]);if(i&&r[i])for(s in r[i])o[s]=r[i][s];return o}function l(r){var i={},o;for(o in r){var s=o.replace(/-/g,"_");i[s]=r[o]}return i}p.exports.Options=d,p.exports.normalizeOpts=l,p.exports.mergeOpts=t},,function(p){var d=RegExp.prototype.hasOwnProperty("sticky");function t(l){this.__input=l||"",this.__input_length=this.__input.length,this.__position=0}t.prototype.restart=function(){this.__position=0},t.prototype.back=function(){this.__position>0&&(this.__position-=1)},t.prototype.hasNext=function(){return this.__position<this.__input_length},t.prototype.next=function(){var l=null;return this.hasNext()&&(l=this.__input.charAt(this.__position),this.__position+=1),l},t.prototype.peek=function(l){var r=null;return l=l||0,l+=this.__position,l>=0&&l<this.__input_length&&(r=this.__input.charAt(l)),r},t.prototype.__match=function(l,r){l.lastIndex=r;var i=l.exec(this.__input);return i&&!(d&&l.sticky)&&(i.index!==r&&(i=null)),i},t.prototype.test=function(l,r){return r=r||0,r+=this.__position,r>=0&&r<this.__input_length?!!this.__match(l,r):!1},t.prototype.testChar=function(l,r){var i=this.peek(r);return l.lastIndex=0,i!==null&&l.test(i)},t.prototype.match=function(l){var r=this.__match(l,this.__position);return r?this.__position+=r[0].length:r=null,r},t.prototype.read=function(l,r,i){var o="",s;return l&&(s=this.match(l),s&&(o+=s[0])),r&&(s||!l)&&(o+=this.readUntil(r,i)),o},t.prototype.readUntil=function(l,r){var i="",o=this.__position;l.lastIndex=this.__position;var s=l.exec(this.__input);return s?(o=s.index,r&&(o+=s[0].length)):o=this.__input_length,i=this.__input.substring(this.__position,o),this.__position=o,i},t.prototype.readUntilAfter=function(l){return this.readUntil(l,!0)},t.prototype.get_regexp=function(l,r){var i=null,o="g";return r&&d&&(o="y"),typeof l=="string"&&l!==""?i=new RegExp(l,o):l&&(i=new RegExp(l.source,o)),i},t.prototype.get_literal_regexp=function(l){return RegExp(l.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},t.prototype.peekUntilAfter=function(l){var r=this.__position,i=this.readUntilAfter(l);return this.__position=r,i},t.prototype.lookBack=function(l){var r=this.__position-1;return r>=l.length&&this.__input.substring(r-l.length,r).toLowerCase()===l},p.exports.InputScanner=t},,,,,function(p){function d(t,l){t=typeof t=="string"?t:t.source,l=typeof l=="string"?l:l.source,this.__directives_block_pattern=new RegExp(t+/ beautify( \w+[:]\w+)+ /.source+l,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(t+/\sbeautify\signore:end\s/.source+l,"g")}d.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var l={};this.__directive_pattern.lastIndex=0;for(var r=this.__directive_pattern.exec(t);r;)l[r[1]]=r[2],r=this.__directive_pattern.exec(t);return l},d.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},p.exports.Directives=d},,function(p,d,t){var l=t(16).Beautifier,r=t(17).Options;function i(o,s){var u=new l(o,s);return u.beautify()}p.exports=i,p.exports.defaultOptions=function(){return new r}},function(p,d,t){var l=t(17).Options,r=t(2).Output,i=t(8).InputScanner,o=t(13).Directives,s=new o(/\/\*/,/\*\//),u=/\r\n|[\r\n]/,a=/\r\n|[\r\n]/g,c=/\s/,f=/(?:\s|\n)+/g,w=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,_=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function h(R,C){this._source_text=R||"",this._options=new l(C),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}h.prototype.eatString=function(R){var C="";for(this._ch=this._input.next();this._ch;){if(C+=this._ch,this._ch==="\\")C+=this._input.next();else if(R.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return C},h.prototype.eatWhitespace=function(R){for(var C=c.test(this._input.peek()),g=0;c.test(this._input.peek());)this._ch=this._input.next(),R&&this._ch===`
`&&((g===0||g<this._options.max_preserve_newlines)&&(g++,this._output.add_new_line(!0)));return C},h.prototype.foundNestedPseudoClass=function(){for(var R=0,C=1,g=this._input.peek(C);g;){if(g==="{")return!0;if(g==="(")R+=1;else if(g===")"){if(R===0)return!1;R-=1}else if(g===";"||g==="}")return!1;C++,g=this._input.peek(C)}return!1},h.prototype.print_string=function(R){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(R)},h.prototype.preserveSingleSpace=function(R){R&&(this._output.space_before_token=!0)},h.prototype.indent=function(){this._indentLevel++},h.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},h.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var R=this._source_text,C=this._options.eol;C==="auto"&&(C=`
`,R&&u.test(R||"")&&(C=R.match(u)[0])),R=R.replace(a,`
`);var g=R.match(/^[\t ]*/)[0];this._output=new r(this._options,g),this._input=new i(R),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var x=0,E=!1,T=!1,k=!1,L=!1,A=!1,G=!1,K=this._ch,W=!1,z,U,P;z=this._input.read(f),U=z!=="",P=K,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),K=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var H=this._input.read(w),V=s.get_directives(H);V&&V.ignore==="start"&&(H+=s.readIgnored(this._input)),this.print_string(H),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(_)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(U),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var q=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);q.match(/[ :]$/)&&(q=this.eatString(": ").replace(/\s$/,""),this.print_string(q),this._output.space_before_token=!0),q=q.replace(/\s$/,""),q==="extend"?L=!0:q==="import"&&(A=!0),q in this.NESTED_AT_RULE?(this._nestedLevel+=1,q in this.CONDITIONAL_GROUP_RULE&&(k=!0)):!E&&x===0&&q.indexOf(":")!==-1&&(T=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(U),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")T&&(T=!1,this.outdent()),k?(k=!1,E=this._indentLevel>=this._nestedLevel):E=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&E&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(P==="("?this._output.space_before_token=!1:P!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),P==="{"&&this._output.trim(!0),A=!1,L=!1,T&&(this.outdent(),T=!1),this.print_string(this._ch),E=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var Z=0;Z<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Z++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Z])){W=!0;break}(E||k)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!L&&x===0?(this.print_string(":"),T||(T=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var ce=P==='"'||P==="'";this.preserveSingleSpace(ce||U),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")W=!1,x===0?(T&&(this.outdent(),T=!1),L=!1,A=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),x++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),x&&(x--,this.outdent()));else{var he=!1;this._input.lookBack("with")&&(he=!0),this.preserveSingleSpace(U||he),this.print_string(this._ch),T&&P==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),G=!0):(this.eatWhitespace(),x++,this.indent())}else if(this._ch===")")x&&(x--,this.outdent()),G&&this._input.peek()===";"&&this._options.selector_separator_newline&&(G=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!T||G)&&x===0&&!A&&!L?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!T&&x===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&c.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(U),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),c.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var ae=P==='"'||P==="'";this.preserveSingleSpace(ae||U),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&W&&this._output.add_new_line()}var xe=this._output.get_code(C);return xe},p.exports.Beautifier=h},function(p,d,t){var l=t(6).Options;function r(i){l.call(this,i,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var o=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||o;var s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var u=0;u<s.length;u++)s[u]!=="expand"?this.brace_style="collapse":this.brace_style=s[u]}r.prototype=new l,p.exports.Options=r}],m={};function S(p){var d=m[p];if(d!==void 0)return d.exports;var t=m[p]={exports:{}};return y[p](t,t.exports,S),t.exports}var b=S(15);O=b})();var M=O;!(N=[],v=function(){return{css_beautify:M}}.apply($,N),v!==void 0&&(F.exports=v))})()},"VrN/":function(F,$,j){(function(N,v){F.exports=v()})(this,function(){"use strict";var N=navigator.userAgent,v=navigator.platform,O=/gecko\/\d/i.test(N),M=/MSIE \d/.test(N),y=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(N),m=/Edge\/(\d+)/.exec(N),S=M||y||m,b=S&&(M?document.documentMode||6:+(m||y)[1]),p=!m&&/WebKit\//.test(N),d=p&&/Qt\/\d+\.\d+/.test(N),t=!m&&/Chrome\//.test(N),l=/Opera\//.test(N),r=/Apple Computer/.test(navigator.vendor),i=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(N),o=/PhantomJS/.test(N),s=!m&&/AppleWebKit/.test(N)&&/Mobile\/\w+/.test(N),u=/Android/.test(N),a=s||u||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(N),c=s||/Mac/.test(v),f=/\bCrOS\b/.test(N),w=/win/i.test(v),_=l&&N.match(/Version\/(\d*\.\d*)/);_&&(_=Number(_[1])),_&&_>=15&&(l=!1,p=!0);var h=c&&(d||l&&(_==null||_<12.11)),R=O||S&&b>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var g=function(e,n){var D=e.className,I=C(n).exec(D);if(I){var B=D.slice(I.index+I[0].length);e.className=D.slice(0,I.index)+(B?I[1]+B:"")}};function x(e){for(var n=e.childNodes.length;n>0;--n)e.removeChild(e.firstChild);return e}function E(e,n){return x(e).appendChild(n)}function T(e,n,D,I){var B=document.createElement(e);if(D&&(B.className=D),I&&(B.style.cssText=I),typeof n=="string")B.appendChild(document.createTextNode(n));else if(n)for(var Y=0;Y<n.length;++Y)B.appendChild(n[Y]);return B}function k(e,n,D,I){var B=T(e,n,D,I);return B.setAttribute("role","presentation"),B}var L;document.createRange?L=function(e,n,D,I){var B=document.createRange();return B.setEnd(I||e,D),B.setStart(e,n),B}:L=function(e,n,D){var I=document.body.createTextRange();try{I.moveToElementText(e.parentNode)}catch(B){return I}return I.collapse(!0),I.moveEnd("character",D),I.moveStart("character",n),I};function A(e,n){if(n.nodeType==3&&(n=n.parentNode),e.contains)return e.contains(n);do if(n.nodeType==11&&(n=n.host),n==e)return!0;while(n=n.parentNode)}function G(){var e;try{e=document.activeElement}catch(n){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function K(e,n){var D=e.className;C(n).test(D)||(e.className+=(D?" ":"")+n)}function W(e,n){for(var D=e.split(" "),I=0;I<D.length;I++)D[I]&&!C(D[I]).test(n)&&(n+=" "+D[I]);return n}var z=function(e){e.select()};s?z=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:S&&(z=function(e){try{e.select()}catch(n){}});function U(e){var n=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,n)}}function P(e,n,D){n||(n={});for(var I in e)e.hasOwnProperty(I)&&(D!==!1||!n.hasOwnProperty(I))&&(n[I]=e[I]);return n}function H(e,n,D,I,B){n==null&&(n=e.search(/[^\s\u00a0]/),n==-1&&(n=e.length));for(var Y=I||0,re=B||0;;){var le=e.indexOf(" ",Y);if(le<0||le>=n)return re+(n-Y);re+=le-Y,re+=D-re%D,Y=le+1}}var V=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};V.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},V.prototype.set=function(e,n){this.f=n;var D=+new Date+e;(!this.id||D<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=D)};function q(e,n){for(var D=0;D<e.length;++D)if(e[D]==n)return D;return-1}var Z=50,ce={toString:function(){return"CodeMirror.Pass"}},he={scroll:!1},ae={origin:"*mouse"},xe={origin:"+move"};function ge(e,n,D){for(var I=0,B=0;;){var Y=e.indexOf(" ",I);Y==-1&&(Y=e.length);var re=Y-I;if(Y==e.length||B+re>=n)return I+Math.min(re,n-B);if(B+=Y-I,B+=D-B%D,I=Y+1,B>=n)return I}}var oe=[""];function se(e){for(;oe.length<=e;)oe.push(te(oe)+" ");return oe[e]}function te(e){return e[e.length-1]}function be(e,n){for(var D=[],I=0;I<e.length;I++)D[I]=n(e[I],I);return D}function ee(e,n,D){for(var I=0,B=D(n);I<e.length&&D(e[I])<=B;)I++;e.splice(I,0,n)}function ie(){}function Ee(e,n){var D;return Object.create?D=Object.create(e):(ie.prototype=e,D=new ie),n&&P(n,D),D}var ne=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function J(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ne.test(e))}function X(e,n){return n?n.source.indexOf("\\w")>-1&&J(e)?!0:n.test(e):J(e)}function Q(e){for(var n in e)if(e.hasOwnProperty(n)&&e[n])return!1;return!0}var me=/[\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 fe(e){return e.charCodeAt(0)>=768&&me.test(e)}function Te(e,n,D){for(;(D<0?n>0:n<e.length)&&fe(e.charAt(n));)n+=D;return n}function ze(e,n,D){for(var I=n>D?-1:1;;){if(n==D)return n;var B=(n+D)/2,Y=I<0?Math.ceil(B):Math.floor(B);if(Y==n)return e(Y)?n:D;e(Y)?D=Y:n=Y+I}}function Je(e,n,D,I){if(!e)return I(n,D,"ltr",0);for(var B=!1,Y=0;Y<e.length;++Y){var re=e[Y];(re.from<D&&re.to>n||n==D&&re.to==n)&&(I(Math.max(re.from,n),Math.min(re.to,D),re.level==1?"rtl":"ltr",Y),B=!0)}B||I(n,D,"ltr")}var qe=null;function Xe(e,n,D){var I;qe=null;for(var B=0;B<e.length;++B){var Y=e[B];if(Y.from<n&&Y.to>n)return B;Y.to==n&&(Y.from!=Y.to&&D=="before"?I=B:qe=B),Y.from==n&&(Y.from!=Y.to&&D!="before"?I=B:qe=B)}return I!=null?I:qe}var et=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function D(ve){return ve<=247?e.charAt(ve):1424<=ve&&ve<=1524?"R":1536<=ve&&ve<=1785?n.charAt(ve-1536):1774<=ve&&ve<=2220?"r":8192<=ve&&ve<=8203?"w":ve==8204?"b":"L"}var I=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,B=/[stwN]/,Y=/[LRr]/,re=/[Lb1n]/,le=/[1n]/;function ue(ve,je,Ue){this.level=ve,this.from=je,this.to=Ue}return function(ve,je){var Ue=je=="ltr"?"L":"R";if(ve.length==0||je=="ltr"&&!I.test(ve))return!1;for(var tt=ve.length,Qe=[],st=0;st<tt;++st)Qe.push(D(ve.charCodeAt(st)));for(var ht=0,_t=Ue;ht<tt;++ht){var wt=Qe[ht];wt=="m"?Qe[ht]=_t:_t=wt}for(var Lt=0,Tt=Ue;Lt<tt;++Lt){var Ft=Qe[Lt];Ft=="1"&&Tt=="r"?Qe[Lt]="n":Y.test(Ft)&&(Tt=Ft,Ft=="r"&&(Qe[Lt]="R"))}for(var Zt=1,Gt=Qe[0];Zt<tt-1;++Zt){var Er=Qe[Zt];Er=="+"&&Gt=="1"&&Qe[Zt+1]=="1"?Qe[Zt]="1":Er==","&&Gt==Qe[Zt+1]&&(Gt=="1"||Gt=="n")&&(Qe[Zt]=Gt),Gt=Er}for(var cn=0;cn<tt;++cn){var oi=Qe[cn];if(oi==",")Qe[cn]="N";else if(oi=="%"){var Cn=void 0;for(Cn=cn+1;Cn<tt&&Qe[Cn]=="%";++Cn);for(var Pi=cn&&Qe[cn-1]=="!"||Cn<tt&&Qe[Cn]=="1"?"1":"N",Ri=cn;Ri<Cn;++Ri)Qe[Ri]=Pi;cn=Cn-1}}for(var Hn=0,Ii=Ue;Hn<tt;++Hn){var ci=Qe[Hn];Ii=="L"&&ci=="1"?Qe[Hn]="L":Y.test(ci)&&(Ii=ci)}for(var qn=0;qn<tt;++qn)if(B.test(Qe[qn])){var Wn=void 0;for(Wn=qn+1;Wn<tt&&B.test(Qe[Wn]);++Wn);for(var Ln=(qn?Qe[qn-1]:Ue)=="L",Di=(Wn<tt?Qe[Wn]:Ue)=="L",Za=Ln==Di?Ln?"L":"R":Ue,Oa=qn;Oa<Wn;++Oa)Qe[Oa]=Za;qn=Wn-1}for(var _i=[],sa,si=0;si<tt;)if(re.test(Qe[si])){var ps=si;for(++si;si<tt&&re.test(Qe[si]);++si);_i.push(new ue(0,ps,si))}else{var ga=si,La=_i.length,Ma=je=="rtl"?1:0;for(++si;si<tt&&Qe[si]!="L";++si);for(var Si=ga;Si<si;)if(le.test(Qe[Si])){ga<Si&&(_i.splice(La,0,new ue(1,ga,Si)),La+=Ma);var qa=Si;for(++Si;Si<si&&le.test(Qe[Si]);++Si);_i.splice(La,0,new ue(2,qa,Si)),La+=Ma,ga=Si}else++Si;ga<si&&_i.splice(La,0,new ue(1,ga,si))}return je=="ltr"&&(_i[0].level==1&&(sa=ve.match(/^\s+/))&&(_i[0].from=sa[0].length,_i.unshift(new ue(0,0,sa[0].length))),te(_i).level==1&&(sa=ve.match(/\s+$/))&&(te(_i).to-=sa[0].length,_i.push(new ue(0,tt-sa[0].length,tt)))),je=="rtl"?_i.reverse():_i}}();function rt(e,n){var D=e.order;return D==null&&(D=e.order=et(e.text,n)),D}var Le=[],Oe=function(e,n,D){if(e.addEventListener)e.addEventListener(n,D,!1);else if(e.attachEvent)e.attachEvent("on"+n,D);else{var I=e._handlers||(e._handlers={});I[n]=(I[n]||Le).concat(D)}};function Ve(e,n){return e._handlers&&e._handlers[n]||Le}function Ze(e,n,D){if(e.removeEventListener)e.removeEventListener(n,D,!1);else if(e.detachEvent)e.detachEvent("on"+n,D);else{var I=e._handlers,B=I&&I[n];if(B){var Y=q(B,D);Y>-1&&(I[n]=B.slice(0,Y).concat(B.slice(Y+1)))}}}function Ne(e,n){var D=Ve(e,n);if(!D.length)return;for(var I=Array.prototype.slice.call(arguments,2),B=0;B<D.length;++B)D[B].apply(null,I)}function Ge(e,n,D){return typeof n=="string"&&(n={type:n,preventDefault:function(){this.defaultPrevented=!0}}),Ne(e,D||n.type,e,n),Se(n)||n.codemirrorIgnore}function De(e){var n=e._handlers&&e._handlers.cursorActivity;if(!n)return;for(var D=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),I=0;I<n.length;++I)q(D,n[I])==-1&&D.push(n[I])}function we(e,n){return Ve(e,n).length>0}function Ae(e){e.prototype.on=function(n,D){Oe(this,n,D)},e.prototype.off=function(n,D){Ze(this,n,D)}}function de(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function _e(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Se(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Ie(e){de(e),_e(e)}function ke(e){return e.target||e.srcElement}function Ye(e){var n=e.which;return n==null&&(e.button&1?n=1:e.button&2?n=3:e.button&4&&(n=2)),c&&e.ctrlKey&&n==1&&(n=3),n}var nt=function(){if(S&&b<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}(),lt;function at(e){if(lt==null){var n=T("span","\u200B");E(e,T("span",[n,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(lt=n.offsetWidth<=1&&n.offsetHeight>2&&!(S&&b<8))}var D=lt?T("span","\u200B"):T("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return D.setAttribute("cm-text",""),D}var ot;function Ct(e){if(ot!=null)return ot;var n=E(e,document.createTextNode("A\u062EA")),D=L(n,0,1).getBoundingClientRect(),I=L(n,1,2).getBoundingClientRect();return x(e),!D||D.left==D.right?!1:ot=I.right-D.right<3}var bt=`
b`.split(/\n/).length!=3?function(e){for(var n=0,D=[],I=e.length;n<=I;){var B=e.indexOf(`
`,n);B==-1&&(B=e.length);var Y=e.slice(n,e.charAt(B-1)=="\r"?B-1:B),re=Y.indexOf("\r");re!=-1?(D.push(Y.slice(0,re)),n+=re+1):(D.push(Y),n=B+1)}return D}:function(e){return e.split(/\r\n?|\n/)},ft=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(n){return!1}}:function(e){var n;try{n=e.ownerDocument.selection.createRange()}catch(D){}return!n||n.parentElement()!=e?!1:n.compareEndPoints("StartToEnd",n)!=0},jt=function(){var e=T("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Pt=null;function Xt(e){if(Pt!=null)return Pt;var n=E(e,T("span","x")),D=n.getBoundingClientRect(),I=L(n,0,1).getBoundingClientRect();return Pt=Math.abs(D.left-I.left)>1}var Qt={},kt={};function Et(e,n){arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),Qt[e]=n}function Vt(e,n){kt[e]=n}function pt(e){if(typeof e=="string"&&kt.hasOwnProperty(e))e=kt[e];else if(e&&typeof e.name=="string"&&kt.hasOwnProperty(e.name)){var n=kt[e.name];typeof n=="string"&&(n={name:n}),e=Ee(n,e),e.name=n.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return pt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return pt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function dt(e,n){n=pt(n);var D=Qt[n.name];if(!D)return dt(e,"text/plain");var I=D(e,n);if(At.hasOwnProperty(n.name)){var B=At[n.name];for(var Y in B){if(!B.hasOwnProperty(Y))continue;I.hasOwnProperty(Y)&&(I["_"+Y]=I[Y]),I[Y]=B[Y]}}if(I.name=n.name,n.helperType&&(I.helperType=n.helperType),n.modeProps)for(var re in n.modeProps)I[re]=n.modeProps[re];return I}var At={};function Mt(e,n){var D=At.hasOwnProperty(e)?At[e]:At[e]={};P(n,D)}function rr(e,n){if(n===!0)return n;if(e.copyState)return e.copyState(n);var D={};for(var I in n){var B=n[I];B instanceof Array&&(B=B.concat([])),D[I]=B}return D}function Fn(e,n){for(var D;e.innerMode&&!(D=e.innerMode(n),!D||D.mode==e);)n=D.state,e=D.mode;return D||{mode:e,state:n}}function yt(e,n,D){return e.startState?e.startState(n,D):!0}var St=function(e,n,D){this.pos=this.start=0,this.string=e,this.tabSize=n||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=D};St.prototype.eol=function(){return this.pos>=this.string.length},St.prototype.sol=function(){return this.pos==this.lineStart},St.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},St.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},St.prototype.eat=function(e){var n=this.string.charAt(this.pos),D;if(typeof e=="string"?D=n==e:D=n&&(e.test?e.test(n):e(n)),D)return++this.pos,n},St.prototype.eatWhile=function(e){for(var n=this.pos;this.eat(e););return this.pos>n},St.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},St.prototype.skipToEnd=function(){this.pos=this.string.length},St.prototype.skipTo=function(e){var n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0},St.prototype.backUp=function(e){this.pos-=e},St.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=H(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?H(this.string,this.lineStart,this.tabSize):0)},St.prototype.indentation=function(){return H(this.string,null,this.tabSize)-(this.lineStart?H(this.string,this.lineStart,this.tabSize):0)},St.prototype.match=function(e,n,D){if(typeof e=="string"){var I=function(re){return D?re.toLowerCase():re},B=this.string.substr(this.pos,e.length);if(I(B)==I(e))return n!==!1&&(this.pos+=e.length),!0}else{var Y=this.string.slice(this.pos).match(e);return Y&&Y.index>0?null:(Y&&n!==!1&&(this.pos+=Y[0].length),Y)}},St.prototype.current=function(){return this.string.slice(this.start,this.pos)},St.prototype.hideFirstChars=function(e,n){this.lineStart+=e;try{return n()}finally{this.lineStart-=e}},St.prototype.lookAhead=function(e){var n=this.lineOracle;return n&&n.lookAhead(e)},St.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function vt(e,n){if(n-=e.first,n<0||n>=e.size)throw new Error("There is no line "+(n+e.first)+" in the document.");for(var D=e;!D.lines;)for(var I=0;;++I){var B=D.children[I],Y=B.chunkSize();if(n<Y){D=B;break}n-=Y}return D.lines[n]}function yr(e,n,D){var I=[],B=n.line;return e.iter(n.line,D.line+1,function(Y){var re=Y.text;B==D.line&&(re=re.slice(0,D.ch)),B==n.line&&(re=re.slice(n.ch)),I.push(re),++B}),I}function Tr(e,n,D){var I=[];return e.iter(n,D,function(B){I.push(B.text)}),I}function Bt(e,n){var D=n-e.height;if(D)for(var I=e;I;I=I.parent)I.height+=D}function Rt(e){if(e.parent==null)return null;for(var n=e.parent,D=q(n.lines,e),I=n.parent;I;n=I,I=I.parent)for(var B=0;!(I.children[B]==n);++B)D+=I.children[B].chunkSize();return D+n.first}function br(e,n){var D=e.first;e:do{for(var I=0;I<e.children.length;++I){var B=e.children[I],Y=B.height;if(n<Y){e=B;continue e}n-=Y,D+=B.chunkSize()}return D}while(!e.lines);for(var re=0;re<e.lines.length;++re){var le=e.lines[re],ue=le.height;if(n<ue)break;n-=ue}return D+re}function $r(e,n){return n>=e.first&&n<e.first+e.size}function Cr(e,n){return String(e.lineNumberFormatter(n+e.firstLineNumber))}function ut(e,n,D){if(D===void 0&&(D=null),!(this instanceof ut))return new ut(e,n,D);this.line=e,this.ch=n,this.sticky=D}function It(e,n){return e.line-n.line||e.ch-n.ch}function Br(e,n){return e.sticky==n.sticky&&It(e,n)==0}function Vr(e){return ut(e.line,e.ch)}function An(e,n){return It(e,n)<0?n:e}function fn(e,n){return It(e,n)<0?e:n}function zr(e,n){return Math.max(e.first,Math.min(n,e.first+e.size-1))}function Dt(e,n){if(n.line<e.first)return ut(e.first,0);var D=e.first+e.size-1;return n.line>D?ut(D,vt(e,D).text.length):dn(n,vt(e,n.line).text.length)}function dn(e,n){var D=e.ch;return D==null||D>n?ut(e.line,n):D<0?ut(e.line,0):e}function ct(e,n){for(var D=[],I=0;I<n.length;I++)D[I]=Dt(e,n[I]);return D}var kr=function(e,n){this.state=e,this.lookAhead=n},mr=function(e,n,D,I){this.state=n,this.doc=e,this.line=D,this.maxLookAhead=I||0,this.baseTokens=null,this.baseTokenPos=1};mr.prototype.lookAhead=function(e){var n=this.doc.getLine(this.line+e);return n!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),n},mr.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},mr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mr.fromSaved=function(e,n,D){return n instanceof kr?new mr(e,rr(e.mode,n.state),D,n.lookAhead):new mr(e,rr(e.mode,n),D)},mr.prototype.save=function(e){var n=e!==!1?rr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new kr(n,this.maxLookAhead):n};function ei(e,n,D,I){var B=[e.state.modeGen],Y={};Wr(e,n.text,e.doc.mode,D,function(ve,je){return B.push(ve,je)},Y,I);for(var re=D.state,le=function(ve){D.baseTokens=B;var je=e.state.overlays[ve],Ue=1,tt=0;D.state=!0,Wr(e,n.text,je.mode,D,function(Qe,st){for(var ht=Ue;tt<Qe;){var _t=B[Ue];_t>Qe&&B.splice(Ue,1,Qe,B[Ue+1],_t),Ue+=2,tt=Math.min(Qe,_t)}if(!st)return;if(je.opaque)B.splice(ht,Ue-ht,Qe,"overlay "+st),Ue=ht+2;else for(;ht<Ue;ht+=2){var wt=B[ht+1];B[ht+1]=(wt?wt+" ":"")+"overlay "+st}},Y),D.state=re,D.baseTokens=null,D.baseTokenPos=1},ue=0;ue<e.state.overlays.length;++ue)le(ue);return{styles:B,classes:Y.bgClass||Y.textClass?Y:null}}function Tn(e,n,D){if(!n.styles||n.styles[0]!=e.state.modeGen){var I=bn(e,Rt(n)),B=n.text.length>e.options.maxHighlightLength&&rr(e.doc.mode,I.state),Y=ei(e,n,I);B&&(I.state=B),n.stateAfter=I.save(!B),n.styles=Y.styles,Y.classes?n.styleClasses=Y.classes:n.styleClasses&&(n.styleClasses=null),D===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return n.styles}function bn(e,n,D){var I=e.doc,B=e.display;if(!I.mode.startState)return new mr(I,!0,n);var Y=lr(e,n,D),re=Y>I.first&&vt(I,Y-1).stateAfter,le=re?mr.fromSaved(I,re,Y):new mr(I,yt(I.mode),Y);return I.iter(Y,n,function(ue){di(e,ue.text,le);var ve=le.line;ue.stateAfter=ve==n-1||ve%5==0||ve>=B.viewFrom&&ve<B.viewTo?le.save():null,le.nextLine()}),D&&(I.modeFrontier=le.line),le}function di(e,n,D,I){var B=e.doc.mode,Y=new St(n,e.options.tabSize,D);for(Y.start=Y.pos=I||0,n==""&&ti(B,D.state);!Y.eol();)sn(B,Y,D.state),Y.start=Y.pos}function ti(e,n){if(e.blankLine)return e.blankLine(n);if(!e.innerMode)return;var D=Fn(e,n);if(D.mode.blankLine)return D.mode.blankLine(D.state)}function sn(e,n,D,I){for(var B=0;B<10;B++){I&&(I[0]=Fn(e,D).mode);var Y=e.token(n,D);if(n.pos>n.start)return Y}throw new Error("Mode "+e.name+" failed to advance stream.")}var Hr=function(e,n,D){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=n||null,this.state=D};function fi(e,n,D,I){var B=e.doc,Y=B.mode,re;n=Dt(B,n);var le=vt(B,n.line),ue=bn(e,n.line,D),ve=new St(le.text,e.options.tabSize,ue),je;for(I&&(je=[]);(I||ve.pos<n.ch)&&!ve.eol();)ve.start=ve.pos,re=sn(Y,ve,ue.state),I&&je.push(new Hr(ve,re,rr(B.mode,ue.state)));return I?je:new Hr(ve,re,ue.state)}function hn(e,n){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 I=D[1]?"bgClass":"textClass";n[I]==null?n[I]=D[2]:new RegExp("(?:^|\\s)"+D[2]+"(?:$|\\s)").test(n[I])||(n[I]+=" "+D[2])}return e}function Wr(e,n,D,I,B,Y,re){var le=D.flattenSpans;le==null&&(le=e.options.flattenSpans);var ue=0,ve=null,je=new St(n,e.options.tabSize,I),Ue,tt=e.options.addModeClass&&[null];for(n==""&&hn(ti(D,I.state),Y);!je.eol();){if(je.pos>e.options.maxHighlightLength?(le=!1,re&&di(e,n,I,je.pos),je.pos=n.length,Ue=null):Ue=hn(sn(D,je,I.state,tt),Y),tt){var Qe=tt[0].name;Qe&&(Ue="m-"+(Ue?Qe+" "+Ue:Qe))}if(!le||ve!=Ue){for(;ue<je.start;)ue=Math.min(je.start,ue+5e3),B(ue,ve);ve=Ue}je.start=je.pos}for(;ue<je.pos;){var st=Math.min(je.pos,ue+5e3);B(st,ve),ue=st}}function lr(e,n,D){for(var I,B,Y=e.doc,re=D?-1:n-(e.doc.mode.innerMode?1e3:100),le=n;le>re;--le){if(le<=Y.first)return Y.first;var ue=vt(Y,le-1),ve=ue.stateAfter;if(ve&&(!D||le+(ve instanceof kr?ve.lookAhead:0)<=Y.modeFrontier))return le;var je=H(ue.text,null,e.options.tabSize);(B==null||I>je)&&(B=le-1,I=je)}return B}function nn(e,n){if(e.modeFrontier=Math.min(e.modeFrontier,n),e.highlightFrontier<n-10)return;for(var D=e.first,I=n-1;I>D;I--){var B=vt(e,I).stateAfter;if(B&&(!(B instanceof kr)||I+B.lookAhead<n)){D=I+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,D)}var qt=!1,Kt=!1;function er(){qt=!0}function Sr(){Kt=!0}function jr(e,n,D){this.marker=e,this.from=n,this.to=D}function Gr(e,n){if(e)for(var D=0;D<e.length;++D){var I=e[D];if(I.marker==n)return I}}function _n(e,n){for(var D,I=0;I<e.length;++I)e[I]!=n&&(D||(D=[])).push(e[I]);return D}function la(e,n){e.markedSpans=e.markedSpans?e.markedSpans.concat([n]):[n],n.marker.attachLine(e)}function Yi(e,n,D){var I;if(e)for(var B=0;B<e.length;++B){var Y=e[B],re=Y.marker,le=Y.from==null||(re.inclusiveLeft?Y.from<=n:Y.from<n);if(le||Y.from==n&&re.type=="bookmark"&&(!D||!Y.marker.insertLeft)){var ue=Y.to==null||(re.inclusiveRight?Y.to>=n:Y.to>n);(I||(I=[])).push(new jr(re,Y.from,ue?null:Y.to))}}return I}function $i(e,n,D){var I;if(e)for(var B=0;B<e.length;++B){var Y=e[B],re=Y.marker,le=Y.to==null||(re.inclusiveRight?Y.to>=n:Y.to>n);if(le||Y.from==n&&re.type=="bookmark"&&(!D||Y.marker.insertLeft)){var ue=Y.from==null||(re.inclusiveLeft?Y.from<=n:Y.from<n);(I||(I=[])).push(new jr(re,ue?null:Y.from-n,Y.to==null?null:Y.to-n))}}return I}function Oi(e,n){if(n.full)return null;var D=$r(e,n.from.line)&&vt(e,n.from.line).markedSpans,I=$r(e,n.to.line)&&vt(e,n.to.line).markedSpans;if(!D&&!I)return null;var B=n.from.ch,Y=n.to.ch,re=It(n.from,n.to)==0,le=Yi(D,B,re),ue=$i(I,Y,re),ve=n.text.length==1,je=te(n.text).length+(ve?B:0);if(le)for(var Ue=0;Ue<le.length;++Ue){var tt=le[Ue];if(tt.to==null){var Qe=Gr(ue,tt.marker);Qe?ve&&(tt.to=Qe.to==null?null:Qe.to+je):tt.to=B}}if(ue)for(var st=0;st<ue.length;++st){var ht=ue[st];if(ht.to!=null&&(ht.to+=je),ht.from==null){var _t=Gr(le,ht.marker);_t||(ht.from=je,ve&&(le||(le=[])).push(ht))}else ht.from+=je,ve&&(le||(le=[])).push(ht)}le&&(le=pn(le)),ue&&ue!=le&&(ue=pn(ue));var wt=[le];if(!ve){var Lt=n.text.length-2,Tt;if(Lt>0&&le)for(var Ft=0;Ft<le.length;++Ft)le[Ft].to==null&&(Tt||(Tt=[])).push(new jr(le[Ft].marker,null,null));for(var Zt=0;Zt<Lt;++Zt)wt.push(Tt);wt.push(ue)}return wt}function pn(e){for(var n=0;n<e.length;++n){var D=e[n];D.from!=null&&D.from==D.to&&D.marker.clearWhenEmpty!==!1&&e.splice(n--,1)}return e.length?e:null}function Ki(e,n,D){var I=null;if(e.iter(n.line,D.line+1,function(Qe){if(Qe.markedSpans)for(var st=0;st<Qe.markedSpans.length;++st){var ht=Qe.markedSpans[st].marker;ht.readOnly&&(!I||q(I,ht)==-1)&&(I||(I=[])).push(ht)}}),!I)return null;for(var B=[{from:n,to:D}],Y=0;Y<I.length;++Y)for(var re=I[Y],le=re.find(0),ue=0;ue<B.length;++ue){var ve=B[ue];if(It(ve.to,le.from)<0||It(ve.from,le.to)>0)continue;var je=[ue,1],Ue=It(ve.from,le.from),tt=It(ve.to,le.to);(Ue<0||!re.inclusiveLeft&&!Ue)&&je.push({from:ve.from,to:le.from}),(tt>0||!re.inclusiveRight&&!tt)&&je.push({from:le.to,to:ve.to}),B.splice.apply(B,je),ue+=je.length-3}return B}function Zr(e){var n=e.markedSpans;if(!n)return;for(var D=0;D<n.length;++D)n[D].marker.detachLine(e);e.markedSpans=null}function ri(e,n){if(!n)return;for(var D=0;D<n.length;++D)n[D].marker.attachLine(e);e.markedSpans=n}function Mn(e){return e.inclusiveLeft?-1:0}function ln(e){return e.inclusiveRight?1:0}function Sn(e,n){var D=e.lines.length-n.lines.length;if(D!=0)return D;var I=e.find(),B=n.find(),Y=It(I.from,B.from)||Mn(e)-Mn(n);if(Y)return-Y;var re=It(I.to,B.to)||ln(e)-ln(n);return re||n.id-e.id}function hi(e,n){var D=Kt&&e.markedSpans,I;if(D)for(var B=void 0,Y=0;Y<D.length;++Y)B=D[Y],B.marker.collapsed&&(n?B.from:B.to)==null&&(!I||Sn(I,B.marker)<0)&&(I=B.marker);return I}function Kn(e){return hi(e,!0)}function zn(e){return hi(e,!1)}function Li(e,n){var D=Kt&&e.markedSpans,I;if(D)for(var B=0;B<D.length;++B){var Y=D[B];Y.marker.collapsed&&(Y.from==null||Y.from<n)&&(Y.to==null||Y.to>n)&&(!I||Sn(I,Y.marker)<0)&&(I=Y.marker)}return I}function Mi(e,n,D,I,B){var Y=vt(e,n),re=Kt&&Y.markedSpans;if(re)for(var le=0;le<re.length;++le){var ue=re[le];if(!ue.marker.collapsed)continue;var ve=ue.marker.find(0),je=It(ve.from,D)||Mn(ue.marker)-Mn(B),Ue=It(ve.to,I)||ln(ue.marker)-ln(B);if(je>=0&&Ue<=0||je<=0&&Ue>=0)continue;if(je<=0&&(ue.marker.inclusiveRight&&B.inclusiveLeft?It(ve.to,D)>=0:It(ve.to,D)>0)||je>=0&&(ue.marker.inclusiveRight&&B.inclusiveLeft?It(ve.from,I)<=0:It(ve.from,I)<0))return!0}}function Gn(e){for(var n;n=Kn(e);)e=n.find(-1,!0).line;return e}function Ni(e){for(var n;n=zn(e);)e=n.find(1,!0).line;return e}function pi(e){for(var n,D;n=zn(e);)e=n.find(1,!0).line,(D||(D=[])).push(e);return D}function mi(e,n){var D=vt(e,n),I=Gn(D);return D==I?n:Rt(I)}function Xn(e,n){if(n>e.lastLine())return n;var D=vt(e,n),I;if(!Vn(e,D))return n;for(;I=zn(D);)D=I.find(1,!0).line;return Rt(D)+1}function Vn(e,n){var D=Kt&&n.markedSpans;if(D)for(var I=void 0,B=0;B<D.length;++B){if(I=D[B],!I.marker.collapsed)continue;if(I.from==null)return!0;if(I.marker.widgetNode)continue;if(I.from==0&&I.marker.inclusiveLeft&&ki(e,n,I))return!0}}function ki(e,n,D){if(D.to==null){var I=D.marker.find(1,!0);return ki(e,I.line,Gr(I.line.markedSpans,D.marker))}if(D.marker.inclusiveRight&&D.to==n.text.length)return!0;for(var B=void 0,Y=0;Y<n.markedSpans.length;++Y)if(B=n.markedSpans[Y],B.marker.collapsed&&!B.marker.widgetNode&&B.from==D.to&&(B.to==null||B.to!=D.from)&&(B.marker.inclusiveLeft||D.marker.inclusiveRight)&&ki(e,n,B))return!0}function ni(e){e=Gn(e);for(var n=0,D=e.parent,I=0;I<D.lines.length;++I){var B=D.lines[I];if(B==e)break;n+=B.height}for(var Y=D.parent;Y;D=Y,Y=D.parent)for(var re=0;re<Y.children.length;++re){var le=Y.children[re];if(le==D)break;n+=le.height}return n}function gi(e){if(e.height==0)return 0;for(var n=e.text.length,D,I=e;D=Kn(I);){var B=D.find(0,!0);I=B.from.line,n+=B.from.ch-B.to.ch}for(I=e;D=zn(I);){var Y=D.find(0,!0);n-=I.text.length-Y.from.ch,I=Y.to.line,n+=I.text.length-Y.to.ch}return n}function ji(e){var n=e.display,D=e.doc;n.maxLine=vt(D,D.first),n.maxLineLength=gi(n.maxLine),n.maxLineChanged=!0,D.iter(function(I){var B=gi(I);B>n.maxLineLength&&(n.maxLineLength=B,n.maxLine=I)})}var ii=function(e,n,D){this.text=e,ri(this,n),this.height=D?D(this):1};ii.prototype.lineNo=function(){return Rt(this)},Ae(ii);function Pr(e,n,D,I){e.text=n,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Zr(e),ri(e,D);var B=I?I(e):1;B!=e.height&&Bt(e,B)}function Nt(e){e.parent=null,Zr(e)}var Yt={},Ut={};function nr(e,n){if(!e||/^\s*$/.test(e))return null;var D=n.addModeClass?Ut:Yt;return D[e]||(D[e]=e.replace(/\S+/g,"cm-$&"))}function gr(e,n){var D=k("span",null,null,p?"padding-right: .1px":null),I={pre:k("pre",[D],"CodeMirror-line"),content:D,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};n.measure={};for(var B=0;B<=(n.rest?n.rest.length:0);B++){var Y=B?n.rest[B-1]:n.line,re=void 0;I.pos=0,I.addToken=dr,Ct(e.display.measure)&&(re=rt(Y,e.doc.direction))&&(I.addToken=Un(I.addToken,re)),I.map=[];var le=n!=e.display.externalMeasured&&Rt(Y);vi(Y,I,Tn(e,Y,le)),Y.styleClasses&&(Y.styleClasses.bgClass&&(I.bgClass=W(Y.styleClasses.bgClass,I.bgClass||"")),Y.styleClasses.textClass&&(I.textClass=W(Y.styleClasses.textClass,I.textClass||""))),I.map.length==0&&I.map.push(0,0,I.content.appendChild(at(e.display.measure))),B==0?(n.measure.map=I.map,n.measure.cache={}):((n.measure.maps||(n.measure.maps=[])).push(I.map),(n.measure.caches||(n.measure.caches=[])).push({}))}if(p){var ue=I.content.lastChild;(/\bcm-tab\b/.test(ue.className)||ue.querySelector&&ue.querySelector(".cm-tab"))&&(I.content.className="cm-tab-wrap-hack")}return Ne(e,"renderLine",e,n.line,I.pre),I.pre.className&&(I.textClass=W(I.pre.className,I.textClass||"")),I}function Rr(e){var n=T("span","\u2022","cm-invalidchar");return n.title="\\u"+e.charCodeAt(0).toString(16),n.setAttribute("aria-label",n.title),n}function dr(e,n,D,I,B,Y,re){if(!n)return;var le=e.splitSpaces?qr(n,e.trailingSpace):n,ue=e.cm.state.specialChars,ve=!1,je;if(!ue.test(n))e.col+=n.length,je=document.createTextNode(le),e.map.push(e.pos,e.pos+n.length,je),S&&b<9&&(ve=!0),e.pos+=n.length;else{je=document.createDocumentFragment();for(var Ue=0;;){ue.lastIndex=Ue;var tt=ue.exec(n),Qe=tt?tt.index-Ue:n.length-Ue;if(Qe){var st=document.createTextNode(le.slice(Ue,Ue+Qe));S&&b<9?je.appendChild(T("span",[st])):je.appendChild(st),e.map.push(e.pos,e.pos+Qe,st),e.col+=Qe,e.pos+=Qe}if(!tt)break;Ue+=Qe+1;var ht=void 0;if(tt[0]==" "){var _t=e.cm.options.tabSize,wt=_t-e.col%_t;ht=je.appendChild(T("span",se(wt),"cm-tab")),ht.setAttribute("role","presentation"),ht.setAttribute("cm-text"," "),e.col+=wt}else tt[0]=="\r"||tt[0]==`
`?(ht=je.appendChild(T("span",tt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ht.setAttribute("cm-text",tt[0]),e.col+=1):(ht=e.cm.options.specialCharPlaceholder(tt[0]),ht.setAttribute("cm-text",tt[0]),S&&b<9?je.appendChild(T("span",[ht])):je.appendChild(ht),e.col+=1);e.map.push(e.pos,e.pos+1,ht),e.pos++}}if(e.trailingSpace=le.charCodeAt(n.length-1)==32,D||I||B||ve||Y||re){var Lt=D||"";I&&(Lt+=I),B&&(Lt+=B);var Tt=T("span",[je],Lt,Y);if(re)for(var Ft in re)re.hasOwnProperty(Ft)&&Ft!="style"&&Ft!="class"&&Tt.setAttribute(Ft,re[Ft]);return e.content.appendChild(Tt)}e.content.appendChild(je)}function qr(e,n){if(e.length>1&&!/ /.test(e))return e;for(var D=n,I="",B=0;B<e.length;B++){var Y=e.charAt(B);Y==" "&&D&&(B==e.length-1||e.charCodeAt(B+1)==32)&&(Y="\xA0"),I+=Y,D=Y==" "}return I}function Un(e,n){return function(D,I,B,Y,re,le,ue){B=B?B+" cm-force-border":"cm-force-border";for(var ve=D.pos,je=ve+I.length;;){for(var Ue=void 0,tt=0;tt<n.length&&!(Ue=n[tt],Ue.to>ve&&Ue.from<=ve);tt++);if(Ue.to>=je)return e(D,I,B,Y,re,le,ue);e(D,I.slice(0,Ue.to-ve),B,Y,null,le,ue),Y=null,I=I.slice(Ue.to-ve),ve=Ue.to}}}function sr(e,n,D,I){var B=!I&&D.widgetNode;B&&e.map.push(e.pos,e.pos+n,B),!I&&e.cm.display.input.needsContentAttribute&&(B||(B=e.content.appendChild(document.createElement("span"))),B.setAttribute("cm-marker",D.id)),B&&(e.cm.display.input.setUneditable(B),e.content.appendChild(B)),e.pos+=n,e.trailingSpace=!1}function vi(e,n,D){var I=e.markedSpans,B=e.text,Y=0;if(!I){for(var re=1;re<D.length;re+=2)n.addToken(n,B.slice(Y,Y=D[re]),nr(D[re+1],n.cm.options));return}for(var le=B.length,ue=0,ve=1,je="",Ue,tt,Qe=0,st,ht,_t,wt,Lt;;){if(Qe==ue){st=ht=_t=tt="",Lt=null,wt=null,Qe=Infinity;for(var Tt=[],Ft=void 0,Zt=0;Zt<I.length;++Zt){var Gt=I[Zt],Er=Gt.marker;if(Er.type=="bookmark"&&Gt.from==ue&&Er.widgetNode)Tt.push(Er);else if(Gt.from<=ue&&(Gt.to==null||Gt.to>ue||Er.collapsed&&Gt.to==ue&&Gt.from==ue)){if(Gt.to!=null&&Gt.to!=ue&&Qe>Gt.to&&(Qe=Gt.to,ht=""),Er.className&&(st+=" "+Er.className),Er.css&&(tt=(tt?tt+";":"")+Er.css),Er.startStyle&&Gt.from==ue&&(_t+=" "+Er.startStyle),Er.endStyle&&Gt.to==Qe&&(Ft||(Ft=[])).push(Er.endStyle,Gt.to),Er.title&&((Lt||(Lt={})).title=Er.title),Er.attributes)for(var cn in Er.attributes)(Lt||(Lt={}))[cn]=Er.attributes[cn];Er.collapsed&&(!wt||Sn(wt.marker,Er)<0)&&(wt=Gt)}else Gt.from>ue&&Qe>Gt.from&&(Qe=Gt.from)}if(Ft)for(var oi=0;oi<Ft.length;oi+=2)Ft[oi+1]==Qe&&(ht+=" "+Ft[oi]);if(!wt||wt.from==ue)for(var Cn=0;Cn<Tt.length;++Cn)sr(n,0,Tt[Cn]);if(wt&&(wt.from||0)==ue){if(sr(n,(wt.to==null?le+1:wt.to)-ue,wt.marker,wt.from==null),wt.to==null)return;wt.to==ue&&(wt=!1)}}if(ue>=le)break;for(var Pi=Math.min(le,Qe);;){if(je){var Ri=ue+je.length;if(!wt){var Hn=Ri>Pi?je.slice(0,Pi-ue):je;n.addToken(n,Hn,Ue?Ue+st:st,_t,ue+Hn.length==Qe?ht:"",tt,Lt)}if(Ri>=Pi){je=je.slice(Pi-ue),ue=Pi;break}ue=Ri,_t=""}je=B.slice(Y,Y=D[ve++]),Ue=nr(D[ve++],n.cm.options)}}}function Ir(e,n,D){this.line=n,this.rest=pi(n),this.size=this.rest?Rt(te(this.rest))-D+1:1,this.node=this.text=null,this.hidden=Vn(e,n)}function On(e,n,D){for(var I=[],B,Y=n;Y<D;Y=B){var re=new Ir(e.doc,vt(e.doc,Y),Y);B=Y+re.size,I.push(re)}return I}var Rn=null;function li(e){Rn?Rn.ops.push(e):e.ownsGroup=Rn={ops:[e],delayedCallbacks:[]}}function ua(e){var n=e.delayedCallbacks,D=0;do{for(;D<n.length;D++)n[D].call(null);for(var I=0;I<e.ops.length;I++){var B=e.ops[I];if(B.cursorActivityHandlers)for(;B.cursorActivityCalled<B.cursorActivityHandlers.length;)B.cursorActivityHandlers[B.cursorActivityCalled++].call(null,B.cm)}}while(D<n.length)}function Dr(e,n){var D=e.ownsGroup;if(!D)return;try{ua(D)}finally{Rn=null,n(D)}}var _r=null;function fr(e,n){var D=Ve(e,n);if(!D.length)return;var I=Array.prototype.slice.call(arguments,2),B;Rn?B=Rn.delayedCallbacks:_r?B=_r:(B=_r=[],setTimeout(ai,0));for(var Y=function(le){B.push(function(){return D[le].apply(null,I)})},re=0;re<D.length;++re)Y(re)}function ai(){var e=_r;_r=null;for(var n=0;n<e.length;++n)e[n]()}function zi(e,n,D,I){for(var B=0;B<n.changes.length;B++){var Y=n.changes[B];Y=="text"?tr(e,n):Y=="gutter"?Fr(e,n,D,I):Y=="class"?ir(e,n):Y=="widget"&&hr(e,n,I)}n.changes=null}function Gi(e){return e.node==e.text&&(e.node=T("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),S&&b<8&&(e.node.style.zIndex=2)),e.node}function $t(e,n){var D=n.bgClass?n.bgClass+" "+(n.line.bgClass||""):n.line.bgClass;if(D&&(D+=" CodeMirror-linebackground"),n.background)D?n.background.className=D:(n.background.parentNode.removeChild(n.background),n.background=null);else if(D){var I=Gi(n);n.background=I.insertBefore(T("div",null,D),I.firstChild),e.display.input.setUneditable(n.background)}}function Ot(e,n){var D=e.display.externalMeasured;return D&&D.line==n.line?(e.display.externalMeasured=null,n.measure=D.measure,D.built):gr(e,n)}function tr(e,n){var D=n.text.className,I=Ot(e,n);n.text==n.node&&(n.node=I.pre),n.text.parentNode.replaceChild(I.pre,n.text),n.text=I.pre,I.bgClass!=n.bgClass||I.textClass!=n.textClass?(n.bgClass=I.bgClass,n.textClass=I.textClass,ir(e,n)):D&&(n.text.className=D)}function ir(e,n){$t(e,n),n.line.wrapClass?Gi(n).className=n.line.wrapClass:n.node!=n.text&&(n.node.className="");var D=n.textClass?n.textClass+" "+(n.line.textClass||""):n.line.textClass;n.text.className=D||""}function Fr(e,n,D,I){if(n.gutter&&(n.node.removeChild(n.gutter),n.gutter=null),n.gutterBackground&&(n.node.removeChild(n.gutterBackground),n.gutterBackground=null),n.line.gutterClass){var B=Gi(n);n.gutterBackground=T("div",null,"CodeMirror-gutter-background "+n.line.gutterClass,"left: "+(e.options.fixedGutter?I.fixedPos:-I.gutterTotalWidth)+"px; width: "+I.gutterTotalWidth+"px"),e.display.input.setUneditable(n.gutterBackground),B.insertBefore(n.gutterBackground,n.text)}var Y=n.line.gutterMarkers;if(e.options.lineNumbers||Y){var re=Gi(n),le=n.gutter=T("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?I.fixedPos:-I.gutterTotalWidth)+"px");if(e.display.input.setUneditable(le),re.insertBefore(le,n.text),n.line.gutterClass&&(le.className+=" "+n.line.gutterClass),e.options.lineNumbers&&(!Y||!Y["CodeMirror-linenumbers"])&&(n.lineNumber=le.appendChild(T("div",Cr(e.options,D),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+I.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),Y)for(var ue=0;ue<e.display.gutterSpecs.length;++ue){var ve=e.display.gutterSpecs[ue].className,je=Y.hasOwnProperty(ve)&&Y[ve];je&&le.appendChild(T("div",[je],"CodeMirror-gutter-elt","left: "+I.gutterLeft[ve]+"px; width: "+I.gutterWidth[ve]+"px"))}}}function hr(e,n,D){n.alignable&&(n.alignable=null);for(var I=C("CodeMirror-linewidget"),B=n.node.firstChild,Y=void 0;B;B=Y)Y=B.nextSibling,I.test(B.className)&&n.node.removeChild(B);an(e,n,D)}function mn(e,n,D,I){var B=Ot(e,n);return n.text=n.node=B.pre,B.bgClass&&(n.bgClass=B.bgClass),B.textClass&&(n.textClass=B.textClass),ir(e,n),Fr(e,n,D,I),an(e,n,I),n.node}function an(e,n,D){if(Ci(e,n.line,n,D,!0),n.rest)for(var I=0;I<n.rest.length;I++)Ci(e,n.rest[I],n,D,!1)}function Ci(e,n,D,I,B){if(!n.widgets)return;for(var Y=Gi(D),re=0,le=n.widgets;re<le.length;++re){var ue=le[re],ve=T("div",[ue.node],"CodeMirror-linewidget"+(ue.className?" "+ue.className:""));ue.handleMouseEvents||ve.setAttribute("cm-ignore-events","true"),In(ue,ve,D,I),e.display.input.setUneditable(ve),B&&ue.above?Y.insertBefore(ve,D.gutter||D.text):Y.appendChild(ve),fr(ue,"redraw")}}function In(e,n,D,I){if(e.noHScroll){(D.alignable||(D.alignable=[])).push(n);var B=I.wrapperWidth;n.style.left=I.fixedPos+"px",e.coverGutter||(B-=I.gutterTotalWidth,n.style.paddingLeft=I.gutterTotalWidth+"px"),n.style.width=B+"px"}e.coverGutter&&(n.style.zIndex=5,n.style.position="relative",e.noHScroll||(n.style.marginLeft=-I.gutterTotalWidth+"px"))}function kn(e){if(e.height!=null)return e.height;var n=e.doc.cm;if(!n)return 0;if(!A(document.body,e.node)){var D="position: relative;";e.coverGutter&&(D+="margin-left: -"+n.display.gutters.offsetWidth+"px;"),e.noHScroll&&(D+="width: "+n.display.wrapper.clientWidth+"px;"),E(n.display.measure,T("div",[e.node],null,D))}return e.height=e.node.parentNode.offsetHeight}function Bn(e,n){for(var D=ke(n);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 Xi(e){return e.lineSpace.offsetTop}function Re(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Be(e){if(e.cachedPaddingH)return e.cachedPaddingH;var n=E(e.measure,T("pre","x","CodeMirror-line-like")),D=window.getComputedStyle?window.getComputedStyle(n):n.currentStyle,I={left:parseInt(D.paddingLeft),right:parseInt(D.paddingRight)};return!isNaN(I.left)&&!isNaN(I.right)&&(e.cachedPaddingH=I),I}function Ke(e){return Z-e.display.nativeBarWidth}function Me(e){return e.display.scroller.clientWidth-Ke(e)-e.display.barWidth}function pe(e){return e.display.scroller.clientHeight-Ke(e)-e.display.barHeight}function Ce(e,n,D){var I=e.options.lineWrapping,B=I&&Me(e);if(!n.measure.heights||I&&n.measure.width!=B){var Y=n.measure.heights=[];if(I){n.measure.width=B;for(var re=n.text.firstChild.getClientRects(),le=0;le<re.length-1;le++){var ue=re[le],ve=re[le+1];Math.abs(ue.bottom-ve.bottom)>2&&Y.push((ue.bottom+ve.top)/2-D.top)}}Y.push(D.bottom-D.top)}}function ye(e,n,D){if(e.line==n)return{map:e.measure.map,cache:e.measure.cache};for(var I=0;I<e.rest.length;I++)if(e.rest[I]==n)return{map:e.measure.maps[I],cache:e.measure.caches[I]};for(var B=0;B<e.rest.length;B++)if(Rt(e.rest[B])>D)return{map:e.measure.maps[B],cache:e.measure.caches[B],before:!0}}function Pe(e,n){n=Gn(n);var D=Rt(n),I=e.display.externalMeasured=new Ir(e.doc,n,D);I.lineN=D;var B=I.built=gr(e,I);return I.text=B.pre,E(e.display.lineMeasure,B.pre),I}function Fe(e,n,D,I){return $e(e,He(e,n),D,I)}function We(e,n){if(n>=e.display.viewFrom&&n<e.display.viewTo)return e.display.view[un(e,n)];var D=e.display.externalMeasured;if(D&&n>=D.lineN&&n<D.lineN+D.size)return D}function He(e,n){var D=Rt(n),I=We(e,D);I&&!I.text?I=null:I&&I.changes&&(zi(e,I,D,En(e)),e.curOp.forceUpdate=!0),I||(I=Pe(e,n));var B=ye(I,n,D);return{line:n,view:I,rect:null,map:B.map,cache:B.cache,before:B.before,hasHeights:!1}}function $e(e,n,D,I,B){n.before&&(D=-1);var Y=D+(I||""),re;return n.cache.hasOwnProperty(Y)?re=n.cache[Y]:(n.rect||(n.rect=n.view.text.getBoundingClientRect()),n.hasHeights||(Ce(e,n.view,n.rect),n.hasHeights=!0),re=xt(e,n,D,I),re.bogus||(n.cache[Y]=re)),{left:re.left,right:re.right,top:B?re.rtop:re.top,bottom:B?re.rbottom:re.bottom}}var it={left:0,right:0,top:0,bottom:0};function gt(e,n,D){for(var I,B,Y,re,le,ue,ve=0;ve<e.length;ve+=3)if(le=e[ve],ue=e[ve+1],n<le?(B=0,Y=1,re="left"):n<ue?(B=n-le,Y=B+1):(ve==e.length-3||n==ue&&e[ve+3]>n)&&(Y=ue-le,B=Y-1,n>=ue&&(re="right")),B!=null){if(I=e[ve+2],le==ue&&D==(I.insertLeft?"left":"right")&&(re=D),D=="left"&&B==0)for(;ve&&e[ve-2]==e[ve-3]&&e[ve-1].insertLeft;)I=e[(ve-=3)+2],re="left";if(D=="right"&&B==ue-le)for(;ve<e.length-3&&e[ve+3]==e[ve+4]&&!e[ve+5].insertLeft;)I=e[(ve+=3)+2],re="right";break}return{node:I,start:B,end:Y,collapse:re,coverStart:le,coverEnd:ue}}function mt(e,n){var D=it;if(n=="left")for(var I=0;I<e.length&&!((D=e[I]).left!=D.right);I++);else for(var B=e.length-1;B>=0&&!((D=e[B]).left!=D.right);B--);return D}function xt(e,n,D,I){var B=gt(n.map,D,I),Y=B.node,re=B.start,le=B.end,ue=B.collapse,ve;if(Y.nodeType==3){for(var je=0;je<4;je++){for(;re&&fe(n.line.text.charAt(B.coverStart+re));)--re;for(;B.coverStart+le<B.coverEnd&&fe(n.line.text.charAt(B.coverStart+le));)++le;if(S&&b<9&&re==0&&le==B.coverEnd-B.coverStart?ve=Y.parentNode.getBoundingClientRect():ve=mt(L(Y,re,le).getClientRects(),I),ve.left||ve.right||re==0)break;le=re,re=re-1,ue="right"}S&&b<11&&(ve=Wt(e.display.measure,ve))}else{re>0&&(ue=I="right");var Ue;e.options.lineWrapping&&(Ue=Y.getClientRects()).length>1?ve=Ue[I=="right"?Ue.length-1:0]:ve=Y.getBoundingClientRect()}if(S&&b<9&&!re&&(!ve||!ve.left&&!ve.right)){var tt=Y.parentNode.getClientRects()[0];tt?ve={left:tt.left,right:tt.left+Yn(e.display),top:tt.top,bottom:tt.bottom}:ve=it}for(var Qe=ve.top-n.rect.top,st=ve.bottom-n.rect.top,ht=(Qe+st)/2,_t=n.view.measure.heights,wt=0;wt<_t.length-1&&!(ht<_t[wt]);wt++);var Lt=wt?_t[wt-1]:0,Tt=_t[wt],Ft={left:(ue=="right"?ve.right:ve.left)-n.rect.left,right:(ue=="left"?ve.left:ve.right)-n.rect.left,top:Lt,bottom:Tt};return!ve.left&&!ve.right&&(Ft.bogus=!0),e.options.singleCursorHeightPerLine||(Ft.rtop=Qe,Ft.rbottom=st),Ft}function Wt(e,n){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Xt(e))return n;var D=screen.logicalXDPI/screen.deviceXDPI,I=screen.logicalYDPI/screen.deviceYDPI;return{left:n.left*D,right:n.right*D,top:n.top*I,bottom:n.bottom*I}}function ar(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var n=0;n<e.rest.length;n++)e.measure.caches[n]={}}function or(e){e.display.externalMeasure=null,x(e.display.lineMeasure);for(var n=0;n<e.display.view.length;n++)ar(e.display.view[n])}function ur(e){or(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function vr(){return t&&u?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function pr(){return t&&u?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function cr(e){var n=0;if(e.widgets)for(var D=0;D<e.widgets.length;++D)e.widgets[D].above&&(n+=kn(e.widgets[D]));return n}function Lr(e,n,D,I,B){if(!B){var Y=cr(n);D.top+=Y,D.bottom+=Y}if(I=="line")return D;I||(I="local");var re=ni(n);if(I=="local"?re+=Xi(e.display):re-=e.display.viewOffset,I=="page"||I=="window"){var le=e.display.lineSpace.getBoundingClientRect();re+=le.top+(I=="window"?0:pr());var ue=le.left+(I=="window"?0:vr());D.left+=ue,D.right+=ue}return D.top+=re,D.bottom+=re,D}function xr(e,n,D){if(D=="div")return n;var I=n.left,B=n.top;if(D=="page")I-=vr(),B-=pr();else if(D=="local"||!D){var Y=e.display.sizer.getBoundingClientRect();I+=Y.left,B+=Y.top}var re=e.display.lineSpace.getBoundingClientRect();return{left:I-re.left,top:B-re.top}}function gn(e,n,D,I,B){return I||(I=vt(e.doc,n.line)),Lr(e,I,Fe(e,I,n.ch,B),D)}function wr(e,n,D,I,B,Y){I=I||vt(e.doc,n.line),B||(B=He(e,I));function re(st,ht){var _t=$e(e,B,st,ht?"right":"left",Y);return ht?_t.left=_t.right:_t.right=_t.left,Lr(e,I,_t,D)}var le=rt(I,e.doc.direction),ue=n.ch,ve=n.sticky;if(ue>=I.text.length?(ue=I.text.length,ve="before"):ue<=0&&(ue=0,ve="after"),!le)return re(ve=="before"?ue-1:ue,ve=="before");function je(st,ht,_t){var wt=le[ht],Lt=wt.level==1;return re(_t?st-1:st,Lt!=_t)}var Ue=Xe(le,ue,ve),tt=qe,Qe=je(ue,Ue,ve=="before");return tt!=null&&(Qe.other=je(ue,tt,ve!="before")),Qe}function Jt(e,n){var D=0;n=Dt(e.doc,n),e.options.lineWrapping||(D=Yn(e.display)*n.ch);var I=vt(e.doc,n.line),B=ni(I)+Xi(e.display);return{left:D,right:D,top:B,bottom:B+I.height}}function zt(e,n,D,I,B){var Y=ut(e,n,D);return Y.xRel=B,I&&(Y.outside=I),Y}function Or(e,n,D){var I=e.doc;if(D+=e.display.viewOffset,D<0)return zt(I.first,0,null,-1,-1);var B=br(I,D),Y=I.first+I.size-1;if(B>Y)return zt(I.first+I.size-1,vt(I,Y).text.length,null,1,1);n<0&&(n=0);for(var re=vt(I,B);;){var le=vn(e,re,B,n,D),ue=Li(re,le.ch+(le.xRel>0||le.outside>0?1:0));if(!ue)return le;var ve=ue.find(1);if(ve.line==B)return ve;re=vt(I,B=ve.line)}}function Mr(e,n,D,I){I-=cr(n);var B=n.text.length,Y=ze(function(re){return $e(e,D,re-1).bottom<=I},B,0);return B=ze(function(re){return $e(e,D,re).top>I},Y,B),{begin:Y,end:B}}function Ht(e,n,D,I){D||(D=He(e,n));var B=Lr(e,n,$e(e,D,I),"line").top;return Mr(e,n,D,B)}function Nr(e,n,D,I){return e.bottom<=D?!1:e.top>D?!0:(I?e.left:e.right)>n}function vn(e,n,D,I,B){B-=ni(n);var Y=He(e,n),re=cr(n),le=0,ue=n.text.length,ve=!0,je=rt(n,e.doc.direction);if(je){var Ue=(e.options.lineWrapping?en:Ur)(e,n,D,Y,je,I,B);ve=Ue.level!=1,le=ve?Ue.from:Ue.to-1,ue=ve?Ue.to:Ue.from-1}var tt=null,Qe=null,st=ze(function(Zt){var Gt=$e(e,Y,Zt);return Gt.top+=re,Gt.bottom+=re,Nr(Gt,I,B,!1)?(Gt.top<=B&&Gt.left<=I&&(tt=Zt,Qe=Gt),!0):!1},le,ue),ht,_t,wt=!1;if(Qe){var Lt=I-Qe.left<Qe.right-I,Tt=Lt==ve;st=tt+(Tt?0:1),_t=Tt?"after":"before",ht=Lt?Qe.left:Qe.right}else{!ve&&(st==ue||st==le)&&st++,_t=st==0?"after":st==n.text.length?"before":$e(e,Y,st-(ve?1:0)).bottom+re<=B==ve?"after":"before";var Ft=wr(e,ut(D,st,_t),"line",n,Y);ht=Ft.left,wt=B<Ft.top?-1:B>=Ft.bottom?1:0}return st=Te(n.text,st,1),zt(D,st,_t,wt,I-ht)}function Ur(e,n,D,I,B,Y,re){var le=ze(function(Ue){var tt=B[Ue],Qe=tt.level!=1;return Nr(wr(e,ut(D,Qe?tt.to:tt.from,Qe?"before":"after"),"line",n,I),Y,re,!0)},0,B.length-1),ue=B[le];if(le>0){var ve=ue.level!=1,je=wr(e,ut(D,ve?ue.from:ue.to,ve?"after":"before"),"line",n,I);Nr(je,Y,re,!0)&&je.top>re&&(ue=B[le-1])}return ue}function en(e,n,D,I,B,Y,re){var le=Mr(e,n,I,re),ue=le.begin,ve=le.end;/\s/.test(n.text.charAt(ve-1))&&ve--;for(var je=null,Ue=null,tt=0;tt<B.length;tt++){var Qe=B[tt];if(Qe.from>=ve||Qe.to<=ue)continue;var st=Qe.level!=1,ht=$e(e,I,st?Math.min(ve,Qe.to)-1:Math.max(ue,Qe.from)).right,_t=ht<Y?Y-ht+1e9:ht-Y;(!je||Ue>_t)&&(je=Qe,Ue=_t)}return je||(je=B[B.length-1]),je.from<ue&&(je={from:ue,to:je.to,level:je.level}),je.to>ve&&(je={from:je.from,to:ve,level:je.level}),je}var Jr;function Dn(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Jr==null){Jr=T("pre",null,"CodeMirror-line-like");for(var n=0;n<49;++n)Jr.appendChild(document.createTextNode("x")),Jr.appendChild(T("br"));Jr.appendChild(document.createTextNode("x"))}E(e.measure,Jr);var D=Jr.offsetHeight/50;return D>3&&(e.cachedTextHeight=D),x(e.measure),D||1}function Yn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var n=T("span","xxxxxxxxxx"),D=T("pre",[n],"CodeMirror-line-like");E(e.measure,D);var I=n.getBoundingClientRect(),B=(I.right-I.left)/10;return B>2&&(e.cachedCharWidth=B),B||10}function En(e){for(var n=e.display,D={},I={},B=n.gutters.clientLeft,Y=n.gutters.firstChild,re=0;Y;Y=Y.nextSibling,++re){var le=e.display.gutterSpecs[re].className;D[le]=Y.offsetLeft+Y.clientLeft+B,I[le]=Y.clientWidth}return{fixedPos:yi(n),gutterTotalWidth:n.gutters.offsetWidth,gutterLeft:D,gutterWidth:I,wrapperWidth:n.wrapper.clientWidth}}function yi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Fi(e){var n=Dn(e.display),D=e.options.lineWrapping,I=D&&Math.max(5,e.display.scroller.clientWidth/Yn(e.display)-3);return function(B){if(Vn(e.doc,B))return 0;var Y=0;if(B.widgets)for(var re=0;re<B.widgets.length;re++)B.widgets[re].height&&(Y+=B.widgets[re].height);return D?Y+(Math.ceil(B.text.length/I)||1)*n:Y+n}}function Ei(e){var n=e.doc,D=Fi(e);n.iter(function(I){var B=D(I);B!=I.height&&Bt(I,B)})}function $n(e,n,D,I){var B=e.display;if(!D&&ke(n).getAttribute("cm-not-content")=="true")return null;var Y,re,le=B.lineSpace.getBoundingClientRect();try{Y=n.clientX-le.left,re=n.clientY-le.top}catch(Ue){return null}var ue=Or(e,Y,re),ve;if(I&&ue.xRel>0&&(ve=vt(e.doc,ue.line).text).length==ue.ch){var je=H(ve,ve.length,e.options.tabSize)-ve.length;ue=ut(ue.line,Math.max(0,Math.round((Y-Be(e.display).left)/Yn(e.display))-je))}return ue}function un(e,n){if(n>=e.display.viewTo)return null;if(n-=e.display.viewFrom,n<0)return null;for(var D=e.display.view,I=0;I<D.length;I++)if(n-=D[I].size,n<0)return I}function tn(e,n,D,I){n==null&&(n=e.doc.first),D==null&&(D=e.doc.first+e.doc.size),I||(I=0);var B=e.display;if(I&&D<B.viewTo&&(B.updateLineNumbers==null||B.updateLineNumbers>n)&&(B.updateLineNumbers=n),e.curOp.viewChanged=!0,n>=B.viewTo)Kt&&mi(e.doc,n)<B.viewTo&&yn(e);else if(D<=B.viewFrom)Kt&&Xn(e.doc,D+I)>B.viewFrom?yn(e):(B.viewFrom+=I,B.viewTo+=I);else if(n<=B.viewFrom&&D>=B.viewTo)yn(e);else if(n<=B.viewFrom){var Y=Ui(e,D,D+I,1);Y?(B.view=B.view.slice(Y.index),B.viewFrom=Y.lineN,B.viewTo+=I):yn(e)}else if(D>=B.viewTo){var re=Ui(e,n,n,-1);re?(B.view=B.view.slice(0,re.index),B.viewTo=re.lineN):yn(e)}else{var le=Ui(e,n,n,-1),ue=Ui(e,D,D+I,1);le&&ue?(B.view=B.view.slice(0,le.index).concat(On(e,le.lineN,ue.lineN)).concat(B.view.slice(ue.index)),B.viewTo+=I):yn(e)}var ve=B.externalMeasured;ve&&(D<ve.lineN?ve.lineN+=I:n<ve.lineN+ve.size&&(B.externalMeasured=null))}function xn(e,n,D){e.curOp.viewChanged=!0;var I=e.display,B=e.display.externalMeasured;if(B&&n>=B.lineN&&n<B.lineN+B.size&&(I.externalMeasured=null),n<I.viewFrom||n>=I.viewTo)return;var Y=I.view[un(e,n)];if(Y.node==null)return;var re=Y.changes||(Y.changes=[]);q(re,D)==-1&&re.push(D)}function yn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ui(e,n,D,I){var B=un(e,n),Y,re=e.display.view;if(!Kt||D==e.doc.first+e.doc.size)return{index:B,lineN:D};for(var le=e.display.viewFrom,ue=0;ue<B;ue++)le+=re[ue].size;if(le!=n){if(I>0){if(B==re.length-1)return null;Y=le+re[B].size-n,B++}else Y=le-n;n+=Y,D+=Y}for(;mi(e.doc,D)!=D;){if(B==(I<0?0:re.length-1))return null;D+=I*re[B-(I<0?1:0)].size,B+=I}return{index:B,lineN:D}}function ea(e,n,D){var I=e.display,B=I.view;B.length==0||n>=I.viewTo||D<=I.viewFrom?(I.view=On(e,n,D),I.viewFrom=n):(I.viewFrom>n?I.view=On(e,n,I.viewFrom).concat(I.view):I.viewFrom<n&&(I.view=I.view.slice(un(e,n))),I.viewFrom=n,I.viewTo<D?I.view=I.view.concat(On(e,I.viewTo,D)):I.viewTo>D&&(I.view=I.view.slice(0,un(e,D)))),I.viewTo=D}function ta(e){for(var n=e.display.view,D=0,I=0;I<n.length;I++){var B=n[I];!B.hidden&&(!B.node||B.changes)&&++D}return D}function Qr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Vi(e,n){n===void 0&&(n=!0);for(var D=e.doc,I={},B=I.cursors=document.createDocumentFragment(),Y=I.selection=document.createDocumentFragment(),re=0;re<D.sel.ranges.length;re++){if(!n&&re==D.sel.primIndex)continue;var le=D.sel.ranges[re];if(le.from().line>=e.display.viewTo||le.to().line<e.display.viewFrom)continue;var ue=le.empty();(ue||e.options.showCursorWhenSelecting)&&ra(e,le.head,B),ue||Yr(e,le,Y)}return I}function ra(e,n,D){var I=wr(e,n,"div",null,null,!e.options.singleCursorHeightPerLine),B=D.appendChild(T("div","\xA0","CodeMirror-cursor"));if(B.style.left=I.left+"px",B.style.top=I.top+"px",B.style.height=Math.max(0,I.bottom-I.top)*e.options.cursorHeight+"px",I.other){var Y=D.appendChild(T("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Y.style.display="",Y.style.left=I.other.left+"px",Y.style.top=I.other.top+"px",Y.style.height=(I.other.bottom-I.other.top)*.85+"px"}}function on(e,n){return e.top-n.top||e.left-n.left}function Yr(e,n,D){var I=e.display,B=e.doc,Y=document.createDocumentFragment(),re=Be(e.display),le=re.left,ue=Math.max(I.sizerWidth,Me(e)-I.sizer.offsetLeft)-re.right,ve=B.direction=="ltr";function je(Tt,Ft,Zt,Gt){Ft<0&&(Ft=0),Ft=Math.round(Ft),Gt=Math.round(Gt),Y.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+Tt+`px;
top: `+Ft+"px; width: "+(Zt==null?ue-Tt:Zt)+`px;
height: `+(Gt-Ft)+"px"))}function Ue(Tt,Ft,Zt){var Gt=vt(B,Tt),Er=Gt.text.length,cn,oi;function Cn(Hn,Ii){return gn(e,ut(Tt,Hn),"div",Gt,Ii)}function Pi(Hn,Ii,ci){var qn=Ht(e,Gt,null,Hn),Wn=Ii=="ltr"==(ci=="after")?"left":"right",Ln=ci=="after"?qn.begin:qn.end-(/\s/.test(Gt.text.charAt(qn.end-1))?2:1);return Cn(Ln,Wn)[Wn]}var Ri=rt(Gt,B.direction);return Je(Ri,Ft||0,Zt==null?Er:Zt,function(Hn,Ii,ci,qn){var Wn=ci=="ltr",Ln=Cn(Hn,Wn?"left":"right"),Di=Cn(Ii-1,Wn?"right":"left"),Za=Ft==null&&Hn==0,Oa=Zt==null&&Ii==Er,_i=qn==0,sa=!Ri||qn==Ri.length-1;if(Di.top-Ln.top<=3){var si=(ve?Za:Oa)&&_i,ps=(ve?Oa:Za)&&sa,ga=si?le:(Wn?Ln:Di).left,La=ps?ue:(Wn?Di:Ln).right;je(ga,Ln.top,La-ga,Ln.bottom)}else{var Ma,Si,qa,ms;Wn?(Ma=ve&&Za&&_i?le:Ln.left,Si=ve?ue:Pi(Hn,ci,"before"),qa=ve?le:Pi(Ii,ci,"after"),ms=ve&&Oa&&sa?ue:Di.right):(Ma=ve?Pi(Hn,ci,"before"):le,Si=!ve&&Za&&_i?ue:Ln.right,qa=!ve&&Oa&&sa?le:Di.left,ms=ve?Pi(Ii,ci,"after"):ue),je(Ma,Ln.top,Si-Ma,Ln.bottom),Ln.bottom<Di.top&&je(le,Ln.bottom,null,Di.top),je(qa,Di.top,ms-qa,Di.bottom)}(!cn||on(Ln,cn)<0)&&(cn=Ln),on(Di,cn)<0&&(cn=Di),(!oi||on(Ln,oi)<0)&&(oi=Ln),on(Di,oi)<0&&(oi=Di)}),{start:cn,end:oi}}var tt=n.from(),Qe=n.to();if(tt.line==Qe.line)Ue(tt.line,tt.ch,Qe.ch);else{var st=vt(B,tt.line),ht=vt(B,Qe.line),_t=Gn(st)==Gn(ht),wt=Ue(tt.line,tt.ch,_t?st.text.length+1:null).end,Lt=Ue(Qe.line,_t?0:null,Qe.ch).start;_t&&(wt.top<Lt.top-2?(je(wt.right,wt.top,null,wt.bottom),je(le,Lt.top,Lt.left,Lt.bottom)):je(wt.right,wt.top,Lt.left-wt.right,wt.bottom)),wt.bottom<Lt.top&&je(le,wt.bottom,null,Lt.top)}D.appendChild(Y)}function Jn(e){if(!e.state.focused)return;var n=e.display;clearInterval(n.blinker);var D=!0;n.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?n.blinker=setInterval(function(){e.hasFocus()||va(e),n.cursorDiv.style.visibility=(D=!D)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(n.cursorDiv.style.visibility="hidden")}function So(e){e.state.focused||(e.display.input.focus(),na(e))}function eo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,va(e))},100)}function na(e,n){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ne(e,"focus",e,n),e.state.focused=!0,K(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),p&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Jn(e)}function va(e,n){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ne(e,"blur",e,n),e.state.focused=!1,g(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function ka(e){for(var n=e.display,D=n.lineDiv.offsetTop,I=0;I<n.view.length;I++){var B=n.view[I],Y=e.options.lineWrapping,re=void 0,le=0;if(B.hidden)continue;if(S&&b<8){var ue=B.node.offsetTop+B.node.offsetHeight;re=ue-D,D=ue}else{var ve=B.node.getBoundingClientRect();re=ve.bottom-ve.top,!Y&&B.text.firstChild&&(le=B.text.firstChild.getBoundingClientRect().right-ve.left-1)}var je=B.line.height-re;if((je>.005||je<-.005)&&(Bt(B.line,re),to(B.line),B.rest))for(var Ue=0;Ue<B.rest.length;Ue++)to(B.rest[Ue]);if(le>e.display.sizerWidth){var tt=Math.ceil(le/Yn(e.display));tt>e.display.maxLineLength&&(e.display.maxLineLength=tt,e.display.maxLine=B.line,e.display.maxLineChanged=!0)}}}function to(e){if(e.widgets)for(var n=0;n<e.widgets.length;++n){var D=e.widgets[n],I=D.node.parentNode;I&&(D.height=I.offsetHeight)}}function Pa(e,n,D){var I=D&&D.top!=null?Math.max(0,D.top):e.scroller.scrollTop;I=Math.floor(I-Xi(e));var B=D&&D.bottom!=null?D.bottom:I+e.wrapper.clientHeight,Y=br(n,I),re=br(n,B);if(D&&D.ensure){var le=D.ensure.from.line,ue=D.ensure.to.line;le<Y?(Y=le,re=br(n,ni(vt(n,le))+e.wrapper.clientHeight)):Math.min(ue,n.lastLine())>=re&&(Y=br(n,ni(vt(n,ue))-e.wrapper.clientHeight),re=ue)}return{from:Y,to:Math.max(re,Y+1)}}function Vo(e,n){if(Ge(e,"scrollCursorIntoView"))return;var D=e.display,I=D.sizer.getBoundingClientRect(),B=null;if(n.top+I.top<0?B=!0:n.bottom+I.top>(window.innerHeight||document.documentElement.clientHeight)&&(B=!1),B!=null&&!o){var Y=T("div","\u200B",null,`position: absolute;
top: `+(n.top-D.viewOffset-Xi(e.display))+`px;
height: `+(n.bottom-n.top+Ke(e)+D.barHeight)+`px;
left: `+n.left+"px; width: "+Math.max(2,n.right-n.left)+"px;");e.display.lineSpace.appendChild(Y),Y.scrollIntoView(B),e.display.lineSpace.removeChild(Y)}}function Yo(e,n,D,I){I==null&&(I=0);var B;!e.options.lineWrapping&&n==D&&(n=n.ch?ut(n.line,n.sticky=="before"?n.ch-1:n.ch,"after"):n,D=n.sticky=="before"?ut(n.line,n.ch+1,"before"):n);for(var Y=0;Y<5;Y++){var re=!1,le=wr(e,n),ue=!D||D==n?le:wr(e,D);B={left:Math.min(le.left,ue.left),top:Math.min(le.top,ue.top)-I,right:Math.max(le.left,ue.left),bottom:Math.max(le.bottom,ue.bottom)+I};var ve=ro(e,B),je=e.doc.scrollTop,Ue=e.doc.scrollLeft;if(ve.scrollTop!=null&&(_a(e,ve.scrollTop),Math.abs(e.doc.scrollTop-je)>1&&(re=!0)),ve.scrollLeft!=null&&(Bi(e,ve.scrollLeft),Math.abs(e.doc.scrollLeft-Ue)>1&&(re=!0)),!re)break}return B}function Oo(e,n){var D=ro(e,n);D.scrollTop!=null&&_a(e,D.scrollTop),D.scrollLeft!=null&&Bi(e,D.scrollLeft)}function ro(e,n){var D=e.display,I=Dn(e.display);n.top<0&&(n.top=0);var B=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:D.scroller.scrollTop,Y=pe(e),re={};n.bottom-n.top>Y&&(n.bottom=n.top+Y);var le=e.doc.height+Re(D),ue=n.top<I,ve=n.bottom>le-I;if(n.top<B)re.scrollTop=ue?0:n.top;else if(n.bottom>B+Y){var je=Math.min(n.top,(ve?le:n.bottom)-Y);je!=B&&(re.scrollTop=je)}var Ue=e.options.fixedGutter?0:D.gutters.offsetWidth,tt=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:D.scroller.scrollLeft-Ue,Qe=Me(e)-D.gutters.offsetWidth,st=n.right-n.left>Qe;return st&&(n.right=n.left+Qe),n.left<10?re.scrollLeft=0:n.left<tt?re.scrollLeft=Math.max(0,n.left+Ue-(st?0:10)):n.right>Qe+tt-3&&(re.scrollLeft=n.right+(st?0:10)-Qe),re}function no(e,n){if(n==null)return;Na(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+n}function ya(e){Na(e);var n=e.getCursor();e.curOp.scrollToPos={from:n,to:n,margin:e.options.cursorScrollMargin}}function ba(e,n,D){(n!=null||D!=null)&&Na(e),n!=null&&(e.curOp.scrollLeft=n),D!=null&&(e.curOp.scrollTop=D)}function $o(e,n){Na(e),e.curOp.scrollToPos=n}function Na(e){var n=e.curOp.scrollToPos;if(n){e.curOp.scrollToPos=null;var D=Jt(e,n.from),I=Jt(e,n.to);Ca(e,D,I,n.margin)}}function Ca(e,n,D,I){var B=ro(e,{left:Math.min(n.left,D.left),top:Math.min(n.top,D.top)-I,right:Math.max(n.right,D.right),bottom:Math.max(n.bottom,D.bottom)+I});ba(e,B.scrollLeft,B.scrollTop)}function _a(e,n){if(Math.abs(e.doc.scrollTop-n)<2)return;O||Ia(e,{top:n}),Ea(e,n,!0),O&&Ia(e),Ra(e,100)}function Ea(e,n,D){if(n=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,n)),e.display.scroller.scrollTop==n&&!D)return;e.doc.scrollTop=n,e.display.scrollbars.setScrollTop(n),e.display.scroller.scrollTop!=n&&(e.display.scroller.scrollTop=n)}function Bi(e,n,D,I){if(n=Math.max(0,Math.min(n,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(D?n==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-n)<2)&&!I)return;e.doc.scrollLeft=n,Ar(e),e.display.scroller.scrollLeft!=n&&(e.display.scroller.scrollLeft=n),e.display.scrollbars.setScrollLeft(n)}function ca(e){var n=e.display,D=n.gutters.offsetWidth,I=Math.round(e.doc.height+Re(e.display));return{clientHeight:n.scroller.clientHeight,viewHeight:n.wrapper.clientHeight,scrollWidth:n.scroller.scrollWidth,clientWidth:n.scroller.clientWidth,viewWidth:n.wrapper.clientWidth,barLeft:e.options.fixedGutter?D:0,docHeight:I,scrollHeight:I+Ke(e)+n.barHeight,nativeBarWidth:n.nativeBarWidth,gutterWidth:D}}var ia=function(e,n,D){this.cm=D;var I=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),B=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");I.tabIndex=B.tabIndex=-1,e(I),e(B),Oe(I,"scroll",function(){I.clientHeight&&n(I.scrollTop,"vertical")}),Oe(B,"scroll",function(){B.clientWidth&&n(B.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,S&&b<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ia.prototype.update=function(e){var n=e.scrollWidth>e.clientWidth+1,D=e.scrollHeight>e.clientHeight+1,I=e.nativeBarWidth;if(D){this.vert.style.display="block",this.vert.style.bottom=n?I+"px":"0";var B=e.viewHeight-(n?I:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+B)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(n){this.horiz.style.display="block",this.horiz.style.right=D?I+"px":"0",this.horiz.style.left=e.barLeft+"px";var Y=e.viewWidth-e.barLeft-(D?I:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+Y)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(I==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:D?I:0,bottom:n?I:0}},ia.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ia.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ia.prototype.zeroWidthHack=function(){var e=c&&!i?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new V,this.disableVert=new V},ia.prototype.enableZeroWidthBar=function(e,n,D){e.style.pointerEvents="auto";function I(){var B=e.getBoundingClientRect(),Y=D=="vert"?document.elementFromPoint(B.right-1,(B.top+B.bottom)/2):document.elementFromPoint((B.right+B.left)/2,B.bottom-1);Y!=e?e.style.pointerEvents="none":n.set(1e3,I)}n.set(1e3,I)},ia.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Aa=function(){};Aa.prototype.update=function(){return{bottom:0,right:0}},Aa.prototype.setScrollLeft=function(){},Aa.prototype.setScrollTop=function(){},Aa.prototype.clear=function(){};function da(e,n){n||(n=ca(e));var D=e.display.barWidth,I=e.display.barHeight;ja(e,n);for(var B=0;B<4&&D!=e.display.barWidth||I!=e.display.barHeight;B++)D!=e.display.barWidth&&e.options.lineWrapping&&ka(e),ja(e,ca(e)),D=e.display.barWidth,I=e.display.barHeight}function ja(e,n){var D=e.display,I=D.scrollbars.update(n);D.sizer.style.paddingRight=(D.barWidth=I.right)+"px",D.sizer.style.paddingBottom=(D.barHeight=I.bottom)+"px",D.heightForcer.style.borderBottom=I.bottom+"px solid transparent",I.right&&I.bottom?(D.scrollbarFiller.style.display="block",D.scrollbarFiller.style.height=I.bottom+"px",D.scrollbarFiller.style.width=I.right+"px"):D.scrollbarFiller.style.display="",I.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(D.gutterFiller.style.display="block",D.gutterFiller.style.height=I.bottom+"px",D.gutterFiller.style.width=n.gutterWidth+"px"):D.gutterFiller.style.display=""}var io={native:ia,null:Aa};function Fa(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&g(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new io[e.options.scrollbarStyle](function(n){e.display.wrapper.insertBefore(n,e.display.scrollbarFiller),Oe(n,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),n.setAttribute("cm-not-content","true")},function(n,D){D=="horizontal"?Bi(e,n):_a(e,n)},e),e.display.scrollbars.addClass&&K(e.display.wrapper,e.display.scrollbars.addClass)}var ao=0;function aa(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ao},li(e.curOp)}function fa(e){var n=e.curOp;n&&Dr(n,function(D){for(var I=0;I<D.ops.length;I++)D.ops[I].cm.curOp=null;Co(D)})}function Co(e){for(var n=e.ops,D=0;D<n.length;D++)Jo(n[D]);for(var I=0;I<n.length;I++)Qo(n[I]);for(var B=0;B<n.length;B++)Zo(n[B]);for(var Y=0;Y<n.length;Y++)oo(n[Y]);for(var re=0;re<n.length;re++)qo(n[re])}function Jo(e){var n=e.cm,D=n.display;Ao(n),e.updateMaxLine&&ji(n),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&&n.options.lineWrapping,e.update=e.mustUpdate&&new Hi(n,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qo(e){e.updatedDisplay=e.mustUpdate&&ha(e.cm,e.update)}function Zo(e){var n=e.cm,D=n.display;e.updatedDisplay&&ka(n),e.barMeasure=ca(n),D.maxLineChanged&&!n.options.lineWrapping&&(e.adjustWidthTo=Fe(n,D.maxLine,D.maxLine.text.length).left+3,n.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(D.scroller.clientWidth,D.sizer.offsetLeft+e.adjustWidthTo+Ke(n)+n.display.barWidth),e.maxScrollLeft=Math.max(0,D.sizer.offsetLeft+e.adjustWidthTo-Me(n))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=D.input.prepareSelection())}function oo(e){var n=e.cm;e.adjustWidthTo!=null&&(n.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<n.doc.scrollLeft&&Bi(n,Math.min(n.display.scroller.scrollLeft,e.maxScrollLeft),!0),n.display.maxLineChanged=!1);var D=e.focus&&e.focus==G();e.preparedSelection&&n.display.input.showSelection(e.preparedSelection,D),(e.updatedDisplay||e.startHeight!=n.doc.height)&&da(n,e.barMeasure),e.updatedDisplay&&Xr(n,e.barMeasure),e.selectionChanged&&Jn(n),n.state.focused&&e.updateInput&&n.display.input.reset(e.typing),D&&So(e.cm)}function qo(e){var n=e.cm,D=n.display,I=n.doc;if(e.updatedDisplay&&Ua(n,e.update),D.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(D.wheelStartX=D.wheelStartY=null),e.scrollTop!=null&&Ea(n,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Bi(n,e.scrollLeft,!0,!0),e.scrollToPos){var B=Yo(n,Dt(I,e.scrollToPos.from),Dt(I,e.scrollToPos.to),e.scrollToPos.margin);Vo(n,B)}var Y=e.maybeHiddenMarkers,re=e.maybeUnhiddenMarkers;if(Y)for(var le=0;le<Y.length;++le)Y[le].lines.length||Ne(Y[le],"hide");if(re)for(var ue=0;ue<re.length;++ue)re[ue].lines.length&&Ne(re[ue],"unhide");D.wrapper.offsetHeight&&(I.scrollTop=n.display.scroller.scrollTop),e.changeObjs&&Ne(n,"changes",n,e.changeObjs),e.update&&e.update.finish()}function xi(e,n){if(e.curOp)return n();aa(e);try{return n()}finally{fa(e)}}function Pn(e,n){return function(){if(e.curOp)return n.apply(e,arguments);aa(e);try{return n.apply(e,arguments)}finally{fa(e)}}}function ui(e){return function(){if(this.curOp)return e.apply(this,arguments);aa(this);try{return e.apply(this,arguments)}finally{fa(this)}}}function Nn(e){return function(){var n=this.cm;if(!n||n.curOp)return e.apply(this,arguments);aa(n);try{return e.apply(this,arguments)}finally{fa(n)}}}function Ra(e,n){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(n,U(es,e))}function es(e){var n=e.doc;if(n.highlightFrontier>=e.display.viewTo)return;var D=+new Date+e.options.workTime,I=bn(e,n.highlightFrontier),B=[];n.iter(I.line,Math.min(n.first+n.size,e.display.viewTo+500),function(Y){if(I.line>=e.display.viewFrom){var re=Y.styles,le=Y.text.length>e.options.maxHighlightLength?rr(n.mode,I.state):null,ue=ei(e,Y,I,!0);le&&(I.state=le),Y.styles=ue.styles;var ve=Y.styleClasses,je=ue.classes;je?Y.styleClasses=je:ve&&(Y.styleClasses=null);for(var Ue=!re||re.length!=Y.styles.length||ve!=je&&(!ve||!je||ve.bgClass!=je.bgClass||ve.textClass!=je.textClass),tt=0;!Ue&&tt<re.length;++tt)Ue=re[tt]!=Y.styles[tt];Ue&&B.push(I.line),Y.stateAfter=I.save(),I.nextLine()}else Y.text.length<=e.options.maxHighlightLength&&di(e,Y.text,I),Y.stateAfter=I.line%5==0?I.save():null,I.nextLine();if(+new Date>D)return Ra(e,e.options.workDelay),!0}),n.highlightFrontier=I.line,n.modeFrontier=Math.max(n.modeFrontier,I.line),B.length&&xi(e,function(){for(var Y=0;Y<B.length;Y++)xn(e,B[Y],"text")})}var Hi=function(e,n,D){var I=e.display;this.viewport=n,this.visible=Pa(I,e.doc,n),this.editorIsHidden=!I.wrapper.offsetWidth,this.wrapperHeight=I.wrapper.clientHeight,this.wrapperWidth=I.wrapper.clientWidth,this.oldDisplayWidth=Me(e),this.force=D,this.dims=En(e),this.events=[]};Hi.prototype.signal=function(e,n){we(e,n)&&this.events.push(arguments)},Hi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ne.apply(null,this.events[e])};function Ao(e){var n=e.display;!n.scrollbarsClipped&&n.scroller.offsetWidth&&(n.nativeBarWidth=n.scroller.offsetWidth-n.scroller.clientWidth,n.heightForcer.style.height=Ke(e)+"px",n.sizer.style.marginBottom=-n.nativeBarWidth+"px",n.sizer.style.borderRightWidth=Ke(e)+"px",n.scrollbarsClipped=!0)}function Ro(e){if(e.hasFocus())return null;var n=G();if(!n||!A(e.display.lineDiv,n))return null;var D={activeElt:n};if(window.getSelection){var I=window.getSelection();I.anchorNode&&I.extend&&A(e.display.lineDiv,I.anchorNode)&&(D.anchorNode=I.anchorNode,D.anchorOffset=I.anchorOffset,D.focusNode=I.focusNode,D.focusOffset=I.focusOffset)}return D}function Io(e){if(!e||!e.activeElt||e.activeElt==G())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&A(document.body,e.anchorNode)&&A(document.body,e.focusNode)){var n=window.getSelection(),D=document.createRange();D.setEnd(e.anchorNode,e.anchorOffset),D.collapse(!1),n.removeAllRanges(),n.addRange(D),n.extend(e.focusNode,e.focusOffset)}}function ha(e,n){var D=e.display,I=e.doc;if(n.editorIsHidden)return yn(e),!1;if(!n.force&&n.visible.from>=D.viewFrom&&n.visible.to<=D.viewTo&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo)&&D.renderedView==D.view&&ta(e)==0)return!1;Qn(e)&&(yn(e),n.dims=En(e));var B=I.first+I.size,Y=Math.max(n.visible.from-e.options.viewportMargin,I.first),re=Math.min(B,n.visible.to+e.options.viewportMargin);D.viewFrom<Y&&Y-D.viewFrom<20&&(Y=Math.max(I.first,D.viewFrom)),D.viewTo>re&&D.viewTo-re<20&&(re=Math.min(B,D.viewTo)),Kt&&(Y=mi(e.doc,Y),re=Xn(e.doc,re));var le=Y!=D.viewFrom||re!=D.viewTo||D.lastWrapHeight!=n.wrapperHeight||D.lastWrapWidth!=n.wrapperWidth;ea(e,Y,re),D.viewOffset=ni(vt(e.doc,D.viewFrom)),e.display.mover.style.top=D.viewOffset+"px";var ue=ta(e);if(!le&&ue==0&&!n.force&&D.renderedView==D.view&&(D.updateLineNumbers==null||D.updateLineNumbers>=D.viewTo))return!1;var ve=Ro(e);return ue>4&&(D.lineDiv.style.display="none"),Do(e,D.updateLineNumbers,n.dims),ue>4&&(D.lineDiv.style.display=""),D.renderedView=D.view,Io(ve),x(D.cursorDiv),x(D.selectionDiv),D.gutters.style.height=D.sizer.style.minHeight=0,le&&(D.lastWrapHeight=n.wrapperHeight,D.lastWrapWidth=n.wrapperWidth,Ra(e,400)),D.updateLineNumbers=null,!0}function Ua(e,n){for(var D=n.viewport,I=!0;;I=!1){if(!I||!e.options.lineWrapping||n.oldDisplayWidth==Me(e)){if(D&&D.top!=null&&(D={top:Math.min(e.doc.height+Re(e.display)-pe(e),D.top)}),n.visible=Pa(e.display,e.doc,D),n.visible.from>=e.display.viewFrom&&n.visible.to<=e.display.viewTo)break}else I&&(n.visible=Pa(e.display,e.doc,D));if(!ha(e,n))break;ka(e);var B=ca(e);Qr(e),da(e,B),Xr(e,B),n.force=!1}n.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(n.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ia(e,n){var D=new Hi(e,n);if(ha(e,D)){ka(e),Ua(e,D);var I=ca(e);Qr(e),da(e,I),Xr(e,I),D.finish()}}function Do(e,n,D){var I=e.display,B=e.options.lineNumbers,Y=I.lineDiv,re=Y.firstChild;function le(st){var ht=st.nextSibling;return p&&c&&e.display.currentWheelTarget==st?st.style.display="none":st.parentNode.removeChild(st),ht}for(var ue=I.view,ve=I.viewFrom,je=0;je<ue.length;je++){var Ue=ue[je];if(!Ue.hidden)if(!Ue.node||Ue.node.parentNode!=Y){var tt=mn(e,Ue,ve,D);Y.insertBefore(tt,re)}else{for(;re!=Ue.node;)re=le(re);var Qe=B&&n!=null&&n<=ve&&Ue.lineNumber;Ue.changes&&(q(Ue.changes,"gutter")>-1&&(Qe=!1),zi(e,Ue,ve,D)),Qe&&(x(Ue.lineNumber),Ue.lineNumber.appendChild(document.createTextNode(Cr(e.options,ve)))),re=Ue.node.nextSibling}ve+=Ue.size}for(;re;)re=le(re)}function Ba(e){var n=e.gutters.offsetWidth;e.sizer.style.marginLeft=n+"px"}function Xr(e,n){e.display.sizer.style.minHeight=n.docHeight+"px",e.display.heightForcer.style.top=n.docHeight+"px",e.display.gutters.style.height=n.docHeight+e.display.barHeight+Ke(e)+"px"}function Ar(e){var n=e.display,D=n.view;if(!n.alignWidgets&&(!n.gutters.firstChild||!e.options.fixedGutter))return;for(var I=yi(n)-n.scroller.scrollLeft+e.doc.scrollLeft,B=n.gutters.offsetWidth,Y=I+"px",re=0;re<D.length;re++)if(!D[re].hidden){e.options.fixedGutter&&(D[re].gutter&&(D[re].gutter.style.left=Y),D[re].gutterBackground&&(D[re].gutterBackground.style.left=Y));var le=D[re].alignable;if(le)for(var ue=0;ue<le.length;ue++)le[ue].style.left=Y}e.options.fixedGutter&&(n.gutters.style.left=I+B+"px")}function Qn(e){if(!e.options.lineNumbers)return!1;var n=e.doc,D=Cr(e.options,n.first+n.size-1),I=e.display;if(D.length!=I.lineNumChars){var B=I.measure.appendChild(T("div",[T("div",D)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Y=B.firstChild.offsetWidth,re=B.offsetWidth-Y;return I.lineGutter.style.width="",I.lineNumInnerWidth=Math.max(Y,I.lineGutter.offsetWidth-re)+1,I.lineNumWidth=I.lineNumInnerWidth+re,I.lineNumChars=I.lineNumInnerWidth?D.length:-1,I.lineGutter.style.width=I.lineNumWidth+"px",Ba(e.display),!0}return!1}function wi(e,n){for(var D=[],I=!1,B=0;B<e.length;B++){var Y=e[B],re=null;if(typeof Y!="string"&&(re=Y.style,Y=Y.className),Y=="CodeMirror-linenumbers")if(n)I=!0;else continue;D.push({className:Y,style:re})}return n&&!I&&D.push({className:"CodeMirror-linenumbers",style:null}),D}function xa(e){var n=e.gutters,D=e.gutterSpecs;x(n),e.lineGutter=null;for(var I=0;I<D.length;++I){var B=D[I],Y=B.className,re=B.style,le=n.appendChild(T("div",null,"CodeMirror-gutter "+Y));re&&(le.style.cssText=re),Y=="CodeMirror-linenumbers"&&(e.lineGutter=le,le.style.width=(e.lineNumWidth||1)+"px")}n.style.display=D.length?"":"none",Ba(e)}function Ji(e){xa(e.display),tn(e),Ar(e)}function Da(e,n,D,I){var B=this;this.input=D,B.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),B.scrollbarFiller.setAttribute("cm-not-content","true"),B.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),B.gutterFiller.setAttribute("cm-not-content","true"),B.lineDiv=k("div",null,"CodeMirror-code"),B.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),B.cursorDiv=T("div",null,"CodeMirror-cursors"),B.measure=T("div",null,"CodeMirror-measure"),B.lineMeasure=T("div",null,"CodeMirror-measure"),B.lineSpace=k("div",[B.measure,B.lineMeasure,B.selectionDiv,B.cursorDiv,B.lineDiv],null,"position: relative; outline: none");var Y=k("div",[B.lineSpace],"CodeMirror-lines");B.mover=T("div",[Y],null,"position: relative"),B.sizer=T("div",[B.mover],"CodeMirror-sizer"),B.sizerWidth=null,B.heightForcer=T("div",null,null,"position: absolute; height: "+Z+"px; width: 1px;"),B.gutters=T("div",null,"CodeMirror-gutters"),B.lineGutter=null,B.scroller=T("div",[B.sizer,B.heightForcer,B.gutters],"CodeMirror-scroll"),B.scroller.setAttribute("tabIndex","-1"),B.wrapper=T("div",[B.scrollbarFiller,B.gutterFiller,B.scroller],"CodeMirror"),S&&b<8&&(B.gutters.style.zIndex=-1,B.scroller.style.paddingRight=0),!p&&!(O&&a)&&(B.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(B.wrapper):e(B.wrapper)),B.viewFrom=B.viewTo=n.first,B.reportedViewFrom=B.reportedViewTo=n.first,B.view=[],B.renderedView=null,B.externalMeasured=null,B.viewOffset=0,B.lastWrapHeight=B.lastWrapWidth=0,B.updateLineNumbers=null,B.nativeBarWidth=B.barHeight=B.barWidth=0,B.scrollbarsClipped=!1,B.lineNumWidth=B.lineNumInnerWidth=B.lineNumChars=null,B.alignWidgets=!1,B.cachedCharWidth=B.cachedTextHeight=B.cachedPaddingH=null,B.maxLine=null,B.maxLineLength=0,B.maxLineChanged=!1,B.wheelDX=B.wheelDY=B.wheelStartX=B.wheelStartY=null,B.shift=!1,B.selForContextMenu=null,B.activeTouch=null,B.gutterSpecs=wi(I.gutters,I.lineNumbers),xa(B),D.init(B)}var oa=0,Zn=null;S?Zn=-.53:O?Zn=15:t?Zn=-.7:r&&(Zn=-1/3);function Ha(e){var n=e.wheelDeltaX,D=e.wheelDeltaY;return n==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(n=e.detail),D==null&&e.detail&&e.axis==e.VERTICAL_AXIS?D=e.detail:D==null&&(D=e.wheelDelta),{x:n,y:D}}function so(e){var n=Ha(e);return n.x*=Zn,n.y*=Zn,n}function lo(e,n){var D=Ha(n),I=D.x,B=D.y,Y=e.display,re=Y.scroller,le=re.scrollWidth>re.clientWidth,ue=re.scrollHeight>re.clientHeight;if(!(I&&le||B&&ue))return;if(B&&c&&p){e:for(var ve=n.target,je=Y.view;ve!=re;ve=ve.parentNode)for(var Ue=0;Ue<je.length;Ue++)if(je[Ue].node==ve){e.display.currentWheelTarget=ve;break e}}if(I&&!O&&!l&&Zn!=null){B&&ue&&_a(e,Math.max(0,re.scrollTop+B*Zn)),Bi(e,Math.max(0,re.scrollLeft+I*Zn)),(!B||B&&ue)&&de(n),Y.wheelStartX=null;return}if(B&&Zn!=null){var tt=B*Zn,Qe=e.doc.scrollTop,st=Qe+Y.wrapper.clientHeight;tt<0?Qe=Math.max(0,Qe+tt-50):st=Math.min(e.doc.height,st+tt+50),Ia(e,{top:Qe,bottom:st})}oa<20&&(Y.wheelStartX==null?(Y.wheelStartX=re.scrollLeft,Y.wheelStartY=re.scrollTop,Y.wheelDX=I,Y.wheelDY=B,setTimeout(function(){if(Y.wheelStartX==null)return;var ht=re.scrollLeft-Y.wheelStartX,_t=re.scrollTop-Y.wheelStartY,wt=_t&&Y.wheelDY&&_t/Y.wheelDY||ht&&Y.wheelDX&&ht/Y.wheelDX;if(Y.wheelStartX=Y.wheelStartY=null,!wt)return;Zn=(Zn*oa+wt)/(oa+1),++oa},200)):(Y.wheelDX+=I,Y.wheelDY+=B))}var Ti=function(e,n){this.ranges=e,this.primIndex=n};Ti.prototype.primary=function(){return this.ranges[this.primIndex]},Ti.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var n=0;n<this.ranges.length;n++){var D=this.ranges[n],I=e.ranges[n];if(!Br(D.anchor,I.anchor)||!Br(D.head,I.head))return!1}return!0},Ti.prototype.deepCopy=function(){for(var e=[],n=0;n<this.ranges.length;n++)e[n]=new Kr(Vr(this.ranges[n].anchor),Vr(this.ranges[n].head));return new Ti(e,this.primIndex)},Ti.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Ti.prototype.contains=function(e,n){n||(n=e);for(var D=0;D<this.ranges.length;D++){var I=this.ranges[D];if(It(n,I.from())>=0&&It(e,I.to())<=0)return D}return-1};var Kr=function(e,n){this.anchor=e,this.head=n};Kr.prototype.from=function(){return fn(this.anchor,this.head)},Kr.prototype.to=function(){return An(this.anchor,this.head)},Kr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Wi(e,n,D){var I=e&&e.options.selectionsMayTouch,B=n[D];n.sort(function(tt,Qe){return It(tt.from(),Qe.from())}),D=q(n,B);for(var Y=1;Y<n.length;Y++){var re=n[Y],le=n[Y-1],ue=It(le.to(),re.from());if(I&&!re.empty()?ue>0:ue>=0){var ve=fn(le.from(),re.from()),je=An(le.to(),re.to()),Ue=le.empty()?re.from()==re.head:le.from()==le.head;Y<=D&&--D,n.splice(--Y,2,new Kr(Ue?je:ve,Ue?ve:je))}}return new Ti(n,D)}function Qi(e,n){return new Ti([new Kr(e,n||e)],0)}function Zi(e){return e.text?ut(e.from.line+e.text.length-1,te(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function uo(e,n){if(It(e,n.from)<0)return e;if(It(e,n.to)<=0)return Zi(n);var D=e.line+n.text.length-(n.to.line-n.from.line)-1,I=e.ch;return e.line==n.to.line&&(I+=Zi(n).ch-n.to.ch),ut(D,I)}function Wa(e,n){for(var D=[],I=0;I<e.sel.ranges.length;I++){var B=e.sel.ranges[I];D.push(new Kr(uo(B.anchor,n),uo(B.head,n)))}return Wi(e.cm,D,e.sel.primIndex)}function Lo(e,n,D){return e.line==n.line?ut(D.line,e.ch-n.ch+D.ch):ut(D.line+(e.line-n.line),e.ch)}function Mo(e,n,D){for(var I=[],B=ut(e.first,0),Y=B,re=0;re<n.length;re++){var le=n[re],ue=Lo(le.from,B,Y),ve=Lo(Zi(le),B,Y);if(B=le.to,Y=ve,D=="around"){var je=e.sel.ranges[re],Ue=It(je.head,je.anchor)<0;I[re]=new Kr(Ue?ve:ue,Ue?ue:ve)}else I[re]=new Kr(ue,ue)}return new Ti(I,e.sel.primIndex)}function pa(e){e.doc.mode=dt(e.options,e.doc.modeOption),co(e)}function co(e){e.doc.iter(function(n){n.stateAfter&&(n.stateAfter=null),n.styles&&(n.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Ra(e,100),e.state.modeGen++,e.curOp&&tn(e)}function gs(e,n){return n.from.ch==0&&n.to.ch==0&&te(n.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ts(e,n,D,I){function B(Lt){return D?D[Lt]:null}function Y(Lt,Tt,Ft){Pr(Lt,Tt,Ft,I),fr(Lt,"change",Lt,n)}function re(Lt,Tt){for(var Ft=[],Zt=Lt;Zt<Tt;++Zt)Ft.push(new ii(ve[Zt],B(Zt),I));return Ft}var le=n.from,ue=n.to,ve=n.text,je=vt(e,le.line),Ue=vt(e,ue.line),tt=te(ve),Qe=B(ve.length-1),st=ue.line-le.line;if(n.full)e.insert(0,re(0,ve.length)),e.remove(ve.length,e.size-ve.length);else if(gs(e,n)){var ht=re(0,ve.length-1);Y(Ue,Ue.text,Qe),st&&e.remove(le.line,st),ht.length&&e.insert(le.line,ht)}else if(je==Ue)if(ve.length==1)Y(je,je.text.slice(0,le.ch)+tt+je.text.slice(ue.ch),Qe);else{var _t=re(1,ve.length-1);_t.push(new ii(tt+je.text.slice(ue.ch),Qe,I)),Y(je,je.text.slice(0,le.ch)+ve[0],B(0)),e.insert(le.line+1,_t)}else if(ve.length==1)Y(je,je.text.slice(0,le.ch)+ve[0]+Ue.text.slice(ue.ch),B(0)),e.remove(le.line+1,st);else{Y(je,je.text.slice(0,le.ch)+ve[0],B(0)),Y(Ue,tt+Ue.text.slice(ue.ch),Qe);var wt=re(1,ve.length-1);st>1&&e.remove(le.line+1,st-1),e.insert(le.line+1,wt)}fr(e,"change",e,n)}function wa(e,n,D){function I(B,Y,re){if(B.linked)for(var le=0;le<B.linked.length;++le){var ue=B.linked[le];if(ue.doc==Y)continue;var ve=re&&ue.sharedHist;if(D&&!ve)continue;n(ue.doc,ve),I(ue.doc,B,ve)}}I(e,null,!0)}function vs(e,n){if(n.cm)throw new Error("This document is already in use.");e.doc=n,n.cm=e,Ei(e),pa(e),ys(e),e.options.lineWrapping||ji(e),e.options.mode=n.modeOption,tn(e)}function ys(e){(e.doc.direction=="rtl"?K:g)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){xi(e,function(){ys(e),tn(e)})}function ko(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,n){var D={from:Vr(n.from),to:Zi(n),text:yr(e,n.from,n.to)};return Es(e,D,n.from.line,n.to.line+1),wa(e,function(I){return Es(I,D,n.from.line,n.to.line+1)},!0),D}function bs(e){for(;e.length;){var n=te(e);if(n.ranges)e.pop();else break}}function ml(e,n){if(n)return bs(e.done),te(e.done);if(e.done.length&&!te(e.done).ranges)return te(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),te(e.done)}function _s(e,n,D,I){var B=e.history;B.undone.length=0;var Y=+new Date,re,le;if((B.lastOp==I||B.lastOrigin==n.origin&&n.origin&&(n.origin.charAt(0)=="+"&&B.lastModTime>Y-(e.cm?e.cm.options.historyEventDelay:500)||n.origin.charAt(0)=="*"))&&(re=ml(B,B.lastOp==I)))le=te(re.changes),It(n.from,n.to)==0&&It(n.from,le.to)==0?le.to=Zi(n):re.changes.push(rs(e,n));else{var ue=te(B.done);for((!ue||!ue.ranges)&&Po(e.sel,B.done),re={changes:[rs(e,n)],generation:B.generation},B.done.push(re);B.done.length>B.undoDepth;)B.done.shift(),B.done[0].ranges||B.done.shift()}B.done.push(D),B.generation=++B.maxGeneration,B.lastModTime=B.lastSelTime=Y,B.lastOp=B.lastSelOp=I,B.lastOrigin=B.lastSelOrigin=n.origin,le||Ne(e,"historyAdded")}function gl(e,n,D,I){var B=n.charAt(0);return B=="*"||B=="+"&&D.ranges.length==I.ranges.length&&D.somethingSelected()==I.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,n,D,I){var B=e.history,Y=I&&I.origin;D==B.lastSelOp||Y&&B.lastSelOrigin==Y&&(B.lastModTime==B.lastSelTime&&B.lastOrigin==Y||gl(e,Y,te(B.done),n))?B.done[B.done.length-1]=n:Po(n,B.done),B.lastSelTime=+new Date,B.lastSelOrigin=Y,B.lastSelOp=D,I&&I.clearRedo!==!1&&bs(B.undone)}function Po(e,n){var D=te(n);D&&D.ranges&&D.equals(e)||n.push(e)}function Es(e,n,D,I){var B=n["spans_"+e.id],Y=0;e.iter(Math.max(e.first,D),Math.min(e.first+e.size,I),function(re){re.markedSpans&&((B||(B=n["spans_"+e.id]={}))[Y]=re.markedSpans),++Y})}function yl(e){if(!e)return null;for(var n,D=0;D<e.length;++D)e[D].marker.explicitlyCleared?n||(n=e.slice(0,D)):n&&n.push(e[D]);return n?n.length?n:null:e}function bl(e,n){var D=n["spans_"+e.id];if(!D)return null;for(var I=[],B=0;B<n.text.length;++B)I.push(yl(D[B]));return I}function xs(e,n){var D=bl(e,n),I=Oi(e,n);if(!D)return I;if(!I)return D;for(var B=0;B<D.length;++B){var Y=D[B],re=I[B];if(Y&&re){e:for(var le=0;le<re.length;++le){for(var ue=re[le],ve=0;ve<Y.length;++ve)if(Y[ve].marker==ue.marker)continue e;Y.push(ue)}}else re&&(D[B]=re)}return D}function Ka(e,n,D){for(var I=[],B=0;B<e.length;++B){var Y=e[B];if(Y.ranges){I.push(D?Ti.prototype.deepCopy.call(Y):Y);continue}var re=Y.changes,le=[];I.push({changes:le});for(var ue=0;ue<re.length;++ue){var ve=re[ue],je=void 0;if(le.push({from:ve.from,to:ve.to,text:ve.text}),n)for(var Ue in ve)(je=Ue.match(/^spans_(\d+)$/))&&(q(n,Number(je[1]))>-1&&(te(le)[Ue]=ve[Ue],delete ve[Ue]))}}return I}function ns(e,n,D,I){if(I){var B=e.anchor;if(D){var Y=It(n,B)<0;Y!=It(D,B)<0?(B=n,n=D):Y!=It(n,D)<0&&(n=D)}return new Kr(B,n)}else return new Kr(D||n,n)}function No(e,n,D,I,B){B==null&&(B=e.cm&&(e.cm.display.shift||e.extend)),bi(e,new Ti([ns(e.sel.primary(),n,D,B)],0),I)}function ws(e,n,D){for(var I=[],B=e.cm&&(e.cm.display.shift||e.extend),Y=0;Y<e.sel.ranges.length;Y++)I[Y]=ns(e.sel.ranges[Y],n[Y],null,B);var re=Wi(e.cm,I,e.sel.primIndex);bi(e,re,D)}function is(e,n,D,I){var B=e.sel.ranges.slice(0);B[n]=D,bi(e,Wi(e.cm,B,e.sel.primIndex),I)}function Ts(e,n,D,I){bi(e,Qi(n,D),I)}function _l(e,n,D){var I={ranges:n.ranges,update:function(B){this.ranges=[];for(var Y=0;Y<B.length;Y++)this.ranges[Y]=new Kr(Dt(e,B[Y].anchor),Dt(e,B[Y].head))},origin:D&&D.origin};return Ne(e,"beforeSelectionChange",e,I),e.cm&&Ne(e.cm,"beforeSelectionChange",e.cm,I),I.ranges!=n.ranges?Wi(e.cm,I.ranges,I.ranges.length-1):n}function Ss(e,n,D){var I=e.history.done,B=te(I);B&&B.ranges?(I[I.length-1]=n,jo(e,n,D)):bi(e,n,D)}function bi(e,n,D){jo(e,n,D),vl(e,e.sel,e.cm?e.cm.curOp.id:NaN,D)}function jo(e,n,D){(we(e,"beforeSelectionChange")||e.cm&&we(e.cm,"beforeSelectionChange"))&&(n=_l(e,n,D));var I=D&&D.bias||(It(n.primary().head,e.sel.primary().head)<0?-1:1);Os(e,As(e,n,I,!0)),!(D&&D.scroll===!1)&&e.cm&&ya(e.cm)}function Os(e,n){if(n.equals(e.sel))return;e.sel=n,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,De(e.cm)),fr(e,"cursorActivity",e)}function Cs(e){Os(e,As(e,e.sel,null,!1))}function As(e,n,D,I){for(var B,Y=0;Y<n.ranges.length;Y++){var re=n.ranges[Y],le=n.ranges.length==e.sel.ranges.length&&e.sel.ranges[Y],ue=Fo(e,re.anchor,le&&le.anchor,D,I),ve=Fo(e,re.head,le&&le.head,D,I);(B||ue!=re.anchor||ve!=re.head)&&(B||(B=n.ranges.slice(0,Y)),B[Y]=new Kr(ue,ve))}return B?Wi(e.cm,B,n.primIndex):n}function za(e,n,D,I,B){var Y=vt(e,n.line);if(Y.markedSpans)for(var re=0;re<Y.markedSpans.length;++re){var le=Y.markedSpans[re],ue=le.marker,ve="selectLeft"in ue?!ue.selectLeft:ue.inclusiveLeft,je="selectRight"in ue?!ue.selectRight:ue.inclusiveRight;if((le.from==null||(ve?le.from<=n.ch:le.from<n.ch))&&(le.to==null||(je?le.to>=n.ch:le.to>n.ch))){if(B&&(Ne(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(Y.markedSpans){--re;continue}else break;if(!ue.atomic)continue;if(D){var Ue=ue.find(I<0?1:-1),tt=void 0;if((I<0?je:ve)&&(Ue=Rs(e,Ue,-I,Ue&&Ue.line==n.line?Y:null)),Ue&&Ue.line==n.line&&(tt=It(Ue,D))&&(I<0?tt<0:tt>0))return za(e,Ue,n,I,B)}var Qe=ue.find(I<0?-1:1);return(I<0?ve:je)&&(Qe=Rs(e,Qe,I,Qe.line==n.line?Y:null)),Qe?za(e,Qe,n,I,B):null}}return n}function Fo(e,n,D,I,B){var Y=I||1,re=za(e,n,D,Y,B)||!B&&za(e,n,D,Y,!0)||za(e,n,D,-Y,B)||!B&&za(e,n,D,-Y,!0);return re||(e.cantEdit=!0,ut(e.first,0))}function Rs(e,n,D,I){return D<0&&n.ch==0?n.line>e.first?Dt(e,ut(n.line-1)):null:D>0&&n.ch==(I||vt(e,n.line)).text.length?n.line<e.first+e.size-1?ut(n.line+1,0):null:new ut(n.line,n.ch+D)}function Is(e){e.setSelection(ut(e.firstLine(),0),ut(e.lastLine()),he)}function Ds(e,n,D){var I={canceled:!1,from:n.from,to:n.to,text:n.text,origin:n.origin,cancel:function(){return I.canceled=!0}};return D&&(I.update=function(B,Y,re,le){B&&(I.from=Dt(e,B)),Y&&(I.to=Dt(e,Y)),re&&(I.text=re),le!==void 0&&(I.origin=le)}),Ne(e,"beforeChange",e,I),e.cm&&Ne(e.cm,"beforeChange",e.cm,I),I.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:I.from,to:I.to,text:I.text,origin:I.origin}}function Ga(e,n,D){if(e.cm){if(!e.cm.curOp)return Pn(e.cm,Ga)(e,n,D);if(e.cm.state.suppressEdits)return}if((we(e,"beforeChange")||e.cm&&we(e.cm,"beforeChange"))&&(n=Ds(e,n,!0),!n))return;var I=qt&&!D&&Ki(e,n.from,n.to);if(I)for(var B=I.length-1;B>=0;--B)Ls(e,{from:I[B].from,to:I[B].to,text:B?[""]:n.text,origin:n.origin});else Ls(e,n)}function Ls(e,n){if(n.text.length==1&&n.text[0]==""&&It(n.from,n.to)==0)return;var D=Wa(e,n);_s(e,n,D,e.cm?e.cm.curOp.id:NaN),fo(e,n,D,Oi(e,n));var I=[];wa(e,function(B,Y){!Y&&q(I,B.history)==-1&&(Ns(B.history,n),I.push(B.history)),fo(B,n,null,Oi(B,n))})}function Uo(e,n,D){var I=e.cm&&e.cm.state.suppressEdits;if(I&&!D)return;for(var B=e.history,Y,re=e.sel,le=n=="undo"?B.done:B.undone,ue=n=="undo"?B.undone:B.done,ve=0;ve<le.length&&!(Y=le[ve],D?Y.ranges&&!Y.equals(e.sel):!Y.ranges);ve++);if(ve==le.length)return;for(B.lastOrigin=B.lastSelOrigin=null;;)if(Y=le.pop(),Y.ranges){if(Po(Y,ue),D&&!Y.equals(e.sel)){bi(e,Y,{clearRedo:!1});return}re=Y}else if(I){le.push(Y);return}else break;var je=[];Po(re,ue),ue.push({changes:je,generation:B.generation}),B.generation=Y.generation||++B.maxGeneration;for(var Ue=we(e,"beforeChange")||e.cm&&we(e.cm,"beforeChange"),tt=function(ht){var _t=Y.changes[ht];if(_t.origin=n,Ue&&!Ds(e,_t,!1))return le.length=0,{};je.push(rs(e,_t));var wt=ht?Wa(e,_t):te(le);fo(e,_t,wt,xs(e,_t)),!ht&&e.cm&&e.cm.scrollIntoView({from:_t.from,to:Zi(_t)});var Lt=[];wa(e,function(Tt,Ft){!Ft&&q(Lt,Tt.history)==-1&&(Ns(Tt.history,_t),Lt.push(Tt.history)),fo(Tt,_t,null,xs(Tt,_t))})},Qe=Y.changes.length-1;Qe>=0;--Qe){var st=tt(Qe);if(st)return st.v}}function Ms(e,n){if(n==0)return;if(e.first+=n,e.sel=new Ti(be(e.sel.ranges,function(B){return new Kr(ut(B.anchor.line+n,B.anchor.ch),ut(B.head.line+n,B.head.ch))}),e.sel.primIndex),e.cm){tn(e.cm,e.first,e.first-n,n);for(var D=e.cm.display,I=D.viewFrom;I<D.viewTo;I++)xn(e.cm,I,"gutter")}}function fo(e,n,D,I){if(e.cm&&!e.cm.curOp)return Pn(e.cm,fo)(e,n,D,I);if(n.to.line<e.first){Ms(e,n.text.length-1-(n.to.line-n.from.line));return}if(n.from.line>e.lastLine())return;if(n.from.line<e.first){var B=n.text.length-1-(e.first-n.from.line);Ms(e,B),n={from:ut(e.first,0),to:ut(n.to.line+B,n.to.ch),text:[te(n.text)],origin:n.origin}}var Y=e.lastLine();n.to.line>Y&&(n={from:n.from,to:ut(Y,vt(e,Y).text.length),text:[n.text[0]],origin:n.origin}),n.removed=yr(e,n.from,n.to),D||(D=Wa(e,n)),e.cm?El(e.cm,n,I):ts(e,n,I),jo(e,D,he),e.cantEdit&&Fo(e,ut(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,n,D){var I=e.doc,B=e.display,Y=n.from,re=n.to,le=!1,ue=Y.line;e.options.lineWrapping||(ue=Rt(Gn(vt(I,Y.line))),I.iter(ue,re.line+1,function(Qe){if(Qe==B.maxLine)return le=!0,!0})),I.sel.contains(n.from,n.to)>-1&&De(e),ts(I,n,D,Fi(e)),e.options.lineWrapping||(I.iter(ue,Y.line+n.text.length,function(Qe){var st=gi(Qe);st>B.maxLineLength&&(B.maxLine=Qe,B.maxLineLength=st,B.maxLineChanged=!0,le=!1)}),le&&(e.curOp.updateMaxLine=!0)),nn(I,Y.line),Ra(e,400);var ve=n.text.length-(re.line-Y.line)-1;n.full?tn(e):Y.line==re.line&&n.text.length==1&&!gs(e.doc,n)?xn(e,Y.line,"text"):tn(e,Y.line,re.line+1,ve);var je=we(e,"changes"),Ue=we(e,"change");if(Ue||je){var tt={from:Y,to:re,text:n.text,removed:n.removed,origin:n.origin};Ue&&fr(e,"change",e,tt),je&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(tt)}e.display.selForContextMenu=null}function Xa(e,n,D,I,B){var Y;I||(I=D),It(I,D)<0&&(Y=[I,D],D=Y[0],I=Y[1]),typeof n=="string"&&(n=e.splitLines(n)),Ga(e,{from:D,to:I,text:n,origin:B})}function ks(e,n,D,I){D<e.line?e.line+=I:n<e.line&&(e.line=n,e.ch=0)}function Ps(e,n,D,I){for(var B=0;B<e.length;++B){var Y=e[B],re=!0;if(Y.ranges){Y.copied||(Y=e[B]=Y.deepCopy(),Y.copied=!0);for(var le=0;le<Y.ranges.length;le++)ks(Y.ranges[le].anchor,n,D,I),ks(Y.ranges[le].head,n,D,I);continue}for(var ue=0;ue<Y.changes.length;++ue){var ve=Y.changes[ue];if(D<ve.from.line)ve.from=ut(ve.from.line+I,ve.from.ch),ve.to=ut(ve.to.line+I,ve.to.ch);else if(n<=ve.to.line){re=!1;break}}re||(e.splice(0,B+1),B=0)}}function Ns(e,n){var D=n.from.line,I=n.to.line,B=n.text.length-(I-D)-1;Ps(e.done,D,I,B),Ps(e.undone,D,I,B)}function ho(e,n,D,I){var B=n,Y=n;return typeof n=="number"?Y=vt(e,zr(e,n)):B=Rt(n),B==null?null:(I(Y,B)&&e.cm&&xn(e.cm,B,D),Y)}function po(e){this.lines=e,this.parent=null;for(var n=0,D=0;D<e.length;++D)e[D].parent=this,n+=e[D].height;this.height=n}po.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,n){for(var D=e,I=e+n;D<I;++D){var B=this.lines[D];this.height-=B.height,Nt(B),fr(B,"delete")}this.lines.splice(e,n)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,n,D){this.height+=D,this.lines=this.lines.slice(0,e).concat(n).concat(this.lines.slice(e));for(var I=0;I<n.length;++I)n[I].parent=this},iterN:function(e,n,D){for(var I=e+n;e<I;++e)if(D(this.lines[e]))return!0}};function mo(e){this.children=e;for(var n=0,D=0,I=0;I<e.length;++I){var B=e[I];n+=B.chunkSize(),D+=B.height,B.parent=this}this.size=n,this.height=D,this.parent=null}mo.prototype={chunkSize:function(){return this.size},removeInner:function(e,n){this.size-=n;for(var D=0;D<this.children.length;++D){var I=this.children[D],B=I.chunkSize();if(e<B){var Y=Math.min(n,B-e),re=I.height;if(I.removeInner(e,Y),this.height-=re-I.height,B==Y&&(this.children.splice(D--,1),I.parent=null),(n-=Y)==0)break;e=0}else e-=B}if(this.size-n<25&&(this.children.length>1||!(this.children[0]instanceof po))){var le=[];this.collapse(le),this.children=[new po(le)],this.children[0].parent=this}},collapse:function(e){for(var n=0;n<this.children.length;++n)this.children[n].collapse(e)},insertInner:function(e,n,D){this.size+=n.length,this.height+=D;for(var I=0;I<this.children.length;++I){var B=this.children[I],Y=B.chunkSize();if(e<=Y){if(B.insertInner(e,n,D),B.lines&&B.lines.length>50){for(var re=B.lines.length%25+25,le=re;le<B.lines.length;){var ue=new po(B.lines.slice(le,le+=25));B.height-=ue.height,this.children.splice(++I,0,ue),ue.parent=this}B.lines=B.lines.slice(0,re),this.maybeSpill()}break}e-=Y}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var n=e.children.splice(e.children.length-5,5),D=new mo(n);if(e.parent){e.size-=D.size,e.height-=D.height;var B=q(e.parent.children,e);e.parent.children.splice(B+1,0,D)}else{var I=new mo(e.children);I.parent=e,e.children=[I,D],e=I}D.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,n,D){for(var I=0;I<this.children.length;++I){var B=this.children[I],Y=B.chunkSize();if(e<Y){var re=Math.min(n,Y-e);if(B.iterN(e,re,D))return!0;if((n-=re)==0)break;e=0}else e-=Y}}};var go=function(e,n,D){if(D)for(var I in D)D.hasOwnProperty(I)&&(this[I]=D[I]);this.doc=e,this.node=n};go.prototype.clear=function(){var e=this.doc.cm,n=this.line.widgets,D=this.line,I=Rt(D);if(I==null||!n)return;for(var B=0;B<n.length;++B)n[B]==this&&n.splice(B--,1);n.length||(D.widgets=null);var Y=kn(this);Bt(D,Math.max(0,D.height-Y)),e&&(xi(e,function(){js(e,D,-Y),xn(e,I,"widget")}),fr(e,"lineWidgetCleared",e,this,I))},go.prototype.changed=function(){var e=this,n=this.height,D=this.doc.cm,I=this.line;this.height=null;var B=kn(this)-n;if(!B)return;Vn(this.doc,I)||Bt(I,I.height+B),D&&xi(D,function(){D.curOp.forceUpdate=!0,js(D,I,B),fr(D,"lineWidgetChanged",D,e,Rt(I))})},Ae(go);function js(e,n,D){ni(n)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&no(e,D)}function xl(e,n,D,I){var B=new go(e,D,I),Y=e.cm;return Y&&B.noHScroll&&(Y.display.alignWidgets=!0),ho(e,n,"widget",function(re){var le=re.widgets||(re.widgets=[]);if(B.insertAt==null?le.push(B):le.splice(Math.min(le.length-1,Math.max(0,B.insertAt)),0,B),B.line=re,Y&&!Vn(e,re)){var ue=ni(re)<e.scrollTop;Bt(re,re.height+kn(B)),ue&&no(Y,B.height),Y.curOp.forceUpdate=!0}return!0}),Y&&fr(Y,"lineWidgetAdded",Y,B,typeof n=="number"?n:Rt(n)),B}var Fs=0,Ta=function(e,n){this.lines=[],this.type=n,this.doc=e,this.id=++Fs};Ta.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,n=e&&!e.curOp;if(n&&aa(e),we(this,"clear")){var D=this.find();D&&fr(this,"clear",D.from,D.to)}for(var I=null,B=null,Y=0;Y<this.lines.length;++Y){var re=this.lines[Y],le=Gr(re.markedSpans,this);e&&!this.collapsed?xn(e,Rt(re),"text"):e&&(le.to!=null&&(B=Rt(re)),le.from!=null&&(I=Rt(re))),re.markedSpans=_n(re.markedSpans,le),le.from==null&&this.collapsed&&!Vn(this.doc,re)&&e&&Bt(re,Dn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var ue=0;ue<this.lines.length;++ue){var ve=Gn(this.lines[ue]),je=gi(ve);je>e.display.maxLineLength&&(e.display.maxLine=ve,e.display.maxLineLength=je,e.display.maxLineChanged=!0)}I!=null&&e&&this.collapsed&&tn(e,I,B+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Cs(e.doc)),e&&fr(e,"markerCleared",e,this,I,B),n&&fa(e),this.parent&&this.parent.clear()},Ta.prototype.find=function(e,n){e==null&&this.type=="bookmark"&&(e=1);for(var D,I,B=0;B<this.lines.length;++B){var Y=this.lines[B],re=Gr(Y.markedSpans,this);if(re.from!=null&&(D=ut(n?Y:Rt(Y),re.from),e==-1))return D;if(re.to!=null&&(I=ut(n?Y:Rt(Y),re.to),e==1))return I}return D&&{from:D,to:I}},Ta.prototype.changed=function(){var e=this,n=this.find(-1,!0),D=this,I=this.doc.cm;if(!n||!I)return;xi(I,function(){var B=n.line,Y=Rt(n.line),re=We(I,Y);if(re&&(ar(re),I.curOp.selectionChanged=I.curOp.forceUpdate=!0),I.curOp.updateMaxLine=!0,!Vn(D.doc,B)&&D.height!=null){var le=D.height;D.height=null;var ue=kn(D)-le;ue&&Bt(B,B.height+ue)}fr(I,"markerChanged",I,e)})},Ta.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var n=this.doc.cm.curOp;(!n.maybeHiddenMarkers||q(n.maybeHiddenMarkers,this)==-1)&&(n.maybeUnhiddenMarkers||(n.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ta.prototype.detachLine=function(e){if(this.lines.splice(q(this.lines,e),1),!this.lines.length&&this.doc.cm){var n=this.doc.cm.curOp;(n.maybeHiddenMarkers||(n.maybeHiddenMarkers=[])).push(this)}},Ae(Ta);function Va(e,n,D,I,B){if(I&&I.shared)return wl(e,n,D,I,B);if(e.cm&&!e.cm.curOp)return Pn(e.cm,Va)(e,n,D,I,B);var Y=new Ta(e,B),re=It(n,D);if(I&&P(I,Y,!1),re>0||re==0&&Y.clearWhenEmpty!==!1)return Y;if(Y.replacedWith&&(Y.collapsed=!0,Y.widgetNode=k("span",[Y.replacedWith],"CodeMirror-widget"),I.handleMouseEvents||Y.widgetNode.setAttribute("cm-ignore-events","true"),I.insertLeft&&(Y.widgetNode.insertLeft=!0)),Y.collapsed){if(Mi(e,n.line,n,D,Y)||n.line!=D.line&&Mi(e,D.line,n,D,Y))throw new Error("Inserting collapsed marker partially overlapping an existing one");Sr()}Y.addToHistory&&_s(e,{from:n,to:D,origin:"markText"},e.sel,NaN);var le=n.line,ue=e.cm,ve;if(e.iter(le,D.line+1,function(Ue){ue&&Y.collapsed&&!ue.options.lineWrapping&&Gn(Ue)==ue.display.maxLine&&(ve=!0),Y.collapsed&&le!=n.line&&Bt(Ue,0),la(Ue,new jr(Y,le==n.line?n.ch:null,le==D.line?D.ch:null)),++le}),Y.collapsed&&e.iter(n.line,D.line+1,function(Ue){Vn(e,Ue)&&Bt(Ue,0)}),Y.clearOnEnter&&Oe(Y,"beforeCursorEnter",function(){return Y.clear()}),Y.readOnly&&(er(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),Y.collapsed&&(Y.id=++Fs,Y.atomic=!0),ue){if(ve&&(ue.curOp.updateMaxLine=!0),Y.collapsed)tn(ue,n.line,D.line+1);else if(Y.className||Y.startStyle||Y.endStyle||Y.css||Y.attributes||Y.title)for(var je=n.line;je<=D.line;je++)xn(ue,je,"text");Y.atomic&&Cs(ue.doc),fr(ue,"markerAdded",ue,Y)}return Y}var vo=function(e,n){this.markers=e,this.primary=n;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();fr(this,"clear")},vo.prototype.find=function(e,n){return this.primary.find(e,n)},Ae(vo);function wl(e,n,D,I,B){I=P(I),I.shared=!1;var Y=[Va(e,n,D,I,B)],re=Y[0],le=I.widgetNode;return wa(e,function(ue){le&&(I.widgetNode=le.cloneNode(!0)),Y.push(Va(ue,Dt(ue,n),Dt(ue,D),I,B));for(var ve=0;ve<ue.linked.length;++ve)if(ue.linked[ve].isParent)return;re=te(Y)}),new vo(Y,re)}function Us(e){return e.findMarks(ut(e.first,0),e.clipPos(ut(e.lastLine())),function(n){return n.parent})}function Tl(e,n){for(var D=0;D<n.length;D++){var I=n[D],B=I.find(),Y=e.clipPos(B.from),re=e.clipPos(B.to);if(It(Y,re)){var le=Va(e,Y,re,I.primary,I.primary.type);I.markers.push(le),le.parent=I}}}function Sl(e){for(var n=function(I){var B=e[I],Y=[B.primary.doc];wa(B.primary.doc,function(ue){return Y.push(ue)});for(var re=0;re<B.markers.length;re++){var le=B.markers[re];q(Y,le.doc)==-1&&(le.parent=null,B.markers.splice(re--,1))}},D=0;D<e.length;D++)n(D)}var Ol=0,Ai=function(e,n,D,I,B){if(!(this instanceof Ai))return new Ai(e,n,D,I,B);D==null&&(D=0),mo.call(this,[new po([new ii("",null)])]),this.first=D,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=D;var Y=ut(D,0);this.sel=Qi(Y),this.history=new ko(null),this.id=++Ol,this.modeOption=n,this.lineSep=I,this.direction=B=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ts(this,{from:Y,to:Y,text:e}),bi(this,Qi(Y),he)};Ai.prototype=Ee(mo.prototype,{constructor:Ai,iter:function(e,n,D){D?this.iterN(e-this.first,n-e,D):this.iterN(this.first,this.first+this.size,e)},insert:function(e,n){for(var D=0,I=0;I<n.length;++I)D+=n[I].height;this.insertInner(e-this.first,n,D)},remove:function(e,n){this.removeInner(e-this.first,n)},getValue:function(e){var n=Tr(this,this.first,this.first+this.size);return e===!1?n:n.join(e||this.lineSeparator())},setValue:Nn(function(e){var n=ut(this.first,0),D=this.first+this.size-1;Ga(this,{from:n,to:ut(D,vt(this,D).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ba(this.cm,0,0),bi(this,Qi(n),he)}),replaceRange:function(e,n,D,I){n=Dt(this,n),D=D?Dt(this,D):n,Xa(this,e,n,D,I)},getRange:function(e,n,D){var I=yr(this,Dt(this,e),Dt(this,n));return D===!1?I:I.join(D||this.lineSeparator())},getLine:function(e){var n=this.getLineHandle(e);return n&&n.text},getLineHandle:function(e){if($r(this,e))return vt(this,e)},getLineNumber:function(e){return Rt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=vt(this,e)),Gn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Dt(this,e)},getCursor:function(e){var n=this.sel.primary(),D;return e==null||e=="head"?D=n.head:e=="anchor"?D=n.anchor:e=="end"||e=="to"||e===!1?D=n.to():D=n.from(),D},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Nn(function(e,n,D){Ts(this,Dt(this,typeof e=="number"?ut(e,n||0):e),null,D)}),setSelection:Nn(function(e,n,D){Ts(this,Dt(this,e),Dt(this,n||e),D)}),extendSelection:Nn(function(e,n,D){No(this,Dt(this,e),n&&Dt(this,n),D)}),extendSelections:Nn(function(e,n){ws(this,ct(this,e),n)}),extendSelectionsBy:Nn(function(e,n){var D=be(this.sel.ranges,e);ws(this,ct(this,D),n)}),setSelections:Nn(function(e,n,D){if(!e.length)return;for(var I=[],B=0;B<e.length;B++)I[B]=new Kr(Dt(this,e[B].anchor),Dt(this,e[B].head));n==null&&(n=Math.min(e.length-1,this.sel.primIndex)),bi(this,Wi(this.cm,I,n),D)}),addSelection:Nn(function(e,n,D){var I=this.sel.ranges.slice(0);I.push(new Kr(Dt(this,e),Dt(this,n||e))),bi(this,Wi(this.cm,I,I.length-1),D)}),getSelection:function(e){for(var n=this.sel.ranges,D,I=0;I<n.length;I++){var B=yr(this,n[I].from(),n[I].to());D=D?D.concat(B):B}return e===!1?D:D.join(e||this.lineSeparator())},getSelections:function(e){for(var n=[],D=this.sel.ranges,I=0;I<D.length;I++){var B=yr(this,D[I].from(),D[I].to());e!==!1&&(B=B.join(e||this.lineSeparator())),n[I]=B}return n},replaceSelection:function(e,n,D){for(var I=[],B=0;B<this.sel.ranges.length;B++)I[B]=e;this.replaceSelections(I,n,D||"+input")},replaceSelections:Nn(function(e,n,D){for(var I=[],B=this.sel,Y=0;Y<B.ranges.length;Y++){var re=B.ranges[Y];I[Y]={from:re.from(),to:re.to(),text:this.splitLines(e[Y]),origin:D}}for(var le=n&&n!="end"&&Mo(this,I,n),ue=I.length-1;ue>=0;ue--)Ga(this,I[ue]);le?Ss(this,le):this.cm&&ya(this.cm)}),undo:Nn(function(){Uo(this,"undo")}),redo:Nn(function(){Uo(this,"redo")}),undoSelection:Nn(function(){Uo(this,"undo",!0)}),redoSelection:Nn(function(){Uo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,n=0,D=0,I=0;I<e.done.length;I++)e.done[I].ranges||++n;for(var B=0;B<e.undone.length;B++)e.undone[B].ranges||++D;return{undo:n,redo:D}},clearHistory:function(){var e=this;this.history=new ko(this.history.maxGeneration),wa(this,function(n){return n.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:Ka(this.history.done),undone:Ka(this.history.undone)}},setHistory:function(e){var n=this.history=new ko(this.history.maxGeneration);n.done=Ka(e.done.slice(0),null,!0),n.undone=Ka(e.undone.slice(0),null,!0)},setGutterMarker:Nn(function(e,n,D){return ho(this,e,"gutter",function(I){var B=I.gutterMarkers||(I.gutterMarkers={});return B[n]=D,!D&&Q(B)&&(I.gutterMarkers=null),!0})}),clearGutter:Nn(function(e){var n=this;this.iter(function(D){D.gutterMarkers&&D.gutterMarkers[e]&&ho(n,D,"gutter",function(){return D.gutterMarkers[e]=null,Q(D.gutterMarkers)&&(D.gutterMarkers=null),!0})})}),lineInfo:function(e){var n;if(typeof e=="number"){if(!$r(this,e))return null;if(n=e,e=vt(this,e),!e)return null}else if(n=Rt(e),n==null)return null;return{line:n,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Nn(function(e,n,D){return ho(this,e,n=="gutter"?"gutter":"class",function(I){var B=n=="text"?"textClass":n=="background"?"bgClass":n=="gutter"?"gutterClass":"wrapClass";if(!I[B])I[B]=D;else{if(C(D).test(I[B]))return!1;I[B]+=" "+D}return!0})}),removeLineClass:Nn(function(e,n,D){return ho(this,e,n=="gutter"?"gutter":"class",function(I){var B=n=="text"?"textClass":n=="background"?"bgClass":n=="gutter"?"gutterClass":"wrapClass",Y=I[B];if(Y)if(D==null)I[B]=null;else{var re=Y.match(C(D));if(!re)return!1;var le=re.index+re[0].length;I[B]=Y.slice(0,re.index)+(!re.index||le==Y.length?"":" ")+Y.slice(le)||null}else return!1;return!0})}),addLineWidget:Nn(function(e,n,D){return xl(this,e,n,D)}),removeLineWidget:function(e){e.clear()},markText:function(e,n,D){return Va(this,Dt(this,e),Dt(this,n),D,D&&D.type||"range")},setBookmark:function(e,n){var D={replacedWith:n&&(n.nodeType==null?n.widget:n),insertLeft:n&&n.insertLeft,clearWhenEmpty:!1,shared:n&&n.shared,handleMouseEvents:n&&n.handleMouseEvents};return e=Dt(this,e),Va(this,e,e,D,"bookmark")},findMarksAt:function(e){e=Dt(this,e);var n=[],D=vt(this,e.line).markedSpans;if(D)for(var I=0;I<D.length;++I){var B=D[I];(B.from==null||B.from<=e.ch)&&(B.to==null||B.to>=e.ch)&&n.push(B.marker.parent||B.marker)}return n},findMarks:function(e,n,D){e=Dt(this,e),n=Dt(this,n);var I=[],B=e.line;return this.iter(e.line,n.line+1,function(Y){var re=Y.markedSpans;if(re)for(var le=0;le<re.length;le++){var ue=re[le];!(ue.to!=null&&B==e.line&&e.ch>=ue.to||ue.from==null&&B!=e.line||ue.from!=null&&B==n.line&&ue.from>=n.ch)&&(!D||D(ue.marker))&&I.push(ue.marker.parent||ue.marker)}++B}),I},getAllMarks:function(){var e=[];return this.iter(function(n){var D=n.markedSpans;if(D)for(var I=0;I<D.length;++I)D[I].from!=null&&e.push(D[I].marker)}),e},posFromIndex:function(e){var n,D=this.first,I=this.lineSeparator().length;return this.iter(function(B){var Y=B.text.length+I;if(Y>e)return n=e,!0;e-=Y,++D}),Dt(this,ut(D,n))},indexFromPos:function(e){e=Dt(this,e);var n=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(I){n+=I.text.length+D}),n},copy:function(e){var n=new Ai(Tr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return n.scrollTop=this.scrollTop,n.scrollLeft=this.scrollLeft,n.sel=this.sel,n.extend=!1,e&&(n.history.undoDepth=this.history.undoDepth,n.setHistory(this.getHistory())),n},linkedDoc:function(e){e||(e={});var n=this.first,D=this.first+this.size;e.from!=null&&e.from>n&&(n=e.from),e.to!=null&&e.to<D&&(D=e.to);var I=new Ai(Tr(this,n,D),e.mode||this.modeOption,n,this.lineSep,this.direction);return e.sharedHist&&(I.history=this.history),(this.linked||(this.linked=[])).push({doc:I,sharedHist:e.sharedHist}),I.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Tl(I,Us(this)),I},unlinkDoc:function(e){if(e instanceof wn&&(e=e.doc),this.linked)for(var n=0;n<this.linked.length;++n){var D=this.linked[n];if(D.doc!=e)continue;this.linked.splice(n,1),e.unlinkDoc(this),Sl(Us(this));break}if(e.history==this.history){var I=[e.id];wa(e,function(B){return I.push(B.id)},!0),e.history=new ko(null),e.history.done=Ka(this.history.done,I),e.history.undone=Ka(this.history.undone,I)}},iterLinkedDocs:function(e){wa(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):bt(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Nn(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(n){return n.order=null}),this.cm&&pl(this.cm)})}),Ai.prototype.eachLine=Ai.prototype.iter;var Bs=0;function Cl(e){var n=this;if(Hs(n),Ge(n,e)||Bn(n.display,e))return;de(e),S&&(Bs=+new Date);var D=$n(n,e,!0),I=e.dataTransfer.files;if(!D||n.isReadOnly())return;if(I&&I.length&&window.FileReader&&window.File)for(var B=I.length,Y=Array(B),re=0,le=function(){++re==B&&Pn(n,function(){D=Dt(n.doc,D);var Qe={from:D,to:D,text:n.doc.splitLines(Y.filter(function(st){return st!=null}).join(n.doc.lineSeparator())),origin:"paste"};Ga(n.doc,Qe),Ss(n.doc,Qi(Dt(n.doc,D),Dt(n.doc,Zi(Qe))))})()},ue=function(Qe,st){if(n.options.allowDropFileTypes&&q(n.options.allowDropFileTypes,Qe.type)==-1){le();return}var ht=new FileReader;ht.onerror=function(){return le()},ht.onload=function(){var _t=ht.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(_t)){le();return}Y[st]=_t,le()},ht.readAsText(Qe)},ve=0;ve<I.length;ve++)ue(I[ve],ve);else{if(n.state.draggingText&&n.doc.sel.contains(D)>-1){n.state.draggingText(e),setTimeout(function(){return n.display.input.focus()},20);return}try{var je=e.dataTransfer.getData("Text");if(je){var Ue;if(n.state.draggingText&&!n.state.draggingText.copy&&(Ue=n.listSelections()),jo(n.doc,Qi(D,D)),Ue)for(var tt=0;tt<Ue.length;++tt)Xa(n.doc,"",Ue[tt].anchor,Ue[tt].head,"drag");n.replaceSelection(je,"around","paste"),n.display.input.focus()}}catch(Qe){}}}function Al(e,n){if(S&&(!e.state.draggingText||+new Date-Bs<100)){Ie(n);return}if(Ge(e,n)||Bn(e.display,n))return;if(n.dataTransfer.setData("Text",e.getSelection()),n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setDragImage&&!r){var D=T("img",null,null,"position: fixed; left: 0; top: 0;");D.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",l&&(D.width=D.height=1,e.display.wrapper.appendChild(D),D._top=D.offsetTop),n.dataTransfer.setDragImage(D,0,0),l&&D.parentNode.removeChild(D)}}function Rl(e,n){var D=$n(e,n);if(!D)return;var I=document.createDocumentFragment();ra(e,D,I),e.display.dragCursor||(e.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),E(e.display.dragCursor,I)}function Hs(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ws(e){if(!document.getElementsByClassName)return;for(var n=document.getElementsByClassName("CodeMirror"),D=[],I=0;I<n.length;I++){var B=n[I].CodeMirror;B&&D.push(B)}D.length&&D[0].operation(function(){for(var Y=0;Y<D.length;Y++)e(D[Y])})}var Ks=!1;function Il(){if(Ks)return;Dl(),Ks=!0}function Dl(){var e;Oe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Ws(Ll)},100))}),Oe(window,"blur",function(){return Ws(va)})}function Ll(e){var n=e.display;n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.scrollbarsClipped=!1,e.setSize()}for(var Sa={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++)Sa[yo+48]=Sa[yo+96]=String(yo);for(var Bo=65;Bo<=90;Bo++)Sa[Bo]=String.fromCharCode(Bo);for(var bo=1;bo<=12;bo++)Sa[bo+111]=Sa[bo+63235]="F"+bo;var ma={};ma.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"},ma.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"},ma.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"},ma.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"]},ma.default=c?ma.macDefault:ma.pcDefault;function Ml(e){var n=e.split(/-(?!$)/);e=n[n.length-1];for(var D,I,B,Y,re=0;re<n.length-1;re++){var le=n[re];if(/^(cmd|meta|m)$/i.test(le))Y=!0;else if(/^a(lt)?$/i.test(le))D=!0;else if(/^(c|ctrl|control)$/i.test(le))I=!0;else if(/^s(hift)?$/i.test(le))B=!0;else throw new Error("Unrecognized modifier name: "+le)}return D&&(e="Alt-"+e),I&&(e="Ctrl-"+e),Y&&(e="Cmd-"+e),B&&(e="Shift-"+e),e}function kl(e){var n={};for(var D in e)if(e.hasOwnProperty(D)){var I=e[D];if(/^(name|fallthrough|(de|at)tach)$/.test(D))continue;if(I=="..."){delete e[D];continue}for(var B=be(D.split(" "),Ml),Y=0;Y<B.length;Y++){var re=void 0,le=void 0;Y==B.length-1?(le=B.join(" "),re=I):(le=B.slice(0,Y+1).join(" "),re="...");var ue=n[le];if(!ue)n[le]=re;else if(ue!=re)throw new Error("Inconsistent bindings for "+le)}delete e[D]}for(var ve in n)e[ve]=n[ve];return e}function Ya(e,n,D,I){n=Ho(n);var B=n.call?n.call(e,I):n[e];if(B===!1)return"nothing";if(B==="...")return"multi";if(B!=null&&D(B))return"handled";if(n.fallthrough){if(Object.prototype.toString.call(n.fallthrough)!="[object Array]")return Ya(e,n.fallthrough,D,I);for(var Y=0;Y<n.fallthrough.length;Y++){var re=Ya(e,n.fallthrough[Y],D,I);if(re)return re}}}function zs(e){var n=typeof e=="string"?e:Sa[e.keyCode];return n=="Ctrl"||n=="Alt"||n=="Shift"||n=="Mod"}function Gs(e,n,D){var I=e;return n.altKey&&I!="Alt"&&(e="Alt-"+e),(h?n.metaKey:n.ctrlKey)&&I!="Ctrl"&&(e="Ctrl-"+e),(h?n.ctrlKey:n.metaKey)&&I!="Mod"&&(e="Cmd-"+e),!D&&n.shiftKey&&I!="Shift"&&(e="Shift-"+e),e}function Xs(e,n){if(l&&e.keyCode==34&&e.char)return!1;var D=Sa[e.keyCode];return D==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(D=e.code),Gs(D,e,n))}function Ho(e){return typeof e=="string"?ma[e]:e}function $a(e,n){for(var D=e.doc.sel.ranges,I=[],B=0;B<D.length;B++){for(var Y=n(D[B]);I.length&&It(Y.from,te(I).to)<=0;){var re=I.pop();if(It(re.from,Y.from)<0){Y.from=re.from;break}}I.push(Y)}xi(e,function(){for(var le=I.length-1;le>=0;le--)Xa(e.doc,"",I[le].from,I[le].to,"+delete");ya(e)})}function as(e,n,D){var I=Te(e.text,n+D,D);return I<0||I>e.text.length?null:I}function os(e,n,D){var I=as(e,n.ch,D);return I==null?null:new ut(n.line,I,D<0?"after":"before")}function ss(e,n,D,I,B){if(e){n.doc.direction=="rtl"&&(B=-B);var Y=rt(D,n.doc.direction);if(Y){var re=B<0?te(Y):Y[0],le=B<0==(re.level==1),ue=le?"after":"before",ve;if(re.level>0||n.doc.direction=="rtl"){var je=He(n,D);ve=B<0?D.text.length-1:0;var Ue=$e(n,je,ve).top;ve=ze(function(tt){return $e(n,je,tt).top==Ue},B<0==(re.level==1)?re.from:re.to-1,ve),ue=="before"&&(ve=as(D,ve,1))}else ve=B<0?re.to:re.from;return new ut(I,ve,ue)}}return new ut(I,B<0?D.text.length:0,B<0?"before":"after")}function Pl(e,n,D,I){var B=rt(n,e.doc.direction);if(!B)return os(n,D,I);D.ch>=n.text.length?(D.ch=n.text.length,D.sticky="before"):D.ch<=0&&(D.ch=0,D.sticky="after");var Y=Xe(B,D.ch,D.sticky),re=B[Y];if(e.doc.direction=="ltr"&&re.level%2==0&&(I>0?re.to>D.ch:re.from<D.ch))return os(n,D,I);var le=function(wt,Lt){return as(n,wt instanceof ut?wt.ch:wt,Lt)},ue,ve=function(wt){return e.options.lineWrapping?(ue=ue||He(e,n),Ht(e,n,ue,wt)):{begin:0,end:n.text.length}},je=ve(D.sticky=="before"?le(D,-1):D.ch);if(e.doc.direction=="rtl"||re.level==1){var Ue=re.level==1==I<0,tt=le(D,Ue?1:-1);if(tt!=null&&(Ue?tt<=re.to&&tt<=je.end:tt>=re.from&&tt>=je.begin)){var Qe=Ue?"before":"after";return new ut(D.line,tt,Qe)}}var st=function(wt,Lt,Tt){for(var Ft=function(cn,oi){return oi?new ut(D.line,le(cn,1),"before"):new ut(D.line,cn,"after")};wt>=0&&wt<B.length;wt+=Lt){var Zt=B[wt],Gt=Lt>0==(Zt.level!=1),Er=Gt?Tt.begin:le(Tt.end,-1);if(Zt.from<=Er&&Er<Zt.to)return Ft(Er,Gt);if(Er=Gt?Zt.from:le(Zt.to,-1),Tt.begin<=Er&&Er<Tt.end)return Ft(Er,Gt)}},ht=st(Y+I,I,je);if(ht)return ht;var _t=I>0?je.end:le(je.begin,-1);return _t!=null&&!(I>0&&_t==n.text.length)&&(ht=st(I>0?0:B.length-1,I,ve(_t)),ht)?ht:null}var _o={selectAll:Is,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),he)},killLine:function(e){return $a(e,function(n){if(n.empty()){var D=vt(e.doc,n.head.line).text.length;return n.head.ch==D&&n.head.line<e.lastLine()?{from:n.head,to:ut(n.head.line+1,0)}:{from:n.head,to:ut(n.head.line,D)}}else return{from:n.from(),to:n.to()}})},deleteLine:function(e){return $a(e,function(n){return{from:ut(n.from().line,0),to:Dt(e.doc,ut(n.to().line+1,0))}})},delLineLeft:function(e){return $a(e,function(n){return{from:ut(n.from().line,0),to:n.from()}})},delWrappedLineLeft:function(e){return $a(e,function(n){var D=e.charCoords(n.head,"div").top+5,I=e.coordsChar({left:0,top:D},"div");return{from:I,to:n.from()}})},delWrappedLineRight:function(e){return $a(e,function(n){var D=e.charCoords(n.head,"div").top+5,I=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:D},"div");return{from:n.from(),to:I}})},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(ut(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ut(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(n){return Vs(e,n.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(n){return Ys(e,n.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(n){return Nl(e,n.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(n){var D=e.cursorCoords(n.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:D},"div")},xe)},goLineLeft:function(e){return e.extendSelectionsBy(function(n){var D=e.cursorCoords(n.head,"div").top+5;return e.coordsChar({left:0,top:D},"div")},xe)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(n){var D=e.cursorCoords(n.head,"div").top+5,I=e.coordsChar({left:0,top:D},"div");return I.ch<e.getLine(I.line).search(/\S/)?Ys(e,n.head):I},xe)},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 n=[],D=e.listSelections(),I=e.options.tabSize,B=0;B<D.length;B++){var Y=D[B].from(),re=H(e.getLine(Y.line),Y.ch,I);n.push(se(I-re%I))}e.replaceSelections(n)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return xi(e,function(){for(var n=e.listSelections(),D=[],I=0;I<n.length;I++){if(!n[I].empty())continue;var B=n[I].head,Y=vt(e.doc,B.line).text;if(Y){if(B.ch==Y.length&&(B=new ut(B.line,B.ch-1)),B.ch>0)B=new ut(B.line,B.ch+1),e.replaceRange(Y.charAt(B.ch-1)+Y.charAt(B.ch-2),ut(B.line,B.ch-2),B,"+transpose");else if(B.line>e.doc.first){var re=vt(e.doc,B.line-1).text;re&&(B=new ut(B.line,1),e.replaceRange(Y.charAt(0)+e.doc.lineSeparator()+re.charAt(re.length-1),ut(B.line-1,re.length-1),B,"+transpose"))}}D.push(new Kr(B,B))}e.setSelections(D)})},newlineAndIndent:function(e){return xi(e,function(){for(var n=e.listSelections(),D=n.length-1;D>=0;D--)e.replaceRange(e.doc.lineSeparator(),n[D].anchor,n[D].head,"+input");n=e.listSelections();for(var I=0;I<n.length;I++)e.indentLine(n[I].from().line,null,!0);ya(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Vs(e,n){var D=vt(e.doc,n),I=Gn(D);return I!=D&&(n=Rt(I)),ss(!0,e,I,n,1)}function Nl(e,n){var D=vt(e.doc,n),I=Ni(D);return I!=D&&(n=Rt(I)),ss(!0,e,D,n,-1)}function Ys(e,n){var D=Vs(e,n.line),I=vt(e.doc,D.line),B=rt(I,e.doc.direction);if(!B||B[0].level==0){var Y=Math.max(D.ch,I.text.search(/\S/)),re=n.line==D.line&&n.ch<=Y&&n.ch;return ut(D.line,re?0:Y,D.sticky)}return D}function Wo(e,n,D){if(typeof n=="string"&&(n=_o[n],!n))return!1;e.display.input.ensurePolled();var I=e.display.shift,B=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),D&&(e.display.shift=!1),B=n(e)!=ce}finally{e.display.shift=I,e.state.suppressEdits=!1}return B}function jl(e,n,D){for(var I=0;I<e.state.keyMaps.length;I++){var B=Ya(n,e.state.keyMaps[I],D,e);if(B)return B}return e.options.extraKeys&&Ya(n,e.options.extraKeys,D,e)||Ya(n,e.options.keyMap,D,e)}var Fl=new V;function Eo(e,n,D,I){var B=e.state.keySeq;if(B){if(zs(n))return"handled";if(/\'$/.test(n)?e.state.keySeq=null:Fl.set(50,function(){e.state.keySeq==B&&(e.state.keySeq=null,e.display.input.reset())}),$s(e,B+" "+n,D,I))return!0}return $s(e,n,D,I)}function $s(e,n,D,I){var B=jl(e,n,I);return B=="multi"&&(e.state.keySeq=n),B=="handled"&&fr(e,"keyHandled",e,n,D),(B=="handled"||B=="multi")&&(de(D),Jn(e)),!!B}function Js(e,n){var D=Xs(n,!0);return D?n.shiftKey&&!e.state.keySeq?Eo(e,"Shift-"+D,n,function(I){return Wo(e,I,!0)})||Eo(e,D,n,function(I){if(typeof I=="string"?/^go[A-Z]/.test(I):I.motion)return Wo(e,I)}):Eo(e,D,n,function(I){return Wo(e,I)}):!1}function Ul(e,n,D){return Eo(e,"'"+D+"'",n,function(I){return Wo(e,I,!0)})}var ls=null;function Qs(e){var n=this;if(e.target&&e.target!=n.display.input.getField())return;if(n.curOp.focus=G(),Ge(n,e))return;S&&b<11&&e.keyCode==27&&(e.returnValue=!1);var D=e.keyCode;n.display.shift=D==16||e.shiftKey;var I=Js(n,e);l&&(ls=I?D:null,!I&&D==88&&!jt&&(c?e.metaKey:e.ctrlKey)&&n.replaceSelection("",null,"cut")),O&&!c&&!I&&D==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),D==18&&!/\bCodeMirror-crosshair\b/.test(n.display.lineDiv.className)&&Bl(n)}function Bl(e){var n=e.display.lineDiv;K(n,"CodeMirror-crosshair");function D(I){(I.keyCode==18||!I.altKey)&&(g(n,"CodeMirror-crosshair"),Ze(document,"keyup",D),Ze(document,"mouseover",D))}Oe(document,"keyup",D),Oe(document,"mouseover",D)}function Zs(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ge(this,e)}function el(e){var n=this;if(e.target&&e.target!=n.display.input.getField())return;if(Bn(n.display,e)||Ge(n,e)||e.ctrlKey&&!e.altKey||c&&e.metaKey)return;var D=e.keyCode,I=e.charCode;if(l&&D==ls){ls=null,de(e);return}if(l&&(!e.which||e.which<10)&&Js(n,e))return;var B=String.fromCharCode(I==null?D:I);if(B=="\b")return;if(Ul(n,e,B))return;n.display.input.onKeyPress(e)}var Hl=400,us=function(e,n,D){this.time=e,this.pos=n,this.button=D};us.prototype.compare=function(e,n,D){return this.time+Hl>e&&It(n,this.pos)==0&&D==this.button};var xo,wo;function Wl(e,n){var D=+new Date;return wo&&wo.compare(D,e,n)?(xo=wo=null,"triple"):xo&&xo.compare(D,e,n)?(wo=new us(D,e,n),xo=null,"double"):(xo=new us(D,e,n),wo=null,"single")}function tl(e){var n=this,D=n.display;if(Ge(n,e)||D.activeTouch&&D.input.supportsTouch())return;if(D.input.ensurePolled(),D.shift=e.shiftKey,Bn(D,e)){p||(D.scroller.draggable=!1,setTimeout(function(){return D.scroller.draggable=!0},100));return}if(cs(n,e))return;var I=$n(n,e),B=Ye(e),Y=I?Wl(I,B):"single";if(window.focus(),B==1&&n.state.selectingText&&n.state.selectingText(e),I&&Kl(n,B,I,Y,e))return;B==1?I?Gl(n,I,Y,e):ke(e)==D.scroller&&de(e):B==2?(I&&No(n.doc,I),setTimeout(function(){return D.input.focus()},20)):B==3&&(R?n.display.input.onContextMenu(e):eo(n))}function Kl(e,n,D,I,B){var Y="Click";return I=="double"?Y="Double"+Y:I=="triple"&&(Y="Triple"+Y),Y=(n==1?"Left":n==2?"Middle":"Right")+Y,Eo(e,Gs(Y,B),B,function(re){if(typeof re=="string"&&(re=_o[re]),!re)return!1;var le=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),le=re(e,D)!=ce}finally{e.state.suppressEdits=!1}return le})}function zl(e,n,D){var I=e.getOption("configureMouse"),B=I?I(e,n,D):{};if(B.unit==null){var Y=f?D.shiftKey&&D.metaKey:D.altKey;B.unit=Y?"rectangle":n=="single"?"char":n=="double"?"word":"line"}return(B.extend==null||e.doc.extend)&&(B.extend=e.doc.extend||D.shiftKey),B.addNew==null&&(B.addNew=c?D.metaKey:D.ctrlKey),B.moveOnDrag==null&&(B.moveOnDrag=!(c?D.altKey:D.ctrlKey)),B}function Gl(e,n,D,I){S?setTimeout(U(So,e),0):e.curOp.focus=G();var B=zl(e,D,I),Y=e.doc.sel,re;e.options.dragDrop&&nt&&!e.isReadOnly()&&D=="single"&&(re=Y.contains(n))>-1&&(It((re=Y.ranges[re]).from(),n)<0||n.xRel>0)&&(It(re.to(),n)>0||n.xRel<0)?Xl(e,I,n,B):Vl(e,I,n,B)}function Xl(e,n,D,I){var B=e.display,Y=!1,re=Pn(e,function(ve){p&&(B.scroller.draggable=!1),e.state.draggingText=!1,Ze(B.wrapper.ownerDocument,"mouseup",re),Ze(B.wrapper.ownerDocument,"mousemove",le),Ze(B.scroller,"dragstart",ue),Ze(B.scroller,"drop",re),Y||(de(ve),I.addNew||No(e.doc,D,null,null,I.extend),p&&!r||S&&b==9?setTimeout(function(){B.wrapper.ownerDocument.body.focus({preventScroll:!0}),B.input.focus()},20):B.input.focus())}),le=function(ve){Y=Y||Math.abs(n.clientX-ve.clientX)+Math.abs(n.clientY-ve.clientY)>=10},ue=function(){return Y=!0};p&&(B.scroller.draggable=!0),e.state.draggingText=re,re.copy=!I.moveOnDrag,B.scroller.dragDrop&&B.scroller.dragDrop(),Oe(B.wrapper.ownerDocument,"mouseup",re),Oe(B.wrapper.ownerDocument,"mousemove",le),Oe(B.scroller,"dragstart",ue),Oe(B.scroller,"drop",re),eo(e),setTimeout(function(){return B.input.focus()},20)}function rl(e,n,D){if(D=="char")return new Kr(n,n);if(D=="word")return e.findWordAt(n);if(D=="line")return new Kr(ut(n.line,0),Dt(e.doc,ut(n.line+1,0)));var I=D(e,n);return new Kr(I.from,I.to)}function Vl(e,n,D,I){var B=e.display,Y=e.doc;de(n);var re,le,ue=Y.sel,ve=ue.ranges;if(I.addNew&&!I.extend?(le=Y.sel.contains(D),le>-1?re=ve[le]:re=new Kr(D,D)):(re=Y.sel.primary(),le=Y.sel.primIndex),I.unit=="rectangle")I.addNew||(re=new Kr(D,D)),D=$n(e,n,!0,!0),le=-1;else{var je=rl(e,D,I.unit);I.extend?re=ns(re,je.anchor,je.head,I.extend):re=je}I.addNew?le==-1?(le=ve.length,bi(Y,Wi(e,ve.concat([re]),le),{scroll:!1,origin:"*mouse"})):ve.length>1&&ve[le].empty()&&I.unit=="char"&&!I.extend?(bi(Y,Wi(e,ve.slice(0,le).concat(ve.slice(le+1)),0),{scroll:!1,origin:"*mouse"}),ue=Y.sel):is(Y,le,re,ae):(le=0,bi(Y,new Ti([re],0),ae),ue=Y.sel);var Ue=D;function tt(Tt){if(It(Ue,Tt)==0)return;if(Ue=Tt,I.unit=="rectangle"){for(var Ft=[],Zt=e.options.tabSize,Gt=H(vt(Y,D.line).text,D.ch,Zt),Er=H(vt(Y,Tt.line).text,Tt.ch,Zt),cn=Math.min(Gt,Er),oi=Math.max(Gt,Er),Cn=Math.min(D.line,Tt.line),Pi=Math.min(e.lastLine(),Math.max(D.line,Tt.line));Cn<=Pi;Cn++){var Ri=vt(Y,Cn).text,Hn=ge(Ri,cn,Zt);cn==oi?Ft.push(new Kr(ut(Cn,Hn),ut(Cn,Hn))):Ri.length>Hn&&Ft.push(new Kr(ut(Cn,Hn),ut(Cn,ge(Ri,oi,Zt))))}Ft.length||Ft.push(new Kr(D,D)),bi(Y,Wi(e,ue.ranges.slice(0,le).concat(Ft),le),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Tt)}else{var Ii=re,ci=rl(e,Tt,I.unit),qn=Ii.anchor,Wn;It(ci.anchor,qn)>0?(Wn=ci.head,qn=fn(Ii.from(),ci.anchor)):(Wn=ci.anchor,qn=An(Ii.to(),ci.head));var Ln=ue.ranges.slice(0);Ln[le]=Yl(e,new Kr(Dt(Y,qn),Wn)),bi(Y,Wi(e,Ln,le),ae)}}var Qe=B.wrapper.getBoundingClientRect(),st=0;function ht(Tt){var Ft=++st,Zt=$n(e,Tt,!0,I.unit=="rectangle");if(!Zt)return;if(It(Zt,Ue)!=0){e.curOp.focus=G(),tt(Zt);var Gt=Pa(B,Y);(Zt.line>=Gt.to||Zt.line<Gt.from)&&setTimeout(Pn(e,function(){st==Ft&&ht(Tt)}),150)}else{var Er=Tt.clientY<Qe.top?-20:Tt.clientY>Qe.bottom?20:0;Er&&setTimeout(Pn(e,function(){if(st!=Ft)return;B.scroller.scrollTop+=Er,ht(Tt)}),50)}}function _t(Tt){e.state.selectingText=!1,st=Infinity,Tt&&(de(Tt),B.input.focus()),Ze(B.wrapper.ownerDocument,"mousemove",wt),Ze(B.wrapper.ownerDocument,"mouseup",Lt),Y.history.lastSelOrigin=null}var wt=Pn(e,function(Tt){Tt.buttons===0||!Ye(Tt)?_t(Tt):ht(Tt)}),Lt=Pn(e,_t);e.state.selectingText=Lt,Oe(B.wrapper.ownerDocument,"mousemove",wt),Oe(B.wrapper.ownerDocument,"mouseup",Lt)}function Yl(e,n){var D=n.anchor,I=n.head,B=vt(e.doc,D.line);if(It(D,I)==0&&D.sticky==I.sticky)return n;var Y=rt(B);if(!Y)return n;var re=Xe(Y,D.ch,D.sticky),le=Y[re];if(le.from!=D.ch&&le.to!=D.ch)return n;var ue=re+(le.from==D.ch==(le.level!=1)?0:1);if(ue==0||ue==Y.length)return n;var ve;if(I.line!=D.line)ve=(I.line-D.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var je=Xe(Y,I.ch,I.sticky),Ue=je-re||(I.ch-D.ch)*(le.level==1?-1:1);je==ue-1||je==ue?ve=Ue<0:ve=Ue>0}var tt=Y[ue+(ve?-1:0)],Qe=ve==(tt.level==1),st=Qe?tt.from:tt.to,ht=Qe?"after":"before";return D.ch==st&&D.sticky==ht?n:new Kr(new ut(D.line,st,ht),I)}function nl(e,n,D,I){var B,Y;if(n.touches)B=n.touches[0].clientX,Y=n.touches[0].clientY;else try{B=n.clientX,Y=n.clientY}catch(tt){return!1}if(B>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;I&&de(n);var re=e.display,le=re.lineDiv.getBoundingClientRect();if(Y>le.bottom||!we(e,D))return Se(n);Y-=le.top-re.viewOffset;for(var ue=0;ue<e.display.gutterSpecs.length;++ue){var ve=re.gutters.childNodes[ue];if(ve&&ve.getBoundingClientRect().right>=B){var je=br(e.doc,Y),Ue=e.display.gutterSpecs[ue];return Ne(e,D,e,je,Ue.className,n),Se(n)}}}function cs(e,n){return nl(e,n,"gutterClick",!0)}function il(e,n){if(Bn(e.display,n)||$l(e,n))return;if(Ge(e,n,"contextmenu"))return;R||e.display.input.onContextMenu(n)}function $l(e,n){return we(e,"gutterContextMenu")?nl(e,n,"gutterContextMenu",!1):!1}function al(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ur(e)}var Ja={toString:function(){return"CodeMirror.Init"}},ol={},Ko={};function Jl(e){var n=e.optionHandlers;function D(I,B,Y,re){e.defaults[I]=B,Y&&(n[I]=re?function(le,ue,ve){ve!=Ja&&Y(le,ue,ve)}:Y)}e.defineOption=D,e.Init=Ja,D("value","",function(I,B){return I.setValue(B)},!0),D("mode",null,function(I,B){I.doc.modeOption=B,pa(I)},!0),D("indentUnit",2,pa,!0),D("indentWithTabs",!1),D("smartIndent",!0),D("tabSize",4,function(I){co(I),ur(I),tn(I)},!0),D("lineSeparator",null,function(I,B){if(I.doc.lineSep=B,!B)return;var Y=[],re=I.doc.first;I.doc.iter(function(ue){for(var ve=0;;){var je=ue.text.indexOf(B,ve);if(je==-1)break;ve=je+B.length,Y.push(ut(re,je))}re++});for(var le=Y.length-1;le>=0;le--)Xa(I.doc,B,Y[le],ut(Y[le].line,Y[le].ch+B.length))}),D("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(I,B,Y){I.state.specialChars=new RegExp(B.source+(B.test(" ")?"":"| "),"g"),Y!=Ja&&I.refresh()}),D("specialCharPlaceholder",Rr,function(I){return I.refresh()},!0),D("electricChars",!0),D("inputStyle",a?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),D("spellcheck",!1,function(I,B){return I.getInputField().spellcheck=B},!0),D("autocorrect",!1,function(I,B){return I.getInputField().autocorrect=B},!0),D("autocapitalize",!1,function(I,B){return I.getInputField().autocapitalize=B},!0),D("rtlMoveVisually",!w),D("wholeLineUpdateBefore",!0),D("theme","default",function(I){al(I),Ji(I)},!0),D("keyMap","default",function(I,B,Y){var re=Ho(B),le=Y!=Ja&&Ho(Y);le&&le.detach&&le.detach(I,re),re.attach&&re.attach(I,le||null)}),D("extraKeys",null),D("configureMouse",null),D("lineWrapping",!1,Zl,!0),D("gutters",[],function(I,B){I.display.gutterSpecs=wi(B,I.options.lineNumbers),Ji(I)},!0),D("fixedGutter",!0,function(I,B){I.display.gutters.style.left=B?yi(I.display)+"px":"0",I.refresh()},!0),D("coverGutterNextToScrollbar",!1,function(I){return da(I)},!0),D("scrollbarStyle","native",function(I){Fa(I),da(I),I.display.scrollbars.setScrollTop(I.doc.scrollTop),I.display.scrollbars.setScrollLeft(I.doc.scrollLeft)},!0),D("lineNumbers",!1,function(I,B){I.display.gutterSpecs=wi(I.options.gutters,B),Ji(I)},!0),D("firstLineNumber",1,Ji,!0),D("lineNumberFormatter",function(I){return I},Ji,!0),D("showCursorWhenSelecting",!1,Qr,!0),D("resetSelectionOnContextMenu",!0),D("lineWiseCopyCut",!0),D("pasteLinesPerSelection",!0),D("selectionsMayTouch",!1),D("readOnly",!1,function(I,B){B=="nocursor"&&(va(I),I.display.input.blur()),I.display.input.readOnlyChanged(B)}),D("screenReaderLabel",null,function(I,B){B=B===""?null:B,I.display.input.screenReaderLabelChanged(B)}),D("disableInput",!1,function(I,B){B||I.display.input.reset()},!0),D("dragDrop",!0,Ql),D("allowDropFileTypes",null),D("cursorBlinkRate",530),D("cursorScrollMargin",0),D("cursorHeight",1,Qr,!0),D("singleCursorHeightPerLine",!0,Qr,!0),D("workTime",100),D("workDelay",100),D("flattenSpans",!0,co,!0),D("addModeClass",!1,co,!0),D("pollInterval",100),D("undoDepth",200,function(I,B){return I.doc.history.undoDepth=B}),D("historyEventDelay",1250),D("viewportMargin",10,function(I){return I.refresh()},!0),D("maxHighlightLength",1e4,co,!0),D("moveInputWithCursor",!0,function(I,B){B||I.display.input.resetPosition()}),D("tabindex",null,function(I,B){return I.display.input.getField().tabIndex=B||""}),D("autofocus",null),D("direction","ltr",function(I,B){return I.doc.setDirection(B)},!0),D("phrases",null)}function Ql(e,n,D){var I=D&&D!=Ja;if(!n!=!I){var B=e.display.dragFunctions,Y=n?Oe:Ze;Y(e.display.scroller,"dragstart",B.start),Y(e.display.scroller,"dragenter",B.enter),Y(e.display.scroller,"dragover",B.over),Y(e.display.scroller,"dragleave",B.leave),Y(e.display.scroller,"drop",B.drop)}}function Zl(e){e.options.lineWrapping?(K(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(g(e.display.wrapper,"CodeMirror-wrap"),ji(e)),Ei(e),tn(e),ur(e),setTimeout(function(){return da(e)},100)}function wn(e,n){var D=this;if(!(this instanceof wn))return new wn(e,n);this.options=n=n?P(n):{},P(ol,n,!1);var I=n.value;typeof I=="string"?I=new Ai(I,n.mode,null,n.lineSeparator,n.direction):n.mode&&(I.modeOption=n.mode),this.doc=I;var B=new wn.inputStyles[n.inputStyle](this),Y=this.display=new Da(e,I,B,n);Y.wrapper.CodeMirror=this,al(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fa(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 V,keySeq:null,specialChars:null},n.autofocus&&!a&&Y.input.focus(),S&&b<11&&setTimeout(function(){return D.display.input.reset(!0)},20),ql(this),Il(),aa(this),this.curOp.forceUpdate=!0,vs(this,I),n.autofocus&&!a||this.hasFocus()?setTimeout(function(){D.hasFocus()&&!D.state.focused&&na(D)},20):va(this);for(var re in Ko)Ko.hasOwnProperty(re)&&Ko[re](this,n[re],Ja);Qn(this),n.finishInit&&n.finishInit(this);for(var le=0;le<ds.length;++le)ds[le](this);fa(this),p&&n.lineWrapping&&getComputedStyle(Y.lineDiv).textRendering=="optimizelegibility"&&(Y.lineDiv.style.textRendering="auto")}wn.defaults=ol,wn.optionHandlers=Ko;function ql(e){var n=e.display;Oe(n.scroller,"mousedown",Pn(e,tl)),S&&b<11?Oe(n.scroller,"dblclick",Pn(e,function(ue){if(Ge(e,ue))return;var ve=$n(e,ue);if(!ve||cs(e,ue)||Bn(e.display,ue))return;de(ue);var je=e.findWordAt(ve);No(e.doc,je.anchor,je.head)})):Oe(n.scroller,"dblclick",function(ue){return Ge(e,ue)||de(ue)}),Oe(n.scroller,"contextmenu",function(ue){return il(e,ue)}),Oe(n.input.getField(),"contextmenu",function(ue){n.scroller.contains(ue.target)||il(e,ue)});var D,I={end:0};function B(){n.activeTouch&&(D=setTimeout(function(){return n.activeTouch=null},1e3),I=n.activeTouch,I.end=+new Date)}function Y(ue){if(ue.touches.length!=1)return!1;var ve=ue.touches[0];return ve.radiusX<=1&&ve.radiusY<=1}function re(ue,ve){if(ve.left==null)return!0;var je=ve.left-ue.left,Ue=ve.top-ue.top;return je*je+Ue*Ue>20*20}Oe(n.scroller,"touchstart",function(ue){if(!Ge(e,ue)&&!Y(ue)&&!cs(e,ue)){n.input.ensurePolled(),clearTimeout(D);var ve=+new Date;n.activeTouch={start:ve,moved:!1,prev:ve-I.end<=300?I:null},ue.touches.length==1&&(n.activeTouch.left=ue.touches[0].pageX,n.activeTouch.top=ue.touches[0].pageY)}}),Oe(n.scroller,"touchmove",function(){n.activeTouch&&(n.activeTouch.moved=!0)}),Oe(n.scroller,"touchend",function(ue){var ve=n.activeTouch;if(ve&&!Bn(n,ue)&&ve.left!=null&&!ve.moved&&new Date-ve.start<300){var je=e.coordsChar(n.activeTouch,"page"),Ue;!ve.prev||re(ve,ve.prev)?Ue=new Kr(je,je):!ve.prev.prev||re(ve,ve.prev.prev)?Ue=e.findWordAt(je):Ue=new Kr(ut(je.line,0),Dt(e.doc,ut(je.line+1,0))),e.setSelection(Ue.anchor,Ue.head),e.focus(),de(ue)}B()}),Oe(n.scroller,"touchcancel",B),Oe(n.scroller,"scroll",function(){n.scroller.clientHeight&&(_a(e,n.scroller.scrollTop),Bi(e,n.scroller.scrollLeft,!0),Ne(e,"scroll",e))}),Oe(n.scroller,"mousewheel",function(ue){return lo(e,ue)}),Oe(n.scroller,"DOMMouseScroll",function(ue){return lo(e,ue)}),Oe(n.wrapper,"scroll",function(){return n.wrapper.scrollTop=n.wrapper.scrollLeft=0}),n.dragFunctions={enter:function(ue){Ge(e,ue)||Ie(ue)},over:function(ue){Ge(e,ue)||(Rl(e,ue),Ie(ue))},start:function(ue){return Al(e,ue)},drop:Pn(e,Cl),leave:function(ue){Ge(e,ue)||Hs(e)}};var le=n.input.getField();Oe(le,"keyup",function(ue){return Zs.call(e,ue)}),Oe(le,"keydown",Pn(e,Qs)),Oe(le,"keypress",Pn(e,el)),Oe(le,"focus",function(ue){return na(e,ue)}),Oe(le,"blur",function(ue){return va(e,ue)})}var ds=[];wn.defineInitHook=function(e){return ds.push(e)};function To(e,n,D,I){var B=e.doc,Y;D==null&&(D="add"),D=="smart"&&(B.mode.indent?Y=bn(e,n).state:D="prev");var re=e.options.tabSize,le=vt(B,n),ue=H(le.text,null,re);le.stateAfter&&(le.stateAfter=null);var ve=le.text.match(/^\s*/)[0],je;if(!I&&!/\S/.test(le.text))je=0,D="not";else if(D=="smart"&&(je=B.mode.indent(Y,le.text.slice(ve.length),le.text),je==ce||je>150)){if(!I)return;D="prev"}D=="prev"?n>B.first?je=H(vt(B,n-1).text,null,re):je=0:D=="add"?je=ue+e.options.indentUnit:D=="subtract"?je=ue-e.options.indentUnit:typeof D=="number"&&(je=ue+D),je=Math.max(0,je);var Ue="",tt=0;if(e.options.indentWithTabs)for(var Qe=Math.floor(je/re);Qe;--Qe)tt+=re,Ue+=" ";if(tt<je&&(Ue+=se(je-tt)),Ue!=ve)return Xa(B,Ue,ut(n,0),ut(n,ve.length),"+input"),le.stateAfter=null,!0;for(var st=0;st<B.sel.ranges.length;st++){var ht=B.sel.ranges[st];if(ht.head.line==n&&ht.head.ch<ve.length){var _t=ut(n,ve.length);is(B,st,new Kr(_t,_t));break}}}var qi=null;function zo(e){qi=e}function fs(e,n,D,I,B){var Y=e.doc;e.display.shift=!1,I||(I=Y.sel);var re=+new Date-200,le=B=="paste"||e.state.pasteIncoming>re,ue=bt(n),ve=null;if(le&&I.ranges.length>1)if(qi&&qi.text.join(`
`)==n){if(I.ranges.length%qi.text.length==0){ve=[];for(var je=0;je<qi.text.length;je++)ve.push(Y.splitLines(qi.text[je]))}}else ue.length==I.ranges.length&&e.options.pasteLinesPerSelection&&(ve=be(ue,function(wt){return[wt]}));for(var Ue=e.curOp.updateInput,tt=I.ranges.length-1;tt>=0;tt--){var Qe=I.ranges[tt],st=Qe.from(),ht=Qe.to();Qe.empty()&&(D&&D>0?st=ut(st.line,st.ch-D):e.state.overwrite&&!le?ht=ut(ht.line,Math.min(vt(Y,ht.line).text.length,ht.ch+te(ue).length)):le&&qi&&qi.lineWise&&qi.text.join(`
`)==ue.join(`
`)&&(st=ht=ut(st.line,0)));var _t={from:st,to:ht,text:ve?ve[tt%ve.length]:ue,origin:B||(le?"paste":e.state.cutIncoming>re?"cut":"+input")};Ga(e.doc,_t),fr(e,"inputRead",e,_t)}n&&!le&&ll(e,n),ya(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ue),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function sl(e,n){var D=e.clipboardData&&e.clipboardData.getData("Text");if(D)return e.preventDefault(),!n.isReadOnly()&&!n.options.disableInput&&xi(n,function(){return fs(n,D,0,null,"paste")}),!0}function ll(e,n){if(!e.options.electricChars||!e.options.smartIndent)return;for(var D=e.doc.sel,I=D.ranges.length-1;I>=0;I--){var B=D.ranges[I];if(B.head.ch>100||I&&D.ranges[I-1].head.line==B.head.line)continue;var Y=e.getModeAt(B.head),re=!1;if(Y.electricChars){for(var le=0;le<Y.electricChars.length;le++)if(n.indexOf(Y.electricChars.charAt(le))>-1){re=To(e,B.head.line,"smart");break}}else Y.electricInput&&(Y.electricInput.test(vt(e.doc,B.head.line).text.slice(0,B.head.ch))&&(re=To(e,B.head.line,"smart")));re&&fr(e,"electricInput",e,B.head.line)}}function ul(e){for(var n=[],D=[],I=0;I<e.doc.sel.ranges.length;I++){var B=e.doc.sel.ranges[I].head.line,Y={anchor:ut(B,0),head:ut(B+1,0)};D.push(Y),n.push(e.getRange(Y.anchor,Y.head))}return{text:n,ranges:D}}function cl(e,n,D,I){e.setAttribute("autocorrect",D?"":"off"),e.setAttribute("autocapitalize",I?"":"off"),e.setAttribute("spellcheck",!!n)}function dl(){var e=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),n=T("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return p?e.style.width="1000px":e.setAttribute("wrap","off"),s&&(e.style.border="1px solid black"),cl(e),n}function eu(e){var n=e.optionHandlers,D=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(I,B){var Y=this.options,re=Y[I];if(Y[I]==B&&I!="mode")return;Y[I]=B,n.hasOwnProperty(I)&&Pn(this,n[I])(this,B,re),Ne(this,"optionChange",this,I)},getOption:function(I){return this.options[I]},getDoc:function(){return this.doc},addKeyMap:function(I,B){this.state.keyMaps[B?"push":"unshift"](Ho(I))},removeKeyMap:function(I){for(var B=this.state.keyMaps,Y=0;Y<B.length;++Y)if(B[Y]==I||B[Y].name==I)return B.splice(Y,1),!0},addOverlay:ui(function(I,B){var Y=I.token?I:e.getMode(this.options,I);if(Y.startState)throw new Error("Overlays may not be stateful.");ee(this.state.overlays,{mode:Y,modeSpec:I,opaque:B&&B.opaque,priority:B&&B.priority||0},function(re){return re.priority}),this.state.modeGen++,tn(this)}),removeOverlay:ui(function(I){for(var B=this.state.overlays,Y=0;Y<B.length;++Y){var re=B[Y].modeSpec;if(re==I||typeof I=="string"&&re.name==I){B.splice(Y,1),this.state.modeGen++,tn(this);return}}}),indentLine:ui(function(I,B,Y){typeof B!="string"&&typeof B!="number"&&(B==null?B=this.options.smartIndent?"smart":"prev":B=B?"add":"subtract"),$r(this.doc,I)&&To(this,I,B,Y)}),indentSelection:ui(function(I){for(var B=this.doc.sel.ranges,Y=-1,re=0;re<B.length;re++){var le=B[re];if(le.empty())le.head.line>Y&&(To(this,le.head.line,I,!0),Y=le.head.line,re==this.doc.sel.primIndex&&ya(this));else{var ue=le.from(),ve=le.to(),je=Math.max(Y,ue.line);Y=Math.min(this.lastLine(),ve.line-(ve.ch?0:1))+1;for(var Ue=je;Ue<Y;++Ue)To(this,Ue,I);var tt=this.doc.sel.ranges;ue.ch==0&&B.length==tt.length&&tt[re].from().ch>0&&is(this.doc,re,new Kr(ue,tt[re].to()),he)}}}),getTokenAt:function(I,B){return fi(this,I,B)},getLineTokens:function(I,B){return fi(this,ut(I),B,!0)},getTokenTypeAt:function(I){I=Dt(this.doc,I);var B=Tn(this,vt(this.doc,I.line)),Y=0,re=(B.length-1)/2,le=I.ch,ue;if(le==0)ue=B[2];else for(;;){var ve=Y+re>>1;if((ve?B[ve*2-1]:0)>=le)re=ve;else if(B[ve*2+1]<le)Y=ve+1;else{ue=B[ve*2+2];break}}var je=ue?ue.indexOf("overlay "):-1;return je<0?ue:je==0?null:ue.slice(0,je-1)},getModeAt:function(I){var B=this.doc.mode;return B.innerMode?e.innerMode(B,this.getTokenAt(I).state).mode:B},getHelper:function(I,B){return this.getHelpers(I,B)[0]},getHelpers:function(I,B){var Y=[];if(!D.hasOwnProperty(B))return Y;var re=D[B],le=this.getModeAt(I);if(typeof le[B]=="string")re[le[B]]&&Y.push(re[le[B]]);else if(le[B])for(var ue=0;ue<le[B].length;ue++){var ve=re[le[B][ue]];ve&&Y.push(ve)}else le.helperType&&re[le.helperType]?Y.push(re[le.helperType]):re[le.name]&&Y.push(re[le.name]);for(var je=0;je<re._global.length;je++){var Ue=re._global[je];Ue.pred(le,this)&&q(Y,Ue.val)==-1&&Y.push(Ue.val)}return Y},getStateAfter:function(I,B){var Y=this.doc;return I=zr(Y,I==null?Y.first+Y.size-1:I),bn(this,I+1,B).state},cursorCoords:function(I,B){var Y,re=this.doc.sel.primary();return I==null?Y=re.head:typeof I=="object"?Y=Dt(this.doc,I):Y=I?re.from():re.to(),wr(this,Y,B||"page")},charCoords:function(I,B){return gn(this,Dt(this.doc,I),B||"page")},coordsChar:function(I,B){return I=xr(this,I,B||"page"),Or(this,I.left,I.top)},lineAtHeight:function(I,B){return I=xr(this,{top:I,left:0},B||"page").top,br(this.doc,I+this.display.viewOffset)},heightAtLine:function(I,B,Y){var re=!1,le;if(typeof I=="number"){var ue=this.doc.first+this.doc.size-1;I<this.doc.first?I=this.doc.first:I>ue&&(I=ue,re=!0),le=vt(this.doc,I)}else le=I;return Lr(this,le,{top:0,left:0},B||"page",Y||re).top+(re?this.doc.height-ni(le):0)},defaultTextHeight:function(){return Dn(this.display)},defaultCharWidth:function(){return Yn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(I,B,Y,re,le){var ue=this.display;I=wr(this,Dt(this.doc,I));var ve=I.bottom,je=I.left;if(B.style.position="absolute",B.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(B),ue.sizer.appendChild(B),re=="over")ve=I.top;else if(re=="above"||re=="near"){var Ue=Math.max(ue.wrapper.clientHeight,this.doc.height),tt=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(re=="above"||I.bottom+B.offsetHeight>Ue)&&I.top>B.offsetHeight?ve=I.top-B.offsetHeight:I.bottom+B.offsetHeight<=Ue&&(ve=I.bottom),je+B.offsetWidth>tt&&(je=tt-B.offsetWidth)}B.style.top=ve+"px",B.style.left=B.style.right="",le=="right"?(je=ue.sizer.clientWidth-B.offsetWidth,B.style.right="0px"):(le=="left"?je=0:le=="middle"&&(je=(ue.sizer.clientWidth-B.offsetWidth)/2),B.style.left=je+"px"),Y&&Oo(this,{left:je,top:ve,right:je+B.offsetWidth,bottom:ve+B.offsetHeight})},triggerOnKeyDown:ui(Qs),triggerOnKeyPress:ui(el),triggerOnKeyUp:Zs,triggerOnMouseDown:ui(tl),execCommand:function(I){if(_o.hasOwnProperty(I))return _o[I].call(null,this)},triggerElectric:ui(function(I){ll(this,I)}),findPosH:function(I,B,Y,re){var le=1;B<0&&(le=-1,B=-B);for(var ue=Dt(this.doc,I),ve=0;ve<B&&!(ue=hs(this.doc,ue,le,Y,re),ue.hitSide);++ve);return ue},moveH:ui(function(I,B){var Y=this;this.extendSelectionsBy(function(re){return Y.display.shift||Y.doc.extend||re.empty()?hs(Y.doc,re.head,I,B,Y.options.rtlMoveVisually):I<0?re.from():re.to()},xe)}),deleteH:ui(function(I,B){var Y=this.doc.sel,re=this.doc;Y.somethingSelected()?re.replaceSelection("",null,"+delete"):$a(this,function(le){var ue=hs(re,le.head,I,B,!1);return I<0?{from:ue,to:le.head}:{from:le.head,to:ue}})}),findPosV:function(I,B,Y,re){var le=1,ue=re;B<0&&(le=-1,B=-B);for(var ve=Dt(this.doc,I),je=0;je<B;++je){var Ue=wr(this,ve,"div");if(ue==null?ue=Ue.left:Ue.left=ue,ve=fl(this,Ue,le,Y),ve.hitSide)break}return ve},moveV:ui(function(I,B){var Y=this,re=this.doc,le=[],ue=!this.display.shift&&!re.extend&&re.sel.somethingSelected();if(re.extendSelectionsBy(function(je){if(ue)return I<0?je.from():je.to();var Ue=wr(Y,je.head,"div");je.goalColumn!=null&&(Ue.left=je.goalColumn),le.push(Ue.left);var tt=fl(Y,Ue,I,B);return B=="page"&&je==re.sel.primary()&&no(Y,gn(Y,tt,"div").top-Ue.top),tt},xe),le.length)for(var ve=0;ve<re.sel.ranges.length;ve++)re.sel.ranges[ve].goalColumn=le[ve]}),findWordAt:function(I){var B=this.doc,Y=vt(B,I.line).text,re=I.ch,le=I.ch;if(Y){var ue=this.getHelper(I,"wordChars");(I.sticky=="before"||le==Y.length)&&re?--re:++le;for(var ve=Y.charAt(re),je=X(ve,ue)?function(Ue){return X(Ue,ue)}:/\s/.test(ve)?function(Ue){return/\s/.test(Ue)}:function(Ue){return!/\s/.test(Ue)&&!X(Ue)};re>0&&je(Y.charAt(re-1));)--re;for(;le<Y.length&&je(Y.charAt(le));)++le}return new Kr(ut(I.line,re),ut(I.line,le))},toggleOverwrite:function(I){if(I!=null&&I==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?K(this.display.cursorDiv,"CodeMirror-overwrite"):g(this.display.cursorDiv,"CodeMirror-overwrite"),Ne(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==G()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ui(function(I,B){ba(this,I,B)}),getScrollInfo:function(){var I=this.display.scroller;return{left:I.scrollLeft,top:I.scrollTop,height:I.scrollHeight-Ke(this)-this.display.barHeight,width:I.scrollWidth-Ke(this)-this.display.barWidth,clientHeight:pe(this),clientWidth:Me(this)}},scrollIntoView:ui(function(I,B){I==null?(I={from:this.doc.sel.primary().head,to:null},B==null&&(B=this.options.cursorScrollMargin)):typeof I=="number"?I={from:ut(I,0),to:null}:I.from==null&&(I={from:I,to:null}),I.to||(I.to=I.from),I.margin=B||0,I.from.line!=null?$o(this,I):Ca(this,I.from,I.to,I.margin)}),setSize:ui(function(I,B){var Y=this,re=function(ue){return typeof ue=="number"||/^\d+$/.test(String(ue))?ue+"px":ue};I!=null&&(this.display.wrapper.style.width=re(I)),B!=null&&(this.display.wrapper.style.height=re(B)),this.options.lineWrapping&&or(this);var le=this.display.viewFrom;this.doc.iter(le,this.display.viewTo,function(ue){if(ue.widgets){for(var ve=0;ve<ue.widgets.length;ve++)if(ue.widgets[ve].noHScroll){xn(Y,le,"widget");break}}++le}),this.curOp.forceUpdate=!0,Ne(this,"refresh",this)}),operation:function(I){return xi(this,I)},startOperation:function(){return aa(this)},endOperation:function(){return fa(this)},refresh:ui(function(){var I=this.display.cachedTextHeight;tn(this),this.curOp.forceUpdate=!0,ur(this),ba(this,this.doc.scrollLeft,this.doc.scrollTop),Ba(this.display),(I==null||Math.abs(I-Dn(this.display))>.5||this.options.lineWrapping)&&Ei(this),Ne(this,"refresh",this)}),swapDoc:ui(function(I){var B=this.doc;return B.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,I),ur(this),this.display.input.reset(),ba(this,I.scrollLeft,I.scrollTop),this.curOp.forceScroll=!0,fr(this,"swapDoc",this,B),B}),phrase:function(I){var B=this.options.phrases;return B&&Object.prototype.hasOwnProperty.call(B,I)?B[I]:I},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}},Ae(e),e.registerHelper=function(I,B,Y){D.hasOwnProperty(I)||(D[I]=e[I]={_global:[]}),D[I][B]=Y},e.registerGlobalHelper=function(I,B,Y,re){e.registerHelper(I,B,re),D[I]._global.push({pred:Y,val:re})}}function hs(e,n,D,I,B){var Y=n,re=D,le=vt(e,n.line),ue=B&&e.direction=="rtl"?-D:D;function ve(){var Lt=n.line+ue;return Lt<e.first||Lt>=e.first+e.size?!1:(n=new ut(Lt,n.ch,n.sticky),le=vt(e,Lt))}function je(Lt){var Tt;if(I=="codepoint"){var Ft=le.text.charCodeAt(n.ch+(I>0?0:-1));isNaN(Ft)?Tt=null:Tt=new ut(n.line,Math.max(0,Math.min(le.text.length,n.ch+D*(Ft>=55296&&Ft<56320?2:1))),-D)}else B?Tt=Pl(e.cm,le,n,D):Tt=os(le,n,D);if(Tt==null)if(!Lt&&ve())n=ss(B,e.cm,le,n.line,ue);else return!1;else n=Tt;return!0}if(I=="char"||I=="codepoint")je();else if(I=="column")je(!0);else if(I=="word"||I=="group")for(var Ue=null,tt=I=="group",Qe=e.cm&&e.cm.getHelper(n,"wordChars"),st=!0;!(D<0&&!je(!st));st=!1){var ht=le.text.charAt(n.ch)||`
`,_t=X(ht,Qe)?"w":tt&&ht==`
`?"n":!tt||/\s/.test(ht)?null:"p";if(tt&&!st&&!_t&&(_t="s"),Ue&&Ue!=_t){D<0&&(D=1,je(),n.sticky="after");break}if(_t&&(Ue=_t),D>0&&!je(!st))break}var wt=Fo(e,n,Y,re,!0);return Br(Y,wt)&&(wt.hitSide=!0),wt}function fl(e,n,D,I){var B=e.doc,Y=n.left,re;if(I=="page"){var le=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(le-.5*Dn(e.display),3);re=(D>0?n.bottom:n.top)+D*ue}else I=="line"&&(re=D>0?n.bottom+3:n.top-3);for(var ve;!(ve=Or(e,Y,re),!ve.outside);){if(D<0?re<=0:re>=B.height){ve.hitSide=!0;break}re+=D*5}return ve}var rn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new V,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};rn.prototype.init=function(e){var n=this,D=this,I=D.cm,B=D.div=e.lineDiv;cl(B,I.options.spellcheck,I.options.autocorrect,I.options.autocapitalize);function Y(le){for(var ue=le.target;ue;ue=ue.parentNode){if(ue==B)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ue.className))break}return!1}Oe(B,"paste",function(le){if(!Y(le)||Ge(I,le)||sl(le,I))return;b<=11&&setTimeout(Pn(I,function(){return n.updateFromDOM()}),20)}),Oe(B,"compositionstart",function(le){n.composing={data:le.data,done:!1}}),Oe(B,"compositionupdate",function(le){n.composing||(n.composing={data:le.data,done:!1})}),Oe(B,"compositionend",function(le){n.composing&&(le.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Oe(B,"touchstart",function(){return D.forceCompositionEnd()}),Oe(B,"input",function(){n.composing||n.readFromDOMSoon()});function re(le){if(!Y(le)||Ge(I,le))return;if(I.somethingSelected())zo({lineWise:!1,text:I.getSelections()}),le.type=="cut"&&I.replaceSelection("",null,"cut");else if(I.options.lineWiseCopyCut){var ue=ul(I);zo({lineWise:!0,text:ue.text}),le.type=="cut"&&I.operation(function(){I.setSelections(ue.ranges,0,he),I.replaceSelection("",null,"cut")})}else return;if(le.clipboardData){le.clipboardData.clearData();var ve=qi.text.join(`
`);if(le.clipboardData.setData("Text",ve),le.clipboardData.getData("Text")==ve){le.preventDefault();return}}var je=dl(),Ue=je.firstChild;I.display.lineSpace.insertBefore(je,I.display.lineSpace.firstChild),Ue.value=qi.text.join(`
`);var tt=document.activeElement;z(Ue),setTimeout(function(){I.display.lineSpace.removeChild(je),tt.focus(),tt==B&&D.showPrimarySelection()},50)}Oe(B,"copy",re),Oe(B,"cut",re)},rn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},rn.prototype.prepareSelection=function(){var e=Vi(this.cm,!1);return e.focus=document.activeElement==this.div,e},rn.prototype.showSelection=function(e,n){if(!e||!this.cm.display.view.length)return;(e.focus||n)&&this.showPrimarySelection(),this.showMultipleSelections(e)},rn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},rn.prototype.showPrimarySelection=function(){var e=this.getSelection(),n=this.cm,D=n.doc.sel.primary(),I=D.from(),B=D.to();if(n.display.viewTo==n.display.viewFrom||I.line>=n.display.viewTo||B.line<n.display.viewFrom){e.removeAllRanges();return}var Y=Go(n,e.anchorNode,e.anchorOffset),re=Go(n,e.focusNode,e.focusOffset);if(Y&&!Y.bad&&re&&!re.bad&&It(fn(Y,re),I)==0&&It(An(Y,re),B)==0)return;var le=n.display.view,ue=I.line>=n.display.viewFrom&&hl(n,I)||{node:le[0].measure.map[2],offset:0},ve=B.line<n.display.viewTo&&hl(n,B);if(!ve){var je=le[le.length-1].measure,Ue=je.maps?je.maps[je.maps.length-1]:je.map;ve={node:Ue[Ue.length-1],offset:Ue[Ue.length-2]-Ue[Ue.length-3]}}if(!ue||!ve){e.removeAllRanges();return}var tt=e.rangeCount&&e.getRangeAt(0),Qe;try{Qe=L(ue.node,ue.offset,ve.offset,ve.node)}catch(st){}Qe&&(!O&&n.state.focused?(e.collapse(ue.node,ue.offset),Qe.collapsed||(e.removeAllRanges(),e.addRange(Qe))):(e.removeAllRanges(),e.addRange(Qe)),tt&&e.anchorNode==null?e.addRange(tt):O&&this.startGracePeriod()),this.rememberSelection()},rn.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)},rn.prototype.showMultipleSelections=function(e){E(this.cm.display.cursorDiv,e.cursors),E(this.cm.display.selectionDiv,e.selection)},rn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},rn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var n=e.getRangeAt(0).commonAncestorContainer;return A(this.div,n)},rn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},rn.prototype.blur=function(){this.div.blur()},rn.prototype.getField=function(){return this.div},rn.prototype.supportsTouch=function(){return!0},rn.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():xi(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function n(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,n))}this.polling.set(this.cm.options.pollInterval,n)},rn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},rn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),n=this.cm;if(u&&t&&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(n,e.anchorNode,e.anchorOffset),I=Go(n,e.focusNode,e.focusOffset);D&&I&&xi(n,function(){bi(n.doc,Qi(D,I),he),(D.bad||I.bad)&&(n.curOp.selectionChanged=!0)})},rn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,n=e.display,D=e.doc.sel.primary(),I=D.from(),B=D.to();if(I.ch==0&&I.line>e.firstLine()&&(I=ut(I.line-1,vt(e.doc,I.line-1).length)),B.ch==vt(e.doc,B.line).text.length&&B.line<e.lastLine()&&(B=ut(B.line+1,0)),I.line<n.viewFrom||B.line>n.viewTo-1)return!1;var Y,re,le;I.line==n.viewFrom||(Y=un(e,I.line))==0?(re=Rt(n.view[0].line),le=n.view[0].node):(re=Rt(n.view[Y].line),le=n.view[Y-1].node.nextSibling);var ue=un(e,B.line),ve,je;if(ue==n.view.length-1?(ve=n.viewTo-1,je=n.lineDiv.lastChild):(ve=Rt(n.view[ue+1].line)-1,je=n.view[ue+1].node.previousSibling),!le)return!1;for(var Ue=e.doc.splitLines(ru(e,le,je,re,ve)),tt=yr(e.doc,ut(re,0),ut(ve,vt(e.doc,ve).text.length));Ue.length>1&&tt.length>1;)if(te(Ue)==te(tt))Ue.pop(),tt.pop(),ve--;else if(Ue[0]==tt[0])Ue.shift(),tt.shift(),re++;else break;for(var Qe=0,st=0,ht=Ue[0],_t=tt[0],wt=Math.min(ht.length,_t.length);Qe<wt&&ht.charCodeAt(Qe)==_t.charCodeAt(Qe);)++Qe;for(var Lt=te(Ue),Tt=te(tt),Ft=Math.min(Lt.length-(Ue.length==1?Qe:0),Tt.length-(tt.length==1?Qe:0));st<Ft&&Lt.charCodeAt(Lt.length-st-1)==Tt.charCodeAt(Tt.length-st-1);)++st;if(Ue.length==1&&tt.length==1&&re==I.line)for(;Qe&&Qe>I.ch&&Lt.charCodeAt(Lt.length-st-1)==Tt.charCodeAt(Tt.length-st-1);)Qe--,st++;Ue[Ue.length-1]=Lt.slice(0,Lt.length-st).replace(/^\u200b+/,""),Ue[0]=Ue[0].slice(Qe).replace(/\u200b+$/,"");var Zt=ut(re,Qe),Gt=ut(ve,tt.length?te(tt).length-st:0);if(Ue.length>1||Ue[0]||It(Zt,Gt))return Xa(e.doc,Ue,Zt,Gt,"+input"),!0},rn.prototype.ensurePolled=function(){this.forceCompositionEnd()},rn.prototype.reset=function(){this.forceCompositionEnd()},rn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},rn.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)},rn.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&xi(this.cm,function(){return tn(e.cm)})},rn.prototype.setUneditable=function(e){e.contentEditable="false"},rn.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Pn(this.cm,fs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},rn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},rn.prototype.onContextMenu=function(){},rn.prototype.resetPosition=function(){},rn.prototype.needsContentAttribute=!0;function hl(e,n){var D=We(e,n.line);if(!D||D.hidden)return null;var I=vt(e.doc,n.line),B=ye(D,I,n.line),Y=rt(I,e.doc.direction),re="left";if(Y){var le=Xe(Y,n.ch);re=le%2?"right":"left"}var ue=gt(B.map,n.ch,re);return ue.offset=ue.collapse=="right"?ue.end:ue.start,ue}function tu(e){for(var n=e;n;n=n.parentNode)if(/CodeMirror-gutter-wrapper/.test(n.className))return!0;return!1}function Qa(e,n){return n&&(e.bad=!0),e}function ru(e,n,D,I,B){var Y="",re=!1,le=e.doc.lineSeparator(),ue=!1;function ve(Qe){return function(st){return st.id==Qe}}function je(){re&&(Y+=le,ue&&(Y+=le),re=ue=!1)}function Ue(Qe){Qe&&(je(),Y+=Qe)}function tt(Qe){if(Qe.nodeType==1){var st=Qe.getAttribute("cm-text");if(st){Ue(st);return}var ht=Qe.getAttribute("cm-marker"),_t;if(ht){var wt=e.findMarks(ut(I,0),ut(B+1,0),ve(+ht));wt.length&&(_t=wt[0].find(0))&&Ue(yr(e.doc,_t.from,_t.to).join(le));return}if(Qe.getAttribute("contenteditable")=="false")return;var Lt=/^(pre|div|p|li|table|br)$/i.test(Qe.nodeName);if(!/^br$/i.test(Qe.nodeName)&&Qe.textContent.length==0)return;Lt&&je();for(var Tt=0;Tt<Qe.childNodes.length;Tt++)tt(Qe.childNodes[Tt]);/^(pre|p)$/i.test(Qe.nodeName)&&(ue=!0),Lt&&(re=!0)}else Qe.nodeType==3&&Ue(Qe.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(tt(n),n==D);)n=n.nextSibling,ue=!1;return Y}function Go(e,n,D){var I;if(n==e.display.lineDiv){if(I=e.display.lineDiv.childNodes[D],!I)return Qa(e.clipPos(ut(e.display.viewTo-1)),!0);n=null,D=0}else for(I=n;;I=I.parentNode){if(!I||I==e.display.lineDiv)return null;if(I.parentNode&&I.parentNode==e.display.lineDiv)break}for(var B=0;B<e.display.view.length;B++){var Y=e.display.view[B];if(Y.node==I)return nu(Y,n,D)}}function nu(e,n,D){var I=e.text.firstChild,B=!1;if(!n||!A(I,n))return Qa(ut(Rt(e.line),0),!0);if(n==I&&(B=!0,n=I.childNodes[D],D=0,!n)){var Y=e.rest?te(e.rest):e.line;return Qa(ut(Rt(Y),Y.text.length),B)}var re=n.nodeType==3?n:null,le=n;for(!re&&n.childNodes.length==1&&n.firstChild.nodeType==3&&(re=n.firstChild,D&&(D=re.nodeValue.length));le.parentNode!=I;)le=le.parentNode;var ue=e.measure,ve=ue.maps;function je(_t,wt,Lt){for(var Tt=-1;Tt<(ve?ve.length:0);Tt++)for(var Ft=Tt<0?ue.map:ve[Tt],Zt=0;Zt<Ft.length;Zt+=3){var Gt=Ft[Zt+2];if(Gt==_t||Gt==wt){var Er=Rt(Tt<0?e.line:e.rest[Tt]),cn=Ft[Zt]+Lt;return(Lt<0||Gt!=_t)&&(cn=Ft[Zt+(Lt?1:0)]),ut(Er,cn)}}}var Ue=je(re,le,D);if(Ue)return Qa(Ue,B);for(var tt=le.nextSibling,Qe=re?re.nodeValue.length-D:0;tt;tt=tt.nextSibling){if(Ue=je(tt,tt.firstChild,0),Ue)return Qa(ut(Ue.line,Ue.ch-Qe),B);Qe+=tt.textContent.length}for(var st=le.previousSibling,ht=D;st;st=st.previousSibling){if(Ue=je(st,st.firstChild,-1),Ue)return Qa(ut(Ue.line,Ue.ch+ht),B);ht+=st.textContent.length}}var jn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new V,this.hasSelection=!1,this.composing=null};jn.prototype.init=function(e){var n=this,D=this,I=this.cm;this.createField(e);var B=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),s&&(B.style.width="0px"),Oe(B,"input",function(){S&&b>=9&&n.hasSelection&&(n.hasSelection=null),D.poll()}),Oe(B,"paste",function(re){if(Ge(I,re)||sl(re,I))return;I.state.pasteIncoming=+new Date,D.fastPoll()});function Y(re){if(Ge(I,re))return;if(I.somethingSelected())zo({lineWise:!1,text:I.getSelections()});else if(I.options.lineWiseCopyCut){var le=ul(I);zo({lineWise:!0,text:le.text}),re.type=="cut"?I.setSelections(le.ranges,null,he):(D.prevInput="",B.value=le.text.join(`
`),z(B))}else return;re.type=="cut"&&(I.state.cutIncoming=+new Date)}Oe(B,"cut",Y),Oe(B,"copy",Y),Oe(e.scroller,"paste",function(re){if(Bn(e,re)||Ge(I,re))return;if(!B.dispatchEvent){I.state.pasteIncoming=+new Date,D.focus();return}var le=new Event("paste");le.clipboardData=re.clipboardData,B.dispatchEvent(le)}),Oe(e.lineSpace,"selectstart",function(re){Bn(e,re)||de(re)}),Oe(B,"compositionstart",function(){var re=I.getCursor("from");D.composing&&D.composing.range.clear(),D.composing={start:re,range:I.markText(re,I.getCursor("to"),{className:"CodeMirror-composing"})}}),Oe(B,"compositionend",function(){D.composing&&(D.poll(),D.composing.range.clear(),D.composing=null)})},jn.prototype.createField=function(e){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},jn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},jn.prototype.prepareSelection=function(){var e=this.cm,n=e.display,D=e.doc,I=Vi(e);if(e.options.moveInputWithCursor){var B=wr(e,D.sel.primary().head,"div"),Y=n.wrapper.getBoundingClientRect(),re=n.lineDiv.getBoundingClientRect();I.teTop=Math.max(0,Math.min(n.wrapper.clientHeight-10,B.top+re.top-Y.top)),I.teLeft=Math.max(0,Math.min(n.wrapper.clientWidth-10,B.left+re.left-Y.left))}return I},jn.prototype.showSelection=function(e){var n=this.cm,D=n.display;E(D.cursorDiv,e.cursors),E(D.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},jn.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var n=this.cm;if(n.somethingSelected()){this.prevInput="";var D=n.getSelection();this.textarea.value=D,n.state.focused&&z(this.textarea),S&&b>=9&&(this.hasSelection=D)}else e||(this.prevInput=this.textarea.value="",S&&b>=9&&(this.hasSelection=null))},jn.prototype.getField=function(){return this.textarea},jn.prototype.supportsTouch=function(){return!1},jn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!a||G()!=this.textarea))try{this.textarea.focus()}catch(e){}},jn.prototype.blur=function(){this.textarea.blur()},jn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},jn.prototype.receivedFocus=function(){this.slowPoll()},jn.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()})},jn.prototype.fastPoll=function(){var e=!1,n=this;n.pollingFast=!0;function D(){var I=n.poll();!I&&!e?(e=!0,n.polling.set(60,D)):(n.pollingFast=!1,n.slowPoll())}n.polling.set(20,D)},jn.prototype.poll=function(){var e=this,n=this.cm,D=this.textarea,I=this.prevInput;if(this.contextMenuPending||!n.state.focused||ft(D)&&!I&&!this.composing||n.isReadOnly()||n.options.disableInput||n.state.keySeq)return!1;var B=D.value;if(B==I&&!n.somethingSelected())return!1;if(S&&b>=9&&this.hasSelection===B||c&&/[\uf700-\uf7ff]/.test(B))return n.display.input.reset(),!1;if(n.doc.sel==n.display.selForContextMenu){var Y=B.charCodeAt(0);if(Y==8203&&!I&&(I="\u200B"),Y==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,le=Math.min(I.length,B.length);re<le&&I.charCodeAt(re)==B.charCodeAt(re);)++re;return xi(n,function(){fs(n,B.slice(re),I.length-re,null,e.composing?"*compose":null),B.length>1e3||B.indexOf(`
`)>-1?D.value=e.prevInput="":e.prevInput=B,e.composing&&(e.composing.range.clear(),e.composing.range=n.markText(e.composing.start,n.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},jn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},jn.prototype.onKeyPress=function(){S&&b>=9&&(this.hasSelection=null),this.fastPoll()},jn.prototype.onContextMenu=function(e){var n=this,D=n.cm,I=D.display,B=n.textarea;n.contextMenuPending&&n.contextMenuPending();var Y=$n(D,e),re=I.scroller.scrollTop;if(!Y||l)return;var le=D.options.resetSelectionOnContextMenu;le&&D.doc.sel.contains(Y)==-1&&Pn(D,bi)(D.doc,Qi(Y),he);var ue=B.style.cssText,ve=n.wrapper.style.cssText,je=n.wrapper.offsetParent.getBoundingClientRect();n.wrapper.style.cssText="position: static",B.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-je.top-5)+"px; left: "+(e.clientX-je.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 Ue;p&&(Ue=window.scrollY),I.input.focus(),p&&window.scrollTo(null,Ue),I.input.reset(),D.somethingSelected()||(B.value=n.prevInput=" "),n.contextMenuPending=Qe,I.selForContextMenu=D.doc.sel,clearTimeout(I.detectingSelectAll);function tt(){if(B.selectionStart!=null){var ht=D.somethingSelected(),_t="\u200B"+(ht?B.value:"");B.value="\u21DA",B.value=_t,n.prevInput=ht?"":"\u200B",B.selectionStart=1,B.selectionEnd=_t.length,I.selForContextMenu=D.doc.sel}}function Qe(){if(n.contextMenuPending!=Qe)return;if(n.contextMenuPending=!1,n.wrapper.style.cssText=ve,B.style.cssText=ue,S&&b<9&&I.scrollbars.setScrollTop(I.scroller.scrollTop=re),B.selectionStart!=null){(!S||S&&b<9)&&tt();var ht=0,_t=function(){I.selForContextMenu==D.doc.sel&&B.selectionStart==0&&B.selectionEnd>0&&n.prevInput=="\u200B"?Pn(D,Is)(D):ht++<10?I.detectingSelectAll=setTimeout(_t,500):(I.selForContextMenu=null,I.input.reset())};I.detectingSelectAll=setTimeout(_t,200)}}if(S&&b>=9&&tt(),R){Ie(e);var st=function(){Ze(window,"mouseup",st),setTimeout(Qe,20)};Oe(window,"mouseup",st)}else setTimeout(Qe,50)},jn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},jn.prototype.setUneditable=function(){},jn.prototype.needsContentAttribute=!1;function iu(e,n){if(n=n?P(n):{},n.value=e.value,!n.tabindex&&e.tabIndex&&(n.tabindex=e.tabIndex),!n.placeholder&&e.placeholder&&(n.placeholder=e.placeholder),n.autofocus==null){var D=G();n.autofocus=D==e||e.getAttribute("autofocus")!=null&&D==document.body}function I(){e.value=le.getValue()}var B;if(e.form&&(Oe(e.form,"submit",I),!n.leaveSubmitMethodAlone)){var Y=e.form;B=Y.submit;try{var re=Y.submit=function(){I(),Y.submit=B,Y.submit(),Y.submit=re}}catch(ue){}}n.finishInit=function(ue){ue.save=I,ue.getTextArea=function(){return e},ue.toTextArea=function(){ue.toTextArea=isNaN,I(),e.parentNode.removeChild(ue.getWrapperElement()),e.style.display="",e.form&&(Ze(e.form,"submit",I),!n.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=B))}},e.style.display="none";var le=wn(function(ue){return e.parentNode.insertBefore(ue,e.nextSibling)},n);return le}function au(e){e.off=Ze,e.on=Oe,e.wheelEventPixels=so,e.Doc=Ai,e.splitLines=bt,e.countColumn=H,e.findColumn=ge,e.isWordChar=J,e.Pass=ce,e.signal=Ne,e.Line=ii,e.changeEnd=Zi,e.scrollbarModel=io,e.Pos=ut,e.cmpPos=It,e.modes=Qt,e.mimeModes=kt,e.resolveMode=pt,e.getMode=dt,e.modeExtensions=At,e.extendMode=Mt,e.copyState=rr,e.startState=yt,e.innerMode=Fn,e.commands=_o,e.keyMap=ma,e.keyName=Xs,e.isModifierKey=zs,e.lookupKey=Ya,e.normalizeKeyMap=kl,e.StringStream=St,e.SharedTextMarker=vo,e.TextMarker=Ta,e.LineWidget=go,e.e_preventDefault=de,e.e_stopPropagation=_e,e.e_stop=Ie,e.addClass=K,e.contains=A,e.rmClass=g,e.keyNames=Sa}Jl(wn),eu(wn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Xo in Ai.prototype)Ai.prototype.hasOwnProperty(Xo)&&q(ou,Xo)<0&&(wn.prototype[Xo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ai.prototype[Xo]));return Ae(Ai),wn.inputStyles={textarea:jn,contenteditable:rn},wn.defineMode=function(e){!wn.defaults.mode&&e!="null"&&(wn.defaults.mode=e),Et.apply(this,arguments)},wn.defineMIME=Vt,wn.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),wn.defineMIME("text/plain","null"),wn.defineExtension=function(e,n){wn.prototype[e]=n},wn.defineDocExtension=function(e,n){Ai.prototype[e]=n},wn.fromTextArea=iu,au(wn),wn.version="5.58.2",wn})},WYAk:function(F,$,j){(function(N,v){F.exports=$=v(j("Ib8C"))})(this,function(N){(function(){var v=N,O=v.lib,M=O.Base,y=v.enc,m=y.Utf8,S=v.algo,b=S.HMAC=M.extend({init:function(p,d){p=this._hasher=new p.init,typeof d=="string"&&(d=m.parse(d));var t=p.blockSize,l=t*4;d.sigBytes>l&&(d=p.finalize(d)),d.clamp();for(var r=this._oKey=d.clone(),i=this._iKey=d.clone(),o=r.words,s=i.words,u=0;u<t;u++)o[u]^=1549556828,s[u]^=909522486;r.sigBytes=i.sigBytes=l,this.reset()},reset:function(){var p=this._hasher;p.reset(),p.update(this._iKey)},update:function(p){return this._hasher.update(p),this},finalize:function(p){var d=this._hasher,t=d.finalize(p);d.reset();var l=d.finalize(this._oKey.clone().concat(t));return l}})})()})},WaYH:function(F,$,j){"use strict";var N=j("rePB"),v=j("Ff2n"),O=j("VTBJ"),M=j("1OyB"),y=j("vuIU"),m=j("JX7q"),S=j("Ji7U"),b=j("LK+K"),p=j("cDcd"),d=j("TSYQ"),t=j.n(d),l=j("sboe"),r=j("OZM5"),i=function(R){var C=R.prefixCls,g=R.level,x=R.isStart,E=R.isEnd;if(!g)return null;for(var T="".concat(C,"-indent-unit"),k=[],L=0;L<g;L+=1){var A;k.push(p.createElement("span",{key:L,className:t()(T,(A={},Object(N.a)(A,"".concat(T,"-start"),x[L+1]),Object(N.a)(A,"".concat(T,"-end"),E[L+1]),Object(N.a)(A,"".concat(T,"-end-first-level"),!L&&E[0]),A))}))}return p.createElement("span",{"aria-hidden":"true",className:"".concat(C,"-indent")},k)},o=i,s=j("815F"),u="open",a="close",c="---",f=function(h){Object(S.a)(C,h);var R=Object(b.a)(C);function C(){var g;return Object(M.a)(this,C),g=R.apply(this,arguments),g.state={dragNodeHighlight:!1},g.onSelectorClick=function(x){var E=g.props.context.onNodeClick;E(x,Object(s.b)(g.props)),g.isSelectable()?g.onSelect(x):g.onCheck(x)},g.onSelectorDoubleClick=function(x){var E=g.props.context.onNodeDoubleClick;E(x,Object(s.b)(g.props))},g.onSelect=function(x){if(g.isDisabled())return;var E=g.props.context.onNodeSelect;x.preventDefault(),E(x,Object(s.b)(g.props))},g.onCheck=function(x){if(g.isDisabled())return;var E=g.props,T=E.disableCheckbox,k=E.checked,L=g.props.context.onNodeCheck;if(!g.isCheckable()||T)return;x.preventDefault();var A=!k;L(x,Object(s.b)(g.props),A)},g.onMouseEnter=function(x){var E=g.props.context.onNodeMouseEnter;E(x,Object(s.b)(g.props))},g.onMouseLeave=function(x){var E=g.props.context.onNodeMouseLeave;E(x,Object(s.b)(g.props))},g.onContextMenu=function(x){var E=g.props.context.onNodeContextMenu;E(x,Object(s.b)(g.props))},g.onDragStart=function(x){var E=g.props.context.onNodeDragStart;x.stopPropagation(),g.setState({dragNodeHighlight:!0}),E(x,Object(m.a)(g));try{x.dataTransfer.setData("text/plain","")}catch(T){}},g.onDragEnter=function(x){var E=g.props.context.onNodeDragEnter;x.preventDefault(),x.stopPropagation(),E(x,Object(m.a)(g))},g.onDragOver=function(x){var E=g.props.context.onNodeDragOver;x.preventDefault(),x.stopPropagation(),E(x,Object(m.a)(g))},g.onDragLeave=function(x){var E=g.props.context.onNodeDragLeave;x.stopPropagation(),E(x,Object(m.a)(g))},g.onDragEnd=function(x){var E=g.props.context.onNodeDragEnd;x.stopPropagation(),g.setState({dragNodeHighlight:!1}),E(x,Object(m.a)(g))},g.onDrop=function(x){var E=g.props.context.onNodeDrop;x.preventDefault(),x.stopPropagation(),g.setState({dragNodeHighlight:!1}),E(x,Object(m.a)(g))},g.onExpand=function(x){var E=g.props.context.onNodeExpand;E(x,Object(s.b)(g.props))},g.setSelectHandle=function(x){g.selectHandle=x},g.getNodeState=function(){var x=g.props.expanded;return g.isLeaf()?null:x?u:a},g.hasChildren=function(){var x=g.props.eventKey,E=g.props.context.keyEntities,T=E[x]||{},k=T.children;return!!(k||[]).length},g.isLeaf=function(){var x=g.props,E=x.isLeaf,T=x.loaded,k=g.props.context.loadData,L=g.hasChildren();return E===!1?!1:E||!k&&!L||k&&T&&!L},g.isDisabled=function(){var x=g.props.disabled,E=g.props.context.disabled;return!!(E||x)},g.isCheckable=function(){var x=g.props.checkable,E=g.props.context.checkable;return!E||x===!1?!1:E},g.syncLoadData=function(x){var E=x.expanded,T=x.loading,k=x.loaded,L=g.props.context,A=L.loadData,G=L.onNodeLoad;if(T)return;A&&E&&!g.isLeaf()&&(!g.hasChildren()&&!k&&G(Object(s.b)(g.props)))},g.renderSwitcher=function(){var x=g.props,E=x.expanded,T=x.switcherIcon,k=g.props.context,L=k.prefixCls,A=k.switcherIcon,G=T||A;if(g.isLeaf())return p.createElement("span",{className:t()("".concat(L,"-switcher"),"".concat(L,"-switcher-noop"))},typeof G=="function"?G(Object(O.a)(Object(O.a)({},g.props),{},{isLeaf:!0})):G);var K=t()("".concat(L,"-switcher"),"".concat(L,"-switcher_").concat(E?u:a));return p.createElement("span",{onClick:g.onExpand,className:K},typeof G=="function"?G(Object(O.a)(Object(O.a)({},g.props),{},{isLeaf:!1})):G)},g.renderCheckbox=function(){var x=g.props,E=x.checked,T=x.halfChecked,k=x.disableCheckbox,L=g.props.context.prefixCls,A=g.isDisabled(),G=g.isCheckable();if(!G)return null;var K=typeof G!="boolean"?G:null;return p.createElement("span",{className:t()("".concat(L,"-checkbox"),E&&"".concat(L,"-checkbox-checked"),!E&&T&&"".concat(L,"-checkbox-indeterminate"),(A||k)&&"".concat(L,"-checkbox-disabled")),onClick:g.onCheck},K)},g.renderIcon=function(){var x=g.props.loading,E=g.props.context.prefixCls;return p.createElement("span",{className:t()("".concat(E,"-iconEle"),"".concat(E,"-icon__").concat(g.getNodeState()||"docu"),x&&"".concat(E,"-icon_loading"))})},g.renderSelector=function(){var x=g.state.dragNodeHighlight,E=g.props,T=E.title,k=E.selected,L=E.icon,A=E.loading,G=E.data,K=g.props.context,W=K.prefixCls,z=K.showIcon,U=K.icon,P=K.draggable,H=K.loadData,V=K.titleRender,q=g.isDisabled(),Z="".concat(W,"-node-content-wrapper"),ce;if(z){var he=L||U;ce=he?p.createElement("span",{className:t()("".concat(W,"-iconEle"),"".concat(W,"-icon__customize"))},typeof he=="function"?he(g.props):he):g.renderIcon()}else H&&A&&(ce=g.renderIcon());var ae;typeof T=="function"?ae=T(G):V?ae=V(G):ae=T;var xe=p.createElement("span",{className:"".concat(W,"-title")},ae);return p.createElement("span",{ref:g.setSelectHandle,title:typeof T=="string"?T:"",className:t()("".concat(Z),"".concat(Z,"-").concat(g.getNodeState()||"normal"),!q&&(k||x)&&"".concat(W,"-node-selected"),!q&&P&&"draggable"),draggable:!q&&P||void 0,"aria-grabbed":!q&&P||void 0,onMouseEnter:g.onMouseEnter,onMouseLeave:g.onMouseLeave,onContextMenu:g.onContextMenu,onClick:g.onSelectorClick,onDoubleClick:g.onSelectorDoubleClick,onDragStart:P?g.onDragStart:void 0},ce,xe)},g}return Object(y.a)(C,[{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,E=this.props.context.selectable;return typeof x=="boolean"?x:E}},{key:"render",value:function(){var x,E=this.props,T=E.eventKey,k=E.className,L=E.style,A=E.dragOver,G=E.dragOverGapTop,K=E.dragOverGapBottom,W=E.isLeaf,z=E.isStart,U=E.isEnd,P=E.expanded,H=E.selected,V=E.checked,q=E.halfChecked,Z=E.loading,ce=E.domRef,he=E.active,ae=E.onMouseMove,xe=Object(v.a)(E,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),ge=this.props.context,oe=ge.prefixCls,se=ge.filterTreeNode,te=ge.draggable,be=ge.keyEntities,ee=this.isDisabled(),ie=Object(r.f)(xe),Ee=be[T]||{},ne=Ee.level,J=U[U.length-1];return p.createElement("div",Object.assign({ref:ce,className:t()(k,"".concat(oe,"-treenode"),(x={},Object(N.a)(x,"".concat(oe,"-treenode-disabled"),ee),Object(N.a)(x,"".concat(oe,"-treenode-switcher-").concat(P?"open":"close"),!W),Object(N.a)(x,"".concat(oe,"-treenode-checkbox-checked"),V),Object(N.a)(x,"".concat(oe,"-treenode-checkbox-indeterminate"),q),Object(N.a)(x,"".concat(oe,"-treenode-selected"),H),Object(N.a)(x,"".concat(oe,"-treenode-loading"),Z),Object(N.a)(x,"".concat(oe,"-treenode-active"),he),Object(N.a)(x,"".concat(oe,"-treenode-leaf-last"),J),Object(N.a)(x,"drag-over",!ee&&A),Object(N.a)(x,"drag-over-gap-top",!ee&&G),Object(N.a)(x,"drag-over-gap-bottom",!ee&&K),Object(N.a)(x,"filter-node",se&&se(Object(s.b)(this.props))),x)),style:L,onDragEnter:te?this.onDragEnter:void 0,onDragOver:te?this.onDragOver:void 0,onDragLeave:te?this.onDragLeave:void 0,onDrop:te?this.onDrop:void 0,onDragEnd:te?this.onDragEnd:void 0,onMouseMove:ae},ie),p.createElement(o,{prefixCls:oe,level:ne,isStart:z,isEnd:U}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),C}(p.Component),w=function(R){return p.createElement(l.a.Consumer,null,function(C){return p.createElement(f,Object.assign({},R,{context:C}))})};w.displayName="TreeNode",w.defaultProps={title:c},w.isTreeNode=1;var _=$.a=w},XIdC:function(F,$,j){"use strict";var N=j("rePB"),v=j("ODXe"),O=j("Ff2n"),M=j("cDcd"),y=j.n(M),m=j("TSYQ"),S=j.n(m),b=j("6cGi"),p=j("4IlW"),d=M.forwardRef(function(t,l){var r,i=t.prefixCls,o=i===void 0?"rc-switch":i,s=t.className,u=t.checked,a=t.defaultChecked,c=t.disabled,f=t.loadingIcon,w=t.checkedChildren,_=t.unCheckedChildren,h=t.onClick,R=t.onChange,C=t.onKeyDown,g=Object(O.a)(t,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),x=Object(b.a)(!1,{value:u,defaultValue:a}),E=Object(v.a)(x,2),T=E[0],k=E[1];function L(W,z){var U=T;return c||(U=W,k(U),R==null||R(U,z)),U}function A(W){W.which===p.a.LEFT?L(!1,W):W.which===p.a.RIGHT&&L(!0,W),C==null||C(W)}function G(W){var z=L(!T,W);h==null||h(z,W)}var K=S()(o,s,(r={},Object(N.a)(r,"".concat(o,"-checked"),T),Object(N.a)(r,"".concat(o,"-disabled"),c),r));return M.createElement("button",Object.assign({},g,{type:"button",role:"switch","aria-checked":T,disabled:c,className:K,ref:l,onKeyDown:A,onClick:G}),f,M.createElement("span",{className:"".concat(o,"-inner")},T?w:_))});d.displayName="Switch",$.a=d},Y1PL:function(F,$,j){"use strict";j.r($),j.d($,"ResizableTextArea",function(){return q});var N=j("wx14"),v=j("1OyB"),O=j("vuIU"),M=j("Ji7U"),y=j("LK+K"),m=j("cDcd"),S=j("VTBJ"),b=j("rePB"),p=j("Zm9Q"),d=j("Kwbf"),t=j("c+Xe"),l=j("m+aA"),r=j("bdgK"),i=new Map;function o(he){he.forEach(function(ae){var xe,ge=ae.target;(xe=i.get(ge))===null||xe===void 0||xe.forEach(function(oe){return oe(ge)})})}var s=new r.default(o),u=null,a=null;function c(he,ae){i.has(he)||(i.set(he,new Set),s.observe(he)),i.get(he).add(ae)}function f(he,ae){i.has(he)&&(i.get(he).delete(ae),i.get(he).size||(s.unobserve(he),i.delete(he)))}var w=function(he){Object(M.a)(xe,he);var ae=Object(y.a)(xe);function xe(){return Object(v.a)(this,xe),ae.apply(this,arguments)}return Object(O.a)(xe,[{key:"render",value:function(){return this.props.children}}]),xe}(m.Component),_=m.createContext(null);function h(he){var ae=he.children,xe=he.onBatchResize,ge=m.useRef(0),oe=m.useRef([]),se=m.useContext(_),te=m.useCallback(function(be,ee,ie){ge.current+=1;var Ee=ge.current;oe.current.push({size:be,element:ee,data:ie}),Promise.resolve().then(function(){Ee===ge.current&&(xe==null||xe(oe.current),oe.current=[])}),se==null||se(be,ee,ie)},[xe,se]);return m.createElement(_.Provider,{value:te},ae)}function R(he){var ae=he.children,xe=he.disabled,ge=m.useRef(null),oe=m.useRef(null),se=m.useContext(_),te=m.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),be=m.isValidElement(ae)&&Object(t.c)(ae),ee=be?ae.ref:null,ie=m.useMemo(function(){return Object(t.a)(ee,ge)},[ee,ge]),Ee=m.useRef(he);Ee.current=he;var ne=m.useCallback(function(J){var X=Ee.current,Q=X.onResize,me=X.data,fe=J.getBoundingClientRect(),Te=fe.width,ze=fe.height,Je=J.offsetWidth,qe=J.offsetHeight,Xe=Math.floor(Te),et=Math.floor(ze);if(te.current.width!==Xe||te.current.height!==et||te.current.offsetWidth!==Je||te.current.offsetHeight!==qe){var rt={width:Xe,height:et,offsetWidth:Je,offsetHeight:qe};te.current=rt;var Le=Je===Math.round(Te)?Te:Je,Oe=qe===Math.round(ze)?ze:qe,Ve=Object(S.a)(Object(S.a)({},rt),{},{offsetWidth:Le,offsetHeight:Oe});se==null||se(Ve,J,me),Q&&Promise.resolve().then(function(){Q(Ve,J)})}},[]);return m.useEffect(function(){var J=Object(l.a)(ge.current)||Object(l.a)(oe.current);return J&&!xe&&c(J,ne),function(){return f(J,ne)}},[ge.current,xe]),m.createElement(w,{ref:oe},be?m.cloneElement(ae,{ref:ie}):ae)}var C="rc-observer-key";function g(he){var ae=he.children,xe=Object(p.a)(ae);return xe.map(function(ge,oe){var se=(ge==null?void 0:ge.key)||"".concat(C,"-").concat(oe);return m.createElement(R,Object(N.a)({},he,{key:se}),ge)})}g.Collection=h;var x=g,E=j("bT9E"),T=j("TSYQ"),k=j.n(T),L=`
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
`,A=["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 W(he){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xe=he.getAttribute("id")||he.getAttribute("data-reactid")||he.getAttribute("name");if(ae&&G[xe])return G[xe];var ge=window.getComputedStyle(he),oe=ge.getPropertyValue("box-sizing")||ge.getPropertyValue("-moz-box-sizing")||ge.getPropertyValue("-webkit-box-sizing"),se=parseFloat(ge.getPropertyValue("padding-bottom"))+parseFloat(ge.getPropertyValue("padding-top")),te=parseFloat(ge.getPropertyValue("border-bottom-width"))+parseFloat(ge.getPropertyValue("border-top-width")),be=A.map(function(ie){return"".concat(ie,":").concat(ge.getPropertyValue(ie))}).join(";"),ee={sizingStyle:be,paddingSize:se,borderSize:te,boxSizing:oe};return ae&&xe&&(G[xe]=ee),ee}function z(he){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ge=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;K||(K=document.createElement("textarea"),K.setAttribute("tab-index","-1"),K.setAttribute("aria-hidden","true"),document.body.appendChild(K)),he.getAttribute("wrap")?K.setAttribute("wrap",he.getAttribute("wrap")):K.removeAttribute("wrap");var oe=W(he,ae),se=oe.paddingSize,te=oe.borderSize,be=oe.boxSizing,ee=oe.sizingStyle;K.setAttribute("style","".concat(ee,";").concat(L)),K.value=he.value||he.placeholder||"";var ie=Number.MIN_SAFE_INTEGER,Ee=Number.MAX_SAFE_INTEGER,ne=K.scrollHeight,J;if(be==="border-box"?ne+=te:be==="content-box"&&(ne-=se),xe!==null||ge!==null){K.value=" ";var X=K.scrollHeight-se;xe!==null&&(ie=X*xe,be==="border-box"&&(ie=ie+se+te),ne=Math.max(ie,ne)),ge!==null&&(Ee=X*ge,be==="border-box"&&(Ee=Ee+se+te),J=ne>Ee?"":"hidden",ne=Math.min(Ee,ne))}return{height:ne,minHeight:ie,maxHeight:Ee,overflowY:J,resize:"none"}}var U=j("Gytx"),P=j.n(U),H;(function(he){he[he.NONE=0]="NONE",he[he.RESIZING=1]="RESIZING",he[he.RESIZED=2]="RESIZED"})(H||(H={}));var V=function(he){Object(M.a)(xe,he);var ae=Object(y.a)(xe);function xe(ge){var oe;return Object(v.a)(this,xe),oe=ae.call(this,ge),oe.nextFrameActionId=void 0,oe.resizeFrameId=void 0,oe.textArea=void 0,oe.saveTextArea=function(se){oe.textArea=se},oe.handleResize=function(se){var te=oe.state.resizeStatus,be=oe.props,ee=be.autoSize,ie=be.onResize;if(te!==H.NONE)return;typeof ie=="function"&&ie(se),ee&&oe.resizeOnNextFrame()},oe.resizeOnNextFrame=function(){cancelAnimationFrame(oe.nextFrameActionId),oe.nextFrameActionId=requestAnimationFrame(oe.resizeTextarea)},oe.resizeTextarea=function(){var se=oe.props.autoSize;if(!se||!oe.textArea)return;var te=se.minRows,be=se.maxRows,ee=z(oe.textArea,!1,te,be);oe.setState({textareaStyles:ee,resizeStatus:H.RESIZING},function(){cancelAnimationFrame(oe.resizeFrameId),oe.resizeFrameId=requestAnimationFrame(function(){oe.setState({resizeStatus:H.RESIZED},function(){oe.resizeFrameId=requestAnimationFrame(function(){oe.setState({resizeStatus:H.NONE}),oe.fixFirefoxAutoScroll()})})})})},oe.renderTextArea=function(){var se=oe.props,te=se.prefixCls,be=te===void 0?"rc-textarea":te,ee=se.autoSize,ie=se.onResize,Ee=se.className,ne=se.disabled,J=oe.state,X=J.textareaStyles,Q=J.resizeStatus,me=Object(E.a)(oe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),fe=k()(be,Ee,Object(b.a)({},"".concat(be,"-disabled"),ne));"value"in me&&(me.value=me.value||"");var Te=Object(S.a)(Object(S.a)(Object(S.a)({},oe.props.style),X),Q===H.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return m.createElement(x,{onResize:oe.handleResize,disabled:!(ee||ie)},m.createElement("textarea",Object(N.a)({},me,{className:fe,style:Te,ref:oe.saveTextArea})))},oe.state={textareaStyles:{},resizeStatus:H.NONE},oe}return Object(O.a)(xe,[{key:"componentDidUpdate",value:function(oe){(oe.value!==this.props.value||!P()(oe.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 oe=this.textArea.selectionStart,se=this.textArea.selectionEnd;this.textArea.setSelectionRange(oe,se)}}catch(te){}}},{key:"render",value:function(){return this.renderTextArea()}}]),xe}(m.Component),q=V,Z=function(he){Object(M.a)(xe,he);var ae=Object(y.a)(xe);function xe(ge){var oe;Object(v.a)(this,xe),oe=ae.call(this,ge),oe.resizableTextArea=void 0,oe.focus=function(){oe.resizableTextArea.textArea.focus()},oe.saveTextArea=function(te){oe.resizableTextArea=te},oe.handleChange=function(te){var be=oe.props.onChange;oe.setValue(te.target.value,function(){oe.resizableTextArea.resizeTextarea()}),be&&be(te)},oe.handleKeyDown=function(te){var be=oe.props,ee=be.onPressEnter,ie=be.onKeyDown;te.keyCode===13&&ee&&ee(te),ie&&ie(te)};var se=typeof ge.value=="undefined"||ge.value===null?ge.defaultValue:ge.value;return oe.state={value:se},oe}return Object(O.a)(xe,[{key:"setValue",value:function(oe,se){"value"in this.props||this.setState({value:oe},se)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return m.createElement(q,Object(N.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(oe){return"value"in oe?{value:oe.value}:null}}]),xe}(m.Component),ce=$.default=Z},ZD9Y:function(F,$,j){"use strict";var N=j("BoS7"),v=j("Sdc0"),O=j("OaEy"),M=j("2fM7"),y=j("cDcd"),m=j.n(y),S=j("lOMy"),b=j.n(S),p=M.a.Option;$.a=function(d){var t=d.onFontSizeChange,l=d.cmFontSize,r=d.cmCodeMode,i=d.onCodeModeChange,o=d.onTabToSpace,s=d.className,u=s===void 0?"":s,a=d.tabToSpace,c=d.children;return m.a.createElement("div",{className:"tpi-code-setting ".concat(u)},m.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),m.a.createElement("section",null,m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),m.a.createElement(M.a,{bordered:!1,size:"small",value:r,onChange:i},m.a.createElement(p,{value:"vs"},"\u767D\u8272\u80CC\u666F"),m.a.createElement(p,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),m.a.createElement(M.a,{bordered:!1,size:"small",value:l,onChange:t},m.a.createElement(p,{value:12},"12px"),m.a.createElement(p,{value:14},"14px"),m.a.createElement(p,{value:16},"16px"),m.a.createElement(p,{value:18},"18px"),m.a.createElement(p,{value:20},"20px"),m.a.createElement(p,{value:22},"22px"))),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"Tab\u8F6C\u6362"),m.a.createElement(v.a,{checked:a,onChange:o}))),m.a.createElement("h3",null,"\u5FEB\u6377\u952E"),m.a.createElement("section",null,m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),m.a.createElement("span",null,"Ctrl + S")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),m.a.createElement("span",null,"F1 / Alt + F1")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),m.a.createElement("span",null,"Ctrl + ]/[")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),m.a.createElement("span",null,"Ctrl + Shift + \\")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),m.a.createElement("span",null,"Home")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),m.a.createElement("span",null,"End"))),c)}},ZW9T:function(F,$,j){"use strict";j.d($,"a",function(){return z});var N=j("k1fw"),v=j("miYZ"),O=j("tsqr"),M=j("rAM+"),y=j("tJVT"),m=j("PpiC"),S=j("cDcd"),b=j.n(S),p=j("bdgK"),d=j("oBTY"),t=j("9og8"),l=j("WmNS"),r=j.n(l),i={keywords:["print","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"]},o={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},s={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"#include",content:'include "$0"'},{label:"printf",content:"printf($0)"},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"for",content:["for( ; ; ){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
`)},{label:"#include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"#include <vector>",content:["#include <vector>"].join(`
`)},{label:"#include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"#include <string>",content:["#include <string>"].join(`
`)},{label:"#include <cmath>",content:["#include <cmath>"].join(`
`)}]},u={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
`)}]},a=j("5VLF"),c=j.n(a),f={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},w=function(P,H){return H.map(function(V){return{label:V,kind:P.languages.CompletionItemKind.Keyword,insertText:V}})},_=function(P){return Object.keys(f.tables).map(function(H){return{label:H,kind:P.languages.CompletionItemKind.Variable,insertText:H}})},h=function(P,H){var V=f.tables[P];return V?V.map(function(q){return{label:q,kind:H.languages.CompletionItemKind.Field,insertText:q}}):[]};function R(U,P,H,V,q){var Z=P.getWordUntilPosition(H),ce={startLineNumber:H.lineNumber,endLineNumber:H.lineNumber,startColumn:Z.startColumn,endColumn:Z.endColumn},he=V.map(function(ae){return{label:ae,kind:U.languages.CompletionItemKind.Keyword,insertText:ae,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ce}});return q.map(function(ae){he.push(Object(N.a)(Object(N.a)({},ae),{},{range:ce}))}),he}var C=function(U){f.languages.map(function(q){return U.languages.registerDocumentFormattingEditProvider(q,{provideDocumentFormattingEdits:function(ce,he,ae){return Object(t.a)(r.a.mark(function xe(){var ge;return r.a.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return ge=c()(ce.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),se.abrupt("return",[{range:ce.getFullModelRange(),text:ge}]);case 2:case"end":return se.stop()}},xe)}))()}}),q});var P=s.quickKey.map(function(q){return{label:q.label,kind:U.languages.CompletionItemKind.Method,insertText:q.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),H=u.quickKey.map(function(q){return{label:q.label,kind:U.languages.CompletionItemKind.Method,insertText:q.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),V=o.quickKey.map(function(q){return{label:q.label,kind:U.languages.CompletionItemKind.Method,insertText:q.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}});U.languages.registerCompletionItemProvider("cpp",{triggerCharacters:["."," ","#"].concat(Object(d.a)(s.keywords),Object(d.a)(s.quickKey.map(function(q){return q.label}))),provideCompletionItems:function(Z,ce){var he=Z.getValueInRange({startLineNumber:ce.lineNumber,startColumn:1,endLineNumber:ce.lineNumber,endColumn:ce.column}),ae=he.match(/cu/gim);console.log("match:",ae,ce,he,Z);var xe=[],ge=ce.lineNumber,oe=ce.column,se=Z.getValueInRange({startLineNumber:ge,startColumn:0,endLineNumber:ge,endColumn:oe}),te=se.trim().split(/\s+/),be=te[te.length-1];if(be.endsWith(".")){var ee=be.slice(0,be.length-1);Object.keys(f.tables).includes(ee)&&(xe=Object(d.a)(h(ee,U)))}else be==="."?xe=[]:xe=[].concat(Object(d.a)(_(U)),Object(d.a)(w(U,s.keywords)),Object(d.a)(P));return{suggestions:xe}}}),U.languages.registerCompletionItemProvider("c",{triggerCharacters:["."," ","#"].concat(Object(d.a)(i.keywords)),provideCompletionItems:function(Z,ce){var he=Z.getValueInRange({startLineNumber:ce.lineNumber,startColumn:1,endLineNumber:ce.lineNumber,endColumn:ce.column}),ae=he.match(/cu/gim);console.log("match:",ae,ce,he,Z);var xe=[],ge=ce.lineNumber,oe=ce.column,se=Z.getValueInRange({startLineNumber:ge,startColumn:0,endLineNumber:ge,endColumn:oe}),te=se.trim().split(/\s+/),be=te[te.length-1];if(be.endsWith(".")){var ee=be.slice(0,be.length-1);Object.keys(f.tables).includes(ee)&&(xe=Object(d.a)(h(ee,U)))}else be==="."?xe=[]:xe=[].concat(Object(d.a)(_(U)),Object(d.a)(w(U,i.keywords)));return{suggestions:xe}}}),U.languages.registerCompletionItemProvider("java",{triggerCharacters:["."," "].concat(Object(d.a)(o.keywords)),provideCompletionItems:function(Z,ce){var he=[],ae=ce.lineNumber,xe=ce.column,ge=Z.getValueInRange({startLineNumber:ae,startColumn:0,endLineNumber:ae,endColumn:xe}),oe=ge.trim().split(/\s+/),se=oe[oe.length-1];if(se.endsWith(".")){var te=se.slice(0,se.length-1);Object.keys(f.tables).includes(te)&&(he=Object(d.a)(h(te,U)))}else se==="."?he=[]:he=[].concat(Object(d.a)(_(U)),Object(d.a)(w(U,o.keywords)),Object(d.a)(V));return{suggestions:he}}}),U.languages.registerCompletionItemProvider("python",{triggerCharacters:["."," "].concat(Object(d.a)(u.keywords)),provideCompletionItems:function(Z,ce){var he=[],ae=ce.lineNumber,xe=ce.column,ge=Z.getValueInRange({startLineNumber:ae,startColumn:0,endLineNumber:ae,endColumn:xe}),oe=ge.trim().split(/\s+/),se=oe[oe.length-1];if(se.endsWith(".")){var te=se.slice(0,se.length-1);Object.keys(f.tables).includes(te)&&(he=Object(d.a)(h(te,U)))}else se==="."?he=[]:he=[].concat(Object(d.a)(_(U)),Object(d.a)(w(U,u.keywords)),Object(d.a)(H));return{suggestions:he}}})},g="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",x=j("LvDl"),E=j("+ua5");function T(U){return/^\d+$/.test(U)?"".concat(U,"px"):U}function k(){}var L=!1,A={"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 G(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=U;if(Array.isArray(U)){for(var H=0;H<U.length;H++){var V=A[U[H]];if(V)return V}return P[0]}return A[P]||P}var K=null,W=$.b=function(U){var P=U.width,H=P===void 0?"100%":P,V=U.height,q=V===void 0?"100%":V,Z=U.value,ce=U.language,he=ce===void 0?"javascript":ce,ae=U.style,xe=ae===void 0?{}:ae,ge=U.options,oe=ge===void 0?{}:ge,se=U.overrideServices,te=se===void 0?{}:se,be=U.theme,ee=be===void 0?"vs-dark":be,ie=U.onEditBlur,Ee=U.onSave,ne=U.autoHeight,J=ne===void 0?!1:ne,X=U.forbidCopy,Q=X===void 0?!1:X,me=U.onChange,fe=me===void 0?k:me,Te=U.editorDidMount,ze=Te===void 0?k:Te,Je=U.onFocus,qe=Je===void 0?k:Je,Xe=U.filename,et=Xe===void 0?"educoder.txt":Xe,rt=U.errorLine,Le=U.errorContent,Oe=Le===void 0?"":Le,Ve=Object(m.a)(U,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Ze=Object(S.useRef)(),Ne=Object(S.useRef)({}),Ge=Object(S.useRef)(),De=Object(S.useRef)(!1),we=Object(S.useRef)(),Ae=Object(S.useState)(!1),de=Object(y.a)(Ae,2),_e=de[0],Se=de[1];function Ie(){var pt;return Ze.current&&(pt=new p.default(function(dt){var At=Object(M.a)(dt),Mt;try{for(At.s();!(Mt=At.n()).done;){var rr=Mt.value;(rr.target.offsetHeight>0||rr.target.offsetWidth>0)&&Ne.current.instance.layout()}}catch(Fn){At.e(Fn)}finally{At.f()}}),pt.observe(Ze.current)),pt}function ke(){O.b.warn(decodeURIComponent(g))}var Ye=function(){var dt=Ne.current.instance;if(Z!=null&&dt&&_e){var At=dt.getModel();At&&Z!==At.getValue()&&(L=!0,At.setValue(Z),dt.layout(),L=!1)}};Object(S.useEffect)(function(){Ge.current&&clearTimeout(Ge.current),Ge.current=setTimeout(function(){Ye()},500)},[Z,_e,Ne.current]),Object(S.useEffect)(function(){if(rt&&Ne.current&&Ne.current.instance){var pt=Ne.current.instance;pt.changeViewZones(function(At){var Mt=document.createElement("div");Mt.style.padding="10px 20px",Mt.style.width="calc(100% - 20px)",Mt.className="my-error-line-wrp",Mt.innerHTML=Oe,At.addZone({afterLineNumber:rt||11,heightInLines:3,domNode:Mt})});var dt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};pt.addOverlayWidget(dt),pt.revealPositionInCenter({lineNumber:20,column:1})}},[rt,Ne.current,_e]);function nt(){var pt=Ne.current.instance;if(pt){var dt=pt.getSelection(),At=Ne.current.pastePos||{},Mt=new K.Range(At.startLineNumber||dt.endLineNumber,At.startColumn||dt.endColumn,At.endLineNumber||dt.endLineNumber,At.endColumn||dt.endColumn);setTimeout(function(){pt.executeEdits("",[{range:Mt,text:""}])},300)}}function lt(pt){(window.navigator.platform.match("Mac")?pt.metaKey:pt.ctrlKey)&&pt.keyCode==83&&(pt.preventDefault(),Ee())}var at=function(){if(J&&Ne.current.instance){var dt=Ne.current.instance.getContentHeight();Et(dt<q?q:dt)}else Et(q)};function ot(pt){var dt=document.createEvent("MouseEvents");dt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),pt.dispatchEvent(dt)}function Ct(pt,dt){var At=window.URL||window.webkitURL||window,Mt=new Blob([dt]),rr=document.createElementNS("http://www.w3.org/1999/xhtml","a");rr.href=At.createObjectURL(Mt),rr.download=pt,ot(rr)}Object(S.useEffect)(function(){at()},[at]),Object(S.useEffect)(function(){Ze.current&&!_e&&j.e(27).then(j.t.bind(null,"M/lh",7)).then(function(pt){try{K=pt,Ne.current.instance=K.editor.create(Ze.current,{value:Z,language:G(he),theme:ee,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},te);var dt=Ne.current.instance;if(ze(dt,K),setTimeout(function(){at(),Ne.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Ct(et||"educoder.txt",dt.getValue())}})},500),Ne.current.subscription=dt.onDidChangeModelContent(function(Mt){De.current?clearTimeout(we.current):(at(),fe(dt.getValue(),Mt)),we.current=setTimeout(function(){De.current=!1},500)}),window.Monaco||C(K),Q&&(dt.addCommand(K.KeyMod.CtrlCmd|K.KeyMod.Shift|K.KeyCode.KEY_V,function(){return ke(),null}),dt.addCommand(K.KeyMod.CtrlCmd|K.KeyCode.KEY_C,function(){return ke(),null})),window.Monaco=K,ie&&dt.onDidBlurEditorWidget(function(){ie(dt.getValue())}),qe&&dt.onDidFocusEditorText(function(){qe(dt.getValue())}),Q){dt.addCommand(K.KeyMod.CtrlCmd|K.KeyCode.KEY_V,function(){return ke(),null}),dt.onDidPaste(function(Mt){Ne.current.pastePos=Mt});try{window.addEventListener("paste",nt)}catch(Mt){}}var At=Ie();return Se(!0),function(){var Mt=Ne.current.instance;Mt.dispose();var rr=Mt.getModel();rr&&rr.dispose(),Ne.current.subscription&&Ne.current.subscription.dispose(),Q&&window.removeEventListener("paste",nt),At.unobserve(Ze.current)}}catch(Mt){}})},[]),Object(S.useEffect)(function(){var pt=Ne.current.instance;if(pt&&_e)return document.addEventListener("keydown",lt,!1),function(){document.removeEventListener("keydown",lt)}},[Ee,_e]),Object(S.useEffect)(function(){var pt=Ne.current.instance;if(pt&&_e){var dt=G(he);K.editor.setModelLanguage(pt.getModel(),dt),console.log("language:",he,pt.getModel(),dt)}},[he,_e]),Object(S.useEffect)(function(){var pt=Ne.current.instance;pt&&_e&&K.editor.setTheme(ee)},[ee,_e]),Object(S.useEffect)(function(){var pt=Ne.current.instance;pt&&_e&&(pt.updateOptions(Object(N.a)({},oe)),setTimeout(function(){pt.getModel().updateOptions(Object(N.a)({},oe))},200))},[JSON.stringify(oe),_e]),Object(S.useEffect)(function(){var pt=Ne.current.instance;pt&&_e&&pt.layout()},[H,q,_e]);var bt=Object(S.useState)(T(H)),ft=Object(y.a)(bt,2),jt=ft[0],Pt=ft[1],Xt=Object(S.useState)(T(q)),Qt=Object(y.a)(Xt,2),kt=Qt[0],Et=Qt[1],Vt=Object(N.a)(Object(N.a)({},xe),{},{width:jt,height:kt});return b.a.createElement("div",{className:"my-monaco-editor",ref:Ze,style:Vt})};function z(U){var P=U.width,H=P===void 0?"100%":P,V=U.height,q=V===void 0?"100%":V,Z=U.original,ce=U.modified,he=U.language,ae=U.options,xe=ae===void 0?{}:ae,ge=Object(S.useRef)(),oe=Object(S.useState)(null),se=Object(y.a)(oe,2),te=se[0],be=se[1];function ee(J){var X;return ge.current&&(X=new p.default(function(Q){var me=Object(M.a)(Q),fe;try{for(me.s();!(fe=me.n()).done;){var Te=fe.value;(Te.target.offsetHeight>0||Te.target.offsetWidth>0)&&J.layout()}}catch(ze){me.e(ze)}finally{me.f()}}),X.observe(ge.current)),X}Object(S.useEffect)(function(){ge.current&&j.e(27).then(j.t.bind(null,"M/lh",7)).then(function(J){K=J;var X=K.editor.createDiffEditor(ge.current,Object(N.a)(Object(N.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},xe),{},{wordWrap:!0}));be(X);var Q=ee(X);return function(){X.dispose();var me=X.getModel();me&&me.dispose(),Q.unobserve(ge.current)}})},[]),Object(S.useEffect)(function(){te&&te.setModel({original:K.editor.createModel(Z,he),modified:K.editor.createModel(ce,he)})},[Z,ce,he,te]);var ie=T(H),Ee=T(q),ne={width:ie,height:Ee};return b.a.createElement("div",{className:"my-diff-editor",ref:ge,style:ne})}},ZpRC:function(F,$,j){"use strict";function N(t){return typeof t=="object"&&t!=null&&t.nodeType===1}function v(t,l){return(!l||t!=="hidden")&&t!=="visible"&&t!=="clip"}function O(t,l){if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){var r=getComputedStyle(t,null);return v(r.overflowY,l)||v(r.overflowX,l)||function(i){var o=function(s){if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch(u){return null}}(i);return!!o&&(o.clientHeight<i.scrollHeight||o.clientWidth<i.scrollWidth)}(t)}return!1}function M(t,l,r,i,o,s,u,a){return s<t&&u>l||s>t&&u<l?0:s<=t&&a<=r||u>=l&&a>=r?s-t-i:u>l&&a<r||s<t&&a>r?u-l+o:0}var y=function(t,l){var r=window,i=l.scrollMode,o=l.block,s=l.inline,u=l.boundary,a=l.skipOverflowHiddenElements,c=typeof u=="function"?u:function(X){return X!==u};if(!N(t))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,w=[],_=t;N(_)&&c(_);){if((_=_.parentElement)===f){w.push(_);break}_!=null&&_===document.body&&O(_)&&!O(document.documentElement)||_!=null&&O(_,a)&&w.push(_)}for(var h=r.visualViewport?r.visualViewport.width:innerWidth,R=r.visualViewport?r.visualViewport.height:innerHeight,C=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,x=t.getBoundingClientRect(),E=x.height,T=x.width,k=x.top,L=x.right,A=x.bottom,G=x.left,K=o==="start"||o==="nearest"?k:o==="end"?A:k+E/2,W=s==="center"?G+T/2:s==="end"?L:G,z=[],U=0;U<w.length;U++){var P=w[U],H=P.getBoundingClientRect(),V=H.height,q=H.width,Z=H.top,ce=H.right,he=H.bottom,ae=H.left;if(i==="if-needed"&&k>=0&&G>=0&&A<=R&&L<=h&&k>=Z&&A<=he&&G>=ae&&L<=ce)return z;var xe=getComputedStyle(P),ge=parseInt(xe.borderLeftWidth,10),oe=parseInt(xe.borderTopWidth,10),se=parseInt(xe.borderRightWidth,10),te=parseInt(xe.borderBottomWidth,10),be=0,ee=0,ie="offsetWidth"in P?P.offsetWidth-P.clientWidth-ge-se:0,Ee="offsetHeight"in P?P.offsetHeight-P.clientHeight-oe-te:0;if(f===P)be=o==="start"?K:o==="end"?K-R:o==="nearest"?M(g,g+R,R,oe,te,g+K,g+K+E,E):K-R/2,ee=s==="start"?W:s==="center"?W-h/2:s==="end"?W-h:M(C,C+h,h,ge,se,C+W,C+W+T,T),be=Math.max(0,be+g),ee=Math.max(0,ee+C);else{be=o==="start"?K-Z-oe:o==="end"?K-he+te+Ee:o==="nearest"?M(Z,he,V,oe,te+Ee,K,K+E,E):K-(Z+V/2)+Ee/2,ee=s==="start"?W-ae-ge:s==="center"?W-(ae+q/2)+ie/2:s==="end"?W-ce+se+ie:M(ae,ce,q,ge,se+ie,W,W+T,T);var ne=P.scrollLeft,J=P.scrollTop;K+=J-(be=Math.max(0,Math.min(J+be,P.scrollHeight-V+Ee))),W+=ne-(ee=Math.max(0,Math.min(ne+ee,P.scrollWidth-q+ie)))}z.push({el:P,top:be,left:ee})}return z};function m(t){return t===Object(t)&&Object.keys(t).length!==0}function S(t,l){l===void 0&&(l="auto");var r="scrollBehavior"in document.body.style;t.forEach(function(i){var o=i.el,s=i.top,u=i.left;o.scroll&&r?o.scroll({top:s,left:u,behavior:l}):(o.scrollTop=s,o.scrollLeft=u)})}function b(t){return t===!1?{block:"end",inline:"nearest"}:m(t)?t:{block:"start",inline:"nearest"}}function p(t,l){var r=!t.ownerDocument.documentElement.contains(t);if(m(l)&&typeof l.behavior=="function")return l.behavior(r?[]:y(t,l));if(r)return;var i=b(l);return S(y(t,i),i.behavior)}var d=$.a=p},Zss7:function(F,$,j){var N;(function(v){var O=/^\s+/,M=/\s+$/,y=0,m=v.round,S=v.min,b=v.max,p=v.random;function d(te,be){if(te=te||"",be=be||{},te instanceof d)return te;if(!(this instanceof d))return new d(te,be);var ee=t(te);this._originalInput=te,this._r=ee.r,this._g=ee.g,this._b=ee.b,this._a=ee.a,this._roundA=m(100*this._a)/100,this._format=be.format||ee.format,this._gradientType=be.gradientType,this._r<1&&(this._r=m(this._r)),this._g<1&&(this._g=m(this._g)),this._b<1&&(this._b=m(this._b)),this._ok=ee.ok,this._tc_id=y++}d.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 te=this.toRgb();return(te.r*299+te.g*587+te.b*114)/1e3},getLuminance:function(){var te=this.toRgb(),be,ee,ie,Ee,ne,J;return be=te.r/255,ee=te.g/255,ie=te.b/255,be<=.03928?Ee=be/12.92:Ee=v.pow((be+.055)/1.055,2.4),ee<=.03928?ne=ee/12.92:ne=v.pow((ee+.055)/1.055,2.4),ie<=.03928?J=ie/12.92:J=v.pow((ie+.055)/1.055,2.4),.2126*Ee+.7152*ne+.0722*J},setAlpha:function(te){return this._a=z(te),this._roundA=m(100*this._a)/100,this},toHsv:function(){var te=o(this._r,this._g,this._b);return{h:te.h*360,s:te.s,v:te.v,a:this._a}},toHsvString:function(){var te=o(this._r,this._g,this._b),be=m(te.h*360),ee=m(te.s*100),ie=m(te.v*100);return this._a==1?"hsv("+be+", "+ee+"%, "+ie+"%)":"hsva("+be+", "+ee+"%, "+ie+"%, "+this._roundA+")"},toHsl:function(){var te=r(this._r,this._g,this._b);return{h:te.h*360,s:te.s,l:te.l,a:this._a}},toHslString:function(){var te=r(this._r,this._g,this._b),be=m(te.h*360),ee=m(te.s*100),ie=m(te.l*100);return this._a==1?"hsl("+be+", "+ee+"%, "+ie+"%)":"hsla("+be+", "+ee+"%, "+ie+"%, "+this._roundA+")"},toHex:function(te){return u(this._r,this._g,this._b,te)},toHexString:function(te){return"#"+this.toHex(te)},toHex8:function(te){return a(this._r,this._g,this._b,this._a,te)},toHex8String:function(te){return"#"+this.toHex8(te)},toRgb:function(){return{r:m(this._r),g:m(this._g),b:m(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+m(this._r)+", "+m(this._g)+", "+m(this._b)+")":"rgba("+m(this._r)+", "+m(this._g)+", "+m(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:m(U(this._r,255)*100)+"%",g:m(U(this._g,255)*100)+"%",b:m(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%)":"rgba("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:K[u(this._r,this._g,this._b,!0)]||!1},toFilter:function(te){var be="#"+c(this._r,this._g,this._b,this._a),ee=be,ie=this._gradientType?"GradientType = 1, ":"";if(te){var Ee=d(te);ee="#"+c(Ee._r,Ee._g,Ee._b,Ee._a)}return"progid:DXImageTransform.Microsoft.gradient("+ie+"startColorstr="+be+",endColorstr="+ee+")"},toString:function(te){var be=!!te;te=te||this._format;var ee=!1,ie=this._a<1&&this._a>=0,Ee=!be&&ie&&(te==="hex"||te==="hex6"||te==="hex3"||te==="hex4"||te==="hex8"||te==="name");return Ee?te==="name"&&this._a===0?this.toName():this.toRgbString():(te==="rgb"&&(ee=this.toRgbString()),te==="prgb"&&(ee=this.toPercentageRgbString()),(te==="hex"||te==="hex6")&&(ee=this.toHexString()),te==="hex3"&&(ee=this.toHexString(!0)),te==="hex4"&&(ee=this.toHex8String(!0)),te==="hex8"&&(ee=this.toHex8String()),te==="name"&&(ee=this.toName()),te==="hsl"&&(ee=this.toHslString()),te==="hsv"&&(ee=this.toHsvString()),ee||this.toHexString())},clone:function(){return d(this.toString())},_applyModification:function(te,be){var ee=te.apply(null,[this].concat([].slice.call(be)));return this._r=ee._r,this._g=ee._g,this._b=ee._b,this.setAlpha(ee._a),this},lighten:function(){return this._applyModification(h,arguments)},brighten:function(){return this._applyModification(R,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(f,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(_,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(te,be){return te.apply(null,[this].concat([].slice.call(be)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},d.fromRatio=function(te,be){if(typeof te=="object"){var ee={};for(var ie in te)te.hasOwnProperty(ie)&&(ie==="a"?ee[ie]=te[ie]:ee[ie]=ce(te[ie]));te=ee}return d(te,be)};function t(te){var be={r:0,g:0,b:0},ee=1,ie=null,Ee=null,ne=null,J=!1,X=!1;return typeof te=="string"&&(te=oe(te)),typeof te=="object"&&(ge(te.r)&&ge(te.g)&&ge(te.b)?(be=l(te.r,te.g,te.b),J=!0,X=String(te.r).substr(-1)==="%"?"prgb":"rgb"):ge(te.h)&&ge(te.s)&&ge(te.v)?(ie=ce(te.s),Ee=ce(te.v),be=s(te.h,ie,Ee),J=!0,X="hsv"):ge(te.h)&&ge(te.s)&&ge(te.l)&&(ie=ce(te.s),ne=ce(te.l),be=i(te.h,ie,ne),J=!0,X="hsl"),te.hasOwnProperty("a")&&(ee=te.a)),ee=z(ee),{ok:J,format:te.format||X,r:S(255,b(be.r,0)),g:S(255,b(be.g,0)),b:S(255,b(be.b,0)),a:ee}}function l(te,be,ee){return{r:U(te,255)*255,g:U(be,255)*255,b:U(ee,255)*255}}function r(te,be,ee){te=U(te,255),be=U(be,255),ee=U(ee,255);var ie=b(te,be,ee),Ee=S(te,be,ee),ne,J,X=(ie+Ee)/2;if(ie==Ee)ne=J=0;else{var Q=ie-Ee;J=X>.5?Q/(2-ie-Ee):Q/(ie+Ee);switch(ie){case te:ne=(be-ee)/Q+(be<ee?6:0);break;case be:ne=(ee-te)/Q+2;break;case ee:ne=(te-be)/Q+4;break}ne/=6}return{h:ne,s:J,l:X}}function i(te,be,ee){var ie,Ee,ne;te=U(te,360),be=U(be,100),ee=U(ee,100);function J(me,fe,Te){return Te<0&&(Te+=1),Te>1&&(Te-=1),Te<1/6?me+(fe-me)*6*Te:Te<1/2?fe:Te<2/3?me+(fe-me)*(2/3-Te)*6:me}if(be===0)ie=Ee=ne=ee;else{var X=ee<.5?ee*(1+be):ee+be-ee*be,Q=2*ee-X;ie=J(Q,X,te+1/3),Ee=J(Q,X,te),ne=J(Q,X,te-1/3)}return{r:ie*255,g:Ee*255,b:ne*255}}function o(te,be,ee){te=U(te,255),be=U(be,255),ee=U(ee,255);var ie=b(te,be,ee),Ee=S(te,be,ee),ne,J,X=ie,Q=ie-Ee;if(J=ie===0?0:Q/ie,ie==Ee)ne=0;else{switch(ie){case te:ne=(be-ee)/Q+(be<ee?6:0);break;case be:ne=(ee-te)/Q+2;break;case ee:ne=(te-be)/Q+4;break}ne/=6}return{h:ne,s:J,v:X}}function s(te,be,ee){te=U(te,360)*6,be=U(be,100),ee=U(ee,100);var ie=v.floor(te),Ee=te-ie,ne=ee*(1-be),J=ee*(1-Ee*be),X=ee*(1-(1-Ee)*be),Q=ie%6,me=[ee,J,ne,ne,X,ee][Q],fe=[X,ee,ee,J,ne,ne][Q],Te=[ne,ne,X,ee,ee,J][Q];return{r:me*255,g:fe*255,b:Te*255}}function u(te,be,ee,ie){var Ee=[Z(m(te).toString(16)),Z(m(be).toString(16)),Z(m(ee).toString(16))];return ie&&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 a(te,be,ee,ie,Ee){var ne=[Z(m(te).toString(16)),Z(m(be).toString(16)),Z(m(ee).toString(16)),Z(he(ie))];return Ee&&ne[0].charAt(0)==ne[0].charAt(1)&&ne[1].charAt(0)==ne[1].charAt(1)&&ne[2].charAt(0)==ne[2].charAt(1)&&ne[3].charAt(0)==ne[3].charAt(1)?ne[0].charAt(0)+ne[1].charAt(0)+ne[2].charAt(0)+ne[3].charAt(0):ne.join("")}function c(te,be,ee,ie){var Ee=[Z(he(ie)),Z(m(te).toString(16)),Z(m(be).toString(16)),Z(m(ee).toString(16))];return Ee.join("")}d.equals=function(te,be){return!te||!be?!1:d(te).toRgbString()==d(be).toRgbString()},d.random=function(){return d.fromRatio({r:p(),g:p(),b:p()})};function f(te,be){be=be===0?0:be||10;var ee=d(te).toHsl();return ee.s-=be/100,ee.s=P(ee.s),d(ee)}function w(te,be){be=be===0?0:be||10;var ee=d(te).toHsl();return ee.s+=be/100,ee.s=P(ee.s),d(ee)}function _(te){return d(te).desaturate(100)}function h(te,be){be=be===0?0:be||10;var ee=d(te).toHsl();return ee.l+=be/100,ee.l=P(ee.l),d(ee)}function R(te,be){be=be===0?0:be||10;var ee=d(te).toRgb();return ee.r=b(0,S(255,ee.r-m(255*-(be/100)))),ee.g=b(0,S(255,ee.g-m(255*-(be/100)))),ee.b=b(0,S(255,ee.b-m(255*-(be/100)))),d(ee)}function C(te,be){be=be===0?0:be||10;var ee=d(te).toHsl();return ee.l-=be/100,ee.l=P(ee.l),d(ee)}function g(te,be){var ee=d(te).toHsl(),ie=(ee.h+be)%360;return ee.h=ie<0?360+ie:ie,d(ee)}function x(te){var be=d(te).toHsl();return be.h=(be.h+180)%360,d(be)}function E(te){var be=d(te).toHsl(),ee=be.h;return[d(te),d({h:(ee+120)%360,s:be.s,l:be.l}),d({h:(ee+240)%360,s:be.s,l:be.l})]}function T(te){var be=d(te).toHsl(),ee=be.h;return[d(te),d({h:(ee+90)%360,s:be.s,l:be.l}),d({h:(ee+180)%360,s:be.s,l:be.l}),d({h:(ee+270)%360,s:be.s,l:be.l})]}function k(te){var be=d(te).toHsl(),ee=be.h;return[d(te),d({h:(ee+72)%360,s:be.s,l:be.l}),d({h:(ee+216)%360,s:be.s,l:be.l})]}function L(te,be,ee){be=be||6,ee=ee||30;var ie=d(te).toHsl(),Ee=360/ee,ne=[d(te)];for(ie.h=(ie.h-(Ee*be>>1)+720)%360;--be;)ie.h=(ie.h+Ee)%360,ne.push(d(ie));return ne}function A(te,be){be=be||6;for(var ee=d(te).toHsv(),ie=ee.h,Ee=ee.s,ne=ee.v,J=[],X=1/be;be--;)J.push(d({h:ie,s:Ee,v:ne})),ne=(ne+X)%1;return J}d.mix=function(te,be,ee){ee=ee===0?0:ee||50;var ie=d(te).toRgb(),Ee=d(be).toRgb(),ne=ee/100,J={r:(Ee.r-ie.r)*ne+ie.r,g:(Ee.g-ie.g)*ne+ie.g,b:(Ee.b-ie.b)*ne+ie.b,a:(Ee.a-ie.a)*ne+ie.a};return d(J)},d.readability=function(te,be){var ee=d(te),ie=d(be);return(v.max(ee.getLuminance(),ie.getLuminance())+.05)/(v.min(ee.getLuminance(),ie.getLuminance())+.05)},d.isReadable=function(te,be,ee){var ie=d.readability(te,be),Ee,ne;ne=!1,Ee=se(ee);switch(Ee.level+Ee.size){case"AAsmall":case"AAAlarge":ne=ie>=4.5;break;case"AAlarge":ne=ie>=3;break;case"AAAsmall":ne=ie>=7;break}return ne},d.mostReadable=function(te,be,ee){var ie=null,Ee=0,ne,J,X,Q;ee=ee||{},J=ee.includeFallbackColors,X=ee.level,Q=ee.size;for(var me=0;me<be.length;me++)ne=d.readability(te,be[me]),ne>Ee&&(Ee=ne,ie=d(be[me]));return d.isReadable(te,ie,{level:X,size:Q})||!J?ie:(ee.includeFallbackColors=!1,d.mostReadable(te,["#fff","#000"],ee))};var G=d.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=d.hexNames=W(G);function W(te){var be={};for(var ee in te)te.hasOwnProperty(ee)&&(be[te[ee]]=ee);return be}function z(te){return te=parseFloat(te),(isNaN(te)||te<0||te>1)&&(te=1),te}function U(te,be){V(te)&&(te="100%");var ee=q(te);return te=S(be,b(0,parseFloat(te))),ee&&(te=parseInt(te*be,10)/100),v.abs(te-be)<1e-6?1:te%be/parseFloat(be)}function P(te){return S(1,b(0,te))}function H(te){return parseInt(te,16)}function V(te){return typeof te=="string"&&te.indexOf(".")!=-1&&parseFloat(te)===1}function q(te){return typeof te=="string"&&te.indexOf("%")!=-1}function Z(te){return te.length==1?"0"+te:""+te}function ce(te){return te<=1&&(te=te*100+"%"),te}function he(te){return v.round(parseFloat(te)*255).toString(16)}function ae(te){return H(te)/255}var xe=function(){var te="[-\\+]?\\d+%?",be="[-\\+]?\\d*\\.\\d+%?",ee="(?:"+be+")|(?:"+te+")",ie="[\\s|\\(]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")\\s*\\)?",Ee="[\\s|\\(]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")[,|\\s]+("+ee+")\\s*\\)?";return{CSS_UNIT:new RegExp(ee),rgb:new RegExp("rgb"+ie),rgba:new RegExp("rgba"+Ee),hsl:new RegExp("hsl"+ie),hsla:new RegExp("hsla"+Ee),hsv:new RegExp("hsv"+ie),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 ge(te){return!!xe.CSS_UNIT.exec(te)}function oe(te){te=te.replace(O,"").replace(M,"").toLowerCase();var be=!1;if(G[te])te=G[te],be=!0;else if(te=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ee;return(ee=xe.rgb.exec(te))?{r:ee[1],g:ee[2],b:ee[3]}:(ee=xe.rgba.exec(te))?{r:ee[1],g:ee[2],b:ee[3],a:ee[4]}:(ee=xe.hsl.exec(te))?{h:ee[1],s:ee[2],l:ee[3]}:(ee=xe.hsla.exec(te))?{h:ee[1],s:ee[2],l:ee[3],a:ee[4]}:(ee=xe.hsv.exec(te))?{h:ee[1],s:ee[2],v:ee[3]}:(ee=xe.hsva.exec(te))?{h:ee[1],s:ee[2],v:ee[3],a:ee[4]}:(ee=xe.hex8.exec(te))?{r:H(ee[1]),g:H(ee[2]),b:H(ee[3]),a:ae(ee[4]),format:be?"name":"hex8"}:(ee=xe.hex6.exec(te))?{r:H(ee[1]),g:H(ee[2]),b:H(ee[3]),format:be?"name":"hex"}:(ee=xe.hex4.exec(te))?{r:H(ee[1]+""+ee[1]),g:H(ee[2]+""+ee[2]),b:H(ee[3]+""+ee[3]),a:ae(ee[4]+""+ee[4]),format:be?"name":"hex8"}:(ee=xe.hex3.exec(te))?{r:H(ee[1]+""+ee[1]),g:H(ee[2]+""+ee[2]),b:H(ee[3]+""+ee[3]),format:be?"name":"hex"}:!1}function se(te){var be,ee;return te=te||{level:"AA",size:"small"},be=(te.level||"AA").toUpperCase(),ee=(te.size||"small").toLowerCase(),be!=="AA"&&be!=="AAA"&&(be="AA"),ee!=="small"&&ee!=="large"&&(ee="small"),{level:be,size:ee}}F.exports?F.exports=d:!(N=function(){return d}.call($,j,$,F),N!==void 0&&(F.exports=N))})(Math)},bCnd:function(F,$,j){"use strict";j.d($,"b",function(){return M}),j.d($,"a",function(){return y});var N=j("je13"),v=j.n(N),O=!1;function M(m,S){var b=v.a.get("__ec");b||(b={}),b[m]=S,v.a.set("__ec",b)}function y(m,S){var b=v.a.get("__ec");return b?b[m]===void 0?S:b[m]:S}},bQjk:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return function(v){var O=N,M=O.lib,y=M.CipherParams,m=O.enc,S=m.Hex,b=O.format,p=b.Hex={stringify:function(d){return d.ciphertext.toString(S)},parse:function(d){var t=S.parse(d);return y.create({ciphertext:t})}}}(),N.format.Hex})},bT9E:function(F,$,j){"use strict";j.d($,"a",function(){return v});var N=j("VTBJ");function v(O,M){var y=Object(N.a)({},O);return Array.isArray(M)&&M.forEach(function(m){delete y[m]}),y}},biw7:function(F,$,j){"use strict";var N=j("cDcd"),v=j.n(N),O=N.createContext(null);$.a=O},c5Ni:function(F,$,j){},cDPC:function(F,$,j){"use strict";var N=j("tJVT"),v=j("cDcd"),O=j.n(v),M=j("i3hx"),y=j.n(M);$.a=function(m){var S=m.defaultX,b=S===void 0?"40%":S,p=m.leftChild,d=m.rightChild,t=m.className,l=m.hideResize,r=l===void 0?!1:l,i=Object(v.useState)(b),o=Object(N.a)(i,2),s=o[0],u=o[1],a=Object(v.useRef)();function c(){a.current=!0}Object(v.useEffect)(function(){function _(R){a.current&&u(R.pageX)}function h(){a.current=!1}return window.addEventListener("mousemove",_),window.addEventListener("mouseup",h),function(){window.removeEventListener("mousemove",_),window.removeEventListener("mouseup",h)}},[]);var f=typeof s=="number"&&s!==.01?"".concat(s,"px"):b,w="calc(100% - ".concat(r?"0px":"4px"," - ").concat(f,")");return O.a.createElement("div",{className:"split-panel-container ".concat(t)},O.a.createElement("section",{style:{width:f,display:s===.01?"none":""}},p),O.a.createElement("section",{className:"resize-x-bar",onMouseDown:c},O.a.createElement("a",{className:"btn-resize"},O.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},O.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"})))),O.a.createElement("section",{style:{width:w}},d))}},cv67:function(F,$,j){(function(N,v){F.exports=$=v(j("Ib8C"))})(this,function(N){return function(v){var O=N,M=O.lib,y=M.WordArray,m=M.Hasher,S=O.algo,b=[];(function(){for(var i=0;i<64;i++)b[i]=v.abs(v.sin(i+1))*4294967296|0})();var p=S.MD5=m.extend({_doReset:function(){this._hash=new y.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(i,o){for(var s=0;s<16;s++){var u=o+s,a=i[u];i[u]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360}var c=this._hash.words,f=i[o+0],w=i[o+1],_=i[o+2],h=i[o+3],R=i[o+4],C=i[o+5],g=i[o+6],x=i[o+7],E=i[o+8],T=i[o+9],k=i[o+10],L=i[o+11],A=i[o+12],G=i[o+13],K=i[o+14],W=i[o+15],z=c[0],U=c[1],P=c[2],H=c[3];z=d(z,U,P,H,f,7,b[0]),H=d(H,z,U,P,w,12,b[1]),P=d(P,H,z,U,_,17,b[2]),U=d(U,P,H,z,h,22,b[3]),z=d(z,U,P,H,R,7,b[4]),H=d(H,z,U,P,C,12,b[5]),P=d(P,H,z,U,g,17,b[6]),U=d(U,P,H,z,x,22,b[7]),z=d(z,U,P,H,E,7,b[8]),H=d(H,z,U,P,T,12,b[9]),P=d(P,H,z,U,k,17,b[10]),U=d(U,P,H,z,L,22,b[11]),z=d(z,U,P,H,A,7,b[12]),H=d(H,z,U,P,G,12,b[13]),P=d(P,H,z,U,K,17,b[14]),U=d(U,P,H,z,W,22,b[15]),z=t(z,U,P,H,w,5,b[16]),H=t(H,z,U,P,g,9,b[17]),P=t(P,H,z,U,L,14,b[18]),U=t(U,P,H,z,f,20,b[19]),z=t(z,U,P,H,C,5,b[20]),H=t(H,z,U,P,k,9,b[21]),P=t(P,H,z,U,W,14,b[22]),U=t(U,P,H,z,R,20,b[23]),z=t(z,U,P,H,T,5,b[24]),H=t(H,z,U,P,K,9,b[25]),P=t(P,H,z,U,h,14,b[26]),U=t(U,P,H,z,E,20,b[27]),z=t(z,U,P,H,G,5,b[28]),H=t(H,z,U,P,_,9,b[29]),P=t(P,H,z,U,x,14,b[30]),U=t(U,P,H,z,A,20,b[31]),z=l(z,U,P,H,C,4,b[32]),H=l(H,z,U,P,E,11,b[33]),P=l(P,H,z,U,L,16,b[34]),U=l(U,P,H,z,K,23,b[35]),z=l(z,U,P,H,w,4,b[36]),H=l(H,z,U,P,R,11,b[37]),P=l(P,H,z,U,x,16,b[38]),U=l(U,P,H,z,k,23,b[39]),z=l(z,U,P,H,G,4,b[40]),H=l(H,z,U,P,f,11,b[41]),P=l(P,H,z,U,h,16,b[42]),U=l(U,P,H,z,g,23,b[43]),z=l(z,U,P,H,T,4,b[44]),H=l(H,z,U,P,A,11,b[45]),P=l(P,H,z,U,W,16,b[46]),U=l(U,P,H,z,_,23,b[47]),z=r(z,U,P,H,f,6,b[48]),H=r(H,z,U,P,x,10,b[49]),P=r(P,H,z,U,K,15,b[50]),U=r(U,P,H,z,C,21,b[51]),z=r(z,U,P,H,A,6,b[52]),H=r(H,z,U,P,h,10,b[53]),P=r(P,H,z,U,k,15,b[54]),U=r(U,P,H,z,w,21,b[55]),z=r(z,U,P,H,E,6,b[56]),H=r(H,z,U,P,W,10,b[57]),P=r(P,H,z,U,g,15,b[58]),U=r(U,P,H,z,G,21,b[59]),z=r(z,U,P,H,R,6,b[60]),H=r(H,z,U,P,L,10,b[61]),P=r(P,H,z,U,_,15,b[62]),U=r(U,P,H,z,T,21,b[63]),c[0]=c[0]+z|0,c[1]=c[1]+U|0,c[2]=c[2]+P|0,c[3]=c[3]+H|0},_doFinalize:function(){var i=this._data,o=i.words,s=this._nDataBytes*8,u=i.sigBytes*8;o[u>>>5]|=128<<24-u%32;var a=v.floor(s/4294967296),c=s;o[(u+64>>>9<<4)+15]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,o[(u+64>>>9<<4)+14]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,i.sigBytes=(o.length+1)*4,this._process();for(var f=this._hash,w=f.words,_=0;_<4;_++){var h=w[_];w[_]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360}return f},clone:function(){var i=m.clone.call(this);return i._hash=this._hash.clone(),i}});function d(i,o,s,u,a,c,f){var w=i+(o&s|~o&u)+a+f;return(w<<c|w>>>32-c)+o}function t(i,o,s,u,a,c,f){var w=i+(o&u|s&~u)+a+f;return(w<<c|w>>>32-c)+o}function l(i,o,s,u,a,c,f){var w=i+(o^s^u)+a+f;return(w<<c|w>>>32-c)+o}function r(i,o,s,u,a,c,f){var w=i+(s^(o|~u))+a+f;return(w<<c|w>>>32-c)+o}O.MD5=m._createHelper(p),O.HmacMD5=m._createHmacHelper(p)}(Math),N.MD5})},dejd:function(F,$,j){},dmUQ:function(F,$,j){"use strict";var N=j("Ff2n"),v=j("rePB"),O=j("1OyB"),M=j("vuIU"),y=j("Ji7U"),m=j("md7G"),S=j("foSv"),b=j("cDcd"),p=j.n(b),d=j("TSYQ"),t=j.n(d),l=j("4IlW");function r(E,T){var k=Object.keys(E);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(E);T&&(L=L.filter(function(A){return Object.getOwnPropertyDescriptor(E,A).enumerable})),k.push.apply(k,L)}return k}function i(E){for(var T=1;T<arguments.length;T++){var k=arguments[T]!=null?arguments[T]:{};T%2?r(Object(k),!0).forEach(function(L){Object(v.a)(E,L,k[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(k)):r(Object(k)).forEach(function(L){Object.defineProperty(E,L,Object.getOwnPropertyDescriptor(k,L))})}return E}function o(E){var T=s();return function(){var L=Object(S.a)(E),A;if(T){var G=Object(S.a)(this).constructor;A=Reflect.construct(L,arguments,G)}else A=L.apply(this,arguments);return Object(m.a)(this,A)}}function s(){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(E){return!1}}function u(){}function a(E){E.preventDefault()}var c=function(T){return T.replace(/[^\w.-]+/g,"")},f=200,w=600,_=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,h=function(T){return T!=null},R=function(T,k){return k===T||typeof k=="number"&&typeof T=="number"&&isNaN(k)&&isNaN(T)},C=function(E){Object(y.a)(k,E);var T=o(k);function k(L){var A;Object(O.a)(this,k),A=T.call(this,L),A.onKeyDown=function(W){var z=A.props,U=z.onKeyDown,P=z.onPressEnter;if(W.keyCode===l.a.UP){var H=A.getRatio(W);A.up(W,H,null),A.stop()}else if(W.keyCode===l.a.DOWN){var V=A.getRatio(W);A.down(W,V,null),A.stop()}else W.keyCode===l.a.ENTER&&P&&P(W);if(A.recordCursorPosition(),A.lastKeyCode=W.keyCode,U){for(var q=arguments.length,Z=new Array(q>1?q-1:0),ce=1;ce<q;ce++)Z[ce-1]=arguments[ce];U.apply(void 0,[W].concat(Z))}},A.onKeyUp=function(W){var z=A.props.onKeyUp;if(A.stop(),A.recordCursorPosition(),z){for(var U=arguments.length,P=new Array(U>1?U-1:0),H=1;H<U;H++)P[H-1]=arguments[H];z.apply(void 0,[W].concat(P))}},A.onChange=function(W){var z=A.props.onChange;A.state.focused&&(A.inputting=!0),A.rawInput=A.props.parser(A.getValueFromEvent(W)),A.setState({inputValue:A.rawInput}),z(A.toNumber(A.rawInput))},A.onMouseUp=function(){var W=A.props.onMouseUp;A.recordCursorPosition(),W&&W.apply(void 0,arguments)},A.onFocus=function(){var W;A.setState({focused:!0}),(W=A.props).onFocus.apply(W,arguments)},A.onBlur=function(){var W=A.props.onBlur;A.inputting=!1,A.setState({focused:!1});var z=A.getCurrentValidValue(A.state.inputValue),U=A.setValue(z,u);if(W){var P=A.input.value,H=A.getInputDisplayValue({focus:!1,value:U});A.input.value=H&&Number(H),W.apply(void 0,arguments),A.input.value=P}},A.getRatio=function(W){var z=1;return W.metaKey||W.ctrlKey?z=.1:W.shiftKey&&(z=10),z},A.getFullNum=function(W){return isNaN(W)?W:/e/i.test(String(W))?Number(W).toFixed(18).replace(/\.?0+$/,""):W},A.getPrecision=function(W){if(h(A.props.precision))return A.props.precision;var z=String(W);if(z.indexOf("e-")>=0)return parseInt(z.slice(z.indexOf("e-")+2),10);var U=0;return z.indexOf(".")>=0&&(U=z.length-z.indexOf(".")-1),U},A.getInputDisplayValue=function(W){var z=W||A.state,U=z.focused,P=z.inputValue,H=z.value,V;U?V=P:V=A.toPrecisionAsStep(H),V==null&&(V="");var q=A.formatWrapper(V);return h(A.props.decimalSeparator)&&(q=q.toString().replace(".",A.props.decimalSeparator)),q},A.recordCursorPosition=function(){try{A.cursorStart=A.input.selectionStart,A.cursorEnd=A.input.selectionEnd,A.currentValue=A.input.value,A.cursorBefore=A.input.value.substring(0,A.cursorStart),A.cursorAfter=A.input.value.substring(A.cursorEnd)}catch(W){}},A.restoreByAfter=function(W){if(W===void 0)return!1;var z=A.input.value,U=z.lastIndexOf(W);if(U===-1)return!1;var P=A.cursorBefore.length;return A.lastKeyCode===l.a.DELETE&&A.cursorBefore.charAt(P-1)===W[0]?(A.fixCaret(P,P),!0):U+W.length===z.length?(A.fixCaret(U,U),!0):!1},A.partRestoreByAfter=function(W){return W===void 0?!1:Array.prototype.some.call(W,function(z,U){var P=W.substring(U);return A.restoreByAfter(P)})},A.isNotCompleteNumber=function(W){return isNaN(W)||W===""||W===null||W&&W.toString().indexOf(".")===W.toString().length-1},A.stop=function(){A.autoStepTimer&&clearTimeout(A.autoStepTimer)},A.down=function(W,z,U){A.pressingUpOrDown=!0,A.step("down",W,z,U)},A.up=function(W,z,U){A.pressingUpOrDown=!0,A.step("up",W,z,U)},A.saveInput=function(W){A.input=W};var G=L.value;G===void 0&&(G=L.defaultValue),A.state={focused:L.autoFocus};var K=A.getValidValue(A.toNumber(G));return A.state=i(i({},A.state),{},{inputValue:A.toPrecisionAsStep(K),value:K}),A}return Object(M.a)(k,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(A){var G=this.props,K=G.value,W=G.onChange,z=G.max,U=G.min,P=this.state.focused;if(A){if(!R(A.value,K)||!R(A.max,z)||!R(A.min,U)){var H=P?K:this.getValidValue(K),V;this.pressingUpOrDown?V=H:this.inputting?V=this.rawInput:V=this.toPrecisionAsStep(H),this.setState({value:H,inputValue:V})}var q="value"in this.props?K:this.state.value;"max"in this.props&&A.max!==z&&typeof q=="number"&&q>z&&W&&W(z),"min"in this.props&&A.min!==U&&typeof q=="number"&&q<U&&W&&W(U)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var Z=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===l.a.BACKSPACE?Z=this.cursorStart-1:this.lastKeyCode===l.a.DELETE&&(Z=this.cursorStart):Z=this.input.value.length,this.fixCaret(Z,Z)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case l.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case l.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(ce){}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(A){var G=A;return G===""?G="":this.isNotCompleteNumber(parseFloat(G))?G=this.state.value:G=this.getValidValue(G),this.toNumber(G)}},{key:"getValueFromEvent",value:function(A){var G=A.target.value.trim().replace(/。/g,".");return h(this.props.decimalSeparator)&&(G=G.replace(this.props.decimalSeparator,".")),G}},{key:"getValidValue",value:function(A){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,W=parseFloat(A);return isNaN(W)?A:(W<G&&(W=G),W>K&&(W=K),W)}},{key:"setValue",value:function(A,G){var K=this.props.precision,W=this.isNotCompleteNumber(parseFloat(A))?null:parseFloat(A),z=this.state.value,U=z===void 0?null:z,P=this.state.inputValue,H=P===void 0?null:P,V=typeof W=="number"?W.toFixed(K):"".concat(W),q=W!==U||V!=="".concat(H);return"value"in this.props?(H=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:H},G)):this.setState({value:W,inputValue:this.toPrecisionAsStep(A)},G),q&&this.props.onChange(W),W}},{key:"getMaxPrecision",value:function(A){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.props,W=K.precision,z=K.step;if(h(W))return W;var U=this.getPrecision(G),P=this.getPrecision(z),H=this.getPrecision(A);return A?Math.max(H,U+P):U+P}},{key:"getPrecisionFactor",value:function(A){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,K=this.getMaxPrecision(A,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(A){return this.props.formatter?this.props.formatter(A):A}},{key:"toPrecisionAsStep",value:function(A){if(this.isNotCompleteNumber(A)||A==="")return A;var G=Math.abs(this.getMaxPrecision(A));return isNaN(G)?A.toString():Number(A).toFixed(G)}},{key:"toNumber",value:function(A){var G=this.props.precision,K=this.state.focused,W=A&&A.length>16&&K;return this.isNotCompleteNumber(A)||W?A:h(G)?Math.round(A*Math.pow(10,G))/Math.pow(10,G):Number(A)}},{key:"upStep",value:function(A,G){var K=this.props.step,W=this.getPrecisionFactor(A,G),z=Math.abs(this.getMaxPrecision(A,G)),U=((W*A+W*K*G)/W).toFixed(z);return this.toNumber(U)}},{key:"downStep",value:function(A,G){var K=this.props.step,W=this.getPrecisionFactor(A,G),z=Math.abs(this.getMaxPrecision(A,G)),U=((W*A-W*K*G)/W).toFixed(z);return this.toNumber(U)}},{key:"step",value:function(A,G){var K=this,W=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 U=this.props;if(U.disabled)return;var P=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(P))return;var H=this["".concat(A,"Step")](P,W),V=H>U.max||H<U.min;if(H>U.max?H=U.max:H<U.min&&(H=U.min),this.setValue(H,null),this.setState({focused:!0},function(){K.pressingUpOrDown=!1}),V)return;this.autoStepTimer=setTimeout(function(){K[A](G,W,!0)},z?f:w)}},{key:"fixCaret",value:function(A,G){if(A===void 0||G===void 0||!this.input||!this.input.value)return;try{var K=this.input.selectionStart,W=this.input.selectionEnd;(A!==K||G!==W)&&this.input.setSelectionRange(A,G)}catch(z){}}},{key:"render",value:function(){var A,G=this.props,K=G.prefixCls,W=G.disabled,z=G.readOnly,U=G.useTouch,P=G.autoComplete,H=G.upHandler,V=G.downHandler,q=G.className,Z=G.max,ce=G.min,he=G.style,ae=G.title,xe=G.onMouseEnter,ge=G.onMouseLeave,oe=G.onMouseOver,se=G.onMouseOut,te=G.required,be=G.onClick,ee=G.tabIndex,ie=G.type,Ee=G.placeholder,ne=G.id,J=G.inputMode,X=G.pattern,Q=G.step,me=G.maxLength,fe=G.autoFocus,Te=G.name,ze=G.onPaste,Je=G.onInput,qe=Object(N.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"]),Xe=this.state,et=Xe.value,rt=Xe.focused,Le=t()(K,(A={},Object(v.a)(A,q,!!q),Object(v.a)(A,"".concat(K,"-disabled"),W),Object(v.a)(A,"".concat(K,"-focused"),rt),A)),Oe={};Object.keys(qe).forEach(function(Ie){(Ie.substr(0,5)==="data-"||Ie.substr(0,5)==="aria-"||Ie==="role")&&(Oe[Ie]=qe[Ie])});var Ve=!z&&!W,Ze=this.getInputDisplayValue(null),Ne=(et||et===0)&&(isNaN(et)||Number(et)>=Z),Ge=(et||et===0)&&(isNaN(et)||Number(et)<=ce),De=Ne||W||z,we=Ge||W||z,Ae=t()("".concat(K,"-handler"),"".concat(K,"-handler-up"),Object(v.a)({},"".concat(K,"-handler-up-disabled"),De)),de=t()("".concat(K,"-handler"),"".concat(K,"-handler-down"),Object(v.a)({},"".concat(K,"-handler-down-disabled"),we)),_e=U?{onTouchStart:De?u:this.up,onTouchEnd:this.stop}:{onMouseDown:De?u:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Se=U?{onTouchStart:we?u:this.down,onTouchEnd:this.stop}:{onMouseDown:we?u:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return p.a.createElement("div",{className:Le,style:he,title:ae,onMouseEnter:xe,onMouseLeave:ge,onMouseOver:oe,onMouseOut:se,onFocus:function(){return null},onBlur:function(){return null}},p.a.createElement("div",{className:"".concat(K,"-handler-wrap")},p.a.createElement("span",Object.assign({unselectable:"on"},_e,{role:"button","aria-label":"Increase Value","aria-disabled":De,className:Ae}),H||p.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-up-inner"),onClick:a})),p.a.createElement("span",Object.assign({unselectable:"on"},Se,{role:"button","aria-label":"Decrease Value","aria-disabled":we,className:de}),V||p.a.createElement("span",{unselectable:"on",className:"".concat(K,"-handler-down-inner"),onClick:a}))),p.a.createElement("div",{className:"".concat(K,"-input-wrap")},p.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ce,"aria-valuemax":Z,"aria-valuenow":et,required:te,type:ie,placeholder:Ee,onPaste:ze,onClick:be,onMouseUp:this.onMouseUp,className:"".concat(K,"-input"),tabIndex:ee,autoComplete:P,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ve?this.onKeyDown:u,onKeyUp:Ve?this.onKeyUp:u,autoFocus:fe,maxLength:me,readOnly:z,disabled:W,max:Z,min:ce,step:Q,name:Te,title:ae,id:ne,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Ze),pattern:X,inputMode:J,onInput:Je},Oe))))}}]),k}(p.a.Component);C.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:_,min:-_,step:1,style:{},onChange:u,onKeyDown:u,onPressEnter:u,onFocus:u,onBlur:u,parser:c,required:!1,autoComplete:"off"};var g=C,x=$.a=g},e7zE:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("3y9D"),j("WYAk"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.Base,y=O.WordArray,m=v.algo,S=m.SHA1,b=m.HMAC,p=m.PBKDF2=M.extend({cfg:M.extend({keySize:128/32,hasher:S,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,t){for(var l=this.cfg,r=b.create(l.hasher,d),i=y.create(),o=y.create([1]),s=i.words,u=o.words,a=l.keySize,c=l.iterations;s.length<a;){var f=r.update(t).finalize(o);r.reset();for(var w=f.words,_=w.length,h=f,R=1;R<c;R++){h=r.finalize(h),r.reset();for(var C=h.words,g=0;g<_;g++)w[g]^=C[g]}i.concat(f),u[0]++}return i.sigBytes=a*4,i}});v.PBKDF2=function(d,t,l){return p.create(l).compute(d,t)}}(),N.PBKDF2})},eRFJ:function(F,$,j){F.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(F,$,j){"use strict";var N=j("Ff2n"),v=j("1OyB"),O=j("vuIU"),M=j("Ji7U"),y=j("md7G"),m=j("foSv"),S=j("1W/9"),b=j("cDcd"),p=j("rePB"),d=j("JX7q"),t=j("TSYQ"),l=j.n(t),r=j("qx4F"),i=j("4IlW");function o(W){return Array.isArray(W)?W:[W]}var s={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},u=Object.keys(s).filter(function(W){if(typeof document=="undefined")return!1;var z=document.getElementsByTagName("html")[0];return W in(z?z.style:{})})[0],a=s[u];function c(W,z,U,P){W.addEventListener?W.addEventListener(z,U,P):W.attachEvent&&W.attachEvent("on".concat(z),U)}function f(W,z,U,P){W.removeEventListener?W.removeEventListener(z,U,P):W.attachEvent&&W.detachEvent("on".concat(z),U)}function w(W,z){var U=typeof W=="function"?W(z):W;return Array.isArray(U)?U.length===2?U:[U[0],U[1]]:[U]}var _=function(z){return!isNaN(parseFloat(z))&&isFinite(z)},h=!(typeof window!="undefined"&&window.document&&window.document.createElement),R=function W(z,U,P,H){if(!U||U===document||U instanceof Document)return!1;if(U===z.parentNode)return!0;var V=Math.max(Math.abs(P),Math.abs(H))===Math.abs(H),q=Math.max(Math.abs(P),Math.abs(H))===Math.abs(P),Z=U.scrollHeight-U.clientHeight,ce=U.scrollWidth-U.clientWidth,he=document.defaultView.getComputedStyle(U),ae=he.overflowY==="auto"||he.overflowY==="scroll",xe=he.overflowX==="auto"||he.overflowX==="scroll",ge=Z&&ae,oe=ce&&xe;return V&&(!ge||ge&&(U.scrollTop>=Z&&H<0||U.scrollTop<=0&&H>0))||q&&(!oe||oe&&(U.scrollLeft>=ce&&P<0||U.scrollLeft<=0&&P>0))?W(z,U.parentNode,P,H):!1};function C(W){var z=g();return function(){var P=Object(m.a)(W),H;if(z){var V=Object(m.a)(this).constructor;H=Reflect.construct(P,arguments,V)}else H=P.apply(this,arguments);return Object(y.a)(this,H)}}function g(){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(W){return!1}}var x={},E=function(W){Object(M.a)(U,W);var z=C(U);function U(P){var H;return Object(v.a)(this,U),H=z.call(this,P),H.domFocus=function(){H.dom&&H.dom.focus()},H.removeStartHandler=function(V){if(V.touches.length>1)return;H.startPos={x:V.touches[0].clientX,y:V.touches[0].clientY}},H.removeMoveHandler=function(V){if(V.changedTouches.length>1)return;var q=V.currentTarget,Z=V.changedTouches[0].clientX-H.startPos.x,ce=V.changedTouches[0].clientY-H.startPos.y;(q===H.maskDom||q===H.handlerDom||q===H.contentDom&&R(q,V.target,Z,ce))&&V.cancelable&&V.preventDefault()},H.transitionEnd=function(V){var q=V.target;f(q,a,H.transitionEnd),q.style.transition=""},H.onKeyDown=function(V){if(V.keyCode===i.a.ESC){var q=H.props.onClose;V.stopPropagation(),q&&q(V)}},H.onWrapperTransitionEnd=function(V){var q=H.props,Z=q.open,ce=q.afterVisibleChange;V.target===H.contentWrapper&&V.propertyName.match(/transform$/)&&(H.dom.style.transition="",!Z&&H.getCurrentDrawerSome()&&(document.body.style.overflowX="",H.maskDom&&(H.maskDom.style.left="",H.maskDom.style.width="")),ce&&ce(!!Z))},H.openLevelTransition=function(){var V=H.props,q=V.open,Z=V.width,ce=V.height,he=H.getHorizontalBoolAndPlacementName(),ae=he.isHorizontal,xe=he.placementName,ge=H.contentDom?H.contentDom.getBoundingClientRect()[ae?"width":"height"]:0,oe=(ae?Z:ce)||ge;H.setLevelAndScrolling(q,xe,oe)},H.setLevelTransform=function(V,q,Z,ce){var he=H.props,ae=he.placement,xe=he.levelMove,ge=he.duration,oe=he.ease,se=he.showMask;H.levelDom.forEach(function(te){te.style.transition="transform ".concat(ge," ").concat(oe),c(te,a,H.transitionEnd);var be=V?Z:0;if(xe){var ee=w(xe,{target:te,open:V});be=V?ee[0]:ee[1]||0}var ie=typeof be=="number"?"".concat(be,"px"):be,Ee=ae==="left"||ae==="top"?ie:"-".concat(ie);Ee=se&&ae==="right"&&ce?"calc(".concat(Ee," + ").concat(ce,"px)"):Ee,te.style.transform=be?"".concat(q,"(").concat(Ee,")"):""})},H.setLevelAndScrolling=function(V,q,Z){var ce=H.props.onChange;if(!h){var he=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(r.a)(!0):0;H.setLevelTransform(V,q,Z,he),H.toggleScrollingToDrawerAndBody(he)}ce&&ce(V)},H.toggleScrollingToDrawerAndBody=function(V){var q=H.props,Z=q.getOpenCount,ce=q.getContainer,he=q.showMask,ae=q.open,xe=ce&&ce(),ge=Z&&Z();if(xe&&xe.parentNode===document.body&&he){var oe=["touchstart"],se=[document.body,H.maskDom,H.handlerDom,H.contentDom];ae&&document.body.style.overflow!=="hidden"?(V&&H.addScrollingEffect(V),ge===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",se.forEach(function(te,be){if(!te)return;c(te,oe[be]||"touchmove",be?H.removeMoveHandler:H.removeStartHandler,H.passive)})):H.getCurrentDrawerSome()&&(ge||(document.body.style.overflow=""),document.body.style.touchAction="",V&&H.remScrollingEffect(V),se.forEach(function(te,be){if(!te)return;f(te,oe[be]||"touchmove",be?H.removeMoveHandler:H.removeStartHandler,H.passive)}))}},H.addScrollingEffect=function(V){var q=H.props,Z=q.placement,ce=q.duration,he=q.ease,ae=q.getOpenCount,xe=q.switchScrollingEffect,ge=ae&&ae();ge===1&&xe();var oe="width ".concat(ce," ").concat(he),se="transform ".concat(ce," ").concat(he);H.dom.style.transition="none";switch(Z){case"right":H.dom.style.transform="translateX(-".concat(V,"px)");break;case"top":case"bottom":H.dom.style.width="calc(100% - ".concat(V,"px)"),H.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(H.timeout),H.timeout=setTimeout(function(){H.dom&&(H.dom.style.transition="".concat(se,",").concat(oe),H.dom.style.width="",H.dom.style.transform="")})},H.remScrollingEffect=function(V){var q=H.props,Z=q.placement,ce=q.duration,he=q.ease,ae=q.getOpenCount,xe=q.switchScrollingEffect,ge=ae&&ae();ge||xe(!0),u&&(document.body.style.overflowX="hidden"),H.dom.style.transition="none";var oe,se="width ".concat(ce," ").concat(he),te="transform ".concat(ce," ").concat(he);switch(Z){case"left":{H.dom.style.width="100%",se="width 0s ".concat(he," ").concat(ce);break}case"right":{H.dom.style.transform="translateX(".concat(V,"px)"),H.dom.style.width="100%",se="width 0s ".concat(he," ").concat(ce),H.maskDom&&(H.maskDom.style.left="-".concat(V,"px"),H.maskDom.style.width="calc(100% + ".concat(V,"px)"));break}case"top":case"bottom":{H.dom.style.width="calc(100% + ".concat(V,"px)"),H.dom.style.height="100%",H.dom.style.transform="translateZ(0)",oe="height 0s ".concat(he," ").concat(ce);break}default:break}clearTimeout(H.timeout),H.timeout=setTimeout(function(){H.dom&&(H.dom.style.transition="".concat(te,",").concat(oe?"".concat(oe,","):"").concat(se),H.dom.style.transform="",H.dom.style.width="",H.dom.style.height="")})},H.getCurrentDrawerSome=function(){return!Object.keys(x).some(function(V){return x[V]})},H.getLevelDom=function(V){var q=V.level,Z=V.getContainer;if(h)return;var ce=Z&&Z(),he=ce?ce.parentNode:null;if(H.levelDom=[],q==="all"){var ae=he?Array.prototype.slice.call(he.children):[];ae.forEach(function(xe){xe.nodeName!=="SCRIPT"&&xe.nodeName!=="STYLE"&&xe.nodeName!=="LINK"&&xe!==ce&&H.levelDom.push(xe)})}else q&&o(q).forEach(function(xe){document.querySelectorAll(xe).forEach(function(ge){H.levelDom.push(ge)})})},H.getHorizontalBoolAndPlacementName=function(){var V=H.props.placement,q=V==="left"||V==="right",Z="translate".concat(q?"X":"Y");return{isHorizontal:q,placementName:Z}},H.state={_self:Object(d.a)(H)},H}return Object(O.a)(U,[{key:"componentDidMount",value:function(){var H=this;if(!h){var V=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return V=!0,null}}))}catch(ae){}this.passive=V?{passive:!1}:!1}var q=this.props,Z=q.open,ce=q.getContainer,he=ce&&ce();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),Z&&(he&&he.parentNode===document.body&&(x[this.drawerId]=Z),this.openLevelTransition(),this.forceUpdate(function(){H.domFocus()}))}},{key:"componentDidUpdate",value:function(H){var V=this.props,q=V.open,Z=V.getContainer,ce=Z&&Z();q!==H.open&&(q&&this.domFocus(),ce&&ce.parentNode===document.body&&(x[this.drawerId]=!!q),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var H=this.props,V=H.getOpenCount,q=H.open,Z=H.switchScrollingEffect,ce=typeof V=="function"&&V();delete x[this.drawerId],q&&(this.setLevelTransform(!1),document.body.style.touchAction=""),ce||(document.body.style.overflow="",Z(!0))}},{key:"render",value:function(){var H,V=this,q=this.props,Z=q.className,ce=q.children,he=q.style,ae=q.width,xe=q.height,ge=q.defaultOpen,oe=q.open,se=q.prefixCls,te=q.placement,be=q.level,ee=q.levelMove,ie=q.ease,Ee=q.duration,ne=q.getContainer,J=q.handler,X=q.onChange,Q=q.afterVisibleChange,me=q.showMask,fe=q.maskClosable,Te=q.maskStyle,ze=q.onClose,Je=q.onHandleClick,qe=q.keyboard,Xe=q.getOpenCount,et=q.switchScrollingEffect,rt=Object(N.a)(q,["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?oe:!1,Oe=l()(se,(H={},Object(p.a)(H,"".concat(se,"-").concat(te),!0),Object(p.a)(H,"".concat(se,"-open"),Le),Object(p.a)(H,Z||"",!!Z),Object(p.a)(H,"no-mask",!me),H)),Ve=this.getHorizontalBoolAndPlacementName(),Ze=Ve.placementName,Ne=te==="left"||te==="top"?"-100%":"100%",Ge=Le?"":"".concat(Ze,"(").concat(Ne,")"),De=J&&b.cloneElement(J,{onClick:function(Ae){J.props.onClick&&J.props.onClick(),Je&&Je(Ae)},ref:function(Ae){V.handlerDom=Ae}});return b.createElement("div",Object.assign({},rt,{tabIndex:-1,className:Oe,style:he,ref:function(Ae){V.dom=Ae},onKeyDown:Le&&qe?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),me&&b.createElement("div",{className:"".concat(se,"-mask"),onClick:fe?ze:void 0,style:Te,ref:function(Ae){V.maskDom=Ae}}),b.createElement("div",{className:"".concat(se,"-content-wrapper"),style:{transform:Ge,msTransform:Ge,width:_(ae)?"".concat(ae,"px"):ae,height:_(xe)?"".concat(xe,"px"):xe},ref:function(Ae){V.contentWrapper=Ae}},b.createElement("div",{className:"".concat(se,"-content"),ref:function(Ae){V.contentDom=Ae},onTouchStart:Le&&me?this.removeStartHandler:void 0,onTouchMove:Le&&me?this.removeMoveHandler:void 0},ce),De))}}],[{key:"getDerivedStateFromProps",value:function(H,V){var q=V.prevProps,Z=V._self,ce={prevProps:H};if(q!==void 0){var he=H.placement,ae=H.level;he!==q.placement&&(Z.contentDom=null),ae!==q.level&&Z.getLevelDom(H)}return ce}}]),U}(b.Component);E.defaultProps={switchScrollingEffect:function(){}};var T=E;function k(W){var z=L();return function(){var P=Object(m.a)(W),H;if(z){var V=Object(m.a)(this).constructor;H=Reflect.construct(P,arguments,V)}else H=P.apply(this,arguments);return Object(y.a)(this,H)}}function L(){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(W){return!1}}var A=function(W){Object(M.a)(U,W);var z=k(U);function U(P){var H;Object(v.a)(this,U),H=z.call(this,P),H.onHandleClick=function(q){var Z=H.props,ce=Z.onHandleClick,he=Z.open;if(ce&&ce(q),typeof he=="undefined"){var ae=H.state.open;H.setState({open:!ae})}},H.onClose=function(q){var Z=H.props,ce=Z.onClose,he=Z.open;ce&&ce(q),typeof he=="undefined"&&H.setState({open:!1})};var V=typeof P.open!="undefined"?P.open:!!P.defaultOpen;return H.state={open:V},"onMaskClick"in P&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),H}return Object(O.a)(U,[{key:"render",value:function(){var H=this,V=this.props,q=V.defaultOpen,Z=V.getContainer,ce=V.wrapperClassName,he=V.forceRender,ae=V.handler,xe=Object(N.a)(V,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),ge=this.state.open;if(!Z)return b.createElement("div",{className:ce,ref:function(te){H.dom=te}},b.createElement(T,Object.assign({},xe,{open:ge,handler:ae,getContainer:function(){return H.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var oe=!!ae||he;return b.createElement(S.a,{visible:ge,forceRender:oe,getContainer:Z,wrapperClassName:ce},function(se){var te=se.visible,be=se.afterClose,ee=Object(N.a)(se,["visible","afterClose"]);return b.createElement(T,Object.assign({},xe,ee,{open:te!==void 0?te:ge,afterVisibleChange:be!==void 0?be:xe.afterVisibleChange,handler:ae,onClose:H.onClose,onHandleClick:H.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(H,V){var q=V.prevProps,Z={prevProps:H};return typeof q!="undefined"&&H.open!==q.open&&(Z.open=H.open),Z}}]),U}(b.Component);A.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:b.createElement("div",{className:"drawer-handle"},b.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var G=A,K=$.a=G},fyJ8:function(F,$,j){"use strict";var N=j("rePB"),v=j("VTBJ"),O=j("Ff2n"),M=j("U8pU"),y=j("cDcd"),m=j.n(y),S=j("TSYQ"),b=j.n(S),p=j("c+Xe"),d=j("sR1s");function t(s){return s&&Object(M.a)(s)==="object"&&!Array.isArray(s)&&!y.isValidElement(s)}function l(s){return typeof s=="string"?!0:Object(p.c)(s)}function r(s,u){var a,c=s.prefixCls,f=s.className,w=s.record,_=s.index,h=s.dataIndex,R=s.render,C=s.children,g=s.component,x=g===void 0?"td":g,E=s.colSpan,T=s.rowSpan,k=s.fixLeft,L=s.fixRight,A=s.firstFixLeft,G=s.lastFixLeft,K=s.firstFixRight,W=s.lastFixRight,z=s.appendNode,U=s.additionalProps,P=U===void 0?{}:U,H=s.ellipsis,V=s.align,q=s.rowType,Z=s.isSticky,ce="".concat(c,"-cell"),he,ae;if(C)ae=C;else{var xe=Object(d.b)(w,h);if(ae=xe,R){var ge=R(xe,w,_);t(ge)?(ae=ge.children,he=ge.props):ae=ge}}Object(M.a)(ae)==="object"&&!Array.isArray(ae)&&!y.isValidElement(ae)&&(ae=null),H&&(G||K)&&(ae=y.createElement("span",{className:"".concat(ce,"-content")},ae));var oe=he||{},se=oe.colSpan,te=oe.rowSpan,be=oe.style,ee=oe.className,ie=Object(O.a)(oe,["colSpan","rowSpan","style","className"]),Ee=se!==void 0?se:E,ne=te!==void 0?te:T;if(Ee===0||ne===0)return null;var J={},X=typeof k=="number",Q=typeof L=="number";X&&(J.position="sticky",J.left=k),Q&&(J.position="sticky",J.right=L);var me={};V&&(me.textAlign=V);var fe,Te=H===!0?{showTitle:!0}:H;Te&&(Te.showTitle||q==="header")&&(typeof ae=="string"||typeof ae=="number"?fe=ae.toString():y.isValidElement(ae)&&typeof ae.props.children=="string"&&(fe=ae.props.children));var ze=Object(v.a)(Object(v.a)(Object(v.a)({title:fe},ie),P),{},{colSpan:Ee&&Ee!==1?Ee:null,rowSpan:ne&&ne!==1?ne:null,className:b()(ce,f,(a={},Object(N.a)(a,"".concat(ce,"-fix-left"),X),Object(N.a)(a,"".concat(ce,"-fix-left-first"),A),Object(N.a)(a,"".concat(ce,"-fix-left-last"),G),Object(N.a)(a,"".concat(ce,"-fix-right"),Q),Object(N.a)(a,"".concat(ce,"-fix-right-first"),K),Object(N.a)(a,"".concat(ce,"-fix-right-last"),W),Object(N.a)(a,"".concat(ce,"-ellipsis"),H),Object(N.a)(a,"".concat(ce,"-with-append"),z),Object(N.a)(a,"".concat(ce,"-fix-sticky"),(X||Q)&&Z),a),P.className,ee),style:Object(v.a)(Object(v.a)(Object(v.a)(Object(v.a)({},P.style),me),J),be),ref:l(x)?u:null});return y.createElement(x,Object.assign({},ze),z,ae)}var i=y.forwardRef(r);i.displayName="Cell";var o=y.memo(i,function(s,u){return u.shouldCellUpdate?!u.shouldCellUpdate(u.record,s.record):!1});$.a=o},gRFJ:function(F,$,j){F.exports=[j("rdUC"),j("ynwM"),j("RELg"),j("DlR+"),j("CrYA"),j("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(F){return F<10?"0"+F:F}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(F){return rx_escapable.lastIndex=0,rx_escapable.test(F)?'"'+F.replace(rx_escapable,function($){var j=meta[$];return typeof j=="string"?j:"\\u"+("0000"+$.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+F+'"'}function str(F,$){var j,N,v,O,M=gap,y,m=$[F];m&&typeof m=="object"&&typeof m.toJSON=="function"&&(m=m.toJSON(F)),typeof rep=="function"&&(m=rep.call($,F,m));switch(typeof m){case"string":return quote(m);case"number":return isFinite(m)?String(m):"null";case"boolean":case"null":return String(m);case"object":if(!m)return"null";if(gap+=indent,y=[],Object.prototype.toString.apply(m)==="[object Array]"){for(O=m.length,j=0;j<O;j+=1)y[j]=str(j,m)||"null";return v=y.length===0?"[]":gap?`[
`+gap+y.join(`,
`+gap)+`
`+M+"]":"["+y.join(",")+"]",gap=M,v}if(rep&&typeof rep=="object")for(O=rep.length,j=0;j<O;j+=1)typeof rep[j]=="string"&&(N=rep[j],v=str(N,m),v&&y.push(quote(N)+(gap?": ":":")+v));else for(N in m)Object.prototype.hasOwnProperty.call(m,N)&&(v=str(N,m),v&&y.push(quote(N)+(gap?": ":":")+v));return v=y.length===0?"{}":gap?`{
`+gap+y.join(`,
`+gap)+`
`+M+"}":"{"+y.join(",")+"}",gap=M,v}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(F,$,j){var N;if(gap="",indent="",typeof j=="number")for(N=0;N<j;N+=1)indent+=" ";else typeof j=="string"&&(indent=j);if(rep=$,$&&typeof $!="function"&&(typeof $!="object"||typeof $.length!="number"))throw new Error("JSON.stringify");return str("",{"":F})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(F,$){var j,N,v=F[$];if(v&&typeof v=="object")for(j in v)Object.prototype.hasOwnProperty.call(v,j)&&(N=walk(v,j),N!==void 0?v[j]=N:delete v[j]);return reviver.call(F,$,v)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(F){return"\\u"+("0000"+F.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(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.mode.ECB=function(){var v=N.lib.BlockCipherMode.extend();return v.Encryptor=v.extend({processBlock:function(O,M){this._cipher.encryptBlock(O,M)}}),v.Decryptor=v.extend({processBlock:function(O,M){this._cipher.decryptBlock(O,M)}}),v}(),N.mode.ECB})},h78n:function(F,$,j){"use strict";j.d($,"a",function(){return A});var N=j("cDcd"),v=j.n(N),O=j("TSYQ"),M=j.n(O),y={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},m=function(W){var z=W.map(function(){return Object(N.useRef)()}),U=Object(N.useRef)();return Object(N.useEffect)(function(){var P=Date.now(),H=!1;Object.keys(z).forEach(function(V){var q=z[V].current;if(!q)return;H=!0;var Z=q.style;Z.transitionDuration=".3s, .3s, .3s, .06s",U.current&&P-U.current<100&&(Z.transitionDuration="0s, 0s")}),H&&(U.current=Date.now())}),[z]};function S(){return S=Object.assign||function(K){for(var W=1;W<arguments.length;W++){var z=arguments[W];for(var U in z)Object.prototype.hasOwnProperty.call(z,U)&&(K[U]=z[U])}return K},S.apply(this,arguments)}function b(K,W){return r(K)||l(K,W)||d(K,W)||p()}function p(){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 d(K,W){if(!K)return;if(typeof K=="string")return t(K,W);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 t(K,W)}function t(K,W){(W==null||W>K.length)&&(W=K.length);for(var z=0,U=new Array(W);z<W;z++)U[z]=K[z];return U}function l(K,W){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(K)))return;var z=[],U=!0,P=!1,H=void 0;try{for(var V=K[Symbol.iterator](),q;!(U=(q=V.next()).done)&&!(z.push(q.value),W&&z.length===W);U=!0);}catch(Z){P=!0,H=Z}finally{try{!U&&V.return!=null&&V.return()}finally{if(P)throw H}}return z}function r(K){if(Array.isArray(K))return K}function i(K,W){if(K==null)return{};var z=o(K,W),U,P;if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(K);for(P=0;P<H.length;P++){if(U=H[P],W.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(K,U))continue;z[U]=K[U]}}return z}function o(K,W){if(K==null)return{};var z={},U=Object.keys(K),P,H;for(H=0;H<U.length;H++){if(P=U[H],W.indexOf(P)>=0)continue;z[P]=K[P]}return z}var s=function(W){var z=W.className,U=W.percent,P=W.prefixCls,H=W.strokeColor,V=W.strokeLinecap,q=W.strokeWidth,Z=W.style,ce=W.trailColor,he=W.trailWidth,ae=W.transition,xe=i(W,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete xe.gapPosition;var ge=Array.isArray(U)?U:[U],oe=Array.isArray(H)?H:[H],se=m(ge),te=b(se,1),be=te[0],ee=q/2,ie=100-q/2,Ee="M ".concat(V==="round"?ee:0,",").concat(ee,`
L `).concat(V==="round"?ie:100,",").concat(ee),ne="0 0 100 ".concat(q),J=0;return v.a.createElement("svg",S({className:M()("".concat(P,"-line"),z),viewBox:ne,preserveAspectRatio:"none",style:Z},xe),v.a.createElement("path",{className:"".concat(P,"-line-trail"),d:Ee,strokeLinecap:V,stroke:ce,strokeWidth:he||q,fillOpacity:"0"}),ge.map(function(X,Q){var me={strokeDasharray:"".concat(X,"px, 100px"),strokeDashoffset:"-".concat(J,"px"),transition:ae||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},fe=oe[Q]||oe[oe.length-1];return J+=X,v.a.createElement("path",{key:Q,className:"".concat(P,"-line-path"),d:Ee,strokeLinecap:V,stroke:fe,strokeWidth:q,fillOpacity:"0",ref:be[Q],style:me})}))};s.defaultProps=y;var u=s;function a(){return a=Object.assign||function(K){for(var W=1;W<arguments.length;W++){var z=arguments[W];for(var U in z)Object.prototype.hasOwnProperty.call(z,U)&&(K[U]=z[U])}return K},a.apply(this,arguments)}function c(K,W){return R(K)||h(K,W)||w(K,W)||f()}function f(){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 w(K,W){if(!K)return;if(typeof K=="string")return _(K,W);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 _(K,W)}function _(K,W){(W==null||W>K.length)&&(W=K.length);for(var z=0,U=new Array(W);z<W;z++)U[z]=K[z];return U}function h(K,W){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(K)))return;var z=[],U=!0,P=!1,H=void 0;try{for(var V=K[Symbol.iterator](),q;!(U=(q=V.next()).done)&&!(z.push(q.value),W&&z.length===W);U=!0);}catch(Z){P=!0,H=Z}finally{try{!U&&V.return!=null&&V.return()}finally{if(P)throw H}}return z}function R(K){if(Array.isArray(K))return K}function C(K,W){if(K==null)return{};var z=g(K,W),U,P;if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(K);for(P=0;P<H.length;P++){if(U=H[P],W.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(K,U))continue;z[U]=K[U]}}return z}function g(K,W){if(K==null)return{};var z={},U=Object.keys(K),P,H;for(H=0;H<U.length;H++){if(P=U[H],W.indexOf(P)>=0)continue;z[P]=K[P]}return z}var x=0;function E(K){return+K.replace("%","")}function T(K){return Array.isArray(K)?K:[K]}function k(K,W,z,U){var P=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,H=arguments.length>5?arguments[5]:void 0,V=50-U/2,q=0,Z=-V,ce=0,he=-2*V;switch(H){case"left":q=-V,Z=0,ce=2*V,he=0;break;case"right":q=V,Z=0,ce=-2*V,he=0;break;case"bottom":Z=V,he=2*V;break;default:}var ae="M 50,50 m ".concat(q,",").concat(Z,`
a `).concat(V,",").concat(V," 0 1 1 ").concat(ce,",").concat(-he,`
a `).concat(V,",").concat(V," 0 1 1 ").concat(-ce,",").concat(he),xe=Math.PI*2*V,ge={stroke:z,strokeDasharray:"".concat(W/100*(xe-P),"px ").concat(xe,"px"),strokeDashoffset:"-".concat(P/2+K/100*(xe-P),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ae,pathStyle:ge}}var L=function(W){var z=W.prefixCls,U=W.strokeWidth,P=W.trailWidth,H=W.gapDegree,V=W.gapPosition,q=W.trailColor,Z=W.strokeLinecap,ce=W.style,he=W.className,ae=W.strokeColor,xe=W.percent,ge=C(W,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),oe=Object(N.useMemo)(function(){return x+=1,x},[]),se=k(0,100,q,U,H,V),te=se.pathString,be=se.pathStyle,ee=T(xe),ie=T(ae),Ee=ie.find(function(me){return Object.prototype.toString.call(me)==="[object Object]"}),ne=m(ee),J=c(ne,1),X=J[0],Q=function(){var fe=0;return ee.map(function(Te,ze){var Je=ie[ze]||ie[ie.length-1],qe=Object.prototype.toString.call(Je)==="[object Object]"?"url(#".concat(z,"-gradient-").concat(oe,")"):"",Xe=k(fe,Te,Je,U,H,V);return fe+=Te,v.a.createElement("path",{key:ze,className:"".concat(z,"-circle-path"),d:Xe.pathString,stroke:qe,strokeLinecap:Z,strokeWidth:U,opacity:Te===0?0:1,fillOpacity:"0",style:Xe.pathStyle,ref:X[ze]})})};return v.a.createElement("svg",a({className:M()("".concat(z,"-circle"),he),viewBox:"0 0 100 100",style:ce},ge),Ee&&v.a.createElement("defs",null,v.a.createElement("linearGradient",{id:"".concat(z,"-gradient-").concat(oe),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Ee).sort(function(me,fe){return E(me)-E(fe)}).map(function(me,fe){return v.a.createElement("stop",{key:fe,offset:me,stopColor:Ee[me]})}))),v.a.createElement("path",{className:"".concat(z,"-circle-trail"),d:te,stroke:q,strokeLinecap:Z,strokeWidth:P||U,fillOpacity:"0",style:be}),Q().reverse())};L.defaultProps=y;var A=L,G={Line:u,Circle:A}},hW8S:function(F,$,j){"use strict";j.d($,"a",function(){return M}),j.d($,"c",function(){return y}),j.d($,"b",function(){return m});var N=j("VTBJ"),v=j("Ff2n"),O=j("Kwbf"),M="RC_TABLE_INTERNAL_COL_DEFINE";function y(S){var b=S.expandable,p=Object(v.a)(S,["expandable"]);return"expandable"in S?Object(N.a)(Object(N.a)({},p),b):p}function m(S){return Object.keys(S).reduce(function(b,p){return(p.substr(0,5)==="data-"||p.substr(0,5)==="aria-")&&(b[p]=S[p]),b},{})}},i3hx:function(F,$,j){},jO9C:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.Iso97971={pad:function(v,O){v.concat(N.lib.WordArray.create([2147483648],1)),N.pad.ZeroPadding.pad(v,O)},unpad:function(v){N.pad.ZeroPadding.unpad(v),v.sigBytes--}},N.pad.Iso97971})},je13:function(F,$,j){var N=j("5nXd"),v=j("gRFJ"),O=[j("uQRt")];F.exports=N.createStore(v,O)},k3GJ:function(F,$,j){"use strict";j.d($,"a",function(){return mn});var N=j("rePB"),v=j("ODXe"),O=j("Ff2n"),M=j("VTBJ"),y=j("cDcd"),m=j("TSYQ"),S=j.n(m),b=j("Zm9Q"),p=j("6cGi"),d=j("KQm4"),t=j("xEkU"),l=j.n(t),r=j("t23M");function i(Re){var Be=Object(y.useRef)(),Ke=Object(y.useRef)(!1);function Me(){for(var pe=arguments.length,Ce=new Array(pe),ye=0;ye<pe;ye++)Ce[ye]=arguments[ye];Ke.current||(l.a.cancel(Be.current),Be.current=l()(function(){Re.apply(void 0,Ce)}))}return Object(y.useEffect)(function(){return function(){Ke.current=!0,l.a.cancel(Be.current)}},[]),Me}function o(Re){var Be=Object(y.useRef)([]),Ke=Object(y.useState)({}),Me=Object(v.a)(Ke,2),pe=Me[1],Ce=Object(y.useRef)(typeof Re=="function"?Re():Re),ye=i(function(){var Fe=Ce.current;Be.current.forEach(function(We){Fe=We(Fe)}),Be.current=[],Ce.current=Fe,pe({})});function Pe(Fe){Be.current.push(Fe),ye()}return[Ce.current,Pe]}var s=j("4IlW");function u(Re,Be){var Ke,Me=Re.prefixCls,pe=Re.id,Ce=Re.active,ye=Re.rtl,Pe=Re.tab,Fe=Pe.key,We=Pe.tab,He=Pe.disabled,$e=Pe.closeIcon,it=Re.tabBarGutter,gt=Re.tabPosition,mt=Re.closable,xt=Re.renderWrapper,Wt=Re.removeAriaLabel,ar=Re.editable,or=Re.onClick,ur=Re.onRemove,vr=Re.onFocus,pr="".concat(Me,"-tab");y.useEffect(function(){return ur},[]);var cr={};gt==="top"||gt==="bottom"?cr[ye?"marginLeft":"marginRight"]=it:cr.marginBottom=it;var Lr=ar&&mt!==!1&&!He;function xr(Jt){if(He)return;or(Jt)}function gn(Jt){Jt.preventDefault(),Jt.stopPropagation(),ar.onEdit("remove",{key:Fe,event:Jt})}var wr=y.createElement("div",{key:Fe,ref:Be,className:S()(pr,(Ke={},Object(N.a)(Ke,"".concat(pr,"-with-remove"),Lr),Object(N.a)(Ke,"".concat(pr,"-active"),Ce),Object(N.a)(Ke,"".concat(pr,"-disabled"),He),Ke)),style:cr,onClick:xr},y.createElement("div",{role:"tab","aria-selected":Ce,id:pe&&"".concat(pe,"-tab-").concat(Fe),className:"".concat(pr,"-btn"),"aria-controls":pe&&"".concat(pe,"-panel-").concat(Fe),"aria-disabled":He,tabIndex:He?null:0,onClick:function(zt){zt.stopPropagation(),xr(zt)},onKeyDown:function(zt){[s.a.SPACE,s.a.ENTER].includes(zt.which)&&(zt.preventDefault(),xr(zt))},onFocus:vr},We),Lr&&y.createElement("button",{type:"button","aria-label":Wt||"remove",tabIndex:0,className:"".concat(pr,"-remove"),onClick:function(zt){zt.stopPropagation(),gn(zt)}},$e||ar.removeIcon||"\xD7"));return xt&&(wr=xt(wr)),wr}var a=y.forwardRef(u),c={width:0,height:0,left:0,top:0};function f(Re,Be,Ke){return Object(y.useMemo)(function(){for(var Me,pe=new Map,Ce=Be.get((Me=Re[0])===null||Me===void 0?void 0:Me.key)||c,ye=Ce.left+Ce.width,Pe=0;Pe<Re.length;Pe+=1){var Fe=Re[Pe].key,We=Be.get(Fe);if(!We){var He;We=Be.get((He=Re[Pe-1])===null||He===void 0?void 0:He.key)||c}var $e=pe.get(Fe)||Object(M.a)({},We);$e.right=ye-$e.left-$e.width,pe.set(Fe,$e)}return pe},[Re.map(function(Me){return Me.key}).join("_"),Be,Ke])}var w={width:0,height:0,left:0,top:0,right:0};function _(Re,Be,Ke,Me,pe){var Ce=pe.tabs,ye=pe.tabPosition,Pe=pe.rtl,Fe,We,He;["top","bottom"].includes(ye)?(Fe="width",We=Pe?"right":"left",He=Math.abs(Be.left)):(Fe="height",We="top",He=-Be.top);var $e=Be[Fe],it=Ke[Fe],gt=Me[Fe],mt=$e;return it+gt>$e&&(mt=$e-gt),Object(y.useMemo)(function(){if(!Ce.length)return[0,0];for(var xt=Ce.length,Wt=xt,ar=0;ar<xt;ar+=1){var or=Re.get(Ce[ar].key)||w;if(or[We]+or[Fe]>He+mt){Wt=ar-1;break}}for(var ur=0,vr=xt-1;vr>=0;vr-=1){var pr=Re.get(Ce[vr].key)||w;if(pr[We]<He){ur=vr+1;break}}return[ur,Wt]},[Re,He,mt,ye,Ce.map(function(xt){return xt.key}).join("_"),Pe])}var h=j("wx14"),R=j("1OyB"),C=j("vuIU"),g=j("JX7q"),x=j("Ji7U"),E=j("LK+K"),T=j("I8Z2"),k=j("bT9E"),L=j("2GS6"),A=j("Gytx"),G=j.n(A),K=j("U8pU"),W=/iPhone/i,z=/iPod/i,U=/iPad/i,P=/\bAndroid(?:.+)Mobile\b/i,H=/Android/i,V=/\bAndroid(?:.+)SD4930UR\b/i,q=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,Z=/Windows Phone/i,ce=/\bWindows(?:.+)ARM\b/i,he=/BlackBerry/i,ae=/BB10/i,xe=/Opera Mini/i,ge=/\b(CriOS|Chrome)(?:.+)Mobile/i,oe=/Mobile(?:.+)Firefox\b/i;function se(Re,Be){return Re.test(Be)}function te(Re){var Be=Re||(typeof navigator!="undefined"?navigator.userAgent:""),Ke=(Be||"").split("[FBAN");if(typeof Ke[1]!="undefined"){var Me=Ke,pe=Object(v.a)(Me,1);Be=pe[0]}if(Ke=Be.split("Twitter"),typeof Ke[1]!="undefined"){var Ce=Ke,ye=Object(v.a)(Ce,1);Be=ye[0]}var Pe={apple:{phone:se(W,Be)&&!se(Z,Be),ipod:se(z,Be),tablet:!se(W,Be)&&se(U,Be)&&!se(Z,Be),device:(se(W,Be)||se(z,Be)||se(U,Be))&&!se(Z,Be)},amazon:{phone:se(V,Be),tablet:!se(V,Be)&&se(q,Be),device:se(V,Be)||se(q,Be)},android:{phone:!se(Z,Be)&&se(V,Be)||!se(Z,Be)&&se(P,Be),tablet:!se(Z,Be)&&!se(V,Be)&&!se(P,Be)&&(se(q,Be)||se(H,Be)),device:!se(Z,Be)&&(se(V,Be)||se(q,Be)||se(P,Be)||se(H,Be))||se(/\bokhttp\b/i,Be)},windows:{phone:se(Z,Be),tablet:se(ce,Be),device:se(Z,Be)||se(ce,Be)},other:{blackberry:se(he,Be),blackberry10:se(ae,Be),opera:se(xe,Be),firefox:se(oe,Be),chrome:se(ge,Be),device:se(he,Be)||se(ae,Be)||se(xe,Be)||se(oe,Be)||se(ge,Be)},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(M.a)(Object(M.a)({},te()),{},{isMobile:te}),ee=be;function ie(){}function Ee(Re,Be,Ke){var Me=Be||"";return Re.key||"".concat(Me,"item_").concat(Ke)}function ne(Re){return"".concat(Re,"-menu-")}function J(Re,Be){var Ke=-1;y.Children.forEach(Re,function(Me){Ke+=1,Me&&Me.type&&Me.type.isMenuItemGroup?y.Children.forEach(Me.props.children,function(pe){Ke+=1,Be(pe,Ke)}):Be(Me,Ke)})}function X(Re,Be,Ke){if(!Re||Ke.find)return;y.Children.forEach(Re,function(Me){if(Me){var pe=Me.type;if(!pe||!(pe.isSubMenu||pe.isMenuItem||pe.isMenuItemGroup))return;Be.indexOf(Me.key)!==-1?Ke.find=!0:Me.props.children&&X(Me.props.children,Be,Ke)}})}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"],me=function(Be){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Me=Be&&typeof Be.getBoundingClientRect=="function"&&Be.getBoundingClientRect().width;if(Me){if(Ke){var pe=getComputedStyle(Be),Ce=pe.marginLeft,ye=pe.marginRight;Me+=+Ce.replace("px","")+ +ye.replace("px","")}Me=+Me.toFixed(6)}return Me||0},fe=function(Be,Ke,Me){Be&&Object(K.a)(Be.style)==="object"&&(Be.style[Ke]=Me)},Te=function(){return ee.any},ze=j("bdgK"),Je=j("faye"),qe=j.n(Je),Xe=j("wgJM"),et=j("l4aY"),rt=j("m+aA"),Le=j("c+Xe"),Oe=j("zT1h"),Ve=j("QC+M");function Ze(Re,Be,Ke){return Ke?Re[0]===Be[0]:Re[0]===Be[0]&&Re[1]===Be[1]}function Ne(Re,Be,Ke){var Me=Re[Be]||{};return Object(M.a)(Object(M.a)({},Me),Ke)}function Ge(Re,Be,Ke,Me){for(var pe=Ke.points,Ce=Object.keys(Re),ye=0;ye<Ce.length;ye+=1){var Pe=Ce[ye];if(Ze(Re[Pe].points,pe,Me))return"".concat(Be,"-placement-").concat(Pe)}return""}var De=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)))},we=j("MNnm");function Ae(Re,Be){var Ke={};return Ke[Re.toLowerCase()]=Be.toLowerCase(),Ke["Webkit".concat(Re)]="webkit".concat(Be),Ke["Moz".concat(Re)]="moz".concat(Be),Ke["ms".concat(Re)]="MS".concat(Be),Ke["O".concat(Re)]="o".concat(Be.toLowerCase()),Ke}function de(Re,Be){var Ke={animationend:Ae("Animation","AnimationEnd"),transitionend:Ae("Transition","TransitionEnd")};return Re&&("AnimationEvent"in Be||delete Ke.animationend.animation,"TransitionEvent"in Be||delete Ke.transitionend.transition),Ke}var _e=de(Object(we.a)(),typeof window!="undefined"?window:{}),Se={};if(Object(we.a)()){var Ie=document.createElement("div");Se=Ie.style}var ke={};function Ye(Re){if(ke[Re])return ke[Re];var Be=_e[Re];if(Be)for(var Ke=Object.keys(Be),Me=Ke.length,pe=0;pe<Me;pe+=1){var Ce=Ke[pe];if(Object.prototype.hasOwnProperty.call(Be,Ce)&&Ce in Se)return ke[Re]=Be[Ce],ke[Re]}return""}var nt=Ye("animationend"),lt=Ye("transitionend"),at=!!(nt&&lt),ot=nt||"animationend",Ct=lt||"transitionend";function bt(Re,Be){if(!Re)return null;if(Object(K.a)(Re)==="object"){var Ke=Be.replace(/-\w/g,function(Me){return Me[1].toUpperCase()});return Re[Ke]}return"".concat(Re,"-").concat(Be)}var ft="none",jt="appear",Pt="enter",Xt="leave",Qt="none",kt="prepare",Et="start",Vt="active",pt="end";function dt(Re){var Be=Object(y.useRef)(!1),Ke=Object(y.useState)(Re),Me=Object(v.a)(Ke,2),pe=Me[0],Ce=Me[1];function ye(Pe){Be.current||Ce(Pe)}return Object(y.useEffect)(function(){return function(){Be.current=!0}},[]),[pe,ye]}var At=Object(we.a)()?y.useLayoutEffect:y.useEffect,Mt=At,rr=function(){var Re=y.useRef(null);function Be(){Xe.a.cancel(Re.current)}function Ke(Me){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Be();var Ce=Object(Xe.a)(function(){pe<=1?Me({isCanceled:function(){return Ce!==Re.current}}):Ke(Me,pe-1)});Re.current=Ce}return y.useEffect(function(){return function(){Be()}},[]),[Ke,Be]},Fn=[kt,Et,Vt,pt],yt=!1,St=!0;function vt(Re){return Re===Vt||Re===pt}var yr=function(Re,Be){var Ke=y.useState(Qt),Me=Object(v.a)(Ke,2),pe=Me[0],Ce=Me[1],ye=rr(),Pe=Object(v.a)(ye,2),Fe=Pe[0],We=Pe[1];function He(){Ce(kt)}return Mt(function(){if(pe!==Qt&&pe!==pt){var $e=Fn.indexOf(pe),it=Fn[$e+1],gt=Be(pe);gt===yt?Ce(it):Fe(function(mt){function xt(){if(mt.isCanceled())return;Ce(it)}gt===!0?xt():Promise.resolve(gt).then(xt)})}},[Re,pe]),y.useEffect(function(){return function(){We()}},[]),[He,pe]},Tr=function(Re){var Be=Object(y.useRef)(),Ke=Object(y.useRef)(Re);Ke.current=Re;var Me=y.useCallback(function(ye){Ke.current(ye)},[]);function pe(ye){ye&&(ye.removeEventListener(Ct,Me),ye.removeEventListener(ot,Me))}function Ce(ye){Be.current&&Be.current!==ye&&pe(Be.current),ye&&ye!==Be.current&&(ye.addEventListener(Ct,Me),ye.addEventListener(ot,Me),Be.current=ye)}return y.useEffect(function(){return function(){pe(Be.current)}},[]),[Ce,pe]};function Bt(Re,Be,Ke,Me){var pe=Me.motionEnter,Ce=pe===void 0?!0:pe,ye=Me.motionAppear,Pe=ye===void 0?!0:ye,Fe=Me.motionLeave,We=Fe===void 0?!0:Fe,He=Me.motionDeadline,$e=Me.motionLeaveImmediately,it=Me.onAppearPrepare,gt=Me.onEnterPrepare,mt=Me.onLeavePrepare,xt=Me.onAppearStart,Wt=Me.onEnterStart,ar=Me.onLeaveStart,or=Me.onAppearActive,ur=Me.onEnterActive,vr=Me.onLeaveActive,pr=Me.onAppearEnd,cr=Me.onEnterEnd,Lr=Me.onLeaveEnd,xr=Me.onVisibleChanged,gn=dt(),wr=Object(v.a)(gn,2),Jt=wr[0],zt=wr[1],Or=dt(ft),Mr=Object(v.a)(Or,2),Ht=Mr[0],Nr=Mr[1],vn=dt(null),Ur=Object(v.a)(vn,2),en=Ur[0],Jr=Ur[1],Dn=Object(y.useRef)(!1),Yn=Object(y.useRef)(null),En=Object(y.useRef)(!1),yi=Object(y.useRef)(null);function Fi(){var on=Ke();return on||yi.current}var Ei=Object(y.useRef)(!1);function $n(on){var Yr=Fi();if(on&&!on.deadline&&on.target!==Yr)return;var Jn;Ht===jt&&Ei.current?Jn=pr==null?void 0:pr(Yr,on):Ht===Pt&&Ei.current?Jn=cr==null?void 0:cr(Yr,on):Ht===Xt&&Ei.current&&(Jn=Lr==null?void 0:Lr(Yr,on)),Jn!==!1&&!En.current&&(Nr(ft),Jr(null))}var un=Tr($n),tn=Object(v.a)(un,1),xn=tn[0],yn=y.useMemo(function(){var on,Yr,Jn;switch(Ht){case"appear":return on={},Object(N.a)(on,kt,it),Object(N.a)(on,Et,xt),Object(N.a)(on,Vt,or),on;case"enter":return Yr={},Object(N.a)(Yr,kt,gt),Object(N.a)(Yr,Et,Wt),Object(N.a)(Yr,Vt,ur),Yr;case"leave":return Jn={},Object(N.a)(Jn,kt,mt),Object(N.a)(Jn,Et,ar),Object(N.a)(Jn,Vt,vr),Jn;default:return{}}},[Ht]),Ui=yr(Ht,function(on){if(on===kt){var Yr=yn[kt];return Yr?Yr(Fi()):yt}if(Qr in yn){var Jn;Jr(((Jn=yn[Qr])===null||Jn===void 0?void 0:Jn.call(yn,Fi(),null))||null)}return Qr===Vt&&(xn(Fi()),He>0&&(clearTimeout(Yn.current),Yn.current=setTimeout(function(){$n({deadline:!0})},He))),St}),ea=Object(v.a)(Ui,2),ta=ea[0],Qr=ea[1],Vi=vt(Qr);Ei.current=Vi,Mt(function(){zt(Be);var on=Dn.current;if(Dn.current=!0,!Re)return;var Yr;!on&&Be&&Pe&&(Yr=jt),on&&Be&&Ce&&(Yr=Pt),(on&&!Be&&We||!on&&$e&&!Be&&We)&&(Yr=Xt),Yr&&(Nr(Yr),ta())},[Be]),Object(y.useEffect)(function(){(Ht===jt&&!Pe||Ht===Pt&&!Ce||Ht===Xt&&!We)&&Nr(ft)},[Pe,Ce,We]),Object(y.useEffect)(function(){return function(){clearTimeout(Yn.current),En.current=!0}},[]),Object(y.useEffect)(function(){Jt!==void 0&&Ht===ft&&(xr==null||xr(Jt))},[Jt,Ht]);var ra=en;return yn[kt]&&Qr===Et&&(ra=Object(M.a)({transition:"none"},ra)),[Ht,Qr,ra,Jt!=null?Jt:Be]}var Rt=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(){return Object(R.a)(this,Ke),Be.apply(this,arguments)}return Object(C.a)(Ke,[{key:"render",value:function(){return this.props.children}}]),Ke}(y.Component),br=Rt;function $r(Re){var Be=Re;Object(K.a)(Re)==="object"&&(Be=Re.transitionSupport);function Ke(pe){return!!(pe.motionName&&Be)}var Me=y.forwardRef(function(pe,Ce){var ye=pe.visible,Pe=ye===void 0?!0:ye,Fe=pe.removeOnLeave,We=Fe===void 0?!0:Fe,He=pe.forceRender,$e=pe.children,it=pe.motionName,gt=pe.leavedClassName,mt=pe.eventProps,xt=Ke(pe),Wt=Object(y.useRef)(),ar=Object(y.useRef)();function or(){try{return Object(rt.a)(Wt.current||ar.current)}catch(Nr){return null}}var ur=Bt(xt,Pe,or,pe),vr=Object(v.a)(ur,4),pr=vr[0],cr=vr[1],Lr=vr[2],xr=vr[3],gn=y.useRef(xr);xr&&(gn.current=!0);var wr=Object(y.useRef)(Ce);wr.current=Ce;var Jt=y.useCallback(function(Nr){Wt.current=Nr,Object(Le.b)(wr.current,Nr)},[]),zt,Or=Object(M.a)(Object(M.a)({},mt),{},{visible:Pe});if(!$e)zt=null;else if(pr===ft||!Ke(pe))xr?zt=$e(Object(M.a)({},Or),Jt):!We&&gn.current?zt=$e(Object(M.a)(Object(M.a)({},Or),{},{className:gt}),Jt):He?zt=$e(Object(M.a)(Object(M.a)({},Or),{},{style:{display:"none"}}),Jt):zt=null;else{var Mr,Ht;cr===kt?Ht="prepare":vt(cr)?Ht="active":cr===Et&&(Ht="start"),zt=$e(Object(M.a)(Object(M.a)({},Or),{},{className:S()(bt(it,pr),(Mr={},Object(N.a)(Mr,bt(it,"".concat(pr,"-").concat(Ht)),Ht),Object(N.a)(Mr,it,typeof it=="string"),Mr)),style:Lr}),Jt)}return y.createElement(br,{ref:ar},zt)});return Me.displayName="CSSMotion",Me}var Cr=$r(at),ut="add",It="keep",Br="remove",Vr="removed";function An(Re){var Be;return Re&&Object(K.a)(Re)==="object"&&"key"in Re?Be=Re:Be={key:Re},Object(M.a)(Object(M.a)({},Be),{},{key:String(Be.key)})}function fn(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Re.map(An)}function zr(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ke=[],Me=0,pe=Be.length,Ce=fn(Re),ye=fn(Be);Ce.forEach(function(We){for(var He=!1,$e=Me;$e<pe;$e+=1){var it=ye[$e];if(it.key===We.key){Me<$e&&(Ke=Ke.concat(ye.slice(Me,$e).map(function(gt){return Object(M.a)(Object(M.a)({},gt),{},{status:ut})})),Me=$e),Ke.push(Object(M.a)(Object(M.a)({},it),{},{status:It})),Me+=1,He=!0;break}}He||Ke.push(Object(M.a)(Object(M.a)({},We),{},{status:Br}))}),Me<pe&&(Ke=Ke.concat(ye.slice(Me).map(function(We){return Object(M.a)(Object(M.a)({},We),{},{status:ut})})));var Pe={};Ke.forEach(function(We){var He=We.key;Pe[He]=(Pe[He]||0)+1});var Fe=Object.keys(Pe).filter(function(We){return Pe[We]>1});return Fe.forEach(function(We){Ke=Ke.filter(function(He){var $e=He.key,it=He.status;return $e!==We||it!==Br}),Ke.forEach(function(He){He.key===We&&(He.status=It)})}),Ke}var Dt=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function dn(Re){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Cr,Ke=function(Me){Object(x.a)(Ce,Me);var pe=Object(E.a)(Ce);function Ce(){var ye;return Object(R.a)(this,Ce),ye=pe.apply(this,arguments),ye.state={keyEntities:[]},ye.removeKey=function(Pe){ye.setState(function(Fe){var We=Fe.keyEntities;return{keyEntities:We.map(function(He){return He.key!==Pe?He:Object(M.a)(Object(M.a)({},He),{},{status:Vr})})}})},ye}return Object(C.a)(Ce,[{key:"render",value:function(){var Pe=this,Fe=this.state.keyEntities,We=this.props,He=We.component,$e=We.children,it=We.onVisibleChanged,gt=Object(O.a)(We,["component","children","onVisibleChanged"]),mt=He||y.Fragment,xt={};return Dt.forEach(function(Wt){xt[Wt]=gt[Wt],delete gt[Wt]}),delete gt.keys,y.createElement(mt,gt,Fe.map(function(Wt){var ar=Wt.status,or=Object(O.a)(Wt,["status"]),ur=ar===ut||ar===It;return y.createElement(Be,Object(h.a)({},xt,{key:or.key,visible:ur,eventProps:or,onVisibleChanged:function(pr){it==null||it(pr,{key:or.key}),pr||Pe.removeKey(or.key)}}),$e)}))}}],[{key:"getDerivedStateFromProps",value:function(Pe,Fe){var We=Pe.keys,He=Fe.keyEntities,$e=fn(We),it=zr(He,$e);return{keyEntities:it.filter(function(gt){var mt=He.find(function(xt){var Wt=xt.key;return gt.key===Wt});return!(mt&&mt.status===Vr&&gt.status===Br)})}}}]),Ce}(y.Component);return Ke.defaultProps={component:"div"},Ke}var ct=dn(at),kr=Cr;function mr(Re){var Be=Re.prefixCls,Ke=Re.motion,Me=Re.animation,pe=Re.transitionName;return Ke||(Me?{motionName:"".concat(Be,"-").concat(Me)}:pe?{motionName:pe}:null)}function ei(Re){var Be=Re.prefixCls,Ke=Re.visible,Me=Re.zIndex,pe=Re.mask,Ce=Re.maskMotion,ye=Re.maskAnimation,Pe=Re.maskTransitionName;if(!pe)return null;var Fe={};return(Ce||Pe||ye)&&(Fe=Object(M.a)({motionAppear:!0},mr({motion:Ce,prefixCls:Be,transitionName:Pe,animation:ye}))),y.createElement(kr,Object(h.a)({},Fe,{visible:Ke,removeOnLeave:!0}),function(We){var He=We.className;return y.createElement("div",{style:{zIndex:Me},className:S()("".concat(Be,"-mask"),He)})})}var Tn=j("9mu1"),bn=j("o0o1"),di=j.n(bn),ti=j("HaE+"),sn=["measure","align",null,"motion"],Hr=function(Re,Be){var Ke=Object(y.useState)(null),Me=Object(v.a)(Ke,2),pe=Me[0],Ce=Me[1],ye=Object(y.useRef)(),Pe=Object(y.useRef)(!1);function Fe($e){Pe.current||Ce($e)}function We(){Xe.a.cancel(ye.current)}function He($e){We(),ye.current=Object(Xe.a)(function(){Fe(function(it){switch(pe){case"align":return"motion";case"motion":return"stable";default:}return it}),$e==null||$e()})}return Object(y.useEffect)(function(){Fe("measure")},[Re]),Object(y.useEffect)(function(){switch(pe){case"measure":Be();break;default:}pe&&(ye.current=Object(Xe.a)(Object(ti.a)(di.a.mark(function $e(){var it,gt;return di.a.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:it=sn.indexOf(pe),gt=sn[it+1],gt&&it!==-1&&Fe(gt);case 3:case"end":return xt.stop()}},$e)}))))},[pe]),Object(y.useEffect)(function(){return function(){Pe.current=!0,We()}},[]),[pe,He]},fi=function(Re){var Be=y.useState({width:0,height:0}),Ke=Object(v.a)(Be,2),Me=Ke[0],pe=Ke[1];function Ce(Pe){pe({width:Pe.offsetWidth,height:Pe.offsetHeight})}var ye=y.useMemo(function(){var Pe={};if(Re){var Fe=Me.width,We=Me.height;Re.indexOf("height")!==-1&&We?Pe.height=We:Re.indexOf("minHeight")!==-1&&We&&(Pe.minHeight=We),Re.indexOf("width")!==-1&&Fe?Pe.width=Fe:Re.indexOf("minWidth")!==-1&&Fe&&(Pe.minWidth=Fe)}return Pe},[Re,Me]);return[ye,Ce]},hn=y.forwardRef(function(Re,Be){var Ke=Re.visible,Me=Re.prefixCls,pe=Re.className,Ce=Re.style,ye=Re.children,Pe=Re.zIndex,Fe=Re.stretch,We=Re.destroyPopupOnHide,He=Re.forceRender,$e=Re.align,it=Re.point,gt=Re.getRootDomNode,mt=Re.getClassNameFromAlign,xt=Re.onAlign,Wt=Re.onMouseEnter,ar=Re.onMouseLeave,or=Re.onMouseDown,ur=Re.onTouchStart,vr=Object(y.useRef)(),pr=Object(y.useRef)(),cr=Object(y.useState)(),Lr=Object(v.a)(cr,2),xr=Lr[0],gn=Lr[1],wr=fi(Fe),Jt=Object(v.a)(wr,2),zt=Jt[0],Or=Jt[1];function Mr(){Fe&&Or(gt())}var Ht=Hr(Ke,Mr),Nr=Object(v.a)(Ht,2),vn=Nr[0],Ur=Nr[1],en=Object(y.useRef)();function Jr(){return it||gt}function Dn(){var un;(un=vr.current)===null||un===void 0||un.forceAlign()}function Yn(un,tn){var xn=mt(tn);xr!==xn&&gn(xn),vn==="align"&&(xr!==xn?Promise.resolve().then(function(){Dn()}):Ur(function(){var yn;(yn=en.current)===null||yn===void 0||yn.call(en)}),xt==null||xt(un,tn))}var En=Object(M.a)({},mr(Re));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(un){var tn=En[un];En[un]=function(xn,yn){return Ur(),tn==null?void 0:tn(xn,yn)}});function yi(){return new Promise(function(un){en.current=un})}y.useEffect(function(){!En.motionName&&vn==="motion"&&Ur()},[En.motionName,vn]),y.useImperativeHandle(Be,function(){return{forceAlign:Dn,getElement:function(){return pr.current}}});var Fi=Object(M.a)(Object(M.a)({},zt),{},{zIndex:Pe,opacity:vn==="motion"||vn==="stable"||!Ke?void 0:0,pointerEvents:vn==="stable"?void 0:"none"},Ce),Ei=!0;($e==null?void 0:$e.points)&&(vn==="align"||vn==="stable")&&(Ei=!1);var $n=ye;return y.Children.count(ye)>1&&($n=y.createElement("div",{className:"".concat(Me,"-content")},ye)),y.createElement(kr,Object(h.a)({visible:Ke,ref:pr,leavedClassName:"".concat(Me,"-hidden")},En,{onAppearPrepare:yi,onEnterPrepare:yi,removeOnLeave:We,forceRender:He}),function(un,tn){var xn=un.className,yn=un.style,Ui=S()(Me,pe,xr,xn);return y.createElement(Tn.a,{target:Jr(),key:"popup",ref:vr,monitorWindowResize:!0,disabled:Ei,align:$e,onAlign:Yn},y.createElement("div",{ref:tn,className:Ui,onMouseEnter:Wt,onMouseLeave:ar,onMouseDownCapture:or,onTouchStartCapture:ur,style:Object(M.a)(Object(M.a)({},yn),Fi)},$n))})});hn.displayName="PopupInner";var Wr=hn,lr=y.forwardRef(function(Re,Be){var Ke=Re.prefixCls,Me=Re.visible,pe=Re.zIndex,Ce=Re.children,ye=Re.mobile;ye=ye===void 0?{}:ye;var Pe=ye.popupClassName,Fe=ye.popupStyle,We=ye.popupMotion,He=We===void 0?{}:We,$e=ye.popupRender,it=y.useRef();y.useImperativeHandle(Be,function(){return{forceAlign:function(){},getElement:function(){return it.current}}});var gt=Object(M.a)({zIndex:pe},Fe),mt=Ce;return y.Children.count(Ce)>1&&(mt=y.createElement("div",{className:"".concat(Ke,"-content")},Ce)),$e&&(mt=$e(mt)),y.createElement(kr,Object(h.a)({visible:Me,ref:it,removeOnLeave:!0},He),function(xt,Wt){var ar=xt.className,or=xt.style,ur=S()(Ke,Pe,ar);return y.createElement("div",{ref:Wt,className:ur,style:Object(M.a)(Object(M.a)({},or),gt)},mt)})});lr.displayName="MobilePopupInner";var nn=lr,qt=["visible","mobile"],Kt=y.forwardRef(function(Re,Be){var Ke=Re.visible,Me=Re.mobile,pe=Object(O.a)(Re,qt),Ce=Object(y.useState)(Ke),ye=Object(v.a)(Ce,2),Pe=ye[0],Fe=ye[1],We=Object(y.useState)(!1),He=Object(v.a)(We,2),$e=He[0],it=He[1],gt=Object(M.a)(Object(M.a)({},pe),{},{visible:Pe});Object(y.useEffect)(function(){Fe(Ke),Ke&&Me&&it(De())},[Ke,Me]);var mt=$e?y.createElement(nn,Object(h.a)({},gt,{mobile:Me,ref:Be})):y.createElement(Wr,Object(h.a)({},gt,{ref:Be}));return y.createElement("div",null,y.createElement(ei,gt),mt)});Kt.displayName="Popup";var er=Kt,Sr=y.createContext(null),jr=Sr;function Gr(){}function _n(){return""}function la(Re){return Re?Re.ownerDocument:window.document}var Yi=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function $i(Re){var Be=function(Ke){Object(x.a)(pe,Ke);var Me=Object(E.a)(pe);function pe(Ce){var ye;Object(R.a)(this,pe),ye=Me.call(this,Ce),ye.popupRef=y.createRef(),ye.triggerRef=y.createRef(),ye.attachId=void 0,ye.clickOutsideHandler=void 0,ye.touchOutsideHandler=void 0,ye.contextMenuOutsideHandler1=void 0,ye.contextMenuOutsideHandler2=void 0,ye.mouseDownTimeout=void 0,ye.focusTime=void 0,ye.preClickTime=void 0,ye.preTouchTime=void 0,ye.delayTimer=void 0,ye.hasPopupMouseDown=void 0,ye.onMouseEnter=function(Fe){var We=ye.props.mouseEnterDelay;ye.fireEvents("onMouseEnter",Fe),ye.delaySetPopupVisible(!0,We,We?null:Fe)},ye.onMouseMove=function(Fe){ye.fireEvents("onMouseMove",Fe),ye.setPoint(Fe)},ye.onMouseLeave=function(Fe){ye.fireEvents("onMouseLeave",Fe),ye.delaySetPopupVisible(!1,ye.props.mouseLeaveDelay)},ye.onPopupMouseEnter=function(){ye.clearDelayTimer()},ye.onPopupMouseLeave=function(Fe){var We;if(Fe.relatedTarget&&!Fe.relatedTarget.setTimeout&&Object(et.a)((We=ye.popupRef.current)===null||We===void 0?void 0:We.getElement(),Fe.relatedTarget))return;ye.delaySetPopupVisible(!1,ye.props.mouseLeaveDelay)},ye.onFocus=function(Fe){ye.fireEvents("onFocus",Fe),ye.clearDelayTimer(),ye.isFocusToShow()&&(ye.focusTime=Date.now(),ye.delaySetPopupVisible(!0,ye.props.focusDelay))},ye.onMouseDown=function(Fe){ye.fireEvents("onMouseDown",Fe),ye.preClickTime=Date.now()},ye.onTouchStart=function(Fe){ye.fireEvents("onTouchStart",Fe),ye.preTouchTime=Date.now()},ye.onBlur=function(Fe){ye.fireEvents("onBlur",Fe),ye.clearDelayTimer(),ye.isBlurToHide()&&ye.delaySetPopupVisible(!1,ye.props.blurDelay)},ye.onContextMenu=function(Fe){Fe.preventDefault(),ye.fireEvents("onContextMenu",Fe),ye.setPopupVisible(!0,Fe)},ye.onContextMenuClose=function(){ye.isContextMenuToShow()&&ye.close()},ye.onClick=function(Fe){if(ye.fireEvents("onClick",Fe),ye.focusTime){var We;if(ye.preClickTime&&ye.preTouchTime?We=Math.min(ye.preClickTime,ye.preTouchTime):ye.preClickTime?We=ye.preClickTime:ye.preTouchTime&&(We=ye.preTouchTime),Math.abs(We-ye.focusTime)<20)return;ye.focusTime=0}ye.preClickTime=0,ye.preTouchTime=0,ye.isClickToShow()&&(ye.isClickToHide()||ye.isBlurToHide())&&Fe&&Fe.preventDefault&&Fe.preventDefault();var He=!ye.state.popupVisible;(ye.isClickToHide()&&!He||He&&ye.isClickToShow())&&ye.setPopupVisible(!ye.state.popupVisible,Fe)},ye.onPopupMouseDown=function(){if(ye.hasPopupMouseDown=!0,clearTimeout(ye.mouseDownTimeout),ye.mouseDownTimeout=window.setTimeout(function(){ye.hasPopupMouseDown=!1},0),ye.context){var Fe;(Fe=ye.context).onPopupMouseDown.apply(Fe,arguments)}},ye.onDocumentClick=function(Fe){if(ye.props.mask&&!ye.props.maskClosable)return;var We=Fe.target,He=ye.getRootDomNode(),$e=ye.getPopupDomNode();(!Object(et.a)(He,We)||ye.isContextMenuOnly())&&!Object(et.a)($e,We)&&!ye.hasPopupMouseDown&&ye.close()},ye.getRootDomNode=function(){var Fe=ye.props.getTriggerDOMNode;if(Fe)return Fe(ye.triggerRef.current);try{var We=Object(rt.a)(ye.triggerRef.current);if(We)return We}catch(He){}return qe.a.findDOMNode(Object(g.a)(ye))},ye.getPopupClassNameFromAlign=function(Fe){var We=[],He=ye.props,$e=He.popupPlacement,it=He.builtinPlacements,gt=He.prefixCls,mt=He.alignPoint,xt=He.getPopupClassNameFromAlign;return $e&&it&&We.push(Ge(it,gt,Fe,mt)),xt&&We.push(xt(Fe)),We.join(" ")},ye.getComponent=function(){var Fe=ye.props,We=Fe.prefixCls,He=Fe.destroyPopupOnHide,$e=Fe.popupClassName,it=Fe.onPopupAlign,gt=Fe.popupMotion,mt=Fe.popupAnimation,xt=Fe.popupTransitionName,Wt=Fe.popupStyle,ar=Fe.mask,or=Fe.maskAnimation,ur=Fe.maskTransitionName,vr=Fe.maskMotion,pr=Fe.zIndex,cr=Fe.popup,Lr=Fe.stretch,xr=Fe.alignPoint,gn=Fe.mobile,wr=Fe.forceRender,Jt=ye.state,zt=Jt.popupVisible,Or=Jt.point,Mr=ye.getPopupAlign(),Ht={};return ye.isMouseEnterToShow()&&(Ht.onMouseEnter=ye.onPopupMouseEnter),ye.isMouseLeaveToHide()&&(Ht.onMouseLeave=ye.onPopupMouseLeave),Ht.onMouseDown=ye.onPopupMouseDown,Ht.onTouchStart=ye.onPopupMouseDown,y.createElement(er,Object(h.a)({prefixCls:We,destroyPopupOnHide:He,visible:zt,point:xr&&Or,className:$e,align:Mr,onAlign:it,animation:mt,getClassNameFromAlign:ye.getPopupClassNameFromAlign},Ht,{stretch:Lr,getRootDomNode:ye.getRootDomNode,style:Wt,mask:ar,zIndex:pr,transitionName:xt,maskAnimation:or,maskTransitionName:ur,maskMotion:vr,ref:ye.popupRef,motion:gt,mobile:gn,forceRender:wr}),typeof cr=="function"?cr():cr)},ye.attachParent=function(Fe){Xe.a.cancel(ye.attachId);var We=ye.props,He=We.getPopupContainer,$e=We.getDocument,it=ye.getRootDomNode(),gt;He?(it||He.length===0)&&(gt=He(it)):gt=$e(ye.getRootDomNode()).body,gt?gt.appendChild(Fe):ye.attachId=Object(Xe.a)(function(){ye.attachParent(Fe)})},ye.getContainer=function(){var Fe=ye.props.getDocument,We=Fe(ye.getRootDomNode()).createElement("div");return We.style.position="absolute",We.style.top="0",We.style.left="0",We.style.width="100%",ye.attachParent(We),We},ye.setPoint=function(Fe){var We=ye.props.alignPoint;if(!We||!Fe)return;ye.setState({point:{pageX:Fe.pageX,pageY:Fe.pageY}})},ye.handlePortalUpdate=function(){ye.state.prevPopupVisible!==ye.state.popupVisible&&ye.props.afterPopupVisibleChange(ye.state.popupVisible)},ye.triggerContextValue={onPopupMouseDown:ye.onPopupMouseDown};var Pe;return"popupVisible"in Ce?Pe=!!Ce.popupVisible:Pe=!!Ce.defaultPopupVisible,ye.state={prevPopupVisible:Pe,popupVisible:Pe},Yi.forEach(function(Fe){ye["fire".concat(Fe)]=function(We){ye.fireEvents(Fe,We)}}),ye}return Object(C.a)(pe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var ye=this.props,Pe=this.state;if(Pe.popupVisible){var Fe;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Fe=ye.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Oe.a)(Fe,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Fe=Fe||ye.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Oe.a)(Fe,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Fe=Fe||ye.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Oe.a)(Fe,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Oe.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Xe.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var ye;return((ye=this.popupRef.current)===null||ye===void 0?void 0:ye.getElement())||null}},{key:"getPopupAlign",value:function(){var ye=this.props,Pe=ye.popupPlacement,Fe=ye.popupAlign,We=ye.builtinPlacements;return Pe&&We?Ne(We,Pe,Fe):Fe}},{key:"setPopupVisible",value:function(ye,Pe){var Fe=this.props.alignPoint,We=this.state.popupVisible;this.clearDelayTimer(),We!==ye&&("popupVisible"in this.props||this.setState({popupVisible:ye,prevPopupVisible:We}),this.props.onPopupVisibleChange(ye)),Fe&&Pe&&ye&&this.setPoint(Pe)}},{key:"delaySetPopupVisible",value:function(ye,Pe,Fe){var We=this,He=Pe*1e3;if(this.clearDelayTimer(),He){var $e=Fe?{pageX:Fe.pageX,pageY:Fe.pageY}:null;this.delayTimer=window.setTimeout(function(){We.setPopupVisible(ye,$e),We.clearDelayTimer()},He)}else this.setPopupVisible(ye,Fe)}},{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(ye){var Pe=this.props.children.props,Fe=this.props;return Pe[ye]&&Fe[ye]?this["fire".concat(ye)]:Pe[ye]||Fe[ye]}},{key:"isClickToShow",value:function(){var ye=this.props,Pe=ye.action,Fe=ye.showAction;return Pe.indexOf("click")!==-1||Fe.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var ye=this.props.action;return ye==="contextMenu"||ye.length===1&&ye[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var ye=this.props,Pe=ye.action,Fe=ye.showAction;return Pe.indexOf("contextMenu")!==-1||Fe.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var ye=this.props,Pe=ye.action,Fe=ye.hideAction;return Pe.indexOf("click")!==-1||Fe.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var ye=this.props,Pe=ye.action,Fe=ye.showAction;return Pe.indexOf("hover")!==-1||Fe.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var ye=this.props,Pe=ye.action,Fe=ye.hideAction;return Pe.indexOf("hover")!==-1||Fe.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var ye=this.props,Pe=ye.action,Fe=ye.showAction;return Pe.indexOf("focus")!==-1||Fe.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var ye=this.props,Pe=ye.action,Fe=ye.hideAction;return Pe.indexOf("focus")!==-1||Fe.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var ye;(ye=this.popupRef.current)===null||ye===void 0||ye.forceAlign()}}},{key:"fireEvents",value:function(ye,Pe){var Fe=this.props.children.props[ye];Fe&&Fe(Pe);var We=this.props[ye];We&&We(Pe)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var ye=this.state.popupVisible,Pe=this.props,Fe=Pe.children,We=Pe.forceRender,He=Pe.alignPoint,$e=Pe.className,it=Pe.autoDestroy,gt=y.Children.only(Fe),mt={key:"trigger"};this.isContextMenuToShow()?mt.onContextMenu=this.onContextMenu:mt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(mt.onClick=this.onClick,mt.onMouseDown=this.onMouseDown,mt.onTouchStart=this.onTouchStart):(mt.onClick=this.createTwoChains("onClick"),mt.onMouseDown=this.createTwoChains("onMouseDown"),mt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(mt.onMouseEnter=this.onMouseEnter,He&&(mt.onMouseMove=this.onMouseMove)):mt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?mt.onMouseLeave=this.onMouseLeave:mt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(mt.onFocus=this.onFocus,mt.onBlur=this.onBlur):(mt.onFocus=this.createTwoChains("onFocus"),mt.onBlur=this.createTwoChains("onBlur"));var xt=S()(gt&&gt.props&&gt.props.className,$e);xt&&(mt.className=xt);var Wt=Object(M.a)({},mt);Object(Le.c)(gt)&&(Wt.ref=Object(Le.a)(this.triggerRef,gt.ref));var ar=y.cloneElement(gt,Wt),or;return(ye||this.popupRef.current||We)&&(or=y.createElement(Re,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!ye&&it&&(or=null),y.createElement(jr.Provider,{value:this.triggerContextValue},ar,or)}}],[{key:"getDerivedStateFromProps",value:function(ye,Pe){var Fe=ye.popupVisible,We={};return Fe!==void 0&&Pe.popupVisible!==Fe&&(We.popupVisible=Fe,We.prevPopupVisible=Pe.popupVisible),We}}]),pe}(y.Component);return Be.contextType=jr,Be.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:_n,getDocument:la,onPopupVisibleChange:Gr,afterPopupVisibleChange:Gr,onPopupAlign:Gr,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Be}var Oi=$i(Ve.a),pn={adjustX:1,adjustY:1},Ki={topLeft:{points:["bl","tl"],overflow:pn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:pn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:pn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:pn,offset:[4,0]}},Zr={topLeft:{points:["bl","tl"],overflow:pn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:pn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:pn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:pn,offset:[4,0]}},ri=Ki,Mn=0,ln={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Sn=function(Be,Ke,Me){var pe=ne(Ke),Ce=Be.getState();Be.setState({defaultActiveFirst:Object(M.a)(Object(M.a)({},Ce.defaultActiveFirst),{},Object(N.a)({},pe,Me))})},hi=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(Me){var pe;Object(R.a)(this,Ke),pe=Be.call(this,Me),pe.onDestroy=function(He){pe.props.onDestroy(He)},pe.onKeyDown=function(He){var $e=He.keyCode,it=pe.menuInstance,gt=pe.props.store,mt=pe.getVisible();if($e===s.a.ENTER)return pe.onTitleClick(He),Sn(gt,pe.props.eventKey,!0),!0;if($e===s.a.RIGHT)return mt?it.onKeyDown(He):(pe.triggerOpenChange(!0),Sn(gt,pe.props.eventKey,!0)),!0;if($e===s.a.LEFT){var xt;if(mt)xt=it.onKeyDown(He);else return;return xt||(pe.triggerOpenChange(!1),xt=!0),xt}return mt&&($e===s.a.UP||$e===s.a.DOWN)?it.onKeyDown(He):void 0},pe.onOpenChange=function(He){pe.props.onOpenChange(He)},pe.onPopupVisibleChange=function(He){pe.triggerOpenChange(He,He?"mouseenter":"mouseleave")},pe.onMouseEnter=function(He){var $e=pe.props,it=$e.eventKey,gt=$e.onMouseEnter,mt=$e.store;Sn(mt,pe.props.eventKey,!1),gt({key:it,domEvent:He})},pe.onMouseLeave=function(He){var $e=pe.props,it=$e.parentMenu,gt=$e.eventKey,mt=$e.onMouseLeave;it.subMenuInstance=Object(g.a)(pe),mt({key:gt,domEvent:He})},pe.onTitleMouseEnter=function(He){var $e=pe.props,it=$e.eventKey,gt=$e.onItemHover,mt=$e.onTitleMouseEnter;gt({key:it,hover:!0}),mt({key:it,domEvent:He})},pe.onTitleMouseLeave=function(He){var $e=pe.props,it=$e.parentMenu,gt=$e.eventKey,mt=$e.onItemHover,xt=$e.onTitleMouseLeave;it.subMenuInstance=Object(g.a)(pe),mt({key:gt,hover:!1}),xt({key:gt,domEvent:He})},pe.onTitleClick=function(He){var $e=Object(g.a)(pe),it=$e.props;if(it.onTitleClick({key:it.eventKey,domEvent:He}),it.triggerSubMenuAction==="hover")return;pe.triggerOpenChange(!pe.getVisible(),"click"),Sn(it.store,pe.props.eventKey,!1)},pe.onSubMenuClick=function(He){typeof pe.props.onClick=="function"&&pe.props.onClick(pe.addKeyPath(He))},pe.onSelect=function(He){pe.props.onSelect(He)},pe.onDeselect=function(He){pe.props.onDeselect(He)},pe.getPrefixCls=function(){return"".concat(pe.props.rootPrefixCls,"-submenu")},pe.getActiveClassName=function(){return"".concat(pe.getPrefixCls(),"-active")},pe.getDisabledClassName=function(){return"".concat(pe.getPrefixCls(),"-disabled")},pe.getSelectedClassName=function(){return"".concat(pe.getPrefixCls(),"-selected")},pe.getOpenClassName=function(){return"".concat(pe.props.rootPrefixCls,"-submenu-open")},pe.getVisible=function(){return pe.state.isOpen},pe.getMode=function(){return pe.state.mode},pe.saveMenuInstance=function(He){pe.menuInstance=He},pe.addKeyPath=function(He){return Object(M.a)(Object(M.a)({},He),{},{keyPath:(He.keyPath||[]).concat(pe.props.eventKey)})},pe.triggerOpenChange=function(He,$e){var it=pe.props.eventKey,gt=function(){pe.onOpenChange({key:it,item:Object(g.a)(pe),trigger:$e,open:He})};$e==="mouseenter"?pe.mouseenterTimeout=setTimeout(function(){gt()},0):gt()},pe.isChildrenSelected=function(){var He={find:!1};return X(pe.props.children,pe.props.selectedKeys,He),He.find},pe.isInlineMode=function(){return pe.getMode()==="inline"},pe.adjustWidth=function(){if(!pe.subMenuTitle||!pe.menuInstance)return;var He=Je.findDOMNode(pe.menuInstance);if(He.offsetWidth>=pe.subMenuTitle.offsetWidth)return;He.style.minWidth="".concat(pe.subMenuTitle.offsetWidth,"px")},pe.saveSubMenuTitle=function(He){pe.subMenuTitle=He},pe.getBaseProps=function(){var He=Object(g.a)(pe),$e=He.props,it=pe.getMode();return{mode:it==="horizontal"?"vertical":it,visible:pe.getVisible(),level:$e.level+1,inlineIndent:$e.inlineIndent,focusable:!1,onClick:pe.onSubMenuClick,onSelect:pe.onSelect,onDeselect:pe.onDeselect,onDestroy:pe.onDestroy,selectedKeys:$e.selectedKeys,eventKey:"".concat($e.eventKey,"-menu-"),openKeys:$e.openKeys,motion:$e.motion,onOpenChange:pe.onOpenChange,subMenuOpenDelay:$e.subMenuOpenDelay,parentMenu:Object(g.a)(pe),subMenuCloseDelay:$e.subMenuCloseDelay,forceSubMenuRender:$e.forceSubMenuRender,triggerSubMenuAction:$e.triggerSubMenuAction,builtinPlacements:$e.builtinPlacements,defaultActiveFirst:$e.store.getState().defaultActiveFirst[ne($e.eventKey)],multiple:$e.multiple,prefixCls:$e.rootPrefixCls,id:pe.internalMenuId,manualRef:pe.saveMenuInstance,itemIcon:$e.itemIcon,expandIcon:$e.expandIcon,direction:$e.direction}},pe.getMotion=function(He,$e){var it=Object(g.a)(pe),gt=it.haveRendered,mt=pe.props,xt=mt.motion,Wt=mt.rootPrefixCls,ar=Object(M.a)(Object(M.a)({},xt),{},{leavedClassName:"".concat(Wt,"-hidden"),removeOnLeave:!1,motionAppear:gt||!$e||He!=="inline"});return ar};var Ce=Me.store,ye=Me.eventKey,Pe=Ce.getState(),Fe=Pe.defaultActiveFirst;pe.isRootMenu=!1;var We=!1;return Fe&&(We=Fe[ye]),Sn(Ce,ye,We),pe.state={mode:Me.mode,isOpen:Me.isOpen},pe}return Object(C.a)(Ke,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var pe=this,Ce=this.props,ye=Ce.mode,Pe=Ce.parentMenu,Fe=Ce.manualRef,We=Ce.isOpen,He=function(){pe.setState({mode:ye,isOpen:We})},$e=We!==this.state.isOpen,it=ye!==this.state.mode;if((it||$e)&&(Xe.a.cancel(this.updateStateRaf),it?this.updateStateRaf=Object(Xe.a)(He):He()),Fe&&Fe(this),ye!=="horizontal"||!(Pe==null?void 0:Pe.isRootMenu)||!We)return;this.minWidthTimeout=setTimeout(function(){return pe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var pe=this.props,Ce=pe.onDestroy,ye=pe.eventKey;Ce&&Ce(ye),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),Xe.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(pe,Ce){var ye=this.getBaseProps();return y.createElement(ji,Object(h.a)({},ye,{id:this.internalMenuId,className:pe,style:Ce}),this.props.children)}},{key:"renderChildren",value:function(){var pe=this,Ce=this.getBaseProps(),ye=Ce.mode,Pe=Ce.visible,Fe=Ce.forceSubMenuRender,We=Ce.direction,He=this.getMotion(ye,Pe);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||Pe||Fe,!this.haveOpened)return y.createElement("div",null);var $e=S()("".concat(Ce.prefixCls,"-sub"),Object(N.a)({},"".concat(Ce.prefixCls,"-rtl"),We==="rtl"));return this.isInlineMode()?y.createElement(kr,Object(h.a)({visible:Ce.visible,forceRender:Fe},He),function(it){var gt=it.className,mt=it.style,xt=S()($e,gt);return pe.renderPopupMenu(xt,mt)}):this.renderPopupMenu($e)}},{key:"render",value:function(){var pe,Ce,ye,Pe=Object(M.a)({},this.props),Fe=this.getVisible(),We=this.getPrefixCls(),He=this.isInlineMode(),$e=this.getMode(),it=S()(We,"".concat(We,"-").concat($e),(pe={},Object(N.a)(pe,Pe.className,!!Pe.className),Object(N.a)(pe,this.getOpenClassName(),Fe),Object(N.a)(pe,this.getActiveClassName(),Pe.active||Fe&&!He),Object(N.a)(pe,this.getDisabledClassName(),Pe.disabled),Object(N.a)(pe,this.getSelectedClassName(),this.isChildrenSelected()),pe));this.internalMenuId||(Pe.eventKey?this.internalMenuId="".concat(Pe.eventKey,"$Menu"):(Mn+=1,this.internalMenuId="$__$".concat(Mn,"$Menu")));var gt={},mt={},xt={};Pe.disabled||(gt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},mt={onClick:this.onTitleClick},xt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Wt={},ar=Pe.direction,or=ar==="rtl";He&&(or?Wt.paddingRight=Pe.inlineIndent*Pe.level:Wt.paddingLeft=Pe.inlineIndent*Pe.level);var ur={};this.getVisible()&&(ur={"aria-owns":this.internalMenuId});var vr=null;$e!=="horizontal"&&(vr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(vr=y.createElement(this.props.expandIcon,Object(M.a)({},this.props))));var pr=y.createElement("div",Object(h.a)({ref:this.saveSubMenuTitle,style:Wt,className:"".concat(We,"-title"),role:"button"},xt,mt,{"aria-expanded":Fe},ur,{"aria-haspopup":"true",title:typeof Pe.title=="string"?Pe.title:void 0}),Pe.title,vr||y.createElement("i",{className:"".concat(We,"-arrow")})),cr=this.renderChildren(),Lr=((Ce=Pe.parentMenu)===null||Ce===void 0?void 0:Ce.isRootMenu)?Pe.parentMenu.props.getPopupContainer:function(Jr){return Jr.parentNode},xr=ln[$e],gn=Pe.popupOffset?{offset:Pe.popupOffset}:{},wr=S()((ye={},Object(N.a)(ye,Pe.popupClassName,Pe.popupClassName&&!He),Object(N.a)(ye,"".concat(We,"-rtl"),or),ye)),Jt=Pe.disabled,zt=Pe.triggerSubMenuAction,Or=Pe.subMenuOpenDelay,Mr=Pe.forceSubMenuRender,Ht=Pe.subMenuCloseDelay,Nr=Pe.builtinPlacements;Q.forEach(function(Jr){return delete Pe[Jr]}),delete Pe.onClick;var vn=or?Object(M.a)(Object(M.a)({},Zr),Nr):Object(M.a)(Object(M.a)({},Ki),Nr);delete Pe.direction;var Ur=this.getBaseProps(),en=He?null:this.getMotion(Ur.mode,Ur.visible);return y.createElement("li",Object(h.a)({},Pe,gt,{className:it,role:"menuitem"}),y.createElement(Oi,{prefixCls:We,popupClassName:S()("".concat(We,"-popup"),wr),getPopupContainer:Lr,builtinPlacements:vn,popupPlacement:xr,popupVisible:He?!1:Fe,popupAlign:gn,popup:He?null:cr,action:Jt||He?[]:[zt],mouseEnterDelay:Or,mouseLeaveDelay:Ht,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Mr,popupMotion:en},pr),He?cr:null)}}]),Ke}(y.Component);hi.defaultProps={onMouseEnter:ie,onMouseLeave:ie,onTitleMouseEnter:ie,onTitleMouseLeave:ie,onTitleClick:ie,manualRef:ie,mode:"vertical",title:""};var Kn=Object(T.b)(function(Re,Be){var Ke=Re.openKeys,Me=Re.activeKey,pe=Re.selectedKeys,Ce=Be.eventKey,ye=Be.subMenuKey;return{isOpen:Ke.indexOf(Ce)>-1,active:Me[ye]===Ce,selectedKeys:pe}})(hi);Kn.isSubMenu=!0;var zn=Kn,Li="menuitem-overflowed",Mi=.5,Gn=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(){var Me;return Object(R.a)(this,Ke),Me=Be.apply(this,arguments),Me.resizeObserver=null,Me.mutationObserver=null,Me.originalTotalWidth=0,Me.overflowedItems=[],Me.menuItemSizes=[],Me.cancelFrameId=null,Me.state={lastVisibleIndex:void 0},Me.childRef=y.createRef(),Me.getMenuItemNodes=function(){var pe=Me.props.prefixCls,Ce=Me.childRef.current;return Ce?[].slice.call(Ce.children).filter(function(ye){return ye.className.split(" ").indexOf("".concat(pe,"-overflowed-submenu"))<0}):[]},Me.getOverflowedSubMenuItem=function(pe,Ce,ye){var Pe=Me.props,Fe=Pe.overflowedIndicator,We=Pe.level,He=Pe.mode,$e=Pe.prefixCls,it=Pe.theme;if(We!==1||He!=="horizontal")return null;var gt=Me.props.children[0],mt=gt.props,xt=mt.children,Wt=mt.title,ar=mt.style,or=Object(O.a)(mt,["children","title","style"]),ur=Object(M.a)({},ar),vr="".concat(pe,"-overflowed-indicator"),pr="".concat(pe,"-overflowed-indicator");Ce.length===0&&ye!==!0?ur=Object(M.a)(Object(M.a)({},ur),{},{display:"none"}):ye&&(ur=Object(M.a)(Object(M.a)({},ur),{},{visibility:"hidden",position:"absolute"}),vr="".concat(vr,"-placeholder"),pr="".concat(pr,"-placeholder"));var cr=it?"".concat($e,"-").concat(it):"",Lr={};return Q.forEach(function(xr){or[xr]!==void 0&&(Lr[xr]=or[xr])}),y.createElement(zn,Object(h.a)({title:Fe,className:"".concat($e,"-overflowed-submenu"),popupClassName:cr},Lr,{key:vr,eventKey:pr,disabled:!1,style:ur}),Ce)},Me.setChildrenWidthAndResize=function(){if(Me.props.mode!=="horizontal")return;var pe=Me.childRef.current;if(!pe)return;var Ce=pe.children;if(!Ce||Ce.length===0)return;var ye=pe.children[Ce.length-1];fe(ye,"display","inline-block");var Pe=Me.getMenuItemNodes(),Fe=Pe.filter(function(We){return We.className.split(" ").indexOf(Li)>=0});Fe.forEach(function(We){fe(We,"display","inline-block")}),Me.menuItemSizes=Pe.map(function(We){return me(We,!0)}),Fe.forEach(function(We){fe(We,"display","none")}),Me.overflowedIndicatorWidth=me(pe.children[pe.children.length-1],!0),Me.originalTotalWidth=Me.menuItemSizes.reduce(function(We,He){return We+He},0),Me.handleResize(),fe(ye,"display","none")},Me.handleResize=function(){if(Me.props.mode!=="horizontal")return;var pe=Me.childRef.current;if(!pe)return;var Ce=me(pe);Me.overflowedItems=[];var ye=0,Pe;Me.originalTotalWidth>Ce+Mi&&(Pe=-1,Me.menuItemSizes.forEach(function(Fe){ye+=Fe,ye+Me.overflowedIndicatorWidth<=Ce&&(Pe+=1)})),Me.setState({lastVisibleIndex:Pe})},Me}return Object(C.a)(Ke,[{key:"componentDidMount",value:function(){var pe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Ce=this.childRef.current;if(!Ce)return;this.resizeObserver=new ze.default(function(ye){ye.forEach(function(){var Pe=pe.cancelFrameId;cancelAnimationFrame(Pe),pe.cancelFrameId=requestAnimationFrame(pe.setChildrenWidthAndResize)})}),[].slice.call(Ce.children).concat(Ce).forEach(function(ye){pe.resizeObserver.observe(ye)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){pe.resizeObserver.disconnect(),[].slice.call(Ce.children).concat(Ce).forEach(function(ye){pe.resizeObserver.observe(ye)}),pe.setChildrenWidthAndResize()}),this.mutationObserver.observe(Ce,{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(pe){var Ce=this,ye=this.state.lastVisibleIndex;return(pe||[]).reduce(function(Pe,Fe,We){var He=Fe;if(Ce.props.mode==="horizontal"){var $e=Ce.getOverflowedSubMenuItem(Fe.props.eventKey,[]);ye!==void 0&&Ce.props.className.indexOf("".concat(Ce.props.prefixCls,"-root"))!==-1&&(We>ye&&(He=y.cloneElement(Fe,{style:{display:"none"},eventKey:"".concat(Fe.props.eventKey,"-hidden"),className:"".concat(Li)})),We===ye+1&&(Ce.overflowedItems=pe.slice(ye+1).map(function(gt){return y.cloneElement(gt,{key:gt.props.eventKey,mode:"vertical-left"})}),$e=Ce.getOverflowedSubMenuItem(Fe.props.eventKey,Ce.overflowedItems)));var it=[].concat(Object(d.a)(Pe),[$e,He]);return We===pe.length-1&&it.push(Ce.getOverflowedSubMenuItem(Fe.props.eventKey,[],!0)),it}return[].concat(Object(d.a)(Pe),[He])},[])}},{key:"render",value:function(){var pe=this.props,Ce=pe.visible,ye=pe.prefixCls,Pe=pe.overflowedIndicator,Fe=pe.mode,We=pe.level,He=pe.tag,$e=pe.children,it=pe.theme,gt=Object(O.a)(pe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),mt=He;return y.createElement(mt,Object(h.a)({ref:this.childRef},gt),this.renderChildren($e))}}]),Ke}(y.Component);Gn.defaultProps={tag:"div",className:""};var Ni=Gn;function pi(Re){return Re.length?Re.every(function(Be){return!!Be.props.disabled}):!0}function mi(Re,Be,Ke){var Me=Re.getState();Re.setState({activeKey:Object(M.a)(Object(M.a)({},Me.activeKey),{},Object(N.a)({},Be,Ke))})}function Xn(Re){return Re.eventKey||"0-menu-"}function Vn(Re,Be){var Ke=Be,Me=Re.children,pe=Re.eventKey;if(Ke){var Ce;if(J(Me,function(ye,Pe){ye&&ye.props&&!ye.props.disabled&&Ke===Ee(ye,pe,Pe)&&(Ce=!0)}),Ce)return Ke}return Ke=null,Re.defaultActiveFirst&&J(Me,function(ye,Pe){!Ke&&ye&&!ye.props.disabled&&(Ke=Ee(ye,pe,Pe))}),Ke}function ki(Re){if(!Re)return;var Be=this.instanceArray.indexOf(Re);Be!==-1?this.instanceArray[Be]=Re:this.instanceArray.push(Re)}var ni=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(Me){var pe;return Object(R.a)(this,Ke),pe=Be.call(this,Me),pe.onKeyDown=function(Ce,ye){var Pe=Ce.keyCode,Fe;if(pe.getFlatInstanceArray().forEach(function(He){He&&He.props.active&&He.onKeyDown&&(Fe=He.onKeyDown(Ce))}),Fe)return 1;var We=null;return(Pe===s.a.UP||Pe===s.a.DOWN)&&(We=pe.step(Pe===s.a.UP?-1:1)),We?(Ce.preventDefault(),mi(pe.props.store,Xn(pe.props),We.props.eventKey),typeof ye=="function"&&ye(We),1):void 0},pe.onItemHover=function(Ce){var ye=Ce.key,Pe=Ce.hover;mi(pe.props.store,Xn(pe.props),Pe?ye:null)},pe.onDeselect=function(Ce){pe.props.onDeselect(Ce)},pe.onSelect=function(Ce){pe.props.onSelect(Ce)},pe.onClick=function(Ce){pe.props.onClick(Ce)},pe.onOpenChange=function(Ce){pe.props.onOpenChange(Ce)},pe.onDestroy=function(Ce){pe.props.onDestroy(Ce)},pe.getFlatInstanceArray=function(){return pe.instanceArray},pe.step=function(Ce){var ye=pe.getFlatInstanceArray(),Pe=pe.props.store.getState().activeKey[Xn(pe.props)],Fe=ye.length;if(!Fe)return null;Ce<0&&(ye=ye.concat().reverse());var We=-1;if(ye.every(function(gt,mt){return gt&&gt.props.eventKey===Pe?(We=mt,!1):!0}),!pe.props.defaultActiveFirst&&We!==-1&&pi(ye.slice(We,Fe-1)))return;var He=(We+1)%Fe,$e=He;do{var it=ye[$e];if(!it||it.props.disabled)$e=($e+1)%Fe;else return it}while($e!==He);return null},pe.renderCommonMenuItem=function(Ce,ye,Pe){var Fe=pe.props.store.getState(),We=Object(g.a)(pe),He=We.props,$e=Ee(Ce,He.eventKey,ye),it=Ce.props;if(!it||typeof Ce.type=="string")return Ce;var gt=$e===Fe.activeKey,mt=Object(M.a)(Object(M.a)({mode:it.mode||He.mode,level:He.level,inlineIndent:He.inlineIndent,renderMenuItem:pe.renderMenuItem,rootPrefixCls:He.prefixCls,index:ye,parentMenu:He.parentMenu,manualRef:it.disabled?void 0:Object(L.a)(Ce.ref,ki.bind(Object(g.a)(pe))),eventKey:$e,active:!it.disabled&&gt,multiple:He.multiple,onClick:function(Wt){(it.onClick||ie)(Wt),pe.onClick(Wt)},onItemHover:pe.onItemHover,motion:He.motion,subMenuOpenDelay:He.subMenuOpenDelay,subMenuCloseDelay:He.subMenuCloseDelay,forceSubMenuRender:He.forceSubMenuRender,onOpenChange:pe.onOpenChange,onDeselect:pe.onDeselect,onSelect:pe.onSelect,builtinPlacements:He.builtinPlacements,itemIcon:it.itemIcon||pe.props.itemIcon,expandIcon:it.expandIcon||pe.props.expandIcon},Pe),{},{direction:He.direction});return(He.mode==="inline"||Te())&&(mt.triggerSubMenuAction="click"),y.cloneElement(Ce,Object(M.a)(Object(M.a)({},mt),{},{key:$e||ye}))},pe.renderMenuItem=function(Ce,ye,Pe){if(!Ce)return null;var Fe=pe.props.store.getState(),We={openKeys:Fe.openKeys,selectedKeys:Fe.selectedKeys,triggerSubMenuAction:pe.props.triggerSubMenuAction,subMenuKey:Pe};return pe.renderCommonMenuItem(Ce,ye,We)},Me.store.setState({activeKey:Object(M.a)(Object(M.a)({},Me.store.getState().activeKey),{},Object(N.a)({},Me.eventKey,Vn(Me,Me.activeKey)))}),pe.instanceArray=[],pe}return Object(C.a)(Ke,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(pe){return this.props.visible||pe.visible||this.props.className!==pe.className||!G()(this.props.style,pe.style)}},{key:"componentDidUpdate",value:function(pe){var Ce=this.props,ye="activeKey"in Ce?Ce.activeKey:Ce.store.getState().activeKey[Xn(Ce)],Pe=Vn(Ce,ye);if(Pe!==ye)mi(Ce.store,Xn(Ce),Pe);else if("activeKey"in pe){var Fe=Vn(pe,pe.activeKey);Pe!==Fe&&mi(Ce.store,Xn(Ce),Pe)}}},{key:"render",value:function(){var pe=this,Ce=Object(h.a)({},this.props);this.instanceArray=[];var ye=S()(Ce.prefixCls,Ce.className,"".concat(Ce.prefixCls,"-").concat(Ce.mode)),Pe={className:ye,role:Ce.role||"menu"};Ce.id&&(Pe.id=Ce.id),Ce.focusable&&(Pe.tabIndex=0,Pe.onKeyDown=this.onKeyDown);var Fe=Ce.prefixCls,We=Ce.eventKey,He=Ce.visible,$e=Ce.level,it=Ce.mode,gt=Ce.overflowedIndicator,mt=Ce.theme;return Q.forEach(function(xt){return delete Ce[xt]}),delete Ce.onClick,y.createElement(Ni,Object(h.a)({},Ce,{prefixCls:Fe,mode:it,tag:"ul",level:$e,theme:mt,visible:He,overflowedIndicator:gt},Pe),Object(b.a)(Ce.children).map(function(xt,Wt){return pe.renderMenuItem(xt,Wt,We||"0-menu-")}))}}]),Ke}(y.Component);ni.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:ie};var gi=Object(T.b)()(ni),ji=gi,ii=j("Kwbf");function Pr(Re,Be,Ke){var Me=Re.prefixCls,pe=Re.motion,Ce=Re.defaultMotions,ye=Ce===void 0?{}:Ce,Pe=Re.openAnimation,Fe=Re.openTransitionName,We=Be.switchingModeFromInline;if(pe)return pe;if(Object(K.a)(Pe)==="object"&&Pe)Object(ii.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Pe=="string")return{motionName:"".concat(Me,"-open-").concat(Pe)};if(Fe)return{motionName:Fe};var He=ye[Ke];return He||(We?null:ye.other)}var Nt=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(Me){var pe;Object(R.a)(this,Ke),pe=Be.call(this,Me),pe.onSelect=function(Pe){var Fe=Object(g.a)(pe),We=Fe.props;if(We.selectable){var He=pe.store.getState(),$e=He.selectedKeys,it=Pe.key;We.multiple?$e=$e.concat([it]):$e=[it],"selectedKeys"in We||pe.store.setState({selectedKeys:$e}),We.onSelect(Object(M.a)(Object(M.a)({},Pe),{},{selectedKeys:$e}))}},pe.onClick=function(Pe){var Fe=pe.getRealMenuMode(),We=Object(g.a)(pe),He=We.store,$e=We.props.onOpenChange;Fe!=="inline"&&!("openKeys"in pe.props)&&(He.setState({openKeys:[]}),$e([])),pe.props.onClick(Pe)},pe.onKeyDown=function(Pe,Fe){pe.innerMenu.getWrappedInstance().onKeyDown(Pe,Fe)},pe.onOpenChange=function(Pe){var Fe=Object(g.a)(pe),We=Fe.props,He=pe.store.getState().openKeys.concat(),$e=!1,it=function(mt){var xt=!1;if(mt.open)xt=He.indexOf(mt.key)===-1,xt&&He.push(mt.key);else{var Wt=He.indexOf(mt.key);xt=Wt!==-1,xt&&He.splice(Wt,1)}$e=$e||xt};Array.isArray(Pe)?Pe.forEach(it):it(Pe),$e&&("openKeys"in pe.props||pe.store.setState({openKeys:He}),We.onOpenChange(He))},pe.onDeselect=function(Pe){var Fe=Object(g.a)(pe),We=Fe.props;if(We.selectable){var He=pe.store.getState().selectedKeys.concat(),$e=Pe.key,it=He.indexOf($e);it!==-1&&He.splice(it,1),"selectedKeys"in We||pe.store.setState({selectedKeys:He}),We.onDeselect(Object(M.a)(Object(M.a)({},Pe),{},{selectedKeys:He}))}},pe.onMouseEnter=function(Pe){pe.restoreModeVerticalFromInline();var Fe=pe.props.onMouseEnter;Fe&&Fe(Pe)},pe.onTransitionEnd=function(Pe){var Fe=Pe.propertyName==="width"&&Pe.target===Pe.currentTarget,We=Pe.target.className,He=Object.prototype.toString.call(We)==="[object SVGAnimatedString]"?We.animVal:We,$e=Pe.propertyName==="font-size"&&He.indexOf("anticon")>=0;(Fe||$e)&&pe.restoreModeVerticalFromInline()},pe.setInnerMenu=function(Pe){pe.innerMenu=Pe},pe.isRootMenu=!0;var Ce=Me.defaultSelectedKeys,ye=Me.defaultOpenKeys;return"selectedKeys"in Me&&(Ce=Me.selectedKeys||[]),"openKeys"in Me&&(ye=Me.openKeys||[]),pe.store=Object(T.c)({selectedKeys:Ce,openKeys:ye,activeKey:{"0-menu-":Vn(Me,Me.activeKey)}}),pe.state={switchingModeFromInline:!1,prevProps:Me,inlineOpenKeys:[],store:pe.store},pe}return Object(C.a)(Ke,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(pe){var Ce=this.props,ye=Ce.siderCollapsed,Pe=Ce.inlineCollapsed,Fe=Ce.onOpenChange;(!pe.inlineCollapsed&&Pe||!pe.siderCollapsed&&ye)&&Fe([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var pe=this.props.collapsedWidth,Ce=this.store,ye=this.prevOpenKeys,Pe=this.getInlineCollapsed()&&(pe===0||pe==="0"||pe==="0px");Pe?(this.prevOpenKeys=Ce.getState().openKeys.concat(),this.store.setState({openKeys:[]})):ye&&(this.store.setState({openKeys:ye}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var pe=this.props.mode,Ce=this.state.switchingModeFromInline,ye=this.getInlineCollapsed();return Ce&&ye?"inline":ye?"vertical":pe}},{key:"getInlineCollapsed",value:function(){var pe=this.props,Ce=pe.inlineCollapsed,ye=pe.siderCollapsed;return ye!==void 0?ye:Ce}},{key:"restoreModeVerticalFromInline",value:function(){var pe=this.state.switchingModeFromInline;pe&&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 pe=Object(M.a)({},Object(k.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Ce=this.getRealMenuMode();return pe.className+=" ".concat(pe.prefixCls,"-root"),pe.direction==="rtl"&&(pe.className+=" ".concat(pe.prefixCls,"-rtl")),pe=Object(M.a)(Object(M.a)({},pe),{},{mode:Ce,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Pr(this.props,this.state,Ce)}),delete pe.openAnimation,delete pe.openTransitionName,y.createElement(T.a,{store:this.store},y.createElement(ji,Object(h.a)({},pe,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(pe,Ce){var ye=Ce.prevProps,Pe=Ce.store,Fe=Pe.getState(),We={},He={prevProps:pe};return ye.mode==="inline"&&pe.mode!=="inline"&&(He.switchingModeFromInline=!0),"openKeys"in pe?We.openKeys=pe.openKeys||[]:((pe.inlineCollapsed&&!ye.inlineCollapsed||pe.siderCollapsed&&!ye.siderCollapsed)&&(He.switchingModeFromInline=!0,He.inlineOpenKeys=Fe.openKeys,We.openKeys=[]),(!pe.inlineCollapsed&&ye.inlineCollapsed||!pe.siderCollapsed&&ye.siderCollapsed)&&(We.openKeys=Ce.inlineOpenKeys,He.inlineOpenKeys=[])),Object.keys(We).length&&Pe.setState(We),He}}]),Ke}(y.Component);Nt.defaultProps={selectable:!0,onClick:ie,onSelect:ie,onOpenChange:ie,onDeselect:ie,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:y.createElement("span",null,"\xB7\xB7\xB7")};var Yt=Nt,Ut=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(){var Me;return Object(R.a)(this,Ke),Me=Be.apply(this,arguments),Me.onKeyDown=function(pe){var Ce=pe.keyCode;return Ce===s.a.ENTER?(Me.onClick(pe),!0):void 0},Me.onMouseLeave=function(pe){var Ce=Me.props,ye=Ce.eventKey,Pe=Ce.onItemHover,Fe=Ce.onMouseLeave;Pe({key:ye,hover:!1}),Fe({key:ye,domEvent:pe})},Me.onMouseEnter=function(pe){var Ce=Me.props,ye=Ce.eventKey,Pe=Ce.onItemHover,Fe=Ce.onMouseEnter;Pe({key:ye,hover:!0}),Fe({key:ye,domEvent:pe})},Me.onClick=function(pe){var Ce=Me.props,ye=Ce.eventKey,Pe=Ce.multiple,Fe=Ce.onClick,We=Ce.onSelect,He=Ce.onDeselect,$e=Ce.isSelected,it={key:ye,keyPath:[ye],item:Object(g.a)(Me),domEvent:pe};Fe(it),Pe?$e?He(it):We(it):$e||We(it)},Me.saveNode=function(pe){Me.node=pe},Me}return Object(C.a)(Ke,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var pe=this.props;pe.onDestroy&&pe.onDestroy(pe.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 pe,Ce=Object(M.a)({},this.props),ye=S()(this.getPrefixCls(),Ce.className,(pe={},Object(N.a)(pe,this.getActiveClassName(),!Ce.disabled&&Ce.active),Object(N.a)(pe,this.getSelectedClassName(),Ce.isSelected),Object(N.a)(pe,this.getDisabledClassName(),Ce.disabled),pe)),Pe=Object(M.a)(Object(M.a)({},Ce.attribute),{},{title:typeof Ce.title=="string"?Ce.title:void 0,className:ye,role:Ce.role||"menuitem","aria-disabled":Ce.disabled});Ce.role==="option"?Pe=Object(M.a)(Object(M.a)({},Pe),{},{role:"option","aria-selected":Ce.isSelected}):(Ce.role===null||Ce.role==="none")&&(Pe.role="none");var Fe={onClick:Ce.disabled?null:this.onClick,onMouseLeave:Ce.disabled?null:this.onMouseLeave,onMouseEnter:Ce.disabled?null:this.onMouseEnter},We=Object(M.a)({},Ce.style);Ce.mode==="inline"&&(Ce.direction==="rtl"?We.paddingRight=Ce.inlineIndent*Ce.level:We.paddingLeft=Ce.inlineIndent*Ce.level),Q.forEach(function($e){return delete Ce[$e]}),delete Ce.direction;var He=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(He=y.createElement(this.props.itemIcon,this.props)),y.createElement("li",Object(h.a)({},Object(k.a)(Ce,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Pe,Fe,{style:We,ref:this.saveNode}),Ce.children,He)}}]),Ke}(y.Component);Ut.isMenuItem=!0,Ut.defaultProps={onSelect:ie,onMouseEnter:ie,onMouseLeave:ie,manualRef:ie};var nr=Object(T.b)(function(Re,Be){var Ke=Re.activeKey,Me=Re.selectedKeys,pe=Be.eventKey,Ce=Be.subMenuKey;return{active:Ke[Ce]===pe,isSelected:Array.isArray(Me)?Me.indexOf(pe)!==-1:Me===pe}})(Ut),gr=nr,Rr=function(Re){Object(x.a)(Ke,Re);var Be=Object(E.a)(Ke);function Ke(){var Me;return Object(R.a)(this,Ke),Me=Be.apply(this,arguments),Me.renderInnerMenuItem=function(pe){var Ce=Me.props,ye=Ce.renderMenuItem,Pe=Ce.index;return ye(pe,Pe,Me.props.subMenuKey)},Me}return Object(C.a)(Ke,[{key:"render",value:function(){var pe=Object(h.a)({},this.props),Ce=pe.className,ye=Ce===void 0?"":Ce,Pe=pe.rootPrefixCls,Fe="".concat(Pe,"-item-group-title"),We="".concat(Pe,"-item-group-list"),He=pe.title,$e=pe.children;return Q.forEach(function(it){return delete pe[it]}),delete pe.direction,y.createElement("li",Object(h.a)({},pe,{onClick:function(gt){return gt.stopPropagation()},className:"".concat(ye," ").concat(Pe,"-item-group")}),y.createElement("div",{className:Fe,title:typeof He=="string"?He:void 0},He),y.createElement("ul",{className:We},y.Children.map($e,this.renderInnerMenuItem)))}}]),Ke}(y.Component);Rr.isMenuItemGroup=!0,Rr.defaultProps={disabled:!0};var dr=Rr,qr=function(Be){var Ke=Be.className,Me=Be.rootPrefixCls,pe=Be.style;return y.createElement("li",{className:"".concat(Ke," ").concat(Me,"-item-divider"),style:pe})};qr.defaultProps={disabled:!0,className:"",style:{}};var Un=qr,sr=Yt,vi=j("eDIo");function Ir(Re,Be){var Ke=Re.prefixCls,Me=Re.editable,pe=Re.locale,Ce=Re.style;return!Me||Me.showAdd===!1?null:y.createElement("button",{ref:Be,type:"button",className:"".concat(Ke,"-nav-add"),style:Ce,"aria-label":(pe==null?void 0:pe.addAriaLabel)||"Add tab",onClick:function(Pe){Me.onEdit("add",{event:Pe})}},Me.addIcon||"+")}var On=y.forwardRef(Ir);function Rn(Re,Be){var Ke=Re.prefixCls,Me=Re.id,pe=Re.tabs,Ce=Re.locale,ye=Re.mobile,Pe=Re.moreIcon,Fe=Pe===void 0?"More":Pe,We=Re.moreTransitionName,He=Re.style,$e=Re.className,it=Re.editable,gt=Re.tabBarGutter,mt=Re.rtl,xt=Re.onTabClick,Wt=Object(y.useState)(!1),ar=Object(v.a)(Wt,2),or=ar[0],ur=ar[1],vr=Object(y.useState)(null),pr=Object(v.a)(vr,2),cr=pr[0],Lr=pr[1],xr="".concat(Me,"-more-popup"),gn="".concat(Ke,"-dropdown"),wr=cr!==null?"".concat(xr,"-").concat(cr):null,Jt=Ce==null?void 0:Ce.dropdownAriaLabel,zt=y.createElement(sr,{onClick:function(en){var Jr=en.key,Dn=en.domEvent;xt(Jr,Dn),ur(!1)},id:xr,tabIndex:-1,role:"listbox","aria-activedescendant":wr,selectedKeys:[cr],"aria-label":Jt!==void 0?Jt:"expanded dropdown"},pe.map(function(Ur){return y.createElement(gr,{key:Ur.key,id:"".concat(xr,"-").concat(Ur.key),role:"option","aria-controls":Me&&"".concat(Me,"-panel-").concat(Ur.key),disabled:Ur.disabled},Ur.tab)}));function Or(Ur){for(var en=pe.filter(function(yi){return!yi.disabled}),Jr=en.findIndex(function(yi){return yi.key===cr})||0,Dn=en.length,Yn=0;Yn<Dn;Yn+=1){Jr=(Jr+Ur+Dn)%Dn;var En=en[Jr];if(!En.disabled){Lr(En.key);return}}}function Mr(Ur){var en=Ur.which;if(!or){[s.a.DOWN,s.a.SPACE,s.a.ENTER].includes(en)&&(ur(!0),Ur.preventDefault());return}switch(en){case s.a.UP:Or(-1),Ur.preventDefault();break;case s.a.DOWN:Or(1),Ur.preventDefault();break;case s.a.ESC:ur(!1);break;case s.a.SPACE:case s.a.ENTER:cr!==null&&xt(cr,Ur);break}}Object(y.useEffect)(function(){var Ur=document.getElementById(wr);Ur&&Ur.scrollIntoView&&Ur.scrollIntoView(!1)},[cr]),Object(y.useEffect)(function(){or||Lr(null)},[or]);var Ht=Object(N.a)({},mt?"marginLeft":"marginRight",gt);pe.length||(Ht.visibility="hidden",Ht.order=1);var Nr=S()(Object(N.a)({},"".concat(gn,"-rtl"),mt)),vn=ye?null:y.createElement(vi.a,{prefixCls:gn,overlay:zt,trigger:["hover"],visible:or,transitionName:We,onVisibleChange:ur,overlayClassName:Nr,mouseEnterDelay:.1,mouseLeaveDelay:.1},y.createElement("button",{type:"button",className:"".concat(Ke,"-nav-more"),style:Ht,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":xr,id:"".concat(Me,"-more"),"aria-expanded":or,onKeyDown:Mr},Fe));return y.createElement("div",{className:S()("".concat(Ke,"-nav-operations"),$e),style:He,ref:Be},vn,y.createElement(On,{prefixCls:Ke,locale:Ce,editable:it}))}var li=y.forwardRef(Rn),ua=Object(y.createContext)(null),Dr=.1,_r=.01,fr=20,ai=Math.pow(.995,fr);function zi(){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 Gi(Re,Be){var Ke=Object(y.useState)(),Me=Object(v.a)(Ke,2),pe=Me[0],Ce=Me[1],ye=Object(y.useState)(0),Pe=Object(v.a)(ye,2),Fe=Pe[0],We=Pe[1],He=Object(y.useState)(0),$e=Object(v.a)(He,2),it=$e[0],gt=$e[1],mt=Object(y.useState)(),xt=Object(v.a)(mt,2),Wt=xt[0],ar=xt[1],or=Object(y.useRef)();function ur(Jt){var zt=Jt.touches[0],Or=zt.screenX,Mr=zt.screenY;Ce({x:Or,y:Mr}),window.clearInterval(or.current)}function vr(Jt){if(!pe)return;Jt.preventDefault();var zt=Jt.touches[0],Or=zt.screenX,Mr=zt.screenY;Ce({x:Or,y:Mr});var Ht=Or-pe.x,Nr=Mr-pe.y;Be(Ht,Nr);var vn=Date.now();We(vn),gt(vn-Fe),ar({x:Ht,y:Nr})}function pr(){if(!pe)return;if(Ce(null),ar(null),Wt){var Jt=Wt.x/it,zt=Wt.y/it,Or=Math.abs(Jt),Mr=Math.abs(zt);if(Math.max(Or,Mr)<Dr)return;var Ht=Jt,Nr=zt;or.current=window.setInterval(function(){if(Math.abs(Ht)<_r&&Math.abs(Nr)<_r){window.clearInterval(or.current);return}Ht*=ai,Nr*=ai,Be(Ht*fr,Nr*fr)},fr)}}var cr=Object(y.useRef)(0),Lr=Object(y.useRef)(!1),xr=Object(y.useRef)();function gn(Jt){var zt=Jt.deltaX,Or=Jt.deltaY,Mr=0,Ht=Math.abs(zt),Nr=Math.abs(Or);Ht===Nr?Mr=xr.current==="x"?zt:Or:Ht>Nr?(Mr=zt,xr.current="x"):(Mr=Or,xr.current="y");var vn=Date.now();vn-cr.current>100&&(Lr.current=!1),(Be(-Mr,-Mr)||Lr.current)&&(Jt.preventDefault(),Lr.current=!0),cr.current=vn}var wr=Object(y.useRef)(null);wr.current={onTouchStart:ur,onTouchMove:vr,onTouchEnd:pr,onWheel:gn},y.useEffect(function(){function Jt(Ht){wr.current.onTouchStart(Ht)}function zt(Ht){wr.current.onTouchMove(Ht)}function Or(Ht){wr.current.onTouchEnd(Ht)}function Mr(Ht){wr.current.onWheel(Ht)}return document.addEventListener("touchmove",zt,{passive:!1}),document.addEventListener("touchend",Or,{passive:!1}),Re.current.addEventListener("touchstart",Jt,{passive:!1}),Re.current.addEventListener("wheel",Mr),function(){document.removeEventListener("touchmove",zt),document.removeEventListener("touchend",Or)}},[])}function $t(){var Re=Object(y.useRef)(new Map);function Be(Me){return Re.current.has(Me)||Re.current.set(Me,y.createRef()),Re.current.get(Me)}function Ke(Me){Re.current.delete(Me)}return[Be,Ke]}function Ot(Re,Be){var Ke=y.useRef(Re),Me=y.useState({}),pe=Object(v.a)(Me,2),Ce=pe[1];function ye(Pe){var Fe=typeof Pe=="function"?Pe(Ke.current):Pe;Fe!==Ke.current&&Be(Fe,Ke.current),Ke.current=Fe,Ce({})}return[Ke.current,ye]}var tr=function(Be){var Ke=Be.position,Me=Be.prefixCls,pe=Be.extra;if(!pe)return null;var Ce,ye=pe;return Ke==="right"&&(Ce=ye.right||!ye.left&&ye||null),Ke==="left"&&(Ce=ye.left||null),Ce?y.createElement("div",{className:"".concat(Me,"-extra-content")},Ce):null};function ir(Re,Be){var Ke,Me=y.useContext(ua),pe=Me.prefixCls,Ce=Me.tabs,ye=Re.className,Pe=Re.style,Fe=Re.id,We=Re.animated,He=Re.activeKey,$e=Re.rtl,it=Re.extra,gt=Re.editable,mt=Re.locale,xt=Re.tabPosition,Wt=Re.tabBarGutter,ar=Re.children,or=Re.onTabClick,ur=Re.onTabScroll,vr=Object(y.useRef)(),pr=Object(y.useRef)(),cr=Object(y.useRef)(),Lr=Object(y.useRef)(),xr=$t(),gn=Object(v.a)(xr,2),wr=gn[0],Jt=gn[1],zt=xt==="top"||xt==="bottom",Or=Ot(0,function(Xr,Ar){zt&&ur&&ur({direction:Xr>Ar?"left":"right"})}),Mr=Object(v.a)(Or,2),Ht=Mr[0],Nr=Mr[1],vn=Ot(0,function(Xr,Ar){!zt&&ur&&ur({direction:Xr>Ar?"top":"bottom"})}),Ur=Object(v.a)(vn,2),en=Ur[0],Jr=Ur[1],Dn=Object(y.useState)(0),Yn=Object(v.a)(Dn,2),En=Yn[0],yi=Yn[1],Fi=Object(y.useState)(0),Ei=Object(v.a)(Fi,2),$n=Ei[0],un=Ei[1],tn=Object(y.useState)(0),xn=Object(v.a)(tn,2),yn=xn[0],Ui=xn[1],ea=Object(y.useState)(0),ta=Object(v.a)(ea,2),Qr=ta[0],Vi=ta[1],ra=Object(y.useState)(null),on=Object(v.a)(ra,2),Yr=on[0],Jn=on[1],So=Object(y.useState)(null),eo=Object(v.a)(So,2),na=eo[0],va=eo[1],ka=Object(y.useState)(0),to=Object(v.a)(ka,2),Pa=to[0],Vo=to[1],Yo=Object(y.useState)(0),Oo=Object(v.a)(Yo,2),ro=Oo[0],no=Oo[1],ya=o(new Map),ba=Object(v.a)(ya,2),$o=ba[0],Na=ba[1],Ca=f(Ce,$o,En),_a="".concat(pe,"-nav-operations-hidden"),Ea=0,Bi=0;zt?$e?(Ea=0,Bi=Math.max(0,En-Yr)):(Ea=Math.min(0,Yr-En),Bi=0):(Ea=Math.min(0,na-$n),Bi=0);function ca(Xr){return Xr<Ea?[Ea,!1]:Xr>Bi?[Bi,!1]:[Xr,!0]}var ia=Object(y.useRef)(),Aa=Object(y.useState)(),da=Object(v.a)(Aa,2),ja=da[0],io=da[1];function Fa(){io(Date.now())}function ao(){window.clearTimeout(ia.current)}Gi(vr,function(Xr,Ar){var Qn=!1;function wi(xa,Ji){xa(function(Da){var oa=ca(Da+Ji),Zn=Object(v.a)(oa,2),Ha=Zn[0],so=Zn[1];return Qn=so,Ha})}if(zt){if(Yr>=En)return Qn;wi(Nr,Xr)}else{if(na>=$n)return Qn;wi(Jr,Ar)}return ao(),Fa(),Qn}),Object(y.useEffect)(function(){return ao(),ja&&(ia.current=window.setTimeout(function(){io(0)},100)),ao},[ja]);function aa(){var Xr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:He,Ar=Ca.get(Xr);if(!Ar)return;if(zt){var Qn=Ht;$e?Ar.right<Ht?Qn=Ar.right:Ar.right+Ar.width>Ht+Yr&&(Qn=Ar.right+Ar.width-Yr):Ar.left<-Ht?Qn=-Ar.left:Ar.left+Ar.width>-Ht+Yr&&(Qn=-(Ar.left+Ar.width-Yr)),Jr(0),Nr(ca(Qn)[0])}else{var wi=en;Ar.top<-en?wi=-Ar.top:Ar.top+Ar.height>-en+na&&(wi=-(Ar.top+Ar.height-na)),Nr(0),Jr(ca(wi)[0])}}var fa=_(Ca,{width:Yr,height:na,left:Ht,top:en},{width:yn,height:Qr},{width:Pa,height:ro},Object(M.a)(Object(M.a)({},Re),{},{tabs:Ce})),Co=Object(v.a)(fa,2),Jo=Co[0],Qo=Co[1],Zo=Ce.map(function(Xr){var Ar=Xr.key;return y.createElement(a,{id:Fe,prefixCls:pe,key:Ar,rtl:$e,tab:Xr,closable:Xr.closable,editable:gt,active:Ar===He,tabPosition:xt,tabBarGutter:Wt,renderWrapper:ar,removeAriaLabel:mt==null?void 0:mt.removeAriaLabel,ref:wr(Ar),onClick:function(wi){or(Ar,wi)},onRemove:function(){Jt(Ar)},onFocus:function(){aa(Ar),Fa(),$e||(vr.current.scrollLeft=0),vr.current.scrollTop=0}})}),oo=i(function(){var Xr,Ar,Qn,wi,xa,Ji,Da,oa,Zn,Ha=((Xr=vr.current)===null||Xr===void 0?void 0:Xr.offsetWidth)||0,so=((Ar=vr.current)===null||Ar===void 0?void 0:Ar.offsetHeight)||0,lo=((Qn=Lr.current)===null||Qn===void 0?void 0:Qn.offsetWidth)||0,Ti=((wi=Lr.current)===null||wi===void 0?void 0:wi.offsetHeight)||0,Kr=((xa=cr.current)===null||xa===void 0?void 0:xa.offsetWidth)||0,Wi=((Ji=cr.current)===null||Ji===void 0?void 0:Ji.offsetHeight)||0;Jn(Ha),va(so),Vo(lo),no(Ti);var Qi=(((Da=pr.current)===null||Da===void 0?void 0:Da.offsetWidth)||0)-lo,Zi=(((oa=pr.current)===null||oa===void 0?void 0:oa.offsetHeight)||0)-Ti;yi(Qi),un(Zi);var uo=(Zn=cr.current)===null||Zn===void 0?void 0:Zn.className.includes(_a);Ui(Qi-(uo?0:Kr)),Vi(Zi-(uo?0:Wi)),Na(function(){var Wa=new Map;return Ce.forEach(function(Lo){var Mo=Lo.key,pa=wr(Mo).current;pa&&Wa.set(Mo,{width:pa.offsetWidth,height:pa.offsetHeight,left:pa.offsetLeft,top:pa.offsetTop})}),Wa})}),qo=Ce.slice(0,Jo),xi=Ce.slice(Qo+1),Pn=[].concat(Object(d.a)(qo),Object(d.a)(xi)),ui=Object(y.useState)(),Nn=Object(v.a)(ui,2),Ra=Nn[0],es=Nn[1],Hi=Ca.get(He),Ao=Object(y.useRef)();function Ro(){l.a.cancel(Ao.current)}Object(y.useEffect)(function(){var Xr={};return Hi&&(zt?($e?Xr.right=Hi.right:Xr.left=Hi.left,Xr.width=Hi.width):(Xr.top=Hi.top,Xr.height=Hi.height)),Ro(),Ao.current=l()(function(){es(Xr)}),Ro},[Hi,zt,$e]),Object(y.useEffect)(function(){aa()},[He,Hi,Ca,zt]),Object(y.useEffect)(function(){oo()},[$e,Wt,He,Ce.map(function(Xr){return Xr.key}).join("_")]);var Io=!!Pn.length,ha="".concat(pe,"-nav-wrap"),Ua,Ia,Do,Ba;return zt?$e?(Ia=Ht>0,Ua=Ht+Yr<En):(Ua=Ht<0,Ia=-Ht+Yr<En):(Do=en<0,Ba=-en+na<$n),y.createElement("div",{ref:Be,role:"tablist",className:S()("".concat(pe,"-nav"),ye),style:Pe,onKeyDown:function(){Fa()}},y.createElement(tr,{position:"left",extra:it,prefixCls:pe}),y.createElement(r.a,{onResize:oo},y.createElement("div",{className:S()(ha,(Ke={},Object(N.a)(Ke,"".concat(ha,"-ping-left"),Ua),Object(N.a)(Ke,"".concat(ha,"-ping-right"),Ia),Object(N.a)(Ke,"".concat(ha,"-ping-top"),Do),Object(N.a)(Ke,"".concat(ha,"-ping-bottom"),Ba),Ke)),ref:vr},y.createElement(r.a,{onResize:oo},y.createElement("div",{ref:pr,className:"".concat(pe,"-nav-list"),style:{transform:"translate(".concat(Ht,"px, ").concat(en,"px)"),transition:ja?"none":void 0}},Zo,y.createElement(On,{ref:Lr,prefixCls:pe,locale:mt,editable:gt,style:{visibility:Io?"hidden":null}}),y.createElement("div",{className:S()("".concat(pe,"-ink-bar"),Object(N.a)({},"".concat(pe,"-ink-bar-animated"),We.inkBar)),style:Ra}))))),y.createElement(li,Object.assign({},Re,{ref:cr,prefixCls:pe,tabs:Pn,className:!Io&&_a})),y.createElement(tr,{position:"right",extra:it,prefixCls:pe}))}var Fr=y.forwardRef(ir);function hr(Re){var Be=Re.id,Ke=Re.activeKey,Me=Re.animated,pe=Re.tabPosition,Ce=Re.rtl,ye=Re.destroyInactiveTabPane,Pe=y.useContext(ua),Fe=Pe.prefixCls,We=Pe.tabs,He=Me.tabPane,$e=We.findIndex(function(it){return it.key===Ke});return y.createElement("div",{className:S()("".concat(Fe,"-content-holder"))},y.createElement("div",{className:S()("".concat(Fe,"-content"),"".concat(Fe,"-content-").concat(pe),Object(N.a)({},"".concat(Fe,"-content-animated"),He)),style:$e&&He?Object(N.a)({},Ce?"marginRight":"marginLeft","-".concat($e,"00%")):null},We.map(function(it){return y.cloneElement(it.node,{key:it.key,prefixCls:Fe,tabKey:it.key,id:Be,animated:He,active:it.key===Ke,destroyInactiveTabPane:ye})})))}function mn(Re){var Be=Re.prefixCls,Ke=Re.forceRender,Me=Re.className,pe=Re.style,Ce=Re.id,ye=Re.active,Pe=Re.animated,Fe=Re.destroyInactiveTabPane,We=Re.tabKey,He=Re.children,$e=y.useState(Ke),it=Object(v.a)($e,2),gt=it[0],mt=it[1];y.useEffect(function(){ye?mt(!0):Fe&&mt(!1)},[ye,Fe]);var xt={};return ye||(Pe?(xt.visibility="hidden",xt.height=0,xt.overflowY="hidden"):xt.display="none"),y.createElement("div",{id:Ce&&"".concat(Ce,"-panel-").concat(We),role:"tabpanel",tabIndex:ye?0:-1,"aria-labelledby":Ce&&"".concat(Ce,"-tab-").concat(We),"aria-hidden":!ye,style:Object(M.a)(Object(M.a)({},xt),pe),className:S()("".concat(Be,"-tabpane"),ye&&"".concat(Be,"-tabpane-active"),Me)},(ye||gt||Ke)&&He)}var an=0;function Ci(Re){return Object(b.a)(Re).map(function(Be){if(y.isValidElement(Be)){var Ke=Be.key!==void 0?String(Be.key):void 0;return Object(M.a)(Object(M.a)({key:Ke},Be.props),{},{node:Be})}return null}).filter(function(Be){return Be})}function In(Re,Be){var Ke,Me=Re.id,pe=Re.prefixCls,Ce=pe===void 0?"rc-tabs":pe,ye=Re.className,Pe=Re.children,Fe=Re.direction,We=Re.activeKey,He=Re.defaultActiveKey,$e=Re.editable,it=Re.animated,gt=Re.tabPosition,mt=gt===void 0?"top":gt,xt=Re.tabBarGutter,Wt=Re.tabBarStyle,ar=Re.tabBarExtraContent,or=Re.locale,ur=Re.moreIcon,vr=Re.moreTransitionName,pr=Re.destroyInactiveTabPane,cr=Re.renderTabBar,Lr=Re.onChange,xr=Re.onTabClick,gn=Re.onTabScroll,wr=Object(O.a)(Re,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),Jt=Ci(Pe),zt=Fe==="rtl",Or;it===!1?Or={inkBar:!1,tabPane:!1}:Or=Object(M.a)({inkBar:!0,tabPane:!1},it!==!0?it:null);var Mr=Object(y.useState)(!1),Ht=Object(v.a)(Mr,2),Nr=Ht[0],vn=Ht[1];Object(y.useEffect)(function(){vn(zi())},[]);var Ur=Object(p.a)(function(){var Qr;return(Qr=Jt[0])===null||Qr===void 0?void 0:Qr.key},{value:We,defaultValue:He}),en=Object(v.a)(Ur,2),Jr=en[0],Dn=en[1],Yn=Object(y.useState)(function(){return Jt.findIndex(function(Qr){return Qr.key===Jr})}),En=Object(v.a)(Yn,2),yi=En[0],Fi=En[1];Object(y.useEffect)(function(){var Qr=Jt.findIndex(function(ra){return ra.key===Jr});if(Qr===-1){var Vi;Qr=Math.max(0,Math.min(yi,Jt.length-1)),Dn((Vi=Jt[Qr])===null||Vi===void 0?void 0:Vi.key)}Fi(Qr)},[Jt.map(function(Qr){return Qr.key}).join("_"),Jr,yi]);var Ei=Object(p.a)(null,{value:Me}),$n=Object(v.a)(Ei,2),un=$n[0],tn=$n[1],xn=mt;Nr&&!["left","right"].includes(mt)&&(xn="top"),Object(y.useEffect)(function(){Me||(tn("rc-tabs-".concat(an)),an+=1)},[]);function yn(Qr,Vi){xr==null||xr(Qr,Vi),Dn(Qr),Lr==null||Lr(Qr)}var Ui={id:un,activeKey:Jr,animated:Or,tabPosition:xn,rtl:zt,mobile:Nr},ea,ta=Object(M.a)(Object(M.a)({},Ui),{},{editable:$e,locale:or,moreIcon:ur,moreTransitionName:vr,tabBarGutter:xt,onTabClick:yn,onTabScroll:gn,extra:ar,style:Wt,panes:Pe});return cr?ea=cr(ta,Fr):ea=y.createElement(Fr,Object.assign({},ta)),y.createElement(ua.Provider,{value:{tabs:Jt,prefixCls:Ce}},y.createElement("div",Object.assign({ref:Be,id:Me,className:S()(Ce,"".concat(Ce,"-").concat(xn),(Ke={},Object(N.a)(Ke,"".concat(Ce,"-mobile"),Nr),Object(N.a)(Ke,"".concat(Ce,"-editable"),$e),Object(N.a)(Ke,"".concat(Ce,"-rtl"),zt),Ke),ye)},wr),ea,y.createElement(hr,Object.assign({destroyInactiveTabPane:pr},Ui,{animated:Or}))))}var kn=y.forwardRef(In);kn.TabPane=mn;var Bn=kn,Xi=$.b=Bn},kSUc:function(F,$,j){},lOMy:function(F,$,j){},lPiR:function(F,$,j){(function(N,v){F.exports=$=v(j("Ib8C"))})(this,function(N){return function(v){var O=N,M=O.lib,y=M.WordArray,m=M.Hasher,S=O.algo,b=[],p=[];(function(){function l(s){for(var u=v.sqrt(s),a=2;a<=u;a++)if(!(s%a))return!1;return!0}function r(s){return(s-(s|0))*4294967296|0}for(var i=2,o=0;o<64;)l(i)&&(o<8&&(b[o]=r(v.pow(i,1/2))),p[o]=r(v.pow(i,1/3)),o++),i++})();var d=[],t=S.SHA256=m.extend({_doReset:function(){this._hash=new y.init(b.slice(0))},_doProcessBlock:function(l,r){for(var i=this._hash.words,o=i[0],s=i[1],u=i[2],a=i[3],c=i[4],f=i[5],w=i[6],_=i[7],h=0;h<64;h++){if(h<16)d[h]=l[r+h]|0;else{var R=d[h-15],C=(R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3,g=d[h-2],x=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;d[h]=C+d[h-7]+x+d[h-16]}var E=c&f^~c&w,T=o&s^o&u^s&u,k=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),L=(c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25),A=_+L+E+p[h]+d[h],G=k+T;_=w,w=f,f=c,c=a+A|0,a=u,u=s,s=o,o=A+G|0}i[0]=i[0]+o|0,i[1]=i[1]+s|0,i[2]=i[2]+u|0,i[3]=i[3]+a|0,i[4]=i[4]+c|0,i[5]=i[5]+f|0,i[6]=i[6]+w|0,i[7]=i[7]+_|0},_doFinalize:function(){var l=this._data,r=l.words,i=this._nDataBytes*8,o=l.sigBytes*8;return r[o>>>5]|=128<<24-o%32,r[(o+64>>>9<<4)+14]=v.floor(i/4294967296),r[(o+64>>>9<<4)+15]=i,l.sigBytes=r.length*4,this._process(),this._hash},clone:function(){var l=m.clone.call(this);return l._hash=this._hash.clone(),l}});O.SHA256=m._createHelper(t),O.HmacSHA256=m._createHmacHelper(t)}(Math),N.SHA256})},lZu9:function(F,$,j){(function(N){N(j("VrN/"),j("1eCo"),j("8EBN"))})(function(N){"use strict";N.defineMode("markdown",function(v,O){var M=N.getMode(v,"text/html"),y=M.name=="null";function m(U){if(N.findModeByName){var P=N.findModeByName(U);P&&(U=P.mime||P.mimes[0])}var H=N.getMode(v,U);return H.name=="null"?null:H}O.highlightFormatting===void 0&&(O.highlightFormatting=!1),O.maxBlockquoteDepth===void 0&&(O.maxBlockquoteDepth=0),O.taskLists===void 0&&(O.taskLists=!1),O.strikethrough===void 0&&(O.strikethrough=!1),O.emoji===void 0&&(O.emoji=!1),O.fencedCodeBlockHighlighting===void 0&&(O.fencedCodeBlockHighlighting=!0),O.fencedCodeBlockDefaultMode===void 0&&(O.fencedCodeBlockDefaultMode="text/plain"),O.xml===void 0&&(O.xml=!0),O.tokenTypeOverrides===void 0&&(O.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 b in S)S.hasOwnProperty(b)&&O.tokenTypeOverrides[b]&&(S[b]=O.tokenTypeOverrides[b]);var p=/^([*\-_])(?:\s*\1){2,}\s*$/,d=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,t=/^\[(x| )\](?=\s)/i,l=O.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,r=/^ {0,3}(?:\={1,}|-{2,})\s*$/,i=/^[^#!\[\]*_\\<>` "'(~:]+/,o=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,s=/^\s*\[[^\]]+?\]:.*$/,u=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,a=" ";function c(U,P,H){return P.f=P.inline=H,H(U,P)}function f(U,P,H){return P.f=P.block=H,H(U,P)}function w(U){return!U||!/\S/.test(U.string)}function _(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==R){var P=y;if(!P){var H=N.innerMode(M,U.htmlState);P=H.mode.name=="xml"&&H.state.tagStart===null&&!H.state.context&&H.state.tokenize.isInText}P&&(U.f=E,U.block=h,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function h(U,P){var H=U.column()===P.indentation,V=w(P.prevLine.stream),q=P.indentedCode,Z=P.prevLine.hr,ce=P.list!==!1,he=(P.listStack[P.listStack.length-1]||0)+3;P.indentedCode=!1;var ae=P.indentation;if(P.indentationDiff===null&&(P.indentationDiff=P.indentation,ce)){for(P.list=null;ae<P.listStack[P.listStack.length-1];)P.listStack.pop(),P.listStack.length?P.indentation=P.listStack[P.listStack.length-1]:P.list=!1;P.list!==!1&&(P.indentationDiff=ae-P.listStack[P.listStack.length-1])}var xe=!V&&!Z&&!P.prevLine.header&&(!ce||!q)&&!P.prevLine.fencedCodeEnd,ge=(P.list===!1||Z||V)&&P.indentation<=he&&U.match(p),oe=null;if(P.indentationDiff>=4&&(q||P.prevLine.fencedCodeEnd||P.prevLine.header||V))return U.skipToEnd(),P.indentedCode=!0,S.code;if(U.eatSpace())return null;if(H&&P.indentation<=he&&(oe=U.match(l))&&oe[1].length<=6)return P.quote=0,P.header=oe[1].length,P.thisLine.header=!0,O.highlightFormatting&&(P.formatting="header"),P.f=P.inline,g(P);if(P.indentation<=he&&U.eat(">"))return P.quote=H?1:P.quote+1,O.highlightFormatting&&(P.formatting="quote"),U.eatSpace(),g(P);if(!ge&&!P.setext&&H&&P.indentation<=he&&(oe=U.match(d))){var se=oe[1]?"ol":"ul";return P.indentation=ae+U.current().length,P.list=!0,P.quote=0,P.listStack.push(P.indentation),P.em=!1,P.strong=!1,P.code=!1,P.strikethrough=!1,O.taskLists&&U.match(t,!1)&&(P.taskList=!0),P.f=P.inline,O.highlightFormatting&&(P.formatting=["list","list-"+se]),g(P)}else{if(H&&P.indentation<=he&&(oe=U.match(o,!0)))return P.quote=0,P.fencedEndRE=new RegExp(oe[1]+"+ *$"),P.localMode=O.fencedCodeBlockHighlighting&&m(oe[2]||O.fencedCodeBlockDefaultMode),P.localMode&&(P.localState=N.startState(P.localMode)),P.f=P.block=C,O.highlightFormatting&&(P.formatting="code-block"),P.code=-1,g(P);if(P.setext||(!xe||!ce)&&!P.quote&&P.list===!1&&!P.code&&!ge&&!s.test(U.string)&&(oe=U.lookAhead(1))&&(oe=oe.match(r)))return P.setext?(P.header=P.setext,P.setext=0,U.skipToEnd(),O.highlightFormatting&&(P.formatting="header")):(P.header=oe[0].charAt(0)=="="?1:2,P.setext=P.header),P.thisLine.header=!0,P.f=P.inline,g(P);if(ge)return U.skipToEnd(),P.hr=!0,P.thisLine.hr=!0,S.hr;if(U.peek()==="[")return c(U,P,G)}return c(U,P,P.inline)}function R(U,P){var H=M.token(U,P.htmlState);if(!y){var V=N.innerMode(M,P.htmlState);(V.mode.name=="xml"&&V.state.tagStart===null&&!V.state.context&&V.state.tokenize.isInText||P.md_inside&&U.current().indexOf(">")>-1)&&(P.f=E,P.block=h,P.htmlState=null)}return H}function C(U,P){var H=P.listStack[P.listStack.length-1]||0,V=P.indentation<H,q=H+3;if(P.fencedEndRE&&P.indentation<=q&&(V||U.match(P.fencedEndRE))){O.highlightFormatting&&(P.formatting="code-block");var Z;return V||(Z=g(P)),P.localMode=P.localState=null,P.block=h,P.f=E,P.fencedEndRE=null,P.code=0,P.thisLine.fencedCodeEnd=!0,V?f(U,P,P.block):Z}else return P.localMode?P.localMode.token(U,P.localState):(U.skipToEnd(),S.code)}function g(U){var P=[];if(U.formatting){P.push(S.formatting),typeof U.formatting=="string"&&(U.formatting=[U.formatting]);for(var H=0;H<U.formatting.length;H++)P.push(S.formatting+"-"+U.formatting[H]),U.formatting[H]==="header"&&P.push(S.formatting+"-"+U.formatting[H]+"-"+U.header),U.formatting[H]==="quote"&&(!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=U.quote?P.push(S.formatting+"-"+U.formatting[H]+"-"+U.quote):P.push("error"))}if(U.taskOpen)return P.push("meta"),P.length?P.join(" "):null;if(U.taskClosed)return P.push("property"),P.length?P.join(" "):null;if(U.linkHref?P.push(S.linkHref,"url"):(U.strong&&P.push(S.strong),U.em&&P.push(S.em),U.strikethrough&&P.push(S.strikethrough),U.emoji&&P.push(S.emoji),U.linkText&&P.push(S.linkText),U.code&&P.push(S.code),U.image&&P.push(S.image),U.imageAltText&&P.push(S.imageAltText,"link"),U.imageMarker&&P.push(S.imageMarker)),U.header&&P.push(S.header,S.header+"-"+U.header),U.quote&&(P.push(S.quote),!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=U.quote?P.push(S.quote+"-"+U.quote):P.push(S.quote+"-"+O.maxBlockquoteDepth)),U.list!==!1){var V=(U.listStack.length-1)%3;V?V===1?P.push(S.list2):P.push(S.list3):P.push(S.list1)}return U.trailingSpaceNewLine?P.push("trailing-space-new-line"):U.trailingSpace&&P.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),P.length?P.join(" "):null}function x(U,P){return U.match(i,!0)?g(P):void 0}function E(U,P){var H=P.text(U,P);if(typeof H!="undefined")return H;if(P.list)return P.list=null,g(P);if(P.taskList){var V=U.match(t,!0)[1]===" ";return V?P.taskOpen=!0:P.taskClosed=!0,O.highlightFormatting&&(P.formatting="task"),P.taskList=!1,g(P)}if(P.taskOpen=!1,P.taskClosed=!1,P.header&&U.match(/^#+$/,!0))return O.highlightFormatting&&(P.formatting="header"),g(P);var q=U.next();if(P.linkTitle){P.linkTitle=!1;var Z=q;q==="("&&(Z=")"),Z=(Z+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ce="^\\s*(?:[^"+Z+"\\\\]+|\\\\\\\\|\\\\.)"+Z;if(U.match(new RegExp(ce),!0))return S.linkHref}if(q==="`"){var he=P.formatting;O.highlightFormatting&&(P.formatting="code"),U.eatWhile("`");var ae=U.current().length;if(P.code==0&&(!P.quote||ae==1))return P.code=ae,g(P);if(ae==P.code){var xe=g(P);return P.code=0,xe}else return P.formatting=he,g(P)}else if(P.code)return g(P);if(q==="\\"&&(U.next(),O.highlightFormatting)){var ge=g(P),oe=S.formatting+"-escape";return ge?ge+" "+oe:oe}if(q==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return P.imageMarker=!0,P.image=!0,O.highlightFormatting&&(P.formatting="image"),g(P);if(q==="["&&P.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return P.imageMarker=!1,P.imageAltText=!0,O.highlightFormatting&&(P.formatting="image"),g(P);if(q==="]"&&P.imageAltText){O.highlightFormatting&&(P.formatting="image");var ge=g(P);return P.imageAltText=!1,P.image=!1,P.inline=P.f=k,ge}if(q==="["&&!P.image)return P.linkText&&U.match(/^.*?\]/)||(P.linkText=!0,O.highlightFormatting&&(P.formatting="link")),g(P);if(q==="]"&&P.linkText){O.highlightFormatting&&(P.formatting="link");var ge=g(P);return P.linkText=!1,P.inline=P.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?k:E,ge}if(q==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){P.f=P.inline=T,O.highlightFormatting&&(P.formatting="link");var ge=g(P);return ge?ge+=" ":ge="",ge+S.linkInline}if(q==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){P.f=P.inline=T,O.highlightFormatting&&(P.formatting="link");var ge=g(P);return ge?ge+=" ":ge="",ge+S.linkEmail}if(O.xml&&q==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var se=U.string.indexOf(">",U.pos);if(se!=-1){var te=U.string.substring(U.start,se);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(te)&&(P.md_inside=!0)}return U.backUp(1),P.htmlState=N.startState(M),f(U,P,R)}if(O.xml&&q==="<"&&U.match(/^\/\w*?>/))return P.md_inside=!1,"tag";if(q==="*"||q==="_"){for(var be=1,ee=U.pos==1?" ":U.string.charAt(U.pos-2);be<3&&U.eat(q);)be++;var ie=U.peek()||" ",Ee=!/\s/.test(ie)&&(!u.test(ie)||/\s/.test(ee)||u.test(ee)),ne=!/\s/.test(ee)&&(!u.test(ee)||/\s/.test(ie)||u.test(ie)),J=null,X=null;if(be%2&&(!P.em&&Ee&&(q==="*"||!ne||u.test(ee))?J=!0:P.em==q&&ne&&(q==="*"||!Ee||u.test(ie))&&(J=!1)),be>1&&(!P.strong&&Ee&&(q==="*"||!ne||u.test(ee))?X=!0:P.strong==q&&ne&&(q==="*"||!Ee||u.test(ie))&&(X=!1)),X!=null||J!=null){O.highlightFormatting&&(P.formatting=J==null?"strong":X==null?"em":"strong em"),J===!0&&(P.em=q),X===!0&&(P.strong=q);var xe=g(P);return J===!1&&(P.em=!1),X===!1&&(P.strong=!1),xe}}else if(q===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return g(P);U.backUp(1)}if(O.strikethrough){if(q==="~"&&U.eatWhile(q)){if(P.strikethrough){O.highlightFormatting&&(P.formatting="strikethrough");var xe=g(P);return P.strikethrough=!1,xe}else if(U.match(/^[^\s]/,!1))return P.strikethrough=!0,O.highlightFormatting&&(P.formatting="strikethrough"),g(P)}else if(q===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return g(P);U.backUp(2)}}if(O.emoji&&q===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){P.emoji=!0,O.highlightFormatting&&(P.formatting="emoji");var Q=g(P);return P.emoji=!1,Q}return q===" "&&(U.match(/^ +$/,!1)?P.trailingSpace++:P.trailingSpace&&(P.trailingSpaceNewLine=!0)),g(P)}function T(U,P){var H=U.next();if(H===">"){P.f=P.inline=E,O.highlightFormatting&&(P.formatting="link");var V=g(P);return V?V+=" ":V="",V+S.linkInline}return U.match(/^[^>]+/,!0),S.linkInline}function k(U,P){if(U.eatSpace())return null;var H=U.next();return H==="("||H==="["?(P.f=P.inline=A(H==="("?")":"]"),O.highlightFormatting&&(P.formatting="link-string"),P.linkHref=!0,g(P)):"error"}var L={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function A(U){return function(P,H){var V=P.next();if(V===U){H.f=H.inline=E,O.highlightFormatting&&(H.formatting="link-string");var q=g(H);return H.linkHref=!1,q}return P.match(L[U]),H.linkHref=!0,g(H)}}function G(U,P){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(P.f=K,U.next(),O.highlightFormatting&&(P.formatting="link"),P.linkText=!0,g(P)):c(U,P,E)}function K(U,P){if(U.match(/^\]:/,!0)){P.f=P.inline=W,O.highlightFormatting&&(P.formatting="link");var H=g(P);return P.linkText=!1,H}return U.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function W(U,P){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?P.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),P.f=P.inline=E,S.linkHref+" url")}var z={startState:function(){return{f:h,prevLine:{stream:null},thisLine:{stream:null},block:h,htmlState:null,indentation:0,inline:E,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(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&N.copyState(M,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?N.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,P){if(P.formatting=!1,U!=P.thisLine.stream){if(P.header=0,P.hr=!1,U.match(/^\s*$/,!0))return _(P),null;if(P.prevLine=P.thisLine,P.thisLine={stream:U},P.taskList=!1,P.trailingSpace=0,P.trailingSpaceNewLine=!1,!P.localState&&(P.f=P.block,P.f!=R)){var H=U.match(/^\s*/,!0)[0].replace(/\t/g,a).length;if(P.indentation=H,P.indentationDiff=null,H>0)return null}}return P.f(U,P)},innerMode:function(U){return U.block==R?{state:U.htmlState,mode:M}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:z}},indent:function(U,P,H){return U.block==R&&M.indent?M.indent(U.htmlState,P,H):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,P,H):N.Pass},blankLine:_,getType:g,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return z},"xml"),N.defineMIME("text/markdown","markdown"),N.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(F){if(!0)module.exports=F();else var $})(function(){var define,module,exports;return function(){function F($,j,N){function v(y,m){if(!j[y]){if(!$[y]){var S=typeof require=="function"&&require;if(!m&&S)return require(y,!0);if(O)return O(y,!0);var b=new Error("Cannot find module '"+y+"'");throw b.code="MODULE_NOT_FOUND",b}var p=j[y]={exports:{}};$[y][0].call(p.exports,function(d){var t=$[y][1][d];return v(t||d)},p,p.exports,F,$,j,N)}return j[y].exports}for(var O=typeof require=="function"&&require,M=0;M<N.length;M++)v(N[M]);return v}return F}()({1:[function(F,$,j){"use strict";var N=F("./browser/client");N.Buffer=F("buffer").Buffer,N.urllib=F("../shims/xhr"),N.version=F("./browser/version").version,$.exports=N},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(F,$,j){(function(N,v){"use strict";var O=F("babel-runtime/core-js/promise"),M=p(O),y=F("babel-runtime/regenerator"),m=p(y),S=F("babel-runtime/core-js/object/assign"),b=p(S);function p(G){return G&&G.__esModule?G:{default:G}}var d=F("debug")("ali-oss"),t=F("copy-to"),l=F("xml2js"),r=F("agentkeepalive"),i=F("merge-descriptors"),o=F("url"),s=F("is-type-of"),u=F("platform"),a=F("utility"),c=F("urllib"),f=F("./version"),w=F("bowser"),_=F("../common/signUtils"),h=F("../common/utils/isIP"),R=h.isIP,C=F("../common/client/initOptions"),g=F("../common/utils/createRequest"),x=g.createRequest,E=new r;function T(){var G=u.name,K=u.version;G&&G.toLowerCase&&G.toLowerCase()==="ie"&&K.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function k(){return location&&location.protocol==="https:"}function L(G,K){if(T(),!(this instanceof L))return new L(G,K);G&&G.inited?this.options=G:this.options=L.initOptions(G),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=c,this.agent=this.options.agent||E),this.ctx=K,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}$.exports=L,L.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 W=(0,b.default)({secure:k(),useFetch:!1},K);return C(W)};var A=L.prototype;A.debug=d,i(A,F("./object")),i(A,F("../common/bucket/getBucketWebsite")),i(A,F("../common/bucket/putBucketWebsite")),i(A,F("../common/bucket/deleteBucketWebsite")),i(A,F("../common/bucket/getBucketLifecycle")),i(A,F("../common/bucket/putBucketLifecycle")),i(A,F("../common/bucket/deleteBucketLifecycle")),i(A,F("../common/bucket/putBucketVersioning")),i(A,F("../common/bucket/getBucketVersioning")),i(A,F("./managed-upload")),i(A,F("../common/multipart")),i(A,F("../common/parallel")),A.signature=function(K){return this.debug("authorization stringToSign: %s",K,"info"),_.computeSignature(this.options.accessKeySecret,K)},A.authorization=function(K,W,z,U){var P=_.buildCanonicalString(K.toUpperCase(),W,{headers:U,parameters:z});return _.authorization(this.options.accessKeyId,this.options.accessKeySecret,P)},A.request=function(K){var W,z,U,P,H,V;return m.default.async(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return W=x.call(this,K),this.options.useFetch||(W.params.mode="disable-fetch"),z=void 0,U=void 0,P=!!K.stream,Z.prev=5,Z.next=8,m.default.awrap(this.urllib.request(W.url,W.params));case 8:z=Z.sent,this.debug("response %s %s, got %s, headers: %j",K.method,W.url,z.status,z.headers,"info"),Z.next=15;break;case 12:Z.prev=12,Z.t0=Z.catch(5),U=Z.t0;case 15:if(H=void 0,!(z&&K.successStatuses&&K.successStatuses.indexOf(z.status)===-1)){Z.next=28;break}return Z.next=19,m.default.awrap(this.requestError(z));case 19:if(H=Z.sent,!(H.code==="RequestTimeTooSkewed"&&!P)){Z.next=25;break}return this.options.amendTimeSkewed=+new Date(H.serverTime)-new Date,Z.next=24,m.default.awrap(this.request(K));case 24:return Z.abrupt("return",Z.sent);case 25:H.params=K,Z.next=32;break;case 28:if(!U){Z.next=32;break}return Z.next=31,m.default.awrap(this.requestError(U));case 31:H=Z.sent;case 32:if(!H){Z.next=34;break}throw H;case 34:if(!K.xmlResponse){Z.next=39;break}return Z.next=37,m.default.awrap(this.parseXML(z.data));case 37:V=Z.sent,z.data=V;case 39:return Z.abrupt("return",z);case 40:case"end":return Z.stop()}},null,this,[[5,12]])},A._getResource=function(K){var W="/";return K.bucket&&(W+=K.bucket+"/"),K.object&&(W+=K.object),W},A._isIP=R,A._escape=function(K){return a.encodeURIComponent(K).replace(/%2F/g,"/")},A._getReqUrl=function(K){var W={};t(this.options.endpoint).to(W);var z=this._isIP(W.hostname),U=this.options.cname;K.bucket&&!U&&!z&&(W.host=K.bucket+"."+W.host);var P="/";K.bucket&&z&&(P+=K.bucket+"/"),K.object&&(P+=this._escape(K.object).replace(/\+/g,"%2B")),W.pathname=P;var H={};if(K.query&&i(H,K.query),K.subres){var V={};s.string(K.subres)?V[K.subres]="":s.array(K.subres)?K.subres.forEach(function(q){V[q]=""}):V=K.subres,i(H,V)}return W.query=H,o.format(W)},A._getUserAgent=function(){var K=v&&v.browser?"js":"nodejs",W="aliyun-sdk-"+K+"/"+f.version,z=u.description;return!z&&v&&(z="Node.js "+v.version.slice(1)+" on "+v.platform+" "+v.arch),this._checkUserAgent(W+" "+z)},A._checkUserAgent=function(K){var W=K.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return W},A.checkBrowserAndVersion=function(K,W){return w.name===K&&w.version.split(".")[0]===W},A.parseXML=function(K){return new M.default(function(W,z){N.isBuffer(K)&&(K=K.toString()),l.parseString(K,{explicitRoot:!1,explicitArray:!1},function(U,P){U?z(U):W(P)})})},A.requestError=function(K){var W,z,U,P;return m.default.async(function(V){for(;;)switch(V.prev=V.next){case 0:if(W=null,!(!K.data||!K.data.length)){V.next=5;break}K.status===-1||K.status===-2?(W=new Error(K.message),W.name=K.name,W.status=K.status,W.code=K.name):(K.status===404?(W=new Error("Object not exists"),W.name="NoSuchKeyError",W.status=404,W.code="NoSuchKey"):K.status===412?(W=new Error("Pre condition failed"),W.name="PreconditionFailedError",W.status=412,W.code="PreconditionFailed"):(W=new Error("Unknow error, status: "+K.status),W.name="UnknowError",W.status=K.status),W.requestId=K.headers["x-oss-request-id"],W.host=""),V.next=33;break;case 5:return z=String(K.data),this.debug("request response error data: %s",z,"error"),U=void 0,V.prev=8,V.next=11,m.default.awrap(this.parseXML(z));case 11:if(V.t0=V.sent,V.t0){V.next=14;break}V.t0={};case 14:U=V.t0,V.next=24;break;case 17:return V.prev=17,V.t1=V.catch(8),this.debug(z,"error"),V.t1.message+=`
raw xml: `+z,V.t1.status=K.status,V.t1.requestId=K.headers["x-oss-request-id"],V.abrupt("return",V.t1);case 24:P=U.Message||"unknow request error, status: "+K.status,U.Condition&&(P+=" (condition: "+U.Condition+")"),W=new Error(P),W.name=U.Code?U.Code+"Error":"UnknowError",W.status=K.status,W.code=U.Code,W.requestId=U.RequestId,W.hostId=U.HostId,W.serverTime=U.ServerTime;case 33:return this.debug("generate error %j",W,"error"),V.abrupt("return",W);case 35:case"end":return V.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:F("../../node_modules/is-buffer/index.js")},F("_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(F,$,j){(function(N){"use strict";var v=F("babel-runtime/core-js/array/from"),O=b(v),M=F("babel-runtime/core-js/promise"),y=b(M),m=F("babel-runtime/regenerator"),S=b(m);function b(_){return _&&_.__esModule?_:{default:_}}var p=F("is-type-of"),d=F("util"),t=F("path"),l=F("mime"),r=F("copy-to"),i=F("../common/utils/isBlob"),o=i.isBlob,s=F("../common/utils/isFile"),u=s.isFile,a=j;a.multipartUpload=function(h,R,C){var g,x,E,T,k,L,A,G,K;return S.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:if(this.resetCancelFlag(),C=C||{},!(C.checkpoint&&C.checkpoint.uploadId)){z.next=6;break}return z.next=5,S.default.awrap(this._resumeMultipart(C.checkpoint,C));case 5:return z.abrupt("return",z.sent);case 6:return g=100*1024,C.mime||(u(R)?C.mime=l.getType(t.extname(R.name)):o(R)?C.mime=R.type:C.mime=l.getType(t.extname(R))),C.headers=C.headers||{},this._convertMetaToHeaders(C.meta,C.headers),z.next=12,S.default.awrap(this._getFileSize(R));case 12:if(x=z.sent,!(x<g)){z.next=25;break}return E=this._createStream(R,0,x),C.contentLength=x,z.next=18,S.default.awrap(this.putStream(h,E,C));case 18:if(T=z.sent,!(C&&C.progress)){z.next=22;break}return z.next=22,S.default.awrap(C.progress(1));case 22:return k={res:T.res,bucket:this.options.bucket,name:h,etag:T.res.headers.etag},(C.headers&&C.headers["x-oss-callback"]||C.callback)&&(k.data=T.data),z.abrupt("return",k);case 25:if(!(C.partSize&&!(parseInt(C.partSize,10)===C.partSize))){z.next=27;break}throw new Error("partSize must be int number");case 27:if(!(C.partSize&&C.partSize<g)){z.next=29;break}throw new Error("partSize must not be smaller than "+g);case 29:return z.next=31,S.default.awrap(this.initMultipartUpload(h,C));case 31:if(L=z.sent,A=L.uploadId,G=this._getPartSize(x,C.partSize),K={file:R,name:h,fileSize:x,partSize:G,uploadId:A,doneParts:[]},!(C&&C.progress)){z.next=38;break}return z.next=38,S.default.awrap(C.progress(0,K,L.res));case 38:return z.next=40,S.default.awrap(this._resumeMultipart(K,C));case 40:return z.abrupt("return",z.sent);case 41:case"end":return z.stop()}},null,this)},a._resumeMultipart=function(h,R){var C,g,x,E,T,k,L,A,G,K,W,z,U,P,H,V,q,Z;return S.default.async(function(he){for(;;)switch(he.prev=he.next){case 0:if(C=this,!this.isCancel()){he.next=3;break}throw this._makeCancelEvent();case 3:return g=h.file,x=h.fileSize,E=h.partSize,T=h.uploadId,k=h.doneParts,L=h.name,A=[],k.length>0&&r(k).to(A),G=this._divideParts(x,E),K=G.length,W=!1,z=function(xe,ge){var oe=this;return new y.default(function(te,be){var ee,ie,Ee,ne;return S.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(X.prev=0,xe.isCancel()){X.next=18;break}return ee=G[ge-1],ie={stream:xe._createStream(g,ee.start,ee.end),size:ee.end-ee.start},X.next=6,S.default.awrap(xe._uploadPart(L,T,ge,ie));case 6:if(Ee=X.sent,!(!xe.isCancel()&&!W)){X.next=15;break}if(h.doneParts.push({number:ge,etag:Ee.res.headers.etag}),!R.progress){X.next=12;break}return X.next=12,S.default.awrap(R.progress(k.length/K,h,Ee.res));case 12:te({number:ge,etag:Ee.res.headers.etag}),X.next=16;break;case 15:te();case 16:X.next=19;break;case 18:te();case 19:X.next=30;break;case 21:X.prev=21,X.t0=X.catch(0),ne=new Error,ne.name=X.t0.name,ne.message=X.t0.message,ne.stack=X.t0.stack,ne.partNum=ge,r(X.t0).to(ne),be(ne);case 30:case"end":return X.stop()}},null,oe,[[0,21]])})},U=(0,O.default)(new Array(K),function(ae,xe){return xe+1}),P=A.map(function(ae){return ae.number}),H=U.filter(function(ae){return P.indexOf(ae)<0}),V=5,q=R.parallel||V,he.next=17,S.default.awrap(this._parallel(H,q,function(ae){return new y.default(function(xe,ge){z(C,ae).then(function(oe){oe&&A.push(oe),xe()}).catch(function(oe){ge(oe)})})}));case 17:if(Z=he.sent,W=!0,!this.isCancel()){he.next=22;break}throw z=null,this._makeCancelEvent();case 22:if(!(Z&&Z.length>0)){he.next=25;break}throw Z[0].message="Failed to upload some parts with error: "+Z[0].toString()+" part_num: "+Z[0].partNum,Z[0];case 25:return he.next=27,S.default.awrap(this.completeMultipartUpload(L,T,A,R));case 27:return he.abrupt("return",he.sent);case 28:case"end":return he.stop()}},null,this)},a._getFileSize=function(h){return S.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(!p.buffer(h)){C.next=4;break}return C.abrupt("return",h.length);case 4:if(!(o(h)||u(h))){C.next=6;break}return C.abrupt("return",h.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return C.stop()}},null,this)};var c=F("stream"),f=c.Readable;function w(_,h){if(!(this instanceof w))return new w(_,h);f.call(this,h),this.file=_,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}d.inherits(w,f),w.prototype.readFileAndPush=function(h){if(this.fileBuffer)for(var R=!0;R&&this.fileBuffer&&this.start<this.fileBuffer.length;){var C=this.start,g=C+h;g=g>this.fileBuffer.length?this.fileBuffer.length:g,this.start=g,R=this.push(this.fileBuffer.slice(C,g))}},w.prototype._read=function(h){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 R=16*1024;h=h||R;var C=this;this.reader.onload=function(x){C.fileBuffer=N.from(new Uint8Array(x.target.result)),C.file=null,C.readFileAndPush(h)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(h)},a._createStream=function(h,R,C){if(o(h)||u(h))return new w(h.slice(R,C));throw new Error("_createStream requires File/Blob.")},a._getPartSize=function(h,R){var C=10*1e3,g=1024*1024;return R?Math.max(Math.ceil(h/C),R):g},a._divideParts=function(h,R){for(var C=Math.ceil(h/R),g=[],x=0;x<C;x++){var E=R*x,T=Math.min(E+R,h);g.push({start:E,end:T})}return g}}).call(this,F("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(F,$,j){"use strict";var N=F("babel-runtime/core-js/promise"),v=p(N),O=F("babel-runtime/core-js/object/keys"),M=p(O),y=F("babel-runtime/core-js/object/assign"),m=p(y),S=F("babel-runtime/regenerator"),b=p(S);function p(C){return C&&C.__esModule?C:{default:C}}var d=F("utility"),t=F("fs"),l=F("is-type-of"),r=F("url"),i=F("copy-to"),o=F("path"),s=F("mime"),u=F("../common/callback"),a=F("../common/signUtils"),c=F("merge-descriptors"),f=F("../common/utils/isBlob"),w=f.isBlob,_=F("../common/utils/isFile"),h=_.isFile,R=j;R.append=function(g,x,E){var T;return b.default.async(function(L){for(;;)switch(L.prev=L.next){case 0:return E=E||{},E.position===void 0&&(E.position="0"),E.subres={append:"",position:E.position},E.method="POST",L.next=6,b.default.awrap(this.put(g,x,E));case 6:return T=L.sent,T.nextAppendPosition=T.res.headers["x-oss-next-append-position"],L.abrupt("return",T);case 9:case"end":return L.stop()}},null,this)},R.put=function(g,x,E){var T,k,L,A,G,K,W;return b.default.async(function(U){for(;;)switch(U.prev=U.next){case 0:if(T=void 0,E=E||{},g=this._objectName(g),!l.buffer(x)){U.next=7;break}T=x,U.next=33;break;case 7:if(!(w(x)||h(x))){U.next=32;break}return E.mime||(h(x)?E.mime=s.getType(o.extname(x.name)):E.mime=x.type),k=this._createStream(x,0,x.size),U.next=12,b.default.awrap(this._getFileSize(x));case 12:return E.contentLength=U.sent,U.prev=13,U.next=16,b.default.awrap(this.putStream(g,k,E));case 16:return L=U.sent,U.abrupt("return",L);case 20:if(U.prev=20,U.t0=U.catch(13),!(U.t0.code==="RequestTimeTooSkewed")){U.next=29;break}return this.options.amendTimeSkewed=+new Date(U.t0.serverTime)-new Date,U.next=26,b.default.awrap(this.put(g,x,E));case 26:return U.abrupt("return",U.sent);case 29:throw U.t0;case 30:U.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return E.headers=E.headers||{},this._convertMetaToHeaders(E.meta,E.headers),A=E.method||"PUT",G=this._objectRequestParams(A,g,E),u.encodeCallback(G,E),G.mime=E.mime,G.content=T,G.successStatuses=[200],U.next=43,b.default.awrap(this.request(G));case 43:return K=U.sent,W={name:g,url:this._objectUrl(g),res:K.res},G.headers&&G.headers["x-oss-callback"]&&(W.data=JSON.parse(K.data.toString())),U.abrupt("return",W);case 47:case"end":return U.stop()}},null,this,[[13,20]])},R.putStream=function(g,x,E){var T,k,L,A;return b.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:return E=E||{},E.headers=E.headers||{},g=this._objectName(g),E.contentLength?E.headers["Content-Length"]=E.contentLength:E.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(E.meta,E.headers),T=E.method||"PUT",k=this._objectRequestParams(T,g,E),u.encodeCallback(k,E),k.mime=E.mime,k.stream=x,k.successStatuses=[200],K.next=13,b.default.awrap(this.request(k));case 13:return L=K.sent,A={name:g,url:this._objectUrl(g),res:L.res},k.headers&&k.headers["x-oss-callback"]&&(A.data=JSON.parse(L.data.toString())),K.abrupt("return",A);case 17:case"end":return K.stop()}},null,this)},c(R,F("../common/object/copyObject")),c(R,F("../common/object/getObjectTagging")),c(R,F("../common/object/putObjectTagging")),c(R,F("../common/object/deleteObjectTagging")),c(R,F("../common/image")),c(R,F("../common/object/getBucketVersions")),c(R,F("../common/object/getACL")),c(R,F("../common/object/putACL")),c(R,F("../common/object/head")),c(R,F("../common/object/delete")),c(R,F("../common/object/get")),c(R,F("../common/object/putSymlink")),c(R,F("../common/object/getSymlink")),c(R,F("../common/object/deleteMulti")),c(R,F("../common/object/getObjectMeta")),R.putMeta=function(g,x,E){var T;return b.default.async(function(L){for(;;)switch(L.prev=L.next){case 0:return L.next=2,b.default.awrap(this.copy(g,g,{meta:x||{},timeout:E&&E.timeout,ctx:E&&E.ctx}));case 2:return T=L.sent,L.abrupt("return",T);case 4:case"end":return L.stop()}},null,this)},R.list=function(g,x){var E,T,k,L,A;return b.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:return E=this._objectRequestParams("GET","",x),E.query=g,E.xmlResponse=!0,E.successStatuses=[200],K.next=6,b.default.awrap(this.request(E));case 6:return T=K.sent,k=T.data.Contents,L=this,k&&(Array.isArray(k)||(k=[k]),k=k.map(function(W){return{name:W.Key,url:L._objectUrl(W.Key),lastModified:W.LastModified,etag:W.ETag,type:W.Type,size:Number(W.Size),storageClass:W.StorageClass,owner:{id:W.Owner.ID,displayName:W.Owner.DisplayName}}})),A=T.data.CommonPrefixes||null,A&&(Array.isArray(A)||(A=[A]),A=A.map(function(W){return W.Prefix})),K.abrupt("return",{res:T.res,objects:k,prefixes:A,nextMarker:T.data.NextMarker||null,isTruncated:T.data.IsTruncated==="true"});case 13:case"end":return K.stop()}},null,this)},R.restore=function(g,x){var E,T;return b.default.async(function(L){for(;;)switch(L.prev=L.next){case 0:return x=x||{},x.subres=(0,m.default)({restore:""},x.subres),x.versionId&&(x.subres.versionId=x.versionId),E=this._objectRequestParams("POST",g,x),E.successStatuses=[202],L.next=7,b.default.awrap(this.request(E));case 7:return T=L.sent,L.abrupt("return",{res:T.res});case 9:case"end":return L.stop()}},null,this)},R.signatureUrl=function(g,x){x=x||{},g=this._objectName(g),x.method=x.method||"GET";var E=d.timestamp()+(x.expires||1800),T={bucket:this.options.bucket,object:g},k=this._getResource(T);this.options.stsToken&&(x["security-token"]=this.options.stsToken);var L=a._signatureForURL(this.options.accessKeySecret,x,k,E),A=r.parse(this._getReqUrl(T));return A.query={OSSAccessKeyId:this.options.accessKeyId,Expires:E,Signature:L.Signature},i(L.subResource).to(A.query),A.format()},R.getObjectUrl=function(g,x){return x?x[x.length-1]!=="/"&&(x+="/"):x=this.options.endpoint.format(),x+this._escape(this._objectName(g))},R._objectUrl=function(g){return this._getReqUrl({bucket:this.options.bucket,object:g})},R.generateObjectUrl=function(C,g){if(g)g[g.length-1]!=="/"&&(g+="/");else{g=this.options.endpoint.format();var x=r.parse(g),E=this.options.bucket;x.hostname=E+"."+x.hostname,x.host=E+"."+x.host,g=x.format()}return g+this._escape(this._objectName(C))},R._objectRequestParams=function(g,x,E){if(!this.options.bucket)throw new Error("Please create a bucket first");E=E||{},x=this._objectName(x);var T={object:x,bucket:this.options.bucket,method:g,subres:E&&E.subres,timeout:E&&E.timeout,ctx:E&&E.ctx};return E.headers&&(T.headers={},i(E.headers).to(T.headers)),T},R._objectName=function(g){return g.replace(/^\/+/,"")},R._convertMetaToHeaders=function(g,x){if(!g)return;(0,M.default)(g).forEach(function(E){x["x-oss-meta-"+E]=g[E]})},R._deleteFileSafe=function(g){var x=this;return new v.default(function(E){t.exists(g,function(T){T?t.unlink(g,function(k){k&&x.debug("unlink %j error: %s",g,k,"error"),E()}):E()})})}},{"../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(F,$,j){"use strict";j.version="6.10.0"},{}],6:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=O(N);function O(S){return S&&S.__esModule?S:{default:S}}var M=F("../utils/checkBucketName"),y=M.checkBucketName,m=j;m.deleteBucketLifecycle=function(b,p){var d,t;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return y(b),d=this._bucketRequestParams("DELETE",b,"lifecycle",p),d.successStatuses=[204],r.next=5,v.default.awrap(this.request(d));case 5:return t=r.sent,r.abrupt("return",{res:t.res});case 7:case"end":return r.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=O(N);function O(S){return S&&S.__esModule?S:{default:S}}var M=F("../utils/checkBucketName"),y=M.checkBucketName,m=j;m.deleteBucketWebsite=function(b,p){var d,t;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return y(b),d=this._bucketRequestParams("DELETE",b,"website",p),d.successStatuses=[204],r.next=5,v.default.awrap(this.request(d));case 5:return t=r.sent,r.abrupt("return",{res:t.res});case 7:case"end":return r.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=O(N);function O(t){return t&&t.__esModule?t:{default:t}}var M=F("../utils/checkBucketName"),y=M.checkBucketName,m=F("../utils/isArray"),S=m.isArray,b=F("../utils/formatObjKey"),p=b.formatObjKey,d=j;d.getBucketLifecycle=function(l,r){var i,o,s;return v.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return y(l),i=this._bucketRequestParams("GET",l,"lifecycle",r),i.successStatuses=[200],i.xmlResponse=!0,a.next=6,v.default.awrap(this.request(i));case 6:return o=a.sent,s=o.data.Rule||null,s&&(S(s)||(s=[s]),s=s.map(function(c){return c.ID&&(c.id=c.ID,delete c.ID),c.Tag&&!S(c.Tag)&&(c.Tag=[c.Tag]),p(c,"firstLowerCase")})),a.abrupt("return",{rules:s,res:o.res});case 10:case"end":return a.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=O(N);function O(S){return S&&S.__esModule?S:{default:S}}var M=F("../utils/checkBucketName"),y=M.checkBucketName,m=j;m.getBucketVersioning=function(b,p){var d,t,l;return v.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return y(b),d=this._bucketRequestParams("GET",b,"versioning",p),d.xmlResponse=!0,d.successStatuses=[200],i.next=6,v.default.awrap(this.request(d));case 6:return t=i.sent,l=t.data.Status,i.abrupt("return",{status:t.status,versionStatus:l,res:t.res});case 9:case"end":return i.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=O(N);function O(p){return p&&p.__esModule?p:{default:p}}var M=F("../utils/checkBucketName"),y=M.checkBucketName,m=F("../utils/isObject"),S=m.isObject,b=j;b.getBucketWebsite=function(d,t){var l,r,i;return v.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return y(d),l=this._bucketRequestParams("GET",d,"website",t),l.successStatuses=[200],l.xmlResponse=!0,s.next=6,v.default.awrap(this.request(l));case 6:return r=s.sent,i=[],r.data.RoutingRules&&r.data.RoutingRules.RoutingRule&&(S(r.data.RoutingRules.RoutingRule)?i=[r.data.RoutingRules.RoutingRule]:i=r.data.RoutingRules.RoutingRule),s.abrupt("return",{index:r.data.IndexDocument&&r.data.IndexDocument.Suffix||"",supportSubDir:r.data.IndexDocument&&r.data.IndexDocument.SupportSubDir||"false",type:r.data.IndexDocument&&r.data.IndexDocument.Type,routingRules:i,error:r.data.ErrorDocument&&r.data.ErrorDocument.Key||null,res:r.res});case 10:case"end":return s.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=O(N);function O(h){return h&&h.__esModule?h:{default:h}}var M=F("../utils/checkBucketName"),y=M.checkBucketName,m=F("../utils/isArray"),S=m.isArray,b=F("../utils/deepCopy"),p=b.deepCopy,d=F("../utils/isObject"),t=d.isObject,l=F("../utils/obj2xml"),r=l.obj2xml,i=F("../utils/checkObjectTag"),o=i.checkObjectTag,s=F("../utils/getStrBytesCount"),u=s.getStrBytesCount,a=j;a.putBucketLifecycle=function(R,C,g){var x,E,T,k,L;return v.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:if(y(R),S(C)){G.next=3;break}throw new Error("rules must be Array");case 3:return x=this._bucketRequestParams("PUT",R,"lifecycle",g),E=[],T={LifecycleConfiguration:{Rule:E}},C.forEach(function(K){c(K),_(K),K.id&&(K.ID=K.id,delete K.id),E.push(K)}),k=r(T,{headers:!0,firstUpperCase:!0}),x.content=k,x.mime="xml",x.successStatuses=[200],G.next=13,v.default.awrap(this.request(x));case 13:return L=G.sent,G.abrupt("return",{res:L.res});case 15:case"end":return G.stop()}},null,this)};function c(h){h.days&&(h.expiration={days:h.days}),h.date&&(h.expiration={createdBeforeDate:h.date})}function f(h,R){var C=h.days,g=h.createdBeforeDate;if(!C&&!g)throw new Error(R+" must includes days or createdBeforeDate");if(C&&!/^[1-9][0-9]*$/.test(C))throw new Error("days must be a positive integer");if(g&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(g))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function w(h){if(!S(h)&&!t(h))throw new Error("tag must be Object or Array");h=t(h)?[h]:h;var R={},C=p(h);C.forEach(function(g){R[g.key]=g.value}),o(R)}function _(h){if(h.id&&u(h.id)>255)throw new Error("ID is composed of 255 bytes at most");if(h.prefix===""||h.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(h.status))throw new Error("Status must be Enabled or Disabled");if(h.transition){if(!["IA","Archive"].includes(h.transition.storageClass))throw new Error("StorageClass must be IA or Archive");f(h.transition,"Transition")}if(h.expiration){if(!h.expiration.expiredObjectDeleteMarker)f(h.expiration,"Expiration");else if(h.expiration.days||h.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(h.abortMultipartUpload&&f(h.abortMultipartUpload,"AbortMultipartUpload"),!h.expiration&&!h.abortMultipartUpload&&!h.transition&&!h.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(h.tag){if(h.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");w(h.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(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=O(N);function O(p){return p&&p.__esModule?p:{default:p}}var M=F("../utils/checkBucketName"),y=M.checkBucketName,m=F("../utils/obj2xml"),S=m.obj2xml,b=j;b.putBucketVersioning=function(d,t){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,o;return v.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:if(y(d),["Enabled","Suspended"].includes(t)){u.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return r=this._bucketRequestParams("PUT",d,"versioning",l),i={VersioningConfiguration:{Status:t}},r.mime="xml",r.content=S(i,{headers:!0}),u.next=9,v.default.awrap(this.request(r));case 9:return o=u.sent,u.abrupt("return",{res:o.res,status:o.status});case 11:case"end":return u.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=O(N);function O(t){return t&&t.__esModule?t:{default:t}}var M=F("../utils/checkBucketName"),y=M.checkBucketName,m=F("../utils/obj2xml"),S=m.obj2xml,b=F("../utils/isArray"),p=b.isArray,d=j;d.putBucketWebsite=function(l){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments[2],o,s,u,a,c;return v.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:if(y(l),o=this._bucketRequestParams("PUT",l,"website",i),s={Suffix:r.index||"index.html"},u={IndexDocument:s},a={WebsiteConfiguration:u},r.supportSubDir&&(s.SupportSubDir=r.supportSubDir),r.type&&(s.Type=r.type),r.error&&(u.ErrorDocument={Key:r.error}),!(r.routingRules!==void 0)){w.next=12;break}if(p(r.routingRules)){w.next=11;break}throw new Error("RoutingRules must be Array");case 11:u.RoutingRules={RoutingRule:r.routingRules};case 12:return a=S(a),o.content=a,o.mime="xml",o.successStatuses=[200],w.next=18,v.default.awrap(this.request(o));case 18:return c=w.sent,w.abrupt("return",{res:c.res});case 20:case"end":return w.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(F,$,j){(function(N){"use strict";var v=F("babel-runtime/core-js/object/keys"),O=m(v),M=F("babel-runtime/core-js/json/stringify"),y=m(M);function m(S){return S&&S.__esModule?S:{default:S}}j.encodeCallback=function(b,p){if(b.headers=b.headers||{},!Object.prototype.hasOwnProperty.call(b.headers,"x-oss-callback")&&p.callback){var d={callbackUrl:encodeURI(p.callback.url),callbackBody:p.callback.body};p.callback.host&&(d.callbackHost=p.callback.host),p.callback.contentType&&(d.callbackBodyType=p.callback.contentType);var t=N.from((0,y.default)(d)).toString("base64");if(b.headers["x-oss-callback"]=t,p.callback.customValue){var l={};(0,O.default)(p.callback.customValue).forEach(function(r){l["x:"+r]=p.callback.customValue[r]}),b.headers["x-oss-callback-var"]=N.from((0,y.default)(l)).toString("base64")}}}}).call(this,F("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/assign"),v=O(N);function O(d){return d&&d.__esModule?d:{default:d}}var M=F("humanize-ms"),y=F("url"),m=F("../utils/checkBucketName"),S=m.checkBucketName;function b(d,t){var l=y.parse(d);if(l.protocol||(l=y.parse("http"+(t?"s":"")+"://"+d)),l.protocol!=="http:"&&l.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return l}function p(d,t,l){var r=l?"https://":"http://",i=t?"-internal.aliyuncs.com":".aliyuncs.com",o="vpc100-oss-cn-";return d.substr(0,o.length)===o&&(i=".aliyuncs.com"),y.parse(r+d+i)}$.exports=function(d){if(!d||!d.accessKeyId||!d.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");d.bucket&&S(d.bucket);var t=(0,v.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},d);if(t.accessKeyId=t.accessKeyId.trim(),t.accessKeySecret=t.accessKeySecret.trim(),t.timeout&&(t.timeout=M(t.timeout)),t.endpoint)t.endpoint=b(t.endpoint,t.secure);else if(t.region)t.endpoint=p(t.region,t.internal,t.secure);else throw new Error("require options.endpoint or options.region");return t.inited=!0,t}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(F,$,j){"use strict";var N=F("merge-descriptors"),v=j;N(v,F("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=O(N);function O(t){return t&&t.__esModule?t:{default:t}}var M=F("../utils/checkBucketName"),y=M.checkBucketName,m=F("querystring"),S=F("js-base64"),b=S.Base64.encode,p=j;p.processObjectSave=function(l,r,i,o){var s,u,a,c;return v.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:return d(l,"sourceObject"),d(r,"targetObject"),d(i,"process"),r=this._objectName(r),o&&y(o),s=this._objectRequestParams("POST",l,{subres:"x-oss-process"}),u=o?",b_"+b(o):"",r=b(r),a={"x-oss-process":i+"|sys/saveas,o_"+r+u},s.content=m.stringify(a),w.next=12,v.default.awrap(this.request(s));case 12:return c=w.sent,w.abrupt("return",{res:c.res,status:c.res.status});case 14:case"end":return w.stop()}},null,this)};function d(t,l){if(!t)throw new Error(l+" is required");if(typeof t!="string")throw new Error(l+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=O(N);function O(p){return p&&p.__esModule?p:{default:p}}var M=F("copy-to"),y=F("./callback"),m=F("./utils/deepCopy"),S=m.deepCopy,b=j;b.listUploads=function(d,t){var l,r,i,o;return v.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return t=t||{},l={},M(t).to(l),l.subres="uploads",r=this._objectRequestParams("GET","",l),r.query=d,r.xmlResponse=!0,r.successStatuses=[200],u.next=10,v.default.awrap(this.request(r));case 10:return i=u.sent,o=i.data.Upload||[],Array.isArray(o)||(o=[o]),o=o.map(function(a){return{name:a.Key,uploadId:a.UploadId,initiated:a.Initiated}}),u.abrupt("return",{res:i.res,uploads:o,bucket:i.data.Bucket,nextKeyMarker:i.data.NextKeyMarker,nextUploadIdMarker:i.data.NextUploadIdMarker,isTruncated:i.data.IsTruncated==="true"});case 15:case"end":return u.stop()}},null,this)},b.listParts=function(d,t,l,r){var i,o,s;return v.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return r=r||{},i={},M(r).to(i),i.subres={uploadId:t},o=this._objectRequestParams("GET",d,i),o.query=l,o.xmlResponse=!0,o.successStatuses=[200],a.next=10,v.default.awrap(this.request(o));case 10:return s=a.sent,a.abrupt("return",{res:s.res,uploadId:s.data.UploadId,bucket:s.data.Bucket,name:s.data.Key,partNumberMarker:s.data.PartNumberMarker,nextPartNumberMarker:s.data.NextPartNumberMarker,maxParts:s.data.MaxParts,isTruncated:s.data.IsTruncated,parts:s.data.Part||[]});case 12:case"end":return a.stop()}},null,this)},b.abortMultipartUpload=function(d,t,l){var r,i,o;return v.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return this._stop(),l=l||{},r={},M(l).to(r),r.subres={uploadId:t},i=this._objectRequestParams("DELETE",d,r),i.successStatuses=[204],u.next=9,v.default.awrap(this.request(i));case 9:return o=u.sent,u.abrupt("return",{res:o.res});case 11:case"end":return u.stop()}},null,this)},b.initMultipartUpload=function(d,t){var l,r,i;return v.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return t=t||{},l={},M(t).to(l),l.headers=l.headers||{},this._convertMetaToHeaders(t.meta,l.headers),l.subres="uploads",r=this._objectRequestParams("POST",d,l),r.mime=t.mime,r.xmlResponse=!0,r.successStatuses=[200],s.next=12,v.default.awrap(this.request(r));case 12:return i=s.sent,s.abrupt("return",{res:i.res,bucket:i.data.Bucket,name:i.data.Key,uploadId:i.data.UploadId});case 14:case"end":return s.stop()}},null,this)},b.uploadPart=function(d,t,l,r,i,o,s){var u;return v.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return u={stream:this._createStream(r,i,o),size:o-i},c.next=3,v.default.awrap(this._uploadPart(d,t,l,u,s));case 3:return c.abrupt("return",c.sent);case 4:case"end":return c.stop()}},null,this)},b.completeMultipartUpload=function(d,t,l,r){var i,o,s,u,a,c,f,w;return v.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:for(i=l.concat().sort(function(R,C){return R.number-C.number}).filter(function(R,C,g){return!C||R.number!==g[C-1].number}),o=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,s=0;s<i.length;s++)u=i[s],o+=`<Part>
`,o+="<PartNumber>"+u.number+`</PartNumber>
`,o+="<ETag>"+u.etag+`</ETag>
`,o+=`</Part>
`;return o+="</CompleteMultipartUpload>",r=r||{},a={},a=S(r),a.headers&&delete a.headers["x-oss-server-side-encryption"],a.subres={uploadId:t},c=this._objectRequestParams("POST",d,a),y.encodeCallback(c,a),c.mime="xml",c.content=o,c.headers&&c.headers["x-oss-callback"]||(c.xmlResponse=!0),c.successStatuses=[200],h.next=17,v.default.awrap(this.request(c));case 17:return f=h.sent,w={res:f.res,bucket:c.bucket,name:d,etag:f.res.headers.etag},c.headers&&c.headers["x-oss-callback"]&&(w.data=JSON.parse(f.data.toString())),h.abrupt("return",w);case 21:case"end":return h.stop()}},null,this)},b._uploadPart=function(d,t,l,r,i){var o,s,u;return v.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return i=i||{},o={},M(i).to(o),o.headers={"Content-Length":r.size},o.subres={partNumber:l,uploadId:t},s=this._objectRequestParams("PUT",d,o),s.mime=o.mime,s.stream=r.stream,s.successStatuses=[200],c.next=11,v.default.awrap(this.request(s));case 11:if(u=c.sent,u.res.headers.etag){c.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 r.stream=null,s.stream=null,c.abrupt("return",{name:d,etag:u.res.headers.etag,res:u.res});case 17:case"end":return c.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=S(N),O=F("babel-runtime/core-js/object/keys"),M=S(O),y=F("babel-runtime/helpers/typeof"),m=S(y);function S(t){return t&&t.__esModule?t:{default:t}}var b=F("../utils/checkBucketName"),p=b.checkBucketName,d=j;d.copy=function(l,r,i,o){var s,u,a;return v.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return(typeof i=="undefined"?"undefined":(0,m.default)(i))==="object"&&(o=i),o=o||{},o.headers=o.headers||{},(0,M.default)(o.headers).forEach(function(w){o.headers["x-oss-copy-source-"+w.toLowerCase()]=o.headers[w]}),o.meta&&(o.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(o.meta,o.headers),r=this._getSourceName(r,i),o.versionId&&(r=r+"?versionId="+o.versionId),o.headers["x-oss-copy-source"]=r,s=this._objectRequestParams("PUT",l,o),s.xmlResponse=!0,s.successStatuses=[200,304],f.next=14,v.default.awrap(this.request(s));case 14:return u=f.sent,a=u.data,a&&(a={etag:a.ETag,lastModified:a.LastModified}),f.abrupt("return",{data:a,res:u.res});case 18:case"end":return f.stop()}},null,this)},d._getSourceName=function(l,r){return typeof r=="string"?l=this._objectName(l):l[0]!=="/"?r=this.options.bucket:(r=l.replace(/\/(.+?)(\/.*)/,"$1"),l=l.replace(/(\/.+?\/)(.*)/,"$2")),p(r),l=encodeURI(l),l="/"+r+"/"+l,l}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.delete=function(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,t;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p.subres=(0,M.default)({},p.subres),p.versionId&&(p.subres.versionId=p.versionId),d=this._objectRequestParams("DELETE",b,p),d.successStatuses=[204],r.next=6,v.default.awrap(this.request(d));case 6:return t=r.sent,r.abrupt("return",{res:t.res});case 8:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(d){return d&&d.__esModule?d:{default:d}}var m=F("utility"),S=F("../utils/obj2xml"),b=S.obj2xml,p=j;p.deleteMulti=function(t){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,s,u,a,c,f,w,_,h,R;return v.default.async(function(g){for(;;)switch(g.prev=g.next){case 0:if(r=[],!(!t||!t.length)){g.next=3;break}throw new Error("names is required");case 3:for(i=0;i<t.length;i++)o={},typeof t[i]=="string"?o.Key=m.escape(this._objectName(t[i])):(s=t[i],u=s.key,a=s.versionId,o.Key=m.escape(this._objectName(u)),o.VersionId=a),r.push(o);return c={Delete:{Quiet:!!l.quiet,Object:r}},f=b(c,{headers:!0}),l.subres=(0,M.default)({delete:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),w=this._objectRequestParams("POST","",l),w.mime="xml",w.content=f,w.xmlResponse=!0,w.successStatuses=[200],g.next=15,v.default.awrap(this.request(w));case 15:return _=g.sent,h=_.data,R=h&&h.Deleted||null,R&&(Array.isArray(R)||(R=[R])),g.abrupt("return",{res:_.res,deleted:R||[]});case 20:case"end":return g.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.deleteObjectTagging=function(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,t;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p.subres=(0,M.default)({tagging:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),b=this._objectName(b),d=this._objectRequestParams("DELETE",b,p),d.successStatuses=[204],r.next=7,v.default.awrap(this.request(d));case 7:return t=r.sent,r.abrupt("return",{status:t.status,res:t.res});case 9:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(p){return p&&p.__esModule?p:{default:p}}var m=F("fs"),S=F("is-type-of"),b=j;b.get=function(d,t){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,o,s;return v.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return r=null,i=!1,S.writableStream(t)?r=t:S.string(t)?(r=m.createWriteStream(t),i=!0):l=t,l=l||{},l.subres=(0,M.default)({},l.subres),l.versionId&&(l.subres.versionId=l.versionId),l.process&&(l.subres["x-oss-process"]=l.process),o=void 0,a.prev=8,s=this._objectRequestParams("GET",d,l),s.writeStream=r,s.successStatuses=[200,206,304],a.next=14,v.default.awrap(this.request(s));case 14:o=a.sent,i&&r.destroy(),a.next=25;break;case 18:if(a.prev=18,a.t0=a.catch(8),!i){a.next=24;break}return r.destroy(),a.next=24,v.default.awrap(this._deleteFileSafe(t));case 24:throw a.t0;case 25:return a.abrupt("return",{res:o.res,content:o.data});case 26:case"end":return a.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.getACL=function(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,t;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p.subres=(0,M.default)({acl:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),b=this._objectName(b),d=this._objectRequestParams("GET",b,p),d.successStatuses=[200],d.xmlResponse=!0,r.next=8,v.default.awrap(this.request(d));case 8:return t=r.sent,r.abrupt("return",{acl:t.data.AccessControlList.Grant,owner:{id:t.data.Owner.ID,displayName:t.data.Owner.DisplayName},res:t.res});case 10:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),v=S(N),O=F("babel-runtime/regenerator"),M=S(O),y=F("babel-runtime/core-js/object/assign"),m=S(y);function S(s){return s&&s.__esModule?s:{default:s}}var b=j,p=F("../utils/isObject"),d=p.isObject,t=F("../utils/isArray"),l=t.isArray;b.getBucketVersions=r,b.listObjectVersions=r;function r(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,c,f,w,_,h;return M.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(!(s.versionIdMarker&&s.keyMarker===void 0)){C.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return u.subres=(0,m.default)({versions:""},u.subres),u.versionId&&(u.subres.versionId=u.versionId),a=this._objectRequestParams("GET","",u),a.xmlResponse=!0,a.successStatuses=[200],a.query=o(s),C.next=10,M.default.awrap(this.request(a));case 10:return c=C.sent,f=c.data.Version||[],w=c.data.DeleteMarker||[],_=this,f&&(Array.isArray(f)||(f=[f]),f=f.map(function(g){return{name:g.Key,url:_._objectUrl(g.Key),lastModified:g.LastModified,isLatest:g.IsLatest==="true",versionId:g.VersionId,etag:g.ETag,type:g.Type,size:Number(g.Size),storageClass:g.StorageClass,owner:{id:g.Owner.ID,displayName:g.Owner.DisplayName}}})),w&&(l(w)||(w=[w]),w=w.map(function(g){return{name:g.Key,lastModified:g.LastModified,versionId:g.VersionId,owner:{id:g.Owner.ID,displayName:g.Owner.DisplayName}}})),h=c.data.CommonPrefixes||null,h&&(l(h)||(h=[h]),h=h.map(function(g){return g.Prefix})),C.abrupt("return",{res:c.res,objects:f,deleteMarker:w,prefixes:h,nextMarker:c.data.NextMarker||null,NextVersionIdMarker:c.data.NextVersionIdMarker||null,isTruncated:c.data.IsTruncated==="true"});case 19:case"end":return C.stop()}},null,this)}function i(s){return s.replace(/([A-Z])/g,"-$1").toLowerCase()}function o(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u={};return d(s)&&(0,v.default)(s).forEach(function(a){u[i(a)]=s[a]}),u}},{"../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(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.getObjectMeta=function(b,p){var d,t;return v.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return p=p||{},b=this._objectName(b),p.subres=(0,M.default)({objectMeta:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),d=this._objectRequestParams("HEAD",b,p),d.successStatuses=[200],r.next=8,v.default.awrap(this.request(d));case 8:return t=r.sent,r.abrupt("return",{status:t.status,res:t.res});case 10:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(p){return p&&p.__esModule?p:{default:p}}var m=j,S=F("../utils/isObject"),b=S.isObject;m.getObjectTagging=function(d){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,r,i,o,s;return v.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:return t.subres=(0,M.default)({tagging:""},t.subres),t.versionId&&(t.subres.versionId=t.versionId),d=this._objectName(d),l=this._objectRequestParams("GET",d,t),l.successStatuses=[200],a.next=7,v.default.awrap(this.request(l));case 7:return r=a.sent,a.next=10,v.default.awrap(this.parseXML(r.data));case 10:return i=a.sent,o=i.TagSet.Tag,o=o&&b(o)?[o]:o||[],s={},o.forEach(function(c){s[c.Key]=c.Value}),a.abrupt("return",{status:r.status,res:r.res,tag:s});case 16:case"end":return a.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.getSymlink=function(b){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,t,l;return v.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return p.subres=(0,M.default)({symlink:""},p.subres),p.versionId&&(p.subres.versionId=p.versionId),b=this._objectName(b),d=this._objectRequestParams("GET",b,p),d.successStatuses=[200],i.next=7,v.default.awrap(this.request(d));case 7:return t=i.sent,l=t.res.headers["x-oss-symlink-target"],i.abrupt("return",{targetName:decodeURIComponent(l),res:t.res});case 10:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=S(N),O=F("babel-runtime/core-js/object/keys"),M=S(O),y=F("babel-runtime/core-js/object/assign"),m=S(y);function S(p){return p&&p.__esModule?p:{default:p}}var b=j;b.head=function(d){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l,r,i;return v.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return t.subres=(0,m.default)({},t.subres),t.versionId&&(t.subres.versionId=t.versionId),l=this._objectRequestParams("HEAD",d,t),l.successStatuses=[200,304],s.next=6,v.default.awrap(this.request(l));case 6:return r=s.sent,i={meta:null,res:r.res,status:r.status},r.status===200&&(0,M.default)(r.headers).forEach(function(u){u.indexOf("x-oss-meta-")===0&&(i.meta||(i.meta={}),i.meta[u.substring(11)]=r.headers[u])}),s.abrupt("return",i);case 10:case"end":return s.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.putACL=function(b,p,d){var t,l;return v.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return d=d||{},d.subres=(0,M.default)({acl:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),d.headers=d.headers||{},d.headers["x-oss-object-acl"]=p,b=this._objectName(b),t=this._objectRequestParams("PUT",b,d),t.successStatuses=[200],i.next=10,v.default.awrap(this.request(t));case 10:return l=i.sent,i.abrupt("return",{res:l.res});case 12:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=S(N),O=F("babel-runtime/core-js/object/keys"),M=S(O),y=F("babel-runtime/core-js/object/assign"),m=S(y);function S(r){return r&&r.__esModule?r:{default:r}}var b=F("../utils/obj2xml"),p=b.obj2xml,d=F("../utils/checkObjectTag"),t=d.checkObjectTag,l=j;l.putObjectTagging=function(i,o){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u,a,c;return v.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:return t(o),s.subres=(0,m.default)({tagging:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),i=this._objectName(i),u=this._objectRequestParams("PUT",i,s),u.successStatuses=[200],o=(0,M.default)(o).map(function(_){return{Key:_,Value:o[_]}}),a={Tagging:{TagSet:{Tag:o}}},u.mime="xml",u.content=p(a),w.next=12,v.default.awrap(this.request(u));case 12:return c=w.sent,w.abrupt("return",{res:c.res,status:c.status});case 14:case"end":return w.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(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/object/assign"),M=y(O);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m.putSymlink=function(b,p,d){var t,l;return v.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return d=d||{},d.headers=d.headers||{},p=this._escape(this._objectName(p)),this._convertMetaToHeaders(d.meta,d.headers),d.headers["x-oss-symlink-target"]=p,d.subres=(0,M.default)({symlink:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),d.storageClass&&(d.headers["x-oss-storage-class"]=d.storageClass),b=this._objectName(b),t=this._objectRequestParams("PUT",b,d),t.successStatuses=[200],i.next=13,v.default.awrap(this.request(t));case 13:return l=i.sent,i.abrupt("return",{res:l.res});case 15:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(F,$,j){"use strict";var N=F("babel-runtime/regenerator"),v=y(N),O=F("babel-runtime/core-js/promise"),M=y(O);function y(S){return S&&S.__esModule?S:{default:S}}var m=j;m._parallelNode=function(b,p,d,t){var l,r,i,o,s,u,a,c;return v.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:l=this,r=[],i=[],o=b.length/p,s=b.length%p,u=s===0?o:(b.length-s)/p+1,a=1,c=0;case 8:if(!(c<b.length)){w.next=26;break}if(!l.isCancel()){w.next=11;break}return w.abrupt("break",26);case 11:if(t?i.push(d(l,b[c],t)):i.push(d(l,b[c])),!(i.length===p||a===u&&c===b.length-1)){w.next=23;break}return w.prev=13,a+=1,w.next=17,v.default.awrap(M.default.all(i));case 17:w.next=22;break;case 19:w.prev=19,w.t0=w.catch(13),r.push(w.t0);case 22:i=[];case 23:c++,w.next=8;break;case 26:return w.abrupt("return",r);case 27:case"end":return w.stop()}},null,this,[[13,19]])},m._parallel=function(b,p,d){var t=this;return new M.default(function(l){var r=[];if(p<=0||!b){l(r);return}function i(h){return function(){if(h===null)throw new Error("Callback was already called.");var R=h;h=null;for(var C=arguments.length,g=Array(C),x=0;x<C;x++)g[x]=arguments[x];R.apply(this,g)}}function o(h){var R=-1,C=h.length;return function(){return++R<C&&!t.isCancel()?{value:h[R],key:R}:null}}var s=o(b),u=!1,a=0,c=!1;function f(h,R){a-=1,h?(u=!0,r.push(h),l(r)):R==={}||u&&a<=0?(u=!0,l(r)):c||(t.isCancel()?l(r):_())}function w(h,R){d(h).then(function(C){R(null,C)}).catch(function(C){R(C)})}function _(){for(c=!0;a<p&&!u&&!t.isCancel();){var h=s();if(h===null||r.length>0){u=!0,a<=0&&l(r);return}a+=1,w(h.value,i(f))}c=!1}_()})},m.cancel=function(b){this.options.cancelFlag=!0,b&&this.abortMultipartUpload(b.name,b.uploadId,b.options)},m.isCancel=function(){return this.options.cancelFlag},m.resetCancelFlag=function(){this.options.cancelFlag=!1},m._stop=function(){this.options.cancelFlag=!0},m._makeCancelEvent=function(){var b={status:0,name:"cancel"};return b}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(F,$,j){(function(N){"use strict";var v=F("babel-runtime/core-js/json/stringify"),O=m(v),M=F("babel-runtime/core-js/object/keys"),y=m(M);function m(p){return p&&p.__esModule?p:{default:p}}var S=F("./../../shims/crypto/crypto.js"),b=F("is-type-of");j.buildCanonicalizedResource=function(d,t){var l=""+d,r="?";if(b.string(t)&&t.trim()!=="")l+=r+t;else if(b.array(t))t.sort(),l+=r+t.join("&");else if(t){var i=function(u,a){return u[0]>a[0]?1:u[0]<a[0]?-1:0},o=function(u){l+=r+u,t[u]&&(l+="="+t[u]),r="&"};(0,y.default)(t).sort(i).forEach(o)}return l},j.buildCanonicalString=function(d,t,l,r){l=l||{};var i=l.headers||{},o="x-oss-",s=[],u={},a=[d.toUpperCase(),i["Content-Md5"]||"",i["Content-Type"]||i["Content-Type".toLowerCase()],r||i["x-oss-date"]];return(0,y.default)(i).forEach(function(c){var f=c.toLowerCase();f.indexOf(o)===0&&(u[f]=String(i[c]).trim())}),(0,y.default)(u).sort().forEach(function(c){s.push(c+":"+u[c])}),a=a.concat(s),a.push(this.buildCanonicalizedResource(t,l.parameters)),a.join(`
`)},j.computeSignature=function(d,t){var l=S.createHmac("sha1",d);return l.update(N.from(t,"utf8")).digest("base64")},j.authorization=function(d,t,l){return"OSS "+d+":"+this.computeSignature(t,l)},j._signatureForURL=function(d){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=arguments[2],r=arguments[3],i={},o=t.subResource,s=o===void 0?{}:o;if(t.process){var u="x-oss-process";s[u]=t.process}if(t.trafficLimit){var a="x-oss-traffic-limit";s[a]=t.trafficLimit}if(t.response&&(0,y.default)(t.response).forEach(function(_){var h="response-"+_.toLowerCase();s[h]=t.response[_]}),(0,y.default)(t).forEach(function(_){var h=_.toLowerCase(),R=t[_];h.indexOf("x-oss-")===0?i[h]=R:(h.indexOf("content-md5")===0||h.indexOf("content-type")===0)&&(i[_]=R)}),Object.prototype.hasOwnProperty.call(t,"security-token")&&(s["security-token"]=t["security-token"]),Object.prototype.hasOwnProperty.call(t,"callback")){var c={callbackUrl:encodeURI(t.callback.url),callbackBody:t.callback.body};if(t.callback.host&&(c.callbackHost=t.callback.host),t.callback.contentType&&(c.callbackBodyType=t.callback.contentType),s.callback=N.from((0,O.default)(c)).toString("base64"),t.callback.customValue){var f={};(0,y.default)(t.callback.customValue).forEach(function(_){f["x:"+_]=t.callback.customValue[_]}),s["callback-var"]=N.from((0,O.default)(f)).toString("base64")}}var w=this.buildCanonicalString(t.method,l,{headers:i,parameters:s},r.toString());return{Signature:this.computeSignature(d,w),subResource:s}}}).call(this,F("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(F,$,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.checkBucketName=void 0,j.checkBucketName=function(N,v){var O=v?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!O.test(N))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/entries"),v=O(N);function O(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(j,"__esModule",{value:!0}),j.checkObjectTag=void 0;var M=F("./checkValid"),y=M.checkValid,m=F("./isObject"),S=m.isObject,b=[{validator:function(l){if(typeof l!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],p={key:[].concat(b,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(b,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function d(t){if(!S(t))throw new Error("tag must be Object");var l=(0,v.default)(t);if(l.length>10)throw new Error("maximum of 10 tags for a object");var r=["key","value"];l.forEach(function(i){i.forEach(function(o,s){y(o,p[r[s]])})})}j.checkObjectTag=d},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(F,$,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.checkValid=void 0;function N(v,O){O.forEach(function(M){if(M.validator)M.validator(v);else if(M.pattern&&!M.pattern.test(v))throw new Error(M.msg)})}j.checkValid=N},{}],38:[function(F,$,j){(function(N){"use strict";var v=F("babel-runtime/core-js/object/assign"),O=M(v);function M(i){return i&&i.__esModule?i:{default:i}}Object.defineProperty(j,"__esModule",{value:!0}),j.createRequest=void 0;var y=F("./../../../shims/crypto/crypto.js"),m=F("debug")("ali-oss"),S=F("mime"),b=F("dateformat"),p=F("copy-to"),d=F("path");function t(i,o){return i[o]||i[o.toLowerCase()]}function l(i,o){delete i[o],delete i[o.toLowerCase()]}function r(i){var o=new Date;this.options.amendTimeSkewed&&(o=+new Date+this.options.amendTimeSkewed);var s={"x-oss-date":b(o,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(s["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,O.default)(s,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(s["x-oss-security-token"]=this.options.stsToken),p(i.headers).to(s),t(s,"Content-Type")||(i.mime&&i.mime.indexOf("/")>0?s["Content-Type"]=i.mime:s["Content-Type"]=S.getType(i.mime||d.extname(i.object||""))),t(s,"Content-Type")||l(s,"Content-Type"),i.content&&(s["Content-Md5"]=y.createHash("md5").update(N.from(i.content,"utf8")).digest("base64"),s["Content-Length"]||(s["Content-Length"]=i.content.length));var u=this._getResource(i);s.authorization=this.authorization(i.method,u,i.subres,s);var a=this._getReqUrl(i);m("request %s %s, with headers %j, !!stream: %s",i.method,a,s,!!i.stream);var c=i.timeout||this.options.timeout,f={method:i.method,content:i.content,stream:i.stream,headers:s,timeout:c,writeStream:i.writeStream,customResponse:i.customResponse,ctx:i.ctx||this.ctx};return this.agent&&(f.agent=this.agent),this.httpsAgent&&(f.httpsAgent=this.httpsAgent),{url:a,params:f}}j.createRequest=r}).call(this,F("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(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),v=y(N),O=F("babel-runtime/helpers/typeof"),M=y(O);function y(m){return m&&m.__esModule?m:{default:m}}Object.defineProperty(j,"__esModule",{value:!0}),j.deepCopy=void 0,j.deepCopy=function(m){if(m===null||(typeof m=="undefined"?"undefined":(0,M.default)(m))!=="object")return m;var S=Array.isArray(m)?[]:{};return(0,v.default)(m).forEach(function(b){S[b]=j.deepCopy(m[b])}),S}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),v=y(N),O=F("babel-runtime/helpers/typeof"),M=y(O);function y(b){return b&&b.__esModule?b:{default:b}}Object.defineProperty(j,"__esModule",{value:!0}),j.formatObjKey=void 0;function m(b,p){if(b===null||(typeof b=="undefined"?"undefined":(0,M.default)(b))!=="object")return b;var d=void 0;if(Array.isArray(b)){d=[];for(var t=0;t<b.length;t++)d.push(m(b[t],p))}else d={},(0,v.default)(b).forEach(function(l){d[S(l,p)]=m(b[l],p)});return d}j.formatObjKey=m;function S(b,p){return p==="firstUpperCase"?b=b.replace(/^./,function(d){return d.toUpperCase()}):p==="firstLowerCase"&&(b=b.replace(/^./,function(d){return d.toLowerCase()})),b}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(F,$,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.getStrBytesCount=void 0;function N(v){for(var O=0,M=0;M<v.length;M++){var y=v.charAt(M);/^[\u00-\uff]$/.test(y)?O+=1:O+=2}return O}j.getStrBytesCount=N},{}],42:[function(F,$,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isArray=void 0,j.isArray=function(N){return Object.prototype.toString.call(N)==="[object Array]"}},{}],43:[function(F,$,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isBlob=void 0;function N(v){return typeof Blob!="undefined"&&v instanceof Blob}j.isBlob=N},{}],44:[function(F,$,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isFile=void 0,j.isFile=function(N){return typeof File!="undefined"&&N instanceof File}},{}],45:[function(F,$,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isIP=void 0,j.isIP=function(N){var v=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,O=/^\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 v.test(N)||O.test(N)}},{}],46:[function(F,$,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isObject=void 0,j.isObject=function(N){return Object.prototype.toString.call(N)==="[object Object]"}},{}],47:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),v=O(N);function O(S){return S&&S.__esModule?S:{default:S}}Object.defineProperty(j,"__esModule",{value:!0}),j.obj2xml=void 0;var M=F("./formatObjKey");function y(S){return Object.prototype.toString.call(S).replace(/(.*? |])/g,"").toLowerCase()}function m(S,b){var p="";return b&&b.headers&&(p=`<?xml version="1.0" encoding="UTF-8"?>
`),b&&b.firstUpperCase&&(S=M.formatObjKey(S,"firstUpperCase")),y(S)==="object"?(0,v.default)(S).forEach(function(d){y(S[d])==="string"||y(S[d])==="number"?p+="<"+d+">"+S[d]+"</"+d+">":y(S[d])==="object"?p+="<"+d+">"+m(S[d])+"</"+d+">":y(S[d])==="array"?p+=S[d].map(function(t){return"<"+d+">"+m(t)+"</"+d+">"}).join(""):p+="<"+d+">"+S[d].toString()+"</"+d+">"}):p+=S.toString(),p}j.obj2xml=m},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(F,$,j){$.exports=N,$.exports.HttpsAgent=N;function N(){}},{}],49:[function(F,$,j){$.exports=F("./register")().Promise},{"./register":51}],50:[function(F,$,j){"use strict";var N="@@any-promise/REGISTRATION",v=null;$.exports=function(O,M){return function(m,S){m=m||null,S=S||{};var b=S.global!==!1;if(v===null&&b&&(v=O[N]||null),v!==null&&m!==null&&v.implementation!==m)throw new Error('any-promise already defined as "'+v.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return v===null&&(m!==null&&typeof S.Promise!="undefined"?v={Promise:S.Promise,implementation:m}:v=M(m),b&&(O[N]=v)),v}}},{}],51:[function(F,$,j){"use strict";$.exports=F("./loader")(window,N);function N(){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(F,$,j){$.exports={default:F("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(F,$,j){$.exports={default:F("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(F,$,j){$.exports={default:F("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(F,$,j){$.exports={default:F("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(F,$,j){$.exports={default:F("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(F,$,j){$.exports={default:F("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(F,$,j){$.exports={default:F("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(F,$,j){$.exports={default:F("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(F,$,j){$.exports={default:F("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(F,$,j){$.exports={default:F("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(F,$,j){$.exports={default:F("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(F,$,j){$.exports={default:F("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(F,$,j){$.exports={default:F("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(F,$,j){$.exports={default:F("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(F,$,j){$.exports={default:F("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(F,$,j){"use strict";j.__esModule=!0;var N=F("../core-js/symbol/iterator"),v=m(N),O=F("../core-js/symbol"),M=m(O),y=typeof M.default=="function"&&typeof v.default=="symbol"?function(S){return typeof S}:function(S){return S&&typeof M.default=="function"&&S.constructor===M.default&&S!==M.default.prototype?"symbol":typeof S};function m(S){return S&&S.__esModule?S:{default:S}}j.default=typeof M.default=="function"&&y(v.default)==="symbol"?function(S){return typeof S=="undefined"?"undefined":y(S)}:function(S){return S&&typeof M.default=="function"&&S.constructor===M.default&&S!==M.default.prototype?"symbol":typeof S=="undefined"?"undefined":y(S)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(F,$,j){$.exports=F("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(F,$,j){"use strict";j.byteLength=b,j.toByteArray=d,j.fromByteArray=r;for(var N=[],v=[],O=typeof Uint8Array!="undefined"?Uint8Array:Array,M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0,m=M.length;y<m;++y)N[y]=M[y],v[M.charCodeAt(y)]=y;v["-".charCodeAt(0)]=62,v["_".charCodeAt(0)]=63;function S(i){var o=i.length;if(o%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var s=i.indexOf("=");s===-1&&(s=o);var u=s===o?0:4-s%4;return[s,u]}function b(i){var o=S(i),s=o[0],u=o[1];return(s+u)*3/4-u}function p(i,o,s){return(o+s)*3/4-s}function d(i){var o,s=S(i),u=s[0],a=s[1],c=new O(p(i,u,a)),f=0,w=a>0?u-4:u,_;for(_=0;_<w;_+=4)o=v[i.charCodeAt(_)]<<18|v[i.charCodeAt(_+1)]<<12|v[i.charCodeAt(_+2)]<<6|v[i.charCodeAt(_+3)],c[f++]=o>>16&255,c[f++]=o>>8&255,c[f++]=o&255;return a===2&&(o=v[i.charCodeAt(_)]<<2|v[i.charCodeAt(_+1)]>>4,c[f++]=o&255),a===1&&(o=v[i.charCodeAt(_)]<<10|v[i.charCodeAt(_+1)]<<4|v[i.charCodeAt(_+2)]>>2,c[f++]=o>>8&255,c[f++]=o&255),c}function t(i){return N[i>>18&63]+N[i>>12&63]+N[i>>6&63]+N[i&63]}function l(i,o,s){for(var u,a=[],c=o;c<s;c+=3)u=(i[c]<<16&16711680)+(i[c+1]<<8&65280)+(i[c+2]&255),a.push(t(u));return a.join("")}function r(i){for(var o,s=i.length,u=s%3,a=[],c=16383,f=0,w=s-u;f<w;f+=c)a.push(l(i,f,f+c>w?w:f+c));return u===1?(o=i[s-1],a.push(N[o>>2]+N[o<<4&63]+"==")):u===2&&(o=(i[s-2]<<8)+i[s-1],a.push(N[o>>10]+N[o>>4&63]+N[o<<2&63]+"=")),a.join("")}},{}],70:[function(F,$,j){/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2015
*/!function(N,v,O){typeof $!="undefined"&&$.exports?$.exports=O():typeof define=="function"&&define.amd?define(v,O):N[v]=O()}(this,"bowser",function(){var N=!0;function v(p){function d(z){var U=p.match(z);return U&&U.length>1&&U[1]||""}function t(z){var U=p.match(z);return U&&U.length>1&&U[2]||""}var l=d(/(ipod|iphone|ipad)/i).toLowerCase(),r=/like android/i.test(p),i=!r&&/android/i.test(p),o=/nexus\s*[0-6]\s*/i.test(p),s=!o&&/nexus\s*[0-9]+/i.test(p),u=/CrOS/.test(p),a=/silk/i.test(p),c=/sailfish/i.test(p),f=/tizen/i.test(p),w=/(web|hpw)(o|0)s/i.test(p),_=/windows phone/i.test(p),h=/SamsungBrowser/i.test(p),R=!_&&/windows/i.test(p),C=!l&&!a&&/macintosh/i.test(p),g=!i&&!c&&!f&&!w&&/linux/i.test(p),x=t(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),E=d(/version\/(\d+(\.\d+)?)/i),T=/tablet/i.test(p)&&!/tablet pc/i.test(p),k=!T&&/[^-]mobi/i.test(p),L=/xbox/i.test(p),A;/opera/i.test(p)?A={name:"Opera",opera:N,version:E||d(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(p)?A={name:"Opera",opera:N,version:d(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||E}:/SamsungBrowser/i.test(p)?A={name:"Samsung Internet for Android",samsungBrowser:N,version:E||d(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(p)?A={name:"NAVER Whale browser",whale:N,version:d(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(p)?A={name:"MZ Browser",mzbrowser:N,version:d(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(p)?A={name:"Opera Coast",coast:N,version:E||d(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(p)?A={name:"Focus",focus:N,version:d(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(p)?A={name:"Yandex Browser",yandexbrowser:N,version:E||d(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(p)?A={name:"UC Browser",ucbrowser:N,version:d(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(p)?A={name:"Maxthon",maxthon:N,version:d(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(p)?A={name:"Epiphany",epiphany:N,version:d(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(p)?A={name:"Puffin",puffin:N,version:d(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(p)?A={name:"Sleipnir",sleipnir:N,version:d(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(p)?A={name:"K-Meleon",kMeleon:N,version:d(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:_?(A={name:"Windows Phone",osname:"Windows Phone",windowsphone:N},x?(A.msedge=N,A.version=x):(A.msie=N,A.version=d(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(p)?A={name:"Internet Explorer",msie:N,version:d(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:u?A={name:"Chrome",osname:"Chrome OS",chromeos:N,chromeBook:N,chrome:N,version:d(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(p)?A={name:"Microsoft Edge",msedge:N,version:x}:/vivaldi/i.test(p)?A={name:"Vivaldi",vivaldi:N,version:d(/vivaldi\/(\d+(\.\d+)?)/i)||E}:c?A={name:"Sailfish",osname:"Sailfish OS",sailfish:N,version:d(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(p)?A={name:"SeaMonkey",seamonkey:N,version:d(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(p)?(A={name:"Firefox",firefox:N,version:d(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(p)&&(A.firefoxos=N,A.osname="Firefox OS")):a?A={name:"Amazon Silk",silk:N,version:d(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(p)?A={name:"PhantomJS",phantom:N,version:d(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(p)?A={name:"SlimerJS",slimer:N,version:d(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(p)||/rim\stablet/i.test(p)?A={name:"BlackBerry",osname:"BlackBerry OS",blackberry:N,version:E||d(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:w?(A={name:"WebOS",osname:"WebOS",webos:N,version:E||d(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(p)&&(A.touchpad=N)):/bada/i.test(p)?A={name:"Bada",osname:"Bada",bada:N,version:d(/dolfin\/(\d+(\.\d+)?)/i)}:f?A={name:"Tizen",osname:"Tizen",tizen:N,version:d(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||E}:/qupzilla/i.test(p)?A={name:"QupZilla",qupzilla:N,version:d(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||E}:/chromium/i.test(p)?A={name:"Chromium",chromium:N,version:d(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||E}:/chrome|crios|crmo/i.test(p)?A={name:"Chrome",chrome:N,version:d(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:i?A={name:"Android",version:E}:/safari|applewebkit/i.test(p)?(A={name:"Safari",safari:N},E&&(A.version=E)):l?(A={name:l=="iphone"?"iPhone":l=="ipad"?"iPad":"iPod"},E&&(A.version=E)):/googlebot/i.test(p)?A={name:"Googlebot",googlebot:N,version:d(/googlebot\/(\d+(\.\d+))/i)||E}:A={name:d(/^(.*)\/(.*) /),version:t(/^(.*)\/(.*) /)},!A.msedge&&/(apple)?webkit/i.test(p)?(/(apple)?webkit\/537\.36/i.test(p)?(A.name=A.name||"Blink",A.blink=N):(A.name=A.name||"Webkit",A.webkit=N),!A.version&&E&&(A.version=E)):!A.opera&&/gecko\//i.test(p)&&(A.name=A.name||"Gecko",A.gecko=N,A.version=A.version||d(/gecko\/(\d+(\.\d+)?)/i)),!A.windowsphone&&(i||A.silk)?(A.android=N,A.osname="Android"):!A.windowsphone&&l?(A[l]=N,A.ios=N,A.osname="iOS"):C?(A.mac=N,A.osname="macOS"):L?(A.xbox=N,A.osname="Xbox"):R?(A.windows=N,A.osname="Windows"):g&&(A.linux=N,A.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="";A.windows?K=G(d(/Windows ((NT|XP)( \d\d?.\d)?)/i)):A.windowsphone?K=d(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):A.mac?(K=d(/Mac OS X (\d+([_\.\s]\d+)*)/i),K=K.replace(/[_\s]/g,".")):l?(K=d(/os (\d+([_\s]\d+)*) like mac os x/i),K=K.replace(/[_\s]/g,".")):i?K=d(/android[ \/-](\d+(\.\d+)*)/i):A.webos?K=d(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):A.blackberry?K=d(/rim\stablet\sos\s(\d+(\.\d+)*)/i):A.bada?K=d(/bada\/(\d+(\.\d+)*)/i):A.tizen&&(K=d(/tizen[\/\s](\d+(\.\d+)*)/i)),K&&(A.osversion=K);var W=!A.windows&&K.split(".")[0];return T||s||l=="ipad"||i&&(W==3||W>=4&&!k)||A.silk?A.tablet=N:(k||l=="iphone"||l=="ipod"||i||o||A.blackberry||A.webos||A.bada)&&(A.mobile=N),A.msedge||A.msie&&A.version>=10||A.yandexbrowser&&A.version>=15||A.vivaldi&&A.version>=1||A.chrome&&A.version>=20||A.samsungBrowser&&A.version>=4||A.whale&&m([A.version,"1.0"])===1||A.mzbrowser&&m([A.version,"6.0"])===1||A.focus&&m([A.version,"1.0"])===1||A.firefox&&A.version>=20||A.safari&&A.version>=6||A.opera&&A.version>=10||A.ios&&A.osversion&&A.osversion.split(".")[0]>=6||A.blackberry&&A.version>=10.1||A.chromium&&A.version>=20?A.a=N:A.msie&&A.version<10||A.chrome&&A.version<20||A.firefox&&A.version<20||A.safari&&A.version<6||A.opera&&A.version<10||A.ios&&A.osversion&&A.osversion.split(".")[0]<6||A.chromium&&A.version<20?A.c=N:A.x=N,A}var O=v(typeof navigator!="undefined"&&navigator.userAgent||"");O.test=function(p){for(var d=0;d<p.length;++d){var t=p[d];if(typeof t=="string"&&t in O)return!0}return!1};function M(p){return p.split(".").length}function y(p,d){var t=[],l;if(Array.prototype.map)return Array.prototype.map.call(p,d);for(l=0;l<p.length;l++)t.push(d(p[l]));return t}function m(p){for(var d=Math.max(M(p[0]),M(p[1])),t=y(p,function(l){var r=d-M(l);return l=l+new Array(r+1).join(".0"),y(l.split("."),function(i){return new Array(20-i.length).join("0")+i}).reverse()});--d>=0;){if(t[0][d]>t[1][d])return 1;if(t[0][d]===t[1][d]){if(d===0)return 0}else return-1}}function S(p,d,t){var l=O;typeof d=="string"&&(t=d,d=void 0),d===void 0&&(d=!1),t&&(l=v(t));var r=""+l.version;for(var i in p)if(p.hasOwnProperty(i)&&l[i]){if(typeof p[i]!="string")throw new Error("Browser version in the minVersion map should be a string: "+i+": "+String(p));return m([r,p[i]])<0}return d}function b(p,d,t){return!S(p,d,t)}return O.isUnsupportedBrowser=S,O.compareVersions=m,O.check=b,O._detect=v,O.detect=v,O})},{}],71:[function(F,$,j){},{}],72:[function(F,$,j){var N=F("buffer").Buffer,v=N.isEncoding||function(b){switch(b&&b.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 O(b){if(b&&!v(b))throw new Error("Unknown encoding: "+b)}var M=j.StringDecoder=function(b){this.encoding=(b||"utf8").toLowerCase().replace(/[-_]/,""),O(b);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=m;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=S;break;default:this.write=y;return}this.charBuffer=new N(6),this.charReceived=0,this.charLength=0};M.prototype.write=function(b){for(var p="";this.charLength;){var d=b.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:b.length;if(b.copy(this.charBuffer,this.charReceived,0,d),this.charReceived+=d,this.charReceived<this.charLength)return"";b=b.slice(d,b.length),p=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var l=p.charCodeAt(p.length-1);if(l>=55296&&l<=56319){this.charLength+=this.surrogateSize,p="";continue}if(this.charReceived=this.charLength=0,b.length===0)return p;break}this.detectIncompleteChar(b);var t=b.length;this.charLength&&(b.copy(this.charBuffer,0,b.length-this.charReceived,t),t-=this.charReceived),p+=b.toString(this.encoding,0,t);var t=p.length-1,l=p.charCodeAt(t);if(l>=55296&&l<=56319){var r=this.surrogateSize;return this.charLength+=r,this.charReceived+=r,this.charBuffer.copy(this.charBuffer,r,0,r),b.copy(this.charBuffer,0,0,r),p.substring(0,t)}return p},M.prototype.detectIncompleteChar=function(b){for(var p=b.length>=3?3:b.length;p>0;p--){var d=b[b.length-p];if(p==1&&d>>5==6){this.charLength=2;break}if(p<=2&&d>>4==14){this.charLength=3;break}if(p<=3&&d>>3==30){this.charLength=4;break}}this.charReceived=p},M.prototype.end=function(b){var p="";if(b&&b.length&&(p=this.write(b)),this.charReceived){var d=this.charReceived,t=this.charBuffer,l=this.encoding;p+=t.slice(0,d).toString(l)}return p};function y(b){return b.toString(this.encoding)}function m(b){this.charReceived=b.length%2,this.charLength=this.charReceived?2:0}function S(b){this.charReceived=b.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(F,$,j){(function(N,v){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/"use strict";var O=F("base64-js"),M=F("ieee754"),y=F("isarray");j.Buffer=v,j.SlowBuffer=a,j.INSPECT_MAX_BYTES=50,v.TYPED_ARRAY_SUPPORT=N.TYPED_ARRAY_SUPPORT!==void 0?N.TYPED_ARRAY_SUPPORT:m(),j.kMaxLength=S();function m(){try{var ne=new Uint8Array(1);return ne.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ne.foo()===42&&typeof ne.subarray=="function"&&ne.subarray(1,1).byteLength===0}catch(J){return!1}}function S(){return v.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function b(ne,J){if(S()<J)throw new RangeError("Invalid typed array length");return v.TYPED_ARRAY_SUPPORT?(ne=new Uint8Array(J),ne.__proto__=v.prototype):(ne===null&&(ne=new v(J)),ne.length=J),ne}function v(ne,J,X){if(!v.TYPED_ARRAY_SUPPORT&&!(this instanceof v))return new v(ne,J,X);if(typeof ne=="number"){if(typeof J=="string")throw new Error("If encoding is specified then the first argument must be a string");return l(this,ne)}return p(this,ne,J,X)}v.poolSize=8192,v._augment=function(ne){return ne.__proto__=v.prototype,ne};function p(ne,J,X,Q){if(typeof J=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&J instanceof ArrayBuffer?o(ne,J,X,Q):typeof J=="string"?r(ne,J,X):s(ne,J)}v.from=function(ne,J,X){return p(null,ne,J,X)},v.TYPED_ARRAY_SUPPORT&&(v.prototype.__proto__=Uint8Array.prototype,v.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&v[Symbol.species]===v&&Object.defineProperty(v,Symbol.species,{value:null,configurable:!0}));function d(ne){if(typeof ne!="number")throw new TypeError('"size" argument must be a number');if(ne<0)throw new RangeError('"size" argument must not be negative')}function t(ne,J,X,Q){return d(J),J<=0?b(ne,J):X!==void 0?typeof Q=="string"?b(ne,J).fill(X,Q):b(ne,J).fill(X):b(ne,J)}v.alloc=function(ne,J,X){return t(null,ne,J,X)};function l(ne,J){if(d(J),ne=b(ne,J<0?0:u(J)|0),!v.TYPED_ARRAY_SUPPORT)for(var X=0;X<J;++X)ne[X]=0;return ne}v.allocUnsafe=function(ne){return l(null,ne)},v.allocUnsafeSlow=function(ne){return l(null,ne)};function r(ne,J,X){if((typeof X!="string"||X==="")&&(X="utf8"),!v.isEncoding(X))throw new TypeError('"encoding" must be a valid string encoding');var Q=c(J,X)|0;ne=b(ne,Q);var me=ne.write(J,X);return me!==Q&&(ne=ne.slice(0,me)),ne}function i(ne,J){var X=J.length<0?0:u(J.length)|0;ne=b(ne,X);for(var Q=0;Q<X;Q+=1)ne[Q]=J[Q]&255;return ne}function o(ne,J,X,Q){if(J.byteLength,X<0||J.byteLength<X)throw new RangeError("'offset' is out of bounds");if(J.byteLength<X+(Q||0))throw new RangeError("'length' is out of bounds");return X===void 0&&Q===void 0?J=new Uint8Array(J):Q===void 0?J=new Uint8Array(J,X):J=new Uint8Array(J,X,Q),v.TYPED_ARRAY_SUPPORT?(ne=J,ne.__proto__=v.prototype):ne=i(ne,J),ne}function s(ne,J){if(v.isBuffer(J)){var X=u(J.length)|0;return ne=b(ne,X),ne.length===0||J.copy(ne,0,0,X),ne}if(J){if(typeof ArrayBuffer!="undefined"&&J.buffer instanceof ArrayBuffer||"length"in J)return typeof J.length!="number"||Ee(J.length)?b(ne,0):i(ne,J);if(J.type==="Buffer"&&y(J.data))return i(ne,J.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function u(ne){if(ne>=S())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S().toString(16)+" bytes");return ne|0}function a(ne){return+ne!=ne&&(ne=0),v.alloc(+ne)}v.isBuffer=function(J){return!!(J!=null&&J._isBuffer)},v.compare=function(J,X){if(!v.isBuffer(J)||!v.isBuffer(X))throw new TypeError("Arguments must be Buffers");if(J===X)return 0;for(var Q=J.length,me=X.length,fe=0,Te=Math.min(Q,me);fe<Te;++fe)if(J[fe]!==X[fe]){Q=J[fe],me=X[fe];break}return Q<me?-1:me<Q?1:0},v.isEncoding=function(J){switch(String(J).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}},v.concat=function(J,X){if(!y(J))throw new TypeError('"list" argument must be an Array of Buffers');if(J.length===0)return v.alloc(0);var Q;if(X===void 0)for(X=0,Q=0;Q<J.length;++Q)X+=J[Q].length;var me=v.allocUnsafe(X),fe=0;for(Q=0;Q<J.length;++Q){var Te=J[Q];if(!v.isBuffer(Te))throw new TypeError('"list" argument must be an Array of Buffers');Te.copy(me,fe),fe+=Te.length}return me};function c(ne,J){if(v.isBuffer(ne))return ne.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ne)||ne instanceof ArrayBuffer))return ne.byteLength;typeof ne!="string"&&(ne=""+ne);var X=ne.length;if(X===0)return 0;for(var Q=!1;;)switch(J){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":case void 0:return se(ne).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X*2;case"hex":return X>>>1;case"base64":return ee(ne).length;default:if(Q)return se(ne).length;J=(""+J).toLowerCase(),Q=!0}}v.byteLength=c;function f(ne,J,X){var Q=!1;if((J===void 0||J<0)&&(J=0),J>this.length)return"";if((X===void 0||X>this.length)&&(X=this.length),X<=0)return"";if(X>>>=0,J>>>=0,X<=J)return"";for(ne||(ne="utf8");;)switch(ne){case"hex":return z(this,J,X);case"utf8":case"utf-8":return L(this,J,X);case"ascii":return K(this,J,X);case"latin1":case"binary":return W(this,J,X);case"base64":return k(this,J,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,J,X);default:if(Q)throw new TypeError("Unknown encoding: "+ne);ne=(ne+"").toLowerCase(),Q=!0}}v.prototype._isBuffer=!0;function w(ne,J,X){var Q=ne[J];ne[J]=ne[X],ne[X]=Q}v.prototype.swap16=function(){var J=this.length;if(J%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var X=0;X<J;X+=2)w(this,X,X+1);return this},v.prototype.swap32=function(){var J=this.length;if(J%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var X=0;X<J;X+=4)w(this,X,X+3),w(this,X+1,X+2);return this},v.prototype.swap64=function(){var J=this.length;if(J%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var X=0;X<J;X+=8)w(this,X,X+7),w(this,X+1,X+6),w(this,X+2,X+5),w(this,X+3,X+4);return this},v.prototype.toString=function(){var J=this.length|0;return J===0?"":arguments.length===0?L(this,0,J):f.apply(this,arguments)},v.prototype.equals=function(J){if(!v.isBuffer(J))throw new TypeError("Argument must be a Buffer");return this===J?!0:v.compare(this,J)===0},v.prototype.inspect=function(){var J="",X=j.INSPECT_MAX_BYTES;return this.length>0&&(J=this.toString("hex",0,X).match(/.{2}/g).join(" "),this.length>X&&(J+=" ... ")),"<Buffer "+J+">"},v.prototype.compare=function(J,X,Q,me,fe){if(!v.isBuffer(J))throw new TypeError("Argument must be a Buffer");if(X===void 0&&(X=0),Q===void 0&&(Q=J?J.length:0),me===void 0&&(me=0),fe===void 0&&(fe=this.length),X<0||Q>J.length||me<0||fe>this.length)throw new RangeError("out of range index");if(me>=fe&&X>=Q)return 0;if(me>=fe)return-1;if(X>=Q)return 1;if(X>>>=0,Q>>>=0,me>>>=0,fe>>>=0,this===J)return 0;for(var Te=fe-me,ze=Q-X,Je=Math.min(Te,ze),qe=this.slice(me,fe),Xe=J.slice(X,Q),et=0;et<Je;++et)if(qe[et]!==Xe[et]){Te=qe[et],ze=Xe[et];break}return Te<ze?-1:ze<Te?1:0};function _(ne,J,X,Q,me){if(ne.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=me?0:ne.length-1),X<0&&(X=ne.length+X),X>=ne.length){if(me)return-1;X=ne.length-1}else if(X<0)if(me)X=0;else return-1;if(typeof J=="string"&&(J=v.from(J,Q)),v.isBuffer(J))return J.length===0?-1:h(ne,J,X,Q,me);if(typeof J=="number")return J=J&255,v.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?me?Uint8Array.prototype.indexOf.call(ne,J,X):Uint8Array.prototype.lastIndexOf.call(ne,J,X):h(ne,[J],X,Q,me);throw new TypeError("val must be string, number or Buffer")}function h(ne,J,X,Q,me){var fe=1,Te=ne.length,ze=J.length;if(Q!==void 0&&(Q=String(Q).toLowerCase(),Q==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if(ne.length<2||J.length<2)return-1;fe=2,Te/=2,ze/=2,X/=2}function Je(Le,Oe){return fe===1?Le[Oe]:Le.readUInt16BE(Oe*fe)}var qe;if(me){var Xe=-1;for(qe=X;qe<Te;qe++)if(Je(ne,qe)===Je(J,Xe===-1?0:qe-Xe)){if(Xe===-1&&(Xe=qe),qe-Xe+1===ze)return Xe*fe}else Xe!==-1&&(qe-=qe-Xe),Xe=-1}else for(X+ze>Te&&(X=Te-ze),qe=X;qe>=0;qe--){for(var et=!0,rt=0;rt<ze;rt++)if(Je(ne,qe+rt)!==Je(J,rt)){et=!1;break}if(et)return qe}return-1}v.prototype.includes=function(J,X,Q){return this.indexOf(J,X,Q)!==-1},v.prototype.indexOf=function(J,X,Q){return _(this,J,X,Q,!0)},v.prototype.lastIndexOf=function(J,X,Q){return _(this,J,X,Q,!1)};function R(ne,J,X,Q){X=Number(X)||0;var me=ne.length-X;Q?(Q=Number(Q),Q>me&&(Q=me)):Q=me;var fe=J.length;if(fe%2!==0)throw new TypeError("Invalid hex string");Q>fe/2&&(Q=fe/2);for(var Te=0;Te<Q;++Te){var ze=parseInt(J.substr(Te*2,2),16);if(isNaN(ze))return Te;ne[X+Te]=ze}return Te}function C(ne,J,X,Q){return ie(se(J,ne.length-X),ne,X,Q)}function g(ne,J,X,Q){return ie(te(J),ne,X,Q)}function x(ne,J,X,Q){return g(ne,J,X,Q)}function E(ne,J,X,Q){return ie(ee(J),ne,X,Q)}function T(ne,J,X,Q){return ie(be(J,ne.length-X),ne,X,Q)}v.prototype.write=function(J,X,Q,me){if(X===void 0)me="utf8",Q=this.length,X=0;else if(Q===void 0&&typeof X=="string")me=X,Q=this.length,X=0;else if(isFinite(X))X=X|0,isFinite(Q)?(Q=Q|0,me===void 0&&(me="utf8")):(me=Q,Q=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var fe=this.length-X;if((Q===void 0||Q>fe)&&(Q=fe),J.length>0&&(Q<0||X<0)||X>this.length)throw new RangeError("Attempt to write outside buffer bounds");me||(me="utf8");for(var Te=!1;;)switch(me){case"hex":return R(this,J,X,Q);case"utf8":case"utf-8":return C(this,J,X,Q);case"ascii":return g(this,J,X,Q);case"latin1":case"binary":return x(this,J,X,Q);case"base64":return E(this,J,X,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,J,X,Q);default:if(Te)throw new TypeError("Unknown encoding: "+me);me=(""+me).toLowerCase(),Te=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(ne,J,X){return J===0&&X===ne.length?O.fromByteArray(ne):O.fromByteArray(ne.slice(J,X))}function L(ne,J,X){X=Math.min(ne.length,X);for(var Q=[],me=J;me<X;){var fe=ne[me],Te=null,ze=fe>239?4:fe>223?3:fe>191?2:1;if(me+ze<=X){var Je,qe,Xe,et;switch(ze){case 1:fe<128&&(Te=fe);break;case 2:Je=ne[me+1],(Je&192)===128&&(et=(fe&31)<<6|Je&63,et>127&&(Te=et));break;case 3:Je=ne[me+1],qe=ne[me+2],(Je&192)===128&&(qe&192)===128&&(et=(fe&15)<<12|(Je&63)<<6|qe&63,et>2047&&(et<55296||et>57343)&&(Te=et));break;case 4:Je=ne[me+1],qe=ne[me+2],Xe=ne[me+3],(Je&192)===128&&(qe&192)===128&&(Xe&192)===128&&(et=(fe&15)<<18|(Je&63)<<12|(qe&63)<<6|Xe&63,et>65535&&et<1114112&&(Te=et))}}Te===null?(Te=65533,ze=1):Te>65535&&(Te-=65536,Q.push(Te>>>10&1023|55296),Te=56320|Te&1023),Q.push(Te),me+=ze}return G(Q)}var A=4096;function G(ne){var J=ne.length;if(J<=A)return String.fromCharCode.apply(String,ne);for(var X="",Q=0;Q<J;)X+=String.fromCharCode.apply(String,ne.slice(Q,Q+=A));return X}function K(ne,J,X){var Q="";X=Math.min(ne.length,X);for(var me=J;me<X;++me)Q+=String.fromCharCode(ne[me]&127);return Q}function W(ne,J,X){var Q="";X=Math.min(ne.length,X);for(var me=J;me<X;++me)Q+=String.fromCharCode(ne[me]);return Q}function z(ne,J,X){var Q=ne.length;(!J||J<0)&&(J=0),(!X||X<0||X>Q)&&(X=Q);for(var me="",fe=J;fe<X;++fe)me+=oe(ne[fe]);return me}function U(ne,J,X){for(var Q=ne.slice(J,X),me="",fe=0;fe<Q.length;fe+=2)me+=String.fromCharCode(Q[fe]+Q[fe+1]*256);return me}v.prototype.slice=function(J,X){var Q=this.length;J=~~J,X=X===void 0?Q:~~X,J<0?(J+=Q,J<0&&(J=0)):J>Q&&(J=Q),X<0?(X+=Q,X<0&&(X=0)):X>Q&&(X=Q),X<J&&(X=J);var me;if(v.TYPED_ARRAY_SUPPORT)me=this.subarray(J,X),me.__proto__=v.prototype;else{var fe=X-J;me=new v(fe,void 0);for(var Te=0;Te<fe;++Te)me[Te]=this[Te+J]}return me};function P(ne,J,X){if(ne%1!==0||ne<0)throw new RangeError("offset is not uint");if(ne+J>X)throw new RangeError("Trying to access beyond buffer length")}v.prototype.readUIntLE=function(J,X,Q){J=J|0,X=X|0,Q||P(J,X,this.length);for(var me=this[J],fe=1,Te=0;++Te<X&&(fe*=256);)me+=this[J+Te]*fe;return me},v.prototype.readUIntBE=function(J,X,Q){J=J|0,X=X|0,Q||P(J,X,this.length);for(var me=this[J+--X],fe=1;X>0&&(fe*=256);)me+=this[J+--X]*fe;return me},v.prototype.readUInt8=function(J,X){return X||P(J,1,this.length),this[J]},v.prototype.readUInt16LE=function(J,X){return X||P(J,2,this.length),this[J]|this[J+1]<<8},v.prototype.readUInt16BE=function(J,X){return X||P(J,2,this.length),this[J]<<8|this[J+1]},v.prototype.readUInt32LE=function(J,X){return X||P(J,4,this.length),(this[J]|this[J+1]<<8|this[J+2]<<16)+this[J+3]*16777216},v.prototype.readUInt32BE=function(J,X){return X||P(J,4,this.length),this[J]*16777216+(this[J+1]<<16|this[J+2]<<8|this[J+3])},v.prototype.readIntLE=function(J,X,Q){J=J|0,X=X|0,Q||P(J,X,this.length);for(var me=this[J],fe=1,Te=0;++Te<X&&(fe*=256);)me+=this[J+Te]*fe;return fe*=128,me>=fe&&(me-=Math.pow(2,8*X)),me},v.prototype.readIntBE=function(J,X,Q){J=J|0,X=X|0,Q||P(J,X,this.length);for(var me=X,fe=1,Te=this[J+--me];me>0&&(fe*=256);)Te+=this[J+--me]*fe;return fe*=128,Te>=fe&&(Te-=Math.pow(2,8*X)),Te},v.prototype.readInt8=function(J,X){return X||P(J,1,this.length),this[J]&128?(255-this[J]+1)*-1:this[J]},v.prototype.readInt16LE=function(J,X){X||P(J,2,this.length);var Q=this[J]|this[J+1]<<8;return Q&32768?Q|4294901760:Q},v.prototype.readInt16BE=function(J,X){X||P(J,2,this.length);var Q=this[J+1]|this[J]<<8;return Q&32768?Q|4294901760:Q},v.prototype.readInt32LE=function(J,X){return X||P(J,4,this.length),this[J]|this[J+1]<<8|this[J+2]<<16|this[J+3]<<24},v.prototype.readInt32BE=function(J,X){return X||P(J,4,this.length),this[J]<<24|this[J+1]<<16|this[J+2]<<8|this[J+3]},v.prototype.readFloatLE=function(J,X){return X||P(J,4,this.length),M.read(this,J,!0,23,4)},v.prototype.readFloatBE=function(J,X){return X||P(J,4,this.length),M.read(this,J,!1,23,4)},v.prototype.readDoubleLE=function(J,X){return X||P(J,8,this.length),M.read(this,J,!0,52,8)},v.prototype.readDoubleBE=function(J,X){return X||P(J,8,this.length),M.read(this,J,!1,52,8)};function H(ne,J,X,Q,me,fe){if(!v.isBuffer(ne))throw new TypeError('"buffer" argument must be a Buffer instance');if(J>me||J<fe)throw new RangeError('"value" argument is out of bounds');if(X+Q>ne.length)throw new RangeError("Index out of range")}v.prototype.writeUIntLE=function(J,X,Q,me){if(J=+J,X=X|0,Q=Q|0,!me){var fe=Math.pow(2,8*Q)-1;H(this,J,X,Q,fe,0)}var Te=1,ze=0;for(this[X]=J&255;++ze<Q&&(Te*=256);)this[X+ze]=J/Te&255;return X+Q},v.prototype.writeUIntBE=function(J,X,Q,me){if(J=+J,X=X|0,Q=Q|0,!me){var fe=Math.pow(2,8*Q)-1;H(this,J,X,Q,fe,0)}var Te=Q-1,ze=1;for(this[X+Te]=J&255;--Te>=0&&(ze*=256);)this[X+Te]=J/ze&255;return X+Q},v.prototype.writeUInt8=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,1,255,0),v.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),this[X]=J&255,X+1};function V(ne,J,X,Q){J<0&&(J=65535+J+1);for(var me=0,fe=Math.min(ne.length-X,2);me<fe;++me)ne[X+me]=(J&255<<8*(Q?me:1-me))>>>(Q?me:1-me)*8}v.prototype.writeUInt16LE=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8):V(this,J,X,!0),X+2},v.prototype.writeUInt16BE=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,2,65535,0),v.TYPED_ARRAY_SUPPORT?(this[X]=J>>>8,this[X+1]=J&255):V(this,J,X,!1),X+2};function q(ne,J,X,Q){J<0&&(J=4294967295+J+1);for(var me=0,fe=Math.min(ne.length-X,4);me<fe;++me)ne[X+me]=J>>>(Q?me:3-me)*8&255}v.prototype.writeUInt32LE=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[X+3]=J>>>24,this[X+2]=J>>>16,this[X+1]=J>>>8,this[X]=J&255):q(this,J,X,!0),X+4},v.prototype.writeUInt32BE=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,4,4294967295,0),v.TYPED_ARRAY_SUPPORT?(this[X]=J>>>24,this[X+1]=J>>>16,this[X+2]=J>>>8,this[X+3]=J&255):q(this,J,X,!1),X+4},v.prototype.writeIntLE=function(J,X,Q,me){if(J=+J,X=X|0,!me){var fe=Math.pow(2,8*Q-1);H(this,J,X,Q,fe-1,-fe)}var Te=0,ze=1,Je=0;for(this[X]=J&255;++Te<Q&&(ze*=256);)J<0&&Je===0&&this[X+Te-1]!==0&&(Je=1),this[X+Te]=(J/ze>>0)-Je&255;return X+Q},v.prototype.writeIntBE=function(J,X,Q,me){if(J=+J,X=X|0,!me){var fe=Math.pow(2,8*Q-1);H(this,J,X,Q,fe-1,-fe)}var Te=Q-1,ze=1,Je=0;for(this[X+Te]=J&255;--Te>=0&&(ze*=256);)J<0&&Je===0&&this[X+Te+1]!==0&&(Je=1),this[X+Te]=(J/ze>>0)-Je&255;return X+Q},v.prototype.writeInt8=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,1,127,-128),v.TYPED_ARRAY_SUPPORT||(J=Math.floor(J)),J<0&&(J=255+J+1),this[X]=J&255,X+1},v.prototype.writeInt16LE=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8):V(this,J,X,!0),X+2},v.prototype.writeInt16BE=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,2,32767,-32768),v.TYPED_ARRAY_SUPPORT?(this[X]=J>>>8,this[X+1]=J&255):V(this,J,X,!1),X+2},v.prototype.writeInt32LE=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,4,2147483647,-2147483648),v.TYPED_ARRAY_SUPPORT?(this[X]=J&255,this[X+1]=J>>>8,this[X+2]=J>>>16,this[X+3]=J>>>24):q(this,J,X,!0),X+4},v.prototype.writeInt32BE=function(J,X,Q){return J=+J,X=X|0,Q||H(this,J,X,4,2147483647,-2147483648),J<0&&(J=4294967295+J+1),v.TYPED_ARRAY_SUPPORT?(this[X]=J>>>24,this[X+1]=J>>>16,this[X+2]=J>>>8,this[X+3]=J&255):q(this,J,X,!1),X+4};function Z(ne,J,X,Q,me,fe){if(X+Q>ne.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function ce(ne,J,X,Q,me){return me||Z(ne,J,X,4,34028234663852886e22,-34028234663852886e22),M.write(ne,J,X,Q,23,4),X+4}v.prototype.writeFloatLE=function(J,X,Q){return ce(this,J,X,!0,Q)},v.prototype.writeFloatBE=function(J,X,Q){return ce(this,J,X,!1,Q)};function he(ne,J,X,Q,me){return me||Z(ne,J,X,8,17976931348623157e292,-17976931348623157e292),M.write(ne,J,X,Q,52,8),X+8}v.prototype.writeDoubleLE=function(J,X,Q){return he(this,J,X,!0,Q)},v.prototype.writeDoubleBE=function(J,X,Q){return he(this,J,X,!1,Q)},v.prototype.copy=function(J,X,Q,me){if(Q||(Q=0),!me&&me!==0&&(me=this.length),X>=J.length&&(X=J.length),X||(X=0),me>0&&me<Q&&(me=Q),me===Q)return 0;if(J.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(me<0)throw new RangeError("sourceEnd out of bounds");me>this.length&&(me=this.length),J.length-X<me-Q&&(me=J.length-X+Q);var fe=me-Q,Te;if(this===J&&Q<X&&X<me)for(Te=fe-1;Te>=0;--Te)J[Te+X]=this[Te+Q];else if(fe<1e3||!v.TYPED_ARRAY_SUPPORT)for(Te=0;Te<fe;++Te)J[Te+X]=this[Te+Q];else Uint8Array.prototype.set.call(J,this.subarray(Q,Q+fe),X);return fe},v.prototype.fill=function(J,X,Q,me){if(typeof J=="string"){if(typeof X=="string"?(me=X,X=0,Q=this.length):typeof Q=="string"&&(me=Q,Q=this.length),J.length===1){var fe=J.charCodeAt(0);fe<256&&(J=fe)}if(me!==void 0&&typeof me!="string")throw new TypeError("encoding must be a string");if(typeof me=="string"&&!v.isEncoding(me))throw new TypeError("Unknown encoding: "+me)}else typeof J=="number"&&(J=J&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,J||(J=0);var Te;if(typeof J=="number")for(Te=X;Te<Q;++Te)this[Te]=J;else{var ze=v.isBuffer(J)?J:se(new v(J,me).toString()),Je=ze.length;for(Te=0;Te<Q-X;++Te)this[Te+X]=ze[Te%Je]}return this};var ae=/[^+\/0-9A-Za-z-_]/g;function xe(ne){if(ne=ge(ne).replace(ae,""),ne.length<2)return"";for(;ne.length%4!==0;)ne=ne+"=";return ne}function ge(ne){return ne.trim?ne.trim():ne.replace(/^\s+|\s+$/g,"")}function oe(ne){return ne<16?"0"+ne.toString(16):ne.toString(16)}function se(ne,J){J=J||Infinity;for(var X,Q=ne.length,me=null,fe=[],Te=0;Te<Q;++Te){if(X=ne.charCodeAt(Te),X>55295&&X<57344){if(!me){if(X>56319){(J-=3)>-1&&fe.push(239,191,189);continue}else if(Te+1===Q){(J-=3)>-1&&fe.push(239,191,189);continue}me=X;continue}if(X<56320){(J-=3)>-1&&fe.push(239,191,189),me=X;continue}X=(me-55296<<10|X-56320)+65536}else me&&((J-=3)>-1&&fe.push(239,191,189));if(me=null,X<128){if((J-=1)<0)break;fe.push(X)}else if(X<2048){if((J-=2)<0)break;fe.push(X>>6|192,X&63|128)}else if(X<65536){if((J-=3)<0)break;fe.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((J-=4)<0)break;fe.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw new Error("Invalid code point")}return fe}function te(ne){for(var J=[],X=0;X<ne.length;++X)J.push(ne.charCodeAt(X)&255);return J}function be(ne,J){for(var X,Q,me,fe=[],Te=0;Te<ne.length&&!((J-=2)<0);++Te)X=ne.charCodeAt(Te),Q=X>>8,me=X%256,fe.push(me),fe.push(Q);return fe}function ee(ne){return O.toByteArray(xe(ne))}function ie(ne,J,X,Q){for(var me=0;me<Q&&!(me+X>=J.length||me>=ne.length);++me)J[me+X]=ne[me];return me}function Ee(ne){return ne!==ne}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},F("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(F,$,j){$.exports={"100":"Continue","101":"Switching Protocols","102":"Processing","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}},{}],75:[function(F,$,j){$.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],76:[function(F,$,j){/*!
* copy-to - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var N=Array.prototype.slice;$.exports=v;function v(M,y){if(!(this instanceof v))return new v(M,y);this.src=M,this._withAccess=y}v.prototype.withAccess=function(M){return this._withAccess=M!==!1,this},v.prototype.pick=function(M){return Array.isArray(M)||(M=N.call(arguments)),M.length&&(this.keys=M),this},v.prototype.to=function(M){if(M=M||{},!this.src)return M;var y=this.keys||Object.keys(this.src);if(!this._withAccess){for(var m=0;m<y.length;m++){if(S=y[m],M[S]!==void 0)continue;M[S]=this.src[S]}return M}for(var m=0;m<y.length;m++){var S=y[m];if(!O(M,S))continue;var b=this.src.__lookupGetter__(S),p=this.src.__lookupSetter__(S);b&&M.__defineGetter__(S,b),p&&M.__defineSetter__(S,p),!b&&!p&&(M[S]=this.src[S])}return M},v.prototype.toCover=function(M){for(var y=this.keys||Object.keys(this.src),m=0;m<y.length;m++){var S=y[m];delete M[S];var b=this.src.__lookupGetter__(S),p=this.src.__lookupSetter__(S);b&&M.__defineGetter__(S,b),p&&M.__defineSetter__(S,p),!b&&!p&&(M[S]=this.src[S])}},v.prototype.override=v.prototype.toCover,v.prototype.and=function(M){var y={};return this.to(y),this.src=M,this.to(y),this.src=y,this};function O(M,y){return M[y]===void 0&&M.__lookupGetter__(y)===void 0&&M.__lookupSetter__(y)===void 0}},{}],77:[function(F,$,j){F("../../modules/es6.string.iterator"),F("../../modules/es6.array.from"),$.exports=F("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(F,$,j){var N=F("../../modules/_core"),v=N.JSON||(N.JSON={stringify:JSON.stringify});$.exports=function(M){return v.stringify.apply(v,arguments)}},{"../../modules/_core":99}],79:[function(F,$,j){F("../../modules/es6.object.assign"),$.exports=F("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(F,$,j){F("../../modules/es6.object.create");var N=F("../../modules/_core").Object;$.exports=function(O,M){return N.create(O,M)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(F,$,j){F("../../modules/es6.object.define-property");var N=F("../../modules/_core").Object;$.exports=function(O,M,y){return N.defineProperty(O,M,y)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(F,$,j){F("../../modules/es7.object.entries"),$.exports=F("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(F,$,j){F("../../modules/es6.object.get-own-property-names");var N=F("../../modules/_core").Object;$.exports=function(O){return N.getOwnPropertyNames(O)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(F,$,j){F("../../modules/es6.object.get-prototype-of"),$.exports=F("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(F,$,j){F("../../modules/es6.object.keys"),$.exports=F("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(F,$,j){F("../modules/es6.object.to-string"),F("../modules/es6.string.iterator"),F("../modules/web.dom.iterable"),F("../modules/es6.promise"),F("../modules/es7.promise.finally"),F("../modules/es7.promise.try"),$.exports=F("../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(F,$,j){F("../modules/web.immediate"),$.exports=F("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(F,$,j){F("../../modules/es6.string.from-code-point"),$.exports=F("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(F,$,j){F("../../modules/es6.function.has-instance"),$.exports=F("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(F,$,j){F("../../modules/es6.symbol"),F("../../modules/es6.object.to-string"),F("../../modules/es7.symbol.async-iterator"),F("../../modules/es7.symbol.observable"),$.exports=F("../../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(F,$,j){F("../../modules/es6.string.iterator"),F("../../modules/web.dom.iterable"),$.exports=F("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(F,$,j){$.exports=function(N){if(typeof N!="function")throw TypeError(N+" is not a function!");return N}},{}],93:[function(F,$,j){$.exports=function(){}},{}],94:[function(F,$,j){$.exports=function(N,v,O,M){if(!(N instanceof v)||M!==void 0&&M in N)throw TypeError(O+": incorrect invocation!");return N}},{}],95:[function(F,$,j){var N=F("./_is-object");$.exports=function(v){if(!N(v))throw TypeError(v+" is not an object!");return v}},{"./_is-object":119}],96:[function(F,$,j){var N=F("./_to-iobject"),v=F("./_to-length"),O=F("./_to-absolute-index");$.exports=function(M){return function(y,m,S){var b=N(y),p=v(b.length),d=O(S,p),t;if(M&&m!=m){for(;p>d;)if(t=b[d++],t!=t)return!0}else for(;p>d;d++)if((M||d in b)&&b[d]===m)return M||d||0;return!M&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(F,$,j){var N=F("./_cof"),v=F("./_wks")("toStringTag"),O=N(function(){return arguments}())=="Arguments",M=function(y,m){try{return y[m]}catch(S){}};$.exports=function(y){var m,S,b;return y===void 0?"Undefined":y===null?"Null":typeof(S=M(m=Object(y),v))=="string"?S:O?N(m):(b=N(m))=="Object"&&typeof m.callee=="function"?"Arguments":b}},{"./_cof":98,"./_wks":166}],98:[function(F,$,j){var N={}.toString;$.exports=function(v){return N.call(v).slice(8,-1)}},{}],99:[function(F,$,j){var N=$.exports={version:"2.6.11"};typeof __e=="number"&&(__e=N)},{}],100:[function(F,$,j){"use strict";var N=F("./_object-dp"),v=F("./_property-desc");$.exports=function(O,M,y){M in O?N.f(O,M,v(0,y)):O[M]=y}},{"./_object-dp":132,"./_property-desc":146}],101:[function(F,$,j){var N=F("./_a-function");$.exports=function(v,O,M){if(N(v),O===void 0)return v;switch(M){case 1:return function(y){return v.call(O,y)};case 2:return function(y,m){return v.call(O,y,m)};case 3:return function(y,m,S){return v.call(O,y,m,S)}}return function(){return v.apply(O,arguments)}}},{"./_a-function":92}],102:[function(F,$,j){$.exports=function(N){if(N==null)throw TypeError("Can't call method on "+N);return N}},{}],103:[function(F,$,j){$.exports=!F("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(F,$,j){var N=F("./_is-object"),v=F("./_global").document,O=N(v)&&N(v.createElement);$.exports=function(M){return O?v.createElement(M):{}}},{"./_global":110,"./_is-object":119}],105:[function(F,$,j){$.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(F,$,j){var N=F("./_object-keys"),v=F("./_object-gops"),O=F("./_object-pie");$.exports=function(M){var y=N(M),m=v.f;if(m)for(var S=m(M),b=O.f,p=0,d;S.length>p;)b.call(M,d=S[p++])&&y.push(d);return y}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(F,$,j){var N=F("./_global"),v=F("./_core"),O=F("./_ctx"),M=F("./_hide"),y=F("./_has"),m="prototype",S=function(b,p,d){var t=b&S.F,l=b&S.G,r=b&S.S,i=b&S.P,o=b&S.B,s=b&S.W,u=l?v:v[p]||(v[p]={}),a=u[m],c=l?N:r?N[p]:(N[p]||{})[m],f,w,_;l&&(d=p);for(f in d){if(w=!t&&c&&c[f]!==void 0,w&&y(u,f))continue;_=w?c[f]:d[f],u[f]=l&&typeof c[f]!="function"?d[f]:o&&w?O(_,N):s&&c[f]==_?function(h){var R=function(C,g,x){if(this instanceof h){switch(arguments.length){case 0:return new h;case 1:return new h(C);case 2:return new h(C,g)}return new h(C,g,x)}return h.apply(this,arguments)};return R[m]=h[m],R}(_):i&&typeof _=="function"?O(Function.call,_):_,i&&((u.virtual||(u.virtual={}))[f]=_,b&S.R&&a&&!a[f]&&M(a,f,_))}};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(F,$,j){$.exports=function(N){try{return!!N()}catch(v){return!0}}},{}],109:[function(F,$,j){var N=F("./_ctx"),v=F("./_iter-call"),O=F("./_is-array-iter"),M=F("./_an-object"),y=F("./_to-length"),m=F("./core.get-iterator-method"),S={},b={},j=$.exports=function(p,d,t,l,r){var i=r?function(){return p}:m(p),o=N(t,l,d?2:1),s=0,u,a,c,f;if(typeof i!="function")throw TypeError(p+" is not iterable!");if(O(i)){for(u=y(p.length);u>s;s++)if(f=d?o(M(a=p[s])[0],a[1]):o(p[s]),f===S||f===b)return f}else for(c=i.call(p);!(a=c.next()).done;)if(f=v(c,o,a.value,d),f===S||f===b)return f};j.BREAK=S,j.RETURN=b},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(F,$,j){var N=$.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=N)},{}],111:[function(F,$,j){var N={}.hasOwnProperty;$.exports=function(v,O){return N.call(v,O)}},{}],112:[function(F,$,j){var N=F("./_object-dp"),v=F("./_property-desc");$.exports=F("./_descriptors")?function(O,M,y){return N.f(O,M,v(1,y))}:function(O,M,y){return O[M]=y,O}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(F,$,j){var N=F("./_global").document;$.exports=N&&N.documentElement},{"./_global":110}],114:[function(F,$,j){$.exports=!F("./_descriptors")&&!F("./_fails")(function(){return Object.defineProperty(F("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(F,$,j){$.exports=function(N,v,O){var M=O===void 0;switch(v.length){case 0:return M?N():N.call(O);case 1:return M?N(v[0]):N.call(O,v[0]);case 2:return M?N(v[0],v[1]):N.call(O,v[0],v[1]);case 3:return M?N(v[0],v[1],v[2]):N.call(O,v[0],v[1],v[2]);case 4:return M?N(v[0],v[1],v[2],v[3]):N.call(O,v[0],v[1],v[2],v[3])}return N.apply(O,v)}},{}],116:[function(F,$,j){var N=F("./_cof");$.exports=Object("z").propertyIsEnumerable(0)?Object:function(v){return N(v)=="String"?v.split(""):Object(v)}},{"./_cof":98}],117:[function(F,$,j){var N=F("./_iterators"),v=F("./_wks")("iterator"),O=Array.prototype;$.exports=function(M){return M!==void 0&&(N.Array===M||O[v]===M)}},{"./_iterators":125,"./_wks":166}],118:[function(F,$,j){var N=F("./_cof");$.exports=Array.isArray||function(O){return N(O)=="Array"}},{"./_cof":98}],119:[function(F,$,j){$.exports=function(N){return typeof N=="object"?N!==null:typeof N=="function"}},{}],120:[function(F,$,j){var N=F("./_an-object");$.exports=function(v,O,M,y){try{return y?O(N(M)[0],M[1]):O(M)}catch(S){var m=v.return;throw m!==void 0&&N(m.call(v)),S}}},{"./_an-object":95}],121:[function(F,$,j){"use strict";var N=F("./_object-create"),v=F("./_property-desc"),O=F("./_set-to-string-tag"),M={};F("./_hide")(M,F("./_wks")("iterator"),function(){return this}),$.exports=function(y,m,S){y.prototype=N(M,{next:v(1,S)}),O(y,m+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(F,$,j){"use strict";var N=F("./_library"),v=F("./_export"),O=F("./_redefine"),M=F("./_hide"),y=F("./_iterators"),m=F("./_iter-create"),S=F("./_set-to-string-tag"),b=F("./_object-gpo"),p=F("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),t="@@iterator",l="keys",r="values",i=function(){return this};$.exports=function(o,s,u,a,c,f,w){m(u,s,a);var _=function(K){if(!d&&K in g)return g[K];switch(K){case l:return function(){return new u(this,K)};case r:return function(){return new u(this,K)}}return function(){return new u(this,K)}},h=s+" Iterator",R=c==r,C=!1,g=o.prototype,x=g[p]||g[t]||c&&g[c],E=x||_(c),T=c?R?_("entries"):E:void 0,k=s=="Array"&&g.entries||x,L,A,G;if(k&&(G=b(k.call(new o)),G!==Object.prototype&&G.next&&(S(G,h,!0),!N&&typeof G[p]!="function"&&M(G,p,i))),R&&x&&x.name!==r&&(C=!0,E=function(){return x.call(this)}),(!N||w)&&(d||C||!g[p])&&M(g,p,E),y[s]=E,y[h]=i,c)if(L={values:R?E:_(r),keys:f?E:_(l),entries:T},w)for(A in L)A in g||O(g,A,L[A]);else v(v.P+v.F*(d||C),s,L);return L}},{"./_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(F,$,j){var N=F("./_wks")("iterator"),v=!1;try{var O=[7][N]();O.return=function(){v=!0},Array.from(O,function(){throw 2})}catch(M){}$.exports=function(M,y){if(!y&&!v)return!1;var m=!1;try{var S=[7],b=S[N]();b.next=function(){return{done:m=!0}},S[N]=function(){return b},M(S)}catch(p){}return m}},{"./_wks":166}],124:[function(F,$,j){$.exports=function(N,v){return{value:v,done:!!N}}},{}],125:[function(F,$,j){$.exports={}},{}],126:[function(F,$,j){$.exports=!0},{}],127:[function(F,$,j){var N=F("./_uid")("meta"),v=F("./_is-object"),O=F("./_has"),M=F("./_object-dp").f,y=0,m=Object.isExtensible||function(){return!0},S=!F("./_fails")(function(){return m(Object.preventExtensions({}))}),b=function(r){M(r,N,{value:{i:"O"+ ++y,w:{}}})},p=function(r,i){if(!v(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!O(r,N)){if(!m(r))return"F";if(!i)return"E";b(r)}return r[N].i},d=function(r,i){if(!O(r,N)){if(!m(r))return!0;if(!i)return!1;b(r)}return r[N].w},t=function(r){return S&&l.NEED&&m(r)&&!O(r,N)&&b(r),r},l=$.exports={KEY:N,NEED:!1,fastKey:p,getWeak:d,onFreeze:t}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(F,$,j){var N=F("./_global"),v=F("./_task").set,O=N.MutationObserver||N.WebKitMutationObserver,M=N.process,y=N.Promise,m=F("./_cof")(M)=="process";$.exports=function(){var S,b,p,d=function(){var i,o;for(m&&(i=M.domain)&&i.exit();S;){o=S.fn,S=S.next;try{o()}catch(s){throw S?p():b=void 0,s}}b=void 0,i&&i.enter()};if(m)p=function(){M.nextTick(d)};else if(O&&!(N.navigator&&N.navigator.standalone)){var t=!0,l=document.createTextNode("");new O(d).observe(l,{characterData:!0}),p=function(){l.data=t=!t}}else if(y&&y.resolve){var r=y.resolve(void 0);p=function(){r.then(d)}}else p=function(){v.call(N,d)};return function(i){var o={fn:i,next:void 0};b&&(b.next=o),S||(S=o,p()),b=o}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(F,$,j){"use strict";var N=F("./_a-function");function v(O){var M,y;this.promise=new O(function(m,S){if(M!==void 0||y!==void 0)throw TypeError("Bad Promise constructor");M=m,y=S}),this.resolve=N(M),this.reject=N(y)}$.exports.f=function(O){return new v(O)}},{"./_a-function":92}],130:[function(F,$,j){"use strict";var N=F("./_descriptors"),v=F("./_object-keys"),O=F("./_object-gops"),M=F("./_object-pie"),y=F("./_to-object"),m=F("./_iobject"),S=Object.assign;$.exports=!S||F("./_fails")(function(){var b={},p={},d=Symbol(),t="abcdefghijklmnopqrst";return b[d]=7,t.split("").forEach(function(l){p[l]=l}),S({},b)[d]!=7||Object.keys(S({},p)).join("")!=t})?function(p,d){for(var t=y(p),l=arguments.length,r=1,i=O.f,o=M.f;l>r;)for(var s=m(arguments[r++]),u=i?v(s).concat(i(s)):v(s),a=u.length,c=0,f;a>c;)f=u[c++],(!N||o.call(s,f))&&(t[f]=s[f]);return t}:S},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(F,$,j){var N=F("./_an-object"),v=F("./_object-dps"),O=F("./_enum-bug-keys"),M=F("./_shared-key")("IE_PROTO"),y=function(){},m="prototype",S=function(){var b=F("./_dom-create")("iframe"),p=O.length,d="<",t=">",l;for(b.style.display="none",F("./_html").appendChild(b),b.src="javascript:",l=b.contentWindow.document,l.open(),l.write(d+"script"+t+"document.F=Object"+d+"/script"+t),l.close(),S=l.F;p--;)delete S[m][O[p]];return S()};$.exports=Object.create||function(p,d){var t;return p!==null?(y[m]=N(p),t=new y,y[m]=null,t[M]=p):t=S(),d===void 0?t:v(t,d)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(F,$,j){var N=F("./_an-object"),v=F("./_ie8-dom-define"),O=F("./_to-primitive"),M=Object.defineProperty;j.f=F("./_descriptors")?Object.defineProperty:function(m,S,b){if(N(m),S=O(S,!0),N(b),v)try{return M(m,S,b)}catch(p){}if("get"in b||"set"in b)throw TypeError("Accessors not supported!");return"value"in b&&(m[S]=b.value),m}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(F,$,j){var N=F("./_object-dp"),v=F("./_an-object"),O=F("./_object-keys");$.exports=F("./_descriptors")?Object.defineProperties:function(y,m){v(y);for(var S=O(m),b=S.length,p=0,d;b>p;)N.f(y,d=S[p++],m[d]);return y}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(F,$,j){var N=F("./_object-pie"),v=F("./_property-desc"),O=F("./_to-iobject"),M=F("./_to-primitive"),y=F("./_has"),m=F("./_ie8-dom-define"),S=Object.getOwnPropertyDescriptor;j.f=F("./_descriptors")?S:function(p,d){if(p=O(p),d=M(d,!0),m)try{return S(p,d)}catch(t){}if(y(p,d))return v(!N.f.call(p,d),p[d])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(F,$,j){var N=F("./_to-iobject"),v=F("./_object-gopn").f,O={}.toString,M=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],y=function(m){try{return v(m)}catch(S){return M.slice()}};$.exports.f=function(S){return M&&O.call(S)=="[object Window]"?y(S):v(N(S))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(F,$,j){var N=F("./_object-keys-internal"),v=F("./_enum-bug-keys").concat("length","prototype");j.f=Object.getOwnPropertyNames||function(M){return N(M,v)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(F,$,j){j.f=Object.getOwnPropertySymbols},{}],138:[function(F,$,j){var N=F("./_has"),v=F("./_to-object"),O=F("./_shared-key")("IE_PROTO"),M=Object.prototype;$.exports=Object.getPrototypeOf||function(y){return y=v(y),N(y,O)?y[O]:typeof y.constructor=="function"&&y instanceof y.constructor?y.constructor.prototype:y instanceof Object?M:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(F,$,j){var N=F("./_has"),v=F("./_to-iobject"),O=F("./_array-includes")(!1),M=F("./_shared-key")("IE_PROTO");$.exports=function(y,m){var S=v(y),b=0,p=[],d;for(d in S)d!=M&&(N(S,d)&&p.push(d));for(;m.length>b;)N(S,d=m[b++])&&(~O(p,d)||p.push(d));return p}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(F,$,j){var N=F("./_object-keys-internal"),v=F("./_enum-bug-keys");$.exports=Object.keys||function(M){return N(M,v)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(F,$,j){j.f={}.propertyIsEnumerable},{}],142:[function(F,$,j){var N=F("./_export"),v=F("./_core"),O=F("./_fails");$.exports=function(M,y){var m=(v.Object||{})[M]||Object[M],S={};S[M]=y(m),N(N.S+N.F*O(function(){m(1)}),"Object",S)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(F,$,j){var N=F("./_descriptors"),v=F("./_object-keys"),O=F("./_to-iobject"),M=F("./_object-pie").f;$.exports=function(y){return function(m){for(var S=O(m),b=v(S),p=b.length,d=0,t=[],l;p>d;)l=b[d++],(!N||M.call(S,l))&&t.push(y?[l,S[l]]:S[l]);return t}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(F,$,j){$.exports=function(N){try{return{e:!1,v:N()}}catch(v){return{e:!0,v}}}},{}],145:[function(F,$,j){var N=F("./_an-object"),v=F("./_is-object"),O=F("./_new-promise-capability");$.exports=function(M,y){if(N(M),v(y)&&y.constructor===M)return y;var m=O.f(M),S=m.resolve;return S(y),m.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(F,$,j){$.exports=function(N,v){return{enumerable:!(N&1),configurable:!(N&2),writable:!(N&4),value:v}}},{}],147:[function(F,$,j){var N=F("./_hide");$.exports=function(v,O,M){for(var y in O)M&&v[y]?v[y]=O[y]:N(v,y,O[y]);return v}},{"./_hide":112}],148:[function(F,$,j){$.exports=F("./_hide")},{"./_hide":112}],149:[function(F,$,j){"use strict";var N=F("./_global"),v=F("./_core"),O=F("./_object-dp"),M=F("./_descriptors"),y=F("./_wks")("species");$.exports=function(m){var S=typeof v[m]=="function"?v[m]:N[m];M&&S&&!S[y]&&O.f(S,y,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(F,$,j){var N=F("./_object-dp").f,v=F("./_has"),O=F("./_wks")("toStringTag");$.exports=function(M,y,m){M&&!v(M=m?M:M.prototype,O)&&N(M,O,{configurable:!0,value:y})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(F,$,j){var N=F("./_shared")("keys"),v=F("./_uid");$.exports=function(O){return N[O]||(N[O]=v(O))}},{"./_shared":152,"./_uid":162}],152:[function(F,$,j){var N=F("./_core"),v=F("./_global"),O="__core-js_shared__",M=v[O]||(v[O]={});($.exports=function(y,m){return M[y]||(M[y]=m!==void 0?m:{})})("versions",[]).push({version:N.version,mode:F("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(F,$,j){var N=F("./_an-object"),v=F("./_a-function"),O=F("./_wks")("species");$.exports=function(M,y){var m=N(M).constructor,S;return m===void 0||(S=N(m)[O])==null?y:v(S)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(F,$,j){var N=F("./_to-integer"),v=F("./_defined");$.exports=function(O){return function(M,y){var m=String(v(M)),S=N(y),b=m.length,p,d;return S<0||S>=b?O?"":void 0:(p=m.charCodeAt(S),p<55296||p>56319||S+1===b||(d=m.charCodeAt(S+1))<56320||d>57343?O?m.charAt(S):p:O?m.slice(S,S+2):(p-55296<<10)+(d-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(F,$,j){var N=F("./_ctx"),v=F("./_invoke"),O=F("./_html"),M=F("./_dom-create"),y=F("./_global"),m=y.process,S=y.setImmediate,b=y.clearImmediate,p=y.MessageChannel,d=y.Dispatch,t=0,l={},r="onreadystatechange",i,o,s,u=function(){var c=+this;if(l.hasOwnProperty(c)){var f=l[c];delete l[c],f()}},a=function(c){u.call(c.data)};(!S||!b)&&(S=function(f){for(var w=[],_=1;arguments.length>_;)w.push(arguments[_++]);return l[++t]=function(){v(typeof f=="function"?f:Function(f),w)},i(t),t},b=function(f){delete l[f]},F("./_cof")(m)=="process"?i=function(c){m.nextTick(N(u,c,1))}:d&&d.now?i=function(c){d.now(N(u,c,1))}:p?(o=new p,s=o.port2,o.port1.onmessage=a,i=N(s.postMessage,s,1)):y.addEventListener&&typeof postMessage=="function"&&!y.importScripts?(i=function(c){y.postMessage(c+"","*")},y.addEventListener("message",a,!1)):r in M("script")?i=function(c){O.appendChild(M("script"))[r]=function(){O.removeChild(this),u.call(c)}}:i=function(c){setTimeout(N(u,c,1),0)}),$.exports={set:S,clear:b}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(F,$,j){var N=F("./_to-integer"),v=Math.max,O=Math.min;$.exports=function(M,y){return M=N(M),M<0?v(M+y,0):O(M,y)}},{"./_to-integer":157}],157:[function(F,$,j){var N=Math.ceil,v=Math.floor;$.exports=function(O){return isNaN(O=+O)?0:(O>0?v:N)(O)}},{}],158:[function(F,$,j){var N=F("./_iobject"),v=F("./_defined");$.exports=function(O){return N(v(O))}},{"./_defined":102,"./_iobject":116}],159:[function(F,$,j){var N=F("./_to-integer"),v=Math.min;$.exports=function(O){return O>0?v(N(O),9007199254740991):0}},{"./_to-integer":157}],160:[function(F,$,j){var N=F("./_defined");$.exports=function(v){return Object(N(v))}},{"./_defined":102}],161:[function(F,$,j){var N=F("./_is-object");$.exports=function(v,O){if(!N(v))return v;var M,y;if(O&&typeof(M=v.toString)=="function"&&!N(y=M.call(v)))return y;if(typeof(M=v.valueOf)=="function"&&!N(y=M.call(v)))return y;if(!O&&typeof(M=v.toString)=="function"&&!N(y=M.call(v)))return y;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(F,$,j){var N=0,v=Math.random();$.exports=function(O){return"Symbol(".concat(O===void 0?"":O,")_",(++N+v).toString(36))}},{}],163:[function(F,$,j){var N=F("./_global"),v=N.navigator;$.exports=v&&v.userAgent||""},{"./_global":110}],164:[function(F,$,j){var N=F("./_global"),v=F("./_core"),O=F("./_library"),M=F("./_wks-ext"),y=F("./_object-dp").f;$.exports=function(m){var S=v.Symbol||(v.Symbol=O?{}:N.Symbol||{});m.charAt(0)!="_"&&!(m in S)&&y(S,m,{value:M.f(m)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(F,$,j){j.f=F("./_wks")},{"./_wks":166}],166:[function(F,$,j){var N=F("./_shared")("wks"),v=F("./_uid"),O=F("./_global").Symbol,M=typeof O=="function",y=$.exports=function(m){return N[m]||(N[m]=M&&O[m]||(M?O:v)("Symbol."+m))};y.store=N},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(F,$,j){var N=F("./_classof"),v=F("./_wks")("iterator"),O=F("./_iterators");$.exports=F("./_core").getIteratorMethod=function(M){if(M!=null)return M[v]||M["@@iterator"]||O[N(M)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(F,$,j){"use strict";var N=F("./_ctx"),v=F("./_export"),O=F("./_to-object"),M=F("./_iter-call"),y=F("./_is-array-iter"),m=F("./_to-length"),S=F("./_create-property"),b=F("./core.get-iterator-method");v(v.S+v.F*!F("./_iter-detect")(function(p){Array.from(p)}),"Array",{from:function(d){var t=O(d),l=typeof this=="function"?this:Array,r=arguments.length,i=r>1?arguments[1]:void 0,o=i!==void 0,s=0,u=b(t),a,c,f,w;if(o&&(i=N(i,r>2?arguments[2]:void 0,2)),u!=null&&!(l==Array&&y(u)))for(w=u.call(t),c=new l;!(f=w.next()).done;s++)S(c,s,o?M(w,i,[f.value,s],!0):f.value);else for(a=m(t.length),c=new l(a);a>s;s++)S(c,s,o?i(t[s],s):t[s]);return c.length=s,c}})},{"./_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(F,$,j){"use strict";var N=F("./_add-to-unscopables"),v=F("./_iter-step"),O=F("./_iterators"),M=F("./_to-iobject");$.exports=F("./_iter-define")(Array,"Array",function(y,m){this._t=M(y),this._i=0,this._k=m},function(){var y=this._t,m=this._k,S=this._i++;return!y||S>=y.length?(this._t=void 0,v(1)):m=="keys"?v(0,S):m=="values"?v(0,y[S]):v(0,[S,y[S]])},"values"),O.Arguments=O.Array,N("keys"),N("values"),N("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(F,$,j){"use strict";var N=F("./_is-object"),v=F("./_object-gpo"),O=F("./_wks")("hasInstance"),M=Function.prototype;O in M||F("./_object-dp").f(M,O,{value:function(y){if(typeof this!="function"||!N(y))return!1;if(!N(this.prototype))return y instanceof this;for(;y=v(y);)if(this.prototype===y)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(F,$,j){var N=F("./_export");N(N.S+N.F,"Object",{assign:F("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(F,$,j){var N=F("./_export");N(N.S,"Object",{create:F("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(F,$,j){var N=F("./_export");N(N.S+N.F*!F("./_descriptors"),"Object",{defineProperty:F("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(F,$,j){F("./_object-sap")("getOwnPropertyNames",function(){return F("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(F,$,j){var N=F("./_to-object"),v=F("./_object-gpo");F("./_object-sap")("getPrototypeOf",function(){return function(M){return v(N(M))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(F,$,j){var N=F("./_to-object"),v=F("./_object-keys");F("./_object-sap")("keys",function(){return function(M){return v(N(M))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(F,$,j){arguments[4][71][0].apply(j,arguments)},{dup:71}],178:[function(F,$,j){"use strict";var N=F("./_library"),v=F("./_global"),O=F("./_ctx"),M=F("./_classof"),y=F("./_export"),m=F("./_is-object"),S=F("./_a-function"),b=F("./_an-instance"),p=F("./_for-of"),d=F("./_species-constructor"),t=F("./_task").set,l=F("./_microtask")(),r=F("./_new-promise-capability"),i=F("./_perform"),o=F("./_user-agent"),s=F("./_promise-resolve"),u="Promise",a=v.TypeError,c=v.process,f=c&&c.versions,w=f&&f.v8||"",_=v[u],h=M(c)=="process",R=function(){},C,g,x,E,T=g=r.f,k=!!function(){try{var P=_.resolve(1),H=(P.constructor={})[F("./_wks")("species")]=function(V){V(R,R)};return(h||typeof PromiseRejectionEvent=="function")&&P.then(R)instanceof H&&w.indexOf("6.6")!==0&&o.indexOf("Chrome/66")===-1}catch(V){}}(),L=function(P){var H;return m(P)&&typeof(H=P.then)=="function"?H:!1},A=function(P,H){if(P._n)return;P._n=!0;var V=P._c;l(function(){for(var q=P._v,Z=P._s==1,ce=0,he=function(ae){var xe=Z?ae.ok:ae.fail,ge=ae.resolve,oe=ae.reject,se=ae.domain,te,be,ee;try{xe?(Z||(P._h==2&&W(P),P._h=1),xe===!0?te=q:(se&&se.enter(),te=xe(q),se&&(se.exit(),ee=!0)),te===ae.promise?oe(a("Promise-chain cycle")):(be=L(te))?be.call(te,ge,oe):ge(te)):oe(q)}catch(ie){se&&!ee&&se.exit(),oe(ie)}};V.length>ce;)he(V[ce++]);P._c=[],P._n=!1,H&&!P._h&&G(P)})},G=function(P){t.call(v,function(){var H=P._v,V=K(P),q,Z,ce;if(V&&(q=i(function(){h?c.emit("unhandledRejection",H,P):(Z=v.onunhandledrejection)?Z({promise:P,reason:H}):(ce=v.console)&&ce.error&&ce.error("Unhandled promise rejection",H)}),P._h=h||K(P)?2:1),P._a=void 0,V&&q.e)throw q.v})},K=function(P){return P._h!==1&&(P._a||P._c).length===0},W=function(P){t.call(v,function(){var H;h?c.emit("rejectionHandled",P):(H=v.onrejectionhandled)&&H({promise:P,reason:P._v})})},z=function(P){var H=this;if(H._d)return;H._d=!0,H=H._w||H,H._v=P,H._s=2,H._a||(H._a=H._c.slice()),A(H,!0)},U=function(P){var H=this,V;if(H._d)return;H._d=!0,H=H._w||H;try{if(H===P)throw a("Promise can't be resolved itself");(V=L(P))?l(function(){var q={_w:H,_d:!1};try{V.call(P,O(U,q,1),O(z,q,1))}catch(Z){z.call(q,Z)}}):(H._v=P,H._s=1,A(H,!1))}catch(q){z.call({_w:H,_d:!1},q)}};k||(_=function(H){b(this,_,u,"_h"),S(H),C.call(this);try{H(O(U,this,1),O(z,this,1))}catch(V){z.call(this,V)}},C=function(H){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},C.prototype=F("./_redefine-all")(_.prototype,{then:function(H,V){var q=T(d(this,_));return q.ok=typeof H=="function"?H:!0,q.fail=typeof V=="function"&&V,q.domain=h?c.domain:void 0,this._c.push(q),this._a&&this._a.push(q),this._s&&A(this,!1),q.promise},catch:function(P){return this.then(void 0,P)}}),x=function(){var P=new C;this.promise=P,this.resolve=O(U,P,1),this.reject=O(z,P,1)},r.f=T=function(P){return P===_||P===E?new x(P):g(P)}),y(y.G+y.W+y.F*!k,{Promise:_}),F("./_set-to-string-tag")(_,u),F("./_set-species")(u),E=F("./_core")[u],y(y.S+y.F*!k,u,{reject:function(H){var V=T(this),q=V.reject;return q(H),V.promise}}),y(y.S+y.F*(N||!k),u,{resolve:function(H){return s(N&&this===E?_:this,H)}}),y(y.S+y.F*!(k&&F("./_iter-detect")(function(P){_.all(P).catch(R)})),u,{all:function(H){var V=this,q=T(V),Z=q.resolve,ce=q.reject,he=i(function(){var ae=[],xe=0,ge=1;p(H,!1,function(oe){var se=xe++,te=!1;ae.push(void 0),ge++,V.resolve(oe).then(function(be){if(te)return;te=!0,ae[se]=be,--ge||Z(ae)},ce)}),--ge||Z(ae)});return he.e&&ce(he.v),q.promise},race:function(H){var V=this,q=T(V),Z=q.reject,ce=i(function(){p(H,!1,function(he){V.resolve(he).then(q.resolve,Z)})});return ce.e&&Z(ce.v),q.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(F,$,j){var N=F("./_export"),v=F("./_to-absolute-index"),O=String.fromCharCode,M=String.fromCodePoint;N(N.S+N.F*(!!M&&M.length!=1),"String",{fromCodePoint:function(m){for(var S=[],b=arguments.length,p=0,d;b>p;){if(d=+arguments[p++],v(d,1114111)!==d)throw RangeError(d+" is not a valid code point");S.push(d<65536?O(d):O(((d-=65536)>>10)+55296,d%1024+56320))}return S.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(F,$,j){"use strict";var N=F("./_string-at")(!0);F("./_iter-define")(String,"String",function(v){this._t=String(v),this._i=0},function(){var v=this._t,O=this._i,M;return O>=v.length?{value:void 0,done:!0}:(M=N(v,O),this._i+=M.length,{value:M,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(F,$,j){"use strict";var N=F("./_global"),v=F("./_has"),O=F("./_descriptors"),M=F("./_export"),y=F("./_redefine"),m=F("./_meta").KEY,S=F("./_fails"),b=F("./_shared"),p=F("./_set-to-string-tag"),d=F("./_uid"),t=F("./_wks"),l=F("./_wks-ext"),r=F("./_wks-define"),i=F("./_enum-keys"),o=F("./_is-array"),s=F("./_an-object"),u=F("./_is-object"),a=F("./_to-object"),c=F("./_to-iobject"),f=F("./_to-primitive"),w=F("./_property-desc"),_=F("./_object-create"),h=F("./_object-gopn-ext"),R=F("./_object-gopd"),C=F("./_object-gops"),g=F("./_object-dp"),x=F("./_object-keys"),E=R.f,T=g.f,k=h.f,L=N.Symbol,A=N.JSON,G=A&&A.stringify,K="prototype",W=t("_hidden"),z=t("toPrimitive"),U={}.propertyIsEnumerable,P=b("symbol-registry"),H=b("symbols"),V=b("op-symbols"),q=Object[K],Z=typeof L=="function"&&!!C.f,ce=N.QObject,he=!ce||!ce[K]||!ce[K].findChild,ae=O&&S(function(){return _(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a!=7})?function(fe,Te,ze){var Je=E(q,Te);Je&&delete q[Te],T(fe,Te,ze),Je&&fe!==q&&T(q,Te,Je)}:T,xe=function(fe){var Te=H[fe]=_(L[K]);return Te._k=fe,Te},ge=Z&&typeof L.iterator=="symbol"?function(fe){return typeof fe=="symbol"}:function(fe){return fe instanceof L},oe=function(Te,ze,Je){return Te===q&&oe(V,ze,Je),s(Te),ze=f(ze,!0),s(Je),v(H,ze)?(Je.enumerable?(v(Te,W)&&Te[W][ze]&&(Te[W][ze]=!1),Je=_(Je,{enumerable:w(0,!1)})):(v(Te,W)||T(Te,W,w(1,{})),Te[W][ze]=!0),ae(Te,ze,Je)):T(Te,ze,Je)},se=function(Te,ze){s(Te);for(var Je=i(ze=c(ze)),qe=0,Xe=Je.length,et;Xe>qe;)oe(Te,et=Je[qe++],ze[et]);return Te},te=function(Te,ze){return ze===void 0?_(Te):se(_(Te),ze)},be=function(Te){var ze=U.call(this,Te=f(Te,!0));return this===q&&v(H,Te)&&!v(V,Te)?!1:ze||!v(this,Te)||!v(H,Te)||v(this,W)&&this[W][Te]?ze:!0},ee=function(Te,ze){if(Te=c(Te),ze=f(ze,!0),Te===q&&v(H,ze)&&!v(V,ze))return;var Je=E(Te,ze);return Je&&v(H,ze)&&!(v(Te,W)&&Te[W][ze])&&(Je.enumerable=!0),Je},ie=function(Te){for(var ze=k(c(Te)),Je=[],qe=0,Xe;ze.length>qe;)!v(H,Xe=ze[qe++])&&Xe!=W&&Xe!=m&&Je.push(Xe);return Je},Ee=function(Te){for(var ze=Te===q,Je=k(ze?V:c(Te)),qe=[],Xe=0,et;Je.length>Xe;)v(H,et=Je[Xe++])&&(ze?v(q,et):!0)&&qe.push(H[et]);return qe};Z||(L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var Te=d(arguments.length>0?arguments[0]:void 0),ze=function(Je){this===q&&ze.call(V,Je),v(this,W)&&v(this[W],Te)&&(this[W][Te]=!1),ae(this,Te,w(1,Je))};return O&&he&&ae(q,Te,{configurable:!0,set:ze}),xe(Te)},y(L[K],"toString",function(){return this._k}),R.f=ee,g.f=oe,F("./_object-gopn").f=h.f=ie,F("./_object-pie").f=be,C.f=Ee,O&&!F("./_library")&&y(q,"propertyIsEnumerable",be,!0),l.f=function(fe){return xe(t(fe))}),M(M.G+M.W+M.F*!Z,{Symbol:L});for(var ne="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),J=0;ne.length>J;)t(ne[J++]);for(var X=x(t.store),Q=0;X.length>Q;)r(X[Q++]);M(M.S+M.F*!Z,"Symbol",{for:function(fe){return v(P,fe+="")?P[fe]:P[fe]=L(fe)},keyFor:function(Te){if(!ge(Te))throw TypeError(Te+" is not a symbol!");for(var ze in P)if(P[ze]===Te)return ze},useSetter:function(){he=!0},useSimple:function(){he=!1}}),M(M.S+M.F*!Z,"Object",{create:te,defineProperty:oe,defineProperties:se,getOwnPropertyDescriptor:ee,getOwnPropertyNames:ie,getOwnPropertySymbols:Ee});var me=S(function(){C.f(1)});M(M.S+M.F*me,"Object",{getOwnPropertySymbols:function(Te){return C.f(a(Te))}}),A&&M(M.S+M.F*(!Z||S(function(){var fe=L();return G([fe])!="[null]"||G({a:fe})!="{}"||G(Object(fe))!="{}"})),"JSON",{stringify:function(Te){for(var ze=[Te],Je=1,qe,Xe;arguments.length>Je;)ze.push(arguments[Je++]);return Xe=qe=ze[1],!u(qe)&&Te===void 0||ge(Te)?void 0:(o(qe)||(qe=function(et,rt){if(typeof Xe=="function"&&(rt=Xe.call(this,et,rt)),!ge(rt))return rt}),ze[1]=qe,G.apply(A,ze))}}),L[K][z]||F("./_hide")(L[K],z,L[K].valueOf),p(L,"Symbol"),p(Math,"Math",!0),p(N.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(F,$,j){var N=F("./_export"),v=F("./_object-to-array")(!0);N(N.S,"Object",{entries:function(M){return v(M)}})},{"./_export":107,"./_object-to-array":143}],183:[function(F,$,j){"use strict";var N=F("./_export"),v=F("./_core"),O=F("./_global"),M=F("./_species-constructor"),y=F("./_promise-resolve");N(N.P+N.R,"Promise",{finally:function(m){var S=M(this,v.Promise||O.Promise),b=typeof m=="function";return this.then(b?function(p){return y(S,m()).then(function(){return p})}:m,b?function(p){return y(S,m()).then(function(){throw p})}:m)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(F,$,j){"use strict";var N=F("./_export"),v=F("./_new-promise-capability"),O=F("./_perform");N(N.S,"Promise",{try:function(M){var y=v.f(this),m=O(M);return(m.e?y.reject:y.resolve)(m.v),y.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(F,$,j){F("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(F,$,j){F("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(F,$,j){F("./es6.array.iterator");for(var N=F("./_global"),v=F("./_hide"),O=F("./_iterators"),M=F("./_wks")("toStringTag"),y="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(","),m=0;m<y.length;m++){var S=y[m],b=N[S],p=b&&b.prototype;p&&!p[M]&&v(p,M,S),O[S]=O.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(F,$,j){var N=F("./_export"),v=F("./_task");N(N.G+N.B,{setImmediate:v.set,clearImmediate:v.clear})},{"./_export":107,"./_task":155}],189:[function(F,$,j){(function(N){"use strict";var v=F("babel-runtime/helpers/typeof"),O=M(v);function M(f){return f&&f.__esModule?f:{default:f}}function y(f){return Array.isArray?Array.isArray(f):c(f)==="[object Array]"}j.isArray=y;function m(f){return typeof f=="boolean"}j.isBoolean=m;function S(f){return f===null}j.isNull=S;function b(f){return f==null}j.isNullOrUndefined=b;function p(f){return typeof f=="number"}j.isNumber=p;function d(f){return typeof f=="string"}j.isString=d;function t(f){return(typeof f=="undefined"?"undefined":(0,O.default)(f))==="symbol"}j.isSymbol=t;function l(f){return f===void 0}j.isUndefined=l;function r(f){return c(f)==="[object RegExp]"}j.isRegExp=r;function i(f){return(typeof f=="undefined"?"undefined":(0,O.default)(f))==="object"&&f!==null}j.isObject=i;function o(f){return c(f)==="[object Date]"}j.isDate=o;function s(f){return c(f)==="[object Error]"||f instanceof Error}j.isError=s;function u(f){return typeof f=="function"}j.isFunction=u;function a(f){return f===null||typeof f=="boolean"||typeof f=="number"||typeof f=="string"||(typeof f=="undefined"?"undefined":(0,O.default)(f))==="symbol"||typeof f=="undefined"}j.isPrimitive=a,j.isBuffer=N.isBuffer;function c(f){return Object.prototype.toString.call(f)}}).call(this,{isBuffer:F("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(F,$,j){"use strict";var N=F("babel-runtime/helpers/typeof"),v=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(M){"use strict";var y=function(){var d=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,t=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g;return function(r,i,o,s){if(arguments.length===1&&p(r)==="string"&&!/\d/.test(r)&&(i=r,r=void 0),r=r||new Date,r instanceof Date||(r=new Date(r)),isNaN(r))throw TypeError("Invalid date");i=String(y.masks[i]||i||y.masks.default);var u=i.slice(0,4);(u==="UTC:"||u==="GMT:")&&(i=i.slice(4),o=!0,u==="GMT:"&&(s=!0));var a=o?"getUTC":"get",c=r[a+"Date"](),f=r[a+"Day"](),w=r[a+"Month"](),_=r[a+"FullYear"](),h=r[a+"Hours"](),R=r[a+"Minutes"](),C=r[a+"Seconds"](),g=r[a+"Milliseconds"](),x=o?0:r.getTimezoneOffset(),E=S(r),T=b(r),k={d:c,dd:m(c),ddd:y.i18n.dayNames[f],dddd:y.i18n.dayNames[f+7],m:w+1,mm:m(w+1),mmm:y.i18n.monthNames[w],mmmm:y.i18n.monthNames[w+12],yy:String(_).slice(2),yyyy:_,h:h%12||12,hh:m(h%12||12),H:h,HH:m(h),M:R,MM:m(R),s:C,ss:m(C),l:m(g,3),L:m(Math.round(g/10)),t:h<12?"a":"p",tt:h<12?"am":"pm",T:h<12?"A":"P",TT:h<12?"AM":"PM",Z:s?"GMT":o?"UTC":(String(r).match(t)||[""]).pop().replace(l,""),o:(x>0?"-":"+")+m(Math.floor(Math.abs(x)/60)*100+Math.abs(x)%60,4),S:["th","st","nd","rd"][c%10>3?0:(c%100-c%10!=10)*c%10],W:E,N:T};return i.replace(d,function(L){return L in k?k[L]:L.slice(1,L.length-1)})}}();y.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"},y.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 m(d,t){for(d=String(d),t=t||2;d.length<t;)d="0"+d;return d}function S(d){var t=new Date(d.getFullYear(),d.getMonth(),d.getDate());t.setDate(t.getDate()-(t.getDay()+6)%7+3);var l=new Date(t.getFullYear(),0,4);l.setDate(l.getDate()-(l.getDay()+6)%7+3);var r=t.getTimezoneOffset()-l.getTimezoneOffset();t.setHours(t.getHours()-r);var i=(t-l)/(864e5*7);return 1+Math.floor(i)}function b(d){var t=d.getDay();return t===0&&(t=7),t}function p(d){return d===null?"null":d===void 0?"undefined":(typeof d=="undefined"?"undefined":(0,v.default)(d))!=="object"?typeof d=="undefined"?"undefined":(0,v.default)(d):Array.isArray(d)?"array":{}.toString.call(d).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return y}):(typeof j=="undefined"?"undefined":(0,v.default)(j))==="object"?$.exports=y:M.dateFormat=y})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(F,$,j){/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/"use strict";var N=/["'&<>]/;$.exports=v;function v(O){var M=""+O,y=N.exec(M);if(!y)return M;var m,S="",b=0,p=0;for(b=y.index;b<M.length;b++){switch(M.charCodeAt(b)){case 34:m="&quot;";break;case 38:m="&amp;";break;case 39:m="&#39;";break;case 60:m="&lt;";break;case 62:m="&gt;";break;default:continue}p!==b&&(S+=M.substring(p,b)),p=b+1,S+=m}return p!==b?S+M.substring(p,b):S}},{}],192:[function(F,$,j){function N(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}$.exports=N,N.EventEmitter=N,N.prototype._events=void 0,N.prototype._maxListeners=void 0,N.defaultMaxListeners=10,N.prototype.setMaxListeners=function(m){if(!O(m)||m<0||isNaN(m))throw TypeError("n must be a positive number");return this._maxListeners=m,this},N.prototype.emit=function(m){var S,b,p,d,t,l;if(this._events||(this._events={}),m==="error"&&(!this._events.error||M(this._events.error)&&!this._events.error.length)){if(S=arguments[1],S instanceof Error)throw S;var r=new Error('Uncaught, unspecified "error" event. ('+S+")");throw r.context=S,r}if(b=this._events[m],y(b))return!1;if(v(b))switch(arguments.length){case 1:b.call(this);break;case 2:b.call(this,arguments[1]);break;case 3:b.call(this,arguments[1],arguments[2]);break;default:d=Array.prototype.slice.call(arguments,1),b.apply(this,d)}else if(M(b))for(d=Array.prototype.slice.call(arguments,1),l=b.slice(),p=l.length,t=0;t<p;t++)l[t].apply(this,d);return!0},N.prototype.addListener=function(m,S){var b;if(!v(S))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",m,v(S.listener)?S.listener:S),this._events[m]?M(this._events[m])?this._events[m].push(S):this._events[m]=[this._events[m],S]:this._events[m]=S,M(this._events[m])&&!this._events[m].warned&&(y(this._maxListeners)?b=N.defaultMaxListeners:b=this._maxListeners,b&&b>0&&this._events[m].length>b&&(this._events[m].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[m].length),typeof console.trace=="function"&&console.trace())),this},N.prototype.on=N.prototype.addListener,N.prototype.once=function(m,S){if(!v(S))throw TypeError("listener must be a function");var b=!1;function p(){this.removeListener(m,p),b||(b=!0,S.apply(this,arguments))}return p.listener=S,this.on(m,p),this},N.prototype.removeListener=function(m,S){var b,p,d,t;if(!v(S))throw TypeError("listener must be a function");if(!this._events||!this._events[m])return this;if(b=this._events[m],d=b.length,p=-1,b===S||v(b.listener)&&b.listener===S)delete this._events[m],this._events.removeListener&&this.emit("removeListener",m,S);else if(M(b)){for(t=d;t-- >0;)if(b[t]===S||b[t].listener&&b[t].listener===S){p=t;break}if(p<0)return this;b.length===1?(b.length=0,delete this._events[m]):b.splice(p,1),this._events.removeListener&&this.emit("removeListener",m,S)}return this},N.prototype.removeAllListeners=function(m){var S,b;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[m]&&delete this._events[m],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(b=this._events[m],v(b))this.removeListener(m,b);else if(b)for(;b.length;)this.removeListener(m,b[b.length-1]);return delete this._events[m],this},N.prototype.listeners=function(m){var S;return!this._events||!this._events[m]?S=[]:v(this._events[m])?S=[this._events[m]]:S=this._events[m].slice(),S},N.prototype.listenerCount=function(m){if(this._events){var S=this._events[m];if(v(S))return 1;if(S)return S.length}return 0},N.listenerCount=function(m,S){return m.listenerCount(S)};function v(m){return typeof m=="function"}function O(m){return typeof m=="number"}function M(m){return typeof m=="object"&&m!==null}function y(m){return m===void 0}},{}],193:[function(F,$,j){var N=F("http"),v=$.exports;for(var O in N)N.hasOwnProperty(O)&&(v[O]=N[O]);v.request=function(M,y){return M||(M={}),M.scheme="https",M.protocol="https:",N.request.call(this,M,y)}},{http:231}],194:[function(F,$,j){/*!
* humanize-ms - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/"use strict";var N=F("util"),v=F("ms");$.exports=function(O){if(typeof O=="number")return O;var M=v(O);if(M===void 0){var y=new Error(N.format("humanize-ms(%j) result undefined",O));console.warn(y.stack)}return M}},{ms:204,util:243}],195:[function(F,$,j){j.read=function(N,v,O,M,y){var m,S,b=y*8-M-1,p=(1<<b)-1,d=p>>1,t=-7,l=O?y-1:0,r=O?-1:1,i=N[v+l];for(l+=r,m=i&(1<<-t)-1,i>>=-t,t+=b;t>0;m=m*256+N[v+l],l+=r,t-=8);for(S=m&(1<<-t)-1,m>>=-t,t+=M;t>0;S=S*256+N[v+l],l+=r,t-=8);if(m===0)m=1-d;else{if(m===p)return S?NaN:(i?-1:1)*Infinity;S=S+Math.pow(2,M),m=m-d}return(i?-1:1)*S*Math.pow(2,m-M)},j.write=function(N,v,O,M,y,m){var S,b,p,d=m*8-y-1,t=(1<<d)-1,l=t>>1,r=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=M?0:m-1,o=M?1:-1,s=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===Infinity?(b=isNaN(v)?1:0,S=t):(S=Math.floor(Math.log(v)/Math.LN2),v*(p=Math.pow(2,-S))<1&&(S--,p*=2),S+l>=1?v+=r/p:v+=r*Math.pow(2,1-l),v*p>=2&&(S++,p/=2),S+l>=t?(b=0,S=t):S+l>=1?(b=(v*p-1)*Math.pow(2,y),S=S+l):(b=v*Math.pow(2,l-1)*Math.pow(2,y),S=0));y>=8;N[O+i]=b&255,i+=o,b/=256,y-=8);for(S=S<<y|b,d+=y;d>0;N[O+i]=S&255,i+=o,S/=256,d-=8);N[O+i-o]|=s*128}},{}],196:[function(F,$,j){typeof Object.create=="function"?$.exports=function(v,O){O&&(v.super_=O,v.prototype=Object.create(O.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}))}:$.exports=function(v,O){if(O){v.super_=O;var M=function(){};M.prototype=O.prototype,v.prototype=new M,v.prototype.constructor=v}}},{}],197:[function(F,$,j){/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/$.exports=function(O){return O!=null&&(N(O)||v(O)||!!O._isBuffer)};function N(O){return!!O.constructor&&typeof O.constructor.isBuffer=="function"&&O.constructor.isBuffer(O)}function v(O){return typeof O.readFloatLE=="function"&&typeof O.slice=="function"&&N(O.slice(0,0))}},{}],198:[function(F,$,j){var N={}.toString;$.exports=Array.isArray||function(v){return N.call(v)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(F,$){typeof exports=="object"&&typeof module!="undefined"?module.exports=$(F):typeof define=="function"&&define.amd?define($):$(F)})(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(F){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(F){for(var $={},j=0,N=F.length;j<N;j++)$[F.charAt(j)]=j;return $}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(F){if(F.length<2){var $=F.charCodeAt(0);return $<128?F:$<2048?fromCharCode(192|$>>>6)+fromCharCode(128|$&63):fromCharCode(224|$>>>12&15)+fromCharCode(128|$>>>6&63)+fromCharCode(128|$&63)}else{var $=65536+(F.charCodeAt(0)-55296)*1024+(F.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(F){return F.replace(re_utob,cb_utob)},cb_encode=function(F){var $=[0,2,1][F.length%3],j=F.charCodeAt(0)<<16|(F.length>1?F.charCodeAt(1):0)<<8|(F.length>2?F.charCodeAt(2):0),N=[b64chars.charAt(j>>>18),b64chars.charAt(j>>>12&63),$>=2?"=":b64chars.charAt(j>>>6&63),$>=1?"=":b64chars.charAt(j&63)];return N.join("")},btoa=global.btoa?function(F){return global.btoa(F)}:function(F){return F.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(F){var $=Object.prototype.toString.call(F)==="[object Uint8Array]";return $?F.toString("base64"):btoa(utob(String(F)))},encode=function(F,$){return $?_encode(String(F)).replace(/[+\/]/g,function(j){return j=="+"?"-":"_"}).replace(/=/g,""):_encode(F)},encodeURI=function(F){return encode(F,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(F){switch(F.length){case 4:var $=(7&F.charCodeAt(0))<<18|(63&F.charCodeAt(1))<<12|(63&F.charCodeAt(2))<<6|63&F.charCodeAt(3),j=$-65536;return fromCharCode((j>>>10)+55296)+fromCharCode((j&1023)+56320);case 3:return fromCharCode((15&F.charCodeAt(0))<<12|(63&F.charCodeAt(1))<<6|63&F.charCodeAt(2));default:return fromCharCode((31&F.charCodeAt(0))<<6|63&F.charCodeAt(1))}},btou=function(F){return F.replace(re_btou,cb_btou)},cb_decode=function(F){var $=F.length,j=$%4,N=($>0?b64tab[F.charAt(0)]<<18:0)|($>1?b64tab[F.charAt(1)]<<12:0)|($>2?b64tab[F.charAt(2)]<<6:0)|($>3?b64tab[F.charAt(3)]:0),v=[fromCharCode(N>>>16),fromCharCode(N>>>8&255),fromCharCode(N&255)];return v.length-=[0,0,2,1][j],v.join("")},_atob=global.atob?function(F){return global.atob(F)}:function(F){return F.replace(/\S{1,4}/g,cb_decode)},atob=function(F){return _atob(String(F).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(F){return(F.constructor===buffer.constructor?F:buffer.from(F,"base64")).toString()}:function(F){return(F.constructor===buffer.constructor?F:new buffer(F,"base64")).toString()}:function(F){return btou(_atob(F))},decode=function(F){return _decode(String(F).replace(/[-_]/g,function($){return $=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var F=global.Base64;return global.Base64=_Base64,F};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(F){return{value:F,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(F){return encode(this,F)})),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(F,$,j){/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/"use strict";$.exports=v;var N=Object.prototype.hasOwnProperty;function v(O,M,y){if(!O)throw new TypeError("argument dest is required");if(!M)throw new TypeError("argument src is required");return y===void 0&&(y=!0),Object.getOwnPropertyNames(M).forEach(function(S){if(!y&&N.call(O,S))return;var b=Object.getOwnPropertyDescriptor(M,S);Object.defineProperty(O,S,b)}),O}},{}],201:[function(F,$,j){"use strict";function N(){this._types=Object.create(null),this._extensions=Object.create(null);for(var v=0;v<arguments.length;v++)this.define(arguments[v]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}N.prototype.define=function(v,O){for(var M in v){var y=v[M].map(function(b){return b.toLowerCase()});M=M.toLowerCase();for(var m=0;m<y.length;m++){var S=y[m];if(S[0]=="*")continue;if(!O&&S in this._types)throw new Error('Attempt to change mapping for "'+S+'" extension from "'+this._types[S]+'" to "'+M+'". Pass `force=true` to allow this, otherwise remove "'+S+'" from the list of extensions for "'+M+'".');this._types[S]=M}if(O||!this._extensions[M]){var S=y[0];this._extensions[M]=S[0]!="*"?S:S.substr(1)}}},N.prototype.getType=function(v){v=String(v);var O=v.replace(/^.*[/\\]/,"").toLowerCase(),M=O.replace(/^.*\./,"").toLowerCase(),y=O.length<v.length,m=M.length<O.length-1;return(m||!y)&&this._types[M]||null},N.prototype.getExtension=function(v){return v=/^\s*([^;\s]*)/.test(v)&&RegExp.$1,v&&this._extensions[v.toLowerCase()]||null},$.exports=N},{}],202:[function(F,$,j){"use strict";var N=F("./Mime");$.exports=new N(F("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(F,$,j){$.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(F,$,j){var N=1e3,v=N*60,O=v*60,M=O*24,y=M*7,m=M*365.25;$.exports=function(t,l){l=l||{};var r=typeof t;if(r==="string"&&t.length>0)return S(t);if(r==="number"&&isFinite(t))return l.long?p(t):b(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function S(t){if(t=String(t),t.length>100)return;var l=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!l)return;var r=parseFloat(l[1]),i=(l[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*m;case"weeks":case"week":case"w":return r*y;case"days":case"day":case"d":return r*M;case"hours":case"hour":case"hrs":case"hr":case"h":return r*O;case"minutes":case"minute":case"mins":case"min":case"m":return r*v;case"seconds":case"second":case"secs":case"sec":case"s":return r*N;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}function b(t){var l=Math.abs(t);return l>=M?Math.round(t/M)+"d":l>=O?Math.round(t/O)+"h":l>=v?Math.round(t/v)+"m":l>=N?Math.round(t/N)+"s":t+"ms"}function p(t){var l=Math.abs(t);return l>=M?d(t,l,M,"day"):l>=O?d(t,l,O,"hour"):l>=v?d(t,l,v,"minute"):l>=N?d(t,l,N,"second"):t+" ms"}function d(t,l,r,i){var o=l>=r*1.5;return Math.round(t/r)+" "+i+(o?"s":"")}},{}],205:[function(F,$,j){(function(N){function v(m,S){for(var b=0,p=m.length-1;p>=0;p--){var d=m[p];d==="."?m.splice(p,1):d===".."?(m.splice(p,1),b++):b&&(m.splice(p,1),b--)}if(S)for(;b--;b)m.unshift("..");return m}j.resolve=function(){for(var m="",S=!1,b=arguments.length-1;b>=-1&&!S;b--){var p=b>=0?arguments[b]:N.cwd();if(typeof p!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!p)continue;m=p+"/"+m,S=p.charAt(0)==="/"}return m=v(M(m.split("/"),function(d){return!!d}),!S).join("/"),(S?"/":"")+m||"."},j.normalize=function(m){var S=j.isAbsolute(m),b=y(m,-1)==="/";return m=v(M(m.split("/"),function(p){return!!p}),!S).join("/"),!m&&!S&&(m="."),m&&b&&(m+="/"),(S?"/":"")+m},j.isAbsolute=function(m){return m.charAt(0)==="/"},j.join=function(){var m=Array.prototype.slice.call(arguments,0);return j.normalize(M(m,function(S,b){if(typeof S!="string")throw new TypeError("Arguments to path.join must be strings");return S}).join("/"))},j.relative=function(m,S){m=j.resolve(m).substr(1),S=j.resolve(S).substr(1);function b(o){for(var s=0;s<o.length&&!(o[s]!=="");s++);for(var u=o.length-1;u>=0&&!(o[u]!=="");u--);return s>u?[]:o.slice(s,u-s+1)}for(var p=b(m.split("/")),d=b(S.split("/")),t=Math.min(p.length,d.length),l=t,r=0;r<t;r++)if(p[r]!==d[r]){l=r;break}for(var i=[],r=l;r<p.length;r++)i.push("..");return i=i.concat(d.slice(l)),i.join("/")},j.sep="/",j.delimiter=":",j.dirname=function(m){if(typeof m!="string"&&(m=m+""),m.length===0)return".";for(var S=m.charCodeAt(0),b=S===47,p=-1,d=!0,t=m.length-1;t>=1;--t)if(S=m.charCodeAt(t),S===47){if(!d){p=t;break}}else d=!1;return p===-1?b?"/":".":b&&p===1?"/":m.slice(0,p)};function O(m){typeof m!="string"&&(m=m+"");var S=0,b=-1,p=!0,d;for(d=m.length-1;d>=0;--d)if(m.charCodeAt(d)===47){if(!p){S=d+1;break}}else b===-1&&(p=!1,b=d+1);return b===-1?"":m.slice(S,b)}j.basename=function(m,S){var b=O(m);return S&&b.substr(-1*S.length)===S&&(b=b.substr(0,b.length-S.length)),b},j.extname=function(m){typeof m!="string"&&(m=m+"");for(var S=-1,b=0,p=-1,d=!0,t=0,l=m.length-1;l>=0;--l){var r=m.charCodeAt(l);if(r===47){if(!d){b=l+1;break}continue}p===-1&&(d=!1,p=l+1),r===46?S===-1?S=l:t!==1&&(t=1):S!==-1&&(t=-1)}return S===-1||p===-1||t===0||t===1&&S===p-1&&S===b+1?"":m.slice(S,p)};function M(m,S){if(m.filter)return m.filter(S);for(var b=[],p=0;p<m.length;p++)S(m[p],p,m)&&b.push(m[p]);return b}var y="ab".substr(-1)==="b"?function(m,S,b){return m.substr(S,b)}:function(m,S,b){return S<0&&(S=m.length+S),m.substr(S,b)}}).call(this,F("_process"))},{_process:208}],206:[function(F,$,j){(function(N){/*!
* 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 v={function:!0,object:!0},O=v[typeof window]&&window||this,M=O,y=v[typeof j]&&j,m=v[typeof $]&&$&&!$.nodeType&&$,S=y&&m&&typeof N=="object"&&N;S&&(S.global===S||S.window===S||S.self===S)&&(O=S);var b=Math.pow(2,53)-1,p=/\bOpera/,d=this,t=Object.prototype,l=t.hasOwnProperty,r=t.toString;function i(g){return g=String(g),g.charAt(0).toUpperCase()+g.slice(1)}function o(g,x,E){var T={"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&&E&&/^Win/i.test(g)&&!/^Windows Phone /i.test(g)&&(T=T[/[\d.]+$/.exec(g)])&&(g="Windows "+T),g=String(g),x&&E&&(g=g.replace(RegExp(x,"i"),E)),g=u(g.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]),g}function s(g,x){var E=-1,T=g?g.length:0;if(typeof T=="number"&&T>-1&&T<=b)for(;++E<T;)x(g[E],E,g);else a(g,x)}function u(g){return g=h(g),/^(?:webOS|i(?:OS|P))/.test(g)?g:i(g)}function a(g,x){for(var E in g)l.call(g,E)&&x(g[E],E,g)}function c(g){return g==null?i(g):r.call(g).slice(8,-1)}function f(g,x){var E=g!=null?typeof g[x]:"number";return!/^(?:boolean|number|string|undefined)$/.test(E)&&(E=="object"?!!g[x]:!0)}function w(g){return String(g).replace(/([ -])(?!$)/g,"$1?")}function _(g,x){var E=null;return s(g,function(T,k){E=x(E,T,k,g)}),E}function h(g){return String(g).replace(/^ +| +$/g,"")}function R(g){var x=O,E=g&&typeof g=="object"&&c(g)!="String";E&&(x=g,g=null);var T=x.navigator||{},k=T.userAgent||"";g||(g=k);var L=E||d==M,A=E?!!T.likeChrome:/\bChrome\b/.test(g)&&!/internal|\n/i.test(r.toString()),G="Object",K=E?G:"ScriptBridgingProxyObject",W=E?G:"Environment",z=E&&x.java?"JavaPackage":c(x.java),U=E?G:"RuntimeObject",P=/\bJava/.test(z)&&x.java,H=P&&c(x.environment)==W,V=P?"a":"\u03B1",q=P?"b":"\u03B2",Z=x.document||{},ce=x.operamini||x.opera,he=p.test(he=E&&ce?ce["[[Class]]"]:c(ce))?he:ce=null,ae,xe=g,ge=[],oe=null,se=g==k,te=se&&ce&&typeof ce.version=="function"&&ce.version(),be,ee=X([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),ie=me(["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=Te([{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"]),ne=Q({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),J=fe(["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(Xe){return _(Xe,function(et,rt){return et||RegExp("\\b"+(rt.pattern||w(rt))+"\\b","i").exec(g)&&(rt.label||rt)})}function Q(Xe){return _(Xe,function(et,rt,Le){return et||(rt[Ee]||rt[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Ee)]||RegExp("\\b"+w(Le)+"(?:\\b|\\w*\\d)","i").exec(g))&&Le})}function me(Xe){return _(Xe,function(et,rt){return et||RegExp("\\b"+(rt.pattern||w(rt))+"\\b","i").exec(g)&&(rt.label||rt)})}function fe(Xe){return _(Xe,function(et,rt){var Le=rt.pattern||w(rt);return!et&&(et=RegExp("\\b"+Le+"(?:/[\\d.]+|[ \\w.]*)","i").exec(g))&&(et=o(et,Le,rt.label||rt)),et})}function Te(Xe){return _(Xe,function(et,rt){var Le=rt.pattern||w(rt);return!et&&(et=RegExp("\\b"+Le+" *\\d+[.\\w_]*","i").exec(g)||RegExp("\\b"+Le+" *\\w+-[\\w]*","i").exec(g)||RegExp("\\b"+Le+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(g))&&((et=String(rt.label&&!RegExp(Le,"i").test(rt.label)?rt.label:et).split("/"))[1]&&!/[\d.]+/.test(et[0])&&(et[0]+=" "+et[1]),rt=rt.label||rt,et=u(et[0].replace(RegExp(Le,"i"),rt).replace(RegExp("; *(?:"+rt+"[_-])?","i")," ").replace(RegExp("("+rt+")[-_.]?(\\w)","i"),"$1 $2"))),et})}function ze(Xe){return _(Xe,function(et,rt){return et||(RegExp(rt+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(g)||0)[1]||null})}function Je(){return this.description||""}if(ee&&(ee=[ee]),ne&&!Ee&&(Ee=Te([ne])),(ae=/\bGoogle TV\b/.exec(Ee))&&(Ee=ae[0]),/\bSimulator\b/i.test(g)&&(Ee=(Ee?Ee+" ":"")+"Simulator"),ie=="Opera Mini"&&/\bOPiOS\b/.test(g)&&ge.push("running in Turbo/Uncompressed mode"),ie=="IE"&&/\blike iPhone OS\b/.test(g)?(ae=R(g.replace(/like iPhone OS/,"")),ne=ae.manufacturer,Ee=ae.product):/^iP/.test(Ee)?(ie||(ie="Safari"),J="iOS"+((ae=/ OS ([\d_]+)/i.exec(g))?" "+ae[1].replace(/_/g,"."):"")):ie=="Konqueror"&&!/buntu/i.test(J)?J="Kubuntu":ne&&ne!="Google"&&(/Chrome/.test(ie)&&!/\bMobile Safari\b/i.test(g)||/\bVita\b/.test(Ee))||/\bAndroid\b/.test(J)&&/^Chrome/.test(ie)&&/\bVersion\//i.test(g)?(ie="Android Browser",J=/\bAndroid\b/.test(J)?J:"Android"):ie=="Silk"?(/\bMobi/i.test(g)||(J="Android",ge.unshift("desktop mode")),/Accelerated *= *true/i.test(g)&&ge.unshift("accelerated")):ie=="PaleMoon"&&(ae=/\bFirefox\/([\d.]+)\b/.exec(g))?ge.push("identifying as Firefox "+ae[1]):ie=="Firefox"&&(ae=/\b(Mobile|Tablet|TV)\b/i.exec(g))?(J||(J="Firefox OS"),Ee||(Ee=ae[1])):!ie||(ae=!/\bMinefield\b/i.test(g)&&/\b(?:Firefox|Safari)\b/.exec(ie))?(ie&&!Ee&&/[\/,]|^[^(]+?\)/.test(g.slice(g.indexOf(ae+"/")+8))&&(ie=null),(ae=Ee||ne||J)&&(Ee||ne||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(J))&&(ie=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(J)?J:ae)+" Browser")):ie=="Electron"&&(ae=(/\bChrome\/([\d.]+)\b/.exec(g)||0)[1])&&ge.push("Chromium "+ae),te||(te=ze(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",w(ie),"(?:Firefox|Minefield|NetFront)"])),(ae=ee=="iCab"&&parseFloat(te)>3&&"WebKit"||/\bOpera\b/.test(ie)&&(/\bOPR\b/.test(g)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(g)&&!/^(?:Trident|EdgeHTML)$/.test(ee)&&"WebKit"||!ee&&/\bMSIE\b/i.test(g)&&(J=="Mac OS"?"Tasman":"Trident")||ee=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ie)&&"NetFront")&&(ee=[ae]),ie=="IE"&&(ae=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(g)||0)[1])?(ie+=" Mobile",J="Windows Phone "+(/\+$/.test(ae)?ae:ae+".x"),ge.unshift("desktop mode")):/\bWPDesktop\b/i.test(g)?(ie="IE Mobile",J="Windows Phone 8.x",ge.unshift("desktop mode"),te||(te=(/\brv:([\d.]+)/.exec(g)||0)[1])):ie!="IE"&&ee=="Trident"&&(ae=/\brv:([\d.]+)/.exec(g))&&(ie&&ge.push("identifying as "+ie+(te?" "+te:"")),ie="IE",te=ae[1]),se){if(f(x,"global"))if(P&&(ae=P.lang.System,xe=ae.getProperty("os.arch"),J=J||ae.getProperty("os.name")+" "+ae.getProperty("os.version")),H){try{te=x.require("ringo/engine").version.join("."),ie="RingoJS"}catch(Xe){(ae=x.system)&&ae.global.system==x.system&&(ie="Narwhal",J||(J=ae[0].os||null))}ie||(ie="Rhino")}else typeof x.process=="object"&&!x.process.browser&&(ae=x.process)&&(typeof ae.versions=="object"&&(typeof ae.versions.electron=="string"?(ge.push("Node "+ae.versions.node),ie="Electron",te=ae.versions.electron):typeof ae.versions.nw=="string"&&(ge.push("Chromium "+te,"Node "+ae.versions.node),ie="NW.js",te=ae.versions.nw)),ie||(ie="Node.js",xe=ae.arch,J=ae.platform,te=/[\d.]+/.exec(ae.version),te=te?te[0]:null));else c(ae=x.runtime)==K?(ie="Adobe AIR",J=ae.flash.system.Capabilities.os):c(ae=x.phantom)==U?(ie="PhantomJS",te=(ae=ae.version||null)&&ae.major+"."+ae.minor+"."+ae.patch):typeof Z.documentMode=="number"&&(ae=/\bTrident\/(\d+)/i.exec(g))?(te=[te,Z.documentMode],(ae=+ae[1]+4)!=te[1]&&(ge.push("IE "+te[1]+" mode"),ee&&(ee[1]=""),te[1]=ae),te=ie=="IE"?String(te[1].toFixed(1)):te[0]):typeof Z.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ie)&&(ge.push("masking as "+ie+" "+te),ie="IE",te="11.0",ee=["Trident"],J="Windows");J=J&&u(J)}if(te&&(ae=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(te)||/(?:alpha|beta)(?: ?\d)?/i.exec(g+";"+(se&&T.appMinorVersion))||/\bMinefield\b/i.test(g)&&"a")&&(oe=/b/i.test(ae)?"beta":"alpha",te=te.replace(RegExp(ae+"\\+?$"),"")+(oe=="beta"?q:V)+(/\d+\+?/.exec(ae)||"")),ie=="Fennec"||ie=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(J))ie="Firefox Mobile";else if(ie=="Maxthon"&&te)te=te.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ee))Ee=="Xbox 360"&&(J=null),Ee=="Xbox 360"&&/\bIEMobile\b/.test(g)&&ge.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(ie)||ie&&!Ee&&!/Browser|Mobi/.test(ie))&&(J=="Windows CE"||/Mobi/i.test(g)))ie+=" Mobile";else if(ie=="IE"&&se)try{x.external===null&&ge.unshift("platform preview")}catch(Xe){ge.unshift("embedded")}else(/\bBlackBerry\b/.test(Ee)||/\bBB10\b/.test(g))&&(ae=(RegExp(Ee.replace(/ +/g," *")+"/([.\\d]+)","i").exec(g)||0)[1]||te)?(ae=[ae,/BB10/.test(g)],J=(ae[1]?(Ee=null,ne="BlackBerry"):"Device Software")+" "+ae[0],te=null):this!=a&&Ee!="Wii"&&(se&&ce||/Opera/.test(ie)&&/\b(?:MSIE|Firefox)\b/i.test(g)||ie=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(J)||ie=="IE"&&(J&&!/^Win/.test(J)&&te>5.5||/\bWindows XP\b/.test(J)&&te>8||te==8&&!/\bTrident\b/.test(g)))&&!p.test(ae=R.call(a,g.replace(p,"")+";"))&&ae.name&&(ae="ing as "+ae.name+((ae=ae.version)?" "+ae:""),p.test(ie)?(/\bIE\b/.test(ae)&&J=="Mac OS"&&(J=null),ae="identify"+ae):(ae="mask"+ae,he?ie=u(he.replace(/([a-z])([A-Z])/g,"$1 $2")):ie="Opera",/\bIE\b/.test(ae)&&(J=null),se||(te=null)),ee=["Presto"],ge.push(ae));(ae=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(g)||0)[1])&&(ae=[parseFloat(ae.replace(/\.(\d)$/,".0$1")),ae],ie=="Safari"&&ae[1].slice(-1)=="+"?(ie="WebKit Nightly",oe="alpha",te=ae[1].slice(0,-1)):(te==ae[1]||te==(ae[2]=(/\bSafari\/([\d.]+\+?)/i.exec(g)||0)[1]))&&(te=null),ae[1]=(/\bChrome\/([\d.]+)/i.exec(g)||0)[1],ae[0]==537.36&&ae[2]==537.36&&parseFloat(ae[1])>=28&&ee=="WebKit"&&(ee=["Blink"]),!se||!A&&!ae[1]?(ee&&(ee[1]="like Safari"),ae=(ae=ae[0],ae<400?1:ae<500?2:ae<526?3:ae<533?4:ae<534?"4+":ae<535?5:ae<537?6:ae<538?7:ae<601?8:"8")):(ee&&(ee[1]="like Chrome"),ae=ae[1]||(ae=ae[0],ae<530?1:ae<532?2:ae<532.05?3:ae<533?4:ae<534.03?5:ae<534.07?6:ae<534.1?7:ae<534.13?8:ae<534.16?9:ae<534.24?10:ae<534.3?11:ae<535.01?12:ae<535.02?"13+":ae<535.07?15:ae<535.11?16:ae<535.19?17:ae<536.05?18:ae<536.1?19:ae<537.01?20:ae<537.11?"21+":ae<537.13?23:ae<537.18?24:ae<537.24?25:ae<537.36?26:ee!="Blink"?"27":"28")),ee&&(ee[1]+=" "+(ae+=typeof ae=="number"?".x":/[.+]/.test(ae)?"":"+")),ie=="Safari"&&(!te||parseInt(te)>45)&&(te=ae)),ie=="Opera"&&(ae=/\bzbov|zvav$/.exec(J))?(ie+=" ",ge.unshift("desktop mode"),ae=="zvav"?(ie+="Mini",te=null):ie+="Mobile",J=J.replace(RegExp(" *"+ae+"$"),"")):ie=="Safari"&&/\bChrome\b/.exec(ee&&ee[1])&&(ge.unshift("desktop mode"),ie="Chrome Mobile",te=null,/\bOS X\b/.test(J)?(ne="Apple",J="iOS 4.3+"):J=null),te&&te.indexOf(ae=/[\d.]+$/.exec(J))==0&&g.indexOf("/"+ae+"-")>-1&&(J=h(J.replace(ae,""))),ee&&!/\b(?:Avant|Nook)\b/.test(ie)&&(/Browser|Lunascape|Maxthon/.test(ie)||ie!="Safari"&&/^iOS/.test(J)&&/\bSafari\b/.test(ee[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ie)&&ee[1])&&((ae=ee[ee.length-1])&&ge.push(ae)),ge.length&&(ge=["("+ge.join("; ")+")"]),ne&&Ee&&Ee.indexOf(ne)<0&&ge.push("on "+ne),Ee&&ge.push((/^on /.test(ge[ge.length-1])?"":"on ")+Ee),J&&(ae=/ ([\d.+]+)$/.exec(J),be=ae&&J.charAt(J.length-ae[0].length-1)=="/",J={architecture:32,family:ae&&!be?J.replace(ae[0],""):J,version:ae?ae[1]:null,toString:function(){var Xe=this.version;return this.family+(Xe&&!be?" "+Xe:"")+(this.architecture==64?" 64-bit":"")}}),(ae=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(xe))&&!/\bi686\b/i.test(xe)?(J&&(J.architecture=64,J.family=J.family.replace(RegExp(" *"+ae),"")),ie&&(/\bWOW64\b/i.test(g)||se&&/\w(?:86|32)$/.test(T.cpuClass||T.platform)&&!/\bWin64; x64\b/i.test(g))&&ge.unshift("32-bit")):J&&/^OS X/.test(J.family)&&ie=="Chrome"&&parseFloat(te)>=39&&(J.architecture=64),g||(g=null);var qe={};return qe.description=g,qe.layout=ee&&ee[0],qe.manufacturer=ne,qe.name=ie,qe.prerelease=oe,qe.product=Ee,qe.ua=g,qe.version=ie&&te,qe.os=J||{architecture:null,family:null,version:null,toString:function(){return"null"}},qe.parse=R,qe.toString=Je,qe.version&&ge.unshift(te),qe.name&&ge.unshift(ie),J&&ie&&!(J==String(J).split(" ")[0]&&(J==ie.split(" ")[0]||Ee))&&ge.push(Ee?"("+J+")":"on "+J),ge.length&&(qe.description=ge.join(" ")),qe}var C=R();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(O.platform=C,define(function(){return C})):y&&m?a(C,function(g,x){y[x]=g}):O.platform=C}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(F,$,j){(function(N){"use strict";typeof N=="undefined"||!N.version||N.version.indexOf("v0.")===0||N.version.indexOf("v1.")===0&&N.version.indexOf("v1.8.")!==0?$.exports={nextTick:v}:$.exports=N;function v(O,M,y,m){if(typeof O!="function")throw new TypeError('"callback" argument must be a function');var S=arguments.length,b,p;switch(S){case 0:case 1:return N.nextTick(O);case 2:return N.nextTick(function(){O.call(null,M)});case 3:return N.nextTick(function(){O.call(null,M,y)});case 4:return N.nextTick(function(){O.call(null,M,y,m)});default:for(b=new Array(S-1),p=0;p<b.length;)b[p++]=arguments[p];return N.nextTick(function(){O.apply(null,b)})}}}).call(this,F("_process"))},{_process:208}],208:[function(F,$,j){var N=$.exports={},v,O;function M(){throw new Error("setTimeout has not been defined")}function y(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?v=setTimeout:v=M}catch(s){v=M}try{typeof clearTimeout=="function"?O=clearTimeout:O=y}catch(s){O=y}})();function m(s){if(v===setTimeout)return setTimeout(s,0);if((v===M||!v)&&setTimeout)return v=setTimeout,setTimeout(s,0);try{return v(s,0)}catch(u){try{return v.call(null,s,0)}catch(a){return v.call(this,s,0)}}}function S(s){if(O===clearTimeout)return clearTimeout(s);if((O===y||!O)&&clearTimeout)return O=clearTimeout,clearTimeout(s);try{return O(s)}catch(u){try{return O.call(null,s)}catch(a){return O.call(this,s)}}}var b=[],p=!1,d,t=-1;function l(){if(!p||!d)return;p=!1,d.length?b=d.concat(b):t=-1,b.length&&r()}function r(){if(p)return;var s=m(l);p=!0;for(var u=b.length;u;){for(d=b,b=[];++t<u;)d&&d[t].run();t=-1,u=b.length}d=null,p=!1,S(s)}N.nextTick=function(s){var u=new Array(arguments.length-1);if(arguments.length>1)for(var a=1;a<arguments.length;a++)u[a-1]=arguments[a];b.push(new i(s,u)),b.length===1&&!p&&m(r)};function i(s,u){this.fun=s,this.array=u}i.prototype.run=function(){this.fun.apply(null,this.array)},N.title="browser",N.browser=!0,N.env={},N.argv=[],N.version="",N.versions={};function o(){}N.on=o,N.addListener=o,N.once=o,N.off=o,N.removeListener=o,N.removeAllListeners=o,N.emit=o,N.prependListener=o,N.prependOnceListener=o,N.listeners=function(s){return[]},N.binding=function(s){throw new Error("process.binding is not supported")},N.cwd=function(){return"/"},N.chdir=function(s){throw new Error("process.chdir is not supported")},N.umask=function(){return 0}},{}],209:[function(F,$,j){(function(N){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(v){var O=typeof j=="object"&&j&&!j.nodeType&&j,M=typeof $=="object"&&$&&!$.nodeType&&$,y=typeof N=="object"&&N;(y.global===y||y.window===y||y.self===y)&&(v=y);var m,S=2147483647,b=36,p=1,d=26,t=38,l=700,r=72,i=128,o="-",s=/^xn--/,u=/[^\x20-\x7E]/,a=/[\x2E\u3002\uFF0E\uFF61]/g,c={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=b-p,w=Math.floor,_=String.fromCharCode,h;function R(z){throw new RangeError(c[z])}function C(z,U){for(var P=z.length,H=[];P--;)H[P]=U(z[P]);return H}function g(z,U){var P=z.split("@"),H="";P.length>1&&(H=P[0]+"@",z=P[1]),z=z.replace(a,".");var V=z.split("."),q=C(V,U).join(".");return H+q}function x(z){for(var U=[],P=0,H=z.length,V,q;P<H;)V=z.charCodeAt(P++),V>=55296&&V<=56319&&P<H?(q=z.charCodeAt(P++),(q&64512)==56320?U.push(((V&1023)<<10)+(q&1023)+65536):(U.push(V),P--)):U.push(V);return U}function E(z){return C(z,function(U){var P="";return U>65535&&(U-=65536,P+=_(U>>>10&1023|55296),U=56320|U&1023),P+=_(U),P}).join("")}function T(z){return z-48<10?z-22:z-65<26?z-65:z-97<26?z-97:b}function k(z,U){return z+22+75*(z<26)-((U!=0)<<5)}function L(z,U,P){var H=0;for(z=P?w(z/l):z>>1,z+=w(z/U);z>f*d>>1;H+=b)z=w(z/f);return w(H+(f+1)*z/(z+t))}function A(z){var U=[],P=z.length,H,V=0,q=i,Z=r,ce,he,ae,xe,ge,oe,se,te,be;for(ce=z.lastIndexOf(o),ce<0&&(ce=0),he=0;he<ce;++he)z.charCodeAt(he)>=128&&R("not-basic"),U.push(z.charCodeAt(he));for(ae=ce>0?ce+1:0;ae<P;){for(xe=V,ge=1,oe=b;!(ae>=P&&R("invalid-input"),se=T(z.charCodeAt(ae++)),(se>=b||se>w((S-V)/ge))&&R("overflow"),V+=se*ge,te=oe<=Z?p:oe>=Z+d?d:oe-Z,se<te);oe+=b)be=b-te,ge>w(S/be)&&R("overflow"),ge*=be;H=U.length+1,Z=L(V-xe,H,xe==0),w(V/H)>S-q&&R("overflow"),q+=w(V/H),V%=H,U.splice(V++,0,q)}return E(U)}function G(z){var U,P,H,V,q,Z,ce,he,ae,xe,ge,oe=[],se,te,be,ee;for(z=x(z),se=z.length,U=i,P=0,q=r,Z=0;Z<se;++Z)ge=z[Z],ge<128&&oe.push(_(ge));for(H=V=oe.length,V&&oe.push(o);H<se;){for(ce=S,Z=0;Z<se;++Z)ge=z[Z],ge>=U&&ge<ce&&(ce=ge);for(te=H+1,ce-U>w((S-P)/te)&&R("overflow"),P+=(ce-U)*te,U=ce,Z=0;Z<se;++Z)if(ge=z[Z],ge<U&&++P>S&&R("overflow"),ge==U){for(he=P,ae=b;!(xe=ae<=q?p:ae>=q+d?d:ae-q,he<xe);ae+=b)ee=he-xe,be=b-xe,oe.push(_(k(xe+ee%be,0))),he=w(ee/be);oe.push(_(k(he,0))),q=L(P,te,H==V),P=0,++H}++P,++U}return oe.join("")}function K(z){return g(z,function(U){return s.test(U)?A(U.slice(4).toLowerCase()):U})}function W(z){return g(z,function(U){return u.test(U)?"xn--"+G(U):U})}if(m={version:"1.4.1",ucs2:{decode:x,encode:E},decode:A,encode:G,toASCII:W,toUnicode:K},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return m});else if(O&&M)if($.exports==O)M.exports=m;else for(h in m)m.hasOwnProperty(h)&&(O[h]=m[h]);else v.punycode=m})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(F,$,j){"use strict";function N(O,M){return Object.prototype.hasOwnProperty.call(O,M)}$.exports=function(O,M,y,m){M=M||"&",y=y||"=";var S={};if(typeof O!="string"||O.length===0)return S;var b=/\+/g;O=O.split(M);var p=1e3;m&&typeof m.maxKeys=="number"&&(p=m.maxKeys);var d=O.length;p>0&&d>p&&(d=p);for(var t=0;t<d;++t){var l=O[t].replace(b,"%20"),r=l.indexOf(y),i,o,s,u;r>=0?(i=l.substr(0,r),o=l.substr(r+1)):(i=l,o=""),s=decodeURIComponent(i),u=decodeURIComponent(o),N(S,s)?v(S[s])?S[s].push(u):S[s]=[S[s],u]:S[s]=u}return S};var v=Array.isArray||function(O){return Object.prototype.toString.call(O)==="[object Array]"}},{}],211:[function(F,$,j){"use strict";var N=function(y){switch(typeof y){case"string":return y;case"boolean":return y?"true":"false";case"number":return isFinite(y)?y:"";default:return""}};$.exports=function(y,m,S,b){return m=m||"&",S=S||"=",y===null&&(y=void 0),typeof y=="object"?O(M(y),function(p){var d=encodeURIComponent(N(p))+S;return v(y[p])?O(y[p],function(t){return d+encodeURIComponent(N(t))}).join(m):d+encodeURIComponent(N(y[p]))}).join(m):b?encodeURIComponent(N(b))+S+encodeURIComponent(N(y)):""};var v=Array.isArray||function(y){return Object.prototype.toString.call(y)==="[object Array]"};function O(y,m){if(y.map)return y.map(m);for(var S=[],b=0;b<y.length;b++)S.push(m(y[b],b));return S}var M=Object.keys||function(y){var m=[];for(var S in y)Object.prototype.hasOwnProperty.call(y,S)&&m.push(S);return m}},{}],212:[function(F,$,j){"use strict";j.decode=j.parse=F("./decode"),j.encode=j.stringify=F("./encode")},{"./decode":210,"./encode":211}],213:[function(F,$,j){$.exports=F("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=y(N),O=F("babel-runtime/core-js/object/keys"),M=y(O);function y(u){return u&&u.__esModule?u:{default:u}}var m=F("process-nextick-args"),S=M.default||function(u){var a=[];for(var c in u)a.push(c);return a};$.exports=i;var b=(0,v.default)(F("core-util-is"));b.inherits=F("inherits");var p=F("./_stream_readable"),d=F("./_stream_writable");b.inherits(i,p);for(var t=S(d.prototype),l=0;l<t.length;l++){var r=t[l];i.prototype[r]||(i.prototype[r]=d.prototype[r])}function i(u){if(!(this instanceof i))return new i(u);p.call(this,u),d.call(this,u),u&&u.readable===!1&&(this.readable=!1),u&&u.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,u&&u.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",o)}Object.defineProperty(i.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function o(){if(this.allowHalfOpen||this._writableState.ended)return;m.nextTick(s,this)}function s(u){u.end()}Object.defineProperty(i.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(a){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=a,this._writableState.destroyed=a}}),i.prototype._destroy=function(u,a){this.push(null),this.end(),m.nextTick(a,u)}},{"./_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(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=O(N);function O(S){return S&&S.__esModule?S:{default:S}}$.exports=m;var M=F("./_stream_transform"),y=(0,v.default)(F("core-util-is"));y.inherits=F("inherits"),y.inherits(m,M);function m(S){if(!(this instanceof m))return new m(S);M.call(this,S)}m.prototype._transform=function(S,b,p){p(null,S)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(F,$,j){(function(N,v){"use strict";var O=F("babel-runtime/core-js/object/get-prototype-of"),M=S(O),y=F("babel-runtime/core-js/object/create"),m=S(y);function S(ee){return ee&&ee.__esModule?ee:{default:ee}}var b=F("process-nextick-args");$.exports=x;var p=F("isarray"),d;x.ReadableState=g;var t=F("events").EventEmitter,l=function(ie,Ee){return ie.listeners(Ee).length},r=F("./internal/streams/stream"),i=F("safe-buffer").Buffer,o=v.Uint8Array||function(){};function s(ee){return i.from(ee)}function u(ee){return i.isBuffer(ee)||ee instanceof o}var a=(0,m.default)(F("core-util-is"));a.inherits=F("inherits");var c=F("util"),f=void 0;c&&c.debuglog?f=c.debuglog("stream"):f=function(){};var w=F("./internal/streams/BufferList"),_=F("./internal/streams/destroy"),h;a.inherits(x,r);var R=["error","close","destroy","pause","resume"];function C(ee,ie,Ee){if(typeof ee.prependListener=="function")return ee.prependListener(ie,Ee);!ee._events||!ee._events[ie]?ee.on(ie,Ee):p(ee._events[ie])?ee._events[ie].unshift(Ee):ee._events[ie]=[Ee,ee._events[ie]]}function g(ee,ie){d=d||F("./_stream_duplex"),ee=ee||{};var Ee=ie instanceof d;this.objectMode=!!ee.objectMode,Ee&&(this.objectMode=this.objectMode||!!ee.readableObjectMode);var ne=ee.highWaterMark,J=ee.readableHighWaterMark,X=this.objectMode?16:16*1024;ne||ne===0?this.highWaterMark=ne:Ee&&(J||J===0)?this.highWaterMark=J:this.highWaterMark=X,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new w,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=ee.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ee.encoding&&(h||(h=F("string_decoder/").StringDecoder),this.decoder=new h(ee.encoding),this.encoding=ee.encoding)}function x(ee){if(d=d||F("./_stream_duplex"),!(this instanceof x))return new x(ee);this._readableState=new g(ee,this),this.readable=!0,ee&&(typeof ee.read=="function"&&(this._read=ee.read),typeof ee.destroy=="function"&&(this._destroy=ee.destroy)),r.call(this)}Object.defineProperty(x.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ie){if(!this._readableState)return;this._readableState.destroyed=ie}}),x.prototype.destroy=_.destroy,x.prototype._undestroy=_.undestroy,x.prototype._destroy=function(ee,ie){this.push(null),ie(ee)},x.prototype.push=function(ee,ie){var Ee=this._readableState,ne;return Ee.objectMode?ne=!0:typeof ee=="string"&&(ie=ie||Ee.defaultEncoding,ie!==Ee.encoding&&(ee=i.from(ee,ie),ie=""),ne=!0),E(this,ee,ie,!1,ne)},x.prototype.unshift=function(ee){return E(this,ee,null,!0,!1)};function E(ee,ie,Ee,ne,J){var X=ee._readableState;if(ie===null)X.reading=!1,W(ee,X);else{var Q;J||(Q=k(X,ie)),Q?ee.emit("error",Q):X.objectMode||ie&&ie.length>0?(typeof ie!="string"&&!X.objectMode&&(0,M.default)(ie)!==i.prototype&&(ie=s(ie)),ne?X.endEmitted?ee.emit("error",new Error("stream.unshift() after end event")):T(ee,X,ie,!0):X.ended?ee.emit("error",new Error("stream.push() after EOF")):(X.reading=!1,X.decoder&&!Ee?(ie=X.decoder.write(ie),X.objectMode||ie.length!==0?T(ee,X,ie,!1):P(ee,X)):T(ee,X,ie,!1))):ne||(X.reading=!1)}return L(X)}function T(ee,ie,Ee,ne){ie.flowing&&ie.length===0&&!ie.sync?(ee.emit("data",Ee),ee.read(0)):(ie.length+=ie.objectMode?1:Ee.length,ne?ie.buffer.unshift(Ee):ie.buffer.push(Ee),ie.needReadable&&z(ee)),P(ee,ie)}function k(ee,ie){var Ee;return!u(ie)&&typeof ie!="string"&&ie!==void 0&&!ee.objectMode&&(Ee=new TypeError("Invalid non-string/buffer chunk")),Ee}function L(ee){return!ee.ended&&(ee.needReadable||ee.length<ee.highWaterMark||ee.length===0)}x.prototype.isPaused=function(){return this._readableState.flowing===!1},x.prototype.setEncoding=function(ee){return h||(h=F("string_decoder/").StringDecoder),this._readableState.decoder=new h(ee),this._readableState.encoding=ee,this};var A=8388608;function G(ee){return ee>=A?ee=A:(ee--,ee|=ee>>>1,ee|=ee>>>2,ee|=ee>>>4,ee|=ee>>>8,ee|=ee>>>16,ee++),ee}function K(ee,ie){return ee<=0||ie.length===0&&ie.ended?0:ie.objectMode?1:ee!==ee?ie.flowing&&ie.length?ie.buffer.head.data.length:ie.length:(ee>ie.highWaterMark&&(ie.highWaterMark=G(ee)),ee<=ie.length?ee:ie.ended?ie.length:(ie.needReadable=!0,0))}x.prototype.read=function(ee){f("read",ee),ee=parseInt(ee,10);var ie=this._readableState,Ee=ee;if(ee!==0&&(ie.emittedReadable=!1),ee===0&&ie.needReadable&&(ie.length>=ie.highWaterMark||ie.ended))return f("read: emitReadable",ie.length,ie.ended),ie.length===0&&ie.ended?se(this):z(this),null;if(ee=K(ee,ie),ee===0&&ie.ended)return ie.length===0&&se(this),null;var ne=ie.needReadable;f("need readable",ne),(ie.length===0||ie.length-ee<ie.highWaterMark)&&(ne=!0,f("length less than watermark",ne)),ie.ended||ie.reading?(ne=!1,f("reading or ended",ne)):ne&&(f("do read"),ie.reading=!0,ie.sync=!0,ie.length===0&&(ie.needReadable=!0),this._read(ie.highWaterMark),ie.sync=!1,ie.reading||(ee=K(Ee,ie)));var J;return ee>0?J=ae(ee,ie):J=null,J===null?(ie.needReadable=!0,ee=0):ie.length-=ee,ie.length===0&&(ie.ended||(ie.needReadable=!0),Ee!==ee&&ie.ended&&se(this)),J!==null&&this.emit("data",J),J};function W(ee,ie){if(ie.ended)return;if(ie.decoder){var Ee=ie.decoder.end();Ee&&Ee.length&&(ie.buffer.push(Ee),ie.length+=ie.objectMode?1:Ee.length)}ie.ended=!0,z(ee)}function z(ee){var ie=ee._readableState;ie.needReadable=!1,ie.emittedReadable||(f("emitReadable",ie.flowing),ie.emittedReadable=!0,ie.sync?b.nextTick(U,ee):U(ee))}function U(ee){f("emit readable"),ee.emit("readable"),he(ee)}function P(ee,ie){ie.readingMore||(ie.readingMore=!0,b.nextTick(H,ee,ie))}function H(ee,ie){for(var Ee=ie.length;!ie.reading&&!ie.flowing&&!ie.ended&&ie.length<ie.highWaterMark&&!(f("maybeReadMore read 0"),ee.read(0),Ee===ie.length);)Ee=ie.length;ie.readingMore=!1}x.prototype._read=function(ee){this.emit("error",new Error("_read() is not implemented"))},x.prototype.pipe=function(ee,ie){var Ee=this,ne=this._readableState;switch(ne.pipesCount){case 0:ne.pipes=ee;break;case 1:ne.pipes=[ne.pipes,ee];break;default:ne.pipes.push(ee);break}ne.pipesCount+=1,f("pipe count=%d opts=%j",ne.pipesCount,ie);var J=(!ie||ie.end!==!1)&&ee!==N.stdout&&ee!==N.stderr,X=J?me:Le;ne.endEmitted?b.nextTick(X):Ee.once("end",X),ee.on("unpipe",Q);function Q(Oe,Ve){f("onunpipe"),Oe===Ee&&(Ve&&Ve.hasUnpiped===!1&&(Ve.hasUnpiped=!0,ze()))}function me(){f("onend"),ee.end()}var fe=V(Ee);ee.on("drain",fe);var Te=!1;function ze(){f("cleanup"),ee.removeListener("close",et),ee.removeListener("finish",rt),ee.removeListener("drain",fe),ee.removeListener("error",Xe),ee.removeListener("unpipe",Q),Ee.removeListener("end",me),Ee.removeListener("end",Le),Ee.removeListener("data",qe),Te=!0,ne.awaitDrain&&(!ee._writableState||ee._writableState.needDrain)&&fe()}var Je=!1;Ee.on("data",qe);function qe(Oe){f("ondata"),Je=!1;var Ve=ee.write(Oe);Ve===!1&&!Je&&((ne.pipesCount===1&&ne.pipes===ee||ne.pipesCount>1&&be(ne.pipes,ee)!==-1)&&!Te&&(f("false write response, pause",Ee._readableState.awaitDrain),Ee._readableState.awaitDrain++,Je=!0),Ee.pause())}function Xe(Oe){f("onerror",Oe),Le(),ee.removeListener("error",Xe),l(ee,"error")===0&&ee.emit("error",Oe)}C(ee,"error",Xe);function et(){ee.removeListener("finish",rt),Le()}ee.once("close",et);function rt(){f("onfinish"),ee.removeListener("close",et),Le()}ee.once("finish",rt);function Le(){f("unpipe"),Ee.unpipe(ee)}return ee.emit("pipe",Ee),ne.flowing||(f("pipe resume"),Ee.resume()),ee};function V(ee){return function(){var ie=ee._readableState;f("pipeOnDrain",ie.awaitDrain),ie.awaitDrain&&ie.awaitDrain--,ie.awaitDrain===0&&l(ee,"data")&&(ie.flowing=!0,he(ee))}}x.prototype.unpipe=function(ee){var ie=this._readableState,Ee={hasUnpiped:!1};if(ie.pipesCount===0)return this;if(ie.pipesCount===1)return ee&&ee!==ie.pipes?this:(ee||(ee=ie.pipes),ie.pipes=null,ie.pipesCount=0,ie.flowing=!1,ee&&ee.emit("unpipe",this,Ee),this);if(!ee){var ne=ie.pipes,J=ie.pipesCount;ie.pipes=null,ie.pipesCount=0,ie.flowing=!1;for(var X=0;X<J;X++)ne[X].emit("unpipe",this,Ee);return this}var Q=be(ie.pipes,ee);return Q===-1?this:(ie.pipes.splice(Q,1),ie.pipesCount-=1,ie.pipesCount===1&&(ie.pipes=ie.pipes[0]),ee.emit("unpipe",this,Ee),this)},x.prototype.on=function(ee,ie){var Ee=r.prototype.on.call(this,ee,ie);if(ee==="data")this._readableState.flowing!==!1&&this.resume();else if(ee==="readable"){var ne=this._readableState;!ne.endEmitted&&!ne.readableListening&&(ne.readableListening=ne.needReadable=!0,ne.emittedReadable=!1,ne.reading?ne.length&&z(this):b.nextTick(q,this))}return Ee},x.prototype.addListener=x.prototype.on;function q(ee){f("readable nexttick read 0"),ee.read(0)}x.prototype.resume=function(){var ee=this._readableState;return ee.flowing||(f("resume"),ee.flowing=!0,Z(this,ee)),this};function Z(ee,ie){ie.resumeScheduled||(ie.resumeScheduled=!0,b.nextTick(ce,ee,ie))}function ce(ee,ie){ie.reading||(f("resume read 0"),ee.read(0)),ie.resumeScheduled=!1,ie.awaitDrain=0,ee.emit("resume"),he(ee),ie.flowing&&!ie.reading&&ee.read(0)}x.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function he(ee){var ie=ee._readableState;for(f("flow",ie.flowing);ie.flowing&&ee.read()!==null;);}x.prototype.wrap=function(ee){var ie=this,Ee=this._readableState,ne=!1;ee.on("end",function(){if(f("wrapped end"),Ee.decoder&&!Ee.ended){var Q=Ee.decoder.end();Q&&Q.length&&ie.push(Q)}ie.push(null)}),ee.on("data",function(Q){if(f("wrapped data"),Ee.decoder&&(Q=Ee.decoder.write(Q)),Ee.objectMode&&Q==null)return;if(!Ee.objectMode&&(!Q||!Q.length))return;var me=ie.push(Q);me||(ne=!0,ee.pause())});for(var J in ee)this[J]===void 0&&typeof ee[J]=="function"&&(this[J]=function(Q){return function(){return ee[Q].apply(ee,arguments)}}(J));for(var X=0;X<R.length;X++)ee.on(R[X],this.emit.bind(this,R[X]));return this._read=function(Q){f("wrapped _read",Q),ne&&(ne=!1,ee.resume())},this},Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),x._fromList=ae;function ae(ee,ie){if(ie.length===0)return null;var Ee;return ie.objectMode?Ee=ie.buffer.shift():!ee||ee>=ie.length?(ie.decoder?Ee=ie.buffer.join(""):ie.buffer.length===1?Ee=ie.buffer.head.data:Ee=ie.buffer.concat(ie.length),ie.buffer.clear()):Ee=xe(ee,ie.buffer,ie.decoder),Ee}function xe(ee,ie,Ee){var ne;return ee<ie.head.data.length?(ne=ie.head.data.slice(0,ee),ie.head.data=ie.head.data.slice(ee)):ee===ie.head.data.length?ne=ie.shift():ne=Ee?ge(ee,ie):oe(ee,ie),ne}function ge(ee,ie){var Ee=ie.head,ne=1,J=Ee.data;for(ee-=J.length;Ee=Ee.next;){var X=Ee.data,Q=ee>X.length?X.length:ee;if(Q===X.length?J+=X:J+=X.slice(0,ee),ee-=Q,ee===0){Q===X.length?(++ne,Ee.next?ie.head=Ee.next:ie.head=ie.tail=null):(ie.head=Ee,Ee.data=X.slice(Q));break}++ne}return ie.length-=ne,J}function oe(ee,ie){var Ee=i.allocUnsafe(ee),ne=ie.head,J=1;for(ne.data.copy(Ee),ee-=ne.data.length;ne=ne.next;){var X=ne.data,Q=ee>X.length?X.length:ee;if(X.copy(Ee,Ee.length-ee,0,Q),ee-=Q,ee===0){Q===X.length?(++J,ne.next?ie.head=ne.next:ie.head=ie.tail=null):(ie.head=ne,ne.data=X.slice(Q));break}++J}return ie.length-=J,Ee}function se(ee){var ie=ee._readableState;if(ie.length>0)throw new Error('"endReadable()" called on non-empty stream');ie.endEmitted||(ie.ended=!0,b.nextTick(te,ie,ee))}function te(ee,ie){!ee.endEmitted&&ee.length===0&&(ee.endEmitted=!0,ie.readable=!1,ie.emit("end"))}function be(ee,ie){for(var Ee=0,ne=ee.length;Ee<ne;Ee++)if(ee[Ee]===ie)return Ee;return-1}}).call(this,F("_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(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=O(N);function O(d){return d&&d.__esModule?d:{default:d}}$.exports=S;var M=F("./_stream_duplex"),y=(0,v.default)(F("core-util-is"));y.inherits=F("inherits"),y.inherits(S,M);function m(d,t){var l=this._transformState;l.transforming=!1;var r=l.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));l.writechunk=null,l.writecb=null,t!=null&&this.push(t),r(d);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function S(d){if(!(this instanceof S))return new S(d);M.call(this,d),this._transformState={afterTransform:m.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",b)}function b(){var d=this;typeof this._flush=="function"?this._flush(function(t,l){p(d,t,l)}):p(this,null,null)}S.prototype.push=function(d,t){return this._transformState.needTransform=!1,M.prototype.push.call(this,d,t)},S.prototype._transform=function(d,t,l){throw new Error("_transform() is not implemented")},S.prototype._write=function(d,t,l){var r=this._transformState;if(r.writecb=l,r.writechunk=d,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},S.prototype._read=function(d){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},S.prototype._destroy=function(d,t){var l=this;M.prototype._destroy.call(this,d,function(r){t(r),l.emit("close")})};function p(d,t,l){if(t)return d.emit("error",t);if(l!=null&&d.push(l),d._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(d._transformState.transforming)throw new Error("Calling transform done when still transforming");return d.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(F,$,j){(function(N,v){"use strict";var O=F("babel-runtime/core-js/object/define-property"),M=r(O),y=F("babel-runtime/core-js/symbol/has-instance"),m=r(y),S=F("babel-runtime/core-js/symbol"),b=r(S),p=F("babel-runtime/core-js/object/create"),d=r(p),t=F("babel-runtime/core-js/set-immediate"),l=r(t);function r(oe){return oe&&oe.__esModule?oe:{default:oe}}var i=F("process-nextick-args");$.exports=k;function o(oe,se,te){this.chunk=oe,this.encoding=se,this.callback=te,this.next=null}function s(oe){var se=this;this.next=null,this.entry=null,this.finish=function(){ge(se,oe)}}var u=!N.browser&&["v0.10","v0.9."].indexOf(N.version.slice(0,5))>-1?l.default:i.nextTick,a;k.WritableState=E;var c=(0,d.default)(F("core-util-is"));c.inherits=F("inherits");var f={deprecate:F("util-deprecate")},w=F("./internal/streams/stream"),_=F("safe-buffer").Buffer,h=v.Uint8Array||function(){};function R(oe){return _.from(oe)}function C(oe){return _.isBuffer(oe)||oe instanceof h}var g=F("./internal/streams/destroy");c.inherits(k,w);function x(){}function E(oe,se){a=a||F("./_stream_duplex"),oe=oe||{};var te=se instanceof a;this.objectMode=!!oe.objectMode,te&&(this.objectMode=this.objectMode||!!oe.writableObjectMode);var be=oe.highWaterMark,ee=oe.writableHighWaterMark,ie=this.objectMode?16:16*1024;be||be===0?this.highWaterMark=be:te&&(ee||ee===0)?this.highWaterMark=ee:this.highWaterMark=ie,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=oe.decodeStrings===!1;this.decodeStrings=!Ee,this.defaultEncoding=oe.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ne){P(se,ne)},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 s(this)}E.prototype.getBuffer=function(){for(var se=this.bufferedRequest,te=[];se;)te.push(se),se=se.next;return te},function(){try{Object.defineProperty(E.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(oe){}}();var T;typeof b.default=="function"&&m.default&&typeof Function.prototype[m.default]=="function"?(T=Function.prototype[m.default],(0,M.default)(k,m.default,{value:function(se){return T.call(this,se)?!0:this!==k?!1:se&&se._writableState instanceof E}})):T=function(se){return se instanceof this};function k(oe){if(a=a||F("./_stream_duplex"),!T.call(k,this)&&!(this instanceof a))return new k(oe);this._writableState=new E(oe,this),this.writable=!0,oe&&(typeof oe.write=="function"&&(this._write=oe.write),typeof oe.writev=="function"&&(this._writev=oe.writev),typeof oe.destroy=="function"&&(this._destroy=oe.destroy),typeof oe.final=="function"&&(this._final=oe.final)),w.call(this)}k.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function L(oe,se){var te=new Error("write after end");oe.emit("error",te),i.nextTick(se,te)}function A(oe,se,te,be){var ee=!0,ie=!1;return te===null?ie=new TypeError("May not write null values to stream"):typeof te!="string"&&te!==void 0&&!se.objectMode&&(ie=new TypeError("Invalid non-string/buffer chunk")),ie&&(oe.emit("error",ie),i.nextTick(be,ie),ee=!1),ee}k.prototype.write=function(oe,se,te){var be=this._writableState,ee=!1,ie=!be.objectMode&&C(oe);return ie&&!_.isBuffer(oe)&&(oe=R(oe)),typeof se=="function"&&(te=se,se=null),ie?se="buffer":se||(se=be.defaultEncoding),typeof te!="function"&&(te=x),be.ended?L(this,te):(ie||A(this,be,oe,te))&&(be.pendingcb++,ee=K(this,be,ie,oe,se,te)),ee},k.prototype.cork=function(){var oe=this._writableState;oe.corked++},k.prototype.uncork=function(){var oe=this._writableState;oe.corked&&(oe.corked--,!oe.writing&&!oe.corked&&!oe.finished&&!oe.bufferProcessing&&oe.bufferedRequest&&q(this,oe))},k.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(oe,se,te){return!oe.objectMode&&oe.decodeStrings!==!1&&typeof se=="string"&&(se=_.from(se,te)),se}Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function K(oe,se,te,be,ee,ie){if(!te){var Ee=G(se,be,ee);be!==Ee&&(te=!0,ee="buffer",be=Ee)}var ne=se.objectMode?1:be.length;se.length+=ne;var J=se.length<se.highWaterMark;if(J||(se.needDrain=!0),se.writing||se.corked){var X=se.lastBufferedRequest;se.lastBufferedRequest={chunk:be,encoding:ee,isBuf:te,callback:ie,next:null},X?X.next=se.lastBufferedRequest:se.bufferedRequest=se.lastBufferedRequest,se.bufferedRequestCount+=1}else W(oe,se,!1,ne,be,ee,ie);return J}function W(oe,se,te,be,ee,ie,Ee){se.writelen=be,se.writecb=Ee,se.writing=!0,se.sync=!0,te?oe._writev(ee,se.onwrite):oe._write(ee,ie,se.onwrite),se.sync=!1}function z(oe,se,te,be,ee){--se.pendingcb,te?(i.nextTick(ee,be),i.nextTick(ae,oe,se),oe._writableState.errorEmitted=!0,oe.emit("error",be)):(ee(be),oe._writableState.errorEmitted=!0,oe.emit("error",be),ae(oe,se))}function U(oe){oe.writing=!1,oe.writecb=null,oe.length-=oe.writelen,oe.writelen=0}function P(oe,se){var te=oe._writableState,be=te.sync,ee=te.writecb;if(U(te),se)z(oe,te,be,se,ee);else{var ie=Z(te);!ie&&!te.corked&&!te.bufferProcessing&&te.bufferedRequest&&q(oe,te),be?u(H,oe,te,ie,ee):H(oe,te,ie,ee)}}function H(oe,se,te,be){te||V(oe,se),se.pendingcb--,be(),ae(oe,se)}function V(oe,se){se.length===0&&se.needDrain&&(se.needDrain=!1,oe.emit("drain"))}function q(oe,se){se.bufferProcessing=!0;var te=se.bufferedRequest;if(oe._writev&&te&&te.next){var be=se.bufferedRequestCount,ee=new Array(be),ie=se.corkedRequestsFree;ie.entry=te;for(var Ee=0,ne=!0;te;)ee[Ee]=te,te.isBuf||(ne=!1),te=te.next,Ee+=1;ee.allBuffers=ne,W(oe,se,!0,se.length,ee,"",ie.finish),se.pendingcb++,se.lastBufferedRequest=null,ie.next?(se.corkedRequestsFree=ie.next,ie.next=null):se.corkedRequestsFree=new s(se),se.bufferedRequestCount=0}else{for(;te;){var J=te.chunk,X=te.encoding,Q=te.callback,me=se.objectMode?1:J.length;if(W(oe,se,!1,me,J,X,Q),te=te.next,se.bufferedRequestCount--,se.writing)break}te===null&&(se.lastBufferedRequest=null)}se.bufferedRequest=te,se.bufferProcessing=!1}k.prototype._write=function(oe,se,te){te(new Error("_write() is not implemented"))},k.prototype._writev=null,k.prototype.end=function(oe,se,te){var be=this._writableState;typeof oe=="function"?(te=oe,oe=null,se=null):typeof se=="function"&&(te=se,se=null),oe!=null&&this.write(oe,se),be.corked&&(be.corked=1,this.uncork()),!be.ending&&!be.finished&&xe(this,be,te)};function Z(oe){return oe.ending&&oe.length===0&&oe.bufferedRequest===null&&!oe.finished&&!oe.writing}function ce(oe,se){oe._final(function(te){se.pendingcb--,te&&oe.emit("error",te),se.prefinished=!0,oe.emit("prefinish"),ae(oe,se)})}function he(oe,se){!se.prefinished&&!se.finalCalled&&(typeof oe._final=="function"?(se.pendingcb++,se.finalCalled=!0,i.nextTick(ce,oe,se)):(se.prefinished=!0,oe.emit("prefinish")))}function ae(oe,se){var te=Z(se);return te&&(he(oe,se),se.pendingcb===0&&(se.finished=!0,oe.emit("finish"))),te}function xe(oe,se,te){se.ending=!0,ae(oe,se),te&&(se.finished?i.nextTick(te):oe.once("finish",te)),se.ended=!0,oe.writable=!1}function ge(oe,se,te){var be=oe.entry;for(oe.entry=null;be;){var ee=be.callback;se.pendingcb--,ee(te),be=be.next}se.corkedRequestsFree?se.corkedRequestsFree.next=oe:se.corkedRequestsFree=oe}Object.defineProperty(k.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(se){if(!this._writableState)return;this._writableState.destroyed=se}}),k.prototype.destroy=g.destroy,k.prototype._undestroy=g.undestroy,k.prototype._destroy=function(oe,se){this.end(),se(oe)}}).call(this,F("_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(F,$,j){"use strict";function N(y,m){if(!(y instanceof m))throw new TypeError("Cannot call a class as a function")}var v=F("safe-buffer").Buffer,O=F("util");function M(y,m,S){y.copy(m,S)}$.exports=function(){function y(){N(this,y),this.head=null,this.tail=null,this.length=0}return y.prototype.push=function(S){var b={data:S,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length},y.prototype.unshift=function(S){var b={data:S,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length},y.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},y.prototype.clear=function(){this.head=this.tail=null,this.length=0},y.prototype.join=function(S){if(this.length===0)return"";for(var b=this.head,p=""+b.data;b=b.next;)p+=S+b.data;return p},y.prototype.concat=function(S){if(this.length===0)return v.alloc(0);if(this.length===1)return this.head.data;for(var b=v.allocUnsafe(S>>>0),p=this.head,d=0;p;)M(p.data,b,d),d+=p.data.length,p=p.next;return b},y}(),O&&O.inspect&&O.inspect.custom&&($.exports.prototype[O.inspect.custom]=function(){var y=O.inspect({length:this.length});return this.constructor.name+" "+y})},{"safe-buffer":228,util:71}],220:[function(F,$,j){"use strict";var N=F("process-nextick-args");function v(y,m){var S=this,b=this._readableState&&this._readableState.destroyed,p=this._writableState&&this._writableState.destroyed;return b||p?(m?m(y):y&&(!this._writableState||!this._writableState.errorEmitted)&&N.nextTick(M,this,y),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(y||null,function(d){!m&&d?(N.nextTick(M,S,d),S._writableState&&(S._writableState.errorEmitted=!0)):m&&m(d)}),this)}function O(){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 M(y,m){y.emit("error",m)}$.exports={destroy:v,undestroy:O}},{"process-nextick-args":207}],221:[function(F,$,j){"use strict";$.exports=F("events").EventEmitter},{events:192}],222:[function(F,$,j){$.exports=F("./readable").PassThrough},{"./readable":223}],223:[function(F,$,j){j=$.exports=F("./lib/_stream_readable.js"),j.Stream=j,j.Readable=j,j.Writable=F("./lib/_stream_writable.js"),j.Duplex=F("./lib/_stream_duplex.js"),j.Transform=F("./lib/_stream_transform.js"),j.PassThrough=F("./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(F,$,j){$.exports=F("./readable").Transform},{"./readable":223}],225:[function(F,$,j){$.exports=F("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(F,$,j){var N=function(){return this}()||Function("return this")(),v=N.regeneratorRuntime&&Object.getOwnPropertyNames(N).indexOf("regeneratorRuntime")>=0,O=v&&N.regeneratorRuntime;if(N.regeneratorRuntime=void 0,$.exports=F("./runtime"),v)N.regeneratorRuntime=O;else try{delete N.regeneratorRuntime}catch(M){N.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(F,$,j){!function(N){"use strict";var v=Object.prototype,O=v.hasOwnProperty,M,y=typeof Symbol=="function"?Symbol:{},m=y.iterator||"@@iterator",S=y.asyncIterator||"@@asyncIterator",b=y.toStringTag||"@@toStringTag",p=typeof $=="object",d=N.regeneratorRuntime;if(d){p&&($.exports=d);return}d=N.regeneratorRuntime=p?$.exports:{};function t(K,W,z,U){var P=W&&W.prototype instanceof a?W:a,H=Object.create(P.prototype),V=new L(U||[]);return H._invoke=x(K,z,V),H}d.wrap=t;function l(K,W,z){try{return{type:"normal",arg:K.call(W,z)}}catch(U){return{type:"throw",arg:U}}}var r="suspendedStart",i="suspendedYield",o="executing",s="completed",u={};function a(){}function c(){}function f(){}var w={};w[m]=function(){return this};var _=Object.getPrototypeOf,h=_&&_(_(A([])));h&&h!==v&&O.call(h,m)&&(w=h);var R=f.prototype=a.prototype=Object.create(w);c.prototype=R.constructor=f,f.constructor=c,f[b]=c.displayName="GeneratorFunction";function C(K){["next","throw","return"].forEach(function(W){K[W]=function(z){return this._invoke(W,z)}})}d.isGeneratorFunction=function(K){var W=typeof K=="function"&&K.constructor;return W?W===c||(W.displayName||W.name)==="GeneratorFunction":!1},d.mark=function(K){return Object.setPrototypeOf?Object.setPrototypeOf(K,f):(K.__proto__=f,b in K||(K[b]="GeneratorFunction")),K.prototype=Object.create(R),K},d.awrap=function(K){return{__await:K}};function g(K){function W(P,H,V,q){var Z=l(K[P],K,H);if(Z.type==="throw")q(Z.arg);else{var ce=Z.arg,he=ce.value;return he&&typeof he=="object"&&O.call(he,"__await")?Promise.resolve(he.__await).then(function(ae){W("next",ae,V,q)},function(ae){W("throw",ae,V,q)}):Promise.resolve(he).then(function(ae){ce.value=ae,V(ce)},q)}}var z;function U(P,H){function V(){return new Promise(function(q,Z){W(P,H,q,Z)})}return z=z?z.then(V,V):V()}this._invoke=U}C(g.prototype),g.prototype[S]=function(){return this},d.AsyncIterator=g,d.async=function(K,W,z,U){var P=new g(t(K,W,z,U));return d.isGeneratorFunction(W)?P:P.next().then(function(H){return H.done?H.value:P.next()})};function x(K,W,z){var U=r;return function(H,V){if(U===o)throw new Error("Generator is already running");if(U===s){if(H==="throw")throw V;return G()}for(z.method=H,z.arg=V;;){var q=z.delegate;if(q){var Z=E(q,z);if(Z){if(Z===u)continue;return Z}}if(z.method==="next")z.sent=z._sent=z.arg;else if(z.method==="throw"){if(U===r)throw U=s,z.arg;z.dispatchException(z.arg)}else z.method==="return"&&z.abrupt("return",z.arg);U=o;var ce=l(K,W,z);if(ce.type==="normal"){if(U=z.done?s:i,ce.arg===u)continue;return{value:ce.arg,done:z.done}}else ce.type==="throw"&&(U=s,z.method="throw",z.arg=ce.arg)}}}function E(K,W){var z=K.iterator[W.method];if(z===M){if(W.delegate=null,W.method==="throw"){if(K.iterator.return&&(W.method="return",W.arg=M,E(K,W),W.method==="throw"))return u;W.method="throw",W.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var U=l(z,K.iterator,W.arg);if(U.type==="throw")return W.method="throw",W.arg=U.arg,W.delegate=null,u;var P=U.arg;if(!P)return W.method="throw",W.arg=new TypeError("iterator result is not an object"),W.delegate=null,u;if(P.done)W[K.resultName]=P.value,W.next=K.nextLoc,W.method!=="return"&&(W.method="next",W.arg=M);else return P;return W.delegate=null,u}C(R),R[b]="Generator",R[m]=function(){return this},R.toString=function(){return"[object Generator]"};function T(K){var W={tryLoc:K[0]};1 in K&&(W.catchLoc=K[1]),2 in K&&(W.finallyLoc=K[2],W.afterLoc=K[3]),this.tryEntries.push(W)}function k(K){var W=K.completion||{};W.type="normal",delete W.arg,K.completion=W}function L(K){this.tryEntries=[{tryLoc:"root"}],K.forEach(T,this),this.reset(!0)}d.keys=function(K){var W=[];for(var z in K)W.push(z);return W.reverse(),function U(){for(;W.length;){var P=W.pop();if(P in K)return U.value=P,U.done=!1,U}return U.done=!0,U}};function A(K){if(K){var W=K[m];if(W)return W.call(K);if(typeof K.next=="function")return K;if(!isNaN(K.length)){var z=-1,U=function P(){for(;++z<K.length;)if(O.call(K,z))return P.value=K[z],P.done=!1,P;return P.value=M,P.done=!0,P};return U.next=U}}return{next:G}}d.values=A;function G(){return{value:M,done:!0}}L.prototype={constructor:L,reset:function(K){if(this.prev=0,this.next=0,this.sent=this._sent=M,this.done=!1,this.delegate=null,this.method="next",this.arg=M,this.tryEntries.forEach(k),!K)for(var W in this)W.charAt(0)==="t"&&O.call(this,W)&&!isNaN(+W.slice(1))&&(this[W]=M)},stop:function(){this.done=!0;var K=this.tryEntries[0],W=K.completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(K){if(this.done)throw K;var W=this;function z(Z,ce){return H.type="throw",H.arg=K,W.next=Z,ce&&(W.method="next",W.arg=M),!!ce}for(var U=this.tryEntries.length-1;U>=0;--U){var P=this.tryEntries[U],H=P.completion;if(P.tryLoc==="root")return z("end");if(P.tryLoc<=this.prev){var V=O.call(P,"catchLoc"),q=O.call(P,"finallyLoc");if(V&&q){if(this.prev<P.catchLoc)return z(P.catchLoc,!0);if(this.prev<P.finallyLoc)return z(P.finallyLoc)}else if(V){if(this.prev<P.catchLoc)return z(P.catchLoc,!0)}else if(q){if(this.prev<P.finallyLoc)return z(P.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(K,W){for(var z=this.tryEntries.length-1;z>=0;--z){var U=this.tryEntries[z];if(U.tryLoc<=this.prev&&O.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var P=U;break}}P&&(K==="break"||K==="continue")&&P.tryLoc<=W&&W<=P.finallyLoc&&(P=null);var H=P?P.completion:{};return H.type=K,H.arg=W,P?(this.method="next",this.next=P.finallyLoc,u):this.complete(H)},complete:function(K,W){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"&&W&&(this.next=W),u},finish:function(K){for(var W=this.tryEntries.length-1;W>=0;--W){var z=this.tryEntries[W];if(z.finallyLoc===K)return this.complete(z.completion,z.afterLoc),k(z),u}},catch:function(K){for(var W=this.tryEntries.length-1;W>=0;--W){var z=this.tryEntries[W];if(z.tryLoc===K){var U=z.completion;if(U.type==="throw"){var P=U.arg;k(z)}return P}}throw new Error("illegal catch attempt")},delegateYield:function(K,W,z){return this.delegate={iterator:A(K),resultName:W,nextLoc:z},this.method==="next"&&(this.arg=M),u}}}(function(){return this}()||Function("return this")())},{}],228:[function(F,$,j){var N=F("buffer"),v=N.Buffer;function O(y,m){for(var S in y)m[S]=y[S]}v.from&&v.alloc&&v.allocUnsafe&&v.allocUnsafeSlow?$.exports=N:(O(N,j),j.Buffer=M);function M(y,m,S){return v(y,m,S)}O(v,M),M.from=function(y,m,S){if(typeof y=="number")throw new TypeError("Argument must not be a number");return v(y,m,S)},M.alloc=function(y,m,S){if(typeof y!="number")throw new TypeError("Argument must be a number");var b=v(y);return m!==void 0?typeof S=="string"?b.fill(m,S):b.fill(m):b.fill(0),b},M.allocUnsafe=function(y){if(typeof y!="number")throw new TypeError("Argument must be a number");return v(y)},M.allocUnsafeSlow=function(y){if(typeof y!="number")throw new TypeError("Argument must be a number");return N.SlowBuffer(y)}},{buffer:73}],229:[function(F,$,j){(function(N){"use strict";var v=F("babel-runtime/core-js/string/from-code-point"),O=i(v),M=F("babel-runtime/core-js/json/stringify"),y=i(M),m=F("babel-runtime/helpers/typeof"),S=i(m),b=F("babel-runtime/core-js/object/define-property"),p=i(b),d=F("babel-runtime/core-js/object/keys"),t=i(d),l=F("babel-runtime/core-js/object/create"),r=i(l);function i(o){return o&&o.__esModule?o:{default:o}}(function(o){o.parser=function(X,Q){return new u(X,Q)},o.SAXParser=u,o.SAXStream=R,o.createStream=h,o.MAX_BUFFER_LENGTH=64*1024;var s=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];o.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function u(X,Q){if(!(this instanceof u))return new u(X,Q);var me=this;c(me),me.q=me.c="",me.bufferCheckPosition=o.MAX_BUFFER_LENGTH,me.opt=Q||{},me.opt.lowercase=me.opt.lowercase||me.opt.lowercasetags,me.looseCase=me.opt.lowercase?"toLowerCase":"toUpperCase",me.tags=[],me.closed=me.closedRoot=me.sawRoot=!1,me.tag=me.error=null,me.strict=!!X,me.noscript=!!(X||me.opt.noscript),me.state=H.BEGIN,me.strictEntities=me.opt.strictEntities,me.ENTITIES=me.strictEntities?(0,r.default)(o.XML_ENTITIES):(0,r.default)(o.ENTITIES),me.attribList=[],me.opt.xmlns&&(me.ns=(0,r.default)(T)),me.trackPosition=me.opt.position!==!1,me.trackPosition&&(me.position=me.line=me.column=0),q(me,"onready")}r.default||(Object.create=function(X){function Q(){}Q.prototype=X;var me=new Q;return me}),t.default||(Object.keys=function(X){var Q=[];for(var me in X)X.hasOwnProperty(me)&&Q.push(me);return Q});function a(X){for(var Q=Math.max(o.MAX_BUFFER_LENGTH,10),me=0,fe=0,Te=s.length;fe<Te;fe++){var ze=X[s[fe]].length;if(ze>Q)switch(s[fe]){case"textNode":ce(X);break;case"cdata":Z(X,"oncdata",X.cdata),X.cdata="";break;case"script":Z(X,"onscript",X.script),X.script="";break;default:ae(X,"Max buffer length exceeded: "+s[fe])}me=Math.max(me,ze)}var Je=o.MAX_BUFFER_LENGTH-me;X.bufferCheckPosition=Je+X.position}function c(X){for(var Q=0,me=s.length;Q<me;Q++)X[s[Q]]=""}function f(X){ce(X),X.cdata!==""&&(Z(X,"oncdata",X.cdata),X.cdata=""),X.script!==""&&(Z(X,"onscript",X.script),X.script="")}u.prototype={end:function(){xe(this)},write:J,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){f(this)}};var w;try{w=F("stream").Stream}catch(X){w=function(){}}var _=o.EVENTS.filter(function(X){return X!=="error"&&X!=="end"});function h(X,Q){return new R(X,Q)}function R(X,Q){if(!(this instanceof R))return new R(X,Q);w.apply(this),this._parser=new u(X,Q),this.writable=!0,this.readable=!0;var me=this;this._parser.onend=function(){me.emit("end")},this._parser.onerror=function(fe){me.emit("error",fe),me._parser.error=null},this._decoder=null,_.forEach(function(fe){(0,p.default)(me,"on"+fe,{get:function(){return me._parser["on"+fe]},set:function(ze){if(!ze)return me.removeAllListeners(fe),me._parser["on"+fe]=ze,ze;me.on(fe,ze)},enumerable:!0,configurable:!1})})}R.prototype=(0,r.default)(w.prototype,{constructor:{value:R}}),R.prototype.write=function(X){if(typeof N=="function"&&typeof N.isBuffer=="function"&&N.isBuffer(X)){if(!this._decoder){var Q=F("string_decoder").StringDecoder;this._decoder=new Q("utf8")}X=this._decoder.write(X)}return this._parser.write(X.toString()),this.emit("data",X),!0},R.prototype.end=function(X){return X&&X.length&&this.write(X),this._parser.end(),!0},R.prototype.on=function(X,Q){var me=this;return!me._parser["on"+X]&&_.indexOf(X)!==-1&&(me._parser["on"+X]=function(){var fe=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);fe.splice(0,0,X),me.emit.apply(me,fe)}),w.prototype.on.call(me,X,Q)};var C="[CDATA[",g="DOCTYPE",x="http://www.w3.org/XML/1998/namespace",E="http://www.w3.org/2000/xmlns/",T={xml:x,xmlns:E},k=/[:_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]/,L=/[:_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-]/,A=/[#:_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 W(X){return X==='"'||X==="'"}function z(X){return X===">"||K(X)}function U(X,Q){return X.test(Q)}function P(X,Q){return!U(X,Q)}var H=0;o.STATE={BEGIN:H++,BEGIN_WHITESPACE:H++,TEXT:H++,TEXT_ENTITY:H++,OPEN_WAKA:H++,SGML_DECL:H++,SGML_DECL_QUOTED:H++,DOCTYPE:H++,DOCTYPE_QUOTED:H++,DOCTYPE_DTD:H++,DOCTYPE_DTD_QUOTED:H++,COMMENT_STARTING:H++,COMMENT:H++,COMMENT_ENDING:H++,COMMENT_ENDED:H++,CDATA:H++,CDATA_ENDING:H++,CDATA_ENDING_2:H++,PROC_INST:H++,PROC_INST_BODY:H++,PROC_INST_ENDING:H++,OPEN_TAG:H++,OPEN_TAG_SLASH:H++,ATTRIB:H++,ATTRIB_NAME:H++,ATTRIB_NAME_SAW_WHITE:H++,ATTRIB_VALUE:H++,ATTRIB_VALUE_QUOTED:H++,ATTRIB_VALUE_CLOSED:H++,ATTRIB_VALUE_UNQUOTED:H++,ATTRIB_VALUE_ENTITY_Q:H++,ATTRIB_VALUE_ENTITY_U:H++,CLOSE_TAG:H++,CLOSE_TAG_SAW_WHITE:H++,SCRIPT:H++,SCRIPT_ENDING:H++},o.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},o.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,t.default)(o.ENTITIES).forEach(function(X){var Q=o.ENTITIES[X],me=typeof Q=="number"?String.fromCharCode(Q):Q;o.ENTITIES[X]=me});for(var V in o.STATE)o.STATE[o.STATE[V]]=V;H=o.STATE;function q(X,Q,me){X[Q]&&X[Q](me)}function Z(X,Q,me){X.textNode&&ce(X),q(X,Q,me)}function ce(X){X.textNode=he(X.opt,X.textNode),X.textNode&&q(X,"ontext",X.textNode),X.textNode=""}function he(X,Q){return X.trim&&(Q=Q.trim()),X.normalize&&(Q=Q.replace(/\s+/g," ")),Q}function ae(X,Q){return ce(X),X.trackPosition&&(Q+=`
Line: `+X.line+`
Column: `+X.column+`
Char: `+X.c),Q=new Error(Q),X.error=Q,q(X,"onerror",Q),X}function xe(X){return X.sawRoot&&!X.closedRoot&&ge(X,"Unclosed root tag"),X.state!==H.BEGIN&&X.state!==H.BEGIN_WHITESPACE&&X.state!==H.TEXT&&ae(X,"Unexpected end"),ce(X),X.c="",X.closed=!0,q(X,"onend"),u.call(X,X.strict,X.opt),X}function ge(X,Q){if((typeof X=="undefined"?"undefined":(0,S.default)(X))!=="object"||!(X instanceof u))throw new Error("bad call to strictFail");X.strict&&ae(X,Q)}function oe(X){X.strict||(X.tagName=X.tagName[X.looseCase]());var Q=X.tags[X.tags.length-1]||X,me=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&(me.ns=Q.ns),X.attribList.length=0,Z(X,"onopentagstart",me)}function se(X,Q){var me=X.indexOf(":"),fe=me<0?["",X]:X.split(":"),Te=fe[0],ze=fe[1];return Q&&X==="xmlns"&&(Te="xmlns",ze=""),{prefix:Te,local:ze}}function te(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),me=Q.prefix,fe=Q.local;if(me==="xmlns")if(fe==="xml"&&X.attribValue!==x)ge(X,"xml: prefix must be bound to "+x+`
Actual: `+X.attribValue);else if(fe==="xmlns"&&X.attribValue!==E)ge(X,"xmlns: prefix must be bound to "+E+`
Actual: `+X.attribValue);else{var Te=X.tag,ze=X.tags[X.tags.length-1]||X;Te.ns===ze.ns&&(Te.ns=(0,r.default)(ze.ns)),Te.ns[fe]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,Z(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}function be(X,Q){if(X.opt.xmlns){var me=X.tag,fe=se(X.tagName);me.prefix=fe.prefix,me.local=fe.local,me.uri=me.ns[fe.prefix]||"",me.prefix&&!me.uri&&(ge(X,"Unbound namespace prefix: "+(0,y.default)(X.tagName)),me.uri=fe.prefix);var Te=X.tags[X.tags.length-1]||X;me.ns&&Te.ns!==me.ns&&(0,t.default)(me.ns).forEach(function(Ne){Z(X,"onopennamespace",{prefix:Ne,uri:me.ns[Ne]})});for(var ze=0,Je=X.attribList.length;ze<Je;ze++){var qe=X.attribList[ze],Xe=qe[0],et=qe[1],rt=se(Xe,!0),Le=rt.prefix,Oe=rt.local,Ve=Le===""?"":me.ns[Le]||"",Ze={name:Xe,value:et,prefix:Le,local:Oe,uri:Ve};Le&&Le!=="xmlns"&&!Ve&&(ge(X,"Unbound namespace prefix: "+(0,y.default)(Le)),Ze.uri=Le),X.tag.attributes[Xe]=Ze,Z(X,"onattribute",Ze)}X.attribList.length=0}X.tag.isSelfClosing=!!Q,X.sawRoot=!0,X.tags.push(X.tag),Z(X,"onopentag",X.tag),Q||(!X.noscript&&X.tagName.toLowerCase()==="script"?X.state=H.SCRIPT:X.state=H.TEXT,X.tag=null,X.tagName=""),X.attribName=X.attribValue="",X.attribList.length=0}function ee(X){if(!X.tagName){ge(X,"Weird empty close tag."),X.textNode+="</>",X.state=H.TEXT;return}if(X.script){if(X.tagName!=="script"){X.script+="</"+X.tagName+">",X.tagName="",X.state=H.SCRIPT;return}Z(X,"onscript",X.script),X.script=""}var Q=X.tags.length,me=X.tagName;X.strict||(me=me[X.looseCase]());for(var fe=me;Q--;){var Te=X.tags[Q];if(Te.name!==fe)ge(X,"Unexpected close tag");else break}if(Q<0){ge(X,"Unmatched closing tag: "+X.tagName),X.textNode+="</"+X.tagName+">",X.state=H.TEXT;return}X.tagName=me;for(var ze=X.tags.length;ze-- >Q;){var Je=X.tag=X.tags.pop();X.tagName=X.tag.name,Z(X,"onclosetag",X.tagName);var qe={};for(var Xe in Je.ns)qe[Xe]=Je.ns[Xe];var et=X.tags[X.tags.length-1]||X;X.opt.xmlns&&Je.ns!==et.ns&&(0,t.default)(Je.ns).forEach(function(rt){var Le=Je.ns[rt];Z(X,"onclosenamespace",{prefix:rt,uri:Le})})}Q===0&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=H.TEXT}function ie(X){var Q=X.entity,me=Q.toLowerCase(),fe,Te="";return X.ENTITIES[Q]?X.ENTITIES[Q]:X.ENTITIES[me]?X.ENTITIES[me]:(Q=me,Q.charAt(0)==="#"&&(Q.charAt(1)==="x"?(Q=Q.slice(2),fe=parseInt(Q,16),Te=fe.toString(16)):(Q=Q.slice(1),fe=parseInt(Q,10),Te=fe.toString(10))),Q=Q.replace(/^0+/,""),isNaN(fe)||Te.toLowerCase()!==Q?(ge(X,"Invalid character entity"),"&"+X.entity+";"):(0,O.default)(fe))}function Ee(X,Q){Q==="<"?(X.state=H.OPEN_WAKA,X.startTagPosition=X.position):K(Q)||(ge(X,"Non-whitespace before first tag."),X.textNode=Q,X.state=H.TEXT)}function ne(X,Q){var me="";return Q<X.length&&(me=X.charAt(Q)),me}function J(X){var Q=this;if(this.error)throw this.error;if(Q.closed)return ae(Q,"Cannot write after close. Assign an onready handler.");if(X===null)return xe(Q);(typeof X=="undefined"?"undefined":(0,S.default)(X))==="object"&&(X=X.toString());for(var me=0,fe="";!(fe=ne(X,me++),Q.c=fe,!fe);){Q.trackPosition&&(Q.position++,fe===`
`?(Q.line++,Q.column=0):Q.column++);switch(Q.state){case H.BEGIN:if(Q.state=H.BEGIN_WHITESPACE,fe==="\uFEFF")continue;Ee(Q,fe);continue;case H.BEGIN_WHITESPACE:Ee(Q,fe);continue;case H.TEXT:if(Q.sawRoot&&!Q.closedRoot){for(var Te=me-1;fe&&fe!=="<"&&fe!=="&";)fe=ne(X,me++),fe&&Q.trackPosition&&(Q.position++,fe===`
`?(Q.line++,Q.column=0):Q.column++);Q.textNode+=X.substring(Te,me-1)}fe==="<"&&!(Q.sawRoot&&Q.closedRoot&&!Q.strict)?(Q.state=H.OPEN_WAKA,Q.startTagPosition=Q.position):(!K(fe)&&(!Q.sawRoot||Q.closedRoot)&&ge(Q,"Text data outside of root node."),fe==="&"?Q.state=H.TEXT_ENTITY:Q.textNode+=fe);continue;case H.SCRIPT:fe==="<"?Q.state=H.SCRIPT_ENDING:Q.script+=fe;continue;case H.SCRIPT_ENDING:fe==="/"?Q.state=H.CLOSE_TAG:(Q.script+="<"+fe,Q.state=H.SCRIPT);continue;case H.OPEN_WAKA:if(fe==="!")Q.state=H.SGML_DECL,Q.sgmlDecl="";else if(!K(fe))if(U(k,fe))Q.state=H.OPEN_TAG,Q.tagName=fe;else if(fe==="/")Q.state=H.CLOSE_TAG,Q.tagName="";else if(fe==="?")Q.state=H.PROC_INST,Q.procInstName=Q.procInstBody="";else{if(ge(Q,"Unencoded <"),Q.startTagPosition+1<Q.position){var ze=Q.position-Q.startTagPosition;fe=new Array(ze).join(" ")+fe}Q.textNode+="<"+fe,Q.state=H.TEXT}continue;case H.SGML_DECL:(Q.sgmlDecl+fe).toUpperCase()===C?(Z(Q,"onopencdata"),Q.state=H.CDATA,Q.sgmlDecl="",Q.cdata=""):Q.sgmlDecl+fe==="--"?(Q.state=H.COMMENT,Q.comment="",Q.sgmlDecl=""):(Q.sgmlDecl+fe).toUpperCase()===g?(Q.state=H.DOCTYPE,(Q.doctype||Q.sawRoot)&&ge(Q,"Inappropriately located doctype declaration"),Q.doctype="",Q.sgmlDecl=""):fe===">"?(Z(Q,"onsgmldeclaration",Q.sgmlDecl),Q.sgmlDecl="",Q.state=H.TEXT):(W(fe)&&(Q.state=H.SGML_DECL_QUOTED),Q.sgmlDecl+=fe);continue;case H.SGML_DECL_QUOTED:fe===Q.q&&(Q.state=H.SGML_DECL,Q.q=""),Q.sgmlDecl+=fe;continue;case H.DOCTYPE:fe===">"?(Q.state=H.TEXT,Z(Q,"ondoctype",Q.doctype),Q.doctype=!0):(Q.doctype+=fe,fe==="["?Q.state=H.DOCTYPE_DTD:W(fe)&&(Q.state=H.DOCTYPE_QUOTED,Q.q=fe));continue;case H.DOCTYPE_QUOTED:Q.doctype+=fe,fe===Q.q&&(Q.q="",Q.state=H.DOCTYPE);continue;case H.DOCTYPE_DTD:Q.doctype+=fe,fe==="]"?Q.state=H.DOCTYPE:W(fe)&&(Q.state=H.DOCTYPE_DTD_QUOTED,Q.q=fe);continue;case H.DOCTYPE_DTD_QUOTED:Q.doctype+=fe,fe===Q.q&&(Q.state=H.DOCTYPE_DTD,Q.q="");continue;case H.COMMENT:fe==="-"?Q.state=H.COMMENT_ENDING:Q.comment+=fe;continue;case H.COMMENT_ENDING:fe==="-"?(Q.state=H.COMMENT_ENDED,Q.comment=he(Q.opt,Q.comment),Q.comment&&Z(Q,"oncomment",Q.comment),Q.comment=""):(Q.comment+="-"+fe,Q.state=H.COMMENT);continue;case H.COMMENT_ENDED:fe!==">"?(ge(Q,"Malformed comment"),Q.comment+="--"+fe,Q.state=H.COMMENT):Q.state=H.TEXT;continue;case H.CDATA:fe==="]"?Q.state=H.CDATA_ENDING:Q.cdata+=fe;continue;case H.CDATA_ENDING:fe==="]"?Q.state=H.CDATA_ENDING_2:(Q.cdata+="]"+fe,Q.state=H.CDATA);continue;case H.CDATA_ENDING_2:fe===">"?(Q.cdata&&Z(Q,"oncdata",Q.cdata),Z(Q,"onclosecdata"),Q.cdata="",Q.state=H.TEXT):fe==="]"?Q.cdata+="]":(Q.cdata+="]]"+fe,Q.state=H.CDATA);continue;case H.PROC_INST:fe==="?"?Q.state=H.PROC_INST_ENDING:K(fe)?Q.state=H.PROC_INST_BODY:Q.procInstName+=fe;continue;case H.PROC_INST_BODY:if(!Q.procInstBody&&K(fe))continue;fe==="?"?Q.state=H.PROC_INST_ENDING:Q.procInstBody+=fe;continue;case H.PROC_INST_ENDING:fe===">"?(Z(Q,"onprocessinginstruction",{name:Q.procInstName,body:Q.procInstBody}),Q.procInstName=Q.procInstBody="",Q.state=H.TEXT):(Q.procInstBody+="?"+fe,Q.state=H.PROC_INST_BODY);continue;case H.OPEN_TAG:U(L,fe)?Q.tagName+=fe:(oe(Q),fe===">"?be(Q):fe==="/"?Q.state=H.OPEN_TAG_SLASH:(K(fe)||ge(Q,"Invalid character in tag name"),Q.state=H.ATTRIB));continue;case H.OPEN_TAG_SLASH:fe===">"?(be(Q,!0),ee(Q)):(ge(Q,"Forward-slash in opening tag not followed by >"),Q.state=H.ATTRIB);continue;case H.ATTRIB:if(K(fe))continue;fe===">"?be(Q):fe==="/"?Q.state=H.OPEN_TAG_SLASH:U(k,fe)?(Q.attribName=fe,Q.attribValue="",Q.state=H.ATTRIB_NAME):ge(Q,"Invalid attribute name");continue;case H.ATTRIB_NAME:fe==="="?Q.state=H.ATTRIB_VALUE:fe===">"?(ge(Q,"Attribute without value"),Q.attribValue=Q.attribName,te(Q),be(Q)):K(fe)?Q.state=H.ATTRIB_NAME_SAW_WHITE:U(L,fe)?Q.attribName+=fe:ge(Q,"Invalid attribute name");continue;case H.ATTRIB_NAME_SAW_WHITE:if(fe==="=")Q.state=H.ATTRIB_VALUE;else{if(K(fe))continue;ge(Q,"Attribute without value"),Q.tag.attributes[Q.attribName]="",Q.attribValue="",Z(Q,"onattribute",{name:Q.attribName,value:""}),Q.attribName="",fe===">"?be(Q):U(k,fe)?(Q.attribName=fe,Q.state=H.ATTRIB_NAME):(ge(Q,"Invalid attribute name"),Q.state=H.ATTRIB)}continue;case H.ATTRIB_VALUE:if(K(fe))continue;W(fe)?(Q.q=fe,Q.state=H.ATTRIB_VALUE_QUOTED):(ge(Q,"Unquoted attribute value"),Q.state=H.ATTRIB_VALUE_UNQUOTED,Q.attribValue=fe);continue;case H.ATTRIB_VALUE_QUOTED:if(fe!==Q.q){fe==="&"?Q.state=H.ATTRIB_VALUE_ENTITY_Q:Q.attribValue+=fe;continue}te(Q),Q.q="",Q.state=H.ATTRIB_VALUE_CLOSED;continue;case H.ATTRIB_VALUE_CLOSED:K(fe)?Q.state=H.ATTRIB:fe===">"?be(Q):fe==="/"?Q.state=H.OPEN_TAG_SLASH:U(k,fe)?(ge(Q,"No whitespace between attributes"),Q.attribName=fe,Q.attribValue="",Q.state=H.ATTRIB_NAME):ge(Q,"Invalid attribute name");continue;case H.ATTRIB_VALUE_UNQUOTED:if(!z(fe)){fe==="&"?Q.state=H.ATTRIB_VALUE_ENTITY_U:Q.attribValue+=fe;continue}te(Q),fe===">"?be(Q):Q.state=H.ATTRIB;continue;case H.CLOSE_TAG:if(Q.tagName)fe===">"?ee(Q):U(L,fe)?Q.tagName+=fe:Q.script?(Q.script+="</"+Q.tagName,Q.tagName="",Q.state=H.SCRIPT):(K(fe)||ge(Q,"Invalid tagname in closing tag"),Q.state=H.CLOSE_TAG_SAW_WHITE);else{if(K(fe))continue;P(k,fe)?Q.script?(Q.script+="</"+fe,Q.state=H.SCRIPT):ge(Q,"Invalid tagname in closing tag."):Q.tagName=fe}continue;case H.CLOSE_TAG_SAW_WHITE:if(K(fe))continue;fe===">"?ee(Q):ge(Q,"Invalid characters in closing tag");continue;case H.TEXT_ENTITY:case H.ATTRIB_VALUE_ENTITY_Q:case H.ATTRIB_VALUE_ENTITY_U:var Je,qe;switch(Q.state){case H.TEXT_ENTITY:Je=H.TEXT,qe="textNode";break;case H.ATTRIB_VALUE_ENTITY_Q:Je=H.ATTRIB_VALUE_QUOTED,qe="attribValue";break;case H.ATTRIB_VALUE_ENTITY_U:Je=H.ATTRIB_VALUE_UNQUOTED,qe="attribValue";break}fe===";"?(Q[qe]+=ie(Q),Q.entity="",Q.state=Je):U(Q.entity.length?G:A,fe)?Q.entity+=fe:(ge(Q,"Invalid character in entity name"),Q[qe]+="&"+Q.entity+fe,Q.entity="",Q.state=Je);continue;default:throw new Error(Q,"Unknown state: "+Q.state)}}return Q.position>=Q.bufferCheckPosition&&a(Q),Q}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */O.default||function(){var X=String.fromCharCode,Q=Math.floor,me=function(){var Te=16384,ze=[],Je,qe,Xe=-1,et=arguments.length;if(!et)return"";for(var rt="";++Xe<et;){var Le=Number(arguments[Xe]);if(!isFinite(Le)||Le<0||Le>1114111||Q(Le)!==Le)throw RangeError("Invalid code point: "+Le);Le<=65535?ze.push(Le):(Le-=65536,Je=(Le>>10)+55296,qe=Le%1024+56320,ze.push(Je,qe)),(Xe+1===et||ze.length>Te)&&(rt+=X.apply(null,ze),ze.length=0)}return rt};p.default?Object.defineProperty(String,"fromCodePoint",{value:me,configurable:!0,writable:!0}):String.fromCodePoint=me}()})(typeof j=="undefined"?(void 0).sax={}:j)}).call(this,F("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(F,$,j){$.exports=O;var N=F("events").EventEmitter,v=F("inherits");v(O,N),O.Readable=F("readable-stream/readable.js"),O.Writable=F("readable-stream/writable.js"),O.Duplex=F("readable-stream/duplex.js"),O.Transform=F("readable-stream/transform.js"),O.PassThrough=F("readable-stream/passthrough.js"),O.Stream=O;function O(){N.call(this)}O.prototype.pipe=function(M,y){var m=this;function S(i){M.writable&&(M.write(i)===!1&&m.pause&&m.pause())}m.on("data",S);function b(){m.readable&&m.resume&&m.resume()}M.on("drain",b),!M._isStdio&&(!y||y.end!==!1)&&(m.on("end",d),m.on("close",t));var p=!1;function d(){if(p)return;p=!0,M.end()}function t(){if(p)return;p=!0,typeof M.destroy=="function"&&M.destroy()}function l(i){if(r(),N.listenerCount(this,"error")===0)throw i}m.on("error",l),M.on("error",l);function r(){m.removeListener("data",S),M.removeListener("drain",b),m.removeListener("end",d),m.removeListener("close",t),m.removeListener("error",l),M.removeListener("error",l),m.removeListener("end",r),m.removeListener("close",r),M.removeListener("close",r)}return m.on("end",r),m.on("close",r),M.on("close",r),M.emit("pipe",m),M}},{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(F,$,j){(function(N){var v=F("./lib/request"),O=F("./lib/response"),M=F("xtend"),y=F("builtin-status-codes"),m=F("url"),S=j;S.request=function(b,p){typeof b=="string"?b=m.parse(b):b=M(b);var d=N.location.protocol.search(/^https?:$/)===-1?"http:":"",t=b.protocol||d,l=b.hostname||b.host,r=b.port,i=b.path||"/";l&&l.indexOf(":")!==-1&&(l="["+l+"]"),b.url=(l?t+"//"+l:"")+(r?":"+r:"")+i,b.method=(b.method||"GET").toUpperCase(),b.headers=b.headers||{};var o=new v(b);return p&&o.on("response",p),o},S.get=function(p,d){var t=S.request(p,d);return t.end(),t},S.ClientRequest=v,S.IncomingMessage=O.IncomingMessage,S.Agent=function(){},S.Agent.defaultMaxSockets=4,S.globalAgent=new S.Agent,S.STATUS_CODES=y,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(F,$,j){(function(N){"use strict";j.fetch=S(N.fetch)&&S(N.ReadableStream),j.writableStream=S(N.WritableStream),j.abortController=S(N.AbortController),j.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),j.blobConstructor=!0}catch(b){}var v;function O(){if(v!==void 0)return v;if(N.XMLHttpRequest){v=new N.XMLHttpRequest;try{v.open("GET",N.XDomainRequest?"/":"https://example.com")}catch(b){v=null}}else v=null;return v}function M(b){var p=O();if(!p)return!1;try{return p.responseType=b,p.responseType===b}catch(d){}return!1}var y=typeof N.ArrayBuffer!="undefined",m=y&&S(N.ArrayBuffer.prototype.slice);j.arraybuffer=j.fetch||y&&M("arraybuffer"),j.msstream=!j.fetch&&m&&M("ms-stream"),j.mozchunkedarraybuffer=!j.fetch&&y&&M("moz-chunked-arraybuffer"),j.overrideMimeType=j.fetch||(O()?S(O().overrideMimeType):!1),j.vbArray=S(N.VBArray);function S(b){return typeof b=="function"}v=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(F,$,j){(function(N,v,O){"use strict";var M=F("babel-runtime/core-js/object/keys"),y=m(M);function m(a){return a&&a.__esModule?a:{default:a}}var S=F("./capability"),b=F("inherits"),p=F("./response"),d=F("readable-stream"),t=F("to-arraybuffer"),l=p.IncomingMessage,r=p.readyStates;function i(a,c){return S.fetch&&c?"fetch":S.mozchunkedarraybuffer?"moz-chunked-arraybuffer":S.msstream?"ms-stream":S.arraybuffer&&a?"arraybuffer":S.vbArray&&a?"text:vbarray":"text"}var o=$.exports=function(a){var c=this;d.Writable.call(c),c._opts=a,c._body=[],c._headers={},a.auth&&c.setHeader("Authorization","Basic "+new O(a.auth).toString("base64")),(0,y.default)(a.headers).forEach(function(_){c.setHeader(_,a.headers[_])});var f,w=!0;if(a.mode==="disable-fetch"||"requestTimeout"in a&&!S.abortController)w=!1,f=!0;else if(a.mode==="prefer-streaming")f=!1;else if(a.mode==="allow-wrong-content-type")f=!S.overrideMimeType;else if(!a.mode||a.mode==="default"||a.mode==="prefer-fast")f=!0;else throw new Error("Invalid value for opts.mode");c._mode=i(f,w),c._fetchTimer=null,c.on("finish",function(){c._onFinish()})};b(o,d.Writable),o.prototype.setHeader=function(a,c){var f=this,w=a.toLowerCase();if(u.indexOf(w)!==-1)return;f._headers[w]={name:a,value:c}},o.prototype.getHeader=function(a){var c=this._headers[a.toLowerCase()];return c?c.value:null},o.prototype.removeHeader=function(a){var c=this;delete c._headers[a.toLowerCase()]},o.prototype._onFinish=function(){var a=this;if(a._destroyed)return;var c=a._opts,f=a._headers,w=null;c.method!=="GET"&&c.method!=="HEAD"&&(S.arraybuffer?w=t(O.concat(a._body)):S.blobConstructor?w=new v.Blob(a._body.map(function(x){return t(x)}),{type:(f["content-type"]||{}).value||""}):w=O.concat(a._body).toString());var _=[];if((0,y.default)(f).forEach(function(x){var E=f[x].name,T=f[x].value;Array.isArray(T)?T.forEach(function(k){_.push([E,k])}):_.push([E,T])}),a._mode==="fetch"){var h=null,R=null;if(S.abortController){var C=new AbortController;h=C.signal,a._fetchAbortController=C,"requestTimeout"in c&&c.requestTimeout!==0&&(a._fetchTimer=v.setTimeout(function(){a.emit("requestTimeout"),a._fetchAbortController&&a._fetchAbortController.abort()},c.requestTimeout))}v.fetch(a._opts.url,{method:a._opts.method,headers:_,body:w||void 0,mode:"cors",credentials:c.withCredentials?"include":"same-origin",signal:h}).then(function(x){a._fetchResponse=x,a._connect()},function(x){v.clearTimeout(a._fetchTimer),a._destroyed||a.emit("error",x)})}else{var g=a._xhr=new v.XMLHttpRequest;try{g.open(a._opts.method,a._opts.url,!0)}catch(x){N.nextTick(function(){a.emit("error",x)});return}"responseType"in g&&(g.responseType=a._mode.split(":")[0]),"withCredentials"in g&&(g.withCredentials=!!c.withCredentials),a._mode==="text"&&"overrideMimeType"in g&&g.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in c&&(g.timeout=c.requestTimeout,g.ontimeout=function(){a.emit("requestTimeout")}),_.forEach(function(x){g.setRequestHeader(x[0],x[1])}),a._response=null,g.onreadystatechange=function(){switch(g.readyState){case r.LOADING:case r.DONE:a._onXHRProgress();break}},a._mode==="moz-chunked-arraybuffer"&&(g.onprogress=function(){a._onXHRProgress()}),g.onerror=function(){if(a._destroyed)return;a.emit("error",new Error("XHR error"))};try{g.send(w)}catch(x){N.nextTick(function(){a.emit("error",x)});return}}};function s(a){try{var c=a.status;return c!==null&&c!==0}catch(f){return!1}}o.prototype._onXHRProgress=function(){var a=this;if(!s(a._xhr)||a._destroyed)return;a._response||a._connect(),a._response._onXHRProgress()},o.prototype._connect=function(){var a=this;if(a._destroyed)return;a._response=new l(a._xhr,a._fetchResponse,a._mode,a._fetchTimer),a._response.on("error",function(c){a.emit("error",c)}),a.emit("response",a._response)},o.prototype._write=function(a,c,f){var w=this;w._body.push(a),f()},o.prototype.abort=o.prototype.destroy=function(){var a=this;a._destroyed=!0,v.clearTimeout(a._fetchTimer),a._response&&(a._response._destroyed=!0),a._xhr?a._xhr.abort():a._fetchAbortController&&a._fetchAbortController.abort()},o.prototype.end=function(a,c,f){var w=this;typeof a=="function"&&(f=a,a=void 0),d.Writable.prototype.end.call(w,a,c,f)},o.prototype.flushHeaders=function(){},o.prototype.setTimeout=function(){},o.prototype.setNoDelay=function(){},o.prototype.setSocketKeepAlive=function(){};var u=["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,F("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},F("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(F,$,j){(function(N,v,O){"use strict";var M=F("babel-runtime/core-js/promise"),y=m(M);function m(l){return l&&l.__esModule?l:{default:l}}var S=F("./capability"),b=F("inherits"),p=F("readable-stream"),d=j.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},t=j.IncomingMessage=function(l,r,i,o){var s=this;if(p.Readable.call(s),s._mode=i,s.headers={},s.rawHeaders=[],s.trailers={},s.rawTrailers=[],s.on("end",function(){N.nextTick(function(){s.emit("close")})}),i==="fetch"){var u=function h(){c.read().then(function(R){if(s._destroyed)return;if(R.done){v.clearTimeout(o),s.push(null);return}s.push(new O(R.value)),h()}).catch(function(R){v.clearTimeout(o),s._destroyed||s.emit("error",R)})};if(s._fetchResponse=r,s.url=r.url,s.statusCode=r.status,s.statusMessage=r.statusText,r.headers.forEach(function(h,R){s.headers[R.toLowerCase()]=h,s.rawHeaders.push(R,h)}),S.writableStream){var a=new WritableStream({write:function(R){return new y.default(function(C,g){s._destroyed?g():s.push(new O(R))?C():s._resumeFetch=C})},close:function(){v.clearTimeout(o),s._destroyed||s.push(null)},abort:function(R){s._destroyed||s.emit("error",R)}});try{r.body.pipeTo(a).catch(function(h){v.clearTimeout(o),s._destroyed||s.emit("error",h)});return}catch(h){}}var c=r.body.getReader();u()}else{s._xhr=l,s._pos=0,s.url=l.responseURL,s.statusCode=l.status,s.statusMessage=l.statusText;var f=l.getAllResponseHeaders().split(/\r?\n/);if(f.forEach(function(h){var R=h.match(/^([^:]+):\s*(.*)/);if(R){var C=R[1].toLowerCase();C==="set-cookie"?(s.headers[C]===void 0&&(s.headers[C]=[]),s.headers[C].push(R[2])):s.headers[C]!==void 0?s.headers[C]+=", "+R[2]:s.headers[C]=R[2],s.rawHeaders.push(R[1],R[2])}}),s._charset="x-user-defined",!S.overrideMimeType){var w=s.rawHeaders["mime-type"];if(w){var _=w.match(/;\s*charset=([^;])(;|$)/);_&&(s._charset=_[1].toLowerCase())}s._charset||(s._charset="utf-8")}}};b(t,p.Readable),t.prototype._read=function(){var l=this,r=l._resumeFetch;r&&(l._resumeFetch=null,r())},t.prototype._onXHRProgress=function(){var l=this,r=l._xhr,i=null;switch(l._mode){case"text:vbarray":if(r.readyState!==d.DONE)break;try{i=new v.VBArray(r.responseBody).toArray()}catch(c){}if(i!==null){l.push(new O(i));break}case"text":try{i=r.responseText}catch(c){l._mode="text:vbarray";break}if(i.length>l._pos){var o=i.substr(l._pos);if(l._charset==="x-user-defined"){for(var s=new O(o.length),u=0;u<o.length;u++)s[u]=o.charCodeAt(u)&255;l.push(s)}else l.push(o,l._charset);l._pos=i.length}break;case"arraybuffer":if(r.readyState!==d.DONE||!r.response)break;i=r.response,l.push(new O(new Uint8Array(i)));break;case"moz-chunked-arraybuffer":if(i=r.response,r.readyState!==d.LOADING||!i)break;l.push(new O(new Uint8Array(i)));break;case"ms-stream":if(i=r.response,r.readyState!==d.LOADING)break;var a=new v.MSStreamReader;a.onprogress=function(){a.result.byteLength>l._pos&&(l.push(new O(new Uint8Array(a.result.slice(l._pos)))),l._pos=a.result.byteLength)},a.onload=function(){l.push(null)},a.readAsArrayBuffer(i);break}l._xhr.readyState===d.DONE&&l._mode!=="ms-stream"&&l.push(null)}}).call(this,F("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},F("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(F,$,j){"use strict";var N=F("safe-buffer").Buffer,v=N.isEncoding||function(a){a=""+a;switch(a&&a.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 O(a){if(!a)return"utf8";for(var c;;)switch(a){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 a;default:if(c)return;a=(""+a).toLowerCase(),c=!0}}function M(a){var c=O(a);if(typeof c!="string"&&(N.isEncoding===v||!v(a)))throw new Error("Unknown encoding: "+a);return c||a}j.StringDecoder=y;function y(a){this.encoding=M(a);var c;switch(this.encoding){case"utf16le":this.text=l,this.end=r,c=4;break;case"utf8":this.fillLast=p,c=4;break;case"base64":this.text=i,this.end=o,c=3;break;default:this.write=s,this.end=u;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=N.allocUnsafe(c)}y.prototype.write=function(a){if(a.length===0)return"";var c,f;if(this.lastNeed){if(c=this.fillLast(a),c===void 0)return"";f=this.lastNeed,this.lastNeed=0}else f=0;return f<a.length?c?c+this.text(a,f):this.text(a,f):c||""},y.prototype.end=t,y.prototype.text=d,y.prototype.fillLast=function(a){if(this.lastNeed<=a.length)return a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,a.length),this.lastNeed-=a.length};function m(a){return a<=127?0:a>>5===6?2:a>>4===14?3:a>>3===30?4:a>>6===2?-1:-2}function S(a,c,f){var w=c.length-1;if(w<f)return 0;var _=m(c[w]);return _>=0?(_>0&&(a.lastNeed=_-1),_):--w<f||_===-2?0:(_=m(c[w]),_>=0?(_>0&&(a.lastNeed=_-2),_):--w<f||_===-2?0:(_=m(c[w]),_>=0?(_>0&&(_===2?_=0:a.lastNeed=_-3),_):0))}function b(a,c,f){if((c[0]&192)!==128)return a.lastNeed=0,"\uFFFD";if(a.lastNeed>1&&c.length>1){if((c[1]&192)!==128)return a.lastNeed=1,"\uFFFD";if(a.lastNeed>2&&c.length>2&&(c[2]&192)!==128)return a.lastNeed=2,"\uFFFD"}}function p(a){var c=this.lastTotal-this.lastNeed,f=b(this,a,c);if(f!==void 0)return f;if(this.lastNeed<=a.length)return a.copy(this.lastChar,c,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,c,0,a.length),this.lastNeed-=a.length}function d(a,c){var f=S(this,a,c);if(!this.lastNeed)return a.toString("utf8",c);this.lastTotal=f;var w=a.length-(f-this.lastNeed);return a.copy(this.lastChar,0,w),a.toString("utf8",c,w)}function t(a){var c=a&&a.length?this.write(a):"";return this.lastNeed?c+"\uFFFD":c}function l(a,c){if((a.length-c)%2===0){var f=a.toString("utf16le",c);if(f){var w=f.charCodeAt(f.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1],f.slice(0,-1)}return f}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=a[a.length-1],a.toString("utf16le",c,a.length-1)}function r(a){var c=a&&a.length?this.write(a):"";if(this.lastNeed){var f=this.lastTotal-this.lastNeed;return c+this.lastChar.toString("utf16le",0,f)}return c}function i(a,c){var f=(a.length-c)%3;return f===0?a.toString("base64",c):(this.lastNeed=3-f,this.lastTotal=3,f===1?this.lastChar[0]=a[a.length-1]:(this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1]),a.toString("base64",c,a.length-f))}function o(a){var c=a&&a.length?this.write(a):"";return this.lastNeed?c+this.lastChar.toString("base64",0,3-this.lastNeed):c}function s(a){return a.toString(this.encoding)}function u(a){return a&&a.length?this.write(a):""}},{"safe-buffer":228}],236:[function(F,$,j){(function(N,v){var O=F("process/browser.js").nextTick,M=Function.prototype.apply,y=Array.prototype.slice,m={},S=0;j.setTimeout=function(){return new b(M.call(setTimeout,window,arguments),clearTimeout)},j.setInterval=function(){return new b(M.call(setInterval,window,arguments),clearInterval)},j.clearTimeout=j.clearInterval=function(p){p.close()};function b(p,d){this._id=p,this._clearFn=d}b.prototype.unref=b.prototype.ref=function(){},b.prototype.close=function(){this._clearFn.call(window,this._id)},j.enroll=function(p,d){clearTimeout(p._idleTimeoutId),p._idleTimeout=d},j.unenroll=function(p){clearTimeout(p._idleTimeoutId),p._idleTimeout=-1},j._unrefActive=j.active=function(p){clearTimeout(p._idleTimeoutId);var d=p._idleTimeout;d>=0&&(p._idleTimeoutId=setTimeout(function(){p._onTimeout&&p._onTimeout()},d))},j.setImmediate=typeof N=="function"?N:function(p){var d=S++,t=arguments.length<2?!1:y.call(arguments,1);return m[d]=!0,O(function(){m[d]&&(t?p.apply(null,t):p.call(null),j.clearImmediate(d))}),d},j.clearImmediate=typeof v=="function"?v:function(p){delete m[p]}}).call(this,F("timers").setImmediate,F("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(F,$,j){var N=F("buffer").Buffer;$.exports=function(v){if(v instanceof Uint8Array){if(v.byteOffset===0&&v.byteLength===v.buffer.byteLength)return v.buffer;if(typeof v.buffer.slice=="function")return v.buffer.slice(v.byteOffset,v.byteOffset+v.byteLength)}if(N.isBuffer(v)){for(var O=new Uint8Array(v.length),M=v.length,y=0;y<M;y++)O[y]=v[y];return O.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(F,$,j){"use strict";var N=F("punycode"),v=F("./util");j.parse=c,j.resolve=w,j.resolveObject=_,j.format=f,j.Url=O;function O(){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 M=/^([a-z0-9.+-]+:)/i,y=/:[0-9]*$/,m=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,S=["<",">",'"',"`"," ","\r",`
`," "],b=["{","}","|","\\","^","`"].concat(S),p=["'"].concat(b),d=["%","/","?",";","#"].concat(p),t=["/","?","#"],l=255,r=/^[+a-z0-9A-Z_-]{0,63}$/,i=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,o={javascript:!0,"javascript:":!0},s={javascript:!0,"javascript:":!0},u={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},a=F("querystring");function c(h,R,C){if(h&&v.isObject(h)&&h instanceof O)return h;var g=new O;return g.parse(h,R,C),g}O.prototype.parse=function(h,R,C){if(!v.isString(h))throw new TypeError("Parameter 'url' must be a string, not "+typeof h);var g=h.indexOf("?"),x=g!==-1&&g<h.indexOf("#")?"?":"#",E=h.split(x),T=/\\/g;E[0]=E[0].replace(T,"/"),h=E.join(x);var k=h;if(k=k.trim(),!C&&h.split("#").length===1){var L=m.exec(k);if(L)return this.path=k,this.href=k,this.pathname=L[1],L[2]?(this.search=L[2],R?this.query=a.parse(this.search.substr(1)):this.query=this.search.substr(1)):R&&(this.search="",this.query={}),this}var A=M.exec(k);if(A){A=A[0];var G=A.toLowerCase();this.protocol=G,k=k.substr(A.length)}if(C||A||k.match(/^\/\/[^@\/]+@[^@\/]+/)){var K=k.substr(0,2)==="//";K&&!(A&&s[A])&&(k=k.substr(2),this.slashes=!0)}if(!s[A]&&(K||A&&!u[A])){for(var W=-1,z=0;z<t.length;z++){var U=k.indexOf(t[z]);U!==-1&&(W===-1||U<W)&&(W=U)}var P,H;W===-1?H=k.lastIndexOf("@"):H=k.lastIndexOf("@",W),H!==-1&&(P=k.slice(0,H),k=k.slice(H+1),this.auth=decodeURIComponent(P)),W=-1;for(var z=0;z<d.length;z++){var U=k.indexOf(d[z]);U!==-1&&(W===-1||U<W)&&(W=U)}W===-1&&(W=k.length),this.host=k.slice(0,W),k=k.slice(W),this.parseHost(),this.hostname=this.hostname||"";var V=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!V)for(var q=this.hostname.split(/\./),z=0,Z=q.length;z<Z;z++){var ce=q[z];if(!ce)continue;if(!ce.match(r)){for(var he="",ae=0,xe=ce.length;ae<xe;ae++)ce.charCodeAt(ae)>127?he+="x":he+=ce[ae];if(!he.match(r)){var ge=q.slice(0,z),oe=q.slice(z+1),se=ce.match(i);se&&(ge.push(se[1]),oe.unshift(se[2])),oe.length&&(k="/"+oe.join(".")+k),this.hostname=ge.join(".");break}}}this.hostname.length>l?this.hostname="":this.hostname=this.hostname.toLowerCase(),V||(this.hostname=N.toASCII(this.hostname));var te=this.port?":"+this.port:"",be=this.hostname||"";this.host=be+te,this.href+=this.host,V&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),k[0]!=="/"&&(k="/"+k))}if(!o[G])for(var z=0,Z=p.length;z<Z;z++){var ee=p[z];if(k.indexOf(ee)===-1)continue;var ie=encodeURIComponent(ee);ie===ee&&(ie=escape(ee)),k=k.split(ee).join(ie)}var Ee=k.indexOf("#");Ee!==-1&&(this.hash=k.substr(Ee),k=k.slice(0,Ee));var ne=k.indexOf("?");if(ne!==-1?(this.search=k.substr(ne),this.query=k.substr(ne+1),R&&(this.query=a.parse(this.query)),k=k.slice(0,ne)):R&&(this.search="",this.query={}),k&&(this.pathname=k),u[G]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var te=this.pathname||"",J=this.search||"";this.path=te+J}return this.href=this.format(),this};function f(h){return v.isString(h)&&(h=c(h)),h instanceof O?h.format():O.prototype.format.call(h)}O.prototype.format=function(){var h=this.auth||"";h&&(h=encodeURIComponent(h),h=h.replace(/%3A/i,":"),h+="@");var R=this.protocol||"",C=this.pathname||"",g=this.hash||"",x=!1,E="";this.host?x=h+this.host:this.hostname&&(x=h+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(x+=":"+this.port)),this.query&&v.isObject(this.query)&&Object.keys(this.query).length&&(E=a.stringify(this.query));var T=this.search||E&&"?"+E||"";return R&&R.substr(-1)!==":"&&(R+=":"),this.slashes||(!R||u[R])&&x!==!1?(x="//"+(x||""),C&&C.charAt(0)!=="/"&&(C="/"+C)):x||(x=""),g&&g.charAt(0)!=="#"&&(g="#"+g),T&&T.charAt(0)!=="?"&&(T="?"+T),C=C.replace(/[?#]/g,function(k){return encodeURIComponent(k)}),T=T.replace("#","%23"),R+x+C+T+g};function w(h,R){return c(h,!1,!0).resolve(R)}O.prototype.resolve=function(h){return this.resolveObject(c(h,!1,!0)).format()};function _(h,R){return h?c(h,!1,!0).resolveObject(R):R}O.prototype.resolveObject=function(h){if(v.isString(h)){var R=new O;R.parse(h,!1,!0),h=R}for(var C=new O,g=Object.keys(this),x=0;x<g.length;x++){var E=g[x];C[E]=this[E]}if(C.hash=h.hash,h.href==="")return C.href=C.format(),C;if(h.slashes&&!h.protocol){for(var T=Object.keys(h),k=0;k<T.length;k++){var L=T[k];L!=="protocol"&&(C[L]=h[L])}return u[C.protocol]&&C.hostname&&!C.pathname&&(C.path=C.pathname="/"),C.href=C.format(),C}if(h.protocol&&h.protocol!==C.protocol){if(!u[h.protocol]){for(var A=Object.keys(h),G=0;G<A.length;G++){var K=A[G];C[K]=h[K]}return C.href=C.format(),C}if(C.protocol=h.protocol,!h.host&&!s[h.protocol]){for(var Z=(h.pathname||"").split("/");Z.length&&!(h.host=Z.shift()););h.host||(h.host=""),h.hostname||(h.hostname=""),Z[0]!==""&&Z.unshift(""),Z.length<2&&Z.unshift(""),C.pathname=Z.join("/")}else C.pathname=h.pathname;if(C.search=h.search,C.query=h.query,C.host=h.host||"",C.auth=h.auth,C.hostname=h.hostname||h.host,C.port=h.port,C.pathname||C.search){var W=C.pathname||"",z=C.search||"";C.path=W+z}return C.slashes=C.slashes||h.slashes,C.href=C.format(),C}var U=C.pathname&&C.pathname.charAt(0)==="/",P=h.host||h.pathname&&h.pathname.charAt(0)==="/",H=P||U||C.host&&h.pathname,V=H,q=C.pathname&&C.pathname.split("/")||[],Z=h.pathname&&h.pathname.split("/")||[],ce=C.protocol&&!u[C.protocol];if(ce&&(C.hostname="",C.port=null,C.host&&(q[0]===""?q[0]=C.host:q.unshift(C.host)),C.host="",h.protocol&&(h.hostname=null,h.port=null,h.host&&(Z[0]===""?Z[0]=h.host:Z.unshift(h.host)),h.host=null),H=H&&(Z[0]===""||q[0]==="")),P)C.host=h.host||h.host===""?h.host:C.host,C.hostname=h.hostname||h.hostname===""?h.hostname:C.hostname,C.search=h.search,C.query=h.query,q=Z;else if(Z.length)q||(q=[]),q.pop(),q=q.concat(Z),C.search=h.search,C.query=h.query;else if(!v.isNullOrUndefined(h.search)){if(ce){C.hostname=C.host=q.shift();var he=C.host&&C.host.indexOf("@")>0?C.host.split("@"):!1;he&&(C.auth=he.shift(),C.host=C.hostname=he.shift())}return C.search=h.search,C.query=h.query,(!v.isNull(C.pathname)||!v.isNull(C.search))&&(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.href=C.format(),C}if(!q.length)return C.pathname=null,C.search?C.path="/"+C.search:C.path=null,C.href=C.format(),C;for(var ae=q.slice(-1)[0],xe=(C.host||h.host||q.length>1)&&(ae==="."||ae==="..")||ae==="",ge=0,oe=q.length;oe>=0;oe--)ae=q[oe],ae==="."?q.splice(oe,1):ae===".."?(q.splice(oe,1),ge++):ge&&(q.splice(oe,1),ge--);if(!H&&!V)for(;ge--;ge)q.unshift("..");H&&q[0]!==""&&(!q[0]||q[0].charAt(0)!=="/")&&q.unshift(""),xe&&q.join("/").substr(-1)!=="/"&&q.push("");var se=q[0]===""||q[0]&&q[0].charAt(0)==="/";if(ce){C.hostname=C.host=se?"":q.length?q.shift():"";var he=C.host&&C.host.indexOf("@")>0?C.host.split("@"):!1;he&&(C.auth=he.shift(),C.host=C.hostname=he.shift())}return H=H||C.host&&q.length,H&&!se&&q.unshift(""),q.length?C.pathname=q.join("/"):(C.pathname=null,C.path=null),(!v.isNull(C.pathname)||!v.isNull(C.search))&&(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.auth=h.auth||C.auth,C.slashes=C.slashes||h.slashes,C.href=C.format(),C},O.prototype.parseHost=function(){var h=this.host,R=y.exec(h);R&&(R=R[0],R!==":"&&(this.port=R.substr(1)),h=h.substr(0,h.length-R.length)),h&&(this.hostname=h)}},{"./util":239,punycode:209,querystring:212}],239:[function(F,$,j){"use strict";$.exports={isString:function(N){return typeof N=="string"},isObject:function(N){return typeof N=="object"&&N!==null},isNull:function(N){return N===null},isNullOrUndefined:function(N){return N==null}}},{}],240:[function(F,$,j){(function(N){$.exports=v;function v(M,y){if(O("noDeprecation"))return M;var m=!1;function S(){if(!m){if(O("throwDeprecation"))throw new Error(y);O("traceDeprecation")?console.trace(y):console.warn(y),m=!0}return M.apply(this,arguments)}return S}function O(M){try{if(!N.localStorage)return!1}catch(m){return!1}var y=N.localStorage[M];return y==null?!1:String(y).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(F,$,j){typeof Object.create=="function"?$.exports=function(v,O){v.super_=O,v.prototype=Object.create(O.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}})}:$.exports=function(v,O){v.super_=O;var M=function(){};M.prototype=O.prototype,v.prototype=new M,v.prototype.constructor=v}},{}],242:[function(F,$,j){$.exports=function(v){return v&&typeof v=="object"&&typeof v.copy=="function"&&typeof v.fill=="function"&&typeof v.readUInt8=="function"}},{}],243:[function(F,$,j){(function(N,v){var O=/%[sdj%]/g;j.format=function(W){if(!w(W)){for(var z=[],U=0;U<arguments.length;U++)z.push(m(arguments[U]));return z.join(" ")}for(var U=1,P=arguments,H=P.length,V=String(W).replace(O,function(Z){if(Z==="%%")return"%";if(U>=H)return Z;switch(Z){case"%s":return String(P[U++]);case"%d":return Number(P[U++]);case"%j":try{return JSON.stringify(P[U++])}catch(ce){return"[Circular]"}default:return Z}}),q=P[U];U<H;q=P[++U])a(q)||!C(q)?V+=" "+q:V+=" "+m(q);return V},j.deprecate=function(W,z){if(h(v.process))return function(){return j.deprecate(W,z).apply(this,arguments)};if(N.noDeprecation===!0)return W;var U=!1;function P(){if(!U){if(N.throwDeprecation)throw new Error(z);N.traceDeprecation?console.trace(z):console.error(z),U=!0}return W.apply(this,arguments)}return P};var M={},y;j.debuglog=function(W){if(h(y)&&(y=N.env.NODE_DEBUG||""),W=W.toUpperCase(),!M[W])if(new RegExp("\\b"+W+"\\b","i").test(y)){var z=N.pid;M[W]=function(){var U=j.format.apply(j,arguments);console.error("%s %d: %s",W,z,U)}}else M[W]=function(){};return M[W]};function m(W,z){var U={seen:[],stylize:b};return arguments.length>=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),u(z)?U.showHidden=z:z&&j._extend(U,z),h(U.showHidden)&&(U.showHidden=!1),h(U.depth)&&(U.depth=2),h(U.colors)&&(U.colors=!1),h(U.customInspect)&&(U.customInspect=!0),U.colors&&(U.stylize=S),d(U,W,U.depth)}j.inspect=m,m.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]},m.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function S(W,z){var U=m.styles[z];return U?"["+m.colors[U][0]+"m"+W+"["+m.colors[U][1]+"m":W}function b(W,z){return W}function p(W){var z={};return W.forEach(function(U,P){z[U]=!0}),z}function d(W,z,U){if(W.customInspect&&z&&E(z.inspect)&&z.inspect!==j.inspect&&!(z.constructor&&z.constructor.prototype===z)){var P=z.inspect(U,W);return w(P)||(P=d(W,P,U)),P}var H=t(W,z);if(H)return H;var V=Object.keys(z),q=p(V);if(W.showHidden&&(V=Object.getOwnPropertyNames(z)),x(z)&&(V.indexOf("message")>=0||V.indexOf("description")>=0))return l(z);if(V.length===0){if(E(z)){var Z=z.name?": "+z.name:"";return W.stylize("[Function"+Z+"]","special")}if(R(z))return W.stylize(RegExp.prototype.toString.call(z),"regexp");if(g(z))return W.stylize(Date.prototype.toString.call(z),"date");if(x(z))return l(z)}var ce="",he=!1,ae=["{","}"];if(s(z)&&(he=!0,ae=["[","]"]),E(z)){var xe=z.name?": "+z.name:"";ce=" [Function"+xe+"]"}if(R(z)&&(ce=" "+RegExp.prototype.toString.call(z)),g(z)&&(ce=" "+Date.prototype.toUTCString.call(z)),x(z)&&(ce=" "+l(z)),V.length===0&&(!he||z.length==0))return ae[0]+ce+ae[1];if(U<0)return R(z)?W.stylize(RegExp.prototype.toString.call(z),"regexp"):W.stylize("[Object]","special");W.seen.push(z);var ge;return he?ge=r(W,z,U,q,V):ge=V.map(function(oe){return i(W,z,U,q,oe,he)}),W.seen.pop(),o(ge,ce,ae)}function t(W,z){if(h(z))return W.stylize("undefined","undefined");if(w(z)){var U="'"+JSON.stringify(z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return W.stylize(U,"string")}if(f(z))return W.stylize(""+z,"number");if(u(z))return W.stylize(""+z,"boolean");if(a(z))return W.stylize("null","null")}function l(W){return"["+Error.prototype.toString.call(W)+"]"}function r(W,z,U,P,H){for(var V=[],q=0,Z=z.length;q<Z;++q)K(z,String(q))?V.push(i(W,z,U,P,String(q),!0)):V.push("");return H.forEach(function(ce){ce.match(/^\d+$/)||V.push(i(W,z,U,P,ce,!0))}),V}function i(W,z,U,P,H,V){var q,Z,ce;if(ce=Object.getOwnPropertyDescriptor(z,H)||{value:z[H]},ce.get?ce.set?Z=W.stylize("[Getter/Setter]","special"):Z=W.stylize("[Getter]","special"):ce.set&&(Z=W.stylize("[Setter]","special")),K(P,H)||(q="["+H+"]"),Z||(W.seen.indexOf(ce.value)<0?(a(U)?Z=d(W,ce.value,null):Z=d(W,ce.value,U-1),Z.indexOf(`
`)>-1&&(V?Z=Z.split(`
`).map(function(he){return" "+he}).join(`
`).substr(2):Z=`
`+Z.split(`
`).map(function(he){return" "+he}).join(`
`))):Z=W.stylize("[Circular]","special")),h(q)){if(V&&H.match(/^\d+$/))return Z;q=JSON.stringify(""+H),q.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(q=q.substr(1,q.length-2),q=W.stylize(q,"name")):(q=q.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),q=W.stylize(q,"string"))}return q+": "+Z}function o(W,z,U){var P=0,H=W.reduce(function(V,q){return P++,q.indexOf(`
`)>=0&&P++,V+q.replace(/\u001b\[\d\d?m/g,"").length+1},0);return H>60?U[0]+(z===""?"":z+`
`)+" "+W.join(`,
`)+" "+U[1]:U[0]+z+" "+W.join(", ")+" "+U[1]}function s(W){return Array.isArray(W)}j.isArray=s;function u(W){return typeof W=="boolean"}j.isBoolean=u;function a(W){return W===null}j.isNull=a;function c(W){return W==null}j.isNullOrUndefined=c;function f(W){return typeof W=="number"}j.isNumber=f;function w(W){return typeof W=="string"}j.isString=w;function _(W){return typeof W=="symbol"}j.isSymbol=_;function h(W){return W===void 0}j.isUndefined=h;function R(W){return C(W)&&k(W)==="[object RegExp]"}j.isRegExp=R;function C(W){return typeof W=="object"&&W!==null}j.isObject=C;function g(W){return C(W)&&k(W)==="[object Date]"}j.isDate=g;function x(W){return C(W)&&(k(W)==="[object Error]"||W instanceof Error)}j.isError=x;function E(W){return typeof W=="function"}j.isFunction=E;function T(W){return W===null||typeof W=="boolean"||typeof W=="number"||typeof W=="string"||typeof W=="symbol"||typeof W=="undefined"}j.isPrimitive=T,j.isBuffer=F("./support/isBuffer");function k(W){return Object.prototype.toString.call(W)}function L(W){return W<10?"0"+W.toString(10):W.toString(10)}var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function G(){var W=new Date,z=[L(W.getHours()),L(W.getMinutes()),L(W.getSeconds())].join(":");return[W.getDate(),A[W.getMonth()],z].join(" ")}j.log=function(){console.log("%s - %s",G(),j.format.apply(j,arguments))},j.inherits=F("inherits"),j._extend=function(W,z){if(!z||!C(z))return W;for(var U=Object.keys(z),P=U.length;P--;)W[U[P]]=z[U[P]];return W};function K(W,z){return Object.prototype.hasOwnProperty.call(W,z)}}).call(this,F("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(F,$,j){"use strict";(function(){"use strict";j.stripBOM=function(N){return N[0]==="\uFEFF"?N.substring(1):N}}).call(void 0)},{}],245:[function(F,$,j){"use strict";var N=F("babel-runtime/helpers/typeof"),v=y(N),O=F("babel-runtime/core-js/object/keys"),M=y(O);function y(m){return m&&m.__esModule?m:{default:m}}(function(){"use strict";var m,S,b,p,d,t={}.hasOwnProperty;m=F("xmlbuilder"),S=F("./defaults").defaults,p=function(r){return typeof r=="string"&&(r.indexOf("&")>=0||r.indexOf(">")>=0||r.indexOf("<")>=0)},d=function(r){return"<![CDATA["+b(r)+"]]>"},b=function(r){return r.replace("]]>","]]]]><![CDATA[>")},j.Builder=function(){function l(r){var i,o,s;this.options={},o=S["0.2"];for(i in o){if(!t.call(o,i))continue;s=o[i],this.options[i]=s}for(i in r){if(!t.call(r,i))continue;s=r[i],this.options[i]=s}}return l.prototype.buildObject=function(r){var i,o,s,u,a;return i=this.options.attrkey,o=this.options.charkey,(0,M.default)(r).length===1&&this.options.rootName===S["0.2"].rootName?(a=(0,M.default)(r)[0],r=r[a]):a=this.options.rootName,s=function(c){return function(f,w){var _,h,R,C,g,x;if((typeof w=="undefined"?"undefined":(0,v.default)(w))!=="object")c.options.cdata&&p(w)?f.raw(d(w)):f.txt(w);else if(Array.isArray(w))for(C in w){if(!t.call(w,C))continue;h=w[C];for(g in h)R=h[g],f=s(f.ele(g),R).up()}else for(g in w){if(!t.call(w,g))continue;if(h=w[g],g===i){if((typeof h=="undefined"?"undefined":(0,v.default)(h))==="object")for(_ in h)x=h[_],f=f.att(_,x)}else if(g===o)c.options.cdata&&p(h)?f=f.raw(d(h)):f=f.txt(h);else if(Array.isArray(h))for(C in h){if(!t.call(h,C))continue;R=h[C],typeof R=="string"?c.options.cdata&&p(R)?f=f.ele(g).raw(d(R)).up():f=f.ele(g,R).up():f=s(f.ele(g),R).up()}else(typeof h=="undefined"?"undefined":(0,v.default)(h))==="object"?f=s(f.ele(g),h).up():typeof h=="string"&&c.options.cdata&&p(h)?f=f.ele(g).raw(d(h)).up():(h==null&&(h=""),f=f.ele(g,h.toString()).up())}return f}}(this),u=m.create(a,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),s(u,r).end(this.options.renderOpts)},l}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(F,$,j){"use strict";(function(){j.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(F,$,j){"use strict";var N=F("babel-runtime/core-js/promise"),v=p(N),O=F("babel-runtime/core-js/object/get-own-property-names"),M=p(O),y=F("babel-runtime/core-js/object/keys"),m=p(y),S=F("babel-runtime/helpers/typeof"),b=p(S);function p(d){return d&&d.__esModule?d:{default:d}}(function(){"use strict";var d,t,l,r,i,o,s,u,a=function(_,h){return function(){return _.apply(h,arguments)}},c=function(_,h){for(var R in h)f.call(h,R)&&(_[R]=h[R]);function C(){this.constructor=_}return C.prototype=h.prototype,_.prototype=new C,_.__super__=h.prototype,_},f={}.hasOwnProperty;s=F("sax"),l=F("events"),d=F("./bom"),o=F("./processors"),u=F("timers").setImmediate,t=F("./defaults").defaults,r=function(_){return(typeof _=="undefined"?"undefined":(0,b.default)(_))==="object"&&_!=null&&(0,m.default)(_).length===0},i=function(_,h,R){var C,g,x;for(C=0,g=_.length;C<g;C++)x=_[C],h=x(h,R);return h},j.Parser=function(w){c(_,w);function _(h){this.parseStringPromise=a(this.parseStringPromise,this),this.parseString=a(this.parseString,this),this.reset=a(this.reset,this),this.assignOrPush=a(this.assignOrPush,this),this.processAsync=a(this.processAsync,this);var R,C,g;if(!(this instanceof j.Parser))return new j.Parser(h);this.options={},C=t["0.2"];for(R in C){if(!f.call(C,R))continue;g=C[R],this.options[R]=g}for(R in h){if(!f.call(h,R))continue;g=h[R],this.options[R]=g}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(o.normalize)),this.reset()}return _.prototype.processAsync=function(){var h,R;try{return this.remaining.length<=this.options.chunkSize?(h=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(h),this.saxParser.close()):(h=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(h),u(this.processAsync))}catch(C){if(R=C,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(R)}},_.prototype.assignOrPush=function(h,R,C){return R in h?(h[R]instanceof Array||(h[R]=[h[R]]),h[R].push(C)):this.options.explicitArray?h[R]=[C]:h[R]=C},_.prototype.reset=function(){var h,R,C,g;return this.removeAllListeners(),this.saxParser=s.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(x){return function(E){if(x.saxParser.resume(),!x.saxParser.errThrown)return x.saxParser.errThrown=!0,x.emit("error",E)}}(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,g=[],h=this.options.attrkey,R=this.options.charkey,this.saxParser.onopentag=function(x){return function(E){var T,k,L,A,G;if(L={},L[R]="",!x.options.ignoreAttrs){G=E.attributes;for(T in G){if(!f.call(G,T))continue;!(h in L)&&!x.options.mergeAttrs&&(L[h]={}),k=x.options.attrValueProcessors?i(x.options.attrValueProcessors,E.attributes[T],T):E.attributes[T],A=x.options.attrNameProcessors?i(x.options.attrNameProcessors,T):T,x.options.mergeAttrs?x.assignOrPush(L,A,k):L[h][A]=k}}return L["#name"]=x.options.tagNameProcessors?i(x.options.tagNameProcessors,E.name):E.name,x.options.xmlns&&(L[x.options.xmlnskey]={uri:E.uri,local:E.local}),g.push(L)}}(this),this.saxParser.onclosetag=function(x){return function(){var E,T,k,L,A,G,K,W,z,U;if(G=g.pop(),A=G["#name"],(!x.options.explicitChildren||!x.options.preserveChildrenOrder)&&delete G["#name"],G.cdata===!0&&(E=G.cdata,delete G.cdata),z=g[g.length-1],G[R].match(/^\s*$/)&&!E?(T=G[R],delete G[R]):(x.options.trim&&(G[R]=G[R].trim()),x.options.normalize&&(G[R]=G[R].replace(/\s{2,}/g," ").trim()),G[R]=x.options.valueProcessors?i(x.options.valueProcessors,G[R],A):G[R],(0,m.default)(G).length===1&&R in G&&!x.EXPLICIT_CHARKEY&&(G=G[R])),r(G)&&(G=x.options.emptyTag!==""?x.options.emptyTag:T),x.options.validator!=null&&(U="/"+function(){var P,H,V;for(V=[],P=0,H=g.length;P<H;P++)L=g[P],V.push(L["#name"]);return V}().concat(A).join("/"),function(){var P;try{return G=x.options.validator(U,z&&z[A],G)}catch(H){return P=H,x.emit("error",P)}}()),x.options.explicitChildren&&!x.options.mergeAttrs&&(typeof G=="undefined"?"undefined":(0,b.default)(G))==="object"){if(!x.options.preserveChildrenOrder)L={},x.options.attrkey in G&&(L[x.options.attrkey]=G[x.options.attrkey],delete G[x.options.attrkey]),!x.options.charsAsChildren&&x.options.charkey in G&&(L[x.options.charkey]=G[x.options.charkey],delete G[x.options.charkey]),(0,M.default)(G).length>0&&(L[x.options.childkey]=G),G=L;else if(z){z[x.options.childkey]=z[x.options.childkey]||[],K={};for(k in G){if(!f.call(G,k))continue;K[k]=G[k]}z[x.options.childkey].push(K),delete G["#name"],(0,m.default)(G).length===1&&R in G&&!x.EXPLICIT_CHARKEY&&(G=G[R])}}return g.length>0?x.assignOrPush(z,A,G):(x.options.explicitRoot&&(W=G,G={},G[A]=W),x.resultObject=G,x.saxParser.ended=!0,x.emit("end",x.resultObject))}}(this),C=function(x){return function(E){var T,k;if(k=g[g.length-1],k)return k[R]+=E,x.options.explicitChildren&&x.options.preserveChildrenOrder&&x.options.charsAsChildren&&(x.options.includeWhiteChars||E.replace(/\\n/g,"").trim()!=="")&&(k[x.options.childkey]=k[x.options.childkey]||[],T={"#name":"__text__"},T[R]=E,x.options.normalize&&(T[R]=T[R].replace(/\s{2,}/g," ").trim()),k[x.options.childkey].push(T)),k}}(this),this.saxParser.ontext=C,this.saxParser.oncdata=function(x){return function(E){var T;if(T=C(E),T)return T.cdata=!0}}(this)},_.prototype.parseString=function(h,R){var C;R!=null&&typeof R=="function"&&(this.on("end",function(g){return this.reset(),R(null,g)}),this.on("error",function(g){return this.reset(),R(g)}));try{return h=h.toString(),h.trim()===""?(this.emit("end",null),!0):(h=d.stripBOM(h),this.options.async?(this.remaining=h,u(this.processAsync),this.saxParser):this.saxParser.write(h).close())}catch(g){if(C=g,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw C}else return this.emit("error",C),this.saxParser.errThrown=!0}},_.prototype.parseStringPromise=function(h){return new v.default(function(R){return function(C,g){return R.parseString(h,function(x,E){return x?g(x):C(E)})}}(this))},_}(l),j.parseString=function(w,_,h){var R,C,g;return h!=null?(typeof h=="function"&&(R=h),(typeof _=="undefined"?"undefined":(0,b.default)(_))==="object"&&(C=_)):(typeof _=="function"&&(R=_),C={}),g=new j.Parser(C),g.parseString(w,R)},j.parseStringPromise=function(w,_){var h,R;return(typeof _=="undefined"?"undefined":(0,b.default)(_))==="object"&&(h=_),R=new j.Parser(h),R.parseStringPromise(w)}}).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(F,$,j){"use strict";(function(){"use strict";var N;N=new RegExp(/(?!xmlns)^.*:/),j.normalize=function(v){return v.toLowerCase()},j.firstCharLowerCase=function(v){return v.charAt(0).toLowerCase()+v.slice(1)},j.stripPrefix=function(v){return v.replace(N,"")},j.parseNumbers=function(v){return isNaN(v)||(v=v%1===0?parseInt(v,10):parseFloat(v)),v},j.parseBooleans=function(v){return/^(?:true|false)$/i.test(v)&&(v=v.toLowerCase()==="true"),v}}).call(void 0)},{}],249:[function(F,$,j){"use strict";(function(){"use strict";var N,v,O,M,y=function(b,p){for(var d in p)m.call(p,d)&&(b[d]=p[d]);function t(){this.constructor=b}return t.prototype=p.prototype,b.prototype=new t,b.__super__=p.prototype,b},m={}.hasOwnProperty;v=F("./defaults"),N=F("./builder"),O=F("./parser"),M=F("./processors"),j.defaults=v.defaults,j.processors=M,j.ValidationError=function(S){y(b,S);function b(p){this.message=p}return b}(Error),j.Builder=N.Builder,j.Parser=O.Parser,j.parseString=O.parseString,j.parseStringPromise=O.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(F,$,j){"use strict";(function(){$.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(F,$,j){"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(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/get-prototype-of"),v=S(N),O=F("babel-runtime/helpers/typeof"),M=S(O),y=F("babel-runtime/core-js/object/assign"),m=S(y);function S(b){return b&&b.__esModule?b:{default:b}}(function(){var b,p,d,t,l,r,i,o=[].slice,s={}.hasOwnProperty;b=function(){var a,c,f,w,_,h;if(h=arguments[0],_=2<=arguments.length?o.call(arguments,1):[],l(m.default))m.default.apply(null,arguments);else for(a=0,f=_.length;a<f;a++)if(w=_[a],w!=null)for(c in w){if(!s.call(w,c))continue;h[c]=w[c]}return h},l=function(a){return!!a&&Object.prototype.toString.call(a)==="[object Function]"},r=function(a){var c;return!!a&&((c=typeof a=="undefined"?"undefined":(0,M.default)(a))==="function"||c==="object")},d=function(a){return l(Array.isArray)?Array.isArray(a):Object.prototype.toString.call(a)==="[object Array]"},t=function(a){var c;if(d(a))return!a.length;for(c in a){if(!s.call(a,c))continue;return!1}return!0},i=function(a){var c,f;return r(a)&&(f=(0,v.default)(a))&&(c=f.constructor)&&typeof c=="function"&&c instanceof c&&Function.prototype.toString.call(c)===Function.prototype.toString.call(Object)},p=function(a){return l(a.valueOf)?a.valueOf():a},$.exports.assign=b,$.exports.isFunction=l,$.exports.isObject=r,$.exports.isArray=d,$.exports.isEmpty=t,$.exports.isPlainObject=i,$.exports.getValue=p}).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(F,$,j){"use strict";(function(){$.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,y,m;M=F("./NodeType"),m=F("./XMLNode"),$.exports=y=function(){function S(b,p,d){if(this.parent=b,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),p==null)throw new Error("Missing attribute name. "+this.debugInfo(p));this.name=this.stringify.name(p),this.value=this.stringify.attValue(d),this.type=M.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(p){return this.value=p||""}}),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,v.default)(this)},S.prototype.toString=function(b){return this.options.writer.attribute(this,this.options.writer.filterOptions(b))},S.prototype.debugInfo=function(b){return b=b||this.name,b==null?"parent: <"+this.parent.name+">":"attribute: {"+b+"}, parent: <"+this.parent.name+">"},S.prototype.isEqualNode=function(b){return b.namespaceURI!==this.namespaceURI||(b.prefix!==this.prefix||b.localName!==this.localName)?!1:!(b.value!==this.value)},S}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,y,m,S=function(d,t){for(var l in t)b.call(t,l)&&(d[l]=t[l]);function r(){this.constructor=d}return r.prototype=t.prototype,d.prototype=new r,d.__super__=t.prototype,d},b={}.hasOwnProperty;M=F("./NodeType"),m=F("./XMLCharacterData"),$.exports=y=function(p){S(d,p);function d(t,l){if(d.__super__.constructor.call(this,t),l==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=M.CData,this.value=this.stringify.cdata(l)}return d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(t){return this.options.writer.cdata(this,this.options.writer.filterOptions(t))},d}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,y,m=function(p,d){for(var t in d)S.call(d,t)&&(p[t]=d[t]);function l(){this.constructor=p}return l.prototype=d.prototype,p.prototype=new l,p.__super__=d.prototype,p},S={}.hasOwnProperty;y=F("./XMLNode"),$.exports=M=function(b){m(p,b);function p(d){p.__super__.constructor.call(this,d),this.value=""}return Object.defineProperty(p.prototype,"data",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(p.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(p.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),p.prototype.clone=function(){return(0,v.default)(this)},p.prototype.substringData=function(d,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.appendData=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.insertData=function(d,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.deleteData=function(d,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.replaceData=function(d,t,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},p.prototype.isEqualNode=function(d){return p.__super__.isEqualNode.apply(this,arguments).isEqualNode(d)?!(d.data!==this.data):!1},p}(y)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,y,m,S=function(d,t){for(var l in t)b.call(t,l)&&(d[l]=t[l]);function r(){this.constructor=d}return r.prototype=t.prototype,d.prototype=new r,d.__super__=t.prototype,d},b={}.hasOwnProperty;M=F("./NodeType"),y=F("./XMLCharacterData"),$.exports=m=function(p){S(d,p);function d(t,l){if(d.__super__.constructor.call(this,t),l==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=M.Comment,this.value=this.stringify.comment(l)}return d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(t){return this.options.writer.comment(this,this.options.writer.filterOptions(t))},d}(y)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),v=y(N),O=F("babel-runtime/core-js/object/create"),M=y(O);function y(m){return m&&m.__esModule?m:{default:m}}(function(){var m,S,b;S=F("./XMLDOMErrorHandler"),b=F("./XMLDOMStringList"),$.exports=m=function(){function p(){var d;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=d=(0,M.default)(this.defaultParams)}return Object.defineProperty(p.prototype,"parameterNames",{get:function(){return new b((0,v.default)(this.defaultParams))}}),p.prototype.getParameter=function(d){return this.params.hasOwnProperty(d)?this.params[d]:null},p.prototype.canSetParameter=function(d,t){return!0},p.prototype.setParameter=function(d,t){return t!=null?this.params[d]=t:delete this.params[d]},p}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(F,$,j){"use strict";(function(){var N;$.exports=N=function(){function v(){}return v.prototype.handleError=function(O){throw new Error(O)},v}()}).call(void 0)},{}],260:[function(F,$,j){"use strict";(function(){var N;$.exports=N=function(){function v(){}return v.prototype.hasFeature=function(O,M){return!0},v.prototype.createDocumentType=function(O,M,y){throw new Error("This DOM method is not implemented.")},v.prototype.createDocument=function(O,M,y){throw new Error("This DOM method is not implemented.")},v.prototype.createHTMLDocument=function(O){throw new Error("This DOM method is not implemented.")},v.prototype.getFeature=function(O,M){throw new Error("This DOM method is not implemented.")},v}()}).call(void 0)},{}],261:[function(F,$,j){"use strict";(function(){var N;$.exports=N=function(){function v(O){this.arr=O||[]}return Object.defineProperty(v.prototype,"length",{get:function(){return this.arr.length}}),v.prototype.item=function(O){return this.arr[O]||null},v.prototype.contains=function(O){return this.arr.indexOf(O)!==-1},v}()}).call(void 0)},{}],262:[function(F,$,j){"use strict";(function(){var N,v,O,M=function(S,b){for(var p in b)y.call(b,p)&&(S[p]=b[p]);function d(){this.constructor=S}return d.prototype=b.prototype,S.prototype=new d,S.__super__=b.prototype,S},y={}.hasOwnProperty;O=F("./XMLNode"),N=F("./NodeType"),$.exports=v=function(m){M(S,m);function S(b,p,d,t,l,r){if(S.__super__.constructor.call(this,b),p==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(d==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(p));if(!t)throw new Error("Missing DTD attribute type. "+this.debugInfo(p));if(!l)throw new Error("Missing DTD attribute default. "+this.debugInfo(p));if(l.indexOf("#")!==0&&(l="#"+l),!l.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(p));if(r&&!l.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(p));this.elementName=this.stringify.name(p),this.type=N.AttributeDeclaration,this.attributeName=this.stringify.name(d),this.attributeType=this.stringify.dtdAttType(t),r&&(this.defaultValue=this.stringify.dtdAttDefault(r)),this.defaultValueType=l}return S.prototype.toString=function(b){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(b))},S}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(F,$,j){"use strict";(function(){var N,v,O,M=function(S,b){for(var p in b)y.call(b,p)&&(S[p]=b[p]);function d(){this.constructor=S}return d.prototype=b.prototype,S.prototype=new d,S.__super__=b.prototype,S},y={}.hasOwnProperty;O=F("./XMLNode"),N=F("./NodeType"),$.exports=v=function(m){M(S,m);function S(b,p,d){if(S.__super__.constructor.call(this,b),p==null)throw new Error("Missing DTD element name. "+this.debugInfo());d||(d="(#PCDATA)"),Array.isArray(d)&&(d="("+d.join(",")+")"),this.name=this.stringify.name(p),this.type=N.ElementDeclaration,this.value=this.stringify.dtdElementValue(d)}return S.prototype.toString=function(b){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(b))},S}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(F,$,j){"use strict";(function(){var N,v,O,M,y=function(b,p){for(var d in p)m.call(p,d)&&(b[d]=p[d]);function t(){this.constructor=b}return t.prototype=p.prototype,b.prototype=new t,b.__super__=p.prototype,b},m={}.hasOwnProperty;M=F("./Utility").isObject,O=F("./XMLNode"),N=F("./NodeType"),$.exports=v=function(S){y(b,S);function b(p,d,t,l){if(b.__super__.constructor.call(this,p),t==null)throw new Error("Missing DTD entity name. "+this.debugInfo(t));if(l==null)throw new Error("Missing DTD entity value. "+this.debugInfo(t));if(this.pe=!!d,this.name=this.stringify.name(t),this.type=N.EntityDeclaration,!M(l))this.value=this.stringify.dtdEntityValue(l),this.internal=!0;else{if(!l.pubID&&!l.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(t));if(l.pubID&&!l.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(t));if(this.internal=!1,l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID)),l.nData!=null&&(this.nData=this.stringify.dtdNData(l.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(t))}}return Object.defineProperty(b.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(b.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(b.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(b.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(b.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(b.prototype,"xmlVersion",{get:function(){return null}}),b.prototype.toString=function(p){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(p))},b}(O)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(F,$,j){"use strict";(function(){var N,v,O,M=function(S,b){for(var p in b)y.call(b,p)&&(S[p]=b[p]);function d(){this.constructor=S}return d.prototype=b.prototype,S.prototype=new d,S.__super__=b.prototype,S},y={}.hasOwnProperty;O=F("./XMLNode"),N=F("./NodeType"),$.exports=v=function(m){M(S,m);function S(b,p,d){if(S.__super__.constructor.call(this,b),p==null)throw new Error("Missing DTD notation name. "+this.debugInfo(p));if(!d.pubID&&!d.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(p));this.name=this.stringify.name(p),this.type=N.NotationDeclaration,d.pubID!=null&&(this.pubID=this.stringify.dtdPubID(d.pubID)),d.sysID!=null&&(this.sysID=this.stringify.dtdSysID(d.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(b){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(b))},S}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(F,$,j){"use strict";(function(){var N,v,O,M,y=function(b,p){for(var d in p)m.call(p,d)&&(b[d]=p[d]);function t(){this.constructor=b}return t.prototype=p.prototype,b.prototype=new t,b.__super__=p.prototype,b},m={}.hasOwnProperty;M=F("./Utility").isObject,O=F("./XMLNode"),N=F("./NodeType"),$.exports=v=function(S){y(b,S);function b(p,d,t,l){var r;b.__super__.constructor.call(this,p),M(d)&&(r=d,d=r.version,t=r.encoding,l=r.standalone),d||(d="1.0"),this.type=N.Declaration,this.version=this.stringify.xmlVersion(d),t!=null&&(this.encoding=this.stringify.xmlEncoding(t)),l!=null&&(this.standalone=this.stringify.xmlStandalone(l))}return b.prototype.toString=function(p){return this.options.writer.declaration(this,this.options.writer.filterOptions(p))},b}(O)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(F,$,j){"use strict";(function(){var N,v,O,M,y,m,S,b,p,d=function(r,i){for(var o in i)t.call(i,o)&&(r[o]=i[o]);function s(){this.constructor=r}return s.prototype=i.prototype,r.prototype=new s,r.__super__=i.prototype,r},t={}.hasOwnProperty;p=F("./Utility").isObject,b=F("./XMLNode"),N=F("./NodeType"),v=F("./XMLDTDAttList"),M=F("./XMLDTDEntity"),O=F("./XMLDTDElement"),y=F("./XMLDTDNotation"),S=F("./XMLNamedNodeMap"),$.exports=m=function(l){d(r,l);function r(i,o,s){var u,a,c,f,w,_;if(r.__super__.constructor.call(this,i),this.type=N.DocType,i.children){for(f=i.children,a=0,c=f.length;a<c;a++)if(u=f[a],u.type===N.Element){this.name=u.name;break}}this.documentObject=i,p(o)&&(w=o,o=w.pubID,s=w.sysID),s==null&&(_=[o,s],s=_[0],o=_[1]),o!=null&&(this.pubID=this.stringify.dtdPubID(o)),s!=null&&(this.sysID=this.stringify.dtdSysID(s))}return Object.defineProperty(r.prototype,"entities",{get:function(){var o,s,u,a,c;for(a={},c=this.children,s=0,u=c.length;s<u;s++)o=c[s],o.type===N.EntityDeclaration&&!o.pe&&(a[o.name]=o);return new S(a)}}),Object.defineProperty(r.prototype,"notations",{get:function(){var o,s,u,a,c;for(a={},c=this.children,s=0,u=c.length;s<u;s++)o=c[s],o.type===N.NotationDeclaration&&(a[o.name]=o);return new S(a)}}),Object.defineProperty(r.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(r.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(r.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),r.prototype.element=function(i,o){var s;return s=new O(this,i,o),this.children.push(s),this},r.prototype.attList=function(i,o,s,u,a){var c;return c=new v(this,i,o,s,u,a),this.children.push(c),this},r.prototype.entity=function(i,o){var s;return s=new M(this,!1,i,o),this.children.push(s),this},r.prototype.pEntity=function(i,o){var s;return s=new M(this,!0,i,o),this.children.push(s),this},r.prototype.notation=function(i,o){var s;return s=new y(this,i,o),this.children.push(s),this},r.prototype.toString=function(i){return this.options.writer.docType(this,this.options.writer.filterOptions(i))},r.prototype.ele=function(i,o){return this.element(i,o)},r.prototype.att=function(i,o,s,u,a){return this.attList(i,o,s,u,a)},r.prototype.ent=function(i,o){return this.entity(i,o)},r.prototype.pent=function(i,o){return this.pEntity(i,o)},r.prototype.not=function(i,o){return this.notation(i,o)},r.prototype.up=function(){return this.root()||this.documentObject},r.prototype.isEqualNode=function(i){return r.__super__.isEqualNode.apply(this,arguments).isEqualNode(i)?i.name!==this.name||i.publicId!==this.publicId?!1:!(i.systemId!==this.systemId):!1},r}(b)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(F,$,j){"use strict";(function(){var N,v,O,M,y,m,S,b,p=function(l,r){for(var i in r)d.call(r,i)&&(l[i]=r[i]);function o(){this.constructor=l}return o.prototype=r.prototype,l.prototype=new o,l.__super__=r.prototype,l},d={}.hasOwnProperty;b=F("./Utility").isPlainObject,O=F("./XMLDOMImplementation"),v=F("./XMLDOMConfiguration"),y=F("./XMLNode"),N=F("./NodeType"),S=F("./XMLStringifier"),m=F("./XMLStringWriter"),$.exports=M=function(t){p(l,t);function l(r){l.__super__.constructor.call(this,null),this.name="#document",this.type=N.Document,this.documentURI=null,this.domConfig=new v,r||(r={}),r.writer||(r.writer=new m),this.options=r,this.stringify=new S(r)}return Object.defineProperty(l.prototype,"implementation",{value:new O}),Object.defineProperty(l.prototype,"doctype",{get:function(){var i,o,s,u;for(u=this.children,o=0,s=u.length;o<s;o++)if(i=u[o],i.type===N.DocType)return i;return null}}),Object.defineProperty(l.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(l.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(l.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(l.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===N.Declaration?this.children[0].encoding:null}}),Object.defineProperty(l.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===N.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(l.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===N.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(l.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(l.prototype,"origin",{get:function(){return null}}),Object.defineProperty(l.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(l.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(l.prototype,"contentType",{get:function(){return null}}),l.prototype.end=function(r){var i;return i={},r?b(r)&&(i=r,r=this.options.writer):r=this.options.writer,r.document(this,r.filterOptions(i))},l.prototype.toString=function(r){return this.options.writer.document(this,this.options.writer.filterOptions(r))},l.prototype.createElement=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createTextNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createComment=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createCDATASection=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createProcessingInstruction=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createAttribute=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createEntityReference=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.getElementsByTagName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.importNode=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createElementNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createAttributeNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.getElementsByTagNameNS=function(r,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.getElementById=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.adoptNode=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.renameNode=function(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.getElementsByClassName=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createEvent=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createNodeIterator=function(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.createTreeWalker=function(r,i,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},l}(y)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(F,$,j){"use strict";(function(){var N,v,O,M,y,m,S,b,p,d,t,l,r,i,o,s,u,a,c,f,w,_,h,R,C={}.hasOwnProperty;R=F("./Utility"),_=R.isObject,w=R.isFunction,h=R.isPlainObject,f=R.getValue,N=F("./NodeType"),l=F("./XMLDocument"),i=F("./XMLElement"),M=F("./XMLCData"),y=F("./XMLComment"),s=F("./XMLRaw"),c=F("./XMLText"),o=F("./XMLProcessingInstruction"),d=F("./XMLDeclaration"),t=F("./XMLDocType"),m=F("./XMLDTDAttList"),b=F("./XMLDTDEntity"),S=F("./XMLDTDElement"),p=F("./XMLDTDNotation"),O=F("./XMLAttribute"),a=F("./XMLStringifier"),u=F("./XMLStringWriter"),v=F("./WriterState"),$.exports=r=function(){function g(x,E,T){var k;this.name="?xml",this.type=N.Document,x||(x={}),k={},x.writer?h(x.writer)&&(k=x.writer,x.writer=new u):x.writer=new u,this.options=x,this.writer=x.writer,this.writerOptions=this.writer.filterOptions(k),this.stringify=new a(x),this.onDataCallback=E||function(){},this.onEndCallback=T||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return g.prototype.createChildNode=function(x){var E,T,k,L,A,G,K,W;switch(x.type){case N.CData:this.cdata(x.value);break;case N.Comment:this.comment(x.value);break;case N.Element:k={},K=x.attribs;for(T in K){if(!C.call(K,T))continue;E=K[T],k[T]=E.value}this.node(x.name,k);break;case N.Dummy:this.dummy();break;case N.Raw:this.raw(x.value);break;case N.Text:this.text(x.value);break;case N.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(W=x.children,A=0,G=W.length;A<G;A++)L=W[A],this.createChildNode(L),L.type===N.Element&&this.up();return this},g.prototype.dummy=function(){return this},g.prototype.node=function(x,E,T){var k;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=f(x),E==null&&(E={}),E=f(E),_(E)||(k=[E,T],T=k[0],E=k[1]),this.currentNode=new i(this,x,E),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,T!=null&&this.text(T),this},g.prototype.element=function(x,E,T){var k,L,A,G,K,W;if(this.currentNode&&this.currentNode.type===N.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(x)||_(x)||w(x))for(G=this.options.noValidation,this.options.noValidation=!0,W=new l(this.options).element("TEMP_ROOT"),W.element(x),this.options.noValidation=G,K=W.children,L=0,A=K.length;L<A;L++)k=K[L],this.createChildNode(k),k.type===N.Element&&this.up();else this.node(x,E,T);return this},g.prototype.attribute=function(x,E){var T,k;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=f(x)),_(x))for(T in x){if(!C.call(x,T))continue;k=x[T],this.attribute(T,k)}else w(E)&&(E=E.apply()),this.options.keepNullAttributes&&E==null?this.currentNode.attribs[x]=new O(this,x,""):E!=null&&(this.currentNode.attribs[x]=new O(this,x,E));return this},g.prototype.text=function(x){var E;return this.openCurrent(),E=new c(this,x),this.onData(this.writer.text(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},g.prototype.cdata=function(x){var E;return this.openCurrent(),E=new M(this,x),this.onData(this.writer.cdata(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},g.prototype.comment=function(x){var E;return this.openCurrent(),E=new y(this,x),this.onData(this.writer.comment(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},g.prototype.raw=function(x){var E;return this.openCurrent(),E=new s(this,x),this.onData(this.writer.raw(E,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},g.prototype.instruction=function(x,E){var T,k,L,A,G;if(this.openCurrent(),x!=null&&(x=f(x)),E!=null&&(E=f(E)),Array.isArray(x))for(T=0,A=x.length;T<A;T++)k=x[T],this.instruction(k);else if(_(x))for(k in x){if(!C.call(x,k))continue;L=x[k],this.instruction(k,L)}else w(E)&&(E=E.apply()),G=new o(this,x,E),this.onData(this.writer.processingInstruction(G,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},g.prototype.declaration=function(x,E,T){var k;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return k=new d(this,x,E,T),this.onData(this.writer.declaration(k,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},g.prototype.doctype=function(x,E,T){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 t(this,E,T),this.currentNode.rootNodeName=x,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},g.prototype.dtdElement=function(x,E){var T;return this.openCurrent(),T=new S(this,x,E),this.onData(this.writer.dtdElement(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},g.prototype.attList=function(x,E,T,k,L){var A;return this.openCurrent(),A=new m(this,x,E,T,k,L),this.onData(this.writer.dtdAttList(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},g.prototype.entity=function(x,E){var T;return this.openCurrent(),T=new b(this,!1,x,E),this.onData(this.writer.dtdEntity(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},g.prototype.pEntity=function(x,E){var T;return this.openCurrent(),T=new b(this,!0,x,E),this.onData(this.writer.dtdEntity(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},g.prototype.notation=function(x,E){var T;return this.openCurrent(),T=new p(this,x,E),this.onData(this.writer.dtdNotation(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},g.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},g.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},g.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},g.prototype.openNode=function(x){var E,T,k,L;if(!x.isOpen){if(!this.root&&this.currentLevel===0&&x.type===N.Element&&(this.root=x),T="",x.type===N.Element){this.writerOptions.state=v.OpenTag,T=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<"+x.name,L=x.attribs;for(k in L){if(!C.call(L,k))continue;E=L[k],T+=this.writer.attribute(E,this.writerOptions,this.currentLevel)}T+=(x.children?">":"/>")+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=v.InsideTag}else this.writerOptions.state=v.OpenTag,T=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+x.rootNodeName,x.pubID&&x.sysID?T+=' PUBLIC "'+x.pubID+'" "'+x.sysID+'"':x.sysID&&(T+=' SYSTEM "'+x.sysID+'"'),x.children?(T+=" [",this.writerOptions.state=v.InsideTag):(this.writerOptions.state=v.CloseTag,T+=">"),T+=this.writer.endline(x,this.writerOptions,this.currentLevel);return this.onData(T,this.currentLevel),x.isOpen=!0}},g.prototype.closeNode=function(x){var E;if(!x.isClosed)return E="",this.writerOptions.state=v.CloseTag,x.type===N.Element?E=this.writer.indent(x,this.writerOptions,this.currentLevel)+"</"+x.name+">"+this.writer.endline(x,this.writerOptions,this.currentLevel):E=this.writer.indent(x,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=v.None,this.onData(E,this.currentLevel),x.isClosed=!0},g.prototype.onData=function(x,E){return this.documentStarted=!0,this.onDataCallback(x,E+1)},g.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},g.prototype.debugInfo=function(x){return x==null?"":"node: <"+x+">"},g.prototype.ele=function(){return this.element.apply(this,arguments)},g.prototype.nod=function(x,E,T){return this.node(x,E,T)},g.prototype.txt=function(x){return this.text(x)},g.prototype.dat=function(x){return this.cdata(x)},g.prototype.com=function(x){return this.comment(x)},g.prototype.ins=function(x,E){return this.instruction(x,E)},g.prototype.dec=function(x,E,T){return this.declaration(x,E,T)},g.prototype.dtd=function(x,E,T){return this.doctype(x,E,T)},g.prototype.e=function(x,E,T){return this.element(x,E,T)},g.prototype.n=function(x,E,T){return this.node(x,E,T)},g.prototype.t=function(x){return this.text(x)},g.prototype.d=function(x){return this.cdata(x)},g.prototype.c=function(x){return this.comment(x)},g.prototype.r=function(x){return this.raw(x)},g.prototype.i=function(x,E){return this.instruction(x,E)},g.prototype.att=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},g.prototype.a=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},g.prototype.ent=function(x,E){return this.entity(x,E)},g.prototype.pent=function(x,E){return this.pEntity(x,E)},g.prototype.not=function(x,E){return this.notation(x,E)},g}()}).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(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,y,m,S=function(d,t){for(var l in t)b.call(t,l)&&(d[l]=t[l]);function r(){this.constructor=d}return r.prototype=t.prototype,d.prototype=new r,d.__super__=t.prototype,d},b={}.hasOwnProperty;m=F("./XMLNode"),M=F("./NodeType"),$.exports=y=function(p){S(d,p);function d(t){d.__super__.constructor.call(this,t),this.type=M.Dummy}return d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(t){return""},d}(m)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,y,m,S,b,p,d,t,l,r=function(s,u){for(var a in u)i.call(u,a)&&(s[a]=u[a]);function c(){this.constructor=s}return c.prototype=u.prototype,s.prototype=new c,s.__super__=u.prototype,s},i={}.hasOwnProperty;l=F("./Utility"),t=l.isObject,d=l.isFunction,p=l.getValue,b=F("./XMLNode"),M=F("./NodeType"),y=F("./XMLAttribute"),S=F("./XMLNamedNodeMap"),$.exports=m=function(o){r(s,o);function s(u,a,c){var f,w,_,h;if(s.__super__.constructor.call(this,u),a==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(a),this.type=M.Element,this.attribs={},this.schemaTypeInfo=null,c!=null&&this.attribute(c),u.type===M.Document&&(this.isRoot=!0,this.documentObject=u,u.rootObject=this,u.children)){for(h=u.children,w=0,_=h.length;w<_;w++)if(f=h[w],f.type===M.DocType){f.name=this.name;break}}}return Object.defineProperty(s.prototype,"tagName",{get:function(){return this.name}}),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,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(s.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(s.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(s.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new S(this.attribs)),this.attributeMap}}),s.prototype.clone=function(){var u,a,c,f;c=(0,v.default)(this),c.isRoot&&(c.documentObject=null),c.attribs={},f=this.attribs;for(a in f){if(!i.call(f,a))continue;u=f[a],c.attribs[a]=u.clone()}return c.children=[],this.children.forEach(function(w){var _;return _=w.clone(),_.parent=c,c.children.push(_)}),c},s.prototype.attribute=function(u,a){var c,f;if(u!=null&&(u=p(u)),t(u))for(c in u){if(!i.call(u,c))continue;f=u[c],this.attribute(c,f)}else d(a)&&(a=a.apply()),this.options.keepNullAttributes&&a==null?this.attribs[u]=new y(this,u,""):a!=null&&(this.attribs[u]=new y(this,u,a));return this},s.prototype.removeAttribute=function(u){var a,c,f;if(u==null)throw new Error("Missing attribute name. "+this.debugInfo());if(u=p(u),Array.isArray(u))for(c=0,f=u.length;c<f;c++)a=u[c],delete this.attribs[a];else delete this.attribs[u];return this},s.prototype.toString=function(u){return this.options.writer.element(this,this.options.writer.filterOptions(u))},s.prototype.att=function(u,a){return this.attribute(u,a)},s.prototype.a=function(u,a){return this.attribute(u,a)},s.prototype.getAttribute=function(u){return this.attribs.hasOwnProperty(u)?this.attribs[u].value:null},s.prototype.setAttribute=function(u,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.getAttributeNode=function(u){return this.attribs.hasOwnProperty(u)?this.attribs[u]:null},s.prototype.setAttributeNode=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.removeAttributeNode=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.getElementsByTagName=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.getAttributeNS=function(u,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.setAttributeNS=function(u,a,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.removeAttributeNS=function(u,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.getAttributeNodeNS=function(u,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.setAttributeNodeNS=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.getElementsByTagNameNS=function(u,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.hasAttribute=function(u){return this.attribs.hasOwnProperty(u)},s.prototype.hasAttributeNS=function(u,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.setIdAttribute=function(u,a){return this.attribs.hasOwnProperty(u)?this.attribs[u].isId:a},s.prototype.setIdAttributeNS=function(u,a,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.setIdAttributeNode=function(u,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.getElementsByTagName=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.getElementsByTagNameNS=function(u,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.getElementsByClassName=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.isEqualNode=function(u){var a,c,f;if(!s.__super__.isEqualNode.apply(this,arguments).isEqualNode(u))return!1;if(u.namespaceURI!==this.namespaceURI)return!1;if(u.prefix!==this.prefix)return!1;if(u.localName!==this.localName)return!1;if(u.attribs.length!==this.attribs.length)return!1;for(a=c=0,f=this.attribs.length-1;0<=f?c<=f:c>=f;a=0<=f?++c:--c)if(!this.attribs[a].isEqualNode(u.attribs[a]))return!1;return!0},s}(b)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/keys"),v=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M;$.exports=M=function(){function y(m){this.nodes=m}return Object.defineProperty(y.prototype,"length",{get:function(){return(0,v.default)(this.nodes).length||0}}),y.prototype.clone=function(){return this.nodes=null},y.prototype.getNamedItem=function(m){return this.nodes[m]},y.prototype.setNamedItem=function(m){var S;return S=this.nodes[m.nodeName],this.nodes[m.nodeName]=m,S||null},y.prototype.removeNamedItem=function(m){var S;return S=this.nodes[m],delete this.nodes[m],S||null},y.prototype.item=function(m){return this.nodes[(0,v.default)(this.nodes)[m]]||null},y.prototype.getNamedItemNS=function(m,S){throw new Error("This DOM method is not implemented.")},y.prototype.setNamedItemNS=function(m){throw new Error("This DOM method is not implemented.")},y.prototype.removeNamedItemNS=function(m,S){throw new Error("This DOM method is not implemented.")},y}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(F,$,j){"use strict";(function(){var N,v,O,M,y,m,S,b,p,d,t,l,r,i,o,s,u,a,c,f={}.hasOwnProperty;c=F("./Utility"),a=c.isObject,u=c.isFunction,s=c.isEmpty,o=c.getValue,b=null,O=null,M=null,y=null,m=null,r=null,i=null,l=null,S=null,v=null,t=null,p=null,N=null,$.exports=d=function(){function w(_){this.parent=_,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,b||(b=F("./XMLElement"),O=F("./XMLCData"),M=F("./XMLComment"),y=F("./XMLDeclaration"),m=F("./XMLDocType"),r=F("./XMLRaw"),i=F("./XMLText"),l=F("./XMLProcessingInstruction"),S=F("./XMLDummy"),v=F("./NodeType"),t=F("./XMLNodeList"),p=F("./XMLNamedNodeMap"),N=F("./DocumentPosition"))}return Object.defineProperty(w.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(w.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(w.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(w.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(w.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new t(this.children)),this.childNodeList}}),Object.defineProperty(w.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(w.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(w.prototype,"previousSibling",{get:function(){var h;return h=this.parent.children.indexOf(this),this.parent.children[h-1]||null}}),Object.defineProperty(w.prototype,"nextSibling",{get:function(){var h;return h=this.parent.children.indexOf(this),this.parent.children[h+1]||null}}),Object.defineProperty(w.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(w.prototype,"textContent",{get:function(){var h,R,C,g,x;if(this.nodeType===v.Element||this.nodeType===v.DocumentFragment){for(x="",g=this.children,R=0,C=g.length;R<C;R++)h=g[R],h.textContent&&(x+=h.textContent);return x}else return null},set:function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),w.prototype.setParent=function(_){var h,R,C,g,x;for(this.parent=_,_&&(this.options=_.options,this.stringify=_.stringify),g=this.children,x=[],R=0,C=g.length;R<C;R++)h=g[R],x.push(h.setParent(this));return x},w.prototype.element=function(_,h,R){var C,g,x,E,T,k,L,A,G,K,W;if(k=null,h===null&&R==null&&(G=[{},null],h=G[0],R=G[1]),h==null&&(h={}),h=o(h),a(h)||(K=[h,R],R=K[0],h=K[1]),_!=null&&(_=o(_)),Array.isArray(_))for(x=0,L=_.length;x<L;x++)g=_[x],k=this.element(g);else if(u(_))k=this.element(_.apply());else if(a(_))for(T in _){if(!f.call(_,T))continue;if(W=_[T],u(W)&&(W=W.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&T.indexOf(this.stringify.convertAttKey)===0)k=this.attribute(T.substr(this.stringify.convertAttKey.length),W);else if(!this.options.separateArrayItems&&Array.isArray(W)&&s(W))k=this.dummy();else if(a(W)&&s(W))k=this.element(T);else if(!this.options.keepNullNodes&&W==null)k=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(W))for(E=0,A=W.length;E<A;E++)g=W[E],C={},C[T]=g,k=this.element(C);else a(W)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&T.indexOf(this.stringify.convertTextKey)===0?k=this.element(W):(k=this.element(T),k.element(W)):k=this.element(T,W)}else!this.options.keepNullNodes&&R===null?k=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&_.indexOf(this.stringify.convertTextKey)===0?k=this.text(R):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&_.indexOf(this.stringify.convertCDataKey)===0?k=this.cdata(R):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&_.indexOf(this.stringify.convertCommentKey)===0?k=this.comment(R):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&_.indexOf(this.stringify.convertRawKey)===0?k=this.raw(R):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&_.indexOf(this.stringify.convertPIKey)===0?k=this.instruction(_.substr(this.stringify.convertPIKey.length),R):k=this.node(_,h,R);if(k==null)throw new Error("Could not create any elements with: "+_+". "+this.debugInfo());return k},w.prototype.insertBefore=function(_,h,R){var C,g,x,E,T;if(_!=null?_.type:void 0)return x=_,E=h,x.setParent(this),E?(g=children.indexOf(E),T=children.splice(g),children.push(x),Array.prototype.push.apply(children,T)):children.push(x),x;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(_));return g=this.parent.children.indexOf(this),T=this.parent.children.splice(g),C=this.parent.element(_,h,R),Array.prototype.push.apply(this.parent.children,T),C},w.prototype.insertAfter=function(_,h,R){var C,g,x;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(_));return g=this.parent.children.indexOf(this),x=this.parent.children.splice(g+1),C=this.parent.element(_,h,R),Array.prototype.push.apply(this.parent.children,x),C},w.prototype.remove=function(){var _,h;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return _=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[_,_-_+1].concat(h=[])),this.parent},w.prototype.node=function(_,h,R){var C,g;return _!=null&&(_=o(_)),h||(h={}),h=o(h),a(h)||(g=[h,R],R=g[0],h=g[1]),C=new b(this,_,h),R!=null&&C.text(R),this.children.push(C),C},w.prototype.text=function(_){var h;return a(_)&&this.element(_),h=new i(this,_),this.children.push(h),this},w.prototype.cdata=function(_){var h;return h=new O(this,_),this.children.push(h),this},w.prototype.comment=function(_){var h;return h=new M(this,_),this.children.push(h),this},w.prototype.commentBefore=function(_){var h,R,C;return R=this.parent.children.indexOf(this),C=this.parent.children.splice(R),h=this.parent.comment(_),Array.prototype.push.apply(this.parent.children,C),this},w.prototype.commentAfter=function(_){var h,R,C;return R=this.parent.children.indexOf(this),C=this.parent.children.splice(R+1),h=this.parent.comment(_),Array.prototype.push.apply(this.parent.children,C),this},w.prototype.raw=function(_){var h;return h=new r(this,_),this.children.push(h),this},w.prototype.dummy=function(){var _;return _=new S(this),_},w.prototype.instruction=function(_,h){var R,C,g,x,E;if(_!=null&&(_=o(_)),h!=null&&(h=o(h)),Array.isArray(_))for(x=0,E=_.length;x<E;x++)R=_[x],this.instruction(R);else if(a(_))for(R in _){if(!f.call(_,R))continue;C=_[R],this.instruction(R,C)}else u(h)&&(h=h.apply()),g=new l(this,_,h),this.children.push(g);return this},w.prototype.instructionBefore=function(_,h){var R,C,g;return C=this.parent.children.indexOf(this),g=this.parent.children.splice(C),R=this.parent.instruction(_,h),Array.prototype.push.apply(this.parent.children,g),this},w.prototype.instructionAfter=function(_,h){var R,C,g;return C=this.parent.children.indexOf(this),g=this.parent.children.splice(C+1),R=this.parent.instruction(_,h),Array.prototype.push.apply(this.parent.children,g),this},w.prototype.declaration=function(_,h,R){var C,g;return C=this.document(),g=new y(C,_,h,R),C.children.length===0?C.children.unshift(g):C.children[0].type===v.Declaration?C.children[0]=g:C.children.unshift(g),C.root()||C},w.prototype.dtd=function(_,h){var R,C,g,x,E,T,k,L,A,G;for(C=this.document(),g=new m(C,_,h),A=C.children,x=E=0,k=A.length;E<k;x=++E)if(R=A[x],R.type===v.DocType)return C.children[x]=g,g;for(G=C.children,x=T=0,L=G.length;T<L;x=++T)if(R=G[x],R.isRoot)return C.children.splice(x,0,g),g;return C.children.push(g),g},w.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},w.prototype.root=function(){var _;for(_=this;_;){if(_.type===v.Document)return _.rootObject;if(_.isRoot)return _;_=_.parent}},w.prototype.document=function(){var _;for(_=this;_;){if(_.type===v.Document)return _;_=_.parent}},w.prototype.end=function(_){return this.document().end(_)},w.prototype.prev=function(){var _;if(_=this.parent.children.indexOf(this),_<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[_-1]},w.prototype.next=function(){var _;if(_=this.parent.children.indexOf(this),_===-1||_===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[_+1]},w.prototype.importDocument=function(_){var h;return h=_.root().clone(),h.parent=this,h.isRoot=!1,this.children.push(h),this},w.prototype.debugInfo=function(_){var h,R;return _=_||this.name,_==null&&!((h=this.parent)!=null?h.name:void 0)?"":_==null?"parent: <"+this.parent.name+">":((R=this.parent)!=null?R.name:void 0)?"node: <"+_+">, parent: <"+this.parent.name+">":"node: <"+_+">"},w.prototype.ele=function(_,h,R){return this.element(_,h,R)},w.prototype.nod=function(_,h,R){return this.node(_,h,R)},w.prototype.txt=function(_){return this.text(_)},w.prototype.dat=function(_){return this.cdata(_)},w.prototype.com=function(_){return this.comment(_)},w.prototype.ins=function(_,h){return this.instruction(_,h)},w.prototype.doc=function(){return this.document()},w.prototype.dec=function(_,h,R){return this.declaration(_,h,R)},w.prototype.e=function(_,h,R){return this.element(_,h,R)},w.prototype.n=function(_,h,R){return this.node(_,h,R)},w.prototype.t=function(_){return this.text(_)},w.prototype.d=function(_){return this.cdata(_)},w.prototype.c=function(_){return this.comment(_)},w.prototype.r=function(_){return this.raw(_)},w.prototype.i=function(_,h){return this.instruction(_,h)},w.prototype.u=function(){return this.up()},w.prototype.importXMLBuilder=function(_){return this.importDocument(_)},w.prototype.replaceChild=function(_,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.removeChild=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.appendChild=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.hasChildNodes=function(){return this.children.length!==0},w.prototype.cloneNode=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isSupported=function(_,h){return!0},w.prototype.hasAttributes=function(){return this.attribs.length!==0},w.prototype.compareDocumentPosition=function(_){var h,R;return h=this,h===_?0:this.document()!==_.document()?(R=N.Disconnected|N.ImplementationSpecific,Math.random()<.5?R|=N.Preceding:R|=N.Following,R):h.isAncestor(_)?N.Contains|N.Preceding:h.isDescendant(_)?N.Contains|N.Following:h.isPreceding(_)?N.Preceding:N.Following},w.prototype.isSameNode=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.lookupPrefix=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isDefaultNamespace=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.lookupNamespaceURI=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isEqualNode=function(_){var h,R,C;if(_.nodeType!==this.nodeType)return!1;if(_.children.length!==this.children.length)return!1;for(h=R=0,C=this.children.length-1;0<=C?R<=C:R>=C;h=0<=C?++R:--R)if(!this.children[h].isEqualNode(_.children[h]))return!1;return!0},w.prototype.getFeature=function(_,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.setUserData=function(_,h,R){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.getUserData=function(_){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.contains=function(_){return _?_===this||this.isDescendant(_):!1},w.prototype.isDescendant=function(_){var h,R,C,g,x;for(x=this.children,C=0,g=x.length;C<g;C++){if(h=x[C],_===h)return!0;if(R=h.isDescendant(_),R)return!0}return!1},w.prototype.isAncestor=function(_){return _.isDescendant(this)},w.prototype.isPreceding=function(_){var h,R;return h=this.treePosition(_),R=this.treePosition(this),h===-1||R===-1?!1:h<R},w.prototype.isFollowing=function(_){var h,R;return h=this.treePosition(_),R=this.treePosition(this),h===-1||R===-1?!1:h>R},w.prototype.treePosition=function(_){var h,R;return R=0,h=!1,this.foreachTreeNode(this.document(),function(C){if(R++,!h&&C===_)return h=!0}),h?R:-1},w.prototype.foreachTreeNode=function(_,h){var R,C,g,x,E;for(_||(_=this.document()),x=_.children,C=0,g=x.length;C<g;C++){if(R=x[C],E=h(R))return E;if(E=this.foreachTreeNode(R,h),E)return E}},w}()}).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(F,$,j){"use strict";(function(){var N;$.exports=N=function(){function v(O){this.nodes=O}return Object.defineProperty(v.prototype,"length",{get:function(){return this.nodes.length||0}}),v.prototype.clone=function(){return this.nodes=null},v.prototype.item=function(O){return this.nodes[O]||null},v}()}).call(void 0)},{}],275:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,y,m,S=function(d,t){for(var l in t)b.call(t,l)&&(d[l]=t[l]);function r(){this.constructor=d}return r.prototype=t.prototype,d.prototype=new r,d.__super__=t.prototype,d},b={}.hasOwnProperty;M=F("./NodeType"),y=F("./XMLCharacterData"),$.exports=m=function(p){S(d,p);function d(t,l,r){if(d.__super__.constructor.call(this,t),l==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=M.ProcessingInstruction,this.target=this.stringify.insTarget(l),this.name=this.target,r&&(this.value=this.stringify.insValue(r))}return d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(t){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(t))},d.prototype.isEqualNode=function(t){return d.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)?!(t.target!==this.target):!1},d}(y)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,y,m,S=function(d,t){for(var l in t)b.call(t,l)&&(d[l]=t[l]);function r(){this.constructor=d}return r.prototype=t.prototype,d.prototype=new r,d.__super__=t.prototype,d},b={}.hasOwnProperty;M=F("./NodeType"),y=F("./XMLNode"),$.exports=m=function(p){S(d,p);function d(t,l){if(d.__super__.constructor.call(this,t),l==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=M.Raw,this.value=this.stringify.raw(l)}return d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(t){return this.options.writer.raw(this,this.options.writer.filterOptions(t))},d}(y)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(F,$,j){"use strict";(function(){var N,v,O,M,y=function(b,p){for(var d in p)m.call(p,d)&&(b[d]=p[d]);function t(){this.constructor=b}return t.prototype=p.prototype,b.prototype=new t,b.__super__=p.prototype,b},m={}.hasOwnProperty;N=F("./NodeType"),M=F("./XMLWriterBase"),v=F("./WriterState"),$.exports=O=function(S){y(b,S);function b(p,d){this.stream=p,b.__super__.constructor.call(this,d)}return b.prototype.endline=function(p,d,t){return p.isLastRootNode&&d.state===v.CloseTag?"":b.__super__.endline.call(this,p,d,t)},b.prototype.document=function(p,d){var t,l,r,i,o,s,u,a,c;for(u=p.children,l=r=0,o=u.length;r<o;l=++r)t=u[l],t.isLastRootNode=l===p.children.length-1;for(d=this.filterOptions(d),a=p.children,c=[],i=0,s=a.length;i<s;i++)t=a[i],c.push(this.writeChildNode(t,d,0));return c},b.prototype.attribute=function(p,d,t){return this.stream.write(b.__super__.attribute.call(this,p,d,t))},b.prototype.cdata=function(p,d,t){return this.stream.write(b.__super__.cdata.call(this,p,d,t))},b.prototype.comment=function(p,d,t){return this.stream.write(b.__super__.comment.call(this,p,d,t))},b.prototype.declaration=function(p,d,t){return this.stream.write(b.__super__.declaration.call(this,p,d,t))},b.prototype.docType=function(p,d,t){var l,r,i,o;if(t||(t=0),this.openNode(p,d,t),d.state=v.OpenTag,this.stream.write(this.indent(p,d,t)),this.stream.write("<!DOCTYPE "+p.root().name),p.pubID&&p.sysID?this.stream.write(' PUBLIC "'+p.pubID+'" "'+p.sysID+'"'):p.sysID&&this.stream.write(' SYSTEM "'+p.sysID+'"'),p.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(p,d,t)),d.state=v.InsideTag,o=p.children,r=0,i=o.length;r<i;r++)l=o[r],this.writeChildNode(l,d,t+1);d.state=v.CloseTag,this.stream.write("]")}return d.state=v.CloseTag,this.stream.write(d.spaceBeforeSlash+">"),this.stream.write(this.endline(p,d,t)),d.state=v.None,this.closeNode(p,d,t)},b.prototype.element=function(p,d,t){var l,r,i,o,s,u,a,c,f,w;t||(t=0),this.openNode(p,d,t),d.state=v.OpenTag,this.stream.write(this.indent(p,d,t)+"<"+p.name),f=p.attribs;for(a in f){if(!m.call(f,a))continue;l=f[a],this.attribute(l,d,t)}if(i=p.children.length,o=i===0?null:p.children[0],i===0||p.children.every(function(_){return(_.type===N.Text||_.type===N.Raw)&&_.value===""}))d.allowEmpty?(this.stream.write(">"),d.state=v.CloseTag,this.stream.write("</"+p.name+">")):(d.state=v.CloseTag,this.stream.write(d.spaceBeforeSlash+"/>"));else if(d.pretty&&i===1&&(o.type===N.Text||o.type===N.Raw)&&o.value!=null)this.stream.write(">"),d.state=v.InsideTag,d.suppressPrettyCount++,c=!0,this.writeChildNode(o,d,t+1),d.suppressPrettyCount--,c=!1,d.state=v.CloseTag,this.stream.write("</"+p.name+">");else{for(this.stream.write(">"+this.endline(p,d,t)),d.state=v.InsideTag,w=p.children,s=0,u=w.length;s<u;s++)r=w[s],this.writeChildNode(r,d,t+1);d.state=v.CloseTag,this.stream.write(this.indent(p,d,t)+"</"+p.name+">")}return this.stream.write(this.endline(p,d,t)),d.state=v.None,this.closeNode(p,d,t)},b.prototype.processingInstruction=function(p,d,t){return this.stream.write(b.__super__.processingInstruction.call(this,p,d,t))},b.prototype.raw=function(p,d,t){return this.stream.write(b.__super__.raw.call(this,p,d,t))},b.prototype.text=function(p,d,t){return this.stream.write(b.__super__.text.call(this,p,d,t))},b.prototype.dtdAttList=function(p,d,t){return this.stream.write(b.__super__.dtdAttList.call(this,p,d,t))},b.prototype.dtdElement=function(p,d,t){return this.stream.write(b.__super__.dtdElement.call(this,p,d,t))},b.prototype.dtdEntity=function(p,d,t){return this.stream.write(b.__super__.dtdEntity.call(this,p,d,t))},b.prototype.dtdNotation=function(p,d,t){return this.stream.write(b.__super__.dtdNotation.call(this,p,d,t))},b}(M)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(F,$,j){"use strict";(function(){var N,v,O=function(m,S){for(var b in S)M.call(S,b)&&(m[b]=S[b]);function p(){this.constructor=m}return p.prototype=S.prototype,m.prototype=new p,m.__super__=S.prototype,m},M={}.hasOwnProperty;v=F("./XMLWriterBase"),$.exports=N=function(y){O(m,y);function m(S){m.__super__.constructor.call(this,S)}return m.prototype.document=function(S,b){var p,d,t,l,r;for(b=this.filterOptions(b),l="",r=S.children,d=0,t=r.length;d<t;d++)p=r[d],l+=this.writeChildNode(p,b,0);return b.pretty&&l.slice(-b.newline.length)===b.newline&&(l=l.slice(0,-b.newline.length)),l},m}(v)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(F,$,j){"use strict";(function(){var N,v=function(y,m){return function(){return y.apply(m,arguments)}},O={}.hasOwnProperty;$.exports=N=function(){function M(y){this.assertLegalName=v(this.assertLegalName,this),this.assertLegalChar=v(this.assertLegalChar,this);var m,S,b;y||(y={}),this.options=y,this.options.version||(this.options.version="1.0"),S=y.stringify||{};for(m in S){if(!O.call(S,m))continue;b=S[m],this[m]=b}}return M.prototype.name=function(y){return this.options.noValidation?y:this.assertLegalName(""+y||"")},M.prototype.text=function(y){return this.options.noValidation?y:this.assertLegalChar(this.textEscape(""+y||""))},M.prototype.cdata=function(y){return this.options.noValidation?y:(y=""+y||"",y=y.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(y))},M.prototype.comment=function(y){if(this.options.noValidation)return y;if(y=""+y||"",y.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+y);return this.assertLegalChar(y)},M.prototype.raw=function(y){return this.options.noValidation?y:""+y||""},M.prototype.attValue=function(y){return this.options.noValidation?y:this.assertLegalChar(this.attEscape(y=""+y||""))},M.prototype.insTarget=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},M.prototype.insValue=function(y){if(this.options.noValidation)return y;if(y=""+y||"",y.match(/\?>/))throw new Error("Invalid processing instruction value: "+y);return this.assertLegalChar(y)},M.prototype.xmlVersion=function(y){if(this.options.noValidation)return y;if(y=""+y||"",!y.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+y);return y},M.prototype.xmlEncoding=function(y){if(this.options.noValidation)return y;if(y=""+y||"",!y.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+y);return this.assertLegalChar(y)},M.prototype.xmlStandalone=function(y){return this.options.noValidation?y:y?"yes":"no"},M.prototype.dtdPubID=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},M.prototype.dtdSysID=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},M.prototype.dtdElementValue=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},M.prototype.dtdAttType=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},M.prototype.dtdAttDefault=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},M.prototype.dtdEntityValue=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},M.prototype.dtdNData=function(y){return this.options.noValidation?y:this.assertLegalChar(""+y||"")},M.prototype.convertAttKey="@",M.prototype.convertPIKey="?",M.prototype.convertTextKey="#text",M.prototype.convertCDataKey="#cdata",M.prototype.convertCommentKey="#comment",M.prototype.convertRawKey="#raw",M.prototype.assertLegalChar=function(y){var m,S;if(this.options.noValidation)return y;if(m="",this.options.version==="1.0"){if(m=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=y.match(m))throw new Error("Invalid character in string: "+y+" at index "+S.index)}else if(this.options.version==="1.1"&&(m=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=y.match(m)))throw new Error("Invalid character in string: "+y+" at index "+S.index);return y},M.prototype.assertLegalName=function(y){var m;if(this.options.noValidation)return y;if(this.assertLegalChar(y),m=/^([: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])*$/,!y.match(m))throw new Error("Invalid character in name");return y},M.prototype.textEscape=function(y){var m;return this.options.noValidation?y:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,y.replace(m,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},M.prototype.attEscape=function(y){var m;return this.options.noValidation?y:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,y.replace(m,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},M}()}).call(void 0)},{}],280:[function(F,$,j){"use strict";var N=F("babel-runtime/core-js/object/create"),v=O(N);function O(M){return M&&M.__esModule?M:{default:M}}(function(){var M,y,m,S=function(d,t){for(var l in t)b.call(t,l)&&(d[l]=t[l]);function r(){this.constructor=d}return r.prototype=t.prototype,d.prototype=new r,d.__super__=t.prototype,d},b={}.hasOwnProperty;M=F("./NodeType"),y=F("./XMLCharacterData"),$.exports=m=function(p){S(d,p);function d(t,l){if(d.__super__.constructor.call(this,t),l==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=M.Text,this.value=this.stringify.text(l)}return Object.defineProperty(d.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(d.prototype,"wholeText",{get:function(){var l,r,i;for(i="",r=this.previousSibling;r;)i=r.data+i,r=r.previousSibling;for(i+=this.data,l=this.nextSibling;l;)i=i+l.data,l=l.nextSibling;return i}}),d.prototype.clone=function(){return(0,v.default)(this)},d.prototype.toString=function(t){return this.options.writer.text(this,this.options.writer.filterOptions(t))},d.prototype.splitText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.replaceWholeText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},d}(y)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(F,$,j){"use strict";(function(){var N,v,O,M,y,m,S,b,p,d,t,l,r,i,o,s,u,a={}.hasOwnProperty;u=F("./Utility").assign,N=F("./NodeType"),p=F("./XMLDeclaration"),d=F("./XMLDocType"),O=F("./XMLCData"),M=F("./XMLComment"),l=F("./XMLElement"),i=F("./XMLRaw"),o=F("./XMLText"),r=F("./XMLProcessingInstruction"),t=F("./XMLDummy"),y=F("./XMLDTDAttList"),m=F("./XMLDTDElement"),S=F("./XMLDTDEntity"),b=F("./XMLDTDNotation"),v=F("./WriterState"),$.exports=s=function(){function c(f){var w,_,h;f||(f={}),this.options=f,_=f.writer||{};for(w in _){if(!a.call(_,w))continue;h=_[w],this["_"+w]=this[w],this[w]=h}}return c.prototype.filterOptions=function(f){var w,_,h,R,C,g,x,E;return f||(f={}),f=u({},this.options,f),w={writer:this},w.pretty=f.pretty||!1,w.allowEmpty=f.allowEmpty||!1,w.indent=(_=f.indent)!=null?_:" ",w.newline=(h=f.newline)!=null?h:`
`,w.offset=(R=f.offset)!=null?R:0,w.dontPrettyTextNodes=(C=(g=f.dontPrettyTextNodes)!=null?g:f.dontprettytextnodes)!=null?C:0,w.spaceBeforeSlash=(x=(E=f.spaceBeforeSlash)!=null?E:f.spacebeforeslash)!=null?x:"",w.spaceBeforeSlash===!0&&(w.spaceBeforeSlash=" "),w.suppressPrettyCount=0,w.user={},w.state=v.None,w},c.prototype.indent=function(f,w,_){var h;return!w.pretty||w.suppressPrettyCount?"":w.pretty&&(h=(_||0)+w.offset+1,h>0)?new Array(h).join(w.indent):""},c.prototype.endline=function(f,w,_){return!w.pretty||w.suppressPrettyCount?"":w.newline},c.prototype.attribute=function(f,w,_){var h;return this.openAttribute(f,w,_),h=" "+f.name+'="'+f.value+'"',this.closeAttribute(f,w,_),h},c.prototype.cdata=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+"<![CDATA[",w.state=v.InsideTag,h+=f.value,w.state=v.CloseTag,h+="]]>"+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.comment=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+"<!-- ",w.state=v.InsideTag,h+=f.value,w.state=v.CloseTag,h+=" -->"+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.declaration=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+"<?xml",w.state=v.InsideTag,h+=' version="'+f.version+'"',f.encoding!=null&&(h+=' encoding="'+f.encoding+'"'),f.standalone!=null&&(h+=' standalone="'+f.standalone+'"'),w.state=v.CloseTag,h+=w.spaceBeforeSlash+"?>",h+=this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.docType=function(f,w,_){var h,R,C,g,x;if(_||(_=0),this.openNode(f,w,_),w.state=v.OpenTag,g=this.indent(f,w,_),g+="<!DOCTYPE "+f.root().name,f.pubID&&f.sysID?g+=' PUBLIC "'+f.pubID+'" "'+f.sysID+'"':f.sysID&&(g+=' SYSTEM "'+f.sysID+'"'),f.children.length>0){for(g+=" [",g+=this.endline(f,w,_),w.state=v.InsideTag,x=f.children,R=0,C=x.length;R<C;R++)h=x[R],g+=this.writeChildNode(h,w,_+1);w.state=v.CloseTag,g+="]"}return w.state=v.CloseTag,g+=w.spaceBeforeSlash+">",g+=this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),g},c.prototype.element=function(f,w,_){var h,R,C,g,x,E,T,k,L,A,G,K,W,z;_||(_=0),A=!1,G="",this.openNode(f,w,_),w.state=v.OpenTag,G+=this.indent(f,w,_)+"<"+f.name,K=f.attribs;for(L in K){if(!a.call(K,L))continue;h=K[L],G+=this.attribute(h,w,_)}if(C=f.children.length,g=C===0?null:f.children[0],C===0||f.children.every(function(U){return(U.type===N.Text||U.type===N.Raw)&&U.value===""}))w.allowEmpty?(G+=">",w.state=v.CloseTag,G+="</"+f.name+">"+this.endline(f,w,_)):(w.state=v.CloseTag,G+=w.spaceBeforeSlash+"/>"+this.endline(f,w,_));else if(w.pretty&&C===1&&(g.type===N.Text||g.type===N.Raw)&&g.value!=null)G+=">",w.state=v.InsideTag,w.suppressPrettyCount++,A=!0,G+=this.writeChildNode(g,w,_+1),w.suppressPrettyCount--,A=!1,w.state=v.CloseTag,G+="</"+f.name+">"+this.endline(f,w,_);else{if(w.dontPrettyTextNodes){for(W=f.children,x=0,T=W.length;x<T;x++)if(R=W[x],(R.type===N.Text||R.type===N.Raw)&&R.value!=null){w.suppressPrettyCount++,A=!0;break}}for(G+=">"+this.endline(f,w,_),w.state=v.InsideTag,z=f.children,E=0,k=z.length;E<k;E++)R=z[E],G+=this.writeChildNode(R,w,_+1);w.state=v.CloseTag,G+=this.indent(f,w,_)+"</"+f.name+">",A&&w.suppressPrettyCount--,G+=this.endline(f,w,_),w.state=v.None}return this.closeNode(f,w,_),G},c.prototype.writeChildNode=function(f,w,_){switch(f.type){case N.CData:return this.cdata(f,w,_);case N.Comment:return this.comment(f,w,_);case N.Element:return this.element(f,w,_);case N.Raw:return this.raw(f,w,_);case N.Text:return this.text(f,w,_);case N.ProcessingInstruction:return this.processingInstruction(f,w,_);case N.Dummy:return"";case N.Declaration:return this.declaration(f,w,_);case N.DocType:return this.docType(f,w,_);case N.AttributeDeclaration:return this.dtdAttList(f,w,_);case N.ElementDeclaration:return this.dtdElement(f,w,_);case N.EntityDeclaration:return this.dtdEntity(f,w,_);case N.NotationDeclaration:return this.dtdNotation(f,w,_);default:throw new Error("Unknown XML node type: "+f.constructor.name)}},c.prototype.processingInstruction=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+"<?",w.state=v.InsideTag,h+=f.target,f.value&&(h+=" "+f.value),w.state=v.CloseTag,h+=w.spaceBeforeSlash+"?>",h+=this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.raw=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_),w.state=v.InsideTag,h+=f.value,w.state=v.CloseTag,h+=this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.text=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_),w.state=v.InsideTag,h+=f.value,w.state=v.CloseTag,h+=this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.dtdAttList=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+"<!ATTLIST",w.state=v.InsideTag,h+=" "+f.elementName+" "+f.attributeName+" "+f.attributeType,f.defaultValueType!=="#DEFAULT"&&(h+=" "+f.defaultValueType),f.defaultValue&&(h+=' "'+f.defaultValue+'"'),w.state=v.CloseTag,h+=w.spaceBeforeSlash+">"+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.dtdElement=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+"<!ELEMENT",w.state=v.InsideTag,h+=" "+f.name+" "+f.value,w.state=v.CloseTag,h+=w.spaceBeforeSlash+">"+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.dtdEntity=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+"<!ENTITY",w.state=v.InsideTag,f.pe&&(h+=" %"),h+=" "+f.name,f.value?h+=' "'+f.value+'"':(f.pubID&&f.sysID?h+=' PUBLIC "'+f.pubID+'" "'+f.sysID+'"':f.sysID&&(h+=' SYSTEM "'+f.sysID+'"'),f.nData&&(h+=" NDATA "+f.nData)),w.state=v.CloseTag,h+=w.spaceBeforeSlash+">"+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.dtdNotation=function(f,w,_){var h;return this.openNode(f,w,_),w.state=v.OpenTag,h=this.indent(f,w,_)+"<!NOTATION",w.state=v.InsideTag,h+=" "+f.name,f.pubID&&f.sysID?h+=' PUBLIC "'+f.pubID+'" "'+f.sysID+'"':f.pubID?h+=' PUBLIC "'+f.pubID+'"':f.sysID&&(h+=' SYSTEM "'+f.sysID+'"'),w.state=v.CloseTag,h+=w.spaceBeforeSlash+">"+this.endline(f,w,_),w.state=v.None,this.closeNode(f,w,_),h},c.prototype.openNode=function(f,w,_){},c.prototype.closeNode=function(f,w,_){},c.prototype.openAttribute=function(f,w,_){},c.prototype.closeAttribute=function(f,w,_){},c}()}).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(F,$,j){"use strict";(function(){var N,v,O,M,y,m,S,b,p,d;d=F("./Utility"),b=d.assign,p=d.isFunction,O=F("./XMLDOMImplementation"),M=F("./XMLDocument"),y=F("./XMLDocumentCB"),S=F("./XMLStringWriter"),m=F("./XMLStreamWriter"),N=F("./NodeType"),v=F("./WriterState"),$.exports.create=function(t,l,r,i){var o,s;if(t==null)throw new Error("Root element needs a name.");return i=b({},l,r,i),o=new M(i),s=o.element(t),i.headless||(o.declaration(i),(i.pubID!=null||i.sysID!=null)&&o.dtd(i)),s},$.exports.begin=function(t,l,r){var i;return p(t)&&(i=[t,l],l=i[0],r=i[1],t={}),l?new y(t,l,r):new M(t)},$.exports.stringWriter=function(t){return new S(t)},$.exports.streamWriter=function(t,l){return new m(t,l)},$.exports.implementation=new O,$.exports.nodeType=N,$.exports.writerState=v}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(F,$,j){$.exports=v;var N=Object.prototype.hasOwnProperty;function v(){for(var O={},M=0;M<arguments.length;M++){var y=arguments[M];for(var m in y)N.call(y,m)&&(O[m]=y[m])}return O}},{}],284:[function(F,$,j){"use strict";var N=F("buffer").Buffer,v=F("./sha"),O=F("./md5"),M={sha1:v,md5:O},y=64,m=N.alloc(y);m.fill(0);function S(d,t,l){N.isBuffer(t)||(t=N.from(t)),N.isBuffer(l)||(l=N.from(l)),t.length>y?t=d(t):t.length<y&&(t=N.concat([t,m],y));for(var r=N.alloc(y),i=N.alloc(y),o=0;o<y;o++)r[o]=t[o]^54,i[o]=t[o]^92;var s=d(N.concat([r,l]));return d(N.concat([i,s]))}function b(d,t){d=d||"sha1";var l=M[d],r=[],i=0;return l||p("algorithm:",d,"is not yet supported"),{update:function(s){return N.isBuffer(s)||(s=N.from(s)),r.push(s),i+=s.length,this},digest:function(s){var u=N.concat(r),a=t?S(l,t,u):l(u);return r=null,s?a.toString(s):a}}}function p(){var d=[].slice.call(arguments).join(" ");throw new Error([d,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}j.createHash=function(d){return b(d)},j.createHmac=function(d,t){return b(d,t)},j.createCredentials=function(){p("sorry,createCredentials is not implemented yet")},j.createCipher=function(){p("sorry,createCipher is not implemented yet")},j.createCipheriv=function(){p("sorry,createCipheriv is not implemented yet")},j.createDecipher=function(){p("sorry,createDecipher is not implemented yet")},j.createDecipheriv=function(){p("sorry,createDecipheriv is not implemented yet")},j.createSign=function(){p("sorry,createSign is not implemented yet")},j.createVerify=function(){p("sorry,createVerify is not implemented yet")},j.createDiffieHellman=function(){p("sorry,createDiffieHellman is not implemented yet")},j.pbkdf2=function(){p("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(F,$,j){"use strict";var N=F("buffer").Buffer,v=4,O=N.alloc(v);O.fill(0);var M=8;function y(b,p){if(b.length%v!==0){var d=b.length+(v-b.length%v);b=N.concat([b,O],d)}for(var t=[],l=p?b.readInt32BE:b.readInt32LE,r=0;r<b.length;r+=v)t.push(l.call(b,r));return t}function m(b,p,d){for(var t=N.alloc(p),l=d?t.writeInt32BE:t.writeInt32LE,r=0;r<b.length;r++)l.call(t,b[r],r*4,!0);return t}function S(b,p,d,t){N.isBuffer(b)||(b=N.from(b));var l=p(y(b,t),b.length*M);return m(l,d,t)}$.exports={hash:S}},{buffer:73}],286:[function(F,$,j){"use strict";var N=F("./helpers");function v(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function O(t,l){t[l>>5]|=128<<l%32,t[(l+64>>>9<<4)+14]=l;for(var r=1732584193,i=-271733879,o=-1732584194,s=271733878,u=0;u<t.length;u+=16){var a=r,c=i,f=o,w=s;r=y(r,i,o,s,t[u+0],7,-680876936),s=y(s,r,i,o,t[u+1],12,-389564586),o=y(o,s,r,i,t[u+2],17,606105819),i=y(i,o,s,r,t[u+3],22,-1044525330),r=y(r,i,o,s,t[u+4],7,-176418897),s=y(s,r,i,o,t[u+5],12,1200080426),o=y(o,s,r,i,t[u+6],17,-1473231341),i=y(i,o,s,r,t[u+7],22,-45705983),r=y(r,i,o,s,t[u+8],7,1770035416),s=y(s,r,i,o,t[u+9],12,-1958414417),o=y(o,s,r,i,t[u+10],17,-42063),i=y(i,o,s,r,t[u+11],22,-1990404162),r=y(r,i,o,s,t[u+12],7,1804603682),s=y(s,r,i,o,t[u+13],12,-40341101),o=y(o,s,r,i,t[u+14],17,-1502002290),i=y(i,o,s,r,t[u+15],22,1236535329),r=m(r,i,o,s,t[u+1],5,-165796510),s=m(s,r,i,o,t[u+6],9,-1069501632),o=m(o,s,r,i,t[u+11],14,643717713),i=m(i,o,s,r,t[u+0],20,-373897302),r=m(r,i,o,s,t[u+5],5,-701558691),s=m(s,r,i,o,t[u+10],9,38016083),o=m(o,s,r,i,t[u+15],14,-660478335),i=m(i,o,s,r,t[u+4],20,-405537848),r=m(r,i,o,s,t[u+9],5,568446438),s=m(s,r,i,o,t[u+14],9,-1019803690),o=m(o,s,r,i,t[u+3],14,-187363961),i=m(i,o,s,r,t[u+8],20,1163531501),r=m(r,i,o,s,t[u+13],5,-1444681467),s=m(s,r,i,o,t[u+2],9,-51403784),o=m(o,s,r,i,t[u+7],14,1735328473),i=m(i,o,s,r,t[u+12],20,-1926607734),r=S(r,i,o,s,t[u+5],4,-378558),s=S(s,r,i,o,t[u+8],11,-2022574463),o=S(o,s,r,i,t[u+11],16,1839030562),i=S(i,o,s,r,t[u+14],23,-35309556),r=S(r,i,o,s,t[u+1],4,-1530992060),s=S(s,r,i,o,t[u+4],11,1272893353),o=S(o,s,r,i,t[u+7],16,-155497632),i=S(i,o,s,r,t[u+10],23,-1094730640),r=S(r,i,o,s,t[u+13],4,681279174),s=S(s,r,i,o,t[u+0],11,-358537222),o=S(o,s,r,i,t[u+3],16,-722521979),i=S(i,o,s,r,t[u+6],23,76029189),r=S(r,i,o,s,t[u+9],4,-640364487),s=S(s,r,i,o,t[u+12],11,-421815835),o=S(o,s,r,i,t[u+15],16,530742520),i=S(i,o,s,r,t[u+2],23,-995338651),r=b(r,i,o,s,t[u+0],6,-198630844),s=b(s,r,i,o,t[u+7],10,1126891415),o=b(o,s,r,i,t[u+14],15,-1416354905),i=b(i,o,s,r,t[u+5],21,-57434055),r=b(r,i,o,s,t[u+12],6,1700485571),s=b(s,r,i,o,t[u+3],10,-1894986606),o=b(o,s,r,i,t[u+10],15,-1051523),i=b(i,o,s,r,t[u+1],21,-2054922799),r=b(r,i,o,s,t[u+8],6,1873313359),s=b(s,r,i,o,t[u+15],10,-30611744),o=b(o,s,r,i,t[u+6],15,-1560198380),i=b(i,o,s,r,t[u+13],21,1309151649),r=b(r,i,o,s,t[u+4],6,-145523070),s=b(s,r,i,o,t[u+11],10,-1120210379),o=b(o,s,r,i,t[u+2],15,718787259),i=b(i,o,s,r,t[u+9],21,-343485551),r=p(r,a),i=p(i,c),o=p(o,f),s=p(s,w)}return Array(r,i,o,s)}function M(t,l,r,i,o,s){return p(d(p(p(l,t),p(i,s)),o),r)}function y(t,l,r,i,o,s,u){return M(l&r|~l&i,t,l,o,s,u)}function m(t,l,r,i,o,s,u){return M(l&i|r&~i,t,l,o,s,u)}function S(t,l,r,i,o,s,u){return M(l^r^i,t,l,o,s,u)}function b(t,l,r,i,o,s,u){return M(r^(l|~i),t,l,o,s,u)}function p(t,l){var r=(t&65535)+(l&65535),i=(t>>16)+(l>>16)+(r>>16);return i<<16|r&65535}function d(t,l){return t<<l|t>>>32-l}$.exports=function(l){return N.hash(l,O,16)}},{"./helpers":285}],287:[function(F,$,j){"use strict";var N=F("./helpers");function v(S,b){S[b>>5]|=128<<24-b%32,S[(b+64>>9<<4)+15]=b;for(var p=Array(80),d=1732584193,t=-271733879,l=-1732584194,r=271733878,i=-1009589776,o=0;o<S.length;o+=16){for(var s=d,u=t,a=l,c=r,f=i,w=0;w<80;w++){w<16?p[w]=S[o+w]:p[w]=m(p[w-3]^p[w-8]^p[w-14]^p[w-16],1);var _=y(y(m(d,5),O(w,t,l,r)),y(y(i,p[w]),M(w)));i=r,r=l,l=m(t,30),t=d,d=_}d=y(d,s),t=y(t,u),l=y(l,a),r=y(r,c),i=y(i,f)}return Array(d,t,l,r,i)}function O(S,b,p,d){return S<20?b&p|~b&d:S<40?b^p^d:S<60?b&p|b&d|p&d:b^p^d}function M(S){return S<20?1518500249:S<40?1859775393:S<60?-1894007588:-899497514}function y(S,b){var p=(S&65535)+(b&65535),d=(S>>16)+(b>>16)+(p>>16);return d<<16|p&65535}function m(S,b){return S<<b|S>>>32-b}$.exports=function(b){return N.hash(b,v,20,!0)}},{"./helpers":285}],288:[function(F,$,j){"use strict";$.exports=function(){return function(){}}},{}],289:[function(F,$,j){(function(N){"use strict";var v=F("babel-runtime/helpers/typeof"),O=M(v);function M(d){return d&&d.__esModule?d:{default:d}}var y=F("stream"),m=y.Stream,S=F("../lib/common/utils/isArray"),b=S.isArray;$.exports.string=function(t){return typeof t=="string"},$.exports.array=b,$.exports.buffer=N.isBuffer;function p(d){return d instanceof m}$.exports.writableStream=function(t){return p(t)&&typeof t._write=="function"&&(0,O.default)(t._writableState)==="object"}}).call(this,{isBuffer:F("../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(F,$,j){"use strict";j.encodeURIComponent=function(N){try{return encodeURIComponent(N)}catch(v){return N}},j.escape=F("escape-html"),j.timestamp=function(v){if(v){var O=v;return typeof O=="string"&&(O=Number(O)),String(v).length===10&&(O*=1e3),new Date(O)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(F,$,j){(function(N,v){"use strict";var O=F("babel-runtime/core-js/json/stringify"),M=S(O),y=F("babel-runtime/helpers/typeof"),m=S(y);function S(w){return w&&w.__esModule?w:{default:w}}var b=F("util"),p=F("url"),d=F("http"),t=F("https"),l=F("debug")("urllib"),r=F("humanize-ms"),i,o=0,s=Math.pow(2,31)-10,u=/^https?:\/\//i;function a(w,_){return w===void 0?_:w}function c(w,_){return function(h,R,C){if(h)return _(h);w({data:R,status:C.statusCode,headers:C.headers,res:C})}}j.TIMEOUTS=[r("300s"),r("300s")];var f=["json","text"];j.request=function(_,h,R){return arguments.length===2&&typeof h=="function"&&(R=h,h=null),typeof R=="function"?j.requestWithCallback(_,h,R):(i||(i=F("any-promise")),new i(function(C,g){j.requestWithCallback(_,h,c(C,g))}))},j.requestWithCallback=function(_,h,R){if(!_||typeof _!="string"&&(typeof _=="undefined"?"undefined":(0,m.default)(_))!=="object"){var C=b.format("expect request url to be a string or a http request options, but got %j",_);throw new Error(C)}arguments.length===2&&typeof h=="function"&&(R=h,h=null),h=h||{},o>=s&&(o=0);var g=++o;h.requestUrls=h.requestUrls||[];var x={requestId:g,url:_,args:h,ctx:h.ctx};h.emitter&&h.emitter.emit("request",x),h.timeout=h.timeout||j.TIMEOUTS,h.maxRedirects=h.maxRedirects||10,h.streaming=h.streaming||h.customResponse;var E=Date.now(),T;typeof _=="string"?(u.test(_)||(_="http://"+_),T=p.parse(_)):T=_;var k=(h.type||h.method||T.method||"GET").toUpperCase(),L=T.port||80,A=d,G=a(h.agent,j.agent),K=h.fixJSONCtlChars;T.protocol==="https:"&&(A=t,G=a(h.httpsAgent,j.httpsAgent),T.port||(L=443));var W={host:T.hostname||T.host||"localhost",path:T.path||"/",method:k,port:L,agent:G,headers:h.headers||{},lookup:h.lookup};Array.isArray(h.timeout)?W.requestTimeout=h.timeout[h.timeout.length-1]:typeof h.timeout!="undefined"&&(W.requestTimeout=h.timeout);for(var z=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U<z.length;U++){var P=z[U];h.hasOwnProperty(P)&&(W[P]=h[P])}W.rejectUnauthorized===!1&&!W.hasOwnProperty("secureOptions")&&(W.secureOptions=F("constants").SSL_OP_NO_TLSv1_2);var H=h.auth||T.auth;H&&(W.auth=H);var V=h.content||h.data,q=k==="GET"||k==="HEAD"||h.dataAsQueryString;if(!h.content&&(V&&!(typeof V=="string"||v.isBuffer(V))))if(q)V=h.nestedQuerystring?qs.stringify(V):querystring.stringify(V);else{var Z=W.headers["Content-Type"]||W.headers["content-type"];Z||(h.contentType==="json"?Z="application/json":Z="application/x-www-form-urlencoded",W.headers["Content-Type"]=Z),parseContentType(Z).type==="application/json"?V=(0,M.default)(V):V=h.nestedQuerystring?qs.stringify(V):querystring.stringify(V)}q&&V&&(W.path+=(T.query?"&":"?")+V,V=null);var ce=0;if(V){var he=V.length;v.isBuffer(V)||(he=v.byteLength(V)),ce=W.headers["Content-Length"]=he}h.dataType==="json"&&(W.headers.Accept="application/json"),typeof h.beforeRequest=="function"&&h.beforeRequest(W);var ae=null,xe=null,ge=null,oe=!1,se=!1,te=0,be=-1,ee=!1,ie="",Ee="",ne=null;h.timing&&(ne={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function J(){ae&&(clearTimeout(ae),ae=null)}function X(){xe&&(clearTimeout(xe),xe=null)}function Q(Oe,Ve,Ze){if(X(),!R){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),g,N.pid,W.method,_),Oe&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),g,N.pid,Oe.name,Oe.message,Oe.stack);return}var Ne=R;R=null;var Ge={};if(Ze&&(be=Ze.statusCode,Ge=Ze.headers),be===401&&Ge["www-authenticate"]&&(!h.headers||!h.headers.Authorization)&&h.digestAuth){var De=Ge["www-authenticate"];if(De.indexOf("Digest ")>=0)return l("Request#%d %s: got digest auth header WWW-Authenticate: %s",g,_,De),h.headers=h.headers||{},h.headers.Authorization=digestAuthHeader(W.method,W.path,De,h.digestAuth),l("Request#%d %s: auth with digest header: %s",g,_,h.headers.Authorization),Ze.headers["set-cookie"]&&(h.headers.Cookie=Ze.headers["set-cookie"].join(";")),j.requestWithCallback(_,h,Ne)}var we=Date.now()-E;ne&&(ne.contentDownload=we),l("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",we,te,be,W.method,W.host,W.path,se,ne);var Ae={status:be,statusCode:be,headers:Ge,size:te,aborted:ee,rt:we,keepAliveSocket:se,data:Ve,requestUrls:h.requestUrls,timing:ne,remoteAddress:ie,remotePort:Ee};if(Oe){var de="";G&&typeof G.getCurrentStatus=="function"&&(de=", agent status: "+(0,M.default)(G.getCurrentStatus())),Oe.message+=", "+W.method+" "+_+" "+be+" (connected: "+oe+", keepalive socket: "+se+de+`)
headers: `+(0,M.default)(Ge),Oe.data=Ve,Oe.path=W.path,Oe.status=be,Oe.headers=Ge,Oe.res=Ae}Ne(Oe,Ve,h.streaming?Ze:Ae),h.emitter&&(x.url=_,x.socket=rt&&rt.connection,x.options=W,x.size=ce,h.emitter.emit("response",{requestId:g,error:Oe,ctx:h.ctx,req:x,res:Ae}))}function me(Oe){var Ve=null;if(h.followRedirect&&statuses.redirect[Oe.statusCode]){h._followRedirectCount=(h._followRedirectCount||0)+1;var Ze=Oe.headers.location;if(!Ze)Ve=new Error("Got statusCode "+Oe.statusCode+" but cannot resolve next location from headers"),Ve.name="FollowRedirectError";else if(h._followRedirectCount>h.maxRedirects)Ve=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+_),Ve.name="MaxRedirectError";else{var Ne=h.formatRedirectUrl?h.formatRedirectUrl(_,Ze):p.resolve(_,Ze);l("Request#%d %s: `redirected` from %s to %s",g,W.path,_,Ne),X(),h.headers&&h.headers.Host&&u.test(Ze)&&(h.headers.Host=null);var Ge=R;return R=null,j.requestWithCallback(Ne,h,Ge),{redirect:!0,error:null}}}return{redirect:!1,error:Ve}}!W.headers["User-Agent"]&&!W.headers["user-agent"]&&(W.headers["User-Agent"]=navigator.userAgent),h.gzip&&(!W.headers["Accept-Encoding"]&&!W.headers["accept-encoding"]&&(W.headers["Accept-Encoding"]="gzip"));function fe(Oe,Ve,Ze){var Ne=Oe.headers["content-encoding"];return Ze(null,Ve,Ne)}var Te=h.writeStream;l("Request#%d %s %s with headers %j, options.path: %s",g,k,_,W.headers,W.path),h.requestUrls.push(_);function ze(Oe){if(ne&&(ne.waiting=Date.now()-E),l("Request#%d %s `req response` event emit: status %d, headers: %j",g,_,Oe.statusCode,Oe.headers),h.streaming){var Ve=me(Oe);if(Ve.redirect){Oe.resume();return}return Ve.error?(Oe.resume(),Q(Ve.error,null,Oe)):Q(null,null,Oe)}if(Oe.on("close",function(){l("Request#%d %s: `res close` event emit, total size %d",g,_,te)}),Oe.on("error",function(){l("Request#%d %s: `res error` event emit, total size %d",g,_,te)}),Oe.on("aborted",function(){ee=!0,l("Request#%d %s: `res aborted` event emit, total size %d",g,_,te)}),Te){var Ve=me(Oe);if(Ve.redirect){Oe.resume();return}return Ve.error?(Oe.resume(),Te.end(),Q(Ve.error,null,Oe)):(h.consumeWriteStream===!1?Oe.on("end",Q.bind(null,null,null,Oe)):isNode010||isNode012?first([[Te,"close"],[Oe,"aborted"]],function(Ge,De,we){l("Request#%d %s: writeStream or res %s event emitted",g,_,we),Q(ge||null,null,Oe)}):Te.on("close",function(){l("Request#%d %s: writeStream close event emitted",g,_),Q(ge||null,null,Oe)}),Oe.pipe(Te))}var Ze=[];Oe.on("data",function(Ne){l("Request#%d %s: `res data` event emit, size %d",g,_,Ne.length),te+=Ne.length,Ze.push(Ne)}),Oe.on("end",function(){var Ne=v.concat(Ze,te);if(l("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",g,_,te,Oe._dumped),ge)return Q(ge,Ne,Oe);var Ge=me(Oe);if(Ge.error)return Q(Ge.error,Ne,Oe);if(Ge.redirect)return;fe(Oe,Ne,function(De,we,Ae){if(De)return Q(De,Ne,Oe);if(!Ae&&f.indexOf(h.dataType)>=0){try{we=decodeBodyByCharset(we,Oe)}catch(_e){return l("decodeBodyByCharset error: %s",_e),Q(null,we,Oe)}if(h.dataType==="json")if(te===0)we=null;else{var de=parseJSON(we,K);de.error?De=de.error:we=de.data}}ee&&l("Request#%d %s: Remote socket was terminated before `response.end()` was called",g,_),Q(De,we,Oe)})})}var Je,qe;Array.isArray(h.timeout)?(Je=r(h.timeout[0]),qe=r(h.timeout[1])):Je=qe=r(h.timeout),l("ConnectTimeout: %d, ResponseTimeout: %d",Je,qe);function Xe(){l("Connect timer ticking, timeout: %d",Je),ae=setTimeout(function(){ae=null,be===-1&&(be=-2);var Oe="Connect timeout for "+Je+"ms",Ve="ConnectionTimeoutError";rt.socket||(Ve="SocketAssignTimeoutError",Oe+=", working sockets is full"),ge=new Error(Oe),ge.name=Ve,ge.requestId=g,l("ConnectTimeout: Request#%d %s %s: %s, connected: %s",g,_,ge.name,Oe,oe),Le()},Je)}function et(){l("Response timer ticking, timeout: %d",qe),xe=setTimeout(function(){xe=null;var Oe="Response timeout for "+qe+"ms",Ve="ResponseTimeoutError";ge=new Error(Oe),ge.name=Ve,ge.requestId=g,l("ResponseTimeout: Request#%d %s %s: %s, connected: %s",g,_,ge.name,Oe,oe),Le()},qe)}var rt;W.mode=h.mode?h.mode:"";try{rt=A.request(W,ze)}catch(Oe){return Q(Oe)}typeof window=="undefined"?Xe():rt.on("requestTimeout",function(){be===-1&&(be=-2);var Oe="Connect timeout for "+Je+"ms",Ve="ConnectionTimeoutError";ge=new Error(Oe),ge.name=Ve,ge.requestId=g,Le()});function Le(){l("Request#%d %s abort, connected: %s",g,_,oe),rt.socket||(ge.noSocket=!0,Q(ge)),rt.abort()}return ne&&rt.on("finish",function(){ne.requestSent=Date.now()-E}),rt.once("socket",function(Oe){ne&&(ne.queuing=Date.now()-E),isNode010&&Oe.socket&&(Oe=Oe.socket);var Ve=Oe.readyState;if(Ve==="opening"){Oe.once("lookup",function(Ze,Ne,Ge){l("Request#%d %s lookup: %s, %s, %s",g,_,Ze,Ne,Ge),ne&&(ne.dnslookup=Date.now()-E),Ne&&(ie=Ne)}),Oe.once("connect",function(){ne&&(ne.connected=Date.now()-E),J(),et(),l("Request#%d %s new socket connected",g,_),oe=!0,ie||(ie=Oe.remoteAddress),Ee=Oe.remotePort});return}l("Request#%d %s reuse socket connected, readyState: %s",g,_,Ve),oe=!0,se=!0,ie||(ie=Oe.remoteAddress),Ee=Oe.remotePort,J(),et()}),rt.on("error",function(Oe){(Oe.name==="Error"||Oe.name==="TypeError")&&(Oe.name=oe?"ResponseError":"RequestError"),Oe.message+=' (req "error")',l("Request#%d %s `req error` event emit, %s: %s",g,_,Oe.name,Oe.message),Q(ge||Oe)}),Te&&Te.once("error",function(Oe){Oe.message+=' (writeStream "error")',ge=Oe,l("Request#%d %s `writeStream error` event emit, %s: %s",g,_,Oe.name,Oe.message),Le()}),h.stream?(h.stream.pipe(rt),h.stream.once("error",function(Oe){Oe.message+=' (stream "error")',ge=Oe,l("Request#%d %s `readStream error` event emit, %s: %s",g,_,Oe.name,Oe.message),Le()})):rt.end(V),rt.requestId=g,rt}}).call(this,F("_process"),F("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(F,$,j){"use strict";j.d($,"a",function(){return b});var N=j("cDcd"),v=j("biw7"),O=j("fyJ8");function M(p){var d=p.className,t=p.index,l=p.children,r=p.colSpan,i=p.rowSpan,o=N.useContext(v.a),s=o.prefixCls,u=o.fixedInfoList,a=u[t];return N.createElement(O.a,Object.assign({className:d,index:t,component:"td",prefixCls:s,record:null,dataIndex:null,render:function(){return{children:l,props:{colSpan:r,rowSpan:i}}}},a))}function y(p){return N.createElement("tr",Object.assign({},p))}function m(p){var d=p.children,t=N.useContext(v.a),l=t.prefixCls;return N.createElement("tfoot",{className:"".concat(l,"-summary")},d)}var S=$.b=m,b={Cell:M,Row:y}},nj2k:function(F,$,j){F.exports=j.p+"static/nodata.c3b0b86c.svg"},oRuE:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.Iso10126={pad:function(v,O){var M=O*4,y=M-v.sigBytes%M;v.concat(N.lib.WordArray.random(y-1)).concat(N.lib.WordArray.create([y<<24],1))},unpad:function(v){var O=v.words[v.sigBytes-1>>>2]&255;v.sigBytes-=O}},N.pad.Iso10126})},osHv:function(F,$,j){(function(N){N(j("VrN/"))})(function(N){"use strict";var v=N.Pos;function O(u,a){return u.line-a.line||u.ch-a.ch}var M="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",y=M+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",m=new RegExp("<(/?)(["+M+"]["+y+"]*)","g");function S(u,a,c,f){this.line=a,this.ch=c,this.cm=u,this.text=u.getLine(a),this.min=f?Math.max(f.from,u.firstLine()):u.firstLine(),this.max=f?Math.min(f.to-1,u.lastLine()):u.lastLine()}function b(u,a){var c=u.cm.getTokenTypeAt(v(u.line,a));return c&&/\btag\b/.test(c)}function p(u){return u.line>=u.max?void 0:(u.ch=0,u.text=u.cm.getLine(++u.line),!0)}function d(u){return u.line<=u.min?void 0:(u.text=u.cm.getLine(--u.line),u.ch=u.text.length,!0)}function t(u){for(;;){var a=u.text.indexOf(">",u.ch);if(a==-1){if(p(u))continue;return}if(!b(u,a+1)){u.ch=a+1;continue}var c=u.text.lastIndexOf("/",a),f=c>-1&&!/\S/.test(u.text.slice(c+1,a));return u.ch=a+1,f?"selfClose":"regular"}}function l(u){for(;;){var a=u.ch?u.text.lastIndexOf("<",u.ch-1):-1;if(a==-1){if(d(u))continue;return}if(!b(u,a+1)){u.ch=a;continue}m.lastIndex=a,u.ch=a;var c=m.exec(u.text);if(c&&c.index==a)return c}}function r(u){for(;;){m.lastIndex=u.ch;var a=m.exec(u.text);if(!a){if(p(u))continue;return}if(!b(u,a.index+1)){u.ch=a.index+1;continue}return u.ch=a.index+a[0].length,a}}function i(u){for(;;){var a=u.ch?u.text.lastIndexOf(">",u.ch-1):-1;if(a==-1){if(d(u))continue;return}if(!b(u,a+1)){u.ch=a;continue}var c=u.text.lastIndexOf("/",a),f=c>-1&&!/\S/.test(u.text.slice(c+1,a));return u.ch=a+1,f?"selfClose":"regular"}}function o(u,a){for(var c=[];;){var f=r(u),w,_=u.line,h=u.ch-(f?f[0].length:0);if(!f||!(w=t(u)))return;if(w=="selfClose")continue;if(f[1]){for(var R=c.length-1;R>=0;--R)if(c[R]==f[2]){c.length=R;break}if(R<0&&(!a||a==f[2]))return{tag:f[2],from:v(_,h),to:v(u.line,u.ch)}}else c.push(f[2])}}function s(u,a){for(var c=[];;){var f=i(u);if(!f)return;if(f=="selfClose"){l(u);continue}var w=u.line,_=u.ch,h=l(u);if(!h)return;if(h[1])c.push(h[2]);else{for(var R=c.length-1;R>=0;--R)if(c[R]==h[2]){c.length=R;break}if(R<0&&(!a||a==h[2]))return{tag:h[2],from:v(u.line,u.ch),to:v(w,_)}}}}N.registerHelper("fold","xml",function(u,a){for(var c=new S(u,a.line,0);;){var f=r(c);if(!f||c.line!=a.line)return;var w=t(c);if(!w)return;if(!f[1]&&w!="selfClose"){var _=v(c.line,c.ch),h=o(c,f[2]);return h&&O(h.from,_)>0?{from:_,to:h.from}:null}}}),N.findMatchingTag=function(u,a,c){var f=new S(u,a.line,a.ch,c);if(f.text.indexOf(">")==-1&&f.text.indexOf("<")==-1)return;var w=t(f),_=w&&v(f.line,f.ch),h=w&&l(f);if(!w||!h||O(f,a)>0)return;var R={from:v(f.line,f.ch),to:_,tag:h[2]};return w=="selfClose"?{open:R,close:null,at:"open"}:h[1]?{open:s(f,h[2]),close:R,at:"close"}:(f=new S(u,_.line,_.ch,c),{open:R,close:o(f,h[2]),at:"open"})},N.findEnclosingTag=function(u,a,c,f){for(var w=new S(u,a.line,a.ch,c);;){var _=s(w,f);if(!_)break;var h=new S(u,a.line,a.ch,c),R=o(h,_.tag);if(R)return{open:_,close:R}}},N.scanForClosingTag=function(u,a,c,f){var w=new S(u,a.line,a.ch,f?{from:0,to:f}:null);return o(w,c)}})},p5ED:function(F,$,j){"use strict";var N=j("+L6B"),v=j("2/Rp"),O=j("5Dmo"),M=j("3S7+"),y=j("k1fw"),m=j("tJVT"),S=j("cDcd"),b=j.n(S),p=j("vHTk"),d=j.n(p),t=j("yEEn"),l=j("ZW9T"),r=j("1vsH");$.a=function(i){var o=i.name,s=i.data,u=i.theme,a=i.type,c=i.filename,f=i.monacoEditor,w=i.className,_=i.style,h=i.close,R=i.onClose,C=i.hasMask,g=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(m.a)(g,2),E=x[0],T=x[1],k=Object(S.useState)(""),L=Object(m.a)(k,2),A=L[0],G=L[1],K,W=1024*1024,z=10*W,U=Object(S.useRef)();a==="office"&&(K=Object(r.V)(s).filesize,K>z&&(a="other")),c&&(f.filename=c),Object(S.useEffect)(function(){var V,q,Z=(V=document.cookie)===null||V===void 0||((q=V.replace(/\s/g,""))===null||q===void 0)?void 0:q.split(";");Z==null||Z.map(function(ce){var he=ce.split("=");he[0]==="_educoder_session"&&G(he[1])})},[]);var P=function(){if(s.startsWith("http")||s.startsWith("/")){H();return}Object(r.z)(c||"educoder",s,c)},H=function(){Object(r.x)(c||o,s)};return console.log("data:",s,"fileanme:",c," name:",o),b.a.createElement("div",{style:Object(y.a)({},_||{}),className:"".concat(C&&d.a.bgBlack," ").concat(a?d.a.wrp:"hide")},h&&b.a.createElement("div",{className:d.a.close,ref:U},b.a.createElement(M.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return U.current}},b.a.createElement("span",{onClick:H},b.a.createElement("i",{className:"icon-quxiaozhiding"}))),b.a.createElement(M.a,{title:"\u5173\u95ED",getPopupContainer:function(){return U.current}},b.a.createElement("span",{className:"",onClick:R},b.a.createElement("i",{className:"icon-guanbi1"})))),b.a.createElement("div",{className:"".concat(d.a[w]," ").concat(w," ").concat(d.a.monaco," ").concat(a==="txt"?"show":"hide")},a==="txt"&&b.a.createElement(l.b,f)),a==="audio"&&b.a.createElement("audio",{src:"".concat(s!=null&&s.startsWith("/")||(s==null?void 0:s.indexOf("https://"))>-1?s:"data:audio/mp3;base64,").concat(s),autoPlay:!0}),a==="video"&&b.a.createElement(b.a.Fragment,null,s!=null&&s.startsWith("/")?b.a.createElement("video",{controls:!0,src:"".concat(s),autoPlay:!0}):b.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(s),autoPlay:!0})),a==="html"&&b.a.createElement("iframe",{src:s+"&disposition=inline"}),a==="pdf"&&b.a.createElement("embed",{className:d.a.embed,src:s}),a==="image"&&b.a.createElement(b.a.Fragment,null,b.a.createElement("img",{src:"".concat(s!=null&&s.startsWith("/")||(s==null?void 0:s.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(s)})),a==="other"&&b.a.createElement("div",null,b.a.createElement(v.a,{type:"primary",size:"large",onClick:P},b.a.createElement(t.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(a==="download"||a==="office")&&b.a.createElement(v.a,{type:"primary",size:"large",onClick:P},b.a.createElement(t.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(F,$,j){},pA7S:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.WordArray,y=O.BlockCipher,m=v.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],b=[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],p=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],d=[{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}],t=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],l=m.DES=y.extend({_doReset:function(){for(var s=this._key,u=s.words,a=[],c=0;c<56;c++){var f=S[c]-1;a[c]=u[f>>>5]>>>31-f%32&1}for(var w=this._subKeys=[],_=0;_<16;_++){for(var h=w[_]=[],R=p[_],c=0;c<24;c++)h[c/6|0]|=a[(b[c]-1+R)%28]<<31-c%6,h[4+(c/6|0)]|=a[28+(b[c+24]-1+R)%28]<<31-c%6;h[0]=h[0]<<1|h[0]>>>31;for(var c=1;c<7;c++)h[c]=h[c]>>>(c-1)*4+3;h[7]=h[7]<<5|h[7]>>>27}for(var C=this._invSubKeys=[],c=0;c<16;c++)C[c]=w[15-c]},encryptBlock:function(s,u){this._doCryptBlock(s,u,this._subKeys)},decryptBlock:function(s,u){this._doCryptBlock(s,u,this._invSubKeys)},_doCryptBlock:function(s,u,a){this._lBlock=s[u],this._rBlock=s[u+1],r.call(this,4,252645135),r.call(this,16,65535),i.call(this,2,858993459),i.call(this,8,16711935),r.call(this,1,1431655765);for(var c=0;c<16;c++){for(var f=a[c],w=this._lBlock,_=this._rBlock,h=0,R=0;R<8;R++)h|=d[R][((_^f[R])&t[R])>>>0];this._lBlock=_,this._rBlock=w^h}var C=this._lBlock;this._lBlock=this._rBlock,this._rBlock=C,r.call(this,1,1431655765),i.call(this,8,16711935),i.call(this,2,858993459),r.call(this,16,65535),r.call(this,4,252645135),s[u]=this._lBlock,s[u+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function r(s,u){var a=(this._lBlock>>>s^this._rBlock)&u;this._rBlock^=a,this._lBlock^=a<<s}function i(s,u){var a=(this._rBlock>>>s^this._lBlock)&u;this._lBlock^=a,this._rBlock^=a<<s}v.DES=y._createHelper(l);var o=m.TripleDES=y.extend({_doReset:function(){var s=this._key,u=s.words;if(u.length!==2&&u.length!==4&&u.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var a=u.slice(0,2),c=u.length<4?u.slice(0,2):u.slice(2,4),f=u.length<6?u.slice(0,2):u.slice(4,6);this._des1=l.createEncryptor(M.create(a)),this._des2=l.createEncryptor(M.create(c)),this._des3=l.createEncryptor(M.create(f))},encryptBlock:function(s,u){this._des1.encryptBlock(s,u),this._des2.decryptBlock(s,u),this._des3.encryptBlock(s,u)},decryptBlock:function(s,u){this._des3.decryptBlock(s,u),this._des2.encryptBlock(s,u),this._des1.decryptBlock(s,u)},keySize:192/32,ivSize:64/32,blockSize:64/32});v.TripleDES=y._createHelper(o)}(),N.TripleDES})},psGv:function(F,$,j){var N,v;(function(){var O;(function(){"use strict";var S=[,,function(t){function l(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}l.prototype.clone_empty=function(){var o=new l(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},l.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},l.prototype.has_match=function(o){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(o))return!0;return!1},l.prototype.set_indent=function(o,s){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},l.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},l.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},l.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},l.prototype.is_empty=function(){return this.__items.length===0},l.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},l.prototype.push=function(o){this.__items.push(o);var s=o.lastIndexOf(`
`);s!==-1?this.__character_count=o.length-s:this.__character_count+=o.length},l.prototype.pop=function(){var o=null;return this.is_empty()||(o=this.__items.pop(),this.__character_count-=o.length),o},l.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},l.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},l.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},l.prototype.toString=function(){var o="";return this.is_empty()?this.__parent.indent_empty_lines&&(o=this.__parent.get_indent_string(this.__indent_count)):(o=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),o+=this.__items.join("")),o};function r(o,s){this.__cache=[""],this.__indent_size=o.indent_size,this.__indent_string=o.indent_char,o.indent_with_tabs||(this.__indent_string=new Array(o.indent_size+1).join(o.indent_char)),s=s||"",o.indent_level>0&&(s=new Array(o.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}r.prototype.get_indent_size=function(o,s){var u=this.__base_string_length;return s=s||0,o<0&&(u=0),u+=o*this.__indent_size,u+=s,u},r.prototype.get_indent_string=function(o,s){var u=this.__base_string;return s=s||0,o<0&&(o=0,u=""),s+=o*this.__indent_size,this.__ensure_cache(s),u+=this.__cache[s],u},r.prototype.__ensure_cache=function(o){for(;o>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var o=this.__cache.length,s=0,u="";this.__indent_size&&o>=this.__indent_size&&(s=Math.floor(o/this.__indent_size),o-=s*this.__indent_size,u=new Array(s+1).join(this.__indent_string)),o&&(u+=new Array(o+1).join(" ")),this.__cache.push(u)};function i(o,s){this.__indent_cache=new r(o,s),this.raw=!1,this._end_with_newline=o.end_with_newline,this.indent_size=o.indent_size,this.wrap_line_length=o.wrap_line_length,this.indent_empty_lines=o.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new l(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(o,s){return this.__indent_cache.get_indent_string(o,s)},i.prototype.get_indent_size=function(o,s){return this.__indent_cache.get_indent_size(o,s)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(o){return this.is_empty()||!o&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(o){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===`
`&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var u=this.__lines.join(`
`);return o!==`
`&&(u=u.replace(/[\n]/g,o)),u},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.prototype.set_indent=function(o,s){return o=o||0,s=s||0,this.next_line.set_indent(o,s),this.__lines.length>1?(this.current_line.set_indent(o,s),!0):(this.current_line.set_indent(),!1)},i.prototype.add_raw_token=function(o){for(var s=0;s<o.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(o.whitespace_before),this.current_line.push(o.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},i.prototype.add_token=function(o){this.__add_space_before_token(),this.current_line.push(o),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},i.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},i.prototype.remove_indent=function(o){for(var s=this.__lines.length;o<s;)this.__lines[o]._remove_indent(),o++;this.current_line._remove_wrap_indent()},i.prototype.trim=function(o){for(o=o===void 0?!1:o,this.current_line.trim();o&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},i.prototype.just_added_newline=function(){return this.current_line.is_empty()},i.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},i.prototype.ensure_empty_line_above=function(o,s){for(var u=this.__lines.length-2;u>=0;){var a=this.__lines[u];if(a.is_empty())break;if(a.item(0).indexOf(o)!==0&&a.item(-1)!==s){this.__lines.splice(u+1,0,new l(this)),this.previous_line=this.__lines[this.__lines.length-2];break}u--}},t.exports.Output=i},function(t){function l(r,i,o,s){this.type=r,this.text=i,this.comments_before=null,this.newlines=o||0,this.whitespace_before=s||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}t.exports.Token=l},,,function(t){function l(o,s){this.raw_options=r(o,s),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}l.prototype._get_array=function(o,s){var u=this.raw_options[o],a=s||[];return typeof u=="object"?u!==null&&typeof u.concat=="function"&&(a=u.concat()):typeof u=="string"&&(a=u.split(/[^a-zA-Z0-9_\/\-]+/)),a},l.prototype._get_boolean=function(o,s){var u=this.raw_options[o],a=u===void 0?!!s:!!u;return a},l.prototype._get_characters=function(o,s){var u=this.raw_options[o],a=s||"";return typeof u=="string"&&(a=u.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),a},l.prototype._get_number=function(o,s){var u=this.raw_options[o];s=parseInt(s,10),isNaN(s)&&(s=0);var a=parseInt(u,10);return isNaN(a)&&(a=s),a},l.prototype._get_selection=function(o,s,u){var a=this._get_selection_list(o,s,u);if(a.length!==1)throw new Error("Invalid Option Value: The option '"+o+`' can only be one of the following values:
`+s+`
You passed in: '`+this.raw_options[o]+"'");return a[0]},l.prototype._get_selection_list=function(o,s,u){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(u=u||[s[0]],!this._is_valid_selection(u,s))throw new Error("Invalid Default Value!");var a=this._get_array(o,u);if(!this._is_valid_selection(a,s))throw new Error("Invalid Option Value: The option '"+o+`' can contain only the following values:
`+s+`
You passed in: '`+this.raw_options[o]+"'");return a},l.prototype._is_valid_selection=function(o,s){return o.length&&s.length&&!o.some(function(u){return s.indexOf(u)===-1})};function r(o,s){var u={};o=i(o);var a;for(a in o)a!==s&&(u[a]=o[a]);if(s&&o[s])for(a in o[s])u[a]=o[s][a];return u}function i(o){var s={},u;for(u in o){var a=u.replace(/-/g,"_");s[a]=o[u]}return s}t.exports.Options=l,t.exports.normalizeOpts=i,t.exports.mergeOpts=r},,function(t){var l=RegExp.prototype.hasOwnProperty("sticky");function r(i){this.__input=i||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position<this.__input_length},r.prototype.next=function(){var i=null;return this.hasNext()&&(i=this.__input.charAt(this.__position),this.__position+=1),i},r.prototype.peek=function(i){var o=null;return i=i||0,i+=this.__position,i>=0&&i<this.__input_length&&(o=this.__input.charAt(i)),o},r.prototype.__match=function(i,o){i.lastIndex=o;var s=i.exec(this.__input);return s&&!(l&&i.sticky)&&(s.index!==o&&(s=null)),s},r.prototype.test=function(i,o){return o=o||0,o+=this.__position,o>=0&&o<this.__input_length?!!this.__match(i,o):!1},r.prototype.testChar=function(i,o){var s=this.peek(o);return i.lastIndex=0,s!==null&&i.test(s)},r.prototype.match=function(i){var o=this.__match(i,this.__position);return o?this.__position+=o[0].length:o=null,o},r.prototype.read=function(i,o,s){var u="",a;return i&&(a=this.match(i),a&&(u+=a[0])),o&&(a||!i)&&(u+=this.readUntil(o,s)),u},r.prototype.readUntil=function(i,o){var s="",u=this.__position;i.lastIndex=this.__position;var a=i.exec(this.__input);return a?(u=a.index,o&&(u+=a[0].length)):u=this.__input_length,s=this.__input.substring(this.__position,u),this.__position=u,s},r.prototype.readUntilAfter=function(i){return this.readUntil(i,!0)},r.prototype.get_regexp=function(i,o){var s=null,u="g";return o&&l&&(u="y"),typeof i=="string"&&i!==""?s=new RegExp(i,u):i&&(s=new RegExp(i.source,u)),s},r.prototype.get_literal_regexp=function(i){return RegExp(i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},r.prototype.peekUntilAfter=function(i){var o=this.__position,s=this.readUntilAfter(i);return this.__position=o,s},r.prototype.lookBack=function(i){var o=this.__position-1;return o>=i.length&&this.__input.substring(o-i.length,o).toLowerCase()===i},t.exports.InputScanner=r},function(t,l,r){var i=r(8).InputScanner,o=r(3).Token,s=r(10).TokenStream,u=r(11).WhitespacePattern,a={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},c=function(f,w){this._input=new i(f),this._options=w||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new u(this._input)};c.prototype.tokenize=function(){this._input.restart(),this.__tokens=new s,this._reset();for(var f,w=new o(a.START,""),_=null,h=[],R=new s;w.type!==a.EOF;){for(f=this._get_next_token(w,_);this._is_comment(f);)R.add(f),f=this._get_next_token(w,_);R.isEmpty()||(f.comments_before=R,R=new s),f.parent=_,this._is_opening(f)?(h.push(_),_=f):_&&this._is_closing(f,_)&&(f.opened=_,_.closed=f,_=h.pop(),f.parent=_),f.previous=w,w.next=f,this.__tokens.add(f),w=f}return this.__tokens},c.prototype._is_first_token=function(){return this.__tokens.isEmpty()},c.prototype._reset=function(){},c.prototype._get_next_token=function(f,w){this._readWhitespace();var _=this._input.read(/.+/g);return _?this._create_token(a.RAW,_):this._create_token(a.EOF,"")},c.prototype._is_comment=function(f){return!1},c.prototype._is_opening=function(f){return!1},c.prototype._is_closing=function(f,w){return!1},c.prototype._create_token=function(f,w){var _=new o(f,w,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return _},c.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=c,t.exports.TOKEN=a},function(t){function l(r){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=r}l.prototype.restart=function(){this.__position=0},l.prototype.isEmpty=function(){return this.__tokens_length===0},l.prototype.hasNext=function(){return this.__position<this.__tokens_length},l.prototype.next=function(){var r=null;return this.hasNext()&&(r=this.__tokens[this.__position],this.__position+=1),r},l.prototype.peek=function(r){var i=null;return r=r||0,r+=this.__position,r>=0&&r<this.__tokens_length&&(i=this.__tokens[r]),i},l.prototype.add=function(r){this.__parent_token&&(r.parent=this.__parent_token),this.__tokens.push(r),this.__tokens_length+=1},t.exports.TokenStream=l},function(t,l,r){var i=r(12).Pattern;function o(s,u){i.call(this,s,u),u?this._line_regexp=this._input.get_regexp(u._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}o.prototype=new i,o.prototype.__set_whitespace_patterns=function(s,u){s+="\\t ",u+="\\n\\r",this._match_pattern=this._input.get_regexp("["+s+u+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+u+"]")},o.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var s=this._input.read(this._match_pattern);if(s===" ")this.whitespace_before_token=" ";else if(s){var u=this.__split(this._newline_regexp,s);this.newline_count=u.length-1,this.whitespace_before_token=u[this.newline_count]}return s},o.prototype.matching=function(s,u){var a=this._create();return a.__set_whitespace_patterns(s,u),a._update(),a},o.prototype._create=function(){return new o(this._input,this)},o.prototype.__split=function(s,u){s.lastIndex=0;for(var a=0,c=[],f=s.exec(u);f;)c.push(u.substring(a,f.index)),a=f.index+f[0].length,f=s.exec(u);return a<u.length?c.push(u.substring(a,u.length)):c.push(""),c},t.exports.WhitespacePattern=o},function(t){function l(r,i){this._input=r,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,i&&(this._starting_pattern=this._input.get_regexp(i._starting_pattern,!0),this._match_pattern=this._input.get_regexp(i._match_pattern,!0),this._until_pattern=this._input.get_regexp(i._until_pattern),this._until_after=i._until_after)}l.prototype.read=function(){var r=this._input.read(this._starting_pattern);return(!this._starting_pattern||r)&&(r+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),r},l.prototype.read_match=function(){return this._input.match(this._match_pattern)},l.prototype.until_after=function(r){var i=this._create();return i._until_after=!0,i._until_pattern=this._input.get_regexp(r),i._update(),i},l.prototype.until=function(r){var i=this._create();return i._until_after=!1,i._until_pattern=this._input.get_regexp(r),i._update(),i},l.prototype.starting_with=function(r){var i=this._create();return i._starting_pattern=this._input.get_regexp(r,!0),i._update(),i},l.prototype.matching=function(r){var i=this._create();return i._match_pattern=this._input.get_regexp(r,!0),i._update(),i},l.prototype._create=function(){return new l(this._input,this)},l.prototype._update=function(){},t.exports.Pattern=l},function(t){function l(r,i){r=typeof r=="string"?r:r.source,i=typeof i=="string"?i:i.source,this.__directives_block_pattern=new RegExp(r+/ beautify( \w+[:]\w+)+ /.source+i,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(r+/\sbeautify\signore:end\s/.source+i,"g")}l.prototype.get_directives=function(r){if(!r.match(this.__directives_block_pattern))return null;var i={};this.__directive_pattern.lastIndex=0;for(var o=this.__directive_pattern.exec(r);o;)i[o[1]]=o[2],o=this.__directive_pattern.exec(r);return i},l.prototype.readIgnored=function(r){return r.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=l},function(t,l,r){var i=r(12).Pattern,o={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function s(u,a){i.call(this,u,a),this.__template_pattern=null,this._disabled=Object.assign({},o),this._excluded=Object.assign({},o),a&&(this.__template_pattern=this._input.get_regexp(a.__template_pattern),this._excluded=Object.assign(this._excluded,a._excluded),this._disabled=Object.assign(this._disabled,a._disabled));var c=new i(u);this.__patterns={handlebars_comment:c.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:c.starting_with(/{{{/).until_after(/}}}/),handlebars:c.starting_with(/{{/).until_after(/}}/),php:c.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:c.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:c.starting_with(/{%/).until_after(/%}/),django_value:c.starting_with(/{{/).until_after(/}}/),django_comment:c.starting_with(/{#/).until_after(/#}/),smarty:c.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:c.starting_with(/{\*/).until_after(/\*}/),smarty_literal:c.starting_with(/{literal}/).until_after(/{\/literal}/)}}s.prototype=new i,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(u){var a=this._create();return a._disabled[u]=!0,a._update(),a},s.prototype.read_options=function(u){var a=this._create();for(var c in o)a._disabled[c]=u.templating.indexOf(c)===-1;return a._update(),a},s.prototype.exclude=function(u){var a=this._create();return a._excluded[u]=!0,a._update(),a},s.prototype.read=function(){var u="";this._match_pattern?u=this._input.read(this._starting_pattern):u=this._input.read(this._starting_pattern,this.__template_pattern);for(var a=this._read_template();a;)this._match_pattern?a+=this._input.read(this._match_pattern):a+=this._input.readUntil(this.__template_pattern),u+=a,a=this._read_template();return this._until_after&&(u+=this._input.readUntilAfter(this._until_pattern)),u},s.prototype.__set_templated_pattern=function(){var u=[];this._disabled.php||u.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||u.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||u.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(u.push(this.__patterns.django._starting_pattern.source),u.push(this.__patterns.django_value._starting_pattern.source),u.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||u.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&u.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+u.join("|")+")")},s.prototype._read_template=function(){var u="",a=this._input.peek();if(a==="<"){var c=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&c==="?"&&(u=u||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&c==="%"&&(u=u||this.__patterns.erb.read())}else a==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(u=u||this.__patterns.handlebars_comment.read(),u=u||this.__patterns.handlebars_unescaped.read(),u=u||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(u=u||this.__patterns.django_value.read()),this._excluded.django||(u=u||this.__patterns.django_comment.read(),u=u||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(u=u||this.__patterns.smarty_comment.read(),u=u||this.__patterns.smarty_literal.read(),u=u||this.__patterns.smarty.read()));return u},t.exports.TemplatablePattern=s},,,,function(t,l,r){var i=r(19).Beautifier,o=r(20).Options;function s(u,a,c,f){var w=new i(u,a,c,f);return w.beautify()}t.exports=s,t.exports.defaultOptions=function(){return new o}},function(t,l,r){var i=r(20).Options,o=r(2).Output,s=r(21).Tokenizer,u=r(21).TOKEN,a=/\r\n|[\r\n]/,c=/\r\n|[\r\n]/g,f=function(k,L){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=k.max_preserve_newlines,this.preserve_newlines=k.preserve_newlines,this._output=new o(k,L)};f.prototype.current_line_has_match=function(k){return this._output.current_line.has_match(k)},f.prototype.set_space_before_token=function(k,L){this._output.space_before_token=k,this._output.non_breaking_space=L},f.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},f.prototype.add_raw_token=function(k){this._output.add_raw_token(k)},f.prototype.print_preserved_newlines=function(k){var L=0;k.type!==u.TEXT&&k.previous.type!==u.TEXT&&(L=k.newlines?1:0),this.preserve_newlines&&(L=k.newlines<this.max_preserve_newlines+1?k.newlines:this.max_preserve_newlines+1);for(var A=0;A<L;A++)this.print_newline(A>0);return L!==0},f.prototype.traverse_whitespace=function(k){return k.whitespace_before||k.newlines?(this.print_preserved_newlines(k)||(this._output.space_before_token=!0),!0):!1},f.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},f.prototype.print_newline=function(k){this._output.add_new_line(k)},f.prototype.print_token=function(k){k.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(k.text))},f.prototype.indent=function(){this.indent_level++},f.prototype.get_full_indent=function(k){return k=this.indent_level+(k||0),k<1?"":this._output.get_indent_string(k)};var w=function(k){for(var L=null,A=k.next;A.type!==u.EOF&&k.closed!==A;){if(A.type===u.ATTRIBUTE&&A.text==="type"){A.next&&A.next.type===u.EQUALS&&A.next.next&&A.next.next.type===u.VALUE&&(L=A.next.next.text);break}A=A.next}return L},_=function(k,L){var A=null,G=null;return L.closed?(k==="script"?A="text/javascript":k==="style"&&(A="text/css"),A=w(L)||A,A.search("text/css")>-1?G="css":A.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?G="javascript":A.search(/(text|application|dojo)\/(x-)?(html)/)>-1?G="html":A.search(/test\/null/)>-1&&(G="null"),G):null};function h(k,L){return L.indexOf(k)!==-1}function R(k,L,A){this.parent=k||null,this.tag=L?L.tag_name:"",this.indent_level=A||0,this.parser_token=L||null}function C(k){this._printer=k,this._current_frame=null}C.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},C.prototype.record_tag=function(k){var L=new R(this._current_frame,k,this._printer.indent_level);this._current_frame=L},C.prototype._try_pop_frame=function(k){var L=null;return k&&(L=k.parser_token,this._printer.indent_level=k.indent_level,this._current_frame=k.parent),L},C.prototype._get_frame=function(k,L){for(var A=this._current_frame;A&&!(k.indexOf(A.tag)!==-1);){if(L&&L.indexOf(A.tag)!==-1){A=null;break}A=A.parent}return A},C.prototype.try_pop=function(k,L){var A=this._get_frame([k],L);return this._try_pop_frame(A)},C.prototype.indent_to_tag=function(k){var L=this._get_frame(k);L&&(this._printer.indent_level=L.indent_level)};function g(k,L,A,G){this._source_text=k||"",L=L||{},this._js_beautify=A,this._css_beautify=G,this._tag_stack=null;var K=new i(L,"html");this._options=K,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}g.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var k=this._source_text,L=this._options.eol;this._options.eol==="auto"&&(L=`
`,k&&a.test(k)&&(L=k.match(a)[0])),k=k.replace(c,`
`);var A=k.match(/^[\t ]*/)[0],G={text:"",type:""},K=new x,W=new f(this._options,A),z=new s(k,this._options).tokenize();this._tag_stack=new C(W);for(var U=null,P=z.next();P.type!==u.EOF;)P.type===u.TAG_OPEN||P.type===u.COMMENT?(U=this._handle_tag_open(W,P,K,G),K=U):P.type===u.ATTRIBUTE||P.type===u.EQUALS||P.type===u.VALUE||P.type===u.TEXT&&!K.tag_complete?U=this._handle_inside_tag(W,P,K,z):P.type===u.TAG_CLOSE?U=this._handle_tag_close(W,P,K):P.type===u.TEXT?U=this._handle_text(W,P,K):W.add_raw_token(P),G=U,P=z.next();var H=W._output.get_code(L);return H},g.prototype._handle_tag_close=function(k,L,A){var G={text:L.text,type:L.type};return k.alignment_size=0,A.tag_complete=!0,k.set_space_before_token(L.newlines||L.whitespace_before!=="",!0),A.is_unformatted?k.add_raw_token(L):(A.tag_start_char==="<"&&(k.set_space_before_token(L.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&A.has_wrapped_attrs&&k.print_newline(!1)),k.print_token(L)),A.indent_content&&!(A.is_unformatted||A.is_content_unformatted)&&(k.indent(),A.indent_content=!1),!A.is_inline_element&&!(A.is_unformatted||A.is_content_unformatted)&&k.set_wrap_point(),G},g.prototype._handle_inside_tag=function(k,L,A,G){var K=A.has_wrapped_attrs,W={text:L.text,type:L.type};if(k.set_space_before_token(L.newlines||L.whitespace_before!=="",!0),A.is_unformatted)k.add_raw_token(L);else if(A.tag_start_char==="{"&&L.type===u.TEXT)k.print_preserved_newlines(L)?(L.newlines=0,k.add_raw_token(L)):k.print_token(L);else{if(L.type===u.ATTRIBUTE?(k.set_space_before_token(!0),A.attr_count+=1):(L.type===u.EQUALS||L.type===u.VALUE&&L.previous.type===u.EQUALS)&&k.set_space_before_token(!1),L.type===u.ATTRIBUTE&&A.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(k.traverse_whitespace(L),K=K||L.newlines!==0),this._is_wrap_attributes_force)){var z=A.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&A.attr_count===1){var U=!0,P=0,H;do{if(H=G.peek(P),H.type===u.ATTRIBUTE){U=!1;break}P+=1}while(P<4&&H.type!==u.EOF&&H.type!==u.TAG_CLOSE);z=!U}z&&(k.print_newline(!1),K=!0)}k.print_token(L),K=K||k.previous_token_wrapped(),A.has_wrapped_attrs=K}return W},g.prototype._handle_text=function(k,L,A){var G={text:L.text,type:"TK_CONTENT"};return A.custom_beautifier_name?this._print_custom_beatifier_text(k,L,A):A.is_unformatted||A.is_content_unformatted?k.add_raw_token(L):(k.traverse_whitespace(L),k.print_token(L)),G},g.prototype._print_custom_beatifier_text=function(k,L,A){var G=this;if(L.text!==""){var K=L.text,W,z=1,U="",P="";A.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?W=this._js_beautify:A.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?W=this._css_beautify:A.custom_beautifier_name==="html"&&(W=function(he,ae){var xe=new g(he,ae,G._js_beautify,G._css_beautify);return xe.beautify()}),this._options.indent_scripts==="keep"?z=0:this._options.indent_scripts==="separate"&&(z=-k.indent_level);var H=k.get_full_indent(z);if(K=K.replace(/\n[ \t]*$/,""),A.custom_beautifier_name!=="html"&&K[0]==="<"&&K.match(/^(<!--|<!\[CDATA\[)/)){var V=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(K);if(!V){k.add_raw_token(L);return}U=H+V[1]+`
`,K=V[4],V[5]&&(P=H+V[5]),K=K.replace(/\n[ \t]*$/,""),(V[2]||V[3].indexOf(`
`)!==-1)&&(V=V[3].match(/[ \t]+$/),V&&(L.whitespace_before=V[0]))}if(K)if(W){var q=function(){this.eol=`
`};q.prototype=this._options.raw_options;var Z=new q;K=W(H+K,Z)}else{var ce=L.whitespace_before;ce&&(K=K.replace(new RegExp(`
(`+ce+")?","g"),`
`)),K=H+K.replace(/\n/g,`
`+H)}U&&(K?K=U+K+`
`+P:K=U+P),k.print_newline(!1),K&&(L.text=K,L.whitespace_before="",L.newlines=0,k.add_raw_token(L),k.print_newline(!0))}},g.prototype._handle_tag_open=function(k,L,A,G){var K=this._get_tag_open_token(L);return(A.is_unformatted||A.is_content_unformatted)&&!A.is_empty_element&&L.type===u.TAG_OPEN&&L.text.indexOf("</")===0?(k.add_raw_token(L),K.start_tag_token=this._tag_stack.try_pop(K.tag_name)):(k.traverse_whitespace(L),this._set_tag_position(k,L,K,A,G),K.is_inline_element||k.set_wrap_point(),k.print_token(L)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(K.alignment_size=L.text.length+1),!K.tag_complete&&!K.is_unformatted&&(k.alignment_size=K.alignment_size),K};var x=function(k,L){if(this.parent=k||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!L)this.tag_complete=!0;else{var A;this.tag_start_char=L.text[0],this.text=L.text,this.tag_start_char==="<"?(A=L.text.match(/^<([^\s>]*)/),this.tag_check=A?A[1]:""):(A=L.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=A?A[1]:"",(L.text.startsWith("{{#>")||L.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&L.next!==null?this.tag_check=L.next.text.split(" ")[0]:this.tag_check=L.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),L.type===u.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||L.closed&&L.closed.text==="/>";var G=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(G=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(G)))}};g.prototype._get_tag_open_token=function(k){var L=new x(this._tag_stack.get_parser_token(),k);return L.alignment_size=this._options.wrap_attributes_indent_size,L.is_end_tag=L.is_end_tag||h(L.tag_check,this._options.void_elements),L.is_empty_element=L.tag_complete||L.is_start_tag&&L.is_end_tag,L.is_unformatted=!L.tag_complete&&h(L.tag_check,this._options.unformatted),L.is_content_unformatted=!L.is_empty_element&&h(L.tag_check,this._options.content_unformatted),L.is_inline_element=h(L.tag_name,this._options.inline)||L.tag_name.includes("-")||L.tag_start_char==="{",L},g.prototype._set_tag_position=function(k,L,A,G,K){if(A.is_empty_element||(A.is_end_tag?A.start_tag_token=this._tag_stack.try_pop(A.tag_name):(this._do_optional_end_element(A)&&(A.is_inline_element||k.print_newline(!1)),this._tag_stack.record_tag(A),(A.tag_name==="script"||A.tag_name==="style")&&!(A.is_unformatted||A.is_content_unformatted)&&(A.custom_beautifier_name=_(A.tag_check,L)))),h(A.tag_check,this._options.extra_liners)&&(k.print_newline(!1),k._output.just_added_blankline()||k.print_newline(!0)),A.is_empty_element){if(A.tag_start_char==="{"&&A.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),A.indent_content=!0;var W=k.current_line_has_match(/{{#if/);W||k.print_newline(!1)}A.tag_name==="!--"&&K.type===u.TAG_CLOSE&&G.is_end_tag&&A.text.indexOf(`
`)===-1||(A.is_inline_element||A.is_unformatted||k.print_newline(!1),this._calcluate_parent_multiline(k,A))}else if(A.is_end_tag){var z=!1;z=A.start_tag_token&&A.start_tag_token.multiline_content,z=z||!A.is_inline_element&&!(G.is_inline_element||G.is_unformatted)&&!(K.type===u.TAG_CLOSE&&A.start_tag_token===G)&&K.type!=="TK_CONTENT",(A.is_content_unformatted||A.is_unformatted)&&(z=!1),z&&k.print_newline(!1)}else A.indent_content=!A.custom_beautifier_name,A.tag_start_char==="<"&&(A.tag_name==="html"?A.indent_content=this._options.indent_inner_html:A.tag_name==="head"?A.indent_content=this._options.indent_head_inner_html:A.tag_name==="body"&&(A.indent_content=this._options.indent_body_inner_html)),!(A.is_inline_element||A.is_unformatted)&&(K.type!=="TK_CONTENT"||A.is_content_unformatted)&&k.print_newline(!1),this._calcluate_parent_multiline(k,A)},g.prototype._calcluate_parent_multiline=function(k,L){L.parent&&k._output.just_added_newline()&&!((L.is_inline_element||L.is_unformatted)&&L.parent.is_inline_element)&&(L.parent.multiline_content=!0)};var E=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],T=["a","audio","del","ins","map","noscript","video"];g.prototype._do_optional_end_element=function(k){var L=null;if(k.is_empty_element||!k.is_start_tag||!k.parent)return;if(k.tag_name==="body")L=L||this._tag_stack.try_pop("head");else if(k.tag_name==="li")L=L||this._tag_stack.try_pop("li",["ol","ul"]);else if(k.tag_name==="dd"||k.tag_name==="dt")L=L||this._tag_stack.try_pop("dt",["dl"]),L=L||this._tag_stack.try_pop("dd",["dl"]);else if(k.parent.tag_name==="p"&&E.indexOf(k.tag_name)!==-1){var A=k.parent.parent;(!A||T.indexOf(A.tag_name)===-1)&&(L=L||this._tag_stack.try_pop("p"))}else k.tag_name==="rp"||k.tag_name==="rt"?(L=L||this._tag_stack.try_pop("rt",["ruby","rtc"]),L=L||this._tag_stack.try_pop("rp",["ruby","rtc"])):k.tag_name==="optgroup"?L=L||this._tag_stack.try_pop("optgroup",["select"]):k.tag_name==="option"?L=L||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):k.tag_name==="colgroup"?L=L||this._tag_stack.try_pop("caption",["table"]):k.tag_name==="thead"?(L=L||this._tag_stack.try_pop("caption",["table"]),L=L||this._tag_stack.try_pop("colgroup",["table"])):k.tag_name==="tbody"||k.tag_name==="tfoot"?(L=L||this._tag_stack.try_pop("caption",["table"]),L=L||this._tag_stack.try_pop("colgroup",["table"]),L=L||this._tag_stack.try_pop("thead",["table"]),L=L||this._tag_stack.try_pop("tbody",["table"])):k.tag_name==="tr"?(L=L||this._tag_stack.try_pop("caption",["table"]),L=L||this._tag_stack.try_pop("colgroup",["table"]),L=L||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(k.tag_name==="th"||k.tag_name==="td")&&(L=L||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),L=L||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return k.parent=this._tag_stack.get_parser_token(),L},t.exports.Beautifier=g},function(t,l,r){var i=r(6).Options;function o(s){i.call(this,s,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}o.prototype=new i,t.exports.Options=o},function(t,l,r){var i=r(9).Tokenizer,o=r(9).TOKEN,s=r(13).Directives,u=r(14).TemplatablePattern,a=r(12).Pattern,c={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:o.START,RAW:o.RAW,EOF:o.EOF},f=new s(/<\!--/,/-->/),w=function(_,h){i.call(this,_,h),this._current_tag_name="";var R=new u(this._input).read_options(this._options),C=new a(this._input);if(this.__patterns={word:R.until(/[\n\r\t <]/),single_quote:R.until_after(/'/),double_quote:R.until_after(/"/),attribute:R.until(/[\n\r\t =>]|\/>/),element_name:R.until(/[\n\r\t >\/]/),handlebars_comment:C.starting_with(/{{!--/).until_after(/--}}/),handlebars:C.starting_with(/{{/).until_after(/}}/),handlebars_open:C.until(/[\n\r\t }]/),handlebars_raw_close:C.until(/}}/),comment:C.starting_with(/<!--/).until_after(/-->/),cdata:C.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:C.starting_with(/<!\[/).until_after(/]>/),processing:C.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var g=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=C.matching(g).until_after(g)}};w.prototype=new i,w.prototype._is_comment=function(_){return!1},w.prototype._is_opening=function(_){return _.type===c.TAG_OPEN},w.prototype._is_closing=function(_,h){return _.type===c.TAG_CLOSE&&h&&((_.text===">"||_.text==="/>")&&h.text[0]==="<"||_.text==="}}"&&h.text[0]==="{"&&h.text[1]==="{")},w.prototype._reset=function(){this._current_tag_name=""},w.prototype._get_next_token=function(_,h){var R=null;this._readWhitespace();var C=this._input.peek();return C===null?this._create_token(c.EOF,""):(R=R||this._read_open_handlebars(C,h),R=R||this._read_attribute(C,_,h),R=R||this._read_close(C,h),R=R||this._read_raw_content(C,_,h),R=R||this._read_content_word(C),R=R||this._read_comment_or_cdata(C),R=R||this._read_processing(C),R=R||this._read_open(C,h),R=R||this._create_token(c.UNKNOWN,this._input.next()),R)},w.prototype._read_comment_or_cdata=function(_){var h=null,R=null,C=null;if(_==="<"){var g=this._input.peek(1);g==="!"&&(R=this.__patterns.comment.read(),R?(C=f.get_directives(R),C&&C.ignore==="start"&&(R+=f.readIgnored(this._input))):R=this.__patterns.cdata.read()),R&&(h=this._create_token(c.COMMENT,R),h.directives=C)}return h},w.prototype._read_processing=function(_){var h=null,R=null,C=null;if(_==="<"){var g=this._input.peek(1);(g==="!"||g==="?")&&(R=this.__patterns.conditional_comment.read(),R=R||this.__patterns.processing.read()),R&&(h=this._create_token(c.COMMENT,R),h.directives=C)}return h},w.prototype._read_open=function(_,h){var R=null,C=null;return h||_==="<"&&(R=this._input.next(),this._input.peek()==="/"&&(R+=this._input.next()),R+=this.__patterns.element_name.read(),C=this._create_token(c.TAG_OPEN,R)),C},w.prototype._read_open_handlebars=function(_,h){var R=null,C=null;return h||this._options.indent_handlebars&&_==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(R=this.__patterns.handlebars_comment.read(),R=R||this.__patterns.handlebars.read(),C=this._create_token(c.COMMENT,R)):(R=this.__patterns.handlebars_open.read(),C=this._create_token(c.TAG_OPEN,R))),C},w.prototype._read_close=function(_,h){var R=null,C=null;return h&&(h.text[0]==="<"&&(_===">"||_==="/"&&this._input.peek(1)===">")?(R=this._input.next(),_==="/"&&(R+=this._input.next()),C=this._create_token(c.TAG_CLOSE,R)):h.text[0]==="{"&&_==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),C=this._create_token(c.TAG_CLOSE,"}}"))),C},w.prototype._read_attribute=function(_,h,R){var C=null,g="";if(R&&R.text[0]==="<")if(_==="=")C=this._create_token(c.EQUALS,this._input.next());else if(_==='"'||_==="'"){var x=this._input.next();_==='"'?x+=this.__patterns.double_quote.read():x+=this.__patterns.single_quote.read(),C=this._create_token(c.VALUE,x)}else g=this.__patterns.attribute.read(),g&&(h.type===c.EQUALS?C=this._create_token(c.VALUE,g):C=this._create_token(c.ATTRIBUTE,g));return C},w.prototype._is_content_unformatted=function(_){return this._options.void_elements.indexOf(_)===-1&&(this._options.content_unformatted.indexOf(_)!==-1||this._options.unformatted.indexOf(_)!==-1)},w.prototype._read_raw_content=function(_,h,R){var C="";if(R&&R.text[0]==="{")C=this.__patterns.handlebars_raw_close.read();else if(h.type===c.TAG_CLOSE&&h.opened.text[0]==="<"&&h.text[0]!=="/"){var g=h.opened.text.substr(1).toLowerCase();if(g==="script"||g==="style"){var x=this._read_comment_or_cdata(_);if(x)return x.type=c.TEXT,x;C=this._input.readUntil(new RegExp("</"+g+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(g)&&(C=this._input.readUntil(new RegExp("</"+g+"[\\n\\r\\t ]*?>","ig")))}return C?this._create_token(c.TEXT,C):null},w.prototype._read_content_word=function(_){var h="";if(this._options.unformatted_content_delimiter&&(_===this._options.unformatted_content_delimiter[0]&&(h=this.__patterns.unformatted_content_delimiter.read())),h||(h=this.__patterns.word.read()),h)return this._create_token(c.TEXT,h)},t.exports.Tokenizer=w,t.exports.TOKEN=c}],b={};function p(t){var l=b[t];if(l!==void 0)return l.exports;var r=b[t]={exports:{}};return S[t](r,r.exports,p),r.exports}var d=p(18);O=d})();var M=O;if(!0)!(N=[j,j("6UM0"),j("TXwP")],v=function(S){var b=j("6UM0"),p=j("TXwP");return{html_beautify:function(d,t){return M(d,t,b.js_beautify,p.css_beautify)}}}.apply($,N),v!==void 0&&(F.exports=v));else var y,m})()},qBft:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.AnsiX923={pad:function(v,O){var M=v.sigBytes,y=O*4,m=y-M%y,S=M+m-1;v.clamp(),v.words[S>>>2]|=m<<24-S%4*8,v.sigBytes+=m},unpad:function(v){var O=v.words[v.sigBytes-1>>>2]&255;v.sigBytes-=O}},N.pad.Ansix923})},qM6L:function(F,$,j){(function(N,v){F.exports=$=v(j("Ib8C"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.WordArray,y=v.enc,m=y.Utf16=y.Utf16BE={stringify:function(b){for(var p=b.words,d=b.sigBytes,t=[],l=0;l<d;l+=2){var r=p[l>>>2]>>>16-l%4*8&65535;t.push(String.fromCharCode(r))}return t.join("")},parse:function(b){for(var p=b.length,d=[],t=0;t<p;t++)d[t>>>1]|=b.charCodeAt(t)<<16-t%2*16;return M.create(d,p*2)}};y.Utf16LE={stringify:function(b){for(var p=b.words,d=b.sigBytes,t=[],l=0;l<d;l+=2){var r=S(p[l>>>2]>>>16-l%4*8&65535);t.push(String.fromCharCode(r))}return t.join("")},parse:function(b){for(var p=b.length,d=[],t=0;t<p;t++)d[t>>>1]|=S(b.charCodeAt(t)<<16-t%2*16);return M.create(d,p*2)}};function S(b){return b<<8&4278255360|b>>>8&16711935}}(),N.enc.Utf16})},qu8F:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return N.mode.CTRGladman=function(){var v=N.lib.BlockCipherMode.extend();function O(m){if((m>>24&255)===255){var S=m>>16&255,b=m>>8&255,p=m&255;S===255?(S=0,b===255?(b=0,p===255?p=0:++p):++b):++S,m=0,m+=S<<16,m+=b<<8,m+=p}else m+=1<<24;return m}function M(m){return(m[0]=O(m[0]))===0&&(m[1]=O(m[1])),m}var y=v.Encryptor=v.extend({processBlock:function(m,S){var b=this._cipher,p=b.blockSize,d=this._iv,t=this._counter;d&&(t=this._counter=d.slice(0),this._iv=void 0),M(t);var l=t.slice(0);b.encryptBlock(l,0);for(var r=0;r<p;r++)m[S+r]^=l[r]}});return v.Decryptor=y,v}(),N.mode.CTRGladman})},"rAM+":function(F,$,j){"use strict";j.d($,"a",function(){return v});var N=j("Qw5x");function v(O,M){var y;if(typeof Symbol=="undefined"||O[Symbol.iterator]==null){if(Array.isArray(O)||(y=Object(N.a)(O))||M&&O&&typeof O.length=="number"){y&&(O=y);var m=0,S=function(){};return{s:S,n:function(){return m>=O.length?{done:!0}:{done:!1,value:O[m++]}},e:function(l){throw l},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 b=!0,p=!1,d;return{s:function(){y=O[Symbol.iterator]()},n:function(){var l=y.next();return b=l.done,l},e:function(l){p=!0,d=l},f:function(){try{!b&&y.return!=null&&y.return()}finally{if(p)throw d}}}}},rUJ1:function(F,$){const j=/[&<>"']/,N=/[&<>"']/g,v=/[<>"']|&(?!#?\w+;)/,O=/[<>"']|&(?!#?\w+;)/g,M={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},y=C=>M[C];function m(C,g){if(g){if(j.test(C))return C.replace(N,y)}else if(v.test(C))return C.replace(O,y);return C}const S=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function b(C){return C.replace(S,(g,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 p=/(^|[^\[])\^/g;function d(C,g){C=C.source||C,g=g||"";const x={replace:(E,T)=>(T=T.source||T,T=T.replace(p,"$1"),C=C.replace(E,T),x),getRegex:()=>new RegExp(C,g)};return x}const t=/[^\w:]/g,l=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function r(C,g,x){if(C){let E;try{E=decodeURIComponent(b(x)).replace(t,"").toLowerCase()}catch(T){return null}if(E.indexOf("javascript:")===0||E.indexOf("vbscript:")===0||E.indexOf("data:")===0)return null}g&&!l.test(x)&&(x=a(g,x));try{x=encodeURI(x).replace(/%25/g,"%")}catch(E){return null}return x}const i={},o=/^[^:]+:\/*[^/]*$/,s=/^([^:]+:)[\s\S]*$/,u=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(C,g){i[" "+C]||(o.test(C)?i[" "+C]=C+"/":i[" "+C]=_(C,"/",!0)),C=i[" "+C];const x=C.indexOf(":")===-1;return g.substring(0,2)==="//"?x?g:C.replace(s,"$1")+g:g.charAt(0)==="/"?x?g:C.replace(u,"$1")+g:C+g}const c={exec:function(){}};function f(C){let g=1,x,E;for(;g<arguments.length;g++){x=arguments[g];for(E in x)Object.prototype.hasOwnProperty.call(x,E)&&(C[E]=x[E])}return C}function w(C,g){const x=C.replace(/\|/g,(k,L,A)=>{let G=!1,K=L;for(;--K>=0&&A[K]==="\\";)G=!G;return G?"|":" |"}),E=x.split(/ \|/);let T=0;if(E.length>g)E.splice(g);else for(;E.length<g;)E.push("");for(;T<E.length;T++)E[T]=E[T].trim().replace(/\\\|/g,"|");return E}function _(C,g,x){const E=C.length;if(E===0)return"";let T=0;for(;T<E;){const k=C.charAt(E-T-1);if(k===g&&!x)T++;else if(k!==g&&x)T++;else break}return C.substr(0,E-T)}function h(C,g){if(C.indexOf(g[1])===-1)return-1;const x=C.length;let E=0,T=0;for(;T<x;T++)if(C[T]==="\\")T++;else if(C[T]===g[0])E++;else if(C[T]===g[1]&&(E--,E<0))return T;return-1}function R(C){C&&C.sanitize&&!C.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")}F.exports={escape:m,unescape:b,edit:d,cleanUrl:r,resolveUrl:a,noopTest:c,merge:f,splitCells:w,rtrim:_,findClosingBracket:h,checkSanitizeDeprecation:R}},rWjI:function(F,$,j){"use strict";j.r($),j.d($,"Types",function(){return dt});var N=j("P2fV"),v=j("NJEC"),O=j("CiB2"),M=j("DYRE"),y=j("zeV3"),m=j("sRBo"),S=j("kaz8"),b=j("7Kak"),p=j("9yH6"),d=j("giR+"),t=j("fyUT"),l=j("OaEy"),r=j("2fM7"),i=j("oBTY"),o=j("rAM+"),s=j("T2oS"),u=j("W9HT"),a=j("g9YV"),c=j("wCAj"),f=j("+L6B"),w=j("2/Rp"),_=j("14J3"),h=j("BMrR"),R=j("jCWc"),C=j("kPKH"),g=j("miYZ"),x=j("tsqr"),E=j("9og8"),T=j("y8nQ"),k=j("Vl3Y"),L=j("tJVT"),A=j("k1fw"),G=j("fu2T"),K=j("gK9i"),W=j("2qtc"),z=j("kLXV"),U=j("5NDa"),P=j("5rEg"),H=j("WmNS"),V=j.n(H),q=j("cDcd"),Z=j.n(q),ce=j("eRFJ"),he=j.n(ce),ae=j("jrin"),xe,ge=r.a.Option,oe;(function(yt){yt[yt.language=0]="language",yt[yt.difficulty=1]="difficulty",yt[yt.category=2]="category",yt[yt.openOrNot=3]="openOrNot"})(oe||(oe={}));var se=(xe={},Object(ae.a)(xe,oe.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(ae.a)(xe,oe.difficulty,[{title:"\u7B80\u5355",key:1},{title:"\u9002\u4E2D",key:2},{title:"\u56F0\u96BE",key:3}]),Object(ae.a)(xe,oe.category,[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}]),Object(ae.a)(xe,oe.openOrNot,[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]),xe);function te(yt){return se[yt].map(function(St){return Z.a.createElement(ge,{key:St.title,value:St.key}," ",St.title," ")})}function be(yt,St){yt.map(function(vt){var yr=vt.id,Tr=vt.name,Bt=vt.sub_disciplines,Rt={value:yr,label:Tr};St.push(Rt),Bt&&Bt.length>0&&(Rt.children=[],be(Bt,Rt.children))})}function ee(yt,St){for(var vt=[],yr=0;yr<yt.length;yr++){var Tr,Bt=yt[yr];if(((Tr=Bt.sub_disciplines)===null||Tr===void 0?void 0:Tr.length)>0){vt[0]=Bt.id;for(var Rt=0;Rt<Bt.sub_disciplines.length;Rt++){var br=Bt.sub_disciplines[Rt];if(br.id===St)return vt[1]=br.id,[vt,br.tag_disciplines||br.sub_disciplines||[]]}}}return[vt,[]]}var ie=j("Ty5D"),Ee=j("9kvl"),ne=j("J66h"),J=j("GIiI"),X=j("2BaD"),Q=j("Ot1p"),me=j("ErOA");function fe(yt){return Object(me.f)("practices.json",yt)}function Te(){return Object(me.c)("problems/new.json")}function ze(yt){return Object(me.c)("practices/".concat(yt,"/edit.json"))}function Je(yt,St){return Object(me.g)("practices/".concat(yt),St)}function qe(yt,St){return Object(me.f)("exercises/".concat(yt,"/exercise_questions.json"),St)}function Xe(yt,St){return Object(me.g)("exercise_questions/".concat(yt,".json"),St)}var et=j("cDPC"),rt=j("bbsP"),Le=j("/wGt"),Oe=j("0Owb"),Ve=j("ZW9T"),Ze=j("ZD9Y"),Ne=j("M8RZ"),Ge=j("bCnd"),De=j("1T2W"),we=j.n(De),Ae={theme:Object(Ge.a)("cmCodeMode","vs-dark"),fontSize:Object(Ge.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(Ge.a)("cmTabToSpace",!0)},de;(function(yt){yt[yt.set_font_size=0]="set_font_size",yt[yt.set_theme=1]="set_theme",yt[yt.on_tab_to_space=2]="on_tab_to_space",yt[yt.set_show_editor_setting=3]="set_show_editor_setting"})(de||(de={}));function _e(yt,St){switch(St.type){case de.set_show_editor_setting:return Object(A.a)(Object(A.a)({},yt),{},{showEditorSetting:St.payload});case de.set_theme:return Object(A.a)(Object(A.a)({},yt),{},{theme:St.payload});case de.set_font_size:return Object(A.a)(Object(A.a)({},yt),{},{fontSize:St.payload});case de.on_tab_to_space:return Object(A.a)(Object(A.a)({},yt),{},{tabToSpace:St.payload});default:throw new Error}}var Se=function(yt){var St=yt.value,vt=yt.onChange,yr=yt.language,Tr=yt.onLanguage,Bt=yt.languageItems,Rt=yt.ActionBarRender,br=Rt===void 0?function(kr){return Z.a.createElement(Ie,{languageItems:Bt,onLanguage:Tr,language:yr,onShowCodeSetting:kr})}:Rt,$r=Object(q.useReducer)(_e,Ae),Cr=Object(L.a)($r,2),ut=Cr[0],It=Cr[1],Br=ut.theme,Vr=ut.fontSize,An=ut.showEditorSetting,fn=ut.tabToSpace;console.log(St,yr,"value");var zr={onFontSizeChange:function(mr){It({type:de.set_font_size,payload:mr}),Object(Ge.b)("cmFontSize",mr)},tabToSpace:fn,cmFontSize:Vr,className:"oj",cmCodeMode:Br,onTabToSpace:function(mr){It({type:de.on_tab_to_space,payload:mr}),Object(Ge.b)("cmTabToSpace",mr)},onCodeModeChange:function(mr){It({type:de.set_theme,payload:mr}),Object(Ge.b)("cmCodeMode",mr)}};function Dt(){It({type:de.set_show_editor_setting,payload:!1})}function dn(){It({type:de.set_show_editor_setting,payload:!0})}var ct={value:St,language:yr,onChange:vt,theme:Br,height:"calc(100% - 56px)",options:{fontSize:Vr,insertSpaces:fn}};return Z.a.createElement(q.Fragment,null,Z.a.createElement("div",{className:we.a["code-panel-container"]},br(dn),Z.a.createElement(Ve.b,Object(Oe.a)({key:yr},ct))),Z.a.createElement(Ne.a,null,Z.a.createElement(Le.a,{className:"oj",title:null,placement:"right",closable:!1,visible:An,onClose:Dt},Z.a.createElement(Ze.a,zr))))};function Ie(yt){var St=yt.languageItems,vt=yt.language,yr=yt.onShowCodeSetting,Tr=yt.onLanguage;return Z.a.createElement("div",{className:we.a["action-oj-bar"]},St==null?void 0:St.map(function(Bt){return Z.a.createElement("div",{className:vt===(Bt==null?void 0:Bt.language)?we.a.active:"",onClick:function(){return Tr(Bt==null?void 0:Bt.language)},key:Bt==null?void 0:Bt.language},Bt==null?void 0:Bt.language)}),Z.a.createElement("a",{onClick:yr},Z.a.createElement("i",{className:"iconfont icon-shezhi"})))}var ke=j("Znn+"),Ye=j("ZTPi"),nt=j("L9qf"),lt=j.n(nt),at=function(St){var vt=St.visible,yr=St.onOK,Tr=St.onCancel,Bt=Object(q.useState)(!1),Rt=Object(L.a)(Bt,2),br=Rt[0],$r=Rt[1],Cr=Object(q.useState)(!1),ut=Object(L.a)(Cr,2),It=ut[0],Br=ut[1],Vr=Object(q.useState)("1"),An=Object(L.a)(Vr,2),fn=An[0],zr=An[1],Dt=Object(q.useState)(""),dn=Object(L.a)(Dt,2),ct=dn[0],kr=dn[1],mr=Object(q.useState)([]),ei=Object(L.a)(mr,2),Tn=ei[0],bn=ei[1],di=function(){var Wr=Object(E.a)(V.a.mark(function lr(){var nn;return V.a.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:if(ct){Kt.next=3;break}return x.b.warn("\u9898\u76EE".concat(hn,"\u4E0D\u80FD\u4E3A\u7A7A")),Kt.abrupt("return");case 3:return Br(!0),Kt.next=6,Object(me.a)("/api/tag_disciplines.json",{method:"post",body:{target:vt,name:ct}});case 6:if(nn=Kt.sent,!((nn==null?void 0:nn.status)===0)){Kt.next=10;break}return yr(),Kt.abrupt("return");case 10:Br(!1);case 11:case"end":return Kt.stop()}},lr)}));return function(){return Wr.apply(this,arguments)}}(),ti=function(){var Wr=Object(E.a)(V.a.mark(function lr(){var nn,qt,Kt=arguments;return V.a.wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:return nn=Kt.length>0&&Kt[0]!==void 0?Kt[0]:"",$r(!0),Sr.next=4,Object(me.a)("/api/tag_disciplines.json",{method:"get",params:{target:vt,search:nn}});case 4:qt=Sr.sent,bn(qt.tag_disciplines||[]),$r(!1);case 7:case"end":return Sr.stop()}},lr)}));return function(){return Wr.apply(this,arguments)}}(),sn=function(lr){var nn=lr.name;z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:Z.a.createElement("div",null,Z.a.createElement(P.a,{defaultValue:nn,placeholder:"\u8BF7\u8F93\u5165".concat(hn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20,onChange:function(Kt){nn=Kt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var qt=Object(E.a)(V.a.mark(function er(){var Sr;return V.a.wrap(function(Gr){for(;;)switch(Gr.prev=Gr.next){case 0:if(nn){Gr.next=3;break}return x.b.warn("\u9898\u76EE".concat(hn,"\u4E0D\u80FD\u4E3A\u7A7A")),Gr.abrupt("return",Promise.reject());case 3:return Gr.next=5,Object(me.a)("/api/tag_disciplines/".concat(lr.id,"/rename.json"),{method:"post",body:{id:lr.id,name:nn}});case 5:Sr=Gr.sent,(Sr==null?void 0:Sr.status)===0&&ti();case 7:case"end":return Gr.stop()}},er)}));function Kt(){return qt.apply(this,arguments)}return Kt}()})},Hr=function(lr){z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:vt==="practice"?Z.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",Z.a.createElement("span",{className:"c-light-primary"},lr.name),"\u201D\u5220\u9664\u5417\uFF1F",Z.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):Z.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",Z.a.createElement("span",{className:"c-light-primary"},lr.name),"\u201D\u5220\u9664\u5417\uFF1F",Z.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u77E5\u8BC6\u70B9\u8FDB\u884C\u6E05\u9664\u3002"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var nn=Object(E.a)(V.a.mark(function Kt(){var er;return V.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:return jr.next=2,Object(me.a)("/api/tag_disciplines/".concat(lr.id,".json"),{method:"delete",body:{id:lr.id}});case 2:er=jr.sent,(er==null?void 0:er.status)===0&&ti();case 4:case"end":return jr.stop()}},Kt)}));function qt(){return nn.apply(this,arguments)}return qt}()})},fi=function(lr){ti(lr)},hn=vt==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return Z.a.createElement(z.a,{afterClose:function(){Br(!1),$r(!1),kr(""),zr("1"),bn([])},centered:!0,keyboard:!1,width:600,title:"".concat(hn,"\u7BA1\u7406"),visible:!!vt,className:lt.a.customModal,footer:null,onCancel:Tr},Z.a.createElement("section",{className:lt.a.wrap},Z.a.createElement(Ye.a,{activeKey:fn,onChange:function(lr){kr(""),zr(lr),ti()}},Z.a.createElement(Ye.a.TabPane,{tab:"\u65B0\u589E".concat(hn),key:"1"},Z.a.createElement(P.a,{value:ct,onChange:function(lr){return kr(lr.target.value)},className:lt.a.in,placeholder:"\u8F93\u5165".concat(hn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20}),Z.a.createElement("div",{className:lt.a.btns},Z.a.createElement(w.a,{onClick:Tr,className:"mr20"},"\u53D6\u6D88 "),Z.a.createElement(w.a,{loading:It,onClick:di,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),Z.a.createElement(Ye.a.TabPane,{tab:"\u5DF2\u6709".concat(hn),key:"2"},Z.a.createElement(P.a.Search,{allowClear:!0,onSearch:fi,value:ct,onChange:function(lr){return kr(lr.target.value)},className:lt.a.in,placeholder:"\u8F93\u5165".concat(hn,"\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2")}),Z.a.createElement(c.a,{dataSource:Tn,bordered:!1,loading:br,scroll:Tn.length>7?{y:300}:{},style:{padding:"0 40px 20px 40px"},columns:[{title:"".concat(hn,"\u540D\u79F0"),dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:function(lr,nn){return Z.a.createElement("span",null,Z.a.createElement("span",{onClick:function(){return sn(nn)},className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),Z.a.createElement("span",{onClick:function(){return Hr(nn)},className:"current c-grey-666"},"\u5220\u9664"))}}],pagination:!1})))))},ot=at,Ct=j("m3rI"),bt=j("B7Ph"),ft=j("wd/R"),jt=j.n(ft),Pt=j("1vsH"),Xt=j("9Bee"),Qt=j("xKgJ"),kt=P.a.TextArea,Et=z.a.confirm,Vt=K.a.Panel,pt={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0},dt;(function(yt){yt[yt.SET_INITAL_DATA=0]="SET_INITAL_DATA",yt[yt.SET_LOADING=1]="SET_LOADING",yt[yt.SET_STATUS=2]="SET_STATUS"})(dt||(dt={}));var At="#### \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 Mt(yt,St){switch(St.type){case dt.SET_INITAL_DATA:return Object(A.a)(Object(A.a)({},yt),St.payload);case dt.SET_LOADING:return Object(A.a)(Object(A.a)({},yt),{},{loading:St.payload});case dt.SET_STATUS:return Object(A.a)(Object(A.a)({},yt),{},{status:St.payload});default:throw new Error}}var rr=$.default=function(){var yt,St,vt,yr=Object(ie.h)(),Tr=Object(ie.g)(),Bt=Object(ie.i)(),Rt=Bt.id,br=k.a.useForm(),$r=Object(L.a)(br,1),Cr=$r[0],ut=Object(q.useState)(),It=Object(L.a)(ut,2),Br=It[0],Vr=It[1],An=Object(q.useState)(!1),fn=Object(L.a)(An,2),zr=fn[0],Dt=fn[1],dn=Object(q.useState)([]),ct=Object(L.a)(dn,2),kr=ct[0],mr=ct[1],ei=Object(q.useState)([]),Tn=Object(L.a)(ei,2),bn=Tn[0],di=Tn[1],ti=Object(q.useState)([]),sn=Object(L.a)(ti,2),Hr=sn[0],fi=sn[1],hn=Object(q.useState)([]),Wr=Object(L.a)(hn,2),lr=Wr[0],nn=Wr[1],qt=Object(q.useState)([]),Kt=Object(L.a)(qt,2),er=Kt[0],Sr=Kt[1],jr=Object(q.useState)("C"),Gr=Object(L.a)(jr,2),_n=Gr[0],la=Gr[1],Yi=Object(q.useReducer)(Mt,pt),$i=Object(L.a)(Yi,2),Oi=$i[0],pn=$i[1],Ki=Oi.loading,Zr=Oi.data,ri=Oi.user,Mn=Oi.status,ln=Zr==null?void 0:Zr.hack_sets,Sn=Zr==null||((yt=Zr.hack)===null||yt===void 0)?void 0:yt.test_set_average,hi=Object(q.useState)(!1),Kn=Object(L.a)(hi,2),zn=Kn[0],Li=Kn[1],Mi=Object(q.useRef)([]),Gn=Object(q.useState)(!1),Ni=Object(L.a)(Gn,2),pi=Ni[0],mi=Ni[1],Xn=Object(q.useState)(!1),Vn=Object(L.a)(Xn,2),ki=Vn[0],ni=Vn[1],gi=Object(q.useRef)(!0),ji=Object(q.useState)({}),ii=Object(L.a)(ji,2),Pr=ii[0],Nt=ii[1];Object(q.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(q.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)});var Yt=function(){var $t=Object(E.a)(V.a.mark(function Ot(){var tr,ir;return V.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,Object(me.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}});case 2:return tr=hr.sent,hr.next=5,Object(me.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});case 5:ir=hr.sent,di(tr.tag_disciplines||[]),fi(ir.tag_disciplines||[]);case 8:case"end":return hr.stop()}},Ot)}));return function(){return $t.apply(this,arguments)}}(),Ut=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}],nr=Object(q.useCallback)(Object(E.a)(V.a.mark(function $t(){var Ot,tr,ir,Fr,hr,mn,an,Ci,In,kn,Bn,Xi,Re,Be,Ke,Me,pe,Ce,ye,Pe,Fe,We,He,$e,it,gt,mt;return V.a.wrap(function(Wt){for(;;)switch(Wt.prev=Wt.next){case 0:if(pn({type:dt.SET_LOADING,payload:!0}),!Rt){Wt.next=19;break}return Wt.next=4,ze(Rt);case 4:Ot=Wt.sent,tr=Ot.user,ir=Ot.language,Fr=Ot.practice_sets,hr=Ot.practice_codes,mn=Ot.description,an=Ot.difficulty,Ci=Ot.name,In=Ot.open_or_not,kn=Ot.time_limit,Bn=Ot.test_set_average,Xi=Ot.test_set_score,Re=Ot.status,Be=Ot.tag_discipline_ids,Ke=Ot.source_discipline_ids,Me=Ot.item_banks_group_id,pe=Ot.is_file,Ce=pe===void 0?!1:pe,ye=Ot.hide_actual_output,Pe=Ot.review_privilege,Fe=Ot.review_description,We={review_privilege:Pe,status:Re,review_description:Fe,name:Ci},Nt(We),Li(ye),He=Ce?[{input:"",output:"",score:100,position:1}]:Fr,Ce?(mr(Fr),Cr.setFieldsValue({hack_sets:He})):mr([]),$e={loading:!0,user:tr,status:Re,data:{hack:{difficulty:an,name:Ci,description:mn,open_or_not:In,time_limit:kn,test_set_average:Bn,test_set_score:Xi,tag_discipline_ids:Be,source_discipline_ids:Ke,is_file:Ce},hack_sets:He}},pn({type:dt.SET_INITAL_DATA,payload:$e}),Vr({hack:{difficulty:an,name:Ci,description:mn,open_or_not:In,time_limit:kn,test_set_average:Bn,test_set_score:Xi,tag_discipline_ids:Be,source_discipline_ids:Ke,is_file:Ce}}),it=hr==null?void 0:hr.map(function(ar){return Object(A.a)(Object(A.a)({},ar),{},{code:ne.Base64.decode(ar==null?void 0:ar.code)})}),Sr(it),Mi.current=it,Wt.next=27;break;case 19:return Wt.next=21,Te();case 21:gt=Wt.sent,mt=gt.user,pn({type:dt.SET_INITAL_DATA,payload:{loading:!0,status:0,user:mt,data:{hack:{difficulty:"",time_limit:3,description:At,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),Vr({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),Sr(Ut),Mi.current=Ut;case 27:pn({type:dt.SET_LOADING,payload:!1});case 28:case"end":return Wt.stop()}},$t)})),[Rt]);Object(q.useEffect)(function(){try{nr(),Yt()}catch($t){console.log($t,"----")}},[]);function gr($t,Ot){return Rr.apply(this,arguments)}function Rr(){return Rr=Object(E.a)(V.a.mark(function $t(Ot,tr){var ir,Fr,hr,mn,an,Ci,In,kn,Bn,Xi,Re,Be,Ke,Me,pe,Ce,ye,Pe;return V.a.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:Fr=Object(A.a)({},Ot),hr=Fr.hack_sets,mn=Fr.hack,mn.hide_actual_output=zn,an=[],Ci=[],In=0,kn=mn!=null&&mn.is_file?kr.map(function(He,$e){return Object(A.a)(Object(A.a)({},He),{},{position:$e+1})}):hr.map(function(He){return Object(A.a)(Object(A.a)({},He),{},{is_file:!1})}),Bn=Object(o.a)(kn);try{for(Bn.s();!(Xi=Bn.n()).done;)Re=Xi.value,In+=Re.score,Re.id&&Re.id>=0?an.push(Re):Ci.push(Re)}catch(He){Bn.e(He)}finally{Bn.f()}if(kn!=null&&kn.length){We.next=11;break}return x.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),We.abrupt("return");case 11:if(!(In!==100&&!mn.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(!(kn!=null&&kn.some(function(He){return!He.output}))){We.next=17;break}return x.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),We.abrupt("return");case 17:if(gi.current?mi(!0):ni(!0),Ke=er==null?void 0:er.map(function(He){return Object(A.a)(Object(A.a)({},He),{},{code:ne.Base64.encode(He==null?void 0:He.code)})}),!Rt){We.next=25;break}return We.next=22,Je(Rt,{practice:mn,practice_codes:Ke,practice_sets:Ci,update_practice_sets:an});case 22:Be=We.sent,We.next=28;break;case 25:return We.next=27,fe({practice:mn,practice_codes:Ke,practice_sets:kn,publish:!gi.current});case 27:Be=We.sent;case 28:if(mi(!1),ni(!1),!(((ir=Be)===null||ir===void 0?void 0:ir.status)===0)){We.next=46;break}if(!((Me=Be)!==null&&Me!==void 0&&(pe=Me.similar_practice)!==null&&pe!==void 0&&pe.length)){We.next=35;break}return Dt(!0),nn((Ce=Be)===null||Ce===void 0?void 0:Ce.similar_practice),We.abrupt("return");case 35:if(!Rt){We.next=44;break}if(x.b.success("\u4FDD\u5B58\u6210\u529F"),gi.current){We.next=42;break}return We.next=40,Object(me.a)("/api/practices/".concat(Rt,"/start"),{method:"get"});case 40:ye=We.sent,(ye==null?void 0:ye.status)===0&&Tr.push("/problems/".concat(ye==null?void 0:ye.identifier,"/oj/").concat(Rt));case 42:We.next=46;break;case 44:x.b.success("\u65B0\u5EFA\u6210\u529F"),Tr.replace("/problems/".concat((Pe=Be)===null||Pe===void 0?void 0:Pe.identifier,"/ojedit"));case 46:case"end":return We.stop()}},$t)})),Rr.apply(this,arguments)}function dr(){Tr.replace("/problems")}var qr=function(Ot){var tr=Math.floor(100/Ot.length),ir=tr+100%Ot.length;Ot=Ot.map(function(Fr,hr){return hr===Ot.length-1?Object(A.a)(Object(A.a)({},Fr),{},{score:ir}):Object(A.a)(Object(A.a)({},Fr),{},{score:tr})}),mr(Ot)};function Un($t){$t.target.value||qr(kr),pn({type:dt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack:Object(A.a)(Object(A.a)({},Zr.hack),{},{test_set_score:$t.target.value})})}})}function sr($t){pn({type:dt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack:Object(A.a)(Object(A.a)({},Zr.hack),{},{is_file:$t.target.value})})}})}function vi($t){Li($t.target.checked)}function Ir($t){var Ot=$t.target.value;Ot&&qr(kr),pn({type:dt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack:Object(A.a)(Object(A.a)({},Zr.hack),{},{test_set_average:Ot})})}})}function On(){var $t=Cr.getFieldValue("hack_sets"),Ot=$t.length+1,tr=Math.floor(100/Ot),ir=100%Ot;$t.map(function(Fr,hr){return Sn&&(Fr.score=tr),Fr.position=hr+1,Fr}),$t.push({input:"",output:"",position:Ot,score:Sn?tr+ir:0}),Cr.setFieldsValue({hack_sets:$t}),pn({type:dt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack_sets:$t})}})}Object(q.useEffect)(function(){if(Sn){var $t=ln==null?void 0:ln.length,Ot=Math.floor(100/$t),tr=100%$t;ln==null||ln.map(function(ir,Fr){return ir.score=Ot,ir.position=Fr+1,Fr===$t-1&&(ir.score=Ot+tr),ir}),pn({type:dt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack_sets:ln})}}),Cr.setFieldsValue({hack_sets:ln})}},[Sn]);function Rn($t){var Ot=Cr.getFieldValue("hack_sets"),tr=(Ot==null?void 0:Ot.length)-1,ir=Math.ceil(100/tr),Fr=100%tr;Ot.splice($t,1),Ot==null||Ot.map(function(hr,mn){return Sn&&(hr.score=ir,mn===tr-1&&(hr.score=ir+Fr)),hr.position=mn+1,hr}),pn({type:dt.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack_sets:Ot})}}),Cr.setFieldsValue({hack_sets:Ot})}function li($t){la($t)}var ua=function(Ot){var tr,ir=(tr=Mi.current)===null||tr===void 0?void 0:tr.findIndex(function(Fr){return Fr.language===_n});Mi.current[ir].code=Ot,Sr(Mi.current)},Dr=function(Ot){Vr(Object(A.a)({},Cr.getFieldsValue()))},_r=function(){var $t=Object(E.a)(V.a.mark(function Ot(tr){var ir;return V.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,Object(me.a)("/api/practices/".concat(tr,"/start"),{method:"get"});case 2:ir=hr.sent,(ir==null?void 0:ir.status)===0&&Object(Pt.U)("/problems/".concat(ir==null?void 0:ir.identifier,"/oj/").concat(tr));case 4:case"end":return hr.stop()}},Ot)}));return function(tr){return $t.apply(this,arguments)}}(),fr=function(){var $t=Object(E.a)(V.a.mark(function Ot(){var tr,ir,Fr,hr,mn,an;return V.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,ze(Rt);case 2:tr=In.sent,ir=tr.name,Fr=tr.status,hr=tr.review_privilege,mn=tr.review_description,an={review_privilege:hr,status:Fr,review_description:mn,name:ir},Nt(an);case 6:case"end":return In.stop()}},Ot)}));return function(){return $t.apply(this,arguments)}}(),ai=function(){var Ot="";z.a.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:Z.a.createElement("div",{className:"mt20"},Z.a.createElement(Q.a,{className:he.a.MdEditor,defaultValue:Ot,onChange:function(ir){Ot=ir}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var tr=Object(E.a)(V.a.mark(function Fr(){var hr;return V.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:if(Ot){an.next=3;break}return x.b.warn("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),an.abrupt("return",Promise.reject());case 3:return an.next=5,Object(me.a)("/api/practices/".concat(Rt,"/review.json"),{method:"post",body:{op:"fail",description:Ot}});case 5:hr=an.sent,(hr==null?void 0:hr.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),fr());case 7:case"end":return an.stop()}},Fr)}));function ir(){return tr.apply(this,arguments)}return ir}()})},zi=function(){var $t=Object(E.a)(V.a.mark(function Ot(){return V.a.wrap(function(ir){for(;;)switch(ir.prev=ir.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(Pr==null?void 0:Pr.name,"\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Fr=Object(E.a)(V.a.mark(function mn(){var an;return V.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,Object(me.a)("/api/practices/".concat(Rt,"/review.json"),{method:"post",body:{op:"pass"}});case 2:an=In.sent,(an==null?void 0:an.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),fr());case 4:case"end":return In.stop()}},mn)}));function hr(){return Fr.apply(this,arguments)}return hr}()});case 1:case"end":return ir.stop()}},Ot)}));return function(){return $t.apply(this,arguments)}}(),Gi=function(){var Ot=z.a.confirm({icon:null,width:700,className:"".concat(he.a.cusModal," custom-modal-divider"),centered:!0,title:Z.a.createElement(h.a,null,Z.a.createElement(C.a,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),Z.a.createElement(C.a,null,Z.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return Ot.destroy()}}))),content:Z.a.createElement("div",null,Z.a.createElement(Xt.a,{className:"mt20",value:(Pr==null?void 0:Pr.review_description)||""}))})};return Z.a.createElement(u.a,{spinning:Ki,size:"large",className:he.a["oj-custom-large-spin"]},Zr?Z.a.createElement(q.Fragment,null,Z.a.createElement("header",{className:he.a.header},Z.a.createElement("div",null,Z.a.createElement("img",{src:"".concat(Ct.a.IMG_SERVER,"/images/").concat(ri==null?void 0:ri.image_url),alt:"user",width:30}),Z.a.createElement("span",null,ri==null?void 0:ri.name)),Z.a.createElement("h2",null," ",Zr==null||((St=Zr.hack)===null||St===void 0)?void 0:St.name," "),Rt?Z.a.createElement("a",{className:he.a.btn_back,onClick:dr}," ",Z.a.createElement(J.a,null),"\u9000\u51FA"):null),Z.a.createElement(k.a,{form:Cr,initialValues:Zr,layout:"vertical",className:he.a["oj-form-container"],onValuesChange:Dr,onFinish:gr},Z.a.createElement(et.a,{hideResize:!0,className:he.a["oj-problems"],leftChild:Z.a.createElement(Fn,{formValue:Br,onRemoveTestCase:Rn,onAddTestCase:On,hack:Zr.hack,onChangeScore:Un,onChangehide:vi,onChangeAverage:Ir,onChangeFile:sr,uploadData:kr,setUploadData:mr,handleUploadRatio:qr,ischecked:zn,pointData:bn,sourceData:Hr,getPointData:Yt}),rightChild:Z.a.createElement(Se,{value:er==null||((vt=er.find(function($t){return $t.language===_n}))===null||vt===void 0)?void 0:vt.code,onChange:ua,onLanguage:li,languageItems:er,language:_n})}),Z.a.createElement("div",{className:he.a.footer},!!Rt&&Z.a.createElement("div",{className:he.a.result},Z.a.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),Pr!=null&&Pr.review_privilege?Z.a.createElement(Z.a.Fragment,null,Z.a.createElement("div",{onClick:zi,className:he.a.pass},"\u901A\u8FC7"),Z.a.createElement("div",{onClick:ai,className:he.a.noPass},"\u4E0D\u901A\u8FC7")):Z.a.createElement(Z.a.Fragment,null,(Pr==null?void 0:Pr.status)===0&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(Pr==null?void 0:Pr.status)===1&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(Pr==null?void 0:Pr.status)===2&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(Pr==null?void 0:Pr.status)===3&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(Pr==null?void 0:Pr.status)===4&&Z.a.createElement("div",{className:he.a.passText},Z.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(Pr==null?void 0:Pr.status)===5&&Z.a.createElement("div",{className:he.a.noPassText},Z.a.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",Z.a.createElement("span",{onClick:Gi},"\u67E5\u770B\u539F\u56E0")))),Z.a.createElement(w.a,{type:"primary",ghost:!0,onClick:dr},"\u9000\u51FA\u7F16\u8F91"),Z.a.createElement(w.a,{disabled:ki,loading:pi,type:"primary",onClick:function(){gi.current=!0,Cr.submit()}},"\u4FDD\u5B58 "),Rt?Z.a.createElement(w.a,{disabled:pi,loading:ki,style:{background:"#2FC25B",border:0},type:"primary",onClick:function(){gi.current=!1,Cr.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):Z.a.createElement(w.a,{disabled:pi,loading:ki,type:"primary",onClick:function(){gi.current=!1,Cr.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,Z.a.createElement(z.a,{centered:!0,destroyOnClose:!0,footer:null,visible:zr,onCancel:function(){return Dt(!1)},title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},Z.a.createElement("div",null,Z.a.createElement("p",{className:"font14"},"\u7ECF\u7CFB\u7EDF\u68C0\u6D4B\u53D1\u73B0\uFF0C\u672C\u9898\u76EE\u4E0E\u7CFB\u7EDF\u4E2D\u5DF2\u521B\u5EFA\u7684\u9898\u76EE\u9AD8\u5EA6\u96F7\u540C\uFF0C\u8BF7\u8C03\u6574\u9898\u76EE\u540E\u518D\u8FDB\u884C\u4FDD\u5B58"),Z.a.createElement(c.a,{dataSource:lr,bordered:!1,scroll:lr.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:function(Ot,tr){return Z.a.createElement("span",{onClick:function(){return _r(tr==null?void 0:tr.identifier)},style:{textDecorationLine:"underline"},className:"current c-light-primary"},Ot)}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:function(Ot){var tr;return(tr=jt()(Ot))===null||tr===void 0?void 0:tr.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function Fn(yt){var St,vt,yr=yt.ischecked,Tr=yt.formValue,Bt=yt.hack,Rt=yt.onChangeAverage,br=yt.onChangeScore,$r=yt.onChangehide,Cr=yt.onChangeFile,ut=yt.onAddTestCase,It=yt.onRemoveTestCase,Br=yt.uploadData,Vr=yt.setUploadData,An=yt.handleUploadRatio,fn=yt.pointData,zr=yt.sourceData,Dt=yt.getPointData,dn=Bt.test_set_average,ct=Bt.test_set_score,kr=Object(q.useState)(!1),mr=Object(L.a)(kr,2),ei=mr[0],Tn=mr[1],bn=Object(q.useState)(!1),di=Object(L.a)(bn,2),ti=di[0],sn=di[1],Hr=function(Kt,er){var Sr=Object(i.a)(Br);Sr.splice(er,1),dn?An(Sr):Vr(Sr)},fi=function(Kt,er){console.log(Kt,er);var Sr=Br.map(function(jr,Gr){return Gr===er?Object(A.a)(Object(A.a)({},jr),{},{score:Kt.target.value?Number(Kt.target.value):0}):jr});Vr(Sr)},hn=function(Kt){var er=Br.concat(Kt);Bt.test_set_average?An(er):Vr(er)};function Wr(qt){qt.stopPropagation()}function lr(){if(Object(Qt.v)()){sn("practice");return}var qt="";z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:Z.a.createElement("div",null,Z.a.createElement(P.a,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(er){qt=er.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Kt=Object(E.a)(V.a.mark(function Sr(){var jr;return V.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:return _n.next=2,Object(me.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:qt}});case 2:jr=_n.sent,(jr==null?void 0:jr.status)===0&&Dt();case 4:case"end":return _n.stop()}},Sr)}));function er(){return Kt.apply(this,arguments)}return er}()})}function nn(){if(Object(Qt.v)()){sn("practice_source");return}var qt="";z.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:Z.a.createElement("div",null,Z.a.createElement(P.a,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(er){qt=er.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Kt=Object(E.a)(V.a.mark(function Sr(){var jr;return V.a.wrap(function(_n){for(;;)switch(_n.prev=_n.next){case 0:return _n.next=2,Object(me.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:qt}});case 2:jr=_n.sent,(jr==null?void 0:jr.status)===0&&Dt();case 4:case"end":return _n.stop()}},Sr)}));function er(){return Kt.apply(this,arguments)}return er}()})}return Z.a.createElement("div",{className:he.a["oj-left-panel"]},Z.a.createElement("div",{className:he.a["oj-form-info"]},Z.a.createElement(k.a.Item,{label:"\u9898\u76EE\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0"}],className:he.a.inputOne},Z.a.createElement(P.a,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:Z.a.createElement("span",null,(Tr==null||((St=Tr.hack)===null||St===void 0||((vt=St.name)===null||vt===void 0))?void 0:vt.length)||0,"/",Z.a.createElement("span",{className:"c-grey-999"},"60"))})),Z.a.createElement(k.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},Z.a.createElement(Q.a,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),Z.a.createElement("div",{className:he.a.row},Z.a.createElement("div",{className:he.a.a},Z.a.createElement(k.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},Z.a.createElement(r.a,null,te(oe.difficulty)))),Z.a.createElement("div",{className:he.a.b},Z.a.createElement(k.a.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},Z.a.createElement(r.a,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(Kt){return Kt.parentNode}},zr.map(function(qt){return Z.a.createElement(r.a.Option,{key:qt.id,value:qt.id},qt.name)}))),Z.a.createElement(w.a,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:function(){return nn()}},Object(Qt.v)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),Z.a.createElement("div",{className:he.a.row},Z.a.createElement("div",{className:he.a.b,style:{width:"100%",marginLeft:0}},Z.a.createElement(k.a.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},Z.a.createElement(r.a,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(Kt){return Kt.parentNode}},fn.map(function(qt){return Z.a.createElement(r.a.Option,{key:qt.id,value:qt.id},qt.name)}))),Z.a.createElement(w.a,{type:"primary",ghost:!0,onClick:function(){return lr()}},Object(Qt.v)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),Z.a.createElement("div",{className:he.a.field},Z.a.createElement(k.a.Item,{label:"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236",name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],className:he.a.inputTwo,extra:Z.a.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",Z.a.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},Z.a.createElement(t.a,{style:{width:185},min:3}))),Z.a.createElement("div",{className:"tst-case-info"},Z.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!Bt.is_file&&Z.a.createElement(w.a,{style:{height:40},type:"primary",ghost:!0,onClick:ut},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),Z.a.createElement(k.a.Item,{name:["hack","test_set_score"]},Z.a.createElement(p.a.Group,{onChange:br},Z.a.createElement(p.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",Z.a.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u4EC5\u5F53\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u83B7\u5F97\u4E00\u6B21\u6027\u5956\u52B1\uFF09")),Z.a.createElement(p.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",Z.a.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u901A\u8FC7\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5BF9\u5E94\u5956\u52B1\uFF09")))),Z.a.createElement(S.a,{style:{marginBottom:"5px"},checked:yr,onChange:$r},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u505A\u9898\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),Z.a.createElement(k.a.Item,{className:he.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},Z.a.createElement(p.a.Group,{onChange:Cr},Z.a.createElement(y.a,{direction:"horizontal"},Z.a.createElement(p.a,{value:!1},"\u6587\u672C"),Z.a.createElement(p.a,{value:!0},"\u6587\u4EF6")))),!Bt.test_set_score&&Z.a.createElement(k.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},Z.a.createElement(p.a.Group,{onChange:Rt},Z.a.createElement(p.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),Z.a.createElement(p.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),Bt.is_file&&Z.a.createElement("div",{className:he.a.upBtn},Z.a.createElement(w.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return Tn(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),Z.a.createElement(bt.a,{disabled:Bt==null?void 0:Bt.test_set_average,inputChange:fi,showScore:!Bt.test_set_score,data:Br,onRemove:Hr})),!Bt.is_file&&Z.a.createElement(k.a.List,{name:"hack_sets"},function(qt,Kt){return Object(O.a)(Kt),Z.a.createElement(K.a,{accordion:!0},qt.map(function(er,Sr){return Z.a.createElement(Vt,{key:"".concat(er.key,"--").concat(Sr),header:Z.a.createElement("a",{className:he.a["test-case-name"]},Z.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",Sr+1),ct?null:Z.a.createElement(Z.a.Fragment,null,Z.a.createElement(k.a.Item,{name:[er.name,"score"],fieldKey:[er.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(Sr+1,"\u8BC4\u5206")}]},Z.a.createElement(t.a,{onClick:Wr,min:0,max:100,disabled:dn})),Z.a.createElement("span",null,"%"))),extra:Sr>0?Z.a.createElement("div",{onClick:Wr},Z.a.createElement(v.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(Sr+1),onConfirm:function(){It(Sr)}},Z.a.createElement(X.a,{className:he.a["btn-remove-case"]}))):null},Z.a.createElement(k.a.Item,{label:"\u8F93\u5165",name:[er.name,"input"],fieldKey:[er.fieldKey,"input"]},Z.a.createElement(kt,null)),Z.a.createElement(k.a.Item,{label:"\u8F93\u51FA",name:[er.name,"output"],fieldKey:[er.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},Z.a.createElement(kt,null)))}))}))),Z.a.createElement(bt.b,{rootIdentifier:null,visible:ei,onClose:function(){return Tn(!1)},onOK:hn}),Z.a.createElement(ot,{visible:ti,onCancel:function(){sn(!1),Dt()},onOK:function(){sn(!1),Dt()}}))}},rdUC:function(F,$,j){var N=j("MFOe"),v=N.Global;F.exports={name:"localStorage",read:M,write:y,each:m,remove:S,clearAll:b};function O(){return v.localStorage}function M(p){return O().getItem(p)}function y(p,d){return O().setItem(p,d)}function m(p){for(var d=O().length-1;d>=0;d--){var t=O().key(d);p(M(t),t)}}function S(p){return O().removeItem(p)}function b(){return O().clear()}},sR1s:function(F,$,j){"use strict";j.d($,"b",function(){return M}),j.d($,"a",function(){return y}),j.d($,"c",function(){return m}),j.d($,"d",function(){return S});var N=j("U8pU"),v="RC_TABLE_KEY";function O(b){return b==null?[]:Array.isArray(b)?b:[b]}function M(b,p){if(!p&&typeof p!="number")return b;for(var d=O(p),t=b,l=0;l<d.length;l+=1){if(!t)return null;var r=d[l];t=t[r]}return t}function y(b){var p=[],d={};return b.forEach(function(t){for(var l=t||{},r=l.key,i=l.dataIndex,o=r||O(i).join("-")||v;d[o];)o="".concat(o,"_next");d[o]=!0,p.push(o)}),p}function m(){var b={};function p(r,i){i&&Object.keys(i).forEach(function(o){var s=i[o];s&&Object(N.a)(s)==="object"?(r[o]=r[o]||{},p(r[o],s)):r[o]=s})}for(var d=arguments.length,t=new Array(d),l=0;l<d;l++)t[l]=arguments[l];return t.forEach(function(r){p(b,r)}),b}function S(b){return b!=null}},sboe:function(F,$,j){"use strict";j.d($,"a",function(){return O});var N=j("cDcd"),v=j.n(N),O=N.createContext(null)},t23M:function(F,$,j){"use strict";var N=j("VTBJ"),v=j("1OyB"),O=j("vuIU"),M=j("Ji7U"),y=j("LK+K"),m=j("cDcd"),S=j.n(m),b=j("m+aA"),p=j("Zm9Q"),d=j("Kwbf"),t=j("c+Xe"),l=j("bdgK"),r="rc-observer-key",i=function(o){Object(M.a)(u,o);var s=Object(y.a)(u);function u(){var a;return Object(v.a)(this,u),a=s.apply(this,arguments),a.resizeObserver=null,a.childNode=null,a.currentElement=null,a.state={width:0,height:0,offsetHeight:0,offsetWidth:0},a.onResize=function(c){var f=a.props.onResize,w=c[0].target,_=w.getBoundingClientRect(),h=_.width,R=_.height,C=w.offsetWidth,g=w.offsetHeight,x=Math.floor(h),E=Math.floor(R);if(a.state.width!==x||a.state.height!==E||a.state.offsetWidth!==C||a.state.offsetHeight!==g){var T={width:x,height:E,offsetWidth:C,offsetHeight:g};a.setState(T),f&&Promise.resolve().then(function(){f(Object(N.a)(Object(N.a)({},T),{},{offsetWidth:C,offsetHeight:g}))})}},a.setChildNode=function(c){a.childNode=c},a}return Object(O.a)(u,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var c=this.props.disabled;if(c){this.destroyObserver();return}var f=Object(b.a)(this.childNode||this),w=f!==this.currentElement;w&&(this.destroyObserver(),this.currentElement=f),!this.resizeObserver&&f&&(this.resizeObserver=new l.default(this.onResize),this.resizeObserver.observe(f))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var c=this.props.children,f=Object(p.a)(c);if(f.length>1)Object(d.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(f.length===0)return Object(d.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var w=f[0];if(m.isValidElement(w)&&Object(t.c)(w)){var _=w.ref;f[0]=m.cloneElement(w,{ref:Object(t.a)(_,this.setChildNode)})}return f.length===1?f[0]:f.map(function(h,R){return!m.isValidElement(h)||"key"in h&&h.key!==null?h:m.cloneElement(h,{key:"".concat(r,"-").concat(R)})})}}]),u}(m.Component);i.displayName="ResizeObserver",$.a=i},uGsb:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("MlIO"),j("1uat"))})(this,function(N){return function(){var v=N,O=v.x64,M=O.Word,y=O.WordArray,m=v.algo,S=m.SHA512,b=m.SHA384=S.extend({_doReset:function(){this._hash=new y.init([new M.init(3418070365,3238371032),new M.init(1654270250,914150663),new M.init(2438529370,812702999),new M.init(355462360,4144912697),new M.init(1731405415,4290775857),new M.init(2394180231,1750603025),new M.init(3675008525,1694076839),new M.init(1203062813,3204075428)])},_doFinalize:function(){var p=S._doFinalize.call(this);return p.sigBytes-=16,p}});v.SHA384=S._createHelper(b),v.HmacSHA384=S._createHmacHelper(b)}(),N.SHA384})},uGxW:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("OLod"))})(this,function(N){return N.pad.NoPadding={pad:function(){},unpad:function(){}},N.pad.NoPadding})},uQRt:function(F,$,j){F.exports=N;function N(){return j("gaXo"),{}}},ulZh:function(F,$,j){typeof window!="undefined"&&function(v,O){F.exports=O()}(this,function(){return function(N){var v={};function O(M){if(v[M])return v[M].exports;var y=v[M]={i:M,l:!1,exports:{}};return N[M].call(y.exports,y,y.exports,O),y.l=!0,y.exports}return O.m=N,O.c=v,O.d=function(M,y,m){O.o(M,y)||Object.defineProperty(M,y,{enumerable:!0,get:m})},O.r=function(M){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(M,"__esModule",{value:!0})},O.t=function(M,y){if(y&1&&(M=O(M)),y&8)return M;if(y&4&&typeof M=="object"&&M&&M.__esModule)return M;var m=Object.create(null);if(O.r(m),Object.defineProperty(m,"default",{enumerable:!0,value:M}),y&2&&typeof M!="string")for(var S in M)O.d(m,S,function(b){return M[b]}.bind(null,S));return m},O.n=function(M){var y=M&&M.__esModule?function(){return M.default}:function(){return M};return O.d(y,"a",y),y},O.o=function(M,y){return Object.prototype.hasOwnProperty.call(M,y)},O.p="/dist/",O(O.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(N,v,O){"use strict";var M=Object.prototype.hasOwnProperty,y="~";function m(){}Object.create&&(m.prototype=Object.create(null),new m().__proto__||(y=!1));function S(t,l,r){this.fn=t,this.context=l,this.once=r||!1}function b(t,l,r,i,o){if(typeof r!="function")throw new TypeError("The listener must be a function");var s=new S(r,i||t,o),u=y?y+l:l;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function p(t,l){--t._eventsCount===0?t._events=new m:delete t._events[l]}function d(){this._events=new m,this._eventsCount=0}d.prototype.eventNames=function(){var l=[],r,i;if(this._eventsCount===0)return l;for(i in r=this._events)M.call(r,i)&&l.push(y?i.slice(1):i);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(r)):l},d.prototype.listeners=function(l){var r=y?y+l:l,i=this._events[r];if(!i)return[];if(i.fn)return[i.fn];for(var o=0,s=i.length,u=new Array(s);o<s;o++)u[o]=i[o].fn;return u},d.prototype.listenerCount=function(l){var r=y?y+l:l,i=this._events[r];return i?i.fn?1:i.length:0},d.prototype.emit=function(l,r,i,o,s,u){var a=y?y+l:l;if(!this._events[a])return!1;var c=this._events[a],f=arguments.length,w,_;if(c.fn){c.once&&this.removeListener(l,c.fn,void 0,!0);switch(f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,r),!0;case 3:return c.fn.call(c.context,r,i),!0;case 4:return c.fn.call(c.context,r,i,o),!0;case 5:return c.fn.call(c.context,r,i,o,s),!0;case 6:return c.fn.call(c.context,r,i,o,s,u),!0}for(_=1,w=new Array(f-1);_<f;_++)w[_-1]=arguments[_];c.fn.apply(c.context,w)}else{var h=c.length,R;for(_=0;_<h;_++){c[_].once&&this.removeListener(l,c[_].fn,void 0,!0);switch(f){case 1:c[_].fn.call(c[_].context);break;case 2:c[_].fn.call(c[_].context,r);break;case 3:c[_].fn.call(c[_].context,r,i);break;case 4:c[_].fn.call(c[_].context,r,i,o);break;default:if(!w)for(R=1,w=new Array(f-1);R<f;R++)w[R-1]=arguments[R];c[_].fn.apply(c[_].context,w)}}}return!0},d.prototype.on=function(l,r,i){return b(this,l,r,i,!1)},d.prototype.once=function(l,r,i){return b(this,l,r,i,!0)},d.prototype.removeListener=function(l,r,i,o){var s=y?y+l:l;if(!this._events[s])return this;if(!r)return p(this,s),this;var u=this._events[s];if(u.fn)u.fn===r&&(!o||u.once)&&(!i||u.context===i)&&p(this,s);else{for(var a=0,c=[],f=u.length;a<f;a++)(u[a].fn!==r||o&&!u[a].once||i&&u[a].context!==i)&&c.push(u[a]);c.length?this._events[s]=c.length===1?c[0]:c:p(this,s)}return this},d.prototype.removeAllListeners=function(l){var r;return l?(r=y?y+l:l,this._events[r]&&p(this,r)):(this._events=new m,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=y,d.EventEmitter=d,N.exports=d},"./node_modules/url-toolkit/src/url-toolkit.js":function(N,v,O){(function(M){var y=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,m=/^([^\/?#]*)([^]*)$/,S=/(?:\/|^)\.(?=\/)/g,b=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,p={buildAbsoluteURL:function(d,t,l){if(l=l||{},d=d.trim(),t=t.trim(),!t){if(!l.alwaysNormalize)return d;var r=p.parseURL(d);if(!r)throw new Error("Error trying to parse base URL.");return r.path=p.normalizePath(r.path),p.buildURLFromParts(r)}var i=p.parseURL(t);if(!i)throw new Error("Error trying to parse relative URL.");if(i.scheme)return l.alwaysNormalize?(i.path=p.normalizePath(i.path),p.buildURLFromParts(i)):t;var o=p.parseURL(d);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&o.path[0]!=="/"){var s=m.exec(o.path);o.netLoc=s[1],o.path=s[2]}o.netLoc&&!o.path&&(o.path="/");var u={scheme:o.scheme,netLoc:i.netLoc,path:null,params:i.params,query:i.query,fragment:i.fragment};if(!i.netLoc&&(u.netLoc=o.netLoc,i.path[0]!=="/"))if(!i.path)u.path=o.path,i.params||(u.params=o.params,i.query||(u.query=o.query));else{var a=o.path,c=a.substring(0,a.lastIndexOf("/")+1)+i.path;u.path=p.normalizePath(c)}return u.path===null&&(u.path=l.alwaysNormalize?p.normalizePath(i.path):i.path),p.buildURLFromParts(u)},parseURL:function(d){var t=y.exec(d);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(d){for(d=d.split("").reverse().join("").replace(S,"");d.length!==(d=d.replace(b,"")).length;);return d.split("").reverse().join("")},buildURLFromParts:function(d){return d.scheme+d.netLoc+d.path+d.params+d.query+d.fragment}};N.exports=p})(this)},"./node_modules/webworkify-webpack/index.js":function(N,v,O){function M(l){var r={};function i(s){if(r[s])return r[s].exports;var u=r[s]={i:s,l:!1,exports:{}};return l[s].call(u.exports,u,u.exports,i),u.l=!0,u.exports}i.m=l,i.c=r,i.i=function(s){return s},i.d=function(s,u,a){i.o(s,u)||Object.defineProperty(s,u,{configurable:!1,enumerable:!0,get:a})},i.r=function(s){Object.defineProperty(s,"__esModule",{value:!0})},i.n=function(s){var u=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(u,"a",u),u},i.o=function(s,u){return Object.prototype.hasOwnProperty.call(s,u)},i.p="/",i.oe=function(s){throw console.error(s),s};var o=i(i.s=ENTRY_MODULE);return o.default||o}var y="[\\.|\\-|\\+|\\w|/|@]+",m="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+y+").*?\\)";function S(l){return(l+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function b(l){return!isNaN(1*l)}function p(l,r,i){var o={};o[i]=[];var s=r.toString(),u=s.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!u)return o;for(var a=u[1],c=new RegExp("(\\\\n|\\W)"+S(a)+m,"g"),f;f=c.exec(s);){if(f[3]==="dll-reference")continue;o[i].push(f[3])}for(c=new RegExp("\\("+S(a)+'\\("(dll-reference\\s('+y+'))"\\)\\)'+m,"g");f=c.exec(s);)l[f[2]]||(o[i].push(f[1]),l[f[2]]=O(f[1]).m),o[f[2]]=o[f[2]]||[],o[f[2]].push(f[4]);for(var w=Object.keys(o),_=0;_<w.length;_++)for(var h=0;h<o[w[_]].length;h++)b(o[w[_]][h])&&(o[w[_]][h]=1*o[w[_]][h]);return o}function d(l){var r=Object.keys(l);return r.reduce(function(i,o){return i||l[o].length>0},!1)}function t(l,r){for(var i={main:[r]},o={main:[]},s={main:{}};d(i);)for(var u=Object.keys(i),a=0;a<u.length;a++){var c=u[a],f=i[c],w=f.pop();if(s[c]=s[c]||{},s[c][w]||!l[c][w])continue;s[c][w]=!0,o[c]=o[c]||[],o[c].push(w);for(var _=p(l,l[c][w],c),h=Object.keys(_),R=0;R<h.length;R++)i[h[R]]=i[h[R]]||[],i[h[R]]=i[h[R]].concat(_[h[R]])}return o}N.exports=function(l,r){r=r||{};var i={main:O.m},o=r.all?{main:Object.keys(i.main)}:t(i,l),s="";Object.keys(o).filter(function(w){return w!=="main"}).forEach(function(w){for(var _=0;o[w][_];)_++;o[w].push(_),i[w][_]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",s=s+"var "+w+" = ("+M.toString().replace("ENTRY_MODULE",JSON.stringify(_))+")({"+o[w].map(function(h){return""+JSON.stringify(h)+": "+i[w][h].toString()}).join(",")+`});
`}),s=s+"new (("+M.toString().replace("ENTRY_MODULE",JSON.stringify(l))+")({"+o.main.map(function(w){return""+JSON.stringify(w)+": "+i.main[w].toString()}).join(",")+"}))(self);";var u=new window.Blob([s],{type:"text/javascript"});if(r.bare)return u;var a=window.URL||window.webkitURL||window.mozURL||window.msURL,c=a.createObjectURL(u),f=new window.Worker(c);return f.objectURL=c,f}},"./src/config.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"hlsDefaultConfig",function(){return R}),O.d(v,"mergeConfig",function(){return g}),O.d(v,"enableStreamingMode",function(){return x});var M=O("./src/controller/abr-controller.ts"),y=O("./src/controller/audio-stream-controller.ts"),m=O("./src/controller/audio-track-controller.ts"),S=O("./src/controller/subtitle-stream-controller.ts"),b=O("./src/controller/subtitle-track-controller.ts"),p=O("./src/controller/buffer-controller.ts"),d=O("./src/controller/timeline-controller.ts"),t=O("./src/controller/cap-level-controller.ts"),l=O("./src/controller/fps-controller.ts"),r=O("./src/controller/eme-controller.ts"),i=O("./src/controller/cmcd-controller.ts"),o=O("./src/utils/xhr-loader.ts"),s=O("./src/utils/fetch-loader.ts"),u=O("./src/utils/cues.ts"),a=O("./src/utils/mediakeys-helper.ts"),c=O("./src/utils/logger.ts");function f(){return f=Object.assign||function(E){for(var T=1;T<arguments.length;T++){var k=arguments[T];for(var L in k)Object.prototype.hasOwnProperty.call(k,L)&&(E[L]=k[L])}return E},f.apply(this,arguments)}function w(E,T){var k=Object.keys(E);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(E);T&&(L=L.filter(function(A){return Object.getOwnPropertyDescriptor(E,A).enumerable})),k.push.apply(k,L)}return k}function _(E){for(var T=1;T<arguments.length;T++){var k=arguments[T]!=null?arguments[T]:{};T%2?w(Object(k),!0).forEach(function(L){h(E,L,k[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(k)):w(Object(k)).forEach(function(L){Object.defineProperty(E,L,Object.getOwnPropertyDescriptor(k,L))})}return E}function h(E,T,k){return T in E?Object.defineProperty(E,T,{value:k,enumerable:!0,configurable:!0,writable:!0}):E[T]=k,E}var R=_(_({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:o.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:M.default,bufferController:p.default,capLevelController:t.default,fpsController:l.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:a.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},C()),{},{subtitleStreamController:S.SubtitleStreamController,subtitleTrackController:b.default,timelineController:d.TimelineController,audioStreamController:y.default,audioTrackController:m.default,emeController:r.default,cmcdController:i.default});function C(){return{cueHandler:u.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 g(E,T){if((T.liveSyncDurationCount||T.liveMaxLatencyDurationCount)&&(T.liveSyncDuration||T.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(T.liveMaxLatencyDurationCount!==void 0&&(T.liveSyncDurationCount===void 0||T.liveMaxLatencyDurationCount<=T.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(T.liveMaxLatencyDuration!==void 0&&(T.liveSyncDuration===void 0||T.liveMaxLatencyDuration<=T.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return f({},E,T)}function x(E){var T=E.loader;if(T!==s.default&&T!==o.default)c.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),E.progressive=!1;else{var k=Object(s.fetchSupported)();k&&(E.loader=s.default,E.progressive=!0,E.enableSoftwareAES=!0,c.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/polyfills/number.ts"),y=O("./src/utils/ewma-bandwidth-estimator.ts"),m=O("./src/events.ts"),S=O("./src/utils/buffer-helper.ts"),b=O("./src/errors.ts"),p=O("./src/types/loader.ts"),d=O("./src/utils/logger.ts");function t(i,o){for(var s=0;s<o.length;s++){var u=o[s];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function l(i,o,s){return o&&t(i.prototype,o),s&&t(i,s),i}var r=function(){function i(s){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=s;var u=s.config;this.bwEstimator=new y.default(u.abrEwmaSlowVoD,u.abrEwmaFastVoD,u.abrEwmaDefaultEstimate),this.registerListeners()}var o=i.prototype;return o.registerListeners=function(){var u=this.hls;u.on(m.Events.FRAG_LOADING,this.onFragLoading,this),u.on(m.Events.FRAG_LOADED,this.onFragLoaded,this),u.on(m.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.on(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.on(m.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var u=this.hls;u.off(m.Events.FRAG_LOADING,this.onFragLoading,this),u.off(m.Events.FRAG_LOADED,this.onFragLoaded,this),u.off(m.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.off(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),u.off(m.Events.ERROR,this.onError,this)},o.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},o.onFragLoading=function(u,a){var c=a.frag;if(c.type===p.PlaylistLevelType.MAIN&&!this.timer){var f;this.fragCurrent=c,this.partCurrent=(f=a.part)!=null?f:null,this.timer=self.setInterval(this.onCheck,100)}},o.onLevelLoaded=function(u,a){var c=this.hls.config;a.details.live?this.bwEstimator.update(c.abrEwmaSlowLive,c.abrEwmaFastLive):this.bwEstimator.update(c.abrEwmaSlowVoD,c.abrEwmaFastVoD)},o._abandonRulesCheck=function(){var u=this.fragCurrent,a=this.partCurrent,c=this.hls,f=c.autoLevelEnabled,w=c.config,_=c.media;if(!u||!_)return;var h=a?a.stats:u.stats,R=a?a.duration:u.duration;if(h.aborted){d.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!f||_.paused||!_.playbackRate||!_.readyState)return;var C=performance.now()-h.loading.start,g=Math.abs(_.playbackRate);if(C<=500*R/g)return;var x=c.levels,E=c.minAutoLevel,T=x[u.level],k=h.total||Math.max(h.loaded,Math.round(R*T.maxBitrate/8)),L=Math.max(1,h.bwEstimate?h.bwEstimate/8:h.loaded*1e3/C),A=(k-h.loaded)/L,G=_.currentTime,K=(S.BufferHelper.bufferInfo(_,G,w.maxBufferHole).end-G)/g;if(K>=2*R/g||A<=K)return;var W=Number.POSITIVE_INFINITY,z;for(z=u.level-1;z>E;z--){var U=x[z].maxBitrate;if(W=R*U/(8*.8*L),W<K)break}if(W>=A)return;var P=this.bwEstimator.getEstimate();d.logger.warn("Fragment "+u.sn+(a?" part "+a.index:"")+" of level "+u.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+z+`
Current BW estimate: `+(Object(M.isFiniteNumber)(P)?(P/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+A.toFixed(3)+` s
Estimated load time for the next fragment: `+W.toFixed(3)+` s
Time to underbuffer: `+K.toFixed(3)+" s"),c.nextLoadLevel=z,this.bwEstimator.sample(C,h.loaded),this.clearTimer(),u.loader&&(this.fragCurrent=this.partCurrent=null,u.loader.abort()),c.trigger(m.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:u,part:a,stats:h})},o.onFragLoaded=function(u,a){var c=a.frag,f=a.part;if(c.type===p.PlaylistLevelType.MAIN&&Object(M.isFiniteNumber)(c.sn)){var w=f?f.stats:c.stats,_=f?f.duration:c.duration;if(this.clearTimer(),this.lastLoadedFragLevel=c.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var h=this.hls.levels[c.level],R=(h.loaded?h.loaded.bytes:0)+w.loaded,C=(h.loaded?h.loaded.duration:0)+_;h.loaded={bytes:R,duration:C},h.realBitrate=Math.round(8*R/C)}if(c.bitrateTest){var g={stats:w,frag:c,part:f,id:c.type};this.onFragBuffered(m.Events.FRAG_BUFFERED,g),c.bitrateTest=!1}}},o.onFragBuffered=function(u,a){var c=a.frag,f=a.part,w=f?f.stats:c.stats;if(w.aborted)return;if(c.type!==p.PlaylistLevelType.MAIN||c.sn==="initSegment")return;var _=w.parsing.end-w.loading.start;this.bwEstimator.sample(_,w.loaded),w.bwEstimate=this.bwEstimator.getEstimate(),c.bitrateTest?this.bitrateTestDelay=_/1e3:this.bitrateTestDelay=0},o.onError=function(u,a){switch(a.details){case b.ErrorDetails.FRAG_LOAD_ERROR:case b.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},o.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},o.getNextABRAutoLevel=function(){var u=this.fragCurrent,a=this.partCurrent,c=this.hls,f=c.maxAutoLevel,w=c.config,_=c.minAutoLevel,h=c.media,R=a?a.duration:u?u.duration:0,C=h?h.currentTime:0,g=h&&h.playbackRate!==0?Math.abs(h.playbackRate):1,x=this.bwEstimator?this.bwEstimator.getEstimate():w.abrEwmaDefaultEstimate,E=(S.BufferHelper.bufferInfo(h,C,w.maxBufferHole).end-C)/g,T=this.findBestLevel(x,_,f,E,w.abrBandWidthFactor,w.abrBandWidthUpFactor);if(T>=0)return T;d.logger.trace((E?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var k=R?Math.min(R,w.maxStarvationDelay):w.maxStarvationDelay,L=w.abrBandWidthFactor,A=w.abrBandWidthUpFactor;if(!E){var G=this.bitrateTestDelay;if(G){var K=R?Math.min(R,w.maxLoadingDelay):w.maxLoadingDelay;k=K-G,d.logger.trace("bitrate test took "+Math.round(1e3*G)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*k)+" ms"),L=A=1}}return T=this.findBestLevel(x,_,f,E+k,L,A),Math.max(T,0)},o.findBestLevel=function(u,a,c,f,w,_){for(var h,R=this.fragCurrent,C=this.partCurrent,g=this.lastLoadedFragLevel,x=this.hls.levels,E=x[g],T=!!(E!=null&&(h=E.details)!==null&&h!==void 0&&h.live),k=E==null?void 0:E.codecSet,L=C?C.duration:R?R.duration:0,A=c;A>=a;A--){var G=x[A];if(!G||k&&G.codecSet!==k)continue;var K=G.details,W=(C?K==null?void 0:K.partTarget:K==null?void 0:K.averagetargetduration)||L,z=void 0;A<=g?z=w*u:z=_*u;var U=x[A].maxBitrate,P=U*W/z;if(d.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+A+"/"+Math.round(z)+"/"+U+"/"+W+"/"+f+"/"+P),z>U&&(!P||T&&!this.bitrateTestDelay||P<f))return A}return-1},l(i,[{key:"nextAutoLevel",get:function(){var u=this._nextAutoLevel,a=this.bwEstimator;if(u!==-1&&(!a||!a.canEstimate()))return u;var c=this.getNextABRAutoLevel();return u!==-1&&(c=Math.min(u,c)),c},set:function(u){this._nextAutoLevel=u}}]),i}();v.default=r},"./src/controller/audio-stream-controller.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/polyfills/number.ts"),y=O("./src/controller/base-stream-controller.ts"),m=O("./src/events.ts"),S=O("./src/utils/buffer-helper.ts"),b=O("./src/controller/fragment-tracker.ts"),p=O("./src/types/level.ts"),d=O("./src/types/loader.ts"),t=O("./src/loader/fragment.ts"),l=O("./src/demux/chunk-cache.ts"),r=O("./src/demux/transmuxer-interface.ts"),i=O("./src/types/transmuxer.ts"),o=O("./src/controller/fragment-finders.ts"),s=O("./src/utils/discontinuities.ts"),u=O("./src/errors.ts"),a=O("./src/utils/logger.ts");function c(){return c=Object.assign||function(R){for(var C=1;C<arguments.length;C++){var g=arguments[C];for(var x in g)Object.prototype.hasOwnProperty.call(g,x)&&(R[x]=g[x])}return R},c.apply(this,arguments)}function f(R,C){R.prototype=Object.create(C.prototype),R.prototype.constructor=R,w(R,C)}function w(R,C){return w=Object.setPrototypeOf||function(x,E){return x.__proto__=E,x},w(R,C)}var _=100,h=function(R){f(C,R);function C(x,E){var T;return T=R.call(this,x,E,"[audio-stream-controller]")||this,T.videoBuffer=null,T.videoTrackCC=-1,T.waitingVideoCC=-1,T.audioSwitch=!1,T.trackId=-1,T.waitingData=null,T.mainDetails=null,T.bufferFlushed=!1,T._registerListeners(),T}var g=C.prototype;return g.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},g._registerListeners=function(){var E=this.hls;E.on(m.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.on(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(m.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),E.on(m.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.on(m.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),E.on(m.Events.ERROR,this.onError,this),E.on(m.Events.BUFFER_RESET,this.onBufferReset,this),E.on(m.Events.BUFFER_CREATED,this.onBufferCreated,this),E.on(m.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.on(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),E.on(m.Events.FRAG_BUFFERED,this.onFragBuffered,this)},g._unregisterListeners=function(){var E=this.hls;E.off(m.Events.MEDIA_ATTACHED,this.onMediaAttached,this),E.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),E.off(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),E.off(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(m.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),E.off(m.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),E.off(m.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),E.off(m.Events.ERROR,this.onError,this),E.off(m.Events.BUFFER_RESET,this.onBufferReset,this),E.off(m.Events.BUFFER_CREATED,this.onBufferCreated,this),E.off(m.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),E.off(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),E.off(m.Events.FRAG_BUFFERED,this.onFragBuffered,this)},g.onInitPtsFound=function(E,T){var k=T.frag,L=T.id,A=T.initPTS;if(L==="main"){var G=k.cc;this.initPTS[k.cc]=A,this.log("InitPTS for cc: "+G+" found from main: "+A),this.videoTrackCC=G,this.state===y.State.WAITING_INIT_PTS&&this.tick()}},g.startLoad=function(E){if(!this.levels){this.startPosition=E,this.state=y.State.STOPPED;return}var T=this.lastCurrentTime;this.stopLoad(),this.setInterval(_),this.fragLoadError=0,T>0&&E===-1?(this.log("Override startPosition with lastCurrentTime @"+T.toFixed(3)),this.state=y.State.IDLE):(this.loadedmetadata=!1,this.state=y.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()},g.doTick=function(){switch(this.state){case y.State.IDLE:this.doTickIdle();break;case y.State.WAITING_TRACK:{var E,T=this.levels,k=this.trackId,L=T==null||((E=T[k])===null||E===void 0)?void 0:E.details;if(L){if(this.waitForCdnTuneIn(L))break;this.state=y.State.WAITING_INIT_PTS}break}case y.State.FRAG_LOADING_WAITING_RETRY:{var A,G=performance.now(),K=this.retryDate;(!K||G>=K||(A=this.media)!==null&&A!==void 0&&A.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=y.State.IDLE);break}case y.State.WAITING_INIT_PTS:{var W=this.waitingData;if(W){var z=W.frag,U=W.part,P=W.cache,H=W.complete;if(this.initPTS[z.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=y.State.FRAG_LOADING;var V=P.flush(),q={frag:z,part:U,payload:V,networkDetails:null};this._handleFragmentLoadProgress(q),H&&R.prototype._handleFragmentLoadComplete.call(this,q)}else if(this.videoTrackCC!==this.waitingVideoCC)a.logger.log("Waiting fragment cc ("+z.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var Z=this.getLoadPosition(),ce=S.BufferHelper.bufferInfo(this.mediaBuffer,Z,this.config.maxBufferHole),he=Object(o.fragmentWithinToleranceTest)(ce.end,this.config.maxFragLookUpTolerance,z);he<0&&(a.logger.log("Waiting fragment cc ("+z.cc+") @ "+z.start+" cancelled because another fragment at "+ce.end+" is needed"),this.clearWaitingFragment())}}else this.state=y.State.IDLE}}this.onTickEnd()},g.clearWaitingFragment=function(){var E=this.waitingData;E&&(this.fragmentTracker.removeFragment(E.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=y.State.IDLE)},g.onTickEnd=function(){var E=this.media;if(!E||!E.readyState)return;var T=this.mediaBuffer?this.mediaBuffer:E,k=T.buffered;!this.loadedmetadata&&k.length&&(this.loadedmetadata=!0),this.lastCurrentTime=E.currentTime},g.doTickIdle=function(){var E,T,k=this.hls,L=this.levels,A=this.media,G=this.trackId,K=k.config;if(!L||!L[G])return;if(!A&&(this.startFragRequested||!K.startFragPrefetch))return;var W=L[G],z=W.details;if(!z||z.live&&this.levelLastLoaded!==G||this.waitForCdnTuneIn(z)){this.state=y.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,t.ElementaryStreamTypes.AUDIO,d.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,d.PlaylistLevelType.AUDIO);if(U===null)return;var P=U.len,H=this.getMaxBufferLength(),V=this.audioSwitch;if(P>=H&&!V)return;if(!V&&this._streamEnded(U,z)){k.trigger(m.Events.BUFFER_EOS,{type:"audio"}),this.state=y.State.ENDED;return}var q=z.fragments,Z=q[0].start,ce=U.end;if(V){var he=this.getLoadPosition();ce=he,z.PTSKnown&&he<Z&&((U.end>Z||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),A.currentTime=Z+.05))}var ae=this.getNextFragment(ce,z);if(!ae){this.bufferFlushed=!0;return}((E=ae.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((T=ae.decryptdata)!==null&&T!==void 0&&T.key)?this.loadKey(ae,z):this.loadFragment(ae,z,ce)},g.getMaxBufferLength=function(){var E=R.prototype.getMaxBufferLength.call(this),T=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,d.PlaylistLevelType.MAIN);return T===null?E:Math.max(E,T.len)},g.onMediaDetaching=function(){this.videoBuffer=null,R.prototype.onMediaDetaching.call(this)},g.onAudioTracksUpdated=function(E,T){var k=T.audioTracks;this.resetTransmuxer(),this.levels=k.map(function(L){return new p.Level(L)})},g.onAudioTrackSwitching=function(E,T){var k=!!T.url;this.trackId=T.id;var L=this.fragCurrent;L!=null&&L.loader&&L.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),k?this.setInterval(_):this.resetTransmuxer(),k?(this.audioSwitch=!0,this.state=y.State.IDLE):this.state=y.State.STOPPED,this.tick()},g.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},g.onLevelLoaded=function(E,T){this.mainDetails=T.details},g.onAudioTrackLoaded=function(E,T){var k,L=this.levels,A=T.details,G=T.id;if(!L){this.warn("Audio tracks were reset while loading level "+G);return}this.log("Track "+G+" loaded ["+A.startSN+","+A.endSN+"],duration:"+A.totalduration);var K=L[G],W=0;if(A.live||(k=K.details)!==null&&k!==void 0&&k.live){var z=this.mainDetails;if(A.fragments[0]||(A.deltaUpdateFailed=!0),A.deltaUpdateFailed||!z)return;!K.details&&A.hasProgramDateTime&&z.hasProgramDateTime?(Object(s.alignMediaPlaylistByPDT)(A,z),W=A.fragments[0].start):W=this.alignPlaylists(A,K.details)}K.details=A,this.levelLastLoaded=G,!this.startFragRequested&&(this.mainDetails||!A.live)&&this.setStartPosition(K.details,W),this.state===y.State.WAITING_TRACK&&!this.waitForCdnTuneIn(A)&&(this.state=y.State.IDLE),this.tick()},g._handleFragmentLoadProgress=function(E){var T,k=E.frag,L=E.part,A=E.payload,G=this.config,K=this.trackId,W=this.levels;if(!W){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+k.sn+" of level "+k.level+" will not be buffered");return}var z=W[K];console.assert(z,"Audio track is defined on fragment load progress");var U=z.details;console.assert(U,"Audio track details are defined on fragment load progress");var P=G.defaultAudioCodec||z.audioCodec||"mp4a.40.2",H=this.transmuxer;H||(H=this.transmuxer=new r.default(this.hls,d.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var V=this.initPTS[k.cc],q=(T=k.initSegment)===null||T===void 0?void 0:T.data;if(V!==void 0){var Z=!1,ce=L?L.index:-1,he=ce!==-1,ae=new i.ChunkMetadata(k.level,k.sn,k.stats.chunkCount,A.byteLength,ce,he);H.push(A,q,P,"",k,L,U.totalduration,Z,ae,V)}else{a.logger.log("Unknown video PTS for cc "+k.cc+", waiting for video PTS before demuxing audio frag "+k.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+K);var xe=this.waitingData=this.waitingData||{frag:k,part:L,cache:new l.default,complete:!1},ge=xe.cache;ge.push(new Uint8Array(A)),this.waitingVideoCC=this.videoTrackCC,this.state=y.State.WAITING_INIT_PTS}},g._handleFragmentLoadComplete=function(E){if(this.waitingData){this.waitingData.complete=!0;return}R.prototype._handleFragmentLoadComplete.call(this,E)},g.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},g.onBufferCreated=function(E,T){var k=T.tracks.audio;k&&(this.mediaBuffer=k.buffer),T.tracks.video&&(this.videoBuffer=T.tracks.video.buffer)},g.onFragBuffered=function(E,T){var k=T.frag,L=T.part;if(k.type!==d.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(k)){this.warn("Fragment "+k.sn+(L?" p: "+L.index:"")+" of level "+k.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}k.sn!=="initSegment"&&(this.fragPrevious=k,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(m.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(k,L)},g.onError=function(E,T){switch(T.details){case u.ErrorDetails.FRAG_LOAD_ERROR:case u.ErrorDetails.FRAG_LOAD_TIMEOUT:case u.ErrorDetails.KEY_LOAD_ERROR:case u.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(d.PlaylistLevelType.AUDIO,T);break;case u.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case u.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==y.State.ERROR&&this.state!==y.State.STOPPED&&(this.state=T.fatal?y.State.ERROR:y.State.IDLE,this.warn(T.details+" while loading frag, switching to "+this.state+" state"));break;case u.ErrorDetails.BUFFER_FULL_ERROR:if(T.parent==="audio"&&(this.state===y.State.PARSING||this.state===y.State.PARSED)){var k=!0,L=this.getFwdBufferInfo(this.mediaBuffer,d.PlaylistLevelType.AUDIO);L&&L.len>.5&&(k=!this.reduceMaxBufferLength(L.len)),k&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},g.onBufferFlushed=function(E,T){var k=T.type;k===t.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},g._handleTransmuxComplete=function(E){var T,k="audio",L=this.hls,A=E.remuxResult,G=E.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 W=K.frag,z=K.part,U=A.audio,P=A.text,H=A.id3,V=A.initSegment;if(this.fragContextChanged(W))return;if(this.state=y.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),V!=null&&V.tracks&&(this._bufferInitSegment(V.tracks,W,G),L.trigger(m.Events.FRAG_PARSING_INIT_SEGMENT,{frag:W,id:k,tracks:V.tracks})),U){var q=U.startPTS,Z=U.endPTS,ce=U.startDTS,he=U.endDTS;z&&(z.elementaryStreams[t.ElementaryStreamTypes.AUDIO]={startPTS:q,endPTS:Z,startDTS:ce,endDTS:he}),W.setElementaryStreamInfo(t.ElementaryStreamTypes.AUDIO,q,Z,ce,he),this.bufferFragmentData(U,W,z,G)}if(H!=null&&(T=H.samples)!==null&&T!==void 0&&T.length){var ae=c({frag:W,id:k},H);L.trigger(m.Events.FRAG_PARSING_METADATA,ae)}if(P){var xe=c({frag:W,id:k},P);L.trigger(m.Events.FRAG_PARSING_USERDATA,xe)}},g._bufferInitSegment=function(E,T,k){if(this.state!==y.State.PARSING)return;E.video&&delete E.video;var L=E.audio;if(!L)return;L.levelCodec=L.codec,L.id="audio",this.log("Init audio buffer, container:"+L.container+", codecs[parsed]=["+L.codec+"]"),this.hls.trigger(m.Events.BUFFER_CODECS,E);var A=L.initSegment;if(A!=null&&A.byteLength){var G={type:"audio",frag:T,part:null,chunkMeta:k,parent:T.type,data:A};this.hls.trigger(m.Events.BUFFER_APPENDING,G)}this.tick()},g.loadFragment=function(E,T,k){var L=this.fragmentTracker.getState(E);this.fragCurrent=E,(this.audioSwitch||L===b.FragmentState.NOT_LOADED||L===b.FragmentState.PARTIAL)&&(E.sn==="initSegment"?this._loadInitSegment(E):T.live&&!Object(M.isFiniteNumber)(this.initPTS[E.cc])?(this.log("Waiting for video PTS in continuity counter "+E.cc+" of live stream before loading audio fragment "+E.sn+" of level "+this.trackId),this.state=y.State.WAITING_INIT_PTS):(this.startFragRequested=!0,R.prototype.loadFragment.call(this,E,T,k)))},g.completeAudioSwitch=function(){var E=this.hls,T=this.media,k=this.trackId;T&&(this.log("Switching audio track : flushing all audio"),R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,E.trigger(m.Events.AUDIO_TRACK_SWITCHED,{id:k})},C}(y.default);v.default=h},"./src/controller/audio-track-controller.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/events.ts"),y=O("./src/errors.ts"),m=O("./src/controller/base-playlist-controller.ts"),S=O("./src/types/loader.ts");function b(r,i){for(var o=0;o<i.length;o++){var s=i[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(r,s.key,s)}}function p(r,i,o){return i&&b(r.prototype,i),o&&b(r,o),r}function d(r,i){r.prototype=Object.create(i.prototype),r.prototype.constructor=r,t(r,i)}function t(r,i){return t=Object.setPrototypeOf||function(s,u){return s.__proto__=u,s},t(r,i)}var l=function(r){d(i,r);function i(s){var u;return u=r.call(this,s,"[audio-track-controller]")||this,u.tracks=[],u.groupId=null,u.tracksInGroup=[],u.trackId=-1,u.trackName="",u.selectDefaultTrack=!0,u.registerListeners(),u}var o=i.prototype;return o.registerListeners=function(){var u=this.hls;u.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(M.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(M.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.on(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),u.on(M.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var u=this.hls;u.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(M.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(M.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.off(M.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),u.off(M.Events.ERROR,this.onError,this)},o.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,r.prototype.destroy.call(this)},o.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},o.onManifestParsed=function(u,a){this.tracks=a.audioTracks||[]},o.onAudioTrackLoaded=function(u,a){var c=a.id,f=a.details,w=this.tracksInGroup[c];if(!w){this.warn("Invalid audio track id "+c);return}var _=w.details;w.details=a.details,this.log("audioTrack "+c+" loaded ["+f.startSN+"-"+f.endSN+"]"),c===this.trackId&&(this.retryCount=0,this.playlistLoaded(c,a,_))},o.onLevelLoading=function(u,a){this.switchLevel(a.level)},o.onLevelSwitching=function(u,a){this.switchLevel(a.level)},o.switchLevel=function(u){var a=this.hls.levels[u];if(!(a!=null&&a.audioGroupIds))return;var c=a.audioGroupIds[a.urlId];if(this.groupId!==c){this.groupId=c;var f=this.tracks.filter(function(_){return!c||_.groupId===c});this.selectDefaultTrack&&!f.some(function(_){return _.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=f;var w={audioTracks:f};this.log("Updating audio tracks, "+f.length+' track(s) found in "'+c+'" group-id'),this.hls.trigger(M.Events.AUDIO_TRACKS_UPDATED,w),this.selectInitialTrack()}},o.onError=function(u,a){if(r.prototype.onError.call(this,u,a),a.fatal||!a.context)return;a.context.type===S.PlaylistContextType.AUDIO_TRACK&&a.context.id===this.trackId&&a.context.groupId===this.groupId&&this.retryLoadingOrFail(a)},o.setAudioTrack=function(u){var a=this.tracksInGroup;if(u<0||u>=a.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var c=a[this.trackId];this.log("Now switching to audio-track index "+u);var f=a[u],w=f.id,_=f.groupId,h=_===void 0?"":_,R=f.name,C=f.type,g=f.url;if(this.trackId=u,this.trackName=R,this.selectDefaultTrack=!1,this.hls.trigger(M.Events.AUDIO_TRACK_SWITCHING,{id:w,groupId:h,name:R,type:C,url:g}),f.details&&!f.details.live)return;var x=this.switchParams(f.url,c==null?void 0:c.details);this.loadPlaylist(x)},o.selectInitialTrack=function(){var u=this.tracksInGroup;console.assert(u.length,"Initial audio track should be selected when tracks are known");var a=this.trackName,c=this.findTrackId(a)||this.findTrackId();c!==-1?this.setAudioTrack(c):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},o.findTrackId=function(u){for(var a=this.tracksInGroup,c=0;c<a.length;c++){var f=a[c];if((!this.selectDefaultTrack||f.default)&&(!u||u===f.name))return f.id}return-1},o.loadPlaylist=function(u){var a=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(a)){var c=a.id,f=a.groupId,w=a.url;if(u)try{w=u.addDirectives(w)}catch(_){this.warn("Could not construct new URL with HLS Delivery Directives: "+_)}this.log("loading audio-track playlist for id: "+c),this.clearTimer(),this.hls.trigger(M.Events.AUDIO_TRACK_LOADING,{url:w,id:c,groupId:f,deliveryDirectives:u||null})}},p(i,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(u){this.selectDefaultTrack=!1,this.setAudioTrack(u)}}]),i}(m.default);v.default=l},"./src/controller/base-playlist-controller.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return p});var M=O("./src/polyfills/number.ts"),y=O("./src/types/level.ts"),m=O("./src/controller/level-helper.ts"),S=O("./src/utils/logger.ts"),b=O("./src/errors.ts"),p=function(){function d(l,r){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,r+":"),this.warn=S.logger.warn.bind(S.logger,r+":"),this.hls=l}var t=d.prototype;return t.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},t.onError=function(r,i){i.fatal&&i.type===b.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},t.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},t.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},t.stopLoad=function(){this.canLoad=!1,this.clearTimer()},t.switchParams=function(r,i){var o=i==null?void 0:i.renditionReports;if(o)for(var s=0;s<o.length;s++){var u=o[s],a=""+u.URI;if(a===r.substr(-a.length)){var c=parseInt(u["LAST-MSN"]),f=parseInt(u["LAST-PART"]);if(i&&this.hls.config.lowLatencyMode){var w=Math.min(i.age-i.partTarget,i.targetduration);f!==void 0&&w>i.partTarget&&(f+=1)}if(Object(M.isFiniteNumber)(c))return new y.HlsUrlParameters(c,Object(M.isFiniteNumber)(f)?f:void 0,y.HlsSkip.No)}}},t.loadPlaylist=function(r){},t.shouldLoadTrack=function(r){return this.canLoad&&r&&!!r.url&&(!r.details||r.details.live)},t.playlistLoaded=function(r,i,o){var s=this,u=i.details,a=i.stats,c=a.loading.end?Math.max(0,self.performance.now()-a.loading.end):0;if(u.advancedDateTime=Date.now()-c,u.live||o!=null&&o.live){if(u.reloaded(o),o&&this.log("live playlist "+r+" "+(u.advanced?"REFRESHED "+u.lastPartSn+"-"+u.lastPartIndex:"MISSED")),o&&u.fragments.length>0&&Object(m.mergeDetails)(o,u),!this.canLoad||!u.live)return;var f,w=void 0,_=void 0;if(u.canBlockReload&&u.endSN&&u.advanced){var h=this.hls.config.lowLatencyMode,R=u.lastPartSn,C=u.endSN,g=u.lastPartIndex,x=g!==-1,E=R===C,T=h?0:g;x?(w=E?C+1:R,_=E?T:g+1):w=C+1;var k=u.age,L=k+u.ageHeader,A=Math.min(L-u.partTarget,u.targetduration*1.5);if(A>0){if(o&&A>o.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+o.tuneInGoal+" to: "+A+" with playlist age: "+u.age),A=0;else{var G=Math.floor(A/u.targetduration);if(w+=G,_!==void 0){var K=Math.round(A%u.targetduration/u.partTarget);_+=K}this.log("CDN Tune-in age: "+u.ageHeader+"s last advanced "+k.toFixed(2)+"s goal: "+A+" skip sn "+G+" to part "+_)}u.tuneInGoal=A}if(f=this.getDeliveryDirectives(u,i.deliveryDirectives,w,_),h||!E){this.loadPlaylist(f);return}}else f=this.getDeliveryDirectives(u,i.deliveryDirectives,w,_);var W=Object(m.computeReloadInterval)(u,a);w!==void 0&&u.canBlockReload&&(W-=u.partTarget||1),this.log("reload live playlist "+r+" in "+Math.round(W)+" ms"),this.timer=self.setTimeout(function(){return s.loadPlaylist(f)},W)}else this.clearTimer()},t.getDeliveryDirectives=function(r,i,o,s){var u=Object(y.getSkipValue)(r,o);return i!=null&&i.skip&&r.deltaUpdateFailed&&(o=i.msn,s=i.part,u=y.HlsSkip.No),new y.HlsUrlParameters(o,s,u)},t.retryLoadingOrFail=function(r){var i=this,o=this.hls.config,s=this.retryCount<o.levelLoadingMaxRetry;if(s){var u;if(this.retryCount++,r.details.indexOf("LoadTimeOut")>-1&&(u=r.context)!==null&&u!==void 0&&u.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+r.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*o.levelLoadingRetryDelay,o.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return i.loadPlaylist()},a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+r.details+'"')}}else this.warn('cannot recover from error "'+r.details+'"'),this.clearTimer(),r.fatal=!0;return s},d}()},"./src/controller/base-stream-controller.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"State",function(){return C}),O.d(v,"default",function(){return g});var M=O("./src/polyfills/number.ts"),y=O("./src/task-loop.ts"),m=O("./src/controller/fragment-tracker.ts"),S=O("./src/utils/buffer-helper.ts"),b=O("./src/utils/logger.ts"),p=O("./src/events.ts"),d=O("./src/errors.ts"),t=O("./src/types/transmuxer.ts"),l=O("./src/utils/mp4-tools.ts"),r=O("./src/utils/discontinuities.ts"),i=O("./src/controller/fragment-finders.ts"),o=O("./src/controller/level-helper.ts"),s=O("./src/loader/fragment-loader.ts"),u=O("./src/crypt/decrypter.ts"),a=O("./src/utils/time-ranges.ts"),c=O("./src/types/loader.ts");function f(x,E){for(var T=0;T<E.length;T++){var k=E[T];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(x,k.key,k)}}function w(x,E,T){return E&&f(x.prototype,E),T&&f(x,T),x}function _(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function h(x,E){x.prototype=Object.create(E.prototype),x.prototype.constructor=x,R(x,E)}function R(x,E){return R=Object.setPrototypeOf||function(k,L){return k.__proto__=L,k},R(x,E)}var C={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"},g=function(x){h(E,x);function E(k,L,A){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=C.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=A,G.log=b.logger.log.bind(b.logger,A+":"),G.warn=b.logger.warn.bind(b.logger,A+":"),G.hls=k,G.fragmentLoader=new s.default(k.config),G.fragmentTracker=L,G.config=k.config,G.decrypter=new u.default(k,k.config),k.on(p.Events.KEY_LOADED,G.onKeyLoaded,_(G)),G}var T=E.prototype;return T.doTick=function(){this.onTickEnd()},T.onTickEnd=function(){},T.startLoad=function(L){},T.stopLoad=function(){this.fragmentLoader.abort();var L=this.fragCurrent;L&&this.fragmentTracker.removeFragment(L),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=C.STOPPED},T._streamEnded=function(L,A){var G=this.fragCurrent,K=this.fragmentTracker;if(!A.live&&G&&G.sn===A.endSN&&!L.nextStart){var W=K.getState(G);return W===m.FragmentState.PARTIAL||W===m.FragmentState.OK}return!1},T.onMediaAttached=function(L,A){var G=this.media=this.mediaBuffer=A.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===C.STOPPED&&this.startLoad(K.startPosition)},T.onMediaDetaching=function(){var L=this.media;L!=null&&L.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),L&&(L.removeEventListener("seeking",this.onvseeking),L.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},T.onMediaSeeking=function(){var L=this.config,A=this.fragCurrent,G=this.media,K=this.mediaBuffer,W=this.state,z=G?G.currentTime:0,U=S.BufferHelper.bufferInfo(K||G,z,L.maxBufferHole);if(this.log("media seeking to "+(Object(M.isFiniteNumber)(z)?z.toFixed(3):z)+", state: "+W),W===C.ENDED)this.resetLoadingState();else if(A&&!U.len){var P=L.maxFragLookUpTolerance,H=A.start-P,V=A.start+A.duration+P,q=z>V;(z<H||q)&&(q&&A.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),A.loader.abort()),this.resetLoadingState())}G&&(this.lastCurrentTime=z),!this.loadedmetadata&&!U.len&&(this.nextLoadPosition=this.startPosition=z),this.tickImmediate()},T.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},T.onKeyLoaded=function(L,A){if(this.state!==C.KEY_LOADING||A.frag!==this.fragCurrent||!this.levels)return;this.state=C.IDLE;var G=this.levels[A.frag.level].details;G&&this.loadFragment(A.frag,G,A.frag.start)},T.onHandlerDestroying=function(){this.stopLoad(),x.prototype.onHandlerDestroying.call(this)},T.onHandlerDestroyed=function(){this.state=C.STOPPED,this.hls.off(p.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)},T.loadKey=function(L,A){this.log("Loading key for "+L.sn+" of ["+A.startSN+"-"+A.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+L.level),this.state=C.KEY_LOADING,this.fragCurrent=L,this.hls.trigger(p.Events.KEY_LOADING,{frag:L})},T.loadFragment=function(L,A,G){this._loadFragForPlayback(L,A,G)},T._loadFragForPlayback=function(L,A,G){var K=this,W=function(U){if(K.fragContextChanged(L)){K.warn("Fragment "+L.sn+(U.part?" p: "+U.part.index:"")+" of level "+L.level+" was dropped during download."),K.fragmentTracker.removeFragment(L);return}L.stats.chunkCount++,K._handleFragmentLoadProgress(U)};this._doFragLoad(L,A,G,W).then(function(z){if(!z)return;K.fragLoadError=0;var U=K.state;if(K.fragContextChanged(L)){(U===C.FRAG_LOADING||U===C.BACKTRACKING||!K.fragCurrent&&U===C.PARSING)&&(K.fragmentTracker.removeFragment(L),K.state=C.IDLE);return}if("payload"in z&&(K.log("Loaded fragment "+L.sn+" of level "+L.level),K.hls.trigger(p.Events.FRAG_LOADED,z),K.state===C.BACKTRACKING)){K.fragmentTracker.backtrack(L,z),K.resetFragmentLoading(L);return}K._handleFragmentLoadComplete(z)}).catch(function(z){K.warn(z),K.resetFragmentLoading(L)})},T.flushMainBuffer=function(L,A,G){if(G===void 0&&(G=null),!(L-A))return;var K={startOffset:L,endOffset:A,type:G};this.fragLoadError=0,this.hls.trigger(p.Events.BUFFER_FLUSHING,K)},T._loadInitSegment=function(L){var A=this;this._doFragLoad(L).then(function(G){if(!G||A.fragContextChanged(L)||!A.levels)throw new Error("init load aborted");return G}).then(function(G){var K=A.hls,W=G.payload,z=L.decryptdata;if(W&&W.byteLength>0&&z&&z.key&&z.iv&&z.method==="AES-128"){var U=self.performance.now();return A.decrypter.webCryptoDecrypt(new Uint8Array(W),z.key.buffer,z.iv.buffer).then(function(P){var H=self.performance.now();return K.trigger(p.Events.FRAG_DECRYPTED,{frag:L,payload:P,stats:{tstart:U,tdecrypt:H}}),G.payload=P,G})}return G}).then(function(G){var K=A.fragCurrent,W=A.hls,z=A.levels;if(!z)throw new Error("init load aborted, missing levels");var U=z[L.level].details;console.assert(U,"Level details are defined when init segment is loaded");var P=L.stats;A.state=C.IDLE,A.fragLoadError=0,L.data=new Uint8Array(G.payload),P.parsing.start=P.buffering.start=self.performance.now(),P.parsing.end=P.buffering.end=self.performance.now(),G.frag===K&&W.trigger(p.Events.FRAG_BUFFERED,{stats:P,frag:K,part:null,id:L.type}),A.tick()}).catch(function(G){A.warn(G),A.resetFragmentLoading(L)})},T.fragContextChanged=function(L){var A=this.fragCurrent;return!L||!A||L.level!==A.level||L.sn!==A.sn||L.urlId!==A.urlId},T.fragBufferedComplete=function(L,A){var G=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+L.type+" sn: "+L.sn+(A?" part: "+A.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+L.level+" "+a.default.toString(S.BufferHelper.getBuffered(G))),this.state=C.IDLE,this.tick()},T._handleFragmentLoadComplete=function(L){var A=this.transmuxer;if(!A)return;var G=L.frag,K=L.part,W=L.partsLoaded,z=!W||W.length===0||W.some(function(P){return!P}),U=new t.ChunkMetadata(G.level,G.sn,G.stats.chunkCount+1,0,K?K.index:-1,!z);A.flush(U)},T._handleFragmentLoadProgress=function(L){},T._doFragLoad=function(L,A,G,K){var W=this;if(G===void 0&&(G=null),!this.levels)throw new Error("frag load aborted, missing levels");if(G=Math.max(L.start,G||0),this.config.lowLatencyMode&&A){var z=A.partList;if(z&&K){G>L.end&&A.fragmentHint&&(L=A.fragmentHint);var U=this.getNextPart(z,L,G);if(U>-1){var P=z[U];return this.log("Loading part sn: "+L.sn+" p: "+P.index+" cc: "+L.cc+" of playlist ["+A.startSN+"-"+A.endSN+"] parts [0-"+U+"-"+(z.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+L.level+", target: "+parseFloat(G.toFixed(3))),this.nextLoadPosition=P.start+P.duration,this.state=C.FRAG_LOADING,this.hls.trigger(p.Events.FRAG_LOADING,{frag:L,part:z[U],targetBufferTime:G}),this.doFragPartsLoad(L,z,U,K).catch(function(H){return W.handleFragLoadError(H)})}else if(!L.url||this.loadedEndOfParts(z,G))return Promise.resolve(null)}}return this.log("Loading fragment "+L.sn+" cc: "+L.cc+" "+(A?"of ["+A.startSN+"-"+A.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+L.level+", target: "+parseFloat(G.toFixed(3))),Object(M.isFiniteNumber)(L.sn)&&!this.bitrateTest&&(this.nextLoadPosition=L.start+L.duration),this.state=C.FRAG_LOADING,this.hls.trigger(p.Events.FRAG_LOADING,{frag:L,targetBufferTime:G}),this.fragmentLoader.load(L,K).catch(function(H){return W.handleFragLoadError(H)})},T.doFragPartsLoad=function(L,A,G,K){var W=this;return new Promise(function(z,U){var P=[],H=function V(q){var Z=A[q];W.fragmentLoader.loadPart(L,Z,K).then(function(ce){P[Z.index]=ce;var he=ce.part;W.hls.trigger(p.Events.FRAG_LOADED,ce);var ae=A[q+1];if(ae&&ae.fragment===L)V(q+1);else return z({frag:L,part:he,partsLoaded:P})}).catch(U)};H(G)})},T.handleFragLoadError=function(L){var A=L.data;return A&&A.details===d.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(A.frag,A.part):this.hls.trigger(p.Events.ERROR,A),null},T._handleTransmuxerFlush=function(L){var A=this.getCurrentContext(L);if(!A||this.state!==C.PARSING){this.fragCurrent||(this.state=C.IDLE);return}var G=A.frag,K=A.part,W=A.level,z=self.performance.now();G.stats.parsing.end=z,K&&(K.stats.parsing.end=z),this.updateLevelTiming(G,K,W,L.partial)},T.getCurrentContext=function(L){var A=this.levels,G=L.level,K=L.sn,W=L.part;if(!A||!A[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=A[G],U=W>-1?Object(o.getPartWith)(z,K,W):null,P=U?U.fragment:Object(o.getFragmentWithSN)(z,K,this.fragCurrent);return P?{frag:P,part:U,level:z}:null},T.bufferFragmentData=function(L,A,G,K){if(!L||this.state!==C.PARSING)return;var W=L.data1,z=L.data2,U=W;if(W&&z&&(U=Object(l.appendUint8Array)(W,z)),!U||!U.length)return;var P={type:L.type,frag:A,part:G,chunkMeta:K,parent:A.type,data:U};this.hls.trigger(p.Events.BUFFER_APPENDING,P),L.dropped&&L.independent&&!G&&this.flushBufferGap(A)},T.flushBufferGap=function(L){var A=this.media;if(!A)return;if(!S.BufferHelper.isBuffered(A,A.currentTime)){this.flushMainBuffer(0,L.start);return}var G=A.currentTime,K=S.BufferHelper.bufferInfo(A,G,0),W=L.duration,z=Math.min(this.config.maxFragLookUpTolerance*2,W*.25),U=Math.max(Math.min(L.start-z,K.end-z),G+z);L.start-U>z&&this.flushMainBuffer(U,L.start)},T.getFwdBufferInfo=function(L,A){var G=this.config,K=this.getLoadPosition();if(!Object(M.isFiniteNumber)(K))return null;var W=S.BufferHelper.bufferInfo(L,K,G.maxBufferHole);if(W.len===0&&W.nextStart!==void 0){var z=this.fragmentTracker.getBufferedFrag(K,A);if(z&&W.nextStart<z.end)return S.BufferHelper.bufferInfo(L,K,Math.max(W.nextStart,G.maxBufferHole))}return W},T.getMaxBufferLength=function(L){var A=this.config,G;return L?G=Math.max(8*A.maxBufferSize/L,A.maxBufferLength):G=A.maxBufferLength,Math.min(G,A.maxMaxBufferLength)},T.reduceMaxBufferLength=function(L){var A=this.config,G=L||A.maxBufferLength;return A.maxMaxBufferLength>=G?(A.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+A.maxMaxBufferLength+"s"),!0):!1},T.getNextFragment=function(L,A){var G,K,W=A.fragments,z=W.length;if(!z)return null;var U=this.config,P=W[0].start,H;if(A.live){var V=U.initialLiveManifestSize;if(z<V)return this.warn("Not enough fragments to start playback (have: "+z+", need: "+V+")"),null;!A.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(H=this.getInitialLiveFragment(A,W),this.startPosition=H?this.hls.liveSyncPosition||H.start:L)}else L<=P&&(H=W[0]);if(!H){var q=U.lowLatencyMode?A.partEnd:A.fragmentEnd;H=this.getFragmentAtPosition(L,q,A)}return(G=H)!==null&&G!==void 0&&G.initSegment&&!((K=H)!==null&&K!==void 0&&K.initSegment.data)&&!this.bitrateTest&&(H=H.initSegment),H},T.getNextPart=function(L,A,G){for(var K=-1,W=!1,z=!0,U=0,P=L.length;U<P;U++){var H=L[U];if(z=z&&!H.independent,K>-1&&G<H.start)break;var V=H.loaded;!V&&(W||H.independent||z)&&H.fragment===A&&(K=U),W=V}return K},T.loadedEndOfParts=function(L,A){var G=L[L.length-1];return G&&A>G.start&&G.loaded},T.getInitialLiveFragment=function(L,A){var G=this.fragPrevious,K=null;if(G){if(L.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+G.programDateTime),K=Object(i.findFragmentByPDT)(A,G.endProgramDateTime,this.config.maxFragLookUpTolerance)),!K){var W=G.sn+1;if(W>=L.startSN&&W<=L.endSN){var z=A[W-L.startSN];G.cc===z.cc&&(K=z,this.log("Live playlist, switching playlist, load frag with next SN: "+K.sn))}K||(K=Object(i.findFragWithCC)(A,G.cc),K&&this.log("Live playlist, switching playlist, load frag with same CC: "+K.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(K=this.getFragmentAtPosition(U,this.bitrateTest?L.fragmentEnd:L.edge,L))}return K},T.getFragmentAtPosition=function(L,A,G){var K=this.config,W=this.fragPrevious,z=G.fragments,U=G.endSN,P=G.fragmentHint,H=K.maxFragLookUpTolerance,V=!!(K.lowLatencyMode&&G.partList&&P);V&&P&&!this.bitrateTest&&(z=z.concat(P),U=P.sn);var q;if(L<A){var Z=L>A-H?0:H;q=Object(i.findFragmentByPTS)(W,z,L,Z)}else q=z[z.length-1];if(q){var ce=q.sn-G.startSN,he=W&&q.level===W.level,ae=z[ce+1],xe=this.fragmentTracker.getState(q);if(xe===m.FragmentState.BACKTRACKED){q=null;for(var ge=ce;z[ge]&&this.fragmentTracker.getState(z[ge])===m.FragmentState.BACKTRACKED;)W?q=z[ge--]:q=z[--ge];q||(q=ae)}else W&&q.sn===W.sn&&!V&&(he&&(q.sn<U&&this.fragmentTracker.getState(ae)!==m.FragmentState.OK?(this.log("SN "+q.sn+" just loaded, load next one: "+ae.sn),q=ae):q=null))}return q},T.synchronizeToLiveEdge=function(L){var A=this.config,G=this.media;if(!G)return;var K=this.hls.liveSyncPosition,W=G.currentTime,z=L.fragments[0].start,U=L.edge,P=W>=z-A.maxFragLookUpTolerance&&W<=U;if(K!==null&&G.duration>K&&(W<K||!P)){var H=A.liveMaxLatencyDuration!==void 0?A.liveMaxLatencyDuration:A.liveMaxLatencyDurationCount*L.targetduration;(!P&&G.readyState<4||W<U-H)&&(this.loadedmetadata||(this.nextLoadPosition=K),G.readyState&&(this.warn("Playback: "+W.toFixed(3)+" is located too far from the end of live sliding playlist: "+U+", reset currentTime to : "+K.toFixed(3)),G.currentTime=K))}},T.alignPlaylists=function(L,A){var G=this.levels,K=this.levelLastLoaded,W=this.fragPrevious,z=K!==null?G[K]:null,U=L.fragments.length;if(!U)return this.warn("No fragments in live playlist"),0;var P=L.fragments[0].start,H=!A,V=L.alignedSliding&&Object(M.isFiniteNumber)(P);if(H||!V&&!P){Object(r.alignStream)(W,z,L);var q=L.fragments[0].start;return this.log("Live playlist sliding: "+q.toFixed(2)+" start-sn: "+(A?A.startSN:"na")+"->"+L.startSN+" prev-sn: "+(W?W.sn:"na")+" fragments: "+U),q}return P},T.waitForCdnTuneIn=function(L){var A=3;return L.live&&L.canBlockReload&&L.tuneInGoal>Math.max(L.partHoldBack,L.partTarget*A)},T.setStartPosition=function(L,A){var G=this.startPosition;if(G<A&&(G=-1),G===-1||this.lastCurrentTime===-1){var K=L.startTimeOffset;Object(M.isFiniteNumber)(K)?(G=A+K,K<0&&(G+=L.totalduration),G=Math.min(Math.max(A,G),A+L.totalduration),this.log("Start time offset "+K+" found in playlist, adjust startPosition to "+G),this.startPosition=G):L.live?G=this.hls.liveSyncPosition||A:this.startPosition=G=0,this.lastCurrentTime=G}this.nextLoadPosition=G},T.getLoadPosition=function(){var L=this.media,A=0;return this.loadedmetadata&&L?A=L.currentTime:this.nextLoadPosition&&(A=this.nextLoadPosition),A},T.handleFragLoadAborted=function(L,A){this.transmuxer&&L.sn!=="initSegment"&&L.stats.aborted&&(this.warn("Fragment "+L.sn+(A?" part"+A.index:"")+" of level "+L.level+" was aborted"),this.resetFragmentLoading(L))},T.resetFragmentLoading=function(L){(!this.fragCurrent||!this.fragContextChanged(L))&&(this.state=C.IDLE)},T.onFragmentOrKeyLoadError=function(L,A){if(A.fatal)return;var G=A.frag;if(!G||G.type!==L)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 W=this.config;if(this.fragLoadError+1<=W.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(G.level))return;var z=Math.min(Math.pow(2,this.fragLoadError)*W.fragLoadingRetryDelay,W.fragLoadingMaxRetryTimeout);this.warn("Fragment "+G.sn+" of "+L+" "+G.level+" failed to load, retrying in "+z+"ms"),this.retryDate=self.performance.now()+z,this.fragLoadError++,this.state=C.FRAG_LOADING_WAITING_RETRY}else A.levelRetry?(L===c.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=C.IDLE):(b.logger.error(A.details+" reaches max retry, redispatch as fatal ..."),A.fatal=!0,this.hls.stopLoad(),this.state=C.ERROR)},T.afterBufferFlushed=function(L,A,G){if(!L)return;var K=S.BufferHelper.getBuffered(L);this.fragmentTracker.detectEvictedFragments(A,K,G),this.state===C.ENDED&&this.resetLoadingState()},T.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=C.IDLE},T.resetLiveStartWhenNotLoaded=function(L){if(!this.loadedmetadata){this.startFragRequested=!1;var A=this.levels?this.levels[L].details:null;if(A!=null&&A.live)return this.startPosition=-1,this.setStartPosition(A,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},T.updateLevelTiming=function(L,A,G,K){var W=this,z=G.details;console.assert(!!z,"level.details must be defined");var U=Object.keys(L.elementaryStreams).reduce(function(P,H){var V=L.elementaryStreams[H];if(V){var q=V.endPTS-V.startPTS;if(q<=0)return W.warn("Could not parse fragment "+L.sn+" "+H+" duration reliably ("+q+") resetting transmuxer to fallback to playlist timing"),W.resetTransmuxer(),P||!1;var Z=K?0:Object(o.updateFragPTSDTS)(z,L,V.startPTS,V.endPTS,V.startDTS,V.endDTS);return W.hls.trigger(p.Events.LEVEL_PTS_UPDATED,{details:z,level:G,drift:Z,type:H,frag:L,start:V.startPTS,end:V.endPTS}),!0}return P},!1);U?(this.state=C.PARSED,this.hls.trigger(p.Events.FRAG_PARSED,{frag:L,part:A})):this.resetLoadingState()},T.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},w(E,[{key:"state",get:function(){return this._state},set:function(L){var A=this._state;A!==L&&(this._state=L,this.log(A+"->"+L))}}]),E}(y.default)},"./src/controller/buffer-controller.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return i});var M=O("./src/polyfills/number.ts"),y=O("./src/events.ts"),m=O("./src/utils/logger.ts"),S=O("./src/errors.ts"),b=O("./src/utils/buffer-helper.ts"),p=O("./src/utils/mediasource-helper.ts"),d=O("./src/loader/fragment.ts"),t=O("./src/controller/buffer-operation-queue.ts"),l=Object(p.getMediaSource)(),r=/([ha]vc.)(?:\.[^.,]+)+/,i=function(){function o(u){var a=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 c=a.hls,f=a.media,w=a.mediaSource;m.logger.log("[buffer-controller]: Media source opened"),f&&(a.updateMediaElementDuration(),c.trigger(y.Events.MEDIA_ATTACHED,{media:f})),w&&w.removeEventListener("sourceopen",a._onMediaSourceOpen),a.checkPendingTracks()},this._onMediaSourceClose=function(){m.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){m.logger.log("[buffer-controller]: Media source ended")},this.hls=u,this._initSourceBuffer(),this.registerListeners()}var s=o.prototype;return s.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},s.destroy=function(){this.unregisterListeners(),this.details=null},s.registerListeners=function(){var a=this.hls;a.on(y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(y.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(y.Events.BUFFER_RESET,this.onBufferReset,this),a.on(y.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.on(y.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.on(y.Events.BUFFER_EOS,this.onBufferEos,this),a.on(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.on(y.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.on(y.Events.FRAG_PARSED,this.onFragParsed,this),a.on(y.Events.FRAG_CHANGED,this.onFragChanged,this)},s.unregisterListeners=function(){var a=this.hls;a.off(y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(y.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(y.Events.BUFFER_RESET,this.onBufferReset,this),a.off(y.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.off(y.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.off(y.Events.BUFFER_EOS,this.onBufferEos,this),a.off(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.off(y.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.off(y.Events.FRAG_PARSED,this.onFragParsed,this),a.off(y.Events.FRAG_CHANGED,this.onFragChanged,this)},s._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new t.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},s.onManifestParsed=function(a,c){var f=2;(c.audio&&!c.video||!c.altAudio)&&(f=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=f,this.details=null,m.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},s.onMediaAttaching=function(a,c){var f=this.media=c.media;if(f&&l){var w=this.mediaSource=new l;w.addEventListener("sourceopen",this._onMediaSourceOpen),w.addEventListener("sourceended",this._onMediaSourceEnded),w.addEventListener("sourceclose",this._onMediaSourceClose),f.src=self.URL.createObjectURL(w),this._objectUrl=f.src}},s.onMediaDetaching=function(){var a=this.media,c=this.mediaSource,f=this._objectUrl;if(c){if(m.logger.log("[buffer-controller]: media source detaching"),c.readyState==="open")try{c.endOfStream()}catch(w){m.logger.warn("[buffer-controller]: onMediaDetaching: "+w.message+" while calling endOfStream")}this.onBufferReset(),c.removeEventListener("sourceopen",this._onMediaSourceOpen),c.removeEventListener("sourceended",this._onMediaSourceEnded),c.removeEventListener("sourceclose",this._onMediaSourceClose),a&&(f&&self.URL.revokeObjectURL(f),a.src===f?(a.removeAttribute("src"),a.load()):m.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(y.Events.MEDIA_DETACHED,void 0)},s.onBufferReset=function(){var a=this;this.getSourceBufferTypes().forEach(function(c){var f=a.sourceBuffer[c];try{f&&(a.removeBufferListeners(c),a.mediaSource&&a.mediaSource.removeSourceBuffer(f),a.sourceBuffer[c]=void 0)}catch(w){m.logger.warn("[buffer-controller]: Failed to reset the "+c+" buffer",w)}}),this._initSourceBuffer()},s.onBufferCodecs=function(a,c){var f=this,w=this.getSourceBufferTypes().length;if(Object.keys(c).forEach(function(_){if(w){var h=f.tracks[_];if(h&&typeof h.buffer.changeType=="function"){var R=c[_],C=R.codec,g=R.levelCodec,x=R.container,E=(h.levelCodec||h.codec).replace(r,"$1"),T=(g||C).replace(r,"$1");if(E!==T){var k=x+";codecs="+(g||C);f.appendChangeType(_,k)}}}else f.pendingTracks[_]=c[_]}),w)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},s.appendChangeType=function(a,c){var f=this,w=this.operationQueue,_={execute:function(){var R=f.sourceBuffer[a];R&&(m.logger.log("[buffer-controller]: changing "+a+" sourceBuffer type to "+c),R.changeType(c)),w.shiftAndExecuteNext(a)},onStart:function(){},onComplete:function(){},onError:function(R){m.logger.warn("[buffer-controller]: Failed to change "+a+" SourceBuffer type",R)}};w.append(_,a)},s.onBufferAppending=function(a,c){var f=this,w=this.hls,_=this.operationQueue,h=this.tracks,R=c.data,C=c.type,g=c.frag,x=c.part,E=c.chunkMeta,T=E.buffering[C],k=self.performance.now();T.start=k;var L=g.stats.buffering,A=x?x.stats.buffering:null;L.start===0&&(L.start=k),A&&A.start===0&&(A.start=k);var G=h.audio,K=C==="audio"&&E.id===1&&(G==null?void 0:G.container)==="audio/mpeg",W={execute:function(){if(T.executeStart=self.performance.now(),K){var U=f.sourceBuffer[C];if(U){var P=g.start-U.timestampOffset;Math.abs(P)>=.1&&(m.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+g.start+" (delta: "+P+") sn: "+g.sn+")"),U.timestampOffset=g.start)}}f.appendExecutor(R,C)},onStart:function(){},onComplete:function(){var U=self.performance.now();T.executeEnd=T.end=U,L.first===0&&(L.first=U),A&&A.first===0&&(A.first=U);var P=f.sourceBuffer,H={};for(var V in P)H[V]=b.BufferHelper.getBuffered(P[V]);f.appendError=0,f.hls.trigger(y.Events.BUFFER_APPENDED,{type:C,frag:g,part:x,chunkMeta:E,parent:g.type,timeRanges:H})},onError:function(U){m.logger.error("[buffer-controller]: Error encountered while trying to append to the "+C+" SourceBuffer",U);var P={type:S.ErrorTypes.MEDIA_ERROR,parent:g.type,details:S.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?P.details=S.ErrorDetails.BUFFER_FULL_ERROR:(f.appendError++,P.details=S.ErrorDetails.BUFFER_APPEND_ERROR,f.appendError>w.config.appendErrorMaxRetry&&(m.logger.error("[buffer-controller]: Failed "+w.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),P.fatal=!0)),w.trigger(y.Events.ERROR,P)}};_.append(W,C)},s.onBufferFlushing=function(a,c){var f=this,w=this.operationQueue,_=function(R){return{execute:f.removeExecutor.bind(f,R,c.startOffset,c.endOffset),onStart:function(){},onComplete:function(){f.hls.trigger(y.Events.BUFFER_FLUSHED,{type:R})},onError:function(g){m.logger.warn("[buffer-controller]: Failed to remove from "+R+" SourceBuffer",g)}}};c.type?w.append(_(c.type),c.type):this.getSourceBufferTypes().forEach(function(h){w.append(_(h),h)})},s.onFragParsed=function(a,c){var f=this,w=c.frag,_=c.part,h=[],R=_?_.elementaryStreams:w.elementaryStreams;R[d.ElementaryStreamTypes.AUDIOVIDEO]?h.push("audiovideo"):(R[d.ElementaryStreamTypes.AUDIO]&&h.push("audio"),R[d.ElementaryStreamTypes.VIDEO]&&h.push("video"));var C=function(){var x=self.performance.now();w.stats.buffering.end=x,_&&(_.stats.buffering.end=x);var E=_?_.stats:w.stats;f.hls.trigger(y.Events.FRAG_BUFFERED,{frag:w,part:_,stats:E,id:w.type})};h.length===0&&m.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+w.type+" level: "+w.level+" sn: "+w.sn),this.blockBuffers(C,h)},s.onFragChanged=function(a,c){this.flushBackBuffer()},s.onBufferEos=function(a,c){var f=this,w=this.getSourceBufferTypes().reduce(function(_,h){var R=f.sourceBuffer[h];return(!c.type||c.type===h)&&(R&&!R.ended&&(R.ended=!0,m.logger.log("[buffer-controller]: "+h+" sourceBuffer now EOS"))),_&&!!(!R||R.ended)},!0);w&&this.blockBuffers(function(){var _=f.mediaSource;if(!_||_.readyState!=="open")return;_.endOfStream()})},s.onLevelUpdated=function(a,c){var f=c.details;if(!f.fragments.length)return;this.details=f,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},s.flushBackBuffer=function(){var a=this.hls,c=this.details,f=this.media,w=this.sourceBuffer;if(!f||c===null)return;var _=this.getSourceBufferTypes();if(!_.length)return;var h=c.live&&a.config.liveBackBufferLength!==null?a.config.liveBackBufferLength:a.config.backBufferLength;if(!Object(M.isFiniteNumber)(h)||h<0)return;var R=f.currentTime,C=c.levelTargetDuration,g=Math.max(h,C),x=Math.floor(R/C)*C-g;_.forEach(function(E){var T=w[E];if(T){var k=b.BufferHelper.getBuffered(T);k.length>0&&x>k.start(0)&&(a.trigger(y.Events.BACK_BUFFER_REACHED,{bufferEnd:x}),c.live&&a.trigger(y.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:x}),a.trigger(y.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:x,type:E}))}})},s.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var a=this.details,c=this.hls,f=this.media,w=this.mediaSource,_=a.fragments[0].start+a.totalduration,h=f.duration,R=Object(M.isFiniteNumber)(w.duration)?w.duration:0;a.live&&c.config.liveDurationInfinity?(m.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),w.duration=Infinity,this.updateSeekableRange(a)):(_>R&&_>h||!Object(M.isFiniteNumber)(h))&&(m.logger.log("[buffer-controller]: Updating Media Source duration to "+_.toFixed(3)),w.duration=_)},s.updateSeekableRange=function(a){var c=this.mediaSource,f=a.fragments,w=f.length;if(w&&a.live&&c!==null&&c!==void 0&&c.setLiveSeekableRange){var _=Math.max(0,f[0].start),h=Math.max(_,_+a.totalduration);c.setLiveSeekableRange(_,h)}},s.checkPendingTracks=function(){var a=this.bufferCodecEventsExpected,c=this.operationQueue,f=this.pendingTracks,w=Object.keys(f).length;if(w&&!a||w===2){this.createSourceBuffers(f),this.pendingTracks={};var _=this.getSourceBufferTypes();if(_.length===0){this.hls.trigger(y.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}_.forEach(function(h){c.executeNext(h)})}},s.createSourceBuffers=function(a){var c=this.sourceBuffer,f=this.mediaSource;if(!f)throw Error("createSourceBuffers called when mediaSource was null");var w=0;for(var _ in a)if(!c[_]){var h=a[_];if(!h)throw Error("source buffer exists for track "+_+", however track does not");var R=h.levelCodec||h.codec,C=h.container+";codecs="+R;m.logger.log("[buffer-controller]: creating sourceBuffer("+C+")");try{var g=c[_]=f.addSourceBuffer(C),x=_;this.addBufferListener(x,"updatestart",this._onSBUpdateStart),this.addBufferListener(x,"updateend",this._onSBUpdateEnd),this.addBufferListener(x,"error",this._onSBUpdateError),this.tracks[_]={buffer:g,codec:R,container:h.container,levelCodec:h.levelCodec,id:h.id},w++}catch(E){m.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+E.message),this.hls.trigger(y.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:E,mimeType:C})}}w&&this.hls.trigger(y.Events.BUFFER_CREATED,{tracks:this.tracks})},s._onSBUpdateStart=function(a){var c=this.operationQueue,f=c.current(a);f.onStart()},s._onSBUpdateEnd=function(a){var c=this.operationQueue,f=c.current(a);f.onComplete(),c.shiftAndExecuteNext(a)},s._onSBUpdateError=function(a,c){m.logger.error("[buffer-controller]: "+a+" SourceBuffer error",c),this.hls.trigger(y.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var f=this.operationQueue.current(a);f&&f.onError(c)},s.removeExecutor=function(a,c,f){var w=this.media,_=this.mediaSource,h=this.operationQueue,R=this.sourceBuffer,C=R[a];if(!w||!_||!C){m.logger.warn("[buffer-controller]: Attempting to remove from the "+a+" SourceBuffer, but it does not exist"),h.shiftAndExecuteNext(a);return}var g=Object(M.isFiniteNumber)(w.duration)?w.duration:Infinity,x=Object(M.isFiniteNumber)(_.duration)?_.duration:Infinity,E=Math.max(0,c),T=Math.min(f,g,x);T>E?(m.logger.log("[buffer-controller]: Removing ["+E+","+T+"] from the "+a+" SourceBuffer"),console.assert(!C.updating,a+" sourceBuffer must not be updating"),C.remove(E,T)):h.shiftAndExecuteNext(a)},s.appendExecutor=function(a,c){var f=this.operationQueue,w=this.sourceBuffer,_=w[c];if(!_){m.logger.warn("[buffer-controller]: Attempting to append to the "+c+" SourceBuffer, but it does not exist"),f.shiftAndExecuteNext(c);return}_.ended=!1,console.assert(!_.updating,c+" sourceBuffer must not be updating"),_.appendBuffer(a)},s.blockBuffers=function(a,c){var f=this;if(c===void 0&&(c=this.getSourceBufferTypes()),!c.length){m.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(a);return}var w=this.operationQueue,_=c.map(function(h){return w.appendBlocker(h)});Promise.all(_).then(function(){a(),c.forEach(function(h){var R=f.sourceBuffer[h];(!R||!R.updating)&&w.shiftAndExecuteNext(h)})})},s.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},s.addBufferListener=function(a,c,f){var w=this.sourceBuffer[a];if(!w)return;var _=f.bind(this,a);this.listeners[a].push({event:c,listener:_}),w.addEventListener(c,_)},s.removeBufferListeners=function(a){var c=this.sourceBuffer[a];if(!c)return;this.listeners[a].forEach(function(f){c.removeEventListener(f.event,f.listener)})},o}()},"./src/controller/buffer-operation-queue.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return y});var M=O("./src/utils/logger.ts"),y=function(){function m(b){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=b}var S=m.prototype;return S.append=function(p,d){var t=this.queues[d];t.push(p),t.length===1&&this.buffers[d]&&this.executeNext(d)},S.insertAbort=function(p,d){var t=this.queues[d];t.unshift(p),this.executeNext(d)},S.appendBlocker=function(p){var d,t=new Promise(function(r){d=r}),l={execute:d,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(l,p),t},S.executeNext=function(p){var d=this.buffers,t=this.queues,l=d[p],r=t[p];if(r.length){var i=r[0];try{i.execute()}catch(o){M.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),i.onError(o),(!l||!l.updating)&&(r.shift(),this.executeNext(p))}}},S.shiftAndExecuteNext=function(p){this.queues[p].shift(),this.executeNext(p)},S.current=function(p){return this.queues[p][0]},m}()},"./src/controller/cap-level-controller.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/events.ts");function y(b,p){for(var d=0;d<p.length;d++){var t=p[d];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(b,t.key,t)}}function m(b,p,d){return p&&y(b.prototype,p),d&&y(b,d),b}var S=function(){function b(d){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=d,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var p=b.prototype;return p.setStreamController=function(t){this.streamController=t},p.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},p.registerListeners=function(){var t=this.hls;t.on(M.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),t.on(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(M.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},p.unregisterListener=function(){var t=this.hls;t.off(M.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),t.off(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(M.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},p.onFpsDropLevelCapping=function(t,l){b.isLevelAllowed(l.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(l.droppedLevel)},p.onMediaAttaching=function(t,l){this.media=l.media instanceof HTMLVideoElement?l.media:null},p.onManifestParsed=function(t,l){var r=this.hls;this.restrictedLevels=[],this.firstLevel=l.firstLevel,r.config.capLevelToPlayerSize&&l.video&&this.startCapping()},p.onBufferCodecs=function(t,l){var r=this.hls;r.config.capLevelToPlayerSize&&l.video&&this.startCapping()},p.onMediaDetaching=function(){this.stopCapping()},p.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var t=this.hls.levels;if(t.length){var l=this.hls;l.autoLevelCapping=this.getMaxLevel(t.length-1),l.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=l.autoLevelCapping}}},p.getMaxLevel=function(t){var l=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter(function(o,s){return b.isLevelAllowed(s,l.restrictedLevels)&&s<=t});return this.clientRect=null,b.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},p.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()},p.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},p.getDimensions=function(){if(this.clientRect)return this.clientRect;var t=this.media,l={width:0,height:0};if(t){var r=t.getBoundingClientRect();l.width=r.width,l.height=r.height,!l.width&&!l.height&&(l.width=r.right-r.left||t.width||0,l.height=r.bottom-r.top||t.height||0)}return this.clientRect=l,l},b.isLevelAllowed=function(t,l){return l===void 0&&(l=[]),l.indexOf(t)===-1},b.getMaxLevelByMediaSize=function(t,l,r){if(!t||!t.length)return-1;for(var i=function(c,f){return f?c.width!==f.width||c.height!==f.height:!0},o=t.length-1,s=0;s<t.length;s+=1){var u=t[s];if((u.width>=l||u.height>=r)&&i(u,t[s+1])){o=s;break}}return o},m(b,[{key:"mediaWidth",get:function(){return this.getDimensions().width*b.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*b.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var t=1;try{t=self.devicePixelRatio}catch(l){}return t}}]),b}();v.default=S},"./src/controller/cmcd-controller.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return i});var M=O("./src/events.ts"),y=O("./src/types/cmcd.ts"),m=O("./src/utils/buffer-helper.ts"),S=O("./src/utils/logger.ts");function b(o,s){for(var u=0;u<s.length;u++){var a=s[u];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(o,a.key,a)}}function p(o,s,u){return s&&b(o.prototype,s),u&&b(o,u),o}function d(o,s){var u=typeof Symbol!="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(u)return(u=u.call(o)).next.bind(u);if(Array.isArray(o)||(u=t(o))||s&&o&&typeof o.length=="number"){u&&(o=u);var a=0;return function(){return a>=o.length?{done:!0}:{done:!1,value:o[a++]}}}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 t(o,s){if(!o)return;if(typeof o=="string")return l(o,s);var u=Object.prototype.toString.call(o).slice(8,-1);if(u==="Object"&&o.constructor&&(u=o.constructor.name),u==="Map"||u==="Set")return Array.from(o);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return l(o,s)}function l(o,s){(s==null||s>o.length)&&(s=o.length);for(var u=0,a=new Array(s);u<s;u++)a[u]=o[u];return a}function r(){return r=Object.assign||function(o){for(var s=1;s<arguments.length;s++){var u=arguments[s];for(var a in u)Object.prototype.hasOwnProperty.call(u,a)&&(o[a]=u[a])}return o},r.apply(this,arguments)}var i=function(){function o(u){var a=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(){a.initialized&&(a.starved=!0),a.buffering=!0},this.onPlaying=function(){a.initialized||(a.initialized=!0),a.buffering=!1},this.applyPlaylistData=function(w){try{a.apply(w,{ot:y.CMCDObjectType.MANIFEST,su:!a.initialized})}catch(_){S.logger.warn("Could not generate manifest CMCD data.",_)}},this.applyFragmentData=function(w){try{var _=w.frag,h=a.hls.levels[_.level],R=a.getObjectType(_),C={d:_.duration*1e3,ot:R};(R===y.CMCDObjectType.VIDEO||R===y.CMCDObjectType.AUDIO||R==y.CMCDObjectType.MUXED)&&(C.br=h.bitrate/1e3,C.tb=a.getTopBandwidth(R),C.bl=a.getBufferLength(R)),a.apply(w,C)}catch(g){S.logger.warn("Could not generate segment CMCD data.",g)}},this.hls=u;var c=this.config=u.config,f=c.cmcd;f!=null&&(c.pLoader=this.createPlaylistLoader(),c.fLoader=this.createFragmentLoader(),this.sid=f.sessionId||o.uuid(),this.cid=f.contentId,this.useHeaders=f.useHeaders===!0,this.registerListeners())}var s=o.prototype;return s.registerListeners=function(){var a=this.hls;a.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(M.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.on(M.Events.BUFFER_CREATED,this.onBufferCreated,this)},s.unregisterListeners=function(){var a=this.hls;a.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(M.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.off(M.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},s.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},s.onMediaAttached=function(a,c){this.media=c.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},s.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},s.onBufferCreated=function(a,c){var f,w;this.audioBuffer=(f=c.tracks.audio)===null||f===void 0?void 0:f.buffer,this.videoBuffer=(w=c.tracks.video)===null||w===void 0?void 0:w.buffer},s.createData=function(){var a;return{v:y.CMCDVersion,sf:y.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(a=this.media)===null||a===void 0?void 0:a.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},s.apply=function(a,c){c===void 0&&(c={}),r(c,this.createData());var f=c.ot===y.CMCDObjectType.INIT||c.ot===y.CMCDObjectType.VIDEO||c.ot===y.CMCDObjectType.MUXED;if(this.starved&&f&&(c.bs=!0,c.su=!0,this.starved=!1),c.su==null&&(c.su=this.buffering),this.useHeaders){var w=o.toHeaders(c);if(!Object.keys(w).length)return;a.headers||(a.headers={}),r(a.headers,w)}else{var _=o.toQuery(c);if(!_)return;a.url=o.appendQueryToUri(a.url,_)}},s.getObjectType=function(a){var c=a.type;return c==="subtitle"?y.CMCDObjectType.TIMED_TEXT:a.sn==="initSegment"?y.CMCDObjectType.INIT:c==="audio"?y.CMCDObjectType.AUDIO:c==="main"?this.hls.audioTracks.length?y.CMCDObjectType.VIDEO:y.CMCDObjectType.MUXED:void 0},s.getTopBandwidth=function(a){for(var c=0,f=a===y.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,w=d(f),_;!(_=w()).done;){var h=_.value;h.bitrate>c&&(c=h.bitrate)}return c>0?c:NaN},s.getBufferLength=function(a){var c=this.hls.media,f=a===y.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!f||!c)return NaN;var w=m.BufferHelper.bufferInfo(f,c.currentTime,this.config.maxBufferHole);return w.len*1e3},s.createPlaylistLoader=function(){var a=this.config.pLoader,c=this.applyPlaylistData,f=a||this.config.loader;return function(){function w(h){this.loader=void 0,this.loader=new f(h)}var _=w.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(R,C,g){c(R),this.loader.load(R,C,g)},p(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},s.createFragmentLoader=function(){var a=this.config.fLoader,c=this.applyFragmentData,f=a||this.config.loader;return function(){function w(h){this.loader=void 0,this.loader=new f(h)}var _=w.prototype;return _.destroy=function(){this.loader.destroy()},_.abort=function(){this.loader.abort()},_.load=function(R,C,g){c(R),this.loader.load(R,C,g)},p(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},o.uuid=function(){var a=URL.createObjectURL(new Blob),c=a.toString();return URL.revokeObjectURL(a),c.substr(c.lastIndexOf("/")+1)},o.serialize=function(a){for(var c=[],f=function(K){return!Number.isNaN(K)&&K!=null&&K!==""&&K!==!1},w=function(K){return Math.round(K)},_=function(K){return w(K/100)*100},h=function(K){return encodeURIComponent(K)},R={br:w,d:w,bl:_,dl:_,mtp:_,nor:h,rtp:_,tb:w},C=Object.keys(a||{}).sort(),g=d(C),x;!(x=g()).done;){var E=x.value,T=a[E];if(!f(T))continue;if(E==="v"&&T===1)continue;if(E=="pr"&&T===1)continue;var k=R[E];k&&(T=k(T));var L=typeof T,A=void 0;E==="ot"||E==="sf"||E==="st"?A=E+"="+T:L==="boolean"?A=E:L==="number"?A=E+"="+T:A=E+"="+JSON.stringify(T),c.push(A)}return c.join(",")},o.toHeaders=function(a){for(var c=Object.keys(a),f={},w=["Object","Request","Session","Status"],_=[{},{},{},{}],h={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},R=0,C=c;R<C.length;R++){var g=C[R],x=h[g]!=null?h[g]:1;_[x][g]=a[g]}for(var E=0;E<_.length;E++){var T=o.serialize(_[E]);T&&(f["CMCD-"+w[E]]=T)}return f},o.toQuery=function(a){return"CMCD="+encodeURIComponent(o.serialize(a))},o.appendQueryToUri=function(a,c){if(!c)return a;var f=a.includes("?")?"&":"?";return""+a+f+c},o}()},"./src/controller/eme-controller.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/events.ts"),y=O("./src/errors.ts"),m=O("./src/utils/logger.ts"),S=O("./src/utils/mediakeys-helper.ts");function b(i,o){for(var s=0;s<o.length;s++){var u=o[s];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function p(i,o,s){return o&&b(i.prototype,o),s&&b(i,s),i}var d=3,t=function(o,s,u){var a={audioCapabilities:[],videoCapabilities:[]};return o.forEach(function(c){a.audioCapabilities.push({contentType:'audio/mp4; codecs="'+c+'"',robustness:u.audioRobustness||""})}),s.forEach(function(c){a.videoCapabilities.push({contentType:'video/mp4; codecs="'+c+'"',robustness:u.videoRobustness||""})}),[a]},l=function(o,s,u,a){switch(o){case S.KeySystems.WIDEVINE:return t(s,u,a);default:throw new Error("Unknown key-system: "+o)}},r=function(){function i(s){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=s,this._config=s.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 o=i.prototype;return o.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},o._registerListeners=function(){this.hls.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(M.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(M.Events.MANIFEST_PARSED,this.onManifestParsed,this)},o._unregisterListeners=function(){this.hls.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(M.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(M.Events.MANIFEST_PARSED,this.onManifestParsed,this)},o.getLicenseServerUrl=function(u){switch(u){case S.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+u+'"')},o._attemptKeySystemAccess=function(u,a,c){var f=this,w=l(u,a,c,this._drmSystemOptions);m.logger.log("Requesting encrypted media key-system access");var _=this.requestMediaKeySystemAccess(u,w);this.mediaKeysPromise=_.then(function(h){return f._onMediaKeySystemAccessObtained(u,h)}),_.catch(function(h){m.logger.error('Failed to obtain key-system "'+u+'" access:',h)})},o._onMediaKeySystemAccessObtained=function(u,a){var c=this;m.logger.log('Access for key-system "'+u+'" obtained');var f={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:a,mediaKeySystemDomain:u};this._mediaKeysList.push(f);var w=Promise.resolve().then(function(){return a.createMediaKeys()}).then(function(_){return f.mediaKeys=_,m.logger.log('Media-keys created for key-system "'+u+'"'),c._onMediaKeysCreated(),_});return w.catch(function(_){m.logger.error("Failed to create media-keys:",_)}),w},o._onMediaKeysCreated=function(){var u=this;this._mediaKeysList.forEach(function(a){a.mediaKeysSession||(a.mediaKeysSession=a.mediaKeys.createSession(),u._onNewMediaKeySession(a.mediaKeysSession))})},o._onNewMediaKeySession=function(u){var a=this;m.logger.log("New key-system session "+u.sessionId),u.addEventListener("message",function(c){a._onKeySessionMessage(u,c.message)},!1)},o._onKeySessionMessage=function(u,a){m.logger.log("Got EME message event, creating license request"),this._requestLicense(a,function(c){m.logger.log("Received license data (length: "+(c&&c.byteLength)+"), updating key-session"),u.update(c)})},o.onMediaEncrypted=function(u){var a=this;if(m.logger.log('Media is encrypted using "'+u.initDataType+'" init data type'),!this.mediaKeysPromise){m.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var c=function(w){if(!a._media)return;a._attemptSetMediaKeys(w),a._generateRequestWithPreferredKeySession(u.initDataType,u.initData)};this.mediaKeysPromise.then(c).catch(c)},o._attemptSetMediaKeys=function(u){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var a=this._mediaKeysList[0];if(!a||!a.mediaKeys){m.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}m.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(a.mediaKeys),this._hasSetMediaKeys=!0}},o._generateRequestWithPreferredKeySession=function(u,a){var c=this,f=this._mediaKeysList[0];if(!f){m.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(f.mediaKeysSessionInitialized){m.logger.warn("Key-Session already initialized but requested again");return}var w=f.mediaKeysSession;if(!w){m.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!a){m.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}m.logger.log('Generating key-session request for "'+u+'" init data type'),f.mediaKeysSessionInitialized=!0,w.generateRequest(u,a).then(function(){m.logger.debug("Key-session generation succeeded")}).catch(function(_){m.logger.error("Error generating key-session request:",_),c.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},o._createLicenseXhr=function(u,a,c){var f=new XMLHttpRequest;f.responseType="arraybuffer",f.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,f,u,a,c);var w=this._licenseXhrSetup;if(w)try{w.call(this.hls,f,u),w=void 0}catch(_){m.logger.error(_)}try{f.readyState||f.open("POST",u,!0),w&&w.call(this.hls,f,u)}catch(_){throw new Error("issue setting up KeySystem license XHR "+_)}return f},o._onLicenseRequestReadyStageChange=function(u,a,c,f){switch(u.readyState){case 4:if(u.status===200){this._requestLicenseFailureCount=0,m.logger.log("License request succeeded");var w=u.response,_=this._licenseResponseCallback;if(_)try{w=_.call(this.hls,u,a)}catch(R){m.logger.error(R)}f(w)}else{if(m.logger.error("License Request XHR failed ("+a+"). Status: "+u.status+" ("+u.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>d){this.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var h=d-this._requestLicenseFailureCount+1;m.logger.warn("Retrying license request, "+h+" attempts left"),this._requestLicense(c,f)}break}},o._generateLicenseRequestChallenge=function(u,a){switch(u.mediaKeySystemDomain){case S.KeySystems.WIDEVINE:return a}throw new Error("unsupported key-system: "+u.mediaKeySystemDomain)},o._requestLicense=function(u,a){m.logger.log("Requesting content license for key-system");var c=this._mediaKeysList[0];if(!c){m.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var f=this.getLicenseServerUrl(c.mediaKeySystemDomain),w=this._createLicenseXhr(f,u,a);m.logger.log("Sending license request to URL: "+f);var _=this._generateLicenseRequestChallenge(c,u);w.send(_)}catch(h){m.logger.error("Failure requesting DRM license: "+h),this.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.KEY_SYSTEM_ERROR,details:y.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},o.onMediaAttached=function(u,a){if(!this._emeEnabled)return;var c=a.media;this._media=c,c.addEventListener("encrypted",this._onMediaEncrypted)},o.onMediaDetached=function(){var u=this._media,a=this._mediaKeysList;if(!u)return;u.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(a.map(function(c){if(c.mediaKeysSession)return c.mediaKeysSession.close().catch(function(){})})).then(function(){return u.setMediaKeys(null)}).catch(function(){})},o.onManifestParsed=function(u,a){if(!this._emeEnabled)return;var c=a.levels.map(function(w){return w.audioCodec}).filter(function(w){return!!w}),f=a.levels.map(function(w){return w.videoCodec}).filter(function(w){return!!w});this._attemptKeySystemAccess(S.KeySystems.WIDEVINE,c,f)},p(i,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),i}();v.default=r},"./src/controller/fps-controller.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/events.ts"),y=O("./src/utils/logger.ts"),m=function(){function S(p){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=p,this.registerListeners()}var b=S.prototype;return b.setStreamController=function(d){this.streamController=d},b.registerListeners=function(){this.hls.on(M.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},b.unregisterListeners=function(){this.hls.off(M.Events.MEDIA_ATTACHING,this.onMediaAttaching)},b.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},b.onMediaAttaching=function(d,t){var l=this.hls.config;if(l.capLevelOnFPSDrop){var r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&typeof r.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),l.fpsDroppedMonitoringPeriod)}},b.checkFPS=function(d,t,l){var r=performance.now();if(t){if(this.lastTime){var i=r-this.lastTime,o=l-this.lastDroppedFrames,s=t-this.lastDecodedFrames,u=1e3*o/i,a=this.hls;if(a.trigger(M.Events.FPS_DROP,{currentDropped:o,currentDecoded:s,totalDroppedFrames:l}),u>0&&o>a.config.fpsDroppedMonitoringThreshold*s){var c=a.currentLevel;y.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+c),c>0&&(a.autoLevelCapping===-1||a.autoLevelCapping>=c)&&(c=c-1,a.trigger(M.Events.FPS_DROP_LEVEL_CAPPING,{level:c,droppedLevel:a.currentLevel}),a.autoLevelCapping=c,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=l,this.lastDecodedFrames=t}},b.checkFPSInterval=function(){var d=this.media;if(d)if(this.isVideoPlaybackQualityAvailable){var t=d.getVideoPlaybackQuality();this.checkFPS(d,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(d,d.webkitDecodedFrameCount,d.webkitDroppedFrameCount)},S}();v.default=m},"./src/controller/fragment-finders.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"findFragmentByPDT",function(){return m}),O.d(v,"findFragmentByPTS",function(){return S}),O.d(v,"fragmentWithinToleranceTest",function(){return b}),O.d(v,"pdtWithinToleranceTest",function(){return p}),O.d(v,"findFragWithCC",function(){return d});var M=O("./src/polyfills/number.ts"),y=O("./src/utils/binary-search.ts");function m(t,l,r){if(l===null||!Array.isArray(t)||!t.length||!Object(M.isFiniteNumber)(l))return null;var i=t[0].programDateTime;if(l<(i||0))return null;var o=t[t.length-1].endProgramDateTime;if(l>=(o||0))return null;r=r||0;for(var s=0;s<t.length;++s){var u=t[s];if(p(l,r,u))return u}return null}function S(t,l,r,i){r===void 0&&(r=0),i===void 0&&(i=0);var o=null;if(t?o=l[t.sn-l[0].sn+1]||null:r===0&&l[0].start===0&&(o=l[0]),o&&b(r,i,o)===0)return o;var s=y.default.search(l,b.bind(null,r,i));return s||o}function b(t,l,r){t===void 0&&(t=0),l===void 0&&(l=0);var i=Math.min(l,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.start+r.duration-i<=t?1:r.start-i>t&&r.start?-1:0}function p(t,l,r){var i=Math.min(l,r.duration+(r.deltaPTS?r.deltaPTS:0))*1e3,o=r.endProgramDateTime||0;return o-i>t}function d(t,l){return y.default.search(t,function(r){return r.cc<l?1:r.cc>l?-1:0})}},"./src/controller/fragment-tracker.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"FragmentState",function(){return m}),O.d(v,"FragmentTracker",function(){return S});var M=O("./src/events.ts"),y=O("./src/types/loader.ts"),m;(function(d){d.NOT_LOADED="NOT_LOADED",d.BACKTRACKED="BACKTRACKED",d.APPENDING="APPENDING",d.PARTIAL="PARTIAL",d.OK="OK"})(m||(m={}));var S=function(){function d(l){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=l,this._registerListeners()}var t=d.prototype;return t._registerListeners=function(){var r=this.hls;r.on(M.Events.BUFFER_APPENDED,this.onBufferAppended,this),r.on(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),r.on(M.Events.FRAG_LOADED,this.onFragLoaded,this)},t._unregisterListeners=function(){var r=this.hls;r.off(M.Events.BUFFER_APPENDED,this.onBufferAppended,this),r.off(M.Events.FRAG_BUFFERED,this.onFragBuffered,this),r.off(M.Events.FRAG_LOADED,this.onFragLoaded,this)},t.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},t.getAppendedFrag=function(r,i){if(i===y.PlaylistLevelType.MAIN){var o=this.activeFragment,s=this.activeParts;if(!o)return null;if(s)for(var u=s.length;u--;){var a=s[u],c=a?a.end:o.appendedPTS;if(a.start<=r&&c!==void 0&&r<=c)return u>9&&(this.activeParts=s.slice(u-9)),a}else if(o.start<=r&&o.appendedPTS!==void 0&&r<=o.appendedPTS)return o}return this.getBufferedFrag(r,i)},t.getBufferedFrag=function(r,i){for(var o=this.fragments,s=Object.keys(o),u=s.length;u--;){var a=o[s[u]];if((a==null?void 0:a.body.type)===i&&a.buffered){var c=a.body;if(c.start<=r&&r<=c.end)return c}}return null},t.detectEvictedFragments=function(r,i,o){var s=this;Object.keys(this.fragments).forEach(function(u){var a=s.fragments[u];if(!a)return;if(!a.buffered){a.body.type===o&&s.removeFragment(a.body);return}var c=a.range[r];if(!c)return;c.time.some(function(f){var w=!s.isTimeBuffered(f.startPTS,f.endPTS,i);return w&&s.removeFragment(a.body),w})})},t.detectPartialFragments=function(r){var i=this,o=this.timeRanges,s=r.frag,u=r.part;if(!o||s.sn==="initSegment")return;var a=p(s),c=this.fragments[a];if(!c)return;Object.keys(o).forEach(function(f){var w=s.elementaryStreams[f];if(!w)return;var _=o[f],h=u!==null||w.partial===!0;c.range[f]=i.getBufferedTimes(s,u,h,_)}),c.backtrack=c.loaded=null,Object.keys(c.range).length?c.buffered=!0:this.removeFragment(c.body)},t.fragBuffered=function(r){var i=p(r),o=this.fragments[i];o&&(o.backtrack=o.loaded=null,o.buffered=!0)},t.getBufferedTimes=function(r,i,o,s){for(var u={time:[],partial:o},a=i?i.start:r.start,c=i?i.end:r.end,f=r.minEndPTS||c,w=r.maxStartPTS||a,_=0;_<s.length;_++){var h=s.start(_)-this.bufferPadding,R=s.end(_)+this.bufferPadding;if(w>=h&&f<=R){u.time.push({startPTS:Math.max(a,s.start(_)),endPTS:Math.min(c,s.end(_))});break}else if(a<R&&c>h)u.partial=!0,u.time.push({startPTS:Math.max(a,s.start(_)),endPTS:Math.min(c,s.end(_))});else if(c<=h)break}return u},t.getPartialFragment=function(r){var i=null,o,s,u,a=0,c=this.bufferPadding,f=this.fragments;return Object.keys(f).forEach(function(w){var _=f[w];if(!_)return;b(_)&&(s=_.body.start-c,u=_.body.end+c,r>=s&&r<=u&&(o=Math.min(r-s,u-r),a<=o&&(i=_.body,a=o)))}),i},t.getState=function(r){var i=p(r),o=this.fragments[i];return o?o.buffered?b(o)?m.PARTIAL:m.OK:o.backtrack?m.BACKTRACKED:m.APPENDING:m.NOT_LOADED},t.backtrack=function(r,i){var o=p(r),s=this.fragments[o];if(!s||s.backtrack)return null;var u=s.backtrack=i||s.loaded;return s.loaded=null,u},t.getBacktrackData=function(r){var i=p(r),o=this.fragments[i];if(o){var s,u=o.backtrack;if(u!=null&&(s=u.payload)!==null&&s!==void 0&&s.byteLength)return u;this.removeFragment(r)}return null},t.isTimeBuffered=function(r,i,o){for(var s,u,a=0;a<o.length;a++){if(s=o.start(a)-this.bufferPadding,u=o.end(a)+this.bufferPadding,r>=s&&i<=u)return!0;if(i<=s)return!1}return!1},t.onFragLoaded=function(r,i){var o=i.frag,s=i.part;if(o.sn==="initSegment"||o.bitrateTest||s)return;var u=p(o);this.fragments[u]={body:o,loaded:i,backtrack:null,buffered:!1,range:Object.create(null)}},t.onBufferAppended=function(r,i){var o=this,s=i.frag,u=i.part,a=i.timeRanges;if(s.type===y.PlaylistLevelType.MAIN)if(this.activeFragment=s,u){var c=this.activeParts;c||(this.activeParts=c=[]),c.push(u)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach(function(f){var w=a[f];if(o.detectEvictedFragments(f,w),!u)for(var _=0;_<w.length;_++)s.appendedPTS=Math.max(w.end(_),s.appendedPTS||0)})},t.onFragBuffered=function(r,i){this.detectPartialFragments(i)},t.hasFragment=function(r){var i=p(r);return!!this.fragments[i]},t.removeFragmentsInRange=function(r,i,o){var s=this;Object.keys(this.fragments).forEach(function(u){var a=s.fragments[u];if(!a)return;if(a.buffered){var c=a.body;c.type===o&&c.start<i&&c.end>r&&s.removeFragment(c)}})},t.removeFragment=function(r){var i=p(r);r.stats.loaded=0,r.clearElementaryStreamInfo(),delete this.fragments[i]},t.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},d}();function b(d){var t,l;return d.buffered&&(((t=d.range.video)===null||t===void 0?void 0:t.partial)||((l=d.range.audio)===null||l===void 0?void 0:l.partial))}function p(d){return d.type+"_"+d.level+"_"+d.urlId+"_"+d.sn}},"./src/controller/gap-controller.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"STALL_MINIMUM_DURATION_MS",function(){return b}),O.d(v,"MAX_START_GAP_JUMP",function(){return p}),O.d(v,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return d}),O.d(v,"SKIP_BUFFER_RANGE_START",function(){return t}),O.d(v,"default",function(){return l});var M=O("./src/utils/buffer-helper.ts"),y=O("./src/errors.ts"),m=O("./src/events.ts"),S=O("./src/utils/logger.ts"),b=250,p=2,d=.1,t=.05,l=function(){function r(o,s,u,a){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=o,this.media=s,this.fragmentTracker=u,this.hls=a}var i=r.prototype;return i.destroy=function(){this.hls=this.fragmentTracker=this.media=null},i.poll=function(s){var u=this.config,a=this.media,c=this.stalled,f=a.currentTime,w=a.seeking,_=this.seeking&&!w,h=!this.seeking&&w;if(this.seeking=w,f!==s){if(this.moved=!0,c!==null){if(this.stallReported){var R=self.performance.now()-c;S.logger.warn("playback not stuck anymore @"+f+", after "+Math.round(R)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((h||_)&&(this.stalled=null),a.paused||a.ended||a.playbackRate===0||!M.BufferHelper.getBuffered(a).length)return;var C=M.BufferHelper.bufferInfo(a,f,0),g=C.len>0,x=C.nextStart||0;if(!g&&!x)return;if(w){var E=C.len>p,T=!x||x-f>p&&!this.fragmentTracker.getPartialFragment(f);if(E||T)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var k,L=Math.max(x,C.start||0)-f,A=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,G=A==null||((k=A.details)===null||k===void 0)?void 0:k.live,K=G?A.details.targetduration*2:p;if(L>0&&L<=K){this._trySkipBufferHole(null);return}}var W=self.performance.now();if(c===null){this.stalled=W;return}var z=W-c;!w&&z>=b&&this._reportStall(C.len);var U=M.BufferHelper.bufferInfo(a,f,u.maxBufferHole);this._tryFixBufferStall(U,z)},i._tryFixBufferStall=function(s,u){var a=this.config,c=this.fragmentTracker,f=this.media,w=f.currentTime,_=c.getPartialFragment(w);if(_){var h=this._trySkipBufferHole(_);if(h)return}s.len>a.maxBufferHole&&u>a.highBufferWatchdogPeriod*1e3&&(S.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},i._reportStall=function(s){var u=this.hls,a=this.media,c=this.stallReported;c||(this.stallReported=!0,S.logger.warn("Playback stalling at @"+a.currentTime+" due to low buffer (buffer="+s+")"),u.trigger(m.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:s}))},i._trySkipBufferHole=function(s){for(var u=this.config,a=this.hls,c=this.media,f=c.currentTime,w=0,_=M.BufferHelper.getBuffered(c),h=0;h<_.length;h++){var R=_.start(h);if(f+u.maxBufferHole>=w&&f<R){var C=Math.max(R+t,c.currentTime+d);return S.logger.warn("skipping hole, adjusting currentTime from "+f+" to "+C),this.moved=!0,this.stalled=null,c.currentTime=C,s&&a.trigger(m.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+f+" to "+C,frag:s}),C}w=_.end(h)}return 0},i._tryNudgeBuffer=function(){var s=this.config,u=this.hls,a=this.media,c=a.currentTime,f=(this.nudgeRetry||0)+1;if(this.nudgeRetry=f,f<s.nudgeMaxRetry){var w=c+f*s.nudgeOffset;S.logger.warn("Nudging 'currentTime' from "+c+" to "+w),a.currentTime=w,u.trigger(m.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else S.logger.error("Playhead still not moving while enough data buffered @"+c+" after "+s.nudgeMaxRetry+" nudges"),u.trigger(m.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},r}()},"./src/controller/id3-track-controller.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/events.ts"),y=O("./src/utils/texttrack-utils.ts"),m=O("./src/demux/id3.ts"),S=.25,b=function(){function p(t){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=t,this._registerListeners()}var d=p.prototype;return d.destroy=function(){this._unregisterListeners()},d._registerListeners=function(){var l=this.hls;l.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(M.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),l.on(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},d._unregisterListeners=function(){var l=this.hls;l.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(M.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),l.off(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},d.onMediaAttached=function(l,r){this.media=r.media},d.onMediaDetaching=function(){if(!this.id3Track)return;Object(y.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},d.getID3Track=function(l){if(!this.media)return;for(var r=0;r<l.length;r++){var i=l[r];if(i.kind==="metadata"&&i.label==="id3")return Object(y.sendAddTrackEvent)(i,this.media),i}return this.media.addTextTrack("metadata","id3")},d.onFragParsingMetadata=function(l,r){if(!this.media)return;var i=r.frag,o=r.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var s=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,u=0;u<o.length;u++){var a=m.getID3Frames(o[u].data);if(a){var c=o[u].pts,f=u<o.length-1?o[u+1].pts:i.end,w=f-c;w<=0&&(f=c+S);for(var _=0;_<a.length;_++){var h=a[_];if(!m.isTimeStampFrame(h)){var R=new s(c,f,"");R.value=h,this.id3Track.addCue(R)}}}}},d.onBufferFlushing=function(l,r){var i=r.startOffset,o=r.endOffset,s=r.type;if(!s||s==="audio"){var u=this.id3Track;u&&Object(y.removeCuesInRange)(u,i,o)}},p}();v.default=b},"./src/controller/latency-controller.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return p});var M=O("./src/errors.ts"),y=O("./src/events.ts"),m=O("./src/utils/logger.ts");function S(d,t){for(var l=0;l<t.length;l++){var r=t[l];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(d,r.key,r)}}function b(d,t,l){return t&&S(d.prototype,t),l&&S(d,l),d}var p=function(){function d(l){var r=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 r.timeupdate()},this.hls=l,this.config=l.config,this.registerListeners()}var t=d.prototype;return t.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},t.registerListeners=function(){this.hls.on(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(y.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(y.Events.ERROR,this.onError,this)},t.unregisterListeners=function(){this.hls.off(y.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(y.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(y.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(y.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(y.Events.ERROR,this.onError)},t.onMediaAttached=function(r,i){this.media=i.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},t.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},t.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},t.onLevelUpdated=function(r,i){var o=i.details;this.levelDetails=o,o.advanced&&this.timeupdate(),!o.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},t.onError=function(r,i){if(i.details!==M.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,m.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},t.timeupdate=function(){var r=this.media,i=this.levelDetails;if(!r||!i)return;this.currentTime=r.currentTime;var o=this.computeLatency();if(o===null)return;this._latency=o;var s=this.config,u=s.lowLatencyMode,a=s.maxLiveSyncPlaybackRate;if(!u||a===1)return;var c=this.targetLatency;if(c===null)return;var f=o-c,w=Math.min(this.maxLatency,c+i.targetduration),_=f<w;if(i.live&&_&&f>.05&&this.forwardBufferLength>1){var h=Math.min(2,Math.max(1,a)),R=Math.round(2/(1+Math.exp(-.75*f-this.edgeStalled))*20)/20;r.playbackRate=Math.min(h,Math.max(1,R))}else r.playbackRate!==1&&r.playbackRate!==0&&(r.playbackRate=1)},t.estimateLiveEdge=function(){var r=this.levelDetails;return r===null?null:r.edge+r.age},t.computeLatency=function(){var r=this.estimateLiveEdge();return r===null?null:r-this.currentTime},b(d,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var r=this.config,i=this.levelDetails;return r.liveMaxLatencyDuration!==void 0?r.liveMaxLatencyDuration:i?r.liveMaxLatencyDurationCount*i.targetduration:0}},{key:"targetLatency",get:function(){var r=this.levelDetails;if(r===null)return null;var i=r.holdBack,o=r.partHoldBack,s=r.targetduration,u=this.config,a=u.liveSyncDuration,c=u.liveSyncDurationCount,f=u.lowLatencyMode,w=this.hls.userConfig,_=f&&o||i;(w.liveSyncDuration||w.liveSyncDurationCount||_===0)&&(_=a!==void 0?a:c*s);var h=s,R=1;return _+Math.min(this.stallCount*R,h)}},{key:"liveSyncPosition",get:function(){var r=this.estimateLiveEdge(),i=this.targetLatency,o=this.levelDetails;if(r===null||i===null||o===null)return null;var s=o.edge,u=r-i-this.edgeStalled,a=s-o.totalduration,c=s-(this.config.lowLatencyMode&&o.partTarget||o.targetduration);return Math.min(Math.max(a,u),c)}},{key:"drift",get:function(){var r=this.levelDetails;return r===null?1:r.drift}},{key:"edgeStalled",get:function(){var r=this.levelDetails;if(r===null)return 0;var i=(this.config.lowLatencyMode&&r.partTarget||r.targetduration)*3;return Math.max(r.age-i,0)}},{key:"forwardBufferLength",get:function(){var r=this.media,i=this.levelDetails;if(!r||!i)return 0;var o=r.buffered.length;return o?r.buffered.end(o-1):i.edge-this.currentTime}}]),d}()},"./src/controller/level-controller.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return u});var M=O("./src/types/level.ts"),y=O("./src/events.ts"),m=O("./src/errors.ts"),S=O("./src/utils/codecs.ts"),b=O("./src/controller/level-helper.ts"),p=O("./src/controller/base-playlist-controller.ts"),d=O("./src/types/loader.ts");function t(){return t=Object.assign||function(a){for(var c=1;c<arguments.length;c++){var f=arguments[c];for(var w in f)Object.prototype.hasOwnProperty.call(f,w)&&(a[w]=f[w])}return a},t.apply(this,arguments)}function l(a,c){for(var f=0;f<c.length;f++){var w=c[f];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(a,w.key,w)}}function r(a,c,f){return c&&l(a.prototype,c),f&&l(a,f),a}function i(a,c){a.prototype=Object.create(c.prototype),a.prototype.constructor=a,o(a,c)}function o(a,c){return o=Object.setPrototypeOf||function(w,_){return w.__proto__=_,w},o(a,c)}var s=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),u=function(a){i(c,a);function c(w){var _;return _=a.call(this,w,"[level-controller]")||this,_._levels=[],_._firstLevel=-1,_._startLevel=void 0,_.currentLevelIndex=-1,_.manualLevelIndex=-1,_.onParsedComplete=void 0,_._registerListeners(),_}var f=c.prototype;return f._registerListeners=function(){var _=this.hls;_.on(y.Events.MANIFEST_LOADED,this.onManifestLoaded,this),_.on(y.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.on(y.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),_.on(y.Events.FRAG_LOADED,this.onFragLoaded,this),_.on(y.Events.ERROR,this.onError,this)},f._unregisterListeners=function(){var _=this.hls;_.off(y.Events.MANIFEST_LOADED,this.onManifestLoaded,this),_.off(y.Events.LEVEL_LOADED,this.onLevelLoaded,this),_.off(y.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),_.off(y.Events.FRAG_LOADED,this.onFragLoaded,this),_.off(y.Events.ERROR,this.onError,this)},f.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,a.prototype.destroy.call(this)},f.startLoad=function(){var _=this._levels;_.forEach(function(h){h.loadError=0}),a.prototype.startLoad.call(this)},f.onManifestLoaded=function(_,h){var R=[],C=[],g=[],x,E={},T,k=!1,L=!1,A=!1;if(h.levels.forEach(function(z){var U=z.attrs;k=k||!!(z.width&&z.height),L=L||!!z.videoCodec,A=A||!!z.audioCodec,s&&z.audioCodec&&z.audioCodec.indexOf("mp4a.40.34")!==-1&&(z.audioCodec=void 0);var P=z.bitrate+"-"+z.attrs.RESOLUTION+"-"+z.attrs.CODECS;T=E[P],T?T.url.push(z.url):(T=new M.Level(z),E[P]=T,R.push(T)),U&&(U.AUDIO&&Object(b.addGroupId)(T,"audio",U.AUDIO),U.SUBTITLES&&Object(b.addGroupId)(T,"text",U.SUBTITLES))}),(k||L)&&A&&(R=R.filter(function(z){var U=z.videoCodec,P=z.width,H=z.height;return!!U||!!(P&&H)})),R=R.filter(function(z){var U=z.audioCodec,P=z.videoCodec;return(!U||Object(S.isCodecSupportedInMp4)(U,"audio"))&&(!P||Object(S.isCodecSupportedInMp4)(P,"video"))}),h.audioTracks&&(C=h.audioTracks.filter(function(z){return!z.audioCodec||Object(S.isCodecSupportedInMp4)(z.audioCodec,"audio")}),Object(b.assignTrackIdsByGroup)(C)),h.subtitles&&(g=h.subtitles,Object(b.assignTrackIdsByGroup)(g)),R.length>0){x=R[0].bitrate,R.sort(function(z,U){return z.bitrate-U.bitrate}),this._levels=R;for(var G=0;G<R.length;G++)if(R[G].bitrate===x){this._firstLevel=G,this.log("manifest loaded, "+R.length+" level(s) found, first bitrate: "+x);break}var K=A&&!L,W={levels:R,audioTracks:C,subtitleTracks:g,firstLevel:this._firstLevel,stats:h.stats,audio:A,video:L,altAudio:!K&&C.some(function(z){return!!z.url})};this.hls.trigger(y.Events.MANIFEST_PARSED,W),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(y.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:h.url,reason:"no level with compatible codecs found in manifest"})},f.onError=function(_,h){if(a.prototype.onError.call(this,_,h),h.fatal)return;var R=h.context,C=this._levels[this.currentLevelIndex];if(R&&(R.type===d.PlaylistContextType.AUDIO_TRACK&&C.audioGroupIds&&R.groupId===C.audioGroupIds[C.urlId]||R.type===d.PlaylistContextType.SUBTITLE_TRACK&&C.textGroupIds&&R.groupId===C.textGroupIds[C.urlId])){this.redundantFailover(this.currentLevelIndex);return}var g=!1,x=!0,E;switch(h.details){case m.ErrorDetails.FRAG_LOAD_ERROR:case m.ErrorDetails.FRAG_LOAD_TIMEOUT:case m.ErrorDetails.KEY_LOAD_ERROR:case m.ErrorDetails.KEY_LOAD_TIMEOUT:if(h.frag){var T=this._levels[h.frag.level];T?(T.fragmentError++,T.fragmentError>this.hls.config.fragLoadingMaxRetry&&(E=h.frag.level)):E=h.frag.level}break;case m.ErrorDetails.LEVEL_LOAD_ERROR:case m.ErrorDetails.LEVEL_LOAD_TIMEOUT:R&&(R.deliveryDirectives&&(x=!1),E=R.level),g=!0;break;case m.ErrorDetails.REMUX_ALLOC_ERROR:E=h.level,g=!0;break}E!==void 0&&this.recoverLevel(h,E,g,x)},f.recoverLevel=function(_,h,R,C){var g=_.details,x=this._levels[h];if(x.loadError++,R){var E=this.retryLoadingOrFail(_);if(E)_.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(C){var T=x.url.length;if(T>1&&x.loadError<T)_.levelRetry=!0,this.redundantFailover(h);else if(this.manualLevelIndex===-1){var k=h===0?this._levels.length-1:h-1;this.currentLevelIndex!==k&&this._levels[k].loadError===0&&(this.warn(g+": switch to "+k),_.levelRetry=!0,this.hls.nextAutoLevel=k)}}},f.redundantFailover=function(_){var h=this._levels[_],R=h.url.length;if(R>1){var C=(h.urlId+1)%R;this.warn("Switching to redundant URL-id "+C),this._levels.forEach(function(g){g.urlId=C}),this.level=_}},f.onFragLoaded=function(_,h){var R=h.frag;if(R!==void 0&&R.type===d.PlaylistLevelType.MAIN){var C=this._levels[R.level];C!==void 0&&(C.fragmentError=0,C.loadError=0)}},f.onLevelLoaded=function(_,h){var R,C=h.level,g=h.details,x=this._levels[C];if(!x){var E;this.warn("Invalid level index "+C),(E=h.deliveryDirectives)!==null&&E!==void 0&&E.skip&&(g.deltaUpdateFailed=!0);return}C===this.currentLevelIndex?(x.fragmentError===0&&(x.loadError=0,this.retryCount=0),this.playlistLoaded(C,h,x.details)):(R=h.deliveryDirectives)!==null&&R!==void 0&&R.skip&&(g.deltaUpdateFailed=!0)},f.onAudioTrackSwitched=function(_,h){var R=this.hls.levels[this.currentLevelIndex];if(!R)return;if(R.audioGroupIds){for(var C=-1,g=this.hls.audioTracks[h.id].groupId,x=0;x<R.audioGroupIds.length;x++)if(R.audioGroupIds[x]===g){C=x;break}C!==R.urlId&&(R.urlId=C,this.startLoad())}},f.loadPlaylist=function(_){var h=this.currentLevelIndex,R=this._levels[h];if(this.canLoad&&R&&R.url.length>0){var C=R.urlId,g=R.url[C];if(_)try{g=_.addDirectives(g)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Attempt loading level index "+h+(_?" at sn "+_.msn+" part "+_.part:"")+" with URL-id "+C+" "+g),this.clearTimer(),this.hls.trigger(y.Events.LEVEL_LOADING,{url:g,level:h,id:C,deliveryDirectives:_||null})}},f.removeLevel=function(_,h){var R=function(x,E){return E!==h},C=this._levels.filter(function(g,x){return x!==_?!0:g.url.length>1&&h!==void 0?(g.url=g.url.filter(R),g.audioGroupIds&&(g.audioGroupIds=g.audioGroupIds.filter(R)),g.textGroupIds&&(g.textGroupIds=g.textGroupIds.filter(R)),g.urlId=0,!0):!1}).map(function(g,x){var E=g.details;return E!=null&&E.fragments&&E.fragments.forEach(function(T){T.level=x}),g});this._levels=C,this.hls.trigger(y.Events.LEVELS_UPDATED,{levels:C})},r(c,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(_){var h,R=this._levels;if(R.length===0)return;if(this.currentLevelIndex===_&&(h=R[_])!==null&&h!==void 0&&h.details)return;if(_<0||_>=R.length){var C=_<0;if(this.hls.trigger(y.Events.ERROR,{type:m.ErrorTypes.OTHER_ERROR,details:m.ErrorDetails.LEVEL_SWITCH_ERROR,level:_,fatal:C,reason:"invalid level idx"}),C)return;_=Math.min(_,R.length-1)}this.clearTimer();var g=this.currentLevelIndex,x=R[g],E=R[_];this.log("switching to level "+_+" from "+g),this.currentLevelIndex=_;var T=t({},E,{level:_,maxBitrate:E.maxBitrate,uri:E.uri,urlId:E.urlId});delete T._urlId,this.hls.trigger(y.Events.LEVEL_SWITCHING,T);var k=E.details;if(!k||k.live){var L=this.switchParams(E.uri,x==null?void 0:x.details);this.loadPlaylist(L)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(_){this.manualLevelIndex=_,this._startLevel===void 0&&(this._startLevel=_),_!==-1&&(this.level=_)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(_){this._firstLevel=_}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var _=this.hls.config.startLevel;return _!==void 0?_:this._firstLevel}else return this._startLevel},set:function(_){this._startLevel=_}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(_){this.level=_,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=_)}}]),c}(p.default)},"./src/controller/level-helper.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"addGroupId",function(){return m}),O.d(v,"assignTrackIdsByGroup",function(){return S}),O.d(v,"updatePTS",function(){return b}),O.d(v,"updateFragPTSDTS",function(){return d}),O.d(v,"mergeDetails",function(){return t}),O.d(v,"mapPartIntersection",function(){return l}),O.d(v,"mapFragmentIntersection",function(){return r}),O.d(v,"adjustSliding",function(){return i}),O.d(v,"addSliding",function(){return o}),O.d(v,"computeReloadInterval",function(){return s}),O.d(v,"getFragmentWithSN",function(){return u}),O.d(v,"getPartWith",function(){return a});var M=O("./src/polyfills/number.ts"),y=O("./src/utils/logger.ts");function m(c,f,w){switch(f){case"audio":c.audioGroupIds||(c.audioGroupIds=[]),c.audioGroupIds.push(w);break;case"text":c.textGroupIds||(c.textGroupIds=[]),c.textGroupIds.push(w);break}}function S(c){var f={};c.forEach(function(w){var _=w.groupId||"";w.id=f[_]=f[_]||0,f[_]++})}function b(c,f,w){var _=c[f],h=c[w];p(_,h)}function p(c,f){var w=f.startPTS;if(Object(M.isFiniteNumber)(w)){var _=0,h;f.sn>c.sn?(_=w-c.start,h=c):(_=c.start-w,h=f),h.duration!==_&&(h.duration=_)}else if(f.sn>c.sn){var R=c.cc===f.cc;R&&c.minEndPTS?f.start=c.start+(c.minEndPTS-c.start):f.start=c.start+c.duration}else f.start=Math.max(c.start-f.duration,0)}function d(c,f,w,_,h,R){var C=_-w;C<=0&&(y.logger.warn("Fragment should have a positive duration",f),_=w+f.duration,R=h+f.duration);var g=w,x=_,E=f.startPTS,T=f.endPTS;if(Object(M.isFiniteNumber)(E)){var k=Math.abs(E-w);Object(M.isFiniteNumber)(f.deltaPTS)?f.deltaPTS=Math.max(k,f.deltaPTS):f.deltaPTS=k,g=Math.max(w,E),w=Math.min(w,E),h=Math.min(h,f.startDTS),x=Math.min(_,T),_=Math.max(_,T),R=Math.max(R,f.endDTS)}f.duration=_-w;var L=w-f.start;f.appendedPTS=_,f.start=f.startPTS=w,f.maxStartPTS=g,f.startDTS=h,f.endPTS=_,f.minEndPTS=x,f.endDTS=R;var A=f.sn;if(!c||A<c.startSN||A>c.endSN)return 0;var G,K=A-c.startSN,W=c.fragments;for(W[K]=f,G=K;G>0;G--)p(W[G],W[G-1]);for(G=K;G<W.length-1;G++)p(W[G],W[G+1]);return c.fragmentHint&&p(W[W.length-1],c.fragmentHint),c.PTSKnown=c.alignedSliding=!0,L}function t(c,f){for(var w=null,_=c.fragments,h=_.length-1;h>=0;h--){var R=_[h].initSegment;if(R){w=R;break}}c.fragmentHint&&delete c.fragmentHint.endPTS;var C=0,g;if(r(c,f,function(G,K){G.relurl&&(C=G.cc-K.cc),Object(M.isFiniteNumber)(G.startPTS)&&Object(M.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&&(g=K),f.PTSKnown=f.alignedSliding=!0),K.elementaryStreams=G.elementaryStreams,K.loader=G.loader,K.stats=G.stats,K.urlId=G.urlId,G.initSegment&&(K.initSegment=G.initSegment,w=G.initSegment)}),w){var x=f.fragmentHint?f.fragments.concat(f.fragmentHint):f.fragments;x.forEach(function(G){var K;(!G.initSegment||G.initSegment.relurl===((K=w)===null||K===void 0?void 0:K.relurl))&&(G.initSegment=w)})}if(f.skippedSegments&&(f.deltaUpdateFailed=f.fragments.some(function(G){return!G}),f.deltaUpdateFailed)){y.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var E=f.skippedSegments;E--;)f.fragments.shift();f.startSN=f.fragments[0].sn,f.startCC=f.fragments[0].cc}var T=f.fragments;if(C){y.logger.warn("discontinuity sliding from playlist, take drift into account");for(var k=0;k<T.length;k++)T[k].cc+=C}f.skippedSegments&&(f.startCC=f.fragments[0].cc),l(c.partList,f.partList,function(G,K){K.elementaryStreams=G.elementaryStreams,K.stats=G.stats}),g?d(f,g,g.startPTS,g.endPTS,g.startDTS,g.endDTS):i(c,f),T.length&&(f.totalduration=f.edge-T[0].start),f.driftStartTime=c.driftStartTime,f.driftStart=c.driftStart;var L=f.advancedDateTime;if(f.advanced&&L){var A=f.edge;f.driftStart||(f.driftStartTime=L,f.driftStart=A),f.driftEndTime=L,f.driftEnd=A}else f.driftEndTime=c.driftEndTime,f.driftEnd=c.driftEnd,f.advancedDateTime=c.advancedDateTime}function l(c,f,w){if(c&&f)for(var _=0,h=0,R=c.length;h<=R;h++){var C=c[h],g=f[h+_];C&&g&&C.index===g.index&&C.fragment.sn===g.fragment.sn?w(C,g):_--}}function r(c,f,w){for(var _=f.skippedSegments,h=Math.max(c.startSN,f.startSN)-f.startSN,R=(c.fragmentHint?1:0)+(_?f.endSN:Math.min(c.endSN,f.endSN))-f.startSN,C=f.startSN-c.startSN,g=f.fragmentHint?f.fragments.concat(f.fragmentHint):f.fragments,x=c.fragmentHint?c.fragments.concat(c.fragmentHint):c.fragments,E=h;E<=R;E++){var T=x[C+E],k=g[E];_&&!k&&E<_&&(k=f.fragments[E]=T),T&&k&&w(T,k)}}function i(c,f){var w=f.startSN+f.skippedSegments-c.startSN,_=c.fragments;if(w<0||w>=_.length)return;o(f,_[w].start)}function o(c,f){if(f){for(var w=c.fragments,_=c.skippedSegments;_<w.length;_++)w[_].start+=f;c.fragmentHint&&(c.fragmentHint.start+=f)}}function s(c,f){var w=1e3*c.levelTargetDuration,_=w/2,h=c.age,R=h>0&&h<w*3,C=f.loading.end-f.loading.start,g,x=c.availabilityDelay;if(c.updated===!1)if(R){var E=333*c.misses;g=Math.max(Math.min(_,C*2),E),c.availabilityDelay=(c.availabilityDelay||0)+g}else g=_;else R?(x=Math.min(x||w/2,h),c.availabilityDelay=x,g=x+w-h):g=w-C;return Math.round(g)}function u(c,f,w){if(!c||!c.details)return null;var _=c.details,h=_.fragments[f-_.startSN];return h||(h=_.fragmentHint,h&&h.sn===f?h:f<_.startSN&&w&&w.sn===f?w:null)}function a(c,f,w){if(!c||!c.details)return null;var _=c.details.partList;if(_)for(var h=_.length;h--;){var R=_[h];if(R.index===w&&R.fragment.sn===f)return R}return null}},"./src/controller/stream-controller.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return _});var M=O("./src/polyfills/number.ts"),y=O("./src/controller/base-stream-controller.ts"),m=O("./src/is-supported.ts"),S=O("./src/events.ts"),b=O("./src/utils/buffer-helper.ts"),p=O("./src/controller/fragment-tracker.ts"),d=O("./src/types/loader.ts"),t=O("./src/loader/fragment.ts"),l=O("./src/demux/transmuxer-interface.ts"),r=O("./src/types/transmuxer.ts"),i=O("./src/controller/gap-controller.ts"),o=O("./src/errors.ts"),s=O("./src/utils/logger.ts");function u(h,R){for(var C=0;C<R.length;C++){var g=R[C];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(h,g.key,g)}}function a(h,R,C){return R&&u(h.prototype,R),C&&u(h,C),h}function c(h,R){h.prototype=Object.create(R.prototype),h.prototype.constructor=h,f(h,R)}function f(h,R){return f=Object.setPrototypeOf||function(g,x){return g.__proto__=x,g},f(h,R)}var w=100,_=function(h){c(R,h);function R(g,x){var E;return E=h.call(this,g,x,"[stream-controller]")||this,E.audioCodecSwap=!1,E.gapController=null,E.level=-1,E._forceStartLoad=!1,E.altAudio=!1,E.audioOnly=!1,E.fragPlaying=null,E.onvplaying=null,E.onvseeked=null,E.fragLastKbps=0,E.stalled=!1,E.couldBacktrack=!1,E.audioCodecSwitch=!1,E.videoBuffer=null,E._registerListeners(),E}var C=R.prototype;return C._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)},C._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)},C.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},C.startLoad=function(x){if(this.levels){var E=this.lastCurrentTime,T=this.hls;if(this.stopLoad(),this.setInterval(w),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var k=T.startLevel;k===-1&&(T.config.testBandwidth?(k=0,this.bitrateTest=!0):k=T.nextAutoLevel),this.level=T.nextLoadLevel=k,this.loadedmetadata=!1}E>0&&x===-1&&(this.log("Override startPosition with lastCurrentTime @"+E.toFixed(3)),x=E),this.state=y.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,this.tick()}else this._forceStartLoad=!0,this.state=y.State.STOPPED},C.stopLoad=function(){this._forceStartLoad=!1,h.prototype.stopLoad.call(this)},C.doTick=function(){switch(this.state){case y.State.IDLE:this.doTickIdle();break;case y.State.WAITING_LEVEL:{var x,E=this.levels,T=this.level,k=E==null||((x=E[T])===null||x===void 0)?void 0:x.details;if(k&&(!k.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(k))break;this.state=y.State.IDLE;break}break}case y.State.FRAG_LOADING_WAITING_RETRY:{var L,A=self.performance.now(),G=this.retryDate;(!G||A>=G||(L=this.media)!==null&&L!==void 0&&L.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=y.State.IDLE)}break;default:break}this.onTickEnd()},C.onTickEnd=function(){h.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},C.doTickIdle=function(){var x,E,T=this.hls,k=this.levelLastLoaded,L=this.levels,A=this.media,G=T.config,K=T.nextLoadLevel;if(k===null||!A&&(this.startFragRequested||!G.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!L||!L[K])return;var W=L[K];this.level=T.nextLoadLevel=K;var z=W.details;if(!z||this.state===y.State.WAITING_LEVEL||z.live&&this.levelLastLoaded!==K){this.state=y.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:A,d.PlaylistLevelType.MAIN);if(U===null)return;var P=U.len,H=this.getMaxBufferLength(W.maxBitrate);if(P>=H)return;if(this._streamEnded(U,z)){var V={};this.altAudio&&(V.type="video"),this.hls.trigger(S.Events.BUFFER_EOS,V),this.state=y.State.ENDED;return}var q=U.end,Z=this.getNextFragment(q,z);if(this.couldBacktrack&&!this.fragPrevious&&Z&&Z.sn!=="initSegment"){var ce=Z.sn-z.startSN;ce>1&&(Z=z.fragments[ce-1],this.fragmentTracker.removeFragment(Z))}if(Z&&this.fragmentTracker.getState(Z)===p.FragmentState.OK&&this.nextLoadPosition>q){var he=this.audioOnly&&!this.altAudio?t.ElementaryStreamTypes.AUDIO:t.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(A,he,d.PlaylistLevelType.MAIN),Z=this.getNextFragment(this.nextLoadPosition,z)}if(!Z)return;Z.initSegment&&!Z.initSegment.data&&!this.bitrateTest&&(Z=Z.initSegment),((x=Z.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((E=Z.decryptdata)!==null&&E!==void 0&&E.key)?this.loadKey(Z,z):this.loadFragment(Z,z,q)},C.loadFragment=function(x,E,T){var k,L=this.fragmentTracker.getState(x);if(this.fragCurrent=x,L===p.FragmentState.BACKTRACKED){var A=this.fragmentTracker.getBacktrackData(x);if(A){this._handleFragmentLoadProgress(A),this._handleFragmentLoadComplete(A);return}else L=p.FragmentState.NOT_LOADED}L===p.FragmentState.NOT_LOADED||L===p.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,h.prototype.loadFragment.call(this,x,E,T)):L===p.FragmentState.APPENDING?this.reduceMaxBufferLength(x.duration)&&this.fragmentTracker.removeFragment(x):((k=this.media)===null||k===void 0?void 0:k.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},C.getAppendedFrag=function(x){var E=this.fragmentTracker.getAppendedFrag(x,d.PlaylistLevelType.MAIN);return E&&"fragment"in E?E.fragment:E},C.getBufferedFrag=function(x){return this.fragmentTracker.getBufferedFrag(x,d.PlaylistLevelType.MAIN)},C.followingBufferedFrag=function(x){return x?this.getBufferedFrag(x.end+.5):null},C.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},C.nextLevelSwitch=function(){var x=this.levels,E=this.media;if(E!=null&&E.readyState){var T,k=this.getAppendedFrag(E.currentTime);if(k&&k.start>1&&this.flushMainBuffer(0,k.start-1),!E.paused&&x){var L=this.hls.nextLoadLevel,A=x[L],G=this.fragLastKbps;G&&this.fragCurrent?T=this.fragCurrent.duration*A.maxBitrate/(1e3*G)+1:T=0}else T=0;var K=this.getBufferedFrag(E.currentTime+T);if(K){var W=this.followingBufferedFrag(K);if(W){this.abortCurrentFrag();var z=W.maxStartPTS?W.maxStartPTS:W.start,U=W.duration,P=Math.max(K.end,z+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(P,Number.POSITIVE_INFINITY)}}}},C.abortCurrentFrag=function(){var x=this.fragCurrent;this.fragCurrent=null,x!=null&&x.loader&&x.loader.abort(),this.state===y.State.KEY_LOADING&&(this.state=y.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},C.flushMainBuffer=function(x,E){h.prototype.flushMainBuffer.call(this,x,E,this.altAudio?"video":null)},C.onMediaAttached=function(x,E){h.prototype.onMediaAttached.call(this,x,E);var T=E.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),T.addEventListener("playing",this.onvplaying),T.addEventListener("seeked",this.onvseeked),this.gapController=new i.default(this.config,T,this.fragmentTracker,this.hls)},C.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),h.prototype.onMediaDetaching.call(this)},C.onMediaPlaying=function(){this.tick()},C.onMediaSeeked=function(){var x=this.media,E=x?x.currentTime:null;Object(M.isFiniteNumber)(E)&&this.log("Media seeked to "+E.toFixed(3)),this.tick()},C.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},C.onManifestParsed=function(x,E){var T=!1,k=!1,L;E.levels.forEach(function(A){L=A.audioCodec,L&&(L.indexOf("mp4a.40.2")!==-1&&(T=!0),L.indexOf("mp4a.40.5")!==-1&&(k=!0))}),this.audioCodecSwitch=T&&k&&!Object(m.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=E.levels,this.startFragRequested=!1},C.onLevelLoading=function(x,E){var T=this.levels;if(!T||this.state!==y.State.IDLE)return;var k=T[E.level];(!k.details||k.details.live&&this.levelLastLoaded!==E.level||this.waitForCdnTuneIn(k.details))&&(this.state=y.State.WAITING_LEVEL)},C.onLevelLoaded=function(x,E){var T,k=this.levels,L=E.level,A=E.details,G=A.totalduration;if(!k){this.warn("Levels were reset while loading level "+L);return}this.log("Level "+L+" loaded ["+A.startSN+","+A.endSN+"], cc ["+A.startCC+", "+A.endCC+"] duration:"+G);var K=this.fragCurrent;K&&(this.state===y.State.FRAG_LOADING||this.state===y.State.FRAG_LOADING_WAITING_RETRY)&&(K.level!==E.level&&K.loader&&(this.state=y.State.IDLE,K.loader.abort()));var W=k[L],z=0;if(A.live||(T=W.details)!==null&&T!==void 0&&T.live){if(A.fragments[0]||(A.deltaUpdateFailed=!0),A.deltaUpdateFailed)return;z=this.alignPlaylists(A,W.details)}if(W.details=A,this.levelLastLoaded=L,this.hls.trigger(S.Events.LEVEL_UPDATED,{details:A,level:L}),this.state===y.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(A))return;this.state=y.State.IDLE}this.startFragRequested?A.live&&this.synchronizeToLiveEdge(A):this.setStartPosition(A,z),this.tick()},C._handleFragmentLoadProgress=function(x){var E,T=x.frag,k=x.part,L=x.payload,A=this.levels;if(!A){this.warn("Levels were reset while fragment load was in progress. Fragment "+T.sn+" of level "+T.level+" will not be buffered");return}var G=A[T.level],K=G.details;if(!K){this.warn("Dropping fragment "+T.sn+" of level "+T.level+" after level details were reset");return}var W=G.videoCodec,z=K.PTSKnown||!K.live,U=(E=T.initSegment)===null||E===void 0?void 0:E.data,P=this._getAudioCodec(G),H=this.transmuxer=this.transmuxer||new l.default(this.hls,d.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),V=k?k.index:-1,q=V!==-1,Z=new r.ChunkMetadata(T.level,T.sn,T.stats.chunkCount,L.byteLength,V,q),ce=this.initPTS[T.cc];H.push(L,U,P,W,T,k,K.totalduration,z,Z,ce)},C.onAudioTrackSwitching=function(x,E){var T=this.altAudio,k=!!E.url,L=E.id;if(!k){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var A=this.fragCurrent;A!=null&&A.loader&&(this.log("Switching to main audio track, cancel main fragment load"),A.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var G=this.hls;T&&G.trigger(S.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),G.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:L})}},C.onAudioTrackSwitched=function(x,E){var T=E.id,k=!!this.hls.audioTracks[T].url;if(k){var L=this.videoBuffer;L&&this.mediaBuffer!==L&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=L)}this.altAudio=k,this.tick()},C.onBufferCreated=function(x,E){var T=E.tracks,k,L,A=!1;for(var G in T){var K=T[G];if(K.id==="main"){if(L=G,k=K,G==="video"){var W=T[G];W&&(this.videoBuffer=W.buffer)}}else A=!0}A&&k?(this.log("Alternate track found, use "+L+".buffered to schedule main fragment loading"),this.mediaBuffer=k.buffer):this.mediaBuffer=this.media},C.onFragBuffered=function(x,E){var T=E.frag,k=E.part;if(T&&T.type!==d.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(T)){this.warn("Fragment "+T.sn+(k?" p: "+k.index:"")+" of level "+T.level+" finished buffering, but was aborted. state: "+this.state),this.state===y.State.PARSED&&(this.state=y.State.IDLE);return}var L=k?k.stats:T.stats;this.fragLastKbps=Math.round(8*L.total/(L.buffering.end-L.loading.first)),T.sn!=="initSegment"&&(this.fragPrevious=T),this.fragBufferedComplete(T,k)},C.onError=function(x,E){switch(E.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(d.PlaylistLevelType.MAIN,E);break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==y.State.ERROR&&(E.fatal?(this.warn(""+E.details),this.state=y.State.ERROR):!E.levelRetry&&this.state===y.State.WAITING_LEVEL&&(this.state=y.State.IDLE));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(E.parent==="main"&&(this.state===y.State.PARSING||this.state===y.State.PARSED)){var T=!0,k=this.getFwdBufferInfo(this.media,d.PlaylistLevelType.MAIN);k&&k.len>.5&&(T=!this.reduceMaxBufferLength(k.len)),T&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},C.checkBuffer=function(){var x=this.media,E=this.gapController;if(!x||!E||!x.readyState)return;var T=b.BufferHelper.getBuffered(x);!this.loadedmetadata&&T.length?(this.loadedmetadata=!0,this.seekToStartPos()):E.poll(this.lastCurrentTime),this.lastCurrentTime=x.currentTime},C.onFragLoadEmergencyAborted=function(){this.state=y.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},C.onBufferFlushed=function(x,E){var T=E.type;if(T!==t.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var k=(T===t.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(k,T,d.PlaylistLevelType.MAIN)}},C.onLevelsUpdated=function(x,E){this.levels=E.levels},C.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},C.seekToStartPos=function(){var x=this.media,E=x.currentTime,T=this.startPosition;if(T>=0&&E<T){if(x.seeking){s.logger.log("could not seek to "+T+", already seeking at "+E);return}var k=b.BufferHelper.getBuffered(x),L=k.length?k.start(0):0,A=L-T;A>0&&(A<this.config.maxBufferHole||A<this.config.maxFragLookUpTolerance)&&(s.logger.log("adjusting start position by "+A+" to match buffer start"),T+=A,this.startPosition=T),this.log("seek to target start position "+T+" from current time "+E),x.currentTime=T}},C._getAudioCodec=function(x){var E=this.config.defaultAudioCodec||x.audioCodec;return this.audioCodecSwap&&E&&(this.log("Swapping audio codec"),E.indexOf("mp4a.40.5")!==-1?E="mp4a.40.2":E="mp4a.40.5"),E},C._loadBitrateTestFrag=function(x){var E=this;this._doFragLoad(x).then(function(T){var k=E.hls;if(!T||k.nextLoadLevel||E.fragContextChanged(x))return;E.fragLoadError=0,E.state=y.State.IDLE,E.startFragRequested=!1,E.bitrateTest=!1;var L=x.stats;L.parsing.start=L.parsing.end=L.buffering.start=L.buffering.end=self.performance.now(),k.trigger(S.Events.FRAG_LOADED,T)})},C._handleTransmuxComplete=function(x){var E,T="main",k=this.hls,L=x.remuxResult,A=x.chunkMeta,G=this.getCurrentContext(A);if(!G){this.warn("The loading context changed while buffering fragment "+A.sn+" of level "+A.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(A.level);return}var K=G.frag,W=G.part,z=G.level,U=L.video,P=L.text,H=L.id3,V=L.initSegment,q=this.altAudio?void 0:L.audio;if(this.fragContextChanged(K))return;if(this.state=y.State.PARSING,V){V.tracks&&(this._bufferInitSegment(z,V.tracks,K,A),k.trigger(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:K,id:T,tracks:V.tracks}));var Z=V.initPTS,ce=V.timescale;Object(M.isFiniteNumber)(Z)&&(this.initPTS[K.cc]=Z,k.trigger(S.Events.INIT_PTS_FOUND,{frag:K,id:T,initPTS:Z,timescale:ce}))}if(U&&L.independent!==!1){if(z.details){var he=U.startPTS,ae=U.endPTS,xe=U.startDTS,ge=U.endDTS;if(W)W.elementaryStreams[U.type]={startPTS:he,endPTS:ae,startDTS:xe,endDTS:ge};else if(U.firstKeyFrame&&U.independent&&(this.couldBacktrack=!0),U.dropped&&U.independent){var oe=this.getLoadPosition()+this.config.maxBufferHole;if(oe<he){this.backtrack(K);return}K.setElementaryStreamInfo(U.type,K.start,ae,K.start,ge,!0)}K.setElementaryStreamInfo(U.type,he,ae,xe,ge),this.bufferFragmentData(U,K,W,A)}}else if(L.independent===!1){this.backtrack(K);return}if(q){var se=q.startPTS,te=q.endPTS,be=q.startDTS,ee=q.endDTS;W&&(W.elementaryStreams[t.ElementaryStreamTypes.AUDIO]={startPTS:se,endPTS:te,startDTS:be,endDTS:ee}),K.setElementaryStreamInfo(t.ElementaryStreamTypes.AUDIO,se,te,be,ee),this.bufferFragmentData(q,K,W,A)}if(H!=null&&(E=H.samples)!==null&&E!==void 0&&E.length){var ie={frag:K,id:T,samples:H.samples};k.trigger(S.Events.FRAG_PARSING_METADATA,ie)}if(P){var Ee={frag:K,id:T,samples:P.samples};k.trigger(S.Events.FRAG_PARSING_USERDATA,Ee)}},C._bufferInitSegment=function(x,E,T,k){var L=this;if(this.state!==y.State.PARSING)return;this.audioOnly=!!E.audio&&!E.video,this.altAudio&&!this.audioOnly&&delete E.audio;var A=E.audio,G=E.video,K=E.audiovideo;if(A){var W=x.audioCodec,z=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(W&&(W.indexOf("mp4a.40.5")!==-1?W="mp4a.40.2":W="mp4a.40.5"),A.metadata.channelCount!==1&&z.indexOf("firefox")===-1&&(W="mp4a.40.5")),z.indexOf("android")!==-1&&A.container!=="audio/mpeg"&&(W="mp4a.40.2",this.log("Android: force audio codec to "+W)),x.audioCodec&&x.audioCodec!==W&&this.log('Swapping manifest audio codec "'+x.audioCodec+'" for "'+W+'"'),A.levelCodec=W,A.id="main",this.log("Init audio buffer, container:"+A.container+", codecs[selected/level/parsed]=["+(W||"")+"/"+(x.audioCodec||"")+"/"+A.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,E),Object.keys(E).forEach(function(U){var P=E[U],H=P.initSegment;H!=null&&H.byteLength&&L.hls.trigger(S.Events.BUFFER_APPENDING,{type:U,data:H,frag:T,part:null,chunkMeta:k,parent:T.type})}),this.tick()},C.backtrack=function(x){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(x);var E=this.fragmentTracker.backtrack(x);this.fragPrevious=null,this.nextLoadPosition=x.start,E?this.resetFragmentLoading(x):this.state=y.State.BACKTRACKING},C.checkFragmentChanged=function(){var x=this.media,E=null;if(x&&x.readyState>1&&x.seeking===!1){var T=x.currentTime;if(b.BufferHelper.isBuffered(x,T)?E=this.getAppendedFrag(T):b.BufferHelper.isBuffered(x,T+.1)&&(E=this.getAppendedFrag(T+.1)),E){var k=this.fragPlaying,L=E.level;(!k||E.sn!==k.sn||k.level!==L||E.urlId!==k.urlId)&&(this.hls.trigger(S.Events.FRAG_CHANGED,{frag:E}),(!k||k.level!==L)&&this.hls.trigger(S.Events.LEVEL_SWITCHED,{level:L}),this.fragPlaying=E)}}},a(R,[{key:"nextLevel",get:function(){var x=this.nextBufferedFrag;return x?x.level:-1}},{key:"currentLevel",get:function(){var x=this.media;if(x){var E=this.getAppendedFrag(x.currentTime);if(E)return E.level}return-1}},{key:"nextBufferedFrag",get:function(){var x=this.media;if(x){var E=this.getAppendedFrag(x.currentTime);return this.followingBufferedFrag(E)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),R}(y.default)},"./src/controller/subtitle-stream-controller.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"SubtitleStreamController",function(){return c});var M=O("./src/events.ts"),y=O("./src/utils/logger.ts"),m=O("./src/utils/buffer-helper.ts"),S=O("./src/controller/fragment-finders.ts"),b=O("./src/utils/discontinuities.ts"),p=O("./src/controller/level-helper.ts"),d=O("./src/controller/fragment-tracker.ts"),t=O("./src/controller/base-stream-controller.ts"),l=O("./src/types/loader.ts"),r=O("./src/types/level.ts");function i(f,w){for(var _=0;_<w.length;_++){var h=w[_];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(f,h.key,h)}}function o(f,w,_){return w&&i(f.prototype,w),_&&i(f,_),f}function s(f,w){f.prototype=Object.create(w.prototype),f.prototype.constructor=f,u(f,w)}function u(f,w){return u=Object.setPrototypeOf||function(h,R){return h.__proto__=R,h},u(f,w)}var a=500,c=function(f){s(w,f);function w(h,R){var C;return C=f.call(this,h,R,"[subtitle-stream-controller]")||this,C.levels=[],C.currentTrackId=-1,C.tracksBuffered=[],C.mainDetails=null,C._registerListeners(),C}var _=w.prototype;return _.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},_._registerListeners=function(){var R=this.hls;R.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.on(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),R.on(M.Events.ERROR,this.onError,this),R.on(M.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),R.on(M.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),R.on(M.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.on(M.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),R.on(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},_._unregisterListeners=function(){var R=this.hls;R.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.off(M.Events.LEVEL_LOADED,this.onLevelLoaded,this),R.off(M.Events.ERROR,this.onError,this),R.off(M.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),R.off(M.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),R.off(M.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.off(M.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),R.off(M.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},_.startLoad=function(){this.stopLoad(),this.state=t.State.IDLE,this.setInterval(a),this.tick()},_.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},_.onLevelLoaded=function(R,C){this.mainDetails=C.details},_.onSubtitleFragProcessed=function(R,C){var g=C.frag,x=C.success;if(this.fragPrevious=g,this.state=t.State.IDLE,!x)return;var E=this.tracksBuffered[this.currentTrackId];if(!E)return;for(var T,k=g.start,L=0;L<E.length;L++)if(k>=E[L].start&&k<=E[L].end){T=E[L];break}var A=g.start+g.duration;T?T.end=A:(T={start:k,end:A},E.push(T)),this.fragmentTracker.fragBuffered(g)},_.onBufferFlushing=function(R,C){var g=C.startOffset,x=C.endOffset;if(g===0&&x!==Number.POSITIVE_INFINITY){var E=this.currentTrackId,T=this.levels;if(!T.length||!T[E]||!T[E].details)return;var k=T[E].details,L=k.targetduration,A=x-L;if(A<=0)return;C.endOffsetSubtitles=Math.max(0,A),this.tracksBuffered.forEach(function(G){for(var K=0;K<G.length;){if(G[K].end<=A){G.shift();continue}else if(G[K].start<A)G[K].start=A;else break;K++}}),this.fragmentTracker.removeFragmentsInRange(g,A,l.PlaylistLevelType.SUBTITLE)}},_.onError=function(R,C){var g,x=C.frag;if(!x||x.type!==l.PlaylistLevelType.SUBTITLE)return;(g=this.fragCurrent)!==null&&g!==void 0&&g.loader&&this.fragCurrent.loader.abort(),this.state=t.State.IDLE},_.onSubtitleTracksUpdated=function(R,C){var g=this,x=C.subtitleTracks;this.tracksBuffered=[],this.levels=x.map(function(E){return new r.Level(E)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(E){g.tracksBuffered[E.id]=[]}),this.mediaBuffer=null},_.onSubtitleTrackSwitch=function(R,C){if(this.currentTrackId=C.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var g=this.levels[this.currentTrackId];g!=null&&g.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,g&&this.setInterval(a)},_.onSubtitleTrackLoaded=function(R,C){var g,x=C.details,E=C.id,T=this.currentTrackId,k=this.levels;if(!k.length)return;var L=k[T];if(E>=k.length||E!==T||!L)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,x.live||(g=L.details)!==null&&g!==void 0&&g.live){var A=this.mainDetails;if(x.deltaUpdateFailed||!A)return;var G=A.fragments[0];if(!L.details)x.hasProgramDateTime&&A.hasProgramDateTime?Object(b.alignMediaPlaylistByPDT)(x,A):G&&Object(p.addSliding)(x,G.start);else{var K=this.alignPlaylists(x,L.details);K===0&&G&&Object(p.addSliding)(x,G.start)}}if(L.details=x,this.levelLastLoaded=E,this.tick(),x.live&&!this.fragCurrent&&this.media&&this.state===t.State.IDLE){var W=Object(S.findFragmentByPTS)(null,x.fragments,this.media.currentTime,0);W||(this.warn("Subtitle playlist not aligned with playback"),L.details=void 0)}},_._handleFragmentLoadComplete=function(R){var C=R.frag,g=R.payload,x=C.decryptdata,E=this.hls;if(this.fragContextChanged(C))return;if(g&&g.byteLength>0&&x&&x.key&&x.iv&&x.method==="AES-128"){var T=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(g),x.key.buffer,x.iv.buffer).then(function(k){var L=performance.now();E.trigger(M.Events.FRAG_DECRYPTED,{frag:C,payload:k,stats:{tstart:T,tdecrypt:L}})})}},_.doTick=function(){if(!this.media){this.state=t.State.IDLE;return}if(this.state===t.State.IDLE){var R,C=this.currentTrackId,g=this.levels;if(!g.length||!g[C]||!g[C].details)return;var x=g[C].details,E=x.targetduration,T=this.config,k=this.media,L=m.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,k.currentTime-E,T.maxBufferHole),A=L.end,G=L.len,K=this.getMaxBufferLength()+E;if(G>K)return;console.assert(x,"Subtitle track details are defined on idle subtitle stream controller tick");var W=x.fragments,z=W.length,U=x.edge,P,H=this.fragPrevious;if(A<U){var V=T.maxFragLookUpTolerance;H&&x.hasProgramDateTime&&(P=Object(S.findFragmentByPDT)(W,H.endProgramDateTime,V)),P||(P=Object(S.findFragmentByPTS)(H,W,A,V),!P&&H&&H.start<W[0].start&&(P=W[0]))}else P=W[z-1];(R=P)!==null&&R!==void 0&&R.encrypted?(y.logger.log("Loading key for "+P.sn),this.state=t.State.KEY_LOADING,this.hls.trigger(M.Events.KEY_LOADING,{frag:P})):P&&this.fragmentTracker.getState(P)===d.FragmentState.NOT_LOADED&&this.loadFragment(P,x,A)}},_.loadFragment=function(R,C,g){this.fragCurrent=R,f.prototype.loadFragment.call(this,R,C,g)},o(w,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),w}(t.default)},"./src/controller/subtitle-track-controller.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/events.ts"),y=O("./src/utils/texttrack-utils.ts"),m=O("./src/controller/base-playlist-controller.ts"),S=O("./src/types/loader.ts");function b(i,o){for(var s=0;s<o.length;s++){var u=o[s];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function p(i,o,s){return o&&b(i.prototype,o),s&&b(i,s),i}function d(i,o){i.prototype=Object.create(o.prototype),i.prototype.constructor=i,t(i,o)}function t(i,o){return t=Object.setPrototypeOf||function(u,a){return u.__proto__=a,u},t(i,o)}var l=function(i){d(o,i);function o(u){var a;return a=i.call(this,u,"[subtitle-track-controller]")||this,a.media=null,a.tracks=[],a.groupId=null,a.tracksInGroup=[],a.trackId=-1,a.selectDefaultTrack=!0,a.queuedDefaultTrack=-1,a.trackChangeListener=function(){return a.onTextTracksChanged()},a.asyncPollTrackChange=function(){return a.pollTrackChange(0)},a.useTextTrackPolling=!1,a.subtitlePollingInterval=-1,a.subtitleDisplay=!0,a.registerListeners(),a}var s=o.prototype;return s.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,i.prototype.destroy.call(this)},s.registerListeners=function(){var a=this.hls;a.on(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(M.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(M.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.on(M.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.on(M.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var a=this.hls;a.off(M.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(M.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(M.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(M.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(M.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(M.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.off(M.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.off(M.Events.ERROR,this.onError,this)},s.onMediaAttached=function(a,c){if(this.media=c.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)},s.pollTrackChange=function(a){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,a)},s.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 a=r(this.media.textTracks);a.forEach(function(c){Object(y.clearCurrentCues)(c)}),this.subtitleTrack=-1,this.media=null},s.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},s.onManifestParsed=function(a,c){this.tracks=c.subtitleTracks},s.onSubtitleTrackLoaded=function(a,c){var f=c.id,w=c.details,_=this.trackId,h=this.tracksInGroup[_];if(!h){this.warn("Invalid subtitle track id "+f);return}var R=h.details;h.details=c.details,this.log("subtitle track "+f+" loaded ["+w.startSN+"-"+w.endSN+"]"),f===this.trackId&&(this.retryCount=0,this.playlistLoaded(f,c,R))},s.onLevelLoading=function(a,c){this.switchLevel(c.level)},s.onLevelSwitching=function(a,c){this.switchLevel(c.level)},s.switchLevel=function(a){var c=this.hls.levels[a];if(!(c!=null&&c.textGroupIds))return;var f=c.textGroupIds[c.urlId];if(this.groupId!==f){var w=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,_=this.tracks.filter(function(C){return!f||C.groupId===f});this.tracksInGroup=_;var h=this.findTrackId(w==null?void 0:w.name)||this.findTrackId();this.groupId=f;var R={subtitleTracks:_};this.log("Updating subtitle tracks, "+_.length+' track(s) found in "'+f+'" group-id'),this.hls.trigger(M.Events.SUBTITLE_TRACKS_UPDATED,R),h!==-1&&this.setSubtitleTrack(h,w)}},s.findTrackId=function(a){for(var c=this.tracksInGroup,f=0;f<c.length;f++){var w=c[f];if((!this.selectDefaultTrack||w.default)&&(!a||a===w.name))return w.id}return-1},s.onError=function(a,c){if(i.prototype.onError.call(this,a,c),c.fatal||!c.context)return;c.context.type===S.PlaylistContextType.SUBTITLE_TRACK&&c.context.id===this.trackId&&c.context.groupId===this.groupId&&this.retryLoadingOrFail(c)},s.loadPlaylist=function(a){var c=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(c)){var f=c.id,w=c.groupId,_=c.url;if(a)try{_=a.addDirectives(_)}catch(h){this.warn("Could not construct new URL with HLS Delivery Directives: "+h)}this.log("Loading subtitle playlist for id "+f),this.hls.trigger(M.Events.SUBTITLE_TRACK_LOADING,{url:_,id:f,groupId:w,deliveryDirectives:a||null})}},s.toggleTrackModes=function(a){var c=this,f=this.media,w=this.subtitleDisplay,_=this.trackId;if(!f)return;var h=r(f.textTracks),R=h.filter(function(x){return x.groupId===c.groupId});if(a===-1)[].slice.call(h).forEach(function(x){x.mode="disabled"});else{var C=R[_];C&&(C.mode="disabled")}var g=R[a];g&&(g.mode=w?"showing":"hidden")},s.setSubtitleTrack=function(a,c){var f,w=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=a;return}if(this.trackId!==a&&this.toggleTrackModes(a),this.trackId===a&&(a===-1||(f=w[a])!==null&&f!==void 0&&f.details)||a<-1||a>=w.length)return;this.clearTimer();var _=w[a];if(this.log("Switching to subtitle track "+a),this.trackId=a,_){var h=_.id,R=_.groupId,C=R===void 0?"":R,g=_.name,x=_.type,E=_.url;this.hls.trigger(M.Events.SUBTITLE_TRACK_SWITCH,{id:h,groupId:C,name:g,type:x,url:E});var T=this.switchParams(_.url,c==null?void 0:c.details);this.loadPlaylist(T)}else this.hls.trigger(M.Events.SUBTITLE_TRACK_SWITCH,{id:a})},s.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var a=-1,c=r(this.media.textTracks),f=0;f<c.length;f++)if(c[f].mode==="hidden")a=f;else if(c[f].mode==="showing"){a=f;break}this.subtitleTrack!==a&&(this.subtitleTrack=a)},p(o,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(a){this.selectDefaultTrack=!1;var c=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(a,c)}}]),o}(m.default);function r(i){for(var o=[],s=0;s<i.length;s++){var u=i[s];u.kind==="subtitles"&&u.label&&o.push(i[s])}return o}v.default=l},"./src/controller/timeline-controller.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"TimelineController",function(){return r});var M=O("./src/polyfills/number.ts"),y=O("./src/events.ts"),m=O("./src/utils/cea-608-parser.ts"),S=O("./src/utils/output-filter.ts"),b=O("./src/utils/webvtt-parser.ts"),p=O("./src/utils/texttrack-utils.ts"),d=O("./src/utils/imsc1-ttml-parser.ts"),t=O("./src/types/loader.ts"),l=O("./src/utils/logger.ts"),r=function(){function u(c){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=s(),this.captionsProperties=void 0,this.hls=c,this.config=c.config,this.Cues=c.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 f=new S.default(this,"textTrack1"),w=new S.default(this,"textTrack2"),_=new S.default(this,"textTrack3"),h=new S.default(this,"textTrack4");this.cea608Parser1=new m.default(1,f,w),this.cea608Parser2=new m.default(3,_,h)}c.on(y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),c.on(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.on(y.Events.MANIFEST_LOADED,this.onManifestLoaded,this),c.on(y.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),c.on(y.Events.FRAG_LOADING,this.onFragLoading,this),c.on(y.Events.FRAG_LOADED,this.onFragLoaded,this),c.on(y.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),c.on(y.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),c.on(y.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),c.on(y.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),c.on(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var a=u.prototype;return a.destroy=function(){var f=this.hls;f.off(y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),f.off(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.off(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),f.off(y.Events.MANIFEST_LOADED,this.onManifestLoaded,this),f.off(y.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),f.off(y.Events.FRAG_LOADING,this.onFragLoading,this),f.off(y.Events.FRAG_LOADED,this.onFragLoaded,this),f.off(y.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),f.off(y.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),f.off(y.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),f.off(y.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),f.off(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},a.addCues=function(f,w,_,h,R){for(var C=!1,g=R.length;g--;){var x=R[g],E=o(x[0],x[1],w,_);if(E>=0&&(x[0]=Math.min(x[0],w),x[1]=Math.max(x[1],_),C=!0,E/(_-w)>.5))return}if(C||R.push([w,_]),this.config.renderTextTracksNatively){var T=this.captionsTracks[f];this.Cues.newCue(T,w,_,h)}else{var k=this.Cues.newCue(null,w,_,h);this.hls.trigger(y.Events.CUES_PARSED,{type:"captions",cues:k,track:f})}},a.onInitPtsFound=function(f,w){var _=this,h=w.frag,R=w.id,C=w.initPTS,g=w.timescale,x=this.unparsedVttFrags;R==="main"&&(this.initPTS[h.cc]=C,this.timescale[h.cc]=g),x.length&&(this.unparsedVttFrags=[],x.forEach(function(E){_.onFragLoaded(y.Events.FRAG_LOADED,E)}))},a.getExistingTrack=function(f){var w=this.media;if(w)for(var _=0;_<w.textTracks.length;_++){var h=w.textTracks[_];if(h[f])return h}return null},a.createCaptionsTrack=function(f){this.config.renderTextTracksNatively?this.createNativeTrack(f):this.createNonNativeTrack(f)},a.createNativeTrack=function(f){if(this.captionsTracks[f])return;var w=this.captionsProperties,_=this.captionsTracks,h=this.media,R=w[f],C=R.label,g=R.languageCode,x=this.getExistingTrack(f);if(x)_[f]=x,Object(p.clearCurrentCues)(_[f]),Object(p.sendAddTrackEvent)(_[f],h);else{var E=this.createTextTrack("captions",C,g);E&&(E[f]=!0,_[f]=E)}},a.createNonNativeTrack=function(f){if(this.nonNativeCaptionsTracks[f])return;var w=this.captionsProperties[f];if(!w)return;var _=w.label,h={_id:f,label:_,kind:"captions",default:w.media?!!w.media.default:!1,closedCaptions:w.media};this.nonNativeCaptionsTracks[f]=h,this.hls.trigger(y.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[h]})},a.createTextTrack=function(f,w,_){var h=this.media;return h?h.addTextTrack(f,w,_):void 0},a.onMediaAttaching=function(f,w){this.media=w.media,this._cleanTracks()},a.onMediaDetaching=function(){var f=this.captionsTracks;Object.keys(f).forEach(function(w){Object(p.clearCurrentCues)(f[w]),delete f[w]}),this.nonNativeCaptionsTracks={}},a.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=s(),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())},a._cleanTracks=function(){var f=this.media;if(!f)return;var w=f.textTracks;if(w)for(var _=0;_<w.length;_++)Object(p.clearCurrentCues)(w[_])},a.onSubtitleTracksUpdated=function(f,w){var _=this;this.textTracks=[];var h=w.subtitleTracks||[],R=h.some(function(E){return E.textCodec===d.IMSC1_CODEC});if(this.config.enableWebVTT||R&&this.config.enableIMSC1){var C=this.tracks&&h&&this.tracks.length===h.length;if(this.tracks=h||[],this.config.renderTextTracksNatively){var g=this.media?this.media.textTracks:[];this.tracks.forEach(function(E,T){var k;if(T<g.length){for(var L=null,A=0;A<g.length;A++)if(i(g[A],E)){L=g[A];break}L&&(k=L)}k?Object(p.clearCurrentCues)(k):(k=_.createTextTrack("subtitles",E.name,E.lang),k&&(k.mode="disabled")),k&&(k.groupId=E.groupId,_.textTracks.push(k))})}else if(!C&&this.tracks&&this.tracks.length){var x=this.tracks.map(function(E){return{label:E.name,kind:E.type.toLowerCase(),default:E.default,subtitleTrack:E}});this.hls.trigger(y.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:x})}}},a.onManifestLoaded=function(f,w){var _=this;this.config.enableCEA708Captions&&w.captions&&w.captions.forEach(function(h){var R=/(?:CC|SERVICE)([1-4])/.exec(h.instreamId);if(!R)return;var C="textTrack"+R[1],g=_.captionsProperties[C];if(!g)return;g.label=h.name,h.lang&&(g.languageCode=h.lang),g.media=h})},a.onFragLoading=function(f,w){var _=this.cea608Parser1,h=this.cea608Parser2,R=this.lastSn,C=this.lastPartIndex;if(!this.enabled||!(_&&h))return;if(w.frag.type===t.PlaylistLevelType.MAIN){var g,x,E=w.frag.sn,T=(g=w==null||((x=w.part)===null||x===void 0)?void 0:x.index)!=null?g:-1;E===R+1||E===R&&T===C+1||(_.reset(),h.reset()),this.lastSn=E,this.lastPartIndex=T}},a.onFragLoaded=function(f,w){var _=w.frag,h=w.payload,R=this.initPTS,C=this.unparsedVttFrags;if(_.type===t.PlaylistLevelType.SUBTITLE)if(h.byteLength){if(!Object(M.isFiniteNumber)(R[_.cc])){C.push(w),R.length&&this.hls.trigger(y.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:_,error:new Error("Missing initial subtitle PTS")});return}var g=_.decryptdata;if(g==null||g.key==null||g.method!=="AES-128"){var x=this.tracks[_.level],E=this.vttCCs;E[_.cc]||(E[_.cc]={start:_.start,prevCC:this.prevCC,new:!0},this.prevCC=_.cc),x&&x.textCodec===d.IMSC1_CODEC?this._parseIMSC1(_,h):this._parseVTTs(_,h,E)}}else this.hls.trigger(y.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:_,error:new Error("Empty subtitle payload")})},a._parseIMSC1=function(f,w){var _=this,h=this.hls;Object(d.parseIMSC1)(w,this.initPTS[f.cc],this.timescale[f.cc],function(R){_._appendCues(R,f.level),h.trigger(y.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:f})},function(R){l.logger.log("Failed to parse IMSC1: "+R),h.trigger(y.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:f,error:R})})},a._parseVTTs=function(f,w,_){var h=this,R=this.hls;Object(b.parseWebVTT)(w,this.initPTS[f.cc],this.timescale[f.cc],_,f.cc,f.start,function(C){h._appendCues(C,f.level),R.trigger(y.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:f})},function(C){h._fallbackToIMSC1(f,w),l.logger.log("Failed to parse VTT cue: "+C),R.trigger(y.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:f,error:C})})},a._fallbackToIMSC1=function(f,w){var _=this,h=this.tracks[f.level];h.textCodec||Object(d.parseIMSC1)(w,this.initPTS[f.cc],this.timescale[f.cc],function(){h.textCodec=d.IMSC1_CODEC,_._parseIMSC1(f,w)},function(){h.textCodec="wvtt"})},a._appendCues=function(f,w){var _=this.hls;if(this.config.renderTextTracksNatively){var h=this.textTracks[w];if(h.mode==="disabled")return;f.forEach(function(g){return Object(p.addCueToTrack)(h,g)})}else{var R=this.tracks[w],C=R.default?"default":"subtitles"+w;_.trigger(y.Events.CUES_PARSED,{type:"subtitles",cues:f,track:C})}},a.onFragDecrypted=function(f,w){var _=w.frag;if(_.type===t.PlaylistLevelType.SUBTITLE){if(!Object(M.isFiniteNumber)(this.initPTS[_.cc])){this.unparsedVttFrags.push(w);return}this.onFragLoaded(y.Events.FRAG_LOADED,w)}},a.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},a.onFragParsingUserdata=function(f,w){var _=this.cea608Parser1,h=this.cea608Parser2;if(!this.enabled||!(_&&h))return;for(var R=0;R<w.samples.length;R++){var C=w.samples[R].bytes;if(C){var g=this.extractCea608Data(C);_.addData(w.samples[R].pts,g[0]),h.addData(w.samples[R].pts,g[1])}}},a.onBufferFlushing=function(f,w){var _=w.startOffset,h=w.endOffset,R=w.endOffsetSubtitles,C=w.type,g=this.media;if(!g||g.currentTime<h)return;if(!C||C==="video"){var x=this.captionsTracks;Object.keys(x).forEach(function(T){return Object(p.removeCuesInRange)(x[T],_,h)})}if(this.config.renderTextTracksNatively&&(_===0&&R!==void 0)){var E=this.textTracks;Object.keys(E).forEach(function(T){return Object(p.removeCuesInRange)(E[T],_,R)})}},a.extractCea608Data=function(f){for(var w=f[0]&31,_=2,h=[[],[]],R=0;R<w;R++){var C=f[_++],g=127&f[_++],x=127&f[_++],E=(4&C)!==0,T=3&C;if(g===0&&x===0)continue;E&&((T===0||T===1)&&(h[T].push(g),h[T].push(x)))}return h},u}();function i(u,a){return u&&u.label===a.name&&!(u.textTrack1||u.textTrack2)}function o(u,a,c,f){return Math.min(a,f)-Math.max(u,c)}function s(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return M});var M=function(){function y(S,b){this.subtle=void 0,this.aesIV=void 0,this.subtle=S,this.aesIV=b}var m=y.prototype;return m.decrypt=function(b,p){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},p,b)},y}()},"./src/crypt/aes-decryptor.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"removePadding",function(){return y}),O.d(v,"default",function(){return m});var M=O("./src/utils/typed-array.ts");function y(S){var b=S.byteLength,p=b&&new DataView(S.buffer).getUint8(b-1);return p?Object(M.sliceUint8)(S,0,b-p):S}var m=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 b=S.prototype;return b.uint8ArrayToUint32Array_=function(d){for(var t=new DataView(d),l=new Uint32Array(4),r=0;r<4;r++)l[r]=t.getUint32(r*4);return l},b.initTable=function(){var d=this.sBox,t=this.invSBox,l=this.subMix,r=l[0],i=l[1],o=l[2],s=l[3],u=this.invSubMix,a=u[0],c=u[1],f=u[2],w=u[3],_=new Uint32Array(256),h=0,R=0,C=0;for(C=0;C<256;C++)C<128?_[C]=C<<1:_[C]=C<<1^283;for(C=0;C<256;C++){var g=R^R<<1^R<<2^R<<3^R<<4;g=g>>>8^g&255^99,d[h]=g,t[g]=h;var x=_[h],E=_[x],T=_[E],k=_[g]*257^g*16843008;r[h]=k<<24|k>>>8,i[h]=k<<16|k>>>16,o[h]=k<<8|k>>>24,s[h]=k,k=T*16843009^E*65537^x*257^h*16843008,a[g]=k<<24|k>>>8,c[g]=k<<16|k>>>16,f[g]=k<<8|k>>>24,w[g]=k,h?(h=x^_[_[_[T^x]]],R^=_[_[R]]):h=R=1}},b.expandKey=function(d){for(var t=this.uint8ArrayToUint32Array_(d),l=!0,r=0;r<t.length&&l;)l=t[r]===this.key[r],r++;if(l)return;this.key=t;var i=this.keySize=t.length;if(i!==4&&i!==6&&i!==8)throw new Error("Invalid aes key size="+i);var o=this.ksRows=(i+6+1)*4,s,u,a=this.keySchedule=new Uint32Array(o),c=this.invKeySchedule=new Uint32Array(o),f=this.sBox,w=this.rcon,_=this.invSubMix,h=_[0],R=_[1],C=_[2],g=_[3],x,E;for(s=0;s<o;s++){if(s<i){x=a[s]=t[s];continue}E=x,s%i===0?(E=E<<8|E>>>24,E=f[E>>>24]<<24|f[E>>>16&255]<<16|f[E>>>8&255]<<8|f[E&255],E^=w[s/i|0]<<24):i>6&&s%i===4&&(E=f[E>>>24]<<24|f[E>>>16&255]<<16|f[E>>>8&255]<<8|f[E&255]),a[s]=x=(a[s-i]^E)>>>0}for(u=0;u<o;u++)s=o-u,u&3?E=a[s]:E=a[s-4],u<4||s<=4?c[u]=E:c[u]=h[f[E>>>24]]^R[f[E>>>16&255]]^C[f[E>>>8&255]]^g[f[E&255]],c[u]=c[u]>>>0},b.networkToHostOrderSwap=function(d){return d<<24|(d&65280)<<8|(d&16711680)>>8|d>>>24},b.decrypt=function(d,t,l){for(var r=this.keySize+6,i=this.invKeySchedule,o=this.invSBox,s=this.invSubMix,u=s[0],a=s[1],c=s[2],f=s[3],w=this.uint8ArrayToUint32Array_(l),_=w[0],h=w[1],R=w[2],C=w[3],g=new Int32Array(d),x=new Int32Array(g.length),E,T,k,L,A,G,K,W,z,U,P,H,V,q,Z=this.networkToHostOrderSwap;t<g.length;){for(z=Z(g[t]),U=Z(g[t+1]),P=Z(g[t+2]),H=Z(g[t+3]),A=z^i[0],G=H^i[1],K=P^i[2],W=U^i[3],V=4,q=1;q<r;q++)E=u[A>>>24]^a[G>>16&255]^c[K>>8&255]^f[W&255]^i[V],T=u[G>>>24]^a[K>>16&255]^c[W>>8&255]^f[A&255]^i[V+1],k=u[K>>>24]^a[W>>16&255]^c[A>>8&255]^f[G&255]^i[V+2],L=u[W>>>24]^a[A>>16&255]^c[G>>8&255]^f[K&255]^i[V+3],A=E,G=T,K=k,W=L,V=V+4;E=o[A>>>24]<<24^o[G>>16&255]<<16^o[K>>8&255]<<8^o[W&255]^i[V],T=o[G>>>24]<<24^o[K>>16&255]<<16^o[W>>8&255]<<8^o[A&255]^i[V+1],k=o[K>>>24]<<24^o[W>>16&255]<<16^o[A>>8&255]<<8^o[G&255]^i[V+2],L=o[W>>>24]<<24^o[A>>16&255]<<16^o[G>>8&255]<<8^o[K&255]^i[V+3],x[t]=Z(E^_),x[t+1]=Z(L^h),x[t+2]=Z(k^R),x[t+3]=Z(T^C),_=z,h=U,R=P,C=H,t=t+4}return x.buffer},S}()},"./src/crypt/decrypter.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return t});var M=O("./src/crypt/aes-crypto.ts"),y=O("./src/crypt/fast-aes-key.ts"),m=O("./src/crypt/aes-decryptor.ts"),S=O("./src/utils/logger.ts"),b=O("./src/utils/mp4-tools.ts"),p=O("./src/utils/typed-array.ts"),d=16,t=function(){function l(i,o,s){var u=s===void 0?{}:s,a=u.removePKCS7Padding,c=a===void 0?!0:a;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=i,this.config=o,this.removePKCS7Padding=c,c)try{var f=self.crypto;f&&(this.subtle=f.subtle||f.webkitSubtle)}catch(w){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var r=l.prototype;return r.destroy=function(){this.observer=null},r.isSync=function(){return this.config.enableSoftwareAES},r.flush=function(){var o=this.currentResult;if(!o){this.reset();return}var s=new Uint8Array(o);return this.reset(),this.removePKCS7Padding?Object(m.removePadding)(s):s},r.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},r.decrypt=function(o,s,u,a){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(o),s,u);var c=this.flush();c&&a(c.buffer)}else this.webCryptoDecrypt(new Uint8Array(o),s,u).then(a)},r.softwareDecrypt=function(o,s,u){var a=this.currentIV,c=this.currentResult,f=this.remainderData;this.logOnce("JS AES decrypt"),f&&(o=Object(b.appendUint8Array)(f,o),this.remainderData=null);var w=this.getValidChunk(o);if(!w.length)return null;a&&(u=a);var _=this.softwareDecrypter;_||(_=this.softwareDecrypter=new m.default),_.expandKey(s);var h=c;return this.currentResult=_.decrypt(w.buffer,0,u),this.currentIV=Object(p.sliceUint8)(w,-16).buffer,h||null},r.webCryptoDecrypt=function(o,s,u){var a=this,c=this.subtle;return(this.key!==s||!this.fastAesKey)&&(this.key=s,this.fastAesKey=new y.default(c,s)),this.fastAesKey.expandKey().then(function(f){if(!c)return Promise.reject(new Error("web crypto not initialized"));var w=new M.default(c,u);return w.decrypt(o.buffer,f)}).catch(function(f){return a.onWebCryptoError(f,o,s,u)})},r.onWebCryptoError=function(o,s,u,a){return S.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",o),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(s,u,a)},r.getValidChunk=function(o){var s=o,u=o.length-o.length%d;return u!==o.length&&(s=Object(p.sliceUint8)(o,0,u),this.remainderData=Object(p.sliceUint8)(o,u)),s},r.logOnce=function(o){if(!this.logEnabled)return;S.logger.log("[decrypter.ts]: "+o),this.logEnabled=!1},l}()},"./src/crypt/fast-aes-key.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return M});var M=function(){function y(S,b){this.subtle=void 0,this.key=void 0,this.subtle=S,this.key=b}var m=y.prototype;return m.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},y}()},"./src/demux/aacdemuxer.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/demux/base-audio-demuxer.ts"),y=O("./src/demux/adts.ts"),m=O("./src/utils/logger.ts"),S=O("./src/demux/id3.ts");function b(t,l){t.prototype=Object.create(l.prototype),t.prototype.constructor=t,p(t,l)}function p(t,l){return p=Object.setPrototypeOf||function(i,o){return i.__proto__=o,i},p(t,l)}var d=function(t){b(l,t);function l(i,o){var s;return s=t.call(this)||this,s.observer=void 0,s.config=void 0,s.observer=i,s.config=o,s}var r=l.prototype;return r.resetInitSegment=function(o,s,u){t.prototype.resetInitSegment.call(this,o,s,u),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:o,duration:u,inputTimeScale:9e4,dropped:0}},l.probe=function(o){if(!o)return!1;for(var s=S.getID3Data(o,0)||[],u=s.length,a=o.length;u<a;u++)if(y.probe(o,u))return m.logger.log("ADTS sync word found !"),!0;return!1},r.canParse=function(o,s){return y.canParse(o,s)},r.appendFrame=function(o,s,u){y.initTrackConfig(o,this.observer,s,u,o.manifestCodec);var a=y.appendFrame(o,s,u,this.initPTS,this.frameIndex);if(a&&a.missing===0)return a},l}(M.default);d.minProbeByteLength=9,v.default=d},"./src/demux/adts.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"getAudioConfig",function(){return S}),O.d(v,"isHeaderPattern",function(){return b}),O.d(v,"getHeaderLength",function(){return p}),O.d(v,"getFullFrameLength",function(){return d}),O.d(v,"canGetFrameLength",function(){return t}),O.d(v,"isHeader",function(){return l}),O.d(v,"canParse",function(){return r}),O.d(v,"probe",function(){return i}),O.d(v,"initTrackConfig",function(){return o}),O.d(v,"getFrameDuration",function(){return s}),O.d(v,"parseFrameHeader",function(){return u}),O.d(v,"appendFrame",function(){return a});var M=O("./src/utils/logger.ts"),y=O("./src/errors.ts"),m=O("./src/events.ts");function S(c,f,w,_){var h,R,C,g,x=navigator.userAgent.toLowerCase(),E=_,T=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];h=((f[w+2]&192)>>>6)+1;var k=(f[w+2]&60)>>>2;if(k>T.length-1){c.trigger(m.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+k});return}return C=(f[w+2]&1)<<2,C|=(f[w+3]&192)>>>6,M.logger.log("manifest codec:"+_+", ADTS type:"+h+", samplingIndex:"+k),/firefox/i.test(x)?k>=6?(h=5,g=new Array(4),R=k-3):(h=2,g=new Array(2),R=k):x.indexOf("android")!==-1?(h=2,g=new Array(2),R=k):(h=5,g=new Array(4),_&&(_.indexOf("mp4a.40.29")!==-1||_.indexOf("mp4a.40.5")!==-1)||!_&&k>=6?R=k-3:((_&&_.indexOf("mp4a.40.2")!==-1&&(k>=6&&C===1||/vivaldi/i.test(x))||!_&&C===1)&&(h=2,g=new Array(2)),R=k)),g[0]=h<<3,g[0]|=(k&14)>>1,g[1]|=(k&1)<<7,g[1]|=C<<3,h===5&&(g[1]|=(R&14)>>1,g[2]=(R&1)<<7,g[2]|=2<<2,g[3]=0),{config:g,samplerate:T[k],channelCount:C,codec:"mp4a.40."+h,manifestCodec:E}}function b(c,f){return c[f]===255&&(c[f+1]&246)===240}function p(c,f){return c[f+1]&1?7:9}function d(c,f){return(c[f+3]&3)<<11|c[f+4]<<3|(c[f+5]&224)>>>5}function t(c,f){return f+5<c.length}function l(c,f){return f+1<c.length&&b(c,f)}function r(c,f){return t(c,f)&&b(c,f)&&d(c,f)<=c.length-f}function i(c,f){if(l(c,f)){var w=p(c,f);if(f+w>=c.length)return!1;var _=d(c,f);if(_<=w)return!1;var h=f+_;return h===c.length||l(c,h)}return!1}function o(c,f,w,_,h){if(!c.samplerate){var R=S(f,w,_,h);if(!R)return;c.config=R.config,c.samplerate=R.samplerate,c.channelCount=R.channelCount,c.codec=R.codec,c.manifestCodec=R.manifestCodec,M.logger.log("parsed codec:"+c.codec+", rate:"+R.samplerate+", channels:"+R.channelCount)}}function s(c){return 1024*9e4/c}function u(c,f,w,_,h){var R=p(c,f),C=d(c,f);if(C-=R,C>0){var g=w+_*h;return{headerLength:R,frameLength:C,stamp:g}}}function a(c,f,w,_,h){var R=s(c.samplerate),C=u(f,w,_,h,R);if(C){var g=C.frameLength,x=C.headerLength,E=C.stamp,T=x+g,k=Math.max(0,w+T-f.length),L;k?(L=new Uint8Array(T-x),L.set(f.subarray(w+x,f.length),0)):L=f.subarray(w+x,w+T);var A={unit:L,pts:E};return k||c.samples.push(A),{sample:A,length:T,missing:k}}}},"./src/demux/base-audio-demuxer.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"initPTSFn",function(){return d});var M=O("./src/polyfills/number.ts"),y=O("./src/demux/id3.ts"),m=O("./src/demux/dummy-demuxed-track.ts"),S=O("./src/utils/mp4-tools.ts"),b=O("./src/utils/typed-array.ts"),p=function(){function t(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var l=t.prototype;return l.resetInitSegment=function(i,o,s){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},l.resetTimeStamp=function(){},l.resetContiguity=function(){},l.canParse=function(i,o){return!1},l.appendFrame=function(i,o,s){},l.demux=function(i,o){this.cachedData&&(i=Object(S.appendUint8Array)(this.cachedData,i),this.cachedData=null);var s=y.getID3Data(i,0),u=s?s.length:0,a,c,f=this._audioTrack,w=this._id3Track,_=s?y.getTimeStamp(s):void 0,h=i.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=d(_,o)),s&&s.length>0&&w.samples.push({pts:this.initPTS,dts:this.initPTS,data:s}),c=this.initPTS;u<h;){if(this.canParse(i,u)){var R=this.appendFrame(f,i,u);R?(this.frameIndex++,c=R.sample.pts,u+=R.length,a=u):u=h}else y.canParse(i,u)?(s=y.getID3Data(i,u),w.samples.push({pts:c,dts:c,data:s}),u+=s.length,a=u):u++;if(u===h&&a!==h){var C=Object(b.sliceUint8)(i,a);this.cachedData?this.cachedData=Object(S.appendUint8Array)(this.cachedData,C):this.cachedData=C}}return{audioTrack:f,avcTrack:Object(m.dummyTrack)(),id3Track:w,textTrack:Object(m.dummyTrack)()}},l.demuxSampleAes=function(i,o,s){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},l.flush=function(i){var o=this.cachedData;return o&&(this.cachedData=null,this.demux(o,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(m.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(m.dummyTrack)()}},l.destroy=function(){},t}(),d=function(l,r){return Object(M.isFiniteNumber)(l)?l*90:r*9e4};v.default=p},"./src/demux/chunk-cache.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return M});var M=function(){function m(){this.chunks=[],this.dataLength=0}var S=m.prototype;return S.push=function(p){this.chunks.push(p),this.dataLength+=p.length},S.flush=function(){var p=this.chunks,d=this.dataLength,t;if(p.length)p.length===1?t=p[0]:t=y(p,d);else return new Uint8Array(0);return this.reset(),t},S.reset=function(){this.chunks.length=0,this.dataLength=0},m}();function y(m,S){for(var b=new Uint8Array(S),p=0,d=0;d<m.length;d++){var t=m[d];b.set(t,p),p+=t.length}return b}},"./src/demux/dummy-demuxed-track.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"dummyTrack",function(){return M});function M(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/utils/logger.ts"),y=function(){function m(b){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=b,this.bytesAvailable=b.byteLength,this.word=0,this.bitsAvailable=0}var S=m.prototype;return S.loadWord=function(){var p=this.data,d=this.bytesAvailable,t=p.byteLength-d,l=new Uint8Array(4),r=Math.min(4,d);if(r===0)throw new Error("no bytes available");l.set(p.subarray(t,t+r)),this.word=new DataView(l.buffer).getUint32(0),this.bitsAvailable=r*8,this.bytesAvailable-=r},S.skipBits=function(p){var d;this.bitsAvailable>p?(this.word<<=p,this.bitsAvailable-=p):(p-=this.bitsAvailable,d=p>>3,p-=d>>3,this.bytesAvailable-=d,this.loadWord(),this.word<<=p,this.bitsAvailable-=p)},S.readBits=function(p){var d=Math.min(this.bitsAvailable,p),t=this.word>>>32-d;return p>32&&M.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=d,this.bitsAvailable>0?this.word<<=d:this.bytesAvailable>0&&this.loadWord(),d=p-d,d>0&&this.bitsAvailable?t<<d|this.readBits(d):t},S.skipLZ=function(){var p;for(p=0;p<this.bitsAvailable;++p)if((this.word&2147483648>>>p)!==0)return this.word<<=p,this.bitsAvailable-=p,p;return this.loadWord(),p+this.skipLZ()},S.skipUEG=function(){this.skipBits(1+this.skipLZ())},S.skipEG=function(){this.skipBits(1+this.skipLZ())},S.readUEG=function(){var p=this.skipLZ();return this.readBits(p+1)-1},S.readEG=function(){var p=this.readUEG();return 1&p?1+p>>>1:-1*(p>>>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(p){for(var d=8,t=8,l,r=0;r<p;r++)t!==0&&(l=this.readEG(),t=(d+l+256)%256),d=t===0?d:t},S.readSPS=function(){var p=0,d=0,t=0,l=0,r,i,o,s=this.readUByte.bind(this),u=this.readBits.bind(this),a=this.readUEG.bind(this),c=this.readBoolean.bind(this),f=this.skipBits.bind(this),w=this.skipEG.bind(this),_=this.skipUEG.bind(this),h=this.skipScalingList.bind(this);s();var R=s();if(u(5),f(3),s(),_(),R===100||R===110||R===122||R===244||R===44||R===83||R===86||R===118||R===128){var C=a();if(C===3&&f(1),_(),_(),f(1),c())for(i=C!==3?8:12,o=0;o<i;o++)c()&&(o<6?h(16):h(64))}_();var g=a();if(g===0)a();else if(g===1)for(f(1),w(),w(),r=a(),o=0;o<r;o++)w();_(),f(1);var x=a(),E=a(),T=u(1);T===0&&f(1),f(1),c()&&(p=a(),d=a(),t=a(),l=a());var k=[1,1];if(c()&&c()){var L=s();switch(L){case 1:k=[1,1];break;case 2:k=[12,11];break;case 3:k=[10,11];break;case 4:k=[16,11];break;case 5:k=[40,33];break;case 6:k=[24,11];break;case 7:k=[20,11];break;case 8:k=[32,11];break;case 9:k=[80,33];break;case 10:k=[18,11];break;case 11:k=[15,11];break;case 12:k=[64,33];break;case 13:k=[160,99];break;case 14:k=[4,3];break;case 15:k=[3,2];break;case 16:k=[2,1];break;case 255:{k=[s()<<8|s(),s()<<8|s()];break}}}return{width:Math.ceil((x+1)*16-p*2-d*2),height:(2-T)*(E+1)*16-(T?2:4)*(t+l),pixelRatio:k}},S.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},m}();v.default=y},"./src/demux/id3.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"isHeader",function(){return M}),O.d(v,"isFooter",function(){return y}),O.d(v,"getID3Data",function(){return m}),O.d(v,"canParse",function(){return b}),O.d(v,"getTimeStamp",function(){return p}),O.d(v,"isTimeStampFrame",function(){return d}),O.d(v,"getID3Frames",function(){return l}),O.d(v,"decodeFrame",function(){return r}),O.d(v,"utf8ArrayToStr",function(){return a}),O.d(v,"testables",function(){return c});var M=function(h,R){return R+10<=h.length&&(h[R]===73&&h[R+1]===68&&h[R+2]===51&&(h[R+3]<255&&h[R+4]<255&&(h[R+6]<128&&h[R+7]<128&&h[R+8]<128&&h[R+9]<128)))},y=function(h,R){return R+10<=h.length&&(h[R]===51&&h[R+1]===68&&h[R+2]===73&&(h[R+3]<255&&h[R+4]<255&&(h[R+6]<128&&h[R+7]<128&&h[R+8]<128&&h[R+9]<128)))},m=function(h,R){for(var C=R,g=0;M(h,R);){g+=10;var x=S(h,R+6);g+=x,y(h,R+10)&&(g+=10),R+=g}return g>0?h.subarray(C,C+g):void 0},S=function(h,R){var C=0;return C=(h[R]&127)<<21,C|=(h[R+1]&127)<<14,C|=(h[R+2]&127)<<7,C|=h[R+3]&127,C},b=function(h,R){return M(h,R)&&S(h,R+6)+10<=h.length-R},p=function(h){for(var R=l(h),C=0;C<R.length;C++){var g=R[C];if(d(g))return u(g)}return},d=function(h){return h&&h.key==="PRIV"&&h.info==="com.apple.streaming.transportStreamTimestamp"},t=function(h){var R=String.fromCharCode(h[0],h[1],h[2],h[3]),C=S(h,4),g=10;return{type:R,size:C,data:h.subarray(g,g+C)}},l=function(h){for(var R=0,C=[];M(h,R);){var g=S(h,R+6);R+=10;for(var x=R+g;R+8<x;){var E=t(h.subarray(R)),T=r(E);T&&C.push(T),R+=E.size+10}y(h,R)&&(R+=10)}return C},r=function(h){return h.type==="PRIV"?i(h):h.type[0]==="W"?s(h):o(h)},i=function(h){if(h.size<2)return;var R=a(h.data,!0),C=new Uint8Array(h.data.subarray(R.length+1));return{key:h.type,info:R,data:C.buffer}},o=function(h){if(h.size<2)return;if(h.type==="TXXX"){var R=1,C=a(h.data.subarray(R),!0);R+=C.length+1;var g=a(h.data.subarray(R));return{key:h.type,info:C,data:g}}var x=a(h.data.subarray(1));return{key:h.type,data:x}},s=function(h){if(h.type==="WXXX"){if(h.size<2)return;var R=1,C=a(h.data.subarray(R),!0);R+=C.length+1;var g=a(h.data.subarray(R));return{key:h.type,info:C,data:g}}var x=a(h.data);return{key:h.type,data:x}},u=function(h){if(h.data.byteLength===8){var R=new Uint8Array(h.data),C=R[3]&1,g=(R[4]<<23)+(R[5]<<15)+(R[6]<<7)+R[7];return g/=45,C&&(g+=4772185884e-2),Math.round(g)}return},a=function(h,R){R===void 0&&(R=!1);var C=w();if(C){var g=C.decode(h);if(R){var x=g.indexOf("\0");return x!==-1?g.substring(0,x):g}return g.replace(/\0/g,"")}for(var E=h.length,T,k,L,A="",G=0;G<E;){if(T=h[G++],T===0&&R)return A;if(T===0||T===3)continue;switch(T>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:A+=String.fromCharCode(T);break;case 12:case 13:k=h[G++],A+=String.fromCharCode((T&31)<<6|k&63);break;case 14:k=h[G++],L=h[G++],A+=String.fromCharCode((T&15)<<12|(k&63)<<6|(L&63)<<0);break;default:}}return A},c={decodeTextFrame:o},f;function w(){return!f&&typeof self.TextDecoder!="undefined"&&(f=new self.TextDecoder("utf-8")),f}},"./src/demux/mp3demuxer.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/demux/base-audio-demuxer.ts"),y=O("./src/demux/id3.ts"),m=O("./src/utils/logger.ts"),S=O("./src/demux/mpegaudio.ts");function b(t,l){t.prototype=Object.create(l.prototype),t.prototype.constructor=t,p(t,l)}function p(t,l){return p=Object.setPrototypeOf||function(i,o){return i.__proto__=o,i},p(t,l)}var d=function(t){b(l,t);function l(){return t.apply(this,arguments)||this}var r=l.prototype;return r.resetInitSegment=function(o,s,u){t.prototype.resetInitSegment.call(this,o,s,u),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:o,duration:u,inputTimeScale:9e4,dropped:0}},l.probe=function(o){if(!o)return!1;for(var s=y.getID3Data(o,0)||[],u=s.length,a=o.length;u<a;u++)if(S.probe(o,u))return m.logger.log("MPEG Audio sync word found !"),!0;return!1},r.canParse=function(o,s){return S.canParse(o,s)},r.appendFrame=function(o,s,u){return this.initPTS===null?void 0:S.appendFrame(o,s,u,this.initPTS,this.frameIndex)},l}(M.default);d.minProbeByteLength=4,v.default=d},"./src/demux/mp4demuxer.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/utils/mp4-tools.ts"),y=O("./src/demux/dummy-demuxed-track.ts"),m=function(){function S(p,d){this.remainderData=null,this.config=void 0,this.config=d}var b=S.prototype;return b.resetTimeStamp=function(){},b.resetInitSegment=function(){},b.resetContiguity=function(){},S.probe=function(d){return Object(M.findBox)({data:d,start:0,end:Math.min(d.length,16384)},["moof"]).length>0},b.demux=function(d){var t=d,l=Object(y.dummyTrack)();if(this.config.progressive){this.remainderData&&(t=Object(M.appendUint8Array)(this.remainderData,d));var r=Object(M.segmentValidRange)(t);this.remainderData=r.remainder,l.samples=r.valid||new Uint8Array}else l.samples=t;return{audioTrack:Object(y.dummyTrack)(),avcTrack:l,id3Track:Object(y.dummyTrack)(),textTrack:Object(y.dummyTrack)()}},b.flush=function(){var d=Object(y.dummyTrack)();return d.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(y.dummyTrack)(),avcTrack:d,id3Track:Object(y.dummyTrack)(),textTrack:Object(y.dummyTrack)()}},b.demuxSampleAes=function(d,t,l){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},b.destroy=function(){},S}();m.minProbeByteLength=1024,v.default=m},"./src/demux/mpegaudio.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"appendFrame",function(){return p}),O.d(v,"parseHeader",function(){return d}),O.d(v,"isHeaderPattern",function(){return t}),O.d(v,"isHeader",function(){return l}),O.d(v,"canParse",function(){return r}),O.d(v,"probe",function(){return i});var M=null,y=[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],m=[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]],b=[0,1,1,4];function p(o,s,u,a,c){if(u+24>s.length)return;var f=d(s,u);if(f&&u+f.frameLength<=s.length){var w=f.samplesPerFrame*9e4/f.sampleRate,_=a+c*w,h={unit:s.subarray(u,u+f.frameLength),pts:_,dts:_};return o.config=[],o.channelCount=f.channelCount,o.samplerate=f.sampleRate,o.samples.push(h),{sample:h,length:f.frameLength,missing:0}}}function d(o,s){var u=o[s+1]>>3&3,a=o[s+1]>>1&3,c=o[s+2]>>4&15,f=o[s+2]>>2&3;if(u!==1&&c!==0&&c!==15&&f!==3){var w=o[s+2]>>1&1,_=o[s+3]>>6,h=u===3?3-a:a===3?3:4,R=y[h*14+c-1]*1e3,C=u===3?0:u===2?1:2,g=m[C*3+f],x=_===3?1:2,E=S[u][a],T=b[a],k=E*8*T,L=Math.floor(E*R/g+w)*T;if(M===null){var A=navigator.userAgent||"",G=A.match(/Chrome\/(\d+)/i);M=G?parseInt(G[1]):0}var K=!!M&&M<=87;return K&&a===2&&R>=224e3&&_===0&&(o[s+3]=o[s+3]|128),{sampleRate:g,channelCount:x,frameLength:L,samplesPerFrame:k}}}function t(o,s){return o[s]===255&&(o[s+1]&224)===224&&(o[s+1]&6)!==0}function l(o,s){return s+1<o.length&&t(o,s)}function r(o,s){var u=4;return t(o,s)&&u<=o.length-s}function i(o,s){if(s+1<o.length&&t(o,s)){var u=4,a=d(o,s),c=u;a!=null&&a.frameLength&&(c=a.frameLength);var f=s+c;return f===o.length||l(o,f)}return!1}},"./src/demux/sample-aes.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/crypt/decrypter.ts"),y=O("./src/demux/tsdemuxer.ts"),m=function(){function S(p,d,t){this.keyData=void 0,this.decrypter=void 0,this.keyData=t,this.decrypter=new M.default(p,d,{removePKCS7Padding:!1})}var b=S.prototype;return b.decryptBuffer=function(d,t){this.decrypter.decrypt(d,this.keyData.key.buffer,this.keyData.iv.buffer,t)},b.decryptAacSample=function(d,t,l,r){var i=d[t].unit,o=i.subarray(16,i.length-i.length%16),s=o.buffer.slice(o.byteOffset,o.byteOffset+o.length),u=this;this.decryptBuffer(s,function(a){var c=new Uint8Array(a);i.set(c,16),r||u.decryptAacSamples(d,t+1,l)})},b.decryptAacSamples=function(d,t,l){for(;;t++){if(t>=d.length){l();return}if(d[t].unit.length<32)continue;var r=this.decrypter.isSync();if(this.decryptAacSample(d,t,l,r),!r)return}},b.getAvcEncryptedData=function(d){for(var t=Math.floor((d.length-48)/160)*16+16,l=new Int8Array(t),r=0,i=32;i<=d.length-16;i+=160,r+=16)l.set(d.subarray(i,i+16),r);return l},b.getAvcDecryptedUnit=function(d,t){for(var l=new Uint8Array(t),r=0,i=32;i<=d.length-16;i+=160,r+=16)d.set(l.subarray(r,r+16),i);return d},b.decryptAvcSample=function(d,t,l,r,i,o){var s=Object(y.discardEPB)(i.data),u=this.getAvcEncryptedData(s),a=this;this.decryptBuffer(u.buffer,function(c){i.data=a.getAvcDecryptedUnit(s,c),o||a.decryptAvcSamples(d,t,l+1,r)})},b.decryptAvcSamples=function(d,t,l,r){if(d instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,l=0){if(t>=d.length){r();return}for(var i=d[t].units;!(l>=i.length);l++){var o=i[l];if(o.data.length<=48||o.type!==1&&o.type!==5)continue;var s=this.decrypter.isSync();if(this.decryptAvcSample(d,t,l,r,o,s),!s)return}}},S}();v.default=m},"./src/demux/transmuxer-interface.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return i});var M=O("./node_modules/webworkify-webpack/index.js"),y=O.n(M),m=O("./src/events.ts"),S=O("./src/demux/transmuxer.ts"),b=O("./src/utils/logger.ts"),p=O("./src/errors.ts"),d=O("./src/utils/mediasource-helper.ts"),t=O("./node_modules/eventemitter3/index.js"),l=O.n(t),r=Object(d.getMediaSource)()||{isTypeSupported:function(){return!1}},i=function(){function o(u,a,c,f){var w=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=u,this.id=a,this.onTransmuxComplete=c,this.onFlush=f;var _=u.config,h=function(E,T){T=T||{},T.frag=w.frag,T.id=w.id,u.trigger(E,T)};this.observer=new t.EventEmitter,this.observer.on(m.Events.FRAG_DECRYPTED,h),this.observer.on(m.Events.ERROR,h);var R={mp4:r.isTypeSupported("video/mp4"),mpeg:r.isTypeSupported("audio/mpeg"),mp3:r.isTypeSupported('audio/mp4; codecs="mp3"')},C=navigator.vendor;if(_.enableWorker&&typeof Worker!="undefined"){b.logger.log("demuxing in webworker");var g;try{g=this.worker=M("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(x){u.trigger(m.Events.ERROR,{type:p.ErrorTypes.OTHER_ERROR,details:p.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(x.message+" ("+x.filename+":"+x.lineno+")")})},g.postMessage({cmd:"init",typeSupported:R,vendor:C,id:a,config:JSON.stringify(_)})}catch(x){b.logger.warn("Error in worker:",x),b.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.objectURL),this.transmuxer=new S.default(this.observer,R,_,C,a),this.worker=null}}else this.transmuxer=new S.default(this.observer,R,_,C,a)}var s=o.prototype;return s.destroy=function(){var a=this.worker;if(a)a.removeEventListener("message",this.onwmsg),a.terminate(),this.worker=null;else{var c=this.transmuxer;c&&(c.destroy(),this.transmuxer=null)}var f=this.observer;f&&f.removeAllListeners(),this.observer=null},s.push=function(a,c,f,w,_,h,R,C,g,x){var E=this;g.transmuxing.start=self.performance.now();var T=this.transmuxer,k=this.worker,L=h?h.start:_.start,A=_.decryptdata,G=this.frag,K=!(G&&_.cc===G.cc),W=!(G&&g.level===G.level),z=G?g.sn-G.sn:-1,U=this.part?g.part-this.part.index:1,P=!W&&(z===1||z===0&&U===1),H=self.performance.now();(W||z||_.stats.parsing.start===0)&&(_.stats.parsing.start=H),h&&(U||!P)&&(h.stats.parsing.start=H);var V=new S.TransmuxState(K,P,C,W,L);if(!P||K){b.logger.log("[transmuxer-interface, "+_.type+"]: Starting new transmux session for sn: "+g.sn+" p: "+g.part+" level: "+g.level+" id: "+g.id+`
discontinuity: `+K+`
trackSwitch: `+W+`
contiguous: `+P+`
accurateTimeOffset: `+C+`
timeOffset: `+L);var q=new S.TransmuxConfig(f,w,c,R,x);this.configureTransmuxer(q)}if(this.frag=_,this.part=h,k)k.postMessage({cmd:"demux",data:a,decryptdata:A,chunkMeta:g,state:V},a instanceof ArrayBuffer?[a]:[]);else if(T){var Z=T.push(a,A,g,V);Object(S.isPromise)(Z)?Z.then(function(ce){E.handleTransmuxComplete(ce)}):this.handleTransmuxComplete(Z)}},s.flush=function(a){var c=this;a.transmuxing.start=self.performance.now();var f=this.transmuxer,w=this.worker;if(w)w.postMessage({cmd:"flush",chunkMeta:a});else if(f){var _=f.flush(a);Object(S.isPromise)(_)?_.then(function(h){c.handleFlushResult(h,a)}):this.handleFlushResult(_,a)}},s.handleFlushResult=function(a,c){var f=this;a.forEach(function(w){f.handleTransmuxComplete(w)}),this.onFlush(c)},s.onWorkerMessage=function(a){var c=a.data,f=this.hls;switch(c.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(c.data);break}case"flush":{this.onFlush(c.data);break}default:{c.data=c.data||{},c.data.frag=this.frag,c.data.id=this.id,f.trigger(c.event,c.data);break}}},s.configureTransmuxer=function(a){var c=this.worker,f=this.transmuxer;c?c.postMessage({cmd:"configure",config:a}):f&&f.configure(a)},s.handleTransmuxComplete=function(a){a.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(a)},o}()},"./src/demux/transmuxer-worker.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return p});var M=O("./src/demux/transmuxer.ts"),y=O("./src/events.ts"),m=O("./src/utils/logger.ts"),S=O("./node_modules/eventemitter3/index.js"),b=O.n(S);function p(i){var o=new S.EventEmitter,s=function(a,c){i.postMessage({event:a,data:c})};o.on(y.Events.FRAG_DECRYPTED,s),o.on(y.Events.ERROR,s),i.addEventListener("message",function(u){var a=u.data;switch(a.cmd){case"init":{var c=JSON.parse(a.config);i.transmuxer=new M.default(o,a.typeSupported,c,a.vendor,a.id),Object(m.enableLogs)(c.debug),s("init",null);break}case"configure":{i.transmuxer.configure(a.config);break}case"demux":{var f=i.transmuxer.push(a.data,a.decryptdata,a.chunkMeta,a.state);Object(M.isPromise)(f)?f.then(function(h){d(i,h)}):d(i,f);break}case"flush":{var w=a.chunkMeta,_=i.transmuxer.flush(w);Object(M.isPromise)(_)?_.then(function(h){l(i,h,w)}):l(i,_,w);break}default:break}})}function d(i,o){if(r(o.remuxResult))return;var s=[],u=o.remuxResult,a=u.audio,c=u.video;a&&t(s,a),c&&t(s,c),i.postMessage({event:"transmuxComplete",data:o},s)}function t(i,o){o.data1&&i.push(o.data1.buffer),o.data2&&i.push(o.data2.buffer)}function l(i,o,s){o.forEach(function(u){d(i,u)}),i.postMessage({event:"flush",data:s})}function r(i){return!i.audio&&!i.video&&!i.text&&!i.id3&&!i.initSegment}},"./src/demux/transmuxer.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return c}),O.d(v,"isPromise",function(){return _}),O.d(v,"TransmuxConfig",function(){return h}),O.d(v,"TransmuxState",function(){return R});var M=O("./src/events.ts"),y=O("./src/errors.ts"),m=O("./src/crypt/decrypter.ts"),S=O("./src/demux/aacdemuxer.ts"),b=O("./src/demux/mp4demuxer.ts"),p=O("./src/demux/tsdemuxer.ts"),d=O("./src/demux/mp3demuxer.ts"),t=O("./src/remux/mp4-remuxer.ts"),l=O("./src/remux/passthrough-remuxer.ts"),r=O("./src/demux/chunk-cache.ts"),i=O("./src/utils/mp4-tools.ts"),o=O("./src/utils/logger.ts"),s;try{s=self.performance.now.bind(self.performance)}catch(C){o.logger.debug("Unable to use Performance API on this environment"),s=self.Date.now}var u=[{demux:p.default,remux:t.default},{demux:b.default,remux:l.default},{demux:S.default,remux:t.default},{demux:d.default,remux:t.default}],a=1024;u.forEach(function(C){var g=C.demux;a=Math.max(a,g.minProbeByteLength)});var c=function(){function C(x,E,T,k,L){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 r.default,this.observer=x,this.typeSupported=E,this.config=T,this.vendor=k,this.id=L}var g=C.prototype;return g.configure=function(E){this.transmuxConfig=E,this.decrypter&&this.decrypter.reset()},g.push=function(E,T,k,L){var A=this,G=k.transmuxing;G.executeStart=s();var K=new Uint8Array(E),W=this.cache,z=this.config,U=this.currentTransmuxState,P=this.transmuxConfig;L&&(this.currentTransmuxState=L);var H=f(K,T);if(H&&H.method==="AES-128"){var V=this.getDecrypter();if(z.enableSoftwareAES){var q=V.softwareDecrypt(K,H.key.buffer,H.iv.buffer);if(!q)return G.executeEnd=s(),w(k);K=new Uint8Array(q)}else return this.decryptionPromise=V.webCryptoDecrypt(K,H.key.buffer,H.iv.buffer).then(function(J){var X=A.push(J,null,k);return A.decryptionPromise=null,X}),this.decryptionPromise}var Z=L||U,ce=Z.contiguous,he=Z.discontinuity,ae=Z.trackSwitch,xe=Z.accurateTimeOffset,ge=Z.timeOffset,oe=P.audioCodec,se=P.videoCodec,te=P.defaultInitPts,be=P.duration,ee=P.initSegmentData;if((he||ae)&&this.resetInitSegment(ee,oe,se,be),he&&this.resetInitialTimestamp(te),ce||this.resetContiguity(),this.needsProbing(K,he,ae)){if(W.dataLength){var ie=W.flush();K=Object(i.appendUint8Array)(ie,K)}this.configureTransmuxer(K,P)}var Ee=this.transmux(K,H,ge,xe,k),ne=this.currentTransmuxState;return ne.contiguous=!0,ne.discontinuity=!1,ne.trackSwitch=!1,G.executeEnd=s(),Ee},g.flush=function(E){var T=this,k=E.transmuxing;k.executeStart=s();var L=this.decrypter,A=this.cache,G=this.currentTransmuxState,K=this.decryptionPromise;if(K)return K.then(function(){return T.flush(E)});var W=[],z=G.timeOffset;if(L){var U=L.flush();U&&W.push(this.push(U,null,E))}var P=A.dataLength;A.reset();var H=this.demuxer,V=this.remuxer;if(!H||!V)return P>=a&&this.observer.emit(M.Events.ERROR,M.Events.ERROR,{type:y.ErrorTypes.MEDIA_ERROR,details:y.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),k.executeEnd=s(),[w(E)];var q=H.flush(z);return _(q)?q.then(function(Z){return T.flushRemux(W,Z,E),W}):(this.flushRemux(W,q,E),W)},g.flushRemux=function(E,T,k){var L=T.audioTrack,A=T.avcTrack,G=T.id3Track,K=T.textTrack,W=this.currentTransmuxState,z=W.accurateTimeOffset,U=W.timeOffset;o.logger.log("[transmuxer.ts]: Flushed fragment "+k.sn+(k.part>-1?" p: "+k.part:"")+" of level "+k.level);var P=this.remuxer.remux(L,A,G,K,U,z,!0,this.id);E.push({remuxResult:P,chunkMeta:k}),k.transmuxing.executeEnd=s()},g.resetInitialTimestamp=function(E){var T=this.demuxer,k=this.remuxer;if(!T||!k)return;T.resetTimeStamp(E),k.resetTimeStamp(E)},g.resetContiguity=function(){var E=this.demuxer,T=this.remuxer;if(!E||!T)return;E.resetContiguity(),T.resetNextTimestamp()},g.resetInitSegment=function(E,T,k,L){var A=this.demuxer,G=this.remuxer;if(!A||!G)return;A.resetInitSegment(T,k,L),G.resetInitSegment(E,T,k)},g.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},g.transmux=function(E,T,k,L,A){var G;return T&&T.method==="SAMPLE-AES"?G=this.transmuxSampleAes(E,T,k,L,A):G=this.transmuxUnencrypted(E,k,L,A),G},g.transmuxUnencrypted=function(E,T,k,L){var A=this.demuxer.demux(E,T,!1,!this.config.progressive),G=A.audioTrack,K=A.avcTrack,W=A.id3Track,z=A.textTrack,U=this.remuxer.remux(G,K,W,z,T,k,!1,this.id);return{remuxResult:U,chunkMeta:L}},g.transmuxSampleAes=function(E,T,k,L,A){var G=this;return this.demuxer.demuxSampleAes(E,T,k).then(function(K){var W=G.remuxer.remux(K.audioTrack,K.avcTrack,K.id3Track,K.textTrack,k,L,!1,G.id);return{remuxResult:W,chunkMeta:A}})},g.configureTransmuxer=function(E,T){for(var k=this.config,L=this.observer,A=this.typeSupported,G=this.vendor,K=T.audioCodec,W=T.defaultInitPts,z=T.duration,U=T.initSegmentData,P=T.videoCodec,H,V=0,q=u.length;V<q;V++)if(u[V].demux.probe(E)){H=u[V];break}H||(o.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),H={demux:b.default,remux:l.default});var Z=this.demuxer,ce=this.remuxer,he=H.remux,ae=H.demux;(!ce||!(ce instanceof he))&&(this.remuxer=new he(L,k,A,G)),(!Z||!(Z instanceof ae))&&(this.demuxer=new ae(L,k,A),this.probe=ae.probe),this.resetInitSegment(U,K,P,z),this.resetInitialTimestamp(W)},g.needsProbing=function(E,T,k){return!this.demuxer||!this.remuxer||T||k},g.getDecrypter=function(){var E=this.decrypter;return E||(E=this.decrypter=new m.default(this.observer,this.config)),E},C}();function f(C,g){var x=null;return C.byteLength>0&&g!=null&&g.key!=null&&g.iv!==null&&g.method!=null&&(x=g),x}var w=function(g){return{remuxResult:{},chunkMeta:g}};function _(C){return"then"in C&&C.then instanceof Function}var h=function(g,x,E,T,k){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=g,this.videoCodec=x,this.initSegmentData=E,this.duration=T,this.defaultInitPts=k},R=function(g,x,E,T,k){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=g,this.contiguous=x,this.accurateTimeOffset=E,this.trackSwitch=T,this.timeOffset=k}},"./src/demux/tsdemuxer.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"discardEPB",function(){return w});var M=O("./src/demux/adts.ts"),y=O("./src/demux/mpegaudio.ts"),m=O("./src/demux/exp-golomb.ts"),S=O("./src/demux/id3.ts"),b=O("./src/demux/sample-aes.ts"),p=O("./src/events.ts"),d=O("./src/utils/mp4-tools.ts"),t=O("./src/utils/logger.ts"),l=O("./src/errors.ts"),r={video:1,audio:2,id3:3,text:4},i=function(){function _(R,C,g){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=R,this.config=C,this.typeSupported=g}_.probe=function(C){var g=_.syncOffset(C);return g<0?!1:(g&&t.logger.warn("MPEG2-TS detected but first sync word found @ offset "+g+", junk ahead ?"),!0)},_.syncOffset=function(C){for(var g=Math.min(1e3,C.length-3*188),x=0;x<g;){if(C[x]===71&&C[x+188]===71&&C[x+2*188]===71)return x;x++}return-1},_.createTrack=function(C,g){return{container:C==="video"||C==="audio"?"video/mp2t":void 0,type:C,id:r[C],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:C==="audio"?g:void 0}};var h=_.prototype;return h.resetInitSegment=function(C,g,x){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=_.createTrack("video",x),this._audioTrack=_.createTrack("audio",x),this._id3Track=_.createTrack("id3",x),this._txtTrack=_.createTrack("text",x),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=C,this.videoCodec=g,this._duration=x},h.resetTimeStamp=function(){},h.resetContiguity=function(){var C=this._audioTrack,g=this._avcTrack,x=this._id3Track;C&&(C.pesData=null),g&&(g.pesData=null),x&&(x.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},h.demux=function(C,g,x,E){x===void 0&&(x=!1),E===void 0&&(E=!1),x||(this.sampleAes=null);var T,k=this._avcTrack,L=this._audioTrack,A=this._id3Track,G=k.pid,K=k.pesData,W=L.pid,z=A.pid,U=L.pesData,P=A.pesData,H=!1,V=this.pmtParsed,q=this._pmtId,Z=C.length;if(this.remainderData&&(C=Object(d.appendUint8Array)(this.remainderData,C),Z=C.length,this.remainderData=null),Z<188&&!E)return this.remainderData=C,{audioTrack:L,avcTrack:k,id3Track:A,textTrack:this._txtTrack};var ce=Math.max(0,_.syncOffset(C));Z-=(Z+ce)%188,Z<C.byteLength&&!E&&(this.remainderData=new Uint8Array(C.buffer,Z,C.buffer.byteLength-Z));for(var he=ce;he<Z;he+=188)if(C[he]===71){var ae=!!(C[he+1]&64),xe=((C[he+1]&31)<<8)+C[he+2],ge=(C[he+3]&48)>>4,oe=void 0;if(ge>1){if(oe=he+5+C[he+4],oe===he+188)continue}else oe=he+4;switch(xe){case G:ae&&(K&&(T=a(K))&&this.parseAVCPES(T,!1),K={data:[],size:0}),K&&(K.data.push(C.subarray(oe,he+188)),K.size+=he+188-oe);break;case W:ae&&(U&&(T=a(U))&&(L.isAAC?this.parseAACPES(T):this.parseMPEGPES(T)),U={data:[],size:0}),U&&(U.data.push(C.subarray(oe,he+188)),U.size+=he+188-oe);break;case z:ae&&(P&&(T=a(P))&&this.parseID3PES(T),P={data:[],size:0}),P&&(P.data.push(C.subarray(oe,he+188)),P.size+=he+188-oe);break;case 0:ae&&(oe+=C[oe]+1),q=this._pmtId=s(C,oe);break;case q:{ae&&(oe+=C[oe]+1);var se=u(C,oe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,x);G=se.avc,G>0&&(k.pid=G),W=se.audio,W>0&&(L.pid=W,L.isAAC=se.isAAC),z=se.id3,z>0&&(A.pid=z),H&&!V&&(t.logger.log("reparse from beginning"),H=!1,he=ce-188),V=this.pmtParsed=!0;break}case 17:case 8191:break;default:H=!0;break}}else this.observer.emit(p.Events.ERROR,p.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});k.pesData=K,L.pesData=U,A.pesData=P;var te={audioTrack:L,avcTrack:k,id3Track:A,textTrack:this._txtTrack};return E&&this.extractRemainingSamples(te),te},h.flush=function(){var C=this.remainderData;this.remainderData=null;var g;return C?g=this.demux(C,-1,!1,!0):g={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(g),this.sampleAes?this.decrypt(g,this.sampleAes):g},h.extractRemainingSamples=function(C){var g=C.audioTrack,x=C.avcTrack,E=C.id3Track,T=x.pesData,k=g.pesData,L=E.pesData,A;T&&(A=a(T))?(this.parseAVCPES(A,!0),x.pesData=null):x.pesData=T,k&&(A=a(k))?(g.isAAC?this.parseAACPES(A):this.parseMPEGPES(A),g.pesData=null):(k!=null&&k.size&&t.logger.log("last AAC PES packet truncated,might overlap between fragments"),g.pesData=k),L&&(A=a(L))?(this.parseID3PES(A),E.pesData=null):E.pesData=L},h.demuxSampleAes=function(C,g,x){var E=this.demux(C,x,!0,!this.config.progressive),T=this.sampleAes=new b.default(this.observer,this.config,g);return this.decrypt(E,T)},h.decrypt=function(C,g){return new Promise(function(x){var E=C.audioTrack,T=C.avcTrack;E.samples&&E.isAAC?g.decryptAacSamples(E.samples,0,function(){T.samples?g.decryptAvcSamples(T.samples,0,0,function(){x(C)}):x(C)}):T.samples&&g.decryptAvcSamples(T.samples,0,0,function(){x(C)})})},h.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},h.parseAVCPES=function(C,g){var x=this,E=this._avcTrack,T=this.parseAVCNALu(C.data),k=!1,L=this.avcSample,A,G=!1;C.data=null,L&&T.length&&!E.audFound&&(c(L,E),L=this.avcSample=o(!1,C.pts,C.dts,"")),T.forEach(function(K){switch(K.type){case 1:{A=!0,L||(L=x.avcSample=o(!0,C.pts,C.dts,"")),k&&(L.debug+="NDR "),L.frame=!0;var W=K.data;if(G&&W.length>4){var z=new m.default(W).readSliceType();(z===2||z===4||z===7||z===9)&&(L.key=!0)}break}case 5:A=!0,L||(L=x.avcSample=o(!0,C.pts,C.dts,"")),k&&(L.debug+="IDR "),L.key=!0,L.frame=!0;break;case 6:{A=!0,k&&L&&(L.debug+="SEI ");var U=new m.default(w(K.data));U.readUByte();for(var P=0,H=0,V=!1,q=0;!V&&U.bytesAvailable>1;){P=0;do q=U.readUByte(),P+=q;while(q===255);H=0;do q=U.readUByte(),H+=q;while(q===255);if(P===4&&U.bytesAvailable!==0){V=!0;var Z=U.readUByte();if(Z===181){var ce=U.readUShort();if(ce===49){var he=U.readUInt();if(he===1195456820){var ae=U.readUByte();if(ae===3){for(var xe=U.readUByte(),ge=U.readUByte(),oe=31&xe,se=[xe,ge],te=0;te<oe;te++)se.push(U.readUByte()),se.push(U.readUByte()),se.push(U.readUByte());f(x._txtTrack.samples,{type:3,pts:C.pts,bytes:se})}}}}}else if(P===5&&U.bytesAvailable!==0){if(V=!0,H>16){for(var be=[],ee=0;ee<16;ee++)be.push(U.readUByte().toString(16)),(ee===3||ee===5||ee===7||ee===9)&&be.push("-");for(var ie=H-16,Ee=new Uint8Array(ie),ne=0;ne<ie;ne++)Ee[ne]=U.readUByte();f(x._txtTrack.samples,{pts:C.pts,payloadType:P,uuid:be.join(""),userData:Object(S.utf8ArrayToStr)(Ee),userDataBytes:Ee})}}else if(H<U.bytesAvailable)for(var J=0;J<H;J++)U.readUByte()}break}case 7:if(A=!0,G=!0,k&&L&&(L.debug+="SPS "),!E.sps){var X=new m.default(K.data),Q=X.readSPS();E.width=Q.width,E.height=Q.height,E.pixelRatio=Q.pixelRatio,E.sps=[K.data],E.duration=x._duration;for(var me=K.data.subarray(1,4),fe="avc1.",Te=0;Te<3;Te++){var ze=me[Te].toString(16);ze.length<2&&(ze="0"+ze),fe+=ze}E.codec=fe}break;case 8:A=!0,k&&L&&(L.debug+="PPS "),E.pps||(E.pps=[K.data]);break;case 9:A=!1,E.audFound=!0,L&&c(L,E),L=x.avcSample=o(!1,C.pts,C.dts,k?"AUD ":"");break;case 12:A=!1;break;default:A=!1,L&&(L.debug+="unknown NAL "+K.type+" ");break}if(L&&A){var Je=L.units;Je.push(K)}}),g&&L&&(c(L,E),this.avcSample=null)},h.getLastNalUnit=function(){var C,g=this.avcSample,x;if(!g||g.units.length===0){var E=this._avcTrack.samples;g=E[E.length-1]}if((C=g)!==null&&C!==void 0&&C.units){var T=g.units;x=T[T.length-1]}return x},h.parseAVCNALu=function(C){var g=C.byteLength,x=this._avcTrack,E=x.naluState||0,T=E,k=[],L=0,A,G,K,W=-1,z=0;for(E===-1&&(W=0,z=C[0]&31,E=0,L=1);L<g;){if(A=C[L++],!E){E=A?0:1;continue}if(E===1){E=A?0:2;continue}if(!A)E=3;else if(A===1){if(W>=0){var U={data:C.subarray(W,L-E-1),type:z};k.push(U)}else{var P=this.getLastNalUnit();if(P&&(T&&L<=4-T&&(P.state&&(P.data=P.data.subarray(0,P.data.byteLength-T))),G=L-E-1,G>0)){var H=new Uint8Array(P.data.byteLength+G);H.set(P.data,0),H.set(C.subarray(0,G),P.data.byteLength),P.data=H,P.state=0}}L<g?(K=C[L]&31,W=L,z=K,E=0):E=-1}else E=0}if(W>=0&&E>=0){var V={data:C.subarray(W,g),type:z,state:E};k.push(V)}if(k.length===0){var q=this.getLastNalUnit();if(q){var Z=new Uint8Array(q.data.byteLength+C.byteLength);Z.set(q.data,0),Z.set(C,q.data.byteLength),q.data=Z}}return x.naluState=E,k},h.parseAACPES=function(C){var g=0,x=this._audioTrack,E=this.aacOverFlow,T=C.data;if(E){this.aacOverFlow=null;var k=E.sample.unit.byteLength,L=Math.min(E.missing,k),A=k-L;E.sample.unit.set(T.subarray(0,L),A),x.samples.push(E.sample),g=E.missing}var G,K;for(G=g,K=T.length;G<K-1&&!M.isHeader(T,G);G++);if(G!==g){var W,z;if(G<K-1?(W="AAC PES did not start with ADTS header,offset:"+G,z=!1):(W="no ADTS header found in AAC PES",z=!0),t.logger.warn("parsing error:"+W),this.observer.emit(p.Events.ERROR,p.Events.ERROR,{type:l.ErrorTypes.MEDIA_ERROR,details:l.ErrorDetails.FRAG_PARSING_ERROR,fatal:z,reason:W}),z)return}M.initTrackConfig(x,this.observer,T,G,this.audioCodec);var U;if(C.pts!==void 0)U=C.pts;else if(E){var P=M.getFrameDuration(x.samplerate);U=E.sample.pts+P}else{t.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var H=0;G<K;)if(M.isHeader(T,G)){if(G+5<K){var V=M.appendFrame(x,T,G,U,H);if(V)if(V.missing)this.aacOverFlow=V;else{G+=V.length,H++;continue}}break}else G++},h.parseMPEGPES=function(C){var g=C.data,x=g.length,E=0,T=0,k=C.pts;if(k===void 0){t.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;T<x;)if(y.isHeader(g,T)){var L=y.appendFrame(this._audioTrack,g,T,k,E);if(L)T+=L.length,E++;else break}else T++},h.parseID3PES=function(C){if(C.pts===void 0){t.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(C)},_}();i.minProbeByteLength=188;function o(_,h,R,C){return{key:_,frame:!1,pts:h,dts:R,units:[],debug:C,length:0}}function s(_,h){return(_[h+10]&31)<<8|_[h+11]}function u(_,h,R,C){var g={audio:-1,avc:-1,id3:-1,isAAC:!0},x=(_[h+1]&15)<<8|_[h+2],E=h+3+x-4,T=(_[h+10]&15)<<8|_[h+11];for(h+=12+T;h<E;){var k=(_[h+1]&31)<<8|_[h+2];switch(_[h]){case 207:if(!C){t.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:g.audio===-1&&(g.audio=k);break;case 21:g.id3===-1&&(g.id3=k);break;case 219:if(!C){t.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:g.avc===-1&&(g.avc=k);break;case 3:case 4:R?g.audio===-1&&(g.audio=k,g.isAAC=!1):t.logger.log("MPEG audio found, not supported in this browser");break;case 36:t.logger.warn("Unsupported HEVC stream type found");break;default:break}h+=((_[h+3]&15)<<8|_[h+4])+5}return g}function a(_){var h=0,R,C,g,x,E,T=_.data;if(!_||_.size===0)return null;for(;T[0].length<19&&T.length>1;){var k=new Uint8Array(T[0].length+T[1].length);k.set(T[0]),k.set(T[1],T[0].length),T[0]=k,T.splice(1,1)}R=T[0];var L=(R[0]<<16)+(R[1]<<8)+R[2];if(L===1){if(C=(R[4]<<8)+R[5],C&&C>_.size-6)return null;var A=R[7];A&192&&(x=(R[9]&14)*536870912+(R[10]&255)*4194304+(R[11]&254)*16384+(R[12]&255)*128+(R[13]&254)/2,A&64?(E=(R[14]&14)*536870912+(R[15]&255)*4194304+(R[16]&254)*16384+(R[17]&255)*128+(R[18]&254)/2,x-E>60*9e4&&(t.logger.warn(Math.round((x-E)/9e4)+"s delta between PTS and DTS, align them"),x=E)):E=x),g=R[8];var G=g+9;if(_.size<=G)return null;_.size-=G;for(var K=new Uint8Array(_.size),W=0,z=T.length;W<z;W++){R=T[W];var U=R.byteLength;if(G)if(G>U){G-=U;continue}else R=R.subarray(G),U-=G,G=0;K.set(R,h),h+=U}return C&&(C-=g+3),{data:K,pts:x,dts:E,len:C}}return null}function c(_,h){if(_.units.length&&_.frame){if(_.pts===void 0){var R=h.samples,C=R.length;if(C){var g=R[C-1];_.pts=g.pts,_.dts=g.dts}else{h.dropped++;return}}h.samples.push(_)}_.debug.length&&t.logger.log(_.pts+"/"+_.dts+":"+_.debug)}function f(_,h){var R=_.length;if(R>0){if(h.pts>=_[R-1].pts)_.push(h);else for(var C=R-1;C>=0;C--)if(h.pts<_[C].pts){_.splice(C,0,h);break}}else _.push(h)}function w(_){for(var h=_.byteLength,R=[],C=1;C<h-2;)_[C]===0&&_[C+1]===0&&_[C+2]===3?(R.push(C+2),C+=2):C++;if(R.length===0)return _;var g=h-R.length,x=new Uint8Array(g),E=0;for(C=0;C<g;E++,C++)E===R[0]&&(E++,R.shift()),x[C]=_[E];return x}v.default=i},"./src/errors.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"ErrorTypes",function(){return M}),O.d(v,"ErrorDetails",function(){return y});var M;(function(m){m.NETWORK_ERROR="networkError",m.MEDIA_ERROR="mediaError",m.KEY_SYSTEM_ERROR="keySystemError",m.MUX_ERROR="muxError",m.OTHER_ERROR="otherError"})(M||(M={}));var y;(function(m){m.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",m.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",m.KEY_SYSTEM_NO_SESSION="keySystemNoSession",m.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",m.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",m.MANIFEST_LOAD_ERROR="manifestLoadError",m.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",m.MANIFEST_PARSING_ERROR="manifestParsingError",m.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",m.LEVEL_EMPTY_ERROR="levelEmptyError",m.LEVEL_LOAD_ERROR="levelLoadError",m.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",m.LEVEL_SWITCH_ERROR="levelSwitchError",m.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",m.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",m.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",m.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",m.FRAG_LOAD_ERROR="fragLoadError",m.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",m.FRAG_DECRYPT_ERROR="fragDecryptError",m.FRAG_PARSING_ERROR="fragParsingError",m.REMUX_ALLOC_ERROR="remuxAllocError",m.KEY_LOAD_ERROR="keyLoadError",m.KEY_LOAD_TIMEOUT="keyLoadTimeOut",m.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",m.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",m.BUFFER_APPEND_ERROR="bufferAppendError",m.BUFFER_APPENDING_ERROR="bufferAppendingError",m.BUFFER_STALLED_ERROR="bufferStalledError",m.BUFFER_FULL_ERROR="bufferFullError",m.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",m.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",m.INTERNAL_EXCEPTION="internalException",m.INTERNAL_ABORTED="aborted",m.UNKNOWN="unknown"})(y||(y={}))},"./src/events.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"Events",function(){return M});var M;(function(y){y.MEDIA_ATTACHING="hlsMediaAttaching",y.MEDIA_ATTACHED="hlsMediaAttached",y.MEDIA_DETACHING="hlsMediaDetaching",y.MEDIA_DETACHED="hlsMediaDetached",y.BUFFER_RESET="hlsBufferReset",y.BUFFER_CODECS="hlsBufferCodecs",y.BUFFER_CREATED="hlsBufferCreated",y.BUFFER_APPENDING="hlsBufferAppending",y.BUFFER_APPENDED="hlsBufferAppended",y.BUFFER_EOS="hlsBufferEos",y.BUFFER_FLUSHING="hlsBufferFlushing",y.BUFFER_FLUSHED="hlsBufferFlushed",y.MANIFEST_LOADING="hlsManifestLoading",y.MANIFEST_LOADED="hlsManifestLoaded",y.MANIFEST_PARSED="hlsManifestParsed",y.LEVEL_SWITCHING="hlsLevelSwitching",y.LEVEL_SWITCHED="hlsLevelSwitched",y.LEVEL_LOADING="hlsLevelLoading",y.LEVEL_LOADED="hlsLevelLoaded",y.LEVEL_UPDATED="hlsLevelUpdated",y.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",y.LEVELS_UPDATED="hlsLevelsUpdated",y.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",y.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",y.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",y.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",y.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",y.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",y.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",y.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",y.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",y.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",y.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",y.CUES_PARSED="hlsCuesParsed",y.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",y.INIT_PTS_FOUND="hlsInitPtsFound",y.FRAG_LOADING="hlsFragLoading",y.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",y.FRAG_LOADED="hlsFragLoaded",y.FRAG_DECRYPTED="hlsFragDecrypted",y.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",y.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",y.FRAG_PARSING_METADATA="hlsFragParsingMetadata",y.FRAG_PARSED="hlsFragParsed",y.FRAG_BUFFERED="hlsFragBuffered",y.FRAG_CHANGED="hlsFragChanged",y.FPS_DROP="hlsFpsDrop",y.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",y.ERROR="hlsError",y.DESTROYING="hlsDestroying",y.KEY_LOADING="hlsKeyLoading",y.KEY_LOADED="hlsKeyLoaded",y.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",y.BACK_BUFFER_REACHED="hlsBackBufferReached"})(M||(M={}))},"./src/hls.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return _});var M=O("./node_modules/url-toolkit/src/url-toolkit.js"),y=O.n(M),m=O("./src/loader/playlist-loader.ts"),S=O("./src/loader/key-loader.ts"),b=O("./src/controller/id3-track-controller.ts"),p=O("./src/controller/latency-controller.ts"),d=O("./src/controller/level-controller.ts"),t=O("./src/controller/fragment-tracker.ts"),l=O("./src/controller/stream-controller.ts"),r=O("./src/is-supported.ts"),i=O("./src/utils/logger.ts"),o=O("./src/config.ts"),s=O("./node_modules/eventemitter3/index.js"),u=O.n(s),a=O("./src/events.ts"),c=O("./src/errors.ts");function f(h,R){for(var C=0;C<R.length;C++){var g=R[C];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(h,g.key,g)}}function w(h,R,C){return R&&f(h.prototype,R),C&&f(h,C),h}var _=function(){h.isSupported=function(){return Object(r.isSupported)()};function h(C){C===void 0&&(C={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new s.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 g=this.config=Object(o.mergeConfig)(h.DefaultConfig,C);this.userConfig=C,Object(i.enableLogs)(g.debug),this._autoLevelCapping=-1,g.progressive&&Object(o.enableStreamingMode)(g);var x=g.abrController,E=g.bufferController,T=g.capLevelController,k=g.fpsController,L=this.abrController=new x(this),A=this.bufferController=new E(this),G=this.capLevelController=new T(this),K=new k(this),W=new m.default(this),z=new S.default(this),U=new b.default(this),P=this.levelController=new d.default(this),H=new t.FragmentTracker(this),V=this.streamController=new l.default(this,H);G.setStreamController(V),K.setStreamController(V);var q=[P,V];this.networkControllers=q;var Z=[W,z,L,A,G,K,U,H];this.audioTrackController=this.createController(g.audioTrackController,null,q),this.createController(g.audioStreamController,H,q),this.subtitleTrackController=this.createController(g.subtitleTrackController,null,q),this.createController(g.subtitleStreamController,H,q),this.createController(g.timelineController,null,Z),this.emeController=this.createController(g.emeController,null,Z),this.cmcdController=this.createController(g.cmcdController,null,Z),this.latencyController=this.createController(p.default,null,Z),this.coreComponents=Z}var R=h.prototype;return R.createController=function(g,x,E){if(g){var T=x?new g(this,x):new g(this);return E&&E.push(T),T}return null},R.on=function(g,x,E){E===void 0&&(E=this),this._emitter.on(g,x,E)},R.once=function(g,x,E){E===void 0&&(E=this),this._emitter.once(g,x,E)},R.removeAllListeners=function(g){this._emitter.removeAllListeners(g)},R.off=function(g,x,E,T){E===void 0&&(E=this),this._emitter.off(g,x,E,T)},R.listeners=function(g){return this._emitter.listeners(g)},R.emit=function(g,x,E){return this._emitter.emit(g,x,E)},R.trigger=function(g,x){if(this.config.debug)return this.emit(g,g,x);try{return this.emit(g,g,x)}catch(E){i.logger.error("An internal error happened while handling event "+g+'. Error message: "'+E.message+'". Here is a stacktrace:',E),this.trigger(a.Events.ERROR,{type:c.ErrorTypes.OTHER_ERROR,details:c.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:g,error:E})}return!1},R.listenerCount=function(g){return this._emitter.listenerCount(g)},R.destroy=function(){i.logger.log("destroy"),this.trigger(a.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(g){return g.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(g){return g.destroy()}),this.coreComponents.length=0},R.attachMedia=function(g){i.logger.log("attachMedia"),this._media=g,this.trigger(a.Events.MEDIA_ATTACHING,{media:g})},R.detachMedia=function(){i.logger.log("detachMedia"),this.trigger(a.Events.MEDIA_DETACHING,void 0),this._media=null},R.loadSource=function(g){this.stopLoad();var x=this.media,E=this.url,T=this.url=M.buildAbsoluteURL(self.location.href,g,{alwaysNormalize:!0});i.logger.log("loadSource:"+T),x&&E&&E!==T&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(x)),this.trigger(a.Events.MANIFEST_LOADING,{url:g})},R.startLoad=function(g){g===void 0&&(g=-1),i.logger.log("startLoad("+g+")"),this.networkControllers.forEach(function(x){x.startLoad(g)})},R.stopLoad=function(){i.logger.log("stopLoad"),this.networkControllers.forEach(function(g){g.stopLoad()})},R.swapAudioCodec=function(){i.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},R.recoverMediaError=function(){i.logger.log("recoverMediaError");var g=this._media;this.detachMedia(),g&&this.attachMedia(g)},R.removeLevel=function(g,x){x===void 0&&(x=0),this.levelController.removeLevel(g,x)},w(h,[{key:"levels",get:function(){var g=this.levelController.levels;return g||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(g){i.logger.log("set currentLevel:"+g),this.loadLevel=g,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(g){i.logger.log("set nextLevel:"+g),this.levelController.manualLevel=g,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(g){i.logger.log("set loadLevel:"+g),this.levelController.manualLevel=g}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(g){this.levelController.nextLoadLevel=g}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(g){i.logger.log("set firstLevel:"+g),this.levelController.firstLevel=g}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(g){i.logger.log("set startLevel:"+g),g!==-1&&(g=Math.max(g,this.minAutoLevel)),this.levelController.startLevel=g}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(g){var x=!!g;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(g){this._autoLevelCapping!==g&&(i.logger.log("set autoLevelCapping:"+g),this._autoLevelCapping=g)}},{key:"bandwidthEstimate",get:function(){var g=this.abrController.bwEstimator;return g?g.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var g=this.levels,x=this.config.minAutoBitrate;if(!g)return 0;for(var E=g.length,T=0;T<E;T++)if(g[T].maxBitrate>x)return T;return 0}},{key:"maxAutoLevel",get:function(){var g=this.levels,x=this.autoLevelCapping,E;return x===-1&&g&&g.length?E=g.length-1:E=x,E}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(g){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,g)}},{key:"audioTracks",get:function(){var g=this.audioTrackController;return g?g.audioTracks:[]}},{key:"audioTrack",get:function(){var g=this.audioTrackController;return g?g.audioTrack:-1},set:function(g){var x=this.audioTrackController;x&&(x.audioTrack=g)}},{key:"subtitleTracks",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTrack:-1},set:function(g){var x=this.subtitleTrackController;x&&(x.subtitleTrack=g)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var g=this.subtitleTrackController;return g?g.subtitleDisplay:!1},set:function(g){var x=this.subtitleTrackController;x&&(x.subtitleDisplay=g)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(g){this.config.lowLatencyMode=g}},{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 a.Events}},{key:"ErrorTypes",get:function(){return c.ErrorTypes}},{key:"ErrorDetails",get:function(){return c.ErrorDetails}},{key:"DefaultConfig",get:function(){return h.defaultConfig?h.defaultConfig:o.hlsDefaultConfig},set:function(g){h.defaultConfig=g}}]),h}();_.defaultConfig=void 0},"./src/is-supported.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"isSupported",function(){return m}),O.d(v,"changeTypeSupported",function(){return S});var M=O("./src/utils/mediasource-helper.ts");function y(){return self.SourceBuffer||self.WebKitSourceBuffer}function m(){var b=Object(M.getMediaSource)();if(!b)return!1;var p=y(),d=b&&typeof b.isTypeSupported=="function"&&b.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),t=!p||p.prototype&&typeof p.prototype.appendBuffer=="function"&&typeof p.prototype.remove=="function";return!!d&&!!t}function S(){var b,p=y();return typeof(p==null||((b=p.prototype)===null||b===void 0)?void 0:b.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return i}),O.d(v,"LoadError",function(){return s});var M=O("./src/polyfills/number.ts"),y=O("./src/errors.ts");function m(u,a){u.prototype=Object.create(a.prototype),u.prototype.constructor=u,t(u,a)}function S(u){var a=typeof Map=="function"?new Map:void 0;return S=function(f){if(f===null||!d(f))return f;if(typeof f!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a!="undefined"){if(a.has(f))return a.get(f);a.set(f,w)}function w(){return b(f,arguments,l(this).constructor)}return w.prototype=Object.create(f.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),t(w,f)},S(u)}function b(u,a,c){return p()?b=Reflect.construct:b=function(w,_,h){var R=[null];R.push.apply(R,_);var C=Function.bind.apply(w,R),g=new C;return h&&t(g,h.prototype),g},b.apply(null,arguments)}function p(){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(u){return!1}}function d(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function t(u,a){return t=Object.setPrototypeOf||function(f,w){return f.__proto__=w,f},t(u,a)}function l(u){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},l(u)}var r=Math.pow(2,17),i=function(){function u(c){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=c}var a=u.prototype;return a.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},a.abort=function(){this.loader&&this.loader.abort()},a.load=function(f,w){var _=this,h=f.url;if(!h)return Promise.reject(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,networkDetails:null},"Fragment does not have a "+(h?"part list":"url")));this.abort();var R=this.config,C=R.fLoader,g=R.loader;return new Promise(function(x,E){_.loader&&_.loader.destroy();var T=_.loader=f.loader=C?new C(R):new g(R),k=o(f),L={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:r};f.stats=T.stats,T.load(k,L,{onSuccess:function(G,K,W,z){_.resetLoader(f,T),x({frag:f,part:null,payload:G.data,networkDetails:z})},onError:function(G,K,W){_.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,response:G,networkDetails:W}))},onAbort:function(G,K,W){_.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:f,networkDetails:W}))},onTimeout:function(G,K,W){_.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:f,networkDetails:W}))},onProgress:function(G,K,W,z){w&&w({frag:f,part:null,payload:W,networkDetails:z})}})})},a.loadPart=function(f,w,_){var h=this;this.abort();var R=this.config,C=R.fLoader,g=R.loader;return new Promise(function(x,E){h.loader&&h.loader.destroy();var T=h.loader=f.loader=C?new C(R):new g(R),k=o(f,w),L={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:r};w.stats=T.stats,T.load(k,L,{onSuccess:function(G,K,W,z){h.resetLoader(f,T),h.updateStatsFromPart(f,w);var U={frag:f,part:w,payload:G.data,networkDetails:z};_(U),x(U)},onError:function(G,K,W){h.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:f,part:w,response:G,networkDetails:W}))},onAbort:function(G,K,W){f.stats.aborted=w.stats.aborted,h.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:f,part:w,networkDetails:W}))},onTimeout:function(G,K,W){h.resetLoader(f,T),E(new s({type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:f,part:w,networkDetails:W}))}})})},a.updateStatsFromPart=function(f,w){var _=f.stats,h=w.stats,R=h.total;if(_.loaded+=h.loaded,R){var C=Math.round(f.duration/w.duration),g=Math.min(Math.round(_.loaded/R),C),x=C-g,E=x*Math.round(_.loaded/g);_.total=_.loaded+E}else _.total=Math.max(_.loaded,_.total);var T=_.loading,k=h.loading;T.start?T.first+=k.first-k.start:(T.start=k.start,T.first=k.first),T.end=k.end},a.resetLoader=function(f,w){f.loader=null,this.loader===w&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),w.destroy()},u}();function o(u,a){a===void 0&&(a=null);var c=a||u,f={frag:u,part:a,responseType:"arraybuffer",url:c.url,headers:{},rangeStart:0,rangeEnd:0},w=c.byteRangeStartOffset,_=c.byteRangeEndOffset;return Object(M.isFiniteNumber)(w)&&Object(M.isFiniteNumber)(_)&&(f.rangeStart=w,f.rangeEnd=_),f}var s=function(u){m(a,u);function a(c){for(var f,w=arguments.length,_=new Array(w>1?w-1:0),h=1;h<w;h++)_[h-1]=arguments[h];return f=u.call.apply(u,[this].concat(_))||this,f.data=void 0,f.data=c,f}return a}(S(Error))},"./src/loader/fragment.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"ElementaryStreamTypes",function(){return i}),O.d(v,"BaseSegment",function(){return o}),O.d(v,"Fragment",function(){return s}),O.d(v,"Part",function(){return u});var M=O("./src/polyfills/number.ts"),y=O("./node_modules/url-toolkit/src/url-toolkit.js"),m=O.n(y),S=O("./src/utils/logger.ts"),b=O("./src/loader/level-key.ts"),p=O("./src/loader/load-stats.ts");function d(a,c){a.prototype=Object.create(c.prototype),a.prototype.constructor=a,t(a,c)}function t(a,c){return t=Object.setPrototypeOf||function(w,_){return w.__proto__=_,w},t(a,c)}function l(a,c){for(var f=0;f<c.length;f++){var w=c[f];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(a,w.key,w)}}function r(a,c,f){return c&&l(a.prototype,c),f&&l(a,f),a}var i;(function(a){a.AUDIO="audio",a.VIDEO="video",a.AUDIOVIDEO="audiovideo"})(i||(i={}));var o=function(){function a(f){var w;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(w={},w[i.AUDIO]=null,w[i.VIDEO]=null,w[i.AUDIOVIDEO]=null,w),this.baseurl=f}var c=a.prototype;return c.setByteRange=function(w,_){var h=w.split("@",2),R=[];h.length===1?R[0]=_?_.byteRangeEndOffset:0:R[0]=parseInt(h[1]),R[1]=parseInt(h[0])+R[0],this._byteRange=R},r(a,[{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(y.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(w){this._url=w}}]),a}(),s=function(a){d(c,a);function c(w,_){var h;return h=a.call(this,_)||this,h._decryptdata=null,h.rawProgramDateTime=null,h.programDateTime=null,h.tagList=[],h.duration=0,h.sn=0,h.levelkey=void 0,h.type=void 0,h.loader=null,h.level=-1,h.cc=0,h.startPTS=void 0,h.endPTS=void 0,h.appendedPTS=void 0,h.startDTS=void 0,h.endDTS=void 0,h.start=0,h.deltaPTS=void 0,h.maxStartPTS=void 0,h.minEndPTS=void 0,h.stats=new p.LoadStats,h.urlId=0,h.data=void 0,h.bitrateTest=!1,h.title=null,h.initSegment=null,h.type=w,h}var f=c.prototype;return f.createInitializationVector=function(_){for(var h=new Uint8Array(16),R=12;R<16;R++)h[R]=_>>8*(15-R)&255;return h},f.setDecryptDataFromLevelKey=function(_,h){var R=_;return(_==null?void 0:_.method)==="AES-128"&&_.uri&&!_.iv&&(R=b.LevelKey.fromURI(_.uri),R.method=_.method,R.iv=this.createInitializationVector(h),R.keyFormat="identity"),R},f.setElementaryStreamInfo=function(_,h,R,C,g,x){x===void 0&&(x=!1);var E=this.elementaryStreams,T=E[_];if(!T){E[_]={startPTS:h,endPTS:R,startDTS:C,endDTS:g,partial:x};return}T.startPTS=Math.min(T.startPTS,h),T.endPTS=Math.max(T.endPTS,R),T.startDTS=Math.min(T.startDTS,C),T.endDTS=Math.max(T.endDTS,g)},f.clearElementaryStreamInfo=function(){var _=this.elementaryStreams;_[i.AUDIO]=null,_[i.VIDEO]=null,_[i.AUDIOVIDEO]=null},r(c,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var _=this.sn;typeof _!="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'),_=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,_)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(M.isFiniteNumber)(this.programDateTime))return null;var _=Object(M.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+_*1e3}},{key:"encrypted",get:function(){var _;return!!((_=this.decryptdata)!==null&&_!==void 0&&_.keyFormat&&this.decryptdata.uri)}}]),c}(o),u=function(a){d(c,a);function c(f,w,_,h,R){var C;C=a.call(this,_)||this,C.fragOffset=0,C.duration=0,C.gap=!1,C.independent=!1,C.relurl=void 0,C.fragment=void 0,C.index=void 0,C.stats=new p.LoadStats,C.duration=f.decimalFloatingPoint("DURATION"),C.gap=f.bool("GAP"),C.independent=f.bool("INDEPENDENT"),C.relurl=f.enumeratedString("URI"),C.fragment=w,C.index=h;var g=f.enumeratedString("BYTERANGE");return g&&C.setByteRange(g,R),R&&(C.fragOffset=R.fragOffset+R.duration),C}return r(c,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var w=this.elementaryStreams;return!!(w.audio||w.video||w.audiovideo)}}]),c}(o)},"./src/loader/key-loader.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return S});var M=O("./src/events.ts"),y=O("./src/errors.ts"),m=O("./src/utils/logger.ts"),S=function(){function b(d){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=d,this._registerListeners()}var p=b.prototype;return p._registerListeners=function(){this.hls.on(M.Events.KEY_LOADING,this.onKeyLoading,this)},p._unregisterListeners=function(){this.hls.off(M.Events.KEY_LOADING,this.onKeyLoading)},p.destroy=function(){this._unregisterListeners();for(var t in this.loaders){var l=this.loaders[t];l&&l.destroy()}this.loaders={}},p.onKeyLoading=function(t,l){var r=l.frag,i=r.type,o=this.loaders[i];if(!r.decryptdata){m.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var s=r.decryptdata.uri;if(s!==this.decrypturl||this.decryptkey===null){var u=this.hls.config;if(o&&(m.logger.warn("abort previous key loader for type:"+i),o.abort()),!s){m.logger.warn("key uri is falsy");return}var a=u.loader,c=r.loader=this.loaders[i]=new a(u);this.decrypturl=s,this.decryptkey=null;var f={url:s,frag:r,responseType:"arraybuffer"},w={timeout:u.fragLoadingTimeOut,maxRetry:0,retryDelay:u.fragLoadingRetryDelay,maxRetryDelay:u.fragLoadingMaxRetryTimeout,highWaterMark:0},_={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};c.load(f,w,_)}else this.decryptkey&&(r.decryptdata.key=this.decryptkey,this.hls.trigger(M.Events.KEY_LOADED,{frag:r}))},p.loadsuccess=function(t,l,r){var i=r.frag;if(!i.decryptdata){m.logger.error("after key load, decryptdata unset");return}this.decryptkey=i.decryptdata.key=new Uint8Array(t.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(M.Events.KEY_LOADED,{frag:i})},p.loaderror=function(t,l){var r=l.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:r,response:t})},p.loadtimeout=function(t,l){var r=l.frag,i=r.loader;i&&i.abort(),delete this.loaders[r.type],this.hls.trigger(M.Events.ERROR,{type:y.ErrorTypes.NETWORK_ERROR,details:y.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},b}()},"./src/loader/level-details.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"LevelDetails",function(){return b});var M=O("./src/polyfills/number.ts");function y(p,d){for(var t=0;t<d.length;t++){var l=d[t];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(p,l.key,l)}}function m(p,d,t){return d&&y(p.prototype,d),t&&y(p,t),p}var S=10,b=function(){function p(t){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=t}var d=p.prototype;return d.reloaded=function(l){if(!l){this.advanced=!0,this.updated=!0;return}var r=this.lastPartSn-l.lastPartSn,i=this.lastPartIndex-l.lastPartIndex;this.updated=this.endSN!==l.endSN||!!i||!!r,this.advanced=this.endSN>l.endSN||r>0||r===0&&i>0,this.updated||this.advanced?this.misses=Math.floor(l.misses*.6):this.misses=l.misses+1,this.availabilityDelay=l.availabilityDelay},m(p,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(M.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||S}},{key:"drift",get:function(){var l=this.driftEndTime-this.driftStartTime;if(l>0){var r=this.driftEnd-this.driftStart;return r*1e3/l}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var l;return(l=this.fragments)!==null&&l!==void 0&&l.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var l;return(l=this.partList)!==null&&l!==void 0&&l.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),p}()},"./src/loader/level-key.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"LevelKey",function(){return b});var M=O("./node_modules/url-toolkit/src/url-toolkit.js"),y=O.n(M);function m(p,d){for(var t=0;t<d.length;t++){var l=d[t];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(p,l.key,l)}}function S(p,d,t){return d&&m(p.prototype,d),t&&m(p,t),p}var b=function(){p.fromURL=function(t,l){return new p(t,l)},p.fromURI=function(t){return new p(t)};function p(d,t){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,t?this._uri=Object(M.buildAbsoluteURL)(d,t,{alwaysNormalize:!0}):this._uri=d}return S(p,[{key:"uri",get:function(){return this._uri}}]),p}()},"./src/loader/load-stats.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"LoadStats",function(){return M});var M=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(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return c});var M=O("./src/polyfills/number.ts"),y=O("./node_modules/url-toolkit/src/url-toolkit.js"),m=O.n(y),S=O("./src/loader/fragment.ts"),b=O("./src/loader/level-details.ts"),p=O("./src/loader/level-key.ts"),d=O("./src/utils/attr-list.ts"),t=O("./src/utils/logger.ts"),l=O("./src/utils/codecs.ts"),r=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,i=/#EXT-X-MEDIA:(.*)/g,o=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),s=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("|")),u=/\.(mp4|m4s|m4v|m4a)$/i;function a(R){var C,g;return u.test((C=(g=y.parseURL(R))===null||g===void 0?void 0:g.path)!=null?C:"")}var c=function(){function R(){}return R.findGroup=function(g,x){for(var E=0;E<g.length;E++){var T=g[E];if(T.id===x)return T}},R.convertAVC1ToAVCOTI=function(g){var x=g.split(".");if(x.length>2){var E=x.shift()+".";return E+=parseInt(x.shift()).toString(16),E+=("000"+parseInt(x.shift()).toString(16)).substr(-4),E}return g},R.resolve=function(g,x){return y.buildAbsoluteURL(x,g,{alwaysNormalize:!0})},R.parseMasterPlaylist=function(g,x){var E=[],T={},k=!1;r.lastIndex=0;for(var L;(L=r.exec(g))!=null;)if(L[1]){var A=new d.AttrList(L[1]),G={attrs:A,bitrate:A.decimalInteger("AVERAGE-BANDWIDTH")||A.decimalInteger("BANDWIDTH"),name:A.NAME,url:R.resolve(L[2],x)},K=A.decimalResolution("RESOLUTION");K&&(G.width=K.width,G.height=K.height),f((A.CODECS||"").split(/[ ,]+/).filter(function(z){return z}),G),G.videoCodec&&G.videoCodec.indexOf("avc1")!==-1&&(G.videoCodec=R.convertAVC1ToAVCOTI(G.videoCodec)),E.push(G)}else if(L[3]){var W=new d.AttrList(L[3]);W["DATA-ID"]&&(k=!0,T[W["DATA-ID"]]=W)}return{levels:E,sessionData:k?T:null}},R.parseMasterPlaylistMedia=function(g,x,E,T){T===void 0&&(T=[]);var k,L=[],A=0;for(i.lastIndex=0;(k=i.exec(g))!==null;){var G=new d.AttrList(k[1]);if(G.TYPE===E){var K={attrs:G,bitrate:0,id:A++,groupId:G["GROUP-ID"],instreamId:G["INSTREAM-ID"],name:G.NAME||G.LANGUAGE||"",type:E,default:G.bool("DEFAULT"),autoselect:G.bool("AUTOSELECT"),forced:G.bool("FORCED"),lang:G.LANGUAGE,url:G.URI?R.resolve(G.URI,x):""};if(T.length){var W=R.findGroup(T,K.groupId)||T[0];w(K,W,"audioCodec"),w(K,W,"textCodec")}L.push(K)}}return L},R.parseLevelPlaylist=function(g,x,E,T,k){var L=new b.LevelDetails(x),A=L.fragments,G=null,K=0,W=0,z=0,U=0,P=null,H=new S.Fragment(T,x),V,q,Z,ce=-1,he=!1;for(o.lastIndex=0,L.m3u8=g;(V=o.exec(g))!==null;){he&&(he=!1,H=new S.Fragment(T,x),H.start=z,H.sn=K,H.cc=U,H.level=E,G&&(H.initSegment=G,H.rawProgramDateTime=G.rawProgramDateTime));var ae=V[1];if(ae){H.duration=parseFloat(ae);var xe=(" "+V[2]).slice(1);H.title=xe||null,H.tagList.push(xe?["INF",ae,xe]:["INF",ae])}else if(V[3])Object(M.isFiniteNumber)(H.duration)&&(H.start=z,Z&&(H.levelkey=Z),H.sn=K,H.level=E,H.cc=U,H.urlId=k,A.push(H),H.relurl=(" "+V[3]).slice(1),h(H,P),P=H,z+=H.duration,K++,W=0,he=!0);else if(V[4]){var ge=(" "+V[4]).slice(1);P?H.setByteRange(ge,P):H.setByteRange(ge)}else if(V[5])H.rawProgramDateTime=(" "+V[5]).slice(1),H.tagList.push(["PROGRAM-DATE-TIME",H.rawProgramDateTime]),ce===-1&&(ce=A.length);else{if(V=V[0].match(s),!V){t.logger.warn("No matches on slow regex match for level playlist!");continue}for(q=1;q<V.length&&!(typeof V[q]!="undefined");q++);var oe=(" "+V[q]).slice(1),se=(" "+V[q+1]).slice(1),te=V[q+2]?(" "+V[q+2]).slice(1):"";switch(oe){case"PLAYLIST-TYPE":L.type=se.toUpperCase();break;case"MEDIA-SEQUENCE":K=L.startSN=parseInt(se);break;case"SKIP":{var be=new d.AttrList(se),ee=be.decimalInteger("SKIPPED-SEGMENTS");if(Object(M.isFiniteNumber)(ee)){L.skippedSegments=ee;for(var ie=ee;ie--;)A.unshift(null);K+=ee}var Ee=be.enumeratedString("RECENTLY-REMOVED-DATERANGES");Ee&&(L.recentlyRemovedDateranges=Ee.split(" "));break}case"TARGETDURATION":L.targetduration=parseFloat(se);break;case"VERSION":L.version=parseInt(se);break;case"EXTM3U":break;case"ENDLIST":L.live=!1;break;case"#":(se||te)&&H.tagList.push(te?[se,te]:[se]);break;case"DIS":U++;case"GAP":H.tagList.push([oe]);break;case"BITRATE":H.tagList.push([oe,se]);break;case"DISCONTINUITY-SEQ":U=parseInt(se);break;case"KEY":{var ne,J=new d.AttrList(se),X=J.enumeratedString("METHOD"),Q=J.URI,me=J.hexadecimalInteger("IV"),fe=J.enumeratedString("KEYFORMATVERSIONS"),Te=J.enumeratedString("KEYID"),ze=(ne=J.enumeratedString("KEYFORMAT"))!=null?ne:"identity",Je=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Je.indexOf(ze)>-1){t.logger.warn("Keyformat "+ze+" is not supported from the manifest");continue}else if(ze!=="identity")continue;X&&(Z=p.LevelKey.fromURL(x,Q),Q&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(X)>=0&&(Z.method=X,Z.keyFormat=ze,Te&&(Z.keyID=Te),fe&&(Z.keyFormatVersions=fe),Z.iv=me));break}case"START":{var qe=new d.AttrList(se),Xe=qe.decimalFloatingPoint("TIME-OFFSET");Object(M.isFiniteNumber)(Xe)&&(L.startTimeOffset=Xe);break}case"MAP":{var et=new d.AttrList(se);H.relurl=et.URI,et.BYTERANGE&&H.setByteRange(et.BYTERANGE),H.level=E,H.sn="initSegment",Z&&(H.levelkey=Z),H.initSegment=null,G=H,he=!0;break}case"SERVER-CONTROL":{var rt=new d.AttrList(se);L.canBlockReload=rt.bool("CAN-BLOCK-RELOAD"),L.canSkipUntil=rt.optionalFloat("CAN-SKIP-UNTIL",0),L.canSkipDateRanges=L.canSkipUntil>0&&rt.bool("CAN-SKIP-DATERANGES"),L.partHoldBack=rt.optionalFloat("PART-HOLD-BACK",0),L.holdBack=rt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Le=new d.AttrList(se);L.partTarget=Le.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Oe=L.partList;Oe||(Oe=L.partList=[]);var Ve=W>0?Oe[Oe.length-1]:void 0,Ze=W++,Ne=new S.Part(new d.AttrList(se),H,x,Ze,Ve);Oe.push(Ne),H.duration+=Ne.duration;break}case"PRELOAD-HINT":{var Ge=new d.AttrList(se);L.preloadHint=Ge;break}case"RENDITION-REPORT":{var De=new d.AttrList(se);L.renditionReports=L.renditionReports||[],L.renditionReports.push(De);break}default:t.logger.warn("line parsed but not handled: "+V);break}}}P&&!P.relurl?(A.pop(),z-=P.duration,L.partList&&(L.fragmentHint=P)):L.partList&&(h(H,P),H.cc=U,L.fragmentHint=H);var we=A.length,Ae=A[0],de=A[we-1];if(z+=L.skippedSegments*L.targetduration,z>0&&we&&de){L.averagetargetduration=z/we;var _e=de.sn;L.endSN=_e!=="initSegment"?_e:0,Ae&&(L.startCC=Ae.cc,Ae.initSegment||L.fragments.every(function(Se){return Se.relurl&&a(Se.relurl)})&&(t.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),H=new S.Fragment(T,x),H.relurl=de.relurl,H.level=E,H.sn="initSegment",Ae.initSegment=H,L.needSidxRanges=!0))}else L.endSN=0,L.startCC=0;return L.fragmentHint&&(z+=L.fragmentHint.duration),L.totalduration=z,L.endCC=U,ce>0&&_(A,ce),L},R}();function f(R,C){["video","audio","text"].forEach(function(g){var x=R.filter(function(T){return Object(l.isCodecType)(T,g)});if(x.length){var E=x.filter(function(T){return T.lastIndexOf("avc1",0)===0||T.lastIndexOf("mp4a",0)===0});C[g+"Codec"]=E.length>0?E[0]:x[0],R=R.filter(function(T){return x.indexOf(T)===-1})}}),C.unknownCodecs=R}function w(R,C,g){var x=C[g];x&&(R[g]=x)}function _(R,C){for(var g=R[C],x=C;x--;){var E=R[x];if(!E)return;E.programDateTime=g.programDateTime-E.duration*1e3,g=E}}function h(R,C){R.rawProgramDateTime?R.programDateTime=Date.parse(R.rawProgramDateTime):C!=null&&C.programDateTime&&(R.programDateTime=C.endProgramDateTime),Object(M.isFiniteNumber)(R.programDateTime)||(R.programDateTime=null,R.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/polyfills/number.ts"),y=O("./src/events.ts"),m=O("./src/errors.ts"),S=O("./src/utils/logger.ts"),b=O("./src/utils/mp4-tools.ts"),p=O("./src/loader/m3u8-parser.ts"),d=O("./src/types/loader.ts"),t=O("./src/utils/attr-list.ts");function l(o){var s=o.type;switch(s){case d.PlaylistContextType.AUDIO_TRACK:return d.PlaylistLevelType.AUDIO;case d.PlaylistContextType.SUBTITLE_TRACK:return d.PlaylistLevelType.SUBTITLE;default:return d.PlaylistLevelType.MAIN}}function r(o,s){var u=o.url;return(u===void 0||u.indexOf("data:")===0)&&(u=s.url),u}var i=function(){function o(u){this.hls=void 0,this.loaders=Object.create(null),this.hls=u,this.registerListeners()}var s=o.prototype;return s.registerListeners=function(){var a=this.hls;a.on(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(y.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(y.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.on(y.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},s.unregisterListeners=function(){var a=this.hls;a.off(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(y.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(y.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.off(y.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},s.createInternalLoader=function(a){var c=this.hls.config,f=c.pLoader,w=c.loader,_=f||w,h=new _(c);return a.loader=h,this.loaders[a.type]=h,h},s.getInternalLoader=function(a){return this.loaders[a.type]},s.resetInternalLoader=function(a){this.loaders[a]&&delete this.loaders[a]},s.destroyInternalLoaders=function(){for(var a in this.loaders){var c=this.loaders[a];c&&c.destroy(),this.resetInternalLoader(a)}},s.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},s.onManifestLoading=function(a,c){var f=c.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:d.PlaylistContextType.MANIFEST,url:f,deliveryDirectives:null})},s.onLevelLoading=function(a,c){var f=c.id,w=c.level,_=c.url,h=c.deliveryDirectives;this.load({id:f,groupId:null,level:w,responseType:"text",type:d.PlaylistContextType.LEVEL,url:_,deliveryDirectives:h})},s.onAudioTrackLoading=function(a,c){var f=c.id,w=c.groupId,_=c.url,h=c.deliveryDirectives;this.load({id:f,groupId:w,level:null,responseType:"text",type:d.PlaylistContextType.AUDIO_TRACK,url:_,deliveryDirectives:h})},s.onSubtitleTrackLoading=function(a,c){var f=c.id,w=c.groupId,_=c.url,h=c.deliveryDirectives;this.load({id:f,groupId:w,level:null,responseType:"text",type:d.PlaylistContextType.SUBTITLE_TRACK,url:_,deliveryDirectives:h})},s.load=function(a){var c,f=this.hls.config,w=this.getInternalLoader(a);if(w){var _=w.context;if(_&&_.url===a.url){S.logger.trace("[playlist-loader]: playlist request ongoing");return}S.logger.log("[playlist-loader]: aborting previous loader for type: "+a.type),w.abort()}var h,R,C,g;switch(a.type){case d.PlaylistContextType.MANIFEST:h=f.manifestLoadingMaxRetry,R=f.manifestLoadingTimeOut,C=f.manifestLoadingRetryDelay,g=f.manifestLoadingMaxRetryTimeout;break;case d.PlaylistContextType.LEVEL:case d.PlaylistContextType.AUDIO_TRACK:case d.PlaylistContextType.SUBTITLE_TRACK:h=0,R=f.levelLoadingTimeOut;break;default:h=f.levelLoadingMaxRetry,R=f.levelLoadingTimeOut,C=f.levelLoadingRetryDelay,g=f.levelLoadingMaxRetryTimeout;break}if(w=this.createInternalLoader(a),(c=a.deliveryDirectives)!==null&&c!==void 0&&c.part){var x;if(a.type===d.PlaylistContextType.LEVEL&&a.level!==null?x=this.hls.levels[a.level].details:a.type===d.PlaylistContextType.AUDIO_TRACK&&a.id!==null?x=this.hls.audioTracks[a.id].details:a.type===d.PlaylistContextType.SUBTITLE_TRACK&&a.id!==null&&(x=this.hls.subtitleTracks[a.id].details),x){var E=x.partTarget,T=x.targetduration;E&&T&&(R=Math.min(Math.max(E*3,T*.8)*1e3,R))}}var k={timeout:R,maxRetry:h,retryDelay:C,maxRetryDelay:g,highWaterMark:0},L={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};w.load(a,k,L)},s.loadsuccess=function(a,c,f,w){if(w===void 0&&(w=null),f.isSidxRequest){this.handleSidxRequest(a,f),this.handlePlaylistLoaded(a,c,f,w);return}this.resetInternalLoader(f.type);var _=a.data;if(_.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(a,f,"no EXTM3U delimiter",w);return}c.parsing.start=performance.now(),_.indexOf("#EXTINF:")>0||_.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(a,c,f,w):this.handleMasterPlaylist(a,c,f,w)},s.loaderror=function(a,c,f){f===void 0&&(f=null),this.handleNetworkError(c,f,!1,a)},s.loadtimeout=function(a,c,f){f===void 0&&(f=null),this.handleNetworkError(c,f,!0)},s.handleMasterPlaylist=function(a,c,f,w){var _=this.hls,h=a.data,R=r(a,f),C=p.default.parseMasterPlaylist(h,R),g=C.levels,x=C.sessionData;if(!g.length){this.handleManifestParsingError(a,f,"no level found in manifest",w);return}var E=g.map(function(K){return{id:K.attrs.AUDIO,audioCodec:K.audioCodec}}),T=g.map(function(K){return{id:K.attrs.SUBTITLES,textCodec:K.textCodec}}),k=p.default.parseMasterPlaylistMedia(h,R,"AUDIO",E),L=p.default.parseMasterPlaylistMedia(h,R,"SUBTITLES",T),A=p.default.parseMasterPlaylistMedia(h,R,"CLOSED-CAPTIONS");if(k.length){var G=k.some(function(K){return!K.url});!G&&g[0].audioCodec&&!g[0].attrs.AUDIO&&(S.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),k.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new t.AttrList({}),bitrate:0,url:""}))}_.trigger(y.Events.MANIFEST_LOADED,{levels:g,audioTracks:k,subtitles:L,captions:A,url:R,stats:c,networkDetails:w,sessionData:x})},s.handleTrackOrLevelPlaylist=function(a,c,f,w){var _=this.hls,h=f.id,R=f.level,C=f.type,g=r(a,f),x=Object(M.isFiniteNumber)(h)?h:0,E=Object(M.isFiniteNumber)(R)?R:x,T=l(f),k=p.default.parseLevelPlaylist(a.data,g,E,T,x);if(!k.fragments.length){_.trigger(y.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:g,reason:"no fragments found in level",level:typeof f.level=="number"?f.level:void 0});return}if(C===d.PlaylistContextType.MANIFEST){var L={attrs:new t.AttrList({}),bitrate:0,details:k,name:"",url:g};_.trigger(y.Events.MANIFEST_LOADED,{levels:[L],audioTracks:[],url:g,stats:c,networkDetails:w,sessionData:null})}if(c.parsing.end=performance.now(),k.needSidxRanges){var A,G=(A=k.fragments[0].initSegment)===null||A===void 0?void 0:A.url;this.load({url:G,isSidxRequest:!0,type:C,level:R,levelDetails:k,id:h,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}f.levelDetails=k,this.handlePlaylistLoaded(a,c,f,w)},s.handleSidxRequest=function(a,c){var f=Object(b.parseSegmentIndex)(new Uint8Array(a.data));if(!f)return;var w=f.references,_=c.levelDetails;w.forEach(function(h,R){var C=h.info,g=_.fragments[R];g.byteRange.length===0&&g.setByteRange(String(1+C.end-C.start)+"@"+String(C.start)),g.initSegment&&g.initSegment.setByteRange(String(f.moovEndOffset)+"@0")})},s.handleManifestParsingError=function(a,c,f,w){this.hls.trigger(y.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:c.type===d.PlaylistContextType.MANIFEST,url:a.url,reason:f,response:a,context:c,networkDetails:w})},s.handleNetworkError=function(a,c,f,w){f===void 0&&(f=!1),S.logger.warn("[playlist-loader]: A network "+(f?"timeout":"error")+" occurred while loading "+a.type+" level: "+a.level+" id: "+a.id+' group-id: "'+a.groupId+'"');var _=m.ErrorDetails.UNKNOWN,h=!1,R=this.getInternalLoader(a);switch(a.type){case d.PlaylistContextType.MANIFEST:_=f?m.ErrorDetails.MANIFEST_LOAD_TIMEOUT:m.ErrorDetails.MANIFEST_LOAD_ERROR,h=!0;break;case d.PlaylistContextType.LEVEL:_=f?m.ErrorDetails.LEVEL_LOAD_TIMEOUT:m.ErrorDetails.LEVEL_LOAD_ERROR,h=!1;break;case d.PlaylistContextType.AUDIO_TRACK:_=f?m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,h=!1;break;case d.PlaylistContextType.SUBTITLE_TRACK:_=f?m.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:m.ErrorDetails.SUBTITLE_LOAD_ERROR,h=!1;break}R&&this.resetInternalLoader(a.type);var C={type:m.ErrorTypes.NETWORK_ERROR,details:_,fatal:h,url:a.url,loader:R,context:a,networkDetails:c};w&&(C.response=w),this.hls.trigger(y.Events.ERROR,C)},s.handlePlaylistLoaded=function(a,c,f,w){var _=f.type,h=f.level,R=f.id,C=f.groupId,g=f.loader,x=f.levelDetails,E=f.deliveryDirectives;if(!(x!=null&&x.targetduration)){this.handleManifestParsingError(a,f,"invalid target duration",w);return}if(!g)return;x.live&&(g.getCacheAge&&(x.ageHeader=g.getCacheAge()||0),(!g.getCacheAge||isNaN(x.ageHeader))&&(x.ageHeader=0));switch(_){case d.PlaylistContextType.MANIFEST:case d.PlaylistContextType.LEVEL:this.hls.trigger(y.Events.LEVEL_LOADED,{details:x,level:h||0,id:R||0,stats:c,networkDetails:w,deliveryDirectives:E});break;case d.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(y.Events.AUDIO_TRACK_LOADED,{details:x,id:R||0,groupId:C||"",stats:c,networkDetails:w,deliveryDirectives:E});break;case d.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(y.Events.SUBTITLE_TRACK_LOADED,{details:x,id:R||0,groupId:C||"",stats:c,networkDetails:w,deliveryDirectives:E});break}},o}();v.default=i},"./src/polyfills/number.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"isFiniteNumber",function(){return M}),O.d(v,"MAX_SAFE_INTEGER",function(){return y});var M=Number.isFinite||function(m){return typeof m=="number"&&isFinite(m)},y=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(N,v,O){"use strict";O.r(v);var M=function(){function y(){}return y.getSilentFrame=function(S,b){switch(S){case"mp4a.40.2":if(b===1)return new Uint8Array([0,200,0,128,35,128]);if(b===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(b===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(b===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(b===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(b===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(b===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(b===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(b===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},y}();v.default=M},"./src/remux/mp4-generator.ts":function(N,v,O){"use strict";O.r(v);var M=Math.pow(2,32)-1,y=function(){function m(){}return m.init=function(){m.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 b;for(b in m.types)m.types.hasOwnProperty(b)&&(m.types[b]=[b.charCodeAt(0),b.charCodeAt(1),b.charCodeAt(2),b.charCodeAt(3)]);var p=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]),d=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]);m.HDLR_TYPES={video:p,audio:d};var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),l=new Uint8Array([0,0,0,0,0,0,0,0]);m.STTS=m.STSC=m.STCO=l,m.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),m.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),m.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),m.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var r=new Uint8Array([105,115,111,109]),i=new Uint8Array([97,118,99,49]),o=new Uint8Array([0,0,0,1]);m.FTYP=m.box(m.types.ftyp,r,o,r,i),m.DINF=m.box(m.types.dinf,m.box(m.types.dref,t))},m.box=function(b){for(var p=8,d=arguments.length,t=new Array(d>1?d-1:0),l=1;l<d;l++)t[l-1]=arguments[l];for(var r=t.length,i=r;r--;)p+=t[r].byteLength;var o=new Uint8Array(p);for(o[0]=p>>24&255,o[1]=p>>16&255,o[2]=p>>8&255,o[3]=p&255,o.set(b,4),r=0,p=8;r<i;r++)o.set(t[r],p),p+=t[r].byteLength;return o},m.hdlr=function(b){return m.box(m.types.hdlr,m.HDLR_TYPES[b])},m.mdat=function(b){return m.box(m.types.mdat,b)},m.mdhd=function(b,p){p*=b;var d=Math.floor(p/(M+1)),t=Math.floor(p%(M+1));return m.box(m.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,b>>24&255,b>>16&255,b>>8&255,b&255,d>>24,d>>16&255,d>>8&255,d&255,t>>24,t>>16&255,t>>8&255,t&255,85,196,0,0]))},m.mdia=function(b){return m.box(m.types.mdia,m.mdhd(b.timescale,b.duration),m.hdlr(b.type),m.minf(b))},m.mfhd=function(b){return m.box(m.types.mfhd,new Uint8Array([0,0,0,0,b>>24,b>>16&255,b>>8&255,b&255]))},m.minf=function(b){return b.type==="audio"?m.box(m.types.minf,m.box(m.types.smhd,m.SMHD),m.DINF,m.stbl(b)):m.box(m.types.minf,m.box(m.types.vmhd,m.VMHD),m.DINF,m.stbl(b))},m.moof=function(b,p,d){return m.box(m.types.moof,m.mfhd(b),m.traf(d,p))},m.moov=function(b){for(var p=b.length,d=[];p--;)d[p]=m.trak(b[p]);return m.box.apply(null,[m.types.moov,m.mvhd(b[0].timescale,b[0].duration)].concat(d).concat(m.mvex(b)))},m.mvex=function(b){for(var p=b.length,d=[];p--;)d[p]=m.trex(b[p]);return m.box.apply(null,[m.types.mvex].concat(d))},m.mvhd=function(b,p){p*=b;var d=Math.floor(p/(M+1)),t=Math.floor(p%(M+1)),l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,b>>24&255,b>>16&255,b>>8&255,b&255,d>>24,d>>16&255,d>>8&255,d&255,t>>24,t>>16&255,t>>8&255,t&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 m.box(m.types.mvhd,l)},m.sdtp=function(b){var p=b.samples||[],d=new Uint8Array(4+p.length),t,l;for(t=0;t<p.length;t++)l=p[t].flags,d[t+4]=l.dependsOn<<4|l.isDependedOn<<2|l.hasRedundancy;return m.box(m.types.sdtp,d)},m.stbl=function(b){return m.box(m.types.stbl,m.stsd(b),m.box(m.types.stts,m.STTS),m.box(m.types.stsc,m.STSC),m.box(m.types.stsz,m.STSZ),m.box(m.types.stco,m.STCO))},m.avc1=function(b){var p=[],d=[],t,l,r;for(t=0;t<b.sps.length;t++)l=b.sps[t],r=l.byteLength,p.push(r>>>8&255),p.push(r&255),p=p.concat(Array.prototype.slice.call(l));for(t=0;t<b.pps.length;t++)l=b.pps[t],r=l.byteLength,d.push(r>>>8&255),d.push(r&255),d=d.concat(Array.prototype.slice.call(l));var i=m.box(m.types.avcC,new Uint8Array([1,p[3],p[4],p[5],252|3,224|b.sps.length].concat(p).concat([b.pps.length]).concat(d))),o=b.width,s=b.height,u=b.pixelRatio[0],a=b.pixelRatio[1];return m.box(m.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,o>>8&255,o&255,s>>8&255,s&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]),i,m.box(m.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),m.box(m.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,u&255,a>>24,a>>16&255,a>>8&255,a&255])))},m.esds=function(b){var p=b.config.length;return new Uint8Array([0,0,0,0,3,23+p,0,1,0,4,15+p,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([p]).concat(b.config).concat([6,1,2]))},m.mp4a=function(b){var p=b.samplerate;return m.box(m.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,b.channelCount,0,16,0,0,0,0,p>>8&255,p&255,0,0]),m.box(m.types.esds,m.esds(b)))},m.mp3=function(b){var p=b.samplerate;return m.box(m.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,b.channelCount,0,16,0,0,0,0,p>>8&255,p&255,0,0]))},m.stsd=function(b){return b.type==="audio"?!b.isAAC&&b.codec==="mp3"?m.box(m.types.stsd,m.STSD,m.mp3(b)):m.box(m.types.stsd,m.STSD,m.mp4a(b)):m.box(m.types.stsd,m.STSD,m.avc1(b))},m.tkhd=function(b){var p=b.id,d=b.duration*b.timescale,t=b.width,l=b.height,r=Math.floor(d/(M+1)),i=Math.floor(d%(M+1));return m.box(m.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,p>>24&255,p>>16&255,p>>8&255,p&255,0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255,i>>24,i>>16&255,i>>8&255,i&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,t>>8&255,t&255,0,0,l>>8&255,l&255,0,0]))},m.traf=function(b,p){var d=m.sdtp(b),t=b.id,l=Math.floor(p/(M+1)),r=Math.floor(p%(M+1));return m.box(m.types.traf,m.box(m.types.tfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255])),m.box(m.types.tfdt,new Uint8Array([1,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,r>>24,r>>16&255,r>>8&255,r&255])),m.trun(b,d.length+16+20+8+16+8+8),d)},m.trak=function(b){return b.duration=b.duration||4294967295,m.box(m.types.trak,m.tkhd(b),m.mdia(b))},m.trex=function(b){var p=b.id;return m.box(m.types.trex,new Uint8Array([0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},m.trun=function(b,p){var d=b.samples||[],t=d.length,l=12+16*t,r=new Uint8Array(l),i,o,s,u,a,c;for(p+=8+l,r.set([0,0,15,1,t>>>24&255,t>>>16&255,t>>>8&255,t&255,p>>>24&255,p>>>16&255,p>>>8&255,p&255],0),i=0;i<t;i++)o=d[i],s=o.duration,u=o.size,a=o.flags,c=o.cts,r.set([s>>>24&255,s>>>16&255,s>>>8&255,s&255,u>>>24&255,u>>>16&255,u>>>8&255,u&255,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,a.degradPrio&240<<8,a.degradPrio&15,c>>>24&255,c>>>16&255,c>>>8&255,c&255],12+16*i);return m.box(m.types.trun,r)},m.initSegment=function(b){m.types||m.init();var p=m.moov(b),d=new Uint8Array(m.FTYP.byteLength+p.byteLength);return d.set(m.FTYP),d.set(p,m.FTYP.byteLength),d},m}();y.types=void 0,y.HDLR_TYPES=void 0,y.STTS=void 0,y.STSC=void 0,y.STCO=void 0,y.STSZ=void 0,y.VMHD=void 0,y.SMHD=void 0,y.STSD=void 0,y.FTYP=void 0,y.DINF=void 0,v.default=y},"./src/remux/mp4-remuxer.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return c}),O.d(v,"normalizePts",function(){return f});var M=O("./src/polyfills/number.ts"),y=O("./src/remux/aac-helper.ts"),m=O("./src/remux/mp4-generator.ts"),S=O("./src/events.ts"),b=O("./src/errors.ts"),p=O("./src/utils/logger.ts"),d=O("./src/types/loader.ts"),t=O("./src/utils/timescale-conversion.ts");function l(){return l=Object.assign||function(R){for(var C=1;C<arguments.length;C++){var g=arguments[C];for(var x in g)Object.prototype.hasOwnProperty.call(g,x)&&(R[x]=g[x])}return R},l.apply(this,arguments)}var r=10*1e3,i=1024,o=1152,s=null,u=null,a=!1,c=function(){function R(g,x,E,T){if(T===void 0&&(T=""),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=g,this.config=x,this.typeSupported=E,this.ISGenerated=!1,s===null){var k=navigator.userAgent||"",L=k.match(/Chrome\/(\d+)/i);s=L?parseInt(L[1]):0}if(u===null){var A=navigator.userAgent.match(/Safari\/(\d+)/i);u=A?parseInt(A[1]):0}a=!!s&&s<75||!!u&&u<600}var C=R.prototype;return C.destroy=function(){},C.resetTimeStamp=function(x){p.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=x},C.resetNextTimestamp=function(){p.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},C.resetInitSegment=function(){p.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},C.getVideoStartPts=function(x){var E=!1,T=x.reduce(function(k,L){var A=L.pts-k;return A<-4294967296?(E=!0,f(k,L.pts)):A>0?k:L.pts},x[0].pts);return E&&p.logger.debug("PTS rollover detected"),T},C.remux=function(x,E,T,k,L,A,G,K){var W,z,U,P,H,V,q=L,Z=L,ce=x.pid>-1,he=E.pid>-1,ae=E.samples.length,xe=x.samples.length>0,ge=ae>1,oe=(!ce||xe)&&(!he||ge)||this.ISGenerated||G;if(oe){this.ISGenerated||(U=this.generateIS(x,E,L));var se=this.isVideoContiguous,te=-1;if(ge&&(te=w(E.samples),!se&&this.config.forceKeyFrameOnDiscontinuity))if(V=!0,te>0){p.logger.warn("[mp4-remuxer]: Dropped "+te+" out of "+ae+" video samples due to a missing keyframe");var be=this.getVideoStartPts(E.samples);E.samples=E.samples.slice(te),E.dropped+=te,Z+=(E.samples[0].pts-be)/(E.timescale||9e4)}else te===-1&&(p.logger.warn("[mp4-remuxer]: No keyframe found out of "+ae+" video samples"),V=!1);if(this.ISGenerated){if(xe&&ge){var ee=this.getVideoStartPts(E.samples),ie=f(x.samples[0].pts,ee)-ee,Ee=ie/E.inputTimeScale;q+=Math.max(0,Ee),Z+=Math.max(0,-Ee)}if(xe){if(x.samplerate||(p.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(x,E,L)),z=this.remuxAudio(x,q,this.isAudioContiguous,A,he||ge||K===d.PlaylistLevelType.AUDIO?Z:void 0),ge){var ne=z?z.endPTS-z.startPTS:0;E.inputTimeScale||(p.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(x,E,L)),W=this.remuxVideo(E,Z,se,ne)}}else ge&&(W=this.remuxVideo(E,Z,se,0));W&&(W.firstKeyFrame=te,W.independent=te!==-1)}}return this.ISGenerated&&(T.samples.length&&(H=this.remuxID3(T,L)),k.samples.length&&(P=this.remuxText(k,L))),{audio:z,video:W,initSegment:U,independent:V,text:P,id3:H}},C.generateIS=function(x,E,T){var k=x.samples,L=E.samples,A=this.typeSupported,G={},K=!Object(M.isFiniteNumber)(this._initPTS),W="audio/mp4",z,U,P;if(K&&(z=U=Infinity),x.config&&k.length&&(x.timescale=x.samplerate,x.isAAC||(A.mpeg?(W="audio/mpeg",x.codec=""):A.mp3&&(x.codec="mp3")),G.audio={id:"audio",container:W,codec:x.codec,initSegment:!x.isAAC&&A.mpeg?new Uint8Array(0):m.default.initSegment([x]),metadata:{channelCount:x.channelCount}},K&&(P=x.inputTimeScale,z=U=k[0].pts-Math.round(P*T))),E.sps&&E.pps&&L.length&&(E.timescale=E.inputTimeScale,G.video={id:"main",container:"video/mp4",codec:E.codec,initSegment:m.default.initSegment([E]),metadata:{width:E.width,height:E.height}},K)){P=E.inputTimeScale;var H=this.getVideoStartPts(L),V=Math.round(P*T);U=Math.min(U,f(L[0].dts,H)-V),z=Math.min(z,H-V)}if(Object.keys(G).length)return this.ISGenerated=!0,K&&(this._initPTS=z,this._initDTS=U),{tracks:G,initPTS:z,timescale:P}},C.remuxVideo=function(x,E,T,k){var L=x.inputTimeScale,A=x.samples,G=[],K=A.length,W=this._initPTS,z=this.nextAvcDts,U=8,P,H,V,q=Number.POSITIVE_INFINITY,Z=Number.NEGATIVE_INFINITY,ce=0,he=!1;if(!T||z===null){var ae=E*L,xe=A[0].pts-f(A[0].dts,A[0].pts);z=ae-xe}for(var ge=0;ge<K;ge++){var oe=A[ge];if(oe.pts=f(oe.pts-W,z),oe.dts=f(oe.dts-W,z),oe.dts>oe.pts){var se=9e4*.2;ce=Math.max(Math.min(ce,oe.pts-oe.dts),-1*se)}oe.dts<A[ge>0?ge-1:ge].dts&&(he=!0)}he&&A.sort(function(Ct,bt){var ft=Ct.dts-bt.dts,jt=Ct.pts-bt.pts;return ft||jt}),H=A[0].dts,V=A[A.length-1].dts;var te=Math.round((V-H)/(K-1));if(ce<0){if(ce<te*-2){p.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(t.toMsFromMpegTsClock)(-te,!0)+" ms");for(var be=ce,ee=0;ee<K;ee++)A[ee].dts=be=Math.max(be,A[ee].pts-te),A[ee].pts=Math.max(be,A[ee].pts)}else{p.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(t.toMsFromMpegTsClock)(ce,!0)+" ms to overcome this issue");for(var ie=0;ie<K;ie++)A[ie].dts=A[ie].dts+ce}H=A[0].dts}if(T){var Ee=H-z,ne=Ee>te,J=Ee<-1;if(ne||J){ne?p.logger.warn("AVC: "+Object(t.toMsFromMpegTsClock)(Ee,!0)+" ms ("+Ee+"dts) hole between fragments detected, filling it"):p.logger.warn("AVC: "+Object(t.toMsFromMpegTsClock)(-Ee,!0)+" ms ("+Ee+"dts) overlapping between fragments detected"),H=z;var X=A[0].pts-Ee;A[0].dts=H,A[0].pts=X,p.logger.log("Video: First PTS/DTS adjusted: "+Object(t.toMsFromMpegTsClock)(X,!0)+"/"+Object(t.toMsFromMpegTsClock)(H,!0)+", delta: "+Object(t.toMsFromMpegTsClock)(Ee,!0)+" ms")}}a&&(H=Math.max(0,H));for(var Q=0,me=0,fe=0;fe<K;fe++){for(var Te=A[fe],ze=Te.units,Je=ze.length,qe=0,Xe=0;Xe<Je;Xe++)qe+=ze[Xe].data.length;me+=qe,Q+=Je,Te.length=qe,Te.dts=Math.max(Te.dts,H),Te.pts=Math.max(Te.pts,Te.dts,0),q=Math.min(Te.pts,q),Z=Math.max(Te.pts,Z)}V=A[K-1].dts;var et=me+4*Q+8,rt;try{rt=new Uint8Array(et)}catch(Ct){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:b.ErrorTypes.MUX_ERROR,details:b.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:et,reason:"fail allocating video mdat "+et});return}var Le=new DataView(rt.buffer);Le.setUint32(0,et),rt.set(m.default.types.mdat,4);for(var Oe=0;Oe<K;Oe++){for(var Ve=A[Oe],Ze=Ve.units,Ne=0,Ge=0,De=Ze.length;Ge<De;Ge++){var we=Ze[Ge],Ae=we.data,de=we.data.byteLength;Le.setUint32(U,de),U+=4,rt.set(Ae,U),U+=de,Ne+=4+de}if(Oe<K-1)P=A[Oe+1].dts-Ve.dts;else{var _e=this.config,Se=Ve.dts-A[Oe>0?Oe-1:Oe].dts;if(_e.stretchShortVideoTrack&&this.nextAudioPts!==null){var Ie=Math.floor(_e.maxBufferHole*L),ke=(k?q+k*L:this.nextAudioPts)-Ve.pts;ke>Ie?(P=ke-Se,P<0&&(P=Se),p.logger.log("[mp4-remuxer]: It is approximately "+ke/90+" ms to the next segment; using duration "+P/90+" ms for the last video frame.")):P=Se}else P=Se}var Ye=Math.round(Ve.pts-Ve.dts);G.push(new _(Ve.key,P,Ne,Ye))}if(G.length&&s&&s<70){var nt=G[0].flags;nt.dependsOn=2,nt.isNonSync=0}console.assert(P!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=z=V+P,this.isVideoContiguous=!0;var lt=m.default.moof(x.sequenceNumber++,H,l({},x,{samples:G})),at="video",ot={data1:lt,data2:rt,startPTS:q/L,endPTS:(Z+P)/L,startDTS:H/L,endDTS:z/L,type:at,hasAudio:!1,hasVideo:!0,nb:G.length,dropped:x.dropped};return x.samples=[],x.dropped=0,console.assert(rt.length,"MDAT length must not be zero"),ot},C.remuxAudio=function(x,E,T,k,L){var A=x.inputTimeScale,G=x.samplerate?x.samplerate:A,K=A/G,W=x.isAAC?i:o,z=W*K,U=this._initPTS,P=!x.isAAC&&this.typeSupported.mpeg,H=[],V=x.samples,q=P?0:8,Z=this.nextAudioPts||-1,ce=E*A;if(this.isAudioContiguous=T=T||V.length&&Z>0&&(k&&Math.abs(ce-Z)<9e3||Math.abs(f(V[0].pts-U,ce)-Z)<20*z),V.forEach(function(Ae){Ae.pts=f(Ae.pts-U,ce)}),!T||Z<0){if(V=V.filter(function(Ae){return Ae.pts>=0}),!V.length)return;L===0?Z=0:k?Z=Math.max(0,ce):Z=V[0].pts}if(x.isAAC)for(var he=L!==void 0,ae=this.config.maxAudioFramesDrift,xe=0,ge=Z;xe<V.length;xe++){var oe=V[xe],se=oe.pts,te=se-ge,be=Math.abs(1e3*te/A);if(te<=-ae*z&&he)xe===0&&(p.logger.warn("Audio frame @ "+(se/A).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*te/A)+" ms."),this.nextAudioPts=Z=ge=se);else if(te>=ae*z&&be<r&&he){var ee=Math.round(te/z);ge=se-ee*z,ge<0&&(ee--,ge+=z),xe===0&&(this.nextAudioPts=Z=ge),p.logger.warn("[mp4-remuxer]: Injecting "+ee+" audio frame @ "+(ge/A).toFixed(3)+"s due to "+Math.round(1e3*te/A)+" ms gap.");for(var ie=0;ie<ee;ie++){var Ee=Math.max(ge,0),ne=y.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);ne||(p.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ne=oe.unit.subarray()),V.splice(xe,0,{unit:ne,pts:Ee}),ge+=z,xe++}}oe.pts=ge,ge+=z}for(var J=null,X=null,Q,me=0,fe=V.length;fe--;)me+=V[fe].unit.byteLength;for(var Te=0,ze=V.length;Te<ze;Te++){var Je=V[Te],qe=Je.unit,Xe=Je.pts;if(X!==null){var et=H[Te-1];et.duration=Math.round((Xe-X)/K)}else if(T&&x.isAAC&&(Xe=Z),J=Xe,me>0){me+=q;try{Q=new Uint8Array(me)}catch(Ae){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:b.ErrorTypes.MUX_ERROR,details:b.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:me,reason:"fail allocating audio mdat "+me});return}if(!P){var rt=new DataView(Q.buffer);rt.setUint32(0,me),Q.set(m.default.types.mdat,4)}}else return;Q.set(qe,q);var Le=qe.byteLength;q+=Le,H.push(new _(!0,W,Le,0)),X=Xe}var Oe=H.length;if(!Oe)return;var Ve=H[H.length-1];this.nextAudioPts=Z=X+K*Ve.duration;var Ze=P?new Uint8Array(0):m.default.moof(x.sequenceNumber++,J/K,l({},x,{samples:H}));x.samples=[];var Ne=J/A,Ge=Z/A,De="audio",we={data1:Ze,data2:Q,startPTS:Ne,endPTS:Ge,startDTS:Ne,endDTS:Ge,type:De,hasAudio:!0,hasVideo:!1,nb:Oe};return this.isAudioContiguous=!0,console.assert(Q.length,"MDAT length must not be zero"),we},C.remuxEmptyAudio=function(x,E,T,k){var L=x.inputTimeScale,A=x.samplerate?x.samplerate:L,G=L/A,K=this.nextAudioPts,W=(K!==null?K:k.startDTS*L)+this._initDTS,z=k.endDTS*L+this._initDTS,U=G*i,P=Math.ceil((z-W)/U),H=y.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);if(p.logger.warn("[mp4-remuxer]: remux empty Audio"),!H){p.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var V=[],q=0;q<P;q++){var Z=W+q*U;V.push({unit:H,pts:Z,dts:Z})}return x.samples=V,this.remuxAudio(x,E,T,!1)},C.remuxID3=function(x,E){var T=x.samples.length;if(!T)return;for(var k=x.inputTimeScale,L=this._initPTS,A=this._initDTS,G=0;G<T;G++){var K=x.samples[G];K.pts=f(K.pts-L,E*k)/k,K.dts=f(K.dts-A,E*k)/k}var W=x.samples;return x.samples=[],{samples:W}},C.remuxText=function(x,E){var T=x.samples.length;if(!T)return;for(var k=x.inputTimeScale,L=this._initPTS,A=0;A<T;A++){var G=x.samples[A];G.pts=f(G.pts-L,E*k)/k}x.samples.sort(function(W,z){return W.pts-z.pts});var K=x.samples;return x.samples=[],{samples:K}},R}();function f(R,C){var g;if(C===null)return R;for(C<R?g=-8589934592:g=8589934592;Math.abs(R-C)>4294967296;)R+=g;return R}function w(R){for(var C=0;C<R.length;C++)if(R[C].key)return C;return-1}var _=function(C,g,x,E){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=g,this.size=x,this.cts=E,this.flags=new h(C)},h=function(C){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=C?2:1,this.isNonSync=C?0:1}},"./src/remux/passthrough-remuxer.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/polyfills/number.ts"),y=O("./src/utils/mp4-tools.ts"),m=O("./src/loader/fragment.ts"),S=O("./src/utils/logger.ts"),b=function(){function t(){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 l=t.prototype;return l.destroy=function(){},l.resetTimeStamp=function(i){this.initPTS=i,this.lastEndDTS=null},l.resetNextTimestamp=function(){this.lastEndDTS=null},l.resetInitSegment=function(i,o,s){this.audioCodec=o,this.videoCodec=s,this.generateInitSegment(i),this.emitInitSegment=!0},l.generateInitSegment=function(i){var o=this.audioCodec,s=this.videoCodec;if(!i||!i.byteLength){this.initTracks=void 0,this.initData=void 0;return}var u=this.initData=Object(y.parseInitSegment)(i);o||(o=d(u.audio,m.ElementaryStreamTypes.AUDIO)),s||(s=d(u.video,m.ElementaryStreamTypes.VIDEO));var a={};u.audio&&u.video?a.audiovideo={container:"video/mp4",codec:o+","+s,initSegment:i,id:"main"}:u.audio?a.audio={container:"audio/mp4",codec:o,initSegment:i,id:"audio"}:u.video?a.video={container:"video/mp4",codec:s,initSegment:i,id:"main"}:S.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=a},l.remux=function(i,o,s,u,a){var c=this.initPTS,f=this.lastEndDTS,w={audio:void 0,video:void 0,text:u,id3:s,initSegment:void 0};Object(M.isFiniteNumber)(f)||(f=this.lastEndDTS=a||0);var _=o.samples;if(!_||!_.length)return w;var h={initPTS:void 0,timescale:1},R=this.initData;if((!R||!R.length)&&(this.generateInitSegment(_),R=this.initData),!R||!R.length)return S.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),w;this.emitInitSegment&&(h.tracks=this.initTracks,this.emitInitSegment=!1),Object(M.isFiniteNumber)(c)||(this.initPTS=h.initPTS=c=p(R,_,f));var C=Object(y.getDuration)(_,R),g=f,x=C+g;Object(y.offsetStartDTS)(R,_,c),C>0?this.lastEndDTS=x:(S.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var E=!!R.audio,T=!!R.video,k="";E&&(k+="audio"),T&&(k+="video");var L={data1:_,startPTS:g,startDTS:g,endPTS:x,endDTS:x,type:k,hasAudio:E,hasVideo:T,nb:1,dropped:0};return w.audio=L.type==="audio"?L:void 0,w.video=L.type!=="audio"?L:void 0,w.text=u,w.id3=s,w.initSegment=h,w},t}(),p=function(l,r,i){return Object(y.getStartDTS)(l,r)-i};function d(t,l){var r=t==null?void 0:t.codec;return r&&r.length>4?r:r==="hvc1"?"hvc1.1.c.L120.90":r==="av01"?"av01.0.04M.08":r==="avc1"||l===m.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}v.default=b},"./src/task-loop.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return M});var M=function(){function y(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var m=y.prototype;return m.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},m.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},m.onHandlerDestroyed=function(){},m.hasInterval=function(){return!!this._tickInterval},m.hasNextTick=function(){return!!this._tickTimer},m.setInterval=function(b){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,b),!0)},m.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},m.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},m.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},m.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},m.doTick=function(){},y}()},"./src/types/cmcd.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"CMCDVersion",function(){return M}),O.d(v,"CMCDObjectType",function(){return y}),O.d(v,"CMCDStreamingFormat",function(){return m}),O.d(v,"CMCDStreamType",function(){return S});var M=1,y;(function(b){b.MANIFEST="m",b.AUDIO="a",b.VIDEO="v",b.MUXED="av",b.INIT="i",b.CAPTION="c",b.TIMED_TEXT="tt",b.KEY="k",b.OTHER="o"})(y||(y={}));var m;(function(b){b.DASH="d",b.HLS="h",b.SMOOTH="s",b.OTHER="o"})(m||(m={}));var S;(function(b){b.VOD="v",b.LIVE="l"})(S||(S={}))},"./src/types/level.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"HlsSkip",function(){return m}),O.d(v,"getSkipValue",function(){return S}),O.d(v,"HlsUrlParameters",function(){return b}),O.d(v,"Level",function(){return p});function M(d,t){for(var l=0;l<t.length;l++){var r=t[l];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(d,r.key,r)}}function y(d,t,l){return t&&M(d.prototype,t),l&&M(d,l),d}var m;(function(d){d.No="",d.Yes="YES",d.v2="v2"})(m||(m={}));function S(d,t){var l=d.canSkipUntil,r=d.canSkipDateRanges,i=d.endSN,o=t!==void 0?t-i:0;return l&&o<l?r?m.v2:m.Yes:m.No}var b=function(){function d(l,r,i){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=l,this.part=r,this.skip=i}var t=d.prototype;return t.addDirectives=function(r){var i=new self.URL(r);return this.msn!==void 0&&i.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&i.searchParams.set("_HLS_part",this.part.toString()),this.skip&&i.searchParams.set("_HLS_skip",this.skip),i.toString()},d}(),p=function(){function d(t){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=[t.url],this.attrs=t.attrs,this.bitrate=t.bitrate,t.details&&(this.details=t.details),this.id=t.id||0,this.name=t.name,this.width=t.width||0,this.height=t.height||0,this.audioCodec=t.audioCodec,this.videoCodec=t.videoCodec,this.unknownCodecs=t.unknownCodecs,this.codecSet=[t.videoCodec,t.audioCodec].filter(function(l){return l}).join(",").replace(/\.[^.,]+/g,"")}return y(d,[{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(l){var r=l%this.url.length;this._urlId!==r&&(this.details=void 0,this._urlId=r)}}]),d}()},"./src/types/loader.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"PlaylistContextType",function(){return M}),O.d(v,"PlaylistLevelType",function(){return y});var M;(function(m){m.MANIFEST="manifest",m.LEVEL="level",m.AUDIO_TRACK="audioTrack",m.SUBTITLE_TRACK="subtitleTrack"})(M||(M={}));var y;(function(m){m.MAIN="main",m.AUDIO="audio",m.SUBTITLE="subtitle"})(y||(y={}))},"./src/types/transmuxer.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"ChunkMetadata",function(){return M});var M=function(S,b,p,d,t,l){d===void 0&&(d=0),t===void 0&&(t=-1),l===void 0&&(l=!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=y(),this.buffering={audio:y(),video:y(),audiovideo:y()},this.level=S,this.sn=b,this.id=p,this.size=d,this.part=t,this.partial=l};function y(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"AttrList",function(){return m});var M=/^(\d+)x(\d+)$/,y=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,m=function(){function S(p){typeof p=="string"&&(p=S.parseAttrList(p));for(var d in p)p.hasOwnProperty(d)&&(this[d]=p[d])}var b=S.prototype;return b.decimalInteger=function(d){var t=parseInt(this[d],10);return t>Number.MAX_SAFE_INTEGER?Infinity:t},b.hexadecimalInteger=function(d){if(this[d]){var t=(this[d]||"0x").slice(2);t=(t.length&1?"0":"")+t;for(var l=new Uint8Array(t.length/2),r=0;r<t.length/2;r++)l[r]=parseInt(t.slice(r*2,r*2+2),16);return l}else return null},b.hexadecimalIntegerAsNumber=function(d){var t=parseInt(this[d],16);return t>Number.MAX_SAFE_INTEGER?Infinity:t},b.decimalFloatingPoint=function(d){return parseFloat(this[d])},b.optionalFloat=function(d,t){var l=this[d];return l?parseFloat(l):t},b.enumeratedString=function(d){return this[d]},b.bool=function(d){return this[d]==="YES"},b.decimalResolution=function(d){var t=M.exec(this[d]);return t===null?void 0:{width:parseInt(t[1],10),height:parseInt(t[2],10)}},S.parseAttrList=function(d){var t,l={},r='"';for(y.lastIndex=0;(t=y.exec(d))!==null;){var i=t[2];i.indexOf(r)===0&&i.lastIndexOf(r)===i.length-1&&(i=i.slice(1,-1)),l[t[1]]=i}return l},S}()},"./src/utils/binary-search.ts":function(N,v,O){"use strict";O.r(v);var M={search:function(m,S){for(var b=0,p=m.length-1,d=null,t=null;b<=p;){d=(b+p)/2|0,t=m[d];var l=S(t);if(l>0)b=d+1;else if(l<0)p=d-1;else return t}return null}};v.default=M},"./src/utils/buffer-helper.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"BufferHelper",function(){return m});var M=O("./src/utils/logger.ts"),y={length:0,start:function(){return 0},end:function(){return 0}},m=function(){function S(){}return S.isBuffered=function(p,d){try{if(p){for(var t=S.getBuffered(p),l=0;l<t.length;l++)if(d>=t.start(l)&&d<=t.end(l))return!0}}catch(r){}return!1},S.bufferInfo=function(p,d,t){try{if(p){var l=S.getBuffered(p),r=[],i;for(i=0;i<l.length;i++)r.push({start:l.start(i),end:l.end(i)});return this.bufferedInfo(r,d,t)}}catch(o){}return{len:0,start:d,end:d,nextStart:void 0}},S.bufferedInfo=function(p,d,t){d=Math.max(0,d),p.sort(function(h,R){var C=h.start-R.start;return C||R.end-h.end});var l=[];if(t)for(var r=0;r<p.length;r++){var i=l.length;if(i){var o=l[i-1].end;p[r].start-o<t?p[r].end>o&&(l[i-1].end=p[r].end):l.push(p[r])}else l.push(p[r])}else l=p;for(var s=0,u,a=d,c=d,f=0;f<l.length;f++){var w=l[f].start,_=l[f].end;if(d+t>=w&&d<_)a=w,c=_,s=c-d;else if(d+t<w){u=w;break}}return{len:s,start:a||0,end:c||0,nextStart:u}},S.getBuffered=function(p){try{return p.buffered}catch(d){return M.logger.log("failed to get media.buffered",d),y}},S}()},"./src/utils/cea-608-parser.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"Row",function(){return c}),O.d(v,"CaptionScreen",function(){return f});var M=O("./src/utils/logger.ts"),y={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},m=function(x){var E=x;return y.hasOwnProperty(x)&&(E=y[x]),String.fromCharCode(E)},S=15,b=100,p={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},d={17:2,18:4,21:6,22:8,23:10,19:13,20:15},t={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},l={25:2,26:4,29:6,30:8,31:10,27:13,28:15},r=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],i;(function(g){g[g.ERROR=0]="ERROR",g[g.TEXT=1]="TEXT",g[g.WARNING=2]="WARNING",g[g.INFO=2]="INFO",g[g.DEBUG=3]="DEBUG",g[g.DATA=3]="DATA"})(i||(i={}));var o=function(){function g(){this.time=null,this.verboseLevel=i.ERROR}var x=g.prototype;return x.log=function(T,k){this.verboseLevel>=T&&M.logger.log(this.time+" ["+T+"] "+k)},g}(),s=function(x){for(var E=[],T=0;T<x.length;T++)E.push(x[T].toString(16));return E},u=function(){function g(E,T,k,L,A){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=E||"white",this.underline=T||!1,this.italics=k||!1,this.background=L||"black",this.flash=A||!1}var x=g.prototype;return x.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},x.setStyles=function(T){for(var k=["foreground","underline","italics","background","flash"],L=0;L<k.length;L++){var A=k[L];T.hasOwnProperty(A)&&(this[A]=T[A])}},x.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},x.equals=function(T){return this.foreground===T.foreground&&this.underline===T.underline&&this.italics===T.italics&&this.background===T.background&&this.flash===T.flash},x.copy=function(T){this.foreground=T.foreground,this.underline=T.underline,this.italics=T.italics,this.background=T.background,this.flash=T.flash},x.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},g}(),a=function(){function g(E,T,k,L,A,G){this.uchar=void 0,this.penState=void 0,this.uchar=E||" ",this.penState=new u(T,k,L,A,G)}var x=g.prototype;return x.reset=function(){this.uchar=" ",this.penState.reset()},x.setChar=function(T,k){this.uchar=T,this.penState.copy(k)},x.setPenState=function(T){this.penState.copy(T)},x.equals=function(T){return this.uchar===T.uchar&&this.penState.equals(T.penState)},x.copy=function(T){this.uchar=T.uchar,this.penState.copy(T.penState)},x.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},g}(),c=function(){function g(E){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var T=0;T<b;T++)this.chars.push(new a);this.logger=E,this.pos=0,this.currPenState=new u}var x=g.prototype;return x.equals=function(T){for(var k=!0,L=0;L<b;L++)if(!this.chars[L].equals(T.chars[L])){k=!1;break}return k},x.copy=function(T){for(var k=0;k<b;k++)this.chars[k].copy(T.chars[k])},x.isEmpty=function(){for(var T=!0,k=0;k<b;k++)if(!this.chars[k].isEmpty()){T=!1;break}return T},x.setCursor=function(T){this.pos!==T&&(this.pos=T),this.pos<0?(this.logger.log(i.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>b&&(this.logger.log(i.DEBUG,"Too large cursor position "+this.pos),this.pos=b)},x.moveCursor=function(T){var k=this.pos+T;if(T>1)for(var L=this.pos+1;L<k+1;L++)this.chars[L].setPenState(this.currPenState);this.setCursor(k)},x.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},x.insertChar=function(T){T>=144&&this.backSpace();var k=m(T);if(this.pos>=b){this.logger.log(i.ERROR,"Cannot insert "+T.toString(16)+" ("+k+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(k,this.currPenState),this.moveCursor(1)},x.clearFromPos=function(T){var k;for(k=T;k<b;k++)this.chars[k].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 T=[],k=!0,L=0;L<b;L++){var A=this.chars[L].uchar;A!==" "&&(k=!1),T.push(A)}return k?"":T.join("")},x.setPenStyles=function(T){this.currPenState.setStyles(T);var k=this.chars[this.pos];k.setPenState(this.currPenState)},g}(),f=function(){function g(E){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var T=0;T<S;T++)this.rows.push(new c(E));this.logger=E,this.currRow=S-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var x=g.prototype;return x.reset=function(){for(var T=0;T<S;T++)this.rows[T].clear();this.currRow=S-1},x.equals=function(T){for(var k=!0,L=0;L<S;L++)if(!this.rows[L].equals(T.rows[L])){k=!1;break}return k},x.copy=function(T){for(var k=0;k<S;k++)this.rows[k].copy(T.rows[k])},x.isEmpty=function(){for(var T=!0,k=0;k<S;k++)if(!this.rows[k].isEmpty()){T=!1;break}return T},x.backSpace=function(){var T=this.rows[this.currRow];T.backSpace()},x.clearToEndOfRow=function(){var T=this.rows[this.currRow];T.clearToEndOfRow()},x.insertChar=function(T){var k=this.rows[this.currRow];k.insertChar(T)},x.setPen=function(T){var k=this.rows[this.currRow];k.setPenStyles(T)},x.moveCursor=function(T){var k=this.rows[this.currRow];k.moveCursor(T)},x.setCursor=function(T){this.logger.log(i.INFO,"setCursor: "+T);var k=this.rows[this.currRow];k.setCursor(T)},x.setPAC=function(T){this.logger.log(i.INFO,"pacData = "+JSON.stringify(T));var k=T.row-1;if(this.nrRollUpRows&&k<this.nrRollUpRows-1&&(k=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==k){for(var L=0;L<S;L++)this.rows[L].clear();var A=this.currRow+1-this.nrRollUpRows,G=this.lastOutputScreen;if(G){var K=G.rows[A].cueStartTime,W=this.logger.time;if(K&&W!==null&&K<W)for(var z=0;z<this.nrRollUpRows;z++)this.rows[k-this.nrRollUpRows+z+1].copy(G.rows[A+z])}}this.currRow=k;var U=this.rows[this.currRow];if(T.indent!==null){var P=T.indent,H=Math.max(P-1,0);U.setCursor(T.indent),T.color=U.chars[H].penState.foreground}var V={foreground:T.color,underline:T.underline,italics:T.italics,background:"black",flash:!1};this.setPen(V)},x.setBkgData=function(T){this.logger.log(i.INFO,"bkgData = "+JSON.stringify(T)),this.backSpace(),this.setPen(T),this.insertChar(32)},x.setRollUpRows=function(T){this.nrRollUpRows=T},x.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(i.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(i.TEXT,this.getDisplayText());var T=this.currRow+1-this.nrRollUpRows,k=this.rows.splice(T,1)[0];k.clear(),this.rows.splice(this.currRow,0,k),this.logger.log(i.INFO,"Rolling up")},x.getDisplayText=function(T){T=T||!1;for(var k=[],L="",A=-1,G=0;G<S;G++){var K=this.rows[G].getTextString();K&&(A=G+1,T?k.push("Row "+A+": '"+K+"'"):k.push(K.trim()))}return k.length>0&&(T?L="["+k.join(" | ")+"]":L=k.join(`
`)),L},x.getTextAndFormat=function(){return this.rows},g}(),w=function(){function g(E,T,k){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=E,this.outputFilter=T,this.mode=null,this.verbose=0,this.displayedMemory=new f(k),this.nonDisplayedMemory=new f(k),this.lastOutputScreen=new f(k),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=k}var x=g.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(T){this.outputFilter=T},x.setPAC=function(T){this.writeScreen.setPAC(T)},x.setBkgData=function(T){this.writeScreen.setBkgData(T)},x.setMode=function(T){if(T===this.mode)return;this.mode=T,this.logger.log(i.INFO,"MODE="+T),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=T},x.insertChars=function(T){for(var k=0;k<T.length;k++)this.writeScreen.insertChar(T[k]);var L=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(i.INFO,L+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(i.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},x.ccRCL=function(){this.logger.log(i.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},x.ccBS=function(){if(this.logger.log(i.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(i.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},x.ccRU=function(T){this.logger.log(i.INFO,"RU("+T+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(T)},x.ccFON=function(){this.logger.log(i.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},x.ccRDC=function(){this.logger.log(i.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},x.ccTR=function(){this.logger.log(i.INFO,"TR"),this.setMode("MODE_TEXT")},x.ccRTD=function(){this.logger.log(i.INFO,"RTD"),this.setMode("MODE_TEXT")},x.ccEDM=function(){this.logger.log(i.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},x.ccCR=function(){this.logger.log(i.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},x.ccENM=function(){this.logger.log(i.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},x.ccEOC=function(){if(this.logger.log(i.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var T=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=T,this.writeScreen=this.nonDisplayedMemory,this.logger.log(i.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},x.ccTO=function(T){this.logger.log(i.INFO,"TO("+T+") - Tab Offset"),this.writeScreen.moveCursor(T)},x.ccMIDROW=function(T){var k={flash:!1};if(k.underline=T%2===1,k.italics=T>=46,k.italics)k.foreground="white";else{var L=Math.floor(T/2)-16,A=["white","green","blue","cyan","red","yellow","magenta"];k.foreground=A[L]}this.logger.log(i.INFO,"MIDROW: "+JSON.stringify(k)),this.writeScreen.setPen(k)},x.outputDataUpdate=function(T){T===void 0&&(T=!1);var k=this.logger.time;if(k===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=k:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,k,this.lastOutputScreen),T&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:k),this.lastOutputScreen.copy(this.displayedMemory))},x.cueSplitAtTime=function(T){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,T,this.displayedMemory),this.cueStartTime=T))},g}(),_=function(){function g(E,T,k){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var L=new o;this.channels=[null,new w(E,T,L),new w(E+1,k,L)],this.cmdHistory=C(),this.logger=L}var x=g.prototype;return x.getHandler=function(T){return this.channels[T].getHandler()},x.setHandler=function(T,k){this.channels[T].setHandler(k)},x.addData=function(T,k){var L,A,G,K=!1;this.logger.time=T;for(var W=0;W<k.length;W+=2){if(A=k[W]&127,G=k[W+1]&127,A===0&&G===0)continue;if(this.logger.log(i.DATA,"["+s([k[W],k[W+1]])+"] -> ("+s([A,G])+")"),L=this.parseCmd(A,G),L||(L=this.parseMidrow(A,G)),L||(L=this.parsePAC(A,G)),L||(L=this.parseBackgroundAttributes(A,G)),!L&&(K=this.parseChars(A,G),K)){var z=this.currentChannel;if(z&&z>0){var U=this.channels[z];U.insertChars(K)}else this.logger.log(i.WARNING,"No channel found yet. TEXT-MODE?")}!L&&!K&&this.logger.log(i.WARNING,"Couldn't parse cleaned data "+s([A,G])+" orig: "+s([k[W],k[W+1]]))}},x.parseCmd=function(T,k){var L=this.cmdHistory,A=(T===20||T===28||T===21||T===29)&&k>=32&&k<=47,G=(T===23||T===31)&&k>=33&&k<=35;if(!(A||G))return!1;if(R(T,k,L))return h(null,null,L),this.logger.log(i.DEBUG,"Repeated command ("+s([T,k])+") is dropped"),!0;var K=T===20||T===21||T===23?1:2,W=this.channels[K];return T===20||T===21||T===28||T===29?k===32?W.ccRCL():k===33?W.ccBS():k===34?W.ccAOF():k===35?W.ccAON():k===36?W.ccDER():k===37?W.ccRU(2):k===38?W.ccRU(3):k===39?W.ccRU(4):k===40?W.ccFON():k===41?W.ccRDC():k===42?W.ccTR():k===43?W.ccRTD():k===44?W.ccEDM():k===45?W.ccCR():k===46?W.ccENM():k===47&&W.ccEOC():W.ccTO(k-32),h(T,k,L),this.currentChannel=K,!0},x.parseMidrow=function(T,k){var L=0;if((T===17||T===25)&&k>=32&&k<=47){if(T===17?L=1:L=2,L!==this.currentChannel)return this.logger.log(i.ERROR,"Mismatch channel in midrow parsing"),!1;var A=this.channels[L];return A?(A.ccMIDROW(k),this.logger.log(i.DEBUG,"MIDROW ("+s([T,k])+")"),!0):!1}return!1},x.parsePAC=function(T,k){var L,A=this.cmdHistory,G=(T>=17&&T<=23||T>=25&&T<=31)&&k>=64&&k<=127,K=(T===16||T===24)&&k>=64&&k<=95;if(!(G||K))return!1;if(R(T,k,A))return h(null,null,A),!0;var W=T<=23?1:2;k>=64&&k<=95?L=W===1?p[T]:t[T]:L=W===1?d[T]:l[T];var z=this.channels[W];return z?(z.setPAC(this.interpretPAC(L,k)),h(T,k,A),this.currentChannel=W,!0):!1},x.interpretPAC=function(T,k){var L,A={color:null,italics:!1,indent:null,underline:!1,row:T};return k>95?L=k-96:L=k-64,A.underline=(L&1)===1,L<=13?A.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(L/2)]:L<=15?(A.italics=!0,A.color="white"):A.indent=Math.floor((L-16)/2)*4,A},x.parseChars=function(T,k){var L,A=null,G=null;if(T>=25?(L=2,G=T-8):(L=1,G=T),G>=17&&G<=19){var K;G===17?K=k+80:G===18?K=k+112:K=k+144,this.logger.log(i.INFO,"Special char '"+m(K)+"' in channel "+L),A=[K]}else T>=32&&T<=127&&(A=k===0?[T]:[T,k]);if(A){var W=s(A);this.logger.log(i.DEBUG,"Char codes = "+W.join(",")),h(T,k,this.cmdHistory)}return A},x.parseBackgroundAttributes=function(T,k){var L=(T===16||T===24)&&k>=32&&k<=47,A=(T===23||T===31)&&k>=45&&k<=47;if(!(L||A))return!1;var G,K={};T===16||T===24?(G=Math.floor((k-32)/2),K.background=r[G],k%2===1&&(K.background=K.background+"_semi")):k===45?K.background="transparent":(K.foreground="black",k===47&&(K.underline=!0));var W=T<=23?1:2,z=this.channels[W];return z.setBkgData(K),h(T,k,this.cmdHistory),!0},x.reset=function(){for(var T=0;T<Object.keys(this.channels).length;T++){var k=this.channels[T];k&&k.reset()}this.cmdHistory=C()},x.cueSplitAtTime=function(T){for(var k=0;k<this.channels.length;k++){var L=this.channels[k];L&&L.cueSplitAtTime(T)}},g}();function h(g,x,E){E.a=g,E.b=x}function R(g,x,E){return E.a===g&&E.b===x}function C(){return{a:null,b:null}}v.default=_},"./src/utils/codecs.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"isCodecType",function(){return y}),O.d(v,"isCodecSupportedInMp4",function(){return m});var M={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 y(S,b){var p=M[b];return!!p&&p[S.slice(0,4)]===!0}function m(S,b){return MediaSource.isTypeSupported((b||"video")+'/mp4;codecs="'+S+'"')}},"./src/utils/cues.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/utils/vttparser.ts"),y=O("./src/utils/webvtt-parser.ts"),m=O("./src/utils/texttrack-utils.ts"),S=/\s/,b={newCue:function(d,t,l,r){for(var i=[],o,s,u,a,c,f=self.VTTCue||self.TextTrackCue,w=0;w<r.rows.length;w++)if(o=r.rows[w],u=!0,a=0,c="",!o.isEmpty()){for(var _=0;_<o.chars.length;_++)S.test(o.chars[_].uchar)&&u?a++:(c+=o.chars[_].uchar,u=!1);o.cueStartTime=t,t===l&&(l+=1e-4),a>=16?a--:a++;var h=Object(M.fixLineBreaks)(c.trim()),R=Object(y.generateCueId)(t,l,h);(!d||!d.cues||!d.cues.getCueById(R))&&(s=new f(t,l,h),s.id=R,s.line=w+1,s.align="left",s.position=10+Math.min(80,Math.floor(a*8/32)*10),i.push(s))}return d&&i.length&&(i.sort(function(C,g){return C.line==="auto"||g.line==="auto"?0:C.line>8&&g.line>8?g.line-C.line:C.line-g.line}),i.forEach(function(C){return Object(m.addCueToTrack)(d,C)})),i}};v.default=b},"./src/utils/discontinuities.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"findFirstFragWithCC",function(){return S}),O.d(v,"shouldAlignOnDiscontinuities",function(){return b}),O.d(v,"findDiscontinuousReferenceFrag",function(){return p}),O.d(v,"adjustSlidingStart",function(){return t}),O.d(v,"alignStream",function(){return l}),O.d(v,"alignPDT",function(){return i}),O.d(v,"alignFragmentByPDTDelta",function(){return o}),O.d(v,"alignMediaPlaylistByPDT",function(){return s});var M=O("./src/polyfills/number.ts"),y=O("./src/utils/logger.ts"),m=O("./src/controller/level-helper.ts");function S(u,a){for(var c=null,f=0,w=u.length;f<w;f++){var _=u[f];if(_&&_.cc===a){c=_;break}}return c}function b(u,a,c){return!!(a.details&&(c.endCC>c.startCC||u&&u.cc<c.startCC))}function p(u,a){var c=u.fragments,f=a.fragments;if(!f.length||!c.length){y.logger.log("No fragments to align");return}var w=S(c,f[0].cc);if(!w||w&&!w.startPTS){y.logger.log("No frag in previous level to align on");return}return w}function d(u,a){if(u){var c=u.start+a;u.start=u.startPTS=c,u.endPTS=c+u.duration}}function t(u,a){for(var c=a.fragments,f=0,w=c.length;f<w;f++)d(c[f],u);a.fragmentHint&&d(a.fragmentHint,u),a.alignedSliding=!0}function l(u,a,c){if(!a)return;r(u,c,a),!c.alignedSliding&&a.details&&i(c,a.details),!c.alignedSliding&&a.details&&!c.skippedSegments&&Object(m.adjustSliding)(a.details,c)}function r(u,a,c){if(b(u,c,a)){var f=p(c.details,a);f&&Object(M.isFiniteNumber)(f.start)&&(y.logger.log("Adjusting PTS using last level due to CC increase within current level "+a.url),t(f.start,a))}}function i(u,a){if(!a.fragments.length||!u.hasProgramDateTime||!a.hasProgramDateTime)return;var c=a.fragments[0].programDateTime,f=u.fragments[0].programDateTime,w=(f-c)/1e3+a.fragments[0].start;w&&Object(M.isFiniteNumber)(w)&&(y.logger.log("Adjusting PTS using programDateTime delta "+(f-c)+"ms, sliding:"+w.toFixed(3)+" "+u.url+" "),t(w,u))}function o(u,a){var c=u.programDateTime;if(!c)return;var f=(c-a)/1e3;u.start=u.startPTS=f,u.endPTS=f+u.duration}function s(u,a){if(!a.fragments.length||!u.hasProgramDateTime||!a.hasProgramDateTime)return;var c=a.fragments[0].programDateTime,f=a.fragments[0].start,w=c-f*1e3;u.fragments.forEach(function(_){o(_,w)}),u.fragmentHint&&o(u.fragmentHint,w),u.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/utils/ewma.ts"),y=function(){function m(b,p,d){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=d,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new M.default(b),this.fast_=new M.default(p)}var S=m.prototype;return S.update=function(p,d){var t=this.slow_,l=this.fast_;this.slow_.halfLife!==p&&(this.slow_=new M.default(p,t.getEstimate(),t.getTotalWeight())),this.fast_.halfLife!==d&&(this.fast_=new M.default(d,l.getEstimate(),l.getTotalWeight()))},S.sample=function(p,d){p=Math.max(p,this.minDelayMs_);var t=8*d,l=p/1e3,r=t/l;this.fast_.sample(l,r),this.slow_.sample(l,r)},S.canEstimate=function(){var p=this.fast_;return p&&p.getTotalWeight()>=this.minWeight_},S.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},S.destroy=function(){},m}();v.default=y},"./src/utils/ewma.ts":function(N,v,O){"use strict";O.r(v);var M=function(){function y(S,b,p){b===void 0&&(b=0),p===void 0&&(p=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_=b,this.totalWeight_=p}var m=y.prototype;return m.sample=function(b,p){var d=Math.pow(this.alpha_,b);this.estimate_=p*(1-d)+d*this.estimate_,this.totalWeight_+=b},m.getTotalWeight=function(){return this.totalWeight_},m.getEstimate=function(){if(this.alpha_){var b=1-Math.pow(this.alpha_,this.totalWeight_);if(b)return this.estimate_/b}return this.estimate_},y}();v.default=M},"./src/utils/fetch-loader.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"fetchSupported",function(){return o});var M=O("./src/polyfills/number.ts"),y=O("./src/loader/load-stats.ts"),m=O("./src/demux/chunk-cache.ts");function S(f,w){f.prototype=Object.create(w.prototype),f.prototype.constructor=f,l(f,w)}function b(f){var w=typeof Map=="function"?new Map:void 0;return b=function(h){if(h===null||!t(h))return h;if(typeof h!="function")throw new TypeError("Super expression must either be null or a function");if(typeof w!="undefined"){if(w.has(h))return w.get(h);w.set(h,R)}function R(){return p(h,arguments,r(this).constructor)}return R.prototype=Object.create(h.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),l(R,h)},b(f)}function p(f,w,_){return d()?p=Reflect.construct:p=function(R,C,g){var x=[null];x.push.apply(x,C);var E=Function.bind.apply(R,x),T=new E;return g&&l(T,g.prototype),T},p.apply(null,arguments)}function d(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(f){return!1}}function t(f){return Function.toString.call(f).indexOf("[native code]")!==-1}function l(f,w){return l=Object.setPrototypeOf||function(h,R){return h.__proto__=R,h},l(f,w)}function r(f){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)},r(f)}function i(){return i=Object.assign||function(f){for(var w=1;w<arguments.length;w++){var _=arguments[w];for(var h in _)Object.prototype.hasOwnProperty.call(_,h)&&(f[h]=_[h])}return f},i.apply(this,arguments)}function o(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(f){}return!1}var s=function(){function f(_){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=_.fetchSetup||a,this.controller=new self.AbortController,this.stats=new y.LoadStats}var w=f.prototype;return w.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},w.abortInternal=function(){var h=this.response;(!h||!h.ok)&&(this.stats.aborted=!0,this.controller.abort())},w.abort=function(){var h;this.abortInternal(),(h=this.callbacks)!==null&&h!==void 0&&h.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},w.load=function(h,R,C){var g=this,x=this.stats;if(x.loading.start)throw new Error("Loader can only be used once.");x.loading.start=self.performance.now();var E=u(h,this.controller.signal),T=C.onProgress,k=h.responseType==="arraybuffer",L=k?"byteLength":"length";this.context=h,this.config=R,this.callbacks=C,this.request=this.fetchSetup(h,E),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){g.abortInternal(),C.onTimeout(x,h,g.response)},R.timeout),self.fetch(this.request).then(function(A){if(g.response=g.loader=A,!A.ok){var G=A.status,K=A.statusText;throw new c(K||"fetch, bad network response",G,A)}return x.loading.first=Math.max(self.performance.now(),x.loading.start),x.total=parseInt(A.headers.get("Content-Length")||"0"),T&&Object(M.isFiniteNumber)(R.highWaterMark)?g.loadProgressively(A,x,h,R.highWaterMark,T):k?A.arrayBuffer():A.text()}).then(function(A){var G=g.response;self.clearTimeout(g.requestTimeout),x.loading.end=Math.max(self.performance.now(),x.loading.first),x.loaded=x.total=A[L];var K={url:G.url,data:A};T&&!Object(M.isFiniteNumber)(R.highWaterMark)&&T(x,h,A,G),C.onSuccess(K,x,h,G)}).catch(function(A){if(self.clearTimeout(g.requestTimeout),x.aborted)return;var G=A.code||0;C.onError({code:G,text:A.message},h,A.details)})},w.getCacheAge=function(){var h=null;if(this.response){var R=this.response.headers.get("age");h=R?parseFloat(R):null}return h},w.loadProgressively=function(h,R,C,g,x){g===void 0&&(g=0);var E=new m.default,T=h.body.getReader(),k=function L(){return T.read().then(function(A){if(A.done)return E.dataLength&&x(R,C,E.flush(),h),Promise.resolve(new ArrayBuffer(0));var G=A.value,K=G.length;return R.loaded+=K,K<g||E.dataLength?(E.push(G),E.dataLength>=g&&x(R,C,E.flush(),h)):x(R,C,G,h),L()}).catch(function(){return Promise.reject()})};return k()},f}();function u(f,w){var _={method:"GET",mode:"cors",credentials:"same-origin",signal:w,headers:new self.Headers(i({},f.headers))};return f.rangeEnd&&_.headers.set("Range","bytes="+f.rangeStart+"-"+String(f.rangeEnd-1)),_}function a(f,w){return new self.Request(f.url,w)}var c=function(f){S(w,f);function w(_,h,R){var C;return C=f.call(this,_)||this,C.code=void 0,C.details=void 0,C.code=h,C.details=R,C}return w}(b(Error));v.default=s},"./src/utils/imsc1-ttml-parser.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"IMSC1_CODEC",function(){return t}),O.d(v,"parseIMSC1",function(){return o});var M=O("./src/utils/mp4-tools.ts"),y=O("./src/utils/vttparser.ts"),m=O("./src/utils/vttcue.ts"),S=O("./src/demux/id3.ts"),b=O("./src/utils/timescale-conversion.ts"),p=O("./src/utils/webvtt-parser.ts");function d(){return d=Object.assign||function(g){for(var x=1;x<arguments.length;x++){var E=arguments[x];for(var T in E)Object.prototype.hasOwnProperty.call(E,T)&&(g[T]=E[T])}return g},d.apply(this,arguments)}var t="stpp.ttml.im1t",l=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,r=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,i={left:"start",center:"center",right:"end",start:"start",end:"end"};function o(g,x,E,T,k){var L=Object(M.findBox)(new Uint8Array(g),["mdat"]);if(L.length===0){k(new Error("Could not parse IMSC1 mdat"));return}var A=L[0],G=Object(S.utf8ArrayToStr)(new Uint8Array(g,A.start,A.end-A.start)),K=Object(b.toTimescaleFromScale)(x,1,E);try{T(s(G,K))}catch(W){k(W)}}function s(g,x){var E=new DOMParser,T=E.parseFromString(g,"text/xml"),k=T.getElementsByTagName("tt")[0];if(!k)throw new Error("Invalid ttml");var L={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},A=Object.keys(L).reduce(function(U,P){return U[P]=k.getAttribute("ttp:"+P)||L[P],U},{}),G=k.getAttribute("xml:space")!=="preserve",K=a(u(k,"styling","style")),W=a(u(k,"layout","region")),z=u(k,"body","[begin]");return[].map.call(z,function(U){var P=c(U,G);if(!P||!U.hasAttribute("begin"))return null;var H=h(U.getAttribute("begin"),A),V=h(U.getAttribute("dur"),A),q=h(U.getAttribute("end"),A);if(H===null)throw _(U);if(q===null){if(V===null)throw _(U);q=H+V}var Z=new m.default(H-x,q-x,P);Z.id=Object(p.generateCueId)(Z.startTime,Z.endTime,Z.text);var ce=W[U.getAttribute("region")],he=K[U.getAttribute("style")];Z.position=10,Z.size=80;var ae=f(ce,he),xe=ae.textAlign;if(xe){var ge=i[xe];ge&&(Z.lineAlign=ge),Z.align=xe}return d(Z,ae),Z}).filter(function(U){return U!==null})}function u(g,x,E){var T=g.getElementsByTagName(x)[0];return T?[].slice.call(T.querySelectorAll(E)):[]}function a(g){return g.reduce(function(x,E){var T=E.getAttribute("xml:id");return T&&(x[T]=E),x},{})}function c(g,x){return[].slice.call(g.childNodes).reduce(function(E,T,k){var L;return T.nodeName==="br"&&k?E+`
`:(L=T.childNodes)!==null&&L!==void 0&&L.length?c(T,x):x?E+T.textContent.trim().replace(/\s+/g," "):E+T.textContent},"")}function f(g,x){var E="http://www.w3.org/ns/ttml#styling",T=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return T.reduce(function(k,L){var A=w(x,E,L)||w(g,E,L);return A&&(k[L]=A),k},{})}function w(g,x,E){return g.hasAttributeNS(x,E)?g.getAttributeNS(x,E):null}function _(g){return new Error("Could not parse ttml timestamp "+g)}function h(g,x){if(!g)return null;var E=Object(y.parseTimeStamp)(g);return E===null&&(l.test(g)?E=R(g,x):r.test(g)&&(E=C(g,x))),E}function R(g,x){var E=l.exec(g),T=(E[4]|0)+(E[5]|0)/x.subFrameRate;return(E[1]|0)*3600+(E[2]|0)*60+(E[3]|0)+T/x.frameRate}function C(g,x){var E=r.exec(g),T=Number(E[1]),k=E[2];switch(k){case"h":return T*3600;case"m":return T*60;case"ms":return T*1e3;case"f":return T/x.frameRate;case"t":return T/x.tickRate}return T}},"./src/utils/logger.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"enableLogs",function(){return p}),O.d(v,"logger",function(){return d});var M=function(){},y={trace:M,debug:M,log:M,warn:M,info:M,error:M},m=y;function S(t){var l=self.console[t];return l?l.bind(self.console,"["+t+"] >"):M}function b(t){for(var l=arguments.length,r=new Array(l>1?l-1:0),i=1;i<l;i++)r[i-1]=arguments[i];r.forEach(function(o){m[o]=t[o]?t[o].bind(t):S(o)})}function p(t){if(self.console&&t===!0||typeof t=="object"){b(t,"debug","log","info","warn","error");try{m.log()}catch(l){m=y}}else m=y}var d=m},"./src/utils/mediakeys-helper.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"KeySystems",function(){return M}),O.d(v,"requestMediaKeySystemAccess",function(){return y});var M;(function(m){m.WIDEVINE="com.widevine.alpha",m.PLAYREADY="com.microsoft.playready"})(M||(M={}));var y=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"getMediaSource",function(){return M});function M(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"bin2str",function(){return b}),O.d(v,"readUint16",function(){return p}),O.d(v,"readUint32",function(){return d}),O.d(v,"writeUint32",function(){return t}),O.d(v,"findBox",function(){return l}),O.d(v,"parseSegmentIndex",function(){return r}),O.d(v,"parseInitSegment",function(){return i}),O.d(v,"getStartDTS",function(){return o}),O.d(v,"getDuration",function(){return s}),O.d(v,"computeRawDurationFromSamples",function(){return u}),O.d(v,"offsetStartDTS",function(){return a}),O.d(v,"segmentValidRange",function(){return c}),O.d(v,"appendUint8Array",function(){return f});var M=O("./src/utils/typed-array.ts"),y=O("./src/loader/fragment.ts"),m=Math.pow(2,32)-1,S=[].push;function b(w){return String.fromCharCode.apply(null,w)}function p(w,_){"data"in w&&(_+=w.start,w=w.data);var h=w[_]<<8|w[_+1];return h<0?65536+h:h}function d(w,_){"data"in w&&(_+=w.start,w=w.data);var h=w[_]<<24|w[_+1]<<16|w[_+2]<<8|w[_+3];return h<0?4294967296+h:h}function t(w,_,h){"data"in w&&(_+=w.start,w=w.data),w[_]=h>>24,w[_+1]=h>>16&255,w[_+2]=h>>8&255,w[_+3]=h&255}function l(w,_){var h=[];if(!_.length)return h;var R,C,g;"data"in w?(R=w.data,C=w.start,g=w.end):(R=w,C=0,g=R.byteLength);for(var x=C;x<g;){var E=d(R,x),T=b(R.subarray(x+4,x+8)),k=E>1?x+E:g;if(T===_[0])if(_.length===1)h.push({data:R,start:x+8,end:k});else{var L=l({data:R,start:x+8,end:k},_.slice(1));L.length&&S.apply(h,L)}x=k}return h}function r(w){var _=l(w,["moov"]),h=_[0],R=h?h.end:null,C=l(w,["sidx"]);if(!C||!C[0])return null;var g=[],x=C[0],E=x.data[0],T=E===0?8:16,k=d(x,T);T+=4;var L=0,A=0;E===0?T+=8:T+=16,T+=2;var G=x.end+A,K=p(x,T);T+=2;for(var W=0;W<K;W++){var z=T,U=d(x,z);z+=4;var P=U&2147483647,H=(U&2147483648)>>>31;if(H===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var V=d(x,z);z+=4,g.push({referenceSize:P,subsegmentDuration:V,info:{duration:V/k,start:G,end:G+P-1}}),G+=P,z+=4,T=z}return{earliestPresentationTime:L,timescale:k,version:E,referencesCount:K,references:g,moovEndOffset:R}}function i(w){for(var _=[],h=l(w,["moov","trak"]),R=0;R<h.length;R++){var C=h[R],g=l(C,["tkhd"])[0];if(g){var x=g.data[g.start],E=x===0?12:20,T=d(g,E),k=l(C,["mdia","mdhd"])[0];if(k){x=k.data[k.start],E=x===0?12:20;var L=d(k,E),A=l(C,["mdia","hdlr"])[0];if(A){var G=b(A.data.subarray(A.start+8,A.start+12)),K={soun:y.ElementaryStreamTypes.AUDIO,vide:y.ElementaryStreamTypes.VIDEO}[G];if(K){var W=l(C,["mdia","minf","stbl","stsd"])[0],z=void 0;W&&(z=b(W.data.subarray(W.start+12,W.start+16))),_[T]={timescale:L,type:K},_[K]={timescale:L,id:T,codec:z}}}}}}var U=l(w,["moov","mvex","trex"]);return U.forEach(function(P){var H=d(P,4),V=_[H];V&&(V.default={duration:d(P,12),flags:d(P,20)})}),_}function o(w,_){return l(_,["moof","traf"]).reduce(function(h,R){var C=l(R,["tfdt"])[0],g=C.data[C.start],x=l(R,["tfhd"]).reduce(function(E,T){var k=d(T,4),L=w[k];if(L){var A=d(C,4);g===1&&(A*=Math.pow(2,32),A+=d(C,8));var G=L.timescale||9e4,K=A/G;if(isFinite(K)&&(E===null||K<E))return K}return E},null);return x!==null&&isFinite(x)&&(h===null||x<h)?x:h},null)||0}function s(w,_){for(var h=0,R=0,C=0,g=l(w,["moof","traf"]),x=0;x<g.length;x++){var E=g[x],T=l(E,["tfhd"])[0],k=d(T,4),L=_[k];if(!L)continue;var A=L.default,G=d(T,0)|(A==null?void 0:A.flags),K=A==null?void 0:A.duration;G&8&&(G&2?K=d(T,12):K=d(T,8));for(var W=L.timescale||9e4,z=l(E,["trun"]),U=0;U<z.length;U++){if(K){var P=d(z[U],4);h=K*P}else h=u(z[U]);L.type===y.ElementaryStreamTypes.VIDEO?R+=h/W:L.type===y.ElementaryStreamTypes.AUDIO&&(C+=h/W)}}if(R===0&&C===0){var H=r(w);if(H!=null&&H.references)return H.references.reduce(function(V,q){return V+q.info.duration||0},0)}return R||C}function u(w){var _=d(w,0),h=8;_&1&&(h+=4),_&4&&(h+=4);for(var R=0,C=d(w,4),g=0;g<C;g++){if(_&256){var x=d(w,h);R+=x,h+=4}_&512&&(h+=4),_&1024&&(h+=4),_&2048&&(h+=4)}return R}function a(w,_,h){l(_,["moof","traf"]).forEach(function(R){l(R,["tfhd"]).forEach(function(C){var g=d(C,4),x=w[g];if(!x)return;var E=x.timescale||9e4;l(R,["tfdt"]).forEach(function(T){var k=T.data[T.start],L=d(T,4);if(k===0)t(T,4,L-h*E);else{L*=Math.pow(2,32),L+=d(T,8),L-=h*E,L=Math.max(L,0);var A=Math.floor(L/(m+1)),G=Math.floor(L%(m+1));t(T,4,A),t(T,8,G)}})})})}function c(w){var _={valid:null,remainder:null},h=l(w,["moof"]);if(h){if(h.length<2)return _.remainder=w,_}else return _;var R=h[h.length-1];return _.valid=Object(M.sliceUint8)(w,0,R.start-8),_.remainder=Object(M.sliceUint8)(w,R.start-8),_}function f(w,_){var h=new Uint8Array(w.length+_.length);return h.set(w),h.set(_,w.length),h}},"./src/utils/output-filter.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"default",function(){return M});var M=function(){function y(S,b){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=S,this.trackName=b}var m=y.prototype;return m.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},m.newCue=function(b,p,d){(this.startTime===null||this.startTime>b)&&(this.startTime=b),this.endTime=p,this.screen=d,this.timelineController.createCaptionsTrack(this.trackName)},m.reset=function(){this.cueRanges=[]},y}()},"./src/utils/texttrack-utils.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"sendAddTrackEvent",function(){return y}),O.d(v,"addCueToTrack",function(){return m}),O.d(v,"clearCurrentCues",function(){return S}),O.d(v,"removeCuesInRange",function(){return b}),O.d(v,"getCuesInRange",function(){return d});var M=O("./src/utils/logger.ts");function y(t,l){var r;try{r=new Event("addtrack")}catch(i){r=document.createEvent("Event"),r.initEvent("addtrack",!1,!1)}r.track=t,l.dispatchEvent(r)}function m(t,l){var r=t.mode;if(r==="disabled"&&(t.mode="hidden"),t.cues&&!t.cues.getCueById(l.id))try{if(t.addCue(l),!t.cues.getCueById(l.id))throw new Error("addCue is failed for: "+l)}catch(o){M.logger.debug("[texttrack-utils]: "+o);var i=new self.TextTrackCue(l.startTime,l.endTime,l.text);i.id=l.id,t.addCue(i)}r==="disabled"&&(t.mode=r)}function S(t){var l=t.mode;if(l==="disabled"&&(t.mode="hidden"),t.cues)for(var r=t.cues.length;r--;)t.removeCue(t.cues[r]);l==="disabled"&&(t.mode=l)}function b(t,l,r){var i=t.mode;if(i==="disabled"&&(t.mode="hidden"),t.cues&&t.cues.length>0)for(var o=d(t.cues,l,r),s=0;s<o.length;s++)t.removeCue(o[s]);i==="disabled"&&(t.mode=i)}function p(t,l){if(l<t[0].startTime)return 0;var r=t.length-1;if(l>t[r].endTime)return-1;for(var i=0,o=r;i<=o;){var s=Math.floor((o+i)/2);if(l<t[s].startTime)o=s-1;else if(l>t[s].startTime&&i<r)i=s+1;else return s}return t[i].startTime-l<l-t[o].startTime?i:o}function d(t,l,r){var i=[],o=p(t,l);if(o>-1)for(var s=o,u=t.length;s<u;s++){var a=t[s];if(a.startTime>=l&&a.endTime<=r)i.push(a);else if(a.startTime>r)return i}return i}},"./src/utils/time-ranges.ts":function(N,v,O){"use strict";O.r(v);var M={toString:function(m){for(var S="",b=m.length,p=0;p<b;p++)S+="["+m.start(p).toFixed(3)+","+m.end(p).toFixed(3)+"]";return S}};v.default=M},"./src/utils/timescale-conversion.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"toTimescaleFromBase",function(){return y}),O.d(v,"toTimescaleFromScale",function(){return m}),O.d(v,"toMsFromMpegTsClock",function(){return S}),O.d(v,"toMpegTsClockFromTimescale",function(){return b});var M=9e4;function y(p,d,t,l){t===void 0&&(t=1),l===void 0&&(l=!1);var r=p*d*t;return l?Math.round(r):r}function m(p,d,t,l){return t===void 0&&(t=1),l===void 0&&(l=!1),y(p,d,1/t,l)}function S(p,d){return d===void 0&&(d=!1),y(p,1e3,1/M,d)}function b(p,d){return d===void 0&&(d=1),y(p,M,1/d)}},"./src/utils/typed-array.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"sliceUint8",function(){return M});function M(y,m,S){return Uint8Array.prototype.slice?y.slice(m,S):new Uint8Array(Array.prototype.slice.call(y,m,S))}},"./src/utils/vttcue.ts":function(N,v,O){"use strict";O.r(v),v.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var M=["","lr","rl"],y=["start","middle","end","left","right"];function m(t,l){if(typeof l!="string")return!1;if(!Array.isArray(t))return!1;var r=l.toLowerCase();return~t.indexOf(r)?r:!1}function S(t){return m(M,t)}function b(t){return m(y,t)}function p(t){for(var l=arguments.length,r=new Array(l>1?l-1:0),i=1;i<l;i++)r[i-1]=arguments[i];for(var o=1;o<arguments.length;o++){var s=arguments[o];for(var u in s)t[u]=s[u]}return t}function d(t,l,r){var i=this,o={enumerable:!0};i.hasBeenReset=!1;var s="",u=!1,a=t,c=l,f=r,w=null,_="",h=!0,R="auto",C="start",g=50,x="middle",E=50,T="middle";Object.defineProperty(i,"id",p({},o,{get:function(){return s},set:function(L){s=""+L}})),Object.defineProperty(i,"pauseOnExit",p({},o,{get:function(){return u},set:function(L){u=!!L}})),Object.defineProperty(i,"startTime",p({},o,{get:function(){return a},set:function(L){if(typeof L!="number")throw new TypeError("Start time must be set to a number.");a=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"endTime",p({},o,{get:function(){return c},set:function(L){if(typeof L!="number")throw new TypeError("End time must be set to a number.");c=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"text",p({},o,{get:function(){return f},set:function(L){f=""+L,this.hasBeenReset=!0}})),Object.defineProperty(i,"region",p({},o,{get:function(){return w},set:function(L){w=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"vertical",p({},o,{get:function(){return _},set:function(L){var A=S(L);if(A===!1)throw new SyntaxError("An invalid or illegal string was specified.");_=A,this.hasBeenReset=!0}})),Object.defineProperty(i,"snapToLines",p({},o,{get:function(){return h},set:function(L){h=!!L,this.hasBeenReset=!0}})),Object.defineProperty(i,"line",p({},o,{get:function(){return R},set:function(L){if(typeof L!="number"&&L!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");R=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"lineAlign",p({},o,{get:function(){return C},set:function(L){var A=b(L);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");C=A,this.hasBeenReset=!0}})),Object.defineProperty(i,"position",p({},o,{get:function(){return g},set:function(L){if(L<0||L>100)throw new Error("Position must be between 0 and 100.");g=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"positionAlign",p({},o,{get:function(){return x},set:function(L){var A=b(L);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");x=A,this.hasBeenReset=!0}})),Object.defineProperty(i,"size",p({},o,{get:function(){return E},set:function(L){if(L<0||L>100)throw new Error("Size must be between 0 and 100.");E=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"align",p({},o,{get:function(){return T},set:function(L){var A=b(L);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");T=A,this.hasBeenReset=!0}})),i.displayState=void 0}return d.prototype.getCueAsHTML=function(){var t=self.WebVTT;return t.convertCueToDOMTree(self,this.text)},d}()},"./src/utils/vttparser.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"parseTimeStamp",function(){return m}),O.d(v,"fixLineBreaks",function(){return l}),O.d(v,"VTTParser",function(){return r});var M=O("./src/utils/vttcue.ts"),y=function(){function i(){}var o=i.prototype;return o.decode=function(u,a){if(!u)return"";if(typeof u!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(u))},i}();function m(i){function o(u,a,c,f){return(u|0)*3600+(a|0)*60+(c|0)+parseFloat(f||0)}var s=i.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return s?parseFloat(s[2])>59?o(s[2],s[3],0,s[4]):o(s[1],s[2],s[3],s[4]):null}var S=function(){function i(){this.values=Object.create(null)}var o=i.prototype;return o.set=function(u,a){!this.get(u)&&a!==""&&(this.values[u]=a)},o.get=function(u,a,c){return c?this.has(u)?this.values[u]:a[c]:this.has(u)?this.values[u]:a},o.has=function(u){return u in this.values},o.alt=function(u,a,c){for(var f=0;f<c.length;++f)if(a===c[f]){this.set(u,a);break}},o.integer=function(u,a){/^-?\d+$/.test(a)&&this.set(u,parseInt(a,10))},o.percent=function(u,a){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(a)){var c=parseFloat(a);if(c>=0&&c<=100)return this.set(u,c),!0}return!1},i}();function b(i,o,s,u){var a=u?i.split(u):[i];for(var c in a){if(typeof a[c]!="string")continue;var f=a[c].split(s);if(f.length!==2)continue;var w=f[0],_=f[1];o(w,_)}}var p=new M.default(0,0,""),d=p.align==="middle"?"middle":"center";function t(i,o,s){var u=i;function a(){var w=m(i);if(w===null)throw new Error("Malformed timestamp: "+u);return i=i.replace(/^[^\sa-zA-Z-]+/,""),w}function c(w,_){var h=new S;b(w,function(g,x){var E;switch(g){case"region":for(var T=s.length-1;T>=0;T--)if(s[T].id===x){h.set(g,s[T].region);break}break;case"vertical":h.alt(g,x,["rl","lr"]);break;case"line":E=x.split(","),h.integer(g,E[0]),h.percent(g,E[0])&&h.set("snapToLines",!1),h.alt(g,E[0],["auto"]),E.length===2&&h.alt("lineAlign",E[1],["start",d,"end"]);break;case"position":E=x.split(","),h.percent(g,E[0]),E.length===2&&h.alt("positionAlign",E[1],["start",d,"end","line-left","line-right","auto"]);break;case"size":h.percent(g,x);break;case"align":h.alt(g,x,["start",d,"end","left","right"]);break}},/:/,/\s/),_.region=h.get("region",null),_.vertical=h.get("vertical","");var R=h.get("line","auto");R==="auto"&&p.line===-1&&(R=-1),_.line=R,_.lineAlign=h.get("lineAlign","start"),_.snapToLines=h.get("snapToLines",!0),_.size=h.get("size",100),_.align=h.get("align",d);var C=h.get("position","auto");C==="auto"&&p.position===50&&(C=_.align==="start"||_.align==="left"?0:_.align==="end"||_.align==="right"?100:50),_.position=C}function f(){i=i.replace(/^\s+/,"")}if(f(),o.startTime=a(),f(),i.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+u);i=i.substr(3),f(),o.endTime=a(),f(),c(i,o)}function l(i){return i.replace(/<br(?: \/)?>/gi,`
`)}var r=function(){function i(){this.state="INITIAL",this.buffer="",this.decoder=new y,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var o=i.prototype;return o.parse=function(u){var a=this;u&&(a.buffer+=a.decoder.decode(u,{stream:!0}));function c(){var C=a.buffer,g=0;for(C=l(C);g<C.length&&C[g]!=="\r"&&C[g]!==`
`;)++g;var x=C.substr(0,g);return C[g]==="\r"&&++g,C[g]===`
`&&++g,a.buffer=C.substr(g),x}function f(C){b(C,function(g,x){},/:/)}try{var w="";if(a.state==="INITIAL"){if(!/\r\n|\n/.test(a.buffer))return this;w=c();var _=w.match(/^()?WEBVTT([ \t].*)?$/);if(!_||!_[0])throw new Error("Malformed WebVTT signature.");a.state="HEADER"}for(var h=!1;a.buffer;){if(!/\r\n|\n/.test(a.buffer))return this;h?h=!1:w=c();switch(a.state){case"HEADER":/:/.test(w)?f(w):w||(a.state="ID");continue;case"NOTE":w||(a.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(w)){a.state="NOTE";break}if(!w)continue;if(a.cue=new M.default(0,0,""),a.state="CUE",w.indexOf("-->")===-1){a.cue.id=w;continue}case"CUE":if(!a.cue){a.state="BADCUE";continue}try{t(w,a.cue,a.regionList)}catch(C){a.cue=null,a.state="BADCUE";continue}a.state="CUETEXT";continue;case"CUETEXT":{var R=w.indexOf("-->")!==-1;if(!w||R&&(h=!0)){a.oncue&&a.cue&&a.oncue(a.cue),a.cue=null,a.state="ID";continue}if(a.cue===null)continue;a.cue.text&&(a.cue.text+=`
`),a.cue.text+=w}continue;case"BADCUE":w||(a.state="ID")}}}catch(C){a.state==="CUETEXT"&&a.cue&&a.oncue&&a.oncue(a.cue),a.cue=null,a.state=a.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},o.flush=function(){var u=this;try{if((u.cue||u.state==="HEADER")&&(u.buffer+=`
`,u.parse()),u.state==="INITIAL"||u.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(a){u.onparsingerror&&u.onparsingerror(a)}return u.onflush&&u.onflush(),this},i}()},"./src/utils/webvtt-parser.ts":function(N,v,O){"use strict";O.r(v),O.d(v,"generateCueId",function(){return r}),O.d(v,"parseWebVTT",function(){return o});var M=O("./src/polyfills/number.ts"),y=O("./src/utils/vttparser.ts"),m=O("./src/demux/id3.ts"),S=O("./src/utils/timescale-conversion.ts"),b=O("./src/remux/mp4-remuxer.ts"),p=/\r\n|\n\r|\n|\r/g,d=function(u,a,c){return c===void 0&&(c=0),u.substr(c,a.length)===a},t=function(u){var a=parseInt(u.substr(-3)),c=parseInt(u.substr(-6,2)),f=parseInt(u.substr(-9,2)),w=u.length>9?parseInt(u.substr(0,u.indexOf(":"))):0;if(!Object(M.isFiniteNumber)(a)||!Object(M.isFiniteNumber)(c)||!Object(M.isFiniteNumber)(f)||!Object(M.isFiniteNumber)(w))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+u);return a+=1e3*c,a+=60*1e3*f,a+=60*60*1e3*w,a},l=function(u){for(var a=5381,c=u.length;c;)a=a*33^u.charCodeAt(--c);return(a>>>0).toString()};function r(s,u,a){return l(s.toString())+l(u.toString())+l(a)}var i=function(u,a,c){var f=u[a],w=u[f.prevCC];if(!w||!w.new&&f.new){u.ccOffset=u.presentationOffset=f.start,f.new=!1;return}for(;(_=w)!==null&&_!==void 0&&_.new;){var _;u.ccOffset+=f.start-w.start,f.new=!1,f=w,w=u[f.prevCC]}u.presentationOffset=c};function o(s,u,a,c,f,w,_,h){var R=new y.VTTParser,C=Object(m.utf8ArrayToStr)(new Uint8Array(s)).trim().replace(p,`
`).split(`
`),g=[],x=Object(S.toMpegTsClockFromTimescale)(u,a),E="00:00.000",T=0,k=0,L,A=!0,G=!1;R.oncue=function(K){var W=c[f],z=c.ccOffset,U=(T-x)/9e4;if(W!=null&&W.new&&(k!==void 0?z=c.ccOffset=W.start:i(c,f,U)),U&&(z=U-c.presentationOffset),G){var P=K.endTime-K.startTime,H=Object(b.normalizePts)((K.startTime+z-k)*9e4,w*9e4)/9e4;K.startTime=H,K.endTime=H+P}var V=K.text.trim();K.text=decodeURIComponent(encodeURIComponent(V)),K.id||(K.id=r(K.startTime,K.endTime,V)),K.endTime>0&&g.push(K)},R.onparsingerror=function(K){L=K},R.onflush=function(){if(L){h(L);return}_(g)},C.forEach(function(K){if(A)if(d(K,"X-TIMESTAMP-MAP=")){A=!1,G=!0,K.substr(16).split(",").forEach(function(W){d(W,"LOCAL:")?E=W.substr(6):d(W,"MPEGTS:")&&(T=parseInt(W.substr(7)))});try{k=t(E)/1e3}catch(W){G=!1,L=W}return}else K===""&&(A=!1);R.parse(K+`
`)}),R.flush()}},"./src/utils/xhr-loader.ts":function(N,v,O){"use strict";O.r(v);var M=O("./src/utils/logger.ts"),y=O("./src/loader/load-stats.ts"),m=/^age:\s*[\d.]+\s*$/m,S=function(){function b(d){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=d?d.xhrSetup:null,this.stats=new y.LoadStats,this.retryDelay=0}var p=b.prototype;return p.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},p.abortInternal=function(){var t=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),t&&(t.onreadystatechange=null,t.onprogress=null,t.readyState!==4&&(this.stats.aborted=!0,t.abort()))},p.abort=function(){var t;this.abortInternal(),(t=this.callbacks)!==null&&t!==void 0&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},p.load=function(t,l,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=t,this.config=l,this.callbacks=r,this.retryDelay=l.retryDelay,this.loadInternal()},p.loadInternal=function(){var t=this.config,l=this.context;if(!t)return;var r=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0;var o=this.xhrSetup;try{if(o)try{o(r,l.url)}catch(a){r.open("GET",l.url,!0),o(r,l.url)}r.readyState||r.open("GET",l.url,!0);var s=this.context.headers;if(s)for(var u in s)r.setRequestHeader(u,s[u])}catch(a){this.callbacks.onError({code:r.status,text:a.message},l,r);return}l.rangeEnd&&r.setRequestHeader("Range","bytes="+l.rangeStart+"-"+(l.rangeEnd-1)),r.onreadystatechange=this.readystatechange.bind(this),r.onprogress=this.loadprogress.bind(this),r.responseType=l.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),t.timeout),r.send()},p.readystatechange=function(){var t=this.context,l=this.loader,r=this.stats;if(!t||!l)return;var i=l.readyState,o=this.config;if(r.aborted)return;if(i>=2)if(self.clearTimeout(this.requestTimeout),r.loading.first===0&&(r.loading.first=Math.max(self.performance.now(),r.loading.start)),i===4){l.onreadystatechange=null,l.onprogress=null;var s=l.status;if(s>=200&&s<300){r.loading.end=Math.max(self.performance.now(),r.loading.first);var u,a;if(t.responseType==="arraybuffer"?(u=l.response,a=u.byteLength):(u=l.responseText,a=u.length),r.loaded=r.total=a,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(r,t,u,l),!this.callbacks)return;var f={url:l.responseURL,data:u};this.callbacks.onSuccess(f,r,t,l)}else r.retry>=o.maxRetry||s>=400&&s<499?(M.logger.error(s+" while loading "+t.url),this.callbacks.onError({code:s,text:l.statusText},t,l)):(M.logger.warn(s+" while loading "+t.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,o.maxRetryDelay),r.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.timeout)},p.loadtimeout=function(){M.logger.warn("timeout while loading "+this.context.url);var t=this.callbacks;t&&(this.abortInternal(),t.onTimeout(this.stats,this.context,this.loader))},p.loadprogress=function(t){var l=this.stats;l.loaded=t.loaded,t.lengthComputable&&(l.total=t.total)},p.getCacheAge=function(){var t=null;if(this.loader&&m.test(this.loader.getAllResponseHeaders())){var l=this.loader.getResponseHeader("age");t=l?parseFloat(l):null}return t},b}();v.default=S}}).default})},vHTk:function(F,$,j){F.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.StreamCipher,y=v.algo,m=y.RC4=M.extend({_doReset:function(){for(var p=this._key,d=p.words,t=p.sigBytes,l=this._S=[],r=0;r<256;r++)l[r]=r;for(var r=0,i=0;r<256;r++){var o=r%t,s=d[o>>>2]>>>24-o%4*8&255;i=(i+l[r]+s)%256;var u=l[r];l[r]=l[i],l[i]=u}this._i=this._j=0},_doProcessBlock:function(p,d){p[d]^=S.call(this)},keySize:256/32,ivSize:0});function S(){for(var p=this._S,d=this._i,t=this._j,l=0,r=0;r<4;r++){d=(d+1)%256,t=(t+p[d])%256;var i=p[d];p[d]=p[t],p[t]=i,l|=p[(p[d]+p[t])%256]<<24-r*8}return this._i=d,this._j=t,l}v.RC4=M._createHelper(m);var b=y.RC4Drop=m.extend({cfg:m.cfg.extend({drop:192}),_doReset:function(){m._doReset.call(this);for(var p=this.cfg.drop;p>0;p--)S.call(this)}});v.RC4Drop=M._createHelper(b)}(),N.RC4})},wCXF:function(F,$,j){"use strict";j.d($,"a",function(){return qe});var N=j("rePB"),v=j("VTBJ"),O=j("KQm4"),M=j("U8pU"),y=j("ODXe"),m=j("cDcd"),S=j("TSYQ"),b=j.n(S),p=j("Gytx"),d=j.n(p),t=j("Kwbf"),l=j("t23M"),r=j("qx4F"),i=j("6eGT"),o=j("IBYe"),s=j("Ff2n"),u=j("c+Xe"),a=j("fyJ8"),c=j("biw7");function f(Le,Oe,Ve,Ze,Ne){var Ge=Ve[Le]||{},De=Ve[Oe]||{},we,Ae;Ge.fixed==="left"?we=Ze.left[Le]:De.fixed==="right"&&(Ae=Ze.right[Oe]);var de=!1,_e=!1,Se=!1,Ie=!1,ke=Ve[Oe+1],Ye=Ve[Le-1];if(Ne==="rtl"){if(we!==void 0){var nt=Ye&&Ye.fixed==="left";Ie=!nt}else if(Ae!==void 0){var lt=ke&&ke.fixed==="right";Se=!lt}}else if(we!==void 0){var at=ke&&ke.fixed==="left";de=!at}else if(Ae!==void 0){var ot=Ye&&Ye.fixed==="right";_e=!ot}return{fixLeft:we,fixRight:Ae,lastFixLeft:de,firstFixRight:_e,lastFixRight:Se,firstFixLeft:Ie,isSticky:Ze.isSticky}}var w=j("sR1s");function _(Le){var Oe=Le.cells,Ve=Le.stickyOffsets,Ze=Le.flattenColumns,Ne=Le.rowComponent,Ge=Le.cellComponent,De=Le.onHeaderRow,we=Le.index,Ae=m.useContext(c.a),de=Ae.prefixCls,_e=Ae.direction,Se;De&&(Se=De(Oe.map(function(ke){return ke.column}),we));var Ie=Object(w.a)(Oe.map(function(ke){return ke.column}));return m.createElement(Ne,Object.assign({},Se),Oe.map(function(ke,Ye){var nt=ke.column,lt=f(ke.colStart,ke.colEnd,Ze,Ve,_e),at;return nt&&nt.onHeaderCell&&(at=ke.column.onHeaderCell(nt)),m.createElement(a.a,Object.assign({},ke,{ellipsis:nt.ellipsis,align:nt.align,component:Ge,prefixCls:de,key:Ie[Ye]},lt,{additionalProps:at,rowType:"header"}))}))}_.displayName="HeaderRow";var h=_;function R(Le){var Oe=[];function Ve(De,we){var Ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Oe[Ae]=Oe[Ae]||[];var de=we,_e=De.filter(Boolean).map(function(Se){var Ie={key:Se.key,className:Se.className||"",children:Se.title,column:Se,colStart:de},ke=1,Ye=Se.children;return Ye&&Ye.length>0&&(ke=Ve(Ye,de,Ae+1).reduce(function(nt,lt){return nt+lt},0),Ie.hasSubColumns=!0),"colSpan"in Se&&(ke=Se.colSpan),"rowSpan"in Se&&(Ie.rowSpan=Se.rowSpan),Ie.colSpan=ke,Ie.colEnd=Ie.colStart+ke-1,Oe[Ae].push(Ie),de+=ke,ke});return _e}Ve(Le,0);for(var Ze=Oe.length,Ne=function(we){Oe[we].forEach(function(Ae){!("rowSpan"in Ae)&&!Ae.hasSubColumns&&(Ae.rowSpan=Ze-we)})},Ge=0;Ge<Ze;Ge+=1)Ne(Ge);return Oe}function C(Le){var Oe=Le.stickyOffsets,Ve=Le.columns,Ze=Le.flattenColumns,Ne=Le.onHeaderRow,Ge=m.useContext(c.a),De=Ge.prefixCls,we=Ge.getComponent,Ae=m.useMemo(function(){return R(Ve)},[Ve]),de=we(["header","wrapper"],"thead"),_e=we(["header","row"],"tr"),Se=we(["header","cell"],"th");return m.createElement(de,{className:"".concat(De,"-thead")},Ae.map(function(Ie,ke){var Ye=m.createElement(h,{key:ke,flattenColumns:Ze,cells:Ie,stickyOffsets:Oe,rowComponent:_e,cellComponent:Se,onHeaderRow:Ne,index:ke});return Ye}))}var g=C,x=j("hW8S");function E(Le){for(var Oe=Le.colWidths,Ve=Le.columns,Ze=Le.columCount,Ne=[],Ge=Ze||Ve.length,De=!1,we=Ge-1;we>=0;we-=1){var Ae=Oe[we],de=Ve&&Ve[we],_e=de&&de[x.a];(Ae||_e||De)&&(Ne.unshift(m.createElement("col",Object.assign({key:we,style:{width:Ae,minWidth:Ae}},_e))),De=!0)}return m.createElement("colgroup",null,Ne)}var T=E;function k(Le,Oe){return Object(m.useMemo)(function(){for(var Ve=[],Ze=0;Ze<Oe;Ze+=1){var Ne=Le[Ze];if(Ne!==void 0)Ve[Ze]=Ne;else return null}return Ve},[Le.join("_"),Oe])}var L=m.forwardRef(function(Le,Oe){var Ve=Le.noData,Ze=Le.columns,Ne=Le.flattenColumns,Ge=Le.colWidths,De=Le.columCount,we=Le.stickyOffsets,Ae=Le.direction,de=Le.fixHeader,_e=Le.offsetHeader,Se=Le.stickyClassName,Ie=Le.onScroll,ke=Object(s.a)(Le,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Ye=m.useContext(c.a),nt=Ye.prefixCls,lt=Ye.scrollbarSize,at=Ye.isSticky,ot=at&&!de?0:lt,Ct=m.useRef(null),bt=m.useCallback(function(Et){Object(u.b)(Oe,Et),Object(u.b)(Ct,Et)},[]);m.useEffect(function(){var Et;function Vt(pt){var dt=pt.currentTarget,At=pt.deltaX;At&&(Ie({currentTarget:dt,scrollLeft:dt.scrollLeft+At}),pt.preventDefault())}return(Et=Ct.current)===null||Et===void 0||Et.addEventListener("wheel",Vt),function(){var pt;(pt=Ct.current)===null||pt===void 0||pt.removeEventListener("wheel",Vt)}},[]);var ft=Ne[Ne.length-1],jt={fixed:ft?ft.fixed:null,onHeaderCell:function(){return{className:"".concat(nt,"-cell-scrollbar")}}},Pt=Object(m.useMemo)(function(){return ot?[].concat(Object(O.a)(Ze),[jt]):Ze},[ot,Ze]),Xt=Object(m.useMemo)(function(){return ot?[].concat(Object(O.a)(Ne),[jt]):Ne},[ot,Ne]),Qt=Object(m.useMemo)(function(){var Et=we.right,Vt=we.left;return Object(v.a)(Object(v.a)({},we),{},{left:Ae==="rtl"?[].concat(Object(O.a)(Vt.map(function(pt){return pt+ot})),[0]):Vt,right:Ae==="rtl"?Et:[].concat(Object(O.a)(Et.map(function(pt){return pt+ot})),[0]),isSticky:at})},[ot,we,at]),kt=k(Ge,De);return m.createElement("div",{style:Object(v.a)({overflow:"hidden"},at?{top:_e}:{}),ref:bt,className:b()("".concat(nt,"-header"),Object(N.a)({},Se,!!Se))},m.createElement("table",{style:{tableLayout:"fixed",visibility:Ve||kt?null:"hidden"}},m.createElement(T,{colWidths:kt?[].concat(Object(O.a)(kt),[ot]):[],columCount:De+1,columns:Xt}),m.createElement(g,Object.assign({},ke,{stickyOffsets:Qt,columns:Pt,flattenColumns:Xt}))))});L.displayName="FixedHeader";var A=L,G=m.createContext(null),K=G;function W(Le){var Oe=Le.prefixCls,Ve=Le.children,Ze=Le.component,Ne=Le.cellComponent,Ge=Le.fixHeader,De=Le.fixColumn,we=Le.horizonScroll,Ae=Le.className,de=Le.expanded,_e=Le.componentWidth,Se=Le.colSpan,Ie=m.useContext(c.a),ke=Ie.scrollbarSize;return m.useMemo(function(){var Ye=Ve;return De&&(Ye=m.createElement("div",{style:{width:_e-(Ge?ke:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Oe,"-expanded-row-fixed")},Ye)),m.createElement(Ze,{className:Ae,style:{display:de?null:"none"}},m.createElement(a.a,{component:Ne,prefixCls:Oe,colSpan:Se},Ye))},[Ve,Ze,Ge,we,Ae,de,_e,Se,ke])}var z=W;function U(Le){var Oe=Le.className,Ve=Le.style,Ze=Le.record,Ne=Le.index,Ge=Le.rowKey,De=Le.getRowKey,we=Le.rowExpandable,Ae=Le.expandedKeys,de=Le.onRow,_e=Le.indent,Se=_e===void 0?0:_e,Ie=Le.rowComponent,ke=Le.cellComponent,Ye=Le.childrenColumnName,nt=m.useContext(c.a),lt=nt.prefixCls,at=nt.fixedInfoList,ot=m.useContext(K),Ct=ot.fixHeader,bt=ot.fixColumn,ft=ot.horizonScroll,jt=ot.componentWidth,Pt=ot.flattenColumns,Xt=ot.expandableType,Qt=ot.expandRowByClick,kt=ot.onTriggerExpand,Et=ot.rowClassName,Vt=ot.expandedRowClassName,pt=ot.indentSize,dt=ot.expandIcon,At=ot.expandedRowRender,Mt=ot.expandIconColumnIndex,rr=m.useState(!1),Fn=Object(y.a)(rr,2),yt=Fn[0],St=Fn[1],vt=Ae&&Ae.has(Le.recordKey);m.useEffect(function(){vt&&St(!0)},[vt]);var yr=Xt==="row"&&(!we||we(Ze)),Tr=Xt==="nest",Bt=Ye&&Ze&&Ze[Ye],Rt=yr||Tr,br;de&&(br=de(Ze,Ne));var $r=function(Dt){if(Qt&&Rt&&kt(Ze,Dt),br&&br.onClick){for(var dn,ct=arguments.length,kr=new Array(ct>1?ct-1:0),mr=1;mr<ct;mr++)kr[mr-1]=arguments[mr];(dn=br).onClick.apply(dn,[Dt].concat(kr))}},Cr;typeof Et=="string"?Cr=Et:typeof Et=="function"&&(Cr=Et(Ze,Ne,Se));var ut=Object(w.a)(Pt),It=m.createElement(Ie,Object.assign({},br,{"data-row-key":Ge,className:b()(Oe,"".concat(lt,"-row"),"".concat(lt,"-row-level-").concat(Se),Cr,br&&br.className),style:Object(v.a)(Object(v.a)({},Ve),br?br.style:null),onClick:$r}),Pt.map(function(zr,Dt){var dn=zr.render,ct=zr.dataIndex,kr=zr.className,mr=ut[Dt],ei=at[Dt],Tn;Dt===(Mt||0)&&Tr&&(Tn=m.createElement(m.Fragment,null,m.createElement("span",{style:{paddingLeft:"".concat(pt*Se,"px")},className:"".concat(lt,"-row-indent indent-level-").concat(Se)}),dt({prefixCls:lt,expanded:vt,expandable:Bt,record:Ze,onExpand:kt})));var bn;return zr.onCell&&(bn=zr.onCell(Ze,Ne)),m.createElement(a.a,Object.assign({className:kr,ellipsis:zr.ellipsis,align:zr.align,component:ke,prefixCls:lt,key:mr,record:Ze,index:Ne,dataIndex:ct,render:dn,shouldCellUpdate:zr.shouldCellUpdate},ei,{appendNode:Tn,additionalProps:bn}))})),Br;if(yr&&(yt||vt)){var Vr=At(Ze,Ne,Se+1,vt),An=Vt&&Vt(Ze,Ne,Se);Br=m.createElement(z,{expanded:vt,className:b()("".concat(lt,"-expanded-row"),"".concat(lt,"-expanded-row-level-").concat(Se+1),An),prefixCls:lt,fixHeader:Ct,fixColumn:bt,horizonScroll:ft,component:Ie,componentWidth:jt,cellComponent:ke,colSpan:Pt.length},Vr)}var fn;return Bt&&vt&&(fn=(Ze[Ye]||[]).map(function(zr,Dt){var dn=De(zr,Dt);return m.createElement(U,Object.assign({},Le,{key:dn,rowKey:dn,record:zr,recordKey:dn,index:Dt,indent:Se+1}))})),m.createElement(m.Fragment,null,It,Br,fn)}U.displayName="BodyRow";var P=U,H=m.createContext(null),V=H;function q(Le){var Oe=Le.columnKey,Ve=Le.onColumnResize,Ze=m.useRef();return m.useEffect(function(){Ze.current&&Ve(Oe,Ze.current.offsetWidth)},[]),m.createElement(l.a,{onResize:function(Ge){var De=Ge.offsetWidth;Ve(Oe,De)}},m.createElement("td",{ref:Ze,style:{padding:0,border:0,height:0}},m.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Z(Le){var Oe=Le.data,Ve=Le.getRowKey,Ze=Le.measureColumnWidth,Ne=Le.expandedKeys,Ge=Le.onRow,De=Le.rowExpandable,we=Le.emptyNode,Ae=Le.childrenColumnName,de=m.useContext(V),_e=de.onColumnResize,Se=m.useContext(c.a),Ie=Se.prefixCls,ke=Se.getComponent,Ye=m.useContext(K),nt=Ye.fixHeader,lt=Ye.horizonScroll,at=Ye.flattenColumns,ot=Ye.componentWidth;return m.useMemo(function(){var Ct=ke(["body","wrapper"],"tbody"),bt=ke(["body","row"],"tr"),ft=ke(["body","cell"],"td"),jt;Oe.length?jt=Oe.map(function(Xt,Qt){var kt=Ve(Xt,Qt);return m.createElement(P,{key:kt,rowKey:kt,record:Xt,recordKey:kt,index:Qt,rowComponent:bt,cellComponent:ft,expandedKeys:Ne,onRow:Ge,getRowKey:Ve,rowExpandable:De,childrenColumnName:Ae})}):jt=m.createElement(z,{expanded:!0,className:"".concat(Ie,"-placeholder"),prefixCls:Ie,fixHeader:nt,fixColumn:lt,horizonScroll:lt,component:bt,componentWidth:ot,cellComponent:ft,colSpan:at.length},we);var Pt=Object(w.a)(at);return m.createElement(Ct,{className:"".concat(Ie,"-tbody")},Ze&&m.createElement("tr",{"aria-hidden":"true",className:"".concat(Ie,"-measure-row"),style:{height:0}},Pt.map(function(Xt){return m.createElement(q,{key:Xt,columnKey:Xt,onColumnResize:_e})})),jt)},[Oe,Ie,Ge,Ze,Ne,Ve,ke,ot,we,at])}var ce=m.memo(Z);ce.displayName="Body";var he=ce,ae=j("wRmb"),xe=j("xEkU"),ge=j.n(xe);function oe(Le){var Oe=Object(m.useRef)(Le),Ve=Object(m.useState)({}),Ze=Object(y.a)(Ve,2),Ne=Ze[1],Ge=Object(m.useRef)(null),De=Object(m.useRef)([]);function we(Ae){Ge.current===null&&(De.current=[],Ge.current=ge()(function(){De.current.forEach(function(de){Oe.current=de(Oe.current)}),Ge.current=null,Ne({})})),De.current.push(Ae)}return Object(m.useEffect)(function(){return function(){ge.a.cancel(Ge.current)}},[]),[Oe.current,we]}function se(Le){var Oe=Object(m.useRef)(Le),Ve=Object(m.useRef)(null);function Ze(){window.clearTimeout(Ve.current)}function Ne(De){Oe.current=De,Ze(),Ve.current=window.setTimeout(function(){Oe.current=null,Ve.current=null},100)}function Ge(){return Oe.current}return Object(m.useEffect)(function(){return Ze},[]),[Ne,Ge]}function te(Le,Oe,Ve){var Ze=Object(m.useMemo)(function(){for(var Ne=[],Ge=[],De=0,we=0,Ae=0;Ae<Oe;Ae+=1)if(Ve==="rtl"){Ge[Ae]=we,we+=Le[Ae]||0;var de=Oe-Ae-1;Ne[de]=De,De+=Le[de]||0}else{Ne[Ae]=De,De+=Le[Ae]||0;var _e=Oe-Ae-1;Ge[_e]=we,we+=Le[_e]||0}return{left:Ne,right:Ge}},[Le,Oe,Ve]);return Ze}var be=te;function ee(Le){var Oe=Le.className,Ve=Le.children;return m.createElement("div",{className:Oe},Ve)}var ie=ee,Ee=j("n6Qo");function ne(Le){var Oe,Ve=Le.prefixCls,Ze=Le.record,Ne=Le.onExpand,Ge=Le.expanded,De=Le.expandable,we="".concat(Ve,"-row-expand-icon");if(!De)return m.createElement("span",{className:b()(we,"".concat(Ve,"-row-spaced"))});var Ae=function(_e){Ne(Ze,_e),_e.stopPropagation()};return m.createElement("span",{className:b()(we,(Oe={},Object(N.a)(Oe,"".concat(Ve,"-row-expanded"),Ge),Object(N.a)(Oe,"".concat(Ve,"-row-collapsed"),!Ge),Oe)),onClick:Ae})}function J(Le,Oe,Ve){var Ze=[];function Ne(Ge){(Ge||[]).forEach(function(De,we){Ze.push(Oe(De,we)),Ne(De[Ve])})}return Ne(Le),Ze}var X=j("zT1h"),Q=j("y0+3"),me=function(Oe,Ve){var Ze,Ne,Ge=Oe.scrollBodyRef,De=Oe.onScroll,we=Oe.offsetScroll,Ae=m.useContext(c.a),de=Ae.prefixCls,_e=((Ze=Ge.current)===null||Ze===void 0?void 0:Ze.scrollWidth)||0,Se=((Ne=Ge.current)===null||Ne===void 0?void 0:Ne.clientWidth)||0,Ie=_e&&Se*(Se/_e),ke=m.useRef(),Ye=oe({scrollLeft:0,isHiddenScrollBar:!1}),nt=Object(y.a)(Ye,2),lt=nt[0],at=nt[1],ot=m.useRef({delta:0,x:0}),Ct=m.useState(!1),bt=Object(y.a)(Ct,2),ft=bt[0],jt=bt[1],Pt=function(){jt(!1)},Xt=function(pt){pt.persist(),ot.current.delta=pt.pageX-lt.scrollLeft,ot.current.x=0,jt(!0),pt.preventDefault()},Qt=function(pt){var dt,At=pt||((dt=window)===null||dt===void 0?void 0:dt.event),Mt=At.buttons;if(!ft||Mt===0){ft&&jt(!1);return}var rr=ot.current.x+pt.pageX-ot.current.x-ot.current.delta;rr<=0&&(rr=0),rr+Ie>=Se&&(rr=Se-Ie),De({scrollLeft:rr/Se*(_e+2)}),ot.current.x=pt.pageX},kt=function(){var pt=Object(Q.b)(Ge.current).top,dt=pt+Ge.current.offsetHeight,At=document.documentElement.scrollTop+window.innerHeight;dt-Object(r.a)()<=At||pt>=At-we?at(function(Mt){return Object(v.a)(Object(v.a)({},Mt),{},{isHiddenScrollBar:!0})}):at(function(Mt){return Object(v.a)(Object(v.a)({},Mt),{},{isHiddenScrollBar:!1})})},Et=function(pt){at(function(dt){return Object(v.a)(Object(v.a)({},dt),{},{scrollLeft:pt/_e*Se||0})})};return m.useImperativeHandle(Ve,function(){return{setScrollLeft:Et}}),m.useEffect(function(){var Vt=Object(X.a)(document.body,"mouseup",Pt,!1),pt=Object(X.a)(document.body,"mousemove",Qt,!1);return kt(),function(){Vt.remove(),pt.remove()}},[Ie,ft]),m.useEffect(function(){var Vt=Object(X.a)(window,"scroll",kt,!1),pt=Object(X.a)(window,"resize",kt,!1);return function(){Vt.remove(),pt.remove()}},[]),m.useEffect(function(){lt.isHiddenScrollBar||at(function(Vt){var pt,dt;return Object(v.a)(Object(v.a)({},Vt),{},{scrollLeft:Ge.current.scrollLeft/((pt=Ge.current)===null||pt===void 0?void 0:pt.scrollWidth)*((dt=Ge.current)===null||dt===void 0?void 0:dt.clientWidth)})})},[lt.isHiddenScrollBar]),_e<=Se||!Ie||lt.isHiddenScrollBar?null:m.createElement("div",{style:{height:Object(r.a)(),width:Se,bottom:we},className:"".concat(de,"-sticky-scroll")},m.createElement("div",{onMouseDown:Xt,ref:ke,className:b()("".concat(de,"-sticky-scroll-bar"),Object(N.a)({},"".concat(de,"-sticky-scroll-bar-active"),ft)),style:{width:"".concat(Ie,"px"),transform:"translate3d(".concat(lt.scrollLeft,"px, 0, 0)")}}))},fe=m.forwardRef(me);function Te(Le,Oe){return m.useMemo(function(){var Ve=!!Le;return{isSticky:Ve,stickyClassName:Ve?"".concat(Oe,"-sticky-header"):"",offsetHeader:Object(M.a)(Le)==="object"&&Le.offsetHeader||0,offsetScroll:Object(M.a)(Le)==="object"&&Le.offsetScroll||0}},[Le,Oe])}var ze=[],Je={},qe="rc-table-internal-hook",Xe=m.memo(function(Le){var Oe=Le.children;return Oe},function(Le,Oe){return d()(Le.props,Oe.props)?Le.pingLeft!==Oe.pingLeft||Le.pingRight!==Oe.pingRight:!1});function et(Le){var Oe,Ve=Le.prefixCls,Ze=Le.className,Ne=Le.rowClassName,Ge=Le.style,De=Le.data,we=Le.rowKey,Ae=Le.scroll,de=Le.tableLayout,_e=Le.direction,Se=Le.title,Ie=Le.footer,ke=Le.summary,Ye=Le.id,nt=Le.showHeader,lt=Le.components,at=Le.emptyText,ot=Le.onRow,Ct=Le.onHeaderRow,bt=Le.internalHooks,ft=Le.transformColumns,jt=Le.internalRefs,Pt=Le.sticky,Xt=De||ze,Qt=!!Xt.length,kt=m.useState(0),Et=Object(y.a)(kt,2),Vt=Et[0],pt=Et[1];m.useEffect(function(){pt(Object(r.a)())});var dt=m.useMemo(function(){return Object(w.c)(lt,{})},[lt]),At=m.useCallback(function(Dr,_r){return Object(w.b)(dt,Dr)||_r},[dt]),Mt=m.useMemo(function(){return typeof we=="function"?we:function(Dr){var _r=Dr&&Dr[we];return _r}},[we]),rr=Object(x.c)(Le),Fn=rr.expandIcon,yt=rr.expandedRowKeys,St=rr.defaultExpandedRowKeys,vt=rr.defaultExpandAllRows,yr=rr.expandedRowRender,Tr=rr.onExpand,Bt=rr.onExpandedRowsChange,Rt=rr.expandRowByClick,br=rr.rowExpandable,$r=rr.expandIconColumnIndex,Cr=rr.expandedRowClassName,ut=rr.childrenColumnName,It=rr.indentSize,Br=Fn||ne,Vr=ut||"children",An=m.useMemo(function(){return yr?"row":Le.expandable&&bt===qe&&Le.expandable.__PARENT_RENDER_ICON__||Xt.some(function(Dr){return Dr&&Object(M.a)(Dr)==="object"&&Dr[Vr]})?"nest":!1},[!!yr,Xt]),fn=m.useState(function(){return St||(vt?J(Xt,Mt,Vr):[])}),zr=Object(y.a)(fn,2),Dt=zr[0],dn=zr[1],ct=m.useMemo(function(){return new Set(yt||Dt||[])},[yt,Dt]),kr=m.useCallback(function(Dr){var _r=Mt(Dr,Xt.indexOf(Dr)),fr,ai=ct.has(_r);ai?(ct.delete(_r),fr=Object(O.a)(ct)):fr=[].concat(Object(O.a)(ct),[_r]),dn(fr),Tr&&Tr(!ai,Dr),Bt&&Bt(fr)},[Mt,ct,Xt,Tr,Bt]),mr=m.useState(0),ei=Object(y.a)(mr,2),Tn=ei[0],bn=ei[1],di=Object(ae.b)(Object(v.a)(Object(v.a)(Object(v.a)({},Le),rr),{},{expandable:!!yr,expandedKeys:ct,getRowKey:Mt,onTriggerExpand:kr,expandIcon:Br,expandIconColumnIndex:$r,direction:_e}),bt===qe?ft:null),ti=Object(y.a)(di,2),sn=ti[0],Hr=ti[1],fi=m.useMemo(function(){return{columns:sn,flattenColumns:Hr}},[sn,Hr]),hn=m.useRef(),Wr=m.useRef(),lr=m.useRef(),nn=m.useState(!1),qt=Object(y.a)(nn,2),Kt=qt[0],er=qt[1],Sr=m.useState(!1),jr=Object(y.a)(Sr,2),Gr=jr[0],_n=jr[1],la=oe(new Map),Yi=Object(y.a)(la,2),$i=Yi[0],Oi=Yi[1],pn=Object(w.a)(Hr),Ki=pn.map(function(Dr){return $i.get(Dr)}),Zr=m.useMemo(function(){return Ki},[Ki.join("_")]),ri=be(Zr,Hr.length,_e),Mn=Ae&&Object(w.d)(Ae.y),ln=Ae&&Object(w.d)(Ae.x),Sn=ln&&Hr.some(function(Dr){var _r=Dr.fixed;return _r}),hi=m.useRef(),Kn=Te(Pt,Ve),zn=Kn.isSticky,Li=Kn.offsetHeader,Mi=Kn.offsetScroll,Gn=Kn.stickyClassName,Ni,pi,mi;Mn&&(pi={overflowY:"scroll",maxHeight:Ae.y}),ln&&(Ni={overflowX:"auto"},Mn||(pi={overflowY:"hidden"}),mi={width:Ae.x===!0?"auto":Ae.x,minWidth:"100%"});var Xn=m.useCallback(function(Dr,_r){Oi(function(fr){var ai=new Map(fr);return ai.set(Dr,_r),ai})},[]),Vn=se(null),ki=Object(y.a)(Vn,2),ni=ki[0],gi=ki[1];function ji(Dr,_r){if(!_r)return;typeof _r=="function"?_r(Dr):_r.scrollLeft!==Dr&&(_r.scrollLeft=Dr)}var ii=function(_r){var fr=_r.currentTarget,ai=_r.scrollLeft,zi=typeof ai=="number"?ai:fr.scrollLeft,Gi=fr||Je;if(!gi()||gi()===Gi){var $t;ni(Gi),ji(zi,Wr.current),ji(zi,lr.current),ji(zi,($t=hi.current)===null||$t===void 0?void 0:$t.setScrollLeft)}if(fr){var Ot=fr.scrollWidth,tr=fr.clientWidth;er(zi>0),_n(zi<Ot-tr)}},Pr=function(){lr.current&&ii({currentTarget:lr.current})},Nt=function(_r){var fr=_r.width;Pr(),bn(hn.current?hn.current.offsetWidth:fr)};m.useEffect(function(){return Pr},[]),m.useEffect(function(){ln&&Pr()},[ln]),m.useEffect(function(){bt===qe&&jt&&(jt.body.current=lr.current)});var Yt=At(["table"],"table"),Ut=m.useMemo(function(){return de||(Sn?Ae.x==="max-content"?"auto":"fixed":Mn||Hr.some(function(Dr){var _r=Dr.ellipsis;return _r})?"fixed":"auto")},[Mn,Sn,Hr,de]),nr,gr={colWidths:Zr,columCount:Hr.length,stickyOffsets:ri,onHeaderRow:Ct,fixHeader:Mn},Rr=m.useMemo(function(){return Qt?null:typeof at=="function"?at():at},[Qt,at]),dr=m.createElement(he,{data:Xt,measureColumnWidth:Mn||ln||zn,expandedKeys:ct,rowExpandable:br,getRowKey:Mt,onRow:ot,emptyNode:Rr,childrenColumnName:Vr}),qr=m.createElement(T,{colWidths:Hr.map(function(Dr){var _r=Dr.width;return _r}),columns:Hr}),Un=ke&&m.createElement(Ee.b,null,ke(Xt)),sr=At(["body"]);if(Mn||zn){var vi;typeof sr=="function"?(vi=sr(Xt,{scrollbarSize:Vt,ref:lr,onScroll:ii}),gr.colWidths=Hr.map(function(Dr,_r){var fr=Dr.width,ai=_r===sn.length-1?fr-Vt:fr;return typeof ai=="number"&&!Number.isNaN(ai)?ai:(Object(t.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):vi=m.createElement("div",{style:Object(v.a)(Object(v.a)({},Ni),pi),onScroll:ii,ref:lr,className:b()("".concat(Ve,"-body"))},m.createElement(Yt,{style:Object(v.a)(Object(v.a)({},mi),{},{tableLayout:Ut})},qr,dr,Un),zn&&m.createElement(fe,{ref:hi,offsetScroll:Mi,scrollBodyRef:lr,onScroll:ii})),nr=m.createElement(m.Fragment,null,nt!==!1&&m.createElement(A,Object.assign({noData:!Xt.length},gr,fi,{direction:_e,offsetHeader:Li,stickyClassName:Gn,ref:Wr,onScroll:ii})),vi)}else nr=m.createElement("div",{style:Object(v.a)(Object(v.a)({},Ni),pi),className:b()("".concat(Ve,"-content")),onScroll:ii,ref:lr},m.createElement(Yt,{style:Object(v.a)(Object(v.a)({},mi),{},{tableLayout:Ut})},qr,nt!==!1&&m.createElement(g,Object.assign({},gr,fi)),dr,Un));var Ir=Object(x.b)(Le),On=m.createElement("div",Object.assign({className:b()(Ve,Ze,(Oe={},Object(N.a)(Oe,"".concat(Ve,"-rtl"),_e==="rtl"),Object(N.a)(Oe,"".concat(Ve,"-ping-left"),Kt),Object(N.a)(Oe,"".concat(Ve,"-ping-right"),Gr),Object(N.a)(Oe,"".concat(Ve,"-layout-fixed"),de==="fixed"),Object(N.a)(Oe,"".concat(Ve,"-fixed-header"),Mn),Object(N.a)(Oe,"".concat(Ve,"-fixed-column"),Sn),Object(N.a)(Oe,"".concat(Ve,"-scroll-horizontal"),ln),Object(N.a)(Oe,"".concat(Ve,"-has-fix-left"),Hr[0]&&Hr[0].fixed),Object(N.a)(Oe,"".concat(Ve,"-has-fix-right"),Hr[Hr.length-1]&&Hr[Hr.length-1].fixed==="right"),Oe)),style:Ge,id:Ye,ref:hn},Ir),m.createElement(Xe,{pingLeft:Kt,pingRight:Gr,props:Object(v.a)(Object(v.a)({},Le),{},{stickyOffsets:ri,mergedExpandedKeys:ct})},Se&&m.createElement(ie,{className:"".concat(Ve,"-title")},Se(Xt)),m.createElement("div",{className:"".concat(Ve,"-container")},nr),Ie&&m.createElement(ie,{className:"".concat(Ve,"-footer")},Ie(Xt))));ln&&(On=m.createElement(l.a,{onResize:Nt},On));var Rn=m.useMemo(function(){return{prefixCls:Ve,getComponent:At,scrollbarSize:Vt,direction:_e,fixedInfoList:Hr.map(function(Dr,_r){return f(_r,_r,Hr,ri,_e)}),isSticky:zn}},[Ve,At,Vt,_e,Hr,ri,_e,zn]),li=m.useMemo(function(){return Object(v.a)(Object(v.a)({},fi),{},{tableLayout:Ut,rowClassName:Ne,expandedRowClassName:Cr,componentWidth:Tn,fixHeader:Mn,fixColumn:Sn,horizonScroll:ln,expandIcon:Br,expandableType:An,expandRowByClick:Rt,expandedRowRender:yr,onTriggerExpand:kr,expandIconColumnIndex:$r,indentSize:It})},[fi,Ut,Ne,Cr,Tn,Mn,Sn,ln,Br,An,Rt,yr,kr,$r,It]),ua=m.useMemo(function(){return{onColumnResize:Xn}},[Xn]);return m.createElement(c.a.Provider,{value:Rn},m.createElement(K.Provider,{value:li},m.createElement(V.Provider,{value:ua},On)))}et.Column=o.a,et.ColumnGroup=i.a,et.Summary=Ee.a,et.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var rt=$.b=et},wRmb:function(F,$,j){"use strict";j.d($,"a",function(){return d});var N=j("rePB"),v=j("KQm4"),O=j("VTBJ"),M=j("Ff2n"),y=j("cDcd"),m=j.n(y),S=j("Kwbf"),b=j("Zm9Q"),p=j("hW8S");function d(o){return Object(b.a)(o).filter(function(s){return y.isValidElement(s)}).map(function(s){var u=s.key,a=s.props,c=a.children,f=Object(M.a)(a,["children"]),w=Object(O.a)({key:u},f);return c&&(w.children=d(c)),w})}function t(o){return o.reduce(function(s,u){var a=u.fixed,c=a===!0?"left":a,f=u.children;return f&&f.length>0?[].concat(Object(v.a)(s),Object(v.a)(t(f).map(function(w){return Object(O.a)({fixed:c},w)}))):[].concat(Object(v.a)(s),[Object(O.a)(Object(O.a)({},u),{},{fixed:c})])},[])}function l(o){for(var s=!0,u=0;u<o.length;u+=1){var a=o[u];if(s&&a.fixed!=="left")s=!1;else if(!s&&a.fixed==="left"){Object(S.a)(!1,"Index ".concat(u-1," of `columns` missing `fixed='left'` prop."));break}}for(var c=!0,f=o.length-1;f>=0;f-=1){var w=o[f];if(c&&w.fixed!=="right")c=!1;else if(!c&&w.fixed==="right"){Object(S.a)(!1,"Index ".concat(f+1," of `columns` missing `fixed='right'` prop."));break}}}function r(o){return o.map(function(s){var u=s.fixed,a=Object(M.a)(s,["fixed"]),c=u;return u==="left"?c="right":u==="right"&&(c="left"),Object(O.a)({fixed:c},a)})}function i(o,s){var u=o.prefixCls,a=o.columns,c=o.children,f=o.expandable,w=o.expandedKeys,_=o.getRowKey,h=o.onTriggerExpand,R=o.expandIcon,C=o.rowExpandable,g=o.expandIconColumnIndex,x=o.direction,E=o.expandRowByClick,T=y.useMemo(function(){return a||d(c)},[a,c]),k=y.useMemo(function(){if(f){var G,K=g||0,W=T[K],z=(G={},Object(N.a)(G,p.a,{className:"".concat(u,"-expand-icon-col")}),Object(N.a)(G,"title",""),Object(N.a)(G,"fixed",W?W.fixed:null),Object(N.a)(G,"className","".concat(u,"-row-expand-icon-cell")),Object(N.a)(G,"render",function(H,V,q){var Z=_(V,q),ce=w.has(Z),he=C?C(V):!0,ae=R({prefixCls:u,expanded:ce,expandable:he,record:V,onExpand:h});return E?y.createElement("span",{onClick:function(ge){return ge.stopPropagation()}},ae):ae}),G),U=T.slice();return K>=0&&U.splice(K,0,z),U}return T},[f,T,_,w,R,x]),L=y.useMemo(function(){var G=k;return s&&(G=s(G)),G.length||(G=[{render:function(){return null}}]),G},[s,k,x]),A=y.useMemo(function(){return x==="rtl"?r(t(L)):t(L)},[L,x]);return[L,A]}$.b=i},wZgz:function(F,$,j){(function(N,v,O){F.exports=$=v(j("Ib8C"),j("ETIr"),j("cv67"),j("K3mO"),j("OLod"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.BlockCipher,y=v.algo,m=[],S=[],b=[],p=[],d=[],t=[],l=[],r=[],i=[],o=[];(function(){for(var a=[],c=0;c<256;c++)c<128?a[c]=c<<1:a[c]=c<<1^283;for(var f=0,w=0,c=0;c<256;c++){var _=w^w<<1^w<<2^w<<3^w<<4;_=_>>>8^_&255^99,m[f]=_,S[_]=f;var h=a[f],R=a[h],C=a[R],g=a[_]*257^_*16843008;b[f]=g<<24|g>>>8,p[f]=g<<16|g>>>16,d[f]=g<<8|g>>>24,t[f]=g;var g=C*16843009^R*65537^h*257^f*16843008;l[_]=g<<24|g>>>8,r[_]=g<<16|g>>>16,i[_]=g<<8|g>>>24,o[_]=g,f?(f=h^a[a[a[C^h]]],w^=a[a[w]]):f=w=1}})();var s=[0,1,2,4,8,16,32,64,128,27,54],u=y.AES=M.extend({_doReset:function(){var a;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var c=this._keyPriorReset=this._key,f=c.words,w=c.sigBytes/4,_=this._nRounds=w+6,h=(_+1)*4,R=this._keySchedule=[],C=0;C<h;C++)C<w?R[C]=f[C]:(a=R[C-1],C%w?w>6&&C%w==4&&(a=m[a>>>24]<<24|m[a>>>16&255]<<16|m[a>>>8&255]<<8|m[a&255]):(a=a<<8|a>>>24,a=m[a>>>24]<<24|m[a>>>16&255]<<16|m[a>>>8&255]<<8|m[a&255],a^=s[C/w|0]<<24),R[C]=R[C-w]^a);for(var g=this._invKeySchedule=[],x=0;x<h;x++){var C=h-x;if(x%4)var a=R[C];else var a=R[C-4];x<4||C<=4?g[x]=a:g[x]=l[m[a>>>24]]^r[m[a>>>16&255]]^i[m[a>>>8&255]]^o[m[a&255]]}},encryptBlock:function(a,c){this._doCryptBlock(a,c,this._keySchedule,b,p,d,t,m)},decryptBlock:function(a,c){var f=a[c+1];a[c+1]=a[c+3],a[c+3]=f,this._doCryptBlock(a,c,this._invKeySchedule,l,r,i,o,S);var f=a[c+1];a[c+1]=a[c+3],a[c+3]=f},_doCryptBlock:function(a,c,f,w,_,h,R,C){for(var g=this._nRounds,x=a[c]^f[0],E=a[c+1]^f[1],T=a[c+2]^f[2],k=a[c+3]^f[3],L=4,A=1;A<g;A++){var G=w[x>>>24]^_[E>>>16&255]^h[T>>>8&255]^R[k&255]^f[L++],K=w[E>>>24]^_[T>>>16&255]^h[k>>>8&255]^R[x&255]^f[L++],W=w[T>>>24]^_[k>>>16&255]^h[x>>>8&255]^R[E&255]^f[L++],z=w[k>>>24]^_[x>>>16&255]^h[E>>>8&255]^R[T&255]^f[L++];x=G,E=K,T=W,k=z}var G=(C[x>>>24]<<24|C[E>>>16&255]<<16|C[T>>>8&255]<<8|C[k&255])^f[L++],K=(C[E>>>24]<<24|C[T>>>16&255]<<16|C[k>>>8&255]<<8|C[x&255])^f[L++],W=(C[T>>>24]<<24|C[k>>>16&255]<<16|C[x>>>8&255]<<8|C[E&255])^f[L++],z=(C[k>>>24]<<24|C[x>>>16&255]<<16|C[E>>>8&255]<<8|C[T&255])^f[L++];a[c]=G,a[c+1]=K,a[c+2]=W,a[c+3]=z},keySize:256/32});v.AES=M._createHelper(u)}(),N.AES})},wbyO:function(F,$,j){(function(N,v){F.exports=$=v(j("Ib8C"))})(this,function(N){return function(){var v=N,O=v.lib,M=O.WordArray,y=v.enc,m=y.Base64url={stringify:function(b,p=!0){var d=b.words,t=b.sigBytes,l=p?this._safe_map:this._map;b.clamp();for(var r=[],i=0;i<t;i+=3)for(var o=d[i>>>2]>>>24-i%4*8&255,s=d[i+1>>>2]>>>24-(i+1)%4*8&255,u=d[i+2>>>2]>>>24-(i+2)%4*8&255,a=o<<16|s<<8|u,c=0;c<4&&i+c*.75<t;c++)r.push(l.charAt(a>>>6*(3-c)&63));var f=l.charAt(64);if(f)for(;r.length%4;)r.push(f);return r.join("")},parse:function(b,p=!0){var d=b.length,t=p?this._safe_map:this._map,l=this._reverseMap;if(!l){l=this._reverseMap=[];for(var r=0;r<t.length;r++)l[t.charCodeAt(r)]=r}var i=t.charAt(64);if(i){var o=b.indexOf(i);o!==-1&&(d=o)}return S(b,d,l)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function S(b,p,d){for(var t=[],l=0,r=0;r<p;r++)if(r%4){var i=d[b.charCodeAt(r-1)]<<r%4*2,o=d[b.charCodeAt(r)]>>>6-r%4*2,s=i|o;t[l>>>2]|=s<<24-l%4*8,l++}return M.create(t,l)}}(),N.enc.Base64url})},"y0+3":function(F,$,j){"use strict";j.d($,"a",function(){return t}),j.d($,"b",function(){return r});var N=/margin|padding|width|height|max|min|offset/,v={left:!0,top:!0},O={cssFloat:1,styleFloat:1,float:1};function M(i){return i.nodeType===1?i.ownerDocument.defaultView.getComputedStyle(i,null):{}}function y(i,o,s){if(o=o.toLowerCase(),s==="auto"){if(o==="height")return i.offsetHeight;if(o==="width")return i.offsetWidth}return o in v||(v[o]=N.test(o)),v[o]?parseFloat(s)||0:s}function m(i,o){var s=arguments.length,u=M(i);return o=O[o]?"cssFloat"in i.style?"cssFloat":"styleFloat":o,s===1?u:y(i,o,u[o]||i.style[o])}function S(i,o,s){var u=arguments.length;if(o=O[o]?"cssFloat"in i.style?"cssFloat":"styleFloat":o,u===3)return typeof s=="number"&&N.test(o)&&(s="".concat(s,"px")),i.style[o]=s,s;for(var a in o)o.hasOwnProperty(a)&&S(i,a,o[a]);return M(i)}function b(i){return i===document.body?document.documentElement.clientWidth:i.offsetWidth}function p(i){return i===document.body?window.innerHeight||document.documentElement.clientHeight:i.offsetHeight}function d(){var i=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),o=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:i,height:o}}function t(){var i=document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight;return{width:i,height:o}}function l(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function r(i){var o=i.getBoundingClientRect(),s=document.documentElement;return{left:o.left+(window.pageXOffset||s.scrollLeft)-(s.clientLeft||document.body.clientLeft||0),top:o.top+(window.pageYOffset||s.scrollTop)-(s.clientTop||document.body.clientTop||0)}}},ynwM:function(F,$,j){var N=j("MFOe"),v=N.Global;F.exports={name:"oldFF-globalStorage",read:M,write:y,each:m,remove:S,clearAll:b};var O=v.globalStorage;function M(p){return O[p]}function y(p,d){O[p]=d}function m(p){for(var d=O.length-1;d>=0;d--){var t=O.key(d);p(O[t],t)}}function S(p){return O.removeItem(p)}function b(){m(function(p,d){delete O[p]})}}}]);