|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[206,6,7,19,20],{"+NIl":function(I,Z,N){(function(P){P(N("VrN/"))})(function(P){"use strict";P.defineMode("stex",function(m,T){"use strict";function L(h,E){h.cmdState.push(E)}function _(h){return h.cmdState.length>0?h.cmdState[h.cmdState.length-1]:null}function g(h){var E=h.cmdState.pop();E&&E.closeBracket()}function S(h){for(var E=h.cmdState,y=E.length-1;y>=0;y--){var l=E[y];if(l.name=="DEFAULT")continue;return l}return{styleIdentifier:function(){return null}}}function p(h,E,y){return function(){this.name=h,this.bracketNo=0,this.style=E,this.styles=y,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var o={};o.importmodule=p("importmodule","tag",["string","builtin"]),o.documentclass=p("documentclass","tag",["","atom"]),o.usepackage=p("usepackage","tag",["atom"]),o.begin=p("begin","tag",["atom"]),o.end=p("end","tag",["atom"]),o.label=p("label","tag",["atom"]),o.ref=p("ref","tag",["atom"]),o.eqref=p("eqref","tag",["atom"]),o.cite=p("cite","tag",["atom"]),o.bibitem=p("bibitem","tag",["atom"]),o.Bibitem=p("Bibitem","tag",["atom"]),o.RBibitem=p("RBibitem","tag",["atom"]),o.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function i(h,E){h.f=E}function r(h,E){var y;if(h.match(/^\\[a-zA-Z@]+/)){var l=h.current().slice(1);return y=o.hasOwnProperty(l)?o[l]:o.DEFAULT,y=new y,L(E,y),i(E,f),y.style}if(h.match(/^\\[$&%#{}_]/))return"tag";if(h.match(/^\\[,;!\/\\]/))return"tag";if(h.match("\\["))return i(E,function(s,u){return d(s,u,"\\]")}),"keyword";if(h.match("\\("))return i(E,function(s,u){return d(s,u,"\\)")}),"keyword";if(h.match("$$"))return i(E,function(s,u){return d(s,u,"$$")}),"keyword";if(h.match("$"))return i(E,function(s,u){return d(s,u,"$")}),"keyword";var n=h.next();if(n=="%")return h.skipToEnd(),"comment";if(n=="}"||n=="]"){if(y=_(E),y)y.closeBracket(n),i(E,f);else return"error";return"bracket"}else return n=="{"||n=="["?(y=o.DEFAULT,y=new y,L(E,y),"bracket"):/\d/.test(n)?(h.eatWhile(/[\w.%]/),"atom"):(h.eatWhile(/[\w\-_]/),y=S(E),y.name=="begin"&&(y.argument=h.current()),y.styleIdentifier())}function d(h,E,y){if(h.eatSpace())return null;if(y&&h.match(y))return i(E,r),"keyword";if(h.match(/^\\[a-zA-Z@]+/))return"tag";if(h.match(/^[a-zA-Z]+/))return"variable-2";if(h.match(/^\\[$&%#{}_]/))return"tag";if(h.match(/^\\[,;!\/]/))return"tag";if(h.match(/^[\^_&]/))return"tag";if(h.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(h.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var l=h.next();return l=="{"||l=="}"||l=="["||l=="]"||l=="("||l==")"?"bracket":l=="%"?(h.skipToEnd(),"comment"):"error"}function f(h,E){var y=h.peek(),l;return y=="{"||y=="["?(l=_(E),l.openBracket(y),h.eat(y),i(E,r),"bracket"):/[ \t\r]/.test(y)?(h.eat(y),null):(i(E,r),g(E),r(h,E))}return{startState:function(){var h=T.inMathMode?function(E,y){return d(E,y)}:r;return{cmdState:[],f:h}},copyState:function(h){return{cmdState:h.cmdState.slice(),f:h.f}},token:function(h,E){return E.f(h,E)},blankLine:function(h){h.f=r,h.cmdState.length=0},lineComment:"%"}}),P.defineMIME("text/x-stex","stex"),P.defineMIME("text/x-latex","stex")})},"19Vz":function(I,Z,N){(function(P){P(N("VrN/"))})(function(P){P.defineOption("placeholder","",function(p,o,i){var r=i&&i!=P.Init;if(o&&!r)p.on("blur",_),p.on("change",g),p.on("swapDoc",g),P.on(p.getInputField(),"compositionupdate",p.state.placeholderCompose=function(){L(p)}),g(p);else if(!o&&r){p.off("blur",_),p.off("change",g),p.off("swapDoc",g),P.off(p.getInputField(),"compositionupdate",p.state.placeholderCompose),m(p);var d=p.getWrapperElement();d.className=d.className.replace(" CodeMirror-empty","")}o&&!p.hasFocus()&&_(p)});function m(p){p.state.placeholder&&(p.state.placeholder.parentNode.removeChild(p.state.placeholder),p.state.placeholder=null)}function T(p){m(p);var o=p.state.placeholder=document.createElement("pre");o.style.cssText="height: 0; overflow: visible",o.style.direction=p.getOption("direction"),o.className="CodeMirror-placeholder CodeMirror-line-like";var i=p.getOption("placeholder");typeof i=="string"&&(i=document.createTextNode(i)),o.appendChild(i),p.display.lineSpace.insertBefore(o,p.display.lineSpace.firstChild)}function L(p){setTimeout(function(){var o=!1,i=p.getInputField();i.nodeName=="TEXTAREA"?o=!i.value:p.lineCount()==1&&(o=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),o?T(p):m(p)},20)}function _(p){S(p)&&T(p)}function g(p){var o=p.getWrapperElement(),i=S(p);o.className=o.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?T(p):m(p)}function S(p){return p.lineCount()===1&&p.getLine(0)===""}})},"1eCo":function(I,Z,N){(function(P){P(N("VrN/"))})(function(P){"use strict";var m={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},T={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};P.defineMode("xml",function(L,_){var g=L.indentUnit,S={},p=_.htmlMode?m:T;for(var o in p)S[o]=p[o];for(var o in _)S[o]=_[o];var i,r;function d(C,F){function j(G){return F.tokenize=G,G(C,F)}var k=C.next();if(k=="<")return C.eat("!")?C.eat("[")?C.match("CDATA[")?j(E("atom","]]>")):null:C.match("--")?j(E("comment","-->")):C.match("DOCTYPE",!0,!0)?(C.eatWhile(/[\w\._\-]/),j(y(1))):null:C.eat("?")?(C.eatWhile(/[\w\._\-]/),F.tokenize=E("meta","?>"),"meta"):(i=C.eat("/")?"closeTag":"openTag",F.tokenize=f,"tag bracket");if(k=="&"){var X;return C.eat("#")?C.eat("x")?X=C.eatWhile(/[a-fA-F\d]/)&&C.eat(";"):X=C.eatWhile(/[\d]/)&&C.eat(";"):X=C.eatWhile(/[\w\.\-:]/)&&C.eat(";"),X?"atom":"error"}else return C.eatWhile(/[^&<]/),null}d.isInText=!0;function f(C,F){var j=C.next();if(j==">"||j=="/"&&C.eat(">"))return F.tokenize=d,i=j==">"?"endTag":"selfcloseTag","tag bracket";if(j=="=")return i="equals",null;if(j=="<"){F.tokenize=d,F.state=u,F.tagName=F.tagStart=null;var k=F.tokenize(C,F);return k?k+" tag error":"tag error"}else return/[\'\"]/.test(j)?(F.tokenize=h(j),F.stringStartCol=C.column(),F.tokenize(C,F)):(C.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(C){var F=function(j,k){for(;!j.eol();)if(j.next()==C){k.tokenize=f;break}return"string"};return F.isInAttribute=!0,F}function E(C,F){return function(j,k){for(;!j.eol();){if(j.match(F)){k.tokenize=d;break}j.next()}return C}}function y(C){return function(F,j){for(var k;(k=F.next())!=null;){if(k=="<")return j.tokenize=y(C+1),j.tokenize(F,j);if(k==">")if(C==1){j.tokenize=d;break}else return j.tokenize=y(C-1),j.tokenize(F,j)}return"meta"}}function l(C,F,j){this.prev=C.context,this.tagName=F,this.indent=C.indented,this.startOfLine=j,(S.doNotIndent.hasOwnProperty(F)||C.context&&C.context.noIndent)&&(this.noIndent=!0)}function n(C){C.context&&(C.context=C.context.prev)}function s(C,F){for(var j;;){if(!C.context)return;if(j=C.context.tagName,!S.contextGrabbers.hasOwnProperty(j)||!S.contextGrabbers[j].hasOwnProperty(F))return;n(C)}}function u(C,F,j){return C=="openTag"?(j.tagStart=F.column(),w):C=="closeTag"?v:u}function w(C,F,j){return C=="word"?(j.tagName=F.current(),r="tag",D):S.allowMissingTagName&&C=="endTag"?(r="tag bracket",D(C,F,j)):(r="error",w)}function v(C,F,j){if(C=="word"){var k=F.current();return j.context&&j.context.tagName!=k&&S.implicitlyClosed.hasOwnProperty(j.context.tagName)&&n(j),j.context&&j.context.tagName==k||S.matchClosing===!1?(r="tag",a):(r="tag error",R)}else return S.allowMissingTagName&&C=="endTag"?(r="tag bracket",a(C,F,j)):(r="error",R)}function a(C,F,j){return C!="endTag"?(r="error",a):(n(j),u)}function R(C,F,j){return r="error",a(C,F,j)}function D(C,F,j){if(C=="word")return r="attribute",c;if(C=="endTag"||C=="selfcloseTag"){var k=j.tagName,X=j.tagStart;return j.tagName=j.tagStart=null,C=="selfcloseTag"||S.autoSelfClosers.hasOwnProperty(k)?s(j,k):(s(j,k),j.context=new l(j,k,X==j.indented)),u}return r="error",D}function c(C,F,j){return C=="equals"?b:(S.allowMissing||(r="error"),D(C,F,j))}function b(C,F,j){return C=="string"?x:C=="word"&&S.allowUnquoted?(r="string",D):(r="error",D(C,F,j))}function x(C,F,j){return C=="string"?x:D(C,F,j)}return{startState:function(C){var F={tokenize:d,state:u,indented:C||0,tagName:null,tagStart:null,context:null};return C!=null&&(F.baseIndent=C),F},token:function(C,F){if(!F.tagName&&C.sol()&&(F.indented=C.indentation()),C.eatSpace())return null;i=null;var j=F.tokenize(C,F);return(j||i)&&j!="comment"&&(r=null,F.state=F.state(i||j,C,F),r&&(j=r=="error"?j+" error":r)),j},indent:function(C,F,j){var k=C.context;if(C.tokenize.isInAttribute)return C.tagStart==C.indented?C.stringStartCol+1:C.indented+g;if(k&&k.noIndent)return P.Pass;if(C.tokenize!=f&&C.tokenize!=d)return j?j.match(/^(\s*)/)[0].length:0;if(C.tagName)return S.multilineTagIndentPastTag!==!1?C.tagStart+C.tagName.length+2:C.tagStart+g*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/<!\[CDATA\[/.test(F))return 0;var X=F&&/^<(\/)?([\w_:\.-]*)/.exec(F);if(X&&X[1])for(;k;)if(k.tagName==X[2]){k=k.prev;break}else if(S.implicitlyClosed.hasOwnProperty(k.tagName))k=k.prev;else break;else if(X)for(;k;){var G=S.contextGrabbers[k.tagName];if(G&&G.hasOwnProperty(X[2]))k=k.prev;else break}for(;k&&k.prev&&!k.startOfLine;)k=k.prev;return k?k.indent+g:C.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(C){C.state==b&&(C.state=D)},xmlCurrentTag:function(C){return C.tagName?{name:C.tagName,close:C.type=="closeTag"}:null},xmlCurrentContext:function(C){for(var F=[],j=C.context;j;j=j.prev)j.tagName&&F.push(j.tagName);return F.reverse()}}}),P.defineMIME("text/xml","xml"),P.defineMIME("application/xml","xml"),P.mimeModes.hasOwnProperty("text/html")||P.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("MlIO"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.Hasher,_=m.x64,g=_.Word,S=_.WordArray,p=m.algo;function o(){return g.create.apply(g,arguments)}var i=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],r=[];(function(){for(var f=0;f<80;f++)r[f]=o()})();var d=p.SHA512=L.extend({_doReset:function(){this._hash=new S.init([new g.init(1779033703,4089235720),new g.init(3144134277,2227873595),new g.init(1013904242,4271175723),new g.init(2773480762,1595750129),new g.init(1359893119,2917565137),new g.init(2600822924,725511199),new g.init(528734635,4215389547),new g.init(1541459225,327033209)])},_doProcessBlock:function(f,h){for(var E=this._hash.words,y=E[0],l=E[1],n=E[2],s=E[3],u=E[4],w=E[5],v=E[6],a=E[7],R=y.high,D=y.low,c=l.high,b=l.low,x=n.high,C=n.low,F=s.high,j=s.low,k=u.high,X=u.low,G=w.high,W=w.low,K=v.high,B=v.low,U=a.high,H=a.low,q=R,ie=D,ce=c,he=b,be=x,ne=C,le=F,ue=j,te=k,oe=X,Q=G,se=W,J=K,ee=B,ge=U,re=H,Y=0;Y<80;Y++){var z,$,me=r[Y];if(Y<16)$=me.high=f[h+Y*2]|0,z=me.low=f[h+Y*2+1]|0;else{var pe=r[Y-15],xe=pe.high,Re=pe.low,ke=(xe>>>1|Re<<31)^(xe>>>8|Re<<24)^xe>>>7,Ne=(Re>>>1|xe<<31)^(Re>>>8|xe<<24)^(Re>>>7|xe<<25),Pe=r[Y-2],je=Pe.high,Fe=Pe.low,We=(je>>>19|Fe<<13)^(je<<3|Fe>>>29)^je>>>6,_e=(Fe>>>19|je<<13)^(Fe<<3|je>>>29)^(Fe>>>6|je<<26),Ge=r[Y-7],Ve=Ge.high,Ie=Ge.low,He=r[Y-16],Le=He.high,Te=He.low;z=Ne+Ie,$=ke+Ve+(z>>>0<Ne>>>0?1:0),z=z+_e,$=$+We+(z>>>0<_e>>>0?1:0),z=z+Te,$=$+Le+(z>>>0<Te>>>0?1:0),me.high=$,me.low=z}var Ae=te&Q^~te&J,ye=oe&se^~oe&ee,Ee=q&ce^q&be^ce&be,we=ie&he^ie&ne^he&ne,Oe=(q>>>28|ie<<4)^(q<<30|ie>>>2)^(q<<25|ie>>>7),Ce=(ie>>>28|q<<4)^(ie<<30|q>>>2)^(ie<<25|q>>>7),Be=(te>>>14|oe<<18)^(te>>>18|oe<<14)^(te<<23|oe>>>9),Ke=(oe>>>14|te<<18)^(oe>>>18|te<<14)^(oe<<23|te>>>9),qe=i[Y],et=qe.high,it=qe.low,pt=re+Ke,gt=ge+Be+(pt>>>0<re>>>0?1:0),pt=pt+ye,gt=gt+Ae+(pt>>>0<ye>>>0?1:0),pt=pt+it,gt=gt+et+(pt>>>0<it>>>0?1:0),pt=pt+z,gt=gt+$+(pt>>>0<z>>>0?1:0),at=Ce+we,Rt=Oe+Ee+(at>>>0<Ce>>>0?1:0);ge=J,re=ee,J=Q,ee=se,Q=te,se=oe,oe=ue+pt|0,te=le+gt+(oe>>>0<ue>>>0?1:0)|0,le=be,ue=ne,be=ce,ne=he,ce=q,he=ie,ie=pt+at|0,q=gt+Rt+(ie>>>0<pt>>>0?1:0)|0}D=y.low=D+ie,y.high=R+q+(D>>>0<ie>>>0?1:0),b=l.low=b+he,l.high=c+ce+(b>>>0<he>>>0?1:0),C=n.low=C+ne,n.high=x+be+(C>>>0<ne>>>0?1:0),j=s.low=j+ue,s.high=F+le+(j>>>0<ue>>>0?1:0),X=u.low=X+oe,u.high=k+te+(X>>>0<oe>>>0?1:0),W=w.low=W+se,w.high=G+Q+(W>>>0<se>>>0?1:0),B=v.low=B+ee,v.high=K+J+(B>>>0<ee>>>0?1:0),H=a.low=H+re,a.high=U+ge+(H>>>0<re>>>0?1:0)},_doFinalize:function(){var f=this._data,h=f.words,E=this._nDataBytes*8,y=f.sigBytes*8;h[y>>>5]|=128<<24-y%32,h[(y+128>>>10<<5)+30]=Math.floor(E/4294967296),h[(y+128>>>10<<5)+31]=E,f.sigBytes=h.length*4,this._process();var l=this._hash.toX32();return l},clone:function(){var f=L.clone.call(this);return f._hash=this._hash.clone(),f},blockSize:1024/32});m.SHA512=L._createHelper(d),m.HmacSHA512=L._createHmacHelper(d)}(),P.SHA512})},"3y9D":function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.WordArray,_=T.Hasher,g=m.algo,S=[],p=g.SHA1=_.extend({_doReset:function(){this._hash=new L.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(o,i){for(var r=this._hash.words,d=r[0],f=r[1],h=r[2],E=r[3],y=r[4],l=0;l<80;l++){if(l<16)S[l]=o[i+l]|0;else{var n=S[l-3]^S[l-8]^S[l-14]^S[l-16];S[l]=n<<1|n>>>31}var s=(d<<5|d>>>27)+y+S[l];l<20?s+=(f&h|~f&E)+1518500249:l<40?s+=(f^h^E)+1859775393:l<60?s+=(f&h|f&E|h&E)-1894007588:s+=(f^h^E)-899497514,y=E,E=h,h=f<<30|f>>>2,f=d,d=s}r[0]=r[0]+d|0,r[1]=r[1]+f|0,r[2]=r[2]+h|0,r[3]=r[3]+E|0,r[4]=r[4]+y|0},_doFinalize:function(){var o=this._data,i=o.words,r=this._nDataBytes*8,d=o.sigBytes*8;return i[d>>>5]|=128<<24-d%32,i[(d+64>>>9<<4)+14]=Math.floor(r/4294967296),i[(d+64>>>9<<4)+15]=r,o.sigBytes=i.length*4,this._process(),this._hash},clone:function(){var o=_.clone.call(this);return o._hash=this._hash.clone(),o}});m.SHA1=_._createHelper(p),m.HmacSHA1=_._createHmacHelper(p)}(),P.SHA1})},4:function(I,Z){},"5hvy":function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("MlIO"))})(this,function(P){return function(m){var T=P,L=T.lib,_=L.WordArray,g=L.Hasher,S=T.x64,p=S.Word,o=T.algo,i=[],r=[],d=[];(function(){for(var E=1,y=0,l=0;l<24;l++){i[E+5*y]=(l+1)*(l+2)/2%64;var n=y%5,s=(2*E+3*y)%5;E=n,y=s}for(var E=0;E<5;E++)for(var y=0;y<5;y++)r[E+5*y]=y+(2*E+3*y)%5*5;for(var u=1,w=0;w<24;w++){for(var v=0,a=0,R=0;R<7;R++){if(u&1){var D=(1<<R)-1;D<32?a^=1<<D:v^=1<<D-32}u&128?u=u<<1^113:u<<=1}d[w]=p.create(v,a)}})();var f=[];(function(){for(var E=0;E<25;E++)f[E]=p.create()})();var h=o.SHA3=g.extend({cfg:g.cfg.extend({outputLength:512}),_doReset:function(){for(var E=this._state=[],y=0;y<25;y++)E[y]=new p.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(E,y){for(var l=this._state,n=this.blockSize/2,s=0;s<n;s++){var u=E[y+2*s],w=E[y+2*s+1];u=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360;var v=l[s];v.high^=w,v.low^=u}for(var a=0;a<24;a++){for(var R=0;R<5;R++){for(var D=0,c=0,b=0;b<5;b++){var v=l[R+5*b];D^=v.high,c^=v.low}var x=f[R];x.high=D,x.low=c}for(var R=0;R<5;R++)for(var C=f[(R+4)%5],F=f[(R+1)%5],j=F.high,k=F.low,D=C.high^(j<<1|k>>>31),c=C.low^(k<<1|j>>>31),b=0;b<5;b++){var v=l[R+5*b];v.high^=D,v.low^=c}for(var X=1;X<25;X++){var D,c,v=l[X],G=v.high,W=v.low,K=i[X];K<32?(D=G<<K|W>>>32-K,c=W<<K|G>>>32-K):(D=W<<K-32|G>>>64-K,c=G<<K-32|W>>>64-K);var B=f[r[X]];B.high=D,B.low=c}var U=f[0],H=l[0];U.high=H.high,U.low=H.low;for(var R=0;R<5;R++)for(var b=0;b<5;b++){var X=R+5*b,v=l[X],q=f[X],ie=f[(R+1)%5+5*b],ce=f[(R+2)%5+5*b];v.high=q.high^~ie.high&ce.high,v.low=q.low^~ie.low&ce.low}var v=l[0],he=d[a];v.high^=he.high,v.low^=he.low}},_doFinalize:function(){var E=this._data,y=E.words,l=this._nDataBytes*8,n=E.sigBytes*8,s=this.blockSize*32;y[n>>>5]|=1<<24-n%32,y[(m.ceil((n+1)/s)*s>>>5)-1]|=128,E.sigBytes=y.length*4,this._process();for(var u=this._state,w=this.cfg.outputLength/8,v=w/8,a=[],R=0;R<v;R++){var D=u[R],c=D.high,b=D.low;c=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,a.push(b),a.push(c)}return new _.init(a,w)},clone:function(){for(var E=g.clone.call(this),y=E._state=this._state.slice(0),l=0;l<25;l++)y[l]=y[l].clone();return E}});T.SHA3=g._createHelper(h),T.HmacSHA3=g._createHmacHelper(h)}(Math),P.SHA3})},"5nXd":function(I,Z,N){var P=N("MFOe"),m=P.slice,T=P.pluck,L=P.each,_=P.bind,g=P.create,S=P.isList,p=P.isFunction,o=P.isObject;I.exports={createStore:d};var i={version:"2.0.12",enabled:!1,get:function(f,h){var E=this.storage.read(this._namespacePrefix+f);return this._deserialize(E,h)},set:function(f,h){return h===void 0?this.remove(f):(this.storage.write(this._namespacePrefix+f,this._serialize(h)),h)},remove:function(f){this.storage.remove(this._namespacePrefix+f)},each:function(f){var h=this;this.storage.each(function(E,y){f.call(h,h._deserialize(E),(y||"").replace(h._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(f){return this._namespacePrefix=="__storejs_"+f+"_"},createStore:function(){return d.apply(this,arguments)},addPlugin:function(f){this._addPlugin(f)},namespace:function(f){return d(this.storage,this.plugins,f)}};function r(){var f=typeof console=="undefined"?null:console;if(!f)return;var h=f.warn?f.warn:f.log;h.apply(f,arguments)}function d(f,h,E){E||(E=""),f&&!S(f)&&(f=[f]),h&&!S(h)&&(h=[h]);var y=E?"__storejs_"+E+"_":"",l=E?new RegExp("^"+y):null,n=/^[a-zA-Z0-9_\-]*$/;if(!n.test(E))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var s={_namespacePrefix:y,_namespaceRegexp:l,_testStorage:function(w){try{var v="__storejs__test__";w.write(v,v);var a=w.read(v)===v;return w.remove(v),a}catch(R){return!1}},_assignPluginFnProp:function(w,v){var a=this[v];this[v]=function(){var D=m(arguments,0),c=this;function b(){return a?(L(arguments,function(C,F){D[F]=C}),a.apply(c,D)):void 0}var x=[b].concat(D);return w.apply(c,x)}},_serialize:function(w){return JSON.stringify(w)},_deserialize:function(w,v){if(!w)return v;var a="";try{a=JSON.parse(w)}catch(R){a=w}return a!==void 0?a:v},_addStorage:function(w){if(this.enabled)return;this._testStorage(w)&&(this.storage=w,this.enabled=!0)},_addPlugin:function(w){var v=this;if(S(w)){L(w,function(D){v._addPlugin(D)});return}var a=T(this.plugins,function(D){return w===D});if(a)return;if(this.plugins.push(w),!p(w))throw new Error("Plugins must be function values that return objects");var R=w.call(this);if(!o(R))throw new Error("Plugins must return an object of function properties");L(R,function(D,c){if(!p(D))throw new Error("Bad plugin property: "+c+" from plugin "+w.name+". Plugins should only return functions.");v._assignPluginFnProp(D,c)})},addStorage:function(w){r("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(w)}},u=g(s,i,{plugins:[]});return u.raw={},L(u,function(w,v){p(w)&&(u.raw[v]=_(u,w))}),L(f,function(w){u._addStorage(w)}),L(h,function(w){u._addPlugin(w)}),u}},"7Cbv":function(I,Z,N){"use strict";var P=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),m=new Uint8Array(16);function T(){if(!P)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return P(m)}var L=/^(?:[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 _(f){return typeof f=="string"&&L.test(f)}for(var g=_,S=[],p=0;p<256;++p)S.push((p+256).toString(16).substr(1));function o(f){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,E=(S[f[h+0]]+S[f[h+1]]+S[f[h+2]]+S[f[h+3]]+"-"+S[f[h+4]]+S[f[h+5]]+"-"+S[f[h+6]]+S[f[h+7]]+"-"+S[f[h+8]]+S[f[h+9]]+"-"+S[f[h+10]]+S[f[h+11]]+S[f[h+12]]+S[f[h+13]]+S[f[h+14]]+S[f[h+15]]).toLowerCase();if(!g(E))throw TypeError("Stringified UUID is invalid");return E}var i=o;function r(f,h,E){f=f||{};var y=f.random||(f.rng||T)();if(y[6]=y[6]&15|64,y[8]=y[8]&63|128,h){E=E||0;for(var l=0;l<16;++l)h[E+l]=y[l];return h}return i(y)}var d=Z.a=r},"7ahc":function(I,Z,N){"use strict";N.d(Z,"a",function(){return w});var P=N("k1fw"),m=N("0Owb"),T=N("+L6B"),L=N("2/Rp"),_=N("y8nQ"),g=N("Vl3Y"),S=N("tJVT"),p=N("OaEy"),o=N("2fM7"),i=N("cDcd"),r=N.n(i),d=N("VrN/"),f=N.n(d),h=N("p77/"),E=N.n(h),y=N("c5Ni"),l=N.n(y),n=o.a.Option,s={labelCol:{span:4},wrapperCol:{span:20}},u={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"]};Z.b=function(v){var a=v.callback,R=v.onCancel,D=Object(i.useState)("python"),c=Object(S.a)(D,2),b=c[0],x=c[1];function C(j){x(u[j][1])}function F(j){a(j)}return r.a.createElement(g.a,Object(m.a)({},s,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:F}),r.a.createElement(g.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},r.a.createElement(o.a,{onChange:C},Object.keys(u).map(function(j){return r.a.createElement(n,{key:j,value:j},u[j][0])}))),r.a.createElement(g.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},r.a.createElement(w,{mode:b})),r.a.createElement("div",{className:"flex-container flex-end"},r.a.createElement(L.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),r.a.createElement(L.a,{type:"ghost",onClick:R},"\u53D6\u6D88")))};function w(v){var a=v.value,R=v.onChange,D=v.mode,c=v.options,b=c===void 0?{}:c,x=Object(i.useRef)(),C=Object(i.useState)(),F=Object(S.a)(C,2),j=F[0],k=F[1];return Object(i.useEffect)(function(){if(j){function X(G){var W=G.getValue();R&&R(W)}return j.on("change",X),function(){j.off("change",X)}}},[j,R]),Object(i.useEffect)(function(){j&&j.setOption("mode",D)},[j,D]),Object(i.useEffect)(function(){j&&((a!==j.getValue()||a==="")&&setTimeout(function(){j.setValue(a||" ")},300))},[j,a]),Object(i.useEffect)(function(){if(x.current&&!j){var X=f.a.fromTextArea(x.current,Object(P.a)({mode:D,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},b));k(X)}},[x.current,j]),r.a.createElement("div",{className:"my-codemirror-container"},r.a.createElement("textarea",{ref:x}))}},"7ixt":function(I,Z,N){"use strict";N.d(Z,"a",function(){return T});var P={adjustX:1,adjustY:1},m=[0,0],T={left:{points:["cr","cl"],overflow:P,offset:[-4,0],targetOffset:m},right:{points:["cl","cr"],overflow:P,offset:[4,0],targetOffset:m},top:{points:["bc","tc"],overflow:P,offset:[0,-4],targetOffset:m},bottom:{points:["tc","bc"],overflow:P,offset:[0,4],targetOffset:m},topLeft:{points:["bl","tl"],overflow:P,offset:[0,-4],targetOffset:m},leftTop:{points:["tr","tl"],overflow:P,offset:[-4,0],targetOffset:m},topRight:{points:["br","tr"],overflow:P,offset:[0,-4],targetOffset:m},rightTop:{points:["tl","tr"],overflow:P,offset:[4,0],targetOffset:m},bottomRight:{points:["tr","br"],overflow:P,offset:[0,4],targetOffset:m},rightBottom:{points:["bl","br"],overflow:P,offset:[4,0],targetOffset:m},bottomLeft:{points:["tl","bl"],overflow:P,offset:[0,4],targetOffset:m},leftBottom:{points:["br","bl"],overflow:P,offset:[-4,0],targetOffset:m}},L=T},"815F":function(I,Z,N){"use strict";N.d(Z,"e",function(){return S}),N.d(Z,"c",function(){return o}),N.d(Z,"d",function(){return i}),N.d(Z,"a",function(){return d}),N.d(Z,"f",function(){return f}),N.d(Z,"b",function(){return h});var P=N("KQm4"),m=N("VTBJ"),T=N("Ff2n"),L=N("Zm9Q"),_=N("Kwbf"),g=N("OZM5");function S(E,y){return E!=null?E:y}function p(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],y=new Map;function l(n){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(u){var w=u.key,v=u.children;Object(_.a)(w!=null,"Tree node must have a certain key: [".concat(s).concat(w,"]"));var a=String(w);Object(_.a)(!y.has(a)||w===null||w===void 0,"Same 'key' exist in the Tree: ".concat(a)),y.set(a,!0),l(v,"".concat(s).concat(a," > "))})}l(E)}function o(E){function y(l){var n=Object(L.a)(l);return n.map(function(s){if(!Object(g.i)(s))return Object(_.a)(!s,"Tree/TreeNode can only accept TreeNode as children."),null;var u=s.key,w=s.props,v=w.children,a=Object(T.a)(w,["children"]),R=Object(m.a)({key:u},a),D=y(v);return D.length&&(R.children=D),R}).filter(function(s){return s})}return y(E)}function i(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],l=new Set(y===!0?[]:y),n=[];function s(u){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return u.map(function(v,a){var R=Object(g.h)(w?w.pos:"0",a),D=S(v.key,R),c=Object(m.a)(Object(m.a)({},v),{},{parent:w,pos:R,children:null,data:v,isStart:[].concat(Object(P.a)(w?w.isStart:[]),[a===0]),isEnd:[].concat(Object(P.a)(w?w.isEnd:[]),[a===u.length-1])});return n.push(c),y===!0||l.has(D)?c.children=s(v.children||[],c):c.children=[],c})}return s(E),n}function r(E,y,l){var n;l?typeof l=="string"?n=function(w){return w[l]}:typeof l=="function"&&(n=function(w){return l(w)}):n=function(w,v){return S(w.key,v)};function s(u,w,v){var a=u?u.children:E,R=u?Object(g.h)(v.pos,w):"0";if(u){var D=n(u,R),c={node:u,index:w,pos:R,key:D,parentPos:v.node?v.pos:null,level:v.level+1};y(c)}a&&a.forEach(function(b,x){s(b,x,{node:u,pos:R,level:v?v.level+1:-1})})}s(null)}function d(E){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=y.initWrapper,n=y.processEntity,s=y.onProcessFinished,u=arguments.length>2?arguments[2]:void 0,w={},v={},a={posEntities:w,keyEntities:v};return l&&(a=l(a)||a),r(E,function(R){var D=R.node,c=R.index,b=R.pos,x=R.key,C=R.parentPos,F=R.level,j={node:D,index:c,key:x,pos:b,level:F},k=S(x,b);w[b]=j,v[k]=j,j.parent=w[C],j.parent&&(j.parent.children=j.parent.children||[],j.parent.children.push(j)),n&&n(j,a)},u),s&&s(a),a}function f(E,y){var l=y.expandedKeys,n=y.selectedKeys,s=y.loadedKeys,u=y.loadingKeys,w=y.checkedKeys,v=y.halfCheckedKeys,a=y.dragOverNodeKey,R=y.dropPosition,D=y.keyEntities,c=D[E],b={eventKey:E,expanded:l.indexOf(E)!==-1,selected:n.indexOf(E)!==-1,loaded:s.indexOf(E)!==-1,loading:u.indexOf(E)!==-1,checked:w.indexOf(E)!==-1,halfChecked:v.indexOf(E)!==-1,pos:String(c?c.pos:""),dragOver:a===E&&R===0,dragOverGapTop:a===E&&R===-1,dragOverGapBottom:a===E&&R===1};return b}function h(E){var y=E.data,l=E.expanded,n=E.selected,s=E.checked,u=E.loaded,w=E.loading,v=E.halfChecked,a=E.dragOver,R=E.dragOverGapTop,D=E.dragOverGapBottom,c=E.pos,b=E.active,x=Object(m.a)(Object(m.a)({},y),{},{expanded:l,selected:n,checked:s,loaded:u,loading:w,halfChecked:v,dragOver:a,dragOverGapTop:R,dragOverGapBottom:D,pos:c,active:b});return"props"in x||Object.defineProperty(x,"props",{get:function(){return Object(_.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),E}}),x}},"8EBN":function(I,Z,N){(function(P){P(N("VrN/"))})(function(P){"use strict";P.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var m=0;m<P.modeInfo.length;m++){var T=P.modeInfo[m];T.mimes&&(T.mime=T.mimes[0])}P.findModeByMIME=function(L){L=L.toLowerCase();for(var _=0;_<P.modeInfo.length;_++){var g=P.modeInfo[_];if(g.mime==L)return g;if(g.mimes){for(var S=0;S<g.mimes.length;S++)if(g.mimes[S]==L)return g}}if(/\+xml$/.test(L))return P.findModeByMIME("application/xml");if(/\+json$/.test(L))return P.findModeByMIME("application/json")},P.findModeByExtension=function(L){L=L.toLowerCase();for(var _=0;_<P.modeInfo.length;_++){var g=P.modeInfo[_];if(g.ext){for(var S=0;S<g.ext.length;S++)if(g.ext[S]==L)return g}}},P.findModeByFileName=function(L){for(var _=0;_<P.modeInfo.length;_++){var g=P.modeInfo[_];if(g.file&&g.file.test(L))return g}var S=L.lastIndexOf("."),p=S>-1&&L.substring(S+1,L.length);if(p)return P.findModeByExtension(p)},P.findModeByName=function(L){L=L.toLowerCase();for(var _=0;_<P.modeInfo.length;_++){var g=P.modeInfo[_];if(g.name.toLowerCase()==L)return g;if(g.alias){for(var S=0;S<g.alias.length;S++)if(g.alias[S].toLowerCase()==L)return g}}}})},"8hTe":function(I,Z,N){I.exports={button:"button___1wy9m"}},"9Bee":function(I,Z,N){"use strict";var P=N("DYRE"),m=N("zeV3"),T=N("+L6B"),L=N("2/Rp"),_=N("k1fw"),g=N("tJVT"),S=N("cDcd"),p=N.n(S),o=N("vg9a"),i=N("DlQD"),r=N.n(i),d=N("rUJ1");function f(ne,le){var ue=ne.match(/^(\s+)(?:```)/);if(ue===null)return le;var te=ue[1];return le.split(`
|
|
|
`).map(function(oe){var Q=oe.match(/^\s+/);if(Q===null)return oe;var se=Object(g.a)(Q,1),J=se[0];return J.length>=te.length?oe.slice(te.length):oe}).join(`
|
|
|
`)}var h=[],E=["<ul>"],y=new r.a.Renderer,l=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function n(){h.length=0,E=["<ul>"]}var s={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function u(ne,le,ue,te){if(le>=ne.length||ne[le].level<=ue)return le;var oe=ne[le];te.push("<li><a href='#"+oe.anchor+"'>"+oe.text+"</a>"),le++;var Q=[];return le=u(ne,le,oe.level,Q),Q.length>0&&(te.push("<ul>"),Q.forEach(function(se){te.push(se)}),te.push("</ul>")),te.push("</li>"),le=u(ne,le,ue,te),le}function w(){return u(h,0,0,E),E.push("</ul>"),E.join("")}var v={heading:function(le){var ue=l.exec(le);if(ue)return{type:"heading",raw:ue[0],depth:ue[1].length,text:ue[2]}},fences:function(le){var ue=this.rules.block.fences.exec(le);if(ue){var te=ue[0],oe=f(te,ue[3]||""),Q=ue[2]?ue[2].trim():ue[2];if(["latex","katex","math"].indexOf(Q)>=0){var se=D(),J=oe;oe=se,c[se]={type:"block",expression:J}}return{type:"code",raw:te,lang:Q,text:oe}}}},a=/(?:\${2})([^\n`]+?)(?:\${2})/gi,R=0,D=function(){return"__special_katext_id_".concat(R++,"__")},c={};function b(){return c}function x(){R=0,c={}}function C(ne){return ne=ne.replace(a,function(le,ue){var te=D();return c[te]={type:"inline",expression:ue},te}),ne}var F=y.listitem;y.listitem=function(ne){return F(C(ne))};var j=y.paragraph;y.paragraph=function(ne){return j(C(ne))};var k=y.tablecell;y.tablecell=function(ne,le){return k(C(ne),le)},y.code=function(ne,le,ue){var te=(le||"").match(/\S*/)[0];return te?["latex","katex","math"].indexOf(te)>=0?"<p class='editormd-tex'>".concat(ne,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(le,'">').concat(ue?ne:Object(d.escape)(ne,!0),`</code></pre>
|
|
|
`):'<pre class="prettyprint linenums"><code>'+(ue?ne:Object(d.escape)(ne,!0))+"</code></pre>"},y.heading=function(ne,le,ue){var te=this.options.headerPrefix+ue.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return h.push({anchor:te,level:le,text:ne}),"<h"+le+' id="'+te+'">'+ne+"</h"+le+">"},r.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),r.a.use({tokenizer:v,renderer:y});var X=r.a,G=N("SJMd"),W=N("ulZh"),K=N.n(W),B=N("m3rI"),U=N("Oy/b"),H=N("p5ED"),q=N("8hTe"),ie=N.n(q),ce=/<pre[^>]*>/g;function he(ne){var le=document.createElement("div");return le.innerHTML=ne,le.childNodes.length===0?"":le.childNodes[0].nodeValue}var be=Z.a=function(ne){var le=ne.value,ue=le===void 0?"":le,te=ne.edit,oe=te===void 0?!1:te,Q=ne.className,se=ne.showTextOnly,J=ne.showLines,ee=ne.replaces,ge=ne.zoomImg,re=ne.hasMask,Y=ne.style,z=Y===void 0?{}:Y,$=ne.stylesPrev,me=$===void 0?{}:$,pe=String(ue),xe=Object(S.useRef)(),Re=Object(S.useRef)(),ke=Object(S.useState)(""),Ne=Object(g.a)(ke,2),Pe=Ne[0],je=Ne[1],Fe=Object(S.useState)("office"),We=Object(g.a)(Fe,2),_e=We[0],Ge=We[1],Ve=Object(S.useMemo)(function(){try{var Ae=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,ye=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ee=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;pe=pe.replace(Ae,"("+B.a.API_SERVER+"/api/attachments/").replace(ye,'"'+B.a.API_SERVER+"/api/attachments/").replace(Ee,'"'+B.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(Be){}var we=X(pe),Oe=b();if(pe.match(/\[TOC\]/)&&(we=we.replace("<p>[TOC]</p>",w()),n()),we=we.replace(/(__special_katext_id_\d+__)/g,function(Be,Ke){var qe=Oe[Ke],et=qe.type,it=qe.expression;return Object(U.renderToString)(he(it)||"",{displayMode:et==="block",throwOnError:!1,output:"html"})}),we=we.replace(/▁/g,"\u2581\u2581\u2581"),x(),se){var Ce=document.createElement("div");return Ce.innerHTML=we,Ce.innerText}return setTimeout(function(){return Le()},500),we},[pe]),Ie=Object(S.useRef)();s.WebkitLineClamp=J,J&&(z=Object(_.a)(Object(_.a)({},z),s));function He(Ae){var ye=Ae.target;if(ye.tagName.toUpperCase()==="IMG"){if(ge){var Ee=ye.getAttribute("src");je(Ee),Ge("image")}}else if(ye.tagName.toUpperCase()==="A"){var we=ye.getAttribute("href");if(we.indexOf("office")>-1)Ae.preventDefault(),je(we),Ge("office");else if(we.indexOf("application/pdf")>-1)Ae.preventDefault(),je(we),Ge("pdf");else if(we.indexOf("text/html")>-1)Ae.preventDefault(),je(we),Ge("html");else if(we.startsWith("#")){Ae.preventDefault();var Oe=document.getElementById(we.replace("#",""));Oe&&Oe.scrollIntoView(!0)}}}var Le=function(){var ye,Ee=(ye=Ie.current)===null||ye===void 0?void 0:ye.querySelectorAll("video");Ee==null||Ee.forEach(function(we){if(we.oncontextmenu=function(){return!1},we.src.indexOf(".m3u8")>-1&&!we.canPlayType("application/vnd.apple.mpegurl")){if(K.a.isSupported()){var Oe=new K.a;Oe.loadSource(we.src),Oe.attachMedia(we)}}})};Object(S.useEffect)(function(){if(Ie.current&&Ve&&(Ve.match(ce)&&window.PR.prettyPrint()),Ie.current)return Ie.current.addEventListener("click",He),function(){Ie.current.removeEventListener("click",He),x(),n()}},[Ve,Ie.current,He]);var Te=function(ye){if(!oe)return;ye.target.nodeName==="IMG"?(xe.current.style.display="flex",xe.current.style.width=ye.target.clientWidth+"px",xe.current.style.height=ye.target.clientHeight+"px",xe.current.style.top=ye.target.offsetTop+"px",xe.current.style.left=ye.target.offsetLeft+"px",Re.current.src=ye.target.getAttribute("src")):xe.current.style.display="none"};return p.a.createElement("div",{style:{position:"relative"}},p.a.createElement("div",{ref:Ie,style:Object(_.a)({},z),className:"".concat(Q||""," markdown-body ").concat(ie.a.mdBody),onMouseOver:Te,dangerouslySetInnerHTML:{__html:Ve}}),p.a.createElement("div",{ref:xe,className:ie.a.button},p.a.createElement(m.a,null,p.a.createElement(L.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),p.a.createElement(L.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),p.a.createElement("img",{ref:Re,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),p.a.createElement(H.a,{close:!0,data:Pe,type:Pe!=null&&Pe.length?_e:"",style:Object(_.a)({},me),onClose:function(){return je("")}}))}},"9OqN":function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.mode.CTR=function(){var m=P.lib.BlockCipherMode.extend(),T=m.Encryptor=m.extend({processBlock:function(L,_){var g=this._cipher,S=g.blockSize,p=this._iv,o=this._counter;p&&(o=this._counter=p.slice(0),this._iv=void 0);var i=o.slice(0);g.encryptBlock(i,0),o[S-1]=o[S-1]+1|0;for(var r=0;r<S;r++)L[_+r]^=i[r]}});return m.Decryptor=T,m}(),P.mode.CTR})},"9VGf":function(I,Z,N){"use strict";N.d(Z,"a",function(){return T});var P=N("cDcd"),m=N.n(P);function T(L,_){var g=Object(P.useRef)();Object(P.useEffect)(function(){g.current=L}),Object(P.useEffect)(function(){function S(){g.current()}if(_!==null){var p=setInterval(S,_);return function(){return clearInterval(p)}}},[_])}},ALsQ:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.mode.CFB=function(){var m=P.lib.BlockCipherMode.extend();m.Encryptor=m.extend({processBlock:function(L,_){var g=this._cipher,S=g.blockSize;T.call(this,L,_,S,g),this._prevBlock=L.slice(_,_+S)}}),m.Decryptor=m.extend({processBlock:function(L,_){var g=this._cipher,S=g.blockSize,p=L.slice(_,_+S);T.call(this,L,_,S,g),this._prevBlock=p}});function T(L,_,g,S){var p,o=this._iv;o?(p=o.slice(0),this._iv=void 0):p=this._prevBlock,S.encryptBlock(p,0);for(var i=0;i<g;i++)L[_+i]^=p[i]}return m}(),P.mode.CFB})},B7Ph:function(I,Z,N){"use strict";N.d(Z,"a",function(){return ie});var P=N("5NDa"),m=N("5rEg"),T=N("sRBo"),L=N("kaz8"),_=N("5Dmo"),g=N("3S7+"),S=N("14J3"),p=N("BMrR"),o=N("7Kak"),i=N("9yH6"),r=N("+L6B"),d=N("2/Rp"),f=N("2qtc"),h=N("kLXV"),E=N("miYZ"),y=N("tsqr"),l=N("k1fw"),n=N("9og8"),s=N("tJVT"),u=N("oBTY"),w=N("DZo9"),v=N("8z0m"),a=N("WmNS"),R=N.n(a),D=N("cDcd"),c=N.n(D),b=N("Bvq2"),x=N.n(b),C=N("nj2k"),F=N.n(C),j=N("mxV5"),k=N.n(j),X=N("KhGG"),G=N("ErOA"),W=N("7Cbv"),K=N("1vsH"),B=N("p5ED"),U=v.a.Dragger,H=function(he){for(var be=function(ge){return ge&&ge.substring(0,ge.lastIndexOf("."))},ne=Object(u.a)(he),le=0,ue=[],te=0;te<ne.length;te++){for(var oe="",Q=0;Q<ue.length;Q++)if(be(ue[Q][0].name)==be(ne[te].name)){le=1,oe=Q;break}if(le==1)ue[oe].push(ne[te]),le=0;else if(le==0){var se=new Array;se.push(ne[te]),ue.push(se)}}var J=ue.map(function(ee){if(ee[0].name.includes(".in"))return ee.length===2?ee:[ee[0],{}];if(ee[0].name.includes(".out"))return ee.length===2?ee.reverse():[{},ee[0]]});return J},q=function(he){var be=he.onClose,ne=he.onOK,le=he.visible,ue=he.wrapClassName,te=he.rootIdentifier,oe=he.multiple,Q=oe===void 0?!1:oe,se=he.defaultMultipleValue,J=se===void 0?!0:se,ee=Object(D.useState)([]),ge=Object(s.a)(ee,2),re=ge[0],Y=ge[1],z=Object(D.useState)({}),$=Object(s.a)(z,2),me=$[0],pe=$[1],xe=Object(D.useState)(!1),Re=Object(s.a)(xe,2),ke=Re[0],Ne=Re[1],Pe=Object(D.useState)(!0),je=Object(s.a)(Pe,2),Fe=je[0],We=je[1],_e=Object(D.useRef)([]),Ge=Object(D.useRef)(0),Ve=function(){be()};Object(D.useEffect)(function(){Ie()},[]),Object(D.useEffect)(function(){le&&(_e.current=[],Ge.current=0,Y([]),We(J))},[le]);var Ie=function(){var Oe=Object(n.a)(R.a.mark(function Ce(){var Be,Ke;return R.a.wrap(function(et){for(;;)switch(et.prev=et.next){case 0:return et.prev=0,et.next=3,Object(G.a)("/api/buckets/get_upload_token_for_big_files",{method:"get"});case 3:Be=et.sent,Ke=JSON.parse(Object(X.a)(Be.data)),pe(Ke),et.next=10;break;case 8:et.prev=8,et.t0=et.catch(0);case 10:case"end":return et.stop()}},Ce,null,[[0,8]])}));return function(){return Oe.apply(this,arguments)}}(),He=function(Ce){return Ce&&Ce.substring(0,Ce.lastIndexOf("."))},Le=function(Ce){var Be,Ke,qe=He((Be=Ce[0])===null||Be===void 0?void 0:Be.name)||He((Ke=Ce[1])===null||Ke===void 0?void 0:Ke.name),et=re.filter(function(it){return He(it.name)!==qe});_e.current=Object(u.a)(et),Y(Object(u.a)(et))},Te=function(Ce){if(!Fe){var Be=new FormData;Be.append("file",Ce.file);var Ke=Object(G.a)("/api/attachments/get_file_content.json",{method:"post",body:Be},!0);Ke.then(function(at){if(at.status===0){Ge.current=Ge.current+1;var Rt=_e.current.map(function(Pt){if(Pt.name===Ce.name){var Ft,ct=Object(l.a)({},Pt);return Ce!=null&&(Ft=Ce.name)!==null&&Ft!==void 0&&Ft.includes(".in")?ct.input=at==null?void 0:at.content:ct.output=at==null?void 0:at.content,ct}return Pt});if(_e.current=Object(u.a)(Rt),Y(Object(u.a)(Rt)),Ge.current>0&&Ge.current===re.length){Ne(!1);var Tt=H(Rt);Tt=Tt.filter(function(Pt){var Ft,ct;return!!((Ft=Pt[0])!==null&&Ft!==void 0&&Ft.name&&(ct=Pt[1])!==null&&ct!==void 0&&ct.name)}),Tt=Tt.map(function(Pt){return Object(l.a)(Object(l.a)(Object(l.a)({},Pt[0]),Pt[1]),{},{is_file:!1})}),ne(Tt),be()}}else Ne(!1),be()});return}var qe=new k.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}),et=Ce.name,it={container_type:"TestSet",file_name:et},pt=Object(W.a)(),gt="testsets/".concat(te,"/").concat(pt).concat(et.indexOf(".")>-1?"."+et.split(".").pop():"");te===null&&(gt="testsets/".concat(pt).concat(et.indexOf(".")>-1?"."+et.split(".").pop():"")),qe.multipartUpload(gt,new Blob([Ce.file],{type:Ce.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:et+""},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(G.e)(it)}}).then(function(at){if(at.data.status===0){Ge.current=Ge.current+1;var Rt=_e.current.map(function(Pt){var Ft,ct;if(Pt.name===((Ft=at.data)===null||Ft===void 0||((ct=Ft.data)===null||ct===void 0)?void 0:ct.file_name)){var mr,Or,dr,Ye=Object(l.a)({},Pt);if((mr=at.data)!==null&&mr!==void 0&&(Or=mr.data)!==null&&Or!==void 0&&(dr=Or.file_name)!==null&&dr!==void 0&&dr.includes(".in")){var ht,Wt,Mt,Bt,Ct,kt;Ye.in_object_key=(ht=at.data)===null||ht===void 0||((Wt=ht.data)===null||Wt===void 0)?void 0:Wt.object,Ye.in_object_size=(Mt=at.data)===null||Mt===void 0||((Bt=Mt.data)===null||Bt===void 0)?void 0:Bt.size,Ye.input=(Ct=at.data)===null||Ct===void 0||((kt=Ct.data)===null||kt===void 0)?void 0:kt.file_name,Ye.in_file=Ce}else{var ut,Ot,qt,Vt,It,tr;Ye.out_object_key=(ut=at.data)===null||ut===void 0||((Ot=ut.data)===null||Ot===void 0)?void 0:Ot.object,Ye.out_object_size=(qt=at.data)===null||qt===void 0||((Vt=qt.data)===null||Vt===void 0)?void 0:Vt.size,Ye.output=(It=at.data)===null||It===void 0||((tr=It.data)===null||tr===void 0)?void 0:tr.file_name,Ye.out_file=Ce}return Ye}return Pt});if(_e.current=Object(u.a)(Rt),Y(Object(u.a)(Rt)),Ge.current>0&&Ge.current===re.length){Ne(!1);var Tt=H(Rt);Tt=Tt.filter(function(Pt){var Ft,ct;return!!((Ft=Pt[0])!==null&&Ft!==void 0&&Ft.name&&(ct=Pt[1])!==null&&ct!==void 0&&ct.name)}),Tt=Tt.map(function(Pt){return Object(l.a)(Object(l.a)(Object(l.a)({},Pt[0]),Pt[1]),{},{is_file:!0})}),ne(Tt),be()}}})},Ae=function(Ce){return new Promise(function(Be,Ke){for(var qe=0,et=[],it=function(at){Ce[at].file.slice(0,1).arrayBuffer().then(function(){qe++,qe===Ce.length&&(et.length?(y.b.warn("".concat(et.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Ke()):Be(Ce))}).catch(function(Rt){console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",Rt),qe++,et.push(Ce[at].name),qe===Ce.length&&(et.length?(y.b.warn("".concat(et.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Ke()):Be(Ce))})},pt=0;pt<Ce.length;pt++)it(pt)})},ye=function(){var Oe=Object(n.a)(R.a.mark(function Ce(){var Be;return R.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:if(!(re.length===0)){qe.next=3;break}return y.b.warn("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6"),qe.abrupt("return");case 3:return qe.next=5,Ae(re);case 5:if(Ne(!0),Be=H(re),!Be.some(function(et){var it,pt;return!((it=et[0])!==null&&it!==void 0&&it.name&&(pt=et[1])!==null&&pt!==void 0&&pt.name)})){qe.next=10;break}return h.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 et=Object(n.a)(R.a.mark(function pt(){return R.a.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:re.map(function(){var Rt=Object(n.a)(R.a.mark(function Tt(Pt){return R.a.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:Te(Pt);case 1:case"end":return ct.stop()}},Tt)}));return function(Tt){return Rt.apply(this,arguments)}}());case 1:case"end":return at.stop()}},pt)}));function it(){return et.apply(this,arguments)}return it}(),onCancel:function(){Ne(!1)}}),qe.abrupt("return");case 10:re.map(function(){var et=Object(n.a)(R.a.mark(function it(pt){return R.a.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:Te(pt);case 1:case"end":return at.stop()}},it)}));return function(it){return et.apply(this,arguments)}}());case 11:case"end":return qe.stop()}},Ce)}));return function(){return Oe.apply(this,arguments)}}(),Ee={name:"file",fileList:re,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:function(Ce){if(re!=null&&re.some(function(Ke){return Ke.name===Ce.name}))return y.b.info("".concat(Ce.name,"\u6587\u4EF6\u5DF2\u5B58\u5728")),!1;if(Ce.size/1024/1024>100)return y.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(Ce.name))return y.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var Be={name:Ce.name,uid:Ce.uid,file:Ce,percent:0};return re.push(Be),_e.current=Object(u.a)(re),Y(Object(u.a)(re)),!1}},we=H(re);return console.log(re,we,"fileList"),c.a.createElement(h.a,{visible:le,wrapClassName:ue,onOk:ye,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:ke},onCancel:Ve,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},c.a.createElement("div",{className:x.a.wrap},re.length?c.a.createElement("div",null,c.a.createElement(p.a,{justify:"space-between",align:"middle",className:"mb20"},c.a.createElement("div",{style:{visibility:Q?"visible":"hidden"}},"\u6D4B\u8BD5\u7528\u4F8B\u7C7B\u578B\uFF1A",c.a.createElement(i.a.Group,{className:"ml10",value:Fe,onChange:function(Ce){return We(Ce.target.value)}},c.a.createElement(i.a,{value:!1},"\u6587\u672C"),c.a.createElement(i.a,{value:!0},"\u6587\u4EF6"))),c.a.createElement(v.a,Ee,c.a.createElement(d.a,{className:x.a.btnS},"\u4E0A\u4F20\u6587\u4EF6"))),c.a.createElement(ie,{data:we,onRemove:Le})):c.a.createElement("div",{className:x.a.noData},c.a.createElement("img",{src:F.a,alt:""}),c.a.createElement(v.a,Ee,c.a.createElement(d.a,{className:x.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),c.a.createElement("div",{className:x.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",c.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",c.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",c.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",c.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",c.a.createElement("br",null))))},ie=function(he){var be=he.data,ne=be===void 0?[]:be,le=he.onRemove,ue=he.width,te=ue===void 0?"auto":ue,oe=he.showScore,Q=oe===void 0?!1:oe,se=he.disabled,J=se===void 0?!1:se,ee=he.inputChange,ge=he.onEvaluatingChange,re=he.showEvaluatingSetting,Y=re===void 0?!1:re,z={value:"",filename:"",dataUrl:""},$=Object(D.useState)(Object(l.a)({},z)),me=Object(s.a)($,2),pe=me[0],xe=me[1],Re=function(je){var Fe=document.createElement("a");document.body.appendChild(Fe);var We=URL.createObjectURL(je.file);Fe.href=We,Fe.download=je.name,Fe.click(),URL.revokeObjectURL(We),document.body.removeChild(Fe)},ke=function(je,Fe){Object(K.y)(je,Fe)},Ne=function(je,Fe){h.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:c.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){le(je,Fe)},onCancel:function(){}})};return ne.length?c.a.createElement("div",{style:{width:te}},c.a.createElement("div",{className:x.a.head},Y&&c.a.createElement("div",{style:{width:"10%"}},"\u9690\u85CF",c.a.createElement(g.a,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},c.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),c.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),c.a.createElement("div",{style:{width:Q?"25%":"35%",padding:"0 12px"}},"\u8F93\u5165"),c.a.createElement("div",{style:{width:Q?"25%":"35%",padding:"0 12px"}},"\u8F93\u51FA"),Q&&c.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),Y&&c.a.createElement("div",{style:{width:"20%"}},"\u9884\u671F\u8F93\u51FA",c.a.createElement(g.a,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},c.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),Y&&c.a.createElement("div",{style:{width:"20%"}},"\u7279\u6B8A\u5224\u5B9A",c.a.createElement(g.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"},c.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),c.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),ne.map(function(Pe,je){var Fe,We,_e,Ge;return c.a.createElement("div",{key:je,className:x.a.list},Y&&c.a.createElement("div",{style:{width:"10%"}},c.a.createElement(L.a,{checked:!!Pe.hidden,onChange:function(Ie){ge(Ie.target.checked?1:0,je,"hidden")}})),c.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",je+1),c.a.createElement("div",{className:x.a.info,style:{width:Q?"25%":"35%"}},c.a.createElement("span",{title:Pe.input||((Fe=Pe[0])===null||Fe===void 0?void 0:Fe.name),onClick:Object(n.a)(R.a.mark(function Ve(){var Ie,He;return R.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:if(Pe.input?Pe.input_file_url?Ie=Pe.input_file_url:Ie=Pe.in_file:Ie=Pe[0],!(typeof Ie=="string")){Te.next=14;break}return Te.next=4,fetch(Ie,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return He=Te.sent,Te.t0=xe,Te.next=8,He.text();case 8:Te.t1=Te.sent,Te.t2=Ie,Te.t3={value:Te.t1,filename:"",dataUrl:Te.t2},(0,Te.t0)(Te.t3),Te.next=18;break;case 14:return Te.next=16,Object(K.H)(Ie.file);case 16:He=Te.sent,xe({value:He.text,filename:Ie.name,dataUrl:He.link});case 18:case"end":return Te.stop()}},Ve)}))},Pe.input||((We=Pe[0])===null||We===void 0?void 0:We.name))),c.a.createElement("div",{className:x.a.info,style:{width:Q?"25%":"35%"}},c.a.createElement("span",{title:Pe.output||((_e=Pe[1])===null||_e===void 0?void 0:_e.name),onClick:Object(n.a)(R.a.mark(function Ve(){var Ie,He;return R.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:if(Pe.input?Pe.output_file_url?Ie=Pe.output_file_url:Ie=Pe.out_file:Ie=Pe[1],!(typeof Ie=="string")){Te.next=14;break}return Te.next=4,fetch(Ie,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return He=Te.sent,Te.t0=xe,Te.next=8,He.text();case 8:Te.t1=Te.sent,Te.t2=Ie,Te.t3={value:Te.t1,filename:"",dataUrl:Te.t2},(0,Te.t0)(Te.t3),Te.next=18;break;case 14:return Te.next=16,Object(K.H)(Ie.file);case 16:He=Te.sent,xe({value:He.text,filename:Ie.name,dataUrl:He.link});case 18:case"end":return Te.stop()}},Ve)}))},Pe.output||((Ge=Pe[1])===null||Ge===void 0?void 0:Ge.name))),Q&&c.a.createElement("div",{style:{width:"20%"}},c.a.createElement(m.a,{disabled:J,style:{width:"70%"},onChange:function(Ie){return ee(Ie,je)},value:Pe.score}),c.a.createElement("span",null,"\xA0%")),Y&&c.a.createElement("div",{style:{width:"20%"}},c.a.createElement(L.a,{checked:Pe.is_invisible||!1,onChange:function(Ie){ge(Ie.target.checked,je,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),Y&&c.a.createElement("div",{style:{width:"20%"}},c.a.createElement(L.a,{checked:Pe.last_match_rule||!1,onChange:function(Ie){ge(Ie.target.checked,je,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),c.a.createElement("div",{onClick:function(){return Ne(Pe,je)},style:{width:"10%"}},c.a.createElement("span",{className:x.a.del},"\u5220\u9664")))}),c.a.createElement(B.a,{close:!0,data:pe.dataUrl,filename:pe.filename,type:pe.dataUrl.length?"txt":"",onClose:function(){return xe(Object(l.a)({},z))},monacoEditor:{value:pe.value,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):c.a.createElement(c.a.Fragment,null)};Z.b=q},Bd2K:function(I,Z,N){(function(P){P(N("VrN/"),N("osHv"))})(function(P){P.defineOption("autoCloseTags",!1,function(o,i,r){if(r!=P.Init&&r&&o.removeKeyMap("autoCloseTags"),!i)return;var d={name:"autoCloseTags"};(typeof i!="object"||i.whenClosing!==!1)&&(d["'/'"]=function(f){return g(f)}),(typeof i!="object"||i.whenOpening!==!1)&&(d["'>'"]=function(f){return L(f)}),o.addKeyMap(d)});var m=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],T=["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 L(o){if(o.getOption("disableInput"))return P.Pass;for(var i=o.listSelections(),r=[],d=o.getOption("autoCloseTags"),f=0;f<i.length;f++){if(!i[f].empty())return P.Pass;var h=i[f].head,E=o.getTokenAt(h),y=P.innerMode(o.getMode(),E.state),l=y.state,n=y.mode.xmlCurrentTag&&y.mode.xmlCurrentTag(l),s=n&&n.name;if(!s)return P.Pass;var u=y.mode.configuration=="html",w=typeof d=="object"&&d.dontCloseTags||u&&m,v=typeof d=="object"&&d.indentTags||u&&T;E.end>h.ch&&(s=s.slice(0,s.length-E.end+h.ch));var a=s.toLowerCase();if(!s||E.type=="string"&&(E.end!=h.ch||!/[\"\']/.test(E.string.charAt(E.string.length-1))||E.string.length==1)||E.type=="tag"&&n.close||E.string.indexOf("/")==h.ch-E.start-1||w&&S(w,a)>-1||p(o,y.mode.xmlCurrentContext&&y.mode.xmlCurrentContext(l)||[],s,h,!0))return P.Pass;var R=typeof d=="object"&&d.emptyTags;if(R&&S(R,s)>-1){r[f]={text:"/>",newPos:P.Pos(h.line,h.ch+2)};continue}var D=v&&S(v,a)>-1;r[f]={indent:D,text:">"+(D?`
|
|
|
|
|
|
`:"")+"</"+s+">",newPos:D?P.Pos(h.line+1,0):P.Pos(h.line,h.ch+1)}}for(var c=typeof d=="object"&&d.dontIndentOnAutoClose,f=i.length-1;f>=0;f--){var b=r[f];o.replaceRange(b.text,i[f].head,i[f].anchor,"+insert");var x=o.listSelections().slice(0);x[f]={head:b.newPos,anchor:b.newPos},o.setSelections(x),!c&&b.indent&&(o.indentLine(b.newPos.line,null,!0),o.indentLine(b.newPos.line+1,null,!0))}}function _(o,i){for(var r=o.listSelections(),d=[],f=i?"/":"</",h=o.getOption("autoCloseTags"),E=typeof h=="object"&&h.dontIndentOnSlash,y=0;y<r.length;y++){if(!r[y].empty())return P.Pass;var l=r[y].head,n=o.getTokenAt(l),s=P.innerMode(o.getMode(),n.state),u=s.state;if(i&&(n.type=="string"||n.string.charAt(0)!="<"||n.start!=l.ch-1))return P.Pass;var w,v=s.mode.name!="xml"&&o.getMode().name=="htmlmixed";if(v&&s.mode.name=="javascript")w=f+"script";else if(v&&s.mode.name=="css")w=f+"style";else{var a=s.mode.xmlCurrentContext&&s.mode.xmlCurrentContext(u);if(!a||a.length&&p(o,a,a[a.length-1],l))return P.Pass;w=f+a[a.length-1]}o.getLine(l.line).charAt(n.end)!=">"&&(w+=">"),d[y]=w}if(o.replaceSelections(d),r=o.listSelections(),!E)for(var y=0;y<r.length;y++)(y==r.length-1||r[y].head.line<r[y+1].head.line)&&o.indentLine(r[y].head.line)}function g(o){return o.getOption("disableInput")?P.Pass:_(o,!0)}P.commands.closeTag=function(o){return _(o)};function S(o,i){if(o.indexOf)return o.indexOf(i);for(var r=0,d=o.length;r<d;++r)if(o[r]==i)return r;return-1}function p(o,i,r,d,f){if(!P.scanForClosingTag)return!1;var h=Math.min(o.lastLine()+1,d.line+500),E=P.scanForClosingTag(o,d,null,h);if(!E||E.tag!=r)return!1;for(var y=f?1:0,l=i.length-1;l>=0&&i[l]==r;l--)++y;d=E.to;for(var l=1;l<y;l++){var n=P.scanForClosingTag(o,d,null,h);if(!n||n.tag!=r)return!1;d=n.to}return!0}})},BjJ7:function(I,Z,N){"use strict";N.d(Z,"d",function(){return m}),N.d(Z,"c",function(){return T}),N.d(Z,"e",function(){return L}),N.d(Z,"b",function(){return _}),N.d(Z,"a",function(){return S});var P=N("m3rI");function m(p){var o=!0;if(p.length>0){for(var i=0;i<p.length;i++)if(p[i].compile_success==0||!p[i].compile_success){o=!1;break}}else o=!1;return o}function T(p){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=[],r=0;r<p.length;r++){var d=p[r],f=o?"".concat(o,"/").concat(d.name):"".concat(d.name);i.push({title:d.name,isLeaf:!(d.type==="tree"),key:f})}return i}function L(p,o,i){for(var r=0;r<p.length;r++){var d=p[r];if(d.key===o){d.children=i;break}d.children&&L(d.children,o,i)}return p}function _(p,o,i){var r;return function(){var d=this,f=arguments,h=function(){r=null,i||p.apply(d,f)},E=i&&!r;clearTimeout(r),r=setTimeout(h,o),E&&p.apply(d,f)}}var g=!0,S=P.a.API_SERVER},Bvq2:function(I,Z,N){I.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(I,Z,N){},CrYA:function(I,Z,N){var P=N("MFOe"),m=P.Global;I.exports={name:"sessionStorage",read:L,write:_,each:g,remove:S,clearAll:p};function T(){return m.sessionStorage}function L(o){return T().getItem(o)}function _(o,i){return T().setItem(o,i)}function g(o){for(var i=T().length-1;i>=0;i--){var r=T().key(i);o(L(r),r)}}function S(o){return T().removeItem(o)}function p(){return T().clear()}},DlQD:function(I,Z,N){(function(P,m){I.exports=m()})(this,function(){"use strict";function P(Le,Te){for(var Ae=0;Ae<Te.length;Ae++){var ye=Te[Ae];ye.enumerable=ye.enumerable||!1,ye.configurable=!0,"value"in ye&&(ye.writable=!0),Object.defineProperty(Le,ye.key,ye)}}function m(Le,Te,Ae){return Te&&P(Le.prototype,Te),Ae&&P(Le,Ae),Le}function T(Le,Te){if(!Le)return;if(typeof Le=="string")return L(Le,Te);var Ae=Object.prototype.toString.call(Le).slice(8,-1);if(Ae==="Object"&&Le.constructor&&(Ae=Le.constructor.name),Ae==="Map"||Ae==="Set")return Array.from(Le);if(Ae==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ae))return L(Le,Te)}function L(Le,Te){(Te==null||Te>Le.length)&&(Te=Le.length);for(var Ae=0,ye=new Array(Te);Ae<Te;Ae++)ye[Ae]=Le[Ae];return ye}function _(Le,Te){var Ae;if(typeof Symbol=="undefined"||Le[Symbol.iterator]==null){if(Array.isArray(Le)||(Ae=T(Le))||Te&&Le&&typeof Le.length=="number"){Ae&&(Le=Ae);var ye=0;return function(){return ye>=Le.length?{done:!0}:{done:!1,value:Le[ye++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return Ae=Le[Symbol.iterator](),Ae.next.bind(Ae)}function g(Le,Te){return Te={exports:{}},Le(Te,Te.exports),Te.exports}var S=g(function(Le){function Te(){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(ye){Le.exports.defaults=ye}Le.exports={defaults:Te(),getDefaults:Te,changeDefaults:Ae}}),p=S.defaults,o=S.getDefaults,i=S.changeDefaults,r=/[&<>"']/,d=/[&<>"']/g,f=/[<>"']|&(?!#?\w+;)/,h=/[<>"']|&(?!#?\w+;)/g,E={"&":"&","<":"<",">":">",'"':""","'":"'"},y=function(Te){return E[Te]};function l(Le,Te){if(Te){if(r.test(Le))return Le.replace(d,y)}else if(f.test(Le))return Le.replace(h,y);return Le}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s(Le){return Le.replace(n,function(Te,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 u=/(^|[^\[])\^/g;function w(Le,Te){Le=Le.source||Le,Te=Te||"";var Ae={replace:function(Ee,we){return we=we.source||we,we=we.replace(u,"$1"),Le=Le.replace(Ee,we),Ae},getRegex:function(){return new RegExp(Le,Te)}};return Ae}var v=/[^\w:]/g,a=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function R(Le,Te,Ae){if(Le){var ye;try{ye=decodeURIComponent(s(Ae)).replace(v,"").toLowerCase()}catch(Ee){return null}if(ye.indexOf("javascript:")===0||ye.indexOf("vbscript:")===0||ye.indexOf("data:")===0)return null}Te&&!a.test(Ae)&&(Ae=C(Te,Ae));try{Ae=encodeURI(Ae).replace(/%25/g,"%")}catch(Ee){return null}return Ae}var D={},c=/^[^:]+:\/*[^/]*$/,b=/^([^:]+:)[\s\S]*$/,x=/^([^:]+:\/*[^/]*)[\s\S]*$/;function C(Le,Te){D[" "+Le]||(c.test(Le)?D[" "+Le]=Le+"/":D[" "+Le]=X(Le,"/",!0)),Le=D[" "+Le];var Ae=Le.indexOf(":")===-1;return Te.substring(0,2)==="//"?Ae?Te:Le.replace(b,"$1")+Te:Te.charAt(0)==="/"?Ae?Te:Le.replace(x,"$1")+Te:Le+Te}var F={exec:function(){}};function j(Le){for(var Te=1,Ae,ye;Te<arguments.length;Te++){Ae=arguments[Te];for(ye in Ae)Object.prototype.hasOwnProperty.call(Ae,ye)&&(Le[ye]=Ae[ye])}return Le}function k(Le,Te){var Ae=Le.replace(/\|/g,function(we,Oe,Ce){for(var Be=!1,Ke=Oe;--Ke>=0&&Ce[Ke]==="\\";)Be=!Be;return Be?"|":" |"}),ye=Ae.split(/ \|/),Ee=0;if(ye.length>Te)ye.splice(Te);else for(;ye.length<Te;)ye.push("");for(;Ee<ye.length;Ee++)ye[Ee]=ye[Ee].trim().replace(/\\\|/g,"|");return ye}function X(Le,Te,Ae){var ye=Le.length;if(ye===0)return"";for(var Ee=0;Ee<ye;){var we=Le.charAt(ye-Ee-1);if(we===Te&&!Ae)Ee++;else if(we!==Te&&Ae)Ee++;else break}return Le.substr(0,ye-Ee)}function G(Le,Te){if(Le.indexOf(Te[1])===-1)return-1;for(var Ae=Le.length,ye=0,Ee=0;Ee<Ae;Ee++)if(Le[Ee]==="\\")Ee++;else if(Le[Ee]===Te[0])ye++;else if(Le[Ee]===Te[1]&&(ye--,ye<0))return Ee;return-1}function W(Le){Le&&Le.sanitize&&!Le.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 K={escape:l,unescape:s,edit:w,cleanUrl:R,resolveUrl:C,noopTest:F,merge:j,splitCells:k,rtrim:X,findClosingBracket:G,checkSanitizeDeprecation:W},B=S.defaults,U=K.rtrim,H=K.splitCells,q=K.escape,ie=K.findClosingBracket;function ce(Le,Te,Ae){var ye=Te.href,Ee=Te.title?q(Te.title):null,we=Le[1].replace(/\\([\[\]])/g,"$1");return Le[0].charAt(0)!=="!"?{type:"link",raw:Ae,href:ye,title:Ee,text:we}:{type:"image",raw:Ae,href:ye,title:Ee,text:q(we)}}function he(Le,Te){var Ae=Le.match(/^(\s+)(?:```)/);if(Ae===null)return Te;var ye=Ae[1];return Te.split(`
|
|
|
`).map(function(Ee){var we=Ee.match(/^\s+/);if(we===null)return Ee;var Oe=we[0];return Oe.length>=ye.length?Ee.slice(ye.length):Ee}).join(`
|
|
|
`)}var be=function(){function Le(Ae){this.options=Ae||B}var Te=Le.prototype;return Te.space=function(ye){var Ee=this.rules.block.newline.exec(ye);if(Ee)return Ee[0].length>1?{type:"space",raw:Ee[0]}:{raw:`
|
|
|
`}},Te.code=function(ye,Ee){var we=this.rules.block.code.exec(ye);if(we){var Oe=Ee[Ee.length-1];if(Oe&&Oe.type==="paragraph")return{raw:we[0],text:we[0].trimRight()};var Ce=we[0].replace(/^ {4}/gm,"");return{type:"code",raw:we[0],codeBlockStyle:"indented",text:this.options.pedantic?Ce:U(Ce,`
|
|
|
`)}}},Te.fences=function(ye){var Ee=this.rules.block.fences.exec(ye);if(Ee){var we=Ee[0],Oe=he(we,Ee[3]||"");return{type:"code",raw:we,lang:Ee[2]?Ee[2].trim():Ee[2],text:Oe}}},Te.heading=function(ye){var Ee=this.rules.block.heading.exec(ye);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[1].length,text:Ee[2]}},Te.nptable=function(ye){var Ee=this.rules.block.nptable.exec(ye);if(Ee){var we={type:"table",header:H(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:Ee[0]};if(we.header.length===we.align.length){var Oe=we.align.length,Ce;for(Ce=0;Ce<Oe;Ce++)/^ *-+: *$/.test(we.align[Ce])?we.align[Ce]="right":/^ *:-+: *$/.test(we.align[Ce])?we.align[Ce]="center":/^ *:-+ *$/.test(we.align[Ce])?we.align[Ce]="left":we.align[Ce]=null;for(Oe=we.cells.length,Ce=0;Ce<Oe;Ce++)we.cells[Ce]=H(we.cells[Ce],we.header.length);return we}}},Te.hr=function(ye){var Ee=this.rules.block.hr.exec(ye);if(Ee)return{type:"hr",raw:Ee[0]}},Te.blockquote=function(ye){var Ee=this.rules.block.blockquote.exec(ye);if(Ee){var we=Ee[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Ee[0],text:we}}},Te.list=function(ye){var Ee=this.rules.block.list.exec(ye);if(Ee){for(var we=Ee[0],Oe=Ee[2],Ce=Oe.length>1,Be=Oe[Oe.length-1]===")",Ke={type:"list",raw:we,ordered:Ce,start:Ce?+Oe.slice(0,-1):"",loose:!1,items:[]},qe=Ee[0].match(this.rules.block.item),et=!1,it,pt,gt,at,Rt,Tt,Pt,Ft=qe.length,ct=0;ct<Ft;ct++)it=qe[ct],we=it,pt=it.length,it=it.replace(/^ *([*+-]|\d+[.)]) */,""),~it.indexOf(`
|
|
|
`)&&(pt-=it.length,it=this.options.pedantic?it.replace(/^ {1,4}/gm,""):it.replace(new RegExp("^ {1,"+pt+"}","gm"),"")),ct!==Ft-1&&(gt=this.rules.block.bullet.exec(qe[ct+1])[0],(Ce?gt.length===1||!Be&>[gt.length-1]===")":gt.length>1||this.options.smartLists&>!==Oe)&&(at=qe.slice(ct+1).join(`
|
|
|
`),Ke.raw=Ke.raw.substring(0,Ke.raw.length-at.length),ct=Ft-1)),Rt=et||/\n\n(?!\s*$)/.test(it),ct!==Ft-1&&(et=it.charAt(it.length-1)===`
|
|
|
`,Rt||(Rt=et)),Rt&&(Ke.loose=!0),Tt=/^\[[ xX]\] /.test(it),Pt=void 0,Tt&&(Pt=it[1]!==" ",it=it.replace(/^\[[ xX]\] +/,"")),Ke.items.push({type:"list_item",raw:we,task:Tt,checked:Pt,loose:Rt,text:it});return Ke}},Te.html=function(ye){var Ee=this.rules.block.html.exec(ye);if(Ee)return{type:this.options.sanitize?"paragraph":"html",raw:Ee[0],pre:!this.options.sanitizer&&(Ee[1]==="pre"||Ee[1]==="script"||Ee[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ee[0]):q(Ee[0]):Ee[0]}},Te.def=function(ye){var Ee=this.rules.block.def.exec(ye);if(Ee){Ee[3]&&(Ee[3]=Ee[3].substring(1,Ee[3].length-1));var we=Ee[1].toLowerCase().replace(/\s+/g," ");return{tag:we,raw:Ee[0],href:Ee[2],title:Ee[3]}}},Te.table=function(ye){var Ee=this.rules.block.table.exec(ye);if(Ee){var we={type:"table",header:H(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(we.header.length===we.align.length){we.raw=Ee[0];var Oe=we.align.length,Ce;for(Ce=0;Ce<Oe;Ce++)/^ *-+: *$/.test(we.align[Ce])?we.align[Ce]="right":/^ *:-+: *$/.test(we.align[Ce])?we.align[Ce]="center":/^ *:-+ *$/.test(we.align[Ce])?we.align[Ce]="left":we.align[Ce]=null;for(Oe=we.cells.length,Ce=0;Ce<Oe;Ce++)we.cells[Ce]=H(we.cells[Ce].replace(/^ *\| *| *\| *$/g,""),we.header.length);return we}}},Te.lheading=function(ye){var Ee=this.rules.block.lheading.exec(ye);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[2].charAt(0)==="="?1:2,text:Ee[1]}},Te.paragraph=function(ye){var Ee=this.rules.block.paragraph.exec(ye);if(Ee)return{type:"paragraph",raw:Ee[0],text:Ee[1].charAt(Ee[1].length-1)===`
|
|
|
`?Ee[1].slice(0,-1):Ee[1]}},Te.text=function(ye,Ee){var we=this.rules.block.text.exec(ye);if(we){var Oe=Ee[Ee.length-1];return Oe&&Oe.type==="text"?{raw:we[0],text:we[0]}:{type:"text",raw:we[0],text:we[0]}}},Te.escape=function(ye){var Ee=this.rules.inline.escape.exec(ye);if(Ee)return{type:"escape",raw:Ee[0],text:q(Ee[1])}},Te.tag=function(ye,Ee,we){var Oe=this.rules.inline.tag.exec(ye);if(Oe)return!Ee&&/^<a /i.test(Oe[0])?Ee=!0:Ee&&/^<\/a>/i.test(Oe[0])&&(Ee=!1),!we&&/^<(pre|code|kbd|script)(\s|>)/i.test(Oe[0])?we=!0:we&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Oe[0])&&(we=!1),{type:this.options.sanitize?"text":"html",raw:Oe[0],inLink:Ee,inRawBlock:we,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Oe[0]):q(Oe[0]):Oe[0]}},Te.link=function(ye){var Ee=this.rules.inline.link.exec(ye);if(Ee){var we=ie(Ee[2],"()");if(we>-1){var Oe=Ee[0].indexOf("!")===0?5:4,Ce=Oe+Ee[1].length+we;Ee[2]=Ee[2].substring(0,we),Ee[0]=Ee[0].substring(0,Ce).trim(),Ee[3]=""}var Be=Ee[2],Ke="";if(this.options.pedantic){var qe=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Be);qe?(Be=qe[1],Ke=qe[3]):Ke=""}else Ke=Ee[3]?Ee[3].slice(1,-1):"";Be=Be.trim().replace(/^<([\s\S]*)>$/,"$1");var et=ce(Ee,{href:Be&&Be.replace(this.rules.inline._escapes,"$1"),title:Ke&&Ke.replace(this.rules.inline._escapes,"$1")},Ee[0]);return et}},Te.reflink=function(ye,Ee){var we;if((we=this.rules.inline.reflink.exec(ye))||(we=this.rules.inline.nolink.exec(ye))){var Oe=(we[2]||we[1]).replace(/\s+/g," ");if(Oe=Ee[Oe.toLowerCase()],!Oe||!Oe.href){var Ce=we[0].charAt(0);return{type:"text",raw:Ce,text:Ce}}var Be=ce(we,Oe,we[0]);return Be}},Te.strong=function(ye,Ee,we){we===void 0&&(we="");var Oe=this.rules.inline.strong.start.exec(ye);if(Oe&&(!Oe[1]||Oe[1]&&(we===""||this.rules.inline.punctuation.exec(we)))){Ee=Ee.slice(-1*ye.length);var Ce=Oe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ce.lastIndex=0;for(var Be;(Oe=Ce.exec(Ee))!=null;)if(Be=this.rules.inline.strong.middle.exec(Ee.slice(0,Oe.index+3)),Be)return{type:"strong",raw:ye.slice(0,Be[0].length),text:ye.slice(2,Be[0].length-2)}}},Te.em=function(ye,Ee,we){we===void 0&&(we="");var Oe=this.rules.inline.em.start.exec(ye);if(Oe&&(!Oe[1]||Oe[1]&&(we===""||this.rules.inline.punctuation.exec(we)))){Ee=Ee.slice(-1*ye.length);var Ce=Oe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ce.lastIndex=0;for(var Be;(Oe=Ce.exec(Ee))!=null;)if(Be=this.rules.inline.em.middle.exec(Ee.slice(0,Oe.index+2)),Be)return{type:"em",raw:ye.slice(0,Be[0].length),text:ye.slice(1,Be[0].length-1)}}},Te.codespan=function(ye){var Ee=this.rules.inline.code.exec(ye);if(Ee){var we=Ee[2].replace(/\n/g," "),Oe=/[^ ]/.test(we),Ce=we.startsWith(" ")&&we.endsWith(" ");return Oe&&Ce&&(we=we.substring(1,we.length-1)),we=q(we,!0),{type:"codespan",raw:Ee[0],text:we}}},Te.br=function(ye){var Ee=this.rules.inline.br.exec(ye);if(Ee)return{type:"br",raw:Ee[0]}},Te.del=function(ye){var Ee=this.rules.inline.del.exec(ye);if(Ee)return{type:"del",raw:Ee[0],text:Ee[1]}},Te.autolink=function(ye,Ee){var we=this.rules.inline.autolink.exec(ye);if(we){var Oe,Ce;return we[2]==="@"?(Oe=q(this.options.mangle?Ee(we[1]):we[1]),Ce="mailto:"+Oe):(Oe=q(we[1]),Ce=Oe),{type:"link",raw:we[0],text:Oe,href:Ce,tokens:[{type:"text",raw:Oe,text:Oe}]}}},Te.url=function(ye,Ee){var we;if(we=this.rules.inline.url.exec(ye)){var Oe,Ce;if(we[2]==="@")Oe=q(this.options.mangle?Ee(we[0]):we[0]),Ce="mailto:"+Oe;else{var Be;do Be=we[0],we[0]=this.rules.inline._backpedal.exec(we[0])[0];while(Be!==we[0]);Oe=q(we[0]),we[1]==="www."?Ce="http://"+Oe:Ce=Oe}return{type:"link",raw:we[0],text:Oe,href:Ce,tokens:[{type:"text",raw:Oe,text:Oe}]}}},Te.inlineText=function(ye,Ee,we){var Oe=this.rules.inline.text.exec(ye);if(Oe){var Ce;return Ee?Ce=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Oe[0]):q(Oe[0]):Oe[0]:Ce=q(this.options.smartypants?we(Oe[0]):Oe[0]),{type:"text",raw:Oe[0],text:Ce}}},Le}(),ne=K.noopTest,le=K.edit,ue=K.merge,te={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:ne,table:ne,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};te._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,te._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,te.def=le(te.def).replace("label",te._label).replace("title",te._title).getRegex(),te.bullet=/(?:[*+-]|\d{1,9}[.)])/,te.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,te.item=le(te.item,"gm").replace(/bull/g,te.bullet).getRegex(),te.list=le(te.list).replace(/bull/g,te.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+te.def.source+")").getRegex(),te._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",te._comment=/<!--(?!-?>)[\s\S]*?-->/,te.html=le(te.html,"i").replace("comment",te._comment).replace("tag",te._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),te.paragraph=le(te._paragraph).replace("hr",te.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",te._tag).getRegex(),te.blockquote=le(te.blockquote).replace("paragraph",te.paragraph).getRegex(),te.normal=ue({},te),te.gfm=ue({},te.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*|$)"}),te.gfm.nptable=le(te.gfm.nptable).replace("hr",te.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",te._tag).getRegex(),te.gfm.table=le(te.gfm.table).replace("hr",te.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",te._tag).getRegex(),te.pedantic=ue({},te.normal,{html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",te._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:ne,paragraph:le(te.normal._paragraph).replace("hr",te.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",te.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var oe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ne,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:ne,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};oe._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",oe.punctuation=le(oe.punctuation).replace(/punctuation/g,oe._punctuation).getRegex(),oe._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",oe._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",oe.em.start=le(oe.em.start).replace(/punctuation/g,oe._punctuation).getRegex(),oe.em.middle=le(oe.em.middle).replace(/punctuation/g,oe._punctuation).replace(/overlapSkip/g,oe._overlapSkip).getRegex(),oe.em.endAst=le(oe.em.endAst,"g").replace(/punctuation/g,oe._punctuation).getRegex(),oe.em.endUnd=le(oe.em.endUnd,"g").replace(/punctuation/g,oe._punctuation).getRegex(),oe.strong.start=le(oe.strong.start).replace(/punctuation/g,oe._punctuation).getRegex(),oe.strong.middle=le(oe.strong.middle).replace(/punctuation/g,oe._punctuation).replace(/blockSkip/g,oe._blockSkip).getRegex(),oe.strong.endAst=le(oe.strong.endAst,"g").replace(/punctuation/g,oe._punctuation).getRegex(),oe.strong.endUnd=le(oe.strong.endUnd,"g").replace(/punctuation/g,oe._punctuation).getRegex(),oe.blockSkip=le(oe._blockSkip,"g").getRegex(),oe.overlapSkip=le(oe._overlapSkip,"g").getRegex(),oe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,oe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,oe._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])?)+(?![-_])/,oe.autolink=le(oe.autolink).replace("scheme",oe._scheme).replace("email",oe._email).getRegex(),oe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,oe.tag=le(oe.tag).replace("comment",te._comment).replace("attribute",oe._attribute).getRegex(),oe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,oe._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,oe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,oe.link=le(oe.link).replace("label",oe._label).replace("href",oe._href).replace("title",oe._title).getRegex(),oe.reflink=le(oe.reflink).replace("label",oe._label).getRegex(),oe.reflinkSearch=le(oe.reflinkSearch,"g").replace("reflink",oe.reflink).replace("nolink",oe.nolink).getRegex(),oe.normal=ue({},oe),oe.pedantic=ue({},oe.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:le(/^!?\[(label)\]\((.*?)\)/).replace("label",oe._label).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",oe._label).getRegex()}),oe.gfm=ue({},oe.normal,{escape:le(oe.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),oe.gfm.url=le(oe.gfm.url,"i").replace("email",oe.gfm._extended_email).getRegex(),oe.breaks=ue({},oe.gfm,{br:le(oe.br).replace("{2,}","*").getRegex(),text:le(oe.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Q={block:te,inline:oe},se=S.defaults,J=Q.block,ee=Q.inline;function ge(Le){return Le.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 re(Le){var Te="",Ae,ye,Ee=Le.length;for(Ae=0;Ae<Ee;Ae++)ye=Le.charCodeAt(Ae),Math.random()>.5&&(ye="x"+ye.toString(16)),Te+="&#"+ye+";";return Te}var Y=function(){function Le(Ae){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ae||se,this.options.tokenizer=this.options.tokenizer||new be,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ye={block:J.normal,inline:ee.normal};this.options.pedantic?(ye.block=J.pedantic,ye.inline=ee.pedantic):this.options.gfm&&(ye.block=J.gfm,this.options.breaks?ye.inline=ee.breaks:ye.inline=ee.gfm),this.tokenizer.rules=ye}Le.lex=function(ye,Ee){var we=new Le(Ee);return we.lex(ye)};var Te=Le.prototype;return Te.lex=function(ye){return ye=ye.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(ye,this.tokens,!0),this.inline(this.tokens),this.tokens},Te.blockTokens=function(ye,Ee,we){Ee===void 0&&(Ee=[]),we===void 0&&(we=!0),ye=ye.replace(/^ +$/gm,"");for(var Oe,Ce,Be,Ke;ye;){if(Oe=this.tokenizer.space(ye)){ye=ye.substring(Oe.raw.length),Oe.type&&Ee.push(Oe);continue}if(Oe=this.tokenizer.code(ye,Ee)){ye=ye.substring(Oe.raw.length),Oe.type?Ee.push(Oe):(Ke=Ee[Ee.length-1],Ke.raw+=`
|
|
|
`+Oe.raw,Ke.text+=`
|
|
|
`+Oe.text);continue}if(Oe=this.tokenizer.fences(ye)){ye=ye.substring(Oe.raw.length),Ee.push(Oe);continue}if(Oe=this.tokenizer.heading(ye)){ye=ye.substring(Oe.raw.length),Ee.push(Oe);continue}if(Oe=this.tokenizer.nptable(ye)){ye=ye.substring(Oe.raw.length),Ee.push(Oe);continue}if(Oe=this.tokenizer.hr(ye)){ye=ye.substring(Oe.raw.length),Ee.push(Oe);continue}if(Oe=this.tokenizer.blockquote(ye)){ye=ye.substring(Oe.raw.length),Oe.tokens=this.blockTokens(Oe.text,[],we),Ee.push(Oe);continue}if(Oe=this.tokenizer.list(ye)){for(ye=ye.substring(Oe.raw.length),Be=Oe.items.length,Ce=0;Ce<Be;Ce++)Oe.items[Ce].tokens=this.blockTokens(Oe.items[Ce].text,[],!1);Ee.push(Oe);continue}if(Oe=this.tokenizer.html(ye)){ye=ye.substring(Oe.raw.length),Ee.push(Oe);continue}if(we&&(Oe=this.tokenizer.def(ye))){ye=ye.substring(Oe.raw.length),this.tokens.links[Oe.tag]||(this.tokens.links[Oe.tag]={href:Oe.href,title:Oe.title});continue}if(Oe=this.tokenizer.table(ye)){ye=ye.substring(Oe.raw.length),Ee.push(Oe);continue}if(Oe=this.tokenizer.lheading(ye)){ye=ye.substring(Oe.raw.length),Ee.push(Oe);continue}if(we&&(Oe=this.tokenizer.paragraph(ye))){ye=ye.substring(Oe.raw.length),Ee.push(Oe);continue}if(Oe=this.tokenizer.text(ye,Ee)){ye=ye.substring(Oe.raw.length),Oe.type?Ee.push(Oe):(Ke=Ee[Ee.length-1],Ke.raw+=`
|
|
|
`+Oe.raw,Ke.text+=`
|
|
|
`+Oe.text);continue}if(ye){var qe="Infinite loop on byte: "+ye.charCodeAt(0);if(this.options.silent){console.error(qe);break}else throw new Error(qe)}}return Ee},Te.inline=function(ye){var Ee,we,Oe,Ce,Be,Ke,qe=ye.length;for(Ee=0;Ee<qe;Ee++){Ke=ye[Ee];switch(Ke.type){case"paragraph":case"text":case"heading":{Ke.tokens=[],this.inlineTokens(Ke.text,Ke.tokens);break}case"table":{for(Ke.tokens={header:[],cells:[]},Ce=Ke.header.length,we=0;we<Ce;we++)Ke.tokens.header[we]=[],this.inlineTokens(Ke.header[we],Ke.tokens.header[we]);for(Ce=Ke.cells.length,we=0;we<Ce;we++)for(Be=Ke.cells[we],Ke.tokens.cells[we]=[],Oe=0;Oe<Be.length;Oe++)Ke.tokens.cells[we][Oe]=[],this.inlineTokens(Be[Oe],Ke.tokens.cells[we][Oe]);break}case"blockquote":{this.inline(Ke.tokens);break}case"list":{for(Ce=Ke.items.length,we=0;we<Ce;we++)this.inline(Ke.items[we].tokens);break}}}return ye},Te.inlineTokens=function(ye,Ee,we,Oe,Ce){Ee===void 0&&(Ee=[]),we===void 0&&(we=!1),Oe===void 0&&(Oe=!1),Ce===void 0&&(Ce="");var Be,Ke=ye,qe;if(this.tokens.links){var et=Object.keys(this.tokens.links);if(et.length>0)for(;(qe=this.tokenizer.rules.inline.reflinkSearch.exec(Ke))!=null;)et.includes(qe[0].slice(qe[0].lastIndexOf("[")+1,-1))&&(Ke=Ke.slice(0,qe.index)+"["+"a".repeat(qe[0].length-2)+"]"+Ke.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(qe=this.tokenizer.rules.inline.blockSkip.exec(Ke))!=null;)Ke=Ke.slice(0,qe.index)+"["+"a".repeat(qe[0].length-2)+"]"+Ke.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ye;){if(Be=this.tokenizer.escape(ye)){ye=ye.substring(Be.raw.length),Ee.push(Be);continue}if(Be=this.tokenizer.tag(ye,we,Oe)){ye=ye.substring(Be.raw.length),we=Be.inLink,Oe=Be.inRawBlock,Ee.push(Be);continue}if(Be=this.tokenizer.link(ye)){ye=ye.substring(Be.raw.length),Be.type==="link"&&(Be.tokens=this.inlineTokens(Be.text,[],!0,Oe)),Ee.push(Be);continue}if(Be=this.tokenizer.reflink(ye,this.tokens.links)){ye=ye.substring(Be.raw.length),Be.type==="link"&&(Be.tokens=this.inlineTokens(Be.text,[],!0,Oe)),Ee.push(Be);continue}if(Be=this.tokenizer.strong(ye,Ke,Ce)){ye=ye.substring(Be.raw.length),Be.tokens=this.inlineTokens(Be.text,[],we,Oe),Ee.push(Be);continue}if(Be=this.tokenizer.em(ye,Ke,Ce)){ye=ye.substring(Be.raw.length),Be.tokens=this.inlineTokens(Be.text,[],we,Oe),Ee.push(Be);continue}if(Be=this.tokenizer.codespan(ye)){ye=ye.substring(Be.raw.length),Ee.push(Be);continue}if(Be=this.tokenizer.br(ye)){ye=ye.substring(Be.raw.length),Ee.push(Be);continue}if(Be=this.tokenizer.del(ye)){ye=ye.substring(Be.raw.length),Be.tokens=this.inlineTokens(Be.text,[],we,Oe),Ee.push(Be);continue}if(Be=this.tokenizer.autolink(ye,re)){ye=ye.substring(Be.raw.length),Ee.push(Be);continue}if(!we&&(Be=this.tokenizer.url(ye,re))){ye=ye.substring(Be.raw.length),Ee.push(Be);continue}if(Be=this.tokenizer.inlineText(ye,Oe,ge)){ye=ye.substring(Be.raw.length),Ce=Be.raw.slice(-1),Ee.push(Be);continue}if(ye){var it="Infinite loop on byte: "+ye.charCodeAt(0);if(this.options.silent){console.error(it);break}else throw new Error(it)}}return Ee},m(Le,null,[{key:"rules",get:function(){return{block:J,inline:ee}}}]),Le}(),z=S.defaults,$=K.cleanUrl,me=K.escape,pe=function(){function Le(Ae){this.options=Ae||z}var Te=Le.prototype;return Te.code=function(ye,Ee,we){var Oe=(Ee||"").match(/\S*/)[0];if(this.options.highlight){var Ce=this.options.highlight(ye,Oe);Ce!=null&&Ce!==ye&&(we=!0,ye=Ce)}return Oe?'<pre><code class="'+this.options.langPrefix+me(Oe,!0)+'">'+(we?ye:me(ye,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(we?ye:me(ye,!0))+`</code></pre>
|
|
|
`},Te.blockquote=function(ye){return`<blockquote>
|
|
|
`+ye+`</blockquote>
|
|
|
`},Te.html=function(ye){return ye},Te.heading=function(ye,Ee,we,Oe){return this.options.headerIds?"<h"+Ee+' id="'+this.options.headerPrefix+Oe.slug(we)+'">'+ye+"</h"+Ee+`>
|
|
|
`:"<h"+Ee+">"+ye+"</h"+Ee+`>
|
|
|
`},Te.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},Te.list=function(ye,Ee,we){var Oe=Ee?"ol":"ul",Ce=Ee&&we!==1?' start="'+we+'"':"";return"<"+Oe+Ce+`>
|
|
|
`+ye+"</"+Oe+`>
|
|
|
`},Te.listitem=function(ye){return"<li>"+ye+`</li>
|
|
|
`},Te.checkbox=function(ye){return"<input "+(ye?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Te.paragraph=function(ye){return"<p>"+ye+`</p>
|
|
|
`},Te.table=function(ye,Ee){return Ee&&(Ee="<tbody>"+Ee+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+ye+`</thead>
|
|
|
`+Ee+`</table>
|
|
|
`},Te.tablerow=function(ye){return`<tr>
|
|
|
`+ye+`</tr>
|
|
|
`},Te.tablecell=function(ye,Ee){var we=Ee.header?"th":"td",Oe=Ee.align?"<"+we+' align="'+Ee.align+'">':"<"+we+">";return Oe+ye+"</"+we+`>
|
|
|
`},Te.strong=function(ye){return"<strong>"+ye+"</strong>"},Te.em=function(ye){return"<em>"+ye+"</em>"},Te.codespan=function(ye){return"<code>"+ye+"</code>"},Te.br=function(){return this.options.xhtml?"<br/>":"<br>"},Te.del=function(ye){return"<del>"+ye+"</del>"},Te.link=function(ye,Ee,we){if(ye=$(this.options.sanitize,this.options.baseUrl,ye),ye===null)return we;var Oe='<a href="'+me(ye)+'"';return Ee&&(Oe+=' title="'+Ee+'"'),Oe+=">"+we+"</a>",Oe},Te.image=function(ye,Ee,we){if(ye=$(this.options.sanitize,this.options.baseUrl,ye),ye===null)return we;var Oe='<img src="'+ye+'" alt="'+we+'"';return Ee&&(Oe+=' title="'+Ee+'"'),Oe+=this.options.xhtml?"/>":">",Oe},Te.text=function(ye){return ye},Le}(),xe=function(){function Le(){}var Te=Le.prototype;return Te.strong=function(ye){return ye},Te.em=function(ye){return ye},Te.codespan=function(ye){return ye},Te.del=function(ye){return ye},Te.html=function(ye){return ye},Te.text=function(ye){return ye},Te.link=function(ye,Ee,we){return""+we},Te.image=function(ye,Ee,we){return""+we},Te.br=function(){return""},Le}(),Re=function(){function Le(){this.seen={}}var Te=Le.prototype;return Te.slug=function(ye){var Ee=ye.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Ee)){var we=Ee;do this.seen[we]++,Ee=we+"-"+this.seen[we];while(this.seen.hasOwnProperty(Ee))}return this.seen[Ee]=0,Ee},Le}(),ke=S.defaults,Ne=K.unescape,Pe=function(){function Le(Ae){this.options=Ae||ke,this.options.renderer=this.options.renderer||new pe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new xe,this.slugger=new Re}Le.parse=function(ye,Ee){var we=new Le(Ee);return we.parse(ye)};var Te=Le.prototype;return Te.parse=function(ye,Ee){Ee===void 0&&(Ee=!0);var we="",Oe,Ce,Be,Ke,qe,et,it,pt,gt,at,Rt,Tt,Pt,Ft,ct,mr,Or,dr,Ye=ye.length;for(Oe=0;Oe<Ye;Oe++){at=ye[Oe];switch(at.type){case"space":continue;case"hr":{we+=this.renderer.hr();continue}case"heading":{we+=this.renderer.heading(this.parseInline(at.tokens),at.depth,Ne(this.parseInline(at.tokens,this.textRenderer)),this.slugger);continue}case"code":{we+=this.renderer.code(at.text,at.lang,at.escaped);continue}case"table":{for(pt="",it="",Ke=at.header.length,Ce=0;Ce<Ke;Ce++)it+=this.renderer.tablecell(this.parseInline(at.tokens.header[Ce]),{header:!0,align:at.align[Ce]});for(pt+=this.renderer.tablerow(it),gt="",Ke=at.cells.length,Ce=0;Ce<Ke;Ce++){for(et=at.tokens.cells[Ce],it="",qe=et.length,Be=0;Be<qe;Be++)it+=this.renderer.tablecell(this.parseInline(et[Be]),{header:!1,align:at.align[Be]});gt+=this.renderer.tablerow(it)}we+=this.renderer.table(pt,gt);continue}case"blockquote":{gt=this.parse(at.tokens),we+=this.renderer.blockquote(gt);continue}case"list":{for(Rt=at.ordered,Tt=at.start,Pt=at.loose,Ke=at.items.length,gt="",Ce=0;Ce<Ke;Ce++)ct=at.items[Ce],mr=ct.checked,Or=ct.task,Ft="",ct.task&&(dr=this.renderer.checkbox(mr),Pt?ct.tokens.length>0&&ct.tokens[0].type==="text"?(ct.tokens[0].text=dr+" "+ct.tokens[0].text,ct.tokens[0].tokens&&ct.tokens[0].tokens.length>0&&ct.tokens[0].tokens[0].type==="text"&&(ct.tokens[0].tokens[0].text=dr+" "+ct.tokens[0].tokens[0].text)):ct.tokens.unshift({type:"text",text:dr}):Ft+=dr),Ft+=this.parse(ct.tokens,Pt),gt+=this.renderer.listitem(Ft,Or,mr);we+=this.renderer.list(gt,Rt,Tt);continue}case"html":{we+=this.renderer.html(at.text);continue}case"paragraph":{we+=this.renderer.paragraph(this.parseInline(at.tokens));continue}case"text":{for(gt=at.tokens?this.parseInline(at.tokens):at.text;Oe+1<Ye&&ye[Oe+1].type==="text";)at=ye[++Oe],gt+=`
|
|
|
`+(at.tokens?this.parseInline(at.tokens):at.text);we+=Ee?this.renderer.paragraph(gt):gt;continue}default:{var ht='Token with "'+at.type+'" type was not found.';if(this.options.silent){console.error(ht);return}else throw new Error(ht)}}}return we},Te.parseInline=function(ye,Ee){Ee=Ee||this.renderer;var we="",Oe,Ce,Be=ye.length;for(Oe=0;Oe<Be;Oe++){Ce=ye[Oe];switch(Ce.type){case"escape":{we+=Ee.text(Ce.text);break}case"html":{we+=Ee.html(Ce.text);break}case"link":{we+=Ee.link(Ce.href,Ce.title,this.parseInline(Ce.tokens,Ee));break}case"image":{we+=Ee.image(Ce.href,Ce.title,Ce.text);break}case"strong":{we+=Ee.strong(this.parseInline(Ce.tokens,Ee));break}case"em":{we+=Ee.em(this.parseInline(Ce.tokens,Ee));break}case"codespan":{we+=Ee.codespan(Ce.text);break}case"br":{we+=Ee.br();break}case"del":{we+=Ee.del(this.parseInline(Ce.tokens,Ee));break}case"text":{we+=Ee.text(Ce.text);break}default:{var Ke='Token with "'+Ce.type+'" type was not found.';if(this.options.silent){console.error(Ke);return}else throw new Error(Ke)}}}return we},Le}(),je=K.merge,Fe=K.checkSanitizeDeprecation,We=K.escape,_e=S.getDefaults,Ge=S.changeDefaults,Ve=S.defaults;function Ie(Le,Te,Ae){if(typeof Le=="undefined"||Le===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Le!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Le)+", string expected");if(typeof Te=="function"&&(Ae=Te,Te=null),Te=je({},Ie.defaults,Te||{}),Fe(Te),Ae){var ye=Te.highlight,Ee;try{Ee=Y.lex(Le,Te)}catch(Be){return Ae(Be)}var we=function(Ke){var qe;if(!Ke)try{qe=Pe.parse(Ee,Te)}catch(et){Ke=et}return Te.highlight=ye,Ke?Ae(Ke):Ae(null,qe)};if(!ye||ye.length<3)return we();if(delete Te.highlight,!Ee.length)return we();var Oe=0;Ie.walkTokens(Ee,function(Be){Be.type==="code"&&(Oe++,setTimeout(function(){ye(Be.text,Be.lang,function(Ke,qe){if(Ke)return we(Ke);qe!=null&&qe!==Be.text&&(Be.text=qe,Be.escaped=!0),Oe--,Oe===0&&we()})},0))}),Oe===0&&we();return}try{var Ce=Y.lex(Le,Te);return Te.walkTokens&&Ie.walkTokens(Ce,Te.walkTokens),Pe.parse(Ce,Te)}catch(Be){if(Be.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Te.silent)return"<p>An error occurred:</p><pre>"+We(Be.message+"",!0)+"</pre>";throw Be}}Ie.options=Ie.setOptions=function(Le){return je(Ie.defaults,Le),Ge(Ie.defaults),Ie},Ie.getDefaults=_e,Ie.defaults=Ve,Ie.use=function(Le){var Te=je({},Le);if(Le.renderer&&function(){var ye=Ie.defaults.renderer||new pe,Ee=function(Ce){var Be=ye[Ce];ye[Ce]=function(){for(var Ke=arguments.length,qe=new Array(Ke),et=0;et<Ke;et++)qe[et]=arguments[et];var it=Le.renderer[Ce].apply(ye,qe);return it===!1&&(it=Be.apply(ye,qe)),it}};for(var we in Le.renderer)Ee(we);Te.renderer=ye}(),Le.tokenizer&&function(){var ye=Ie.defaults.tokenizer||new be,Ee=function(Ce){var Be=ye[Ce];ye[Ce]=function(){for(var Ke=arguments.length,qe=new Array(Ke),et=0;et<Ke;et++)qe[et]=arguments[et];var it=Le.tokenizer[Ce].apply(ye,qe);return it===!1&&(it=Be.apply(ye,qe)),it}};for(var we in Le.tokenizer)Ee(we);Te.tokenizer=ye}(),Le.walkTokens){var Ae=Ie.defaults.walkTokens;Te.walkTokens=function(ye){Le.walkTokens(ye),Ae&&Ae(ye)}}Ie.setOptions(Te)},Ie.walkTokens=function(Le,Te){for(var Ae=_(Le),ye;!(ye=Ae()).done;){var Ee=ye.value;Te(Ee);switch(Ee.type){case"table":{for(var we=_(Ee.tokens.header),Oe;!(Oe=we()).done;){var Ce=Oe.value;Ie.walkTokens(Ce,Te)}for(var Be=_(Ee.tokens.cells),Ke;!(Ke=Be()).done;)for(var qe=Ke.value,et=_(qe),it;!(it=et()).done;){var pt=it.value;Ie.walkTokens(pt,Te)}break}case"list":{Ie.walkTokens(Ee.items,Te);break}default:Ee.tokens&&Ie.walkTokens(Ee.tokens,Te)}}},Ie.Parser=Pe,Ie.parser=Pe.parse,Ie.Renderer=pe,Ie.TextRenderer=xe,Ie.Lexer=Y,Ie.lexer=Y.lex,Ie.Tokenizer=be,Ie.Slugger=Re,Ie.parse=Ie;var He=Ie;return He})},"DlR+":function(I,Z,N){var P=N("MFOe"),m=P.Global,T=P.trim;I.exports={name:"cookieStorage",read:_,write:S,each:g,remove:p,clearAll:o};var L=m.document;function _(r){if(!r||!i(r))return null;var d="(?:^|.*;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(L.cookie.replace(new RegExp(d),"$1"))}function g(r){for(var d=L.cookie.split(/; ?/g),f=d.length-1;f>=0;f--){if(!T(d[f]))continue;var h=d[f].split("="),E=unescape(h[0]),y=unescape(h[1]);r(y,E)}}function S(r,d){if(!r)return;L.cookie=escape(r)+"="+escape(d)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function p(r){if(!r||!i(r))return;L.cookie=escape(r)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function o(){g(function(r,d){p(d)})}function i(r){return new RegExp("(?:^|;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(L.cookie)}},E4JC:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("ETIr"),N("cv67"),N("K3mO"),N("OLod"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.StreamCipher,_=m.algo,g=[],S=[],p=[],o=_.Rabbit=L.extend({_doReset:function(){for(var r=this._key.words,d=this.cfg.iv,f=0;f<4;f++)r[f]=(r[f]<<8|r[f]>>>24)&16711935|(r[f]<<24|r[f]>>>8)&4278255360;var h=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],E=this._C=[r[2]<<16|r[2]>>>16,r[0]&4294901760|r[1]&65535,r[3]<<16|r[3]>>>16,r[1]&4294901760|r[2]&65535,r[0]<<16|r[0]>>>16,r[2]&4294901760|r[3]&65535,r[1]<<16|r[1]>>>16,r[3]&4294901760|r[0]&65535];this._b=0;for(var f=0;f<4;f++)i.call(this);for(var f=0;f<8;f++)E[f]^=h[f+4&7];if(d){var y=d.words,l=y[0],n=y[1],s=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,u=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,w=s>>>16|u&4294901760,v=u<<16|s&65535;E[0]^=s,E[1]^=w,E[2]^=u,E[3]^=v,E[4]^=s,E[5]^=w,E[6]^=u,E[7]^=v;for(var f=0;f<4;f++)i.call(this)}},_doProcessBlock:function(r,d){var f=this._X;i.call(this),g[0]=f[0]^f[5]>>>16^f[3]<<16,g[1]=f[2]^f[7]>>>16^f[5]<<16,g[2]=f[4]^f[1]>>>16^f[7]<<16,g[3]=f[6]^f[3]>>>16^f[1]<<16;for(var h=0;h<4;h++)g[h]=(g[h]<<8|g[h]>>>24)&16711935|(g[h]<<24|g[h]>>>8)&4278255360,r[d+h]^=g[h]},blockSize:128/32,ivSize:64/32});function i(){for(var r=this._X,d=this._C,f=0;f<8;f++)S[f]=d[f];d[0]=d[0]+1295307597+this._b|0,d[1]=d[1]+3545052371+(d[0]>>>0<S[0]>>>0?1:0)|0,d[2]=d[2]+886263092+(d[1]>>>0<S[1]>>>0?1:0)|0,d[3]=d[3]+1295307597+(d[2]>>>0<S[2]>>>0?1:0)|0,d[4]=d[4]+3545052371+(d[3]>>>0<S[3]>>>0?1:0)|0,d[5]=d[5]+886263092+(d[4]>>>0<S[4]>>>0?1:0)|0,d[6]=d[6]+1295307597+(d[5]>>>0<S[5]>>>0?1:0)|0,d[7]=d[7]+3545052371+(d[6]>>>0<S[6]>>>0?1:0)|0,this._b=d[7]>>>0<S[7]>>>0?1:0;for(var f=0;f<8;f++){var h=r[f]+d[f],E=h&65535,y=h>>>16,l=((E*E>>>17)+E*y>>>15)+y*y,n=((h&4294901760)*h|0)+((h&65535)*h|0);p[f]=l^n}r[0]=p[0]+(p[7]<<16|p[7]>>>16)+(p[6]<<16|p[6]>>>16)|0,r[1]=p[1]+(p[0]<<8|p[0]>>>24)+p[7]|0,r[2]=p[2]+(p[1]<<16|p[1]>>>16)+(p[0]<<16|p[0]>>>16)|0,r[3]=p[3]+(p[2]<<8|p[2]>>>24)+p[1]|0,r[4]=p[4]+(p[3]<<16|p[3]>>>16)+(p[2]<<16|p[2]>>>16)|0,r[5]=p[5]+(p[4]<<8|p[4]>>>24)+p[3]|0,r[6]=p[6]+(p[5]<<16|p[5]>>>16)+(p[4]<<16|p[4]>>>16)|0,r[7]=p[7]+(p[6]<<8|p[6]>>>24)+p[5]|0}m.Rabbit=L._createHelper(o)}(),P.Rabbit})},EHPI:function(I,Z,N){"use strict";var P=N("bbsP"),m=N("/wGt"),T=N("tJVT"),L=N("k1fw"),_=N("cDcd"),g=N.n(_),S=N("ZW9T"),p=N("ZD9Y"),o=N("M8RZ"),i=N("bCnd"),r=N("fcyK"),d=N.n(r),f={theme:Object(i.a)("cmCodeMode","vs-dark"),fontSize:Object(i.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(i.a)("cmTabToSpace",!0)},h;(function(l){l[l.set_font_size=0]="set_font_size",l[l.set_theme=1]="set_theme",l[l.on_tab_to_space=2]="on_tab_to_space",l[l.set_show_editor_setting=3]="set_show_editor_setting"})(h||(h={}));function E(l,n){switch(n.type){case h.set_show_editor_setting:return Object(L.a)(Object(L.a)({},l),{},{showEditorSetting:n.payload});case h.set_theme:return Object(L.a)(Object(L.a)({},l),{},{theme:n.payload});case h.set_font_size:return Object(L.a)(Object(L.a)({},l),{},{fontSize:n.payload});case h.on_tab_to_space:return Object(L.a)(Object(L.a)({},l),{},{tabToSpace:n.payload});default:throw new Error}}Z.a=function(l){var n=l.isLoading,s=l.value,u=l.onChange,w=l.language,v=l.ActionBarRender,a=v===void 0?function(K){return g.a.createElement(y,{onShowCodeSetting:K})}:v,R=Object(_.useReducer)(E,f),D=Object(T.a)(R,2),c=D[0],b=D[1],x=c.theme,C=c.fontSize,F=c.showEditorSetting,j=c.tabToSpace,k={onFontSizeChange:function(B){b({type:h.set_font_size,payload:B}),Object(i.b)("cmFontSize",B)},tabToSpace:j,cmFontSize:C,className:"oj",cmCodeMode:x,onTabToSpace:function(B){b({type:h.on_tab_to_space,payload:B}),Object(i.b)("cmTabToSpace",B)},onCodeModeChange:function(B){b({type:h.set_theme,payload:B}),Object(i.b)("cmCodeMode",B)}};function X(){b({type:h.set_show_editor_setting,payload:!1})}function G(){b({type:h.set_show_editor_setting,payload:!0})}var W={value:s,language:w,onChange:u,theme:x,height:"calc(100% - 56px)",options:{fontSize:C,insertSpaces:j}};return g.a.createElement(_.Fragment,null,g.a.createElement("div",{className:"code-panel-container"},a(G),!n&&g.a.createElement(S.b,W)),g.a.createElement(o.a,null,g.a.createElement(m.a,{className:"oj",title:null,placement:"right",closable:!1,visible:F,onClose:X},g.a.createElement(p.a,k))))};function y(l){var n=l.onShowCodeSetting;return g.a.createElement("div",{className:"action-bar"},g.a.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),g.a.createElement("a",{onClick:n},g.a.createElement("i",{className:"iconfont icon-shezhi"})))}},ELLl:function(I,Z,N){(function(P){P(N("VrN/"))})(function(P){var m={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},T=P.Pos;P.defineOption("autoCloseBrackets",!1,function(E,y,l){l&&l!=P.Init&&(E.removeKeyMap(_),E.state.closeBrackets=null),y&&(g(L(y,"pairs")),E.state.closeBrackets=y,E.addKeyMap(_))});function L(E,y){return y=="pairs"&&typeof E=="string"?E:typeof E=="object"&&E[y]!=null?E[y]:m[y]}var _={Backspace:o,Enter:i};function g(E){for(var y=0;y<E.length;y++){var l=E.charAt(y),n="'"+l+"'";_[n]||(_[n]=S(l))}}g(m.pairs+"`");function S(E){return function(y){return d(y,E)}}function p(E){var y=E.state.closeBrackets;if(!y||y.override)return y;var l=E.getModeAt(E.getCursor());return l.closeBrackets||y}function o(E){var y=p(E);if(!y||E.getOption("disableInput"))return P.Pass;for(var l=L(y,"pairs"),n=E.listSelections(),s=0;s<n.length;s++){if(!n[s].empty())return P.Pass;var u=f(E,n[s].head);if(!u||l.indexOf(u)%2!=0)return P.Pass}for(var s=n.length-1;s>=0;s--){var w=n[s].head;E.replaceRange("",T(w.line,w.ch-1),T(w.line,w.ch+1),"+delete")}}function i(E){var y=p(E),l=y&&L(y,"explode");if(!l||E.getOption("disableInput"))return P.Pass;for(var n=E.listSelections(),s=0;s<n.length;s++){if(!n[s].empty())return P.Pass;var u=f(E,n[s].head);if(!u||l.indexOf(u)%2!=0)return P.Pass}E.operation(function(){var w=E.lineSeparator()||`
|
|
|
`;E.replaceSelection(w+w,null),E.execCommand("goCharLeft"),n=E.listSelections();for(var v=0;v<n.length;v++){var a=n[v].head.line;E.indentLine(a,null,!0),E.indentLine(a+1,null,!0)}})}function r(E){var y=P.cmpPos(E.anchor,E.head)>0;return{anchor:new T(E.anchor.line,E.anchor.ch+(y?-1:1)),head:new T(E.head.line,E.head.ch+(y?1:-1))}}function d(E,y){var l=p(E);if(!l||E.getOption("disableInput"))return P.Pass;var n=L(l,"pairs"),s=n.indexOf(y);if(s==-1)return P.Pass;for(var u=L(l,"closeBefore"),w=L(l,"triples"),v=n.charAt(s+1)==y,a=E.listSelections(),R=s%2==0,D,c=0;c<a.length;c++){var b=a[c],x=b.head,C,F=E.getRange(x,T(x.line,x.ch+1));if(R&&!b.empty())C="surround";else if((v||!R)&&F==y)v&&h(E,x)?C="both":w.indexOf(y)>=0&&E.getRange(x,T(x.line,x.ch+3))==y+y+y?C="skipThree":C="skip";else if(v&&x.ch>1&&w.indexOf(y)>=0&&E.getRange(T(x.line,x.ch-2),x)==y+y){if(x.ch>2&&/\bstring/.test(E.getTokenTypeAt(T(x.line,x.ch-2))))return P.Pass;C="addFour"}else if(v){var j=x.ch==0?" ":E.getRange(T(x.line,x.ch-1),x);if(!P.isWordChar(F)&&j!=y&&!P.isWordChar(j))C="both";else return P.Pass}else if(R&&(F.length===0||/\s/.test(F)||u.indexOf(F)>-1))C="both";else return P.Pass;if(!D)D=C;else if(D!=C)return P.Pass}var k=s%2?n.charAt(s-1):y,X=s%2?y:n.charAt(s+1);E.operation(function(){if(D=="skip")E.execCommand("goCharRight");else if(D=="skipThree")for(var G=0;G<3;G++)E.execCommand("goCharRight");else if(D=="surround"){for(var W=E.getSelections(),G=0;G<W.length;G++)W[G]=k+W[G]+X;E.replaceSelections(W,"around"),W=E.listSelections().slice();for(var G=0;G<W.length;G++)W[G]=r(W[G]);E.setSelections(W)}else D=="both"?(E.replaceSelection(k+X,null),E.triggerElectric(k+X),E.execCommand("goCharLeft")):D=="addFour"&&(E.replaceSelection(k+k+k+k,"before"),E.execCommand("goCharRight"))})}function f(E,y){var l=E.getRange(T(y.line,y.ch-1),T(y.line,y.ch+1));return l.length==2?l:null}function h(E,y){var l=E.getTokenAt(T(y.line,y.ch+1));return/\bstring/.test(l.type)&&l.start==y.ch&&(y.ch==0||!/\bstring/.test(E.getTokenTypeAt(y)))}})},ELcG:function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){/** @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(m){var T=P,L=T.lib,_=L.WordArray,g=L.Hasher,S=T.algo,p=_.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]),o=_.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]),i=_.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),r=_.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]),d=_.create([0,1518500249,1859775393,2400959708,2840853838]),f=_.create([1352829926,1548603684,1836072691,2053994217,0]),h=S.RIPEMD160=g.extend({_doReset:function(){this._hash=_.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(w,v){for(var a=0;a<16;a++){var R=v+a,D=w[R];w[R]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}var c=this._hash.words,b=d.words,x=f.words,C=p.words,F=o.words,j=i.words,k=r.words,X,G,W,K,B,U,H,q,ie,ce;U=X=c[0],H=G=c[1],q=W=c[2],ie=K=c[3],ce=B=c[4];for(var he,a=0;a<80;a+=1)he=X+w[v+C[a]]|0,a<16?he+=E(G,W,K)+b[0]:a<32?he+=y(G,W,K)+b[1]:a<48?he+=l(G,W,K)+b[2]:a<64?he+=n(G,W,K)+b[3]:he+=s(G,W,K)+b[4],he=he|0,he=u(he,j[a]),he=he+B|0,X=B,B=K,K=u(W,10),W=G,G=he,he=U+w[v+F[a]]|0,a<16?he+=s(H,q,ie)+x[0]:a<32?he+=n(H,q,ie)+x[1]:a<48?he+=l(H,q,ie)+x[2]:a<64?he+=y(H,q,ie)+x[3]:he+=E(H,q,ie)+x[4],he=he|0,he=u(he,k[a]),he=he+ce|0,U=ce,ce=ie,ie=u(q,10),q=H,H=he;he=c[1]+W+ie|0,c[1]=c[2]+K+ce|0,c[2]=c[3]+B+U|0,c[3]=c[4]+X+H|0,c[4]=c[0]+G+q|0,c[0]=he},_doFinalize:function(){var w=this._data,v=w.words,a=this._nDataBytes*8,R=w.sigBytes*8;v[R>>>5]|=128<<24-R%32,v[(R+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,w.sigBytes=(v.length+1)*4,this._process();for(var D=this._hash,c=D.words,b=0;b<5;b++){var x=c[b];c[b]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360}return D},clone:function(){var w=g.clone.call(this);return w._hash=this._hash.clone(),w}});function E(w,v,a){return w^v^a}function y(w,v,a){return w&v|~w&a}function l(w,v,a){return(w|~v)^a}function n(w,v,a){return w&a|v&~a}function s(w,v,a){return w^(v|~a)}function u(w,v){return w<<v|w>>>32-v}T.RIPEMD160=g._createHelper(h),T.HmacRIPEMD160=g._createHmacHelper(h)}(Math),P.RIPEMD160})},ETIr:function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.WordArray,_=m.enc,g=_.Base64={stringify:function(p){var o=p.words,i=p.sigBytes,r=this._map;p.clamp();for(var d=[],f=0;f<i;f+=3)for(var h=o[f>>>2]>>>24-f%4*8&255,E=o[f+1>>>2]>>>24-(f+1)%4*8&255,y=o[f+2>>>2]>>>24-(f+2)%4*8&255,l=h<<16|E<<8|y,n=0;n<4&&f+n*.75<i;n++)d.push(r.charAt(l>>>6*(3-n)&63));var s=r.charAt(64);if(s)for(;d.length%4;)d.push(s);return d.join("")},parse:function(p){var o=p.length,i=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var d=0;d<i.length;d++)r[i.charCodeAt(d)]=d}var f=i.charAt(64);if(f){var h=p.indexOf(f);h!==-1&&(o=h)}return S(p,o,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function S(p,o,i){for(var r=[],d=0,f=0;f<o;f++)if(f%4){var h=i[p.charCodeAt(f-1)]<<f%4*2,E=i[p.charCodeAt(f)]>>>6-f%4*2,y=h|E;r[d>>>2]|=y<<24-d%4*8,d++}return L.create(r,d)}}(),P.enc.Base64})},"F+F2":function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){return function(){if(typeof ArrayBuffer!="function")return;var m=P,T=m.lib,L=T.WordArray,_=L.init,g=L.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 p=S.byteLength,o=[],i=0;i<p;i++)o[i>>>2]|=S[i]<<24-i%4*8;_.call(this,o,p)}else _.apply(this,arguments)};g.prototype=L}(),P.lib.WordArray})},GRuw:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("lPiR"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.WordArray,_=m.algo,g=_.SHA256,S=_.SHA224=g.extend({_doReset:function(){this._hash=new L.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var p=g._doFinalize.call(this);return p.sigBytes-=4,p}});m.SHA224=g._createHelper(S),m.HmacSHA224=g._createHmacHelper(S)}(),P.SHA224})},GfqC:function(I,Z,N){"use strict";var P=N("cDcd"),m=N.n(P),T=N("TSYQ"),L=N.n(T);function _(K,B){var U="cannot "+K.method+" "+K.action+" "+B.status+"'",H=new Error(U);return H.status=B.status,H.method=K.method,H.url=K.action,H}function g(K){var B=K.responseText||K.response;if(!B)return B;try{return JSON.parse(B)}catch(U){return B}}function S(K){var B=new XMLHttpRequest;K.onProgress&&B.upload&&(B.upload.onprogress=function(ie){ie.total>0&&(ie.percent=ie.loaded/ie.total*100),K.onProgress(ie)});var U=new FormData;K.data&&Object.keys(K.data).forEach(function(q){var ie=K.data[q];if(Array.isArray(ie)){ie.forEach(function(ce){U.append(q+"[]",ce)});return}U.append(q,K.data[q])}),K.file instanceof Blob?U.append(K.filename,K.file,K.file.name):U.append(K.filename,K.file),B.onerror=function(ie){K.onError(ie)},B.onload=function(){return B.status<200||B.status>=300?K.onError(_(K,B),g(B)):K.onSuccess(g(B),B)},B.open(K.method,K.action,!0),K.withCredentials&&"withCredentials"in B&&(B.withCredentials=!0);var H=K.headers||{};return H["X-Requested-With"]!==null&&B.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(H).forEach(function(q){H[q]!==null&&B.setRequestHeader(q,H[q])}),B.send(U),{abort:function(){B.abort()}}}var p=+new Date,o=0;function i(){return"rc-upload-"+p+"-"+ ++o}function r(K,B){return K.indexOf(B,K.length-B.length)!==-1}var d=function(K,B){if(K&&B){var U=Array.isArray(B)?B:B.split(","),H=K.name||"",q=K.type||"",ie=q.replace(/\/.*$/,"");return U.some(function(ce){var he=ce.trim();return he.charAt(0)==="."?r(H.toLowerCase(),he.toLowerCase()):/\/\*$/.test(he)?ie===he.replace(/\/.*$/,""):q===he})}return!0};function f(K,B){var U=K.createReader(),H=[];function q(){U.readEntries(function(ie){var ce=Array.prototype.slice.apply(ie);H=H.concat(ce);var he=!ce.length;he?B(H):q()})}q()}var h=function(B,U,H){var q=function ie(ce,he){he=he||"",ce.isFile?ce.file(function(be){H(be)&&(ce.fullPath&&!be.webkitRelativePath&&(Object.defineProperties(be,{webkitRelativePath:{writable:!0}}),be.webkitRelativePath=ce.fullPath.replace(/^\//,""),Object.defineProperties(be,{webkitRelativePath:{writable:!1}})),U([be]))}):ce.isDirectory&&f(ce,function(be){be.forEach(function(ne){ie(ne,""+he+ce.name+"/")})})};B.forEach(function(ie){q(ie.webkitGetAsEntry())})},E=h,y=Object.assign||function(K){for(var B=1;B<arguments.length;B++){var U=arguments[B];for(var H in U)Object.prototype.hasOwnProperty.call(U,H)&&(K[H]=U[H])}return K},l=function(){function K(B,U){var H=[],q=!0,ie=!1,ce=void 0;try{for(var he=B[Symbol.iterator](),be;!(q=(be=he.next()).done)&&!(H.push(be.value),U&&H.length===U);q=!0);}catch(ne){ie=!0,ce=ne}finally{try{!q&&he.return&&he.return()}finally{if(ie)throw ce}}return H}return function(B,U){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return K(B,U);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=function(){function K(B,U){for(var H=0;H<U.length;H++){var q=U[H];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(B,q.key,q)}}return function(B,U,H){return U&&K(B.prototype,U),H&&K(B,H),B}}();function s(K,B,U){return B in K?Object.defineProperty(K,B,{value:U,enumerable:!0,configurable:!0,writable:!0}):K[B]=U,K}function u(K,B){var U={};for(var H in K){if(B.indexOf(H)>=0)continue;if(!Object.prototype.hasOwnProperty.call(K,H))continue;U[H]=K[H]}return U}function w(K,B){if(!(K instanceof B))throw new TypeError("Cannot call a class as a function")}function v(K,B){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:K}function a(K,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);K.prototype=Object.create(B&&B.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(K,B):K.__proto__=B)}var R=function(B){return Object.keys(B).reduce(function(U,H){return(H.substr(0,5)==="data-"||H.substr(0,5)==="aria-"||H==="role")&&(U[H]=B[H]),U},{})},D=function(K){a(B,K);function B(){var U,H,q,ie;w(this,B);for(var ce=arguments.length,he=Array(ce),be=0;be<ce;be++)he[be]=arguments[be];return ie=(H=(q=v(this,(U=B.__proto__||Object.getPrototypeOf(B)).call.apply(U,[this].concat(he))),q),q.state={uid:i()},q.reqs={},q.onChange=function(ne){var le=ne.target.files;q.uploadFiles(le),q.reset()},q.onClick=function(ne){var le=q.fileInput;if(!le)return;var ue=q.props,te=ue.children,oe=ue.onClick;te&&te.type==="button"&&(le.parentNode.focus(),le.parentNode.querySelector("button").blur()),le.click(),oe&&oe(ne)},q.onKeyDown=function(ne){ne.key==="Enter"&&q.onClick()},q.onFileDrop=function(ne){var le=q.props.multiple;if(ne.preventDefault(),ne.type==="dragover")return;if(q.props.directory)E(Array.prototype.slice.call(ne.dataTransfer.items),q.uploadFiles,function(te){return d(te,q.props.accept)});else{var ue=Array.prototype.slice.call(ne.dataTransfer.files).filter(function(te){return d(te,q.props.accept)});le===!1&&(ue=ue.slice(0,1)),q.uploadFiles(ue)}},q.uploadFiles=function(ne){var le=Array.prototype.slice.call(ne);le.map(function(ue){return ue.uid=i(),ue}).forEach(function(ue){q.upload(ue,le)})},q.saveFileInput=function(ne){q.fileInput=ne},H),v(q,ie)}return n(B,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(H,q){var ie=this,ce=this.props;if(!ce.beforeUpload)return setTimeout(function(){return ie.post(H)},0);var he=ce.beforeUpload(H,q);he&&he.then?he.then(function(be){var ne=Object.prototype.toString.call(be);return ne==="[object File]"||ne==="[object Blob]"?ie.post(be):ie.post(H)}).catch(function(be){console.log(be)}):he!==!1&&setTimeout(function(){return ie.post(H)},0);return}},{key:"post",value:function(H){var q=this;if(!this._isMounted)return;var ie=this.props,ce=ie.onStart,he=ie.onProgress,be=ie.transformFile,ne=be===void 0?function(le){return le}:be;new Promise(function(le){var ue=ie.action;return typeof ue=="function"&&(ue=ue(H)),le(ue)}).then(function(le){var ue=H.uid,te=ie.customRequest||S,oe=Promise.resolve(ne(H)).then(function(Q){var se=ie.data;return typeof se=="function"&&(se=se(Q)),Promise.all([Q,se])}).catch(function(Q){console.error(Q)});oe.then(function(Q){var se=l(Q,2),J=se[0],ee=se[1],ge={action:le,filename:ie.name,data:ee,file:J,headers:ie.headers,withCredentials:ie.withCredentials,method:ie.method||"post",onProgress:he?function(re){he(re,H)}:null,onSuccess:function(Y,z){delete q.reqs[ue],ie.onSuccess(Y,H,z)},onError:function(Y,z){delete q.reqs[ue],ie.onError(Y,z,H)}};ce(H),q.reqs[ue]=te(ge)})})}},{key:"reset",value:function(){this.setState({uid:i()})}},{key:"abort",value:function(H){var q=this.reqs;if(H){var ie=H;H&&H.uid&&(ie=H.uid),q[ie]&&q[ie].abort&&q[ie].abort(),delete q[ie]}else Object.keys(q).forEach(function(ce){q[ce]&&q[ce].abort&&q[ce].abort(),delete q[ce]})}},{key:"render",value:function(){var H,q=this.props,ie=q.component,ce=q.prefixCls,he=q.className,be=q.disabled,ne=q.id,le=q.style,ue=q.multiple,te=q.accept,oe=q.children,Q=q.directory,se=q.openFileDialogOnClick,J=q.onMouseEnter,ee=q.onMouseLeave,ge=u(q,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),re=L()((H={},s(H,ce,!0),s(H,ce+"-disabled",be),s(H,he,he),H)),Y=be?{}:{onClick:se?this.onClick:function(){},onKeyDown:se?this.onKeyDown:function(){},onMouseEnter:J,onMouseLeave:ee,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return m.a.createElement(ie,y({},Y,{className:re,role:"button",style:le}),m.a.createElement("input",y({},R(ge),{id:ne,type:"file",ref:this.saveFileInput,onClick:function($){return $.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:te,directory:Q?"directory":null,webkitdirectory:Q?"webkitdirectory":null,multiple:ue,onChange:this.onChange})),oe)}}]),B}(P.Component),c=D,b=Object.assign||function(K){for(var B=1;B<arguments.length;B++){var U=arguments[B];for(var H in U)Object.prototype.hasOwnProperty.call(U,H)&&(K[H]=U[H])}return K},x=function(){function K(B,U){for(var H=0;H<U.length;H++){var q=U[H];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(B,q.key,q)}}return function(B,U,H){return U&&K(B.prototype,U),H&&K(B,H),B}}();function C(K,B){if(!(K instanceof B))throw new TypeError("Cannot call a class as a function")}function F(K,B){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:K}function j(K,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);K.prototype=Object.create(B&&B.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(K,B):K.__proto__=B)}function k(){}var X=function(K){j(B,K);function B(){var U,H,q,ie;C(this,B);for(var ce=arguments.length,he=Array(ce),be=0;be<ce;be++)he[be]=arguments[be];return ie=(H=(q=F(this,(U=B.__proto__||Object.getPrototypeOf(B)).call.apply(U,[this].concat(he))),q),q.saveUploader=function(ne){q.uploader=ne},H),F(q,ie)}return x(B,[{key:"abort",value:function(H){this.uploader.abort(H)}},{key:"render",value:function(){return m.a.createElement(c,b({},this.props,{ref:this.saveUploader}))}}]),B}(P.Component);X.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:k,onError:k,onSuccess:k,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var G=X,W=Z.a=G},Gytx:function(I,Z){I.exports=function(P,m,T,L){var _=T?T.call(L,P,m):void 0;if(_!==void 0)return!!_;if(P===m)return!0;if(typeof P!="object"||!P||typeof m!="object"||!m)return!1;var g=Object.keys(P),S=Object.keys(m);if(g.length!==S.length)return!1;for(var p=Object.prototype.hasOwnProperty.bind(m),o=0;o<g.length;o++){var i=g[o];if(!p(i))return!1;var r=P[i],d=m[i];if(_=T?T.call(L,r,d,i):void 0,_===!1||_===void 0&&r!==d)return!1}return!0}},HmJG:function(I,Z,N){},Ib8C:function(I,Z,N){(function(P){(function(m,T){I.exports=Z=T()})(this,function(){var m=m||function(T,L){var _;if(typeof window!="undefined"&&window.crypto&&(_=window.crypto),typeof self!="undefined"&&self.crypto&&(_=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(_=globalThis.crypto),!_&&typeof window!="undefined"&&window.msCrypto&&(_=window.msCrypto),!_&&typeof P!="undefined"&&P.crypto&&(_=P.crypto),!_&&!0)try{_=N(4)}catch(s){}var g=function(){if(_){if(typeof _.getRandomValues=="function")try{return _.getRandomValues(new Uint32Array(1))[0]}catch(s){}if(typeof _.randomBytes=="function")try{return _.randomBytes(4).readInt32LE()}catch(s){}}throw new Error("Native crypto module could not be used to get secure random number.")},S=Object.create||function(){function s(){}return function(u){var w;return s.prototype=u,w=new s,s.prototype=null,w}}(),p={},o=p.lib={},i=o.Base=function(){return{extend:function(s){var u=S(this);return s&&u.mixIn(s),(!u.hasOwnProperty("init")||this.init===u.init)&&(u.init=function(){u.$super.init.apply(this,arguments)}),u.init.prototype=u,u.$super=this,u},create:function(){var s=this.extend();return s.init.apply(s,arguments),s},init:function(){},mixIn:function(s){for(var u in s)s.hasOwnProperty(u)&&(this[u]=s[u]);s.hasOwnProperty("toString")&&(this.toString=s.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),r=o.WordArray=i.extend({init:function(s,u){s=this.words=s||[],u!=L?this.sigBytes=u:this.sigBytes=s.length*4},toString:function(s){return(s||f).stringify(this)},concat:function(s){var u=this.words,w=s.words,v=this.sigBytes,a=s.sigBytes;if(this.clamp(),v%4)for(var R=0;R<a;R++){var D=w[R>>>2]>>>24-R%4*8&255;u[v+R>>>2]|=D<<24-(v+R)%4*8}else for(var c=0;c<a;c+=4)u[v+c>>>2]=w[c>>>2];return this.sigBytes+=a,this},clamp:function(){var s=this.words,u=this.sigBytes;s[u>>>2]&=4294967295<<32-u%4*8,s.length=T.ceil(u/4)},clone:function(){var s=i.clone.call(this);return s.words=this.words.slice(0),s},random:function(s){for(var u=[],w=0;w<s;w+=4)u.push(g());return new r.init(u,s)}}),d=p.enc={},f=d.Hex={stringify:function(s){for(var u=s.words,w=s.sigBytes,v=[],a=0;a<w;a++){var R=u[a>>>2]>>>24-a%4*8&255;v.push((R>>>4).toString(16)),v.push((R&15).toString(16))}return v.join("")},parse:function(s){for(var u=s.length,w=[],v=0;v<u;v+=2)w[v>>>3]|=parseInt(s.substr(v,2),16)<<24-v%8*4;return new r.init(w,u/2)}},h=d.Latin1={stringify:function(s){for(var u=s.words,w=s.sigBytes,v=[],a=0;a<w;a++){var R=u[a>>>2]>>>24-a%4*8&255;v.push(String.fromCharCode(R))}return v.join("")},parse:function(s){for(var u=s.length,w=[],v=0;v<u;v++)w[v>>>2]|=(s.charCodeAt(v)&255)<<24-v%4*8;return new r.init(w,u)}},E=d.Utf8={stringify:function(s){try{return decodeURIComponent(escape(h.stringify(s)))}catch(u){throw new Error("Malformed UTF-8 data")}},parse:function(s){return h.parse(unescape(encodeURIComponent(s)))}},y=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(s){typeof s=="string"&&(s=E.parse(s)),this._data.concat(s),this._nDataBytes+=s.sigBytes},_process:function(s){var u,w=this._data,v=w.words,a=w.sigBytes,R=this.blockSize,D=R*4,c=a/D;s?c=T.ceil(c):c=T.max((c|0)-this._minBufferSize,0);var b=c*R,x=T.min(b*4,a);if(b){for(var C=0;C<b;C+=R)this._doProcessBlock(v,C);u=v.splice(0,b),w.sigBytes-=x}return new r.init(u,x)},clone:function(){var s=i.clone.call(this);return s._data=this._data.clone(),s},_minBufferSize:0}),l=o.Hasher=y.extend({cfg:i.extend(),init:function(s){this.cfg=this.cfg.extend(s),this.reset()},reset:function(){y.reset.call(this),this._doReset()},update:function(s){return this._append(s),this._process(),this},finalize:function(s){s&&this._append(s);var u=this._doFinalize();return u},blockSize:512/32,_createHelper:function(s){return function(u,w){return new s.init(w).finalize(u)}},_createHmacHelper:function(s){return function(u,w){return new n.HMAC.init(s,w).finalize(u)}}}),n=p.algo={};return p}(Math);return m})}).call(this,N("IyRk"))},J66h:function(I,Z,N){(function(P){var m,T;(function(L,_){I.exports=_(L)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof P!="undefined"?P:this,function(L){"use strict";L=L||{};var _=L.Base64,g="2.6.4",S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=function(k){for(var X={},G=0,W=k.length;G<W;G++)X[k.charAt(G)]=G;return X}(S),o=String.fromCharCode,i=function(k){if(k.length<2){var X=k.charCodeAt(0);return X<128?k:X<2048?o(192|X>>>6)+o(128|X&63):o(224|X>>>12&15)+o(128|X>>>6&63)+o(128|X&63)}else{var X=65536+(k.charCodeAt(0)-55296)*1024+(k.charCodeAt(1)-56320);return o(240|X>>>18&7)+o(128|X>>>12&63)+o(128|X>>>6&63)+o(128|X&63)}},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(k){return k.replace(r,i)},f=function(k){var X=[0,2,1][k.length%3],G=k.charCodeAt(0)<<16|(k.length>1?k.charCodeAt(1):0)<<8|(k.length>2?k.charCodeAt(2):0),W=[S.charAt(G>>>18),S.charAt(G>>>12&63),X>=2?"=":S.charAt(G>>>6&63),X>=1?"=":S.charAt(G&63)];return W.join("")},h=L.btoa&&typeof L.btoa=="function"?function(k){return L.btoa(k)}:function(k){if(k.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return k.replace(/[\s\S]{1,3}/g,f)},E=function(k){return h(d(String(k)))},y=function(k){return k.replace(/[+\/]/g,function(X){return X=="+"?"-":"_"}).replace(/=/g,"")},l=function(k,X){return X?y(E(k)):E(k)},n=function(k){return l(k,!0)},s;L.Uint8Array&&(s=function(k,X){for(var G="",W=0,K=k.length;W<K;W+=3){var B=k[W],U=k[W+1],H=k[W+2],q=B<<16|U<<8|H;G+=S.charAt(q>>>18)+S.charAt(q>>>12&63)+(typeof U!="undefined"?S.charAt(q>>>6&63):"=")+(typeof H!="undefined"?S.charAt(q&63):"=")}return X?y(G):G});var u=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,w=function(k){switch(k.length){case 4:var X=(7&k.charCodeAt(0))<<18|(63&k.charCodeAt(1))<<12|(63&k.charCodeAt(2))<<6|63&k.charCodeAt(3),G=X-65536;return o((G>>>10)+55296)+o((G&1023)+56320);case 3:return o((15&k.charCodeAt(0))<<12|(63&k.charCodeAt(1))<<6|63&k.charCodeAt(2));default:return o((31&k.charCodeAt(0))<<6|63&k.charCodeAt(1))}},v=function(k){return k.replace(u,w)},a=function(k){var X=k.length,G=X%4,W=(X>0?p[k.charAt(0)]<<18:0)|(X>1?p[k.charAt(1)]<<12:0)|(X>2?p[k.charAt(2)]<<6:0)|(X>3?p[k.charAt(3)]:0),K=[o(W>>>16),o(W>>>8&255),o(W&255)];return K.length-=[0,0,2,1][G],K.join("")},R=L.atob&&typeof L.atob=="function"?function(k){return L.atob(k)}:function(k){return k.replace(/\S{1,4}/g,a)},D=function(k){return R(String(k).replace(/[^A-Za-z0-9\+\/]/g,""))},c=function(k){return v(R(k))},b=function(k){return String(k).replace(/[-_]/g,function(X){return X=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},x=function(k){return c(b(k))},C;L.Uint8Array&&(C=function(k){return Uint8Array.from(D(b(k)),function(X){return X.charCodeAt(0)})});var F=function(){var k=L.Base64;return L.Base64=_,k};if(L.Base64={VERSION:g,atob:D,btoa:h,fromBase64:x,toBase64:l,utob:d,encode:l,encodeURI:n,btou:v,decode:x,noConflict:F,fromUint8Array:s,toUint8Array:C},typeof Object.defineProperty=="function"){var j=function(k){return{value:k,enumerable:!1,writable:!0,configurable:!0}};L.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",j(function(){return x(this)})),Object.defineProperty(String.prototype,"toBase64",j(function(k){return l(this,k)})),Object.defineProperty(String.prototype,"toBase64URI",j(function(){return l(this,!0)}))}}return L.Meteor&&(Base64=L.Base64),I.exports?I.exports.Base64=L.Base64:!(m=[],T=function(){return L.Base64}.apply(Z,m),T!==void 0&&(I.exports=T)),{Base64:L.Base64}})}).call(this,N("IyRk"))},K3mO:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("3y9D"),N("WYAk"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.Base,_=T.WordArray,g=m.algo,S=g.MD5,p=g.EvpKDF=L.extend({cfg:L.extend({keySize:128/32,hasher:S,iterations:1}),init:function(o){this.cfg=this.cfg.extend(o)},compute:function(o,i){for(var r,d=this.cfg,f=d.hasher.create(),h=_.create(),E=h.words,y=d.keySize,l=d.iterations;E.length<y;){r&&f.update(r),r=f.update(o).finalize(i),f.reset();for(var n=1;n<l;n++)r=f.finalize(r),f.reset();h.concat(r)}return h.sigBytes=y*4,h}});m.EvpKDF=function(o,i,r){return p.create(r).compute(o,i)}}(),P.EvpKDF})},KhGG:function(I,Z,N){"use strict";N.d(Z,"a",function(){return a}),N.d(Z,"c",function(){return c});var P=N("0Owb"),m=N("miYZ"),T=N("tsqr"),L=N("oBTY"),_=N("tJVT"),g=N("PpiC"),S=N("k1fw"),p=N("9og8"),o=N("DZo9"),i=N("8z0m"),r=N("WmNS"),d=N.n(r),f=N("cDcd"),h=N.n(f),E=N("ErOA"),y=N("NFKh"),l=N.n(y),n=N("7Cbv"),s=N("9kvl"),u=N("mxV5"),w=N.n(u),v=i.a.Dragger,a=function(C){var F="bf3c199c2470cb477d907b1e0917c17b",j="5183666c72eec9e4",k=l.a.enc.Utf8.parse(F),X=l.a.enc.Utf8.parse(j),G=l.a.AES.decrypt(C,k,{iv:X,mode:l.a.mode.CBC});return G.toString(l.a.enc.Utf8)},R,D=function(){var x=Object(p.a)(d.a.mark(function C(F){var j,k,X,G,W,K,B,U,H,q,ie;return d.a.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return B=F.identifier,U=F.oldFilename,H=F.newFilename,he.next=3,Object(E.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 3:return q=he.sent,q.data=JSON.parse(a(q.data)),ie=new w.a({endpoint:q==null||((j=q.data)===null||j===void 0)?void 0:j.end_point,region:q==null||((k=q.data)===null||k===void 0)?void 0:k.region,accessKeyId:q==null||((X=q.data)===null||X===void 0)?void 0:X.access_key_id,accessKeySecret:q==null||((G=q.data)===null||G===void 0)?void 0:G.access_key_secret,bucket:q==null||((W=q.data)===null||W===void 0)?void 0:W.bucket,stsToken:q==null||((K=q.data)===null||K===void 0)?void 0:K.security_token}),he.abrupt("return",new Promise(function(be,ne){console.log(11111,"".concat(B,"/").concat(U),"".concat(B,"/").concat(H),q.data),ie.copy("/".concat(B,"/").concat(U),"/".concat(B,"/").concat(H)).then(function(le){console.log("\u62F7\u8D1D\u6210\u529F",le)}).catch(function(le){console.log(le);debugger})}));case 7:case"end":return he.stop()}},C)}));return function(F){return x.apply(this,arguments)}}(),c=function(){var x=Object(p.a)(d.a.mark(function C(F,j,k){var X,G,W,K,B,U,H,q,ie,ce;return d.a.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:return j.file_name=F.name,be.next=3,Object(E.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return H=be.sent,console.log("decrypt(res.data):",a(H.data)),H.data=JSON.parse(a(H.data)),q=F.name.split("."),q.pop(),ie=j.realFileName?q:Object(n.a)(),ce=new w.a({endpoint:H==null||((X=H.data)===null||X===void 0)?void 0:X.end_point,region:H==null||((G=H.data)===null||G===void 0)?void 0:G.region,accessKeyId:H==null||((W=H.data)===null||W===void 0)?void 0:W.access_key_id,accessKeySecret:H==null||((K=H.data)===null||K===void 0)?void 0:K.access_key_secret,bucket:H==null||((B=H.data)===null||B===void 0)?void 0:B.bucket,stsToken:H==null||((U=H.data)===null||U===void 0)?void 0:U.security_token}),be.abrupt("return",new Promise(function(ne,le){var ue;ce.multipartUpload("".concat(ie),new Blob([F],{type:F.type}),Object(S.a)(Object(S.a)({timeout:200*1e3,partSize:102400},k),{},{callback:{url:H==null||((ue=H.data)===null||ue===void 0)?void 0:ue.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(E.e)(j)}})).then(function(te){var oe;F.response=(oe=te.data)===null||oe===void 0?void 0:oe.data,ne(te==null?void 0:te.data)}).catch(function(te){le(te),console.log("err:",te)})}));case 11:case"end":return be.stop()}},C)}));return function(F,j,k){return x.apply(this,arguments)}}(),b=function(C){var F=C.user,j=C.cancelUpload,k=Object(g.a)(C,["user","cancelUpload"]),X=Object(f.useState)([]),G=Object(_.a)(X,2),W=G[0],K=G[1],B=Object(f.useState)(),U=Object(_.a)(B,2),H=U[0],q=U[1],ie={onRemove:function(be){K(Object(L.a)(W.filter(function(ne){return ne.name!==be.name}))),k.onChange(W.filter(function(ne){return ne.name!==be.name}))},disabled:k.disabled,multiple:!0,fileList:W==null?void 0:W.map(function(he){return he.file}),customRequest:function(){},beforeUpload:function(){var he=Object(p.a)(d.a.mark(function ne(le){var ue;return d.a.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:if(ue=k.maxSize||1024*1024*1024*1,!W.filter(function(Q){return Q.name===le.name}).length){oe.next=4;break}return T.b.info("".concat(le.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),oe.abrupt("return");case 4:if(!((le==null?void 0:le.size)>ue)){oe.next=7;break}return T.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(ue/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),oe.abrupt("return",!1);case 7:return W.push({name:le.name,file:le}),K(Object(L.a)(W)),k.onChange(W),oe.abrupt("return",!1);case 11:case"end":return oe.stop()}},ne)}));function be(ne){return he.apply(this,arguments)}return be}()},ce=function(){var he=Object(p.a)(d.a.mark(function be(ne,le){var ue,te,oe,Q,se,J,ee,ge,re,Y;return d.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return le.file_name=ne.name,ee=ne.name,$.next=4,Object(E.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(ge=$.sent,ge.data=JSON.parse(a(ge.data)),!((ge==null?void 0:ge.status)!==0)){$.next=12;break}return W[W.findIndex(function(me){return me.name===ee})].status="error",W[W.findIndex(function(me){return me.name===ee})].file.status="error",k.onChange(W),T.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),$.abrupt("return");case 12:return H=new w.a({endpoint:ge==null||((ue=ge.data)===null||ue===void 0)?void 0:ue.end_point,region:ge==null||((te=ge.data)===null||te===void 0)?void 0:te.region,accessKeyId:ge==null||((oe=ge.data)===null||oe===void 0)?void 0:oe.access_key_id,accessKeySecret:ge==null||((Q=ge.data)===null||Q===void 0)?void 0:Q.access_key_secret,bucket:ge==null||((se=ge.data)===null||se===void 0)?void 0:se.bucket,stsToken:ge==null||((J=ge.data)===null||J===void 0)?void 0:J.security_token}),console.log(ne,"file"),q(H),re=ne.name.split("."),re.pop(),Y=le.realFileName?re:Object(n.a)(),$.abrupt("return",new Promise(function(me,pe){try{var xe;H.multipartUpload("".concat(k.identifier,"/").concat(Y).concat(ee.indexOf(".")>-1?"."+ee.split(".").pop():""),new Blob([ne.file],{type:ne.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(ke,Ne,Pe){try{console.log("\u8FDB\u5EA6",ke,Ne,Pe);var je=W.findIndex(function(Fe){return Fe.name===ee});W[je].file.percent=ke*100,W[je].tempCheckpoint=Ne,K(Object(L.a)(W))}catch(Fe){}},checkpoint:W[W.findIndex(function(Re){return Re.name===ee})].tempCheckpoint,callback:{customValue:{id:ee+""},url:ge==null||((xe=ge.data)===null||xe===void 0)?void 0:xe.callback_url,host:ge==null?void 0:ge.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(E.e)(le)}}).then(function(Re){var ke,Ne=W.findIndex(function(_e){return _e.name===ee}),Pe="done";if(((ke=Re.data)===null||ke===void 0?void 0:ke.status)===0){var je;ne.response=(je=Re.data)===null||je===void 0?void 0:je.data;var Fe=W.findIndex(function(_e){return _e.name===ee});W[Fe].status="done",W[Fe].file.status="done"}else{var We;T.b.warn((We=Re.data)===null||We===void 0?void 0:We.message),Pe="error"}W[Ne].status=Pe,W[Ne].file.status=Pe,k.onChange(W),me(Re==null?void 0:Re.data)}).catch(function(Re){W[W.findIndex(function(ke){return ke.name===ee})].status="error",W[W.findIndex(function(ke){return ke.name===ee})].file.status="error",T.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),K(Object(L.a)(W)),k.onChange(W),pe(Re),console.log("err:",Re)})}catch(Re){}}));case 19:case"end":return $.stop()}},be)}));return function(ne,le){return he.apply(this,arguments)}}();return Object(f.useEffect)(function(){W.every(function(he){return he==="done"||he==="error"})&&k.onComplete(W)},[W]),Object(f.useEffect)(function(){if(j){var he;(he=H)===null||he===void 0||he.cancel()}},[j]),Object(f.useEffect)(function(){k.uploading&&W.map(function(){var he=Object(p.a)(d.a.mark(function be(ne){var le,ue;return d.a.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:if(!((!ne.status||ne.status==="error")&&!j)){oe.next=6;break}return ne.status="uploading",ne.file.status="uploading",oe.next=5,ce(ne,{login:F==null||((le=F.userInfo)===null||le===void 0)?void 0:le.login,container_type:k.container_type,container_id:k.container_id,description:k.description,realFileName:k.realFileName});case 5:ue=oe.sent;case 6:case"end":return oe.stop()}},be)}));return function(be){return he.apply(this,arguments)}}())},[k.uploading]),h.a.createElement(v,Object(P.a)({},ie,{height:k.height,className:k.className}),h.a.createElement("p",{className:"ant-upload-hint"},k.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};Z.b=Object(s.a)(function(x){var C=x.loading,F=x.globalSetting,j=x.user;return{globalSetting:F,loading:C.models.competitions,user:j}})(b)},KmYQ:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.pad.ZeroPadding={pad:function(m,T){var L=T*4;m.clamp(),m.sigBytes+=L-(m.sigBytes%L||L)},unpad:function(m){for(var T=m.words,L=m.sigBytes-1,L=m.sigBytes-1;L>=0;L--)if(T[L>>>2]>>>24-L%4*8&255){m.sigBytes=L+1;break}}},P.pad.ZeroPadding})},LdHM:function(I,Z,N){"use strict";N.d(Z,"b",function(){return u}),N.d(Z,"a",function(){return v});var P=N("1OyB"),m=N("vuIU"),T=N("Ji7U"),L=N("LK+K"),_=N("cDcd"),g=N("rePB"),S=N("Ff2n"),p=N("ODXe"),o=N("4IlW"),i=N("bX4T"),r=N("YrtM"),d=N("TSYQ"),f=N.n(d),h=N("+nKL"),E=N("8OUc"),y=function(H,q){var ie=H.prefixCls,ce=H.id,he=H.flattenOptions,be=H.childrenAsData,ne=H.values,le=H.searchValue,ue=H.multiple,te=H.defaultActiveFirstOption,oe=H.height,Q=H.itemHeight,se=H.notFoundContent,J=H.open,ee=H.menuItemSelectedIcon,ge=H.virtual,re=H.onSelect,Y=H.onToggleOpen,z=H.onActiveValue,$=H.onScroll,me=H.onMouseEnter,pe="".concat(ie,"-item"),xe=Object(r.a)(function(){return he},[J,he],function(He,Le){return Le[0]&&He[1]!==Le[1]}),Re=_.useRef(null),ke=function(Le){Le.preventDefault()},Ne=function(Le){Re.current&&Re.current.scrollTo({index:Le})},Pe=function(Le){for(var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ae=xe.length,ye=0;ye<Ae;ye+=1){var Ee=(Le+ye*Te+Ae)%Ae,we=xe[Ee],Oe=we.group,Ce=we.data;if(!Oe&&!Ce.disabled)return Ee}return-1},je=_.useState(function(){return Pe(0)}),Fe=Object(p.a)(je,2),We=Fe[0],_e=Fe[1],Ge=function(Le){_e(Le);var Te=xe[Le];if(!Te){z(null,-1);return}z(Te.data.value,Le)};_.useEffect(function(){Ge(te!==!1?Pe(0):-1)},[xe.length,le]),_.useEffect(function(){var He=setTimeout(function(){if(!ue&&J&&ne.size===1){var Le=Array.from(ne)[0],Te=xe.findIndex(function(Ae){var ye=Ae.data;return ye.value===Le});Ge(Te),Ne(Te)}});return function(){return clearTimeout(He)}},[J]);var Ve=function(Le){Le!==void 0&&re(Le,{selected:!ne.has(Le)}),ue||Y(!1)};if(_.useImperativeHandle(q,function(){return{onKeyDown:function(Le){var Te=Le.which;switch(Te){case o.a.UP:case o.a.DOWN:{var Ae=0;if(Te===o.a.UP?Ae=-1:Te===o.a.DOWN&&(Ae=1),Ae!==0){var ye=Pe(We+Ae,Ae);Ne(ye),Ge(ye)}break}case o.a.ENTER:{var Ee=xe[We];Ee&&!Ee.data.disabled?Ve(Ee.data.value):Ve(void 0),J&&Le.preventDefault();break}case o.a.ESC:Y(!1)}},onKeyUp:function(){},scrollTo:function(Le){Ne(Le)}}}),xe.length===0)return _.createElement("div",{role:"listbox",id:"".concat(ce,"_list"),className:"".concat(pe,"-empty"),onMouseDown:ke},se);function Ie(He){var Le=xe[He];if(!Le)return null;var Te=Le.data||{},Ae=Te.value,ye=Te.label,Ee=Te.children,we=Object(i.a)(Te,!0),Oe=be?Ee:ye;return Le?_.createElement("div",Object.assign({"aria-label":typeof Oe=="string"?Oe:null},we,{key:He,role:"option",id:"".concat(ce,"_list_").concat(He),"aria-selected":ne.has(Ae)}),Ae):null}return _.createElement(_.Fragment,null,_.createElement("div",{role:"listbox",id:"".concat(ce,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ie(We-1),Ie(We),Ie(We+1)),_.createElement(h.a,{itemKey:"key",ref:Re,data:xe,height:oe,itemHeight:Q,fullHeight:!1,onMouseDown:ke,onScroll:$,virtual:ge,onMouseEnter:me},function(He,Le){var Te,Ae=He.group,ye=He.groupOption,Ee=He.data,we=Ee.label,Oe=Ee.key;if(Ae)return _.createElement("div",{className:f()(pe,"".concat(pe,"-group"))},we!==void 0?we:Oe);var Ce=Ee.disabled,Be=Ee.value,Ke=Ee.title,qe=Ee.children,et=Ee.style,it=Ee.className,pt=Object(S.a)(Ee,["disabled","value","title","children","style","className"]),gt=ne.has(Be),at="".concat(pe,"-option"),Rt=f()(pe,at,it,(Te={},Object(g.a)(Te,"".concat(at,"-grouped"),ye),Object(g.a)(Te,"".concat(at,"-active"),We===Le&&!Ce),Object(g.a)(Te,"".concat(at,"-disabled"),Ce),Object(g.a)(Te,"".concat(at,"-selected"),gt),Te)),Tt=be?qe:we,Pt=!ee||typeof ee=="function"||gt;return _.createElement("div",Object.assign({},pt,{"aria-selected":gt,className:Rt,title:Ke,onMouseMove:function(){if(We===Le||Ce)return;Ge(Le)},onClick:function(){Ce||Ve(Be)},style:et}),_.createElement("div",{className:"".concat(at,"-content")},Tt||Be),_.isValidElement(ee)||gt,Pt&&_.createElement(E.a,{className:"".concat(pe,"-option-state"),customizeIcon:ee,customizeIconProps:{isSelected:gt}},gt?"\u2713":null))}))},l=_.forwardRef(y);l.displayName="OptionList";var n=l,s=function(){return null};s.isSelectOption=!0;var u=s,w=function(){return null};w.isSelectOptGroup=!0;var v=w,a=N("VTBJ"),R=N("Zm9Q");function D(U){var H=U.key,q=U.props,ie=q.children,ce=q.value,he=Object(S.a)(q,["children","value"]);return Object(a.a)({key:H,value:ce!==void 0?ce:H,children:ie},he)}function c(U){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(R.a)(U).map(function(q,ie){if(!_.isValidElement(q)||!q.type)return null;var ce=q.type.isSelectOptGroup,he=q.key,be=q.props,ne=be.children,le=Object(S.a)(be,["children"]);return H||!ce?D(q):Object(a.a)(Object(a.a)({key:"__RC_SELECT_GRP__".concat(he===null?ie:he,"__"),label:he},le),{},{options:c(ne)})}).filter(function(q){return q})}var b=N("2Qr1"),x=N("qNPg"),C=N("U8pU"),F=N("Kwbf"),j=N("WKfj");function k(U){var H=U.mode,q=U.options,ie=U.children,ce=U.backfill,he=U.allowClear,be=U.placeholder,ne=U.getInputElement,le=U.showSearch,ue=U.onSearch,te=U.defaultOpen,oe=U.autoFocus,Q=U.labelInValue,se=U.value,J=U.inputValue,ee=U.optionLabelProp,ge=H==="multiple"||H==="tags",re=le!==void 0?le:ge||H==="combobox",Y=q||c(ie);if(Object(F.a)(H!=="tags"||Y.every(function(pe){return!pe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),H==="tags"||H==="combobox"){var z=Y.some(function(pe){return pe.options?pe.options.some(function(xe){return typeof("value"in xe?xe.value:xe.key)=="number"}):typeof("value"in pe?pe.value:pe.key)=="number"});Object(F.a)(!z,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(F.a)(H!=="combobox"||!ee,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(F.a)(H==="combobox"||!ce,"`backfill` only works with `combobox` mode."),Object(F.a)(H==="combobox"||!ne,"`getInputElement` only work with `combobox` mode."),Object(F.b)(H!=="combobox"||!ne||!he||!be,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ue&&!re&&H!=="combobox"&&H!=="tags"&&Object(F.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(F.b)(!te||oe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),se!=null){var $=Object(j.d)(se);Object(F.a)(!Q||$.every(function(pe){return Object(C.a)(pe)==="object"&&("key"in pe||"value"in pe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(F.a)(!ge||Array.isArray(se),"`value` should be array when `mode` is `multiple` or `tags`")}if(ie){var me=null;Object(R.a)(ie).some(function(pe){if(!_.isValidElement(pe)||!pe.type)return!1;var xe=pe.type;if(xe.isSelectOption)return!1;if(xe.isSelectOptGroup){var Re=Object(R.a)(pe.props.children).every(function(ke){return!_.isValidElement(ke)||!pe.type||ke.type.isSelectOption?!0:(me=ke.type,!1)});return!Re}return me=xe,!0}),me&&Object(F.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(me.displayName||me.name||me,"`.")),Object(F.a)(J===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var X=k,G=Object(x.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:c,flattenOptions:b.d,getLabeledValue:b.e,filterOptions:b.b,isValueDisabled:b.g,findValueOption:b.c,warningProps:X,fillOptionsWithMissingValue:b.a}),W=function(U){Object(T.a)(q,U);var H=Object(L.a)(q);function q(){var ie;return Object(P.a)(this,q),ie=H.apply(this,arguments),ie.selectRef=_.createRef(),ie.focus=function(){ie.selectRef.current.focus()},ie.blur=function(){ie.selectRef.current.blur()},ie}return Object(m.a)(q,[{key:"render",value:function(){return _.createElement(G,Object.assign({ref:this.selectRef},this.props))}}]),q}(_.Component);W.Option=u,W.OptGroup=v;var K=W,B=Z.c=K},M8RZ:function(I,Z,N){"use strict";N.d(Z,"a",function(){return o});var P=N("fWQN"),m=N("mtLc"),T=N("yKVA"),L=N("879j"),_=N("cDcd"),g=N.n(_),S=N("faye"),p=N.n(S),o=function(i){Object(T.a)(d,i);var r=Object(L.a)(d);function d(f){var h;Object(P.a)(this,d),h=r.call(this,f);var E=window.document;return h.node=E.createElement("div"),E.body.appendChild(h.node),h}return Object(m.a)(d,[{key:"render",value:function(){var h=this.props.children;return Object(S.createPortal)(h,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),d}(g.a.Component)},MFOe:function(I,Z,N){(function(P){var m=g(),T=S(),L=p(),_=typeof window!="undefined"?window:P;I.exports={assign:m,create:T,trim:L,bind:o,slice:i,each:r,map:d,pluck:f,isList:h,isFunction:E,isObject:y,Global:_};function g(){return Object.assign?Object.assign:function(n,s,u,w){for(var v=1;v<arguments.length;v++)r(Object(arguments[v]),function(a,R){n[R]=a});return n}}function S(){if(Object.create)return function(s,u,w,v){var a=i(arguments,1);return m.apply(this,[Object.create(s)].concat(a))};{function l(){}return function(s,u,w,v){var a=i(arguments,1);return l.prototype=s,m.apply(this,[new l].concat(a))}}}function p(){return String.prototype.trim?function(n){return String.prototype.trim.call(n)}:function(n){return n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function o(l,n){return function(){return n.apply(l,Array.prototype.slice.call(arguments,0))}}function i(l,n){return Array.prototype.slice.call(l,n||0)}function r(l,n){f(l,function(s,u){return n(s,u),!1})}function d(l,n){var s=h(l)?[]:{};return f(l,function(u,w){return s[w]=n(u,w),!1}),s}function f(l,n){if(h(l)){for(var s=0;s<l.length;s++)if(n(l[s],s))return l[s]}else for(var u in l)if(l.hasOwnProperty(u)&&n(l[u],u))return l[u]}function h(l){return l!=null&&typeof l!="function"&&typeof l.length=="number"}function E(l){return l&&{}.toString.call(l)==="[object Function]"}function y(l){return l&&{}.toString.call(l)==="[object Object]"}}).call(this,N("IyRk"))},MlIO:function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){return function(m){var T=P,L=T.lib,_=L.Base,g=L.WordArray,S=T.x64={},p=S.Word=_.extend({init:function(i,r){this.high=i,this.low=r}}),o=S.WordArray=_.extend({init:function(i,r){i=this.words=i||[],r!=m?this.sigBytes=r:this.sigBytes=i.length*8},toX32:function(){for(var i=this.words,r=i.length,d=[],f=0;f<r;f++){var h=i[f];d.push(h.high),d.push(h.low)}return g.create(d,this.sigBytes)},clone:function(){for(var i=_.clone.call(this),r=i.words=this.words.slice(0),d=r.length,f=0;f<d;f++)r[f]=r[f].clone();return i}})}(),P})},NFKh:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("MlIO"),N("F+F2"),N("qM6L"),N("ETIr"),N("wbyO"),N("cv67"),N("3y9D"),N("lPiR"),N("GRuw"),N("1uat"),N("uGsb"),N("5hvy"),N("ELcG"),N("WYAk"),N("e7zE"),N("K3mO"),N("OLod"),N("ALsQ"),N("9OqN"),N("qu8F"),N("S6kV"),N("gb/T"),N("qBft"),N("oRuE"),N("jO9C"),N("KmYQ"),N("uGxW"),N("bQjk"),N("wZgz"),N("pA7S"),N("w7YG"),N("E4JC"),N("PVpz"))})(this,function(P){return P})},NvD2:function(I,Z,N){"use strict";N.d(Z,"a",function(){return g});var P=N("Kwbf");function m(S,p){var o=new Set;return S.forEach(function(i){p.has(i)||o.add(i)}),o}function T(S){var p=S||{},o=p.disabled,i=p.disableCheckbox,r=p.checkable;return!!(o||i)||r===!1}function L(S,p,o,i){for(var r=new Set(S),d=new Set,f=0;f<=o;f+=1){var h=p.get(f)||new Set;h.forEach(function(n){var s=n.key,u=n.node,w=n.children,v=w===void 0?[]:w;r.has(s)&&!i(u)&&v.filter(function(a){return!i(a.node)}).forEach(function(a){r.add(a.key)})})}for(var E=new Set,y=o;y>=0;y-=1){var l=p.get(y)||new Set;l.forEach(function(n){var s=n.parent,u=n.node;if(i(u)||!n.parent||E.has(n.parent.key))return;if(i(n.parent.node)){E.add(s.key);return}var w=!0,v=!1;(s.children||[]).filter(function(a){return!i(a.node)}).forEach(function(a){var R=a.key,D=r.has(R);w&&!D&&(w=!1),!v&&(D||d.has(R))&&(v=!0)}),w&&r.add(s.key),v&&d.add(s.key),E.add(s.key)})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(m(d,r))}}function _(S,p,o,i,r){for(var d=new Set(S),f=new Set(p),h=0;h<=i;h+=1){var E=o.get(h)||new Set;E.forEach(function(s){var u=s.key,w=s.node,v=s.children,a=v===void 0?[]:v;!d.has(u)&&!f.has(u)&&!r(w)&&a.filter(function(R){return!r(R.node)}).forEach(function(R){d.delete(R.key)})})}f=new Set;for(var y=new Set,l=i;l>=0;l-=1){var n=o.get(l)||new Set;n.forEach(function(s){var u=s.parent,w=s.node;if(r(w)||!s.parent||y.has(s.parent.key))return;if(r(s.parent.node)){y.add(u.key);return}var v=!0,a=!1;(u.children||[]).filter(function(R){return!r(R.node)}).forEach(function(R){var D=R.key,c=d.has(D);v&&!c&&(v=!1),!a&&(c||f.has(D))&&(a=!0)}),v||d.delete(u.key),a&&f.add(u.key),y.add(u.key)})}return{checkedKeys:Array.from(d),halfCheckedKeys:Array.from(m(f,d))}}function g(S,p,o,i){var r=[],d;i?d=i:d=T;var f=new Set(S.filter(function(l){var n=!!o[l];return n||r.push(l),n})),h=new Map,E=0;Object.keys(o).forEach(function(l){var n=o[l],s=n.level,u=h.get(s);u||(u=new Set,h.set(s,u)),u.add(n),E=Math.max(E,s)}),Object(P.a)(!r.length,"Tree missing follow keys: ".concat(r.slice(0,100).map(function(l){return"'".concat(l,"'")}).join(", ")));var y;return p===!0?y=L(f,h,E,d):y=_(f,p.halfCheckedKeys,h,E,d),y}},OLES:function(I,Z,N){"use strict";var P=N("U8pU"),m=N("VTBJ"),T=N("Ff2n"),L=N("cDcd"),_=N("uciX"),g=N("7ixt"),S=function(f){var h=f.overlay,E=f.prefixCls,y=f.id,l=f.overlayInnerStyle;return L.createElement("div",{className:"".concat(E,"-inner"),id:y,role:"tooltip",style:l},typeof h=="function"?h():h)},p=S,o=function(f,h){var E=f.overlayClassName,y=f.trigger,l=y===void 0?["hover"]:y,n=f.mouseEnterDelay,s=n===void 0?0:n,u=f.mouseLeaveDelay,w=u===void 0?.1:u,v=f.overlayStyle,a=f.prefixCls,R=a===void 0?"rc-tooltip":a,D=f.children,c=f.onVisibleChange,b=f.afterVisibleChange,x=f.transitionName,C=f.animation,F=f.placement,j=F===void 0?"right":F,k=f.align,X=k===void 0?{}:k,G=f.destroyTooltipOnHide,W=G===void 0?!1:G,K=f.defaultVisible,B=f.getTooltipContainer,U=f.overlayInnerStyle,H=Object(T.a)(f,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),q=Object(L.useRef)(null);Object(L.useImperativeHandle)(h,function(){return q.current});var ie=Object(m.a)({},H);"visible"in f&&(ie.popupVisible=f.visible);var ce=function(){var ue=f.arrowContent,te=ue===void 0?null:ue,oe=f.overlay,Q=f.id;return[L.createElement("div",{className:"".concat(R,"-arrow"),key:"arrow"},te),L.createElement(p,{key:"content",prefixCls:R,id:Q,overlay:oe,overlayInnerStyle:U})]},he=!1,be=!1;if(typeof W=="boolean")he=W;else if(W&&Object(P.a)(W)==="object"){var ne=W.keepParent;he=ne===!0,be=ne===!1}return L.createElement(_.a,Object.assign({popupClassName:E,prefixCls:R,popup:ce,action:l,builtinPlacements:g.a,popupPlacement:j,ref:q,popupAlign:X,getPopupContainer:B,onPopupVisibleChange:c,afterPopupVisibleChange:b,popupTransitionName:x,popupAnimation:C,defaultPopupVisible:K,destroyPopupOnHide:he,autoDestroy:be,mouseLeaveDelay:w,popupStyle:v,mouseEnterDelay:s},ie),D)},i=Object(L.forwardRef)(o),r=Z.a=i},OLod:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("K3mO"))})(this,function(P){P.lib.Cipher||function(m){var T=P,L=T.lib,_=L.Base,g=L.WordArray,S=L.BufferedBlockAlgorithm,p=T.enc,o=p.Utf8,i=p.Base64,r=T.algo,d=r.EvpKDF,f=L.Cipher=S.extend({cfg:_.extend(),createEncryptor:function(x,C){return this.create(this._ENC_XFORM_MODE,x,C)},createDecryptor:function(x,C){return this.create(this._DEC_XFORM_MODE,x,C)},init:function(x,C,F){this.cfg=this.cfg.extend(F),this._xformMode=x,this._key=C,this.reset()},reset:function(){S.reset.call(this),this._doReset()},process:function(x){return this._append(x),this._process()},finalize:function(x){x&&this._append(x);var C=this._doFinalize();return C},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function x(C){return typeof C=="string"?b:R}return function(C){return{encrypt:function(F,j,k){return x(j).encrypt(C,F,j,k)},decrypt:function(F,j,k){return x(j).decrypt(C,F,j,k)}}}}()}),h=L.StreamCipher=f.extend({_doFinalize:function(){var x=this._process(!0);return x},blockSize:1}),E=T.mode={},y=L.BlockCipherMode=_.extend({createEncryptor:function(x,C){return this.Encryptor.create(x,C)},createDecryptor:function(x,C){return this.Decryptor.create(x,C)},init:function(x,C){this._cipher=x,this._iv=C}}),l=E.CBC=function(){var x=y.extend();x.Encryptor=x.extend({processBlock:function(F,j){var k=this._cipher,X=k.blockSize;C.call(this,F,j,X),k.encryptBlock(F,j),this._prevBlock=F.slice(j,j+X)}}),x.Decryptor=x.extend({processBlock:function(F,j){var k=this._cipher,X=k.blockSize,G=F.slice(j,j+X);k.decryptBlock(F,j),C.call(this,F,j,X),this._prevBlock=G}});function C(F,j,k){var X,G=this._iv;G?(X=G,this._iv=m):X=this._prevBlock;for(var W=0;W<k;W++)F[j+W]^=X[W]}return x}(),n=T.pad={},s=n.Pkcs7={pad:function(x,C){for(var F=C*4,j=F-x.sigBytes%F,k=j<<24|j<<16|j<<8|j,X=[],G=0;G<j;G+=4)X.push(k);var W=g.create(X,j);x.concat(W)},unpad:function(x){var C=x.words[x.sigBytes-1>>>2]&255;x.sigBytes-=C}},u=L.BlockCipher=f.extend({cfg:f.cfg.extend({mode:l,padding:s}),reset:function(){var x;f.reset.call(this);var C=this.cfg,F=C.iv,j=C.mode;this._xformMode==this._ENC_XFORM_MODE?x=j.createEncryptor:(x=j.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==x?this._mode.init(this,F&&F.words):(this._mode=x.call(j,this,F&&F.words),this._mode.__creator=x)},_doProcessBlock:function(x,C){this._mode.processBlock(x,C)},_doFinalize:function(){var x,C=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(C.pad(this._data,this.blockSize),x=this._process(!0)):(x=this._process(!0),C.unpad(x)),x},blockSize:128/32}),w=L.CipherParams=_.extend({init:function(x){this.mixIn(x)},toString:function(x){return(x||this.formatter).stringify(this)}}),v=T.format={},a=v.OpenSSL={stringify:function(x){var C,F=x.ciphertext,j=x.salt;return j?C=g.create([1398893684,1701076831]).concat(j).concat(F):C=F,C.toString(i)},parse:function(x){var C,F=i.parse(x),j=F.words;return j[0]==1398893684&&j[1]==1701076831&&(C=g.create(j.slice(2,4)),j.splice(0,4),F.sigBytes-=16),w.create({ciphertext:F,salt:C})}},R=L.SerializableCipher=_.extend({cfg:_.extend({format:a}),encrypt:function(x,C,F,j){j=this.cfg.extend(j);var k=x.createEncryptor(F,j),X=k.finalize(C),G=k.cfg;return w.create({ciphertext:X,key:F,iv:G.iv,algorithm:x,mode:G.mode,padding:G.padding,blockSize:x.blockSize,formatter:j.format})},decrypt:function(x,C,F,j){j=this.cfg.extend(j),C=this._parse(C,j.format);var k=x.createDecryptor(F,j).finalize(C.ciphertext);return k},_parse:function(x,C){return typeof x=="string"?C.parse(x,this):x}}),D=T.kdf={},c=D.OpenSSL={execute:function(x,C,F,j){j||(j=g.random(64/8));var k=d.create({keySize:C+F}).compute(x,j),X=g.create(k.words.slice(C),F*4);return k.sigBytes=C*4,w.create({key:k,iv:X,salt:j})}},b=L.PasswordBasedCipher=R.extend({cfg:R.cfg.extend({kdf:c}),encrypt:function(x,C,F,j){j=this.cfg.extend(j);var k=j.kdf.execute(F,x.keySize,x.ivSize);j.iv=k.iv;var X=R.encrypt.call(this,x,C,k.key,j);return X.mixIn(k),X},decrypt:function(x,C,F,j){j=this.cfg.extend(j),C=this._parse(C,j.format);var k=j.kdf.execute(F,x.keySize,x.ivSize,C.salt);j.iv=k.iv;var X=R.decrypt.call(this,x,C,k.key,j);return X}})}()})},OZM5:function(I,Z,N){"use strict";N.d(Z,"b",function(){return i}),N.d(Z,"a",function(){return r}),N.d(Z,"k",function(){return d}),N.d(Z,"h",function(){return f}),N.d(Z,"i",function(){return h}),N.d(Z,"g",function(){return E}),N.d(Z,"c",function(){return y}),N.d(Z,"d",function(){return l}),N.d(Z,"j",function(){return u}),N.d(Z,"e",function(){return w}),N.d(Z,"f",function(){return v});var P=N("KQm4"),m=N("U8pU"),T=N("Ff2n"),L=N("cDcd"),_=N.n(L),g=N("Kwbf"),S=N("WaYH"),p=.25,o=2;function i(a,R){var D=a.slice(),c=D.indexOf(R);return c>=0&&D.splice(c,1),D}function r(a,R){var D=a.slice();return D.indexOf(R)===-1&&D.push(R),D}function d(a){return a.split("-")}function f(a,R){return"".concat(a,"-").concat(R)}function h(a){return a&&a.type&&a.type.isTreeNode}function E(a,R){var D=[a],c=R[a];function b(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];x.forEach(function(C){var F=C.key,j=C.children;D.push(F),b(j)})}return b(c.children),D}function y(a,R){var D=a.clientY,c=R.selectHandle.getBoundingClientRect(),b=c.top,x=c.bottom,C=c.height,F=Math.max(C*p,o);return D<=b+F?-1:D>=x-F?1:0}function l(a,R){if(!a)return;var D=R.multiple;return D?a.slice():a.length?[a[0]]:a}var n=function(R){return R};function s(a,R){if(!a)return[];var D=R||{},c=D.processProps,b=c===void 0?n:c,x=Array.isArray(a)?a:[a];return x.map(function(C){var F=C.children,j=Object(T.a)(C,["children"]),k=s(F,R);return _.a.createElement(S.a,Object.assign({},b(j)),k)})}function u(a){if(!a)return null;var R;if(Array.isArray(a))R={checkedKeys:a,halfCheckedKeys:void 0};else if(Object(m.a)(a)==="object")R={checkedKeys:a.checked||void 0,halfCheckedKeys:a.halfChecked||void 0};else return Object(g.a)(!1,"`checkedKeys` is not an array or an object"),null;return R}function w(a,R){var D=new Set;function c(b){if(D.has(b))return;var x=R[b];if(!x)return;D.add(b);var C=x.parent,F=x.node;if(F.disabled)return;C&&c(C.key)}return(a||[]).forEach(function(b){c(b)}),Object(P.a)(D)}function v(a){var R={};return Object.keys(a).forEach(function(D){(D.startsWith("data-")||D.startsWith("aria-"))&&(R[D]=a[D])}),R}},Ot1p:function(I,Z,N){"use strict";var P=N("2qtc"),m=N("kLXV"),T=N("rAM+"),L=N("miYZ"),_=N("tsqr"),g=N("9og8"),S=N("tJVT"),p=N("jrin"),o=N("WmNS"),i=N.n(o),r=N("cDcd"),d=N.n(r),f=N("VrN/"),h=N.n(f),E=N("bdgK"),y=N("p77/"),l=N("Bd2K"),n=N("ELLl"),s=N("19Vz"),u=N("lZu9"),w=N("+NIl"),v=N("kSUc"),a=N("9Bee"),R=function(Ce){var Be=Ce.value,Ke=Be===void 0?"":Be,qe=Ce.className,et=Ce.showTextOnly,it=Ce.showLines,pt=Ce.style,gt=pt===void 0?{}:pt,at=Object(r.useMemo)(function(){return""},[Ke]);return d.a.createElement(d.a.Fragment,null,d.a.createElement("div",{dangerouslySetInnerHTML:{__html:at}}))},D=N("0Owb"),c=N("dejd"),b=N("C+DQ"),x=N("1vsH"),C=N("m3rI"),F=[{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 j(Ce){var Be=Ce.onActionCallback,Ke=Ce.title,qe=Ce.icon,et=Ce.actionName,it=Ce.className,pt=it===void 0?"":it,gt=Ce.children;function at(){Be(et)}return d.a.createElement("a",{title:Ke,className:pt,onClick:at},d.a.createElement("i",{className:"md-iconfont ".concat(qe)}),gt)}var k=function(Ce){var Be=Ce.watch,Ke=Ce.showNullButton,qe=Ce.onActionCallback,et=Ce.fullScreen,it=Ce.insertTemp,pt=Ce.hidetoolBar,gt=Ce.uuid,at=Ce.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(x.G)("_educoder_session_login"),"&_educoder_session=").concat(Object(x.G)("_educoder_session"),"&key=").concat(gt,"&api=").concat(encodeURIComponent(C.a.PROXY_SERVER)));var Rt=[].concat(F,[{title:"".concat(Be?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Be?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return d.a.createElement("ul",{className:"markdown-toolbar-container"},!pt&&Rt.map(function(Tt,Pt){return d.a.createElement("li",{key:Pt},Tt.actionName?d.a.createElement(j,Object(D.a)({},Tt,{onActionCallback:qe})):d.a.createElement("span",{className:"v-line"}))}),Ke?d.a.createElement("li",null,d.a.createElement(j,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:qe},d.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,it&&d.a.createElement("li",null,d.a.createElement(j,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(it),onActionCallback:qe},d.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),d.a.createElement("li",{className:"btn-full-screen"},d.a.createElement(j,{icon:"".concat(et?"icon-shrink":"icon-enlarge"),title:et?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:qe})))},X=N("M8RZ"),G=N("+L6B"),W=N("2/Rp"),K=N("y8nQ"),B=N("Vl3Y"),U=N("5NDa"),H=N("5rEg"),q={labelCol:{span:4},wrapperCol:{span:20}},ie=function(Ce){var Be=Ce.callback,Ke=Ce.onCancel;function qe(et){Be(et)}return d.a.createElement(B.a,Object(D.a)({},q,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:qe}),d.a.createElement(B.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},d.a.createElement(H.a,null)),d.a.createElement(B.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},d.a.createElement(H.a,null)),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),d.a.createElement(W.a,{type:"ghost",onClick:Ke},"\u53D6\u6D88")))},ce=N("7ahc"),he=N("HmJG"),be=N("BjJ7"),ne=B.a.useForm,le={width:280,marginRight:10},ue={labelCol:{span:5},wrapperCol:{span:19}},te=function(Ce){var Be=Ce.callback,Ke=Ce.onCancel,qe=ne(),et=Object(S.a)(qe,1),it=et[0];function pt(Rt){Be(Rt)}function gt(Rt,Tt){if(Rt.status===-1){_.b.error(Rt.message);return}it.setFieldsValue({src:"/api/attachments/".concat(Rt.id),type:Tt.type})}function at(Rt){var Tt=Rt.target.files[0];Q(Tt,gt)}return d.a.createElement(B.a,Object(D.a)({form:it},ue,{className:"upload-image-panel",onFinish:pt}),d.a.createElement(B.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},d.a.createElement("div",{className:"flex-container"},d.a.createElement(B.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},d.a.createElement(H.a,{style:le})),d.a.createElement(oe,{onFileChange:at}))),d.a.createElement(B.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},d.a.createElement(H.a,{style:{width:264}})),d.a.createElement(B.a.Item,{style:{textAlign:"right"}},d.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),d.a.createElement(W.a,{type:"ghost",onClick:Ke},"\u53D6\u6D88")))};function oe(Ce){var Be=Ce.onFileChange;return d.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",d.a.createElement("input",{type:"file",onChange:Be}))}function Q(Ce,Be){if(!Ce)throw new String("\u6CA1\u6709\u6587\u4EF6");var Ke=new FormData;Ke.append("editormd-image-file",Ce),Ke.append("file_param_name","editormd-image-file"),Ke.append("byxhr","true");var qe=new window.XMLHttpRequest;qe.withCredentials=!0,qe.addEventListener("load",function(et){Be(JSON.parse(et.target.responseText),Ce)},!1),qe.addEventListener("error",function(et){console.error(et)},!1),qe.open("POST","".concat(be.a,"/api/attachments.json")),qe.send(Ke)}var se=N("giR+"),J=N("fyUT"),ee=N("7Kak"),ge=N("9yH6"),re=ge.a.Group,Y={margin:"0 8px"},z=function(Ce){var Be=Ce.callback,Ke=Ce.onCancel;function qe(et){Be(et)}return d.a.createElement(B.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:qe},d.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},d.a.createElement("span",{style:Y},"\u5355\u5143\u683C\u6570\uFF1A"),d.a.createElement("span",{style:Y},"\u884C\u6570"),d.a.createElement(B.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},d.a.createElement(J.a,null)),d.a.createElement("span",{style:Y},"\u5217\u6570"),d.a.createElement(B.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},d.a.createElement(J.a,null))),d.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},d.a.createElement("span",{style:Y},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),d.a.createElement(B.a.Item,{name:"align"},d.a.createElement(re,null,d.a.createElement(ge.a,{value:"default"},d.a.createElement("i",{className:"fa fa-align-justify"})),d.a.createElement(ge.a,{value:"left"},d.a.createElement("i",{className:"fa fa-align-left"})),d.a.createElement(ge.a,{value:"center"},d.a.createElement("i",{className:"fa fa-align-center"})),d.a.createElement(ge.a,{value:"right"},d.a.createElement("i",{className:"fa fa-align-right"}))))),d.a.createElement("div",{className:"flex-container flex-end"},d.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),d.a.createElement(W.a,{type:"ghost",onClick:Ke},"\u53D6\u6D88")))},$=N("ErOA"),me=N("7Cbv"),pe="link",xe="upload-image",Re="code-block",ke="add-table",Ne="------------",Pe={default:Ne,left:":".concat(Ne),center:":".concat(Ne,":"),right:"".concat(Ne,":")},je=N("9VGf"),Fe,We;function _e(){}var Ge=0,Ve=1e4,Ie="\u2581",He=`
|
|
|
**\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 Le(Ce){return/^\d+$/.test(Ce)?"".concat(Ce,"px"):Ce}var Te=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ae=Te?"Cmd":"Ctrl",ye=["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"],Ee=(Fe={},Object(p.a)(Fe,Ae+"-B","bold"),Object(p.a)(Fe,Ae+"-I","italic"),Fe),we=(We={},Object(p.a)(We,pe,"\u6DFB\u52A0\u94FE\u63A5"),Object(p.a)(We,Re,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(p.a)(We,xe,"\u6DFB\u52A0\u6587\u4EF6"),Object(p.a)(We,ke,"\u6DFB\u52A0\u8868\u683C"),We),Oe=Z.a=function(Ce){var Be=Ce.defaultValue,Ke=Be===void 0?"":Be,qe=Ce.onChange,et=Ce.width,it=et===void 0?"100%":et,pt=Ce.height,gt=pt===void 0?400:pt,at=Ce.miniToolbar,Rt=at===void 0?!1:at,Tt=Ce.isFocus,Pt=Tt===void 0?!1:Tt,Ft=Ce.watch,ct=Ce.insertTemp,mr=Ce.mode,Or=mr===void 0?"markdown":mr,dr=Ce.id,Ye=dr===void 0?"markdown-editor-id":dr,ht=Ce.showResizeBar,Wt=ht===void 0?!1:ht,Mt=Ce.noStorage,Bt=Mt===void 0?!1:Mt,Ct=Ce.showNullButton,kt=Ct===void 0?!1:Ct,ut=Ce.hidetoolBar,Ot=ut===void 0?!1:ut,qt=Ce.fullScreen,Vt=qt===void 0?!1:qt,It=Ce.onBlur,tr=Ce.onCMBeforeChange,Nt=Ce.onFullScreen,Yr=Ce.className,Je=Yr===void 0?"":Yr,yt=Ce.disablePaste,vn=yt===void 0?!1:yt,Fr=Ce.placeholder,jr=Fr===void 0?"":Fr,Pr=Ce.values,an=Pr===void 0?"":Pr,St=Object(r.useState)(null),gr=Object(S.a)(St,2),Xe=gr[0],Yt=gr[1],wt=Object(r.useState)(Ke),br=Object(S.a)(wt,2),vr=br[0],xr=br[1],on=Object(r.useState)(Ft),Ar=Object(S.a)(on,2),or=Ar[0],$r=Ar[1],ar=Object(r.useState)(Vt),sn=Object(S.a)(ar,2),Ir=sn[0],On=sn[1],aa=Object(r.useState)(""),An=Object(S.a)(aa,2),fr=An[0],ln=An[1],ia=Object(r.useState)(0),un=Object(S.a)(ia,2),Qt=un[0],Ht=un[1],sr=Object(r.useState)(gt),Er=Object(S.a)(sr,2),yn=Er[0],Dn=Er[1],wa=Object(r.useState)(!1),cn=Object(S.a)(wa,2),Xa=cn[0],Nn=cn[1],Rn=Object(r.useRef)(Object(me.a)()),dn=Object(r.useRef)(!1),Ln=Object(r.useRef)(),bn=Object(r.useRef)(),xn=Object(r.useRef)(),Jr=Object(r.useRef)(),Kn=Object(r.useRef)(),Ta=function(){var vt=Object(g.a)(i.a.mark(function At(){var Et,jt;return i.a.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ze.next=2,Object($.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Rn.current}});case 2:jt=Ze.sent,jt!=null&&(Et=jt.attachments)!==null&&Et!==void 0&&Et.length&&(console.log("cm:",Xe,bn),jt.attachments.map(function(tt){tt.content_type.indexOf("image")>-1?Xe.replaceSelection(".concat(tt.content_type,")")):tt.content_type.indexOf("video")>-1?Xe.replaceSelection('<video width="100%" controls src="'.concat(C.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):tt.content_type.indexOf("pdf")>-1?Xe.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(tt.id,"?type=").concat(tt.content_type,'&disposition=inline" target="_blank">').concat(tt.name,"</a>")):Xe.replaceSelection("[".concat(tt.name,"](").concat(C.a.API_SERVER,"/api/attachments/").concat(tt.id,"?type=").concat(tt.content_type,")"))}));case 4:case"end":return Ze.stop()}},At)}));return function(){return vt.apply(this,arguments)}}();Object(r.useEffect)(function(){xr(an),Xe==null||Xe.setValue(an)},[an]),Object(r.useEffect)(function(){Nt==null||Nt(Ir)},[Ir]),Object(r.useEffect)(function(){if(bn.current){var vt=h.a.fromTextArea(bn.current,{mode:Or,lineNumbers:!Rt,lineWrapping:!0,value:Ke,autoCloseTags:!0,autoCloseBrackets:!0});Pt&&vt.focus();function At(Et,jt){if(vn){jt.preventDefault();return}var rt=jt.clipboardData;if(rt){var Ze=rt.types.toString(),tt=rt.items;if(Ze==="Files"||rt.types.indexOf("Files")>-1){if(jt.preventDefault(),Or=="stex")return;try{var dt,bt=tt[1];((dt=tt[0])===null||dt===void 0?void 0:dt.kind)==="file"&&(bt=tt[0]);var Qe=bt.getAsFile(),Dt=Qe.name.split(".").pop();Q(Qe,function(ot){if(ot.id){var Kt,Xt,rr;(Qe==null||((Kt=Qe.type)===null||Kt===void 0)?void 0:Kt.indexOf("image"))>-1?vt.replaceSelection(".concat(ot.content_type,")")):(Qe==null||((Xt=Qe.type)===null||Xt===void 0)?void 0:Xt.indexOf("video"))>-1?vt.replaceSelection('<video width="100%" controls src="'.concat(C.a.API_SERVER,"/api/attachments/").concat(ot.id,'"></video>')):(Qe==null||((rr=Qe.type)===null||rr===void 0)?void 0:rr.indexOf("pdf"))>-1?vt.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(ot.id,"?type=").concat(Qe.type,'&disposition=inline" target="_blank">').concat(Qe.name,"</a>")):ye.includes(Dt)?vt.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(ot.id,'?type=office&disposition=inline" target="_blank">').concat(Qe.name,"</a>")):vt.replaceSelection("[".concat(Qe.name,"](").concat(C.a.API_SERVER,"/api/attachments/").concat(ot.id,"?type=").concat(ot.content_type,")"))}else(ot==null?void 0:ot.status)===401&&(document.location.href="/user/login")})}catch(ot){_.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return vt.on("paste",At),vt.on("dragleave",function(Et,jt){xn.current.classList.remove("mouse-hover-md")}),vt.on("dragover",function(Et,jt){xn.current.classList.add("mouse-hover-md")}),vt.on("drop",function(Et,jt){xn.current.classList.add("mouse-hover-md");var rt;if(rt=jt.dataTransfer.files,rt.length>0){jt.preventDefault(),jt.stopPropagation();for(var Ze=function(bt){var Qe=rt[bt],Dt=Qe.name.split(".").pop();Q(Qe,function(ot){if(ot.id){var Kt,Xt,rr;(Qe==null||((Kt=Qe.type)===null||Kt===void 0)?void 0:Kt.indexOf("image"))>-1?vt.replaceSelection(".concat(ot.content_type,")")):(Qe==null||((Xt=Qe.type)===null||Xt===void 0)?void 0:Xt.indexOf("video"))>-1?vt.replaceSelection('<video width="100%" controls src="'.concat(C.a.API_SERVER,"/api/attachments/").concat(ot.id,'"></video>')):(Qe==null||((rr=Qe.type)===null||rr===void 0)?void 0:rr.indexOf("pdf"))>-1?vt.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(ot.id,"?type=").concat(Qe.type,'&disposition=inline" target="_blank">').concat(Qe.name,"</a>")):ye.includes(Dt)?vt.replaceSelection('<a href="'.concat(C.a.API_SERVER,"/api/attachments/").concat(ot.id,'?type=office&disposition=inline" target="_blank">').concat(Qe.name,"</a>")):vt.replaceSelection("[".concat(Qe.name,"](").concat(C.a.API_SERVER,"/api/attachments/").concat(ot.id,"?type=").concat(ot.content_type,")"))}else(ot==null?void 0:ot.status)===401&&(document.location.href="/user/login")})},tt=0;tt<rt.length;tt++)Ze(tt)}}),Yt(vt),function(){vt.off("paste",At)}}},[]);var Dr=Object(r.useCallback)(function(){if(xn.current)try{}catch(vt){console.log(vt,"---- to set md editor body height")}},[yn,xn,Ir]);Object(r.useEffect)(function(){function vt(){var Et=new E.default(function(jt){var rt=Object(T.a)(jt),Ze;try{for(rt.s();!(Ze=rt.n()).done;){var tt=Ze.value;(tt.target.offsetHeight>0||tt.target.offsetWidth>0)&&(Dr(),Xe.setSize("100%","100%"),Xe.refresh())}}catch(dt){rt.e(dt)}finally{rt.f()}});return Et.observe(bn.current.parentElement),Et}if(Xe){var At=vt();return function(){At.unobserve(bn.current.parentElement)}}},[Xe,Dr]),Object(r.useEffect)(function(){if(Xe){for(var vt=[],At=function(){var tt=jt[Et];rt=Object(S.a)(tt,2);var dt=rt[0],bt=rt[1],Qe=Object(p.a)({},dt,function(){Gn(bt)});vt.push(Qe),Xe.addKeyMap(Qe)},Et=0,jt=Object.entries(Ee);Et<jt.length;Et++){var rt;At()}return Ln.current=setInterval(function(){dn.current&&Ta()},4e3),function(){clearInterval(Ln.current);var Ze=Object(T.a)(vt),tt;try{for(Ze.s();!(tt=Ze.n()).done;){var dt=tt.value;Xe.removeKeyMap(dt)}}catch(bt){Ze.e(bt)}finally{Ze.f()}}}},[Xe]),Object(r.useEffect)(function(){Vt!==Ir&&On(Vt)},[Vt]),Object(je.a)(function(){if(!Bt&&Qt>0){var vt=new Date().getTime(),At=window.sessionStorage.getItem(Ye);vt>=Qt+Ve&&(!At||At!==vr)&&(window.sessionStorage.setItem(Ye,vr),Nn(!0))}},Ve),Object(r.useEffect)(function(){$r(Ft)},[Xe,Ft]),Object(r.useEffect)(function(){Xe&&(Pt&&Xe.focus())},[Xe,Pt]),Object(r.useEffect)(function(){if(or&&Xe){var vt=Xe.getScrollerElement();function At(Et){var jt=Et.target;if(Kn.current){var rt=jt.scrollTop/jt.scrollHeight;Kn.current.scrollTop=Kn.current.scrollHeight*rt}}return vt.addEventListener("scroll",At),function(){vt.removeEventListener("scroll",At)}}},[Xe,or]),Object(r.useEffect)(function(){if(Xe&&tr){function vt(At,Et){tr(At,Et)}return Xe.on("beforeChange",vt),function(){Xe.off("beforeChange",vt)}}},[Xe,tr]),Object(r.useEffect)(function(){if(Xe&&It){function vt(){It(Xe.getValue())}return Xe.on("blur",vt),function(){Xe.off("blur",vt)}}},[Xe,It]),Object(r.useEffect)(function(){if(Xe){function vt(At){var Et=At.getValue();xr(Et),Ht(new Date().getTime()),At.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),qe&&qe(Et)}return Xe.on("change",vt),function(){Xe.off("change",vt)}}},[Xe,qe]),Object(r.useEffect)(function(){Xe&&(Ke==null?(Xe.setValue(""),xr("")):Ke!==Xe.getValue()&&(Xe.setValue(Ke),xr(Ke),Xe.setCursor(Xe.lineCount(),0)))},[Xe,Ke]);var Gn=Object(r.useCallback)(function(vt){var At=Xe.getCursor(),Et=Xe.getSelection(),jt=Et.split(`
|
|
|
`);switch(vt){case"bold":return Xe.replaceSelection("**"+Et+"**"),Et===""&&Xe.setCursor(At.line,At.ch+2),Xe.focus();case"italic":return Xe.replaceSelection("*"+Et+"*"),Et===""&&Xe.setCursor(At.line,At.ch+1),Xe.focus();case"code":return Xe.replaceSelection("`"+Et+"`"),Et===""&&Xe.setCursor(At.line,At.ch+1),Xe.focus();case"inline-latex":return Xe.replaceSelection("`$$"+Et+"$$`"),Et===""&&Xe.setCursor(At.line,At.ch+3),Xe.focus();case"latex":return Xe.replaceSelection("```latex\n"+Et+"\n```"),Xe.setCursor(At.line+1,Et.length+1),Xe.focus();case"line-break":return Xe.replaceSelection(`<br/>
|
|
|
`),Xe.focus();case"list-ul":return Et===""?Xe.replaceSelection("- "+Et):Xe.replaceSelection(jt.map(function(rt){return rt===""?"":"- ".concat(rt)}).join(`
|
|
|
`)),Xe.focus();case"list-ol":return Et===""?Xe.replaceSelection("1. "+Et):Xe.replaceSelection(jt.map(function(rt,Ze){return rt===""?"":"".concat(Ze+1,". ").concat(rt)}).join(`
|
|
|
`)),Xe.focus();case"add-null-ch":return Et===""&&Xe.setCursor(At.line,At.ch+1),Xe.replaceSelection(Ie),Xe.focus();case"inster-template-1":return Et===""&&Xe.setCursor(At.line,At.ch),Xe.replaceSelection(He),Xe.focus();case"eraser":return Xe.setValue(""),Xe.focus();case"trigger-watch":return $r(!or),Xe.focus();case"trigger-full-screen":return On(!Ir),Xe.focus();case pe:ln(pe);return;case Re:ln(Re);return;case xe:ln(xe);return;case ke:ln(ke);return;default:throw new Error}},[Xe,or,Ir]),kn=Object(r.useCallback)(function(vt){ln("");switch(fr){case pe:var At=vt.title,Et=vt.link;return Xe.replaceSelection("[".concat(At,"](").concat(Et,")")),Xe.focus();case Re:var jt=vt.language,rt=vt.content;return Xe.replaceSelection(["```"+jt,rt,"```"].join(`
|
|
|
`)),Xe.focus();case xe:var Ze=vt.src,tt=vt.alt;return tt?Xe.replaceSelection(".concat(Ze,' "').concat(tt,'" )')):Xe.replaceSelection("")),Xe.focus();case ke:for(var dt=vt.row,bt=vt.col,Qe=vt.align,Dt=`
|
|
|
`,ot=0;ot<dt;ot++){for(var Kt=[],Xt=[],rr=0;rr<bt;rr++)ot===1&&Xt.push(Pe[Qe]),Kt.push(" ");ot===1&&(Dt+="| ".concat(Xt.join(" | "),` |
|
|
|
`)),Dt+="| ".concat(Kt.join(bt===1?"":" | "),` |
|
|
|
`)}return Xe.replaceSelection(Dt+`
|
|
|
`),Xe.focus();default:throw new Error}},[Xe,fr]),oa=Object(r.useMemo)(function(){switch(fr){case pe:return d.a.createElement(ie,{callback:kn,onCancel:Pn});case Re:return d.a.createElement(ce.b,{callback:kn,onCancel:Pn});case xe:return d.a.createElement(te,{callback:kn,onCancel:Pn});case ke:return d.a.createElement(z,{callback:kn,onCancel:Pn});default:return null}},[fr]);function Pn(){ln("")}Object(r.useEffect)(function(){if(Jr.current){var vt=Jr.current,At=!1,Et=0;function jt(tt){At=!0,Et=tt.pageY}function rt(){At=!1}function Ze(tt){if(At){var dt=tt.pageY-Et;dt<0&&(dt=0),dt>300&&(dt=300);var bt=gt+dt+"px";Dn(bt)}}return vt.addEventListener("mousedown",jt),document.addEventListener("mousemove",Ze),document.addEventListener("mouseup",rt),function(){vt.removeEventListener("mousedown",jt),document.removeEventListener("mousemove",Ze),document.removeEventListener("mouseup",rt)}}},[Xe,Jr]),Object(r.useEffect)(function(){Dn(gt)},[gt]);var fn=Le(it),sa=Le(yn),Zr={width:fn,height:sa},la=Object(r.useMemo)(function(){if(Qt){var vt=new Date(Qt),At=vt.getHours(),Et=vt.getMinutes(),jt=vt.getSeconds();return At=At<10?"0"+At:At,Et=Et<10?"0"+Et:Et,jt=jt<10?"0"+jt:jt,"".concat(At,":").concat(Et,":").concat(jt)}return 0},[Qt]);function Sa(){window.sessionStorage.removeItem(Ye),Nn(!1),Ht(0)}function Fn(){Nn(!1),Ht(0),Xe.setValue(window.sessionStorage.getItem(Ye))}function Va(vt,At){var Et=Xe.getValue();Et=Et.replace(vt,At),xr(Et),Xe==null||Xe.setValue(Et)}return d.a.createElement(r.Fragment,null,d.a.createElement("div",{className:"markdown-editor-wrapper",ref:xn},d.a.createElement("div",{className:"markdown-editor-container ".concat(Je," ").concat(or?"on-preview":""," ").concat(Rt?"mini":""," ").concat(Ir?"full-screen":""),style:Zr},d.a.createElement(k,{insertTemp:ct,watch:or,fullScreen:Ir,showNullButton:kt,onActionCallback:Gn,hidetoolBar:Ot,uuid:Rn.current,setOpenPhones:function(){dn.current=!0}}),d.a.createElement("div",{className:"markdown-editor-body"},d.a.createElement("div",{className:"codemirror-container"},d.a.createElement("textarea",{ref:bn,placeholder:jr})),or?d.a.createElement("div",{ref:Kn,className:"preview-container"},Or==="stex"&&d.a.createElement(R,{value:vr}),Or!=="stex"&&d.a.createElement(a.a,{edit:!0,value:vr,replaces:Va})):null))),Wt?d.a.createElement("a",{ref:Jr,className:"editor-resize"}):null,d.a.createElement(X.a,null,we[fr]?d.a.createElement(m.a,{centered:!0,title:we[fr],visible:!0,onCancel:Pn,footer:null,className:"markdown-popup-form"},oa):null))}},"P/tu":function(I,Z,N){"use strict";var P=N("ozfa"),m=N("MJZm"),T=N("0Owb"),L=N("9og8"),_=N("tJVT"),g=N("PpiC"),S=N("WmNS"),p=N.n(S),o=N("cDcd"),i=N.n(o),r=N("WCUW"),d=N("spXi"),f=N.n(d),h=function(y){var l=y.value,n=y.onChange,s=y.defaultValue,u=y.disabled,w=Object(g.a)(y,["value","onChange","defaultValue","disabled"]),v=Object(o.useState)([]),a=Object(_.a)(v,2),R=a[0],D=a[1],c=Object(o.useState)("1"),b=Object(_.a)(c,2),x=b[0],C=b[1];Object(o.useEffect)(function(){F()},[]);var F=function(){var X=Object(L.a)(p.a.mark(function G(){var W,K;return p.a.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return U.next=2,Object(r.A)({});case 2:W=U.sent,W!=null&&W.data&&(K=[{title:i.a.createElement("div",{title:"\u6839\u76EE\u5F55",className:f.a.name},"\u6839\u76EE\u5F55"),value:0,key:0,icon:i.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:j(W.data||[])}],D(K),C("2"));case 4:case"end":return U.stop()}},G)}));return function(){return X.apply(this,arguments)}}(),j=function(G){function W(K){var B=K.children,U=Array.isArray(B)&&B.length>0,H=K==null?void 0:K.group_id;return{title:i.a.createElement("div",{title:K==null?void 0:K.name,className:f.a.name},K==null?void 0:K.name),value:H,key:H,icon:i.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:U?B==null?void 0:B.map(function(q){return W(q)}):[]}}return G==null?void 0:G.map(function(K){return W(K)})},k=s?{defaultExpandedKeys:[0]}:{selectedKeys:l,defaultExpandedKeys:l};return i.a.createElement("div",{className:f.a.customTree},i.a.createElement(m.a,Object(T.a)({key:x},k,{showIcon:!0,treeData:R,onSelect:n,disabled:u},w)))};Z.a=h},PD8m:function(I,Z){I.exports={name:"memoryStorage",read:P,write:m,each:T,remove:L,clearAll:_};var N={};function P(g){return N[g]}function m(g,S){N[g]=S}function T(g){for(var S in N)N.hasOwnProperty(S)&&g(N[S],S)}function L(g){delete N[g]}function _(g){N={}}},PHyj:function(I,Z,N){"use strict";N.r(Z),N.d(Z,"Types",function(){return ct});var P=N("P2fV"),m=N("NJEC"),T=N("CiB2"),L=N("DYRE"),_=N("zeV3"),g=N("7Kak"),S=N("9yH6"),p=N("sRBo"),o=N("kaz8"),i=N("giR+"),r=N("fyUT"),d=N("6UJt"),f=N("DFOY"),h=N("OaEy"),E=N("2fM7"),y=N("rAM+"),l=N("T2oS"),n=N("W9HT"),s=N("+L6B"),u=N("2/Rp"),w=N("oBTY"),v=N("miYZ"),a=N("tsqr"),R=N("9og8"),D=N("y8nQ"),c=N("Vl3Y"),b=N("tJVT"),x=N("k1fw"),C=N("fu2T"),F=N("gK9i"),j=N("2qtc"),k=N("kLXV"),X=N("5NDa"),G=N("5rEg"),W=N("WmNS"),K=N.n(W),B=N("cDcd"),U=N.n(B),H=N("uMZB"),q=N.n(H),ie=N("jrin"),ce,he=E.a.Option,be;(function(Ye){Ye[Ye.language=0]="language",Ye[Ye.difficult=1]="difficult",Ye[Ye.category=2]="category",Ye[Ye.openOrNot=3]="openOrNot"})(be||(be={}));var ne=(ce={},Object(ie.a)(ce,be.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(ie.a)(ce,be.difficult,[{title:"\u7B80\u5355",key:1},{title:"\u4E2D\u7B49",key:2},{title:"\u56F0\u96BE",key:3}]),Object(ie.a)(ce,be.category,[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}]),Object(ie.a)(ce,be.openOrNot,[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]),ce);function le(Ye){return ne[Ye].map(function(ht){return U.a.createElement(he,{key:ht.title,value:ht.key}," ",ht.title," ")})}function ue(Ye,ht){Ye.map(function(Wt){var Mt=Wt.id,Bt=Wt.name,Ct=Wt.sub_disciplines,kt={value:Mt,label:Bt};ht.push(kt),Ct&&Ct.length>0&&(kt.children=[],ue(Ct,kt.children))})}function te(Ye,ht){for(var Wt=[],Mt=0;Mt<Ye.length;Mt++){var Bt,Ct=Ye[Mt];if(((Bt=Ct.sub_disciplines)===null||Bt===void 0?void 0:Bt.length)>0){Wt[0]=Ct.id;for(var kt=0;kt<Ct.sub_disciplines.length;kt++){var ut=Ct.sub_disciplines[kt];if(ut.id===ht)return Wt[1]=ut.id,[Wt,ut.tag_disciplines||ut.sub_disciplines||[]]}}}return[Wt,[]]}var oe=N("Ty5D"),Q=N("J66h"),se=N("GIiI"),J=N("2BaD"),ee=N("Ot1p"),ge=N("ErOA");function re(){return Object(ge.c)("problems/new.json")}function Y(){var Ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"question";return Object(ge.c)("disciplines.json",{source:Ye})}function z(Ye){return Object(ge.c)("problems/".concat(Ye,"/edit.json"))}function $(Ye,ht){return Object(ge.g)("problems/".concat(Ye,".json"),ht)}function me(Ye){return Object(ge.f)("problems.json",Ye)}function pe(Ye,ht){return Object(ge.f)("exercises/".concat(Ye,"/exercise_questions.json"),ht)}function xe(Ye,ht){return Object(ge.g)("exercise_questions/".concat(Ye,".json"),ht)}function Re(Ye){return Object(ge.f)("problems/".concat(Ye,"/publish.json"))}function ke(Ye){return Object(ge.f)("problems/".concat(Ye,"/cancel_publish.json"))}function Ne(Ye){return Object(ge.c)("problems/".concat(Ye,"/start.json"))}function Pe(Ye,ht){return Object(ge.f)("tag_disciplines.json",{name:ht,sub_discipline_id:Ye})}var je=N("V0Rq"),Fe=N("cDPC"),We=N("EHPI"),_e=N("bbsP"),Ge=N("/wGt"),Ve=N("ZW9T"),Ie=N("ZD9Y"),He=N("M8RZ"),Le=N("bCnd"),Te=N("b8wu"),Ae=N.n(Te),ye=N("LvDl"),Ee={theme:Object(Le.a)("cmCodeMode","vs-dark"),fontSize:Object(Le.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(Le.a)("cmTabToSpace",!0)},we;(function(Ye){Ye[Ye.set_font_size=0]="set_font_size",Ye[Ye.set_theme=1]="set_theme",Ye[Ye.on_tab_to_space=2]="on_tab_to_space",Ye[Ye.set_show_editor_setting=3]="set_show_editor_setting"})(we||(we={}));function Oe(Ye,ht){switch(ht.type){case we.set_show_editor_setting:return Object(x.a)(Object(x.a)({},Ye),{},{showEditorSetting:ht.payload});case we.set_theme:return Object(x.a)(Object(x.a)({},Ye),{},{theme:ht.payload});case we.set_font_size:return Object(x.a)(Object(x.a)({},Ye),{},{fontSize:ht.payload});case we.on_tab_to_space:return Object(x.a)(Object(x.a)({},Ye),{},{tabToSpace:ht.payload});default:throw new Error}}var Ce=function(Ye){var ht,Wt=Ye.isLoading,Mt=Ye.value,Bt=Mt===void 0?[]:Mt,Ct=Ye.onChange,kt=Object(B.useReducer)(Oe,Ee),ut=Object(b.a)(kt,2),Ot=ut[0],qt=ut[1],Vt=Ot.theme,It=Ot.fontSize,tr=Ot.showEditorSetting,Nt=Ot.tabToSpace,Yr=Object(B.useState)("c"),Je=Object(b.a)(Yr,2),yt=Je[0],vn=Je[1],Fr=Object(B.useRef)([]);Object(B.useEffect)(function(){Bt!=null&&Bt.length&&(Fr.current=Object(ye.cloneDeep)(Bt))},[Bt]);var jr={onFontSizeChange:function(Yt){qt({type:we.set_font_size,payload:Yt}),Object(Le.b)("cmFontSize",Yt)},tabToSpace:Nt,cmFontSize:It,className:"oj",cmCodeMode:Vt,onTabToSpace:function(Yt){qt({type:we.on_tab_to_space,payload:Yt}),Object(Le.b)("cmTabToSpace",Yt)},onCodeModeChange:function(Yt){qt({type:we.set_theme,payload:Yt}),Object(Le.b)("cmCodeMode",Yt)}};function Pr(){qt({type:we.set_show_editor_setting,payload:!1})}function an(){qt({type:we.set_show_editor_setting,payload:!0})}function St(Xe){var Yt,wt=(Yt=Fr.current)===null||Yt===void 0?void 0:Yt.map(function(br){return br.language===yt&&(br.code=Xe),br});Fr.current=Object(ye.cloneDeep)(wt),Ct(wt)}var gr={key:yt,value:Bt==null||((ht=Bt.find(function(Xe){return Xe.language===yt}))===null||ht===void 0)?void 0:ht.code,language:yt,onChange:St,theme:Vt,height:"calc(100% - 56px)",options:{fontSize:It,insertSpaces:Nt}};return U.a.createElement(B.Fragment,null,U.a.createElement("div",{className:Ae.a["code-panel-container"]},U.a.createElement(Be,{languageItems:Bt,onLanguage:function(Yt){return vn(Yt)},language:yt,onShowCodeSetting:an}),!Wt&&U.a.createElement(Ve.b,gr)),U.a.createElement(He.a,null,U.a.createElement(Ge.a,{className:"oj",title:null,placement:"right",closable:!1,visible:tr,onClose:Pr},U.a.createElement(Ie.a,jr))))};function Be(Ye){var ht=Ye.languageItems,Wt=Ye.language,Mt=Ye.onShowCodeSetting,Bt=Ye.onLanguage;return U.a.createElement("div",{className:Ae.a["action-oj-bar"]},U.a.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),ht==null?void 0:ht.map(function(Ct){return U.a.createElement("div",{className:Wt===(Ct==null?void 0:Ct.language)?Ae.a.active:"",onClick:function(){return Bt(Ct==null?void 0:Ct.language)},key:Ct==null?void 0:Ct.language},Ct==null?void 0:Ct.language)}),U.a.createElement("a",{onClick:Mt},U.a.createElement("i",{className:"iconfont icon-shezhi"})))}var Ke=N("m3rI"),qe=N("u2Z1"),et=N("P/tu"),it=N("B7Ph"),pt=N("vCeJ"),gt=N("hQp1"),at=G.a.TextArea,Rt=k.a.confirm,Tt=F.a.Panel;function Pt(){return new Date().getTime()}var Ft={loading:!0,user:null,disciplines:[],dicts:null,status:0,data:void 0,lastedUpdateTime:0},ct;(function(Ye){Ye[Ye.SET_INITAL_DATA=0]="SET_INITAL_DATA",Ye[Ye.SET_LOADING=1]="SET_LOADING",Ye[Ye.SET_STATUS=2]="SET_STATUS"})(ct||(ct={}));function mr(Ye,ht){switch(ht.type){case ct.SET_INITAL_DATA:return Object(x.a)(Object(x.a)({},Ye),ht.payload);case ct.SET_LOADING:return Object(x.a)(Object(x.a)({},Ye),{},{loading:ht.payload});case ct.SET_STATUS:return Object(x.a)(Object(x.a)({},Ye),{},{status:ht.payload});default:throw new Error}}var Or=Z.default=function(){var Ye,ht,Wt=Object(oe.h)(),Mt=Object(oe.g)(),Bt=Object(oe.i)(),Ct=Bt.id,kt=c.a.useForm(),ut=Object(b.a)(kt,1),Ot=ut[0],qt=Object(B.useState)(),Vt=Object(b.a)(qt,2),It=Vt[0],tr=Vt[1],Nt=Object(B.useState)([]),Yr=Object(b.a)(Nt,2),Je=Yr[0],yt=Yr[1],vn=Object(B.useState)([]),Fr=Object(b.a)(vn,2),jr=Fr[0],Pr=Fr[1],an=Object(B.useReducer)(mr,Ft),St=Object(b.a)(an,2),gr=St[0],Xe=St[1],Yt=gr.loading,wt=gr.data,br=gr.user,vr=gr.disciplines,xr=gr.dicts,on=gr.status,Ar=wt==null?void 0:wt.hack_sets,or=wt==null||((Ye=wt.hack)===null||Ye===void 0)?void 0:Ye.test_set_average,$r=Wt.query,ar=$r.callback_url,sn=$r.express_id,Ir=$r.score,On=$r.question_id,aa=$r.type,An=Object(B.useState)([]),fr=Object(b.a)(An,2),ln=fr[0],ia=fr[1],un=Object(B.useState)(!1),Qt=Object(b.a)(un,2),Ht=Qt[0],sr=Qt[1],Er=Object(B.useState)(!1),yn=Object(b.a)(Er,2),Dn=yn[0],wa=yn[1],cn=aa==="1",Xa=Object(B.useMemo)(function(){var rt=[];return vr&&ue(vr,rt),rt},[vr]),Nn=Object(B.useCallback)(Object(R.a)(K.a.mark(function rt(){var Ze,tt,dt,bt,Qe,Dt,ot,Kt,Xt,rr,lr,Gr,ur,Gt,ua,En,Qr,zn,jn,ca,hn,pn,Xn,In,Vn,Un,Ya,Lt,$t,Bn,da,mn,qr,wn,fa,$a,_a,Ja,Za,Ca,en,zr,Qa,Yn,Tn,xi,Ei,Oa,gn,$n,Aa,Da=arguments;return K.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:if(Ze=Da.length>0&&Da[0]!==void 0?Da[0]:0,tt=vr,!(tt.length===0)){Rr.next=7;break}return Rr.next=5,Y("new_question");case 5:dt=Rr.sent,tt=dt.disciplines;case 7:if(!Ct){Rr.next=15;break}return bt={disciplines:tt},Rr.next=11,z(Ct);case 11:Qe=Rr.sent,Qe.message?Qe.status==="401"&&(document.location.href="/user/login"):(Dt=Qe.category,ot=Qe.user,Kt=Qe.code,Xt=Qe.language,rr=Qe.hack_sets,lr=Qe.description,Gr=Qe.difficult,ur=Qe.name,Gt=Qe.open_or_not,ua=Qe.sub_discipline_id,En=Qe.tag_discipline_id,Qr=Qe.time_limit,zn=Qe.test_set_average,jn=Qe.test_set_score,ca=Qe.status,hn=Qe.tag_discipline_ids,pn=Qe.item_banks_group_id,Xn=Qe.is_file,In=Xn===void 0?!1:Xn,Vn=Qe.hide_actual_output,Un=Qe.code_compile_score,Ya=Qe.languages,Lt=Qe.is_my,$t=Qe.codes,Bn=te(tt,ua),da=Object(b.a)(Bn,2),mn=da[0],qr=da[1],sr(Vn),wn=In?[{input:"",output:"",score:100,position:1}]:rr,In?(Pr(rr),Ot.setFieldsValue({hack_sets:wn})):Pr([]),fa=Wt.query.lastedUpdateTime,$a=$t==null?void 0:$t.map(function(tn){return Object(x.a)(Object(x.a)({},tn),{},{code:Q.Base64.decode(tn==null?void 0:tn.code)})}),bt=Object(x.a)(Object(x.a)({},bt),{},{loading:!1,user:ot,dicts:qr,status:ca,lastedUpdateTime:Ze||(fa||0),data:{hack_codes:{language:Xt,code:Q.Base64.decode(Kt)},hack:{category:Dt,difficult:Gr,name:ur,description:lr,open_or_not:Gt,time_limit:Qr,test_set_average:zn,test_set_score:jn,sub_discipline_id:mn,tag_discipline_ids:hn,languages:Ya,score:Ir||1,item_banks_group_ids:pn,is_file:In,is_my:Lt,code_compile_score:Un},hack_sets:wn,tags:hn,codes:$a}}),parseInt(Un)>0&&wa(!0),Xe({type:ct.SET_INITAL_DATA,payload:bt}),tr({hack:{category:Dt,difficult:Gr,name:ur,description:lr,open_or_not:Gt,time_limit:Qr,test_set_average:zn,test_set_score:jn,sub_discipline_id:mn,tag_discipline_ids:hn,score:Ir||1,item_banks_group_ids:pn,is_file:In},codes:$a}),Rn(mn==null?void 0:mn[0],mn==null?void 0:mn[1],tt)),Rr.next=25;break;case 15:return Rr.next=17,re();case 17:Za=Rr.sent,Ca=Za.user,en=Wt.query,zr=en.difficult,Qa=en.sub_discipline_id,Yn=en.tag_discipline_id,Tn=en.tagIds,xi=en.banksIds,Ei=te(tt,parseInt(Qa,10)),Oa=Object(b.a)(Ei,2),gn=Oa[0],$n=Oa[1],Aa=[Number(xi)],Xe({type:ct.SET_INITAL_DATA,payload:{loading:!1,user:Ca,disciplines:tt,status:0,dicts:$n,data:{hack_codes:{language:"C",code:""},hack:{category:null,difficult:parseInt(zr,10),time_limit:3,description:"",test_set_score:!0,test_set_average:!0,open_or_not:!0,sub_discipline_id:gn,tag_discipline_id:Tn&&(Tn==null||((_a=Tn.split(","))===null||_a===void 0)?void 0:_a.map(function(tn){return Number(tn)})),name:"",item_banks_group_ids:Aa,is_file:!1},tags:Yn?Yn==null?void 0:Yn.split(",").map(function(tn){return parseInt(tn,10)}):[],hack_sets:[{input:"",output:"",score:100,position:1}]}}}),tr({hack:{category:null,difficult:parseInt(zr,10),time_limit:3,description:"",test_set_average:!0,open_or_not:!0,sub_discipline_id:gn,tag_discipline_id:Tn&&(Tn==null||((Ja=Tn.split(","))===null||Ja===void 0)?void 0:Ja.map(function(tn){return Number(tn)})),name:"",item_banks_group_id:Aa,is_file:!1}}),Rn(gn==null?void 0:gn[0],gn==null?void 0:gn[1],tt);case 25:case"end":return Rr.stop()}},rt)})),[Ct,vr]);Object(B.useEffect)(function(){try{Nn()}catch(rt){console.log(rt,"----")}},[]),Object(B.useEffect)(function(){function rt(){return Ze.apply(this,arguments)}function Ze(){return Ze=Object(R.a)(K.a.mark(function tt(){var dt;return K.a.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Qe.next=2,Object(ge.c)("item_banks_groups/mine.json");case 2:dt=Qe.sent,ia(dt);case 4:case"end":return Qe.stop()}},tt)})),Ze.apply(this,arguments)}rt()},[]);var Rn=function(Ze,tt,dt){var bt,Qe,Dt,ot=dt==null||((bt=dt.find(function(Kt){return Kt.id===Ze}))===null||bt===void 0||((Qe=bt.sub_disciplines)===null||Qe===void 0||((Dt=Qe.find(function(Kt){return Kt.id===tt}))===null||Dt===void 0)))?void 0:Dt.tag_disciplines};function dn(rt,Ze,tt){return Ln.apply(this,arguments)}function Ln(){return Ln=Object(R.a)(K.a.mark(function rt(Ze,tt,dt){var bt,Qe,Dt,ot,Kt,Xt,rr,lr,Gr,ur,Gt,ua,En,Qr,zn,jn,ca,hn,pn,Xn,In,Vn,Un;return K.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:bt=Object(x.a)({},Ze),Qe=bt.hack_sets,Dt=bt.hack_codes,ot=bt.hack,Kt=bt.tags,Xt=bt.codes,ot.hide_actual_output=Ht,rr=[],lr=[],Gr=0,ur=ot!=null&&ot.is_file?jr.map(function($t,Bn){return Object(x.a)(Object(x.a)({},$t),{},{position:Bn+1})}):Qe.map(function($t){return Object(x.a)(Object(x.a)({},$t),{},{is_file:!1})}),Gt=Object(y.a)(ur);try{for(Gt.s();!(ua=Gt.n()).done;)En=ua.value,Gr+=En.score,En.id&&En.id>=0?rr.push(En):lr.push(En)}catch($t){Gt.e($t)}finally{Gt.f()}if(ur!=null&&ur.length){Lt.next=11;break}return a.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),Lt.abrupt("return");case 11:if(Gr+=parseInt(ot.code_compile_score||0),!(Gr!==100&&!ot.test_set_score)){Lt.next=15;break}return a.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),Lt.abrupt("return");case 15:if(!(ur!=null&&ur.some(function($t){return!$t.output}))){Lt.next=18;break}return a.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),Lt.abrupt("return");case 18:if(Qr={},cn?Xt==null||Xt.forEach(function($t){Qr[$t.language]=$t!=null&&$t.code?Q.Base64.encode($t==null?void 0:$t.code):""}):Dt.code=Q.Base64.encode(Dt==null?void 0:Dt.code),ot.sub_discipline_id=ot.sub_discipline_id[1],Xe({type:ct.SET_LOADING,payload:!0}),ar||(ot.score=ot.difficult*100),!Ct){Lt.next=49;break}return Lt.next=26,$(Ct,{hack:ot,hack_codes:Dt,hack_sets:lr,update_hack_sets:rr,tags:Kt,is_cover:dt,languages:ot.languages,codes:Qr});case 26:if(!ar){Lt.next=45;break}return Lt.next=29,Re(Ct);case 29:if(!ar.includes("paperlibrary")){Lt.next=35;break}return Lt.next=32,Object(pt.f)({id:sn,question_id:On,item_type:gt.a.Program,name:ot.name,question_score:ot.score,difficulty:ot.difficult,sub_discipline_id:ot.sub_discipline_id,tag_discipline_ids:ot.tag_discipline_ids,item_banks_group_ids:ot.item_banks_group_ids});case 32:return zn=Lt.sent,zn.status===0&&Mt.replace(ar),Lt.abrupt("return");case 35:return Lt.next=37,xe(On,{question_type:6,question_score:ot.score,question_title:ot.name,description:ot.description,sub_discipline_id:ot.sub_discipline_id,tag_discipline_ids:ot.tag_discipline_ids,item_banks_group_ids:ot.item_banks_group_ids,identifier:Ct});case 37:if(jn=Lt.sent,ca=jn.status,!(ca===0)){Lt.next=43;break}if(!(tt==="start")){Lt.next=42;break}return Lt.abrupt("return");case 42:Mt.replace(ar);case 43:Lt.next=46;break;case 45:Nn(Pt());case 46:Xe({type:ct.SET_LOADING,payload:!1}),Lt.next=79;break;case 49:return Lt.next=51,me({hack:ot,hack_codes:Dt,hack_sets:ur,tags:Kt,examination_bank_id:sn||null});case 51:if(hn=Lt.sent,pn=hn.identifier,Xn=hn.exam_identifier,Xe({type:ct.SET_LOADING,payload:!1}),!(tt==="start")){Lt.next=57;break}return Lt.abrupt("return");case 57:if(!pn){Lt.next=79;break}if(ar){Lt.next=62;break}Mt.replace("/problems/".concat(pn,"/edit?lastedUpdateTime=").concat(Pt())),Lt.next=79;break;case 62:return Lt.next=64,Re(pn);case 64:if(Ct){Lt.next=78;break}if(!ar.includes("paperlibrary")){Lt.next=71;break}return Lt.next=68,Object(pt.f)({id:sn,item_type:gt.a.Program,name:ot.name,question_score:ot.score,difficulty:ot.difficult,sub_discipline_id:ot.sub_discipline_id,tag_discipline_ids:ot.tag_discipline_ids,identifier:Xn});case 68:return In=Lt.sent,In.status===0&&Mt.replace(ar),Lt.abrupt("return");case 71:return Lt.next=73,pe(parseInt(sn,10),{question_type:6,question_score:ot.score,question_title:ot.name,identifier:pn,tag_discipline_ids:ot.tag_discipline_ids});case 73:Vn=Lt.sent,Un=Vn.status,Un===0&&Mt.replace(ar),Lt.next=79;break;case 78:Mt.replace(ar);case 79:case"end":return Lt.stop()}},rt)})),Ln.apply(this,arguments)}function bn(){Ot.submit(),setTimeout(Object(R.a)(K.a.mark(function rt(){var Ze;return K.a.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return dt.next=2,Re(Ct);case 2:Ze=dt.sent,Ze.status===0?(a.b.success("\u53D1\u5E03\u6210\u529F"),Xe({type:ct.SET_STATUS,payload:1})):a.b.info(Ze.message);case 4:case"end":return dt.stop()}},rt)})),400)}function xn(){return Jr.apply(this,arguments)}function Jr(){return Jr=Object(R.a)(K.a.mark(function rt(){var Ze;return K.a.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return dt.next=2,ke(Ct);case 2:Ze=dt.sent,Ze.status===0?(a.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F"),Xe({type:ct.SET_STATUS,payload:0})):a.b.info(Ze.message);case 4:case"end":return dt.stop()}},rt)})),Jr.apply(this,arguments)}function Kn(){on===0?Rt({title:"\u63D0\u793A",content:U.a.createElement(B.Fragment,null," ",U.a.createElement("div",null,"\u53D1\u5E03\u540E\u5373\u53EF\u5E94\u7528\u5230\u81EA\u5DF1\u7BA1\u7406\u7684\u8BFE\u5802")," ",U.a.createElement("div",null," \u662F\u5426\u786E\u8BA4\u53D1\u5E03?")," "),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){bn()}}):Rt({title:"\u63D0\u793A",content:U.a.createElement("p",null,"\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F"),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){xn()}})}function Ta(){return Dr.apply(this,arguments)}function Dr(){return Dr=Object(R.a)(K.a.mark(function rt(){return K.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.t0=dn,tt.next=3,Ot.getFieldValue();case 3:tt.t1=tt.sent,(0,tt.t0)(tt.t1,"start"),setTimeout(Object(R.a)(K.a.mark(function dt(){var bt,Qe;return K.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:return ot.next=2,Ne(Ct);case 2:bt=ot.sent,Qe=bt.identifier,cn?window.location.href="/myproblems/".concat(Qe,"?type=1"):window.location.href="/myproblems/".concat(Qe);case 5:case"end":return ot.stop()}},dt)})),400);case 6:case"end":return tt.stop()}},rt)})),Dr.apply(this,arguments)}function Gn(){if(ar)Mt.replace(ar);else if(cn){var rt,Ze=(rt=localStorage.getItem("program_homework"))===null||rt===void 0?void 0:rt.split(",");Mt.push("/classrooms/".concat(Ze==null?void 0:Ze[0],"/program_homework/").concat(Ze==null?void 0:Ze[1],"/detail"))}else Mt.replace("/problemset")}var kn=function(Ze){var tt=parseInt(Ot.getFieldValue("hack").code_compile_score)||0,dt=Math.floor((100-tt)/Ze.length),bt=dt+(100-tt)%Ze.length;Ze=Ze.map(function(Qe,Dt){return Dt===Ze.length-1?Object(x.a)(Object(x.a)({},Qe),{},{score:bt}):Object(x.a)(Object(x.a)({},Qe),{},{score:dt})}),Pr(Ze)};function oa(rt){rt.target.value||kn(jr),Xe({type:ct.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},wt),{},{hack:Object(x.a)(Object(x.a)({},wt.hack),{},{test_set_score:rt.target.value})})}})}function Pn(rt){Xe({type:ct.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},wt),{},{hack:Object(x.a)(Object(x.a)({},wt.hack),{},{is_file:rt.target.value})})}})}function fn(rt){sr(rt.target.checked)}function sa(rt){var Ze=rt.target.value;Ze&&kn(jr),Xe({type:ct.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},wt),{},{hack:Object(x.a)(Object(x.a)({},wt.hack),{},{test_set_average:Ze})})}})}function Zr(){var rt=Ot.getFieldValue("hack_sets"),Ze=parseInt(Ot.getFieldValue("hack").code_compile_score)||0,tt=rt.length+1,dt=Math.floor((100-Ze)/tt),bt=(100-Ze)%tt;rt.map(function(Qe,Dt){return or&&(Qe.score=dt),Qe.position=Dt+1,Qe}),rt.push({input:"",output:"",position:tt,score:or?dt+bt:0}),Ot.setFieldsValue({hack_sets:rt}),Xe({type:ct.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},wt),{},{hack_sets:rt})}})}function la(){var rt=Ot.getFieldValue("hack_sets"),Ze=parseInt(Ot.getFieldValue("hack").code_compile_score)||0,tt=rt.length,dt=Math.floor((100-Ze)/tt),bt=(100-Ze)%tt;rt.map(function(Qe,Dt){return or&&(Qe.score=dt,Dt===rt.length-1&&(Qe.score=dt+bt)),Qe.position=Dt+1,Qe}),Ot.setFieldsValue({hack_sets:rt}),Xe({type:ct.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},wt),{},{hack_sets:rt})}})}Object(B.useEffect)(function(){if(or){var rt=parseInt(Ot.getFieldValue("hack").code_compile_score)||0,Ze=Ar==null?void 0:Ar.length,tt=Math.floor((100-rt)/Ze),dt=(100-rt)%Ze;Ar==null||Ar.map(function(bt,Qe){return bt.score=tt,bt.position=Qe+1,Qe===Ze-1&&(bt.score=tt+dt),bt}),Xe({type:ct.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},wt),{},{hack_sets:Ar})}}),Ot.setFieldsValue({hack_sets:Ar})}},[or]);function Sa(rt){var Ze=Ot.getFieldValue("hack_sets"),tt=parseInt(Ot.getFieldValue("hack").code_compile_score)||0,dt=(Ze==null?void 0:Ze.length)-1,bt=Math.floor((100-tt)/dt),Qe=(100-tt)%dt;Ze.splice(rt,1),Ze==null||Ze.map(function(Dt,ot){return or&&(Dt.score=bt,ot===dt-1&&(Dt.score=bt+Qe)),Dt.position=ot+1,Dt}),Xe({type:ct.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},wt),{},{hack_sets:Ze})}}),Ot.setFieldsValue({hack_sets:Ze})}function Fn(rt){Xe({type:ct.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},wt),{},{hack_codes:Object(x.a)(Object(x.a)({},wt.hack_codes),{},{language:rt})})}})}var Va=function(Ze){var tt;if(Ze!=null&&(tt=Ze.hack)!==null&&tt!==void 0&&tt.sub_discipline_id){var dt,bt,Qe,Dt,ot,Kt=Ze==null||((dt=Ze.hack)===null||dt===void 0)?void 0:dt.sub_discipline_id,Xt=Object(b.a)(Kt,2),rr=Xt[0],lr=Xt[1],Gr=vr==null||((bt=vr.find(function(Gt){return Gt.id===rr}))===null||bt===void 0||((Qe=bt.sub_disciplines)===null||Qe===void 0||((Dt=Qe.find(function(Gt){return Gt.id===lr}))===null||Dt===void 0)))?void 0:Dt.tag_disciplines,ur=Object(x.a)(Object(x.a)({},Ot.getFieldsValue()),{},{hack:Object(x.a)(Object(x.a)({},(ot=Ot.getFieldsValue())===null||ot===void 0?void 0:ot.hack),{},{tag_discipline_ids:[]})});Ot.setFieldsValue(ur),tr(ur)}else tr(Object(x.a)({},Ot.getFieldsValue()))},vt=function(Ze){yt([].concat(Object(w.a)(Je),[Object(x.a)({},Ze)]))};Object(B.useEffect)(function(){var rt,Ze;if(wt!=null&&(rt=wt.hack)!==null&&rt!==void 0&&(Ze=rt.sub_discipline_id)!==null&&Ze!==void 0&&Ze[1]){var tt,dt;At(wt==null||((tt=wt.hack)===null||tt===void 0||((dt=tt.sub_discipline_id)===null||dt===void 0))?void 0:dt[1])}},[wt==null||((ht=wt.hack)===null||ht===void 0)?void 0:ht.sub_discipline_id]);var At=function(){var rt=Object(R.a)(K.a.mark(function Ze(tt){var dt;return K.a.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Qe.next=2,Object(je.I)({sub_discipline_id:tt});case 2:dt=Qe.sent,yt(dt.tag_disciplines);case 4:case"end":return Qe.stop()}},Ze)}));return function(tt){return rt.apply(this,arguments)}}();function Et(rt){var Ze=rt[1],tt=te(vr,Ze),dt=Object(b.a)(tt,2),bt=dt[1];Ot.setFieldsValue({tags:[]}),Xe({type:ct.SET_INITAL_DATA,payload:{dicts:bt,data:Object(x.a)(Object(x.a)({},wt),{},{hack:Object(x.a)(Object(x.a)({},wt.hack),{},{sub_discipline_id:rt}),tags:[]})}})}var jt=function(Ze){var tt,dt,bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(bt)return function(){Xe({type:ct.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},wt),{},{hack:Object(x.a)(Object(x.a)({},wt.hack),{},{is_file:!0})})}}),Ot.setFieldsValue({hack:{is_file:!0}})};var Qe=Ze==null?void 0:Ze.map(function(lr){return{input:lr.input,output:lr.output,score:0,position:1}}),Dt=(tt=Ot.getFieldValue("hack_sets"))===null||tt===void 0||((dt=tt.filter(function(lr){return lr.input||lr.output}))===null||dt===void 0)?void 0:dt.concat(Qe),ot=parseInt(Ot.getFieldValue("hack").code_compile_score)||0,Kt=Dt==null?void 0:Dt.length,Xt=Math.floor((100-ot)/Kt),rr=(100-ot)%Kt;Dt==null||Dt.map(function(lr,Gr){return or&&(lr.score=Xt,Gr===Kt-1&&(lr.score=Xt+rr)),lr.position=Gr+1,lr}),Xe({type:ct.SET_INITAL_DATA,payload:{data:Object(x.a)(Object(x.a)({},wt),{},{hack_sets:Dt,hack:Object(x.a)(Object(x.a)({},wt.hack),{},{is_file:!1})})}}),Ot.setFieldsValue({hack_sets:Dt,hack:{is_file:!1}})};return U.a.createElement(n.a,{spinning:Yt,delay:500},wt?U.a.createElement(B.Fragment,null,U.a.createElement("header",{className:q.a.header},U.a.createElement("div",null,U.a.createElement("img",{src:"".concat(Ke.a.IMG_SERVER,"/images/").concat(br==null?void 0:br.image_url),alt:"user",width:30}),U.a.createElement("span",null,br==null?void 0:br.name)),U.a.createElement("h2",null," ",wt==null?void 0:wt.hack.name," "),Ct?U.a.createElement("a",{className:q.a.btn_back,onClick:Gn}," ",U.a.createElement(se.a,null),"\u9000\u51FA"):null),U.a.createElement(c.a,{form:Ot,initialValues:wt,layout:"vertical",className:q.a["oj-form-container"],onValuesChange:Va,onFinish:function(Ze,tt){var dt;if(Wt!=null&&(dt=Wt.query)!==null&&dt!==void 0&&dt.exercise&&!ar.includes("paperlibrary")){k.a.confirm({title:"\u4FDD\u5B58\u63D0\u793A",content:"\u6B64\u9898\u76EE\u5DF2\u5B58\u5728\u8BD5\u9898\u5E93\u4E2D\uFF0C\u662F\u5426\u5C06\u4FEE\u6539\u540E\u7684\u8BD5\u9898\u8986\u76D6\u8BD5\u9898\u5E93\u7684\u539F\u9898\uFF1F",okText:"\u8986\u76D6\u539F\u9898",cancelText:"\u4E0D\u8986\u76D6",onOk:function(){return dn(Ze,tt,1)},onCancel:function(){return dn(Ze,tt,0)}});return}dn(Ze,tt)}},U.a.createElement(Fe.a,{leftChild:U.a.createElement(dr,{onAddTestCases:la,form:Ot,handleAddKnowledgeFinish:vt,MyGroup:ln,formValue:It,knowledgeOptions:Je,onChangeLanguage:Fn,onChangeSubDiscipline:Et,onRemoveTestCase:Sa,onAddTestCase:Zr,dicts:xr,categorys:Xa,callback_url:ar,hack:wt.hack,onChangeScore:oa,onChangehide:fn,onChangeAverage:sa,onChangeFile:Pn,uploadData:jr,setUploadData:Pr,handleUploadRatio:kn,ischecked:Ht,isshows:Dn,isProgram:cn,addUploadFnc:jt}),rightChild:cn?U.a.createElement(c.a.Item,{name:"codes",style:{marginBottom:0}},U.a.createElement(Ce,null)):U.a.createElement(c.a.Item,{name:["hack_codes","code"],style:{marginBottom:0}},U.a.createElement(We.a,{language:wt.hack_codes.language}))}),U.a.createElement("div",{className:q.a.footer},Ct?U.a.createElement(B.Fragment,null,cn&&U.a.createElement(u.a,{onClick:Gn,type:"primary",ghost:!0},"\u9000\u51FA\u7F16\u8F91"),ar||cn?null:U.a.createElement(u.a,{type:on?"default":"primary",onClick:Kn},on?"\u64A4\u9500\u53D1\u5E03":"\u7ACB\u5373\u53D1\u5E03"),U.a.createElement(u.a,{loading:Yt,type:"primary",htmlType:"submit"},"\u4FDD\u5B58"),U.a.createElement(u.a,{type:"primary",onClick:Ta},on?"\u5F00\u59CB\u6311\u6218":"\u6A21\u62DF\u6311\u6218")):U.a.createElement(B.Fragment,null,U.a.createElement(u.a,{onClick:Gn},"\u53D6\u6D88"),U.a.createElement(u.a,{loading:Yt,type:"primary",htmlType:"submit"},"\u4FDD\u5B58"))))):null)};function dr(Ye){var ht,Wt,Mt,Bt,Ct=Ye.form,kt=Ye.onAddTestCases,ut=Ye.handleAddKnowledgeFinish,Ot=Ye.ischecked,qt=Ye.MyGroup,Vt=Ye.formValue,It=Ye.knowledgeOptions,tr=Ye.categorys,Nt=Ye.hack,Yr=Ye.callback_url,Je=Ye.onChangeAverage,yt=Ye.onChangeScore,vn=Ye.onChangehide,Fr=Ye.onChangeFile,jr=Ye.onAddTestCase,Pr=Ye.onRemoveTestCase,an=Ye.onChangeSubDiscipline,St=Ye.onChangeLanguage,gr=Ye.uploadData,Xe=Ye.setUploadData,Yt=Ye.handleUploadRatio,wt=Ye.isshows,br=Ye.isProgram,vr=Ye.addUploadFnc,xr=((ht=location)===null||ht===void 0||((Wt=ht.search)===null||Wt===void 0)?void 0:Wt.includes("select"))||!1,on=Object(B.useState)(wt),Ar=Object(b.a)(on,2),or=Ar[0],$r=Ar[1],ar=Nt.test_set_average,sn=Nt.test_set_score,Ir=Object(B.useState)(!1),On=Object(b.a)(Ir,2),aa=On[0],An=On[1],fr=function(Ht,sr){var Er=Object(w.a)(gr);Er.splice(sr,1),ar?Yt(Er):Xe(Er)},ln=function(Ht,sr){console.log(Ht,sr);var Er=gr.map(function(yn,Dn){return Dn===sr?Object(x.a)(Object(x.a)({},yn),{},{score:Ht.target.value?Number(Ht.target.value):0}):yn});Xe(Er)},ia=function(Ht){if(!(Ht!=null&&Ht.length))return;if(Ht!=null&&Ht[0].is_file){vr(Ht,!0)();var sr=gr.concat(Ht);Nt.test_set_average?Yt(sr):Xe(sr)}Ht!=null&&Ht[0].is_file||vr(Ht)};function un(Qt){Qt.stopPropagation()}return U.a.createElement("div",{className:q.a["oj-left-panel"]},U.a.createElement("div",{className:q.a["oj-form-info"]},U.a.createElement("div",{className:q.a.field},U.a.createElement(c.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficult"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},U.a.createElement(E.a,{disabled:xr},le(be.difficult))),U.a.createElement(c.a.Item,{label:"\u8BFE\u7A0B(\u5408\u7406\u7684\u8BFE\u7A0B\u5206\u7C7B\u6709\u5229\u4E8E\u5FEB\u901F\u68C0\u7D22)",name:["hack","sub_discipline_id"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BFE\u7A0B"}]},U.a.createElement(f.a,{disabled:xr,allowClear:!1,options:tr,placeholder:"\u8BF7\u9009\u62E9",onChange:an}))),U.a.createElement("div",{className:q.a.field},Yr&&U.a.createElement(c.a.Item,{label:"\u5206\u6570",name:["hack","score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5206\u6570"}],extra:U.a.createElement("span",{style:{position:"absolute",left:100,top:5}},"\u5206")},U.a.createElement(r.a,{disabled:xr,min:1,max:100})),U.a.createElement(c.a.Item,{label:U.a.createElement("div",null,"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236 ",U.a.createElement("span",{className:"c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)")),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"}],extra:U.a.createElement("span",{style:{position:"absolute",left:100,top:5}},"\u79D2")},U.a.createElement(r.a,{min:3})),br?U.a.createElement(c.a.Item,{label:"\u7F16\u7A0B\u8BED\u8A00",name:["hack","languages"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},U.a.createElement(o.a.Group,null,U.a.createElement(o.a,{value:"c"},"C"),U.a.createElement(o.a,{value:"c++"},"C++"),U.a.createElement(o.a,{value:"java"},"Java"),U.a.createElement(o.a,{value:"python"},"Python"))):U.a.createElement(c.a.Item,{label:"\u7F16\u7A0B\u8BED\u8A00",name:["hack_codes","language"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},U.a.createElement(E.a,{onChange:St},le(be.language)))),U.a.createElement(c.a.Item,{label:U.a.createElement("span",null,"\u77E5\u8BC6\u70B9\uFF1A",U.a.createElement("span",{className:"c-grey-999"},"\uFF08\u6240\u6709\u81EA\u5EFA\u77E5\u8BC6\u70B9\u4EC5\u672C\u4EBA\u53EF\u89C1\uFF0C\u88ABEduCoder\u5E73\u53F0\u5BA1\u6838\u901A\u8FC7\u4E3A\u5B98\u65B9\u77E5\u8BC6\u70B9\u540E\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF09")),name:["hack","tag_discipline_ids"]},U.a.createElement(qe.a,{selectvalues:(Nt==null?void 0:Nt.tag_discipline_id)||(Nt==null?void 0:Nt.tag_discipline_ids),disabled:xr,subId:Vt==null||((Mt=Vt.hack)===null||Mt===void 0||((Bt=Mt.sub_discipline_id)===null||Bt===void 0))?void 0:Bt[1],knowledgeOptions:It,onAddKnowledgeFinish:ut})),U.a.createElement(c.a.Item,{label:"\u52A0\u5165\u6587\u4EF6\u5939\u76EE\u5F55",name:["hack","item_banks_group_ids"],labelCol:{span:24},wrapperCol:{span:24}},U.a.createElement(et.a,{disabled:xr})),U.a.createElement(c.a.Item,{label:"\u4EFB\u52A1\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"}]},U.a.createElement(G.a,{maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0",suffix:U.a.createElement("span",null,60-Nt.name.length)})),U.a.createElement(c.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},U.a.createElement(ee.a,{miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),U.a.createElement("div",{className:"tst-case-info"},U.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," \u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!Nt.is_file&&U.a.createElement(u.a,{type:"primary",ghost:!0,onClick:jr},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),U.a.createElement(c.a.Item,{name:["hack","test_set_score"]},U.a.createElement(S.a.Group,{onChange:yt},U.a.createElement(S.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",U.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")),U.a.createElement(S.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",U.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")))),U.a.createElement(o.a,{style:{marginBottom:"5px"},checked:Ot,onChange:vn},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u8003\u8BD5\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"),U.a.createElement(c.a.Item,{className:q.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},U.a.createElement(S.a.Group,{onChange:Fr},U.a.createElement(_.a,{direction:"horizontal"},U.a.createElement(S.a,{value:!1},"\u6587\u672C"),U.a.createElement(S.a,{value:!0},"\u6587\u4EF6")))),!Nt.test_set_score&&U.a.createElement(c.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},U.a.createElement(S.a.Group,{onChange:Je},U.a.createElement(S.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),U.a.createElement(S.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),!Nt.test_set_score&&U.a.createElement("div",{style:{marginBottom:"20px",marginTop:"-10px"}},U.a.createElement("div",{style:{display:"flex",height:"30px",marginBottom:"10px"}},U.a.createElement(o.a,{checked:or,style:{display:"flex",alignItems:"center"},className:q.a.checkboxs,onChange:function(Ht){$r(Ht.target.checked),Ct.setFieldsValue({hack:{code_compile_score:0}}),Nt.test_set_average&&(Nt.is_file?Yt(gr):kt())}},"\u542F\u7528\u7F16\u8BD1\u901A\u8FC7\u5373\u53EF\u5F97\u5206"),or&&U.a.createElement("span",{style:{display:"flex"}},U.a.createElement(c.a.Item,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7F16\u8BD1\u5F97\u5206"}],name:["hack","code_compile_score"]},U.a.createElement(r.a,{onChange:function(){Nt.test_set_average&&(Nt.is_file?Yt(gr):kt())},parser:function(Ht){return isNaN(parseInt(Ht))?"":parseInt(Ht)},min:0,max:100,style:{width:"90px",margin:"5px 0px"}}))," ",U.a.createElement("span",{style:{display:"flex",alignItems:"center",marginLeft:"5px"}},"%"))),U.a.createElement("span",{style:{color:"#999",fontSize:"12px",marginLeft:"-8px"}},"\uFF08\u8BF7\u6CE8\u610F\u8BE5\u5B9E\u8BAD\u9898\u662F\u5426\u6709\u7F16\u8BD1\u8FC7\u7A0B\uFF0C\u82E5\u6CA1\u6709\u5219\u65E0\u6CD5\u83B7\u5F97\u7F16\u8BD1\u5F97\u5206\uFF09")),U.a.createElement("div",{className:q.a.upBtn},U.a.createElement(u.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return An(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),(Nt==null?void 0:Nt.is_file)&&U.a.createElement(it.a,{disabled:Nt==null?void 0:Nt.test_set_average,inputChange:ln,showScore:!Nt.test_set_score,data:gr,onRemove:fr})),!Nt.is_file&&U.a.createElement(c.a.List,{name:"hack_sets"},function(Qt,Ht){return Object(T.a)(Ht),U.a.createElement(F.a,{accordion:!0},Qt.map(function(sr,Er){return U.a.createElement(Tt,{key:"".concat(sr.key,"--").concat(Er),header:U.a.createElement("a",{className:q.a["test-case-name"]},U.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",Er+1,"\b"),sn?null:U.a.createElement(U.a.Fragment,null,U.a.createElement(c.a.Item,{name:[sr.name,"score"],fieldKey:[sr.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(Er+1,"\u8BC4\u5206")}]},U.a.createElement(r.a,{onClick:un,min:0,max:100,disabled:ar})),U.a.createElement("span",null,"%"))),extra:Er>0?U.a.createElement("div",{onClick:un},U.a.createElement(m.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(Er+1),onConfirm:function(){Pr(Er)}},U.a.createElement(J.a,{className:q.a["btn-remove-case"]}))):null},U.a.createElement(c.a.Item,{label:"\u8F93\u5165",name:[sr.name,"input"],fieldKey:[sr.fieldKey,"input"]},U.a.createElement(at,null)),U.a.createElement(c.a.Item,{label:"\u8F93\u51FA",name:[sr.name,"output"],fieldKey:[sr.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},U.a.createElement(at,null)))}))}))),U.a.createElement(it.b,{rootIdentifier:null,visible:aa,onClose:function(){return An(!1)},onOK:ia,multiple:!0,defaultMultipleValue:Nt==null?void 0:Nt.is_file}))}},PVpz:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("ETIr"),N("cv67"),N("K3mO"),N("OLod"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.StreamCipher,_=m.algo,g=[],S=[],p=[],o=_.RabbitLegacy=L.extend({_doReset:function(){var r=this._key.words,d=this.cfg.iv,f=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],h=this._C=[r[2]<<16|r[2]>>>16,r[0]&4294901760|r[1]&65535,r[3]<<16|r[3]>>>16,r[1]&4294901760|r[2]&65535,r[0]<<16|r[0]>>>16,r[2]&4294901760|r[3]&65535,r[1]<<16|r[1]>>>16,r[3]&4294901760|r[0]&65535];this._b=0;for(var E=0;E<4;E++)i.call(this);for(var E=0;E<8;E++)h[E]^=f[E+4&7];if(d){var y=d.words,l=y[0],n=y[1],s=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360,u=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,w=s>>>16|u&4294901760,v=u<<16|s&65535;h[0]^=s,h[1]^=w,h[2]^=u,h[3]^=v,h[4]^=s,h[5]^=w,h[6]^=u,h[7]^=v;for(var E=0;E<4;E++)i.call(this)}},_doProcessBlock:function(r,d){var f=this._X;i.call(this),g[0]=f[0]^f[5]>>>16^f[3]<<16,g[1]=f[2]^f[7]>>>16^f[5]<<16,g[2]=f[4]^f[1]>>>16^f[7]<<16,g[3]=f[6]^f[3]>>>16^f[1]<<16;for(var h=0;h<4;h++)g[h]=(g[h]<<8|g[h]>>>24)&16711935|(g[h]<<24|g[h]>>>8)&4278255360,r[d+h]^=g[h]},blockSize:128/32,ivSize:64/32});function i(){for(var r=this._X,d=this._C,f=0;f<8;f++)S[f]=d[f];d[0]=d[0]+1295307597+this._b|0,d[1]=d[1]+3545052371+(d[0]>>>0<S[0]>>>0?1:0)|0,d[2]=d[2]+886263092+(d[1]>>>0<S[1]>>>0?1:0)|0,d[3]=d[3]+1295307597+(d[2]>>>0<S[2]>>>0?1:0)|0,d[4]=d[4]+3545052371+(d[3]>>>0<S[3]>>>0?1:0)|0,d[5]=d[5]+886263092+(d[4]>>>0<S[4]>>>0?1:0)|0,d[6]=d[6]+1295307597+(d[5]>>>0<S[5]>>>0?1:0)|0,d[7]=d[7]+3545052371+(d[6]>>>0<S[6]>>>0?1:0)|0,this._b=d[7]>>>0<S[7]>>>0?1:0;for(var f=0;f<8;f++){var h=r[f]+d[f],E=h&65535,y=h>>>16,l=((E*E>>>17)+E*y>>>15)+y*y,n=((h&4294901760)*h|0)+((h&65535)*h|0);p[f]=l^n}r[0]=p[0]+(p[7]<<16|p[7]>>>16)+(p[6]<<16|p[6]>>>16)|0,r[1]=p[1]+(p[0]<<8|p[0]>>>24)+p[7]|0,r[2]=p[2]+(p[1]<<16|p[1]>>>16)+(p[0]<<16|p[0]>>>16)|0,r[3]=p[3]+(p[2]<<8|p[2]>>>24)+p[1]|0,r[4]=p[4]+(p[3]<<16|p[3]>>>16)+(p[2]<<16|p[2]>>>16)|0,r[5]=p[5]+(p[4]<<8|p[4]>>>24)+p[3]|0,r[6]=p[6]+(p[5]<<16|p[5]>>>16)+(p[4]<<16|p[4]>>>16)|0,r[7]=p[7]+(p[6]<<8|p[6]>>>24)+p[5]|0}m.RabbitLegacy=L._createHelper(o)}(),P.RabbitLegacy})},RELg:function(I,Z,N){var P=N("MFOe"),m=P.Global;I.exports={name:"oldIE-userDataStorage",write:S,read:p,each:o,remove:i,clearAll:r};var T="storejs",L=m.document,_=h(),g=(m.navigator?m.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function S(E,y){if(g)return;var l=f(E);_(function(n){n.setAttribute(l,y),n.save(T)})}function p(E){if(g)return;var y=f(E),l=null;return _(function(n){l=n.getAttribute(y)}),l}function o(E){_(function(y){for(var l=y.XMLDocument.documentElement.attributes,n=l.length-1;n>=0;n--){var s=l[n];E(y.getAttribute(s.name),s.name)}})}function i(E){var y=f(E);_(function(l){l.removeAttribute(y),l.save(T)})}function r(){_(function(E){var y=E.XMLDocument.documentElement.attributes;E.load(T);for(var l=y.length-1;l>=0;l--)E.removeAttribute(y[l].name);E.save(T)})}var d=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function f(E){return E.replace(/^\d/,"___$&").replace(d,"___")}function h(){if(!L||!L.documentElement||!L.documentElement.addBehavior)return null;var E="script",y,l,n;try{l=new ActiveXObject("htmlfile"),l.open(),l.write("<"+E+">document.w=window</"+E+'><iframe src="/favicon.ico"></iframe>'),l.close(),y=l.w.frames[0].document,n=y.createElement("div")}catch(s){n=L.createElement("div"),y=L.body}return function(s){var u=[].slice.call(arguments,0);u.unshift(n),y.appendChild(n),n.addBehavior("#default#userData"),n.load(T),s.apply(this,u),y.removeChild(n);return}}},RxwV:function(I,Z,N){"use strict";var P=N("cDcd"),m=N("uciX"),T=N("2W6z"),L=N.n(T),_=N("4IlW"),g=N("uK0f"),S=N.n(g);function p(le,ue){if(le===ue)return!0;if(!le||!ue)return!1;var te=le.length;if(ue.length!==te)return!1;for(var oe=0;oe<te;oe++)if(le[oe]!==ue[oe])return!1;return!0}function o(le){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?o=function(te){return typeof te}:o=function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},o(le)}function i(le,ue){if(!(le instanceof ue))throw new TypeError("Cannot call a class as a function")}function r(le,ue){for(var te=0;te<ue.length;te++){var oe=ue[te];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(le,oe.key,oe)}}function d(le,ue,te){return ue&&r(le.prototype,ue),te&&r(le,te),le}function f(le,ue){if(typeof ue!="function"&&ue!==null)throw new TypeError("Super expression must either be null or a function");le.prototype=Object.create(ue&&ue.prototype,{constructor:{value:le,writable:!0,configurable:!0}}),ue&&h(le,ue)}function h(le,ue){return h=Object.setPrototypeOf||function(oe,Q){return oe.__proto__=Q,oe},h(le,ue)}function E(le){var ue=n();return function(){var te=s(le),oe;if(ue){var Q=s(this).constructor;oe=Reflect.construct(te,arguments,Q)}else oe=te.apply(this,arguments);return y(this,oe)}}function y(le,ue){return ue&&(o(ue)==="object"||typeof ue=="function")?ue:l(le)}function l(le){if(le===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return le}function n(){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(le){return!1}}function s(le){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(te){return te.__proto__||Object.getPrototypeOf(te)},s(le)}var u=function(){var le=function(ue){f(oe,ue);var te=E(oe);function oe(){var Q;return i(this,oe),Q=te.apply(this,arguments),Q.menuItems={},Q.saveMenuItem=function(se){return function(J){Q.menuItems[se]=J}},Q}return d(oe,[{key:"componentDidMount",value:function(){this.scrollActiveItemToView()}},{key:"componentDidUpdate",value:function(se){!se.visible&&this.props.visible&&this.scrollActiveItemToView()}},{key:"getFieldName",value:function(se){var J=this.props,ee=J.fieldNames,ge=J.defaultFieldNames;return ee[se]||ge[se]}},{key:"getOption",value:function(se,J){var ee=this.props,ge=ee.prefixCls,re=ee.expandTrigger,Y=ee.expandIcon,z=ee.loadingIcon,$=this.props.onSelect.bind(this,se,J),me=this.props.onItemDoubleClick.bind(this,se,J),pe={onClick:$,onDoubleClick:me},xe="".concat(ge,"-menu-item"),Re=null,ke=se[this.getFieldName("children")]&&se[this.getFieldName("children")].length>0;(ke||se.isLeaf===!1)&&(xe+=" ".concat(ge,"-menu-item-expand"),se.loading||(Re=P.createElement("span",{className:"".concat(ge,"-menu-item-expand-icon")},Y))),re==="hover"&&(ke||se.isLeaf===!1)&&(pe={onMouseEnter:this.delayOnSelect.bind(this,$),onMouseLeave:this.delayOnSelect.bind(this),onClick:$}),this.isActiveOption(se,J)&&(xe+=" ".concat(ge,"-menu-item-active"),pe.ref=this.saveMenuItem(J)),se.disabled&&(xe+=" ".concat(ge,"-menu-item-disabled"));var Ne=null;se.loading&&(xe+=" ".concat(ge,"-menu-item-loading"),Ne=z||null);var Pe="";return"title"in se?Pe=se.title:typeof se[this.getFieldName("label")]=="string"&&(Pe=se[this.getFieldName("label")]),P.createElement("li",Object.assign({key:se[this.getFieldName("value")],className:xe,title:Pe},pe,{role:"menuitem",onMouseDown:function(Fe){return Fe.preventDefault()}}),se[this.getFieldName("label")],Re,Ne)}},{key:"getActiveOptions",value:function(se){var J=this,ee=this.props.options,ge=se||this.props.activeValue;return S()(ee,function(re,Y){return re[J.getFieldName("value")]===ge[Y]},{childrenKeyName:this.getFieldName("children")})}},{key:"getShowOptions",value:function(){var se=this,J=this.props.options,ee=this.getActiveOptions().map(function(ge){return ge[se.getFieldName("children")]}).filter(function(ge){return!!ge});return ee.unshift(J),ee}},{key:"delayOnSelect",value:function(se){for(var J=this,ee=arguments.length,ge=new Array(ee>1?ee-1:0),re=1;re<ee;re++)ge[re-1]=arguments[re];this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null),typeof se=="function"&&(this.delayTimer=window.setTimeout(function(){se(ge),J.delayTimer=null},150))}},{key:"scrollActiveItemToView",value:function(){for(var se=this.getShowOptions().length,J=0;J<se;J++){var ee=this.menuItems[J];ee&&ee.parentElement&&(ee.parentElement.scrollTop=ee.offsetTop)}}},{key:"isActiveOption",value:function(se,J){var ee=this.props.activeValue,ge=ee===void 0?[]:ee;return ge[J]===se[this.getFieldName("value")]}},{key:"render",value:function(){var se=this,J=this.props,ee=J.prefixCls,ge=J.dropdownMenuColumnStyle;return P.createElement("div",null,this.getShowOptions().map(function(re,Y){return P.createElement("ul",{className:"".concat(ee,"-menu"),key:Y,style:ge},re.map(function(z){return se.getOption(z,Y)}))}))}}]),oe}(P.Component);return le.defaultProps={options:[],value:[],activeValue:[],onSelect:function(){},prefixCls:"rc-cascader-menus",visible:!1,expandTrigger:"click"},le}(),w=u,v={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:1,adjustY:1}}},a=v;function R(le){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R=function(te){return typeof te}:R=function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},R(le)}function D(le,ue){if(le==null)return{};var te=c(le,ue),oe,Q;if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(le);for(Q=0;Q<se.length;Q++){if(oe=se[Q],ue.indexOf(oe)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(le,oe))continue;te[oe]=le[oe]}}return te}function c(le,ue){if(le==null)return{};var te={},oe=Object.keys(le),Q,se;for(se=0;se<oe.length;se++){if(Q=oe[se],ue.indexOf(Q)>=0)continue;te[Q]=le[Q]}return te}function b(le){return j(le)||F(le)||C(le)||x()}function x(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C(le,ue){if(!le)return;if(typeof le=="string")return k(le,ue);var te=Object.prototype.toString.call(le).slice(8,-1);if(te==="Object"&&le.constructor&&(te=le.constructor.name),te==="Map"||te==="Set")return Array.from(le);if(te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te))return k(le,ue)}function F(le){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(le))return Array.from(le)}function j(le){if(Array.isArray(le))return k(le)}function k(le,ue){(ue==null||ue>le.length)&&(ue=le.length);for(var te=0,oe=new Array(ue);te<ue;te++)oe[te]=le[te];return oe}function X(le,ue){if(!(le instanceof ue))throw new TypeError("Cannot call a class as a function")}function G(le,ue){for(var te=0;te<ue.length;te++){var oe=ue[te];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(le,oe.key,oe)}}function W(le,ue,te){return ue&&G(le.prototype,ue),te&&G(le,te),le}function K(le,ue){if(typeof ue!="function"&&ue!==null)throw new TypeError("Super expression must either be null or a function");le.prototype=Object.create(ue&&ue.prototype,{constructor:{value:le,writable:!0,configurable:!0}}),ue&&B(le,ue)}function B(le,ue){return B=Object.setPrototypeOf||function(oe,Q){return oe.__proto__=Q,oe},B(le,ue)}function U(le){var ue=ie();return function(){var te=ce(le),oe;if(ue){var Q=ce(this).constructor;oe=Reflect.construct(te,arguments,Q)}else oe=te.apply(this,arguments);return H(this,oe)}}function H(le,ue){return ue&&(R(ue)==="object"||typeof ue=="function")?ue:q(le)}function q(le){if(le===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return le}function ie(){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(le){return!1}}function ce(le){return ce=Object.setPrototypeOf?Object.getPrototypeOf:function(te){return te.__proto__||Object.getPrototypeOf(te)},ce(le)}var he=function(){var le=function(ue){K(oe,ue);var te=U(oe);function oe(Q){var se;X(this,oe),se=te.call(this,Q),se.setPopupVisible=function(ee){var ge=se.state.value;"popupVisible"in se.props||se.setState({popupVisible:ee}),ee&&!se.state.popupVisible&&se.setState({activeValue:ge}),se.props.onPopupVisibleChange(ee)},se.handleChange=function(ee,ge,re){var Y=ge.visible;(re.type!=="keydown"||re.keyCode===_.a.ENTER)&&(se.props.onChange(ee.map(function(z){return z[se.getFieldName("value")]}),ee),se.setPopupVisible(Y))},se.handlePopupVisibleChange=function(ee){se.setPopupVisible(ee)},se.handleMenuSelect=function(ee,ge,re){var Y=se.trigger.getRootDomNode();Y&&Y.focus&&Y.focus();var z=se.props,$=z.changeOnSelect,me=z.loadData,pe=z.expandTrigger;if(!ee||ee.disabled)return;var xe=se.state.activeValue;xe=xe.slice(0,ge+1),xe[ge]=ee[se.getFieldName("value")];var Re=se.getActiveOptions(xe);if(ee.isLeaf===!1&&!ee[se.getFieldName("children")]&&me){$&&se.handleChange(Re,{visible:!0},re),se.setState({activeValue:xe}),me(Re);return}var ke={};!ee[se.getFieldName("children")]||!ee[se.getFieldName("children")].length?(se.handleChange(Re,{visible:!1},re),ke.value=xe):$&&(re.type==="click"||re.type==="keydown")&&(pe==="hover"?se.handleChange(Re,{visible:!1},re):se.handleChange(Re,{visible:!0},re),ke.value=xe),ke.activeValue=xe,("value"in se.props||re.type==="keydown"&&re.keyCode!==_.a.ENTER)&&delete ke.value,se.setState(ke)},se.handleItemDoubleClick=function(){var ee=se.props.changeOnSelect;ee&&se.setPopupVisible(!1)},se.handleKeyDown=function(ee){var ge=se.props.children;if(ge&&ge.props.onKeyDown){ge.props.onKeyDown(ee);return}var re=b(se.state.activeValue),Y=re.length-1<0?0:re.length-1,z=se.getCurrentLevelOptions(),$=z.map(function(Re){return Re[se.getFieldName("value")]}).indexOf(re[Y]);if(ee.keyCode!==_.a.DOWN&&ee.keyCode!==_.a.UP&&ee.keyCode!==_.a.LEFT&&ee.keyCode!==_.a.RIGHT&&ee.keyCode!==_.a.ENTER&&ee.keyCode!==_.a.SPACE&&ee.keyCode!==_.a.BACKSPACE&&ee.keyCode!==_.a.ESC&&ee.keyCode!==_.a.TAB)return;if(!se.state.popupVisible&&ee.keyCode!==_.a.BACKSPACE&&ee.keyCode!==_.a.LEFT&&ee.keyCode!==_.a.RIGHT&&ee.keyCode!==_.a.ESC&&ee.keyCode!==_.a.TAB){se.setPopupVisible(!0);return}if(ee.keyCode===_.a.DOWN||ee.keyCode===_.a.UP){ee.preventDefault();var me=$;me!==-1?ee.keyCode===_.a.DOWN?(me+=1,me=me>=z.length?0:me):(me-=1,me=me<0?z.length-1:me):me=0,re[Y]=z[me][se.getFieldName("value")]}else if(ee.keyCode===_.a.LEFT||ee.keyCode===_.a.BACKSPACE)ee.preventDefault(),re.splice(re.length-1,1);else if(ee.keyCode===_.a.RIGHT)ee.preventDefault(),z[$]&&z[$][se.getFieldName("children")]&&re.push(z[$][se.getFieldName("children")][0][se.getFieldName("value")]);else if(ee.keyCode===_.a.ESC||ee.keyCode===_.a.TAB){se.setPopupVisible(!1);return}(!re||re.length===0)&&se.setPopupVisible(!1);var pe=se.getActiveOptions(re),xe=pe[pe.length-1];se.handleMenuSelect(xe,pe.length-1,ee),se.props.onKeyDown&&se.props.onKeyDown(ee)},se.saveTrigger=function(ee){se.trigger=ee};var J=[];return"value"in Q?J=Q.value||[]:"defaultValue"in Q&&(J=Q.defaultValue||[]),L()(!("filedNames"in Q),"`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead."),se.state={popupVisible:Q.popupVisible,activeValue:J,value:J,prevProps:Q},se.defaultFieldNames={label:"label",value:"value",children:"children"},se}return W(oe,[{key:"getPopupDOMNode",value:function(){return this.trigger.getPopupDomNode()}},{key:"getFieldName",value:function(se){var J=this.defaultFieldNames,ee=this.props,ge=ee.fieldNames,re=ee.filedNames;return"filedNames"in this.props?re[se]||J[se]:ge[se]||J[se]}},{key:"getFieldNames",value:function(){var se=this.props,J=se.fieldNames,ee=se.filedNames;return"filedNames"in this.props?ee:J}},{key:"getCurrentLevelOptions",value:function(){var se=this,J=this.props.options,ee=J===void 0?[]:J,ge=this.state.activeValue,re=ge===void 0?[]:ge,Y=S()(ee,function(z,$){return z[se.getFieldName("value")]===re[$]},{childrenKeyName:this.getFieldName("children")});return Y[Y.length-2]?Y[Y.length-2][this.getFieldName("children")]:b(ee).filter(function(z){return!z.disabled})}},{key:"getActiveOptions",value:function(se){var J=this;return S()(this.props.options||[],function(ee,ge){return ee[J.getFieldName("value")]===se[ge]},{childrenKeyName:this.getFieldName("children")})}},{key:"render",value:function(){var se=this.props,J=se.prefixCls,ee=se.transitionName,ge=se.popupClassName,re=se.options,Y=re===void 0?[]:re,z=se.disabled,$=se.builtinPlacements,me=se.popupPlacement,pe=se.children,xe=se.dropdownRender,Re=D(se,["prefixCls","transitionName","popupClassName","options","disabled","builtinPlacements","popupPlacement","children","dropdownRender"]),ke=P.createElement("div",null),Ne="";Y&&Y.length>0?ke=P.createElement(w,Object.assign({},this.props,{fieldNames:this.getFieldNames(),defaultFieldNames:this.defaultFieldNames,activeValue:this.state.activeValue,onSelect:this.handleMenuSelect,onItemDoubleClick:this.handleItemDoubleClick,visible:this.state.popupVisible})):Ne=" ".concat(J,"-menus-empty");var Pe=ke;return xe&&(Pe=xe(ke)),P.createElement(m.a,Object.assign({ref:this.saveTrigger},Re,{popupPlacement:me,builtinPlacements:$,popupTransitionName:ee,action:z?[]:["click"],popupVisible:z?!1:this.state.popupVisible,onPopupVisibleChange:this.handlePopupVisibleChange,prefixCls:"".concat(J,"-menus"),popupClassName:ge+Ne,popup:Pe}),P.cloneElement(pe,{onKeyDown:this.handleKeyDown,tabIndex:z?void 0:0}))}}],[{key:"getDerivedStateFromProps",value:function(se,J){var ee=J.prevProps,ge=ee===void 0?{}:ee,re={prevProps:se};return"value"in se&&!p(ge.value,se.value)&&(re.value=se.value||[],"loadData"in se||(re.activeValue=se.value||[])),"popupVisible"in se&&(re.popupVisible=se.popupVisible),re}}]),oe}(P.Component);return le.defaultProps={onChange:function(){},onPopupVisibleChange:function(){},disabled:!1,transitionName:"",prefixCls:"rc-cascader",popupClassName:"",popupPlacement:"bottomLeft",builtinPlacements:a,expandTrigger:"click",fieldNames:{label:"label",value:"value",children:"children"},expandIcon:">"},le}(),be=he,ne=Z.a=be},S6kV:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.mode.OFB=function(){var m=P.lib.BlockCipherMode.extend(),T=m.Encryptor=m.extend({processBlock:function(L,_){var g=this._cipher,S=g.blockSize,p=this._iv,o=this._keystream;p&&(o=this._keystream=p.slice(0),this._iv=void 0),g.encryptBlock(o,0);for(var i=0;i<S;i++)L[_+i]^=o[i]}});return m.Decryptor=T,m}(),P.mode.OFB})},SJMd:function(I,Z){/**
|
|
|
* @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 N,P,m,T=!1,L,_;window.PR_SHOULD_USE_CONTINUATION=!0;var g,S;(function(){var p=window,o=["break,continue,do,else,for,if,return,while"],i=[o,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],r=[i,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],d=[r,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],f=[r,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],h=[r,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],E="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",y=[r,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],l="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",n=[o,"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"],s=[o,"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"],u=[o,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],w=[d,h,f,y,l,n,s,u],v=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,a="str",R="kwd",D="com",c="typ",b="lit",x="pun",C="pln",F="tag",j="dec",k="src",X="atn",G="atv",W="nocode",K="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function B(re){for(var Y=0,z=!1,$=!1,me=0,pe=re.length;me<pe;++me){var xe=re[me];if(xe.ignoreCase)$=!0;else if(/[a-z]/i.test(xe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){z=!0,$=!1;break}}var Re={b:8,t:9,n:10,v:11,f:12,r:13};function ke(We){var _e=We.charCodeAt(0);if(_e!==92)return _e;var Ge=We.charAt(1);return _e=Re[Ge],_e||("0"<=Ge&&Ge<="7"?parseInt(We.substring(1),8):Ge==="u"||Ge==="x"?parseInt(We.substring(2),16):We.charCodeAt(1))}function Ne(We){if(We<32)return(We<16?"\\x0":"\\x")+We.toString(16);var _e=String.fromCharCode(We);return _e==="\\"||_e==="-"||_e==="]"||_e==="^"?"\\"+_e:_e}function Pe(We){var _e=We.substring(1,We.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")),Ge=[],Ve=_e[0]==="^",Ie=["["];Ve&&Ie.push("^");for(var He=Ve?1:0,Le=_e.length;He<Le;++He){var Te=_e[He];if(/\\[bdsw]/i.test(Te))Ie.push(Te);else{var Ae=ke(Te),ye;He+2<Le&&_e[He+1]==="-"?(ye=ke(_e[He+2]),He+=2):ye=Ae,Ge.push([Ae,ye]),ye<65||Ae>122||(ye<65||Ae>90||Ge.push([Math.max(65,Ae)|32,Math.min(ye,90)|32]),ye<97||Ae>122||Ge.push([Math.max(97,Ae)&~32,Math.min(ye,122)&~32]))}}Ge.sort(function(Ce,Be){return Ce[0]-Be[0]||Be[1]-Ce[1]});for(var Ee=[],we=[],He=0;He<Ge.length;++He){var Oe=Ge[He];Oe[0]<=we[1]+1?we[1]=Math.max(we[1],Oe[1]):Ee.push(we=Oe)}for(var He=0;He<Ee.length;++He){var Oe=Ee[He];Ie.push(Ne(Oe[0])),Oe[1]>Oe[0]&&(Oe[1]+1>Oe[0]&&Ie.push("-"),Ie.push(Ne(Oe[1])))}return Ie.push("]"),Ie.join("")}function je(We){for(var _e=We.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")),Ge=_e.length,Ve=[],Ie=0,He=0;Ie<Ge;++Ie){var Le=_e[Ie];if(Le==="(")++He;else if(Le.charAt(0)==="\\"){var Te=+Le.substring(1);Te&&(Te<=He?Ve[Te]=-1:_e[Ie]=Ne(Te))}}for(var Ie=1;Ie<Ve.length;++Ie)Ve[Ie]===-1&&(Ve[Ie]=++Y);for(var Ie=0,He=0;Ie<Ge;++Ie){var Le=_e[Ie];if(Le==="(")++He,Ve[He]||(_e[Ie]="(?:");else if(Le.charAt(0)==="\\"){var Te=+Le.substring(1);Te&&Te<=He&&(_e[Ie]="\\"+Ve[Te])}}for(var Ie=0;Ie<Ge;++Ie)_e[Ie]==="^"&&_e[Ie+1]!=="^"&&(_e[Ie]="");if(We.ignoreCase&&z)for(var Ie=0;Ie<Ge;++Ie){var Le=_e[Ie],Ae=Le.charAt(0);Le.length>=2&&Ae==="["?_e[Ie]=Pe(Le):Ae!=="\\"&&(_e[Ie]=Le.replace(/[a-zA-Z]/g,function(we){var Oe=we.charCodeAt(0);return"["+String.fromCharCode(Oe&~32,Oe|32)+"]"}))}return _e.join("")}for(var Fe=[],me=0,pe=re.length;me<pe;++me){var xe=re[me];if(xe.global||xe.multiline)throw new Error(""+xe);Fe.push("(?:"+je(xe)+")")}return new RegExp(Fe.join("|"),$?"gi":"g")}function U(re,Y){var z=/(?:^|\s)nocode(?:\s|$)/,$=[],me=0,pe=[],xe=0;function Re(ke){var Ne=ke.nodeType;if(Ne==1){if(z.test(ke.className))return;for(var Pe=ke.firstChild;Pe;Pe=Pe.nextSibling)Re(Pe);var je=ke.nodeName.toLowerCase();(je==="br"||je==="li")&&($[xe]=`
|
|
|
`,pe[xe<<1]=me++,pe[xe++<<1|1]=ke)}else if(Ne==3||Ne==4){var Fe=ke.nodeValue;Fe.length&&(Y?Fe=Fe.replace(/\r\n?/g,`
|
|
|
`):Fe=Fe.replace(/[ \t\r\n]+/g," "),$[xe]=Fe,pe[xe<<1]=me,me+=Fe.length,pe[xe++<<1|1]=ke)}}return Re(re),{sourceCode:$.join("").replace(/\n$/,""),spans:pe}}function H(re,Y,z,$,me){if(!z)return;var pe={sourceNode:re,pre:1,langExtension:null,numberLines:null,sourceCode:z,spans:null,basePos:Y,decorations:null};$(pe),me.push.apply(me,pe.decorations)}var q=/\S/;function ie(re){for(var Y=void 0,z=re.firstChild;z;z=z.nextSibling){var $=z.nodeType;Y=$===1?Y?re:z:$===3&&q.test(z.nodeValue)?re:Y}return Y===re?void 0:Y}function ce(re,Y){var z={},$;(function(){for(var xe=re.concat(Y),Re=[],ke={},Ne=0,Pe=xe.length;Ne<Pe;++Ne){var je=xe[Ne],Fe=je[3];if(Fe)for(var We=Fe.length;--We>=0;)z[Fe.charAt(We)]=je;var _e=je[1],Ge=""+_e;ke.hasOwnProperty(Ge)||(Re.push(_e),ke[Ge]=null)}Re.push(/[\0-\uffff]/),$=B(Re)})();var me=Y.length,pe=function(xe){for(var Re=xe.sourceCode,ke=xe.basePos,Ne=xe.sourceNode,Pe=[ke,C],je=0,Fe=Re.match($)||[],We={},_e=0,Ge=Fe.length;_e<Ge;++_e){var Ve=Fe[_e],Ie=We[Ve],He=void 0,Le;if(typeof Ie=="string")Le=!1;else{var Te=z[Ve.charAt(0)];if(Te)He=Ve.match(Te[1]),Ie=Te[0];else{for(var Ae=0;Ae<me;++Ae)if(Te=Y[Ae],He=Ve.match(Te[1]),He){Ie=Te[0];break}He||(Ie=C)}Le=Ie.length>=5&&Ie.substring(0,5)==="lang-",Le&&!(He&&typeof He[1]=="string")&&(Le=!1,Ie=k),Le||(We[Ve]=Ie)}var ye=je;if(je+=Ve.length,!Le)Pe.push(ke+ye,Ie);else{var Ee=He[1],we=Ve.indexOf(Ee),Oe=we+Ee.length;He[2]&&(Oe=Ve.length-He[2].length,we=Oe-Ee.length);var Ce=Ie.substring(5);H(Ne,ke+ye,Ve.substring(0,we),pe,Pe),H(Ne,ke+ye+we,Ee,oe(Ce,Ee),Pe),H(Ne,ke+ye+Oe,Ve.substring(Oe),pe,Pe)}}xe.decorations=Pe};return pe}function he(re){var Y=[],z=[];re.tripleQuotedStrings?Y.push([a,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):re.multiLineStrings?Y.push([a,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Y.push([a,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),re.verbatimStrings&&z.push([a,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var $=re.hashComments;$&&(re.cStyleComments?($>1?Y.push([D,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Y.push([D,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),z.push([a,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Y.push([D,/^#[^\r\n]*/,null,"#"])),re.cStyleComments&&(z.push([D,/^\/\/[^\r\n]*/,null]),z.push([D,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var me=re.regexLiterals;if(me){var pe=me>1?"":`
|
|
|
\r`,xe=pe?".":"[\\S\\s]",Re="/(?=[^/*"+pe+"])(?:[^/\\x5B\\x5C"+pe+"]|\\x5C"+xe+"|\\x5B(?:[^\\x5C\\x5D"+pe+"]|\\x5C"+xe+")*(?:\\x5D|$))+/";z.push(["lang-regex",RegExp("^"+K+"("+Re+")")])}var ke=re.types;ke&&z.push([c,ke]);var Ne=(""+re.keywords).replace(/^ | $/g,"");Ne.length&&z.push([R,new RegExp("^(?:"+Ne.replace(/[\s,]+/g,"|")+")\\b"),null]),Y.push([C,/^\s+/,null,` \r
|
|
|
\xA0`]);var Pe="^.[^\\s\\w.$@'\"`/\\\\]*";return re.regexLiterals&&(Pe+="(?!s*/)"),z.push([b,/^@[a-z_$][a-z_$@0-9]*/i,null],[c,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[C,/^[a-z_$][a-z_$@0-9]*/i,null],[b,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[C,/^\\[\s\S]?/,null],[x,new RegExp(Pe),null]),ce(Y,z)}var be=he({keywords:w,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ne(re,Y,z){for(var $=/(?:^|\s)nocode(?:\s|$)/,me=/\r\n?|\n/,pe=re.ownerDocument,xe=pe.createElement("li");re.firstChild;)xe.appendChild(re.firstChild);var Re=[xe];function ke(_e){var Ge=_e.nodeType;if(Ge==1&&!$.test(_e.className))if(_e.nodeName==="br")Ne(_e),_e.parentNode&&_e.parentNode.removeChild(_e);else for(var Ve=_e.firstChild;Ve;Ve=Ve.nextSibling)ke(Ve);else if((Ge==3||Ge==4)&&z){var Ie=_e.nodeValue,He=Ie.match(me);if(He){var Le=Ie.substring(0,He.index);_e.nodeValue=Le;var Te=Ie.substring(He.index+He[0].length);if(Te){var Ae=_e.parentNode;Ae.insertBefore(pe.createTextNode(Te),_e.nextSibling)}Ne(_e),Le||_e.parentNode.removeChild(_e)}}}function Ne(_e){for(;!_e.nextSibling;)if(_e=_e.parentNode,!_e)return;function Ge(He,Le){var Te=Le?He.cloneNode(!1):He,Ae=He.parentNode;if(Ae){var ye=Ge(Ae,1),Ee=He.nextSibling;ye.appendChild(Te);for(var we=Ee;we;we=Ee)Ee=we.nextSibling,ye.appendChild(we)}return Te}for(var Ve=Ge(_e.nextSibling,0),Ie;(Ie=Ve.parentNode)&&Ie.nodeType===1;)Ve=Ie;Re.push(Ve)}for(var Pe=0;Pe<Re.length;++Pe)ke(Re[Pe]);Y===(Y|0)&&Re[0].setAttribute("value",Y);var je=pe.createElement("ol");je.className="linenums";for(var Fe=Math.max(0,Y-1|0)||0,Pe=0,We=Re.length;Pe<We;++Pe)xe=Re[Pe],xe.className="L"+(Pe+Fe)%10,xe.firstChild||xe.appendChild(pe.createTextNode("\xA0")),je.appendChild(xe);re.appendChild(je)}function le(re){var Y=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Y=Y&&+Y[1]<=8;var z=/\n/g,$=re.sourceCode,me=$.length,pe=0,xe=re.spans,Re=xe.length,ke=0,Ne=re.decorations,Pe=Ne.length,je=0;Ne[Pe]=me;var Fe,We;for(We=Fe=0;We<Pe;)Ne[We]!==Ne[We+2]?(Ne[Fe++]=Ne[We++],Ne[Fe++]=Ne[We++]):We+=2;for(Pe=Fe,We=Fe=0;We<Pe;){for(var _e=Ne[We],Ge=Ne[We+1],Ve=We+2;Ve+2<=Pe&&Ne[Ve+1]===Ge;)Ve+=2;Ne[Fe++]=_e,Ne[Fe++]=Ge,We=Ve}Pe=Ne.length=Fe;var Ie=re.sourceNode,He="";Ie&&(He=Ie.style.display,Ie.style.display="none");try{for(var Le=null;ke<Re;){var Te=xe[ke],Ae=xe[ke+2]||me,ye=Ne[je+2]||me,Ve=Math.min(Ae,ye),Ee=xe[ke+1],we;if(Ee.nodeType!==1&&(we=$.substring(pe,Ve))){Y&&(we=we.replace(z,"\r")),Ee.nodeValue=we;var Oe=Ee.ownerDocument,Ce=Oe.createElement("span");Ce.className=Ne[je+1];var Be=Ee.parentNode;Be.replaceChild(Ce,Ee),Ce.appendChild(Ee),pe<Ae&&(xe[ke+1]=Ee=Oe.createTextNode($.substring(Ve,Ae)),Be.insertBefore(Ee,Ce.nextSibling))}pe=Ve,pe>=Ae&&(ke+=2),pe>=ye&&(je+=2)}}finally{Ie&&(Ie.style.display=He)}}var ue={};function te(re,Y){for(var z=Y.length;--z>=0;){var $=Y[z];ue.hasOwnProperty($)?p.console&&console.warn("cannot override language handler %s",$):ue[$]=re}}function oe(re,Y){return re&&ue.hasOwnProperty(re)||(re=/^\s*</.test(Y)?"default-markup":"default-code"),ue[re]}te(be,["default-code"]),te(ce([],[[C,/^[^<?]+/],[j,/^<!\w[^>]*(?:>|$)/],[D,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[x,/^(?:<[%?]|[%?]>)/],["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"]),te(ce([[C,/^[\s]+/,null,` \r
|
|
|
`],[G,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[F,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[X,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[x,/^[=<>\/]+/],["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"]),te(ce([],[[G,/^[\s\S]+/]]),["uq.val"]),te(he({keywords:d,hashComments:!0,cStyleComments:!0,types:v}),["c","cc","cpp","cxx","cyc","m"]),te(he({keywords:"null,true,false"}),["json"]),te(he({keywords:h,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:v}),["cs"]),te(he({keywords:f,cStyleComments:!0}),["java"]),te(he({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),te(he({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),te(he({keywords:l,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),te(he({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),te(he({keywords:y,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),te(he({keywords:E,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),te(ce([],[[a,/^[\s\S]+/]]),["regex"]);function Q(re){var Y=re.langExtension;try{var z=U(re.sourceNode,re.pre),$=z.sourceCode;re.sourceCode=$,re.spans=z.spans,re.basePos=0,oe(Y,$)(re),le(re)}catch(me){p.console&&console.log(me&&me.stack||me)}}function se(re,Y,z){var $=z||!1,me=Y||null,pe=document.createElement("div");pe.innerHTML="<pre>"+re+"</pre>",pe=pe.firstChild,$&&ne(pe,$,!0);var xe={langExtension:me,numberLines:$,sourceNode:pe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Q(xe),pe.innerHTML}function J(re,Y){var z=Y||document.body,$=z.ownerDocument||document;function me(Te){return z.getElementsByTagName(Te)}for(var pe=[me("pre"),me("code"),me("xmp")],xe=[],Re=0;Re<pe.length;++Re)for(var ke=0,Ne=pe[Re].length;ke<Ne;++ke)xe.push(pe[Re][ke]);pe=null;var Pe=Date;Pe.now||(Pe={now:function(){return+new Date}});var je=0,Fe=/\blang(?:uage)?-([\w.]+)(?!\S)/,We=/\bprettyprint\b/,_e=/\bprettyprinted\b/,Ge=/pre|xmp/i,Ve=/^code$/i,Ie=/^(?:pre|code|xmp)$/i,He={};function Le(){for(var Te=p.PR_SHOULD_USE_CONTINUATION?Pe.now()+250:Infinity;je<xe.length&&Pe.now()<Te;je++){for(var Ae=xe[je],ye=He,Ee=Ae;Ee=Ee.previousSibling;){var we=Ee.nodeType,Oe=(we===7||we===8)&&Ee.nodeValue;if(Oe?!/^\??prettify\b/.test(Oe):we!==3||/\S/.test(Ee.nodeValue))break;if(Oe){ye={},Oe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Ft,ct,mr){ye[ct]=mr});break}}var Ce=Ae.className;if((ye!==He||We.test(Ce))&&!_e.test(Ce)){for(var Be=!1,Ke=Ae.parentNode;Ke;Ke=Ke.parentNode){var qe=Ke.tagName;if(Ie.test(qe)&&Ke.className&&We.test(Ke.className)){Be=!0;break}}if(!Be){Ae.className+=" prettyprinted";var et=ye.lang;if(!et){et=Ce.match(Fe);var it;!et&&(it=ie(Ae))&&Ve.test(it.tagName)&&(et=it.className.match(Fe)),et&&(et=et[1])}var pt;if(Ge.test(Ae.tagName))pt=1;else{var gt=Ae.currentStyle,at=$.defaultView,Rt=gt?gt.whiteSpace:at&&at.getComputedStyle?at.getComputedStyle(Ae,null).getPropertyValue("white-space"):0;pt=Rt&&Rt.substring(0,3)==="pre"}var Tt=ye.linenums;(Tt=Tt==="true"||+Tt)||(Tt=Ce.match(/\blinenums\b(?::(\d+))?/),Tt=Tt?Tt[1]&&Tt[1].length?+Tt[1]:!0:!1),Tt&&ne(Ae,Tt,pt);var Pt={langExtension:et,sourceNode:Ae,numberLines:Tt,pre:pt,sourceCode:null,basePos:null,spans:null,decorations:null};Q(Pt)}}}je<xe.length?p.setTimeout(Le,250):typeof re=="function"&&re()}Le()}var ee=p.PR={createSimpleLexer:ce,registerLangHandler:te,sourceDecorator:he,PR_ATTRIB_NAME:X,PR_ATTRIB_VALUE:G,PR_COMMENT:D,PR_DECLARATION:j,PR_KEYWORD:R,PR_LITERAL:b,PR_NOCODE:W,PR_PLAIN:C,PR_PUNCTUATION:x,PR_SOURCE:k,PR_STRING:a,PR_TAG:F,PR_TYPE:c,prettyPrintOne:T?p.prettyPrintOne=se:g=se,prettyPrint:S=T?p.prettyPrint=J:S=J},ge=p.define;typeof ge=="function"&&ge.amd&&ge("google-code-prettify",[],function(){return ee})})()},T1X5:function(I,Z){I.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAABsCAYAAACPZlfNAAALdklEQVR4Xu2dC2wc1RVAzx1nDXFiO4SEhqxtxS0JHzX94TS0FEKLALX8WkKbqrRVKQrh15Zfq0IqIaSGSOXb8ktANFJbKqUFWigEAUohfFRQDC1KxS8UR/7wDbZ3TRxix3urN951No7Xnt15M7Mbz0hRImXevffds/PmzXv33StU0KWqTlcfh6mwkCHmq8M8B5oUZosyS6EeOCD7x/Rsl/kjkFJhu8AHGWiXDNuoYqsoW5K1vCkimUpxg5SzoW+r1gylOUGErygci9IC1Fi2uR+hVeA5VZ6tquOpuSL9lnVYE1d2wNo+0jnVylLNcKYKx6EcaK23XgQJH4vyjDg8OCDc3zxd3vXSLKx7ygJYW5seOGUmZ6GcJ8IShaqwHDCeHoEhVTYh3LO7mweam+XjqO2KFNjWPp09VblUlQuAmVE7YwL93SKs2SncMr9WPojK1kiAdWzXpCa40oHlCtOi6nwpegV2ZOBuGeSGxlnSVYoMP21CBfZmnx5SneFagXPzZnJ+7I+y7S6FdQMO1xxWK++HZUgowNzpeIoVKqwCDgqrcyHp6RFlZbKetWF8HgQOrD2liwTuAHdKvj9frVVTuHDuNGkNspOBAWtt1cShC1ilcLlqecz6gnSkkS3CkMBN77zBypYWGQxCXyDAuvq1KTPIeuCYIIyuAJnPOwmWJWuk3bat1oF1pfWMjLKuAqbptn05Wl63I5ybrJOHbCqyCqw9ratEucqMDjaNrGBZqsLqpjpZaasPVhyrqlVdKe5Wcafr8TXKA6KsS9azXESG/DrHN7CODp0qdaxXON2vMftze4F/aJpljY2y008/fQFr69EZCYeH3ZX0+JrQA2ZHYDDDac0HSe+ENxe4oWRg2SfriRhWca53t3HSnFTqk1YSMPedleZv8TBYHKzc3WZ4TNbxrVLeaSUB6+zV38cTjNJgjUBT1jXMkB8XK6VoYNmp+9XFKorv39cDKlxX7JS/KGDZj+K/x99Z1n5+6gjfLObj2jOw7HLTv+MVDGuwcoK6nQSf97qM5QmYWcj9xHyensRrg9YpjRL4/HtbOd7LgrEnYF1p/U1G+XnQVk9m+Y5wfbJOfjGRDyYEZvazHOFfk2WLZCKHBfX/Zmsmo3ypqV42j6djXGBmp7gzzQuTYPMxKA7Fym1tqGPxeDvX4wLr7NULVdzd4vgKyQOiXNQwQ+4spK4gMBMwc0CG1/bDGIyQXF+ymp5dDkcUCuwpCKwzpXcqbrxgfIXsAYU1TfVy4VhqxwRm4gZJ8L/9IBQtZFdbU7eLQT41VtzjmMDaU3qzwKXW1MeCivaAwi1N9XLZ6Ib7AHPDpzO0hRmR+/L78Ict8J93IT1QdN+sN6irhs/NgR8uhM8eYl28J4EmwninQ/PosPB9gHWmdZUqoS3u/uUVuPEFKMcDWg5wxWL4zlGefGz9JhGuaxgVD7IXsOwpEhMvHsrBBPNknf9IecLKed9Au+vUyJ607t3dJPNPzewFrCOl3wPutf5TKSDwio3wdF7k3imfhMNnugGZkV2q8Ho3PPbWHhOOb4IbT4zMpHMa6+XPOe17A+vVjQhfC8u0E+/d884ysH69JCzNE+v51aY90Mw7beM5E7cJ5A7ln40zZOTnMgLMnHxMDNEZ5mG6RSbcNHv9tAV+sDCQLpck9I9b4Hd5UfKbIwrgM4cKB6toyJ0EHQHWkdJLgFtL6l2JjfKB/WwRfP/TJQoKoNmf/gu/zVuGjQqY6ZrjcEmyVm43/x4B1pnSxxVOCqDvBUXGwLx5W+CJhno5eQSYe1q/jw/DPgAeA/MGDOHjqloONtkN3CesI6XfAB7x2NzabV6B3fca3LoZ+ndbU+0KmpaAn7TA0iP2lVtOQ2LWulMb62WDC6wzrdfp8CGGUC+vwL56L3wU0ArI9Gp4cowZYLkBE2F1Q51cPfyEpXUTyvGh0gK8ArvgUXgxoGwZX5gDa79eAU+Y8HRjnSyR7K5yXwAZZibk7xXYjkHY2Abmb5uXGRJPnAfTqisAGPQ31FErnWldoMrrNh3hVZZXYF7l2byv3IZEd4YoHC4dfbqUDPfZ7KxXWTEwr57K3udwtnT06i8RVhfZ1MrtMbAi3ahcJe1pXSPKiiKbWrk9BlacG1VYa95hG1QZY55UnLBS7vYK7JXtwxuc/ZYnHTWJ4U3Ko2ZVxKTDvMMelY60bs7mISzF577aeAV25l/h7Y98qSrYeO50ePDblQHMzevYmVITDjAvGHeMLzUGVpzXBbZJR0p7gBnFNbVzt1dgr+aGRMtLUzVThofEI8cYEh9/C1ZuGu7n7BrYsMxOn31K6TXAdkTx0WwM9wrMZydLaj6UgTtegje64UefgaPnlCTGdqN+A8z8biPJAFrOwGx72pK8oRiYJU+GJMYFFg+JIXnbghp3SOyO6sCD1yFxxwBs3BbA4m91dvE3YcGV4YjoqYhp/YpH4aWAtlfMZGJNJMsGxRMentZXwIdzFBuYxbszhBbuh3MFLE25IQKtwSxNmRCBs8cIEQjB/UWrcJem4sXfvf32Qhdc8jjcdjIsThbt00AbuIu/8fZK5QDDbK/EG5gVBMxsYMYhApUDzA0RqIQgnEBfDKOEl/E7bDgIx9hb7mFuMTA3qH44zM04o9wDSWNgbsRUXiBpmYdq2wZmhr1C16sfwu0vwsVHw5EHF74vgin/nlDtcjgMEeb5sPw1zFJ/DKEePxp9GMIdFiM4bhTVCUyvT9gR4zxhx4T4Ub3PcSMDrKtPL85kuK3UX1wp7fyccTaHGE5uBhP5ZPMqx1nimAf6ojgy+/J7cP6G0rMILJ4Lt51iExeUG7CCR2bd6X3Ih9KNTj95OmZOhce+u38Do9ChdBdYyGkfcq4uJRPO9ARc9kU4Y8F+DgwKp30IO7GKXVfbkVZmQ+L4iVWyH9Ghpi6y42Z7UsoJ2ISpi0y3o0gOZs/d/iWVCzDPycFMl+P0e/7B+5XgOf2eO/mIE1z69bff9sUluMw+ZXdKnELWr+NLal90ClmjJU7SXJKvbTQqLUmzO2OM06DbAFCUjJLToBstcaGBonxt42Z/hQay77K4lIcNFBPIsFLKI6cjLpYTBjGub7RRLMeYGpejChyY3XJUxty44Ftg0OwXfMsbGs/IKHFJRXvsgiupmLMxLlpqkVbQRUtzpsZlgf1Dk7DKAme/z+LC2z6YhV54210g7tCpUkdc2r5IcJGUts/Z2NajMxIODyscW6Tdk/J2A2sww2nNB0lvqQ7wXTQj+6StVzi9VCMmQzszDGqaZY2NstNPf30DM8qfVJ0yP8VdKkRUP8GPC4JvayYYyXqWi8iQX21WgI2a8pvs3Fbl+u1khO1VhdVNo0pK+bHHumO70mo+rk1VlVBKWvnpfMBtux3h3GSdPGRTj3VgectY64FjbBpbQbKedxIsS9ZIXrEtO9YHAsyYZhaMD13AKoXLJ0uVdbNFInDTO2+wsqVFLOdPHQYeGLCR91pKFwlu8e4WO7+xspXSqnDRRKXp/VofODBjoNm57kqxQoVVUeW18uuocdr3iLIyWc/a8UrS29IfCrCcsSawpzrDtYI7/T/AVicikrNLYd2AwzWFqpoHYVeowHIdMHGPmuBKB5aHWX7YhgNNRG4G7pZBbhirMLYNHePJiARYziA3LFy5VJULKuAzoFuENTuFW0bXVg4aUr78SIHlDMmemjkL5TwRloRZh3OCX/OQKpsQ7tndzQP55XnDhFR2wPINMidBq5WlmuFMFY4Lu2qgqYYnyjPi8OCAcH+uWGhUgEbrLYsnrJAz3OwGaU5AOQ6HL2cLItRYdl6/m8AfnlPl2ao6njKlCy3rsCaurIGN7qX7edDHYSosZIj56jDPgSaF2aLM0uH8+6YaWG4GugsYEOhVYbvABxlolwzbqGKrKFuStbwZxnTcFrH/A8wNv8JI/KKJAAAAAElFTkSuQmCC"},"VrN/":function(I,Z,N){(function(P,m){I.exports=m()})(this,function(){"use strict";var P=navigator.userAgent,m=navigator.platform,T=/gecko\/\d/i.test(P),L=/MSIE \d/.test(P),_=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(P),g=/Edge\/(\d+)/.exec(P),S=L||_||g,p=S&&(L?document.documentMode||6:+(g||_)[1]),o=!g&&/WebKit\//.test(P),i=o&&/Qt\/\d+\.\d+/.test(P),r=!g&&/Chrome\//.test(P),d=/Opera\//.test(P),f=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(P),E=/PhantomJS/.test(P),y=!g&&/AppleWebKit/.test(P)&&/Mobile\/\w+/.test(P),l=/Android/.test(P),n=y||l||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(P),s=y||/Mac/.test(m),u=/\bCrOS\b/.test(P),w=/win/i.test(m),v=d&&P.match(/Version\/(\d*\.\d*)/);v&&(v=Number(v[1])),v&&v>=15&&(d=!1,o=!0);var a=s&&(i||d&&(v==null||v<12.11)),R=T||S&&p>=9;function D(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var c=function(e,t){var A=e.className,O=D(t).exec(A);if(O){var M=A.slice(O.index+O[0].length);e.className=A.slice(0,O.index)+(M?O[1]+M:"")}};function b(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function x(e,t){return b(e).appendChild(t)}function C(e,t,A,O){var M=document.createElement(e);if(A&&(M.className=A),O&&(M.style.cssText=O),typeof t=="string")M.appendChild(document.createTextNode(t));else if(t)for(var V=0;V<t.length;++V)M.appendChild(t[V]);return M}function F(e,t,A,O){var M=C(e,t,A,O);return M.setAttribute("role","presentation"),M}var j;document.createRange?j=function(e,t,A,O){var M=document.createRange();return M.setEnd(O||e,A),M.setStart(e,t),M}:j=function(e,t,A){var O=document.body.createTextRange();try{O.moveToElementText(e.parentNode)}catch(M){return O}return O.collapse(!0),O.moveEnd("character",A),O.moveStart("character",t),O};function k(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function X(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function G(e,t){var A=e.className;D(t).test(A)||(e.className+=(A?" ":"")+t)}function W(e,t){for(var A=e.split(" "),O=0;O<A.length;O++)A[O]&&!D(A[O]).test(t)&&(t+=" "+A[O]);return t}var K=function(e){e.select()};y?K=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:S&&(K=function(e){try{e.select()}catch(t){}});function B(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function U(e,t,A){t||(t={});for(var O in e)e.hasOwnProperty(O)&&(A!==!1||!t.hasOwnProperty(O))&&(t[O]=e[O]);return t}function H(e,t,A,O,M){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var V=O||0,ae=M||0;;){var de=e.indexOf(" ",V);if(de<0||de>=t)return ae+(t-V);ae+=de-V,ae+=A-ae%A,V=de+1}}var q=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};q.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},q.prototype.set=function(e,t){this.f=t;var A=+new Date+e;(!this.id||A<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=A)};function ie(e,t){for(var A=0;A<e.length;++A)if(e[A]==t)return A;return-1}var ce=50,he={toString:function(){return"CodeMirror.Pass"}},be={scroll:!1},ne={origin:"*mouse"},le={origin:"+move"};function ue(e,t,A){for(var O=0,M=0;;){var V=e.indexOf(" ",O);V==-1&&(V=e.length);var ae=V-O;if(V==e.length||M+ae>=t)return O+Math.min(ae,t-M);if(M+=V-O,M+=A-M%A,O=V+1,M>=t)return O}}var te=[""];function oe(e){for(;te.length<=e;)te.push(Q(te)+" ");return te[e]}function Q(e){return e[e.length-1]}function se(e,t){for(var A=[],O=0;O<e.length;O++)A[O]=t(e[O],O);return A}function J(e,t,A){for(var O=0,M=A(t);O<e.length&&A(e[O])<=M;)O++;e.splice(O,0,t)}function ee(){}function ge(e,t){var A;return Object.create?A=Object.create(e):(ee.prototype=e,A=new ee),t&&U(t,A),A}var re=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Y(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||re.test(e))}function z(e,t){return t?t.source.indexOf("\\w")>-1&&Y(e)?!0:t.test(e):Y(e)}function $(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])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 pe(e){return e.charCodeAt(0)>=768&&me.test(e)}function xe(e,t,A){for(;(A<0?t>0:t<e.length)&&pe(e.charAt(t));)t+=A;return t}function Re(e,t,A){for(var O=t>A?-1:1;;){if(t==A)return t;var M=(t+A)/2,V=O<0?Math.ceil(M):Math.floor(M);if(V==t)return e(V)?t:A;e(V)?A=V:t=V+O}}function ke(e,t,A,O){if(!e)return O(t,A,"ltr",0);for(var M=!1,V=0;V<e.length;++V){var ae=e[V];(ae.from<A&&ae.to>t||t==A&&ae.to==t)&&(O(Math.max(ae.from,t),Math.min(ae.to,A),ae.level==1?"rtl":"ltr",V),M=!0)}M||O(t,A,"ltr")}var Ne=null;function Pe(e,t,A){var O;Ne=null;for(var M=0;M<e.length;++M){var V=e[M];if(V.from<t&&V.to>t)return M;V.to==t&&(V.from!=V.to&&A=="before"?O=M:Ne=M),V.from==t&&(V.from!=V.to&&A!="before"?O=M:Ne=M)}return O!=null?O:Ne}var je=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function A(ve){return ve<=247?e.charAt(ve):1424<=ve&&ve<=1524?"R":1536<=ve&&ve<=1785?t.charAt(ve-1536):1774<=ve&&ve<=2220?"r":8192<=ve&&ve<=8203?"w":ve==8204?"b":"L"}var O=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,M=/[stwN]/,V=/[LRr]/,ae=/[Lb1n]/,de=/[1n]/;function fe(ve,Se,De){this.level=ve,this.from=Se,this.to=De}return function(ve,Se){var De=Se=="ltr"?"L":"R";if(ve.length==0||Se=="ltr"&&!O.test(ve))return!1;for(var Ue=ve.length,Me=[],ze=0;ze<Ue;++ze)Me.push(A(ve.charCodeAt(ze)));for(var $e=0,nt=De;$e<Ue;++$e){var st=Me[$e];st=="m"?Me[$e]=nt:nt=st}for(var ft=0,lt=De;ft<Ue;++ft){var mt=Me[ft];mt=="1"&<=="r"?Me[ft]="n":V.test(mt)&&(lt=mt,mt=="r"&&(Me[ft]="R"))}for(var _t=1,xt=Me[0];_t<Ue-1;++_t){var Ut=Me[_t];Ut=="+"&&xt=="1"&&Me[_t+1]=="1"?Me[_t]="1":Ut==","&&xt==Me[_t+1]&&(xt=="1"||xt=="n")&&(Me[_t]=xt),xt=Ut}for(var Zt=0;Zt<Ue;++Zt){var Sr=Me[Zt];if(Sr==",")Me[Zt]="N";else if(Sr=="%"){var nr=void 0;for(nr=Zt+1;nr<Ue&&Me[nr]=="%";++nr);for(var Vr=Zt&&Me[Zt-1]=="!"||nr<Ue&&Me[nr]=="1"?"1":"N",Wr=Zt;Wr<nr;++Wr)Me[Wr]=Vr;Zt=nr-1}}for(var hr=0,Hr=De;hr<Ue;++hr){var Cr=Me[hr];Hr=="L"&&Cr=="1"?Me[hr]="L":V.test(Cr)&&(Hr=Cr)}for(var yr=0;yr<Ue;++yr)if(M.test(Me[yr])){var pr=void 0;for(pr=yr+1;pr<Ue&&M.test(Me[pr]);++pr);for(var ir=(yr?Me[yr-1]:De)=="L",Kr=(pr<Ue?Me[pr]:De)=="L",Ga=ir==Kr?ir?"L":"R":De,na=yr;na<pr;++na)Me[na]=Ga;yr=pr-1}for(var kr=[],Mn,_r=0;_r<Ue;)if(ae.test(Me[_r])){var Eo=_r;for(++_r;_r<Ue&&ae.test(Me[_r]);++_r);kr.push(new fe(0,Eo,_r))}else{var Hn=_r,xa=kr.length,Ea=Se=="rtl"?1:0;for(++_r;_r<Ue&&Me[_r]!="L";++_r);for(var Nr=Hn;Nr<_r;)if(de.test(Me[Nr])){Hn<Nr&&(kr.splice(xa,0,new fe(1,Hn,Nr)),xa+=Ea);var za=Nr;for(++Nr;Nr<_r&&de.test(Me[Nr]);++Nr);kr.splice(xa,0,new fe(2,za,Nr)),xa+=Ea,Hn=Nr}else++Nr;Hn<_r&&kr.splice(xa,0,new fe(1,Hn,_r))}return Se=="ltr"&&(kr[0].level==1&&(Mn=ve.match(/^\s+/))&&(kr[0].from=Mn[0].length,kr.unshift(new fe(0,0,Mn[0].length))),Q(kr).level==1&&(Mn=ve.match(/\s+$/))&&(Q(kr).to-=Mn[0].length,kr.push(new fe(0,Ue-Mn[0].length,Ue)))),Se=="rtl"?kr.reverse():kr}}();function Fe(e,t){var A=e.order;return A==null&&(A=e.order=je(e.text,t)),A}var We=[],_e=function(e,t,A){if(e.addEventListener)e.addEventListener(t,A,!1);else if(e.attachEvent)e.attachEvent("on"+t,A);else{var O=e._handlers||(e._handlers={});O[t]=(O[t]||We).concat(A)}};function Ge(e,t){return e._handlers&&e._handlers[t]||We}function Ve(e,t,A){if(e.removeEventListener)e.removeEventListener(t,A,!1);else if(e.detachEvent)e.detachEvent("on"+t,A);else{var O=e._handlers,M=O&&O[t];if(M){var V=ie(M,A);V>-1&&(O[t]=M.slice(0,V).concat(M.slice(V+1)))}}}function Ie(e,t){var A=Ge(e,t);if(!A.length)return;for(var O=Array.prototype.slice.call(arguments,2),M=0;M<A.length;++M)A[M].apply(null,O)}function He(e,t,A){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ie(e,A||t.type,e,t),we(t)||t.codemirrorIgnore}function Le(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var A=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),O=0;O<t.length;++O)ie(A,t[O])==-1&&A.push(t[O])}function Te(e,t){return Ge(e,t).length>0}function Ae(e){e.prototype.on=function(t,A){_e(this,t,A)},e.prototype.off=function(t,A){Ve(this,t,A)}}function ye(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ee(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Oe(e){ye(e),Ee(e)}function Ce(e){return e.target||e.srcElement}function Be(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),s&&e.ctrlKey&&t==1&&(t=3),t}var Ke=function(){if(S&&p<9)return!1;var e=C("div");return"draggable"in e||"dragDrop"in e}(),qe;function et(e){if(qe==null){var t=C("span","\u200B");x(e,C("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(qe=t.offsetWidth<=1&&t.offsetHeight>2&&!(S&&p<8))}var A=qe?C("span","\u200B"):C("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return A.setAttribute("cm-text",""),A}var it;function pt(e){if(it!=null)return it;var t=x(e,document.createTextNode("A\u062EA")),A=j(t,0,1).getBoundingClientRect(),O=j(t,1,2).getBoundingClientRect();return b(e),!A||A.left==A.right?!1:it=O.right-A.right<3}var gt=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,A=[],O=e.length;t<=O;){var M=e.indexOf(`
|
|
|
`,t);M==-1&&(M=e.length);var V=e.slice(t,e.charAt(M-1)=="\r"?M-1:M),ae=V.indexOf("\r");ae!=-1?(A.push(V.slice(0,ae)),t+=ae+1):(A.push(V),t=M+1)}return A}:function(e){return e.split(/\r\n?|\n/)},at=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(A){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Rt=function(){var e=C("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Tt=null;function Pt(e){if(Tt!=null)return Tt;var t=x(e,C("span","x")),A=t.getBoundingClientRect(),O=j(t,0,1).getBoundingClientRect();return Tt=Math.abs(A.left-O.left)>1}var Ft={},ct={};function mr(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ft[e]=t}function Or(e,t){ct[e]=t}function dr(e){if(typeof e=="string"&&ct.hasOwnProperty(e))e=ct[e];else if(e&&typeof e.name=="string"&&ct.hasOwnProperty(e.name)){var t=ct[e.name];typeof t=="string"&&(t={name:t}),e=ge(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return dr("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return dr("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Ye(e,t){t=dr(t);var A=Ft[t.name];if(!A)return Ye(e,"text/plain");var O=A(e,t);if(ht.hasOwnProperty(t.name)){var M=ht[t.name];for(var V in M){if(!M.hasOwnProperty(V))continue;O.hasOwnProperty(V)&&(O["_"+V]=O[V]),O[V]=M[V]}}if(O.name=t.name,t.helperType&&(O.helperType=t.helperType),t.modeProps)for(var ae in t.modeProps)O[ae]=t.modeProps[ae];return O}var ht={};function Wt(e,t){var A=ht.hasOwnProperty(e)?ht[e]:ht[e]={};U(t,A)}function Mt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var A={};for(var O in t){var M=t[O];M instanceof Array&&(M=M.concat([])),A[O]=M}return A}function Bt(e,t){for(var A;e.innerMode&&!(A=e.innerMode(t),!A||A.mode==e);)t=A.state,e=A.mode;return A||{mode:e,state:t}}function Ct(e,t,A){return e.startState?e.startState(t,A):!0}var kt=function(e,t,A){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=A};kt.prototype.eol=function(){return this.pos>=this.string.length},kt.prototype.sol=function(){return this.pos==this.lineStart},kt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},kt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},kt.prototype.eat=function(e){var t=this.string.charAt(this.pos),A;if(typeof e=="string"?A=t==e:A=t&&(e.test?e.test(t):e(t)),A)return++this.pos,t},kt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},kt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},kt.prototype.skipToEnd=function(){this.pos=this.string.length},kt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},kt.prototype.backUp=function(e){this.pos-=e},kt.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)},kt.prototype.indentation=function(){return H(this.string,null,this.tabSize)-(this.lineStart?H(this.string,this.lineStart,this.tabSize):0)},kt.prototype.match=function(e,t,A){if(typeof e=="string"){var O=function(ae){return A?ae.toLowerCase():ae},M=this.string.substr(this.pos,e.length);if(O(M)==O(e))return t!==!1&&(this.pos+=e.length),!0}else{var V=this.string.slice(this.pos).match(e);return V&&V.index>0?null:(V&&t!==!1&&(this.pos+=V[0].length),V)}},kt.prototype.current=function(){return this.string.slice(this.start,this.pos)},kt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},kt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},kt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ut(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var A=e;!A.lines;)for(var O=0;;++O){var M=A.children[O],V=M.chunkSize();if(t<V){A=M;break}t-=V}return A.lines[t]}function Ot(e,t,A){var O=[],M=t.line;return e.iter(t.line,A.line+1,function(V){var ae=V.text;M==A.line&&(ae=ae.slice(0,A.ch)),M==t.line&&(ae=ae.slice(t.ch)),O.push(ae),++M}),O}function qt(e,t,A){var O=[];return e.iter(t,A,function(M){O.push(M.text)}),O}function Vt(e,t){var A=t-e.height;if(A)for(var O=e;O;O=O.parent)O.height+=A}function It(e){if(e.parent==null)return null;for(var t=e.parent,A=ie(t.lines,e),O=t.parent;O;t=O,O=O.parent)for(var M=0;!(O.children[M]==t);++M)A+=O.children[M].chunkSize();return A+t.first}function tr(e,t){var A=e.first;e:do{for(var O=0;O<e.children.length;++O){var M=e.children[O],V=M.height;if(t<V){e=M;continue e}t-=V,A+=M.chunkSize()}return A}while(!e.lines);for(var ae=0;ae<e.lines.length;++ae){var de=e.lines[ae],fe=de.height;if(t<fe)break;t-=fe}return A+ae}function Nt(e,t){return t>=e.first&&t<e.first+e.size}function Yr(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Je(e,t,A){if(A===void 0&&(A=null),!(this instanceof Je))return new Je(e,t,A);this.line=e,this.ch=t,this.sticky=A}function yt(e,t){return e.line-t.line||e.ch-t.ch}function vn(e,t){return e.sticky==t.sticky&&yt(e,t)==0}function Fr(e){return Je(e.line,e.ch)}function jr(e,t){return yt(e,t)<0?t:e}function Pr(e,t){return yt(e,t)<0?e:t}function an(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function St(e,t){if(t.line<e.first)return Je(e.first,0);var A=e.first+e.size-1;return t.line>A?Je(A,ut(e,A).text.length):gr(t,ut(e,t.line).text.length)}function gr(e,t){var A=e.ch;return A==null||A>t?Je(e.line,t):A<0?Je(e.line,0):e}function Xe(e,t){for(var A=[],O=0;O<t.length;O++)A[O]=St(e,t[O]);return A}var Yt=function(e,t){this.state=e,this.lookAhead=t},wt=function(e,t,A,O){this.state=t,this.doc=e,this.line=A,this.maxLookAhead=O||0,this.baseTokens=null,this.baseTokenPos=1};wt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},wt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},wt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},wt.fromSaved=function(e,t,A){return t instanceof Yt?new wt(e,Mt(e.mode,t.state),A,t.lookAhead):new wt(e,Mt(e.mode,t),A)},wt.prototype.save=function(e){var t=e!==!1?Mt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Yt(t,this.maxLookAhead):t};function br(e,t,A,O){var M=[e.state.modeGen],V={};Ir(e,t.text,e.doc.mode,A,function(ve,Se){return M.push(ve,Se)},V,O);for(var ae=A.state,de=function(ve){A.baseTokens=M;var Se=e.state.overlays[ve],De=1,Ue=0;A.state=!0,Ir(e,t.text,Se.mode,A,function(Me,ze){for(var $e=De;Ue<Me;){var nt=M[De];nt>Me&&M.splice(De,1,Me,M[De+1],nt),De+=2,Ue=Math.min(Me,nt)}if(!ze)return;if(Se.opaque)M.splice($e,De-$e,Me,"overlay "+ze),De=$e+2;else for(;$e<De;$e+=2){var st=M[$e+1];M[$e+1]=(st?st+" ":"")+"overlay "+ze}},V),A.state=ae,A.baseTokens=null,A.baseTokenPos=1},fe=0;fe<e.state.overlays.length;++fe)de(fe);return{styles:M,classes:V.bgClass||V.textClass?V:null}}function vr(e,t,A){if(!t.styles||t.styles[0]!=e.state.modeGen){var O=xr(e,It(t)),M=t.text.length>e.options.maxHighlightLength&&Mt(e.doc.mode,O.state),V=br(e,t,O);M&&(O.state=M),t.stateAfter=O.save(!M),t.styles=V.styles,V.classes?t.styleClasses=V.classes:t.styleClasses&&(t.styleClasses=null),A===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function xr(e,t,A){var O=e.doc,M=e.display;if(!O.mode.startState)return new wt(O,!0,t);var V=On(e,t,A),ae=V>O.first&&ut(O,V-1).stateAfter,de=ae?wt.fromSaved(O,ae,V):new wt(O,Ct(O.mode),V);return O.iter(V,t,function(fe){on(e,fe.text,de);var ve=de.line;fe.stateAfter=ve==t-1||ve%5==0||ve>=M.viewFrom&&ve<M.viewTo?de.save():null,de.nextLine()}),A&&(O.modeFrontier=de.line),de}function on(e,t,A,O){var M=e.doc.mode,V=new kt(t,e.options.tabSize,A);for(V.start=V.pos=O||0,t==""&&Ar(M,A.state);!V.eol();)or(M,V,A.state),V.start=V.pos}function Ar(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var A=Bt(e,t);if(A.mode.blankLine)return A.mode.blankLine(A.state)}function or(e,t,A,O){for(var M=0;M<10;M++){O&&(O[0]=Bt(e,A).mode);var V=e.token(t,A);if(t.pos>t.start)return V}throw new Error("Mode "+e.name+" failed to advance stream.")}var $r=function(e,t,A){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=A};function ar(e,t,A,O){var M=e.doc,V=M.mode,ae;t=St(M,t);var de=ut(M,t.line),fe=xr(e,t.line,A),ve=new kt(de.text,e.options.tabSize,fe),Se;for(O&&(Se=[]);(O||ve.pos<t.ch)&&!ve.eol();)ve.start=ve.pos,ae=or(V,ve,fe.state),O&&Se.push(new $r(ve,ae,Mt(M.mode,fe.state)));return O?Se:new $r(ve,ae,fe.state)}function sn(e,t){if(e)for(;;){var A=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!A)break;e=e.slice(0,A.index)+e.slice(A.index+A[0].length);var O=A[1]?"bgClass":"textClass";t[O]==null?t[O]=A[2]:new RegExp("(?:^|\\s)"+A[2]+"(?:$|\\s)").test(t[O])||(t[O]+=" "+A[2])}return e}function Ir(e,t,A,O,M,V,ae){var de=A.flattenSpans;de==null&&(de=e.options.flattenSpans);var fe=0,ve=null,Se=new kt(t,e.options.tabSize,O),De,Ue=e.options.addModeClass&&[null];for(t==""&&sn(Ar(A,O.state),V);!Se.eol();){if(Se.pos>e.options.maxHighlightLength?(de=!1,ae&&on(e,t,O,Se.pos),Se.pos=t.length,De=null):De=sn(or(A,Se,O.state,Ue),V),Ue){var Me=Ue[0].name;Me&&(De="m-"+(De?Me+" "+De:Me))}if(!de||ve!=De){for(;fe<Se.start;)fe=Math.min(Se.start,fe+5e3),M(fe,ve);ve=De}Se.start=Se.pos}for(;fe<Se.pos;){var ze=Math.min(Se.pos,fe+5e3);M(ze,ve),fe=ze}}function On(e,t,A){for(var O,M,V=e.doc,ae=A?-1:t-(e.doc.mode.innerMode?1e3:100),de=t;de>ae;--de){if(de<=V.first)return V.first;var fe=ut(V,de-1),ve=fe.stateAfter;if(ve&&(!A||de+(ve instanceof Yt?ve.lookAhead:0)<=V.modeFrontier))return de;var Se=H(fe.text,null,e.options.tabSize);(M==null||O>Se)&&(M=de-1,O=Se)}return M}function aa(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var A=e.first,O=t-1;O>A;O--){var M=ut(e,O).stateAfter;if(M&&(!(M instanceof Yt)||O+M.lookAhead<t)){A=O+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,A)}var An=!1,fr=!1;function ln(){An=!0}function ia(){fr=!0}function un(e,t,A){this.marker=e,this.from=t,this.to=A}function Qt(e,t){if(e)for(var A=0;A<e.length;++A){var O=e[A];if(O.marker==t)return O}}function Ht(e,t){for(var A,O=0;O<e.length;++O)e[O]!=t&&(A||(A=[])).push(e[O]);return A}function sr(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Er(e,t,A){var O;if(e)for(var M=0;M<e.length;++M){var V=e[M],ae=V.marker,de=V.from==null||(ae.inclusiveLeft?V.from<=t:V.from<t);if(de||V.from==t&&ae.type=="bookmark"&&(!A||!V.marker.insertLeft)){var fe=V.to==null||(ae.inclusiveRight?V.to>=t:V.to>t);(O||(O=[])).push(new un(ae,V.from,fe?null:V.to))}}return O}function yn(e,t,A){var O;if(e)for(var M=0;M<e.length;++M){var V=e[M],ae=V.marker,de=V.to==null||(ae.inclusiveRight?V.to>=t:V.to>t);if(de||V.from==t&&ae.type=="bookmark"&&(!A||V.marker.insertLeft)){var fe=V.from==null||(ae.inclusiveLeft?V.from<=t:V.from<t);(O||(O=[])).push(new un(ae,fe?null:V.from-t,V.to==null?null:V.to-t))}}return O}function Dn(e,t){if(t.full)return null;var A=Nt(e,t.from.line)&&ut(e,t.from.line).markedSpans,O=Nt(e,t.to.line)&&ut(e,t.to.line).markedSpans;if(!A&&!O)return null;var M=t.from.ch,V=t.to.ch,ae=yt(t.from,t.to)==0,de=Er(A,M,ae),fe=yn(O,V,ae),ve=t.text.length==1,Se=Q(t.text).length+(ve?M:0);if(de)for(var De=0;De<de.length;++De){var Ue=de[De];if(Ue.to==null){var Me=Qt(fe,Ue.marker);Me?ve&&(Ue.to=Me.to==null?null:Me.to+Se):Ue.to=M}}if(fe)for(var ze=0;ze<fe.length;++ze){var $e=fe[ze];if($e.to!=null&&($e.to+=Se),$e.from==null){var nt=Qt(de,$e.marker);nt||($e.from=Se,ve&&(de||(de=[])).push($e))}else $e.from+=Se,ve&&(de||(de=[])).push($e)}de&&(de=wa(de)),fe&&fe!=de&&(fe=wa(fe));var st=[de];if(!ve){var ft=t.text.length-2,lt;if(ft>0&&de)for(var mt=0;mt<de.length;++mt)de[mt].to==null&&(lt||(lt=[])).push(new un(de[mt].marker,null,null));for(var _t=0;_t<ft;++_t)st.push(lt);st.push(fe)}return st}function wa(e){for(var t=0;t<e.length;++t){var A=e[t];A.from!=null&&A.from==A.to&&A.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function cn(e,t,A){var O=null;if(e.iter(t.line,A.line+1,function(Me){if(Me.markedSpans)for(var ze=0;ze<Me.markedSpans.length;++ze){var $e=Me.markedSpans[ze].marker;$e.readOnly&&(!O||ie(O,$e)==-1)&&(O||(O=[])).push($e)}}),!O)return null;for(var M=[{from:t,to:A}],V=0;V<O.length;++V)for(var ae=O[V],de=ae.find(0),fe=0;fe<M.length;++fe){var ve=M[fe];if(yt(ve.to,de.from)<0||yt(ve.from,de.to)>0)continue;var Se=[fe,1],De=yt(ve.from,de.from),Ue=yt(ve.to,de.to);(De<0||!ae.inclusiveLeft&&!De)&&Se.push({from:ve.from,to:de.from}),(Ue>0||!ae.inclusiveRight&&!Ue)&&Se.push({from:de.to,to:ve.to}),M.splice.apply(M,Se),fe+=Se.length-3}return M}function Xa(e){var t=e.markedSpans;if(!t)return;for(var A=0;A<t.length;++A)t[A].marker.detachLine(e);e.markedSpans=null}function Nn(e,t){if(!t)return;for(var A=0;A<t.length;++A)t[A].marker.attachLine(e);e.markedSpans=t}function Rn(e){return e.inclusiveLeft?-1:0}function dn(e){return e.inclusiveRight?1:0}function Ln(e,t){var A=e.lines.length-t.lines.length;if(A!=0)return A;var O=e.find(),M=t.find(),V=yt(O.from,M.from)||Rn(e)-Rn(t);if(V)return-V;var ae=yt(O.to,M.to)||dn(e)-dn(t);return ae||t.id-e.id}function bn(e,t){var A=fr&&e.markedSpans,O;if(A)for(var M=void 0,V=0;V<A.length;++V)M=A[V],M.marker.collapsed&&(t?M.from:M.to)==null&&(!O||Ln(O,M.marker)<0)&&(O=M.marker);return O}function xn(e){return bn(e,!0)}function Jr(e){return bn(e,!1)}function Kn(e,t){var A=fr&&e.markedSpans,O;if(A)for(var M=0;M<A.length;++M){var V=A[M];V.marker.collapsed&&(V.from==null||V.from<t)&&(V.to==null||V.to>t)&&(!O||Ln(O,V.marker)<0)&&(O=V.marker)}return O}function Ta(e,t,A,O,M){var V=ut(e,t),ae=fr&&V.markedSpans;if(ae)for(var de=0;de<ae.length;++de){var fe=ae[de];if(!fe.marker.collapsed)continue;var ve=fe.marker.find(0),Se=yt(ve.from,A)||Rn(fe.marker)-Rn(M),De=yt(ve.to,O)||dn(fe.marker)-dn(M);if(Se>=0&&De<=0||Se<=0&&De>=0)continue;if(Se<=0&&(fe.marker.inclusiveRight&&M.inclusiveLeft?yt(ve.to,A)>=0:yt(ve.to,A)>0)||Se>=0&&(fe.marker.inclusiveRight&&M.inclusiveLeft?yt(ve.from,O)<=0:yt(ve.from,O)<0))return!0}}function Dr(e){for(var t;t=xn(e);)e=t.find(-1,!0).line;return e}function Gn(e){for(var t;t=Jr(e);)e=t.find(1,!0).line;return e}function kn(e){for(var t,A;t=Jr(e);)e=t.find(1,!0).line,(A||(A=[])).push(e);return A}function oa(e,t){var A=ut(e,t),O=Dr(A);return A==O?t:It(O)}function Pn(e,t){if(t>e.lastLine())return t;var A=ut(e,t),O;if(!fn(e,A))return t;for(;O=Jr(A);)A=O.find(1,!0).line;return It(A)+1}function fn(e,t){var A=fr&&t.markedSpans;if(A)for(var O=void 0,M=0;M<A.length;++M){if(O=A[M],!O.marker.collapsed)continue;if(O.from==null)return!0;if(O.marker.widgetNode)continue;if(O.from==0&&O.marker.inclusiveLeft&&sa(e,t,O))return!0}}function sa(e,t,A){if(A.to==null){var O=A.marker.find(1,!0);return sa(e,O.line,Qt(O.line.markedSpans,A.marker))}if(A.marker.inclusiveRight&&A.to==t.text.length)return!0;for(var M=void 0,V=0;V<t.markedSpans.length;++V)if(M=t.markedSpans[V],M.marker.collapsed&&!M.marker.widgetNode&&M.from==A.to&&(M.to==null||M.to!=A.from)&&(M.marker.inclusiveLeft||A.marker.inclusiveRight)&&sa(e,t,M))return!0}function Zr(e){e=Dr(e);for(var t=0,A=e.parent,O=0;O<A.lines.length;++O){var M=A.lines[O];if(M==e)break;t+=M.height}for(var V=A.parent;V;A=V,V=A.parent)for(var ae=0;ae<V.children.length;++ae){var de=V.children[ae];if(de==A)break;t+=de.height}return t}function la(e){if(e.height==0)return 0;for(var t=e.text.length,A,O=e;A=xn(O);){var M=A.find(0,!0);O=M.from.line,t+=M.from.ch-M.to.ch}for(O=e;A=Jr(O);){var V=A.find(0,!0);t-=O.text.length-V.from.ch,O=V.to.line,t+=O.text.length-V.to.ch}return t}function Sa(e){var t=e.display,A=e.doc;t.maxLine=ut(A,A.first),t.maxLineLength=la(t.maxLine),t.maxLineChanged=!0,A.iter(function(O){var M=la(O);M>t.maxLineLength&&(t.maxLineLength=M,t.maxLine=O)})}var Fn=function(e,t,A){this.text=e,Nn(this,t),this.height=A?A(this):1};Fn.prototype.lineNo=function(){return It(this)},Ae(Fn);function Va(e,t,A,O){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Xa(e),Nn(e,A);var M=O?O(e):1;M!=e.height&&Vt(e,M)}function vt(e){e.parent=null,Xa(e)}var At={},Et={};function jt(e,t){if(!e||/^\s*$/.test(e))return null;var A=t.addModeClass?Et:At;return A[e]||(A[e]=e.replace(/\S+/g,"cm-$&"))}function rt(e,t){var A=F("span",null,null,o?"padding-right: .1px":null),O={pre:F("pre",[A],"CodeMirror-line"),content:A,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var M=0;M<=(t.rest?t.rest.length:0);M++){var V=M?t.rest[M-1]:t.line,ae=void 0;O.pos=0,O.addToken=tt,pt(e.display.measure)&&(ae=Fe(V,e.doc.direction))&&(O.addToken=bt(O.addToken,ae)),O.map=[];var de=t!=e.display.externalMeasured&&It(V);Dt(V,O,vr(e,V,de)),V.styleClasses&&(V.styleClasses.bgClass&&(O.bgClass=W(V.styleClasses.bgClass,O.bgClass||"")),V.styleClasses.textClass&&(O.textClass=W(V.styleClasses.textClass,O.textClass||""))),O.map.length==0&&O.map.push(0,0,O.content.appendChild(et(e.display.measure))),M==0?(t.measure.map=O.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(O.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(o){var fe=O.content.lastChild;(/\bcm-tab\b/.test(fe.className)||fe.querySelector&&fe.querySelector(".cm-tab"))&&(O.content.className="cm-tab-wrap-hack")}return Ie(e,"renderLine",e,t.line,O.pre),O.pre.className&&(O.textClass=W(O.pre.className,O.textClass||"")),O}function Ze(e){var t=C("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function tt(e,t,A,O,M,V,ae){if(!t)return;var de=e.splitSpaces?dt(t,e.trailingSpace):t,fe=e.cm.state.specialChars,ve=!1,Se;if(!fe.test(t))e.col+=t.length,Se=document.createTextNode(de),e.map.push(e.pos,e.pos+t.length,Se),S&&p<9&&(ve=!0),e.pos+=t.length;else{Se=document.createDocumentFragment();for(var De=0;;){fe.lastIndex=De;var Ue=fe.exec(t),Me=Ue?Ue.index-De:t.length-De;if(Me){var ze=document.createTextNode(de.slice(De,De+Me));S&&p<9?Se.appendChild(C("span",[ze])):Se.appendChild(ze),e.map.push(e.pos,e.pos+Me,ze),e.col+=Me,e.pos+=Me}if(!Ue)break;De+=Me+1;var $e=void 0;if(Ue[0]==" "){var nt=e.cm.options.tabSize,st=nt-e.col%nt;$e=Se.appendChild(C("span",oe(st),"cm-tab")),$e.setAttribute("role","presentation"),$e.setAttribute("cm-text"," "),e.col+=st}else Ue[0]=="\r"||Ue[0]==`
|
|
|
`?($e=Se.appendChild(C("span",Ue[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),$e.setAttribute("cm-text",Ue[0]),e.col+=1):($e=e.cm.options.specialCharPlaceholder(Ue[0]),$e.setAttribute("cm-text",Ue[0]),S&&p<9?Se.appendChild(C("span",[$e])):Se.appendChild($e),e.col+=1);e.map.push(e.pos,e.pos+1,$e),e.pos++}}if(e.trailingSpace=de.charCodeAt(t.length-1)==32,A||O||M||ve||V||ae){var ft=A||"";O&&(ft+=O),M&&(ft+=M);var lt=C("span",[Se],ft,V);if(ae)for(var mt in ae)ae.hasOwnProperty(mt)&&mt!="style"&&mt!="class"&<.setAttribute(mt,ae[mt]);return e.content.appendChild(lt)}e.content.appendChild(Se)}function dt(e,t){if(e.length>1&&!/ /.test(e))return e;for(var A=t,O="",M=0;M<e.length;M++){var V=e.charAt(M);V==" "&&A&&(M==e.length-1||e.charCodeAt(M+1)==32)&&(V="\xA0"),O+=V,A=V==" "}return O}function bt(e,t){return function(A,O,M,V,ae,de,fe){M=M?M+" cm-force-border":"cm-force-border";for(var ve=A.pos,Se=ve+O.length;;){for(var De=void 0,Ue=0;Ue<t.length&&!(De=t[Ue],De.to>ve&&De.from<=ve);Ue++);if(De.to>=Se)return e(A,O,M,V,ae,de,fe);e(A,O.slice(0,De.to-ve),M,V,null,de,fe),V=null,O=O.slice(De.to-ve),ve=De.to}}}function Qe(e,t,A,O){var M=!O&&A.widgetNode;M&&e.map.push(e.pos,e.pos+t,M),!O&&e.cm.display.input.needsContentAttribute&&(M||(M=e.content.appendChild(document.createElement("span"))),M.setAttribute("cm-marker",A.id)),M&&(e.cm.display.input.setUneditable(M),e.content.appendChild(M)),e.pos+=t,e.trailingSpace=!1}function Dt(e,t,A){var O=e.markedSpans,M=e.text,V=0;if(!O){for(var ae=1;ae<A.length;ae+=2)t.addToken(t,M.slice(V,V=A[ae]),jt(A[ae+1],t.cm.options));return}for(var de=M.length,fe=0,ve=1,Se="",De,Ue,Me=0,ze,$e,nt,st,ft;;){if(Me==fe){ze=$e=nt=Ue="",ft=null,st=null,Me=Infinity;for(var lt=[],mt=void 0,_t=0;_t<O.length;++_t){var xt=O[_t],Ut=xt.marker;if(Ut.type=="bookmark"&&xt.from==fe&&Ut.widgetNode)lt.push(Ut);else if(xt.from<=fe&&(xt.to==null||xt.to>fe||Ut.collapsed&&xt.to==fe&&xt.from==fe)){if(xt.to!=null&&xt.to!=fe&&Me>xt.to&&(Me=xt.to,$e=""),Ut.className&&(ze+=" "+Ut.className),Ut.css&&(Ue=(Ue?Ue+";":"")+Ut.css),Ut.startStyle&&xt.from==fe&&(nt+=" "+Ut.startStyle),Ut.endStyle&&xt.to==Me&&(mt||(mt=[])).push(Ut.endStyle,xt.to),Ut.title&&((ft||(ft={})).title=Ut.title),Ut.attributes)for(var Zt in Ut.attributes)(ft||(ft={}))[Zt]=Ut.attributes[Zt];Ut.collapsed&&(!st||Ln(st.marker,Ut)<0)&&(st=xt)}else xt.from>fe&&Me>xt.from&&(Me=xt.from)}if(mt)for(var Sr=0;Sr<mt.length;Sr+=2)mt[Sr+1]==Me&&($e+=" "+mt[Sr]);if(!st||st.from==fe)for(var nr=0;nr<lt.length;++nr)Qe(t,0,lt[nr]);if(st&&(st.from||0)==fe){if(Qe(t,(st.to==null?de+1:st.to)-fe,st.marker,st.from==null),st.to==null)return;st.to==fe&&(st=!1)}}if(fe>=de)break;for(var Vr=Math.min(de,Me);;){if(Se){var Wr=fe+Se.length;if(!st){var hr=Wr>Vr?Se.slice(0,Vr-fe):Se;t.addToken(t,hr,De?De+ze:ze,nt,fe+hr.length==Me?$e:"",Ue,ft)}if(Wr>=Vr){Se=Se.slice(Vr-fe),fe=Vr;break}fe=Wr,nt=""}Se=M.slice(V,V=A[ve++]),De=jt(A[ve++],t.cm.options)}}}function ot(e,t,A){this.line=t,this.rest=kn(t),this.size=this.rest?It(Q(this.rest))-A+1:1,this.node=this.text=null,this.hidden=fn(e,t)}function Kt(e,t,A){for(var O=[],M,V=t;V<A;V=M){var ae=new ot(e.doc,ut(e.doc,V),V);M=V+ae.size,O.push(ae)}return O}var Xt=null;function rr(e){Xt?Xt.ops.push(e):e.ownsGroup=Xt={ops:[e],delayedCallbacks:[]}}function lr(e){var t=e.delayedCallbacks,A=0;do{for(;A<t.length;A++)t[A].call(null);for(var O=0;O<e.ops.length;O++){var M=e.ops[O];if(M.cursorActivityHandlers)for(;M.cursorActivityCalled<M.cursorActivityHandlers.length;)M.cursorActivityHandlers[M.cursorActivityCalled++].call(null,M.cm)}}while(A<t.length)}function Gr(e,t){var A=e.ownsGroup;if(!A)return;try{lr(A)}finally{Xt=null,t(A)}}var ur=null;function Gt(e,t){var A=Ge(e,t);if(!A.length)return;var O=Array.prototype.slice.call(arguments,2),M;Xt?M=Xt.delayedCallbacks:ur?M=ur:(M=ur=[],setTimeout(ua,0));for(var V=function(de){M.push(function(){return A[de].apply(null,O)})},ae=0;ae<A.length;++ae)V(ae)}function ua(){var e=ur;ur=null;for(var t=0;t<e.length;++t)e[t]()}function En(e,t,A,O){for(var M=0;M<t.changes.length;M++){var V=t.changes[M];V=="text"?ca(e,t):V=="gutter"?pn(e,t,A,O):V=="class"?hn(e,t):V=="widget"&&Xn(e,t,O)}t.changes=null}function Qr(e){return e.node==e.text&&(e.node=C("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),S&&p<8&&(e.node.style.zIndex=2)),e.node}function zn(e,t){var A=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(A&&(A+=" CodeMirror-linebackground"),t.background)A?t.background.className=A:(t.background.parentNode.removeChild(t.background),t.background=null);else if(A){var O=Qr(t);t.background=O.insertBefore(C("div",null,A),O.firstChild),e.display.input.setUneditable(t.background)}}function jn(e,t){var A=e.display.externalMeasured;return A&&A.line==t.line?(e.display.externalMeasured=null,t.measure=A.measure,A.built):rt(e,t)}function ca(e,t){var A=t.text.className,O=jn(e,t);t.text==t.node&&(t.node=O.pre),t.text.parentNode.replaceChild(O.pre,t.text),t.text=O.pre,O.bgClass!=t.bgClass||O.textClass!=t.textClass?(t.bgClass=O.bgClass,t.textClass=O.textClass,hn(e,t)):A&&(t.text.className=A)}function hn(e,t){zn(e,t),t.line.wrapClass?Qr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var A=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=A||""}function pn(e,t,A,O){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var M=Qr(t);t.gutterBackground=C("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?O.fixedPos:-O.gutterTotalWidth)+"px; width: "+O.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),M.insertBefore(t.gutterBackground,t.text)}var V=t.line.gutterMarkers;if(e.options.lineNumbers||V){var ae=Qr(t),de=t.gutter=C("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?O.fixedPos:-O.gutterTotalWidth)+"px");if(e.display.input.setUneditable(de),ae.insertBefore(de,t.text),t.line.gutterClass&&(de.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!V||!V["CodeMirror-linenumbers"])&&(t.lineNumber=de.appendChild(C("div",Yr(e.options,A),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+O.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),V)for(var fe=0;fe<e.display.gutterSpecs.length;++fe){var ve=e.display.gutterSpecs[fe].className,Se=V.hasOwnProperty(ve)&&V[ve];Se&&de.appendChild(C("div",[Se],"CodeMirror-gutter-elt","left: "+O.gutterLeft[ve]+"px; width: "+O.gutterWidth[ve]+"px"))}}}function Xn(e,t,A){t.alignable&&(t.alignable=null);for(var O=D("CodeMirror-linewidget"),M=t.node.firstChild,V=void 0;M;M=V)V=M.nextSibling,O.test(M.className)&&t.node.removeChild(M);Vn(e,t,A)}function In(e,t,A,O){var M=jn(e,t);return t.text=t.node=M.pre,M.bgClass&&(t.bgClass=M.bgClass),M.textClass&&(t.textClass=M.textClass),hn(e,t),pn(e,t,A,O),Vn(e,t,O),t.node}function Vn(e,t,A){if(Un(e,t.line,t,A,!0),t.rest)for(var O=0;O<t.rest.length;O++)Un(e,t.rest[O],t,A,!1)}function Un(e,t,A,O,M){if(!t.widgets)return;for(var V=Qr(A),ae=0,de=t.widgets;ae<de.length;++ae){var fe=de[ae],ve=C("div",[fe.node],"CodeMirror-linewidget"+(fe.className?" "+fe.className:""));fe.handleMouseEvents||ve.setAttribute("cm-ignore-events","true"),Ya(fe,ve,A,O),e.display.input.setUneditable(ve),M&&fe.above?V.insertBefore(ve,A.gutter||A.text):V.appendChild(ve),Gt(fe,"redraw")}}function Ya(e,t,A,O){if(e.noHScroll){(A.alignable||(A.alignable=[])).push(t);var M=O.wrapperWidth;t.style.left=O.fixedPos+"px",e.coverGutter||(M-=O.gutterTotalWidth,t.style.paddingLeft=O.gutterTotalWidth+"px"),t.style.width=M+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-O.gutterTotalWidth+"px"))}function Lt(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!k(document.body,e.node)){var A="position: relative;";e.coverGutter&&(A+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(A+="width: "+t.display.wrapper.clientWidth+"px;"),x(t.display.measure,C("div",[e.node],null,A))}return e.height=e.node.parentNode.offsetHeight}function $t(e,t){for(var A=Ce(t);A!=e.wrapper;A=A.parentNode)if(!A||A.nodeType==1&&A.getAttribute("cm-ignore-events")=="true"||A.parentNode==e.sizer&&A!=e.mover)return!0}function Bn(e){return e.lineSpace.offsetTop}function da(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function mn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=x(e.measure,C("pre","x","CodeMirror-line-like")),A=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,O={left:parseInt(A.paddingLeft),right:parseInt(A.paddingRight)};return!isNaN(O.left)&&!isNaN(O.right)&&(e.cachedPaddingH=O),O}function qr(e){return ce-e.display.nativeBarWidth}function wn(e){return e.display.scroller.clientWidth-qr(e)-e.display.barWidth}function fa(e){return e.display.scroller.clientHeight-qr(e)-e.display.barHeight}function $a(e,t,A){var O=e.options.lineWrapping,M=O&&wn(e);if(!t.measure.heights||O&&t.measure.width!=M){var V=t.measure.heights=[];if(O){t.measure.width=M;for(var ae=t.text.firstChild.getClientRects(),de=0;de<ae.length-1;de++){var fe=ae[de],ve=ae[de+1];Math.abs(fe.bottom-ve.bottom)>2&&V.push((fe.bottom+ve.top)/2-A.top)}}V.push(A.bottom-A.top)}}function _a(e,t,A){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var O=0;O<e.rest.length;O++)if(e.rest[O]==t)return{map:e.measure.maps[O],cache:e.measure.caches[O]};for(var M=0;M<e.rest.length;M++)if(It(e.rest[M])>A)return{map:e.measure.maps[M],cache:e.measure.caches[M],before:!0}}function Ja(e,t){t=Dr(t);var A=It(t),O=e.display.externalMeasured=new ot(e.doc,t,A);O.lineN=A;var M=O.built=rt(e,O);return O.text=M.pre,x(e.display.lineMeasure,M.pre),O}function Za(e,t,A,O){return zr(e,en(e,t),A,O)}function Ca(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ma(e,t)];var A=e.display.externalMeasured;if(A&&t>=A.lineN&&t<A.lineN+A.size)return A}function en(e,t){var A=It(t),O=Ca(e,A);O&&!O.text?O=null:O&&O.changes&&(En(e,O,A,Vi(e)),e.curOp.forceUpdate=!0),O||(O=Ja(e,t));var M=_a(O,t,A);return{line:t,view:O,rect:null,map:M.map,cache:M.cache,before:M.before,hasHeights:!1}}function zr(e,t,A,O,M){t.before&&(A=-1);var V=A+(O||""),ae;return t.cache.hasOwnProperty(V)?ae=t.cache[V]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||($a(e,t.view,t.rect),t.hasHeights=!0),ae=xi(e,t,A,O),ae.bogus||(t.cache[V]=ae)),{left:ae.left,right:ae.right,top:M?ae.rtop:ae.top,bottom:M?ae.rbottom:ae.bottom}}var Qa={left:0,right:0,top:0,bottom:0};function Yn(e,t,A){for(var O,M,V,ae,de,fe,ve=0;ve<e.length;ve+=3)if(de=e[ve],fe=e[ve+1],t<de?(M=0,V=1,ae="left"):t<fe?(M=t-de,V=M+1):(ve==e.length-3||t==fe&&e[ve+3]>t)&&(V=fe-de,M=V-1,t>=fe&&(ae="right")),M!=null){if(O=e[ve+2],de==fe&&A==(O.insertLeft?"left":"right")&&(ae=A),A=="left"&&M==0)for(;ve&&e[ve-2]==e[ve-3]&&e[ve-1].insertLeft;)O=e[(ve-=3)+2],ae="left";if(A=="right"&&M==fe-de)for(;ve<e.length-3&&e[ve+3]==e[ve+4]&&!e[ve+5].insertLeft;)O=e[(ve+=3)+2],ae="right";break}return{node:O,start:M,end:V,collapse:ae,coverStart:de,coverEnd:fe}}function Tn(e,t){var A=Qa;if(t=="left")for(var O=0;O<e.length&&!((A=e[O]).left!=A.right);O++);else for(var M=e.length-1;M>=0&&!((A=e[M]).left!=A.right);M--);return A}function xi(e,t,A,O){var M=Yn(t.map,A,O),V=M.node,ae=M.start,de=M.end,fe=M.collapse,ve;if(V.nodeType==3){for(var Se=0;Se<4;Se++){for(;ae&&pe(t.line.text.charAt(M.coverStart+ae));)--ae;for(;M.coverStart+de<M.coverEnd&&pe(t.line.text.charAt(M.coverStart+de));)++de;if(S&&p<9&&ae==0&&de==M.coverEnd-M.coverStart?ve=V.parentNode.getBoundingClientRect():ve=Tn(j(V,ae,de).getClientRects(),O),ve.left||ve.right||ae==0)break;de=ae,ae=ae-1,fe="right"}S&&p<11&&(ve=Ei(e.display.measure,ve))}else{ae>0&&(fe=O="right");var De;e.options.lineWrapping&&(De=V.getClientRects()).length>1?ve=De[O=="right"?De.length-1:0]:ve=V.getBoundingClientRect()}if(S&&p<9&&!ae&&(!ve||!ve.left&&!ve.right)){var Ue=V.parentNode.getClientRects()[0];Ue?ve={left:Ue.left,right:Ue.left+La(e.display),top:Ue.top,bottom:Ue.bottom}:ve=Qa}for(var Me=ve.top-t.rect.top,ze=ve.bottom-t.rect.top,$e=(Me+ze)/2,nt=t.view.measure.heights,st=0;st<nt.length-1&&!($e<nt[st]);st++);var ft=st?nt[st-1]:0,lt=nt[st],mt={left:(fe=="right"?ve.right:ve.left)-t.rect.left,right:(fe=="left"?ve.left:ve.right)-t.rect.left,top:ft,bottom:lt};return!ve.left&&!ve.right&&(mt.bogus=!0),e.options.singleCursorHeightPerLine||(mt.rtop=Me,mt.rbottom=ze),mt}function Ei(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Pt(e))return t;var A=screen.logicalXDPI/screen.deviceXDPI,O=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*A,right:t.right*A,top:t.top*O,bottom:t.bottom*O}}function Oa(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function gn(e){e.display.externalMeasure=null,b(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Oa(e.display.view[t])}function $n(e){gn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Aa(){return r&&l?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Da(){return r&&l?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function wi(e){var t=0;if(e.widgets)for(var A=0;A<e.widgets.length;++A)e.widgets[A].above&&(t+=Lt(e.widgets[A]));return t}function Rr(e,t,A,O,M){if(!M){var V=wi(t);A.top+=V,A.bottom+=V}if(O=="line")return A;O||(O="local");var ae=Zr(t);if(O=="local"?ae+=Bn(e.display):ae-=e.display.viewOffset,O=="page"||O=="window"){var de=e.display.lineSpace.getBoundingClientRect();ae+=de.top+(O=="window"?0:Da());var fe=de.left+(O=="window"?0:Aa());A.left+=fe,A.right+=fe}return A.top+=ae,A.bottom+=ae,A}function tn(e,t,A){if(A=="div")return t;var O=t.left,M=t.top;if(A=="page")O-=Aa(),M-=Da();else if(A=="local"||!A){var V=e.display.sizer.getBoundingClientRect();O+=V.left,M+=V.top}var ae=e.display.lineSpace.getBoundingClientRect();return{left:O-ae.left,top:M-ae.top}}function Ki(e,t,A,O,M){return O||(O=ut(e.doc,t.line)),Rr(e,O,Za(e,O,t.ch,M),A)}function Sn(e,t,A,O,M,V){O=O||ut(e.doc,t.line),M||(M=en(e,O));function ae(ze,$e){var nt=zr(e,M,ze,$e?"right":"left",V);return $e?nt.left=nt.right:nt.right=nt.left,Rr(e,O,nt,A)}var de=Fe(O,e.doc.direction),fe=t.ch,ve=t.sticky;if(fe>=O.text.length?(fe=O.text.length,ve="before"):fe<=0&&(fe=0,ve="after"),!de)return ae(ve=="before"?fe-1:fe,ve=="before");function Se(ze,$e,nt){var st=de[$e],ft=st.level==1;return ae(nt?ze-1:ze,ft!=nt)}var De=Pe(de,fe,ve),Ue=Ne,Me=Se(fe,De,ve=="before");return Ue!=null&&(Me.other=Se(fe,Ue,ve!="before")),Me}function To(e,t){var A=0;t=St(e.doc,t),e.options.lineWrapping||(A=La(e.display)*t.ch);var O=ut(e.doc,t.line),M=Zr(O)+Bn(e.display);return{left:A,right:A,top:M,bottom:M+O.height}}function Gi(e,t,A,O,M){var V=Je(e,t,A);return V.xRel=M,O&&(V.outside=O),V}function zi(e,t,A){var O=e.doc;if(A+=e.display.viewOffset,A<0)return Gi(O.first,0,null,-1,-1);var M=tr(O,A),V=O.first+O.size-1;if(M>V)return Gi(O.first+O.size-1,ut(O,V).text.length,null,1,1);t<0&&(t=0);for(var ae=ut(O,M);;){var de=Ks(e,ae,M,t,A),fe=Kn(ae,de.ch+(de.xRel>0||de.outside>0?1:0));if(!fe)return de;var ve=fe.find(1);if(ve.line==M)return ve;ae=ut(O,M=ve.line)}}function So(e,t,A,O){O-=wi(t);var M=t.text.length,V=Re(function(ae){return zr(e,A,ae-1).bottom<=O},M,0);return M=Re(function(ae){return zr(e,A,ae).top>O},V,M),{begin:V,end:M}}function _o(e,t,A,O){A||(A=en(e,t));var M=Rr(e,t,zr(e,A,O),"line").top;return So(e,t,A,M)}function Xi(e,t,A,O){return e.bottom<=A?!1:e.top>A?!0:(O?e.left:e.right)>t}function Ks(e,t,A,O,M){M-=Zr(t);var V=en(e,t),ae=wi(t),de=0,fe=t.text.length,ve=!0,Se=Fe(t,e.doc.direction);if(Se){var De=(e.options.lineWrapping?zs:Gs)(e,t,A,V,Se,O,M);ve=De.level!=1,de=ve?De.from:De.to-1,fe=ve?De.to:De.from-1}var Ue=null,Me=null,ze=Re(function(_t){var xt=zr(e,V,_t);return xt.top+=ae,xt.bottom+=ae,Xi(xt,O,M,!1)?(xt.top<=M&&xt.left<=O&&(Ue=_t,Me=xt),!0):!1},de,fe),$e,nt,st=!1;if(Me){var ft=O-Me.left<Me.right-O,lt=ft==ve;ze=Ue+(lt?0:1),nt=lt?"after":"before",$e=ft?Me.left:Me.right}else{!ve&&(ze==fe||ze==de)&&ze++,nt=ze==0?"after":ze==t.text.length?"before":zr(e,V,ze-(ve?1:0)).bottom+ae<=M==ve?"after":"before";var mt=Sn(e,Je(A,ze,nt),"line",t,V);$e=mt.left,st=M<mt.top?-1:M>=mt.bottom?1:0}return ze=xe(t.text,ze,1),Gi(A,ze,nt,st,O-$e)}function Gs(e,t,A,O,M,V,ae){var de=Re(function(De){var Ue=M[De],Me=Ue.level!=1;return Xi(Sn(e,Je(A,Me?Ue.to:Ue.from,Me?"before":"after"),"line",t,O),V,ae,!0)},0,M.length-1),fe=M[de];if(de>0){var ve=fe.level!=1,Se=Sn(e,Je(A,ve?fe.from:fe.to,ve?"after":"before"),"line",t,O);Xi(Se,V,ae,!0)&&Se.top>ae&&(fe=M[de-1])}return fe}function zs(e,t,A,O,M,V,ae){var de=So(e,t,O,ae),fe=de.begin,ve=de.end;/\s/.test(t.text.charAt(ve-1))&&ve--;for(var Se=null,De=null,Ue=0;Ue<M.length;Ue++){var Me=M[Ue];if(Me.from>=ve||Me.to<=fe)continue;var ze=Me.level!=1,$e=zr(e,O,ze?Math.min(ve,Me.to)-1:Math.max(fe,Me.from)).right,nt=$e<V?V-$e+1e9:$e-V;(!Se||De>nt)&&(Se=Me,De=nt)}return Se||(Se=M[M.length-1]),Se.from<fe&&(Se={from:fe,to:Se.to,level:Se.level}),Se.to>ve&&(Se={from:Se.from,to:ve,level:Se.level}),Se}var ha;function Ra(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(ha==null){ha=C("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ha.appendChild(document.createTextNode("x")),ha.appendChild(C("br"));ha.appendChild(document.createTextNode("x"))}x(e.measure,ha);var A=ha.offsetHeight/50;return A>3&&(e.cachedTextHeight=A),b(e.measure),A||1}function La(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=C("span","xxxxxxxxxx"),A=C("pre",[t],"CodeMirror-line-like");x(e.measure,A);var O=t.getBoundingClientRect(),M=(O.right-O.left)/10;return M>2&&(e.cachedCharWidth=M),M||10}function Vi(e){for(var t=e.display,A={},O={},M=t.gutters.clientLeft,V=t.gutters.firstChild,ae=0;V;V=V.nextSibling,++ae){var de=e.display.gutterSpecs[ae].className;A[de]=V.offsetLeft+V.clientLeft+M,O[de]=V.clientWidth}return{fixedPos:Yi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:A,gutterWidth:O,wrapperWidth:t.wrapper.clientWidth}}function Yi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Co(e){var t=Ra(e.display),A=e.options.lineWrapping,O=A&&Math.max(5,e.display.scroller.clientWidth/La(e.display)-3);return function(M){if(fn(e.doc,M))return 0;var V=0;if(M.widgets)for(var ae=0;ae<M.widgets.length;ae++)M.widgets[ae].height&&(V+=M.widgets[ae].height);return A?V+(Math.ceil(M.text.length/O)||1)*t:V+t}}function $i(e){var t=e.doc,A=Co(e);t.iter(function(O){var M=A(O);M!=O.height&&Vt(O,M)})}function pa(e,t,A,O){var M=e.display;if(!A&&Ce(t).getAttribute("cm-not-content")=="true")return null;var V,ae,de=M.lineSpace.getBoundingClientRect();try{V=t.clientX-de.left,ae=t.clientY-de.top}catch(De){return null}var fe=zi(e,V,ae),ve;if(O&&fe.xRel>0&&(ve=ut(e.doc,fe.line).text).length==fe.ch){var Se=H(ve,ve.length,e.options.tabSize)-ve.length;fe=Je(fe.line,Math.max(0,Math.round((V-mn(e.display).left)/La(e.display))-Se))}return fe}function ma(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var A=e.display.view,O=0;O<A.length;O++)if(t-=A[O].size,t<0)return O}function Ur(e,t,A,O){t==null&&(t=e.doc.first),A==null&&(A=e.doc.first+e.doc.size),O||(O=0);var M=e.display;if(O&&A<M.viewTo&&(M.updateLineNumbers==null||M.updateLineNumbers>t)&&(M.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=M.viewTo)fr&&oa(e.doc,t)<M.viewTo&&Zn(e);else if(A<=M.viewFrom)fr&&Pn(e.doc,A+O)>M.viewFrom?Zn(e):(M.viewFrom+=O,M.viewTo+=O);else if(t<=M.viewFrom&&A>=M.viewTo)Zn(e);else if(t<=M.viewFrom){var V=Ti(e,A,A+O,1);V?(M.view=M.view.slice(V.index),M.viewFrom=V.lineN,M.viewTo+=O):Zn(e)}else if(A>=M.viewTo){var ae=Ti(e,t,t,-1);ae?(M.view=M.view.slice(0,ae.index),M.viewTo=ae.lineN):Zn(e)}else{var de=Ti(e,t,t,-1),fe=Ti(e,A,A+O,1);de&&fe?(M.view=M.view.slice(0,de.index).concat(Kt(e,de.lineN,fe.lineN)).concat(M.view.slice(fe.index)),M.viewTo+=O):Zn(e)}var ve=M.externalMeasured;ve&&(A<ve.lineN?ve.lineN+=O:t<ve.lineN+ve.size&&(M.externalMeasured=null))}function Jn(e,t,A){e.curOp.viewChanged=!0;var O=e.display,M=e.display.externalMeasured;if(M&&t>=M.lineN&&t<M.lineN+M.size&&(O.externalMeasured=null),t<O.viewFrom||t>=O.viewTo)return;var V=O.view[ma(e,t)];if(V.node==null)return;var ae=V.changes||(V.changes=[]);ie(ae,A)==-1&&ae.push(A)}function Zn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ti(e,t,A,O){var M=ma(e,t),V,ae=e.display.view;if(!fr||A==e.doc.first+e.doc.size)return{index:M,lineN:A};for(var de=e.display.viewFrom,fe=0;fe<M;fe++)de+=ae[fe].size;if(de!=t){if(O>0){if(M==ae.length-1)return null;V=de+ae[M].size-t,M++}else V=de-t;t+=V,A+=V}for(;oa(e.doc,A)!=A;){if(M==(O<0?0:ae.length-1))return null;A+=O*ae[M-(O<0?1:0)].size,M+=O}return{index:M,lineN:A}}function Xs(e,t,A){var O=e.display,M=O.view;M.length==0||t>=O.viewTo||A<=O.viewFrom?(O.view=Kt(e,t,A),O.viewFrom=t):(O.viewFrom>t?O.view=Kt(e,t,O.viewFrom).concat(O.view):O.viewFrom<t&&(O.view=O.view.slice(ma(e,t))),O.viewFrom=t,O.viewTo<A?O.view=O.view.concat(Kt(e,O.viewTo,A)):O.viewTo>A&&(O.view=O.view.slice(0,ma(e,A)))),O.viewTo=A}function Oo(e){for(var t=e.display.view,A=0,O=0;O<t.length;O++){var M=t[O];!M.hidden&&(!M.node||M.changes)&&++A}return A}function qa(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ao(e,t){t===void 0&&(t=!0);for(var A=e.doc,O={},M=O.cursors=document.createDocumentFragment(),V=O.selection=document.createDocumentFragment(),ae=0;ae<A.sel.ranges.length;ae++){if(!t&&ae==A.sel.primIndex)continue;var de=A.sel.ranges[ae];if(de.from().line>=e.display.viewTo||de.to().line<e.display.viewFrom)continue;var fe=de.empty();(fe||e.options.showCursorWhenSelecting)&&Do(e,de.head,M),fe||Vs(e,de,V)}return O}function Do(e,t,A){var O=Sn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),M=A.appendChild(C("div","\xA0","CodeMirror-cursor"));if(M.style.left=O.left+"px",M.style.top=O.top+"px",M.style.height=Math.max(0,O.bottom-O.top)*e.options.cursorHeight+"px",O.other){var V=A.appendChild(C("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));V.style.display="",V.style.left=O.other.left+"px",V.style.top=O.other.top+"px",V.style.height=(O.other.bottom-O.other.top)*.85+"px"}}function Si(e,t){return e.top-t.top||e.left-t.left}function Vs(e,t,A){var O=e.display,M=e.doc,V=document.createDocumentFragment(),ae=mn(e.display),de=ae.left,fe=Math.max(O.sizerWidth,wn(e)-O.sizer.offsetLeft)-ae.right,ve=M.direction=="ltr";function Se(lt,mt,_t,xt){mt<0&&(mt=0),mt=Math.round(mt),xt=Math.round(xt),V.appendChild(C("div",null,"CodeMirror-selected","position: absolute; left: "+lt+`px;
|
|
|
top: `+mt+"px; width: "+(_t==null?fe-lt:_t)+`px;
|
|
|
height: `+(xt-mt)+"px"))}function De(lt,mt,_t){var xt=ut(M,lt),Ut=xt.text.length,Zt,Sr;function nr(hr,Hr){return Ki(e,Je(lt,hr),"div",xt,Hr)}function Vr(hr,Hr,Cr){var yr=_o(e,xt,null,hr),pr=Hr=="ltr"==(Cr=="after")?"left":"right",ir=Cr=="after"?yr.begin:yr.end-(/\s/.test(xt.text.charAt(yr.end-1))?2:1);return nr(ir,pr)[pr]}var Wr=Fe(xt,M.direction);return ke(Wr,mt||0,_t==null?Ut:_t,function(hr,Hr,Cr,yr){var pr=Cr=="ltr",ir=nr(hr,pr?"left":"right"),Kr=nr(Hr-1,pr?"right":"left"),Ga=mt==null&&hr==0,na=_t==null&&Hr==Ut,kr=yr==0,Mn=!Wr||yr==Wr.length-1;if(Kr.top-ir.top<=3){var _r=(ve?Ga:na)&&kr,Eo=(ve?na:Ga)&&Mn,Hn=_r?de:(pr?ir:Kr).left,xa=Eo?fe:(pr?Kr:ir).right;Se(Hn,ir.top,xa-Hn,ir.bottom)}else{var Ea,Nr,za,wo;pr?(Ea=ve&&Ga&&kr?de:ir.left,Nr=ve?fe:Vr(hr,Cr,"before"),za=ve?de:Vr(Hr,Cr,"after"),wo=ve&&na&&Mn?fe:Kr.right):(Ea=ve?Vr(hr,Cr,"before"):de,Nr=!ve&&Ga&&kr?fe:ir.right,za=!ve&&na&&Mn?de:Kr.left,wo=ve?Vr(Hr,Cr,"after"):fe),Se(Ea,ir.top,Nr-Ea,ir.bottom),ir.bottom<Kr.top&&Se(de,ir.bottom,null,Kr.top),Se(za,Kr.top,wo-za,Kr.bottom)}(!Zt||Si(ir,Zt)<0)&&(Zt=ir),Si(Kr,Zt)<0&&(Zt=Kr),(!Sr||Si(ir,Sr)<0)&&(Sr=ir),Si(Kr,Sr)<0&&(Sr=Kr)}),{start:Zt,end:Sr}}var Ue=t.from(),Me=t.to();if(Ue.line==Me.line)De(Ue.line,Ue.ch,Me.ch);else{var ze=ut(M,Ue.line),$e=ut(M,Me.line),nt=Dr(ze)==Dr($e),st=De(Ue.line,Ue.ch,nt?ze.text.length+1:null).end,ft=De(Me.line,nt?0:null,Me.ch).start;nt&&(st.top<ft.top-2?(Se(st.right,st.top,null,st.bottom),Se(de,ft.top,ft.left,ft.bottom)):Se(st.right,st.top,ft.left-st.right,st.bottom)),st.bottom<ft.top&&Se(de,st.bottom,null,ft.top)}A.appendChild(V)}function Ji(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var A=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||ka(e),t.cursorDiv.style.visibility=(A=!A)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function Ro(e){e.state.focused||(e.display.input.focus(),Zi(e))}function Lo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ka(e))},100)}function Zi(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ie(e,"focus",e,t),e.state.focused=!0,G(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),o&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ji(e)}function ka(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ie(e,"blur",e,t),e.state.focused=!1,c(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function _i(e){for(var t=e.display,A=t.lineDiv.offsetTop,O=0;O<t.view.length;O++){var M=t.view[O],V=e.options.lineWrapping,ae=void 0,de=0;if(M.hidden)continue;if(S&&p<8){var fe=M.node.offsetTop+M.node.offsetHeight;ae=fe-A,A=fe}else{var ve=M.node.getBoundingClientRect();ae=ve.bottom-ve.top,!V&&M.text.firstChild&&(de=M.text.firstChild.getBoundingClientRect().right-ve.left-1)}var Se=M.line.height-ae;if((Se>.005||Se<-.005)&&(Vt(M.line,ae),ko(M.line),M.rest))for(var De=0;De<M.rest.length;De++)ko(M.rest[De]);if(de>e.display.sizerWidth){var Ue=Math.ceil(de/La(e.display));Ue>e.display.maxLineLength&&(e.display.maxLineLength=Ue,e.display.maxLine=M.line,e.display.maxLineChanged=!0)}}}function ko(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var A=e.widgets[t],O=A.node.parentNode;O&&(A.height=O.offsetHeight)}}function Ci(e,t,A){var O=A&&A.top!=null?Math.max(0,A.top):e.scroller.scrollTop;O=Math.floor(O-Bn(e));var M=A&&A.bottom!=null?A.bottom:O+e.wrapper.clientHeight,V=tr(t,O),ae=tr(t,M);if(A&&A.ensure){var de=A.ensure.from.line,fe=A.ensure.to.line;de<V?(V=de,ae=tr(t,Zr(ut(t,de))+e.wrapper.clientHeight)):Math.min(fe,t.lastLine())>=ae&&(V=tr(t,Zr(ut(t,fe))-e.wrapper.clientHeight),ae=fe)}return{from:V,to:Math.max(ae,V+1)}}function Ys(e,t){if(He(e,"scrollCursorIntoView"))return;var A=e.display,O=A.sizer.getBoundingClientRect(),M=null;if(t.top+O.top<0?M=!0:t.bottom+O.top>(window.innerHeight||document.documentElement.clientHeight)&&(M=!1),M!=null&&!E){var V=C("div","\u200B",null,`position: absolute;
|
|
|
top: `+(t.top-A.viewOffset-Bn(e.display))+`px;
|
|
|
height: `+(t.bottom-t.top+qr(e)+A.barHeight)+`px;
|
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(V),V.scrollIntoView(M),e.display.lineSpace.removeChild(V)}}function $s(e,t,A,O){O==null&&(O=0);var M;!e.options.lineWrapping&&t==A&&(t=t.ch?Je(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,A=t.sticky=="before"?Je(t.line,t.ch+1,"before"):t);for(var V=0;V<5;V++){var ae=!1,de=Sn(e,t),fe=!A||A==t?de:Sn(e,A);M={left:Math.min(de.left,fe.left),top:Math.min(de.top,fe.top)-O,right:Math.max(de.left,fe.left),bottom:Math.max(de.bottom,fe.bottom)+O};var ve=Qi(e,M),Se=e.doc.scrollTop,De=e.doc.scrollLeft;if(ve.scrollTop!=null&&(ti(e,ve.scrollTop),Math.abs(e.doc.scrollTop-Se)>1&&(ae=!0)),ve.scrollLeft!=null&&(ga(e,ve.scrollLeft),Math.abs(e.doc.scrollLeft-De)>1&&(ae=!0)),!ae)break}return M}function Js(e,t){var A=Qi(e,t);A.scrollTop!=null&&ti(e,A.scrollTop),A.scrollLeft!=null&&ga(e,A.scrollLeft)}function Qi(e,t){var A=e.display,O=Ra(e.display);t.top<0&&(t.top=0);var M=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:A.scroller.scrollTop,V=fa(e),ae={};t.bottom-t.top>V&&(t.bottom=t.top+V);var de=e.doc.height+da(A),fe=t.top<O,ve=t.bottom>de-O;if(t.top<M)ae.scrollTop=fe?0:t.top;else if(t.bottom>M+V){var Se=Math.min(t.top,(ve?de:t.bottom)-V);Se!=M&&(ae.scrollTop=Se)}var De=e.options.fixedGutter?0:A.gutters.offsetWidth,Ue=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:A.scroller.scrollLeft-De,Me=wn(e)-A.gutters.offsetWidth,ze=t.right-t.left>Me;return ze&&(t.right=t.left+Me),t.left<10?ae.scrollLeft=0:t.left<Ue?ae.scrollLeft=Math.max(0,t.left+De-(ze?0:10)):t.right>Me+Ue-3&&(ae.scrollLeft=t.right+(ze?0:10)-Me),ae}function qi(e,t){if(t==null)return;Oi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Pa(e){Oi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ei(e,t,A){(t!=null||A!=null)&&Oi(e),t!=null&&(e.curOp.scrollLeft=t),A!=null&&(e.curOp.scrollTop=A)}function Zs(e,t){Oi(e),e.curOp.scrollToPos=t}function Oi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var A=To(e,t.from),O=To(e,t.to);Po(e,A,O,t.margin)}}function Po(e,t,A,O){var M=Qi(e,{left:Math.min(t.left,A.left),top:Math.min(t.top,A.top)-O,right:Math.max(t.right,A.right),bottom:Math.max(t.bottom,A.bottom)+O});ei(e,M.scrollLeft,M.scrollTop)}function ti(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;T||to(e,{top:t}),Io(e,t,!0),T&&to(e),ai(e,100)}function Io(e,t,A){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!A)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function ga(e,t,A,O){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(A?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!O)return;e.doc.scrollLeft=t,Uo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ri(e){var t=e.display,A=t.gutters.offsetWidth,O=Math.round(e.doc.height+da(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?A:0,docHeight:O,scrollHeight:O+qr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:A}}var va=function(e,t,A){this.cm=A;var O=this.vert=C("div",[C("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),M=this.horiz=C("div",[C("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");O.tabIndex=M.tabIndex=-1,e(O),e(M),_e(O,"scroll",function(){O.clientHeight&&t(O.scrollTop,"vertical")}),_e(M,"scroll",function(){M.clientWidth&&t(M.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,S&&p<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};va.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,A=e.scrollHeight>e.clientHeight+1,O=e.nativeBarWidth;if(A){this.vert.style.display="block",this.vert.style.bottom=t?O+"px":"0";var M=e.viewHeight-(t?O:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+M)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=A?O+"px":"0",this.horiz.style.left=e.barLeft+"px";var V=e.viewWidth-e.barLeft-(A?O:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+V)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(O==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:A?O:0,bottom:t?O:0}},va.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},va.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},va.prototype.zeroWidthHack=function(){var e=s&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new q,this.disableVert=new q},va.prototype.enableZeroWidthBar=function(e,t,A){e.style.pointerEvents="auto";function O(){var M=e.getBoundingClientRect(),V=A=="vert"?document.elementFromPoint(M.right-1,(M.top+M.bottom)/2):document.elementFromPoint((M.right+M.left)/2,M.bottom-1);V!=e?e.style.pointerEvents="none":t.set(1e3,O)}t.set(1e3,O)},va.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ni=function(){};ni.prototype.update=function(){return{bottom:0,right:0}},ni.prototype.setScrollLeft=function(){},ni.prototype.setScrollTop=function(){},ni.prototype.clear=function(){};function Ia(e,t){t||(t=ri(e));var A=e.display.barWidth,O=e.display.barHeight;Mo(e,t);for(var M=0;M<4&&A!=e.display.barWidth||O!=e.display.barHeight;M++)A!=e.display.barWidth&&e.options.lineWrapping&&_i(e),Mo(e,ri(e)),A=e.display.barWidth,O=e.display.barHeight}function Mo(e,t){var A=e.display,O=A.scrollbars.update(t);A.sizer.style.paddingRight=(A.barWidth=O.right)+"px",A.sizer.style.paddingBottom=(A.barHeight=O.bottom)+"px",A.heightForcer.style.borderBottom=O.bottom+"px solid transparent",O.right&&O.bottom?(A.scrollbarFiller.style.display="block",A.scrollbarFiller.style.height=O.bottom+"px",A.scrollbarFiller.style.width=O.right+"px"):A.scrollbarFiller.style.display="",O.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(A.gutterFiller.style.display="block",A.gutterFiller.style.height=O.bottom+"px",A.gutterFiller.style.width=t.gutterWidth+"px"):A.gutterFiller.style.display=""}var No={native:va,null:ni};function Fo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&c(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new No[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),_e(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,A){A=="horizontal"?ga(e,t):ti(e,t)},e),e.display.scrollbars.addClass&&G(e.display.wrapper,e.display.scrollbars.addClass)}var Qs=0;function ya(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:++Qs},rr(e.curOp)}function ba(e){var t=e.curOp;t&&Gr(t,function(A){for(var O=0;O<A.ops.length;O++)A.ops[O].cm.curOp=null;el(A)})}function el(e){for(var t=e.ops,A=0;A<t.length;A++)tl(t[A]);for(var O=0;O<t.length;O++)rl(t[O]);for(var M=0;M<t.length;M++)nl(t[M]);for(var V=0;V<t.length;V++)al(t[V]);for(var ae=0;ae<t.length;ae++)il(t[ae])}function tl(e){var t=e.cm,A=t.display;sl(t),e.updateMaxLine&&Sa(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<A.viewFrom||e.scrollToPos.to.line>=A.viewTo)||A.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ai(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function rl(e){e.updatedDisplay=e.mustUpdate&&eo(e.cm,e.update)}function nl(e){var t=e.cm,A=t.display;e.updatedDisplay&&_i(t),e.barMeasure=ri(t),A.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Za(t,A.maxLine,A.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(A.scroller.clientWidth,A.sizer.offsetLeft+e.adjustWidthTo+qr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,A.sizer.offsetLeft+e.adjustWidthTo-wn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=A.input.prepareSelection())}function al(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&ga(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var A=e.focus&&e.focus==X();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,A),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ia(t,e.barMeasure),e.updatedDisplay&&no(t,e.barMeasure),e.selectionChanged&&Ji(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),A&&Ro(e.cm)}function il(e){var t=e.cm,A=t.display,O=t.doc;if(e.updatedDisplay&&jo(t,e.update),A.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(A.wheelStartX=A.wheelStartY=null),e.scrollTop!=null&&Io(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&ga(t,e.scrollLeft,!0,!0),e.scrollToPos){var M=$s(t,St(O,e.scrollToPos.from),St(O,e.scrollToPos.to),e.scrollToPos.margin);Ys(t,M)}var V=e.maybeHiddenMarkers,ae=e.maybeUnhiddenMarkers;if(V)for(var de=0;de<V.length;++de)V[de].lines.length||Ie(V[de],"hide");if(ae)for(var fe=0;fe<ae.length;++fe)ae[fe].lines.length&&Ie(ae[fe],"unhide");A.wrapper.offsetHeight&&(O.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ie(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Xr(e,t){if(e.curOp)return t();ya(e);try{return t()}finally{ba(e)}}function wr(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ya(e);try{return t.apply(e,arguments)}finally{ba(e)}}}function Mr(e){return function(){if(this.curOp)return e.apply(this,arguments);ya(this);try{return e.apply(this,arguments)}finally{ba(this)}}}function Tr(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ya(t);try{return e.apply(this,arguments)}finally{ba(t)}}}function ai(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,B(ol,e))}function ol(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var A=+new Date+e.options.workTime,O=xr(e,t.highlightFrontier),M=[];t.iter(O.line,Math.min(t.first+t.size,e.display.viewTo+500),function(V){if(O.line>=e.display.viewFrom){var ae=V.styles,de=V.text.length>e.options.maxHighlightLength?Mt(t.mode,O.state):null,fe=br(e,V,O,!0);de&&(O.state=de),V.styles=fe.styles;var ve=V.styleClasses,Se=fe.classes;Se?V.styleClasses=Se:ve&&(V.styleClasses=null);for(var De=!ae||ae.length!=V.styles.length||ve!=Se&&(!ve||!Se||ve.bgClass!=Se.bgClass||ve.textClass!=Se.textClass),Ue=0;!De&&Ue<ae.length;++Ue)De=ae[Ue]!=V.styles[Ue];De&&M.push(O.line),V.stateAfter=O.save(),O.nextLine()}else V.text.length<=e.options.maxHighlightLength&&on(e,V.text,O),V.stateAfter=O.line%5==0?O.save():null,O.nextLine();if(+new Date>A)return ai(e,e.options.workDelay),!0}),t.highlightFrontier=O.line,t.modeFrontier=Math.max(t.modeFrontier,O.line),M.length&&Xr(e,function(){for(var V=0;V<M.length;V++)Jn(e,M[V],"text")})}var Ai=function(e,t,A){var O=e.display;this.viewport=t,this.visible=Ci(O,e.doc,t),this.editorIsHidden=!O.wrapper.offsetWidth,this.wrapperHeight=O.wrapper.clientHeight,this.wrapperWidth=O.wrapper.clientWidth,this.oldDisplayWidth=wn(e),this.force=A,this.dims=Vi(e),this.events=[]};Ai.prototype.signal=function(e,t){Te(e,t)&&this.events.push(arguments)},Ai.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Ie.apply(null,this.events[e])};function sl(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=qr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=qr(e)+"px",t.scrollbarsClipped=!0)}function ll(e){if(e.hasFocus())return null;var t=X();if(!t||!k(e.display.lineDiv,t))return null;var A={activeElt:t};if(window.getSelection){var O=window.getSelection();O.anchorNode&&O.extend&&k(e.display.lineDiv,O.anchorNode)&&(A.anchorNode=O.anchorNode,A.anchorOffset=O.anchorOffset,A.focusNode=O.focusNode,A.focusOffset=O.focusOffset)}return A}function ul(e){if(!e||!e.activeElt||e.activeElt==X())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&k(document.body,e.anchorNode)&&k(document.body,e.focusNode)){var t=window.getSelection(),A=document.createRange();A.setEnd(e.anchorNode,e.anchorOffset),A.collapse(!1),t.removeAllRanges(),t.addRange(A),t.extend(e.focusNode,e.focusOffset)}}function eo(e,t){var A=e.display,O=e.doc;if(t.editorIsHidden)return Zn(e),!1;if(!t.force&&t.visible.from>=A.viewFrom&&t.visible.to<=A.viewTo&&(A.updateLineNumbers==null||A.updateLineNumbers>=A.viewTo)&&A.renderedView==A.view&&Oo(e)==0)return!1;Bo(e)&&(Zn(e),t.dims=Vi(e));var M=O.first+O.size,V=Math.max(t.visible.from-e.options.viewportMargin,O.first),ae=Math.min(M,t.visible.to+e.options.viewportMargin);A.viewFrom<V&&V-A.viewFrom<20&&(V=Math.max(O.first,A.viewFrom)),A.viewTo>ae&&A.viewTo-ae<20&&(ae=Math.min(M,A.viewTo)),fr&&(V=oa(e.doc,V),ae=Pn(e.doc,ae));var de=V!=A.viewFrom||ae!=A.viewTo||A.lastWrapHeight!=t.wrapperHeight||A.lastWrapWidth!=t.wrapperWidth;Xs(e,V,ae),A.viewOffset=Zr(ut(e.doc,A.viewFrom)),e.display.mover.style.top=A.viewOffset+"px";var fe=Oo(e);if(!de&&fe==0&&!t.force&&A.renderedView==A.view&&(A.updateLineNumbers==null||A.updateLineNumbers>=A.viewTo))return!1;var ve=ll(e);return fe>4&&(A.lineDiv.style.display="none"),cl(e,A.updateLineNumbers,t.dims),fe>4&&(A.lineDiv.style.display=""),A.renderedView=A.view,ul(ve),b(A.cursorDiv),b(A.selectionDiv),A.gutters.style.height=A.sizer.style.minHeight=0,de&&(A.lastWrapHeight=t.wrapperHeight,A.lastWrapWidth=t.wrapperWidth,ai(e,400)),A.updateLineNumbers=null,!0}function jo(e,t){for(var A=t.viewport,O=!0;;O=!1){if(!O||!e.options.lineWrapping||t.oldDisplayWidth==wn(e)){if(A&&A.top!=null&&(A={top:Math.min(e.doc.height+da(e.display)-fa(e),A.top)}),t.visible=Ci(e.display,e.doc,A),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else O&&(t.visible=Ci(e.display,e.doc,A));if(!eo(e,t))break;_i(e);var M=ri(e);qa(e),Ia(e,M),no(e,M),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function to(e,t){var A=new Ai(e,t);if(eo(e,A)){_i(e),jo(e,A);var O=ri(e);qa(e),Ia(e,O),no(e,O),A.finish()}}function cl(e,t,A){var O=e.display,M=e.options.lineNumbers,V=O.lineDiv,ae=V.firstChild;function de(ze){var $e=ze.nextSibling;return o&&s&&e.display.currentWheelTarget==ze?ze.style.display="none":ze.parentNode.removeChild(ze),$e}for(var fe=O.view,ve=O.viewFrom,Se=0;Se<fe.length;Se++){var De=fe[Se];if(!De.hidden)if(!De.node||De.node.parentNode!=V){var Ue=In(e,De,ve,A);V.insertBefore(Ue,ae)}else{for(;ae!=De.node;)ae=de(ae);var Me=M&&t!=null&&t<=ve&&De.lineNumber;De.changes&&(ie(De.changes,"gutter")>-1&&(Me=!1),En(e,De,ve,A)),Me&&(b(De.lineNumber),De.lineNumber.appendChild(document.createTextNode(Yr(e.options,ve)))),ae=De.node.nextSibling}ve+=De.size}for(;ae;)ae=de(ae)}function ro(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function no(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+qr(e)+"px"}function Uo(e){var t=e.display,A=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var O=Yi(t)-t.scroller.scrollLeft+e.doc.scrollLeft,M=t.gutters.offsetWidth,V=O+"px",ae=0;ae<A.length;ae++)if(!A[ae].hidden){e.options.fixedGutter&&(A[ae].gutter&&(A[ae].gutter.style.left=V),A[ae].gutterBackground&&(A[ae].gutterBackground.style.left=V));var de=A[ae].alignable;if(de)for(var fe=0;fe<de.length;fe++)de[fe].style.left=V}e.options.fixedGutter&&(t.gutters.style.left=O+M+"px")}function Bo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,A=Yr(e.options,t.first+t.size-1),O=e.display;if(A.length!=O.lineNumChars){var M=O.measure.appendChild(C("div",[C("div",A)],"CodeMirror-linenumber CodeMirror-gutter-elt")),V=M.firstChild.offsetWidth,ae=M.offsetWidth-V;return O.lineGutter.style.width="",O.lineNumInnerWidth=Math.max(V,O.lineGutter.offsetWidth-ae)+1,O.lineNumWidth=O.lineNumInnerWidth+ae,O.lineNumChars=O.lineNumInnerWidth?A.length:-1,O.lineGutter.style.width=O.lineNumWidth+"px",ro(e.display),!0}return!1}function ao(e,t){for(var A=[],O=!1,M=0;M<e.length;M++){var V=e[M],ae=null;if(typeof V!="string"&&(ae=V.style,V=V.className),V=="CodeMirror-linenumbers")if(t)O=!0;else continue;A.push({className:V,style:ae})}return t&&!O&&A.push({className:"CodeMirror-linenumbers",style:null}),A}function Wo(e){var t=e.gutters,A=e.gutterSpecs;b(t),e.lineGutter=null;for(var O=0;O<A.length;++O){var M=A[O],V=M.className,ae=M.style,de=t.appendChild(C("div",null,"CodeMirror-gutter "+V));ae&&(de.style.cssText=ae),V=="CodeMirror-linenumbers"&&(e.lineGutter=de,de.style.width=(e.lineNumWidth||1)+"px")}t.style.display=A.length?"":"none",ro(e)}function ii(e){Wo(e.display),Ur(e),Uo(e)}function dl(e,t,A,O){var M=this;this.input=A,M.scrollbarFiller=C("div",null,"CodeMirror-scrollbar-filler"),M.scrollbarFiller.setAttribute("cm-not-content","true"),M.gutterFiller=C("div",null,"CodeMirror-gutter-filler"),M.gutterFiller.setAttribute("cm-not-content","true"),M.lineDiv=F("div",null,"CodeMirror-code"),M.selectionDiv=C("div",null,null,"position: relative; z-index: 1"),M.cursorDiv=C("div",null,"CodeMirror-cursors"),M.measure=C("div",null,"CodeMirror-measure"),M.lineMeasure=C("div",null,"CodeMirror-measure"),M.lineSpace=F("div",[M.measure,M.lineMeasure,M.selectionDiv,M.cursorDiv,M.lineDiv],null,"position: relative; outline: none");var V=F("div",[M.lineSpace],"CodeMirror-lines");M.mover=C("div",[V],null,"position: relative"),M.sizer=C("div",[M.mover],"CodeMirror-sizer"),M.sizerWidth=null,M.heightForcer=C("div",null,null,"position: absolute; height: "+ce+"px; width: 1px;"),M.gutters=C("div",null,"CodeMirror-gutters"),M.lineGutter=null,M.scroller=C("div",[M.sizer,M.heightForcer,M.gutters],"CodeMirror-scroll"),M.scroller.setAttribute("tabIndex","-1"),M.wrapper=C("div",[M.scrollbarFiller,M.gutterFiller,M.scroller],"CodeMirror"),S&&p<8&&(M.gutters.style.zIndex=-1,M.scroller.style.paddingRight=0),!o&&!(T&&n)&&(M.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(M.wrapper):e(M.wrapper)),M.viewFrom=M.viewTo=t.first,M.reportedViewFrom=M.reportedViewTo=t.first,M.view=[],M.renderedView=null,M.externalMeasured=null,M.viewOffset=0,M.lastWrapHeight=M.lastWrapWidth=0,M.updateLineNumbers=null,M.nativeBarWidth=M.barHeight=M.barWidth=0,M.scrollbarsClipped=!1,M.lineNumWidth=M.lineNumInnerWidth=M.lineNumChars=null,M.alignWidgets=!1,M.cachedCharWidth=M.cachedTextHeight=M.cachedPaddingH=null,M.maxLine=null,M.maxLineLength=0,M.maxLineChanged=!1,M.wheelDX=M.wheelDY=M.wheelStartX=M.wheelStartY=null,M.shift=!1,M.selForContextMenu=null,M.activeTouch=null,M.gutterSpecs=ao(O.gutters,O.lineNumbers),Wo(M),A.init(M)}var Di=0,rn=null;S?rn=-.53:T?rn=15:r?rn=-.7:f&&(rn=-1/3);function Ho(e){var t=e.wheelDeltaX,A=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),A==null&&e.detail&&e.axis==e.VERTICAL_AXIS?A=e.detail:A==null&&(A=e.wheelDelta),{x:t,y:A}}function fl(e){var t=Ho(e);return t.x*=rn,t.y*=rn,t}function Ko(e,t){var A=Ho(t),O=A.x,M=A.y,V=e.display,ae=V.scroller,de=ae.scrollWidth>ae.clientWidth,fe=ae.scrollHeight>ae.clientHeight;if(!(O&&de||M&&fe))return;if(M&&s&&o){e:for(var ve=t.target,Se=V.view;ve!=ae;ve=ve.parentNode)for(var De=0;De<Se.length;De++)if(Se[De].node==ve){e.display.currentWheelTarget=ve;break e}}if(O&&!T&&!d&&rn!=null){M&&fe&&ti(e,Math.max(0,ae.scrollTop+M*rn)),ga(e,Math.max(0,ae.scrollLeft+O*rn)),(!M||M&&fe)&&ye(t),V.wheelStartX=null;return}if(M&&rn!=null){var Ue=M*rn,Me=e.doc.scrollTop,ze=Me+V.wrapper.clientHeight;Ue<0?Me=Math.max(0,Me+Ue-50):ze=Math.min(e.doc.height,ze+Ue+50),to(e,{top:Me,bottom:ze})}Di<20&&(V.wheelStartX==null?(V.wheelStartX=ae.scrollLeft,V.wheelStartY=ae.scrollTop,V.wheelDX=O,V.wheelDY=M,setTimeout(function(){if(V.wheelStartX==null)return;var $e=ae.scrollLeft-V.wheelStartX,nt=ae.scrollTop-V.wheelStartY,st=nt&&V.wheelDY&&nt/V.wheelDY||$e&&V.wheelDX&&$e/V.wheelDX;if(V.wheelStartX=V.wheelStartY=null,!st)return;rn=(rn*Di+st)/(Di+1),++Di},200)):(V.wheelDX+=O,V.wheelDY+=M))}var nn=function(e,t){this.ranges=e,this.primIndex=t};nn.prototype.primary=function(){return this.ranges[this.primIndex]},nn.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var A=this.ranges[t],O=e.ranges[t];if(!vn(A.anchor,O.anchor)||!vn(A.head,O.head))return!1}return!0},nn.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new zt(Fr(this.ranges[t].anchor),Fr(this.ranges[t].head));return new nn(e,this.primIndex)},nn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},nn.prototype.contains=function(e,t){t||(t=e);for(var A=0;A<this.ranges.length;A++){var O=this.ranges[A];if(yt(t,O.from())>=0&&yt(e,O.to())<=0)return A}return-1};var zt=function(e,t){this.anchor=e,this.head=t};zt.prototype.from=function(){return Pr(this.anchor,this.head)},zt.prototype.to=function(){return jr(this.anchor,this.head)},zt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function _n(e,t,A){var O=e&&e.options.selectionsMayTouch,M=t[A];t.sort(function(Ue,Me){return yt(Ue.from(),Me.from())}),A=ie(t,M);for(var V=1;V<t.length;V++){var ae=t[V],de=t[V-1],fe=yt(de.to(),ae.from());if(O&&!ae.empty()?fe>0:fe>=0){var ve=Pr(de.from(),ae.from()),Se=jr(de.to(),ae.to()),De=de.empty()?ae.from()==ae.head:de.from()==de.head;V<=A&&--A,t.splice(--V,2,new zt(De?Se:ve,De?ve:Se))}}return new nn(t,A)}function Qn(e,t){return new nn([new zt(e,t||e)],0)}function qn(e){return e.text?Je(e.from.line+e.text.length-1,Q(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Go(e,t){if(yt(e,t.from)<0)return e;if(yt(e,t.to)<=0)return qn(t);var A=e.line+t.text.length-(t.to.line-t.from.line)-1,O=e.ch;return e.line==t.to.line&&(O+=qn(t).ch-t.to.ch),Je(A,O)}function io(e,t){for(var A=[],O=0;O<e.sel.ranges.length;O++){var M=e.sel.ranges[O];A.push(new zt(Go(M.anchor,t),Go(M.head,t)))}return _n(e.cm,A,e.sel.primIndex)}function zo(e,t,A){return e.line==t.line?Je(A.line,e.ch-t.ch+A.ch):Je(A.line+(e.line-t.line),e.ch)}function hl(e,t,A){for(var O=[],M=Je(e.first,0),V=M,ae=0;ae<t.length;ae++){var de=t[ae],fe=zo(de.from,M,V),ve=zo(qn(de),M,V);if(M=de.to,V=ve,A=="around"){var Se=e.sel.ranges[ae],De=yt(Se.head,Se.anchor)<0;O[ae]=new zt(De?ve:fe,De?fe:ve)}else O[ae]=new zt(fe,fe)}return new nn(O,e.sel.primIndex)}function oo(e){e.doc.mode=Ye(e.options,e.doc.modeOption),oi(e)}function oi(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ai(e,100),e.state.modeGen++,e.curOp&&Ur(e)}function Xo(e,t){return t.from.ch==0&&t.to.ch==0&&Q(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function so(e,t,A,O){function M(ft){return A?A[ft]:null}function V(ft,lt,mt){Va(ft,lt,mt,O),Gt(ft,"change",ft,t)}function ae(ft,lt){for(var mt=[],_t=ft;_t<lt;++_t)mt.push(new Fn(ve[_t],M(_t),O));return mt}var de=t.from,fe=t.to,ve=t.text,Se=ut(e,de.line),De=ut(e,fe.line),Ue=Q(ve),Me=M(ve.length-1),ze=fe.line-de.line;if(t.full)e.insert(0,ae(0,ve.length)),e.remove(ve.length,e.size-ve.length);else if(Xo(e,t)){var $e=ae(0,ve.length-1);V(De,De.text,Me),ze&&e.remove(de.line,ze),$e.length&&e.insert(de.line,$e)}else if(Se==De)if(ve.length==1)V(Se,Se.text.slice(0,de.ch)+Ue+Se.text.slice(fe.ch),Me);else{var nt=ae(1,ve.length-1);nt.push(new Fn(Ue+Se.text.slice(fe.ch),Me,O)),V(Se,Se.text.slice(0,de.ch)+ve[0],M(0)),e.insert(de.line+1,nt)}else if(ve.length==1)V(Se,Se.text.slice(0,de.ch)+ve[0]+De.text.slice(fe.ch),M(0)),e.remove(de.line+1,ze);else{V(Se,Se.text.slice(0,de.ch)+ve[0],M(0)),V(De,Ue+De.text.slice(fe.ch),Me);var st=ae(1,ve.length-1);ze>1&&e.remove(de.line+1,ze-1),e.insert(de.line+1,st)}Gt(e,"change",e,t)}function ea(e,t,A){function O(M,V,ae){if(M.linked)for(var de=0;de<M.linked.length;++de){var fe=M.linked[de];if(fe.doc==V)continue;var ve=ae&&fe.sharedHist;if(A&&!ve)continue;t(fe.doc,ve),O(fe.doc,M,ve)}}O(e,null,!0)}function Vo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,$i(e),oo(e),Yo(e),e.options.lineWrapping||Sa(e),e.options.mode=t.modeOption,Ur(e)}function Yo(e){(e.doc.direction=="rtl"?G:c)(e.display.lineDiv,"CodeMirror-rtl")}function pl(e){Xr(e,function(){Yo(e),Ur(e)})}function Ri(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 lo(e,t){var A={from:Fr(t.from),to:qn(t),text:Ot(e,t.from,t.to)};return Zo(e,A,t.from.line,t.to.line+1),ea(e,function(O){return Zo(O,A,t.from.line,t.to.line+1)},!0),A}function $o(e){for(;e.length;){var t=Q(e);if(t.ranges)e.pop();else break}}function ml(e,t){if(t)return $o(e.done),Q(e.done);if(e.done.length&&!Q(e.done).ranges)return Q(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Q(e.done)}function Jo(e,t,A,O){var M=e.history;M.undone.length=0;var V=+new Date,ae,de;if((M.lastOp==O||M.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&M.lastModTime>V-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(ae=ml(M,M.lastOp==O)))de=Q(ae.changes),yt(t.from,t.to)==0&&yt(t.from,de.to)==0?de.to=qn(t):ae.changes.push(lo(e,t));else{var fe=Q(M.done);for((!fe||!fe.ranges)&&Li(e.sel,M.done),ae={changes:[lo(e,t)],generation:M.generation},M.done.push(ae);M.done.length>M.undoDepth;)M.done.shift(),M.done[0].ranges||M.done.shift()}M.done.push(A),M.generation=++M.maxGeneration,M.lastModTime=M.lastSelTime=V,M.lastOp=M.lastSelOp=O,M.lastOrigin=M.lastSelOrigin=t.origin,de||Ie(e,"historyAdded")}function gl(e,t,A,O){var M=t.charAt(0);return M=="*"||M=="+"&&A.ranges.length==O.ranges.length&&A.somethingSelected()==O.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function vl(e,t,A,O){var M=e.history,V=O&&O.origin;A==M.lastSelOp||V&&M.lastSelOrigin==V&&(M.lastModTime==M.lastSelTime&&M.lastOrigin==V||gl(e,V,Q(M.done),t))?M.done[M.done.length-1]=t:Li(t,M.done),M.lastSelTime=+new Date,M.lastSelOrigin=V,M.lastSelOp=A,O&&O.clearRedo!==!1&&$o(M.undone)}function Li(e,t){var A=Q(t);A&&A.ranges&&A.equals(e)||t.push(e)}function Zo(e,t,A,O){var M=t["spans_"+e.id],V=0;e.iter(Math.max(e.first,A),Math.min(e.first+e.size,O),function(ae){ae.markedSpans&&((M||(M=t["spans_"+e.id]={}))[V]=ae.markedSpans),++V})}function yl(e){if(!e)return null;for(var t,A=0;A<e.length;++A)e[A].marker.explicitlyCleared?t||(t=e.slice(0,A)):t&&t.push(e[A]);return t?t.length?t:null:e}function bl(e,t){var A=t["spans_"+e.id];if(!A)return null;for(var O=[],M=0;M<t.text.length;++M)O.push(yl(A[M]));return O}function Qo(e,t){var A=bl(e,t),O=Dn(e,t);if(!A)return O;if(!O)return A;for(var M=0;M<A.length;++M){var V=A[M],ae=O[M];if(V&&ae){e:for(var de=0;de<ae.length;++de){for(var fe=ae[de],ve=0;ve<V.length;++ve)if(V[ve].marker==fe.marker)continue e;V.push(fe)}}else ae&&(A[M]=ae)}return A}function Ma(e,t,A){for(var O=[],M=0;M<e.length;++M){var V=e[M];if(V.ranges){O.push(A?nn.prototype.deepCopy.call(V):V);continue}var ae=V.changes,de=[];O.push({changes:de});for(var fe=0;fe<ae.length;++fe){var ve=ae[fe],Se=void 0;if(de.push({from:ve.from,to:ve.to,text:ve.text}),t)for(var De in ve)(Se=De.match(/^spans_(\d+)$/))&&(ie(t,Number(Se[1]))>-1&&(Q(de)[De]=ve[De],delete ve[De]))}}return O}function uo(e,t,A,O){if(O){var M=e.anchor;if(A){var V=yt(t,M)<0;V!=yt(A,M)<0?(M=t,t=A):V!=yt(t,A)<0&&(t=A)}return new zt(M,t)}else return new zt(A||t,t)}function ki(e,t,A,O,M){M==null&&(M=e.cm&&(e.cm.display.shift||e.extend)),Lr(e,new nn([uo(e.sel.primary(),t,A,M)],0),O)}function qo(e,t,A){for(var O=[],M=e.cm&&(e.cm.display.shift||e.extend),V=0;V<e.sel.ranges.length;V++)O[V]=uo(e.sel.ranges[V],t[V],null,M);var ae=_n(e.cm,O,e.sel.primIndex);Lr(e,ae,A)}function co(e,t,A,O){var M=e.sel.ranges.slice(0);M[t]=A,Lr(e,_n(e.cm,M,e.sel.primIndex),O)}function es(e,t,A,O){Lr(e,Qn(t,A),O)}function xl(e,t,A){var O={ranges:t.ranges,update:function(M){this.ranges=[];for(var V=0;V<M.length;V++)this.ranges[V]=new zt(St(e,M[V].anchor),St(e,M[V].head))},origin:A&&A.origin};return Ie(e,"beforeSelectionChange",e,O),e.cm&&Ie(e.cm,"beforeSelectionChange",e.cm,O),O.ranges!=t.ranges?_n(e.cm,O.ranges,O.ranges.length-1):t}function ts(e,t,A){var O=e.history.done,M=Q(O);M&&M.ranges?(O[O.length-1]=t,Pi(e,t,A)):Lr(e,t,A)}function Lr(e,t,A){Pi(e,t,A),vl(e,e.sel,e.cm?e.cm.curOp.id:NaN,A)}function Pi(e,t,A){(Te(e,"beforeSelectionChange")||e.cm&&Te(e.cm,"beforeSelectionChange"))&&(t=xl(e,t,A));var O=A&&A.bias||(yt(t.primary().head,e.sel.primary().head)<0?-1:1);rs(e,as(e,t,O,!0)),!(A&&A.scroll===!1)&&e.cm&&Pa(e.cm)}function rs(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Le(e.cm)),Gt(e,"cursorActivity",e)}function ns(e){rs(e,as(e,e.sel,null,!1))}function as(e,t,A,O){for(var M,V=0;V<t.ranges.length;V++){var ae=t.ranges[V],de=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[V],fe=Ii(e,ae.anchor,de&&de.anchor,A,O),ve=Ii(e,ae.head,de&&de.head,A,O);(M||fe!=ae.anchor||ve!=ae.head)&&(M||(M=t.ranges.slice(0,V)),M[V]=new zt(fe,ve))}return M?_n(e.cm,M,t.primIndex):t}function Na(e,t,A,O,M){var V=ut(e,t.line);if(V.markedSpans)for(var ae=0;ae<V.markedSpans.length;++ae){var de=V.markedSpans[ae],fe=de.marker,ve="selectLeft"in fe?!fe.selectLeft:fe.inclusiveLeft,Se="selectRight"in fe?!fe.selectRight:fe.inclusiveRight;if((de.from==null||(ve?de.from<=t.ch:de.from<t.ch))&&(de.to==null||(Se?de.to>=t.ch:de.to>t.ch))){if(M&&(Ie(fe,"beforeCursorEnter"),fe.explicitlyCleared))if(V.markedSpans){--ae;continue}else break;if(!fe.atomic)continue;if(A){var De=fe.find(O<0?1:-1),Ue=void 0;if((O<0?Se:ve)&&(De=is(e,De,-O,De&&De.line==t.line?V:null)),De&&De.line==t.line&&(Ue=yt(De,A))&&(O<0?Ue<0:Ue>0))return Na(e,De,t,O,M)}var Me=fe.find(O<0?-1:1);return(O<0?ve:Se)&&(Me=is(e,Me,O,Me.line==t.line?V:null)),Me?Na(e,Me,t,O,M):null}}return t}function Ii(e,t,A,O,M){var V=O||1,ae=Na(e,t,A,V,M)||!M&&Na(e,t,A,V,!0)||Na(e,t,A,-V,M)||!M&&Na(e,t,A,-V,!0);return ae||(e.cantEdit=!0,Je(e.first,0))}function is(e,t,A,O){return A<0&&t.ch==0?t.line>e.first?St(e,Je(t.line-1)):null:A>0&&t.ch==(O||ut(e,t.line)).text.length?t.line<e.first+e.size-1?Je(t.line+1,0):null:new Je(t.line,t.ch+A)}function os(e){e.setSelection(Je(e.firstLine(),0),Je(e.lastLine()),be)}function ss(e,t,A){var O={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return O.canceled=!0}};return A&&(O.update=function(M,V,ae,de){M&&(O.from=St(e,M)),V&&(O.to=St(e,V)),ae&&(O.text=ae),de!==void 0&&(O.origin=de)}),Ie(e,"beforeChange",e,O),e.cm&&Ie(e.cm,"beforeChange",e.cm,O),O.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:O.from,to:O.to,text:O.text,origin:O.origin}}function Fa(e,t,A){if(e.cm){if(!e.cm.curOp)return wr(e.cm,Fa)(e,t,A);if(e.cm.state.suppressEdits)return}if((Te(e,"beforeChange")||e.cm&&Te(e.cm,"beforeChange"))&&(t=ss(e,t,!0),!t))return;var O=An&&!A&&cn(e,t.from,t.to);if(O)for(var M=O.length-1;M>=0;--M)ls(e,{from:O[M].from,to:O[M].to,text:M?[""]:t.text,origin:t.origin});else ls(e,t)}function ls(e,t){if(t.text.length==1&&t.text[0]==""&&yt(t.from,t.to)==0)return;var A=io(e,t);Jo(e,t,A,e.cm?e.cm.curOp.id:NaN),si(e,t,A,Dn(e,t));var O=[];ea(e,function(M,V){!V&&ie(O,M.history)==-1&&(fs(M.history,t),O.push(M.history)),si(M,t,null,Dn(M,t))})}function Mi(e,t,A){var O=e.cm&&e.cm.state.suppressEdits;if(O&&!A)return;for(var M=e.history,V,ae=e.sel,de=t=="undo"?M.done:M.undone,fe=t=="undo"?M.undone:M.done,ve=0;ve<de.length&&!(V=de[ve],A?V.ranges&&!V.equals(e.sel):!V.ranges);ve++);if(ve==de.length)return;for(M.lastOrigin=M.lastSelOrigin=null;;)if(V=de.pop(),V.ranges){if(Li(V,fe),A&&!V.equals(e.sel)){Lr(e,V,{clearRedo:!1});return}ae=V}else if(O){de.push(V);return}else break;var Se=[];Li(ae,fe),fe.push({changes:Se,generation:M.generation}),M.generation=V.generation||++M.maxGeneration;for(var De=Te(e,"beforeChange")||e.cm&&Te(e.cm,"beforeChange"),Ue=function($e){var nt=V.changes[$e];if(nt.origin=t,De&&!ss(e,nt,!1))return de.length=0,{};Se.push(lo(e,nt));var st=$e?io(e,nt):Q(de);si(e,nt,st,Qo(e,nt)),!$e&&e.cm&&e.cm.scrollIntoView({from:nt.from,to:qn(nt)});var ft=[];ea(e,function(lt,mt){!mt&&ie(ft,lt.history)==-1&&(fs(lt.history,nt),ft.push(lt.history)),si(lt,nt,null,Qo(lt,nt))})},Me=V.changes.length-1;Me>=0;--Me){var ze=Ue(Me);if(ze)return ze.v}}function us(e,t){if(t==0)return;if(e.first+=t,e.sel=new nn(se(e.sel.ranges,function(M){return new zt(Je(M.anchor.line+t,M.anchor.ch),Je(M.head.line+t,M.head.ch))}),e.sel.primIndex),e.cm){Ur(e.cm,e.first,e.first-t,t);for(var A=e.cm.display,O=A.viewFrom;O<A.viewTo;O++)Jn(e.cm,O,"gutter")}}function si(e,t,A,O){if(e.cm&&!e.cm.curOp)return wr(e.cm,si)(e,t,A,O);if(t.to.line<e.first){us(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var M=t.text.length-1-(e.first-t.from.line);us(e,M),t={from:Je(e.first,0),to:Je(t.to.line+M,t.to.ch),text:[Q(t.text)],origin:t.origin}}var V=e.lastLine();t.to.line>V&&(t={from:t.from,to:Je(V,ut(e,V).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ot(e,t.from,t.to),A||(A=io(e,t)),e.cm?El(e.cm,t,O):so(e,t,O),Pi(e,A,be),e.cantEdit&&Ii(e,Je(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,t,A){var O=e.doc,M=e.display,V=t.from,ae=t.to,de=!1,fe=V.line;e.options.lineWrapping||(fe=It(Dr(ut(O,V.line))),O.iter(fe,ae.line+1,function(Me){if(Me==M.maxLine)return de=!0,!0})),O.sel.contains(t.from,t.to)>-1&&Le(e),so(O,t,A,Co(e)),e.options.lineWrapping||(O.iter(fe,V.line+t.text.length,function(Me){var ze=la(Me);ze>M.maxLineLength&&(M.maxLine=Me,M.maxLineLength=ze,M.maxLineChanged=!0,de=!1)}),de&&(e.curOp.updateMaxLine=!0)),aa(O,V.line),ai(e,400);var ve=t.text.length-(ae.line-V.line)-1;t.full?Ur(e):V.line==ae.line&&t.text.length==1&&!Xo(e.doc,t)?Jn(e,V.line,"text"):Ur(e,V.line,ae.line+1,ve);var Se=Te(e,"changes"),De=Te(e,"change");if(De||Se){var Ue={from:V,to:ae,text:t.text,removed:t.removed,origin:t.origin};De&&Gt(e,"change",e,Ue),Se&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Ue)}e.display.selForContextMenu=null}function ja(e,t,A,O,M){var V;O||(O=A),yt(O,A)<0&&(V=[O,A],A=V[0],O=V[1]),typeof t=="string"&&(t=e.splitLines(t)),Fa(e,{from:A,to:O,text:t,origin:M})}function cs(e,t,A,O){A<e.line?e.line+=O:t<e.line&&(e.line=t,e.ch=0)}function ds(e,t,A,O){for(var M=0;M<e.length;++M){var V=e[M],ae=!0;if(V.ranges){V.copied||(V=e[M]=V.deepCopy(),V.copied=!0);for(var de=0;de<V.ranges.length;de++)cs(V.ranges[de].anchor,t,A,O),cs(V.ranges[de].head,t,A,O);continue}for(var fe=0;fe<V.changes.length;++fe){var ve=V.changes[fe];if(A<ve.from.line)ve.from=Je(ve.from.line+O,ve.from.ch),ve.to=Je(ve.to.line+O,ve.to.ch);else if(t<=ve.to.line){ae=!1;break}}ae||(e.splice(0,M+1),M=0)}}function fs(e,t){var A=t.from.line,O=t.to.line,M=t.text.length-(O-A)-1;ds(e.done,A,O,M),ds(e.undone,A,O,M)}function li(e,t,A,O){var M=t,V=t;return typeof t=="number"?V=ut(e,an(e,t)):M=It(t),M==null?null:(O(V,M)&&e.cm&&Jn(e.cm,M,A),V)}function ui(e){this.lines=e,this.parent=null;for(var t=0,A=0;A<e.length;++A)e[A].parent=this,t+=e[A].height;this.height=t}ui.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var A=e,O=e+t;A<O;++A){var M=this.lines[A];this.height-=M.height,vt(M),Gt(M,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,A){this.height+=A,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var O=0;O<t.length;++O)t[O].parent=this},iterN:function(e,t,A){for(var O=e+t;e<O;++e)if(A(this.lines[e]))return!0}};function ci(e){this.children=e;for(var t=0,A=0,O=0;O<e.length;++O){var M=e[O];t+=M.chunkSize(),A+=M.height,M.parent=this}this.size=t,this.height=A,this.parent=null}ci.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var A=0;A<this.children.length;++A){var O=this.children[A],M=O.chunkSize();if(e<M){var V=Math.min(t,M-e),ae=O.height;if(O.removeInner(e,V),this.height-=ae-O.height,M==V&&(this.children.splice(A--,1),O.parent=null),(t-=V)==0)break;e=0}else e-=M}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ui))){var de=[];this.collapse(de),this.children=[new ui(de)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,A){this.size+=t.length,this.height+=A;for(var O=0;O<this.children.length;++O){var M=this.children[O],V=M.chunkSize();if(e<=V){if(M.insertInner(e,t,A),M.lines&&M.lines.length>50){for(var ae=M.lines.length%25+25,de=ae;de<M.lines.length;){var fe=new ui(M.lines.slice(de,de+=25));M.height-=fe.height,this.children.splice(++O,0,fe),fe.parent=this}M.lines=M.lines.slice(0,ae),this.maybeSpill()}break}e-=V}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),A=new ci(t);if(e.parent){e.size-=A.size,e.height-=A.height;var M=ie(e.parent.children,e);e.parent.children.splice(M+1,0,A)}else{var O=new ci(e.children);O.parent=e,e.children=[O,A],e=O}A.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,A){for(var O=0;O<this.children.length;++O){var M=this.children[O],V=M.chunkSize();if(e<V){var ae=Math.min(t,V-e);if(M.iterN(e,ae,A))return!0;if((t-=ae)==0)break;e=0}else e-=V}}};var di=function(e,t,A){if(A)for(var O in A)A.hasOwnProperty(O)&&(this[O]=A[O]);this.doc=e,this.node=t};di.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,A=this.line,O=It(A);if(O==null||!t)return;for(var M=0;M<t.length;++M)t[M]==this&&t.splice(M--,1);t.length||(A.widgets=null);var V=Lt(this);Vt(A,Math.max(0,A.height-V)),e&&(Xr(e,function(){hs(e,A,-V),Jn(e,O,"widget")}),Gt(e,"lineWidgetCleared",e,this,O))},di.prototype.changed=function(){var e=this,t=this.height,A=this.doc.cm,O=this.line;this.height=null;var M=Lt(this)-t;if(!M)return;fn(this.doc,O)||Vt(O,O.height+M),A&&Xr(A,function(){A.curOp.forceUpdate=!0,hs(A,O,M),Gt(A,"lineWidgetChanged",A,e,It(O))})},Ae(di);function hs(e,t,A){Zr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&qi(e,A)}function wl(e,t,A,O){var M=new di(e,A,O),V=e.cm;return V&&M.noHScroll&&(V.display.alignWidgets=!0),li(e,t,"widget",function(ae){var de=ae.widgets||(ae.widgets=[]);if(M.insertAt==null?de.push(M):de.splice(Math.min(de.length-1,Math.max(0,M.insertAt)),0,M),M.line=ae,V&&!fn(e,ae)){var fe=Zr(ae)<e.scrollTop;Vt(ae,ae.height+Lt(M)),fe&&qi(V,M.height),V.curOp.forceUpdate=!0}return!0}),V&&Gt(V,"lineWidgetAdded",V,M,typeof t=="number"?t:It(t)),M}var ps=0,ta=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ps};ta.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&ya(e),Te(this,"clear")){var A=this.find();A&&Gt(this,"clear",A.from,A.to)}for(var O=null,M=null,V=0;V<this.lines.length;++V){var ae=this.lines[V],de=Qt(ae.markedSpans,this);e&&!this.collapsed?Jn(e,It(ae),"text"):e&&(de.to!=null&&(M=It(ae)),de.from!=null&&(O=It(ae))),ae.markedSpans=Ht(ae.markedSpans,de),de.from==null&&this.collapsed&&!fn(this.doc,ae)&&e&&Vt(ae,Ra(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var fe=0;fe<this.lines.length;++fe){var ve=Dr(this.lines[fe]),Se=la(ve);Se>e.display.maxLineLength&&(e.display.maxLine=ve,e.display.maxLineLength=Se,e.display.maxLineChanged=!0)}O!=null&&e&&this.collapsed&&Ur(e,O,M+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ns(e.doc)),e&&Gt(e,"markerCleared",e,this,O,M),t&&ba(e),this.parent&&this.parent.clear()},ta.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var A,O,M=0;M<this.lines.length;++M){var V=this.lines[M],ae=Qt(V.markedSpans,this);if(ae.from!=null&&(A=Je(t?V:It(V),ae.from),e==-1))return A;if(ae.to!=null&&(O=Je(t?V:It(V),ae.to),e==1))return O}return A&&{from:A,to:O}},ta.prototype.changed=function(){var e=this,t=this.find(-1,!0),A=this,O=this.doc.cm;if(!t||!O)return;Xr(O,function(){var M=t.line,V=It(t.line),ae=Ca(O,V);if(ae&&(Oa(ae),O.curOp.selectionChanged=O.curOp.forceUpdate=!0),O.curOp.updateMaxLine=!0,!fn(A.doc,M)&&A.height!=null){var de=A.height;A.height=null;var fe=Lt(A)-de;fe&&Vt(M,M.height+fe)}Gt(O,"markerChanged",O,e)})},ta.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||ie(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ta.prototype.detachLine=function(e){if(this.lines.splice(ie(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ae(ta);function Ua(e,t,A,O,M){if(O&&O.shared)return Tl(e,t,A,O,M);if(e.cm&&!e.cm.curOp)return wr(e.cm,Ua)(e,t,A,O,M);var V=new ta(e,M),ae=yt(t,A);if(O&&U(O,V,!1),ae>0||ae==0&&V.clearWhenEmpty!==!1)return V;if(V.replacedWith&&(V.collapsed=!0,V.widgetNode=F("span",[V.replacedWith],"CodeMirror-widget"),O.handleMouseEvents||V.widgetNode.setAttribute("cm-ignore-events","true"),O.insertLeft&&(V.widgetNode.insertLeft=!0)),V.collapsed){if(Ta(e,t.line,t,A,V)||t.line!=A.line&&Ta(e,A.line,t,A,V))throw new Error("Inserting collapsed marker partially overlapping an existing one");ia()}V.addToHistory&&Jo(e,{from:t,to:A,origin:"markText"},e.sel,NaN);var de=t.line,fe=e.cm,ve;if(e.iter(de,A.line+1,function(De){fe&&V.collapsed&&!fe.options.lineWrapping&&Dr(De)==fe.display.maxLine&&(ve=!0),V.collapsed&&de!=t.line&&Vt(De,0),sr(De,new un(V,de==t.line?t.ch:null,de==A.line?A.ch:null)),++de}),V.collapsed&&e.iter(t.line,A.line+1,function(De){fn(e,De)&&Vt(De,0)}),V.clearOnEnter&&_e(V,"beforeCursorEnter",function(){return V.clear()}),V.readOnly&&(ln(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),V.collapsed&&(V.id=++ps,V.atomic=!0),fe){if(ve&&(fe.curOp.updateMaxLine=!0),V.collapsed)Ur(fe,t.line,A.line+1);else if(V.className||V.startStyle||V.endStyle||V.css||V.attributes||V.title)for(var Se=t.line;Se<=A.line;Se++)Jn(fe,Se,"text");V.atomic&&ns(fe.doc),Gt(fe,"markerAdded",fe,V)}return V}var fi=function(e,t){this.markers=e,this.primary=t;for(var A=0;A<e.length;++A)e[A].parent=this};fi.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Gt(this,"clear")},fi.prototype.find=function(e,t){return this.primary.find(e,t)},Ae(fi);function Tl(e,t,A,O,M){O=U(O),O.shared=!1;var V=[Ua(e,t,A,O,M)],ae=V[0],de=O.widgetNode;return ea(e,function(fe){de&&(O.widgetNode=de.cloneNode(!0)),V.push(Ua(fe,St(fe,t),St(fe,A),O,M));for(var ve=0;ve<fe.linked.length;++ve)if(fe.linked[ve].isParent)return;ae=Q(V)}),new fi(V,ae)}function ms(e){return e.findMarks(Je(e.first,0),e.clipPos(Je(e.lastLine())),function(t){return t.parent})}function Sl(e,t){for(var A=0;A<t.length;A++){var O=t[A],M=O.find(),V=e.clipPos(M.from),ae=e.clipPos(M.to);if(yt(V,ae)){var de=Ua(e,V,ae,O.primary,O.primary.type);O.markers.push(de),de.parent=O}}}function _l(e){for(var t=function(O){var M=e[O],V=[M.primary.doc];ea(M.primary.doc,function(fe){return V.push(fe)});for(var ae=0;ae<M.markers.length;ae++){var de=M.markers[ae];ie(V,de.doc)==-1&&(de.parent=null,M.markers.splice(ae--,1))}},A=0;A<e.length;A++)t(A)}var Cl=0,Br=function(e,t,A,O,M){if(!(this instanceof Br))return new Br(e,t,A,O,M);A==null&&(A=0),ci.call(this,[new ui([new Fn("",null)])]),this.first=A,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=A;var V=Je(A,0);this.sel=Qn(V),this.history=new Ri(null),this.id=++Cl,this.modeOption=t,this.lineSep=O,this.direction=M=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),so(this,{from:V,to:V,text:e}),Lr(this,Qn(V),be)};Br.prototype=ge(ci.prototype,{constructor:Br,iter:function(e,t,A){A?this.iterN(e-this.first,t-e,A):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var A=0,O=0;O<t.length;++O)A+=t[O].height;this.insertInner(e-this.first,t,A)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=qt(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Tr(function(e){var t=Je(this.first,0),A=this.first+this.size-1;Fa(this,{from:t,to:Je(A,ut(this,A).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ei(this.cm,0,0),Lr(this,Qn(t),be)}),replaceRange:function(e,t,A,O){t=St(this,t),A=A?St(this,A):t,ja(this,e,t,A,O)},getRange:function(e,t,A){var O=Ot(this,St(this,e),St(this,t));return A===!1?O:O.join(A||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Nt(this,e))return ut(this,e)},getLineNumber:function(e){return It(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=ut(this,e)),Dr(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return St(this,e)},getCursor:function(e){var t=this.sel.primary(),A;return e==null||e=="head"?A=t.head:e=="anchor"?A=t.anchor:e=="end"||e=="to"||e===!1?A=t.to():A=t.from(),A},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Tr(function(e,t,A){es(this,St(this,typeof e=="number"?Je(e,t||0):e),null,A)}),setSelection:Tr(function(e,t,A){es(this,St(this,e),St(this,t||e),A)}),extendSelection:Tr(function(e,t,A){ki(this,St(this,e),t&&St(this,t),A)}),extendSelections:Tr(function(e,t){qo(this,Xe(this,e),t)}),extendSelectionsBy:Tr(function(e,t){var A=se(this.sel.ranges,e);qo(this,Xe(this,A),t)}),setSelections:Tr(function(e,t,A){if(!e.length)return;for(var O=[],M=0;M<e.length;M++)O[M]=new zt(St(this,e[M].anchor),St(this,e[M].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Lr(this,_n(this.cm,O,t),A)}),addSelection:Tr(function(e,t,A){var O=this.sel.ranges.slice(0);O.push(new zt(St(this,e),St(this,t||e))),Lr(this,_n(this.cm,O,O.length-1),A)}),getSelection:function(e){for(var t=this.sel.ranges,A,O=0;O<t.length;O++){var M=Ot(this,t[O].from(),t[O].to());A=A?A.concat(M):M}return e===!1?A:A.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],A=this.sel.ranges,O=0;O<A.length;O++){var M=Ot(this,A[O].from(),A[O].to());e!==!1&&(M=M.join(e||this.lineSeparator())),t[O]=M}return t},replaceSelection:function(e,t,A){for(var O=[],M=0;M<this.sel.ranges.length;M++)O[M]=e;this.replaceSelections(O,t,A||"+input")},replaceSelections:Tr(function(e,t,A){for(var O=[],M=this.sel,V=0;V<M.ranges.length;V++){var ae=M.ranges[V];O[V]={from:ae.from(),to:ae.to(),text:this.splitLines(e[V]),origin:A}}for(var de=t&&t!="end"&&hl(this,O,t),fe=O.length-1;fe>=0;fe--)Fa(this,O[fe]);de?ts(this,de):this.cm&&Pa(this.cm)}),undo:Tr(function(){Mi(this,"undo")}),redo:Tr(function(){Mi(this,"redo")}),undoSelection:Tr(function(){Mi(this,"undo",!0)}),redoSelection:Tr(function(){Mi(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,A=0,O=0;O<e.done.length;O++)e.done[O].ranges||++t;for(var M=0;M<e.undone.length;M++)e.undone[M].ranges||++A;return{undo:t,redo:A}},clearHistory:function(){var e=this;this.history=new Ri(this.history.maxGeneration),ea(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Ma(this.history.done),undone:Ma(this.history.undone)}},setHistory:function(e){var t=this.history=new Ri(this.history.maxGeneration);t.done=Ma(e.done.slice(0),null,!0),t.undone=Ma(e.undone.slice(0),null,!0)},setGutterMarker:Tr(function(e,t,A){return li(this,e,"gutter",function(O){var M=O.gutterMarkers||(O.gutterMarkers={});return M[t]=A,!A&&$(M)&&(O.gutterMarkers=null),!0})}),clearGutter:Tr(function(e){var t=this;this.iter(function(A){A.gutterMarkers&&A.gutterMarkers[e]&&li(t,A,"gutter",function(){return A.gutterMarkers[e]=null,$(A.gutterMarkers)&&(A.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Nt(this,e))return null;if(t=e,e=ut(this,e),!e)return null}else if(t=It(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Tr(function(e,t,A){return li(this,e,t=="gutter"?"gutter":"class",function(O){var M=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!O[M])O[M]=A;else{if(D(A).test(O[M]))return!1;O[M]+=" "+A}return!0})}),removeLineClass:Tr(function(e,t,A){return li(this,e,t=="gutter"?"gutter":"class",function(O){var M=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",V=O[M];if(V)if(A==null)O[M]=null;else{var ae=V.match(D(A));if(!ae)return!1;var de=ae.index+ae[0].length;O[M]=V.slice(0,ae.index)+(!ae.index||de==V.length?"":" ")+V.slice(de)||null}else return!1;return!0})}),addLineWidget:Tr(function(e,t,A){return wl(this,e,t,A)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,A){return Ua(this,St(this,e),St(this,t),A,A&&A.type||"range")},setBookmark:function(e,t){var A={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=St(this,e),Ua(this,e,e,A,"bookmark")},findMarksAt:function(e){e=St(this,e);var t=[],A=ut(this,e.line).markedSpans;if(A)for(var O=0;O<A.length;++O){var M=A[O];(M.from==null||M.from<=e.ch)&&(M.to==null||M.to>=e.ch)&&t.push(M.marker.parent||M.marker)}return t},findMarks:function(e,t,A){e=St(this,e),t=St(this,t);var O=[],M=e.line;return this.iter(e.line,t.line+1,function(V){var ae=V.markedSpans;if(ae)for(var de=0;de<ae.length;de++){var fe=ae[de];!(fe.to!=null&&M==e.line&&e.ch>=fe.to||fe.from==null&&M!=e.line||fe.from!=null&&M==t.line&&fe.from>=t.ch)&&(!A||A(fe.marker))&&O.push(fe.marker.parent||fe.marker)}++M}),O},getAllMarks:function(){var e=[];return this.iter(function(t){var A=t.markedSpans;if(A)for(var O=0;O<A.length;++O)A[O].from!=null&&e.push(A[O].marker)}),e},posFromIndex:function(e){var t,A=this.first,O=this.lineSeparator().length;return this.iter(function(M){var V=M.text.length+O;if(V>e)return t=e,!0;e-=V,++A}),St(this,Je(A,t))},indexFromPos:function(e){e=St(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var A=this.lineSeparator().length;return this.iter(this.first,e.line,function(O){t+=O.text.length+A}),t},copy:function(e){var t=new Br(qt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,A=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<A&&(A=e.to);var O=new Br(qt(this,t,A),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(O.history=this.history),(this.linked||(this.linked=[])).push({doc:O,sharedHist:e.sharedHist}),O.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Sl(O,ms(this)),O},unlinkDoc:function(e){if(e instanceof er&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var A=this.linked[t];if(A.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),_l(ms(this));break}if(e.history==this.history){var O=[e.id];ea(e,function(M){return O.push(M.id)},!0),e.history=new Ri(null),e.history.done=Ma(this.history.done,O),e.history.undone=Ma(this.history.undone,O)}},iterLinkedDocs:function(e){ea(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):gt(e)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Tr(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&pl(this.cm)})}),Br.prototype.eachLine=Br.prototype.iter;var gs=0;function Ol(e){var t=this;if(vs(t),He(t,e)||$t(t.display,e))return;ye(e),S&&(gs=+new Date);var A=pa(t,e,!0),O=e.dataTransfer.files;if(!A||t.isReadOnly())return;if(O&&O.length&&window.FileReader&&window.File)for(var M=O.length,V=Array(M),ae=0,de=function(){++ae==M&&wr(t,function(){A=St(t.doc,A);var Me={from:A,to:A,text:t.doc.splitLines(V.filter(function(ze){return ze!=null}).join(t.doc.lineSeparator())),origin:"paste"};Fa(t.doc,Me),ts(t.doc,Qn(St(t.doc,A),St(t.doc,qn(Me))))})()},fe=function(Me,ze){if(t.options.allowDropFileTypes&&ie(t.options.allowDropFileTypes,Me.type)==-1){de();return}var $e=new FileReader;$e.onerror=function(){return de()},$e.onload=function(){var nt=$e.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(nt)){de();return}V[ze]=nt,de()},$e.readAsText(Me)},ve=0;ve<O.length;ve++)fe(O[ve],ve);else{if(t.state.draggingText&&t.doc.sel.contains(A)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var Se=e.dataTransfer.getData("Text");if(Se){var De;if(t.state.draggingText&&!t.state.draggingText.copy&&(De=t.listSelections()),Pi(t.doc,Qn(A,A)),De)for(var Ue=0;Ue<De.length;++Ue)ja(t.doc,"",De[Ue].anchor,De[Ue].head,"drag");t.replaceSelection(Se,"around","paste"),t.display.input.focus()}}catch(Me){}}}function Al(e,t){if(S&&(!e.state.draggingText||+new Date-gs<100)){Oe(t);return}if(He(e,t)||$t(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f){var A=C("img",null,null,"position: fixed; left: 0; top: 0;");A.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(A.width=A.height=1,e.display.wrapper.appendChild(A),A._top=A.offsetTop),t.dataTransfer.setDragImage(A,0,0),d&&A.parentNode.removeChild(A)}}function Dl(e,t){var A=pa(e,t);if(!A)return;var O=document.createDocumentFragment();Do(e,A,O),e.display.dragCursor||(e.display.dragCursor=C("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),x(e.display.dragCursor,O)}function vs(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ys(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),A=[],O=0;O<t.length;O++){var M=t[O].CodeMirror;M&&A.push(M)}A.length&&A[0].operation(function(){for(var V=0;V<A.length;V++)e(A[V])})}var bs=!1;function Rl(){if(bs)return;Ll(),bs=!0}function Ll(){var e;_e(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,ys(kl)},100))}),_e(window,"blur",function(){return ys(ka)})}function kl(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var ra={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"},hi=0;hi<10;hi++)ra[hi+48]=ra[hi+96]=String(hi);for(var Ni=65;Ni<=90;Ni++)ra[Ni]=String.fromCharCode(Ni);for(var pi=1;pi<=12;pi++)ra[pi+111]=ra[pi+63235]="F"+pi;var Wn={};Wn.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"},Wn.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"},Wn.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"},Wn.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"]},Wn.default=s?Wn.macDefault:Wn.pcDefault;function Pl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var A,O,M,V,ae=0;ae<t.length-1;ae++){var de=t[ae];if(/^(cmd|meta|m)$/i.test(de))V=!0;else if(/^a(lt)?$/i.test(de))A=!0;else if(/^(c|ctrl|control)$/i.test(de))O=!0;else if(/^s(hift)?$/i.test(de))M=!0;else throw new Error("Unrecognized modifier name: "+de)}return A&&(e="Alt-"+e),O&&(e="Ctrl-"+e),V&&(e="Cmd-"+e),M&&(e="Shift-"+e),e}function Il(e){var t={};for(var A in e)if(e.hasOwnProperty(A)){var O=e[A];if(/^(name|fallthrough|(de|at)tach)$/.test(A))continue;if(O=="..."){delete e[A];continue}for(var M=se(A.split(" "),Pl),V=0;V<M.length;V++){var ae=void 0,de=void 0;V==M.length-1?(de=M.join(" "),ae=O):(de=M.slice(0,V+1).join(" "),ae="...");var fe=t[de];if(!fe)t[de]=ae;else if(fe!=ae)throw new Error("Inconsistent bindings for "+de)}delete e[A]}for(var ve in t)e[ve]=t[ve];return e}function Ba(e,t,A,O){t=Fi(t);var M=t.call?t.call(e,O):t[e];if(M===!1)return"nothing";if(M==="...")return"multi";if(M!=null&&A(M))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ba(e,t.fallthrough,A,O);for(var V=0;V<t.fallthrough.length;V++){var ae=Ba(e,t.fallthrough[V],A,O);if(ae)return ae}}}function xs(e){var t=typeof e=="string"?e:ra[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Es(e,t,A){var O=e;return t.altKey&&O!="Alt"&&(e="Alt-"+e),(a?t.metaKey:t.ctrlKey)&&O!="Ctrl"&&(e="Ctrl-"+e),(a?t.ctrlKey:t.metaKey)&&O!="Mod"&&(e="Cmd-"+e),!A&&t.shiftKey&&O!="Shift"&&(e="Shift-"+e),e}function ws(e,t){if(d&&e.keyCode==34&&e.char)return!1;var A=ra[e.keyCode];return A==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(A=e.code),Es(A,e,t))}function Fi(e){return typeof e=="string"?Wn[e]:e}function Wa(e,t){for(var A=e.doc.sel.ranges,O=[],M=0;M<A.length;M++){for(var V=t(A[M]);O.length&&yt(V.from,Q(O).to)<=0;){var ae=O.pop();if(yt(ae.from,V.from)<0){V.from=ae.from;break}}O.push(V)}Xr(e,function(){for(var de=O.length-1;de>=0;de--)ja(e.doc,"",O[de].from,O[de].to,"+delete");Pa(e)})}function fo(e,t,A){var O=xe(e.text,t+A,A);return O<0||O>e.text.length?null:O}function ho(e,t,A){var O=fo(e,t.ch,A);return O==null?null:new Je(t.line,O,A<0?"after":"before")}function po(e,t,A,O,M){if(e){t.doc.direction=="rtl"&&(M=-M);var V=Fe(A,t.doc.direction);if(V){var ae=M<0?Q(V):V[0],de=M<0==(ae.level==1),fe=de?"after":"before",ve;if(ae.level>0||t.doc.direction=="rtl"){var Se=en(t,A);ve=M<0?A.text.length-1:0;var De=zr(t,Se,ve).top;ve=Re(function(Ue){return zr(t,Se,Ue).top==De},M<0==(ae.level==1)?ae.from:ae.to-1,ve),fe=="before"&&(ve=fo(A,ve,1))}else ve=M<0?ae.to:ae.from;return new Je(O,ve,fe)}}return new Je(O,M<0?A.text.length:0,M<0?"before":"after")}function Ml(e,t,A,O){var M=Fe(t,e.doc.direction);if(!M)return ho(t,A,O);A.ch>=t.text.length?(A.ch=t.text.length,A.sticky="before"):A.ch<=0&&(A.ch=0,A.sticky="after");var V=Pe(M,A.ch,A.sticky),ae=M[V];if(e.doc.direction=="ltr"&&ae.level%2==0&&(O>0?ae.to>A.ch:ae.from<A.ch))return ho(t,A,O);var de=function(st,ft){return fo(t,st instanceof Je?st.ch:st,ft)},fe,ve=function(st){return e.options.lineWrapping?(fe=fe||en(e,t),_o(e,t,fe,st)):{begin:0,end:t.text.length}},Se=ve(A.sticky=="before"?de(A,-1):A.ch);if(e.doc.direction=="rtl"||ae.level==1){var De=ae.level==1==O<0,Ue=de(A,De?1:-1);if(Ue!=null&&(De?Ue<=ae.to&&Ue<=Se.end:Ue>=ae.from&&Ue>=Se.begin)){var Me=De?"before":"after";return new Je(A.line,Ue,Me)}}var ze=function(st,ft,lt){for(var mt=function(Zt,Sr){return Sr?new Je(A.line,de(Zt,1),"before"):new Je(A.line,Zt,"after")};st>=0&&st<M.length;st+=ft){var _t=M[st],xt=ft>0==(_t.level!=1),Ut=xt?lt.begin:de(lt.end,-1);if(_t.from<=Ut&&Ut<_t.to)return mt(Ut,xt);if(Ut=xt?_t.from:de(_t.to,-1),lt.begin<=Ut&&Ut<lt.end)return mt(Ut,xt)}},$e=ze(V+O,O,Se);if($e)return $e;var nt=O>0?Se.end:de(Se.begin,-1);return nt!=null&&!(O>0&&nt==t.text.length)&&($e=ze(O>0?0:M.length-1,O,ve(nt)),$e)?$e:null}var mi={selectAll:os,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),be)},killLine:function(e){return Wa(e,function(t){if(t.empty()){var A=ut(e.doc,t.head.line).text.length;return t.head.ch==A&&t.head.line<e.lastLine()?{from:t.head,to:Je(t.head.line+1,0)}:{from:t.head,to:Je(t.head.line,A)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Wa(e,function(t){return{from:Je(t.from().line,0),to:St(e.doc,Je(t.to().line+1,0))}})},delLineLeft:function(e){return Wa(e,function(t){return{from:Je(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Wa(e,function(t){var A=e.charCoords(t.head,"div").top+5,O=e.coordsChar({left:0,top:A},"div");return{from:O,to:t.from()}})},delWrappedLineRight:function(e){return Wa(e,function(t){var A=e.charCoords(t.head,"div").top+5,O=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:A},"div");return{from:t.from(),to:O}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(Je(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Je(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Ts(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Ss(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Nl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var A=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:A},"div")},le)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var A=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:A},"div")},le)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var A=e.cursorCoords(t.head,"div").top+5,O=e.coordsChar({left:0,top:A},"div");return O.ch<e.getLine(O.line).search(/\S/)?Ss(e,t.head):O},le)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],A=e.listSelections(),O=e.options.tabSize,M=0;M<A.length;M++){var V=A[M].from(),ae=H(e.getLine(V.line),V.ch,O);t.push(oe(O-ae%O))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Xr(e,function(){for(var t=e.listSelections(),A=[],O=0;O<t.length;O++){if(!t[O].empty())continue;var M=t[O].head,V=ut(e.doc,M.line).text;if(V){if(M.ch==V.length&&(M=new Je(M.line,M.ch-1)),M.ch>0)M=new Je(M.line,M.ch+1),e.replaceRange(V.charAt(M.ch-1)+V.charAt(M.ch-2),Je(M.line,M.ch-2),M,"+transpose");else if(M.line>e.doc.first){var ae=ut(e.doc,M.line-1).text;ae&&(M=new Je(M.line,1),e.replaceRange(V.charAt(0)+e.doc.lineSeparator()+ae.charAt(ae.length-1),Je(M.line-1,ae.length-1),M,"+transpose"))}}A.push(new zt(M,M))}e.setSelections(A)})},newlineAndIndent:function(e){return Xr(e,function(){for(var t=e.listSelections(),A=t.length-1;A>=0;A--)e.replaceRange(e.doc.lineSeparator(),t[A].anchor,t[A].head,"+input");t=e.listSelections();for(var O=0;O<t.length;O++)e.indentLine(t[O].from().line,null,!0);Pa(e)})},openLine:function(e){return e.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Ts(e,t){var A=ut(e.doc,t),O=Dr(A);return O!=A&&(t=It(O)),po(!0,e,O,t,1)}function Nl(e,t){var A=ut(e.doc,t),O=Gn(A);return O!=A&&(t=It(O)),po(!0,e,A,t,-1)}function Ss(e,t){var A=Ts(e,t.line),O=ut(e.doc,A.line),M=Fe(O,e.doc.direction);if(!M||M[0].level==0){var V=Math.max(A.ch,O.text.search(/\S/)),ae=t.line==A.line&&t.ch<=V&&t.ch;return Je(A.line,ae?0:V,A.sticky)}return A}function ji(e,t,A){if(typeof t=="string"&&(t=mi[t],!t))return!1;e.display.input.ensurePolled();var O=e.display.shift,M=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),A&&(e.display.shift=!1),M=t(e)!=he}finally{e.display.shift=O,e.state.suppressEdits=!1}return M}function Fl(e,t,A){for(var O=0;O<e.state.keyMaps.length;O++){var M=Ba(t,e.state.keyMaps[O],A,e);if(M)return M}return e.options.extraKeys&&Ba(t,e.options.extraKeys,A,e)||Ba(t,e.options.keyMap,A,e)}var jl=new q;function gi(e,t,A,O){var M=e.state.keySeq;if(M){if(xs(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:jl.set(50,function(){e.state.keySeq==M&&(e.state.keySeq=null,e.display.input.reset())}),_s(e,M+" "+t,A,O))return!0}return _s(e,t,A,O)}function _s(e,t,A,O){var M=Fl(e,t,O);return M=="multi"&&(e.state.keySeq=t),M=="handled"&&Gt(e,"keyHandled",e,t,A),(M=="handled"||M=="multi")&&(ye(A),Ji(e)),!!M}function Cs(e,t){var A=ws(t,!0);return A?t.shiftKey&&!e.state.keySeq?gi(e,"Shift-"+A,t,function(O){return ji(e,O,!0)})||gi(e,A,t,function(O){if(typeof O=="string"?/^go[A-Z]/.test(O):O.motion)return ji(e,O)}):gi(e,A,t,function(O){return ji(e,O)}):!1}function Ul(e,t,A){return gi(e,"'"+A+"'",t,function(O){return ji(e,O,!0)})}var mo=null;function Os(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=X(),He(t,e))return;S&&p<11&&e.keyCode==27&&(e.returnValue=!1);var A=e.keyCode;t.display.shift=A==16||e.shiftKey;var O=Cs(t,e);d&&(mo=O?A:null,!O&&A==88&&!Rt&&(s?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),T&&!s&&!O&&A==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),A==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Bl(t)}function Bl(e){var t=e.display.lineDiv;G(t,"CodeMirror-crosshair");function A(O){(O.keyCode==18||!O.altKey)&&(c(t,"CodeMirror-crosshair"),Ve(document,"keyup",A),Ve(document,"mouseover",A))}_e(document,"keyup",A),_e(document,"mouseover",A)}function As(e){e.keyCode==16&&(this.doc.sel.shift=!1),He(this,e)}function Ds(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if($t(t.display,e)||He(t,e)||e.ctrlKey&&!e.altKey||s&&e.metaKey)return;var A=e.keyCode,O=e.charCode;if(d&&A==mo){mo=null,ye(e);return}if(d&&(!e.which||e.which<10)&&Cs(t,e))return;var M=String.fromCharCode(O==null?A:O);if(M=="\b")return;if(Ul(t,e,M))return;t.display.input.onKeyPress(e)}var Wl=400,go=function(e,t,A){this.time=e,this.pos=t,this.button=A};go.prototype.compare=function(e,t,A){return this.time+Wl>e&&yt(t,this.pos)==0&&A==this.button};var vi,yi;function Hl(e,t){var A=+new Date;return yi&&yi.compare(A,e,t)?(vi=yi=null,"triple"):vi&&vi.compare(A,e,t)?(yi=new go(A,e,t),vi=null,"double"):(vi=new go(A,e,t),yi=null,"single")}function Rs(e){var t=this,A=t.display;if(He(t,e)||A.activeTouch&&A.input.supportsTouch())return;if(A.input.ensurePolled(),A.shift=e.shiftKey,$t(A,e)){o||(A.scroller.draggable=!1,setTimeout(function(){return A.scroller.draggable=!0},100));return}if(vo(t,e))return;var O=pa(t,e),M=Be(e),V=O?Hl(O,M):"single";if(window.focus(),M==1&&t.state.selectingText&&t.state.selectingText(e),O&&Kl(t,M,O,V,e))return;M==1?O?zl(t,O,V,e):Ce(e)==A.scroller&&ye(e):M==2?(O&&ki(t.doc,O),setTimeout(function(){return A.input.focus()},20)):M==3&&(R?t.display.input.onContextMenu(e):Lo(t))}function Kl(e,t,A,O,M){var V="Click";return O=="double"?V="Double"+V:O=="triple"&&(V="Triple"+V),V=(t==1?"Left":t==2?"Middle":"Right")+V,gi(e,Es(V,M),M,function(ae){if(typeof ae=="string"&&(ae=mi[ae]),!ae)return!1;var de=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),de=ae(e,A)!=he}finally{e.state.suppressEdits=!1}return de})}function Gl(e,t,A){var O=e.getOption("configureMouse"),M=O?O(e,t,A):{};if(M.unit==null){var V=u?A.shiftKey&&A.metaKey:A.altKey;M.unit=V?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(M.extend==null||e.doc.extend)&&(M.extend=e.doc.extend||A.shiftKey),M.addNew==null&&(M.addNew=s?A.metaKey:A.ctrlKey),M.moveOnDrag==null&&(M.moveOnDrag=!(s?A.altKey:A.ctrlKey)),M}function zl(e,t,A,O){S?setTimeout(B(Ro,e),0):e.curOp.focus=X();var M=Gl(e,A,O),V=e.doc.sel,ae;e.options.dragDrop&&Ke&&!e.isReadOnly()&&A=="single"&&(ae=V.contains(t))>-1&&(yt((ae=V.ranges[ae]).from(),t)<0||t.xRel>0)&&(yt(ae.to(),t)>0||t.xRel<0)?Xl(e,O,t,M):Vl(e,O,t,M)}function Xl(e,t,A,O){var M=e.display,V=!1,ae=wr(e,function(ve){o&&(M.scroller.draggable=!1),e.state.draggingText=!1,Ve(M.wrapper.ownerDocument,"mouseup",ae),Ve(M.wrapper.ownerDocument,"mousemove",de),Ve(M.scroller,"dragstart",fe),Ve(M.scroller,"drop",ae),V||(ye(ve),O.addNew||ki(e.doc,A,null,null,O.extend),o&&!f||S&&p==9?setTimeout(function(){M.wrapper.ownerDocument.body.focus({preventScroll:!0}),M.input.focus()},20):M.input.focus())}),de=function(ve){V=V||Math.abs(t.clientX-ve.clientX)+Math.abs(t.clientY-ve.clientY)>=10},fe=function(){return V=!0};o&&(M.scroller.draggable=!0),e.state.draggingText=ae,ae.copy=!O.moveOnDrag,M.scroller.dragDrop&&M.scroller.dragDrop(),_e(M.wrapper.ownerDocument,"mouseup",ae),_e(M.wrapper.ownerDocument,"mousemove",de),_e(M.scroller,"dragstart",fe),_e(M.scroller,"drop",ae),Lo(e),setTimeout(function(){return M.input.focus()},20)}function Ls(e,t,A){if(A=="char")return new zt(t,t);if(A=="word")return e.findWordAt(t);if(A=="line")return new zt(Je(t.line,0),St(e.doc,Je(t.line+1,0)));var O=A(e,t);return new zt(O.from,O.to)}function Vl(e,t,A,O){var M=e.display,V=e.doc;ye(t);var ae,de,fe=V.sel,ve=fe.ranges;if(O.addNew&&!O.extend?(de=V.sel.contains(A),de>-1?ae=ve[de]:ae=new zt(A,A)):(ae=V.sel.primary(),de=V.sel.primIndex),O.unit=="rectangle")O.addNew||(ae=new zt(A,A)),A=pa(e,t,!0,!0),de=-1;else{var Se=Ls(e,A,O.unit);O.extend?ae=uo(ae,Se.anchor,Se.head,O.extend):ae=Se}O.addNew?de==-1?(de=ve.length,Lr(V,_n(e,ve.concat([ae]),de),{scroll:!1,origin:"*mouse"})):ve.length>1&&ve[de].empty()&&O.unit=="char"&&!O.extend?(Lr(V,_n(e,ve.slice(0,de).concat(ve.slice(de+1)),0),{scroll:!1,origin:"*mouse"}),fe=V.sel):co(V,de,ae,ne):(de=0,Lr(V,new nn([ae],0),ne),fe=V.sel);var De=A;function Ue(lt){if(yt(De,lt)==0)return;if(De=lt,O.unit=="rectangle"){for(var mt=[],_t=e.options.tabSize,xt=H(ut(V,A.line).text,A.ch,_t),Ut=H(ut(V,lt.line).text,lt.ch,_t),Zt=Math.min(xt,Ut),Sr=Math.max(xt,Ut),nr=Math.min(A.line,lt.line),Vr=Math.min(e.lastLine(),Math.max(A.line,lt.line));nr<=Vr;nr++){var Wr=ut(V,nr).text,hr=ue(Wr,Zt,_t);Zt==Sr?mt.push(new zt(Je(nr,hr),Je(nr,hr))):Wr.length>hr&&mt.push(new zt(Je(nr,hr),Je(nr,ue(Wr,Sr,_t))))}mt.length||mt.push(new zt(A,A)),Lr(V,_n(e,fe.ranges.slice(0,de).concat(mt),de),{origin:"*mouse",scroll:!1}),e.scrollIntoView(lt)}else{var Hr=ae,Cr=Ls(e,lt,O.unit),yr=Hr.anchor,pr;yt(Cr.anchor,yr)>0?(pr=Cr.head,yr=Pr(Hr.from(),Cr.anchor)):(pr=Cr.anchor,yr=jr(Hr.to(),Cr.head));var ir=fe.ranges.slice(0);ir[de]=Yl(e,new zt(St(V,yr),pr)),Lr(V,_n(e,ir,de),ne)}}var Me=M.wrapper.getBoundingClientRect(),ze=0;function $e(lt){var mt=++ze,_t=pa(e,lt,!0,O.unit=="rectangle");if(!_t)return;if(yt(_t,De)!=0){e.curOp.focus=X(),Ue(_t);var xt=Ci(M,V);(_t.line>=xt.to||_t.line<xt.from)&&setTimeout(wr(e,function(){ze==mt&&$e(lt)}),150)}else{var Ut=lt.clientY<Me.top?-20:lt.clientY>Me.bottom?20:0;Ut&&setTimeout(wr(e,function(){if(ze!=mt)return;M.scroller.scrollTop+=Ut,$e(lt)}),50)}}function nt(lt){e.state.selectingText=!1,ze=Infinity,lt&&(ye(lt),M.input.focus()),Ve(M.wrapper.ownerDocument,"mousemove",st),Ve(M.wrapper.ownerDocument,"mouseup",ft),V.history.lastSelOrigin=null}var st=wr(e,function(lt){lt.buttons===0||!Be(lt)?nt(lt):$e(lt)}),ft=wr(e,nt);e.state.selectingText=ft,_e(M.wrapper.ownerDocument,"mousemove",st),_e(M.wrapper.ownerDocument,"mouseup",ft)}function Yl(e,t){var A=t.anchor,O=t.head,M=ut(e.doc,A.line);if(yt(A,O)==0&&A.sticky==O.sticky)return t;var V=Fe(M);if(!V)return t;var ae=Pe(V,A.ch,A.sticky),de=V[ae];if(de.from!=A.ch&&de.to!=A.ch)return t;var fe=ae+(de.from==A.ch==(de.level!=1)?0:1);if(fe==0||fe==V.length)return t;var ve;if(O.line!=A.line)ve=(O.line-A.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Se=Pe(V,O.ch,O.sticky),De=Se-ae||(O.ch-A.ch)*(de.level==1?-1:1);Se==fe-1||Se==fe?ve=De<0:ve=De>0}var Ue=V[fe+(ve?-1:0)],Me=ve==(Ue.level==1),ze=Me?Ue.from:Ue.to,$e=Me?"after":"before";return A.ch==ze&&A.sticky==$e?t:new zt(new Je(A.line,ze,$e),O)}function ks(e,t,A,O){var M,V;if(t.touches)M=t.touches[0].clientX,V=t.touches[0].clientY;else try{M=t.clientX,V=t.clientY}catch(Ue){return!1}if(M>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;O&&ye(t);var ae=e.display,de=ae.lineDiv.getBoundingClientRect();if(V>de.bottom||!Te(e,A))return we(t);V-=de.top-ae.viewOffset;for(var fe=0;fe<e.display.gutterSpecs.length;++fe){var ve=ae.gutters.childNodes[fe];if(ve&&ve.getBoundingClientRect().right>=M){var Se=tr(e.doc,V),De=e.display.gutterSpecs[fe];return Ie(e,A,e,Se,De.className,t),we(t)}}}function vo(e,t){return ks(e,t,"gutterClick",!0)}function Ps(e,t){if($t(e.display,t)||$l(e,t))return;if(He(e,t,"contextmenu"))return;R||e.display.input.onContextMenu(t)}function $l(e,t){return Te(e,"gutterContextMenu")?ks(e,t,"gutterContextMenu",!1):!1}function Is(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),$n(e)}var Ha={toString:function(){return"CodeMirror.Init"}},Ms={},Ui={};function Jl(e){var t=e.optionHandlers;function A(O,M,V,ae){e.defaults[O]=M,V&&(t[O]=ae?function(de,fe,ve){ve!=Ha&&V(de,fe,ve)}:V)}e.defineOption=A,e.Init=Ha,A("value","",function(O,M){return O.setValue(M)},!0),A("mode",null,function(O,M){O.doc.modeOption=M,oo(O)},!0),A("indentUnit",2,oo,!0),A("indentWithTabs",!1),A("smartIndent",!0),A("tabSize",4,function(O){oi(O),$n(O),Ur(O)},!0),A("lineSeparator",null,function(O,M){if(O.doc.lineSep=M,!M)return;var V=[],ae=O.doc.first;O.doc.iter(function(fe){for(var ve=0;;){var Se=fe.text.indexOf(M,ve);if(Se==-1)break;ve=Se+M.length,V.push(Je(ae,Se))}ae++});for(var de=V.length-1;de>=0;de--)ja(O.doc,M,V[de],Je(V[de].line,V[de].ch+M.length))}),A("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(O,M,V){O.state.specialChars=new RegExp(M.source+(M.test(" ")?"":"| "),"g"),V!=Ha&&O.refresh()}),A("specialCharPlaceholder",Ze,function(O){return O.refresh()},!0),A("electricChars",!0),A("inputStyle",n?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),A("spellcheck",!1,function(O,M){return O.getInputField().spellcheck=M},!0),A("autocorrect",!1,function(O,M){return O.getInputField().autocorrect=M},!0),A("autocapitalize",!1,function(O,M){return O.getInputField().autocapitalize=M},!0),A("rtlMoveVisually",!w),A("wholeLineUpdateBefore",!0),A("theme","default",function(O){Is(O),ii(O)},!0),A("keyMap","default",function(O,M,V){var ae=Fi(M),de=V!=Ha&&Fi(V);de&&de.detach&&de.detach(O,ae),ae.attach&&ae.attach(O,de||null)}),A("extraKeys",null),A("configureMouse",null),A("lineWrapping",!1,Ql,!0),A("gutters",[],function(O,M){O.display.gutterSpecs=ao(M,O.options.lineNumbers),ii(O)},!0),A("fixedGutter",!0,function(O,M){O.display.gutters.style.left=M?Yi(O.display)+"px":"0",O.refresh()},!0),A("coverGutterNextToScrollbar",!1,function(O){return Ia(O)},!0),A("scrollbarStyle","native",function(O){Fo(O),Ia(O),O.display.scrollbars.setScrollTop(O.doc.scrollTop),O.display.scrollbars.setScrollLeft(O.doc.scrollLeft)},!0),A("lineNumbers",!1,function(O,M){O.display.gutterSpecs=ao(O.options.gutters,M),ii(O)},!0),A("firstLineNumber",1,ii,!0),A("lineNumberFormatter",function(O){return O},ii,!0),A("showCursorWhenSelecting",!1,qa,!0),A("resetSelectionOnContextMenu",!0),A("lineWiseCopyCut",!0),A("pasteLinesPerSelection",!0),A("selectionsMayTouch",!1),A("readOnly",!1,function(O,M){M=="nocursor"&&(ka(O),O.display.input.blur()),O.display.input.readOnlyChanged(M)}),A("screenReaderLabel",null,function(O,M){M=M===""?null:M,O.display.input.screenReaderLabelChanged(M)}),A("disableInput",!1,function(O,M){M||O.display.input.reset()},!0),A("dragDrop",!0,Zl),A("allowDropFileTypes",null),A("cursorBlinkRate",530),A("cursorScrollMargin",0),A("cursorHeight",1,qa,!0),A("singleCursorHeightPerLine",!0,qa,!0),A("workTime",100),A("workDelay",100),A("flattenSpans",!0,oi,!0),A("addModeClass",!1,oi,!0),A("pollInterval",100),A("undoDepth",200,function(O,M){return O.doc.history.undoDepth=M}),A("historyEventDelay",1250),A("viewportMargin",10,function(O){return O.refresh()},!0),A("maxHighlightLength",1e4,oi,!0),A("moveInputWithCursor",!0,function(O,M){M||O.display.input.resetPosition()}),A("tabindex",null,function(O,M){return O.display.input.getField().tabIndex=M||""}),A("autofocus",null),A("direction","ltr",function(O,M){return O.doc.setDirection(M)},!0),A("phrases",null)}function Zl(e,t,A){var O=A&&A!=Ha;if(!t!=!O){var M=e.display.dragFunctions,V=t?_e:Ve;V(e.display.scroller,"dragstart",M.start),V(e.display.scroller,"dragenter",M.enter),V(e.display.scroller,"dragover",M.over),V(e.display.scroller,"dragleave",M.leave),V(e.display.scroller,"drop",M.drop)}}function Ql(e){e.options.lineWrapping?(G(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(c(e.display.wrapper,"CodeMirror-wrap"),Sa(e)),$i(e),Ur(e),$n(e),setTimeout(function(){return Ia(e)},100)}function er(e,t){var A=this;if(!(this instanceof er))return new er(e,t);this.options=t=t?U(t):{},U(Ms,t,!1);var O=t.value;typeof O=="string"?O=new Br(O,t.mode,null,t.lineSeparator,t.direction):t.mode&&(O.modeOption=t.mode),this.doc=O;var M=new er.inputStyles[t.inputStyle](this),V=this.display=new dl(e,O,M,t);V.wrapper.CodeMirror=this,Is(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fo(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new q,keySeq:null,specialChars:null},t.autofocus&&!n&&V.input.focus(),S&&p<11&&setTimeout(function(){return A.display.input.reset(!0)},20),ql(this),Rl(),ya(this),this.curOp.forceUpdate=!0,Vo(this,O),t.autofocus&&!n||this.hasFocus()?setTimeout(function(){A.hasFocus()&&!A.state.focused&&Zi(A)},20):ka(this);for(var ae in Ui)Ui.hasOwnProperty(ae)&&Ui[ae](this,t[ae],Ha);Bo(this),t.finishInit&&t.finishInit(this);for(var de=0;de<yo.length;++de)yo[de](this);ba(this),o&&t.lineWrapping&&getComputedStyle(V.lineDiv).textRendering=="optimizelegibility"&&(V.lineDiv.style.textRendering="auto")}er.defaults=Ms,er.optionHandlers=Ui;function ql(e){var t=e.display;_e(t.scroller,"mousedown",wr(e,Rs)),S&&p<11?_e(t.scroller,"dblclick",wr(e,function(fe){if(He(e,fe))return;var ve=pa(e,fe);if(!ve||vo(e,fe)||$t(e.display,fe))return;ye(fe);var Se=e.findWordAt(ve);ki(e.doc,Se.anchor,Se.head)})):_e(t.scroller,"dblclick",function(fe){return He(e,fe)||ye(fe)}),_e(t.scroller,"contextmenu",function(fe){return Ps(e,fe)}),_e(t.input.getField(),"contextmenu",function(fe){t.scroller.contains(fe.target)||Ps(e,fe)});var A,O={end:0};function M(){t.activeTouch&&(A=setTimeout(function(){return t.activeTouch=null},1e3),O=t.activeTouch,O.end=+new Date)}function V(fe){if(fe.touches.length!=1)return!1;var ve=fe.touches[0];return ve.radiusX<=1&&ve.radiusY<=1}function ae(fe,ve){if(ve.left==null)return!0;var Se=ve.left-fe.left,De=ve.top-fe.top;return Se*Se+De*De>20*20}_e(t.scroller,"touchstart",function(fe){if(!He(e,fe)&&!V(fe)&&!vo(e,fe)){t.input.ensurePolled(),clearTimeout(A);var ve=+new Date;t.activeTouch={start:ve,moved:!1,prev:ve-O.end<=300?O:null},fe.touches.length==1&&(t.activeTouch.left=fe.touches[0].pageX,t.activeTouch.top=fe.touches[0].pageY)}}),_e(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),_e(t.scroller,"touchend",function(fe){var ve=t.activeTouch;if(ve&&!$t(t,fe)&&ve.left!=null&&!ve.moved&&new Date-ve.start<300){var Se=e.coordsChar(t.activeTouch,"page"),De;!ve.prev||ae(ve,ve.prev)?De=new zt(Se,Se):!ve.prev.prev||ae(ve,ve.prev.prev)?De=e.findWordAt(Se):De=new zt(Je(Se.line,0),St(e.doc,Je(Se.line+1,0))),e.setSelection(De.anchor,De.head),e.focus(),ye(fe)}M()}),_e(t.scroller,"touchcancel",M),_e(t.scroller,"scroll",function(){t.scroller.clientHeight&&(ti(e,t.scroller.scrollTop),ga(e,t.scroller.scrollLeft,!0),Ie(e,"scroll",e))}),_e(t.scroller,"mousewheel",function(fe){return Ko(e,fe)}),_e(t.scroller,"DOMMouseScroll",function(fe){return Ko(e,fe)}),_e(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(fe){He(e,fe)||Oe(fe)},over:function(fe){He(e,fe)||(Dl(e,fe),Oe(fe))},start:function(fe){return Al(e,fe)},drop:wr(e,Ol),leave:function(fe){He(e,fe)||vs(e)}};var de=t.input.getField();_e(de,"keyup",function(fe){return As.call(e,fe)}),_e(de,"keydown",wr(e,Os)),_e(de,"keypress",wr(e,Ds)),_e(de,"focus",function(fe){return Zi(e,fe)}),_e(de,"blur",function(fe){return ka(e,fe)})}var yo=[];er.defineInitHook=function(e){return yo.push(e)};function bi(e,t,A,O){var M=e.doc,V;A==null&&(A="add"),A=="smart"&&(M.mode.indent?V=xr(e,t).state:A="prev");var ae=e.options.tabSize,de=ut(M,t),fe=H(de.text,null,ae);de.stateAfter&&(de.stateAfter=null);var ve=de.text.match(/^\s*/)[0],Se;if(!O&&!/\S/.test(de.text))Se=0,A="not";else if(A=="smart"&&(Se=M.mode.indent(V,de.text.slice(ve.length),de.text),Se==he||Se>150)){if(!O)return;A="prev"}A=="prev"?t>M.first?Se=H(ut(M,t-1).text,null,ae):Se=0:A=="add"?Se=fe+e.options.indentUnit:A=="subtract"?Se=fe-e.options.indentUnit:typeof A=="number"&&(Se=fe+A),Se=Math.max(0,Se);var De="",Ue=0;if(e.options.indentWithTabs)for(var Me=Math.floor(Se/ae);Me;--Me)Ue+=ae,De+=" ";if(Ue<Se&&(De+=oe(Se-Ue)),De!=ve)return ja(M,De,Je(t,0),Je(t,ve.length),"+input"),de.stateAfter=null,!0;for(var ze=0;ze<M.sel.ranges.length;ze++){var $e=M.sel.ranges[ze];if($e.head.line==t&&$e.head.ch<ve.length){var nt=Je(t,ve.length);co(M,ze,new zt(nt,nt));break}}}var Cn=null;function Bi(e){Cn=e}function bo(e,t,A,O,M){var V=e.doc;e.display.shift=!1,O||(O=V.sel);var ae=+new Date-200,de=M=="paste"||e.state.pasteIncoming>ae,fe=gt(t),ve=null;if(de&&O.ranges.length>1)if(Cn&&Cn.text.join(`
|
|
|
`)==t){if(O.ranges.length%Cn.text.length==0){ve=[];for(var Se=0;Se<Cn.text.length;Se++)ve.push(V.splitLines(Cn.text[Se]))}}else fe.length==O.ranges.length&&e.options.pasteLinesPerSelection&&(ve=se(fe,function(st){return[st]}));for(var De=e.curOp.updateInput,Ue=O.ranges.length-1;Ue>=0;Ue--){var Me=O.ranges[Ue],ze=Me.from(),$e=Me.to();Me.empty()&&(A&&A>0?ze=Je(ze.line,ze.ch-A):e.state.overwrite&&!de?$e=Je($e.line,Math.min(ut(V,$e.line).text.length,$e.ch+Q(fe).length)):de&&Cn&&Cn.lineWise&&Cn.text.join(`
|
|
|
`)==fe.join(`
|
|
|
`)&&(ze=$e=Je(ze.line,0)));var nt={from:ze,to:$e,text:ve?ve[Ue%ve.length]:fe,origin:M||(de?"paste":e.state.cutIncoming>ae?"cut":"+input")};Fa(e.doc,nt),Gt(e,"inputRead",e,nt)}t&&!de&&Fs(e,t),Pa(e),e.curOp.updateInput<2&&(e.curOp.updateInput=De),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ns(e,t){var A=e.clipboardData&&e.clipboardData.getData("Text");if(A)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&Xr(t,function(){return bo(t,A,0,null,"paste")}),!0}function Fs(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var A=e.doc.sel,O=A.ranges.length-1;O>=0;O--){var M=A.ranges[O];if(M.head.ch>100||O&&A.ranges[O-1].head.line==M.head.line)continue;var V=e.getModeAt(M.head),ae=!1;if(V.electricChars){for(var de=0;de<V.electricChars.length;de++)if(t.indexOf(V.electricChars.charAt(de))>-1){ae=bi(e,M.head.line,"smart");break}}else V.electricInput&&(V.electricInput.test(ut(e.doc,M.head.line).text.slice(0,M.head.ch))&&(ae=bi(e,M.head.line,"smart")));ae&&Gt(e,"electricInput",e,M.head.line)}}function js(e){for(var t=[],A=[],O=0;O<e.doc.sel.ranges.length;O++){var M=e.doc.sel.ranges[O].head.line,V={anchor:Je(M,0),head:Je(M+1,0)};A.push(V),t.push(e.getRange(V.anchor,V.head))}return{text:t,ranges:A}}function Us(e,t,A,O){e.setAttribute("autocorrect",A?"":"off"),e.setAttribute("autocapitalize",O?"":"off"),e.setAttribute("spellcheck",!!t)}function Bs(){var e=C("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=C("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return o?e.style.width="1000px":e.setAttribute("wrap","off"),y&&(e.style.border="1px solid black"),Us(e),t}function eu(e){var t=e.optionHandlers,A=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(O,M){var V=this.options,ae=V[O];if(V[O]==M&&O!="mode")return;V[O]=M,t.hasOwnProperty(O)&&wr(this,t[O])(this,M,ae),Ie(this,"optionChange",this,O)},getOption:function(O){return this.options[O]},getDoc:function(){return this.doc},addKeyMap:function(O,M){this.state.keyMaps[M?"push":"unshift"](Fi(O))},removeKeyMap:function(O){for(var M=this.state.keyMaps,V=0;V<M.length;++V)if(M[V]==O||M[V].name==O)return M.splice(V,1),!0},addOverlay:Mr(function(O,M){var V=O.token?O:e.getMode(this.options,O);if(V.startState)throw new Error("Overlays may not be stateful.");J(this.state.overlays,{mode:V,modeSpec:O,opaque:M&&M.opaque,priority:M&&M.priority||0},function(ae){return ae.priority}),this.state.modeGen++,Ur(this)}),removeOverlay:Mr(function(O){for(var M=this.state.overlays,V=0;V<M.length;++V){var ae=M[V].modeSpec;if(ae==O||typeof O=="string"&&ae.name==O){M.splice(V,1),this.state.modeGen++,Ur(this);return}}}),indentLine:Mr(function(O,M,V){typeof M!="string"&&typeof M!="number"&&(M==null?M=this.options.smartIndent?"smart":"prev":M=M?"add":"subtract"),Nt(this.doc,O)&&bi(this,O,M,V)}),indentSelection:Mr(function(O){for(var M=this.doc.sel.ranges,V=-1,ae=0;ae<M.length;ae++){var de=M[ae];if(de.empty())de.head.line>V&&(bi(this,de.head.line,O,!0),V=de.head.line,ae==this.doc.sel.primIndex&&Pa(this));else{var fe=de.from(),ve=de.to(),Se=Math.max(V,fe.line);V=Math.min(this.lastLine(),ve.line-(ve.ch?0:1))+1;for(var De=Se;De<V;++De)bi(this,De,O);var Ue=this.doc.sel.ranges;fe.ch==0&&M.length==Ue.length&&Ue[ae].from().ch>0&&co(this.doc,ae,new zt(fe,Ue[ae].to()),be)}}}),getTokenAt:function(O,M){return ar(this,O,M)},getLineTokens:function(O,M){return ar(this,Je(O),M,!0)},getTokenTypeAt:function(O){O=St(this.doc,O);var M=vr(this,ut(this.doc,O.line)),V=0,ae=(M.length-1)/2,de=O.ch,fe;if(de==0)fe=M[2];else for(;;){var ve=V+ae>>1;if((ve?M[ve*2-1]:0)>=de)ae=ve;else if(M[ve*2+1]<de)V=ve+1;else{fe=M[ve*2+2];break}}var Se=fe?fe.indexOf("overlay "):-1;return Se<0?fe:Se==0?null:fe.slice(0,Se-1)},getModeAt:function(O){var M=this.doc.mode;return M.innerMode?e.innerMode(M,this.getTokenAt(O).state).mode:M},getHelper:function(O,M){return this.getHelpers(O,M)[0]},getHelpers:function(O,M){var V=[];if(!A.hasOwnProperty(M))return V;var ae=A[M],de=this.getModeAt(O);if(typeof de[M]=="string")ae[de[M]]&&V.push(ae[de[M]]);else if(de[M])for(var fe=0;fe<de[M].length;fe++){var ve=ae[de[M][fe]];ve&&V.push(ve)}else de.helperType&&ae[de.helperType]?V.push(ae[de.helperType]):ae[de.name]&&V.push(ae[de.name]);for(var Se=0;Se<ae._global.length;Se++){var De=ae._global[Se];De.pred(de,this)&&ie(V,De.val)==-1&&V.push(De.val)}return V},getStateAfter:function(O,M){var V=this.doc;return O=an(V,O==null?V.first+V.size-1:O),xr(this,O+1,M).state},cursorCoords:function(O,M){var V,ae=this.doc.sel.primary();return O==null?V=ae.head:typeof O=="object"?V=St(this.doc,O):V=O?ae.from():ae.to(),Sn(this,V,M||"page")},charCoords:function(O,M){return Ki(this,St(this.doc,O),M||"page")},coordsChar:function(O,M){return O=tn(this,O,M||"page"),zi(this,O.left,O.top)},lineAtHeight:function(O,M){return O=tn(this,{top:O,left:0},M||"page").top,tr(this.doc,O+this.display.viewOffset)},heightAtLine:function(O,M,V){var ae=!1,de;if(typeof O=="number"){var fe=this.doc.first+this.doc.size-1;O<this.doc.first?O=this.doc.first:O>fe&&(O=fe,ae=!0),de=ut(this.doc,O)}else de=O;return Rr(this,de,{top:0,left:0},M||"page",V||ae).top+(ae?this.doc.height-Zr(de):0)},defaultTextHeight:function(){return Ra(this.display)},defaultCharWidth:function(){return La(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(O,M,V,ae,de){var fe=this.display;O=Sn(this,St(this.doc,O));var ve=O.bottom,Se=O.left;if(M.style.position="absolute",M.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(M),fe.sizer.appendChild(M),ae=="over")ve=O.top;else if(ae=="above"||ae=="near"){var De=Math.max(fe.wrapper.clientHeight,this.doc.height),Ue=Math.max(fe.sizer.clientWidth,fe.lineSpace.clientWidth);(ae=="above"||O.bottom+M.offsetHeight>De)&&O.top>M.offsetHeight?ve=O.top-M.offsetHeight:O.bottom+M.offsetHeight<=De&&(ve=O.bottom),Se+M.offsetWidth>Ue&&(Se=Ue-M.offsetWidth)}M.style.top=ve+"px",M.style.left=M.style.right="",de=="right"?(Se=fe.sizer.clientWidth-M.offsetWidth,M.style.right="0px"):(de=="left"?Se=0:de=="middle"&&(Se=(fe.sizer.clientWidth-M.offsetWidth)/2),M.style.left=Se+"px"),V&&Js(this,{left:Se,top:ve,right:Se+M.offsetWidth,bottom:ve+M.offsetHeight})},triggerOnKeyDown:Mr(Os),triggerOnKeyPress:Mr(Ds),triggerOnKeyUp:As,triggerOnMouseDown:Mr(Rs),execCommand:function(O){if(mi.hasOwnProperty(O))return mi[O].call(null,this)},triggerElectric:Mr(function(O){Fs(this,O)}),findPosH:function(O,M,V,ae){var de=1;M<0&&(de=-1,M=-M);for(var fe=St(this.doc,O),ve=0;ve<M&&!(fe=xo(this.doc,fe,de,V,ae),fe.hitSide);++ve);return fe},moveH:Mr(function(O,M){var V=this;this.extendSelectionsBy(function(ae){return V.display.shift||V.doc.extend||ae.empty()?xo(V.doc,ae.head,O,M,V.options.rtlMoveVisually):O<0?ae.from():ae.to()},le)}),deleteH:Mr(function(O,M){var V=this.doc.sel,ae=this.doc;V.somethingSelected()?ae.replaceSelection("",null,"+delete"):Wa(this,function(de){var fe=xo(ae,de.head,O,M,!1);return O<0?{from:fe,to:de.head}:{from:de.head,to:fe}})}),findPosV:function(O,M,V,ae){var de=1,fe=ae;M<0&&(de=-1,M=-M);for(var ve=St(this.doc,O),Se=0;Se<M;++Se){var De=Sn(this,ve,"div");if(fe==null?fe=De.left:De.left=fe,ve=Ws(this,De,de,V),ve.hitSide)break}return ve},moveV:Mr(function(O,M){var V=this,ae=this.doc,de=[],fe=!this.display.shift&&!ae.extend&&ae.sel.somethingSelected();if(ae.extendSelectionsBy(function(Se){if(fe)return O<0?Se.from():Se.to();var De=Sn(V,Se.head,"div");Se.goalColumn!=null&&(De.left=Se.goalColumn),de.push(De.left);var Ue=Ws(V,De,O,M);return M=="page"&&Se==ae.sel.primary()&&qi(V,Ki(V,Ue,"div").top-De.top),Ue},le),de.length)for(var ve=0;ve<ae.sel.ranges.length;ve++)ae.sel.ranges[ve].goalColumn=de[ve]}),findWordAt:function(O){var M=this.doc,V=ut(M,O.line).text,ae=O.ch,de=O.ch;if(V){var fe=this.getHelper(O,"wordChars");(O.sticky=="before"||de==V.length)&&ae?--ae:++de;for(var ve=V.charAt(ae),Se=z(ve,fe)?function(De){return z(De,fe)}:/\s/.test(ve)?function(De){return/\s/.test(De)}:function(De){return!/\s/.test(De)&&!z(De)};ae>0&&Se(V.charAt(ae-1));)--ae;for(;de<V.length&&Se(V.charAt(de));)++de}return new zt(Je(O.line,ae),Je(O.line,de))},toggleOverwrite:function(O){if(O!=null&&O==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?G(this.display.cursorDiv,"CodeMirror-overwrite"):c(this.display.cursorDiv,"CodeMirror-overwrite"),Ie(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==X()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Mr(function(O,M){ei(this,O,M)}),getScrollInfo:function(){var O=this.display.scroller;return{left:O.scrollLeft,top:O.scrollTop,height:O.scrollHeight-qr(this)-this.display.barHeight,width:O.scrollWidth-qr(this)-this.display.barWidth,clientHeight:fa(this),clientWidth:wn(this)}},scrollIntoView:Mr(function(O,M){O==null?(O={from:this.doc.sel.primary().head,to:null},M==null&&(M=this.options.cursorScrollMargin)):typeof O=="number"?O={from:Je(O,0),to:null}:O.from==null&&(O={from:O,to:null}),O.to||(O.to=O.from),O.margin=M||0,O.from.line!=null?Zs(this,O):Po(this,O.from,O.to,O.margin)}),setSize:Mr(function(O,M){var V=this,ae=function(fe){return typeof fe=="number"||/^\d+$/.test(String(fe))?fe+"px":fe};O!=null&&(this.display.wrapper.style.width=ae(O)),M!=null&&(this.display.wrapper.style.height=ae(M)),this.options.lineWrapping&&gn(this);var de=this.display.viewFrom;this.doc.iter(de,this.display.viewTo,function(fe){if(fe.widgets){for(var ve=0;ve<fe.widgets.length;ve++)if(fe.widgets[ve].noHScroll){Jn(V,de,"widget");break}}++de}),this.curOp.forceUpdate=!0,Ie(this,"refresh",this)}),operation:function(O){return Xr(this,O)},startOperation:function(){return ya(this)},endOperation:function(){return ba(this)},refresh:Mr(function(){var O=this.display.cachedTextHeight;Ur(this),this.curOp.forceUpdate=!0,$n(this),ei(this,this.doc.scrollLeft,this.doc.scrollTop),ro(this.display),(O==null||Math.abs(O-Ra(this.display))>.5||this.options.lineWrapping)&&$i(this),Ie(this,"refresh",this)}),swapDoc:Mr(function(O){var M=this.doc;return M.cm=null,this.state.selectingText&&this.state.selectingText(),Vo(this,O),$n(this),this.display.input.reset(),ei(this,O.scrollLeft,O.scrollTop),this.curOp.forceScroll=!0,Gt(this,"swapDoc",this,M),M}),phrase:function(O){var M=this.options.phrases;return M&&Object.prototype.hasOwnProperty.call(M,O)?M[O]:O},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ae(e),e.registerHelper=function(O,M,V){A.hasOwnProperty(O)||(A[O]=e[O]={_global:[]}),A[O][M]=V},e.registerGlobalHelper=function(O,M,V,ae){e.registerHelper(O,M,ae),A[O]._global.push({pred:V,val:ae})}}function xo(e,t,A,O,M){var V=t,ae=A,de=ut(e,t.line),fe=M&&e.direction=="rtl"?-A:A;function ve(){var ft=t.line+fe;return ft<e.first||ft>=e.first+e.size?!1:(t=new Je(ft,t.ch,t.sticky),de=ut(e,ft))}function Se(ft){var lt;if(O=="codepoint"){var mt=de.text.charCodeAt(t.ch+(O>0?0:-1));isNaN(mt)?lt=null:lt=new Je(t.line,Math.max(0,Math.min(de.text.length,t.ch+A*(mt>=55296&&mt<56320?2:1))),-A)}else M?lt=Ml(e.cm,de,t,A):lt=ho(de,t,A);if(lt==null)if(!ft&&ve())t=po(M,e.cm,de,t.line,fe);else return!1;else t=lt;return!0}if(O=="char"||O=="codepoint")Se();else if(O=="column")Se(!0);else if(O=="word"||O=="group")for(var De=null,Ue=O=="group",Me=e.cm&&e.cm.getHelper(t,"wordChars"),ze=!0;!(A<0&&!Se(!ze));ze=!1){var $e=de.text.charAt(t.ch)||`
|
|
|
`,nt=z($e,Me)?"w":Ue&&$e==`
|
|
|
`?"n":!Ue||/\s/.test($e)?null:"p";if(Ue&&!ze&&!nt&&(nt="s"),De&&De!=nt){A<0&&(A=1,Se(),t.sticky="after");break}if(nt&&(De=nt),A>0&&!Se(!ze))break}var st=Ii(e,t,V,ae,!0);return vn(V,st)&&(st.hitSide=!0),st}function Ws(e,t,A,O){var M=e.doc,V=t.left,ae;if(O=="page"){var de=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),fe=Math.max(de-.5*Ra(e.display),3);ae=(A>0?t.bottom:t.top)+A*fe}else O=="line"&&(ae=A>0?t.bottom+3:t.top-3);for(var ve;!(ve=zi(e,V,ae),!ve.outside);){if(A<0?ae<=0:ae>=M.height){ve.hitSide=!0;break}ae+=A*5}return ve}var Jt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new q,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Jt.prototype.init=function(e){var t=this,A=this,O=A.cm,M=A.div=e.lineDiv;Us(M,O.options.spellcheck,O.options.autocorrect,O.options.autocapitalize);function V(de){for(var fe=de.target;fe;fe=fe.parentNode){if(fe==M)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(fe.className))break}return!1}_e(M,"paste",function(de){if(!V(de)||He(O,de)||Ns(de,O))return;p<=11&&setTimeout(wr(O,function(){return t.updateFromDOM()}),20)}),_e(M,"compositionstart",function(de){t.composing={data:de.data,done:!1}}),_e(M,"compositionupdate",function(de){t.composing||(t.composing={data:de.data,done:!1})}),_e(M,"compositionend",function(de){t.composing&&(de.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),_e(M,"touchstart",function(){return A.forceCompositionEnd()}),_e(M,"input",function(){t.composing||t.readFromDOMSoon()});function ae(de){if(!V(de)||He(O,de))return;if(O.somethingSelected())Bi({lineWise:!1,text:O.getSelections()}),de.type=="cut"&&O.replaceSelection("",null,"cut");else if(O.options.lineWiseCopyCut){var fe=js(O);Bi({lineWise:!0,text:fe.text}),de.type=="cut"&&O.operation(function(){O.setSelections(fe.ranges,0,be),O.replaceSelection("",null,"cut")})}else return;if(de.clipboardData){de.clipboardData.clearData();var ve=Cn.text.join(`
|
|
|
`);if(de.clipboardData.setData("Text",ve),de.clipboardData.getData("Text")==ve){de.preventDefault();return}}var Se=Bs(),De=Se.firstChild;O.display.lineSpace.insertBefore(Se,O.display.lineSpace.firstChild),De.value=Cn.text.join(`
|
|
|
`);var Ue=document.activeElement;K(De),setTimeout(function(){O.display.lineSpace.removeChild(Se),Ue.focus(),Ue==M&&A.showPrimarySelection()},50)}_e(M,"copy",ae),_e(M,"cut",ae)},Jt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Jt.prototype.prepareSelection=function(){var e=Ao(this.cm,!1);return e.focus=document.activeElement==this.div,e},Jt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Jt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Jt.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,A=t.doc.sel.primary(),O=A.from(),M=A.to();if(t.display.viewTo==t.display.viewFrom||O.line>=t.display.viewTo||M.line<t.display.viewFrom){e.removeAllRanges();return}var V=Wi(t,e.anchorNode,e.anchorOffset),ae=Wi(t,e.focusNode,e.focusOffset);if(V&&!V.bad&&ae&&!ae.bad&&yt(Pr(V,ae),O)==0&&yt(jr(V,ae),M)==0)return;var de=t.display.view,fe=O.line>=t.display.viewFrom&&Hs(t,O)||{node:de[0].measure.map[2],offset:0},ve=M.line<t.display.viewTo&&Hs(t,M);if(!ve){var Se=de[de.length-1].measure,De=Se.maps?Se.maps[Se.maps.length-1]:Se.map;ve={node:De[De.length-1],offset:De[De.length-2]-De[De.length-3]}}if(!fe||!ve){e.removeAllRanges();return}var Ue=e.rangeCount&&e.getRangeAt(0),Me;try{Me=j(fe.node,fe.offset,ve.offset,ve.node)}catch(ze){}Me&&(!T&&t.state.focused?(e.collapse(fe.node,fe.offset),Me.collapsed||(e.removeAllRanges(),e.addRange(Me))):(e.removeAllRanges(),e.addRange(Me)),Ue&&e.anchorNode==null?e.addRange(Ue):T&&this.startGracePeriod()),this.rememberSelection()},Jt.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)},Jt.prototype.showMultipleSelections=function(e){x(this.cm.display.cursorDiv,e.cursors),x(this.cm.display.selectionDiv,e.selection)},Jt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Jt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return k(this.div,t)},Jt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Jt.prototype.blur=function(){this.div.blur()},Jt.prototype.getField=function(){return this.div},Jt.prototype.supportsTouch=function(){return!0},Jt.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Xr(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},Jt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Jt.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(l&&r&&this.cm.display.gutterSpecs.length&&tu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var A=Wi(t,e.anchorNode,e.anchorOffset),O=Wi(t,e.focusNode,e.focusOffset);A&&O&&Xr(t,function(){Lr(t.doc,Qn(A,O),be),(A.bad||O.bad)&&(t.curOp.selectionChanged=!0)})},Jt.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,A=e.doc.sel.primary(),O=A.from(),M=A.to();if(O.ch==0&&O.line>e.firstLine()&&(O=Je(O.line-1,ut(e.doc,O.line-1).length)),M.ch==ut(e.doc,M.line).text.length&&M.line<e.lastLine()&&(M=Je(M.line+1,0)),O.line<t.viewFrom||M.line>t.viewTo-1)return!1;var V,ae,de;O.line==t.viewFrom||(V=ma(e,O.line))==0?(ae=It(t.view[0].line),de=t.view[0].node):(ae=It(t.view[V].line),de=t.view[V-1].node.nextSibling);var fe=ma(e,M.line),ve,Se;if(fe==t.view.length-1?(ve=t.viewTo-1,Se=t.lineDiv.lastChild):(ve=It(t.view[fe+1].line)-1,Se=t.view[fe+1].node.previousSibling),!de)return!1;for(var De=e.doc.splitLines(ru(e,de,Se,ae,ve)),Ue=Ot(e.doc,Je(ae,0),Je(ve,ut(e.doc,ve).text.length));De.length>1&&Ue.length>1;)if(Q(De)==Q(Ue))De.pop(),Ue.pop(),ve--;else if(De[0]==Ue[0])De.shift(),Ue.shift(),ae++;else break;for(var Me=0,ze=0,$e=De[0],nt=Ue[0],st=Math.min($e.length,nt.length);Me<st&&$e.charCodeAt(Me)==nt.charCodeAt(Me);)++Me;for(var ft=Q(De),lt=Q(Ue),mt=Math.min(ft.length-(De.length==1?Me:0),lt.length-(Ue.length==1?Me:0));ze<mt&&ft.charCodeAt(ft.length-ze-1)==lt.charCodeAt(lt.length-ze-1);)++ze;if(De.length==1&&Ue.length==1&&ae==O.line)for(;Me&&Me>O.ch&&ft.charCodeAt(ft.length-ze-1)==lt.charCodeAt(lt.length-ze-1);)Me--,ze++;De[De.length-1]=ft.slice(0,ft.length-ze).replace(/^\u200b+/,""),De[0]=De[0].slice(Me).replace(/\u200b+$/,"");var _t=Je(ae,Me),xt=Je(ve,Ue.length?Q(Ue).length-ze:0);if(De.length>1||De[0]||yt(_t,xt))return ja(e.doc,De,_t,xt,"+input"),!0},Jt.prototype.ensurePolled=function(){this.forceCompositionEnd()},Jt.prototype.reset=function(){this.forceCompositionEnd()},Jt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Jt.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)},Jt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Xr(this.cm,function(){return Ur(e.cm)})},Jt.prototype.setUneditable=function(e){e.contentEditable="false"},Jt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||wr(this.cm,bo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Jt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Jt.prototype.onContextMenu=function(){},Jt.prototype.resetPosition=function(){},Jt.prototype.needsContentAttribute=!0;function Hs(e,t){var A=Ca(e,t.line);if(!A||A.hidden)return null;var O=ut(e.doc,t.line),M=_a(A,O,t.line),V=Fe(O,e.doc.direction),ae="left";if(V){var de=Pe(V,t.ch);ae=de%2?"right":"left"}var fe=Yn(M.map,t.ch,ae);return fe.offset=fe.collapse=="right"?fe.end:fe.start,fe}function tu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Ka(e,t){return t&&(e.bad=!0),e}function ru(e,t,A,O,M){var V="",ae=!1,de=e.doc.lineSeparator(),fe=!1;function ve(Me){return function(ze){return ze.id==Me}}function Se(){ae&&(V+=de,fe&&(V+=de),ae=fe=!1)}function De(Me){Me&&(Se(),V+=Me)}function Ue(Me){if(Me.nodeType==1){var ze=Me.getAttribute("cm-text");if(ze){De(ze);return}var $e=Me.getAttribute("cm-marker"),nt;if($e){var st=e.findMarks(Je(O,0),Je(M+1,0),ve(+$e));st.length&&(nt=st[0].find(0))&&De(Ot(e.doc,nt.from,nt.to).join(de));return}if(Me.getAttribute("contenteditable")=="false")return;var ft=/^(pre|div|p|li|table|br)$/i.test(Me.nodeName);if(!/^br$/i.test(Me.nodeName)&&Me.textContent.length==0)return;ft&&Se();for(var lt=0;lt<Me.childNodes.length;lt++)Ue(Me.childNodes[lt]);/^(pre|p)$/i.test(Me.nodeName)&&(fe=!0),ft&&(ae=!0)}else Me.nodeType==3&&De(Me.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Ue(t),t==A);)t=t.nextSibling,fe=!1;return V}function Wi(e,t,A){var O;if(t==e.display.lineDiv){if(O=e.display.lineDiv.childNodes[A],!O)return Ka(e.clipPos(Je(e.display.viewTo-1)),!0);t=null,A=0}else for(O=t;;O=O.parentNode){if(!O||O==e.display.lineDiv)return null;if(O.parentNode&&O.parentNode==e.display.lineDiv)break}for(var M=0;M<e.display.view.length;M++){var V=e.display.view[M];if(V.node==O)return nu(V,t,A)}}function nu(e,t,A){var O=e.text.firstChild,M=!1;if(!t||!k(O,t))return Ka(Je(It(e.line),0),!0);if(t==O&&(M=!0,t=O.childNodes[A],A=0,!t)){var V=e.rest?Q(e.rest):e.line;return Ka(Je(It(V),V.text.length),M)}var ae=t.nodeType==3?t:null,de=t;for(!ae&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(ae=t.firstChild,A&&(A=ae.nodeValue.length));de.parentNode!=O;)de=de.parentNode;var fe=e.measure,ve=fe.maps;function Se(nt,st,ft){for(var lt=-1;lt<(ve?ve.length:0);lt++)for(var mt=lt<0?fe.map:ve[lt],_t=0;_t<mt.length;_t+=3){var xt=mt[_t+2];if(xt==nt||xt==st){var Ut=It(lt<0?e.line:e.rest[lt]),Zt=mt[_t]+ft;return(ft<0||xt!=nt)&&(Zt=mt[_t+(ft?1:0)]),Je(Ut,Zt)}}}var De=Se(ae,de,A);if(De)return Ka(De,M);for(var Ue=de.nextSibling,Me=ae?ae.nodeValue.length-A:0;Ue;Ue=Ue.nextSibling){if(De=Se(Ue,Ue.firstChild,0),De)return Ka(Je(De.line,De.ch-Me),M);Me+=Ue.textContent.length}for(var ze=de.previousSibling,$e=A;ze;ze=ze.previousSibling){if(De=Se(ze,ze.firstChild,-1),De)return Ka(Je(De.line,De.ch+$e),M);$e+=ze.textContent.length}}var cr=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new q,this.hasSelection=!1,this.composing=null};cr.prototype.init=function(e){var t=this,A=this,O=this.cm;this.createField(e);var M=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),y&&(M.style.width="0px"),_e(M,"input",function(){S&&p>=9&&t.hasSelection&&(t.hasSelection=null),A.poll()}),_e(M,"paste",function(ae){if(He(O,ae)||Ns(ae,O))return;O.state.pasteIncoming=+new Date,A.fastPoll()});function V(ae){if(He(O,ae))return;if(O.somethingSelected())Bi({lineWise:!1,text:O.getSelections()});else if(O.options.lineWiseCopyCut){var de=js(O);Bi({lineWise:!0,text:de.text}),ae.type=="cut"?O.setSelections(de.ranges,null,be):(A.prevInput="",M.value=de.text.join(`
|
|
|
`),K(M))}else return;ae.type=="cut"&&(O.state.cutIncoming=+new Date)}_e(M,"cut",V),_e(M,"copy",V),_e(e.scroller,"paste",function(ae){if($t(e,ae)||He(O,ae))return;if(!M.dispatchEvent){O.state.pasteIncoming=+new Date,A.focus();return}var de=new Event("paste");de.clipboardData=ae.clipboardData,M.dispatchEvent(de)}),_e(e.lineSpace,"selectstart",function(ae){$t(e,ae)||ye(ae)}),_e(M,"compositionstart",function(){var ae=O.getCursor("from");A.composing&&A.composing.range.clear(),A.composing={start:ae,range:O.markText(ae,O.getCursor("to"),{className:"CodeMirror-composing"})}}),_e(M,"compositionend",function(){A.composing&&(A.poll(),A.composing.range.clear(),A.composing=null)})},cr.prototype.createField=function(e){this.wrapper=Bs(),this.textarea=this.wrapper.firstChild},cr.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},cr.prototype.prepareSelection=function(){var e=this.cm,t=e.display,A=e.doc,O=Ao(e);if(e.options.moveInputWithCursor){var M=Sn(e,A.sel.primary().head,"div"),V=t.wrapper.getBoundingClientRect(),ae=t.lineDiv.getBoundingClientRect();O.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,M.top+ae.top-V.top)),O.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,M.left+ae.left-V.left))}return O},cr.prototype.showSelection=function(e){var t=this.cm,A=t.display;x(A.cursorDiv,e.cursors),x(A.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},cr.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var A=t.getSelection();this.textarea.value=A,t.state.focused&&K(this.textarea),S&&p>=9&&(this.hasSelection=A)}else e||(this.prevInput=this.textarea.value="",S&&p>=9&&(this.hasSelection=null))},cr.prototype.getField=function(){return this.textarea},cr.prototype.supportsTouch=function(){return!1},cr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||X()!=this.textarea))try{this.textarea.focus()}catch(e){}},cr.prototype.blur=function(){this.textarea.blur()},cr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},cr.prototype.receivedFocus=function(){this.slowPoll()},cr.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()})},cr.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function A(){var O=t.poll();!O&&!e?(e=!0,t.polling.set(60,A)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,A)},cr.prototype.poll=function(){var e=this,t=this.cm,A=this.textarea,O=this.prevInput;if(this.contextMenuPending||!t.state.focused||at(A)&&!O&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var M=A.value;if(M==O&&!t.somethingSelected())return!1;if(S&&p>=9&&this.hasSelection===M||s&&/[\uf700-\uf7ff]/.test(M))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var V=M.charCodeAt(0);if(V==8203&&!O&&(O="\u200B"),V==8666)return this.reset(),this.cm.execCommand("undo")}for(var ae=0,de=Math.min(O.length,M.length);ae<de&&O.charCodeAt(ae)==M.charCodeAt(ae);)++ae;return Xr(t,function(){bo(t,M.slice(ae),O.length-ae,null,e.composing?"*compose":null),M.length>1e3||M.indexOf(`
|
|
|
`)>-1?A.value=e.prevInput="":e.prevInput=M,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},cr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},cr.prototype.onKeyPress=function(){S&&p>=9&&(this.hasSelection=null),this.fastPoll()},cr.prototype.onContextMenu=function(e){var t=this,A=t.cm,O=A.display,M=t.textarea;t.contextMenuPending&&t.contextMenuPending();var V=pa(A,e),ae=O.scroller.scrollTop;if(!V||d)return;var de=A.options.resetSelectionOnContextMenu;de&&A.doc.sel.contains(V)==-1&&wr(A,Lr)(A.doc,Qn(V),be);var fe=M.style.cssText,ve=t.wrapper.style.cssText,Se=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",M.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(e.clientY-Se.top-5)+"px; left: "+(e.clientX-Se.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 De;o&&(De=window.scrollY),O.input.focus(),o&&window.scrollTo(null,De),O.input.reset(),A.somethingSelected()||(M.value=t.prevInput=" "),t.contextMenuPending=Me,O.selForContextMenu=A.doc.sel,clearTimeout(O.detectingSelectAll);function Ue(){if(M.selectionStart!=null){var $e=A.somethingSelected(),nt="\u200B"+($e?M.value:"");M.value="\u21DA",M.value=nt,t.prevInput=$e?"":"\u200B",M.selectionStart=1,M.selectionEnd=nt.length,O.selForContextMenu=A.doc.sel}}function Me(){if(t.contextMenuPending!=Me)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=ve,M.style.cssText=fe,S&&p<9&&O.scrollbars.setScrollTop(O.scroller.scrollTop=ae),M.selectionStart!=null){(!S||S&&p<9)&&Ue();var $e=0,nt=function(){O.selForContextMenu==A.doc.sel&&M.selectionStart==0&&M.selectionEnd>0&&t.prevInput=="\u200B"?wr(A,os)(A):$e++<10?O.detectingSelectAll=setTimeout(nt,500):(O.selForContextMenu=null,O.input.reset())};O.detectingSelectAll=setTimeout(nt,200)}}if(S&&p>=9&&Ue(),R){Oe(e);var ze=function(){Ve(window,"mouseup",ze),setTimeout(Me,20)};_e(window,"mouseup",ze)}else setTimeout(Me,50)},cr.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},cr.prototype.setUneditable=function(){},cr.prototype.needsContentAttribute=!1;function au(e,t){if(t=t?U(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var A=X();t.autofocus=A==e||e.getAttribute("autofocus")!=null&&A==document.body}function O(){e.value=de.getValue()}var M;if(e.form&&(_e(e.form,"submit",O),!t.leaveSubmitMethodAlone)){var V=e.form;M=V.submit;try{var ae=V.submit=function(){O(),V.submit=M,V.submit(),V.submit=ae}}catch(fe){}}t.finishInit=function(fe){fe.save=O,fe.getTextArea=function(){return e},fe.toTextArea=function(){fe.toTextArea=isNaN,O(),e.parentNode.removeChild(fe.getWrapperElement()),e.style.display="",e.form&&(Ve(e.form,"submit",O),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=M))}},e.style.display="none";var de=er(function(fe){return e.parentNode.insertBefore(fe,e.nextSibling)},t);return de}function iu(e){e.off=Ve,e.on=_e,e.wheelEventPixels=fl,e.Doc=Br,e.splitLines=gt,e.countColumn=H,e.findColumn=ue,e.isWordChar=Y,e.Pass=he,e.signal=Ie,e.Line=Fn,e.changeEnd=qn,e.scrollbarModel=No,e.Pos=Je,e.cmpPos=yt,e.modes=Ft,e.mimeModes=ct,e.resolveMode=dr,e.getMode=Ye,e.modeExtensions=ht,e.extendMode=Wt,e.copyState=Mt,e.startState=Ct,e.innerMode=Bt,e.commands=mi,e.keyMap=Wn,e.keyName=ws,e.isModifierKey=xs,e.lookupKey=Ba,e.normalizeKeyMap=Il,e.StringStream=kt,e.SharedTextMarker=fi,e.TextMarker=ta,e.LineWidget=di,e.e_preventDefault=ye,e.e_stopPropagation=Ee,e.e_stop=Oe,e.addClass=G,e.contains=k,e.rmClass=c,e.keyNames=ra}Jl(er),eu(er);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Hi in Br.prototype)Br.prototype.hasOwnProperty(Hi)&&ie(ou,Hi)<0&&(er.prototype[Hi]=function(e){return function(){return e.apply(this.doc,arguments)}}(Br.prototype[Hi]));return Ae(Br),er.inputStyles={textarea:cr,contenteditable:Jt},er.defineMode=function(e){!er.defaults.mode&&e!="null"&&(er.defaults.mode=e),mr.apply(this,arguments)},er.defineMIME=Or,er.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),er.defineMIME("text/plain","null"),er.defineExtension=function(e,t){er.prototype[e]=t},er.defineDocExtension=function(e,t){Br.prototype[e]=t},er.fromTextArea=au,iu(er),er.version="5.58.2",er})},WYAk:function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){(function(){var m=P,T=m.lib,L=T.Base,_=m.enc,g=_.Utf8,S=m.algo,p=S.HMAC=L.extend({init:function(o,i){o=this._hasher=new o.init,typeof i=="string"&&(i=g.parse(i));var r=o.blockSize,d=r*4;i.sigBytes>d&&(i=o.finalize(i)),i.clamp();for(var f=this._oKey=i.clone(),h=this._iKey=i.clone(),E=f.words,y=h.words,l=0;l<r;l++)E[l]^=1549556828,y[l]^=909522486;f.sigBytes=h.sigBytes=d,this.reset()},reset:function(){var o=this._hasher;o.reset(),o.update(this._iKey)},update:function(o){return this._hasher.update(o),this},finalize:function(o){var i=this._hasher,r=i.finalize(o);i.reset();var d=i.finalize(this._oKey.clone().concat(r));return d}})})()})},WaYH:function(I,Z,N){"use strict";var P=N("rePB"),m=N("Ff2n"),T=N("VTBJ"),L=N("1OyB"),_=N("vuIU"),g=N("JX7q"),S=N("Ji7U"),p=N("LK+K"),o=N("cDcd"),i=N("TSYQ"),r=N.n(i),d=N("sboe"),f=N("OZM5"),h=function(R){var D=R.prefixCls,c=R.level,b=R.isStart,x=R.isEnd;if(!c)return null;for(var C="".concat(D,"-indent-unit"),F=[],j=0;j<c;j+=1){var k;F.push(o.createElement("span",{key:j,className:r()(C,(k={},Object(P.a)(k,"".concat(C,"-start"),b[j+1]),Object(P.a)(k,"".concat(C,"-end"),x[j+1]),Object(P.a)(k,"".concat(C,"-end-first-level"),!j&&x[0]),k))}))}return o.createElement("span",{"aria-hidden":"true",className:"".concat(D,"-indent")},F)},E=h,y=N("815F"),l="open",n="close",s="---",u=function(a){Object(S.a)(D,a);var R=Object(p.a)(D);function D(){var c;return Object(L.a)(this,D),c=R.apply(this,arguments),c.state={dragNodeHighlight:!1},c.onSelectorClick=function(b){var x=c.props.context.onNodeClick;x(b,Object(y.b)(c.props)),c.isSelectable()?c.onSelect(b):c.onCheck(b)},c.onSelectorDoubleClick=function(b){var x=c.props.context.onNodeDoubleClick;x(b,Object(y.b)(c.props))},c.onSelect=function(b){if(c.isDisabled())return;var x=c.props.context.onNodeSelect;b.preventDefault(),x(b,Object(y.b)(c.props))},c.onCheck=function(b){if(c.isDisabled())return;var x=c.props,C=x.disableCheckbox,F=x.checked,j=c.props.context.onNodeCheck;if(!c.isCheckable()||C)return;b.preventDefault();var k=!F;j(b,Object(y.b)(c.props),k)},c.onMouseEnter=function(b){var x=c.props.context.onNodeMouseEnter;x(b,Object(y.b)(c.props))},c.onMouseLeave=function(b){var x=c.props.context.onNodeMouseLeave;x(b,Object(y.b)(c.props))},c.onContextMenu=function(b){var x=c.props.context.onNodeContextMenu;x(b,Object(y.b)(c.props))},c.onDragStart=function(b){var x=c.props.context.onNodeDragStart;b.stopPropagation(),c.setState({dragNodeHighlight:!0}),x(b,Object(g.a)(c));try{b.dataTransfer.setData("text/plain","")}catch(C){}},c.onDragEnter=function(b){var x=c.props.context.onNodeDragEnter;b.preventDefault(),b.stopPropagation(),x(b,Object(g.a)(c))},c.onDragOver=function(b){var x=c.props.context.onNodeDragOver;b.preventDefault(),b.stopPropagation(),x(b,Object(g.a)(c))},c.onDragLeave=function(b){var x=c.props.context.onNodeDragLeave;b.stopPropagation(),x(b,Object(g.a)(c))},c.onDragEnd=function(b){var x=c.props.context.onNodeDragEnd;b.stopPropagation(),c.setState({dragNodeHighlight:!1}),x(b,Object(g.a)(c))},c.onDrop=function(b){var x=c.props.context.onNodeDrop;b.preventDefault(),b.stopPropagation(),c.setState({dragNodeHighlight:!1}),x(b,Object(g.a)(c))},c.onExpand=function(b){var x=c.props.context.onNodeExpand;x(b,Object(y.b)(c.props))},c.setSelectHandle=function(b){c.selectHandle=b},c.getNodeState=function(){var b=c.props.expanded;return c.isLeaf()?null:b?l:n},c.hasChildren=function(){var b=c.props.eventKey,x=c.props.context.keyEntities,C=x[b]||{},F=C.children;return!!(F||[]).length},c.isLeaf=function(){var b=c.props,x=b.isLeaf,C=b.loaded,F=c.props.context.loadData,j=c.hasChildren();return x===!1?!1:x||!F&&!j||F&&C&&!j},c.isDisabled=function(){var b=c.props.disabled,x=c.props.context.disabled;return!!(x||b)},c.isCheckable=function(){var b=c.props.checkable,x=c.props.context.checkable;return!x||b===!1?!1:x},c.syncLoadData=function(b){var x=b.expanded,C=b.loading,F=b.loaded,j=c.props.context,k=j.loadData,X=j.onNodeLoad;if(C)return;k&&x&&!c.isLeaf()&&(!c.hasChildren()&&!F&&X(Object(y.b)(c.props)))},c.renderSwitcher=function(){var b=c.props,x=b.expanded,C=b.switcherIcon,F=c.props.context,j=F.prefixCls,k=F.switcherIcon,X=C||k;if(c.isLeaf())return o.createElement("span",{className:r()("".concat(j,"-switcher"),"".concat(j,"-switcher-noop"))},typeof X=="function"?X(Object(T.a)(Object(T.a)({},c.props),{},{isLeaf:!0})):X);var G=r()("".concat(j,"-switcher"),"".concat(j,"-switcher_").concat(x?l:n));return o.createElement("span",{onClick:c.onExpand,className:G},typeof X=="function"?X(Object(T.a)(Object(T.a)({},c.props),{},{isLeaf:!1})):X)},c.renderCheckbox=function(){var b=c.props,x=b.checked,C=b.halfChecked,F=b.disableCheckbox,j=c.props.context.prefixCls,k=c.isDisabled(),X=c.isCheckable();if(!X)return null;var G=typeof X!="boolean"?X:null;return o.createElement("span",{className:r()("".concat(j,"-checkbox"),x&&"".concat(j,"-checkbox-checked"),!x&&C&&"".concat(j,"-checkbox-indeterminate"),(k||F)&&"".concat(j,"-checkbox-disabled")),onClick:c.onCheck},G)},c.renderIcon=function(){var b=c.props.loading,x=c.props.context.prefixCls;return o.createElement("span",{className:r()("".concat(x,"-iconEle"),"".concat(x,"-icon__").concat(c.getNodeState()||"docu"),b&&"".concat(x,"-icon_loading"))})},c.renderSelector=function(){var b=c.state.dragNodeHighlight,x=c.props,C=x.title,F=x.selected,j=x.icon,k=x.loading,X=x.data,G=c.props.context,W=G.prefixCls,K=G.showIcon,B=G.icon,U=G.draggable,H=G.loadData,q=G.titleRender,ie=c.isDisabled(),ce="".concat(W,"-node-content-wrapper"),he;if(K){var be=j||B;he=be?o.createElement("span",{className:r()("".concat(W,"-iconEle"),"".concat(W,"-icon__customize"))},typeof be=="function"?be(c.props):be):c.renderIcon()}else H&&k&&(he=c.renderIcon());var ne;typeof C=="function"?ne=C(X):q?ne=q(X):ne=C;var le=o.createElement("span",{className:"".concat(W,"-title")},ne);return o.createElement("span",{ref:c.setSelectHandle,title:typeof C=="string"?C:"",className:r()("".concat(ce),"".concat(ce,"-").concat(c.getNodeState()||"normal"),!ie&&(F||b)&&"".concat(W,"-node-selected"),!ie&&U&&"draggable"),draggable:!ie&&U||void 0,"aria-grabbed":!ie&&U||void 0,onMouseEnter:c.onMouseEnter,onMouseLeave:c.onMouseLeave,onContextMenu:c.onContextMenu,onClick:c.onSelectorClick,onDoubleClick:c.onSelectorDoubleClick,onDragStart:U?c.onDragStart:void 0},he,le)},c}return Object(_.a)(D,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var b=this.props.selectable,x=this.props.context.selectable;return typeof b=="boolean"?b:x}},{key:"render",value:function(){var b,x=this.props,C=x.eventKey,F=x.className,j=x.style,k=x.dragOver,X=x.dragOverGapTop,G=x.dragOverGapBottom,W=x.isLeaf,K=x.isStart,B=x.isEnd,U=x.expanded,H=x.selected,q=x.checked,ie=x.halfChecked,ce=x.loading,he=x.domRef,be=x.active,ne=x.onMouseMove,le=Object(m.a)(x,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),ue=this.props.context,te=ue.prefixCls,oe=ue.filterTreeNode,Q=ue.draggable,se=ue.keyEntities,J=this.isDisabled(),ee=Object(f.f)(le),ge=se[C]||{},re=ge.level,Y=B[B.length-1];return o.createElement("div",Object.assign({ref:he,className:r()(F,"".concat(te,"-treenode"),(b={},Object(P.a)(b,"".concat(te,"-treenode-disabled"),J),Object(P.a)(b,"".concat(te,"-treenode-switcher-").concat(U?"open":"close"),!W),Object(P.a)(b,"".concat(te,"-treenode-checkbox-checked"),q),Object(P.a)(b,"".concat(te,"-treenode-checkbox-indeterminate"),ie),Object(P.a)(b,"".concat(te,"-treenode-selected"),H),Object(P.a)(b,"".concat(te,"-treenode-loading"),ce),Object(P.a)(b,"".concat(te,"-treenode-active"),be),Object(P.a)(b,"".concat(te,"-treenode-leaf-last"),Y),Object(P.a)(b,"drag-over",!J&&k),Object(P.a)(b,"drag-over-gap-top",!J&&X),Object(P.a)(b,"drag-over-gap-bottom",!J&&G),Object(P.a)(b,"filter-node",oe&&oe(Object(y.b)(this.props))),b)),style:j,onDragEnter:Q?this.onDragEnter:void 0,onDragOver:Q?this.onDragOver:void 0,onDragLeave:Q?this.onDragLeave:void 0,onDrop:Q?this.onDrop:void 0,onDragEnd:Q?this.onDragEnd:void 0,onMouseMove:ne},ee),o.createElement(E,{prefixCls:te,level:re,isStart:K,isEnd:B}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),D}(o.Component),w=function(R){return o.createElement(d.a.Consumer,null,function(D){return o.createElement(u,Object.assign({},R,{context:D}))})};w.displayName="TreeNode",w.defaultProps={title:s},w.isTreeNode=1;var v=Z.a=w},XIdC:function(I,Z,N){"use strict";var P=N("rePB"),m=N("ODXe"),T=N("Ff2n"),L=N("cDcd"),_=N.n(L),g=N("TSYQ"),S=N.n(g),p=N("6cGi"),o=N("4IlW"),i=L.forwardRef(function(r,d){var f,h=r.prefixCls,E=h===void 0?"rc-switch":h,y=r.className,l=r.checked,n=r.defaultChecked,s=r.disabled,u=r.loadingIcon,w=r.checkedChildren,v=r.unCheckedChildren,a=r.onClick,R=r.onChange,D=r.onKeyDown,c=Object(T.a)(r,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),b=Object(p.a)(!1,{value:l,defaultValue:n}),x=Object(m.a)(b,2),C=x[0],F=x[1];function j(W,K){var B=C;return s||(B=W,F(B),R==null||R(B,K)),B}function k(W){W.which===o.a.LEFT?j(!1,W):W.which===o.a.RIGHT&&j(!0,W),D==null||D(W)}function X(W){var K=j(!C,W);a==null||a(K,W)}var G=S()(E,y,(f={},Object(P.a)(f,"".concat(E,"-checked"),C),Object(P.a)(f,"".concat(E,"-disabled"),s),f));return L.createElement("button",Object.assign({},c,{type:"button",role:"switch","aria-checked":C,disabled:s,className:G,ref:d,onKeyDown:k,onClick:X}),u,L.createElement("span",{className:"".concat(E,"-inner")},C?w:v))});i.displayName="Switch",Z.a=i},Y1PL:function(I,Z,N){"use strict";N.r(Z),N.d(Z,"ResizableTextArea",function(){return ie});var P=N("wx14"),m=N("1OyB"),T=N("vuIU"),L=N("Ji7U"),_=N("LK+K"),g=N("cDcd"),S=N("VTBJ"),p=N("rePB"),o=N("Zm9Q"),i=N("Kwbf"),r=N("c+Xe"),d=N("m+aA"),f=N("bdgK"),h=new Map;function E(be){be.forEach(function(ne){var le,ue=ne.target;(le=h.get(ue))===null||le===void 0||le.forEach(function(te){return te(ue)})})}var y=new f.default(E),l=null,n=null;function s(be,ne){h.has(be)||(h.set(be,new Set),y.observe(be)),h.get(be).add(ne)}function u(be,ne){h.has(be)&&(h.get(be).delete(ne),h.get(be).size||(y.unobserve(be),h.delete(be)))}var w=function(be){Object(L.a)(le,be);var ne=Object(_.a)(le);function le(){return Object(m.a)(this,le),ne.apply(this,arguments)}return Object(T.a)(le,[{key:"render",value:function(){return this.props.children}}]),le}(g.Component),v=g.createContext(null);function a(be){var ne=be.children,le=be.onBatchResize,ue=g.useRef(0),te=g.useRef([]),oe=g.useContext(v),Q=g.useCallback(function(se,J,ee){ue.current+=1;var ge=ue.current;te.current.push({size:se,element:J,data:ee}),Promise.resolve().then(function(){ge===ue.current&&(le==null||le(te.current),te.current=[])}),oe==null||oe(se,J,ee)},[le,oe]);return g.createElement(v.Provider,{value:Q},ne)}function R(be){var ne=be.children,le=be.disabled,ue=g.useRef(null),te=g.useRef(null),oe=g.useContext(v),Q=g.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),se=g.isValidElement(ne)&&Object(r.c)(ne),J=se?ne.ref:null,ee=g.useMemo(function(){return Object(r.a)(J,ue)},[J,ue]),ge=g.useRef(be);ge.current=be;var re=g.useCallback(function(Y){var z=ge.current,$=z.onResize,me=z.data,pe=Y.getBoundingClientRect(),xe=pe.width,Re=pe.height,ke=Y.offsetWidth,Ne=Y.offsetHeight,Pe=Math.floor(xe),je=Math.floor(Re);if(Q.current.width!==Pe||Q.current.height!==je||Q.current.offsetWidth!==ke||Q.current.offsetHeight!==Ne){var Fe={width:Pe,height:je,offsetWidth:ke,offsetHeight:Ne};Q.current=Fe;var We=ke===Math.round(xe)?xe:ke,_e=Ne===Math.round(Re)?Re:Ne,Ge=Object(S.a)(Object(S.a)({},Fe),{},{offsetWidth:We,offsetHeight:_e});oe==null||oe(Ge,Y,me),$&&Promise.resolve().then(function(){$(Ge,Y)})}},[]);return g.useEffect(function(){var Y=Object(d.a)(ue.current)||Object(d.a)(te.current);return Y&&!le&&s(Y,re),function(){return u(Y,re)}},[ue.current,le]),g.createElement(w,{ref:te},se?g.cloneElement(ne,{ref:ee}):ne)}var D="rc-observer-key";function c(be){var ne=be.children,le=Object(o.a)(ne);return le.map(function(ue,te){var oe=(ue==null?void 0:ue.key)||"".concat(D,"-").concat(te);return g.createElement(R,Object(P.a)({},be,{key:oe}),ue)})}c.Collection=a;var b=c,x=N("bT9E"),C=N("TSYQ"),F=N.n(C),j=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important
|
|
|
`,k=["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"],X={},G;function W(be){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,le=be.getAttribute("id")||be.getAttribute("data-reactid")||be.getAttribute("name");if(ne&&X[le])return X[le];var ue=window.getComputedStyle(be),te=ue.getPropertyValue("box-sizing")||ue.getPropertyValue("-moz-box-sizing")||ue.getPropertyValue("-webkit-box-sizing"),oe=parseFloat(ue.getPropertyValue("padding-bottom"))+parseFloat(ue.getPropertyValue("padding-top")),Q=parseFloat(ue.getPropertyValue("border-bottom-width"))+parseFloat(ue.getPropertyValue("border-top-width")),se=k.map(function(ee){return"".concat(ee,":").concat(ue.getPropertyValue(ee))}).join(";"),J={sizingStyle:se,paddingSize:oe,borderSize:Q,boxSizing:te};return ne&&le&&(X[le]=J),J}function K(be){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ue=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;G||(G=document.createElement("textarea"),G.setAttribute("tab-index","-1"),G.setAttribute("aria-hidden","true"),document.body.appendChild(G)),be.getAttribute("wrap")?G.setAttribute("wrap",be.getAttribute("wrap")):G.removeAttribute("wrap");var te=W(be,ne),oe=te.paddingSize,Q=te.borderSize,se=te.boxSizing,J=te.sizingStyle;G.setAttribute("style","".concat(J,";").concat(j)),G.value=be.value||be.placeholder||"";var ee=Number.MIN_SAFE_INTEGER,ge=Number.MAX_SAFE_INTEGER,re=G.scrollHeight,Y;if(se==="border-box"?re+=Q:se==="content-box"&&(re-=oe),le!==null||ue!==null){G.value=" ";var z=G.scrollHeight-oe;le!==null&&(ee=z*le,se==="border-box"&&(ee=ee+oe+Q),re=Math.max(ee,re)),ue!==null&&(ge=z*ue,se==="border-box"&&(ge=ge+oe+Q),Y=re>ge?"":"hidden",re=Math.min(ge,re))}return{height:re,minHeight:ee,maxHeight:ge,overflowY:Y,resize:"none"}}var B=N("Gytx"),U=N.n(B),H;(function(be){be[be.NONE=0]="NONE",be[be.RESIZING=1]="RESIZING",be[be.RESIZED=2]="RESIZED"})(H||(H={}));var q=function(be){Object(L.a)(le,be);var ne=Object(_.a)(le);function le(ue){var te;return Object(m.a)(this,le),te=ne.call(this,ue),te.nextFrameActionId=void 0,te.resizeFrameId=void 0,te.textArea=void 0,te.saveTextArea=function(oe){te.textArea=oe},te.handleResize=function(oe){var Q=te.state.resizeStatus,se=te.props,J=se.autoSize,ee=se.onResize;if(Q!==H.NONE)return;typeof ee=="function"&&ee(oe),J&&te.resizeOnNextFrame()},te.resizeOnNextFrame=function(){cancelAnimationFrame(te.nextFrameActionId),te.nextFrameActionId=requestAnimationFrame(te.resizeTextarea)},te.resizeTextarea=function(){var oe=te.props.autoSize;if(!oe||!te.textArea)return;var Q=oe.minRows,se=oe.maxRows,J=K(te.textArea,!1,Q,se);te.setState({textareaStyles:J,resizeStatus:H.RESIZING},function(){cancelAnimationFrame(te.resizeFrameId),te.resizeFrameId=requestAnimationFrame(function(){te.setState({resizeStatus:H.RESIZED},function(){te.resizeFrameId=requestAnimationFrame(function(){te.setState({resizeStatus:H.NONE}),te.fixFirefoxAutoScroll()})})})})},te.renderTextArea=function(){var oe=te.props,Q=oe.prefixCls,se=Q===void 0?"rc-textarea":Q,J=oe.autoSize,ee=oe.onResize,ge=oe.className,re=oe.disabled,Y=te.state,z=Y.textareaStyles,$=Y.resizeStatus,me=Object(x.a)(te.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),pe=F()(se,ge,Object(p.a)({},"".concat(se,"-disabled"),re));"value"in me&&(me.value=me.value||"");var xe=Object(S.a)(Object(S.a)(Object(S.a)({},te.props.style),z),$===H.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return g.createElement(b,{onResize:te.handleResize,disabled:!(J||ee)},g.createElement("textarea",Object(P.a)({},me,{className:pe,style:xe,ref:te.saveTextArea})))},te.state={textareaStyles:{},resizeStatus:H.NONE},te}return Object(T.a)(le,[{key:"componentDidUpdate",value:function(te){(te.value!==this.props.value||!U()(te.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 te=this.textArea.selectionStart,oe=this.textArea.selectionEnd;this.textArea.setSelectionRange(te,oe)}}catch(Q){}}},{key:"render",value:function(){return this.renderTextArea()}}]),le}(g.Component),ie=q,ce=function(be){Object(L.a)(le,be);var ne=Object(_.a)(le);function le(ue){var te;Object(m.a)(this,le),te=ne.call(this,ue),te.resizableTextArea=void 0,te.focus=function(){te.resizableTextArea.textArea.focus()},te.saveTextArea=function(Q){te.resizableTextArea=Q},te.handleChange=function(Q){var se=te.props.onChange;te.setValue(Q.target.value,function(){te.resizableTextArea.resizeTextarea()}),se&&se(Q)},te.handleKeyDown=function(Q){var se=te.props,J=se.onPressEnter,ee=se.onKeyDown;Q.keyCode===13&&J&&J(Q),ee&&ee(Q)};var oe=typeof ue.value=="undefined"||ue.value===null?ue.defaultValue:ue.value;return te.state={value:oe},te}return Object(T.a)(le,[{key:"setValue",value:function(te,oe){"value"in this.props||this.setState({value:te},oe)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return g.createElement(ie,Object(P.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(te){return"value"in te?{value:te.value}:null}}]),le}(g.Component),he=Z.default=ce},ZD9Y:function(I,Z,N){"use strict";var P=N("BoS7"),m=N("Sdc0"),T=N("OaEy"),L=N("2fM7"),_=N("cDcd"),g=N.n(_),S=N("lOMy"),p=N.n(S),o=L.a.Option;Z.a=function(i){var r=i.onFontSizeChange,d=i.cmFontSize,f=i.cmCodeMode,h=i.onCodeModeChange,E=i.onTabToSpace,y=i.className,l=y===void 0?"":y,n=i.tabToSpace,s=i.children;return g.a.createElement("div",{className:"tpi-code-setting ".concat(l)},g.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),g.a.createElement("section",null,g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),g.a.createElement(L.a,{bordered:!1,size:"small",value:f,onChange:h},g.a.createElement(o,{value:"vs"},"\u767D\u8272\u80CC\u666F"),g.a.createElement(o,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),g.a.createElement(L.a,{bordered:!1,size:"small",value:d,onChange:r},g.a.createElement(o,{value:12},"12px"),g.a.createElement(o,{value:14},"14px"),g.a.createElement(o,{value:16},"16px"),g.a.createElement(o,{value:18},"18px"),g.a.createElement(o,{value:20},"20px"),g.a.createElement(o,{value:22},"22px"))),g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"Tab\u8F6C\u6362"),g.a.createElement(m.a,{checked:n,onChange:E}))),g.a.createElement("h3",null,"\u5FEB\u6377\u952E"),g.a.createElement("section",null,g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),g.a.createElement("span",null,"Ctrl + S")),g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),g.a.createElement("span",null,"F1 / Alt + F1")),g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),g.a.createElement("span",null,"Ctrl + ]/[")),g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),g.a.createElement("span",null,"Ctrl + Shift + \\")),g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),g.a.createElement("span",null,"Home")),g.a.createElement("div",{className:"file-item"},g.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),g.a.createElement("span",null,"End"))),s)}},ZpRC:function(I,Z,N){"use strict";function P(r){return typeof r=="object"&&r!=null&&r.nodeType===1}function m(r,d){return(!d||r!=="hidden")&&r!=="visible"&&r!=="clip"}function T(r,d){if(r.clientHeight<r.scrollHeight||r.clientWidth<r.scrollWidth){var f=getComputedStyle(r,null);return m(f.overflowY,d)||m(f.overflowX,d)||function(h){var E=function(y){if(!y.ownerDocument||!y.ownerDocument.defaultView)return null;try{return y.ownerDocument.defaultView.frameElement}catch(l){return null}}(h);return!!E&&(E.clientHeight<h.scrollHeight||E.clientWidth<h.scrollWidth)}(r)}return!1}function L(r,d,f,h,E,y,l,n){return y<r&&l>d||y>r&&l<d?0:y<=r&&n<=f||l>=d&&n>=f?y-r-h:l>d&&n<f||y<r&&n>f?l-d+E:0}var _=function(r,d){var f=window,h=d.scrollMode,E=d.block,y=d.inline,l=d.boundary,n=d.skipOverflowHiddenElements,s=typeof l=="function"?l:function(z){return z!==l};if(!P(r))throw new TypeError("Invalid target");for(var u=document.scrollingElement||document.documentElement,w=[],v=r;P(v)&&s(v);){if((v=v.parentElement)===u){w.push(v);break}v!=null&&v===document.body&&T(v)&&!T(document.documentElement)||v!=null&&T(v,n)&&w.push(v)}for(var a=f.visualViewport?f.visualViewport.width:innerWidth,R=f.visualViewport?f.visualViewport.height:innerHeight,D=window.scrollX||pageXOffset,c=window.scrollY||pageYOffset,b=r.getBoundingClientRect(),x=b.height,C=b.width,F=b.top,j=b.right,k=b.bottom,X=b.left,G=E==="start"||E==="nearest"?F:E==="end"?k:F+x/2,W=y==="center"?X+C/2:y==="end"?j:X,K=[],B=0;B<w.length;B++){var U=w[B],H=U.getBoundingClientRect(),q=H.height,ie=H.width,ce=H.top,he=H.right,be=H.bottom,ne=H.left;if(h==="if-needed"&&F>=0&&X>=0&&k<=R&&j<=a&&F>=ce&&k<=be&&X>=ne&&j<=he)return K;var le=getComputedStyle(U),ue=parseInt(le.borderLeftWidth,10),te=parseInt(le.borderTopWidth,10),oe=parseInt(le.borderRightWidth,10),Q=parseInt(le.borderBottomWidth,10),se=0,J=0,ee="offsetWidth"in U?U.offsetWidth-U.clientWidth-ue-oe:0,ge="offsetHeight"in U?U.offsetHeight-U.clientHeight-te-Q:0;if(u===U)se=E==="start"?G:E==="end"?G-R:E==="nearest"?L(c,c+R,R,te,Q,c+G,c+G+x,x):G-R/2,J=y==="start"?W:y==="center"?W-a/2:y==="end"?W-a:L(D,D+a,a,ue,oe,D+W,D+W+C,C),se=Math.max(0,se+c),J=Math.max(0,J+D);else{se=E==="start"?G-ce-te:E==="end"?G-be+Q+ge:E==="nearest"?L(ce,be,q,te,Q+ge,G,G+x,x):G-(ce+q/2)+ge/2,J=y==="start"?W-ne-ue:y==="center"?W-(ne+ie/2)+ee/2:y==="end"?W-he+oe+ee:L(ne,he,ie,ue,oe+ee,W,W+C,C);var re=U.scrollLeft,Y=U.scrollTop;G+=Y-(se=Math.max(0,Math.min(Y+se,U.scrollHeight-q+ge))),W+=re-(J=Math.max(0,Math.min(re+J,U.scrollWidth-ie+ee)))}K.push({el:U,top:se,left:J})}return K};function g(r){return r===Object(r)&&Object.keys(r).length!==0}function S(r,d){d===void 0&&(d="auto");var f="scrollBehavior"in document.body.style;r.forEach(function(h){var E=h.el,y=h.top,l=h.left;E.scroll&&f?E.scroll({top:y,left:l,behavior:d}):(E.scrollTop=y,E.scrollLeft=l)})}function p(r){return r===!1?{block:"end",inline:"nearest"}:g(r)?r:{block:"start",inline:"nearest"}}function o(r,d){var f=!r.ownerDocument.documentElement.contains(r);if(g(d)&&typeof d.behavior=="function")return d.behavior(f?[]:_(r,d));if(f)return;var h=p(d);return S(_(r,h),h.behavior)}var i=Z.a=o},Zss7:function(I,Z,N){var P;(function(m){var T=/^\s+/,L=/\s+$/,_=0,g=m.round,S=m.min,p=m.max,o=m.random;function i(Q,se){if(Q=Q||"",se=se||{},Q instanceof i)return Q;if(!(this instanceof i))return new i(Q,se);var J=r(Q);this._originalInput=Q,this._r=J.r,this._g=J.g,this._b=J.b,this._a=J.a,this._roundA=g(100*this._a)/100,this._format=se.format||J.format,this._gradientType=se.gradientType,this._r<1&&(this._r=g(this._r)),this._g<1&&(this._g=g(this._g)),this._b<1&&(this._b=g(this._b)),this._ok=J.ok,this._tc_id=_++}i.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var Q=this.toRgb();return(Q.r*299+Q.g*587+Q.b*114)/1e3},getLuminance:function(){var Q=this.toRgb(),se,J,ee,ge,re,Y;return se=Q.r/255,J=Q.g/255,ee=Q.b/255,se<=.03928?ge=se/12.92:ge=m.pow((se+.055)/1.055,2.4),J<=.03928?re=J/12.92:re=m.pow((J+.055)/1.055,2.4),ee<=.03928?Y=ee/12.92:Y=m.pow((ee+.055)/1.055,2.4),.2126*ge+.7152*re+.0722*Y},setAlpha:function(Q){return this._a=K(Q),this._roundA=g(100*this._a)/100,this},toHsv:function(){var Q=E(this._r,this._g,this._b);return{h:Q.h*360,s:Q.s,v:Q.v,a:this._a}},toHsvString:function(){var Q=E(this._r,this._g,this._b),se=g(Q.h*360),J=g(Q.s*100),ee=g(Q.v*100);return this._a==1?"hsv("+se+", "+J+"%, "+ee+"%)":"hsva("+se+", "+J+"%, "+ee+"%, "+this._roundA+")"},toHsl:function(){var Q=f(this._r,this._g,this._b);return{h:Q.h*360,s:Q.s,l:Q.l,a:this._a}},toHslString:function(){var Q=f(this._r,this._g,this._b),se=g(Q.h*360),J=g(Q.s*100),ee=g(Q.l*100);return this._a==1?"hsl("+se+", "+J+"%, "+ee+"%)":"hsla("+se+", "+J+"%, "+ee+"%, "+this._roundA+")"},toHex:function(Q){return l(this._r,this._g,this._b,Q)},toHexString:function(Q){return"#"+this.toHex(Q)},toHex8:function(Q){return n(this._r,this._g,this._b,this._a,Q)},toHex8String:function(Q){return"#"+this.toHex8(Q)},toRgb:function(){return{r:g(this._r),g:g(this._g),b:g(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+g(this._r)+", "+g(this._g)+", "+g(this._b)+")":"rgba("+g(this._r)+", "+g(this._g)+", "+g(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:g(B(this._r,255)*100)+"%",g:g(B(this._g,255)*100)+"%",b:g(B(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+g(B(this._r,255)*100)+"%, "+g(B(this._g,255)*100)+"%, "+g(B(this._b,255)*100)+"%)":"rgba("+g(B(this._r,255)*100)+"%, "+g(B(this._g,255)*100)+"%, "+g(B(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:G[l(this._r,this._g,this._b,!0)]||!1},toFilter:function(Q){var se="#"+s(this._r,this._g,this._b,this._a),J=se,ee=this._gradientType?"GradientType = 1, ":"";if(Q){var ge=i(Q);J="#"+s(ge._r,ge._g,ge._b,ge._a)}return"progid:DXImageTransform.Microsoft.gradient("+ee+"startColorstr="+se+",endColorstr="+J+")"},toString:function(Q){var se=!!Q;Q=Q||this._format;var J=!1,ee=this._a<1&&this._a>=0,ge=!se&&ee&&(Q==="hex"||Q==="hex6"||Q==="hex3"||Q==="hex4"||Q==="hex8"||Q==="name");return ge?Q==="name"&&this._a===0?this.toName():this.toRgbString():(Q==="rgb"&&(J=this.toRgbString()),Q==="prgb"&&(J=this.toPercentageRgbString()),(Q==="hex"||Q==="hex6")&&(J=this.toHexString()),Q==="hex3"&&(J=this.toHexString(!0)),Q==="hex4"&&(J=this.toHex8String(!0)),Q==="hex8"&&(J=this.toHex8String()),Q==="name"&&(J=this.toName()),Q==="hsl"&&(J=this.toHslString()),Q==="hsv"&&(J=this.toHsvString()),J||this.toHexString())},clone:function(){return i(this.toString())},_applyModification:function(Q,se){var J=Q.apply(null,[this].concat([].slice.call(se)));return this._r=J._r,this._g=J._g,this._b=J._b,this.setAlpha(J._a),this},lighten:function(){return this._applyModification(a,arguments)},brighten:function(){return this._applyModification(R,arguments)},darken:function(){return this._applyModification(D,arguments)},desaturate:function(){return this._applyModification(u,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(c,arguments)},_applyCombination:function(Q,se){return Q.apply(null,[this].concat([].slice.call(se)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(k,arguments)},splitcomplement:function(){return this._applyCombination(F,arguments)},triad:function(){return this._applyCombination(x,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},i.fromRatio=function(Q,se){if(typeof Q=="object"){var J={};for(var ee in Q)Q.hasOwnProperty(ee)&&(ee==="a"?J[ee]=Q[ee]:J[ee]=he(Q[ee]));Q=J}return i(Q,se)};function r(Q){var se={r:0,g:0,b:0},J=1,ee=null,ge=null,re=null,Y=!1,z=!1;return typeof Q=="string"&&(Q=te(Q)),typeof Q=="object"&&(ue(Q.r)&&ue(Q.g)&&ue(Q.b)?(se=d(Q.r,Q.g,Q.b),Y=!0,z=String(Q.r).substr(-1)==="%"?"prgb":"rgb"):ue(Q.h)&&ue(Q.s)&&ue(Q.v)?(ee=he(Q.s),ge=he(Q.v),se=y(Q.h,ee,ge),Y=!0,z="hsv"):ue(Q.h)&&ue(Q.s)&&ue(Q.l)&&(ee=he(Q.s),re=he(Q.l),se=h(Q.h,ee,re),Y=!0,z="hsl"),Q.hasOwnProperty("a")&&(J=Q.a)),J=K(J),{ok:Y,format:Q.format||z,r:S(255,p(se.r,0)),g:S(255,p(se.g,0)),b:S(255,p(se.b,0)),a:J}}function d(Q,se,J){return{r:B(Q,255)*255,g:B(se,255)*255,b:B(J,255)*255}}function f(Q,se,J){Q=B(Q,255),se=B(se,255),J=B(J,255);var ee=p(Q,se,J),ge=S(Q,se,J),re,Y,z=(ee+ge)/2;if(ee==ge)re=Y=0;else{var $=ee-ge;Y=z>.5?$/(2-ee-ge):$/(ee+ge);switch(ee){case Q:re=(se-J)/$+(se<J?6:0);break;case se:re=(J-Q)/$+2;break;case J:re=(Q-se)/$+4;break}re/=6}return{h:re,s:Y,l:z}}function h(Q,se,J){var ee,ge,re;Q=B(Q,360),se=B(se,100),J=B(J,100);function Y(me,pe,xe){return xe<0&&(xe+=1),xe>1&&(xe-=1),xe<1/6?me+(pe-me)*6*xe:xe<1/2?pe:xe<2/3?me+(pe-me)*(2/3-xe)*6:me}if(se===0)ee=ge=re=J;else{var z=J<.5?J*(1+se):J+se-J*se,$=2*J-z;ee=Y($,z,Q+1/3),ge=Y($,z,Q),re=Y($,z,Q-1/3)}return{r:ee*255,g:ge*255,b:re*255}}function E(Q,se,J){Q=B(Q,255),se=B(se,255),J=B(J,255);var ee=p(Q,se,J),ge=S(Q,se,J),re,Y,z=ee,$=ee-ge;if(Y=ee===0?0:$/ee,ee==ge)re=0;else{switch(ee){case Q:re=(se-J)/$+(se<J?6:0);break;case se:re=(J-Q)/$+2;break;case J:re=(Q-se)/$+4;break}re/=6}return{h:re,s:Y,v:z}}function y(Q,se,J){Q=B(Q,360)*6,se=B(se,100),J=B(J,100);var ee=m.floor(Q),ge=Q-ee,re=J*(1-se),Y=J*(1-ge*se),z=J*(1-(1-ge)*se),$=ee%6,me=[J,Y,re,re,z,J][$],pe=[z,J,J,Y,re,re][$],xe=[re,re,z,J,J,Y][$];return{r:me*255,g:pe*255,b:xe*255}}function l(Q,se,J,ee){var ge=[ce(g(Q).toString(16)),ce(g(se).toString(16)),ce(g(J).toString(16))];return ee&&ge[0].charAt(0)==ge[0].charAt(1)&&ge[1].charAt(0)==ge[1].charAt(1)&&ge[2].charAt(0)==ge[2].charAt(1)?ge[0].charAt(0)+ge[1].charAt(0)+ge[2].charAt(0):ge.join("")}function n(Q,se,J,ee,ge){var re=[ce(g(Q).toString(16)),ce(g(se).toString(16)),ce(g(J).toString(16)),ce(be(ee))];return ge&&re[0].charAt(0)==re[0].charAt(1)&&re[1].charAt(0)==re[1].charAt(1)&&re[2].charAt(0)==re[2].charAt(1)&&re[3].charAt(0)==re[3].charAt(1)?re[0].charAt(0)+re[1].charAt(0)+re[2].charAt(0)+re[3].charAt(0):re.join("")}function s(Q,se,J,ee){var ge=[ce(be(ee)),ce(g(Q).toString(16)),ce(g(se).toString(16)),ce(g(J).toString(16))];return ge.join("")}i.equals=function(Q,se){return!Q||!se?!1:i(Q).toRgbString()==i(se).toRgbString()},i.random=function(){return i.fromRatio({r:o(),g:o(),b:o()})};function u(Q,se){se=se===0?0:se||10;var J=i(Q).toHsl();return J.s-=se/100,J.s=U(J.s),i(J)}function w(Q,se){se=se===0?0:se||10;var J=i(Q).toHsl();return J.s+=se/100,J.s=U(J.s),i(J)}function v(Q){return i(Q).desaturate(100)}function a(Q,se){se=se===0?0:se||10;var J=i(Q).toHsl();return J.l+=se/100,J.l=U(J.l),i(J)}function R(Q,se){se=se===0?0:se||10;var J=i(Q).toRgb();return J.r=p(0,S(255,J.r-g(255*-(se/100)))),J.g=p(0,S(255,J.g-g(255*-(se/100)))),J.b=p(0,S(255,J.b-g(255*-(se/100)))),i(J)}function D(Q,se){se=se===0?0:se||10;var J=i(Q).toHsl();return J.l-=se/100,J.l=U(J.l),i(J)}function c(Q,se){var J=i(Q).toHsl(),ee=(J.h+se)%360;return J.h=ee<0?360+ee:ee,i(J)}function b(Q){var se=i(Q).toHsl();return se.h=(se.h+180)%360,i(se)}function x(Q){var se=i(Q).toHsl(),J=se.h;return[i(Q),i({h:(J+120)%360,s:se.s,l:se.l}),i({h:(J+240)%360,s:se.s,l:se.l})]}function C(Q){var se=i(Q).toHsl(),J=se.h;return[i(Q),i({h:(J+90)%360,s:se.s,l:se.l}),i({h:(J+180)%360,s:se.s,l:se.l}),i({h:(J+270)%360,s:se.s,l:se.l})]}function F(Q){var se=i(Q).toHsl(),J=se.h;return[i(Q),i({h:(J+72)%360,s:se.s,l:se.l}),i({h:(J+216)%360,s:se.s,l:se.l})]}function j(Q,se,J){se=se||6,J=J||30;var ee=i(Q).toHsl(),ge=360/J,re=[i(Q)];for(ee.h=(ee.h-(ge*se>>1)+720)%360;--se;)ee.h=(ee.h+ge)%360,re.push(i(ee));return re}function k(Q,se){se=se||6;for(var J=i(Q).toHsv(),ee=J.h,ge=J.s,re=J.v,Y=[],z=1/se;se--;)Y.push(i({h:ee,s:ge,v:re})),re=(re+z)%1;return Y}i.mix=function(Q,se,J){J=J===0?0:J||50;var ee=i(Q).toRgb(),ge=i(se).toRgb(),re=J/100,Y={r:(ge.r-ee.r)*re+ee.r,g:(ge.g-ee.g)*re+ee.g,b:(ge.b-ee.b)*re+ee.b,a:(ge.a-ee.a)*re+ee.a};return i(Y)},i.readability=function(Q,se){var J=i(Q),ee=i(se);return(m.max(J.getLuminance(),ee.getLuminance())+.05)/(m.min(J.getLuminance(),ee.getLuminance())+.05)},i.isReadable=function(Q,se,J){var ee=i.readability(Q,se),ge,re;re=!1,ge=oe(J);switch(ge.level+ge.size){case"AAsmall":case"AAAlarge":re=ee>=4.5;break;case"AAlarge":re=ee>=3;break;case"AAAsmall":re=ee>=7;break}return re},i.mostReadable=function(Q,se,J){var ee=null,ge=0,re,Y,z,$;J=J||{},Y=J.includeFallbackColors,z=J.level,$=J.size;for(var me=0;me<se.length;me++)re=i.readability(Q,se[me]),re>ge&&(ge=re,ee=i(se[me]));return i.isReadable(Q,ee,{level:z,size:$})||!Y?ee:(J.includeFallbackColors=!1,i.mostReadable(Q,["#fff","#000"],J))};var X=i.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},G=i.hexNames=W(X);function W(Q){var se={};for(var J in Q)Q.hasOwnProperty(J)&&(se[Q[J]]=J);return se}function K(Q){return Q=parseFloat(Q),(isNaN(Q)||Q<0||Q>1)&&(Q=1),Q}function B(Q,se){q(Q)&&(Q="100%");var J=ie(Q);return Q=S(se,p(0,parseFloat(Q))),J&&(Q=parseInt(Q*se,10)/100),m.abs(Q-se)<1e-6?1:Q%se/parseFloat(se)}function U(Q){return S(1,p(0,Q))}function H(Q){return parseInt(Q,16)}function q(Q){return typeof Q=="string"&&Q.indexOf(".")!=-1&&parseFloat(Q)===1}function ie(Q){return typeof Q=="string"&&Q.indexOf("%")!=-1}function ce(Q){return Q.length==1?"0"+Q:""+Q}function he(Q){return Q<=1&&(Q=Q*100+"%"),Q}function be(Q){return m.round(parseFloat(Q)*255).toString(16)}function ne(Q){return H(Q)/255}var le=function(){var Q="[-\\+]?\\d+%?",se="[-\\+]?\\d*\\.\\d+%?",J="(?:"+se+")|(?:"+Q+")",ee="[\\s|\\(]+("+J+")[,|\\s]+("+J+")[,|\\s]+("+J+")\\s*\\)?",ge="[\\s|\\(]+("+J+")[,|\\s]+("+J+")[,|\\s]+("+J+")[,|\\s]+("+J+")\\s*\\)?";return{CSS_UNIT:new RegExp(J),rgb:new RegExp("rgb"+ee),rgba:new RegExp("rgba"+ge),hsl:new RegExp("hsl"+ee),hsla:new RegExp("hsla"+ge),hsv:new RegExp("hsv"+ee),hsva:new RegExp("hsva"+ge),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 ue(Q){return!!le.CSS_UNIT.exec(Q)}function te(Q){Q=Q.replace(T,"").replace(L,"").toLowerCase();var se=!1;if(X[Q])Q=X[Q],se=!0;else if(Q=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var J;return(J=le.rgb.exec(Q))?{r:J[1],g:J[2],b:J[3]}:(J=le.rgba.exec(Q))?{r:J[1],g:J[2],b:J[3],a:J[4]}:(J=le.hsl.exec(Q))?{h:J[1],s:J[2],l:J[3]}:(J=le.hsla.exec(Q))?{h:J[1],s:J[2],l:J[3],a:J[4]}:(J=le.hsv.exec(Q))?{h:J[1],s:J[2],v:J[3]}:(J=le.hsva.exec(Q))?{h:J[1],s:J[2],v:J[3],a:J[4]}:(J=le.hex8.exec(Q))?{r:H(J[1]),g:H(J[2]),b:H(J[3]),a:ne(J[4]),format:se?"name":"hex8"}:(J=le.hex6.exec(Q))?{r:H(J[1]),g:H(J[2]),b:H(J[3]),format:se?"name":"hex"}:(J=le.hex4.exec(Q))?{r:H(J[1]+""+J[1]),g:H(J[2]+""+J[2]),b:H(J[3]+""+J[3]),a:ne(J[4]+""+J[4]),format:se?"name":"hex8"}:(J=le.hex3.exec(Q))?{r:H(J[1]+""+J[1]),g:H(J[2]+""+J[2]),b:H(J[3]+""+J[3]),format:se?"name":"hex"}:!1}function oe(Q){var se,J;return Q=Q||{level:"AA",size:"small"},se=(Q.level||"AA").toUpperCase(),J=(Q.size||"small").toLowerCase(),se!=="AA"&&se!=="AAA"&&(se="AA"),J!=="small"&&J!=="large"&&(J="small"),{level:se,size:J}}I.exports?I.exports=i:!(P=function(){return i}.call(Z,N,Z,I),P!==void 0&&(I.exports=P))})(Math)},b8wu:function(I,Z,N){I.exports={"code-panel-container":"code-panel-container___pVbpU","action-oj-bar":"action-oj-bar___1NMjh",active:"active___2NiTj"}},bCnd:function(I,Z,N){"use strict";N.d(Z,"b",function(){return L}),N.d(Z,"a",function(){return _});var P=N("je13"),m=N.n(P),T=!1;function L(g,S){var p=m.a.get("__ec");p||(p={}),p[g]=S,m.a.set("__ec",p)}function _(g,S){var p=m.a.get("__ec");return p?p[g]===void 0?S:p[g]:S}},bQjk:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return function(m){var T=P,L=T.lib,_=L.CipherParams,g=T.enc,S=g.Hex,p=T.format,o=p.Hex={stringify:function(i){return i.ciphertext.toString(S)},parse:function(i){var r=S.parse(i);return _.create({ciphertext:r})}}}(),P.format.Hex})},bT9E:function(I,Z,N){"use strict";N.d(Z,"a",function(){return m});var P=N("VTBJ");function m(T,L){var _=Object(P.a)({},T);return Array.isArray(L)&&L.forEach(function(g){delete _[g]}),_}},c5Ni:function(I,Z,N){},cDPC:function(I,Z,N){"use strict";var P=N("tJVT"),m=N("cDcd"),T=N.n(m),L=N("i3hx"),_=N.n(L);Z.a=function(g){var S=g.defaultX,p=S===void 0?"40%":S,o=g.leftChild,i=g.rightChild,r=g.className,d=g.hideResize,f=d===void 0?!1:d,h=Object(m.useState)(p),E=Object(P.a)(h,2),y=E[0],l=E[1],n=Object(m.useRef)();function s(){n.current=!0}Object(m.useEffect)(function(){function v(R){n.current&&l(R.pageX)}function a(){n.current=!1}return window.addEventListener("mousemove",v),window.addEventListener("mouseup",a),function(){window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",a)}},[]);var u=typeof y=="number"&&y!==.01?"".concat(y,"px"):p,w="calc(100% - ".concat(f?"0px":"4px"," - ").concat(u,")");return T.a.createElement("div",{className:"split-panel-container ".concat(r)},T.a.createElement("section",{style:{width:u,display:y===.01?"none":""}},o),T.a.createElement("section",{className:"resize-x-bar",onMouseDown:s},T.a.createElement("a",{className:"btn-resize"},T.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},T.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"})))),T.a.createElement("section",{style:{width:w}},i))}},cv67:function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){return function(m){var T=P,L=T.lib,_=L.WordArray,g=L.Hasher,S=T.algo,p=[];(function(){for(var h=0;h<64;h++)p[h]=m.abs(m.sin(h+1))*4294967296|0})();var o=S.MD5=g.extend({_doReset:function(){this._hash=new _.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(h,E){for(var y=0;y<16;y++){var l=E+y,n=h[l];h[l]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360}var s=this._hash.words,u=h[E+0],w=h[E+1],v=h[E+2],a=h[E+3],R=h[E+4],D=h[E+5],c=h[E+6],b=h[E+7],x=h[E+8],C=h[E+9],F=h[E+10],j=h[E+11],k=h[E+12],X=h[E+13],G=h[E+14],W=h[E+15],K=s[0],B=s[1],U=s[2],H=s[3];K=i(K,B,U,H,u,7,p[0]),H=i(H,K,B,U,w,12,p[1]),U=i(U,H,K,B,v,17,p[2]),B=i(B,U,H,K,a,22,p[3]),K=i(K,B,U,H,R,7,p[4]),H=i(H,K,B,U,D,12,p[5]),U=i(U,H,K,B,c,17,p[6]),B=i(B,U,H,K,b,22,p[7]),K=i(K,B,U,H,x,7,p[8]),H=i(H,K,B,U,C,12,p[9]),U=i(U,H,K,B,F,17,p[10]),B=i(B,U,H,K,j,22,p[11]),K=i(K,B,U,H,k,7,p[12]),H=i(H,K,B,U,X,12,p[13]),U=i(U,H,K,B,G,17,p[14]),B=i(B,U,H,K,W,22,p[15]),K=r(K,B,U,H,w,5,p[16]),H=r(H,K,B,U,c,9,p[17]),U=r(U,H,K,B,j,14,p[18]),B=r(B,U,H,K,u,20,p[19]),K=r(K,B,U,H,D,5,p[20]),H=r(H,K,B,U,F,9,p[21]),U=r(U,H,K,B,W,14,p[22]),B=r(B,U,H,K,R,20,p[23]),K=r(K,B,U,H,C,5,p[24]),H=r(H,K,B,U,G,9,p[25]),U=r(U,H,K,B,a,14,p[26]),B=r(B,U,H,K,x,20,p[27]),K=r(K,B,U,H,X,5,p[28]),H=r(H,K,B,U,v,9,p[29]),U=r(U,H,K,B,b,14,p[30]),B=r(B,U,H,K,k,20,p[31]),K=d(K,B,U,H,D,4,p[32]),H=d(H,K,B,U,x,11,p[33]),U=d(U,H,K,B,j,16,p[34]),B=d(B,U,H,K,G,23,p[35]),K=d(K,B,U,H,w,4,p[36]),H=d(H,K,B,U,R,11,p[37]),U=d(U,H,K,B,b,16,p[38]),B=d(B,U,H,K,F,23,p[39]),K=d(K,B,U,H,X,4,p[40]),H=d(H,K,B,U,u,11,p[41]),U=d(U,H,K,B,a,16,p[42]),B=d(B,U,H,K,c,23,p[43]),K=d(K,B,U,H,C,4,p[44]),H=d(H,K,B,U,k,11,p[45]),U=d(U,H,K,B,W,16,p[46]),B=d(B,U,H,K,v,23,p[47]),K=f(K,B,U,H,u,6,p[48]),H=f(H,K,B,U,b,10,p[49]),U=f(U,H,K,B,G,15,p[50]),B=f(B,U,H,K,D,21,p[51]),K=f(K,B,U,H,k,6,p[52]),H=f(H,K,B,U,a,10,p[53]),U=f(U,H,K,B,F,15,p[54]),B=f(B,U,H,K,w,21,p[55]),K=f(K,B,U,H,x,6,p[56]),H=f(H,K,B,U,W,10,p[57]),U=f(U,H,K,B,c,15,p[58]),B=f(B,U,H,K,X,21,p[59]),K=f(K,B,U,H,R,6,p[60]),H=f(H,K,B,U,j,10,p[61]),U=f(U,H,K,B,v,15,p[62]),B=f(B,U,H,K,C,21,p[63]),s[0]=s[0]+K|0,s[1]=s[1]+B|0,s[2]=s[2]+U|0,s[3]=s[3]+H|0},_doFinalize:function(){var h=this._data,E=h.words,y=this._nDataBytes*8,l=h.sigBytes*8;E[l>>>5]|=128<<24-l%32;var n=m.floor(y/4294967296),s=y;E[(l+64>>>9<<4)+15]=(n<<8|n>>>24)&16711935|(n<<24|n>>>8)&4278255360,E[(l+64>>>9<<4)+14]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,h.sigBytes=(E.length+1)*4,this._process();for(var u=this._hash,w=u.words,v=0;v<4;v++){var a=w[v];w[v]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360}return u},clone:function(){var h=g.clone.call(this);return h._hash=this._hash.clone(),h}});function i(h,E,y,l,n,s,u){var w=h+(E&y|~E&l)+n+u;return(w<<s|w>>>32-s)+E}function r(h,E,y,l,n,s,u){var w=h+(E&l|y&~l)+n+u;return(w<<s|w>>>32-s)+E}function d(h,E,y,l,n,s,u){var w=h+(E^y^l)+n+u;return(w<<s|w>>>32-s)+E}function f(h,E,y,l,n,s,u){var w=h+(y^(E|~l))+n+u;return(w<<s|w>>>32-s)+E}T.MD5=g._createHelper(o),T.HmacMD5=g._createHmacHelper(o)}(Math),P.MD5})},dejd:function(I,Z,N){},dmUQ:function(I,Z,N){"use strict";var P=N("Ff2n"),m=N("rePB"),T=N("1OyB"),L=N("vuIU"),_=N("Ji7U"),g=N("md7G"),S=N("foSv"),p=N("cDcd"),o=N.n(p),i=N("TSYQ"),r=N.n(i),d=N("4IlW");function f(x,C){var F=Object.keys(x);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(x);C&&(j=j.filter(function(k){return Object.getOwnPropertyDescriptor(x,k).enumerable})),F.push.apply(F,j)}return F}function h(x){for(var C=1;C<arguments.length;C++){var F=arguments[C]!=null?arguments[C]:{};C%2?f(Object(F),!0).forEach(function(j){Object(m.a)(x,j,F[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(F)):f(Object(F)).forEach(function(j){Object.defineProperty(x,j,Object.getOwnPropertyDescriptor(F,j))})}return x}function E(x){var C=y();return function(){var j=Object(S.a)(x),k;if(C){var X=Object(S.a)(this).constructor;k=Reflect.construct(j,arguments,X)}else k=j.apply(this,arguments);return Object(g.a)(this,k)}}function y(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(x){return!1}}function l(){}function n(x){x.preventDefault()}var s=function(C){return C.replace(/[^\w.-]+/g,"")},u=200,w=600,v=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,a=function(C){return C!=null},R=function(C,F){return F===C||typeof F=="number"&&typeof C=="number"&&isNaN(F)&&isNaN(C)},D=function(x){Object(_.a)(F,x);var C=E(F);function F(j){var k;Object(T.a)(this,F),k=C.call(this,j),k.onKeyDown=function(W){var K=k.props,B=K.onKeyDown,U=K.onPressEnter;if(W.keyCode===d.a.UP){var H=k.getRatio(W);k.up(W,H,null),k.stop()}else if(W.keyCode===d.a.DOWN){var q=k.getRatio(W);k.down(W,q,null),k.stop()}else W.keyCode===d.a.ENTER&&U&&U(W);if(k.recordCursorPosition(),k.lastKeyCode=W.keyCode,B){for(var ie=arguments.length,ce=new Array(ie>1?ie-1:0),he=1;he<ie;he++)ce[he-1]=arguments[he];B.apply(void 0,[W].concat(ce))}},k.onKeyUp=function(W){var K=k.props.onKeyUp;if(k.stop(),k.recordCursorPosition(),K){for(var B=arguments.length,U=new Array(B>1?B-1:0),H=1;H<B;H++)U[H-1]=arguments[H];K.apply(void 0,[W].concat(U))}},k.onChange=function(W){var K=k.props.onChange;k.state.focused&&(k.inputting=!0),k.rawInput=k.props.parser(k.getValueFromEvent(W)),k.setState({inputValue:k.rawInput}),K(k.toNumber(k.rawInput))},k.onMouseUp=function(){var W=k.props.onMouseUp;k.recordCursorPosition(),W&&W.apply(void 0,arguments)},k.onFocus=function(){var W;k.setState({focused:!0}),(W=k.props).onFocus.apply(W,arguments)},k.onBlur=function(){var W=k.props.onBlur;k.inputting=!1,k.setState({focused:!1});var K=k.getCurrentValidValue(k.state.inputValue),B=k.setValue(K,l);if(W){var U=k.input.value,H=k.getInputDisplayValue({focus:!1,value:B});k.input.value=H&&Number(H),W.apply(void 0,arguments),k.input.value=U}},k.getRatio=function(W){var K=1;return W.metaKey||W.ctrlKey?K=.1:W.shiftKey&&(K=10),K},k.getFullNum=function(W){return isNaN(W)?W:/e/i.test(String(W))?Number(W).toFixed(18).replace(/\.?0+$/,""):W},k.getPrecision=function(W){if(a(k.props.precision))return k.props.precision;var K=String(W);if(K.indexOf("e-")>=0)return parseInt(K.slice(K.indexOf("e-")+2),10);var B=0;return K.indexOf(".")>=0&&(B=K.length-K.indexOf(".")-1),B},k.getInputDisplayValue=function(W){var K=W||k.state,B=K.focused,U=K.inputValue,H=K.value,q;B?q=U:q=k.toPrecisionAsStep(H),q==null&&(q="");var ie=k.formatWrapper(q);return a(k.props.decimalSeparator)&&(ie=ie.toString().replace(".",k.props.decimalSeparator)),ie},k.recordCursorPosition=function(){try{k.cursorStart=k.input.selectionStart,k.cursorEnd=k.input.selectionEnd,k.currentValue=k.input.value,k.cursorBefore=k.input.value.substring(0,k.cursorStart),k.cursorAfter=k.input.value.substring(k.cursorEnd)}catch(W){}},k.restoreByAfter=function(W){if(W===void 0)return!1;var K=k.input.value,B=K.lastIndexOf(W);if(B===-1)return!1;var U=k.cursorBefore.length;return k.lastKeyCode===d.a.DELETE&&k.cursorBefore.charAt(U-1)===W[0]?(k.fixCaret(U,U),!0):B+W.length===K.length?(k.fixCaret(B,B),!0):!1},k.partRestoreByAfter=function(W){return W===void 0?!1:Array.prototype.some.call(W,function(K,B){var U=W.substring(B);return k.restoreByAfter(U)})},k.isNotCompleteNumber=function(W){return isNaN(W)||W===""||W===null||W&&W.toString().indexOf(".")===W.toString().length-1},k.stop=function(){k.autoStepTimer&&clearTimeout(k.autoStepTimer)},k.down=function(W,K,B){k.pressingUpOrDown=!0,k.step("down",W,K,B)},k.up=function(W,K,B){k.pressingUpOrDown=!0,k.step("up",W,K,B)},k.saveInput=function(W){k.input=W};var X=j.value;X===void 0&&(X=j.defaultValue),k.state={focused:j.autoFocus};var G=k.getValidValue(k.toNumber(X));return k.state=h(h({},k.state),{},{inputValue:k.toPrecisionAsStep(G),value:G}),k}return Object(L.a)(F,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(k){var X=this.props,G=X.value,W=X.onChange,K=X.max,B=X.min,U=this.state.focused;if(k){if(!R(k.value,G)||!R(k.max,K)||!R(k.min,B)){var H=U?G:this.getValidValue(G),q;this.pressingUpOrDown?q=H:this.inputting?q=this.rawInput:q=this.toPrecisionAsStep(H),this.setState({value:H,inputValue:q})}var ie="value"in this.props?G:this.state.value;"max"in this.props&&k.max!==K&&typeof ie=="number"&&ie>K&&W&&W(K),"min"in this.props&&k.min!==B&&typeof ie=="number"&&ie<B&&W&&W(B)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var ce=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===d.a.BACKSPACE?ce=this.cursorStart-1:this.lastKeyCode===d.a.DELETE&&(ce=this.cursorStart):ce=this.input.value.length,this.fixCaret(ce,ce)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case d.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case d.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(he){}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(k){var X=k;return X===""?X="":this.isNotCompleteNumber(parseFloat(X))?X=this.state.value:X=this.getValidValue(X),this.toNumber(X)}},{key:"getValueFromEvent",value:function(k){var X=k.target.value.trim().replace(/。/g,".");return a(this.props.decimalSeparator)&&(X=X.replace(this.props.decimalSeparator,".")),X}},{key:"getValidValue",value:function(k){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,W=parseFloat(k);return isNaN(W)?k:(W<X&&(W=X),W>G&&(W=G),W)}},{key:"setValue",value:function(k,X){var G=this.props.precision,W=this.isNotCompleteNumber(parseFloat(k))?null:parseFloat(k),K=this.state.value,B=K===void 0?null:K,U=this.state.inputValue,H=U===void 0?null:U,q=typeof W=="number"?W.toFixed(G):"".concat(W),ie=W!==B||q!=="".concat(H);return"value"in this.props?(H=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:H},X)):this.setState({value:W,inputValue:this.toPrecisionAsStep(k)},X),ie&&this.props.onChange(W),W}},{key:"getMaxPrecision",value:function(k){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,G=this.props,W=G.precision,K=G.step;if(a(W))return W;var B=this.getPrecision(X),U=this.getPrecision(K),H=this.getPrecision(k);return k?Math.max(H,B+U):B+U}},{key:"getPrecisionFactor",value:function(k){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,G=this.getMaxPrecision(k,X);return Math.pow(10,G)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(k){return this.props.formatter?this.props.formatter(k):k}},{key:"toPrecisionAsStep",value:function(k){if(this.isNotCompleteNumber(k)||k==="")return k;var X=Math.abs(this.getMaxPrecision(k));return isNaN(X)?k.toString():Number(k).toFixed(X)}},{key:"toNumber",value:function(k){var X=this.props.precision,G=this.state.focused,W=k&&k.length>16&&G;return this.isNotCompleteNumber(k)||W?k:a(X)?Math.round(k*Math.pow(10,X))/Math.pow(10,X):Number(k)}},{key:"upStep",value:function(k,X){var G=this.props.step,W=this.getPrecisionFactor(k,X),K=Math.abs(this.getMaxPrecision(k,X)),B=((W*k+W*G*X)/W).toFixed(K);return this.toNumber(B)}},{key:"downStep",value:function(k,X){var G=this.props.step,W=this.getPrecisionFactor(k,X),K=Math.abs(this.getMaxPrecision(k,X)),B=((W*k-W*G*X)/W).toFixed(K);return this.toNumber(B)}},{key:"step",value:function(k,X){var G=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,K=arguments.length>3?arguments[3]:void 0;this.stop(),X&&(X.persist(),X.preventDefault());var B=this.props;if(B.disabled)return;var U=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(U))return;var H=this["".concat(k,"Step")](U,W),q=H>B.max||H<B.min;if(H>B.max?H=B.max:H<B.min&&(H=B.min),this.setValue(H,null),this.setState({focused:!0},function(){G.pressingUpOrDown=!1}),q)return;this.autoStepTimer=setTimeout(function(){G[k](X,W,!0)},K?u:w)}},{key:"fixCaret",value:function(k,X){if(k===void 0||X===void 0||!this.input||!this.input.value)return;try{var G=this.input.selectionStart,W=this.input.selectionEnd;(k!==G||X!==W)&&this.input.setSelectionRange(k,X)}catch(K){}}},{key:"render",value:function(){var k,X=this.props,G=X.prefixCls,W=X.disabled,K=X.readOnly,B=X.useTouch,U=X.autoComplete,H=X.upHandler,q=X.downHandler,ie=X.className,ce=X.max,he=X.min,be=X.style,ne=X.title,le=X.onMouseEnter,ue=X.onMouseLeave,te=X.onMouseOver,oe=X.onMouseOut,Q=X.required,se=X.onClick,J=X.tabIndex,ee=X.type,ge=X.placeholder,re=X.id,Y=X.inputMode,z=X.pattern,$=X.step,me=X.maxLength,pe=X.autoFocus,xe=X.name,Re=X.onPaste,ke=X.onInput,Ne=Object(P.a)(X,["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"]),Pe=this.state,je=Pe.value,Fe=Pe.focused,We=r()(G,(k={},Object(m.a)(k,ie,!!ie),Object(m.a)(k,"".concat(G,"-disabled"),W),Object(m.a)(k,"".concat(G,"-focused"),Fe),k)),_e={};Object.keys(Ne).forEach(function(Oe){(Oe.substr(0,5)==="data-"||Oe.substr(0,5)==="aria-"||Oe==="role")&&(_e[Oe]=Ne[Oe])});var Ge=!K&&!W,Ve=this.getInputDisplayValue(null),Ie=(je||je===0)&&(isNaN(je)||Number(je)>=ce),He=(je||je===0)&&(isNaN(je)||Number(je)<=he),Le=Ie||W||K,Te=He||W||K,Ae=r()("".concat(G,"-handler"),"".concat(G,"-handler-up"),Object(m.a)({},"".concat(G,"-handler-up-disabled"),Le)),ye=r()("".concat(G,"-handler"),"".concat(G,"-handler-down"),Object(m.a)({},"".concat(G,"-handler-down-disabled"),Te)),Ee=B?{onTouchStart:Le?l:this.up,onTouchEnd:this.stop}:{onMouseDown:Le?l:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},we=B?{onTouchStart:Te?l:this.down,onTouchEnd:this.stop}:{onMouseDown:Te?l:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return o.a.createElement("div",{className:We,style:be,title:ne,onMouseEnter:le,onMouseLeave:ue,onMouseOver:te,onMouseOut:oe,onFocus:function(){return null},onBlur:function(){return null}},o.a.createElement("div",{className:"".concat(G,"-handler-wrap")},o.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Increase Value","aria-disabled":Le,className:Ae}),H||o.a.createElement("span",{unselectable:"on",className:"".concat(G,"-handler-up-inner"),onClick:n})),o.a.createElement("span",Object.assign({unselectable:"on"},we,{role:"button","aria-label":"Decrease Value","aria-disabled":Te,className:ye}),q||o.a.createElement("span",{unselectable:"on",className:"".concat(G,"-handler-down-inner"),onClick:n}))),o.a.createElement("div",{className:"".concat(G,"-input-wrap")},o.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":he,"aria-valuemax":ce,"aria-valuenow":je,required:Q,type:ee,placeholder:ge,onPaste:Re,onClick:se,onMouseUp:this.onMouseUp,className:"".concat(G,"-input"),tabIndex:J,autoComplete:U,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ge?this.onKeyDown:l,onKeyUp:Ge?this.onKeyUp:l,autoFocus:pe,maxLength:me,readOnly:K,disabled:W,max:ce,min:he,step:$,name:xe,title:ne,id:re,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Ve),pattern:z,inputMode:Y,onInput:ke},_e))))}}]),F}(o.a.Component);D.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:v,min:-v,step:1,style:{},onChange:l,onKeyDown:l,onPressEnter:l,onFocus:l,onBlur:l,parser:s,required:!1,autoComplete:"off"};var c=D,b=Z.a=c},e7zE:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("3y9D"),N("WYAk"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.Base,_=T.WordArray,g=m.algo,S=g.SHA1,p=g.HMAC,o=g.PBKDF2=L.extend({cfg:L.extend({keySize:128/32,hasher:S,iterations:1}),init:function(i){this.cfg=this.cfg.extend(i)},compute:function(i,r){for(var d=this.cfg,f=p.create(d.hasher,i),h=_.create(),E=_.create([1]),y=h.words,l=E.words,n=d.keySize,s=d.iterations;y.length<n;){var u=f.update(r).finalize(E);f.reset();for(var w=u.words,v=w.length,a=u,R=1;R<s;R++){a=f.finalize(a),f.reset();for(var D=a.words,c=0;c<v;c++)w[c]^=D[c]}h.concat(u),l[0]++}return h.sigBytes=n*4,h}});m.PBKDF2=function(i,r,d){return o.create(d).compute(i,r)}}(),P.PBKDF2})},fAei:function(I,Z,N){"use strict";N.d(Z,"a",function(){return u.a});var P=N("rePB"),m=N("VTBJ"),T=N("KQm4"),L=N("1OyB"),_=N("vuIU"),g=N("Ji7U"),S=N("LK+K"),p=N("cDcd"),o=N("4IlW"),i=N("Kwbf"),r=N("TSYQ"),d=N.n(r),f=N("sboe"),h=N("OZM5"),E=N("815F"),y=N("ODXe"),l=N("Ff2n"),n=N("+nKL"),s=N("8XRh"),u=N("WaYH"),w=function(he,be){var ne=he.className,le=he.style,ue=he.motion,te=he.motionNodes,oe=he.motionType,Q=he.onMotionStart,se=he.onMotionEnd,J=he.active,ee=he.treeNodeRequiredProps,ge=Object(l.a)(he,["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"]),re=p.useState(!0),Y=Object(y.a)(re,2),z=Y[0],$=Y[1],me=p.useContext(f.a),pe=me.prefixCls,xe=p.useRef(!1),Re=function(){xe.current||se(),xe.current=!0};return Object(p.useEffect)(function(){te&&oe==="hide"&&z&&$(!1)},[te]),Object(p.useEffect)(function(){return te&&Q(),function(){te&&Re()}},[]),te?p.createElement(s.default,Object.assign({ref:be,visible:z},ue,{motionAppear:oe==="show",onAppearEnd:Re,onLeaveEnd:Re}),function(ke,Ne){var Pe=ke.className,je=ke.style;return p.createElement("div",{ref:Ne,className:d()("".concat(pe,"-treenode-motion"),Pe),style:je},te.map(function(Fe){var We=Fe.data,_e=We.key,Ge=Object(l.a)(We,["key"]),Ve=Fe.isStart,Ie=Fe.isEnd;delete Ge.children;var He=Object(E.f)(_e,ee);return p.createElement(u.a,Object.assign({},Ge,He,{active:J,data:Fe.data,key:_e,isStart:Ve,isEnd:Ie}))}))}):p.createElement(u.a,Object.assign({domRef:be,className:ne,style:le},ge,{active:J}))};w.displayName="MotionTreeNode";var v=p.forwardRef(w),a=v;function R(){var ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],be=ce.length,ne=he.length;if(Math.abs(be-ne)!==1)return{add:!1,key:null};function le(ue,te){var oe=new Map;ue.forEach(function(se){oe.set(se,!0)});var Q=te.filter(function(se){return!oe.has(se)});return Q.length===1?Q[0]:null}return be<ne?{add:!0,key:le(ce,he)}:{add:!1,key:le(he,ce)}}function D(ce,he,be){var ne=ce.findIndex(function(oe){var Q=oe.data;return Q.key===be}),le=ce[ne+1],ue=he.findIndex(function(oe){var Q=oe.data;return Q.key===be});if(le){var te=he.findIndex(function(oe){var Q=oe.data;return Q.key===le.data.key});return he.slice(ue+1,te)}return he.slice(ue+1)}var c={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},b=function(){},x="RC_TREE_MOTION_".concat(Math.random()),C={key:x},F={key:x,level:0,index:0,pos:"0",node:C},j={parent:null,children:[],pos:F.pos,data:C,isStart:[],isEnd:[]};function k(ce,he,be,ne){return he===!1||!be?ce:ce.slice(0,Math.ceil(be/ne)+1)}function X(ce){var he=ce.data.key,be=ce.pos;return Object(E.e)(he,be)}function G(ce){for(var he=String(ce.data.key),be=ce;be.parent;)be=be.parent,he="".concat(be.data.key," > ").concat(he);return he}var W=function(he,be){var ne=he.prefixCls,le=he.data,ue=he.selectable,te=he.checkable,oe=he.expandedKeys,Q=he.selectedKeys,se=he.checkedKeys,J=he.loadedKeys,ee=he.loadingKeys,ge=he.halfCheckedKeys,re=he.keyEntities,Y=he.disabled,z=he.dragging,$=he.dragOverNodeKey,me=he.dropPosition,pe=he.motion,xe=he.height,Re=he.itemHeight,ke=he.virtual,Ne=he.focusable,Pe=he.activeItem,je=he.focused,Fe=he.tabIndex,We=he.onKeyDown,_e=he.onFocus,Ge=he.onBlur,Ve=he.onActiveChange,Ie=he.onListChangeStart,He=he.onListChangeEnd,Le=Object(l.a)(he,["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"]),Te=p.useRef(null);p.useImperativeHandle(be,function(){return{scrollTo:function(Wt){Te.current.scrollTo(Wt)}}});var Ae=p.useState(oe),ye=Object(y.a)(Ae,2),Ee=ye[0],we=ye[1],Oe=p.useState(le),Ce=Object(y.a)(Oe,2),Be=Ce[0],Ke=Ce[1],qe=p.useState(le),et=Object(y.a)(qe,2),it=et[0],pt=et[1],gt=p.useState([]),at=Object(y.a)(gt,2),Rt=at[0],Tt=at[1],Pt=p.useState(null),Ft=Object(y.a)(Pt,2),ct=Ft[0],mr=Ft[1];function Or(){Ke(le),pt(le),Tt([]),mr(null),He()}p.useEffect(function(){we(oe);var ht=R(Ee,oe);if(ht.key!==null)if(ht.add){var Wt=Be.findIndex(function(Ot){var qt=Ot.data.key;return qt===ht.key}),Mt=k(D(Be,le,ht.key),ke,xe,Re),Bt=Be.slice();Bt.splice(Wt+1,0,j),pt(Bt),Tt(Mt),mr("show")}else{var Ct=le.findIndex(function(Ot){var qt=Ot.data.key;return qt===ht.key}),kt=k(D(le,Be,ht.key),ke,xe,Re),ut=le.slice();ut.splice(Ct+1,0,j),pt(ut),Tt(kt),mr("hide")}else Be!==le&&(Ke(le),pt(le))},[oe,le]),p.useEffect(function(){z||Or()},[z]);var dr=pe?it:le,Ye={expandedKeys:oe,selectedKeys:Q,loadedKeys:J,loadingKeys:ee,checkedKeys:se,halfCheckedKeys:ge,dragOverNodeKey:$,dropPosition:me,keyEntities:re};return p.createElement(p.Fragment,null,je&&Pe&&p.createElement("span",{style:c,"aria-live":"assertive"},G(Pe)),p.createElement("div",{role:"tree"},p.createElement("input",{style:c,disabled:Ne===!1||Y,tabIndex:Ne!==!1?Fe:null,onKeyDown:We,onFocus:_e,onBlur:Ge,value:"",onChange:b})),p.createElement(n.a,Object.assign({},Le,{data:dr,itemKey:X,height:xe,fullHeight:!1,virtual:ke,itemHeight:Re,prefixCls:"".concat(ne,"-list"),ref:Te}),function(ht){var Wt=ht.pos,Mt=ht.data,Bt=Mt.key,Ct=Object(l.a)(Mt,["key"]),kt=ht.isStart,ut=ht.isEnd,Ot=Object(E.e)(Bt,Wt);delete Ct.children;var qt=Object(E.f)(Ot,Ye);return p.createElement(a,Object.assign({},Ct,qt,{active:Pe&&Bt===Pe.data.key,pos:Wt,data:ht.data,isStart:kt,isEnd:ut,motion:pe,motionNodes:Bt===x?Rt:null,motionType:ct,onMotionStart:Ie,onMotionEnd:Or,treeNodeRequiredProps:Ye,onMouseMove:function(){Ve(null)}}))}))},K=p.forwardRef(W);K.displayName="NodeList";var B=K,U=N("NvD2"),H=function(ce){Object(g.a)(be,ce);var he=Object(S.a)(be);function be(){var ne;return Object(L.a)(this,be),ne=he.apply(this,arguments),ne.destroyed=!1,ne.state={keyEntities:{},selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],dragging:!1,dragNodesKeys:[],dragOverNodeKey:null,dropPosition:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null},ne.listRef=p.createRef(),ne.onNodeDragStart=function(le,ue){var te=ne.state,oe=te.expandedKeys,Q=te.keyEntities,se=ne.props.onDragStart,J=ue.props.eventKey;ne.dragNode=ue;var ee=Object(h.b)(oe,J);ne.setState({dragging:!0,dragNodesKeys:Object(h.g)(J,Q)}),ne.setExpandedKeys(ee),se&&se({event:le,node:Object(E.b)(ue.props)})},ne.onNodeDragEnter=function(le,ue){var te=ne.state,oe=te.expandedKeys,Q=te.keyEntities,se=te.dragNodesKeys,J=ne.props.onDragEnter,ee=ue.props,ge=ee.pos,re=ee.eventKey;if(!ne.dragNode||se.indexOf(re)!==-1)return;var Y=Object(h.c)(le,ue);if(ne.dragNode.props.eventKey===re&&Y===0){ne.setState({dragOverNodeKey:"",dropPosition:null});return}setTimeout(function(){ne.setState({dragOverNodeKey:re,dropPosition:Y}),ne.delayedDragEnterLogic||(ne.delayedDragEnterLogic={}),Object.keys(ne.delayedDragEnterLogic).forEach(function(z){clearTimeout(ne.delayedDragEnterLogic[z])}),ne.delayedDragEnterLogic[ge]=window.setTimeout(function(){if(!ne.state.dragging)return;var z=Object(T.a)(oe),$=Q[re];$&&($.children||[]).length&&(z=Object(h.a)(oe,re)),"expandedKeys"in ne.props||ne.setExpandedKeys(z),J&&J({event:le,node:Object(E.b)(ue.props),expandedKeys:z})},400)},0)},ne.onNodeDragOver=function(le,ue){var te=ne.state.dragNodesKeys,oe=ne.props.onDragOver,Q=ue.props.eventKey;if(te.indexOf(Q)!==-1)return;if(ne.dragNode&&Q===ne.state.dragOverNodeKey){var se=Object(h.c)(le,ue);if(se===ne.state.dropPosition)return;ne.setState({dropPosition:se})}oe&&oe({event:le,node:Object(E.b)(ue.props)})},ne.onNodeDragLeave=function(le,ue){var te=ne.props.onDragLeave;ne.setState({dragOverNodeKey:""}),te&&te({event:le,node:Object(E.b)(ue.props)})},ne.onNodeDragEnd=function(le,ue){var te=ne.props.onDragEnd;ne.setState({dragOverNodeKey:""}),ne.cleanDragState(),te&&te({event:le,node:Object(E.b)(ue.props)}),ne.dragNode=null},ne.onNodeDrop=function(le,ue){var te=ne.state,oe=te.dragNodesKeys,Q=oe===void 0?[]:oe,se=te.dropPosition,J=ne.props.onDrop,ee=ue.props,ge=ee.eventKey,re=ee.pos;if(ne.setState({dragOverNodeKey:""}),ne.cleanDragState(),Q.indexOf(ge)!==-1){Object(i.a)(!1,"Can not drop to dragNode(include it's children node)");return}var Y=Object(h.k)(re),z={event:le,node:Object(E.b)(ue.props),dragNode:ne.dragNode?Object(E.b)(ne.dragNode.props):null,dragNodesKeys:Q.slice(),dropPosition:se+Number(Y[Y.length-1]),dropToGap:!1};se!==0&&(z.dropToGap=!0),J&&J(z),ne.dragNode=null},ne.cleanDragState=function(){var le=ne.state.dragging;le&&ne.setState({dragging:!1})},ne.onNodeClick=function(le,ue){var te=ne.props.onClick;te&&te(le,ue)},ne.onNodeDoubleClick=function(le,ue){var te=ne.props.onDoubleClick;te&&te(le,ue)},ne.onNodeSelect=function(le,ue){var te=ne.state.selectedKeys,oe=ne.state.keyEntities,Q=ne.props,se=Q.onSelect,J=Q.multiple,ee=ue.selected,ge=ue.key,re=!ee;re?J?te=Object(h.a)(te,ge):te=[ge]:te=Object(h.b)(te,ge);var Y=te.map(function(z){var $=oe[z];return $?$.node:null}).filter(function(z){return z});ne.setUncontrolledState({selectedKeys:te}),se&&se(te,{event:"select",selected:re,node:ue,selectedNodes:Y,nativeEvent:le.nativeEvent})},ne.onNodeCheck=function(le,ue,te){var oe=ne.state,Q=oe.keyEntities,se=oe.checkedKeys,J=oe.halfCheckedKeys,ee=ne.props,ge=ee.checkStrictly,re=ee.onCheck,Y=ue.key,z,$={event:"check",node:ue,checked:te,nativeEvent:le.nativeEvent};if(ge){var me=te?Object(h.a)(se,Y):Object(h.b)(se,Y),pe=Object(h.b)(J,Y);z={checked:me,halfChecked:pe},$.checkedNodes=me.map(function(je){return Q[je]}).filter(function(je){return je}).map(function(je){return je.node}),ne.setUncontrolledState({checkedKeys:me})}else{var xe=Object(U.a)([].concat(Object(T.a)(se),[Y]),!0,Q),Re=xe.checkedKeys,ke=xe.halfCheckedKeys;if(!te){var Ne=new Set(Re);Ne.delete(Y);var Pe=Object(U.a)(Array.from(Ne),{checked:!1,halfCheckedKeys:ke},Q);Re=Pe.checkedKeys,ke=Pe.halfCheckedKeys}z=Re,$.checkedNodes=[],$.checkedNodesPositions=[],$.halfCheckedKeys=ke,Re.forEach(function(je){var Fe=Q[je];if(!Fe)return;var We=Fe.node,_e=Fe.pos;$.checkedNodes.push(We),$.checkedNodesPositions.push({node:We,pos:_e})}),ne.setUncontrolledState({checkedKeys:Re},!1,{halfCheckedKeys:ke})}re&&re(z,$)},ne.onNodeLoad=function(le){return new Promise(function(ue){ne.setState(function(te){var oe=te.loadedKeys,Q=oe===void 0?[]:oe,se=te.loadingKeys,J=se===void 0?[]:se,ee=ne.props,ge=ee.loadData,re=ee.onLoad,Y=le.key;if(!ge||Q.indexOf(Y)!==-1||J.indexOf(Y)!==-1)return{};var z=ge(le);return z.then(function(){var $=ne.state,me=$.loadedKeys,pe=$.loadingKeys,xe=Object(h.a)(me,Y),Re=Object(h.b)(pe,Y);re&&re(xe,{event:"load",node:le}),ne.setUncontrolledState({loadedKeys:xe}),ne.setState({loadingKeys:Re}),ue()}),{loadingKeys:Object(h.a)(J,Y)}})})},ne.onNodeMouseEnter=function(le,ue){var te=ne.props.onMouseEnter;te&&te({event:le,node:ue})},ne.onNodeMouseLeave=function(le,ue){var te=ne.props.onMouseLeave;te&&te({event:le,node:ue})},ne.onNodeContextMenu=function(le,ue){var te=ne.props.onRightClick;te&&(le.preventDefault(),te({event:le,node:ue}))},ne.onFocus=function(){var le=ne.props.onFocus;ne.setState({focused:!0}),le&&le.apply(void 0,arguments)},ne.onBlur=function(){var le=ne.props.onBlur;ne.setState({focused:!1}),ne.onActiveChange(null),le&&le.apply(void 0,arguments)},ne.getTreeNodeRequiredProps=function(){var le=ne.state,ue=le.expandedKeys,te=le.selectedKeys,oe=le.loadedKeys,Q=le.loadingKeys,se=le.checkedKeys,J=le.halfCheckedKeys,ee=le.dragOverNodeKey,ge=le.dropPosition,re=le.keyEntities;return{expandedKeys:ue||[],selectedKeys:te||[],loadedKeys:oe||[],loadingKeys:Q||[],checkedKeys:se||[],halfCheckedKeys:J||[],dragOverNodeKey:ee,dropPosition:ge,keyEntities:re}},ne.setExpandedKeys=function(le){var ue=ne.state.treeData,te=Object(E.d)(ue,le);ne.setUncontrolledState({expandedKeys:le,flattenNodes:te},!0)},ne.onNodeExpand=function(le,ue){var te=ne.state.expandedKeys,oe=ne.state.listChanging,Q=ne.props,se=Q.onExpand,J=Q.loadData,ee=ue.key,ge=ue.expanded;if(oe)return;var re=te.indexOf(ee),Y=!ge;if(Object(i.a)(ge&&re!==-1||!ge&&re===-1,"Expand state not sync with index check"),Y?te=Object(h.a)(te,ee):te=Object(h.b)(te,ee),ne.setExpandedKeys(te),se&&se(te,{node:ue,expanded:Y,nativeEvent:le.nativeEvent}),Y&&J){var z=ne.onNodeLoad(ue);z&&z.then(function(){var $=Object(E.d)(ne.state.treeData,te);ne.setUncontrolledState({flattenNodes:$})})}},ne.onListChangeStart=function(){ne.setUncontrolledState({listChanging:!0})},ne.onListChangeEnd=function(){setTimeout(function(){ne.setUncontrolledState({listChanging:!1})})},ne.onActiveChange=function(le){var ue=ne.state.activeKey,te=ne.props.onActiveChange;if(ue===le)return;ne.setState({activeKey:le}),le!==null&&ne.scrollTo({key:le}),te&&te(le)},ne.getActiveItem=function(){var le=ne.state,ue=le.activeKey,te=le.flattenNodes;return ue===null?null:te.find(function(oe){var Q=oe.data.key;return Q===ue})||null},ne.offsetActiveKey=function(le){var ue=ne.state,te=ue.flattenNodes,oe=ue.activeKey,Q=te.findIndex(function(ee){var ge=ee.data.key;return ge===oe});Q===-1&&le<0&&(Q=te.length),Q=(Q+le+te.length)%te.length;var se=te[Q];if(se){var J=se.data.key;ne.onActiveChange(J)}else ne.onActiveChange(null)},ne.onKeyDown=function(le){var ue=ne.state,te=ue.activeKey,oe=ue.expandedKeys,Q=ue.checkedKeys,se=ne.props,J=se.onKeyDown,ee=se.checkable,ge=se.selectable;switch(le.which){case o.a.UP:{ne.offsetActiveKey(-1),le.preventDefault();break}case o.a.DOWN:{ne.offsetActiveKey(1),le.preventDefault();break}}var re=ne.getActiveItem();if(re&&re.data){var Y=ne.getTreeNodeRequiredProps(),z=re.data.isLeaf===!1||!!(re.data.children||[]).length,$=Object(E.b)(Object(m.a)(Object(m.a)({},Object(E.f)(te,Y)),{},{data:re.data,active:!0}));switch(le.which){case o.a.LEFT:{z&&oe.includes(te)?ne.onNodeExpand({},$):re.parent&&ne.onActiveChange(re.parent.data.key),le.preventDefault();break}case o.a.RIGHT:{z&&!oe.includes(te)?ne.onNodeExpand({},$):re.children&&re.children.length&&ne.onActiveChange(re.children[0].data.key),le.preventDefault();break}case o.a.ENTER:case o.a.SPACE:{ee&&!$.disabled&&$.checkable!==!1&&!$.disableCheckbox?ne.onNodeCheck({},$,!Q.includes(te)):!ee&&ge&&!$.disabled&&$.selectable!==!1&&ne.onNodeSelect({},$);break}}}J&&J(le)},ne.setUncontrolledState=function(le){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(ne.destroyed)return;var oe=!1,Q=!0,se={};Object.keys(le).forEach(function(J){if(J in ne.props){Q=!1;return}oe=!0,se[J]=le[J]}),oe&&(!ue||Q)&&ne.setState(Object(m.a)(Object(m.a)({},se),te))},ne.scrollTo=function(le){ne.listRef.current.scrollTo(le)},ne}return Object(_.a)(be,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var le,ue=this.state,te=ue.focused,oe=ue.flattenNodes,Q=ue.keyEntities,se=ue.dragging,J=ue.activeKey,ee=this.props,ge=ee.prefixCls,re=ee.className,Y=ee.style,z=ee.showLine,$=ee.focusable,me=ee.tabIndex,pe=me===void 0?0:me,xe=ee.selectable,Re=ee.showIcon,ke=ee.icon,Ne=ee.switcherIcon,Pe=ee.draggable,je=ee.checkable,Fe=ee.checkStrictly,We=ee.disabled,_e=ee.motion,Ge=ee.loadData,Ve=ee.filterTreeNode,Ie=ee.height,He=ee.itemHeight,Le=ee.virtual,Te=ee.titleRender,Ae=ee.onContextMenu,ye=Object(h.f)(this.props);return p.createElement(f.a.Provider,{value:{prefixCls:ge,selectable:xe,showIcon:Re,icon:ke,switcherIcon:Ne,draggable:Pe,checkable:je,checkStrictly:Fe,disabled:We,keyEntities:Q,loadData:Ge,filterTreeNode:Ve,titleRender:Te,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},p.createElement("div",{className:d()(ge,re,(le={},Object(P.a)(le,"".concat(ge,"-show-line"),z),Object(P.a)(le,"".concat(ge,"-focused"),te),Object(P.a)(le,"".concat(ge,"-active-focused"),J!==null),le))},p.createElement(B,Object.assign({ref:this.listRef,prefixCls:ge,style:Y,data:oe,disabled:We,selectable:xe,checkable:!!je,motion:_e,dragging:se,height:Ie,itemHeight:He,virtual:Le,focusable:$,focused:te,tabIndex:pe,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Ae},this.getTreeNodeRequiredProps(),ye))))}}],[{key:"getDerivedStateFromProps",value:function(le,ue){var te=ue.prevProps,oe={prevProps:le};function Q(ke){return!te&&ke in le||te&&te[ke]!==le[ke]}var se;if(Q("treeData")?se=le.treeData:Q("children")&&(Object(i.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),se=Object(E.c)(le.children)),se){oe.treeData=se;var J=Object(E.a)(se);oe.keyEntities=Object(m.a)(Object(P.a)({},x,F),J.keyEntities)}var ee=oe.keyEntities||ue.keyEntities;if(Q("expandedKeys")||te&&Q("autoExpandParent"))oe.expandedKeys=le.autoExpandParent||!te&&le.defaultExpandParent?Object(h.e)(le.expandedKeys,ee):le.expandedKeys;else if(!te&&le.defaultExpandAll){var ge=Object(m.a)({},ee);delete ge[x],oe.expandedKeys=Object.keys(ge).map(function(ke){return ge[ke].key})}else!te&&le.defaultExpandedKeys&&(oe.expandedKeys=le.autoExpandParent||le.defaultExpandParent?Object(h.e)(le.defaultExpandedKeys,ee):le.defaultExpandedKeys);if(oe.expandedKeys||delete oe.expandedKeys,se||oe.expandedKeys){var re=Object(E.d)(se||ue.treeData,oe.expandedKeys||ue.expandedKeys);oe.flattenNodes=re}if(le.selectable&&(Q("selectedKeys")?oe.selectedKeys=Object(h.d)(le.selectedKeys,le):!te&&le.defaultSelectedKeys&&(oe.selectedKeys=Object(h.d)(le.defaultSelectedKeys,le))),le.checkable){var Y;if(Q("checkedKeys")?Y=Object(h.j)(le.checkedKeys)||{}:!te&&le.defaultCheckedKeys?Y=Object(h.j)(le.defaultCheckedKeys)||{}:se&&(Y=Object(h.j)(le.checkedKeys)||{checkedKeys:ue.checkedKeys,halfCheckedKeys:ue.halfCheckedKeys}),Y){var z=Y,$=z.checkedKeys,me=$===void 0?[]:$,pe=z.halfCheckedKeys,xe=pe===void 0?[]:pe;if(!le.checkStrictly){var Re=Object(U.a)(me,!0,ee);me=Re.checkedKeys,xe=Re.halfCheckedKeys}oe.checkedKeys=me,oe.halfCheckedKeys=xe}}return Q("loadedKeys")&&(oe.loadedKeys=le.loadedKeys),oe}}]),be}(p.Component);H.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[]},H.TreeNode=u.a;var q=H,ie=Z.b=q},fcSX:function(I,Z,N){"use strict";var P=N("Ff2n"),m=N("1OyB"),T=N("vuIU"),L=N("Ji7U"),_=N("md7G"),g=N("foSv"),S=N("1W/9"),p=N("cDcd"),o=N("rePB"),i=N("JX7q"),r=N("TSYQ"),d=N.n(r),f=N("qx4F"),h=N("4IlW");function E(W){return Array.isArray(W)?W:[W]}var y={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},l=Object.keys(y).filter(function(W){if(typeof document=="undefined")return!1;var K=document.getElementsByTagName("html")[0];return W in(K?K.style:{})})[0],n=y[l];function s(W,K,B,U){W.addEventListener?W.addEventListener(K,B,U):W.attachEvent&&W.attachEvent("on".concat(K),B)}function u(W,K,B,U){W.removeEventListener?W.removeEventListener(K,B,U):W.attachEvent&&W.detachEvent("on".concat(K),B)}function w(W,K){var B=typeof W=="function"?W(K):W;return Array.isArray(B)?B.length===2?B:[B[0],B[1]]:[B]}var v=function(K){return!isNaN(parseFloat(K))&&isFinite(K)},a=!(typeof window!="undefined"&&window.document&&window.document.createElement),R=function W(K,B,U,H){if(!B||B===document||B instanceof Document)return!1;if(B===K.parentNode)return!0;var q=Math.max(Math.abs(U),Math.abs(H))===Math.abs(H),ie=Math.max(Math.abs(U),Math.abs(H))===Math.abs(U),ce=B.scrollHeight-B.clientHeight,he=B.scrollWidth-B.clientWidth,be=document.defaultView.getComputedStyle(B),ne=be.overflowY==="auto"||be.overflowY==="scroll",le=be.overflowX==="auto"||be.overflowX==="scroll",ue=ce&&ne,te=he&≤return q&&(!ue||ue&&(B.scrollTop>=ce&&H<0||B.scrollTop<=0&&H>0))||ie&&(!te||te&&(B.scrollLeft>=he&&U<0||B.scrollLeft<=0&&U>0))?W(K,B.parentNode,U,H):!1};function D(W){var K=c();return function(){var U=Object(g.a)(W),H;if(K){var q=Object(g.a)(this).constructor;H=Reflect.construct(U,arguments,q)}else H=U.apply(this,arguments);return Object(_.a)(this,H)}}function c(){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 b={},x=function(W){Object(L.a)(B,W);var K=D(B);function B(U){var H;return Object(m.a)(this,B),H=K.call(this,U),H.domFocus=function(){H.dom&&H.dom.focus()},H.removeStartHandler=function(q){if(q.touches.length>1)return;H.startPos={x:q.touches[0].clientX,y:q.touches[0].clientY}},H.removeMoveHandler=function(q){if(q.changedTouches.length>1)return;var ie=q.currentTarget,ce=q.changedTouches[0].clientX-H.startPos.x,he=q.changedTouches[0].clientY-H.startPos.y;(ie===H.maskDom||ie===H.handlerDom||ie===H.contentDom&&R(ie,q.target,ce,he))&&q.cancelable&&q.preventDefault()},H.transitionEnd=function(q){var ie=q.target;u(ie,n,H.transitionEnd),ie.style.transition=""},H.onKeyDown=function(q){if(q.keyCode===h.a.ESC){var ie=H.props.onClose;q.stopPropagation(),ie&&ie(q)}},H.onWrapperTransitionEnd=function(q){var ie=H.props,ce=ie.open,he=ie.afterVisibleChange;q.target===H.contentWrapper&&q.propertyName.match(/transform$/)&&(H.dom.style.transition="",!ce&&H.getCurrentDrawerSome()&&(document.body.style.overflowX="",H.maskDom&&(H.maskDom.style.left="",H.maskDom.style.width="")),he&&he(!!ce))},H.openLevelTransition=function(){var q=H.props,ie=q.open,ce=q.width,he=q.height,be=H.getHorizontalBoolAndPlacementName(),ne=be.isHorizontal,le=be.placementName,ue=H.contentDom?H.contentDom.getBoundingClientRect()[ne?"width":"height"]:0,te=(ne?ce:he)||ue;H.setLevelAndScrolling(ie,le,te)},H.setLevelTransform=function(q,ie,ce,he){var be=H.props,ne=be.placement,le=be.levelMove,ue=be.duration,te=be.ease,oe=be.showMask;H.levelDom.forEach(function(Q){Q.style.transition="transform ".concat(ue," ").concat(te),s(Q,n,H.transitionEnd);var se=q?ce:0;if(le){var J=w(le,{target:Q,open:q});se=q?J[0]:J[1]||0}var ee=typeof se=="number"?"".concat(se,"px"):se,ge=ne==="left"||ne==="top"?ee:"-".concat(ee);ge=oe&&ne==="right"&&he?"calc(".concat(ge," + ").concat(he,"px)"):ge,Q.style.transform=se?"".concat(ie,"(").concat(ge,")"):""})},H.setLevelAndScrolling=function(q,ie,ce){var he=H.props.onChange;if(!a){var be=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(f.a)(!0):0;H.setLevelTransform(q,ie,ce,be),H.toggleScrollingToDrawerAndBody(be)}he&&he(q)},H.toggleScrollingToDrawerAndBody=function(q){var ie=H.props,ce=ie.getOpenCount,he=ie.getContainer,be=ie.showMask,ne=ie.open,le=he&&he(),ue=ce&&ce();if(le&&le.parentNode===document.body&&be){var te=["touchstart"],oe=[document.body,H.maskDom,H.handlerDom,H.contentDom];ne&&document.body.style.overflow!=="hidden"?(q&&H.addScrollingEffect(q),ue===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",oe.forEach(function(Q,se){if(!Q)return;s(Q,te[se]||"touchmove",se?H.removeMoveHandler:H.removeStartHandler,H.passive)})):H.getCurrentDrawerSome()&&(ue||(document.body.style.overflow=""),document.body.style.touchAction="",q&&H.remScrollingEffect(q),oe.forEach(function(Q,se){if(!Q)return;u(Q,te[se]||"touchmove",se?H.removeMoveHandler:H.removeStartHandler,H.passive)}))}},H.addScrollingEffect=function(q){var ie=H.props,ce=ie.placement,he=ie.duration,be=ie.ease,ne=ie.getOpenCount,le=ie.switchScrollingEffect,ue=ne&&ne();ue===1&&le();var te="width ".concat(he," ").concat(be),oe="transform ".concat(he," ").concat(be);H.dom.style.transition="none";switch(ce){case"right":H.dom.style.transform="translateX(-".concat(q,"px)");break;case"top":case"bottom":H.dom.style.width="calc(100% - ".concat(q,"px)"),H.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(H.timeout),H.timeout=setTimeout(function(){H.dom&&(H.dom.style.transition="".concat(oe,",").concat(te),H.dom.style.width="",H.dom.style.transform="")})},H.remScrollingEffect=function(q){var ie=H.props,ce=ie.placement,he=ie.duration,be=ie.ease,ne=ie.getOpenCount,le=ie.switchScrollingEffect,ue=ne&&ne();ue||le(!0),l&&(document.body.style.overflowX="hidden"),H.dom.style.transition="none";var te,oe="width ".concat(he," ").concat(be),Q="transform ".concat(he," ").concat(be);switch(ce){case"left":{H.dom.style.width="100%",oe="width 0s ".concat(be," ").concat(he);break}case"right":{H.dom.style.transform="translateX(".concat(q,"px)"),H.dom.style.width="100%",oe="width 0s ".concat(be," ").concat(he),H.maskDom&&(H.maskDom.style.left="-".concat(q,"px"),H.maskDom.style.width="calc(100% + ".concat(q,"px)"));break}case"top":case"bottom":{H.dom.style.width="calc(100% + ".concat(q,"px)"),H.dom.style.height="100%",H.dom.style.transform="translateZ(0)",te="height 0s ".concat(be," ").concat(he);break}default:break}clearTimeout(H.timeout),H.timeout=setTimeout(function(){H.dom&&(H.dom.style.transition="".concat(Q,",").concat(te?"".concat(te,","):"").concat(oe),H.dom.style.transform="",H.dom.style.width="",H.dom.style.height="")})},H.getCurrentDrawerSome=function(){return!Object.keys(b).some(function(q){return b[q]})},H.getLevelDom=function(q){var ie=q.level,ce=q.getContainer;if(a)return;var he=ce&&ce(),be=he?he.parentNode:null;if(H.levelDom=[],ie==="all"){var ne=be?Array.prototype.slice.call(be.children):[];ne.forEach(function(le){le.nodeName!=="SCRIPT"&&le.nodeName!=="STYLE"&&le.nodeName!=="LINK"&&le!==he&&H.levelDom.push(le)})}else ie&&E(ie).forEach(function(le){document.querySelectorAll(le).forEach(function(ue){H.levelDom.push(ue)})})},H.getHorizontalBoolAndPlacementName=function(){var q=H.props.placement,ie=q==="left"||q==="right",ce="translate".concat(ie?"X":"Y");return{isHorizontal:ie,placementName:ce}},H.state={_self:Object(i.a)(H)},H}return Object(T.a)(B,[{key:"componentDidMount",value:function(){var H=this;if(!a){var q=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return q=!0,null}}))}catch(ne){}this.passive=q?{passive:!1}:!1}var ie=this.props,ce=ie.open,he=ie.getContainer,be=he&&he();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),ce&&(be&&be.parentNode===document.body&&(b[this.drawerId]=ce),this.openLevelTransition(),this.forceUpdate(function(){H.domFocus()}))}},{key:"componentDidUpdate",value:function(H){var q=this.props,ie=q.open,ce=q.getContainer,he=ce&&ce();ie!==H.open&&(ie&&this.domFocus(),he&&he.parentNode===document.body&&(b[this.drawerId]=!!ie),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var H=this.props,q=H.getOpenCount,ie=H.open,ce=H.switchScrollingEffect,he=typeof q=="function"&&q();delete b[this.drawerId],ie&&(this.setLevelTransform(!1),document.body.style.touchAction=""),he||(document.body.style.overflow="",ce(!0))}},{key:"render",value:function(){var H,q=this,ie=this.props,ce=ie.className,he=ie.children,be=ie.style,ne=ie.width,le=ie.height,ue=ie.defaultOpen,te=ie.open,oe=ie.prefixCls,Q=ie.placement,se=ie.level,J=ie.levelMove,ee=ie.ease,ge=ie.duration,re=ie.getContainer,Y=ie.handler,z=ie.onChange,$=ie.afterVisibleChange,me=ie.showMask,pe=ie.maskClosable,xe=ie.maskStyle,Re=ie.onClose,ke=ie.onHandleClick,Ne=ie.keyboard,Pe=ie.getOpenCount,je=ie.switchScrollingEffect,Fe=Object(P.a)(ie,["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"]),We=this.dom?te:!1,_e=d()(oe,(H={},Object(o.a)(H,"".concat(oe,"-").concat(Q),!0),Object(o.a)(H,"".concat(oe,"-open"),We),Object(o.a)(H,ce||"",!!ce),Object(o.a)(H,"no-mask",!me),H)),Ge=this.getHorizontalBoolAndPlacementName(),Ve=Ge.placementName,Ie=Q==="left"||Q==="top"?"-100%":"100%",He=We?"":"".concat(Ve,"(").concat(Ie,")"),Le=Y&&p.cloneElement(Y,{onClick:function(Ae){Y.props.onClick&&Y.props.onClick(),ke&&ke(Ae)},ref:function(Ae){q.handlerDom=Ae}});return p.createElement("div",Object.assign({},Fe,{tabIndex:-1,className:_e,style:be,ref:function(Ae){q.dom=Ae},onKeyDown:We&&Ne?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),me&&p.createElement("div",{className:"".concat(oe,"-mask"),onClick:pe?Re:void 0,style:xe,ref:function(Ae){q.maskDom=Ae}}),p.createElement("div",{className:"".concat(oe,"-content-wrapper"),style:{transform:He,msTransform:He,width:v(ne)?"".concat(ne,"px"):ne,height:v(le)?"".concat(le,"px"):le},ref:function(Ae){q.contentWrapper=Ae}},p.createElement("div",{className:"".concat(oe,"-content"),ref:function(Ae){q.contentDom=Ae},onTouchStart:We&&me?this.removeStartHandler:void 0,onTouchMove:We&&me?this.removeMoveHandler:void 0},he),Le))}}],[{key:"getDerivedStateFromProps",value:function(H,q){var ie=q.prevProps,ce=q._self,he={prevProps:H};if(ie!==void 0){var be=H.placement,ne=H.level;be!==ie.placement&&(ce.contentDom=null),ne!==ie.level&&ce.getLevelDom(H)}return he}}]),B}(p.Component);x.defaultProps={switchScrollingEffect:function(){}};var C=x;function F(W){var K=j();return function(){var U=Object(g.a)(W),H;if(K){var q=Object(g.a)(this).constructor;H=Reflect.construct(U,arguments,q)}else H=U.apply(this,arguments);return Object(_.a)(this,H)}}function j(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(W){return!1}}var k=function(W){Object(L.a)(B,W);var K=F(B);function B(U){var H;Object(m.a)(this,B),H=K.call(this,U),H.onHandleClick=function(ie){var ce=H.props,he=ce.onHandleClick,be=ce.open;if(he&&he(ie),typeof be=="undefined"){var ne=H.state.open;H.setState({open:!ne})}},H.onClose=function(ie){var ce=H.props,he=ce.onClose,be=ce.open;he&&he(ie),typeof be=="undefined"&&H.setState({open:!1})};var q=typeof U.open!="undefined"?U.open:!!U.defaultOpen;return H.state={open:q},"onMaskClick"in U&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),H}return Object(T.a)(B,[{key:"render",value:function(){var H=this,q=this.props,ie=q.defaultOpen,ce=q.getContainer,he=q.wrapperClassName,be=q.forceRender,ne=q.handler,le=Object(P.a)(q,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),ue=this.state.open;if(!ce)return p.createElement("div",{className:he,ref:function(Q){H.dom=Q}},p.createElement(C,Object.assign({},le,{open:ue,handler:ne,getContainer:function(){return H.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var te=!!ne||be;return p.createElement(S.a,{visible:ue,forceRender:te,getContainer:ce,wrapperClassName:he},function(oe){var Q=oe.visible,se=oe.afterClose,J=Object(P.a)(oe,["visible","afterClose"]);return p.createElement(C,Object.assign({},le,J,{open:Q!==void 0?Q:ue,afterVisibleChange:se!==void 0?se:le.afterVisibleChange,handler:ne,onClose:H.onClose,onHandleClick:H.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(H,q){var ie=q.prevProps,ce={prevProps:H};return typeof ie!="undefined"&&H.open!==ie.open&&(ce.open=H.open),ce}}]),B}(p.Component);k.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:p.createElement("div",{className:"drawer-handle"},p.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var X=k,G=Z.a=X},fcyK:function(I,Z,N){},gRFJ:function(I,Z,N){I.exports=[N("rdUC"),N("ynwM"),N("RELg"),N("DlR+"),N("CrYA"),N("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(I){return I<10?"0"+I:I}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(I){return rx_escapable.lastIndex=0,rx_escapable.test(I)?'"'+I.replace(rx_escapable,function(Z){var N=meta[Z];return typeof N=="string"?N:"\\u"+("0000"+Z.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+I+'"'}function str(I,Z){var N,P,m,T,L=gap,_,g=Z[I];g&&typeof g=="object"&&typeof g.toJSON=="function"&&(g=g.toJSON(I)),typeof rep=="function"&&(g=rep.call(Z,I,g));switch(typeof g){case"string":return quote(g);case"number":return isFinite(g)?String(g):"null";case"boolean":case"null":return String(g);case"object":if(!g)return"null";if(gap+=indent,_=[],Object.prototype.toString.apply(g)==="[object Array]"){for(T=g.length,N=0;N<T;N+=1)_[N]=str(N,g)||"null";return m=_.length===0?"[]":gap?`[
|
|
|
`+gap+_.join(`,
|
|
|
`+gap)+`
|
|
|
`+L+"]":"["+_.join(",")+"]",gap=L,m}if(rep&&typeof rep=="object")for(T=rep.length,N=0;N<T;N+=1)typeof rep[N]=="string"&&(P=rep[N],m=str(P,g),m&&_.push(quote(P)+(gap?": ":":")+m));else for(P in g)Object.prototype.hasOwnProperty.call(g,P)&&(m=str(P,g),m&&_.push(quote(P)+(gap?": ":":")+m));return m=_.length===0?"{}":gap?`{
|
|
|
`+gap+_.join(`,
|
|
|
`+gap)+`
|
|
|
`+L+"}":"{"+_.join(",")+"}",gap=L,m}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(I,Z,N){var P;if(gap="",indent="",typeof N=="number")for(P=0;P<N;P+=1)indent+=" ";else typeof N=="string"&&(indent=N);if(rep=Z,Z&&typeof Z!="function"&&(typeof Z!="object"||typeof Z.length!="number"))throw new Error("JSON.stringify");return str("",{"":I})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(I,Z){var N,P,m=I[Z];if(m&&typeof m=="object")for(N in m)Object.prototype.hasOwnProperty.call(m,N)&&(P=walk(m,N),P!==void 0?m[N]=P:delete m[N]);return reviver.call(I,Z,m)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(I){return"\\u"+("0000"+I.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(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.mode.ECB=function(){var m=P.lib.BlockCipherMode.extend();return m.Encryptor=m.extend({processBlock:function(T,L){this._cipher.encryptBlock(T,L)}}),m.Decryptor=m.extend({processBlock:function(T,L){this._cipher.decryptBlock(T,L)}}),m}(),P.mode.ECB})},h78n:function(I,Z,N){"use strict";N.d(Z,"a",function(){return k});var P=N("cDcd"),m=N.n(P),T=N("TSYQ"),L=N.n(T),_={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},g=function(W){var K=W.map(function(){return Object(P.useRef)()}),B=Object(P.useRef)();return Object(P.useEffect)(function(){var U=Date.now(),H=!1;Object.keys(K).forEach(function(q){var ie=K[q].current;if(!ie)return;H=!0;var ce=ie.style;ce.transitionDuration=".3s, .3s, .3s, .06s",B.current&&U-B.current<100&&(ce.transitionDuration="0s, 0s")}),H&&(B.current=Date.now())}),[K]};function S(){return S=Object.assign||function(G){for(var W=1;W<arguments.length;W++){var K=arguments[W];for(var B in K)Object.prototype.hasOwnProperty.call(K,B)&&(G[B]=K[B])}return G},S.apply(this,arguments)}function p(G,W){return f(G)||d(G,W)||i(G,W)||o()}function o(){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 i(G,W){if(!G)return;if(typeof G=="string")return r(G,W);var K=Object.prototype.toString.call(G).slice(8,-1);if(K==="Object"&&G.constructor&&(K=G.constructor.name),K==="Map"||K==="Set")return Array.from(G);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return r(G,W)}function r(G,W){(W==null||W>G.length)&&(W=G.length);for(var K=0,B=new Array(W);K<W;K++)B[K]=G[K];return B}function d(G,W){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(G)))return;var K=[],B=!0,U=!1,H=void 0;try{for(var q=G[Symbol.iterator](),ie;!(B=(ie=q.next()).done)&&!(K.push(ie.value),W&&K.length===W);B=!0);}catch(ce){U=!0,H=ce}finally{try{!B&&q.return!=null&&q.return()}finally{if(U)throw H}}return K}function f(G){if(Array.isArray(G))return G}function h(G,W){if(G==null)return{};var K=E(G,W),B,U;if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(G);for(U=0;U<H.length;U++){if(B=H[U],W.indexOf(B)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(G,B))continue;K[B]=G[B]}}return K}function E(G,W){if(G==null)return{};var K={},B=Object.keys(G),U,H;for(H=0;H<B.length;H++){if(U=B[H],W.indexOf(U)>=0)continue;K[U]=G[U]}return K}var y=function(W){var K=W.className,B=W.percent,U=W.prefixCls,H=W.strokeColor,q=W.strokeLinecap,ie=W.strokeWidth,ce=W.style,he=W.trailColor,be=W.trailWidth,ne=W.transition,le=h(W,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete le.gapPosition;var ue=Array.isArray(B)?B:[B],te=Array.isArray(H)?H:[H],oe=g(ue),Q=p(oe,1),se=Q[0],J=ie/2,ee=100-ie/2,ge="M ".concat(q==="round"?J:0,",").concat(J,`
|
|
|
L `).concat(q==="round"?ee:100,",").concat(J),re="0 0 100 ".concat(ie),Y=0;return m.a.createElement("svg",S({className:L()("".concat(U,"-line"),K),viewBox:re,preserveAspectRatio:"none",style:ce},le),m.a.createElement("path",{className:"".concat(U,"-line-trail"),d:ge,strokeLinecap:q,stroke:he,strokeWidth:be||ie,fillOpacity:"0"}),ue.map(function(z,$){var me={strokeDasharray:"".concat(z,"px, 100px"),strokeDashoffset:"-".concat(Y,"px"),transition:ne||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},pe=te[$]||te[te.length-1];return Y+=z,m.a.createElement("path",{key:$,className:"".concat(U,"-line-path"),d:ge,strokeLinecap:q,stroke:pe,strokeWidth:ie,fillOpacity:"0",ref:se[$],style:me})}))};y.defaultProps=_;var l=y;function n(){return n=Object.assign||function(G){for(var W=1;W<arguments.length;W++){var K=arguments[W];for(var B in K)Object.prototype.hasOwnProperty.call(K,B)&&(G[B]=K[B])}return G},n.apply(this,arguments)}function s(G,W){return R(G)||a(G,W)||w(G,W)||u()}function u(){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(G,W){if(!G)return;if(typeof G=="string")return v(G,W);var K=Object.prototype.toString.call(G).slice(8,-1);if(K==="Object"&&G.constructor&&(K=G.constructor.name),K==="Map"||K==="Set")return Array.from(G);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return v(G,W)}function v(G,W){(W==null||W>G.length)&&(W=G.length);for(var K=0,B=new Array(W);K<W;K++)B[K]=G[K];return B}function a(G,W){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(G)))return;var K=[],B=!0,U=!1,H=void 0;try{for(var q=G[Symbol.iterator](),ie;!(B=(ie=q.next()).done)&&!(K.push(ie.value),W&&K.length===W);B=!0);}catch(ce){U=!0,H=ce}finally{try{!B&&q.return!=null&&q.return()}finally{if(U)throw H}}return K}function R(G){if(Array.isArray(G))return G}function D(G,W){if(G==null)return{};var K=c(G,W),B,U;if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(G);for(U=0;U<H.length;U++){if(B=H[U],W.indexOf(B)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(G,B))continue;K[B]=G[B]}}return K}function c(G,W){if(G==null)return{};var K={},B=Object.keys(G),U,H;for(H=0;H<B.length;H++){if(U=B[H],W.indexOf(U)>=0)continue;K[U]=G[U]}return K}var b=0;function x(G){return+G.replace("%","")}function C(G){return Array.isArray(G)?G:[G]}function F(G,W,K,B){var U=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,H=arguments.length>5?arguments[5]:void 0,q=50-B/2,ie=0,ce=-q,he=0,be=-2*q;switch(H){case"left":ie=-q,ce=0,he=2*q,be=0;break;case"right":ie=q,ce=0,he=-2*q,be=0;break;case"bottom":ce=q,be=2*q;break;default:}var ne="M 50,50 m ".concat(ie,",").concat(ce,`
|
|
|
a `).concat(q,",").concat(q," 0 1 1 ").concat(he,",").concat(-be,`
|
|
|
a `).concat(q,",").concat(q," 0 1 1 ").concat(-he,",").concat(be),le=Math.PI*2*q,ue={stroke:K,strokeDasharray:"".concat(W/100*(le-U),"px ").concat(le,"px"),strokeDashoffset:"-".concat(U/2+G/100*(le-U),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ne,pathStyle:ue}}var j=function(W){var K=W.prefixCls,B=W.strokeWidth,U=W.trailWidth,H=W.gapDegree,q=W.gapPosition,ie=W.trailColor,ce=W.strokeLinecap,he=W.style,be=W.className,ne=W.strokeColor,le=W.percent,ue=D(W,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),te=Object(P.useMemo)(function(){return b+=1,b},[]),oe=F(0,100,ie,B,H,q),Q=oe.pathString,se=oe.pathStyle,J=C(le),ee=C(ne),ge=ee.find(function(me){return Object.prototype.toString.call(me)==="[object Object]"}),re=g(J),Y=s(re,1),z=Y[0],$=function(){var pe=0;return J.map(function(xe,Re){var ke=ee[Re]||ee[ee.length-1],Ne=Object.prototype.toString.call(ke)==="[object Object]"?"url(#".concat(K,"-gradient-").concat(te,")"):"",Pe=F(pe,xe,ke,B,H,q);return pe+=xe,m.a.createElement("path",{key:Re,className:"".concat(K,"-circle-path"),d:Pe.pathString,stroke:Ne,strokeLinecap:ce,strokeWidth:B,opacity:xe===0?0:1,fillOpacity:"0",style:Pe.pathStyle,ref:z[Re]})})};return m.a.createElement("svg",n({className:L()("".concat(K,"-circle"),be),viewBox:"0 0 100 100",style:he},ue),ge&&m.a.createElement("defs",null,m.a.createElement("linearGradient",{id:"".concat(K,"-gradient-").concat(te),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(ge).sort(function(me,pe){return x(me)-x(pe)}).map(function(me,pe){return m.a.createElement("stop",{key:pe,offset:me,stopColor:ge[me]})}))),m.a.createElement("path",{className:"".concat(K,"-circle-trail"),d:Q,stroke:ie,strokeLinecap:ce,strokeWidth:U||B,fillOpacity:"0",style:se}),$().reverse())};j.defaultProps=_;var k=j,X={Line:l,Circle:k}},hQp1:function(I,Z,N){"use strict";N.d(Z,"a",function(){return m});var P;(function(T){T.FirstPage="firstPage",T.PrevPage="prevPage",T.NextPage="nextPage"})(P||(P={}));var m;(function(T){T[T.Single=0]="Single",T[T.Multiple=1]="Multiple",T[T.Judge=2]="Judge",T[T.Fill=3]="Fill",T[T.Subjective=4]="Subjective",T[T.Shixun=5]="Shixun",T[T.Program=6]="Program",T[T.Combine=7]="Combine"})(m||(m={}))},i3hx:function(I,Z,N){},i58Z:function(I,Z,N){I.exports={wrap:"wrap___Yg2Z9",addKnowledge:"addKnowledge___2FlI0",disabled:"disabled___1_wxN"}},jO9C:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.pad.Iso97971={pad:function(m,T){m.concat(P.lib.WordArray.create([2147483648],1)),P.pad.ZeroPadding.pad(m,T)},unpad:function(m){P.pad.ZeroPadding.unpad(m),m.sigBytes--}},P.pad.Iso97971})},je13:function(I,Z,N){var P=N("5nXd"),m=N("gRFJ"),T=[N("uQRt")];I.exports=P.createStore(m,T)},kSUc:function(I,Z,N){},lOMy:function(I,Z,N){},lPiR:function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){return function(m){var T=P,L=T.lib,_=L.WordArray,g=L.Hasher,S=T.algo,p=[],o=[];(function(){function d(y){for(var l=m.sqrt(y),n=2;n<=l;n++)if(!(y%n))return!1;return!0}function f(y){return(y-(y|0))*4294967296|0}for(var h=2,E=0;E<64;)d(h)&&(E<8&&(p[E]=f(m.pow(h,1/2))),o[E]=f(m.pow(h,1/3)),E++),h++})();var i=[],r=S.SHA256=g.extend({_doReset:function(){this._hash=new _.init(p.slice(0))},_doProcessBlock:function(d,f){for(var h=this._hash.words,E=h[0],y=h[1],l=h[2],n=h[3],s=h[4],u=h[5],w=h[6],v=h[7],a=0;a<64;a++){if(a<16)i[a]=d[f+a]|0;else{var R=i[a-15],D=(R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3,c=i[a-2],b=(c<<15|c>>>17)^(c<<13|c>>>19)^c>>>10;i[a]=D+i[a-7]+b+i[a-16]}var x=s&u^~s&w,C=E&y^E&l^y&l,F=(E<<30|E>>>2)^(E<<19|E>>>13)^(E<<10|E>>>22),j=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),k=v+j+x+o[a]+i[a],X=F+C;v=w,w=u,u=s,s=n+k|0,n=l,l=y,y=E,E=k+X|0}h[0]=h[0]+E|0,h[1]=h[1]+y|0,h[2]=h[2]+l|0,h[3]=h[3]+n|0,h[4]=h[4]+s|0,h[5]=h[5]+u|0,h[6]=h[6]+w|0,h[7]=h[7]+v|0},_doFinalize:function(){var d=this._data,f=d.words,h=this._nDataBytes*8,E=d.sigBytes*8;return f[E>>>5]|=128<<24-E%32,f[(E+64>>>9<<4)+14]=m.floor(h/4294967296),f[(E+64>>>9<<4)+15]=h,d.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var d=g.clone.call(this);return d._hash=this._hash.clone(),d}});T.SHA256=g._createHelper(r),T.HmacSHA256=g._createHmacHelper(r)}(Math),P.SHA256})},lZu9:function(I,Z,N){(function(P){P(N("VrN/"),N("1eCo"),N("8EBN"))})(function(P){"use strict";P.defineMode("markdown",function(m,T){var L=P.getMode(m,"text/html"),_=L.name=="null";function g(B){if(P.findModeByName){var U=P.findModeByName(B);U&&(B=U.mime||U.mimes[0])}var H=P.getMode(m,B);return H.name=="null"?null:H}T.highlightFormatting===void 0&&(T.highlightFormatting=!1),T.maxBlockquoteDepth===void 0&&(T.maxBlockquoteDepth=0),T.taskLists===void 0&&(T.taskLists=!1),T.strikethrough===void 0&&(T.strikethrough=!1),T.emoji===void 0&&(T.emoji=!1),T.fencedCodeBlockHighlighting===void 0&&(T.fencedCodeBlockHighlighting=!0),T.fencedCodeBlockDefaultMode===void 0&&(T.fencedCodeBlockDefaultMode="text/plain"),T.xml===void 0&&(T.xml=!0),T.tokenTypeOverrides===void 0&&(T.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 p in S)S.hasOwnProperty(p)&&T.tokenTypeOverrides[p]&&(S[p]=T.tokenTypeOverrides[p]);var o=/^([*\-_])(?:\s*\1){2,}\s*$/,i=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,r=/^\[(x| )\](?=\s)/i,d=T.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,f=/^ {0,3}(?:\={1,}|-{2,})\s*$/,h=/^[^#!\[\]*_\\<>` "'(~:]+/,E=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,y=/^\s*\[[^\]]+?\]:.*$/,l=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,n=" ";function s(B,U,H){return U.f=U.inline=H,H(B,U)}function u(B,U,H){return U.f=U.block=H,H(B,U)}function w(B){return!B||!/\S/.test(B.string)}function v(B){if(B.linkTitle=!1,B.linkHref=!1,B.linkText=!1,B.em=!1,B.strong=!1,B.strikethrough=!1,B.quote=0,B.indentedCode=!1,B.f==R){var U=_;if(!U){var H=P.innerMode(L,B.htmlState);U=H.mode.name=="xml"&&H.state.tagStart===null&&!H.state.context&&H.state.tokenize.isInText}U&&(B.f=x,B.block=a,B.htmlState=null)}return B.trailingSpace=0,B.trailingSpaceNewLine=!1,B.prevLine=B.thisLine,B.thisLine={stream:null},null}function a(B,U){var H=B.column()===U.indentation,q=w(U.prevLine.stream),ie=U.indentedCode,ce=U.prevLine.hr,he=U.list!==!1,be=(U.listStack[U.listStack.length-1]||0)+3;U.indentedCode=!1;var ne=U.indentation;if(U.indentationDiff===null&&(U.indentationDiff=U.indentation,he)){for(U.list=null;ne<U.listStack[U.listStack.length-1];)U.listStack.pop(),U.listStack.length?U.indentation=U.listStack[U.listStack.length-1]:U.list=!1;U.list!==!1&&(U.indentationDiff=ne-U.listStack[U.listStack.length-1])}var le=!q&&!ce&&!U.prevLine.header&&(!he||!ie)&&!U.prevLine.fencedCodeEnd,ue=(U.list===!1||ce||q)&&U.indentation<=be&&B.match(o),te=null;if(U.indentationDiff>=4&&(ie||U.prevLine.fencedCodeEnd||U.prevLine.header||q))return B.skipToEnd(),U.indentedCode=!0,S.code;if(B.eatSpace())return null;if(H&&U.indentation<=be&&(te=B.match(d))&&te[1].length<=6)return U.quote=0,U.header=te[1].length,U.thisLine.header=!0,T.highlightFormatting&&(U.formatting="header"),U.f=U.inline,c(U);if(U.indentation<=be&&B.eat(">"))return U.quote=H?1:U.quote+1,T.highlightFormatting&&(U.formatting="quote"),B.eatSpace(),c(U);if(!ue&&!U.setext&&H&&U.indentation<=be&&(te=B.match(i))){var oe=te[1]?"ol":"ul";return U.indentation=ne+B.current().length,U.list=!0,U.quote=0,U.listStack.push(U.indentation),U.em=!1,U.strong=!1,U.code=!1,U.strikethrough=!1,T.taskLists&&B.match(r,!1)&&(U.taskList=!0),U.f=U.inline,T.highlightFormatting&&(U.formatting=["list","list-"+oe]),c(U)}else{if(H&&U.indentation<=be&&(te=B.match(E,!0)))return U.quote=0,U.fencedEndRE=new RegExp(te[1]+"+ *$"),U.localMode=T.fencedCodeBlockHighlighting&&g(te[2]||T.fencedCodeBlockDefaultMode),U.localMode&&(U.localState=P.startState(U.localMode)),U.f=U.block=D,T.highlightFormatting&&(U.formatting="code-block"),U.code=-1,c(U);if(U.setext||(!le||!he)&&!U.quote&&U.list===!1&&!U.code&&!ue&&!y.test(B.string)&&(te=B.lookAhead(1))&&(te=te.match(f)))return U.setext?(U.header=U.setext,U.setext=0,B.skipToEnd(),T.highlightFormatting&&(U.formatting="header")):(U.header=te[0].charAt(0)=="="?1:2,U.setext=U.header),U.thisLine.header=!0,U.f=U.inline,c(U);if(ue)return B.skipToEnd(),U.hr=!0,U.thisLine.hr=!0,S.hr;if(B.peek()==="[")return s(B,U,X)}return s(B,U,U.inline)}function R(B,U){var H=L.token(B,U.htmlState);if(!_){var q=P.innerMode(L,U.htmlState);(q.mode.name=="xml"&&q.state.tagStart===null&&!q.state.context&&q.state.tokenize.isInText||U.md_inside&&B.current().indexOf(">")>-1)&&(U.f=x,U.block=a,U.htmlState=null)}return H}function D(B,U){var H=U.listStack[U.listStack.length-1]||0,q=U.indentation<H,ie=H+3;if(U.fencedEndRE&&U.indentation<=ie&&(q||B.match(U.fencedEndRE))){T.highlightFormatting&&(U.formatting="code-block");var ce;return q||(ce=c(U)),U.localMode=U.localState=null,U.block=a,U.f=x,U.fencedEndRE=null,U.code=0,U.thisLine.fencedCodeEnd=!0,q?u(B,U,U.block):ce}else return U.localMode?U.localMode.token(B,U.localState):(B.skipToEnd(),S.code)}function c(B){var U=[];if(B.formatting){U.push(S.formatting),typeof B.formatting=="string"&&(B.formatting=[B.formatting]);for(var H=0;H<B.formatting.length;H++)U.push(S.formatting+"-"+B.formatting[H]),B.formatting[H]==="header"&&U.push(S.formatting+"-"+B.formatting[H]+"-"+B.header),B.formatting[H]==="quote"&&(!T.maxBlockquoteDepth||T.maxBlockquoteDepth>=B.quote?U.push(S.formatting+"-"+B.formatting[H]+"-"+B.quote):U.push("error"))}if(B.taskOpen)return U.push("meta"),U.length?U.join(" "):null;if(B.taskClosed)return U.push("property"),U.length?U.join(" "):null;if(B.linkHref?U.push(S.linkHref,"url"):(B.strong&&U.push(S.strong),B.em&&U.push(S.em),B.strikethrough&&U.push(S.strikethrough),B.emoji&&U.push(S.emoji),B.linkText&&U.push(S.linkText),B.code&&U.push(S.code),B.image&&U.push(S.image),B.imageAltText&&U.push(S.imageAltText,"link"),B.imageMarker&&U.push(S.imageMarker)),B.header&&U.push(S.header,S.header+"-"+B.header),B.quote&&(U.push(S.quote),!T.maxBlockquoteDepth||T.maxBlockquoteDepth>=B.quote?U.push(S.quote+"-"+B.quote):U.push(S.quote+"-"+T.maxBlockquoteDepth)),B.list!==!1){var q=(B.listStack.length-1)%3;q?q===1?U.push(S.list2):U.push(S.list3):U.push(S.list1)}return B.trailingSpaceNewLine?U.push("trailing-space-new-line"):B.trailingSpace&&U.push("trailing-space-"+(B.trailingSpace%2?"a":"b")),U.length?U.join(" "):null}function b(B,U){return B.match(h,!0)?c(U):void 0}function x(B,U){var H=U.text(B,U);if(typeof H!="undefined")return H;if(U.list)return U.list=null,c(U);if(U.taskList){var q=B.match(r,!0)[1]===" ";return q?U.taskOpen=!0:U.taskClosed=!0,T.highlightFormatting&&(U.formatting="task"),U.taskList=!1,c(U)}if(U.taskOpen=!1,U.taskClosed=!1,U.header&&B.match(/^#+$/,!0))return T.highlightFormatting&&(U.formatting="header"),c(U);var ie=B.next();if(U.linkTitle){U.linkTitle=!1;var ce=ie;ie==="("&&(ce=")"),ce=(ce+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var he="^\\s*(?:[^"+ce+"\\\\]+|\\\\\\\\|\\\\.)"+ce;if(B.match(new RegExp(he),!0))return S.linkHref}if(ie==="`"){var be=U.formatting;T.highlightFormatting&&(U.formatting="code"),B.eatWhile("`");var ne=B.current().length;if(U.code==0&&(!U.quote||ne==1))return U.code=ne,c(U);if(ne==U.code){var le=c(U);return U.code=0,le}else return U.formatting=be,c(U)}else if(U.code)return c(U);if(ie==="\\"&&(B.next(),T.highlightFormatting)){var ue=c(U),te=S.formatting+"-escape";return ue?ue+" "+te:te}if(ie==="!"&&B.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return U.imageMarker=!0,U.image=!0,T.highlightFormatting&&(U.formatting="image"),c(U);if(ie==="["&&U.imageMarker&&B.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return U.imageMarker=!1,U.imageAltText=!0,T.highlightFormatting&&(U.formatting="image"),c(U);if(ie==="]"&&U.imageAltText){T.highlightFormatting&&(U.formatting="image");var ue=c(U);return U.imageAltText=!1,U.image=!1,U.inline=U.f=F,ue}if(ie==="["&&!U.image)return U.linkText&&B.match(/^.*?\]/)||(U.linkText=!0,T.highlightFormatting&&(U.formatting="link")),c(U);if(ie==="]"&&U.linkText){T.highlightFormatting&&(U.formatting="link");var ue=c(U);return U.linkText=!1,U.inline=U.f=B.match(/\(.*?\)| ?\[.*?\]/,!1)?F:x,ue}if(ie==="<"&&B.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){U.f=U.inline=C,T.highlightFormatting&&(U.formatting="link");var ue=c(U);return ue?ue+=" ":ue="",ue+S.linkInline}if(ie==="<"&&B.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){U.f=U.inline=C,T.highlightFormatting&&(U.formatting="link");var ue=c(U);return ue?ue+=" ":ue="",ue+S.linkEmail}if(T.xml&&ie==="<"&&B.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var oe=B.string.indexOf(">",B.pos);if(oe!=-1){var Q=B.string.substring(B.start,oe);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Q)&&(U.md_inside=!0)}return B.backUp(1),U.htmlState=P.startState(L),u(B,U,R)}if(T.xml&&ie==="<"&&B.match(/^\/\w*?>/))return U.md_inside=!1,"tag";if(ie==="*"||ie==="_"){for(var se=1,J=B.pos==1?" ":B.string.charAt(B.pos-2);se<3&&B.eat(ie);)se++;var ee=B.peek()||" ",ge=!/\s/.test(ee)&&(!l.test(ee)||/\s/.test(J)||l.test(J)),re=!/\s/.test(J)&&(!l.test(J)||/\s/.test(ee)||l.test(ee)),Y=null,z=null;if(se%2&&(!U.em&&ge&&(ie==="*"||!re||l.test(J))?Y=!0:U.em==ie&&re&&(ie==="*"||!ge||l.test(ee))&&(Y=!1)),se>1&&(!U.strong&&ge&&(ie==="*"||!re||l.test(J))?z=!0:U.strong==ie&&re&&(ie==="*"||!ge||l.test(ee))&&(z=!1)),z!=null||Y!=null){T.highlightFormatting&&(U.formatting=Y==null?"strong":z==null?"em":"strong em"),Y===!0&&(U.em=ie),z===!0&&(U.strong=ie);var le=c(U);return Y===!1&&(U.em=!1),z===!1&&(U.strong=!1),le}}else if(ie===" "&&(B.eat("*")||B.eat("_"))){if(B.peek()===" ")return c(U);B.backUp(1)}if(T.strikethrough){if(ie==="~"&&B.eatWhile(ie)){if(U.strikethrough){T.highlightFormatting&&(U.formatting="strikethrough");var le=c(U);return U.strikethrough=!1,le}else if(B.match(/^[^\s]/,!1))return U.strikethrough=!0,T.highlightFormatting&&(U.formatting="strikethrough"),c(U)}else if(ie===" "&&B.match(/^~~/,!0)){if(B.peek()===" ")return c(U);B.backUp(2)}}if(T.emoji&&ie===":"&&B.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){U.emoji=!0,T.highlightFormatting&&(U.formatting="emoji");var $=c(U);return U.emoji=!1,$}return ie===" "&&(B.match(/^ +$/,!1)?U.trailingSpace++:U.trailingSpace&&(U.trailingSpaceNewLine=!0)),c(U)}function C(B,U){var H=B.next();if(H===">"){U.f=U.inline=x,T.highlightFormatting&&(U.formatting="link");var q=c(U);return q?q+=" ":q="",q+S.linkInline}return B.match(/^[^>]+/,!0),S.linkInline}function F(B,U){if(B.eatSpace())return null;var H=B.next();return H==="("||H==="["?(U.f=U.inline=k(H==="("?")":"]"),T.highlightFormatting&&(U.formatting="link-string"),U.linkHref=!0,c(U)):"error"}var j={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function k(B){return function(U,H){var q=U.next();if(q===B){H.f=H.inline=x,T.highlightFormatting&&(H.formatting="link-string");var ie=c(H);return H.linkHref=!1,ie}return U.match(j[B]),H.linkHref=!0,c(H)}}function X(B,U){return B.match(/^([^\]\\]|\\.)*\]:/,!1)?(U.f=G,B.next(),T.highlightFormatting&&(U.formatting="link"),U.linkText=!0,c(U)):s(B,U,x)}function G(B,U){if(B.match(/^\]:/,!0)){U.f=U.inline=W,T.highlightFormatting&&(U.formatting="link");var H=c(U);return U.linkText=!1,H}return B.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function W(B,U){return B.eatSpace()?null:(B.match(/^[^\s]+/,!0),B.peek()===void 0?U.linkTitle=!0:B.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),U.f=U.inline=x,S.linkHref+" url")}var K={startState:function(){return{f:a,prevLine:{stream:null},thisLine:{stream:null},block:a,htmlState:null,indentation:0,inline:x,text:b,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(B){return{f:B.f,prevLine:B.prevLine,thisLine:B.thisLine,block:B.block,htmlState:B.htmlState&&P.copyState(L,B.htmlState),indentation:B.indentation,localMode:B.localMode,localState:B.localMode?P.copyState(B.localMode,B.localState):null,inline:B.inline,text:B.text,formatting:!1,linkText:B.linkText,linkTitle:B.linkTitle,linkHref:B.linkHref,code:B.code,em:B.em,strong:B.strong,strikethrough:B.strikethrough,emoji:B.emoji,header:B.header,setext:B.setext,hr:B.hr,taskList:B.taskList,list:B.list,listStack:B.listStack.slice(0),quote:B.quote,indentedCode:B.indentedCode,trailingSpace:B.trailingSpace,trailingSpaceNewLine:B.trailingSpaceNewLine,md_inside:B.md_inside,fencedEndRE:B.fencedEndRE}},token:function(B,U){if(U.formatting=!1,B!=U.thisLine.stream){if(U.header=0,U.hr=!1,B.match(/^\s*$/,!0))return v(U),null;if(U.prevLine=U.thisLine,U.thisLine={stream:B},U.taskList=!1,U.trailingSpace=0,U.trailingSpaceNewLine=!1,!U.localState&&(U.f=U.block,U.f!=R)){var H=B.match(/^\s*/,!0)[0].replace(/\t/g,n).length;if(U.indentation=H,U.indentationDiff=null,H>0)return null}}return U.f(B,U)},innerMode:function(B){return B.block==R?{state:B.htmlState,mode:L}:B.localState?{state:B.localState,mode:B.localMode}:{state:B,mode:K}},indent:function(B,U,H){return B.block==R&&L.indent?L.indent(B.htmlState,U,H):B.localState&&B.localMode.indent?B.localMode.indent(B.localState,U,H):P.Pass},blankLine:v,getType:c,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return K},"xml"),P.defineMIME("text/markdown","markdown"),P.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(I){if(!0)module.exports=I();else var Z})(function(){var define,module,exports;return function(){function I(Z,N,P){function m(_,g){if(!N[_]){if(!Z[_]){var S=typeof require=="function"&&require;if(!g&&S)return require(_,!0);if(T)return T(_,!0);var p=new Error("Cannot find module '"+_+"'");throw p.code="MODULE_NOT_FOUND",p}var o=N[_]={exports:{}};Z[_][0].call(o.exports,function(i){var r=Z[_][1][i];return m(r||i)},o,o.exports,I,Z,N,P)}return N[_].exports}for(var T=typeof require=="function"&&require,L=0;L<P.length;L++)m(P[L]);return m}return I}()({1:[function(I,Z,N){"use strict";var P=I("./browser/client");P.Buffer=I("buffer").Buffer,P.urllib=I("../shims/xhr"),P.version=I("./browser/version").version,Z.exports=P},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(I,Z,N){(function(P,m){"use strict";var T=I("babel-runtime/core-js/promise"),L=o(T),_=I("babel-runtime/regenerator"),g=o(_),S=I("babel-runtime/core-js/object/assign"),p=o(S);function o(X){return X&&X.__esModule?X:{default:X}}var i=I("debug")("ali-oss"),r=I("copy-to"),d=I("xml2js"),f=I("agentkeepalive"),h=I("merge-descriptors"),E=I("url"),y=I("is-type-of"),l=I("platform"),n=I("utility"),s=I("urllib"),u=I("./version"),w=I("bowser"),v=I("../common/signUtils"),a=I("../common/utils/isIP"),R=a.isIP,D=I("../common/client/initOptions"),c=I("../common/utils/createRequest"),b=c.createRequest,x=new f;function C(){var X=l.name,G=l.version;X&&X.toLowerCase&&X.toLowerCase()==="ie"&&G.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function F(){return location&&location.protocol==="https:"}function j(X,G){if(C(),!(this instanceof j))return new j(X,G);X&&X.inited?this.options=X:this.options=j.initOptions(X),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=s,this.agent=this.options.agent||x),this.ctx=G,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}Z.exports=j,j.initOptions=function(G){G.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var W=(0,p.default)({secure:F(),useFetch:!1},G);return D(W)};var k=j.prototype;k.debug=i,h(k,I("./object")),h(k,I("../common/bucket/getBucketWebsite")),h(k,I("../common/bucket/putBucketWebsite")),h(k,I("../common/bucket/deleteBucketWebsite")),h(k,I("../common/bucket/getBucketLifecycle")),h(k,I("../common/bucket/putBucketLifecycle")),h(k,I("../common/bucket/deleteBucketLifecycle")),h(k,I("../common/bucket/putBucketVersioning")),h(k,I("../common/bucket/getBucketVersioning")),h(k,I("./managed-upload")),h(k,I("../common/multipart")),h(k,I("../common/parallel")),k.signature=function(G){return this.debug("authorization stringToSign: %s",G,"info"),v.computeSignature(this.options.accessKeySecret,G)},k.authorization=function(G,W,K,B){var U=v.buildCanonicalString(G.toUpperCase(),W,{headers:B,parameters:K});return v.authorization(this.options.accessKeyId,this.options.accessKeySecret,U)},k.request=function(G){var W,K,B,U,H,q;return g.default.async(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return W=b.call(this,G),this.options.useFetch||(W.params.mode="disable-fetch"),K=void 0,B=void 0,U=!!G.stream,ce.prev=5,ce.next=8,g.default.awrap(this.urllib.request(W.url,W.params));case 8:K=ce.sent,this.debug("response %s %s, got %s, headers: %j",G.method,W.url,K.status,K.headers,"info"),ce.next=15;break;case 12:ce.prev=12,ce.t0=ce.catch(5),B=ce.t0;case 15:if(H=void 0,!(K&&G.successStatuses&&G.successStatuses.indexOf(K.status)===-1)){ce.next=28;break}return ce.next=19,g.default.awrap(this.requestError(K));case 19:if(H=ce.sent,!(H.code==="RequestTimeTooSkewed"&&!U)){ce.next=25;break}return this.options.amendTimeSkewed=+new Date(H.serverTime)-new Date,ce.next=24,g.default.awrap(this.request(G));case 24:return ce.abrupt("return",ce.sent);case 25:H.params=G,ce.next=32;break;case 28:if(!B){ce.next=32;break}return ce.next=31,g.default.awrap(this.requestError(B));case 31:H=ce.sent;case 32:if(!H){ce.next=34;break}throw H;case 34:if(!G.xmlResponse){ce.next=39;break}return ce.next=37,g.default.awrap(this.parseXML(K.data));case 37:q=ce.sent,K.data=q;case 39:return ce.abrupt("return",K);case 40:case"end":return ce.stop()}},null,this,[[5,12]])},k._getResource=function(G){var W="/";return G.bucket&&(W+=G.bucket+"/"),G.object&&(W+=G.object),W},k._isIP=R,k._escape=function(G){return n.encodeURIComponent(G).replace(/%2F/g,"/")},k._getReqUrl=function(G){var W={};r(this.options.endpoint).to(W);var K=this._isIP(W.hostname),B=this.options.cname;G.bucket&&!B&&!K&&(W.host=G.bucket+"."+W.host);var U="/";G.bucket&&K&&(U+=G.bucket+"/"),G.object&&(U+=this._escape(G.object).replace(/\+/g,"%2B")),W.pathname=U;var H={};if(G.query&&h(H,G.query),G.subres){var q={};y.string(G.subres)?q[G.subres]="":y.array(G.subres)?G.subres.forEach(function(ie){q[ie]=""}):q=G.subres,h(H,q)}return W.query=H,E.format(W)},k._getUserAgent=function(){var G=m&&m.browser?"js":"nodejs",W="aliyun-sdk-"+G+"/"+u.version,K=l.description;return!K&&m&&(K="Node.js "+m.version.slice(1)+" on "+m.platform+" "+m.arch),this._checkUserAgent(W+" "+K)},k._checkUserAgent=function(G){var W=G.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return W},k.checkBrowserAndVersion=function(G,W){return w.name===G&&w.version.split(".")[0]===W},k.parseXML=function(G){return new L.default(function(W,K){P.isBuffer(G)&&(G=G.toString()),d.parseString(G,{explicitRoot:!1,explicitArray:!1},function(B,U){B?K(B):W(U)})})},k.requestError=function(G){var W,K,B,U;return g.default.async(function(q){for(;;)switch(q.prev=q.next){case 0:if(W=null,!(!G.data||!G.data.length)){q.next=5;break}G.status===-1||G.status===-2?(W=new Error(G.message),W.name=G.name,W.status=G.status,W.code=G.name):(G.status===404?(W=new Error("Object not exists"),W.name="NoSuchKeyError",W.status=404,W.code="NoSuchKey"):G.status===412?(W=new Error("Pre condition failed"),W.name="PreconditionFailedError",W.status=412,W.code="PreconditionFailed"):(W=new Error("Unknow error, status: "+G.status),W.name="UnknowError",W.status=G.status),W.requestId=G.headers["x-oss-request-id"],W.host=""),q.next=33;break;case 5:return K=String(G.data),this.debug("request response error data: %s",K,"error"),B=void 0,q.prev=8,q.next=11,g.default.awrap(this.parseXML(K));case 11:if(q.t0=q.sent,q.t0){q.next=14;break}q.t0={};case 14:B=q.t0,q.next=24;break;case 17:return q.prev=17,q.t1=q.catch(8),this.debug(K,"error"),q.t1.message+=`
|
|
|
raw xml: `+K,q.t1.status=G.status,q.t1.requestId=G.headers["x-oss-request-id"],q.abrupt("return",q.t1);case 24:U=B.Message||"unknow request error, status: "+G.status,B.Condition&&(U+=" (condition: "+B.Condition+")"),W=new Error(U),W.name=B.Code?B.Code+"Error":"UnknowError",W.status=G.status,W.code=B.Code,W.requestId=B.RequestId,W.hostId=B.HostId,W.serverTime=B.ServerTime;case 33:return this.debug("generate error %j",W,"error"),q.abrupt("return",W);case 35:case"end":return q.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:I("../../node_modules/is-buffer/index.js")},I("_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(I,Z,N){(function(P){"use strict";var m=I("babel-runtime/core-js/array/from"),T=p(m),L=I("babel-runtime/core-js/promise"),_=p(L),g=I("babel-runtime/regenerator"),S=p(g);function p(v){return v&&v.__esModule?v:{default:v}}var o=I("is-type-of"),i=I("util"),r=I("path"),d=I("mime"),f=I("copy-to"),h=I("../common/utils/isBlob"),E=h.isBlob,y=I("../common/utils/isFile"),l=y.isFile,n=N;n.multipartUpload=function(a,R,D){var c,b,x,C,F,j,k,X,G;return S.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:if(this.resetCancelFlag(),D=D||{},!(D.checkpoint&&D.checkpoint.uploadId)){K.next=6;break}return K.next=5,S.default.awrap(this._resumeMultipart(D.checkpoint,D));case 5:return K.abrupt("return",K.sent);case 6:return c=100*1024,D.mime||(l(R)?D.mime=d.getType(r.extname(R.name)):E(R)?D.mime=R.type:D.mime=d.getType(r.extname(R))),D.headers=D.headers||{},this._convertMetaToHeaders(D.meta,D.headers),K.next=12,S.default.awrap(this._getFileSize(R));case 12:if(b=K.sent,!(b<c)){K.next=25;break}return x=this._createStream(R,0,b),D.contentLength=b,K.next=18,S.default.awrap(this.putStream(a,x,D));case 18:if(C=K.sent,!(D&&D.progress)){K.next=22;break}return K.next=22,S.default.awrap(D.progress(1));case 22:return F={res:C.res,bucket:this.options.bucket,name:a,etag:C.res.headers.etag},(D.headers&&D.headers["x-oss-callback"]||D.callback)&&(F.data=C.data),K.abrupt("return",F);case 25:if(!(D.partSize&&!(parseInt(D.partSize,10)===D.partSize))){K.next=27;break}throw new Error("partSize must be int number");case 27:if(!(D.partSize&&D.partSize<c)){K.next=29;break}throw new Error("partSize must not be smaller than "+c);case 29:return K.next=31,S.default.awrap(this.initMultipartUpload(a,D));case 31:if(j=K.sent,k=j.uploadId,X=this._getPartSize(b,D.partSize),G={file:R,name:a,fileSize:b,partSize:X,uploadId:k,doneParts:[]},!(D&&D.progress)){K.next=38;break}return K.next=38,S.default.awrap(D.progress(0,G,j.res));case 38:return K.next=40,S.default.awrap(this._resumeMultipart(G,D));case 40:return K.abrupt("return",K.sent);case 41:case"end":return K.stop()}},null,this)},n._resumeMultipart=function(a,R){var D,c,b,x,C,F,j,k,X,G,W,K,B,U,H,q,ie,ce;return S.default.async(function(be){for(;;)switch(be.prev=be.next){case 0:if(D=this,!this.isCancel()){be.next=3;break}throw this._makeCancelEvent();case 3:return c=a.file,b=a.fileSize,x=a.partSize,C=a.uploadId,F=a.doneParts,j=a.name,k=[],F.length>0&&f(F).to(k),X=this._divideParts(b,x),G=X.length,W=!1,K=function(le,ue){var te=this;return new _.default(function(Q,se){var J,ee,ge,re;return S.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:if(z.prev=0,le.isCancel()){z.next=18;break}return J=X[ue-1],ee={stream:le._createStream(c,J.start,J.end),size:J.end-J.start},z.next=6,S.default.awrap(le._uploadPart(j,C,ue,ee));case 6:if(ge=z.sent,!(!le.isCancel()&&!W)){z.next=15;break}if(a.doneParts.push({number:ue,etag:ge.res.headers.etag}),!R.progress){z.next=12;break}return z.next=12,S.default.awrap(R.progress(F.length/G,a,ge.res));case 12:Q({number:ue,etag:ge.res.headers.etag}),z.next=16;break;case 15:Q();case 16:z.next=19;break;case 18:Q();case 19:z.next=30;break;case 21:z.prev=21,z.t0=z.catch(0),re=new Error,re.name=z.t0.name,re.message=z.t0.message,re.stack=z.t0.stack,re.partNum=ue,f(z.t0).to(re),se(re);case 30:case"end":return z.stop()}},null,te,[[0,21]])})},B=(0,T.default)(new Array(G),function(ne,le){return le+1}),U=k.map(function(ne){return ne.number}),H=B.filter(function(ne){return U.indexOf(ne)<0}),q=5,ie=R.parallel||q,be.next=17,S.default.awrap(this._parallel(H,ie,function(ne){return new _.default(function(le,ue){K(D,ne).then(function(te){te&&k.push(te),le()}).catch(function(te){ue(te)})})}));case 17:if(ce=be.sent,W=!0,!this.isCancel()){be.next=22;break}throw K=null,this._makeCancelEvent();case 22:if(!(ce&&ce.length>0)){be.next=25;break}throw ce[0].message="Failed to upload some parts with error: "+ce[0].toString()+" part_num: "+ce[0].partNum,ce[0];case 25:return be.next=27,S.default.awrap(this.completeMultipartUpload(j,C,k,R));case 27:return be.abrupt("return",be.sent);case 28:case"end":return be.stop()}},null,this)},n._getFileSize=function(a){return S.default.async(function(D){for(;;)switch(D.prev=D.next){case 0:if(!o.buffer(a)){D.next=4;break}return D.abrupt("return",a.length);case 4:if(!(E(a)||l(a))){D.next=6;break}return D.abrupt("return",a.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return D.stop()}},null,this)};var s=I("stream"),u=s.Readable;function w(v,a){if(!(this instanceof w))return new w(v,a);u.call(this,a),this.file=v,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}i.inherits(w,u),w.prototype.readFileAndPush=function(a){if(this.fileBuffer)for(var R=!0;R&&this.fileBuffer&&this.start<this.fileBuffer.length;){var D=this.start,c=D+a;c=c>this.fileBuffer.length?this.fileBuffer.length:c,this.start=c,R=this.push(this.fileBuffer.slice(D,c))}},w.prototype._read=function(a){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;a=a||R;var D=this;this.reader.onload=function(b){D.fileBuffer=P.from(new Uint8Array(b.target.result)),D.file=null,D.readFileAndPush(a)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(a)},n._createStream=function(a,R,D){if(E(a)||l(a))return new w(a.slice(R,D));throw new Error("_createStream requires File/Blob.")},n._getPartSize=function(a,R){var D=10*1e3,c=1024*1024;return R?Math.max(Math.ceil(a/D),R):c},n._divideParts=function(a,R){for(var D=Math.ceil(a/R),c=[],b=0;b<D;b++){var x=R*b,C=Math.min(x+R,a);c.push({start:x,end:C})}return c}}).call(this,I("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(I,Z,N){"use strict";var P=I("babel-runtime/core-js/promise"),m=o(P),T=I("babel-runtime/core-js/object/keys"),L=o(T),_=I("babel-runtime/core-js/object/assign"),g=o(_),S=I("babel-runtime/regenerator"),p=o(S);function o(D){return D&&D.__esModule?D:{default:D}}var i=I("utility"),r=I("fs"),d=I("is-type-of"),f=I("url"),h=I("copy-to"),E=I("path"),y=I("mime"),l=I("../common/callback"),n=I("../common/signUtils"),s=I("merge-descriptors"),u=I("../common/utils/isBlob"),w=u.isBlob,v=I("../common/utils/isFile"),a=v.isFile,R=N;R.append=function(c,b,x){var C;return p.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return x=x||{},x.position===void 0&&(x.position="0"),x.subres={append:"",position:x.position},x.method="POST",j.next=6,p.default.awrap(this.put(c,b,x));case 6:return C=j.sent,C.nextAppendPosition=C.res.headers["x-oss-next-append-position"],j.abrupt("return",C);case 9:case"end":return j.stop()}},null,this)},R.put=function(c,b,x){var C,F,j,k,X,G,W;return p.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:if(C=void 0,x=x||{},c=this._objectName(c),!d.buffer(b)){B.next=7;break}C=b,B.next=33;break;case 7:if(!(w(b)||a(b))){B.next=32;break}return x.mime||(a(b)?x.mime=y.getType(E.extname(b.name)):x.mime=b.type),F=this._createStream(b,0,b.size),B.next=12,p.default.awrap(this._getFileSize(b));case 12:return x.contentLength=B.sent,B.prev=13,B.next=16,p.default.awrap(this.putStream(c,F,x));case 16:return j=B.sent,B.abrupt("return",j);case 20:if(B.prev=20,B.t0=B.catch(13),!(B.t0.code==="RequestTimeTooSkewed")){B.next=29;break}return this.options.amendTimeSkewed=+new Date(B.t0.serverTime)-new Date,B.next=26,p.default.awrap(this.put(c,b,x));case 26:return B.abrupt("return",B.sent);case 29:throw B.t0;case 30:B.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return x.headers=x.headers||{},this._convertMetaToHeaders(x.meta,x.headers),k=x.method||"PUT",X=this._objectRequestParams(k,c,x),l.encodeCallback(X,x),X.mime=x.mime,X.content=C,X.successStatuses=[200],B.next=43,p.default.awrap(this.request(X));case 43:return G=B.sent,W={name:c,url:this._objectUrl(c),res:G.res},X.headers&&X.headers["x-oss-callback"]&&(W.data=JSON.parse(G.data.toString())),B.abrupt("return",W);case 47:case"end":return B.stop()}},null,this,[[13,20]])},R.putStream=function(c,b,x){var C,F,j,k;return p.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:return x=x||{},x.headers=x.headers||{},c=this._objectName(c),x.contentLength?x.headers["Content-Length"]=x.contentLength:x.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(x.meta,x.headers),C=x.method||"PUT",F=this._objectRequestParams(C,c,x),l.encodeCallback(F,x),F.mime=x.mime,F.stream=b,F.successStatuses=[200],G.next=13,p.default.awrap(this.request(F));case 13:return j=G.sent,k={name:c,url:this._objectUrl(c),res:j.res},F.headers&&F.headers["x-oss-callback"]&&(k.data=JSON.parse(j.data.toString())),G.abrupt("return",k);case 17:case"end":return G.stop()}},null,this)},s(R,I("../common/object/copyObject")),s(R,I("../common/object/getObjectTagging")),s(R,I("../common/object/putObjectTagging")),s(R,I("../common/object/deleteObjectTagging")),s(R,I("../common/image")),s(R,I("../common/object/getBucketVersions")),s(R,I("../common/object/getACL")),s(R,I("../common/object/putACL")),s(R,I("../common/object/head")),s(R,I("../common/object/delete")),s(R,I("../common/object/get")),s(R,I("../common/object/putSymlink")),s(R,I("../common/object/getSymlink")),s(R,I("../common/object/deleteMulti")),s(R,I("../common/object/getObjectMeta")),R.putMeta=function(c,b,x){var C;return p.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return j.next=2,p.default.awrap(this.copy(c,c,{meta:b||{},timeout:x&&x.timeout,ctx:x&&x.ctx}));case 2:return C=j.sent,j.abrupt("return",C);case 4:case"end":return j.stop()}},null,this)},R.list=function(c,b){var x,C,F,j,k;return p.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:return x=this._objectRequestParams("GET","",b),x.query=c,x.xmlResponse=!0,x.successStatuses=[200],G.next=6,p.default.awrap(this.request(x));case 6:return C=G.sent,F=C.data.Contents,j=this,F&&(Array.isArray(F)||(F=[F]),F=F.map(function(W){return{name:W.Key,url:j._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}}})),k=C.data.CommonPrefixes||null,k&&(Array.isArray(k)||(k=[k]),k=k.map(function(W){return W.Prefix})),G.abrupt("return",{res:C.res,objects:F,prefixes:k,nextMarker:C.data.NextMarker||null,isTruncated:C.data.IsTruncated==="true"});case 13:case"end":return G.stop()}},null,this)},R.restore=function(c,b){var x,C;return p.default.async(function(j){for(;;)switch(j.prev=j.next){case 0:return b=b||{},b.subres=(0,g.default)({restore:""},b.subres),b.versionId&&(b.subres.versionId=b.versionId),x=this._objectRequestParams("POST",c,b),x.successStatuses=[202],j.next=7,p.default.awrap(this.request(x));case 7:return C=j.sent,j.abrupt("return",{res:C.res});case 9:case"end":return j.stop()}},null,this)},R.signatureUrl=function(c,b){b=b||{},c=this._objectName(c),b.method=b.method||"GET";var x=i.timestamp()+(b.expires||1800),C={bucket:this.options.bucket,object:c},F=this._getResource(C);this.options.stsToken&&(b["security-token"]=this.options.stsToken);var j=n._signatureForURL(this.options.accessKeySecret,b,F,x),k=f.parse(this._getReqUrl(C));return k.query={OSSAccessKeyId:this.options.accessKeyId,Expires:x,Signature:j.Signature},h(j.subResource).to(k.query),k.format()},R.getObjectUrl=function(c,b){return b?b[b.length-1]!=="/"&&(b+="/"):b=this.options.endpoint.format(),b+this._escape(this._objectName(c))},R._objectUrl=function(c){return this._getReqUrl({bucket:this.options.bucket,object:c})},R.generateObjectUrl=function(D,c){if(c)c[c.length-1]!=="/"&&(c+="/");else{c=this.options.endpoint.format();var b=f.parse(c),x=this.options.bucket;b.hostname=x+"."+b.hostname,b.host=x+"."+b.host,c=b.format()}return c+this._escape(this._objectName(D))},R._objectRequestParams=function(c,b,x){if(!this.options.bucket)throw new Error("Please create a bucket first");x=x||{},b=this._objectName(b);var C={object:b,bucket:this.options.bucket,method:c,subres:x&&x.subres,timeout:x&&x.timeout,ctx:x&&x.ctx};return x.headers&&(C.headers={},h(x.headers).to(C.headers)),C},R._objectName=function(c){return c.replace(/^\/+/,"")},R._convertMetaToHeaders=function(c,b){if(!c)return;(0,L.default)(c).forEach(function(x){b["x-oss-meta-"+x]=c[x]})},R._deleteFileSafe=function(c){var b=this;return new m.default(function(x){r.exists(c,function(C){C?r.unlink(c,function(F){F&&b.debug("unlink %j error: %s",c,F,"error"),x()}):x()})})}},{"../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(I,Z,N){"use strict";N.version="6.10.0"},{}],6:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(S){return S&&S.__esModule?S:{default:S}}var L=I("../utils/checkBucketName"),_=L.checkBucketName,g=N;g.deleteBucketLifecycle=function(p,o){var i,r;return m.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return _(p),i=this._bucketRequestParams("DELETE",p,"lifecycle",o),i.successStatuses=[204],f.next=5,m.default.awrap(this.request(i));case 5:return r=f.sent,f.abrupt("return",{res:r.res});case 7:case"end":return f.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(S){return S&&S.__esModule?S:{default:S}}var L=I("../utils/checkBucketName"),_=L.checkBucketName,g=N;g.deleteBucketWebsite=function(p,o){var i,r;return m.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return _(p),i=this._bucketRequestParams("DELETE",p,"website",o),i.successStatuses=[204],f.next=5,m.default.awrap(this.request(i));case 5:return r=f.sent,f.abrupt("return",{res:r.res});case 7:case"end":return f.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(r){return r&&r.__esModule?r:{default:r}}var L=I("../utils/checkBucketName"),_=L.checkBucketName,g=I("../utils/isArray"),S=g.isArray,p=I("../utils/formatObjKey"),o=p.formatObjKey,i=N;i.getBucketLifecycle=function(d,f){var h,E,y;return m.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return _(d),h=this._bucketRequestParams("GET",d,"lifecycle",f),h.successStatuses=[200],h.xmlResponse=!0,n.next=6,m.default.awrap(this.request(h));case 6:return E=n.sent,y=E.data.Rule||null,y&&(S(y)||(y=[y]),y=y.map(function(s){return s.ID&&(s.id=s.ID,delete s.ID),s.Tag&&!S(s.Tag)&&(s.Tag=[s.Tag]),o(s,"firstLowerCase")})),n.abrupt("return",{rules:y,res:E.res});case 10:case"end":return n.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(S){return S&&S.__esModule?S:{default:S}}var L=I("../utils/checkBucketName"),_=L.checkBucketName,g=N;g.getBucketVersioning=function(p,o){var i,r,d;return m.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return _(p),i=this._bucketRequestParams("GET",p,"versioning",o),i.xmlResponse=!0,i.successStatuses=[200],h.next=6,m.default.awrap(this.request(i));case 6:return r=h.sent,d=r.data.Status,h.abrupt("return",{status:r.status,versionStatus:d,res:r.res});case 9:case"end":return h.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(o){return o&&o.__esModule?o:{default:o}}var L=I("../utils/checkBucketName"),_=L.checkBucketName,g=I("../utils/isObject"),S=g.isObject,p=N;p.getBucketWebsite=function(i,r){var d,f,h;return m.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:return _(i),d=this._bucketRequestParams("GET",i,"website",r),d.successStatuses=[200],d.xmlResponse=!0,y.next=6,m.default.awrap(this.request(d));case 6:return f=y.sent,h=[],f.data.RoutingRules&&f.data.RoutingRules.RoutingRule&&(S(f.data.RoutingRules.RoutingRule)?h=[f.data.RoutingRules.RoutingRule]:h=f.data.RoutingRules.RoutingRule),y.abrupt("return",{index:f.data.IndexDocument&&f.data.IndexDocument.Suffix||"",supportSubDir:f.data.IndexDocument&&f.data.IndexDocument.SupportSubDir||"false",type:f.data.IndexDocument&&f.data.IndexDocument.Type,routingRules:h,error:f.data.ErrorDocument&&f.data.ErrorDocument.Key||null,res:f.res});case 10:case"end":return y.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(a){return a&&a.__esModule?a:{default:a}}var L=I("../utils/checkBucketName"),_=L.checkBucketName,g=I("../utils/isArray"),S=g.isArray,p=I("../utils/deepCopy"),o=p.deepCopy,i=I("../utils/isObject"),r=i.isObject,d=I("../utils/obj2xml"),f=d.obj2xml,h=I("../utils/checkObjectTag"),E=h.checkObjectTag,y=I("../utils/getStrBytesCount"),l=y.getStrBytesCount,n=N;n.putBucketLifecycle=function(R,D,c){var b,x,C,F,j;return m.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(_(R),S(D)){X.next=3;break}throw new Error("rules must be Array");case 3:return b=this._bucketRequestParams("PUT",R,"lifecycle",c),x=[],C={LifecycleConfiguration:{Rule:x}},D.forEach(function(G){s(G),v(G),G.id&&(G.ID=G.id,delete G.id),x.push(G)}),F=f(C,{headers:!0,firstUpperCase:!0}),b.content=F,b.mime="xml",b.successStatuses=[200],X.next=13,m.default.awrap(this.request(b));case 13:return j=X.sent,X.abrupt("return",{res:j.res});case 15:case"end":return X.stop()}},null,this)};function s(a){a.days&&(a.expiration={days:a.days}),a.date&&(a.expiration={createdBeforeDate:a.date})}function u(a,R){var D=a.days,c=a.createdBeforeDate;if(!D&&!c)throw new Error(R+" must includes days or createdBeforeDate");if(D&&!/^[1-9][0-9]*$/.test(D))throw new Error("days must be a positive integer");if(c&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(c))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function w(a){if(!S(a)&&!r(a))throw new Error("tag must be Object or Array");a=r(a)?[a]:a;var R={},D=o(a);D.forEach(function(c){R[c.key]=c.value}),E(R)}function v(a){if(a.id&&l(a.id)>255)throw new Error("ID is composed of 255 bytes at most");if(a.prefix===""||a.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(a.status))throw new Error("Status must be Enabled or Disabled");if(a.transition){if(!["IA","Archive"].includes(a.transition.storageClass))throw new Error("StorageClass must be IA or Archive");u(a.transition,"Transition")}if(a.expiration){if(!a.expiration.expiredObjectDeleteMarker)u(a.expiration,"Expiration");else if(a.expiration.days||a.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(a.abortMultipartUpload&&u(a.abortMultipartUpload,"AbortMultipartUpload"),!a.expiration&&!a.abortMultipartUpload&&!a.transition&&!a.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(a.tag){if(a.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");w(a.tag)}}},{"../utils/checkBucketName":35,"../utils/checkObjectTag":36,"../utils/deepCopy":39,"../utils/getStrBytesCount":41,"../utils/isArray":42,"../utils/isObject":46,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],12:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(o){return o&&o.__esModule?o:{default:o}}var L=I("../utils/checkBucketName"),_=L.checkBucketName,g=I("../utils/obj2xml"),S=g.obj2xml,p=N;p.putBucketVersioning=function(i,r){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f,h,E;return m.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:if(_(i),["Enabled","Suspended"].includes(r)){l.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return f=this._bucketRequestParams("PUT",i,"versioning",d),h={VersioningConfiguration:{Status:r}},f.mime="xml",f.content=S(h,{headers:!0}),l.next=9,m.default.awrap(this.request(f));case 9:return E=l.sent,l.abrupt("return",{res:E.res,status:E.status});case 11:case"end":return l.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(r){return r&&r.__esModule?r:{default:r}}var L=I("../utils/checkBucketName"),_=L.checkBucketName,g=I("../utils/obj2xml"),S=g.obj2xml,p=I("../utils/isArray"),o=p.isArray,i=N;i.putBucketWebsite=function(d){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=arguments[2],E,y,l,n,s;return m.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:if(_(d),E=this._bucketRequestParams("PUT",d,"website",h),y={Suffix:f.index||"index.html"},l={IndexDocument:y},n={WebsiteConfiguration:l},f.supportSubDir&&(y.SupportSubDir=f.supportSubDir),f.type&&(y.Type=f.type),f.error&&(l.ErrorDocument={Key:f.error}),!(f.routingRules!==void 0)){w.next=12;break}if(o(f.routingRules)){w.next=11;break}throw new Error("RoutingRules must be Array");case 11:l.RoutingRules={RoutingRule:f.routingRules};case 12:return n=S(n),E.content=n,E.mime="xml",E.successStatuses=[200],w.next=18,m.default.awrap(this.request(E));case 18:return s=w.sent,w.abrupt("return",{res:s.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(I,Z,N){(function(P){"use strict";var m=I("babel-runtime/core-js/object/keys"),T=g(m),L=I("babel-runtime/core-js/json/stringify"),_=g(L);function g(S){return S&&S.__esModule?S:{default:S}}N.encodeCallback=function(p,o){if(p.headers=p.headers||{},!Object.prototype.hasOwnProperty.call(p.headers,"x-oss-callback")&&o.callback){var i={callbackUrl:encodeURI(o.callback.url),callbackBody:o.callback.body};o.callback.host&&(i.callbackHost=o.callback.host),o.callback.contentType&&(i.callbackBodyType=o.callback.contentType);var r=P.from((0,_.default)(i)).toString("base64");if(p.headers["x-oss-callback"]=r,o.callback.customValue){var d={};(0,T.default)(o.callback.customValue).forEach(function(f){d["x:"+f]=o.callback.customValue[f]}),p.headers["x-oss-callback-var"]=P.from((0,_.default)(d)).toString("base64")}}}}).call(this,I("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/assign"),m=T(P);function T(i){return i&&i.__esModule?i:{default:i}}var L=I("humanize-ms"),_=I("url"),g=I("../utils/checkBucketName"),S=g.checkBucketName;function p(i,r){var d=_.parse(i);if(d.protocol||(d=_.parse("http"+(r?"s":"")+"://"+i)),d.protocol!=="http:"&&d.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return d}function o(i,r,d){var f=d?"https://":"http://",h=r?"-internal.aliyuncs.com":".aliyuncs.com",E="vpc100-oss-cn-";return i.substr(0,E.length)===E&&(h=".aliyuncs.com"),_.parse(f+i+h)}Z.exports=function(i){if(!i||!i.accessKeyId||!i.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");i.bucket&&S(i.bucket);var r=(0,m.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},i);if(r.accessKeyId=r.accessKeyId.trim(),r.accessKeySecret=r.accessKeySecret.trim(),r.timeout&&(r.timeout=L(r.timeout)),r.endpoint)r.endpoint=p(r.endpoint,r.secure);else if(r.region)r.endpoint=o(r.region,r.internal,r.secure);else throw new Error("require options.endpoint or options.region");return r.inited=!0,r}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(I,Z,N){"use strict";var P=I("merge-descriptors"),m=N;P(m,I("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(r){return r&&r.__esModule?r:{default:r}}var L=I("../utils/checkBucketName"),_=L.checkBucketName,g=I("querystring"),S=I("js-base64"),p=S.Base64.encode,o=N;o.processObjectSave=function(d,f,h,E){var y,l,n,s;return m.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:return i(d,"sourceObject"),i(f,"targetObject"),i(h,"process"),f=this._objectName(f),E&&_(E),y=this._objectRequestParams("POST",d,{subres:"x-oss-process"}),l=E?",b_"+p(E):"",f=p(f),n={"x-oss-process":h+"|sys/saveas,o_"+f+l},y.content=g.stringify(n),w.next=12,m.default.awrap(this.request(y));case 12:return s=w.sent,w.abrupt("return",{res:s.res,status:s.res.status});case 14:case"end":return w.stop()}},null,this)};function i(r,d){if(!r)throw new Error(d+" is required");if(typeof r!="string")throw new Error(d+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=T(P);function T(o){return o&&o.__esModule?o:{default:o}}var L=I("copy-to"),_=I("./callback"),g=I("./utils/deepCopy"),S=g.deepCopy,p=N;p.listUploads=function(i,r){var d,f,h,E;return m.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return r=r||{},d={},L(r).to(d),d.subres="uploads",f=this._objectRequestParams("GET","",d),f.query=i,f.xmlResponse=!0,f.successStatuses=[200],l.next=10,m.default.awrap(this.request(f));case 10:return h=l.sent,E=h.data.Upload||[],Array.isArray(E)||(E=[E]),E=E.map(function(n){return{name:n.Key,uploadId:n.UploadId,initiated:n.Initiated}}),l.abrupt("return",{res:h.res,uploads:E,bucket:h.data.Bucket,nextKeyMarker:h.data.NextKeyMarker,nextUploadIdMarker:h.data.NextUploadIdMarker,isTruncated:h.data.IsTruncated==="true"});case 15:case"end":return l.stop()}},null,this)},p.listParts=function(i,r,d,f){var h,E,y;return m.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return f=f||{},h={},L(f).to(h),h.subres={uploadId:r},E=this._objectRequestParams("GET",i,h),E.query=d,E.xmlResponse=!0,E.successStatuses=[200],n.next=10,m.default.awrap(this.request(E));case 10:return y=n.sent,n.abrupt("return",{res:y.res,uploadId:y.data.UploadId,bucket:y.data.Bucket,name:y.data.Key,partNumberMarker:y.data.PartNumberMarker,nextPartNumberMarker:y.data.NextPartNumberMarker,maxParts:y.data.MaxParts,isTruncated:y.data.IsTruncated,parts:y.data.Part||[]});case 12:case"end":return n.stop()}},null,this)},p.abortMultipartUpload=function(i,r,d){var f,h,E;return m.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return this._stop(),d=d||{},f={},L(d).to(f),f.subres={uploadId:r},h=this._objectRequestParams("DELETE",i,f),h.successStatuses=[204],l.next=9,m.default.awrap(this.request(h));case 9:return E=l.sent,l.abrupt("return",{res:E.res});case 11:case"end":return l.stop()}},null,this)},p.initMultipartUpload=function(i,r){var d,f,h;return m.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:return r=r||{},d={},L(r).to(d),d.headers=d.headers||{},this._convertMetaToHeaders(r.meta,d.headers),d.subres="uploads",f=this._objectRequestParams("POST",i,d),f.mime=r.mime,f.xmlResponse=!0,f.successStatuses=[200],y.next=12,m.default.awrap(this.request(f));case 12:return h=y.sent,y.abrupt("return",{res:h.res,bucket:h.data.Bucket,name:h.data.Key,uploadId:h.data.UploadId});case 14:case"end":return y.stop()}},null,this)},p.uploadPart=function(i,r,d,f,h,E,y){var l;return m.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return l={stream:this._createStream(f,h,E),size:E-h},s.next=3,m.default.awrap(this._uploadPart(i,r,d,l,y));case 3:return s.abrupt("return",s.sent);case 4:case"end":return s.stop()}},null,this)},p.completeMultipartUpload=function(i,r,d,f){var h,E,y,l,n,s,u,w;return m.default.async(function(a){for(;;)switch(a.prev=a.next){case 0:for(h=d.concat().sort(function(R,D){return R.number-D.number}).filter(function(R,D,c){return!D||R.number!==c[D-1].number}),E=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,y=0;y<h.length;y++)l=h[y],E+=`<Part>
|
|
|
`,E+="<PartNumber>"+l.number+`</PartNumber>
|
|
|
`,E+="<ETag>"+l.etag+`</ETag>
|
|
|
`,E+=`</Part>
|
|
|
`;return E+="</CompleteMultipartUpload>",f=f||{},n={},n=S(f),n.headers&&delete n.headers["x-oss-server-side-encryption"],n.subres={uploadId:r},s=this._objectRequestParams("POST",i,n),_.encodeCallback(s,n),s.mime="xml",s.content=E,s.headers&&s.headers["x-oss-callback"]||(s.xmlResponse=!0),s.successStatuses=[200],a.next=17,m.default.awrap(this.request(s));case 17:return u=a.sent,w={res:u.res,bucket:s.bucket,name:i,etag:u.res.headers.etag},s.headers&&s.headers["x-oss-callback"]&&(w.data=JSON.parse(u.data.toString())),a.abrupt("return",w);case 21:case"end":return a.stop()}},null,this)},p._uploadPart=function(i,r,d,f,h){var E,y,l;return m.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return h=h||{},E={},L(h).to(E),E.headers={"Content-Length":f.size},E.subres={partNumber:d,uploadId:r},y=this._objectRequestParams("PUT",i,E),y.mime=E.mime,y.stream=f.stream,y.successStatuses=[200],s.next=11,m.default.awrap(this.request(y));case 11:if(l=s.sent,l.res.headers.etag){s.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 f.stream=null,y.stream=null,s.abrupt("return",{name:i,etag:l.res.headers.etag,res:l.res});case 17:case"end":return s.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=S(P),T=I("babel-runtime/core-js/object/keys"),L=S(T),_=I("babel-runtime/helpers/typeof"),g=S(_);function S(r){return r&&r.__esModule?r:{default:r}}var p=I("../utils/checkBucketName"),o=p.checkBucketName,i=N;i.copy=function(d,f,h,E){var y,l,n;return m.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return(typeof h=="undefined"?"undefined":(0,g.default)(h))==="object"&&(E=h),E=E||{},E.headers=E.headers||{},(0,L.default)(E.headers).forEach(function(w){E.headers["x-oss-copy-source-"+w.toLowerCase()]=E.headers[w]}),E.meta&&(E.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(E.meta,E.headers),f=this._getSourceName(f,h),E.versionId&&(f=f+"?versionId="+E.versionId),E.headers["x-oss-copy-source"]=f,y=this._objectRequestParams("PUT",d,E),y.xmlResponse=!0,y.successStatuses=[200,304],u.next=14,m.default.awrap(this.request(y));case 14:return l=u.sent,n=l.data,n&&(n={etag:n.ETag,lastModified:n.LastModified}),u.abrupt("return",{data:n,res:l.res});case 18:case"end":return u.stop()}},null,this)},i._getSourceName=function(d,f){return typeof f=="string"?d=this._objectName(d):d[0]!=="/"?f=this.options.bucket:(f=d.replace(/\/(.+?)(\/.*)/,"$1"),d=d.replace(/(\/.+?\/)(.*)/,"$2")),o(f),d=encodeURI(d),d="/"+f+"/"+d,d}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=_(P),T=I("babel-runtime/core-js/object/assign"),L=_(T);function _(S){return S&&S.__esModule?S:{default:S}}var g=N;g.delete=function(p){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r;return m.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return o.subres=(0,L.default)({},o.subres),o.versionId&&(o.subres.versionId=o.versionId),i=this._objectRequestParams("DELETE",p,o),i.successStatuses=[204],f.next=6,m.default.awrap(this.request(i));case 6:return r=f.sent,f.abrupt("return",{res:r.res});case 8:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=_(P),T=I("babel-runtime/core-js/object/assign"),L=_(T);function _(i){return i&&i.__esModule?i:{default:i}}var g=I("utility"),S=I("../utils/obj2xml"),p=S.obj2xml,o=N;o.deleteMulti=function(r){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f,h,E,y,l,n,s,u,w,v,a,R;return m.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:if(f=[],!(!r||!r.length)){c.next=3;break}throw new Error("names is required");case 3:for(h=0;h<r.length;h++)E={},typeof r[h]=="string"?E.Key=g.escape(this._objectName(r[h])):(y=r[h],l=y.key,n=y.versionId,E.Key=g.escape(this._objectName(l)),E.VersionId=n),f.push(E);return s={Delete:{Quiet:!!d.quiet,Object:f}},u=p(s,{headers:!0}),d.subres=(0,L.default)({delete:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),w=this._objectRequestParams("POST","",d),w.mime="xml",w.content=u,w.xmlResponse=!0,w.successStatuses=[200],c.next=15,m.default.awrap(this.request(w));case 15:return v=c.sent,a=v.data,R=a&&a.Deleted||null,R&&(Array.isArray(R)||(R=[R])),c.abrupt("return",{res:v.res,deleted:R||[]});case 20:case"end":return c.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=_(P),T=I("babel-runtime/core-js/object/assign"),L=_(T);function _(S){return S&&S.__esModule?S:{default:S}}var g=N;g.deleteObjectTagging=function(p){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r;return m.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return o.subres=(0,L.default)({tagging:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),p=this._objectName(p),i=this._objectRequestParams("DELETE",p,o),i.successStatuses=[204],f.next=7,m.default.awrap(this.request(i));case 7:return r=f.sent,f.abrupt("return",{status:r.status,res:r.res});case 9:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=_(P),T=I("babel-runtime/core-js/object/assign"),L=_(T);function _(o){return o&&o.__esModule?o:{default:o}}var g=I("fs"),S=I("is-type-of"),p=N;p.get=function(i,r){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f,h,E,y;return m.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return f=null,h=!1,S.writableStream(r)?f=r:S.string(r)?(f=g.createWriteStream(r),h=!0):d=r,d=d||{},d.subres=(0,L.default)({},d.subres),d.versionId&&(d.subres.versionId=d.versionId),d.process&&(d.subres["x-oss-process"]=d.process),E=void 0,n.prev=8,y=this._objectRequestParams("GET",i,d),y.writeStream=f,y.successStatuses=[200,206,304],n.next=14,m.default.awrap(this.request(y));case 14:E=n.sent,h&&f.destroy(),n.next=25;break;case 18:if(n.prev=18,n.t0=n.catch(8),!h){n.next=24;break}return f.destroy(),n.next=24,m.default.awrap(this._deleteFileSafe(r));case 24:throw n.t0;case 25:return n.abrupt("return",{res:E.res,content:E.data});case 26:case"end":return n.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=_(P),T=I("babel-runtime/core-js/object/assign"),L=_(T);function _(S){return S&&S.__esModule?S:{default:S}}var g=N;g.getACL=function(p){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r;return m.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return o.subres=(0,L.default)({acl:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),p=this._objectName(p),i=this._objectRequestParams("GET",p,o),i.successStatuses=[200],i.xmlResponse=!0,f.next=8,m.default.awrap(this.request(i));case 8:return r=f.sent,f.abrupt("return",{acl:r.data.AccessControlList.Grant,owner:{id:r.data.Owner.ID,displayName:r.data.Owner.DisplayName},res:r.res});case 10:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/keys"),m=S(P),T=I("babel-runtime/regenerator"),L=S(T),_=I("babel-runtime/core-js/object/assign"),g=S(_);function S(y){return y&&y.__esModule?y:{default:y}}var p=N,o=I("../utils/isObject"),i=o.isObject,r=I("../utils/isArray"),d=r.isArray;p.getBucketVersions=f,p.listObjectVersions=f;function f(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,s,u,w,v,a;return L.default.async(function(D){for(;;)switch(D.prev=D.next){case 0:if(!(y.versionIdMarker&&y.keyMarker===void 0)){D.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return l.subres=(0,g.default)({versions:""},l.subres),l.versionId&&(l.subres.versionId=l.versionId),n=this._objectRequestParams("GET","",l),n.xmlResponse=!0,n.successStatuses=[200],n.query=E(y),D.next=10,L.default.awrap(this.request(n));case 10:return s=D.sent,u=s.data.Version||[],w=s.data.DeleteMarker||[],v=this,u&&(Array.isArray(u)||(u=[u]),u=u.map(function(c){return{name:c.Key,url:v._objectUrl(c.Key),lastModified:c.LastModified,isLatest:c.IsLatest==="true",versionId:c.VersionId,etag:c.ETag,type:c.Type,size:Number(c.Size),storageClass:c.StorageClass,owner:{id:c.Owner.ID,displayName:c.Owner.DisplayName}}})),w&&(d(w)||(w=[w]),w=w.map(function(c){return{name:c.Key,lastModified:c.LastModified,versionId:c.VersionId,owner:{id:c.Owner.ID,displayName:c.Owner.DisplayName}}})),a=s.data.CommonPrefixes||null,a&&(d(a)||(a=[a]),a=a.map(function(c){return c.Prefix})),D.abrupt("return",{res:s.res,objects:u,deleteMarker:w,prefixes:a,nextMarker:s.data.NextMarker||null,NextVersionIdMarker:s.data.NextVersionIdMarker||null,isTruncated:s.data.IsTruncated==="true"});case 19:case"end":return D.stop()}},null,this)}function h(y){return y.replace(/([A-Z])/g,"-$1").toLowerCase()}function E(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l={};return i(y)&&(0,m.default)(y).forEach(function(n){l[h(n)]=y[n]}),l}},{"../utils/isArray":42,"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],26:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=_(P),T=I("babel-runtime/core-js/object/assign"),L=_(T);function _(S){return S&&S.__esModule?S:{default:S}}var g=N;g.getObjectMeta=function(p,o){var i,r;return m.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return o=o||{},p=this._objectName(p),o.subres=(0,L.default)({objectMeta:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),i=this._objectRequestParams("HEAD",p,o),i.successStatuses=[200],f.next=8,m.default.awrap(this.request(i));case 8:return r=f.sent,f.abrupt("return",{status:r.status,res:r.res});case 10:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=_(P),T=I("babel-runtime/core-js/object/assign"),L=_(T);function _(o){return o&&o.__esModule?o:{default:o}}var g=N,S=I("../utils/isObject"),p=S.isObject;g.getObjectTagging=function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,f,h,E,y;return m.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return r.subres=(0,L.default)({tagging:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),i=this._objectName(i),d=this._objectRequestParams("GET",i,r),d.successStatuses=[200],n.next=7,m.default.awrap(this.request(d));case 7:return f=n.sent,n.next=10,m.default.awrap(this.parseXML(f.data));case 10:return h=n.sent,E=h.TagSet.Tag,E=E&&p(E)?[E]:E||[],y={},E.forEach(function(s){y[s.Key]=s.Value}),n.abrupt("return",{status:f.status,res:f.res,tag:y});case 16:case"end":return n.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=_(P),T=I("babel-runtime/core-js/object/assign"),L=_(T);function _(S){return S&&S.__esModule?S:{default:S}}var g=N;g.getSymlink=function(p){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r,d;return m.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return o.subres=(0,L.default)({symlink:""},o.subres),o.versionId&&(o.subres.versionId=o.versionId),p=this._objectName(p),i=this._objectRequestParams("GET",p,o),i.successStatuses=[200],h.next=7,m.default.awrap(this.request(i));case 7:return r=h.sent,d=r.res.headers["x-oss-symlink-target"],h.abrupt("return",{targetName:decodeURIComponent(d),res:r.res});case 10:case"end":return h.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=S(P),T=I("babel-runtime/core-js/object/keys"),L=S(T),_=I("babel-runtime/core-js/object/assign"),g=S(_);function S(o){return o&&o.__esModule?o:{default:o}}var p=N;p.head=function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,f,h;return m.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:return r.subres=(0,g.default)({},r.subres),r.versionId&&(r.subres.versionId=r.versionId),d=this._objectRequestParams("HEAD",i,r),d.successStatuses=[200,304],y.next=6,m.default.awrap(this.request(d));case 6:return f=y.sent,h={meta:null,res:f.res,status:f.status},f.status===200&&(0,L.default)(f.headers).forEach(function(l){l.indexOf("x-oss-meta-")===0&&(h.meta||(h.meta={}),h.meta[l.substring(11)]=f.headers[l])}),y.abrupt("return",h);case 10:case"end":return y.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=_(P),T=I("babel-runtime/core-js/object/assign"),L=_(T);function _(S){return S&&S.__esModule?S:{default:S}}var g=N;g.putACL=function(p,o,i){var r,d;return m.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return i=i||{},i.subres=(0,L.default)({acl:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),i.headers=i.headers||{},i.headers["x-oss-object-acl"]=o,p=this._objectName(p),r=this._objectRequestParams("PUT",p,i),r.successStatuses=[200],h.next=10,m.default.awrap(this.request(r));case 10:return d=h.sent,h.abrupt("return",{res:d.res});case 12:case"end":return h.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=S(P),T=I("babel-runtime/core-js/object/keys"),L=S(T),_=I("babel-runtime/core-js/object/assign"),g=S(_);function S(f){return f&&f.__esModule?f:{default:f}}var p=I("../utils/obj2xml"),o=p.obj2xml,i=I("../utils/checkObjectTag"),r=i.checkObjectTag,d=N;d.putObjectTagging=function(h,E){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l,n,s;return m.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:return r(E),y.subres=(0,g.default)({tagging:""},y.subres),y.versionId&&(y.subres.versionId=y.versionId),h=this._objectName(h),l=this._objectRequestParams("PUT",h,y),l.successStatuses=[200],E=(0,L.default)(E).map(function(v){return{Key:v,Value:E[v]}}),n={Tagging:{TagSet:{Tag:E}}},l.mime="xml",l.content=o(n),w.next=12,m.default.awrap(this.request(l));case 12:return s=w.sent,w.abrupt("return",{res:s.res,status:s.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(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=_(P),T=I("babel-runtime/core-js/object/assign"),L=_(T);function _(S){return S&&S.__esModule?S:{default:S}}var g=N;g.putSymlink=function(p,o,i){var r,d;return m.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return i=i||{},i.headers=i.headers||{},o=this._escape(this._objectName(o)),this._convertMetaToHeaders(i.meta,i.headers),i.headers["x-oss-symlink-target"]=o,i.subres=(0,L.default)({symlink:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),i.storageClass&&(i.headers["x-oss-storage-class"]=i.storageClass),p=this._objectName(p),r=this._objectRequestParams("PUT",p,i),r.successStatuses=[200],h.next=13,m.default.awrap(this.request(r));case 13:return d=h.sent,h.abrupt("return",{res:d.res});case 15:case"end":return h.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(I,Z,N){"use strict";var P=I("babel-runtime/regenerator"),m=_(P),T=I("babel-runtime/core-js/promise"),L=_(T);function _(S){return S&&S.__esModule?S:{default:S}}var g=N;g._parallelNode=function(p,o,i,r){var d,f,h,E,y,l,n,s;return m.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:d=this,f=[],h=[],E=p.length/o,y=p.length%o,l=y===0?E:(p.length-y)/o+1,n=1,s=0;case 8:if(!(s<p.length)){w.next=26;break}if(!d.isCancel()){w.next=11;break}return w.abrupt("break",26);case 11:if(r?h.push(i(d,p[s],r)):h.push(i(d,p[s])),!(h.length===o||n===l&&s===p.length-1)){w.next=23;break}return w.prev=13,n+=1,w.next=17,m.default.awrap(L.default.all(h));case 17:w.next=22;break;case 19:w.prev=19,w.t0=w.catch(13),f.push(w.t0);case 22:h=[];case 23:s++,w.next=8;break;case 26:return w.abrupt("return",f);case 27:case"end":return w.stop()}},null,this,[[13,19]])},g._parallel=function(p,o,i){var r=this;return new L.default(function(d){var f=[];if(o<=0||!p){d(f);return}function h(a){return function(){if(a===null)throw new Error("Callback was already called.");var R=a;a=null;for(var D=arguments.length,c=Array(D),b=0;b<D;b++)c[b]=arguments[b];R.apply(this,c)}}function E(a){var R=-1,D=a.length;return function(){return++R<D&&!r.isCancel()?{value:a[R],key:R}:null}}var y=E(p),l=!1,n=0,s=!1;function u(a,R){n-=1,a?(l=!0,f.push(a),d(f)):R==={}||l&&n<=0?(l=!0,d(f)):s||(r.isCancel()?d(f):v())}function w(a,R){i(a).then(function(D){R(null,D)}).catch(function(D){R(D)})}function v(){for(s=!0;n<o&&!l&&!r.isCancel();){var a=y();if(a===null||f.length>0){l=!0,n<=0&&d(f);return}n+=1,w(a.value,h(u))}s=!1}v()})},g.cancel=function(p){this.options.cancelFlag=!0,p&&this.abortMultipartUpload(p.name,p.uploadId,p.options)},g.isCancel=function(){return this.options.cancelFlag},g.resetCancelFlag=function(){this.options.cancelFlag=!1},g._stop=function(){this.options.cancelFlag=!0},g._makeCancelEvent=function(){var p={status:0,name:"cancel"};return p}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(I,Z,N){(function(P){"use strict";var m=I("babel-runtime/core-js/json/stringify"),T=g(m),L=I("babel-runtime/core-js/object/keys"),_=g(L);function g(o){return o&&o.__esModule?o:{default:o}}var S=I("./../../shims/crypto/crypto.js"),p=I("is-type-of");N.buildCanonicalizedResource=function(i,r){var d=""+i,f="?";if(p.string(r)&&r.trim()!=="")d+=f+r;else if(p.array(r))r.sort(),d+=f+r.join("&");else if(r){var h=function(l,n){return l[0]>n[0]?1:l[0]<n[0]?-1:0},E=function(l){d+=f+l,r[l]&&(d+="="+r[l]),f="&"};(0,_.default)(r).sort(h).forEach(E)}return d},N.buildCanonicalString=function(i,r,d,f){d=d||{};var h=d.headers||{},E="x-oss-",y=[],l={},n=[i.toUpperCase(),h["Content-Md5"]||"",h["Content-Type"]||h["Content-Type".toLowerCase()],f||h["x-oss-date"]];return(0,_.default)(h).forEach(function(s){var u=s.toLowerCase();u.indexOf(E)===0&&(l[u]=String(h[s]).trim())}),(0,_.default)(l).sort().forEach(function(s){y.push(s+":"+l[s])}),n=n.concat(y),n.push(this.buildCanonicalizedResource(r,d.parameters)),n.join(`
|
|
|
`)},N.computeSignature=function(i,r){var d=S.createHmac("sha1",i);return d.update(P.from(r,"utf8")).digest("base64")},N.authorization=function(i,r,d){return"OSS "+i+":"+this.computeSignature(r,d)},N._signatureForURL=function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=arguments[2],f=arguments[3],h={},E=r.subResource,y=E===void 0?{}:E;if(r.process){var l="x-oss-process";y[l]=r.process}if(r.trafficLimit){var n="x-oss-traffic-limit";y[n]=r.trafficLimit}if(r.response&&(0,_.default)(r.response).forEach(function(v){var a="response-"+v.toLowerCase();y[a]=r.response[v]}),(0,_.default)(r).forEach(function(v){var a=v.toLowerCase(),R=r[v];a.indexOf("x-oss-")===0?h[a]=R:(a.indexOf("content-md5")===0||a.indexOf("content-type")===0)&&(h[v]=R)}),Object.prototype.hasOwnProperty.call(r,"security-token")&&(y["security-token"]=r["security-token"]),Object.prototype.hasOwnProperty.call(r,"callback")){var s={callbackUrl:encodeURI(r.callback.url),callbackBody:r.callback.body};if(r.callback.host&&(s.callbackHost=r.callback.host),r.callback.contentType&&(s.callbackBodyType=r.callback.contentType),y.callback=P.from((0,T.default)(s)).toString("base64"),r.callback.customValue){var u={};(0,_.default)(r.callback.customValue).forEach(function(v){u["x:"+v]=r.callback.customValue[v]}),y["callback-var"]=P.from((0,T.default)(u)).toString("base64")}}var w=this.buildCanonicalString(r.method,d,{headers:h,parameters:y},f.toString());return{Signature:this.computeSignature(i,w),subResource:y}}}).call(this,I("buffer").Buffer)},{"./../../shims/crypto/crypto.js":284,"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73,"is-type-of":289}],35:[function(I,Z,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.checkBucketName=void 0,N.checkBucketName=function(P,m){var T=m?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!T.test(P))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/entries"),m=T(P);function T(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(N,"__esModule",{value:!0}),N.checkObjectTag=void 0;var L=I("./checkValid"),_=L.checkValid,g=I("./isObject"),S=g.isObject,p=[{validator:function(d){if(typeof d!="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 (/)"}],o={key:[].concat(p,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(p,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function i(r){if(!S(r))throw new Error("tag must be Object");var d=(0,m.default)(r);if(d.length>10)throw new Error("maximum of 10 tags for a object");var f=["key","value"];d.forEach(function(h){h.forEach(function(E,y){_(E,o[f[y]])})})}N.checkObjectTag=i},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(I,Z,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.checkValid=void 0;function P(m,T){T.forEach(function(L){if(L.validator)L.validator(m);else if(L.pattern&&!L.pattern.test(m))throw new Error(L.msg)})}N.checkValid=P},{}],38:[function(I,Z,N){(function(P){"use strict";var m=I("babel-runtime/core-js/object/assign"),T=L(m);function L(h){return h&&h.__esModule?h:{default:h}}Object.defineProperty(N,"__esModule",{value:!0}),N.createRequest=void 0;var _=I("./../../../shims/crypto/crypto.js"),g=I("debug")("ali-oss"),S=I("mime"),p=I("dateformat"),o=I("copy-to"),i=I("path");function r(h,E){return h[E]||h[E.toLowerCase()]}function d(h,E){delete h[E],delete h[E.toLowerCase()]}function f(h){var E=new Date;this.options.amendTimeSkewed&&(E=+new Date+this.options.amendTimeSkewed);var y={"x-oss-date":p(E,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(y["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,T.default)(y,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(y["x-oss-security-token"]=this.options.stsToken),o(h.headers).to(y),r(y,"Content-Type")||(h.mime&&h.mime.indexOf("/")>0?y["Content-Type"]=h.mime:y["Content-Type"]=S.getType(h.mime||i.extname(h.object||""))),r(y,"Content-Type")||d(y,"Content-Type"),h.content&&(y["Content-Md5"]=_.createHash("md5").update(P.from(h.content,"utf8")).digest("base64"),y["Content-Length"]||(y["Content-Length"]=h.content.length));var l=this._getResource(h);y.authorization=this.authorization(h.method,l,h.subres,y);var n=this._getReqUrl(h);g("request %s %s, with headers %j, !!stream: %s",h.method,n,y,!!h.stream);var s=h.timeout||this.options.timeout,u={method:h.method,content:h.content,stream:h.stream,headers:y,timeout:s,writeStream:h.writeStream,customResponse:h.customResponse,ctx:h.ctx||this.ctx};return this.agent&&(u.agent=this.agent),this.httpsAgent&&(u.httpsAgent=this.httpsAgent),{url:n,params:u}}N.createRequest=f}).call(this,I("buffer").Buffer)},{"./../../../shims/crypto/crypto.js":284,"babel-runtime/core-js/object/assign":54,buffer:73,"copy-to":76,dateformat:190,debug:288,mime:202,path:205}],39:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/keys"),m=_(P),T=I("babel-runtime/helpers/typeof"),L=_(T);function _(g){return g&&g.__esModule?g:{default:g}}Object.defineProperty(N,"__esModule",{value:!0}),N.deepCopy=void 0,N.deepCopy=function(g){if(g===null||(typeof g=="undefined"?"undefined":(0,L.default)(g))!=="object")return g;var S=Array.isArray(g)?[]:{};return(0,m.default)(g).forEach(function(p){S[p]=N.deepCopy(g[p])}),S}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/keys"),m=_(P),T=I("babel-runtime/helpers/typeof"),L=_(T);function _(p){return p&&p.__esModule?p:{default:p}}Object.defineProperty(N,"__esModule",{value:!0}),N.formatObjKey=void 0;function g(p,o){if(p===null||(typeof p=="undefined"?"undefined":(0,L.default)(p))!=="object")return p;var i=void 0;if(Array.isArray(p)){i=[];for(var r=0;r<p.length;r++)i.push(g(p[r],o))}else i={},(0,m.default)(p).forEach(function(d){i[S(d,o)]=g(p[d],o)});return i}N.formatObjKey=g;function S(p,o){return o==="firstUpperCase"?p=p.replace(/^./,function(i){return i.toUpperCase()}):o==="firstLowerCase"&&(p=p.replace(/^./,function(i){return i.toLowerCase()})),p}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(I,Z,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.getStrBytesCount=void 0;function P(m){for(var T=0,L=0;L<m.length;L++){var _=m.charAt(L);/^[\u00-\uff]$/.test(_)?T+=1:T+=2}return T}N.getStrBytesCount=P},{}],42:[function(I,Z,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.isArray=void 0,N.isArray=function(P){return Object.prototype.toString.call(P)==="[object Array]"}},{}],43:[function(I,Z,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.isBlob=void 0;function P(m){return typeof Blob!="undefined"&&m instanceof Blob}N.isBlob=P},{}],44:[function(I,Z,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.isFile=void 0,N.isFile=function(P){return typeof File!="undefined"&&P instanceof File}},{}],45:[function(I,Z,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.isIP=void 0,N.isIP=function(P){var m=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,T=/^\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 m.test(P)||T.test(P)}},{}],46:[function(I,Z,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.isObject=void 0,N.isObject=function(P){return Object.prototype.toString.call(P)==="[object Object]"}},{}],47:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/keys"),m=T(P);function T(S){return S&&S.__esModule?S:{default:S}}Object.defineProperty(N,"__esModule",{value:!0}),N.obj2xml=void 0;var L=I("./formatObjKey");function _(S){return Object.prototype.toString.call(S).replace(/(.*? |])/g,"").toLowerCase()}function g(S,p){var o="";return p&&p.headers&&(o=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
`),p&&p.firstUpperCase&&(S=L.formatObjKey(S,"firstUpperCase")),_(S)==="object"?(0,m.default)(S).forEach(function(i){_(S[i])==="string"||_(S[i])==="number"?o+="<"+i+">"+S[i]+"</"+i+">":_(S[i])==="object"?o+="<"+i+">"+g(S[i])+"</"+i+">":_(S[i])==="array"?o+=S[i].map(function(r){return"<"+i+">"+g(r)+"</"+i+">"}).join(""):o+="<"+i+">"+S[i].toString()+"</"+i+">"}):o+=S.toString(),o}N.obj2xml=g},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(I,Z,N){Z.exports=P,Z.exports.HttpsAgent=P;function P(){}},{}],49:[function(I,Z,N){Z.exports=I("./register")().Promise},{"./register":51}],50:[function(I,Z,N){"use strict";var P="@@any-promise/REGISTRATION",m=null;Z.exports=function(T,L){return function(g,S){g=g||null,S=S||{};var p=S.global!==!1;if(m===null&&p&&(m=T[P]||null),m!==null&&g!==null&&m.implementation!==g)throw new Error('any-promise already defined as "'+m.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return m===null&&(g!==null&&typeof S.Promise!="undefined"?m={Promise:S.Promise,implementation:g}:m=L(g),p&&(T[P]=m)),m}}},{}],51:[function(I,Z,N){"use strict";Z.exports=I("./loader")(window,P);function P(){if(typeof window.Promise=="undefined")throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}},{"./loader":50}],52:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(I,Z,N){Z.exports={default:I("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(I,Z,N){"use strict";N.__esModule=!0;var P=I("../core-js/symbol/iterator"),m=g(P),T=I("../core-js/symbol"),L=g(T),_=typeof L.default=="function"&&typeof m.default=="symbol"?function(S){return typeof S}:function(S){return S&&typeof L.default=="function"&&S.constructor===L.default&&S!==L.default.prototype?"symbol":typeof S};function g(S){return S&&S.__esModule?S:{default:S}}N.default=typeof L.default=="function"&&_(m.default)==="symbol"?function(S){return typeof S=="undefined"?"undefined":_(S)}:function(S){return S&&typeof L.default=="function"&&S.constructor===L.default&&S!==L.default.prototype?"symbol":typeof S=="undefined"?"undefined":_(S)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(I,Z,N){Z.exports=I("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(I,Z,N){"use strict";N.byteLength=p,N.toByteArray=i,N.fromByteArray=f;for(var P=[],m=[],T=typeof Uint8Array!="undefined"?Uint8Array:Array,L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=0,g=L.length;_<g;++_)P[_]=L[_],m[L.charCodeAt(_)]=_;m["-".charCodeAt(0)]=62,m["_".charCodeAt(0)]=63;function S(h){var E=h.length;if(E%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=h.indexOf("=");y===-1&&(y=E);var l=y===E?0:4-y%4;return[y,l]}function p(h){var E=S(h),y=E[0],l=E[1];return(y+l)*3/4-l}function o(h,E,y){return(E+y)*3/4-y}function i(h){var E,y=S(h),l=y[0],n=y[1],s=new T(o(h,l,n)),u=0,w=n>0?l-4:l,v;for(v=0;v<w;v+=4)E=m[h.charCodeAt(v)]<<18|m[h.charCodeAt(v+1)]<<12|m[h.charCodeAt(v+2)]<<6|m[h.charCodeAt(v+3)],s[u++]=E>>16&255,s[u++]=E>>8&255,s[u++]=E&255;return n===2&&(E=m[h.charCodeAt(v)]<<2|m[h.charCodeAt(v+1)]>>4,s[u++]=E&255),n===1&&(E=m[h.charCodeAt(v)]<<10|m[h.charCodeAt(v+1)]<<4|m[h.charCodeAt(v+2)]>>2,s[u++]=E>>8&255,s[u++]=E&255),s}function r(h){return P[h>>18&63]+P[h>>12&63]+P[h>>6&63]+P[h&63]}function d(h,E,y){for(var l,n=[],s=E;s<y;s+=3)l=(h[s]<<16&16711680)+(h[s+1]<<8&65280)+(h[s+2]&255),n.push(r(l));return n.join("")}function f(h){for(var E,y=h.length,l=y%3,n=[],s=16383,u=0,w=y-l;u<w;u+=s)n.push(d(h,u,u+s>w?w:u+s));return l===1?(E=h[y-1],n.push(P[E>>2]+P[E<<4&63]+"==")):l===2&&(E=(h[y-2]<<8)+h[y-1],n.push(P[E>>10]+P[E>>4&63]+P[E<<2&63]+"=")),n.join("")}},{}],70:[function(I,Z,N){/*!
|
|
|
* Bowser - a browser detector
|
|
|
* https://github.com/ded/bowser
|
|
|
* MIT License | (c) Dustin Diaz 2015
|
|
|
*/!function(P,m,T){typeof Z!="undefined"&&Z.exports?Z.exports=T():typeof define=="function"&&define.amd?define(m,T):P[m]=T()}(this,"bowser",function(){var P=!0;function m(o){function i(K){var B=o.match(K);return B&&B.length>1&&B[1]||""}function r(K){var B=o.match(K);return B&&B.length>1&&B[2]||""}var d=i(/(ipod|iphone|ipad)/i).toLowerCase(),f=/like android/i.test(o),h=!f&&/android/i.test(o),E=/nexus\s*[0-6]\s*/i.test(o),y=!E&&/nexus\s*[0-9]+/i.test(o),l=/CrOS/.test(o),n=/silk/i.test(o),s=/sailfish/i.test(o),u=/tizen/i.test(o),w=/(web|hpw)(o|0)s/i.test(o),v=/windows phone/i.test(o),a=/SamsungBrowser/i.test(o),R=!v&&/windows/i.test(o),D=!d&&!n&&/macintosh/i.test(o),c=!h&&!s&&!u&&!w&&/linux/i.test(o),b=r(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),x=i(/version\/(\d+(\.\d+)?)/i),C=/tablet/i.test(o)&&!/tablet pc/i.test(o),F=!C&&/[^-]mobi/i.test(o),j=/xbox/i.test(o),k;/opera/i.test(o)?k={name:"Opera",opera:P,version:x||i(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(o)?k={name:"Opera",opera:P,version:i(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||x}:/SamsungBrowser/i.test(o)?k={name:"Samsung Internet for Android",samsungBrowser:P,version:x||i(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(o)?k={name:"NAVER Whale browser",whale:P,version:i(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(o)?k={name:"MZ Browser",mzbrowser:P,version:i(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(o)?k={name:"Opera Coast",coast:P,version:x||i(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(o)?k={name:"Focus",focus:P,version:i(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(o)?k={name:"Yandex Browser",yandexbrowser:P,version:x||i(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(o)?k={name:"UC Browser",ucbrowser:P,version:i(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(o)?k={name:"Maxthon",maxthon:P,version:i(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(o)?k={name:"Epiphany",epiphany:P,version:i(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(o)?k={name:"Puffin",puffin:P,version:i(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(o)?k={name:"Sleipnir",sleipnir:P,version:i(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(o)?k={name:"K-Meleon",kMeleon:P,version:i(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:v?(k={name:"Windows Phone",osname:"Windows Phone",windowsphone:P},b?(k.msedge=P,k.version=b):(k.msie=P,k.version=i(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(o)?k={name:"Internet Explorer",msie:P,version:i(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:l?k={name:"Chrome",osname:"Chrome OS",chromeos:P,chromeBook:P,chrome:P,version:i(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(o)?k={name:"Microsoft Edge",msedge:P,version:b}:/vivaldi/i.test(o)?k={name:"Vivaldi",vivaldi:P,version:i(/vivaldi\/(\d+(\.\d+)?)/i)||x}:s?k={name:"Sailfish",osname:"Sailfish OS",sailfish:P,version:i(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(o)?k={name:"SeaMonkey",seamonkey:P,version:i(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(o)?(k={name:"Firefox",firefox:P,version:i(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(o)&&(k.firefoxos=P,k.osname="Firefox OS")):n?k={name:"Amazon Silk",silk:P,version:i(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(o)?k={name:"PhantomJS",phantom:P,version:i(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(o)?k={name:"SlimerJS",slimer:P,version:i(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(o)||/rim\stablet/i.test(o)?k={name:"BlackBerry",osname:"BlackBerry OS",blackberry:P,version:x||i(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:w?(k={name:"WebOS",osname:"WebOS",webos:P,version:x||i(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(o)&&(k.touchpad=P)):/bada/i.test(o)?k={name:"Bada",osname:"Bada",bada:P,version:i(/dolfin\/(\d+(\.\d+)?)/i)}:u?k={name:"Tizen",osname:"Tizen",tizen:P,version:i(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||x}:/qupzilla/i.test(o)?k={name:"QupZilla",qupzilla:P,version:i(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||x}:/chromium/i.test(o)?k={name:"Chromium",chromium:P,version:i(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||x}:/chrome|crios|crmo/i.test(o)?k={name:"Chrome",chrome:P,version:i(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:h?k={name:"Android",version:x}:/safari|applewebkit/i.test(o)?(k={name:"Safari",safari:P},x&&(k.version=x)):d?(k={name:d=="iphone"?"iPhone":d=="ipad"?"iPad":"iPod"},x&&(k.version=x)):/googlebot/i.test(o)?k={name:"Googlebot",googlebot:P,version:i(/googlebot\/(\d+(\.\d+))/i)||x}:k={name:i(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!k.msedge&&/(apple)?webkit/i.test(o)?(/(apple)?webkit\/537\.36/i.test(o)?(k.name=k.name||"Blink",k.blink=P):(k.name=k.name||"Webkit",k.webkit=P),!k.version&&x&&(k.version=x)):!k.opera&&/gecko\//i.test(o)&&(k.name=k.name||"Gecko",k.gecko=P,k.version=k.version||i(/gecko\/(\d+(\.\d+)?)/i)),!k.windowsphone&&(h||k.silk)?(k.android=P,k.osname="Android"):!k.windowsphone&&d?(k[d]=P,k.ios=P,k.osname="iOS"):D?(k.mac=P,k.osname="macOS"):j?(k.xbox=P,k.osname="Xbox"):R?(k.windows=P,k.osname="Windows"):c&&(k.linux=P,k.osname="Linux");function X(K){switch(K){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 G="";k.windows?G=X(i(/Windows ((NT|XP)( \d\d?.\d)?)/i)):k.windowsphone?G=i(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):k.mac?(G=i(/Mac OS X (\d+([_\.\s]\d+)*)/i),G=G.replace(/[_\s]/g,".")):d?(G=i(/os (\d+([_\s]\d+)*) like mac os x/i),G=G.replace(/[_\s]/g,".")):h?G=i(/android[ \/-](\d+(\.\d+)*)/i):k.webos?G=i(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):k.blackberry?G=i(/rim\stablet\sos\s(\d+(\.\d+)*)/i):k.bada?G=i(/bada\/(\d+(\.\d+)*)/i):k.tizen&&(G=i(/tizen[\/\s](\d+(\.\d+)*)/i)),G&&(k.osversion=G);var W=!k.windows&&G.split(".")[0];return C||y||d=="ipad"||h&&(W==3||W>=4&&!F)||k.silk?k.tablet=P:(F||d=="iphone"||d=="ipod"||h||E||k.blackberry||k.webos||k.bada)&&(k.mobile=P),k.msedge||k.msie&&k.version>=10||k.yandexbrowser&&k.version>=15||k.vivaldi&&k.version>=1||k.chrome&&k.version>=20||k.samsungBrowser&&k.version>=4||k.whale&&g([k.version,"1.0"])===1||k.mzbrowser&&g([k.version,"6.0"])===1||k.focus&&g([k.version,"1.0"])===1||k.firefox&&k.version>=20||k.safari&&k.version>=6||k.opera&&k.version>=10||k.ios&&k.osversion&&k.osversion.split(".")[0]>=6||k.blackberry&&k.version>=10.1||k.chromium&&k.version>=20?k.a=P:k.msie&&k.version<10||k.chrome&&k.version<20||k.firefox&&k.version<20||k.safari&&k.version<6||k.opera&&k.version<10||k.ios&&k.osversion&&k.osversion.split(".")[0]<6||k.chromium&&k.version<20?k.c=P:k.x=P,k}var T=m(typeof navigator!="undefined"&&navigator.userAgent||"");T.test=function(o){for(var i=0;i<o.length;++i){var r=o[i];if(typeof r=="string"&&r in T)return!0}return!1};function L(o){return o.split(".").length}function _(o,i){var r=[],d;if(Array.prototype.map)return Array.prototype.map.call(o,i);for(d=0;d<o.length;d++)r.push(i(o[d]));return r}function g(o){for(var i=Math.max(L(o[0]),L(o[1])),r=_(o,function(d){var f=i-L(d);return d=d+new Array(f+1).join(".0"),_(d.split("."),function(h){return new Array(20-h.length).join("0")+h}).reverse()});--i>=0;){if(r[0][i]>r[1][i])return 1;if(r[0][i]===r[1][i]){if(i===0)return 0}else return-1}}function S(o,i,r){var d=T;typeof i=="string"&&(r=i,i=void 0),i===void 0&&(i=!1),r&&(d=m(r));var f=""+d.version;for(var h in o)if(o.hasOwnProperty(h)&&d[h]){if(typeof o[h]!="string")throw new Error("Browser version in the minVersion map should be a string: "+h+": "+String(o));return g([f,o[h]])<0}return i}function p(o,i,r){return!S(o,i,r)}return T.isUnsupportedBrowser=S,T.compareVersions=g,T.check=p,T._detect=m,T.detect=m,T})},{}],71:[function(I,Z,N){},{}],72:[function(I,Z,N){var P=I("buffer").Buffer,m=P.isEncoding||function(p){switch(p&&p.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 T(p){if(p&&!m(p))throw new Error("Unknown encoding: "+p)}var L=N.StringDecoder=function(p){this.encoding=(p||"utf8").toLowerCase().replace(/[-_]/,""),T(p);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=g;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=S;break;default:this.write=_;return}this.charBuffer=new P(6),this.charReceived=0,this.charLength=0};L.prototype.write=function(p){for(var o="";this.charLength;){var i=p.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:p.length;if(p.copy(this.charBuffer,this.charReceived,0,i),this.charReceived+=i,this.charReceived<this.charLength)return"";p=p.slice(i,p.length),o=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var d=o.charCodeAt(o.length-1);if(d>=55296&&d<=56319){this.charLength+=this.surrogateSize,o="";continue}if(this.charReceived=this.charLength=0,p.length===0)return o;break}this.detectIncompleteChar(p);var r=p.length;this.charLength&&(p.copy(this.charBuffer,0,p.length-this.charReceived,r),r-=this.charReceived),o+=p.toString(this.encoding,0,r);var r=o.length-1,d=o.charCodeAt(r);if(d>=55296&&d<=56319){var f=this.surrogateSize;return this.charLength+=f,this.charReceived+=f,this.charBuffer.copy(this.charBuffer,f,0,f),p.copy(this.charBuffer,0,0,f),o.substring(0,r)}return o},L.prototype.detectIncompleteChar=function(p){for(var o=p.length>=3?3:p.length;o>0;o--){var i=p[p.length-o];if(o==1&&i>>5==6){this.charLength=2;break}if(o<=2&&i>>4==14){this.charLength=3;break}if(o<=3&&i>>3==30){this.charLength=4;break}}this.charReceived=o},L.prototype.end=function(p){var o="";if(p&&p.length&&(o=this.write(p)),this.charReceived){var i=this.charReceived,r=this.charBuffer,d=this.encoding;o+=r.slice(0,i).toString(d)}return o};function _(p){return p.toString(this.encoding)}function g(p){this.charReceived=p.length%2,this.charLength=this.charReceived?2:0}function S(p){this.charReceived=p.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(I,Z,N){(function(P,m){/*!
|
|
|
* The buffer module from node.js, for the browser.
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
|
* @license MIT
|
|
|
*/"use strict";var T=I("base64-js"),L=I("ieee754"),_=I("isarray");N.Buffer=m,N.SlowBuffer=n,N.INSPECT_MAX_BYTES=50,m.TYPED_ARRAY_SUPPORT=P.TYPED_ARRAY_SUPPORT!==void 0?P.TYPED_ARRAY_SUPPORT:g(),N.kMaxLength=S();function g(){try{var re=new Uint8Array(1);return re.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},re.foo()===42&&typeof re.subarray=="function"&&re.subarray(1,1).byteLength===0}catch(Y){return!1}}function S(){return m.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function p(re,Y){if(S()<Y)throw new RangeError("Invalid typed array length");return m.TYPED_ARRAY_SUPPORT?(re=new Uint8Array(Y),re.__proto__=m.prototype):(re===null&&(re=new m(Y)),re.length=Y),re}function m(re,Y,z){if(!m.TYPED_ARRAY_SUPPORT&&!(this instanceof m))return new m(re,Y,z);if(typeof re=="number"){if(typeof Y=="string")throw new Error("If encoding is specified then the first argument must be a string");return d(this,re)}return o(this,re,Y,z)}m.poolSize=8192,m._augment=function(re){return re.__proto__=m.prototype,re};function o(re,Y,z,$){if(typeof Y=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Y instanceof ArrayBuffer?E(re,Y,z,$):typeof Y=="string"?f(re,Y,z):y(re,Y)}m.from=function(re,Y,z){return o(null,re,Y,z)},m.TYPED_ARRAY_SUPPORT&&(m.prototype.__proto__=Uint8Array.prototype,m.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&m[Symbol.species]===m&&Object.defineProperty(m,Symbol.species,{value:null,configurable:!0}));function i(re){if(typeof re!="number")throw new TypeError('"size" argument must be a number');if(re<0)throw new RangeError('"size" argument must not be negative')}function r(re,Y,z,$){return i(Y),Y<=0?p(re,Y):z!==void 0?typeof $=="string"?p(re,Y).fill(z,$):p(re,Y).fill(z):p(re,Y)}m.alloc=function(re,Y,z){return r(null,re,Y,z)};function d(re,Y){if(i(Y),re=p(re,Y<0?0:l(Y)|0),!m.TYPED_ARRAY_SUPPORT)for(var z=0;z<Y;++z)re[z]=0;return re}m.allocUnsafe=function(re){return d(null,re)},m.allocUnsafeSlow=function(re){return d(null,re)};function f(re,Y,z){if((typeof z!="string"||z==="")&&(z="utf8"),!m.isEncoding(z))throw new TypeError('"encoding" must be a valid string encoding');var $=s(Y,z)|0;re=p(re,$);var me=re.write(Y,z);return me!==$&&(re=re.slice(0,me)),re}function h(re,Y){var z=Y.length<0?0:l(Y.length)|0;re=p(re,z);for(var $=0;$<z;$+=1)re[$]=Y[$]&255;return re}function E(re,Y,z,$){if(Y.byteLength,z<0||Y.byteLength<z)throw new RangeError("'offset' is out of bounds");if(Y.byteLength<z+($||0))throw new RangeError("'length' is out of bounds");return z===void 0&&$===void 0?Y=new Uint8Array(Y):$===void 0?Y=new Uint8Array(Y,z):Y=new Uint8Array(Y,z,$),m.TYPED_ARRAY_SUPPORT?(re=Y,re.__proto__=m.prototype):re=h(re,Y),re}function y(re,Y){if(m.isBuffer(Y)){var z=l(Y.length)|0;return re=p(re,z),re.length===0||Y.copy(re,0,0,z),re}if(Y){if(typeof ArrayBuffer!="undefined"&&Y.buffer instanceof ArrayBuffer||"length"in Y)return typeof Y.length!="number"||ge(Y.length)?p(re,0):h(re,Y);if(Y.type==="Buffer"&&_(Y.data))return h(re,Y.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function l(re){if(re>=S())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S().toString(16)+" bytes");return re|0}function n(re){return+re!=re&&(re=0),m.alloc(+re)}m.isBuffer=function(Y){return!!(Y!=null&&Y._isBuffer)},m.compare=function(Y,z){if(!m.isBuffer(Y)||!m.isBuffer(z))throw new TypeError("Arguments must be Buffers");if(Y===z)return 0;for(var $=Y.length,me=z.length,pe=0,xe=Math.min($,me);pe<xe;++pe)if(Y[pe]!==z[pe]){$=Y[pe],me=z[pe];break}return $<me?-1:me<$?1:0},m.isEncoding=function(Y){switch(String(Y).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},m.concat=function(Y,z){if(!_(Y))throw new TypeError('"list" argument must be an Array of Buffers');if(Y.length===0)return m.alloc(0);var $;if(z===void 0)for(z=0,$=0;$<Y.length;++$)z+=Y[$].length;var me=m.allocUnsafe(z),pe=0;for($=0;$<Y.length;++$){var xe=Y[$];if(!m.isBuffer(xe))throw new TypeError('"list" argument must be an Array of Buffers');xe.copy(me,pe),pe+=xe.length}return me};function s(re,Y){if(m.isBuffer(re))return re.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(re)||re instanceof ArrayBuffer))return re.byteLength;typeof re!="string"&&(re=""+re);var z=re.length;if(z===0)return 0;for(var $=!1;;)switch(Y){case"ascii":case"latin1":case"binary":return z;case"utf8":case"utf-8":case void 0:return oe(re).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z*2;case"hex":return z>>>1;case"base64":return J(re).length;default:if($)return oe(re).length;Y=(""+Y).toLowerCase(),$=!0}}m.byteLength=s;function u(re,Y,z){var $=!1;if((Y===void 0||Y<0)&&(Y=0),Y>this.length)return"";if((z===void 0||z>this.length)&&(z=this.length),z<=0)return"";if(z>>>=0,Y>>>=0,z<=Y)return"";for(re||(re="utf8");;)switch(re){case"hex":return K(this,Y,z);case"utf8":case"utf-8":return j(this,Y,z);case"ascii":return G(this,Y,z);case"latin1":case"binary":return W(this,Y,z);case"base64":return F(this,Y,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,Y,z);default:if($)throw new TypeError("Unknown encoding: "+re);re=(re+"").toLowerCase(),$=!0}}m.prototype._isBuffer=!0;function w(re,Y,z){var $=re[Y];re[Y]=re[z],re[z]=$}m.prototype.swap16=function(){var Y=this.length;if(Y%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var z=0;z<Y;z+=2)w(this,z,z+1);return this},m.prototype.swap32=function(){var Y=this.length;if(Y%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var z=0;z<Y;z+=4)w(this,z,z+3),w(this,z+1,z+2);return this},m.prototype.swap64=function(){var Y=this.length;if(Y%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var z=0;z<Y;z+=8)w(this,z,z+7),w(this,z+1,z+6),w(this,z+2,z+5),w(this,z+3,z+4);return this},m.prototype.toString=function(){var Y=this.length|0;return Y===0?"":arguments.length===0?j(this,0,Y):u.apply(this,arguments)},m.prototype.equals=function(Y){if(!m.isBuffer(Y))throw new TypeError("Argument must be a Buffer");return this===Y?!0:m.compare(this,Y)===0},m.prototype.inspect=function(){var Y="",z=N.INSPECT_MAX_BYTES;return this.length>0&&(Y=this.toString("hex",0,z).match(/.{2}/g).join(" "),this.length>z&&(Y+=" ... ")),"<Buffer "+Y+">"},m.prototype.compare=function(Y,z,$,me,pe){if(!m.isBuffer(Y))throw new TypeError("Argument must be a Buffer");if(z===void 0&&(z=0),$===void 0&&($=Y?Y.length:0),me===void 0&&(me=0),pe===void 0&&(pe=this.length),z<0||$>Y.length||me<0||pe>this.length)throw new RangeError("out of range index");if(me>=pe&&z>=$)return 0;if(me>=pe)return-1;if(z>=$)return 1;if(z>>>=0,$>>>=0,me>>>=0,pe>>>=0,this===Y)return 0;for(var xe=pe-me,Re=$-z,ke=Math.min(xe,Re),Ne=this.slice(me,pe),Pe=Y.slice(z,$),je=0;je<ke;++je)if(Ne[je]!==Pe[je]){xe=Ne[je],Re=Pe[je];break}return xe<Re?-1:Re<xe?1:0};function v(re,Y,z,$,me){if(re.length===0)return-1;if(typeof z=="string"?($=z,z=0):z>2147483647?z=2147483647:z<-2147483648&&(z=-2147483648),z=+z,isNaN(z)&&(z=me?0:re.length-1),z<0&&(z=re.length+z),z>=re.length){if(me)return-1;z=re.length-1}else if(z<0)if(me)z=0;else return-1;if(typeof Y=="string"&&(Y=m.from(Y,$)),m.isBuffer(Y))return Y.length===0?-1:a(re,Y,z,$,me);if(typeof Y=="number")return Y=Y&255,m.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?me?Uint8Array.prototype.indexOf.call(re,Y,z):Uint8Array.prototype.lastIndexOf.call(re,Y,z):a(re,[Y],z,$,me);throw new TypeError("val must be string, number or Buffer")}function a(re,Y,z,$,me){var pe=1,xe=re.length,Re=Y.length;if($!==void 0&&($=String($).toLowerCase(),$==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(re.length<2||Y.length<2)return-1;pe=2,xe/=2,Re/=2,z/=2}function ke(We,_e){return pe===1?We[_e]:We.readUInt16BE(_e*pe)}var Ne;if(me){var Pe=-1;for(Ne=z;Ne<xe;Ne++)if(ke(re,Ne)===ke(Y,Pe===-1?0:Ne-Pe)){if(Pe===-1&&(Pe=Ne),Ne-Pe+1===Re)return Pe*pe}else Pe!==-1&&(Ne-=Ne-Pe),Pe=-1}else for(z+Re>xe&&(z=xe-Re),Ne=z;Ne>=0;Ne--){for(var je=!0,Fe=0;Fe<Re;Fe++)if(ke(re,Ne+Fe)!==ke(Y,Fe)){je=!1;break}if(je)return Ne}return-1}m.prototype.includes=function(Y,z,$){return this.indexOf(Y,z,$)!==-1},m.prototype.indexOf=function(Y,z,$){return v(this,Y,z,$,!0)},m.prototype.lastIndexOf=function(Y,z,$){return v(this,Y,z,$,!1)};function R(re,Y,z,$){z=Number(z)||0;var me=re.length-z;$?($=Number($),$>me&&($=me)):$=me;var pe=Y.length;if(pe%2!==0)throw new TypeError("Invalid hex string");$>pe/2&&($=pe/2);for(var xe=0;xe<$;++xe){var Re=parseInt(Y.substr(xe*2,2),16);if(isNaN(Re))return xe;re[z+xe]=Re}return xe}function D(re,Y,z,$){return ee(oe(Y,re.length-z),re,z,$)}function c(re,Y,z,$){return ee(Q(Y),re,z,$)}function b(re,Y,z,$){return c(re,Y,z,$)}function x(re,Y,z,$){return ee(J(Y),re,z,$)}function C(re,Y,z,$){return ee(se(Y,re.length-z),re,z,$)}m.prototype.write=function(Y,z,$,me){if(z===void 0)me="utf8",$=this.length,z=0;else if($===void 0&&typeof z=="string")me=z,$=this.length,z=0;else if(isFinite(z))z=z|0,isFinite($)?($=$|0,me===void 0&&(me="utf8")):(me=$,$=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var pe=this.length-z;if(($===void 0||$>pe)&&($=pe),Y.length>0&&($<0||z<0)||z>this.length)throw new RangeError("Attempt to write outside buffer bounds");me||(me="utf8");for(var xe=!1;;)switch(me){case"hex":return R(this,Y,z,$);case"utf8":case"utf-8":return D(this,Y,z,$);case"ascii":return c(this,Y,z,$);case"latin1":case"binary":return b(this,Y,z,$);case"base64":return x(this,Y,z,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,Y,z,$);default:if(xe)throw new TypeError("Unknown encoding: "+me);me=(""+me).toLowerCase(),xe=!0}},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F(re,Y,z){return Y===0&&z===re.length?T.fromByteArray(re):T.fromByteArray(re.slice(Y,z))}function j(re,Y,z){z=Math.min(re.length,z);for(var $=[],me=Y;me<z;){var pe=re[me],xe=null,Re=pe>239?4:pe>223?3:pe>191?2:1;if(me+Re<=z){var ke,Ne,Pe,je;switch(Re){case 1:pe<128&&(xe=pe);break;case 2:ke=re[me+1],(ke&192)===128&&(je=(pe&31)<<6|ke&63,je>127&&(xe=je));break;case 3:ke=re[me+1],Ne=re[me+2],(ke&192)===128&&(Ne&192)===128&&(je=(pe&15)<<12|(ke&63)<<6|Ne&63,je>2047&&(je<55296||je>57343)&&(xe=je));break;case 4:ke=re[me+1],Ne=re[me+2],Pe=re[me+3],(ke&192)===128&&(Ne&192)===128&&(Pe&192)===128&&(je=(pe&15)<<18|(ke&63)<<12|(Ne&63)<<6|Pe&63,je>65535&&je<1114112&&(xe=je))}}xe===null?(xe=65533,Re=1):xe>65535&&(xe-=65536,$.push(xe>>>10&1023|55296),xe=56320|xe&1023),$.push(xe),me+=Re}return X($)}var k=4096;function X(re){var Y=re.length;if(Y<=k)return String.fromCharCode.apply(String,re);for(var z="",$=0;$<Y;)z+=String.fromCharCode.apply(String,re.slice($,$+=k));return z}function G(re,Y,z){var $="";z=Math.min(re.length,z);for(var me=Y;me<z;++me)$+=String.fromCharCode(re[me]&127);return $}function W(re,Y,z){var $="";z=Math.min(re.length,z);for(var me=Y;me<z;++me)$+=String.fromCharCode(re[me]);return $}function K(re,Y,z){var $=re.length;(!Y||Y<0)&&(Y=0),(!z||z<0||z>$)&&(z=$);for(var me="",pe=Y;pe<z;++pe)me+=te(re[pe]);return me}function B(re,Y,z){for(var $=re.slice(Y,z),me="",pe=0;pe<$.length;pe+=2)me+=String.fromCharCode($[pe]+$[pe+1]*256);return me}m.prototype.slice=function(Y,z){var $=this.length;Y=~~Y,z=z===void 0?$:~~z,Y<0?(Y+=$,Y<0&&(Y=0)):Y>$&&(Y=$),z<0?(z+=$,z<0&&(z=0)):z>$&&(z=$),z<Y&&(z=Y);var me;if(m.TYPED_ARRAY_SUPPORT)me=this.subarray(Y,z),me.__proto__=m.prototype;else{var pe=z-Y;me=new m(pe,void 0);for(var xe=0;xe<pe;++xe)me[xe]=this[xe+Y]}return me};function U(re,Y,z){if(re%1!==0||re<0)throw new RangeError("offset is not uint");if(re+Y>z)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUIntLE=function(Y,z,$){Y=Y|0,z=z|0,$||U(Y,z,this.length);for(var me=this[Y],pe=1,xe=0;++xe<z&&(pe*=256);)me+=this[Y+xe]*pe;return me},m.prototype.readUIntBE=function(Y,z,$){Y=Y|0,z=z|0,$||U(Y,z,this.length);for(var me=this[Y+--z],pe=1;z>0&&(pe*=256);)me+=this[Y+--z]*pe;return me},m.prototype.readUInt8=function(Y,z){return z||U(Y,1,this.length),this[Y]},m.prototype.readUInt16LE=function(Y,z){return z||U(Y,2,this.length),this[Y]|this[Y+1]<<8},m.prototype.readUInt16BE=function(Y,z){return z||U(Y,2,this.length),this[Y]<<8|this[Y+1]},m.prototype.readUInt32LE=function(Y,z){return z||U(Y,4,this.length),(this[Y]|this[Y+1]<<8|this[Y+2]<<16)+this[Y+3]*16777216},m.prototype.readUInt32BE=function(Y,z){return z||U(Y,4,this.length),this[Y]*16777216+(this[Y+1]<<16|this[Y+2]<<8|this[Y+3])},m.prototype.readIntLE=function(Y,z,$){Y=Y|0,z=z|0,$||U(Y,z,this.length);for(var me=this[Y],pe=1,xe=0;++xe<z&&(pe*=256);)me+=this[Y+xe]*pe;return pe*=128,me>=pe&&(me-=Math.pow(2,8*z)),me},m.prototype.readIntBE=function(Y,z,$){Y=Y|0,z=z|0,$||U(Y,z,this.length);for(var me=z,pe=1,xe=this[Y+--me];me>0&&(pe*=256);)xe+=this[Y+--me]*pe;return pe*=128,xe>=pe&&(xe-=Math.pow(2,8*z)),xe},m.prototype.readInt8=function(Y,z){return z||U(Y,1,this.length),this[Y]&128?(255-this[Y]+1)*-1:this[Y]},m.prototype.readInt16LE=function(Y,z){z||U(Y,2,this.length);var $=this[Y]|this[Y+1]<<8;return $&32768?$|4294901760:$},m.prototype.readInt16BE=function(Y,z){z||U(Y,2,this.length);var $=this[Y+1]|this[Y]<<8;return $&32768?$|4294901760:$},m.prototype.readInt32LE=function(Y,z){return z||U(Y,4,this.length),this[Y]|this[Y+1]<<8|this[Y+2]<<16|this[Y+3]<<24},m.prototype.readInt32BE=function(Y,z){return z||U(Y,4,this.length),this[Y]<<24|this[Y+1]<<16|this[Y+2]<<8|this[Y+3]},m.prototype.readFloatLE=function(Y,z){return z||U(Y,4,this.length),L.read(this,Y,!0,23,4)},m.prototype.readFloatBE=function(Y,z){return z||U(Y,4,this.length),L.read(this,Y,!1,23,4)},m.prototype.readDoubleLE=function(Y,z){return z||U(Y,8,this.length),L.read(this,Y,!0,52,8)},m.prototype.readDoubleBE=function(Y,z){return z||U(Y,8,this.length),L.read(this,Y,!1,52,8)};function H(re,Y,z,$,me,pe){if(!m.isBuffer(re))throw new TypeError('"buffer" argument must be a Buffer instance');if(Y>me||Y<pe)throw new RangeError('"value" argument is out of bounds');if(z+$>re.length)throw new RangeError("Index out of range")}m.prototype.writeUIntLE=function(Y,z,$,me){if(Y=+Y,z=z|0,$=$|0,!me){var pe=Math.pow(2,8*$)-1;H(this,Y,z,$,pe,0)}var xe=1,Re=0;for(this[z]=Y&255;++Re<$&&(xe*=256);)this[z+Re]=Y/xe&255;return z+$},m.prototype.writeUIntBE=function(Y,z,$,me){if(Y=+Y,z=z|0,$=$|0,!me){var pe=Math.pow(2,8*$)-1;H(this,Y,z,$,pe,0)}var xe=$-1,Re=1;for(this[z+xe]=Y&255;--xe>=0&&(Re*=256);)this[z+xe]=Y/Re&255;return z+$},m.prototype.writeUInt8=function(Y,z,$){return Y=+Y,z=z|0,$||H(this,Y,z,1,255,0),m.TYPED_ARRAY_SUPPORT||(Y=Math.floor(Y)),this[z]=Y&255,z+1};function q(re,Y,z,$){Y<0&&(Y=65535+Y+1);for(var me=0,pe=Math.min(re.length-z,2);me<pe;++me)re[z+me]=(Y&255<<8*($?me:1-me))>>>($?me:1-me)*8}m.prototype.writeUInt16LE=function(Y,z,$){return Y=+Y,z=z|0,$||H(this,Y,z,2,65535,0),m.TYPED_ARRAY_SUPPORT?(this[z]=Y&255,this[z+1]=Y>>>8):q(this,Y,z,!0),z+2},m.prototype.writeUInt16BE=function(Y,z,$){return Y=+Y,z=z|0,$||H(this,Y,z,2,65535,0),m.TYPED_ARRAY_SUPPORT?(this[z]=Y>>>8,this[z+1]=Y&255):q(this,Y,z,!1),z+2};function ie(re,Y,z,$){Y<0&&(Y=4294967295+Y+1);for(var me=0,pe=Math.min(re.length-z,4);me<pe;++me)re[z+me]=Y>>>($?me:3-me)*8&255}m.prototype.writeUInt32LE=function(Y,z,$){return Y=+Y,z=z|0,$||H(this,Y,z,4,4294967295,0),m.TYPED_ARRAY_SUPPORT?(this[z+3]=Y>>>24,this[z+2]=Y>>>16,this[z+1]=Y>>>8,this[z]=Y&255):ie(this,Y,z,!0),z+4},m.prototype.writeUInt32BE=function(Y,z,$){return Y=+Y,z=z|0,$||H(this,Y,z,4,4294967295,0),m.TYPED_ARRAY_SUPPORT?(this[z]=Y>>>24,this[z+1]=Y>>>16,this[z+2]=Y>>>8,this[z+3]=Y&255):ie(this,Y,z,!1),z+4},m.prototype.writeIntLE=function(Y,z,$,me){if(Y=+Y,z=z|0,!me){var pe=Math.pow(2,8*$-1);H(this,Y,z,$,pe-1,-pe)}var xe=0,Re=1,ke=0;for(this[z]=Y&255;++xe<$&&(Re*=256);)Y<0&&ke===0&&this[z+xe-1]!==0&&(ke=1),this[z+xe]=(Y/Re>>0)-ke&255;return z+$},m.prototype.writeIntBE=function(Y,z,$,me){if(Y=+Y,z=z|0,!me){var pe=Math.pow(2,8*$-1);H(this,Y,z,$,pe-1,-pe)}var xe=$-1,Re=1,ke=0;for(this[z+xe]=Y&255;--xe>=0&&(Re*=256);)Y<0&&ke===0&&this[z+xe+1]!==0&&(ke=1),this[z+xe]=(Y/Re>>0)-ke&255;return z+$},m.prototype.writeInt8=function(Y,z,$){return Y=+Y,z=z|0,$||H(this,Y,z,1,127,-128),m.TYPED_ARRAY_SUPPORT||(Y=Math.floor(Y)),Y<0&&(Y=255+Y+1),this[z]=Y&255,z+1},m.prototype.writeInt16LE=function(Y,z,$){return Y=+Y,z=z|0,$||H(this,Y,z,2,32767,-32768),m.TYPED_ARRAY_SUPPORT?(this[z]=Y&255,this[z+1]=Y>>>8):q(this,Y,z,!0),z+2},m.prototype.writeInt16BE=function(Y,z,$){return Y=+Y,z=z|0,$||H(this,Y,z,2,32767,-32768),m.TYPED_ARRAY_SUPPORT?(this[z]=Y>>>8,this[z+1]=Y&255):q(this,Y,z,!1),z+2},m.prototype.writeInt32LE=function(Y,z,$){return Y=+Y,z=z|0,$||H(this,Y,z,4,2147483647,-2147483648),m.TYPED_ARRAY_SUPPORT?(this[z]=Y&255,this[z+1]=Y>>>8,this[z+2]=Y>>>16,this[z+3]=Y>>>24):ie(this,Y,z,!0),z+4},m.prototype.writeInt32BE=function(Y,z,$){return Y=+Y,z=z|0,$||H(this,Y,z,4,2147483647,-2147483648),Y<0&&(Y=4294967295+Y+1),m.TYPED_ARRAY_SUPPORT?(this[z]=Y>>>24,this[z+1]=Y>>>16,this[z+2]=Y>>>8,this[z+3]=Y&255):ie(this,Y,z,!1),z+4};function ce(re,Y,z,$,me,pe){if(z+$>re.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("Index out of range")}function he(re,Y,z,$,me){return me||ce(re,Y,z,4,34028234663852886e22,-34028234663852886e22),L.write(re,Y,z,$,23,4),z+4}m.prototype.writeFloatLE=function(Y,z,$){return he(this,Y,z,!0,$)},m.prototype.writeFloatBE=function(Y,z,$){return he(this,Y,z,!1,$)};function be(re,Y,z,$,me){return me||ce(re,Y,z,8,17976931348623157e292,-17976931348623157e292),L.write(re,Y,z,$,52,8),z+8}m.prototype.writeDoubleLE=function(Y,z,$){return be(this,Y,z,!0,$)},m.prototype.writeDoubleBE=function(Y,z,$){return be(this,Y,z,!1,$)},m.prototype.copy=function(Y,z,$,me){if($||($=0),!me&&me!==0&&(me=this.length),z>=Y.length&&(z=Y.length),z||(z=0),me>0&&me<$&&(me=$),me===$)return 0;if(Y.length===0||this.length===0)return 0;if(z<0)throw new RangeError("targetStart out of bounds");if($<0||$>=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),Y.length-z<me-$&&(me=Y.length-z+$);var pe=me-$,xe;if(this===Y&&$<z&&z<me)for(xe=pe-1;xe>=0;--xe)Y[xe+z]=this[xe+$];else if(pe<1e3||!m.TYPED_ARRAY_SUPPORT)for(xe=0;xe<pe;++xe)Y[xe+z]=this[xe+$];else Uint8Array.prototype.set.call(Y,this.subarray($,$+pe),z);return pe},m.prototype.fill=function(Y,z,$,me){if(typeof Y=="string"){if(typeof z=="string"?(me=z,z=0,$=this.length):typeof $=="string"&&(me=$,$=this.length),Y.length===1){var pe=Y.charCodeAt(0);pe<256&&(Y=pe)}if(me!==void 0&&typeof me!="string")throw new TypeError("encoding must be a string");if(typeof me=="string"&&!m.isEncoding(me))throw new TypeError("Unknown encoding: "+me)}else typeof Y=="number"&&(Y=Y&255);if(z<0||this.length<z||this.length<$)throw new RangeError("Out of range index");if($<=z)return this;z=z>>>0,$=$===void 0?this.length:$>>>0,Y||(Y=0);var xe;if(typeof Y=="number")for(xe=z;xe<$;++xe)this[xe]=Y;else{var Re=m.isBuffer(Y)?Y:oe(new m(Y,me).toString()),ke=Re.length;for(xe=0;xe<$-z;++xe)this[xe+z]=Re[xe%ke]}return this};var ne=/[^+\/0-9A-Za-z-_]/g;function le(re){if(re=ue(re).replace(ne,""),re.length<2)return"";for(;re.length%4!==0;)re=re+"=";return re}function ue(re){return re.trim?re.trim():re.replace(/^\s+|\s+$/g,"")}function te(re){return re<16?"0"+re.toString(16):re.toString(16)}function oe(re,Y){Y=Y||Infinity;for(var z,$=re.length,me=null,pe=[],xe=0;xe<$;++xe){if(z=re.charCodeAt(xe),z>55295&&z<57344){if(!me){if(z>56319){(Y-=3)>-1&&pe.push(239,191,189);continue}else if(xe+1===$){(Y-=3)>-1&&pe.push(239,191,189);continue}me=z;continue}if(z<56320){(Y-=3)>-1&&pe.push(239,191,189),me=z;continue}z=(me-55296<<10|z-56320)+65536}else me&&((Y-=3)>-1&&pe.push(239,191,189));if(me=null,z<128){if((Y-=1)<0)break;pe.push(z)}else if(z<2048){if((Y-=2)<0)break;pe.push(z>>6|192,z&63|128)}else if(z<65536){if((Y-=3)<0)break;pe.push(z>>12|224,z>>6&63|128,z&63|128)}else if(z<1114112){if((Y-=4)<0)break;pe.push(z>>18|240,z>>12&63|128,z>>6&63|128,z&63|128)}else throw new Error("Invalid code point")}return pe}function Q(re){for(var Y=[],z=0;z<re.length;++z)Y.push(re.charCodeAt(z)&255);return Y}function se(re,Y){for(var z,$,me,pe=[],xe=0;xe<re.length&&!((Y-=2)<0);++xe)z=re.charCodeAt(xe),$=z>>8,me=z%256,pe.push(me),pe.push($);return pe}function J(re){return T.toByteArray(le(re))}function ee(re,Y,z,$){for(var me=0;me<$&&!(me+z>=Y.length||me>=re.length);++me)Y[me+z]=re[me];return me}function ge(re){return re!==re}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},I("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(I,Z,N){Z.exports={"100":"Continue","101":"Switching Protocols","102":"Processing","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I'm a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}},{}],75:[function(I,Z,N){Z.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],76:[function(I,Z,N){/*!
|
|
|
* copy-to - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var P=Array.prototype.slice;Z.exports=m;function m(L,_){if(!(this instanceof m))return new m(L,_);this.src=L,this._withAccess=_}m.prototype.withAccess=function(L){return this._withAccess=L!==!1,this},m.prototype.pick=function(L){return Array.isArray(L)||(L=P.call(arguments)),L.length&&(this.keys=L),this},m.prototype.to=function(L){if(L=L||{},!this.src)return L;var _=this.keys||Object.keys(this.src);if(!this._withAccess){for(var g=0;g<_.length;g++){if(S=_[g],L[S]!==void 0)continue;L[S]=this.src[S]}return L}for(var g=0;g<_.length;g++){var S=_[g];if(!T(L,S))continue;var p=this.src.__lookupGetter__(S),o=this.src.__lookupSetter__(S);p&&L.__defineGetter__(S,p),o&&L.__defineSetter__(S,o),!p&&!o&&(L[S]=this.src[S])}return L},m.prototype.toCover=function(L){for(var _=this.keys||Object.keys(this.src),g=0;g<_.length;g++){var S=_[g];delete L[S];var p=this.src.__lookupGetter__(S),o=this.src.__lookupSetter__(S);p&&L.__defineGetter__(S,p),o&&L.__defineSetter__(S,o),!p&&!o&&(L[S]=this.src[S])}},m.prototype.override=m.prototype.toCover,m.prototype.and=function(L){var _={};return this.to(_),this.src=L,this.to(_),this.src=_,this};function T(L,_){return L[_]===void 0&&L.__lookupGetter__(_)===void 0&&L.__lookupSetter__(_)===void 0}},{}],77:[function(I,Z,N){I("../../modules/es6.string.iterator"),I("../../modules/es6.array.from"),Z.exports=I("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(I,Z,N){var P=I("../../modules/_core"),m=P.JSON||(P.JSON={stringify:JSON.stringify});Z.exports=function(L){return m.stringify.apply(m,arguments)}},{"../../modules/_core":99}],79:[function(I,Z,N){I("../../modules/es6.object.assign"),Z.exports=I("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(I,Z,N){I("../../modules/es6.object.create");var P=I("../../modules/_core").Object;Z.exports=function(T,L){return P.create(T,L)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(I,Z,N){I("../../modules/es6.object.define-property");var P=I("../../modules/_core").Object;Z.exports=function(T,L,_){return P.defineProperty(T,L,_)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(I,Z,N){I("../../modules/es7.object.entries"),Z.exports=I("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(I,Z,N){I("../../modules/es6.object.get-own-property-names");var P=I("../../modules/_core").Object;Z.exports=function(T){return P.getOwnPropertyNames(T)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(I,Z,N){I("../../modules/es6.object.get-prototype-of"),Z.exports=I("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(I,Z,N){I("../../modules/es6.object.keys"),Z.exports=I("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(I,Z,N){I("../modules/es6.object.to-string"),I("../modules/es6.string.iterator"),I("../modules/web.dom.iterable"),I("../modules/es6.promise"),I("../modules/es7.promise.finally"),I("../modules/es7.promise.try"),Z.exports=I("../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(I,Z,N){I("../modules/web.immediate"),Z.exports=I("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(I,Z,N){I("../../modules/es6.string.from-code-point"),Z.exports=I("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(I,Z,N){I("../../modules/es6.function.has-instance"),Z.exports=I("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(I,Z,N){I("../../modules/es6.symbol"),I("../../modules/es6.object.to-string"),I("../../modules/es7.symbol.async-iterator"),I("../../modules/es7.symbol.observable"),Z.exports=I("../../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(I,Z,N){I("../../modules/es6.string.iterator"),I("../../modules/web.dom.iterable"),Z.exports=I("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(I,Z,N){Z.exports=function(P){if(typeof P!="function")throw TypeError(P+" is not a function!");return P}},{}],93:[function(I,Z,N){Z.exports=function(){}},{}],94:[function(I,Z,N){Z.exports=function(P,m,T,L){if(!(P instanceof m)||L!==void 0&&L in P)throw TypeError(T+": incorrect invocation!");return P}},{}],95:[function(I,Z,N){var P=I("./_is-object");Z.exports=function(m){if(!P(m))throw TypeError(m+" is not an object!");return m}},{"./_is-object":119}],96:[function(I,Z,N){var P=I("./_to-iobject"),m=I("./_to-length"),T=I("./_to-absolute-index");Z.exports=function(L){return function(_,g,S){var p=P(_),o=m(p.length),i=T(S,o),r;if(L&&g!=g){for(;o>i;)if(r=p[i++],r!=r)return!0}else for(;o>i;i++)if((L||i in p)&&p[i]===g)return L||i||0;return!L&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(I,Z,N){var P=I("./_cof"),m=I("./_wks")("toStringTag"),T=P(function(){return arguments}())=="Arguments",L=function(_,g){try{return _[g]}catch(S){}};Z.exports=function(_){var g,S,p;return _===void 0?"Undefined":_===null?"Null":typeof(S=L(g=Object(_),m))=="string"?S:T?P(g):(p=P(g))=="Object"&&typeof g.callee=="function"?"Arguments":p}},{"./_cof":98,"./_wks":166}],98:[function(I,Z,N){var P={}.toString;Z.exports=function(m){return P.call(m).slice(8,-1)}},{}],99:[function(I,Z,N){var P=Z.exports={version:"2.6.11"};typeof __e=="number"&&(__e=P)},{}],100:[function(I,Z,N){"use strict";var P=I("./_object-dp"),m=I("./_property-desc");Z.exports=function(T,L,_){L in T?P.f(T,L,m(0,_)):T[L]=_}},{"./_object-dp":132,"./_property-desc":146}],101:[function(I,Z,N){var P=I("./_a-function");Z.exports=function(m,T,L){if(P(m),T===void 0)return m;switch(L){case 1:return function(_){return m.call(T,_)};case 2:return function(_,g){return m.call(T,_,g)};case 3:return function(_,g,S){return m.call(T,_,g,S)}}return function(){return m.apply(T,arguments)}}},{"./_a-function":92}],102:[function(I,Z,N){Z.exports=function(P){if(P==null)throw TypeError("Can't call method on "+P);return P}},{}],103:[function(I,Z,N){Z.exports=!I("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(I,Z,N){var P=I("./_is-object"),m=I("./_global").document,T=P(m)&&P(m.createElement);Z.exports=function(L){return T?m.createElement(L):{}}},{"./_global":110,"./_is-object":119}],105:[function(I,Z,N){Z.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(I,Z,N){var P=I("./_object-keys"),m=I("./_object-gops"),T=I("./_object-pie");Z.exports=function(L){var _=P(L),g=m.f;if(g)for(var S=g(L),p=T.f,o=0,i;S.length>o;)p.call(L,i=S[o++])&&_.push(i);return _}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(I,Z,N){var P=I("./_global"),m=I("./_core"),T=I("./_ctx"),L=I("./_hide"),_=I("./_has"),g="prototype",S=function(p,o,i){var r=p&S.F,d=p&S.G,f=p&S.S,h=p&S.P,E=p&S.B,y=p&S.W,l=d?m:m[o]||(m[o]={}),n=l[g],s=d?P:f?P[o]:(P[o]||{})[g],u,w,v;d&&(i=o);for(u in i){if(w=!r&&s&&s[u]!==void 0,w&&_(l,u))continue;v=w?s[u]:i[u],l[u]=d&&typeof s[u]!="function"?i[u]:E&&w?T(v,P):y&&s[u]==v?function(a){var R=function(D,c,b){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(D);case 2:return new a(D,c)}return new a(D,c,b)}return a.apply(this,arguments)};return R[g]=a[g],R}(v):h&&typeof v=="function"?T(Function.call,v):v,h&&((l.virtual||(l.virtual={}))[u]=v,p&S.R&&n&&!n[u]&&L(n,u,v))}};S.F=1,S.G=2,S.S=4,S.P=8,S.B=16,S.W=32,S.U=64,S.R=128,Z.exports=S},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(I,Z,N){Z.exports=function(P){try{return!!P()}catch(m){return!0}}},{}],109:[function(I,Z,N){var P=I("./_ctx"),m=I("./_iter-call"),T=I("./_is-array-iter"),L=I("./_an-object"),_=I("./_to-length"),g=I("./core.get-iterator-method"),S={},p={},N=Z.exports=function(o,i,r,d,f){var h=f?function(){return o}:g(o),E=P(r,d,i?2:1),y=0,l,n,s,u;if(typeof h!="function")throw TypeError(o+" is not iterable!");if(T(h)){for(l=_(o.length);l>y;y++)if(u=i?E(L(n=o[y])[0],n[1]):E(o[y]),u===S||u===p)return u}else for(s=h.call(o);!(n=s.next()).done;)if(u=m(s,E,n.value,i),u===S||u===p)return u};N.BREAK=S,N.RETURN=p},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(I,Z,N){var P=Z.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=P)},{}],111:[function(I,Z,N){var P={}.hasOwnProperty;Z.exports=function(m,T){return P.call(m,T)}},{}],112:[function(I,Z,N){var P=I("./_object-dp"),m=I("./_property-desc");Z.exports=I("./_descriptors")?function(T,L,_){return P.f(T,L,m(1,_))}:function(T,L,_){return T[L]=_,T}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(I,Z,N){var P=I("./_global").document;Z.exports=P&&P.documentElement},{"./_global":110}],114:[function(I,Z,N){Z.exports=!I("./_descriptors")&&!I("./_fails")(function(){return Object.defineProperty(I("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(I,Z,N){Z.exports=function(P,m,T){var L=T===void 0;switch(m.length){case 0:return L?P():P.call(T);case 1:return L?P(m[0]):P.call(T,m[0]);case 2:return L?P(m[0],m[1]):P.call(T,m[0],m[1]);case 3:return L?P(m[0],m[1],m[2]):P.call(T,m[0],m[1],m[2]);case 4:return L?P(m[0],m[1],m[2],m[3]):P.call(T,m[0],m[1],m[2],m[3])}return P.apply(T,m)}},{}],116:[function(I,Z,N){var P=I("./_cof");Z.exports=Object("z").propertyIsEnumerable(0)?Object:function(m){return P(m)=="String"?m.split(""):Object(m)}},{"./_cof":98}],117:[function(I,Z,N){var P=I("./_iterators"),m=I("./_wks")("iterator"),T=Array.prototype;Z.exports=function(L){return L!==void 0&&(P.Array===L||T[m]===L)}},{"./_iterators":125,"./_wks":166}],118:[function(I,Z,N){var P=I("./_cof");Z.exports=Array.isArray||function(T){return P(T)=="Array"}},{"./_cof":98}],119:[function(I,Z,N){Z.exports=function(P){return typeof P=="object"?P!==null:typeof P=="function"}},{}],120:[function(I,Z,N){var P=I("./_an-object");Z.exports=function(m,T,L,_){try{return _?T(P(L)[0],L[1]):T(L)}catch(S){var g=m.return;throw g!==void 0&&P(g.call(m)),S}}},{"./_an-object":95}],121:[function(I,Z,N){"use strict";var P=I("./_object-create"),m=I("./_property-desc"),T=I("./_set-to-string-tag"),L={};I("./_hide")(L,I("./_wks")("iterator"),function(){return this}),Z.exports=function(_,g,S){_.prototype=P(L,{next:m(1,S)}),T(_,g+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(I,Z,N){"use strict";var P=I("./_library"),m=I("./_export"),T=I("./_redefine"),L=I("./_hide"),_=I("./_iterators"),g=I("./_iter-create"),S=I("./_set-to-string-tag"),p=I("./_object-gpo"),o=I("./_wks")("iterator"),i=!([].keys&&"next"in[].keys()),r="@@iterator",d="keys",f="values",h=function(){return this};Z.exports=function(E,y,l,n,s,u,w){g(l,y,n);var v=function(G){if(!i&&G in c)return c[G];switch(G){case d:return function(){return new l(this,G)};case f:return function(){return new l(this,G)}}return function(){return new l(this,G)}},a=y+" Iterator",R=s==f,D=!1,c=E.prototype,b=c[o]||c[r]||s&&c[s],x=b||v(s),C=s?R?v("entries"):x:void 0,F=y=="Array"&&c.entries||b,j,k,X;if(F&&(X=p(F.call(new E)),X!==Object.prototype&&X.next&&(S(X,a,!0),!P&&typeof X[o]!="function"&&L(X,o,h))),R&&b&&b.name!==f&&(D=!0,x=function(){return b.call(this)}),(!P||w)&&(i||D||!c[o])&&L(c,o,x),_[y]=x,_[a]=h,s)if(j={values:R?x:v(f),keys:u?x:v(d),entries:C},w)for(k in j)k in c||T(c,k,j[k]);else m(m.P+m.F*(i||D),y,j);return j}},{"./_export":107,"./_hide":112,"./_iter-create":121,"./_iterators":125,"./_library":126,"./_object-gpo":138,"./_redefine":148,"./_set-to-string-tag":150,"./_wks":166}],123:[function(I,Z,N){var P=I("./_wks")("iterator"),m=!1;try{var T=[7][P]();T.return=function(){m=!0},Array.from(T,function(){throw 2})}catch(L){}Z.exports=function(L,_){if(!_&&!m)return!1;var g=!1;try{var S=[7],p=S[P]();p.next=function(){return{done:g=!0}},S[P]=function(){return p},L(S)}catch(o){}return g}},{"./_wks":166}],124:[function(I,Z,N){Z.exports=function(P,m){return{value:m,done:!!P}}},{}],125:[function(I,Z,N){Z.exports={}},{}],126:[function(I,Z,N){Z.exports=!0},{}],127:[function(I,Z,N){var P=I("./_uid")("meta"),m=I("./_is-object"),T=I("./_has"),L=I("./_object-dp").f,_=0,g=Object.isExtensible||function(){return!0},S=!I("./_fails")(function(){return g(Object.preventExtensions({}))}),p=function(f){L(f,P,{value:{i:"O"+ ++_,w:{}}})},o=function(f,h){if(!m(f))return typeof f=="symbol"?f:(typeof f=="string"?"S":"P")+f;if(!T(f,P)){if(!g(f))return"F";if(!h)return"E";p(f)}return f[P].i},i=function(f,h){if(!T(f,P)){if(!g(f))return!0;if(!h)return!1;p(f)}return f[P].w},r=function(f){return S&&d.NEED&&g(f)&&!T(f,P)&&p(f),f},d=Z.exports={KEY:P,NEED:!1,fastKey:o,getWeak:i,onFreeze:r}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(I,Z,N){var P=I("./_global"),m=I("./_task").set,T=P.MutationObserver||P.WebKitMutationObserver,L=P.process,_=P.Promise,g=I("./_cof")(L)=="process";Z.exports=function(){var S,p,o,i=function(){var h,E;for(g&&(h=L.domain)&&h.exit();S;){E=S.fn,S=S.next;try{E()}catch(y){throw S?o():p=void 0,y}}p=void 0,h&&h.enter()};if(g)o=function(){L.nextTick(i)};else if(T&&!(P.navigator&&P.navigator.standalone)){var r=!0,d=document.createTextNode("");new T(i).observe(d,{characterData:!0}),o=function(){d.data=r=!r}}else if(_&&_.resolve){var f=_.resolve(void 0);o=function(){f.then(i)}}else o=function(){m.call(P,i)};return function(h){var E={fn:h,next:void 0};p&&(p.next=E),S||(S=E,o()),p=E}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(I,Z,N){"use strict";var P=I("./_a-function");function m(T){var L,_;this.promise=new T(function(g,S){if(L!==void 0||_!==void 0)throw TypeError("Bad Promise constructor");L=g,_=S}),this.resolve=P(L),this.reject=P(_)}Z.exports.f=function(T){return new m(T)}},{"./_a-function":92}],130:[function(I,Z,N){"use strict";var P=I("./_descriptors"),m=I("./_object-keys"),T=I("./_object-gops"),L=I("./_object-pie"),_=I("./_to-object"),g=I("./_iobject"),S=Object.assign;Z.exports=!S||I("./_fails")(function(){var p={},o={},i=Symbol(),r="abcdefghijklmnopqrst";return p[i]=7,r.split("").forEach(function(d){o[d]=d}),S({},p)[i]!=7||Object.keys(S({},o)).join("")!=r})?function(o,i){for(var r=_(o),d=arguments.length,f=1,h=T.f,E=L.f;d>f;)for(var y=g(arguments[f++]),l=h?m(y).concat(h(y)):m(y),n=l.length,s=0,u;n>s;)u=l[s++],(!P||E.call(y,u))&&(r[u]=y[u]);return r}:S},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(I,Z,N){var P=I("./_an-object"),m=I("./_object-dps"),T=I("./_enum-bug-keys"),L=I("./_shared-key")("IE_PROTO"),_=function(){},g="prototype",S=function(){var p=I("./_dom-create")("iframe"),o=T.length,i="<",r=">",d;for(p.style.display="none",I("./_html").appendChild(p),p.src="javascript:",d=p.contentWindow.document,d.open(),d.write(i+"script"+r+"document.F=Object"+i+"/script"+r),d.close(),S=d.F;o--;)delete S[g][T[o]];return S()};Z.exports=Object.create||function(o,i){var r;return o!==null?(_[g]=P(o),r=new _,_[g]=null,r[L]=o):r=S(),i===void 0?r:m(r,i)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(I,Z,N){var P=I("./_an-object"),m=I("./_ie8-dom-define"),T=I("./_to-primitive"),L=Object.defineProperty;N.f=I("./_descriptors")?Object.defineProperty:function(g,S,p){if(P(g),S=T(S,!0),P(p),m)try{return L(g,S,p)}catch(o){}if("get"in p||"set"in p)throw TypeError("Accessors not supported!");return"value"in p&&(g[S]=p.value),g}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(I,Z,N){var P=I("./_object-dp"),m=I("./_an-object"),T=I("./_object-keys");Z.exports=I("./_descriptors")?Object.defineProperties:function(_,g){m(_);for(var S=T(g),p=S.length,o=0,i;p>o;)P.f(_,i=S[o++],g[i]);return _}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(I,Z,N){var P=I("./_object-pie"),m=I("./_property-desc"),T=I("./_to-iobject"),L=I("./_to-primitive"),_=I("./_has"),g=I("./_ie8-dom-define"),S=Object.getOwnPropertyDescriptor;N.f=I("./_descriptors")?S:function(o,i){if(o=T(o),i=L(i,!0),g)try{return S(o,i)}catch(r){}if(_(o,i))return m(!P.f.call(o,i),o[i])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(I,Z,N){var P=I("./_to-iobject"),m=I("./_object-gopn").f,T={}.toString,L=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],_=function(g){try{return m(g)}catch(S){return L.slice()}};Z.exports.f=function(S){return L&&T.call(S)=="[object Window]"?_(S):m(P(S))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(I,Z,N){var P=I("./_object-keys-internal"),m=I("./_enum-bug-keys").concat("length","prototype");N.f=Object.getOwnPropertyNames||function(L){return P(L,m)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(I,Z,N){N.f=Object.getOwnPropertySymbols},{}],138:[function(I,Z,N){var P=I("./_has"),m=I("./_to-object"),T=I("./_shared-key")("IE_PROTO"),L=Object.prototype;Z.exports=Object.getPrototypeOf||function(_){return _=m(_),P(_,T)?_[T]:typeof _.constructor=="function"&&_ instanceof _.constructor?_.constructor.prototype:_ instanceof Object?L:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(I,Z,N){var P=I("./_has"),m=I("./_to-iobject"),T=I("./_array-includes")(!1),L=I("./_shared-key")("IE_PROTO");Z.exports=function(_,g){var S=m(_),p=0,o=[],i;for(i in S)i!=L&&(P(S,i)&&o.push(i));for(;g.length>p;)P(S,i=g[p++])&&(~T(o,i)||o.push(i));return o}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(I,Z,N){var P=I("./_object-keys-internal"),m=I("./_enum-bug-keys");Z.exports=Object.keys||function(L){return P(L,m)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(I,Z,N){N.f={}.propertyIsEnumerable},{}],142:[function(I,Z,N){var P=I("./_export"),m=I("./_core"),T=I("./_fails");Z.exports=function(L,_){var g=(m.Object||{})[L]||Object[L],S={};S[L]=_(g),P(P.S+P.F*T(function(){g(1)}),"Object",S)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(I,Z,N){var P=I("./_descriptors"),m=I("./_object-keys"),T=I("./_to-iobject"),L=I("./_object-pie").f;Z.exports=function(_){return function(g){for(var S=T(g),p=m(S),o=p.length,i=0,r=[],d;o>i;)d=p[i++],(!P||L.call(S,d))&&r.push(_?[d,S[d]]:S[d]);return r}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(I,Z,N){Z.exports=function(P){try{return{e:!1,v:P()}}catch(m){return{e:!0,v:m}}}},{}],145:[function(I,Z,N){var P=I("./_an-object"),m=I("./_is-object"),T=I("./_new-promise-capability");Z.exports=function(L,_){if(P(L),m(_)&&_.constructor===L)return _;var g=T.f(L),S=g.resolve;return S(_),g.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(I,Z,N){Z.exports=function(P,m){return{enumerable:!(P&1),configurable:!(P&2),writable:!(P&4),value:m}}},{}],147:[function(I,Z,N){var P=I("./_hide");Z.exports=function(m,T,L){for(var _ in T)L&&m[_]?m[_]=T[_]:P(m,_,T[_]);return m}},{"./_hide":112}],148:[function(I,Z,N){Z.exports=I("./_hide")},{"./_hide":112}],149:[function(I,Z,N){"use strict";var P=I("./_global"),m=I("./_core"),T=I("./_object-dp"),L=I("./_descriptors"),_=I("./_wks")("species");Z.exports=function(g){var S=typeof m[g]=="function"?m[g]:P[g];L&&S&&!S[_]&&T.f(S,_,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(I,Z,N){var P=I("./_object-dp").f,m=I("./_has"),T=I("./_wks")("toStringTag");Z.exports=function(L,_,g){L&&!m(L=g?L:L.prototype,T)&&P(L,T,{configurable:!0,value:_})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(I,Z,N){var P=I("./_shared")("keys"),m=I("./_uid");Z.exports=function(T){return P[T]||(P[T]=m(T))}},{"./_shared":152,"./_uid":162}],152:[function(I,Z,N){var P=I("./_core"),m=I("./_global"),T="__core-js_shared__",L=m[T]||(m[T]={});(Z.exports=function(_,g){return L[_]||(L[_]=g!==void 0?g:{})})("versions",[]).push({version:P.version,mode:I("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(I,Z,N){var P=I("./_an-object"),m=I("./_a-function"),T=I("./_wks")("species");Z.exports=function(L,_){var g=P(L).constructor,S;return g===void 0||(S=P(g)[T])==null?_:m(S)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(I,Z,N){var P=I("./_to-integer"),m=I("./_defined");Z.exports=function(T){return function(L,_){var g=String(m(L)),S=P(_),p=g.length,o,i;return S<0||S>=p?T?"":void 0:(o=g.charCodeAt(S),o<55296||o>56319||S+1===p||(i=g.charCodeAt(S+1))<56320||i>57343?T?g.charAt(S):o:T?g.slice(S,S+2):(o-55296<<10)+(i-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(I,Z,N){var P=I("./_ctx"),m=I("./_invoke"),T=I("./_html"),L=I("./_dom-create"),_=I("./_global"),g=_.process,S=_.setImmediate,p=_.clearImmediate,o=_.MessageChannel,i=_.Dispatch,r=0,d={},f="onreadystatechange",h,E,y,l=function(){var s=+this;if(d.hasOwnProperty(s)){var u=d[s];delete d[s],u()}},n=function(s){l.call(s.data)};(!S||!p)&&(S=function(u){for(var w=[],v=1;arguments.length>v;)w.push(arguments[v++]);return d[++r]=function(){m(typeof u=="function"?u:Function(u),w)},h(r),r},p=function(u){delete d[u]},I("./_cof")(g)=="process"?h=function(s){g.nextTick(P(l,s,1))}:i&&i.now?h=function(s){i.now(P(l,s,1))}:o?(E=new o,y=E.port2,E.port1.onmessage=n,h=P(y.postMessage,y,1)):_.addEventListener&&typeof postMessage=="function"&&!_.importScripts?(h=function(s){_.postMessage(s+"","*")},_.addEventListener("message",n,!1)):f in L("script")?h=function(s){T.appendChild(L("script"))[f]=function(){T.removeChild(this),l.call(s)}}:h=function(s){setTimeout(P(l,s,1),0)}),Z.exports={set:S,clear:p}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(I,Z,N){var P=I("./_to-integer"),m=Math.max,T=Math.min;Z.exports=function(L,_){return L=P(L),L<0?m(L+_,0):T(L,_)}},{"./_to-integer":157}],157:[function(I,Z,N){var P=Math.ceil,m=Math.floor;Z.exports=function(T){return isNaN(T=+T)?0:(T>0?m:P)(T)}},{}],158:[function(I,Z,N){var P=I("./_iobject"),m=I("./_defined");Z.exports=function(T){return P(m(T))}},{"./_defined":102,"./_iobject":116}],159:[function(I,Z,N){var P=I("./_to-integer"),m=Math.min;Z.exports=function(T){return T>0?m(P(T),9007199254740991):0}},{"./_to-integer":157}],160:[function(I,Z,N){var P=I("./_defined");Z.exports=function(m){return Object(P(m))}},{"./_defined":102}],161:[function(I,Z,N){var P=I("./_is-object");Z.exports=function(m,T){if(!P(m))return m;var L,_;if(T&&typeof(L=m.toString)=="function"&&!P(_=L.call(m)))return _;if(typeof(L=m.valueOf)=="function"&&!P(_=L.call(m)))return _;if(!T&&typeof(L=m.toString)=="function"&&!P(_=L.call(m)))return _;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(I,Z,N){var P=0,m=Math.random();Z.exports=function(T){return"Symbol(".concat(T===void 0?"":T,")_",(++P+m).toString(36))}},{}],163:[function(I,Z,N){var P=I("./_global"),m=P.navigator;Z.exports=m&&m.userAgent||""},{"./_global":110}],164:[function(I,Z,N){var P=I("./_global"),m=I("./_core"),T=I("./_library"),L=I("./_wks-ext"),_=I("./_object-dp").f;Z.exports=function(g){var S=m.Symbol||(m.Symbol=T?{}:P.Symbol||{});g.charAt(0)!="_"&&!(g in S)&&_(S,g,{value:L.f(g)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(I,Z,N){N.f=I("./_wks")},{"./_wks":166}],166:[function(I,Z,N){var P=I("./_shared")("wks"),m=I("./_uid"),T=I("./_global").Symbol,L=typeof T=="function",_=Z.exports=function(g){return P[g]||(P[g]=L&&T[g]||(L?T:m)("Symbol."+g))};_.store=P},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(I,Z,N){var P=I("./_classof"),m=I("./_wks")("iterator"),T=I("./_iterators");Z.exports=I("./_core").getIteratorMethod=function(L){if(L!=null)return L[m]||L["@@iterator"]||T[P(L)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(I,Z,N){"use strict";var P=I("./_ctx"),m=I("./_export"),T=I("./_to-object"),L=I("./_iter-call"),_=I("./_is-array-iter"),g=I("./_to-length"),S=I("./_create-property"),p=I("./core.get-iterator-method");m(m.S+m.F*!I("./_iter-detect")(function(o){Array.from(o)}),"Array",{from:function(i){var r=T(i),d=typeof this=="function"?this:Array,f=arguments.length,h=f>1?arguments[1]:void 0,E=h!==void 0,y=0,l=p(r),n,s,u,w;if(E&&(h=P(h,f>2?arguments[2]:void 0,2)),l!=null&&!(d==Array&&_(l)))for(w=l.call(r),s=new d;!(u=w.next()).done;y++)S(s,y,E?L(w,h,[u.value,y],!0):u.value);else for(n=g(r.length),s=new d(n);n>y;y++)S(s,y,E?h(r[y],y):r[y]);return s.length=y,s}})},{"./_create-property":100,"./_ctx":101,"./_export":107,"./_is-array-iter":117,"./_iter-call":120,"./_iter-detect":123,"./_to-length":159,"./_to-object":160,"./core.get-iterator-method":167}],169:[function(I,Z,N){"use strict";var P=I("./_add-to-unscopables"),m=I("./_iter-step"),T=I("./_iterators"),L=I("./_to-iobject");Z.exports=I("./_iter-define")(Array,"Array",function(_,g){this._t=L(_),this._i=0,this._k=g},function(){var _=this._t,g=this._k,S=this._i++;return!_||S>=_.length?(this._t=void 0,m(1)):g=="keys"?m(0,S):g=="values"?m(0,_[S]):m(0,[S,_[S]])},"values"),T.Arguments=T.Array,P("keys"),P("values"),P("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(I,Z,N){"use strict";var P=I("./_is-object"),m=I("./_object-gpo"),T=I("./_wks")("hasInstance"),L=Function.prototype;T in L||I("./_object-dp").f(L,T,{value:function(_){if(typeof this!="function"||!P(_))return!1;if(!P(this.prototype))return _ instanceof this;for(;_=m(_);)if(this.prototype===_)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(I,Z,N){var P=I("./_export");P(P.S+P.F,"Object",{assign:I("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(I,Z,N){var P=I("./_export");P(P.S,"Object",{create:I("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(I,Z,N){var P=I("./_export");P(P.S+P.F*!I("./_descriptors"),"Object",{defineProperty:I("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(I,Z,N){I("./_object-sap")("getOwnPropertyNames",function(){return I("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(I,Z,N){var P=I("./_to-object"),m=I("./_object-gpo");I("./_object-sap")("getPrototypeOf",function(){return function(L){return m(P(L))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(I,Z,N){var P=I("./_to-object"),m=I("./_object-keys");I("./_object-sap")("keys",function(){return function(L){return m(P(L))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(I,Z,N){arguments[4][71][0].apply(N,arguments)},{dup:71}],178:[function(I,Z,N){"use strict";var P=I("./_library"),m=I("./_global"),T=I("./_ctx"),L=I("./_classof"),_=I("./_export"),g=I("./_is-object"),S=I("./_a-function"),p=I("./_an-instance"),o=I("./_for-of"),i=I("./_species-constructor"),r=I("./_task").set,d=I("./_microtask")(),f=I("./_new-promise-capability"),h=I("./_perform"),E=I("./_user-agent"),y=I("./_promise-resolve"),l="Promise",n=m.TypeError,s=m.process,u=s&&s.versions,w=u&&u.v8||"",v=m[l],a=L(s)=="process",R=function(){},D,c,b,x,C=c=f.f,F=!!function(){try{var U=v.resolve(1),H=(U.constructor={})[I("./_wks")("species")]=function(q){q(R,R)};return(a||typeof PromiseRejectionEvent=="function")&&U.then(R)instanceof H&&w.indexOf("6.6")!==0&&E.indexOf("Chrome/66")===-1}catch(q){}}(),j=function(U){var H;return g(U)&&typeof(H=U.then)=="function"?H:!1},k=function(U,H){if(U._n)return;U._n=!0;var q=U._c;d(function(){for(var ie=U._v,ce=U._s==1,he=0,be=function(ne){var le=ce?ne.ok:ne.fail,ue=ne.resolve,te=ne.reject,oe=ne.domain,Q,se,J;try{le?(ce||(U._h==2&&W(U),U._h=1),le===!0?Q=ie:(oe&&oe.enter(),Q=le(ie),oe&&(oe.exit(),J=!0)),Q===ne.promise?te(n("Promise-chain cycle")):(se=j(Q))?se.call(Q,ue,te):ue(Q)):te(ie)}catch(ee){oe&&!J&&oe.exit(),te(ee)}};q.length>he;)be(q[he++]);U._c=[],U._n=!1,H&&!U._h&&X(U)})},X=function(U){r.call(m,function(){var H=U._v,q=G(U),ie,ce,he;if(q&&(ie=h(function(){a?s.emit("unhandledRejection",H,U):(ce=m.onunhandledrejection)?ce({promise:U,reason:H}):(he=m.console)&&he.error&&he.error("Unhandled promise rejection",H)}),U._h=a||G(U)?2:1),U._a=void 0,q&&ie.e)throw ie.v})},G=function(U){return U._h!==1&&(U._a||U._c).length===0},W=function(U){r.call(m,function(){var H;a?s.emit("rejectionHandled",U):(H=m.onrejectionhandled)&&H({promise:U,reason:U._v})})},K=function(U){var H=this;if(H._d)return;H._d=!0,H=H._w||H,H._v=U,H._s=2,H._a||(H._a=H._c.slice()),k(H,!0)},B=function(U){var H=this,q;if(H._d)return;H._d=!0,H=H._w||H;try{if(H===U)throw n("Promise can't be resolved itself");(q=j(U))?d(function(){var ie={_w:H,_d:!1};try{q.call(U,T(B,ie,1),T(K,ie,1))}catch(ce){K.call(ie,ce)}}):(H._v=U,H._s=1,k(H,!1))}catch(ie){K.call({_w:H,_d:!1},ie)}};F||(v=function(H){p(this,v,l,"_h"),S(H),D.call(this);try{H(T(B,this,1),T(K,this,1))}catch(q){K.call(this,q)}},D=function(H){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},D.prototype=I("./_redefine-all")(v.prototype,{then:function(H,q){var ie=C(i(this,v));return ie.ok=typeof H=="function"?H:!0,ie.fail=typeof q=="function"&&q,ie.domain=a?s.domain:void 0,this._c.push(ie),this._a&&this._a.push(ie),this._s&&k(this,!1),ie.promise},catch:function(U){return this.then(void 0,U)}}),b=function(){var U=new D;this.promise=U,this.resolve=T(B,U,1),this.reject=T(K,U,1)},f.f=C=function(U){return U===v||U===x?new b(U):c(U)}),_(_.G+_.W+_.F*!F,{Promise:v}),I("./_set-to-string-tag")(v,l),I("./_set-species")(l),x=I("./_core")[l],_(_.S+_.F*!F,l,{reject:function(H){var q=C(this),ie=q.reject;return ie(H),q.promise}}),_(_.S+_.F*(P||!F),l,{resolve:function(H){return y(P&&this===x?v:this,H)}}),_(_.S+_.F*!(F&&I("./_iter-detect")(function(U){v.all(U).catch(R)})),l,{all:function(H){var q=this,ie=C(q),ce=ie.resolve,he=ie.reject,be=h(function(){var ne=[],le=0,ue=1;o(H,!1,function(te){var oe=le++,Q=!1;ne.push(void 0),ue++,q.resolve(te).then(function(se){if(Q)return;Q=!0,ne[oe]=se,--ue||ce(ne)},he)}),--ue||ce(ne)});return be.e&&he(be.v),ie.promise},race:function(H){var q=this,ie=C(q),ce=ie.reject,he=h(function(){o(H,!1,function(be){q.resolve(be).then(ie.resolve,ce)})});return he.e&&ce(he.v),ie.promise}})},{"./_a-function":92,"./_an-instance":94,"./_classof":97,"./_core":99,"./_ctx":101,"./_export":107,"./_for-of":109,"./_global":110,"./_is-object":119,"./_iter-detect":123,"./_library":126,"./_microtask":128,"./_new-promise-capability":129,"./_perform":144,"./_promise-resolve":145,"./_redefine-all":147,"./_set-species":149,"./_set-to-string-tag":150,"./_species-constructor":153,"./_task":155,"./_user-agent":163,"./_wks":166}],179:[function(I,Z,N){var P=I("./_export"),m=I("./_to-absolute-index"),T=String.fromCharCode,L=String.fromCodePoint;P(P.S+P.F*(!!L&&L.length!=1),"String",{fromCodePoint:function(g){for(var S=[],p=arguments.length,o=0,i;p>o;){if(i=+arguments[o++],m(i,1114111)!==i)throw RangeError(i+" is not a valid code point");S.push(i<65536?T(i):T(((i-=65536)>>10)+55296,i%1024+56320))}return S.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(I,Z,N){"use strict";var P=I("./_string-at")(!0);I("./_iter-define")(String,"String",function(m){this._t=String(m),this._i=0},function(){var m=this._t,T=this._i,L;return T>=m.length?{value:void 0,done:!0}:(L=P(m,T),this._i+=L.length,{value:L,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(I,Z,N){"use strict";var P=I("./_global"),m=I("./_has"),T=I("./_descriptors"),L=I("./_export"),_=I("./_redefine"),g=I("./_meta").KEY,S=I("./_fails"),p=I("./_shared"),o=I("./_set-to-string-tag"),i=I("./_uid"),r=I("./_wks"),d=I("./_wks-ext"),f=I("./_wks-define"),h=I("./_enum-keys"),E=I("./_is-array"),y=I("./_an-object"),l=I("./_is-object"),n=I("./_to-object"),s=I("./_to-iobject"),u=I("./_to-primitive"),w=I("./_property-desc"),v=I("./_object-create"),a=I("./_object-gopn-ext"),R=I("./_object-gopd"),D=I("./_object-gops"),c=I("./_object-dp"),b=I("./_object-keys"),x=R.f,C=c.f,F=a.f,j=P.Symbol,k=P.JSON,X=k&&k.stringify,G="prototype",W=r("_hidden"),K=r("toPrimitive"),B={}.propertyIsEnumerable,U=p("symbol-registry"),H=p("symbols"),q=p("op-symbols"),ie=Object[G],ce=typeof j=="function"&&!!D.f,he=P.QObject,be=!he||!he[G]||!he[G].findChild,ne=T&&S(function(){return v(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a!=7})?function(pe,xe,Re){var ke=x(ie,xe);ke&&delete ie[xe],C(pe,xe,Re),ke&&pe!==ie&&C(ie,xe,ke)}:C,le=function(pe){var xe=H[pe]=v(j[G]);return xe._k=pe,xe},ue=ce&&typeof j.iterator=="symbol"?function(pe){return typeof pe=="symbol"}:function(pe){return pe instanceof j},te=function(xe,Re,ke){return xe===ie&&te(q,Re,ke),y(xe),Re=u(Re,!0),y(ke),m(H,Re)?(ke.enumerable?(m(xe,W)&&xe[W][Re]&&(xe[W][Re]=!1),ke=v(ke,{enumerable:w(0,!1)})):(m(xe,W)||C(xe,W,w(1,{})),xe[W][Re]=!0),ne(xe,Re,ke)):C(xe,Re,ke)},oe=function(xe,Re){y(xe);for(var ke=h(Re=s(Re)),Ne=0,Pe=ke.length,je;Pe>Ne;)te(xe,je=ke[Ne++],Re[je]);return xe},Q=function(xe,Re){return Re===void 0?v(xe):oe(v(xe),Re)},se=function(xe){var Re=B.call(this,xe=u(xe,!0));return this===ie&&m(H,xe)&&!m(q,xe)?!1:Re||!m(this,xe)||!m(H,xe)||m(this,W)&&this[W][xe]?Re:!0},J=function(xe,Re){if(xe=s(xe),Re=u(Re,!0),xe===ie&&m(H,Re)&&!m(q,Re))return;var ke=x(xe,Re);return ke&&m(H,Re)&&!(m(xe,W)&&xe[W][Re])&&(ke.enumerable=!0),ke},ee=function(xe){for(var Re=F(s(xe)),ke=[],Ne=0,Pe;Re.length>Ne;)!m(H,Pe=Re[Ne++])&&Pe!=W&&Pe!=g&&ke.push(Pe);return ke},ge=function(xe){for(var Re=xe===ie,ke=F(Re?q:s(xe)),Ne=[],Pe=0,je;ke.length>Pe;)m(H,je=ke[Pe++])&&(Re?m(ie,je):!0)&&Ne.push(H[je]);return Ne};ce||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var xe=i(arguments.length>0?arguments[0]:void 0),Re=function(ke){this===ie&&Re.call(q,ke),m(this,W)&&m(this[W],xe)&&(this[W][xe]=!1),ne(this,xe,w(1,ke))};return T&&be&&ne(ie,xe,{configurable:!0,set:Re}),le(xe)},_(j[G],"toString",function(){return this._k}),R.f=J,c.f=te,I("./_object-gopn").f=a.f=ee,I("./_object-pie").f=se,D.f=ge,T&&!I("./_library")&&_(ie,"propertyIsEnumerable",se,!0),d.f=function(pe){return le(r(pe))}),L(L.G+L.W+L.F*!ce,{Symbol:j});for(var re="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Y=0;re.length>Y;)r(re[Y++]);for(var z=b(r.store),$=0;z.length>$;)f(z[$++]);L(L.S+L.F*!ce,"Symbol",{for:function(pe){return m(U,pe+="")?U[pe]:U[pe]=j(pe)},keyFor:function(xe){if(!ue(xe))throw TypeError(xe+" is not a symbol!");for(var Re in U)if(U[Re]===xe)return Re},useSetter:function(){be=!0},useSimple:function(){be=!1}}),L(L.S+L.F*!ce,"Object",{create:Q,defineProperty:te,defineProperties:oe,getOwnPropertyDescriptor:J,getOwnPropertyNames:ee,getOwnPropertySymbols:ge});var me=S(function(){D.f(1)});L(L.S+L.F*me,"Object",{getOwnPropertySymbols:function(xe){return D.f(n(xe))}}),k&&L(L.S+L.F*(!ce||S(function(){var pe=j();return X([pe])!="[null]"||X({a:pe})!="{}"||X(Object(pe))!="{}"})),"JSON",{stringify:function(xe){for(var Re=[xe],ke=1,Ne,Pe;arguments.length>ke;)Re.push(arguments[ke++]);return Pe=Ne=Re[1],!l(Ne)&&xe===void 0||ue(xe)?void 0:(E(Ne)||(Ne=function(je,Fe){if(typeof Pe=="function"&&(Fe=Pe.call(this,je,Fe)),!ue(Fe))return Fe}),Re[1]=Ne,X.apply(k,Re))}}),j[G][K]||I("./_hide")(j[G],K,j[G].valueOf),o(j,"Symbol"),o(Math,"Math",!0),o(P.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(I,Z,N){var P=I("./_export"),m=I("./_object-to-array")(!0);P(P.S,"Object",{entries:function(L){return m(L)}})},{"./_export":107,"./_object-to-array":143}],183:[function(I,Z,N){"use strict";var P=I("./_export"),m=I("./_core"),T=I("./_global"),L=I("./_species-constructor"),_=I("./_promise-resolve");P(P.P+P.R,"Promise",{finally:function(g){var S=L(this,m.Promise||T.Promise),p=typeof g=="function";return this.then(p?function(o){return _(S,g()).then(function(){return o})}:g,p?function(o){return _(S,g()).then(function(){throw o})}:g)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(I,Z,N){"use strict";var P=I("./_export"),m=I("./_new-promise-capability"),T=I("./_perform");P(P.S,"Promise",{try:function(L){var _=m.f(this),g=T(L);return(g.e?_.reject:_.resolve)(g.v),_.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(I,Z,N){I("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(I,Z,N){I("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(I,Z,N){I("./es6.array.iterator");for(var P=I("./_global"),m=I("./_hide"),T=I("./_iterators"),L=I("./_wks")("toStringTag"),_="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(","),g=0;g<_.length;g++){var S=_[g],p=P[S],o=p&&p.prototype;o&&!o[L]&&m(o,L,S),T[S]=T.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(I,Z,N){var P=I("./_export"),m=I("./_task");P(P.G+P.B,{setImmediate:m.set,clearImmediate:m.clear})},{"./_export":107,"./_task":155}],189:[function(I,Z,N){(function(P){"use strict";var m=I("babel-runtime/helpers/typeof"),T=L(m);function L(u){return u&&u.__esModule?u:{default:u}}function _(u){return Array.isArray?Array.isArray(u):s(u)==="[object Array]"}N.isArray=_;function g(u){return typeof u=="boolean"}N.isBoolean=g;function S(u){return u===null}N.isNull=S;function p(u){return u==null}N.isNullOrUndefined=p;function o(u){return typeof u=="number"}N.isNumber=o;function i(u){return typeof u=="string"}N.isString=i;function r(u){return(typeof u=="undefined"?"undefined":(0,T.default)(u))==="symbol"}N.isSymbol=r;function d(u){return u===void 0}N.isUndefined=d;function f(u){return s(u)==="[object RegExp]"}N.isRegExp=f;function h(u){return(typeof u=="undefined"?"undefined":(0,T.default)(u))==="object"&&u!==null}N.isObject=h;function E(u){return s(u)==="[object Date]"}N.isDate=E;function y(u){return s(u)==="[object Error]"||u instanceof Error}N.isError=y;function l(u){return typeof u=="function"}N.isFunction=l;function n(u){return u===null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||(typeof u=="undefined"?"undefined":(0,T.default)(u))==="symbol"||typeof u=="undefined"}N.isPrimitive=n,N.isBuffer=P.isBuffer;function s(u){return Object.prototype.toString.call(u)}}).call(this,{isBuffer:I("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(I,Z,N){"use strict";var P=I("babel-runtime/helpers/typeof"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(L){"use strict";var _=function(){var i=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,r=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g;return function(f,h,E,y){if(arguments.length===1&&o(f)==="string"&&!/\d/.test(f)&&(h=f,f=void 0),f=f||new Date,f instanceof Date||(f=new Date(f)),isNaN(f))throw TypeError("Invalid date");h=String(_.masks[h]||h||_.masks.default);var l=h.slice(0,4);(l==="UTC:"||l==="GMT:")&&(h=h.slice(4),E=!0,l==="GMT:"&&(y=!0));var n=E?"getUTC":"get",s=f[n+"Date"](),u=f[n+"Day"](),w=f[n+"Month"](),v=f[n+"FullYear"](),a=f[n+"Hours"](),R=f[n+"Minutes"](),D=f[n+"Seconds"](),c=f[n+"Milliseconds"](),b=E?0:f.getTimezoneOffset(),x=S(f),C=p(f),F={d:s,dd:g(s),ddd:_.i18n.dayNames[u],dddd:_.i18n.dayNames[u+7],m:w+1,mm:g(w+1),mmm:_.i18n.monthNames[w],mmmm:_.i18n.monthNames[w+12],yy:String(v).slice(2),yyyy:v,h:a%12||12,hh:g(a%12||12),H:a,HH:g(a),M:R,MM:g(R),s:D,ss:g(D),l:g(c,3),L:g(Math.round(c/10)),t:a<12?"a":"p",tt:a<12?"am":"pm",T:a<12?"A":"P",TT:a<12?"AM":"PM",Z:y?"GMT":E?"UTC":(String(f).match(r)||[""]).pop().replace(d,""),o:(b>0?"-":"+")+g(Math.floor(Math.abs(b)/60)*100+Math.abs(b)%60,4),S:["th","st","nd","rd"][s%10>3?0:(s%100-s%10!=10)*s%10],W:x,N:C};return h.replace(i,function(j){return j in F?F[j]:j.slice(1,j.length-1)})}}();_.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"},_.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 g(i,r){for(i=String(i),r=r||2;i.length<r;)i="0"+i;return i}function S(i){var r=new Date(i.getFullYear(),i.getMonth(),i.getDate());r.setDate(r.getDate()-(r.getDay()+6)%7+3);var d=new Date(r.getFullYear(),0,4);d.setDate(d.getDate()-(d.getDay()+6)%7+3);var f=r.getTimezoneOffset()-d.getTimezoneOffset();r.setHours(r.getHours()-f);var h=(r-d)/(864e5*7);return 1+Math.floor(h)}function p(i){var r=i.getDay();return r===0&&(r=7),r}function o(i){return i===null?"null":i===void 0?"undefined":(typeof i=="undefined"?"undefined":(0,m.default)(i))!=="object"?typeof i=="undefined"?"undefined":(0,m.default)(i):Array.isArray(i)?"array":{}.toString.call(i).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return _}):(typeof N=="undefined"?"undefined":(0,m.default)(N))==="object"?Z.exports=_:L.dateFormat=_})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(I,Z,N){/*!
|
|
|
* escape-html
|
|
|
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
|
* Copyright(c) 2015 Andreas Lubbe
|
|
|
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var P=/["'&<>]/;Z.exports=m;function m(T){var L=""+T,_=P.exec(L);if(!_)return L;var g,S="",p=0,o=0;for(p=_.index;p<L.length;p++){switch(L.charCodeAt(p)){case 34:g=""";break;case 38:g="&";break;case 39:g="'";break;case 60:g="<";break;case 62:g=">";break;default:continue}o!==p&&(S+=L.substring(o,p)),o=p+1,S+=g}return o!==p?S+L.substring(o,p):S}},{}],192:[function(I,Z,N){function P(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}Z.exports=P,P.EventEmitter=P,P.prototype._events=void 0,P.prototype._maxListeners=void 0,P.defaultMaxListeners=10,P.prototype.setMaxListeners=function(g){if(!T(g)||g<0||isNaN(g))throw TypeError("n must be a positive number");return this._maxListeners=g,this},P.prototype.emit=function(g){var S,p,o,i,r,d;if(this._events||(this._events={}),g==="error"&&(!this._events.error||L(this._events.error)&&!this._events.error.length)){if(S=arguments[1],S instanceof Error)throw S;var f=new Error('Uncaught, unspecified "error" event. ('+S+")");throw f.context=S,f}if(p=this._events[g],_(p))return!1;if(m(p))switch(arguments.length){case 1:p.call(this);break;case 2:p.call(this,arguments[1]);break;case 3:p.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),p.apply(this,i)}else if(L(p))for(i=Array.prototype.slice.call(arguments,1),d=p.slice(),o=d.length,r=0;r<o;r++)d[r].apply(this,i);return!0},P.prototype.addListener=function(g,S){var p;if(!m(S))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",g,m(S.listener)?S.listener:S),this._events[g]?L(this._events[g])?this._events[g].push(S):this._events[g]=[this._events[g],S]:this._events[g]=S,L(this._events[g])&&!this._events[g].warned&&(_(this._maxListeners)?p=P.defaultMaxListeners:p=this._maxListeners,p&&p>0&&this._events[g].length>p&&(this._events[g].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[g].length),typeof console.trace=="function"&&console.trace())),this},P.prototype.on=P.prototype.addListener,P.prototype.once=function(g,S){if(!m(S))throw TypeError("listener must be a function");var p=!1;function o(){this.removeListener(g,o),p||(p=!0,S.apply(this,arguments))}return o.listener=S,this.on(g,o),this},P.prototype.removeListener=function(g,S){var p,o,i,r;if(!m(S))throw TypeError("listener must be a function");if(!this._events||!this._events[g])return this;if(p=this._events[g],i=p.length,o=-1,p===S||m(p.listener)&&p.listener===S)delete this._events[g],this._events.removeListener&&this.emit("removeListener",g,S);else if(L(p)){for(r=i;r-- >0;)if(p[r]===S||p[r].listener&&p[r].listener===S){o=r;break}if(o<0)return this;p.length===1?(p.length=0,delete this._events[g]):p.splice(o,1),this._events.removeListener&&this.emit("removeListener",g,S)}return this},P.prototype.removeAllListeners=function(g){var S,p;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[g]&&delete this._events[g],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(p=this._events[g],m(p))this.removeListener(g,p);else if(p)for(;p.length;)this.removeListener(g,p[p.length-1]);return delete this._events[g],this},P.prototype.listeners=function(g){var S;return!this._events||!this._events[g]?S=[]:m(this._events[g])?S=[this._events[g]]:S=this._events[g].slice(),S},P.prototype.listenerCount=function(g){if(this._events){var S=this._events[g];if(m(S))return 1;if(S)return S.length}return 0},P.listenerCount=function(g,S){return g.listenerCount(S)};function m(g){return typeof g=="function"}function T(g){return typeof g=="number"}function L(g){return typeof g=="object"&&g!==null}function _(g){return g===void 0}},{}],193:[function(I,Z,N){var P=I("http"),m=Z.exports;for(var T in P)P.hasOwnProperty(T)&&(m[T]=P[T]);m.request=function(L,_){return L||(L={}),L.scheme="https",L.protocol="https:",P.request.call(this,L,_)}},{http:231}],194:[function(I,Z,N){/*!
|
|
|
* humanize-ms - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var P=I("util"),m=I("ms");Z.exports=function(T){if(typeof T=="number")return T;var L=m(T);if(L===void 0){var _=new Error(P.format("humanize-ms(%j) result undefined",T));console.warn(_.stack)}return L}},{ms:204,util:243}],195:[function(I,Z,N){N.read=function(P,m,T,L,_){var g,S,p=_*8-L-1,o=(1<<p)-1,i=o>>1,r=-7,d=T?_-1:0,f=T?-1:1,h=P[m+d];for(d+=f,g=h&(1<<-r)-1,h>>=-r,r+=p;r>0;g=g*256+P[m+d],d+=f,r-=8);for(S=g&(1<<-r)-1,g>>=-r,r+=L;r>0;S=S*256+P[m+d],d+=f,r-=8);if(g===0)g=1-i;else{if(g===o)return S?NaN:(h?-1:1)*Infinity;S=S+Math.pow(2,L),g=g-i}return(h?-1:1)*S*Math.pow(2,g-L)},N.write=function(P,m,T,L,_,g){var S,p,o,i=g*8-_-1,r=(1<<i)-1,d=r>>1,f=_===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=L?0:g-1,E=L?1:-1,y=m<0||m===0&&1/m<0?1:0;for(m=Math.abs(m),isNaN(m)||m===Infinity?(p=isNaN(m)?1:0,S=r):(S=Math.floor(Math.log(m)/Math.LN2),m*(o=Math.pow(2,-S))<1&&(S--,o*=2),S+d>=1?m+=f/o:m+=f*Math.pow(2,1-d),m*o>=2&&(S++,o/=2),S+d>=r?(p=0,S=r):S+d>=1?(p=(m*o-1)*Math.pow(2,_),S=S+d):(p=m*Math.pow(2,d-1)*Math.pow(2,_),S=0));_>=8;P[T+h]=p&255,h+=E,p/=256,_-=8);for(S=S<<_|p,i+=_;i>0;P[T+h]=S&255,h+=E,S/=256,i-=8);P[T+h-E]|=y*128}},{}],196:[function(I,Z,N){typeof Object.create=="function"?Z.exports=function(m,T){T&&(m.super_=T,m.prototype=Object.create(T.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}))}:Z.exports=function(m,T){if(T){m.super_=T;var L=function(){};L.prototype=T.prototype,m.prototype=new L,m.prototype.constructor=m}}},{}],197:[function(I,Z,N){/*!
|
|
|
* Determine if an object is a Buffer
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
|
* @license MIT
|
|
|
*/Z.exports=function(T){return T!=null&&(P(T)||m(T)||!!T._isBuffer)};function P(T){return!!T.constructor&&typeof T.constructor.isBuffer=="function"&&T.constructor.isBuffer(T)}function m(T){return typeof T.readFloatLE=="function"&&typeof T.slice=="function"&&P(T.slice(0,0))}},{}],198:[function(I,Z,N){var P={}.toString;Z.exports=Array.isArray||function(m){return P.call(m)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(I,Z){typeof exports=="object"&&typeof module!="undefined"?module.exports=Z(I):typeof define=="function"&&define.amd?define(Z):Z(I)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:this,function(global){"use strict";global=global||{};var _Base64=global.Base64,version="2.5.2",buffer;if(typeof module!="undefined"&&module.exports)try{buffer=eval("require('buffer').Buffer")}catch(I){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(I){for(var Z={},N=0,P=I.length;N<P;N++)Z[I.charAt(N)]=N;return Z}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(I){if(I.length<2){var Z=I.charCodeAt(0);return Z<128?I:Z<2048?fromCharCode(192|Z>>>6)+fromCharCode(128|Z&63):fromCharCode(224|Z>>>12&15)+fromCharCode(128|Z>>>6&63)+fromCharCode(128|Z&63)}else{var Z=65536+(I.charCodeAt(0)-55296)*1024+(I.charCodeAt(1)-56320);return fromCharCode(240|Z>>>18&7)+fromCharCode(128|Z>>>12&63)+fromCharCode(128|Z>>>6&63)+fromCharCode(128|Z&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(I){return I.replace(re_utob,cb_utob)},cb_encode=function(I){var Z=[0,2,1][I.length%3],N=I.charCodeAt(0)<<16|(I.length>1?I.charCodeAt(1):0)<<8|(I.length>2?I.charCodeAt(2):0),P=[b64chars.charAt(N>>>18),b64chars.charAt(N>>>12&63),Z>=2?"=":b64chars.charAt(N>>>6&63),Z>=1?"=":b64chars.charAt(N&63)];return P.join("")},btoa=global.btoa?function(I){return global.btoa(I)}:function(I){return I.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(I){var Z=Object.prototype.toString.call(I)==="[object Uint8Array]";return Z?I.toString("base64"):btoa(utob(String(I)))},encode=function(I,Z){return Z?_encode(String(I)).replace(/[+\/]/g,function(N){return N=="+"?"-":"_"}).replace(/=/g,""):_encode(I)},encodeURI=function(I){return encode(I,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(I){switch(I.length){case 4:var Z=(7&I.charCodeAt(0))<<18|(63&I.charCodeAt(1))<<12|(63&I.charCodeAt(2))<<6|63&I.charCodeAt(3),N=Z-65536;return fromCharCode((N>>>10)+55296)+fromCharCode((N&1023)+56320);case 3:return fromCharCode((15&I.charCodeAt(0))<<12|(63&I.charCodeAt(1))<<6|63&I.charCodeAt(2));default:return fromCharCode((31&I.charCodeAt(0))<<6|63&I.charCodeAt(1))}},btou=function(I){return I.replace(re_btou,cb_btou)},cb_decode=function(I){var Z=I.length,N=Z%4,P=(Z>0?b64tab[I.charAt(0)]<<18:0)|(Z>1?b64tab[I.charAt(1)]<<12:0)|(Z>2?b64tab[I.charAt(2)]<<6:0)|(Z>3?b64tab[I.charAt(3)]:0),m=[fromCharCode(P>>>16),fromCharCode(P>>>8&255),fromCharCode(P&255)];return m.length-=[0,0,2,1][N],m.join("")},_atob=global.atob?function(I){return global.atob(I)}:function(I){return I.replace(/\S{1,4}/g,cb_decode)},atob=function(I){return _atob(String(I).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(I){return(I.constructor===buffer.constructor?I:buffer.from(I,"base64")).toString()}:function(I){return(I.constructor===buffer.constructor?I:new buffer(I,"base64")).toString()}:function(I){return btou(_atob(I))},decode=function(I){return _decode(String(I).replace(/[-_]/g,function(Z){return Z=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var I=global.Base64;return global.Base64=_Base64,I};if(global.Base64={VERSION:version,atob,btoa,fromBase64:decode,toBase64:encode,utob,encode,encodeURI,btou,decode,noConflict,__buffer__:buffer},typeof Object.defineProperty=="function"){var noEnum=function(I){return{value:I,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)})),Object.defineProperty(String.prototype,"toBase64",noEnum(function(I){return encode(this,I)})),Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,!0)}))}}return global.Meteor&&(Base64=global.Base64),typeof module!="undefined"&&module.exports?module.exports.Base64=global.Base64:typeof define=="function"&&define.amd&&define([],function(){return global.Base64}),{Base64:global.Base64}})}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],200:[function(I,Z,N){/*!
|
|
|
* merge-descriptors
|
|
|
* Copyright(c) 2014 Jonathan Ong
|
|
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
|
* MIT Licensed
|
|
|
*/"use strict";Z.exports=m;var P=Object.prototype.hasOwnProperty;function m(T,L,_){if(!T)throw new TypeError("argument dest is required");if(!L)throw new TypeError("argument src is required");return _===void 0&&(_=!0),Object.getOwnPropertyNames(L).forEach(function(S){if(!_&&P.call(T,S))return;var p=Object.getOwnPropertyDescriptor(L,S);Object.defineProperty(T,S,p)}),T}},{}],201:[function(I,Z,N){"use strict";function P(){this._types=Object.create(null),this._extensions=Object.create(null);for(var m=0;m<arguments.length;m++)this.define(arguments[m]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}P.prototype.define=function(m,T){for(var L in m){var _=m[L].map(function(p){return p.toLowerCase()});L=L.toLowerCase();for(var g=0;g<_.length;g++){var S=_[g];if(S[0]=="*")continue;if(!T&&S in this._types)throw new Error('Attempt to change mapping for "'+S+'" extension from "'+this._types[S]+'" to "'+L+'". Pass `force=true` to allow this, otherwise remove "'+S+'" from the list of extensions for "'+L+'".');this._types[S]=L}if(T||!this._extensions[L]){var S=_[0];this._extensions[L]=S[0]!="*"?S:S.substr(1)}}},P.prototype.getType=function(m){m=String(m);var T=m.replace(/^.*[/\\]/,"").toLowerCase(),L=T.replace(/^.*\./,"").toLowerCase(),_=T.length<m.length,g=L.length<T.length-1;return(g||!_)&&this._types[L]||null},P.prototype.getExtension=function(m){return m=/^\s*([^;\s]*)/.test(m)&&RegExp.$1,m&&this._extensions[m.toLowerCase()]||null},Z.exports=P},{}],202:[function(I,Z,N){"use strict";var P=I("./Mime");Z.exports=new P(I("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(I,Z,N){Z.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(I,Z,N){var P=1e3,m=P*60,T=m*60,L=T*24,_=L*7,g=L*365.25;Z.exports=function(r,d){d=d||{};var f=typeof r;if(f==="string"&&r.length>0)return S(r);if(f==="number"&&isFinite(r))return d.long?o(r):p(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function S(r){if(r=String(r),r.length>100)return;var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(!d)return;var f=parseFloat(d[1]),h=(d[2]||"ms").toLowerCase();switch(h){case"years":case"year":case"yrs":case"yr":case"y":return f*g;case"weeks":case"week":case"w":return f*_;case"days":case"day":case"d":return f*L;case"hours":case"hour":case"hrs":case"hr":case"h":return f*T;case"minutes":case"minute":case"mins":case"min":case"m":return f*m;case"seconds":case"second":case"secs":case"sec":case"s":return f*P;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}function p(r){var d=Math.abs(r);return d>=L?Math.round(r/L)+"d":d>=T?Math.round(r/T)+"h":d>=m?Math.round(r/m)+"m":d>=P?Math.round(r/P)+"s":r+"ms"}function o(r){var d=Math.abs(r);return d>=L?i(r,d,L,"day"):d>=T?i(r,d,T,"hour"):d>=m?i(r,d,m,"minute"):d>=P?i(r,d,P,"second"):r+" ms"}function i(r,d,f,h){var E=d>=f*1.5;return Math.round(r/f)+" "+h+(E?"s":"")}},{}],205:[function(I,Z,N){(function(P){function m(g,S){for(var p=0,o=g.length-1;o>=0;o--){var i=g[o];i==="."?g.splice(o,1):i===".."?(g.splice(o,1),p++):p&&(g.splice(o,1),p--)}if(S)for(;p--;p)g.unshift("..");return g}N.resolve=function(){for(var g="",S=!1,p=arguments.length-1;p>=-1&&!S;p--){var o=p>=0?arguments[p]:P.cwd();if(typeof o!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!o)continue;g=o+"/"+g,S=o.charAt(0)==="/"}return g=m(L(g.split("/"),function(i){return!!i}),!S).join("/"),(S?"/":"")+g||"."},N.normalize=function(g){var S=N.isAbsolute(g),p=_(g,-1)==="/";return g=m(L(g.split("/"),function(o){return!!o}),!S).join("/"),!g&&!S&&(g="."),g&&p&&(g+="/"),(S?"/":"")+g},N.isAbsolute=function(g){return g.charAt(0)==="/"},N.join=function(){var g=Array.prototype.slice.call(arguments,0);return N.normalize(L(g,function(S,p){if(typeof S!="string")throw new TypeError("Arguments to path.join must be strings");return S}).join("/"))},N.relative=function(g,S){g=N.resolve(g).substr(1),S=N.resolve(S).substr(1);function p(E){for(var y=0;y<E.length&&!(E[y]!=="");y++);for(var l=E.length-1;l>=0&&!(E[l]!=="");l--);return y>l?[]:E.slice(y,l-y+1)}for(var o=p(g.split("/")),i=p(S.split("/")),r=Math.min(o.length,i.length),d=r,f=0;f<r;f++)if(o[f]!==i[f]){d=f;break}for(var h=[],f=d;f<o.length;f++)h.push("..");return h=h.concat(i.slice(d)),h.join("/")},N.sep="/",N.delimiter=":",N.dirname=function(g){if(typeof g!="string"&&(g=g+""),g.length===0)return".";for(var S=g.charCodeAt(0),p=S===47,o=-1,i=!0,r=g.length-1;r>=1;--r)if(S=g.charCodeAt(r),S===47){if(!i){o=r;break}}else i=!1;return o===-1?p?"/":".":p&&o===1?"/":g.slice(0,o)};function T(g){typeof g!="string"&&(g=g+"");var S=0,p=-1,o=!0,i;for(i=g.length-1;i>=0;--i)if(g.charCodeAt(i)===47){if(!o){S=i+1;break}}else p===-1&&(o=!1,p=i+1);return p===-1?"":g.slice(S,p)}N.basename=function(g,S){var p=T(g);return S&&p.substr(-1*S.length)===S&&(p=p.substr(0,p.length-S.length)),p},N.extname=function(g){typeof g!="string"&&(g=g+"");for(var S=-1,p=0,o=-1,i=!0,r=0,d=g.length-1;d>=0;--d){var f=g.charCodeAt(d);if(f===47){if(!i){p=d+1;break}continue}o===-1&&(i=!1,o=d+1),f===46?S===-1?S=d:r!==1&&(r=1):S!==-1&&(r=-1)}return S===-1||o===-1||r===0||r===1&&S===o-1&&S===p+1?"":g.slice(S,o)};function L(g,S){if(g.filter)return g.filter(S);for(var p=[],o=0;o<g.length;o++)S(g[o],o,g)&&p.push(g[o]);return p}var _="ab".substr(-1)==="b"?function(g,S,p){return g.substr(S,p)}:function(g,S,p){return S<0&&(S=g.length+S),g.substr(S,p)}}).call(this,I("_process"))},{_process:208}],206:[function(I,Z,N){(function(P){/*!
|
|
|
* 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 m={function:!0,object:!0},T=m[typeof window]&&window||this,L=T,_=m[typeof N]&&N,g=m[typeof Z]&&Z&&!Z.nodeType&&Z,S=_&&g&&typeof P=="object"&&P;S&&(S.global===S||S.window===S||S.self===S)&&(T=S);var p=Math.pow(2,53)-1,o=/\bOpera/,i=this,r=Object.prototype,d=r.hasOwnProperty,f=r.toString;function h(c){return c=String(c),c.charAt(0).toUpperCase()+c.slice(1)}function E(c,b,x){var C={"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 b&&x&&/^Win/i.test(c)&&!/^Windows Phone /i.test(c)&&(C=C[/[\d.]+$/.exec(c)])&&(c="Windows "+C),c=String(c),b&&x&&(c=c.replace(RegExp(b,"i"),x)),c=l(c.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]),c}function y(c,b){var x=-1,C=c?c.length:0;if(typeof C=="number"&&C>-1&&C<=p)for(;++x<C;)b(c[x],x,c);else n(c,b)}function l(c){return c=a(c),/^(?:webOS|i(?:OS|P))/.test(c)?c:h(c)}function n(c,b){for(var x in c)d.call(c,x)&&b(c[x],x,c)}function s(c){return c==null?h(c):f.call(c).slice(8,-1)}function u(c,b){var x=c!=null?typeof c[b]:"number";return!/^(?:boolean|number|string|undefined)$/.test(x)&&(x=="object"?!!c[b]:!0)}function w(c){return String(c).replace(/([ -])(?!$)/g,"$1?")}function v(c,b){var x=null;return y(c,function(C,F){x=b(x,C,F,c)}),x}function a(c){return String(c).replace(/^ +| +$/g,"")}function R(c){var b=T,x=c&&typeof c=="object"&&s(c)!="String";x&&(b=c,c=null);var C=b.navigator||{},F=C.userAgent||"";c||(c=F);var j=x||i==L,k=x?!!C.likeChrome:/\bChrome\b/.test(c)&&!/internal|\n/i.test(f.toString()),X="Object",G=x?X:"ScriptBridgingProxyObject",W=x?X:"Environment",K=x&&b.java?"JavaPackage":s(b.java),B=x?X:"RuntimeObject",U=/\bJava/.test(K)&&b.java,H=U&&s(b.environment)==W,q=U?"a":"\u03B1",ie=U?"b":"\u03B2",ce=b.document||{},he=b.operamini||b.opera,be=o.test(be=x&&he?he["[[Class]]"]:s(he))?be:he=null,ne,le=c,ue=[],te=null,oe=c==F,Q=oe&&he&&typeof he.version=="function"&&he.version(),se,J=z([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),ee=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"]),ge=xe([{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"]),re=$({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),Y=pe(["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 z(Pe){return v(Pe,function(je,Fe){return je||RegExp("\\b"+(Fe.pattern||w(Fe))+"\\b","i").exec(c)&&(Fe.label||Fe)})}function $(Pe){return v(Pe,function(je,Fe,We){return je||(Fe[ge]||Fe[/^[a-z]+(?: +[a-z]+\b)*/i.exec(ge)]||RegExp("\\b"+w(We)+"(?:\\b|\\w*\\d)","i").exec(c))&&We})}function me(Pe){return v(Pe,function(je,Fe){return je||RegExp("\\b"+(Fe.pattern||w(Fe))+"\\b","i").exec(c)&&(Fe.label||Fe)})}function pe(Pe){return v(Pe,function(je,Fe){var We=Fe.pattern||w(Fe);return!je&&(je=RegExp("\\b"+We+"(?:/[\\d.]+|[ \\w.]*)","i").exec(c))&&(je=E(je,We,Fe.label||Fe)),je})}function xe(Pe){return v(Pe,function(je,Fe){var We=Fe.pattern||w(Fe);return!je&&(je=RegExp("\\b"+We+" *\\d+[.\\w_]*","i").exec(c)||RegExp("\\b"+We+" *\\w+-[\\w]*","i").exec(c)||RegExp("\\b"+We+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(c))&&((je=String(Fe.label&&!RegExp(We,"i").test(Fe.label)?Fe.label:je).split("/"))[1]&&!/[\d.]+/.test(je[0])&&(je[0]+=" "+je[1]),Fe=Fe.label||Fe,je=l(je[0].replace(RegExp(We,"i"),Fe).replace(RegExp("; *(?:"+Fe+"[_-])?","i")," ").replace(RegExp("("+Fe+")[-_.]?(\\w)","i"),"$1 $2"))),je})}function Re(Pe){return v(Pe,function(je,Fe){return je||(RegExp(Fe+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(c)||0)[1]||null})}function ke(){return this.description||""}if(J&&(J=[J]),re&&!ge&&(ge=xe([re])),(ne=/\bGoogle TV\b/.exec(ge))&&(ge=ne[0]),/\bSimulator\b/i.test(c)&&(ge=(ge?ge+" ":"")+"Simulator"),ee=="Opera Mini"&&/\bOPiOS\b/.test(c)&&ue.push("running in Turbo/Uncompressed mode"),ee=="IE"&&/\blike iPhone OS\b/.test(c)?(ne=R(c.replace(/like iPhone OS/,"")),re=ne.manufacturer,ge=ne.product):/^iP/.test(ge)?(ee||(ee="Safari"),Y="iOS"+((ne=/ OS ([\d_]+)/i.exec(c))?" "+ne[1].replace(/_/g,"."):"")):ee=="Konqueror"&&!/buntu/i.test(Y)?Y="Kubuntu":re&&re!="Google"&&(/Chrome/.test(ee)&&!/\bMobile Safari\b/i.test(c)||/\bVita\b/.test(ge))||/\bAndroid\b/.test(Y)&&/^Chrome/.test(ee)&&/\bVersion\//i.test(c)?(ee="Android Browser",Y=/\bAndroid\b/.test(Y)?Y:"Android"):ee=="Silk"?(/\bMobi/i.test(c)||(Y="Android",ue.unshift("desktop mode")),/Accelerated *= *true/i.test(c)&&ue.unshift("accelerated")):ee=="PaleMoon"&&(ne=/\bFirefox\/([\d.]+)\b/.exec(c))?ue.push("identifying as Firefox "+ne[1]):ee=="Firefox"&&(ne=/\b(Mobile|Tablet|TV)\b/i.exec(c))?(Y||(Y="Firefox OS"),ge||(ge=ne[1])):!ee||(ne=!/\bMinefield\b/i.test(c)&&/\b(?:Firefox|Safari)\b/.exec(ee))?(ee&&!ge&&/[\/,]|^[^(]+?\)/.test(c.slice(c.indexOf(ne+"/")+8))&&(ee=null),(ne=ge||re||Y)&&(ge||re||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Y))&&(ee=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Y)?Y:ne)+" Browser")):ee=="Electron"&&(ne=(/\bChrome\/([\d.]+)\b/.exec(c)||0)[1])&&ue.push("Chromium "+ne),Q||(Q=Re(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",w(ee),"(?:Firefox|Minefield|NetFront)"])),(ne=J=="iCab"&&parseFloat(Q)>3&&"WebKit"||/\bOpera\b/.test(ee)&&(/\bOPR\b/.test(c)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(c)&&!/^(?:Trident|EdgeHTML)$/.test(J)&&"WebKit"||!J&&/\bMSIE\b/i.test(c)&&(Y=="Mac OS"?"Tasman":"Trident")||J=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(ee)&&"NetFront")&&(J=[ne]),ee=="IE"&&(ne=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(c)||0)[1])?(ee+=" Mobile",Y="Windows Phone "+(/\+$/.test(ne)?ne:ne+".x"),ue.unshift("desktop mode")):/\bWPDesktop\b/i.test(c)?(ee="IE Mobile",Y="Windows Phone 8.x",ue.unshift("desktop mode"),Q||(Q=(/\brv:([\d.]+)/.exec(c)||0)[1])):ee!="IE"&&J=="Trident"&&(ne=/\brv:([\d.]+)/.exec(c))&&(ee&&ue.push("identifying as "+ee+(Q?" "+Q:"")),ee="IE",Q=ne[1]),oe){if(u(b,"global"))if(U&&(ne=U.lang.System,le=ne.getProperty("os.arch"),Y=Y||ne.getProperty("os.name")+" "+ne.getProperty("os.version")),H){try{Q=b.require("ringo/engine").version.join("."),ee="RingoJS"}catch(Pe){(ne=b.system)&&ne.global.system==b.system&&(ee="Narwhal",Y||(Y=ne[0].os||null))}ee||(ee="Rhino")}else typeof b.process=="object"&&!b.process.browser&&(ne=b.process)&&(typeof ne.versions=="object"&&(typeof ne.versions.electron=="string"?(ue.push("Node "+ne.versions.node),ee="Electron",Q=ne.versions.electron):typeof ne.versions.nw=="string"&&(ue.push("Chromium "+Q,"Node "+ne.versions.node),ee="NW.js",Q=ne.versions.nw)),ee||(ee="Node.js",le=ne.arch,Y=ne.platform,Q=/[\d.]+/.exec(ne.version),Q=Q?Q[0]:null));else s(ne=b.runtime)==G?(ee="Adobe AIR",Y=ne.flash.system.Capabilities.os):s(ne=b.phantom)==B?(ee="PhantomJS",Q=(ne=ne.version||null)&&ne.major+"."+ne.minor+"."+ne.patch):typeof ce.documentMode=="number"&&(ne=/\bTrident\/(\d+)/i.exec(c))?(Q=[Q,ce.documentMode],(ne=+ne[1]+4)!=Q[1]&&(ue.push("IE "+Q[1]+" mode"),J&&(J[1]=""),Q[1]=ne),Q=ee=="IE"?String(Q[1].toFixed(1)):Q[0]):typeof ce.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(ee)&&(ue.push("masking as "+ee+" "+Q),ee="IE",Q="11.0",J=["Trident"],Y="Windows");Y=Y&&l(Y)}if(Q&&(ne=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(Q)||/(?:alpha|beta)(?: ?\d)?/i.exec(c+";"+(oe&&C.appMinorVersion))||/\bMinefield\b/i.test(c)&&"a")&&(te=/b/i.test(ne)?"beta":"alpha",Q=Q.replace(RegExp(ne+"\\+?$"),"")+(te=="beta"?ie:q)+(/\d+\+?/.exec(ne)||"")),ee=="Fennec"||ee=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Y))ee="Firefox Mobile";else if(ee=="Maxthon"&&Q)Q=Q.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(ge))ge=="Xbox 360"&&(Y=null),ge=="Xbox 360"&&/\bIEMobile\b/.test(c)&&ue.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(ee)||ee&&!ge&&!/Browser|Mobi/.test(ee))&&(Y=="Windows CE"||/Mobi/i.test(c)))ee+=" Mobile";else if(ee=="IE"&&oe)try{b.external===null&&ue.unshift("platform preview")}catch(Pe){ue.unshift("embedded")}else(/\bBlackBerry\b/.test(ge)||/\bBB10\b/.test(c))&&(ne=(RegExp(ge.replace(/ +/g," *")+"/([.\\d]+)","i").exec(c)||0)[1]||Q)?(ne=[ne,/BB10/.test(c)],Y=(ne[1]?(ge=null,re="BlackBerry"):"Device Software")+" "+ne[0],Q=null):this!=n&&ge!="Wii"&&(oe&&he||/Opera/.test(ee)&&/\b(?:MSIE|Firefox)\b/i.test(c)||ee=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Y)||ee=="IE"&&(Y&&!/^Win/.test(Y)&&Q>5.5||/\bWindows XP\b/.test(Y)&&Q>8||Q==8&&!/\bTrident\b/.test(c)))&&!o.test(ne=R.call(n,c.replace(o,"")+";"))&&ne.name&&(ne="ing as "+ne.name+((ne=ne.version)?" "+ne:""),o.test(ee)?(/\bIE\b/.test(ne)&&Y=="Mac OS"&&(Y=null),ne="identify"+ne):(ne="mask"+ne,be?ee=l(be.replace(/([a-z])([A-Z])/g,"$1 $2")):ee="Opera",/\bIE\b/.test(ne)&&(Y=null),oe||(Q=null)),J=["Presto"],ue.push(ne));(ne=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(c)||0)[1])&&(ne=[parseFloat(ne.replace(/\.(\d)$/,".0$1")),ne],ee=="Safari"&&ne[1].slice(-1)=="+"?(ee="WebKit Nightly",te="alpha",Q=ne[1].slice(0,-1)):(Q==ne[1]||Q==(ne[2]=(/\bSafari\/([\d.]+\+?)/i.exec(c)||0)[1]))&&(Q=null),ne[1]=(/\bChrome\/([\d.]+)/i.exec(c)||0)[1],ne[0]==537.36&&ne[2]==537.36&&parseFloat(ne[1])>=28&&J=="WebKit"&&(J=["Blink"]),!oe||!k&&!ne[1]?(J&&(J[1]="like Safari"),ne=(ne=ne[0],ne<400?1:ne<500?2:ne<526?3:ne<533?4:ne<534?"4+":ne<535?5:ne<537?6:ne<538?7:ne<601?8:"8")):(J&&(J[1]="like Chrome"),ne=ne[1]||(ne=ne[0],ne<530?1:ne<532?2:ne<532.05?3:ne<533?4:ne<534.03?5:ne<534.07?6:ne<534.1?7:ne<534.13?8:ne<534.16?9:ne<534.24?10:ne<534.3?11:ne<535.01?12:ne<535.02?"13+":ne<535.07?15:ne<535.11?16:ne<535.19?17:ne<536.05?18:ne<536.1?19:ne<537.01?20:ne<537.11?"21+":ne<537.13?23:ne<537.18?24:ne<537.24?25:ne<537.36?26:J!="Blink"?"27":"28")),J&&(J[1]+=" "+(ne+=typeof ne=="number"?".x":/[.+]/.test(ne)?"":"+")),ee=="Safari"&&(!Q||parseInt(Q)>45)&&(Q=ne)),ee=="Opera"&&(ne=/\bzbov|zvav$/.exec(Y))?(ee+=" ",ue.unshift("desktop mode"),ne=="zvav"?(ee+="Mini",Q=null):ee+="Mobile",Y=Y.replace(RegExp(" *"+ne+"$"),"")):ee=="Safari"&&/\bChrome\b/.exec(J&&J[1])&&(ue.unshift("desktop mode"),ee="Chrome Mobile",Q=null,/\bOS X\b/.test(Y)?(re="Apple",Y="iOS 4.3+"):Y=null),Q&&Q.indexOf(ne=/[\d.]+$/.exec(Y))==0&&c.indexOf("/"+ne+"-")>-1&&(Y=a(Y.replace(ne,""))),J&&!/\b(?:Avant|Nook)\b/.test(ee)&&(/Browser|Lunascape|Maxthon/.test(ee)||ee!="Safari"&&/^iOS/.test(Y)&&/\bSafari\b/.test(J[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(ee)&&J[1])&&((ne=J[J.length-1])&&ue.push(ne)),ue.length&&(ue=["("+ue.join("; ")+")"]),re&&ge&&ge.indexOf(re)<0&&ue.push("on "+re),ge&&ue.push((/^on /.test(ue[ue.length-1])?"":"on ")+ge),Y&&(ne=/ ([\d.+]+)$/.exec(Y),se=ne&&Y.charAt(Y.length-ne[0].length-1)=="/",Y={architecture:32,family:ne&&!se?Y.replace(ne[0],""):Y,version:ne?ne[1]:null,toString:function(){var Pe=this.version;return this.family+(Pe&&!se?" "+Pe:"")+(this.architecture==64?" 64-bit":"")}}),(ne=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(le))&&!/\bi686\b/i.test(le)?(Y&&(Y.architecture=64,Y.family=Y.family.replace(RegExp(" *"+ne),"")),ee&&(/\bWOW64\b/i.test(c)||oe&&/\w(?:86|32)$/.test(C.cpuClass||C.platform)&&!/\bWin64; x64\b/i.test(c))&&ue.unshift("32-bit")):Y&&/^OS X/.test(Y.family)&&ee=="Chrome"&&parseFloat(Q)>=39&&(Y.architecture=64),c||(c=null);var Ne={};return Ne.description=c,Ne.layout=J&&J[0],Ne.manufacturer=re,Ne.name=ee,Ne.prerelease=te,Ne.product=ge,Ne.ua=c,Ne.version=ee&&Q,Ne.os=Y||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ne.parse=R,Ne.toString=ke,Ne.version&&ue.unshift(Q),Ne.name&&ue.unshift(ee),Y&&ee&&!(Y==String(Y).split(" ")[0]&&(Y==ee.split(" ")[0]||ge))&&ue.push(ge?"("+Y+")":"on "+Y),ue.length&&(Ne.description=ue.join(" ")),Ne}var D=R();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(T.platform=D,define(function(){return D})):_&&g?n(D,function(c,b){_[b]=c}):T.platform=D}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(I,Z,N){(function(P){"use strict";typeof P=="undefined"||!P.version||P.version.indexOf("v0.")===0||P.version.indexOf("v1.")===0&&P.version.indexOf("v1.8.")!==0?Z.exports={nextTick:m}:Z.exports=P;function m(T,L,_,g){if(typeof T!="function")throw new TypeError('"callback" argument must be a function');var S=arguments.length,p,o;switch(S){case 0:case 1:return P.nextTick(T);case 2:return P.nextTick(function(){T.call(null,L)});case 3:return P.nextTick(function(){T.call(null,L,_)});case 4:return P.nextTick(function(){T.call(null,L,_,g)});default:for(p=new Array(S-1),o=0;o<p.length;)p[o++]=arguments[o];return P.nextTick(function(){T.apply(null,p)})}}}).call(this,I("_process"))},{_process:208}],208:[function(I,Z,N){var P=Z.exports={},m,T;function L(){throw new Error("setTimeout has not been defined")}function _(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?m=setTimeout:m=L}catch(y){m=L}try{typeof clearTimeout=="function"?T=clearTimeout:T=_}catch(y){T=_}})();function g(y){if(m===setTimeout)return setTimeout(y,0);if((m===L||!m)&&setTimeout)return m=setTimeout,setTimeout(y,0);try{return m(y,0)}catch(l){try{return m.call(null,y,0)}catch(n){return m.call(this,y,0)}}}function S(y){if(T===clearTimeout)return clearTimeout(y);if((T===_||!T)&&clearTimeout)return T=clearTimeout,clearTimeout(y);try{return T(y)}catch(l){try{return T.call(null,y)}catch(n){return T.call(this,y)}}}var p=[],o=!1,i,r=-1;function d(){if(!o||!i)return;o=!1,i.length?p=i.concat(p):r=-1,p.length&&f()}function f(){if(o)return;var y=g(d);o=!0;for(var l=p.length;l;){for(i=p,p=[];++r<l;)i&&i[r].run();r=-1,l=p.length}i=null,o=!1,S(y)}P.nextTick=function(y){var l=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)l[n-1]=arguments[n];p.push(new h(y,l)),p.length===1&&!o&&g(f)};function h(y,l){this.fun=y,this.array=l}h.prototype.run=function(){this.fun.apply(null,this.array)},P.title="browser",P.browser=!0,P.env={},P.argv=[],P.version="",P.versions={};function E(){}P.on=E,P.addListener=E,P.once=E,P.off=E,P.removeListener=E,P.removeAllListeners=E,P.emit=E,P.prependListener=E,P.prependOnceListener=E,P.listeners=function(y){return[]},P.binding=function(y){throw new Error("process.binding is not supported")},P.cwd=function(){return"/"},P.chdir=function(y){throw new Error("process.chdir is not supported")},P.umask=function(){return 0}},{}],209:[function(I,Z,N){(function(P){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(m){var T=typeof N=="object"&&N&&!N.nodeType&&N,L=typeof Z=="object"&&Z&&!Z.nodeType&&Z,_=typeof P=="object"&&P;(_.global===_||_.window===_||_.self===_)&&(m=_);var g,S=2147483647,p=36,o=1,i=26,r=38,d=700,f=72,h=128,E="-",y=/^xn--/,l=/[^\x20-\x7E]/,n=/[\x2E\u3002\uFF0E\uFF61]/g,s={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},u=p-o,w=Math.floor,v=String.fromCharCode,a;function R(K){throw new RangeError(s[K])}function D(K,B){for(var U=K.length,H=[];U--;)H[U]=B(K[U]);return H}function c(K,B){var U=K.split("@"),H="";U.length>1&&(H=U[0]+"@",K=U[1]),K=K.replace(n,".");var q=K.split("."),ie=D(q,B).join(".");return H+ie}function b(K){for(var B=[],U=0,H=K.length,q,ie;U<H;)q=K.charCodeAt(U++),q>=55296&&q<=56319&&U<H?(ie=K.charCodeAt(U++),(ie&64512)==56320?B.push(((q&1023)<<10)+(ie&1023)+65536):(B.push(q),U--)):B.push(q);return B}function x(K){return D(K,function(B){var U="";return B>65535&&(B-=65536,U+=v(B>>>10&1023|55296),B=56320|B&1023),U+=v(B),U}).join("")}function C(K){return K-48<10?K-22:K-65<26?K-65:K-97<26?K-97:p}function F(K,B){return K+22+75*(K<26)-((B!=0)<<5)}function j(K,B,U){var H=0;for(K=U?w(K/d):K>>1,K+=w(K/B);K>u*i>>1;H+=p)K=w(K/u);return w(H+(u+1)*K/(K+r))}function k(K){var B=[],U=K.length,H,q=0,ie=h,ce=f,he,be,ne,le,ue,te,oe,Q,se;for(he=K.lastIndexOf(E),he<0&&(he=0),be=0;be<he;++be)K.charCodeAt(be)>=128&&R("not-basic"),B.push(K.charCodeAt(be));for(ne=he>0?he+1:0;ne<U;){for(le=q,ue=1,te=p;!(ne>=U&&R("invalid-input"),oe=C(K.charCodeAt(ne++)),(oe>=p||oe>w((S-q)/ue))&&R("overflow"),q+=oe*ue,Q=te<=ce?o:te>=ce+i?i:te-ce,oe<Q);te+=p)se=p-Q,ue>w(S/se)&&R("overflow"),ue*=se;H=B.length+1,ce=j(q-le,H,le==0),w(q/H)>S-ie&&R("overflow"),ie+=w(q/H),q%=H,B.splice(q++,0,ie)}return x(B)}function X(K){var B,U,H,q,ie,ce,he,be,ne,le,ue,te=[],oe,Q,se,J;for(K=b(K),oe=K.length,B=h,U=0,ie=f,ce=0;ce<oe;++ce)ue=K[ce],ue<128&&te.push(v(ue));for(H=q=te.length,q&&te.push(E);H<oe;){for(he=S,ce=0;ce<oe;++ce)ue=K[ce],ue>=B&&ue<he&&(he=ue);for(Q=H+1,he-B>w((S-U)/Q)&&R("overflow"),U+=(he-B)*Q,B=he,ce=0;ce<oe;++ce)if(ue=K[ce],ue<B&&++U>S&&R("overflow"),ue==B){for(be=U,ne=p;!(le=ne<=ie?o:ne>=ie+i?i:ne-ie,be<le);ne+=p)J=be-le,se=p-le,te.push(v(F(le+J%se,0))),be=w(J/se);te.push(v(F(be,0))),ie=j(U,Q,H==q),U=0,++H}++U,++B}return te.join("")}function G(K){return c(K,function(B){return y.test(B)?k(B.slice(4).toLowerCase()):B})}function W(K){return c(K,function(B){return l.test(B)?"xn--"+X(B):B})}if(g={version:"1.4.1",ucs2:{decode:b,encode:x},decode:k,encode:X,toASCII:W,toUnicode:G},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return g});else if(T&&L)if(Z.exports==T)L.exports=g;else for(a in g)g.hasOwnProperty(a)&&(T[a]=g[a]);else m.punycode=g})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(I,Z,N){"use strict";function P(T,L){return Object.prototype.hasOwnProperty.call(T,L)}Z.exports=function(T,L,_,g){L=L||"&",_=_||"=";var S={};if(typeof T!="string"||T.length===0)return S;var p=/\+/g;T=T.split(L);var o=1e3;g&&typeof g.maxKeys=="number"&&(o=g.maxKeys);var i=T.length;o>0&&i>o&&(i=o);for(var r=0;r<i;++r){var d=T[r].replace(p,"%20"),f=d.indexOf(_),h,E,y,l;f>=0?(h=d.substr(0,f),E=d.substr(f+1)):(h=d,E=""),y=decodeURIComponent(h),l=decodeURIComponent(E),P(S,y)?m(S[y])?S[y].push(l):S[y]=[S[y],l]:S[y]=l}return S};var m=Array.isArray||function(T){return Object.prototype.toString.call(T)==="[object Array]"}},{}],211:[function(I,Z,N){"use strict";var P=function(_){switch(typeof _){case"string":return _;case"boolean":return _?"true":"false";case"number":return isFinite(_)?_:"";default:return""}};Z.exports=function(_,g,S,p){return g=g||"&",S=S||"=",_===null&&(_=void 0),typeof _=="object"?T(L(_),function(o){var i=encodeURIComponent(P(o))+S;return m(_[o])?T(_[o],function(r){return i+encodeURIComponent(P(r))}).join(g):i+encodeURIComponent(P(_[o]))}).join(g):p?encodeURIComponent(P(p))+S+encodeURIComponent(P(_)):""};var m=Array.isArray||function(_){return Object.prototype.toString.call(_)==="[object Array]"};function T(_,g){if(_.map)return _.map(g);for(var S=[],p=0;p<_.length;p++)S.push(g(_[p],p));return S}var L=Object.keys||function(_){var g=[];for(var S in _)Object.prototype.hasOwnProperty.call(_,S)&&g.push(S);return g}},{}],212:[function(I,Z,N){"use strict";N.decode=N.parse=I("./decode"),N.encode=N.stringify=I("./encode")},{"./decode":210,"./encode":211}],213:[function(I,Z,N){Z.exports=I("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=_(P),T=I("babel-runtime/core-js/object/keys"),L=_(T);function _(l){return l&&l.__esModule?l:{default:l}}var g=I("process-nextick-args"),S=L.default||function(l){var n=[];for(var s in l)n.push(s);return n};Z.exports=h;var p=(0,m.default)(I("core-util-is"));p.inherits=I("inherits");var o=I("./_stream_readable"),i=I("./_stream_writable");p.inherits(h,o);for(var r=S(i.prototype),d=0;d<r.length;d++){var f=r[d];h.prototype[f]||(h.prototype[f]=i.prototype[f])}function h(l){if(!(this instanceof h))return new h(l);o.call(this,l),i.call(this,l),l&&l.readable===!1&&(this.readable=!1),l&&l.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,l&&l.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",E)}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function E(){if(this.allowHalfOpen||this._writableState.ended)return;g.nextTick(y,this)}function y(l){l.end()}Object.defineProperty(h.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(n){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=n,this._writableState.destroyed=n}}),h.prototype._destroy=function(l,n){this.push(null),this.end(),g.nextTick(n,l)}},{"./_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(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(S){return S&&S.__esModule?S:{default:S}}Z.exports=g;var L=I("./_stream_transform"),_=(0,m.default)(I("core-util-is"));_.inherits=I("inherits"),_.inherits(g,L);function g(S){if(!(this instanceof g))return new g(S);L.call(this,S)}g.prototype._transform=function(S,p,o){o(null,S)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(I,Z,N){(function(P,m){"use strict";var T=I("babel-runtime/core-js/object/get-prototype-of"),L=S(T),_=I("babel-runtime/core-js/object/create"),g=S(_);function S(J){return J&&J.__esModule?J:{default:J}}var p=I("process-nextick-args");Z.exports=b;var o=I("isarray"),i;b.ReadableState=c;var r=I("events").EventEmitter,d=function(ee,ge){return ee.listeners(ge).length},f=I("./internal/streams/stream"),h=I("safe-buffer").Buffer,E=m.Uint8Array||function(){};function y(J){return h.from(J)}function l(J){return h.isBuffer(J)||J instanceof E}var n=(0,g.default)(I("core-util-is"));n.inherits=I("inherits");var s=I("util"),u=void 0;s&&s.debuglog?u=s.debuglog("stream"):u=function(){};var w=I("./internal/streams/BufferList"),v=I("./internal/streams/destroy"),a;n.inherits(b,f);var R=["error","close","destroy","pause","resume"];function D(J,ee,ge){if(typeof J.prependListener=="function")return J.prependListener(ee,ge);!J._events||!J._events[ee]?J.on(ee,ge):o(J._events[ee])?J._events[ee].unshift(ge):J._events[ee]=[ge,J._events[ee]]}function c(J,ee){i=i||I("./_stream_duplex"),J=J||{};var ge=ee instanceof i;this.objectMode=!!J.objectMode,ge&&(this.objectMode=this.objectMode||!!J.readableObjectMode);var re=J.highWaterMark,Y=J.readableHighWaterMark,z=this.objectMode?16:16*1024;re||re===0?this.highWaterMark=re:ge&&(Y||Y===0)?this.highWaterMark=Y:this.highWaterMark=z,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=J.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,J.encoding&&(a||(a=I("string_decoder/").StringDecoder),this.decoder=new a(J.encoding),this.encoding=J.encoding)}function b(J){if(i=i||I("./_stream_duplex"),!(this instanceof b))return new b(J);this._readableState=new c(J,this),this.readable=!0,J&&(typeof J.read=="function"&&(this._read=J.read),typeof J.destroy=="function"&&(this._destroy=J.destroy)),f.call(this)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(ee){if(!this._readableState)return;this._readableState.destroyed=ee}}),b.prototype.destroy=v.destroy,b.prototype._undestroy=v.undestroy,b.prototype._destroy=function(J,ee){this.push(null),ee(J)},b.prototype.push=function(J,ee){var ge=this._readableState,re;return ge.objectMode?re=!0:typeof J=="string"&&(ee=ee||ge.defaultEncoding,ee!==ge.encoding&&(J=h.from(J,ee),ee=""),re=!0),x(this,J,ee,!1,re)},b.prototype.unshift=function(J){return x(this,J,null,!0,!1)};function x(J,ee,ge,re,Y){var z=J._readableState;if(ee===null)z.reading=!1,W(J,z);else{var $;Y||($=F(z,ee)),$?J.emit("error",$):z.objectMode||ee&&ee.length>0?(typeof ee!="string"&&!z.objectMode&&(0,L.default)(ee)!==h.prototype&&(ee=y(ee)),re?z.endEmitted?J.emit("error",new Error("stream.unshift() after end event")):C(J,z,ee,!0):z.ended?J.emit("error",new Error("stream.push() after EOF")):(z.reading=!1,z.decoder&&!ge?(ee=z.decoder.write(ee),z.objectMode||ee.length!==0?C(J,z,ee,!1):U(J,z)):C(J,z,ee,!1))):re||(z.reading=!1)}return j(z)}function C(J,ee,ge,re){ee.flowing&&ee.length===0&&!ee.sync?(J.emit("data",ge),J.read(0)):(ee.length+=ee.objectMode?1:ge.length,re?ee.buffer.unshift(ge):ee.buffer.push(ge),ee.needReadable&&K(J)),U(J,ee)}function F(J,ee){var ge;return!l(ee)&&typeof ee!="string"&&ee!==void 0&&!J.objectMode&&(ge=new TypeError("Invalid non-string/buffer chunk")),ge}function j(J){return!J.ended&&(J.needReadable||J.length<J.highWaterMark||J.length===0)}b.prototype.isPaused=function(){return this._readableState.flowing===!1},b.prototype.setEncoding=function(J){return a||(a=I("string_decoder/").StringDecoder),this._readableState.decoder=new a(J),this._readableState.encoding=J,this};var k=8388608;function X(J){return J>=k?J=k:(J--,J|=J>>>1,J|=J>>>2,J|=J>>>4,J|=J>>>8,J|=J>>>16,J++),J}function G(J,ee){return J<=0||ee.length===0&&ee.ended?0:ee.objectMode?1:J!==J?ee.flowing&&ee.length?ee.buffer.head.data.length:ee.length:(J>ee.highWaterMark&&(ee.highWaterMark=X(J)),J<=ee.length?J:ee.ended?ee.length:(ee.needReadable=!0,0))}b.prototype.read=function(J){u("read",J),J=parseInt(J,10);var ee=this._readableState,ge=J;if(J!==0&&(ee.emittedReadable=!1),J===0&&ee.needReadable&&(ee.length>=ee.highWaterMark||ee.ended))return u("read: emitReadable",ee.length,ee.ended),ee.length===0&&ee.ended?oe(this):K(this),null;if(J=G(J,ee),J===0&&ee.ended)return ee.length===0&&oe(this),null;var re=ee.needReadable;u("need readable",re),(ee.length===0||ee.length-J<ee.highWaterMark)&&(re=!0,u("length less than watermark",re)),ee.ended||ee.reading?(re=!1,u("reading or ended",re)):re&&(u("do read"),ee.reading=!0,ee.sync=!0,ee.length===0&&(ee.needReadable=!0),this._read(ee.highWaterMark),ee.sync=!1,ee.reading||(J=G(ge,ee)));var Y;return J>0?Y=ne(J,ee):Y=null,Y===null?(ee.needReadable=!0,J=0):ee.length-=J,ee.length===0&&(ee.ended||(ee.needReadable=!0),ge!==J&&ee.ended&&oe(this)),Y!==null&&this.emit("data",Y),Y};function W(J,ee){if(ee.ended)return;if(ee.decoder){var ge=ee.decoder.end();ge&&ge.length&&(ee.buffer.push(ge),ee.length+=ee.objectMode?1:ge.length)}ee.ended=!0,K(J)}function K(J){var ee=J._readableState;ee.needReadable=!1,ee.emittedReadable||(u("emitReadable",ee.flowing),ee.emittedReadable=!0,ee.sync?p.nextTick(B,J):B(J))}function B(J){u("emit readable"),J.emit("readable"),be(J)}function U(J,ee){ee.readingMore||(ee.readingMore=!0,p.nextTick(H,J,ee))}function H(J,ee){for(var ge=ee.length;!ee.reading&&!ee.flowing&&!ee.ended&&ee.length<ee.highWaterMark&&!(u("maybeReadMore read 0"),J.read(0),ge===ee.length);)ge=ee.length;ee.readingMore=!1}b.prototype._read=function(J){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(J,ee){var ge=this,re=this._readableState;switch(re.pipesCount){case 0:re.pipes=J;break;case 1:re.pipes=[re.pipes,J];break;default:re.pipes.push(J);break}re.pipesCount+=1,u("pipe count=%d opts=%j",re.pipesCount,ee);var Y=(!ee||ee.end!==!1)&&J!==P.stdout&&J!==P.stderr,z=Y?me:We;re.endEmitted?p.nextTick(z):ge.once("end",z),J.on("unpipe",$);function $(_e,Ge){u("onunpipe"),_e===ge&&(Ge&&Ge.hasUnpiped===!1&&(Ge.hasUnpiped=!0,Re()))}function me(){u("onend"),J.end()}var pe=q(ge);J.on("drain",pe);var xe=!1;function Re(){u("cleanup"),J.removeListener("close",je),J.removeListener("finish",Fe),J.removeListener("drain",pe),J.removeListener("error",Pe),J.removeListener("unpipe",$),ge.removeListener("end",me),ge.removeListener("end",We),ge.removeListener("data",Ne),xe=!0,re.awaitDrain&&(!J._writableState||J._writableState.needDrain)&&pe()}var ke=!1;ge.on("data",Ne);function Ne(_e){u("ondata"),ke=!1;var Ge=J.write(_e);Ge===!1&&!ke&&((re.pipesCount===1&&re.pipes===J||re.pipesCount>1&&se(re.pipes,J)!==-1)&&!xe&&(u("false write response, pause",ge._readableState.awaitDrain),ge._readableState.awaitDrain++,ke=!0),ge.pause())}function Pe(_e){u("onerror",_e),We(),J.removeListener("error",Pe),d(J,"error")===0&&J.emit("error",_e)}D(J,"error",Pe);function je(){J.removeListener("finish",Fe),We()}J.once("close",je);function Fe(){u("onfinish"),J.removeListener("close",je),We()}J.once("finish",Fe);function We(){u("unpipe"),ge.unpipe(J)}return J.emit("pipe",ge),re.flowing||(u("pipe resume"),ge.resume()),J};function q(J){return function(){var ee=J._readableState;u("pipeOnDrain",ee.awaitDrain),ee.awaitDrain&&ee.awaitDrain--,ee.awaitDrain===0&&d(J,"data")&&(ee.flowing=!0,be(J))}}b.prototype.unpipe=function(J){var ee=this._readableState,ge={hasUnpiped:!1};if(ee.pipesCount===0)return this;if(ee.pipesCount===1)return J&&J!==ee.pipes?this:(J||(J=ee.pipes),ee.pipes=null,ee.pipesCount=0,ee.flowing=!1,J&&J.emit("unpipe",this,ge),this);if(!J){var re=ee.pipes,Y=ee.pipesCount;ee.pipes=null,ee.pipesCount=0,ee.flowing=!1;for(var z=0;z<Y;z++)re[z].emit("unpipe",this,ge);return this}var $=se(ee.pipes,J);return $===-1?this:(ee.pipes.splice($,1),ee.pipesCount-=1,ee.pipesCount===1&&(ee.pipes=ee.pipes[0]),J.emit("unpipe",this,ge),this)},b.prototype.on=function(J,ee){var ge=f.prototype.on.call(this,J,ee);if(J==="data")this._readableState.flowing!==!1&&this.resume();else if(J==="readable"){var re=this._readableState;!re.endEmitted&&!re.readableListening&&(re.readableListening=re.needReadable=!0,re.emittedReadable=!1,re.reading?re.length&&K(this):p.nextTick(ie,this))}return ge},b.prototype.addListener=b.prototype.on;function ie(J){u("readable nexttick read 0"),J.read(0)}b.prototype.resume=function(){var J=this._readableState;return J.flowing||(u("resume"),J.flowing=!0,ce(this,J)),this};function ce(J,ee){ee.resumeScheduled||(ee.resumeScheduled=!0,p.nextTick(he,J,ee))}function he(J,ee){ee.reading||(u("resume read 0"),J.read(0)),ee.resumeScheduled=!1,ee.awaitDrain=0,J.emit("resume"),be(J),ee.flowing&&!ee.reading&&J.read(0)}b.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function be(J){var ee=J._readableState;for(u("flow",ee.flowing);ee.flowing&&J.read()!==null;);}b.prototype.wrap=function(J){var ee=this,ge=this._readableState,re=!1;J.on("end",function(){if(u("wrapped end"),ge.decoder&&!ge.ended){var $=ge.decoder.end();$&&$.length&&ee.push($)}ee.push(null)}),J.on("data",function($){if(u("wrapped data"),ge.decoder&&($=ge.decoder.write($)),ge.objectMode&&$==null)return;if(!ge.objectMode&&(!$||!$.length))return;var me=ee.push($);me||(re=!0,J.pause())});for(var Y in J)this[Y]===void 0&&typeof J[Y]=="function"&&(this[Y]=function($){return function(){return J[$].apply(J,arguments)}}(Y));for(var z=0;z<R.length;z++)J.on(R[z],this.emit.bind(this,R[z]));return this._read=function($){u("wrapped _read",$),re&&(re=!1,J.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=ne;function ne(J,ee){if(ee.length===0)return null;var ge;return ee.objectMode?ge=ee.buffer.shift():!J||J>=ee.length?(ee.decoder?ge=ee.buffer.join(""):ee.buffer.length===1?ge=ee.buffer.head.data:ge=ee.buffer.concat(ee.length),ee.buffer.clear()):ge=le(J,ee.buffer,ee.decoder),ge}function le(J,ee,ge){var re;return J<ee.head.data.length?(re=ee.head.data.slice(0,J),ee.head.data=ee.head.data.slice(J)):J===ee.head.data.length?re=ee.shift():re=ge?ue(J,ee):te(J,ee),re}function ue(J,ee){var ge=ee.head,re=1,Y=ge.data;for(J-=Y.length;ge=ge.next;){var z=ge.data,$=J>z.length?z.length:J;if($===z.length?Y+=z:Y+=z.slice(0,J),J-=$,J===0){$===z.length?(++re,ge.next?ee.head=ge.next:ee.head=ee.tail=null):(ee.head=ge,ge.data=z.slice($));break}++re}return ee.length-=re,Y}function te(J,ee){var ge=h.allocUnsafe(J),re=ee.head,Y=1;for(re.data.copy(ge),J-=re.data.length;re=re.next;){var z=re.data,$=J>z.length?z.length:J;if(z.copy(ge,ge.length-J,0,$),J-=$,J===0){$===z.length?(++Y,re.next?ee.head=re.next:ee.head=ee.tail=null):(ee.head=re,re.data=z.slice($));break}++Y}return ee.length-=Y,ge}function oe(J){var ee=J._readableState;if(ee.length>0)throw new Error('"endReadable()" called on non-empty stream');ee.endEmitted||(ee.ended=!0,p.nextTick(Q,ee,J))}function Q(J,ee){!J.endEmitted&&J.length===0&&(J.endEmitted=!0,ee.readable=!1,ee.emit("end"))}function se(J,ee){for(var ge=0,re=J.length;ge<re;ge++)if(J[ge]===ee)return ge;return-1}}).call(this,I("_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(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(i){return i&&i.__esModule?i:{default:i}}Z.exports=S;var L=I("./_stream_duplex"),_=(0,m.default)(I("core-util-is"));_.inherits=I("inherits"),_.inherits(S,L);function g(i,r){var d=this._transformState;d.transforming=!1;var f=d.writecb;if(!f)return this.emit("error",new Error("write callback called multiple times"));d.writechunk=null,d.writecb=null,r!=null&&this.push(r),f(i);var h=this._readableState;h.reading=!1,(h.needReadable||h.length<h.highWaterMark)&&this._read(h.highWaterMark)}function S(i){if(!(this instanceof S))return new S(i);L.call(this,i),this._transformState={afterTransform:g.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,i&&(typeof i.transform=="function"&&(this._transform=i.transform),typeof i.flush=="function"&&(this._flush=i.flush)),this.on("prefinish",p)}function p(){var i=this;typeof this._flush=="function"?this._flush(function(r,d){o(i,r,d)}):o(this,null,null)}S.prototype.push=function(i,r){return this._transformState.needTransform=!1,L.prototype.push.call(this,i,r)},S.prototype._transform=function(i,r,d){throw new Error("_transform() is not implemented")},S.prototype._write=function(i,r,d){var f=this._transformState;if(f.writecb=d,f.writechunk=i,f.writeencoding=r,!f.transforming){var h=this._readableState;(f.needTransform||h.needReadable||h.length<h.highWaterMark)&&this._read(h.highWaterMark)}},S.prototype._read=function(i){var r=this._transformState;r.writechunk!==null&&r.writecb&&!r.transforming?(r.transforming=!0,this._transform(r.writechunk,r.writeencoding,r.afterTransform)):r.needTransform=!0},S.prototype._destroy=function(i,r){var d=this;L.prototype._destroy.call(this,i,function(f){r(f),d.emit("close")})};function o(i,r,d){if(r)return i.emit("error",r);if(d!=null&&i.push(d),i._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(i._transformState.transforming)throw new Error("Calling transform done when still transforming");return i.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(I,Z,N){(function(P,m){"use strict";var T=I("babel-runtime/core-js/object/define-property"),L=f(T),_=I("babel-runtime/core-js/symbol/has-instance"),g=f(_),S=I("babel-runtime/core-js/symbol"),p=f(S),o=I("babel-runtime/core-js/object/create"),i=f(o),r=I("babel-runtime/core-js/set-immediate"),d=f(r);function f(te){return te&&te.__esModule?te:{default:te}}var h=I("process-nextick-args");Z.exports=F;function E(te,oe,Q){this.chunk=te,this.encoding=oe,this.callback=Q,this.next=null}function y(te){var oe=this;this.next=null,this.entry=null,this.finish=function(){ue(oe,te)}}var l=!P.browser&&["v0.10","v0.9."].indexOf(P.version.slice(0,5))>-1?d.default:h.nextTick,n;F.WritableState=x;var s=(0,i.default)(I("core-util-is"));s.inherits=I("inherits");var u={deprecate:I("util-deprecate")},w=I("./internal/streams/stream"),v=I("safe-buffer").Buffer,a=m.Uint8Array||function(){};function R(te){return v.from(te)}function D(te){return v.isBuffer(te)||te instanceof a}var c=I("./internal/streams/destroy");s.inherits(F,w);function b(){}function x(te,oe){n=n||I("./_stream_duplex"),te=te||{};var Q=oe instanceof n;this.objectMode=!!te.objectMode,Q&&(this.objectMode=this.objectMode||!!te.writableObjectMode);var se=te.highWaterMark,J=te.writableHighWaterMark,ee=this.objectMode?16:16*1024;se||se===0?this.highWaterMark=se:Q&&(J||J===0)?this.highWaterMark=J:this.highWaterMark=ee,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 ge=te.decodeStrings===!1;this.decodeStrings=!ge,this.defaultEncoding=te.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(re){U(oe,re)},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 y(this)}x.prototype.getBuffer=function(){for(var oe=this.bufferedRequest,Q=[];oe;)Q.push(oe),oe=oe.next;return Q},function(){try{Object.defineProperty(x.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(te){}}();var C;typeof p.default=="function"&&g.default&&typeof Function.prototype[g.default]=="function"?(C=Function.prototype[g.default],(0,L.default)(F,g.default,{value:function(oe){return C.call(this,oe)?!0:this!==F?!1:oe&&oe._writableState instanceof x}})):C=function(oe){return oe instanceof this};function F(te){if(n=n||I("./_stream_duplex"),!C.call(F,this)&&!(this instanceof n))return new F(te);this._writableState=new x(te,this),this.writable=!0,te&&(typeof te.write=="function"&&(this._write=te.write),typeof te.writev=="function"&&(this._writev=te.writev),typeof te.destroy=="function"&&(this._destroy=te.destroy),typeof te.final=="function"&&(this._final=te.final)),w.call(this)}F.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function j(te,oe){var Q=new Error("write after end");te.emit("error",Q),h.nextTick(oe,Q)}function k(te,oe,Q,se){var J=!0,ee=!1;return Q===null?ee=new TypeError("May not write null values to stream"):typeof Q!="string"&&Q!==void 0&&!oe.objectMode&&(ee=new TypeError("Invalid non-string/buffer chunk")),ee&&(te.emit("error",ee),h.nextTick(se,ee),J=!1),J}F.prototype.write=function(te,oe,Q){var se=this._writableState,J=!1,ee=!se.objectMode&&D(te);return ee&&!v.isBuffer(te)&&(te=R(te)),typeof oe=="function"&&(Q=oe,oe=null),ee?oe="buffer":oe||(oe=se.defaultEncoding),typeof Q!="function"&&(Q=b),se.ended?j(this,Q):(ee||k(this,se,te,Q))&&(se.pendingcb++,J=G(this,se,ee,te,oe,Q)),J},F.prototype.cork=function(){var te=this._writableState;te.corked++},F.prototype.uncork=function(){var te=this._writableState;te.corked&&(te.corked--,!te.writing&&!te.corked&&!te.finished&&!te.bufferProcessing&&te.bufferedRequest&&ie(this,te))},F.prototype.setDefaultEncoding=function(oe){if(typeof oe=="string"&&(oe=oe.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((oe+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+oe);return this._writableState.defaultEncoding=oe,this};function X(te,oe,Q){return!te.objectMode&&te.decodeStrings!==!1&&typeof oe=="string"&&(oe=v.from(oe,Q)),oe}Object.defineProperty(F.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function G(te,oe,Q,se,J,ee){if(!Q){var ge=X(oe,se,J);se!==ge&&(Q=!0,J="buffer",se=ge)}var re=oe.objectMode?1:se.length;oe.length+=re;var Y=oe.length<oe.highWaterMark;if(Y||(oe.needDrain=!0),oe.writing||oe.corked){var z=oe.lastBufferedRequest;oe.lastBufferedRequest={chunk:se,encoding:J,isBuf:Q,callback:ee,next:null},z?z.next=oe.lastBufferedRequest:oe.bufferedRequest=oe.lastBufferedRequest,oe.bufferedRequestCount+=1}else W(te,oe,!1,re,se,J,ee);return Y}function W(te,oe,Q,se,J,ee,ge){oe.writelen=se,oe.writecb=ge,oe.writing=!0,oe.sync=!0,Q?te._writev(J,oe.onwrite):te._write(J,ee,oe.onwrite),oe.sync=!1}function K(te,oe,Q,se,J){--oe.pendingcb,Q?(h.nextTick(J,se),h.nextTick(ne,te,oe),te._writableState.errorEmitted=!0,te.emit("error",se)):(J(se),te._writableState.errorEmitted=!0,te.emit("error",se),ne(te,oe))}function B(te){te.writing=!1,te.writecb=null,te.length-=te.writelen,te.writelen=0}function U(te,oe){var Q=te._writableState,se=Q.sync,J=Q.writecb;if(B(Q),oe)K(te,Q,se,oe,J);else{var ee=ce(Q);!ee&&!Q.corked&&!Q.bufferProcessing&&Q.bufferedRequest&&ie(te,Q),se?l(H,te,Q,ee,J):H(te,Q,ee,J)}}function H(te,oe,Q,se){Q||q(te,oe),oe.pendingcb--,se(),ne(te,oe)}function q(te,oe){oe.length===0&&oe.needDrain&&(oe.needDrain=!1,te.emit("drain"))}function ie(te,oe){oe.bufferProcessing=!0;var Q=oe.bufferedRequest;if(te._writev&&Q&&Q.next){var se=oe.bufferedRequestCount,J=new Array(se),ee=oe.corkedRequestsFree;ee.entry=Q;for(var ge=0,re=!0;Q;)J[ge]=Q,Q.isBuf||(re=!1),Q=Q.next,ge+=1;J.allBuffers=re,W(te,oe,!0,oe.length,J,"",ee.finish),oe.pendingcb++,oe.lastBufferedRequest=null,ee.next?(oe.corkedRequestsFree=ee.next,ee.next=null):oe.corkedRequestsFree=new y(oe),oe.bufferedRequestCount=0}else{for(;Q;){var Y=Q.chunk,z=Q.encoding,$=Q.callback,me=oe.objectMode?1:Y.length;if(W(te,oe,!1,me,Y,z,$),Q=Q.next,oe.bufferedRequestCount--,oe.writing)break}Q===null&&(oe.lastBufferedRequest=null)}oe.bufferedRequest=Q,oe.bufferProcessing=!1}F.prototype._write=function(te,oe,Q){Q(new Error("_write() is not implemented"))},F.prototype._writev=null,F.prototype.end=function(te,oe,Q){var se=this._writableState;typeof te=="function"?(Q=te,te=null,oe=null):typeof oe=="function"&&(Q=oe,oe=null),te!=null&&this.write(te,oe),se.corked&&(se.corked=1,this.uncork()),!se.ending&&!se.finished&&le(this,se,Q)};function ce(te){return te.ending&&te.length===0&&te.bufferedRequest===null&&!te.finished&&!te.writing}function he(te,oe){te._final(function(Q){oe.pendingcb--,Q&&te.emit("error",Q),oe.prefinished=!0,te.emit("prefinish"),ne(te,oe)})}function be(te,oe){!oe.prefinished&&!oe.finalCalled&&(typeof te._final=="function"?(oe.pendingcb++,oe.finalCalled=!0,h.nextTick(he,te,oe)):(oe.prefinished=!0,te.emit("prefinish")))}function ne(te,oe){var Q=ce(oe);return Q&&(be(te,oe),oe.pendingcb===0&&(oe.finished=!0,te.emit("finish"))),Q}function le(te,oe,Q){oe.ending=!0,ne(te,oe),Q&&(oe.finished?h.nextTick(Q):te.once("finish",Q)),oe.ended=!0,te.writable=!1}function ue(te,oe,Q){var se=te.entry;for(te.entry=null;se;){var J=se.callback;oe.pendingcb--,J(Q),se=se.next}oe.corkedRequestsFree?oe.corkedRequestsFree.next=te:oe.corkedRequestsFree=te}Object.defineProperty(F.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(oe){if(!this._writableState)return;this._writableState.destroyed=oe}}),F.prototype.destroy=c.destroy,F.prototype._undestroy=c.undestroy,F.prototype._destroy=function(te,oe){this.end(),oe(te)}}).call(this,I("_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(I,Z,N){"use strict";function P(_,g){if(!(_ instanceof g))throw new TypeError("Cannot call a class as a function")}var m=I("safe-buffer").Buffer,T=I("util");function L(_,g,S){_.copy(g,S)}Z.exports=function(){function _(){P(this,_),this.head=null,this.tail=null,this.length=0}return _.prototype.push=function(S){var p={data:S,next:null};this.length>0?this.tail.next=p:this.head=p,this.tail=p,++this.length},_.prototype.unshift=function(S){var p={data:S,next:this.head};this.length===0&&(this.tail=p),this.head=p,++this.length},_.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},_.prototype.clear=function(){this.head=this.tail=null,this.length=0},_.prototype.join=function(S){if(this.length===0)return"";for(var p=this.head,o=""+p.data;p=p.next;)o+=S+p.data;return o},_.prototype.concat=function(S){if(this.length===0)return m.alloc(0);if(this.length===1)return this.head.data;for(var p=m.allocUnsafe(S>>>0),o=this.head,i=0;o;)L(o.data,p,i),i+=o.data.length,o=o.next;return p},_}(),T&&T.inspect&&T.inspect.custom&&(Z.exports.prototype[T.inspect.custom]=function(){var _=T.inspect({length:this.length});return this.constructor.name+" "+_})},{"safe-buffer":228,util:71}],220:[function(I,Z,N){"use strict";var P=I("process-nextick-args");function m(_,g){var S=this,p=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return p||o?(g?g(_):_&&(!this._writableState||!this._writableState.errorEmitted)&&P.nextTick(L,this,_),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(_||null,function(i){!g&&i?(P.nextTick(L,S,i),S._writableState&&(S._writableState.errorEmitted=!0)):g&&g(i)}),this)}function T(){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 L(_,g){_.emit("error",g)}Z.exports={destroy:m,undestroy:T}},{"process-nextick-args":207}],221:[function(I,Z,N){"use strict";Z.exports=I("events").EventEmitter},{events:192}],222:[function(I,Z,N){Z.exports=I("./readable").PassThrough},{"./readable":223}],223:[function(I,Z,N){N=Z.exports=I("./lib/_stream_readable.js"),N.Stream=N,N.Readable=N,N.Writable=I("./lib/_stream_writable.js"),N.Duplex=I("./lib/_stream_duplex.js"),N.Transform=I("./lib/_stream_transform.js"),N.PassThrough=I("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":214,"./lib/_stream_passthrough.js":215,"./lib/_stream_readable.js":216,"./lib/_stream_transform.js":217,"./lib/_stream_writable.js":218}],224:[function(I,Z,N){Z.exports=I("./readable").Transform},{"./readable":223}],225:[function(I,Z,N){Z.exports=I("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(I,Z,N){var P=function(){return this}()||Function("return this")(),m=P.regeneratorRuntime&&Object.getOwnPropertyNames(P).indexOf("regeneratorRuntime")>=0,T=m&&P.regeneratorRuntime;if(P.regeneratorRuntime=void 0,Z.exports=I("./runtime"),m)P.regeneratorRuntime=T;else try{delete P.regeneratorRuntime}catch(L){P.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(I,Z,N){!function(P){"use strict";var m=Object.prototype,T=m.hasOwnProperty,L,_=typeof Symbol=="function"?Symbol:{},g=_.iterator||"@@iterator",S=_.asyncIterator||"@@asyncIterator",p=_.toStringTag||"@@toStringTag",o=typeof Z=="object",i=P.regeneratorRuntime;if(i){o&&(Z.exports=i);return}i=P.regeneratorRuntime=o?Z.exports:{};function r(G,W,K,B){var U=W&&W.prototype instanceof n?W:n,H=Object.create(U.prototype),q=new j(B||[]);return H._invoke=b(G,K,q),H}i.wrap=r;function d(G,W,K){try{return{type:"normal",arg:G.call(W,K)}}catch(B){return{type:"throw",arg:B}}}var f="suspendedStart",h="suspendedYield",E="executing",y="completed",l={};function n(){}function s(){}function u(){}var w={};w[g]=function(){return this};var v=Object.getPrototypeOf,a=v&&v(v(k([])));a&&a!==m&&T.call(a,g)&&(w=a);var R=u.prototype=n.prototype=Object.create(w);s.prototype=R.constructor=u,u.constructor=s,u[p]=s.displayName="GeneratorFunction";function D(G){["next","throw","return"].forEach(function(W){G[W]=function(K){return this._invoke(W,K)}})}i.isGeneratorFunction=function(G){var W=typeof G=="function"&&G.constructor;return W?W===s||(W.displayName||W.name)==="GeneratorFunction":!1},i.mark=function(G){return Object.setPrototypeOf?Object.setPrototypeOf(G,u):(G.__proto__=u,p in G||(G[p]="GeneratorFunction")),G.prototype=Object.create(R),G},i.awrap=function(G){return{__await:G}};function c(G){function W(U,H,q,ie){var ce=d(G[U],G,H);if(ce.type==="throw")ie(ce.arg);else{var he=ce.arg,be=he.value;return be&&typeof be=="object"&&T.call(be,"__await")?Promise.resolve(be.__await).then(function(ne){W("next",ne,q,ie)},function(ne){W("throw",ne,q,ie)}):Promise.resolve(be).then(function(ne){he.value=ne,q(he)},ie)}}var K;function B(U,H){function q(){return new Promise(function(ie,ce){W(U,H,ie,ce)})}return K=K?K.then(q,q):q()}this._invoke=B}D(c.prototype),c.prototype[S]=function(){return this},i.AsyncIterator=c,i.async=function(G,W,K,B){var U=new c(r(G,W,K,B));return i.isGeneratorFunction(W)?U:U.next().then(function(H){return H.done?H.value:U.next()})};function b(G,W,K){var B=f;return function(H,q){if(B===E)throw new Error("Generator is already running");if(B===y){if(H==="throw")throw q;return X()}for(K.method=H,K.arg=q;;){var ie=K.delegate;if(ie){var ce=x(ie,K);if(ce){if(ce===l)continue;return ce}}if(K.method==="next")K.sent=K._sent=K.arg;else if(K.method==="throw"){if(B===f)throw B=y,K.arg;K.dispatchException(K.arg)}else K.method==="return"&&K.abrupt("return",K.arg);B=E;var he=d(G,W,K);if(he.type==="normal"){if(B=K.done?y:h,he.arg===l)continue;return{value:he.arg,done:K.done}}else he.type==="throw"&&(B=y,K.method="throw",K.arg=he.arg)}}}function x(G,W){var K=G.iterator[W.method];if(K===L){if(W.delegate=null,W.method==="throw"){if(G.iterator.return&&(W.method="return",W.arg=L,x(G,W),W.method==="throw"))return l;W.method="throw",W.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var B=d(K,G.iterator,W.arg);if(B.type==="throw")return W.method="throw",W.arg=B.arg,W.delegate=null,l;var U=B.arg;if(!U)return W.method="throw",W.arg=new TypeError("iterator result is not an object"),W.delegate=null,l;if(U.done)W[G.resultName]=U.value,W.next=G.nextLoc,W.method!=="return"&&(W.method="next",W.arg=L);else return U;return W.delegate=null,l}D(R),R[p]="Generator",R[g]=function(){return this},R.toString=function(){return"[object Generator]"};function C(G){var W={tryLoc:G[0]};1 in G&&(W.catchLoc=G[1]),2 in G&&(W.finallyLoc=G[2],W.afterLoc=G[3]),this.tryEntries.push(W)}function F(G){var W=G.completion||{};W.type="normal",delete W.arg,G.completion=W}function j(G){this.tryEntries=[{tryLoc:"root"}],G.forEach(C,this),this.reset(!0)}i.keys=function(G){var W=[];for(var K in G)W.push(K);return W.reverse(),function B(){for(;W.length;){var U=W.pop();if(U in G)return B.value=U,B.done=!1,B}return B.done=!0,B}};function k(G){if(G){var W=G[g];if(W)return W.call(G);if(typeof G.next=="function")return G;if(!isNaN(G.length)){var K=-1,B=function U(){for(;++K<G.length;)if(T.call(G,K))return U.value=G[K],U.done=!1,U;return U.value=L,U.done=!0,U};return B.next=B}}return{next:X}}i.values=k;function X(){return{value:L,done:!0}}j.prototype={constructor:j,reset:function(G){if(this.prev=0,this.next=0,this.sent=this._sent=L,this.done=!1,this.delegate=null,this.method="next",this.arg=L,this.tryEntries.forEach(F),!G)for(var W in this)W.charAt(0)==="t"&&T.call(this,W)&&!isNaN(+W.slice(1))&&(this[W]=L)},stop:function(){this.done=!0;var G=this.tryEntries[0],W=G.completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(G){if(this.done)throw G;var W=this;function K(ce,he){return H.type="throw",H.arg=G,W.next=ce,he&&(W.method="next",W.arg=L),!!he}for(var B=this.tryEntries.length-1;B>=0;--B){var U=this.tryEntries[B],H=U.completion;if(U.tryLoc==="root")return K("end");if(U.tryLoc<=this.prev){var q=T.call(U,"catchLoc"),ie=T.call(U,"finallyLoc");if(q&&ie){if(this.prev<U.catchLoc)return K(U.catchLoc,!0);if(this.prev<U.finallyLoc)return K(U.finallyLoc)}else if(q){if(this.prev<U.catchLoc)return K(U.catchLoc,!0)}else if(ie){if(this.prev<U.finallyLoc)return K(U.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(G,W){for(var K=this.tryEntries.length-1;K>=0;--K){var B=this.tryEntries[K];if(B.tryLoc<=this.prev&&T.call(B,"finallyLoc")&&this.prev<B.finallyLoc){var U=B;break}}U&&(G==="break"||G==="continue")&&U.tryLoc<=W&&W<=U.finallyLoc&&(U=null);var H=U?U.completion:{};return H.type=G,H.arg=W,U?(this.method="next",this.next=U.finallyLoc,l):this.complete(H)},complete:function(G,W){if(G.type==="throw")throw G.arg;return G.type==="break"||G.type==="continue"?this.next=G.arg:G.type==="return"?(this.rval=this.arg=G.arg,this.method="return",this.next="end"):G.type==="normal"&&W&&(this.next=W),l},finish:function(G){for(var W=this.tryEntries.length-1;W>=0;--W){var K=this.tryEntries[W];if(K.finallyLoc===G)return this.complete(K.completion,K.afterLoc),F(K),l}},catch:function(G){for(var W=this.tryEntries.length-1;W>=0;--W){var K=this.tryEntries[W];if(K.tryLoc===G){var B=K.completion;if(B.type==="throw"){var U=B.arg;F(K)}return U}}throw new Error("illegal catch attempt")},delegateYield:function(G,W,K){return this.delegate={iterator:k(G),resultName:W,nextLoc:K},this.method==="next"&&(this.arg=L),l}}}(function(){return this}()||Function("return this")())},{}],228:[function(I,Z,N){var P=I("buffer"),m=P.Buffer;function T(_,g){for(var S in _)g[S]=_[S]}m.from&&m.alloc&&m.allocUnsafe&&m.allocUnsafeSlow?Z.exports=P:(T(P,N),N.Buffer=L);function L(_,g,S){return m(_,g,S)}T(m,L),L.from=function(_,g,S){if(typeof _=="number")throw new TypeError("Argument must not be a number");return m(_,g,S)},L.alloc=function(_,g,S){if(typeof _!="number")throw new TypeError("Argument must be a number");var p=m(_);return g!==void 0?typeof S=="string"?p.fill(g,S):p.fill(g):p.fill(0),p},L.allocUnsafe=function(_){if(typeof _!="number")throw new TypeError("Argument must be a number");return m(_)},L.allocUnsafeSlow=function(_){if(typeof _!="number")throw new TypeError("Argument must be a number");return P.SlowBuffer(_)}},{buffer:73}],229:[function(I,Z,N){(function(P){"use strict";var m=I("babel-runtime/core-js/string/from-code-point"),T=h(m),L=I("babel-runtime/core-js/json/stringify"),_=h(L),g=I("babel-runtime/helpers/typeof"),S=h(g),p=I("babel-runtime/core-js/object/define-property"),o=h(p),i=I("babel-runtime/core-js/object/keys"),r=h(i),d=I("babel-runtime/core-js/object/create"),f=h(d);function h(E){return E&&E.__esModule?E:{default:E}}(function(E){E.parser=function(z,$){return new l(z,$)},E.SAXParser=l,E.SAXStream=R,E.createStream=a,E.MAX_BUFFER_LENGTH=64*1024;var y=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];E.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function l(z,$){if(!(this instanceof l))return new l(z,$);var me=this;s(me),me.q=me.c="",me.bufferCheckPosition=E.MAX_BUFFER_LENGTH,me.opt=$||{},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=!!z,me.noscript=!!(z||me.opt.noscript),me.state=H.BEGIN,me.strictEntities=me.opt.strictEntities,me.ENTITIES=me.strictEntities?(0,f.default)(E.XML_ENTITIES):(0,f.default)(E.ENTITIES),me.attribList=[],me.opt.xmlns&&(me.ns=(0,f.default)(C)),me.trackPosition=me.opt.position!==!1,me.trackPosition&&(me.position=me.line=me.column=0),ie(me,"onready")}f.default||(Object.create=function(z){function $(){}$.prototype=z;var me=new $;return me}),r.default||(Object.keys=function(z){var $=[];for(var me in z)z.hasOwnProperty(me)&&$.push(me);return $});function n(z){for(var $=Math.max(E.MAX_BUFFER_LENGTH,10),me=0,pe=0,xe=y.length;pe<xe;pe++){var Re=z[y[pe]].length;if(Re>$)switch(y[pe]){case"textNode":he(z);break;case"cdata":ce(z,"oncdata",z.cdata),z.cdata="";break;case"script":ce(z,"onscript",z.script),z.script="";break;default:ne(z,"Max buffer length exceeded: "+y[pe])}me=Math.max(me,Re)}var ke=E.MAX_BUFFER_LENGTH-me;z.bufferCheckPosition=ke+z.position}function s(z){for(var $=0,me=y.length;$<me;$++)z[y[$]]=""}function u(z){he(z),z.cdata!==""&&(ce(z,"oncdata",z.cdata),z.cdata=""),z.script!==""&&(ce(z,"onscript",z.script),z.script="")}l.prototype={end:function(){le(this)},write:Y,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){u(this)}};var w;try{w=I("stream").Stream}catch(z){w=function(){}}var v=E.EVENTS.filter(function(z){return z!=="error"&&z!=="end"});function a(z,$){return new R(z,$)}function R(z,$){if(!(this instanceof R))return new R(z,$);w.apply(this),this._parser=new l(z,$),this.writable=!0,this.readable=!0;var me=this;this._parser.onend=function(){me.emit("end")},this._parser.onerror=function(pe){me.emit("error",pe),me._parser.error=null},this._decoder=null,v.forEach(function(pe){(0,o.default)(me,"on"+pe,{get:function(){return me._parser["on"+pe]},set:function(Re){if(!Re)return me.removeAllListeners(pe),me._parser["on"+pe]=Re,Re;me.on(pe,Re)},enumerable:!0,configurable:!1})})}R.prototype=(0,f.default)(w.prototype,{constructor:{value:R}}),R.prototype.write=function(z){if(typeof P=="function"&&typeof P.isBuffer=="function"&&P.isBuffer(z)){if(!this._decoder){var $=I("string_decoder").StringDecoder;this._decoder=new $("utf8")}z=this._decoder.write(z)}return this._parser.write(z.toString()),this.emit("data",z),!0},R.prototype.end=function(z){return z&&z.length&&this.write(z),this._parser.end(),!0},R.prototype.on=function(z,$){var me=this;return!me._parser["on"+z]&&v.indexOf(z)!==-1&&(me._parser["on"+z]=function(){var pe=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);pe.splice(0,0,z),me.emit.apply(me,pe)}),w.prototype.on.call(me,z,$)};var D="[CDATA[",c="DOCTYPE",b="http://www.w3.org/XML/1998/namespace",x="http://www.w3.org/2000/xmlns/",C={xml:b,xmlns:x},F=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,j=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,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]/,X=/[#:_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 G(z){return z===" "||z===`
|
|
|
`||z==="\r"||z===" "}function W(z){return z==='"'||z==="'"}function K(z){return z===">"||G(z)}function B(z,$){return z.test($)}function U(z,$){return!B(z,$)}var H=0;E.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++},E.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},E.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,r.default)(E.ENTITIES).forEach(function(z){var $=E.ENTITIES[z],me=typeof $=="number"?String.fromCharCode($):$;E.ENTITIES[z]=me});for(var q in E.STATE)E.STATE[E.STATE[q]]=q;H=E.STATE;function ie(z,$,me){z[$]&&z[$](me)}function ce(z,$,me){z.textNode&&he(z),ie(z,$,me)}function he(z){z.textNode=be(z.opt,z.textNode),z.textNode&&ie(z,"ontext",z.textNode),z.textNode=""}function be(z,$){return z.trim&&($=$.trim()),z.normalize&&($=$.replace(/\s+/g," ")),$}function ne(z,$){return he(z),z.trackPosition&&($+=`
|
|
|
Line: `+z.line+`
|
|
|
Column: `+z.column+`
|
|
|
Char: `+z.c),$=new Error($),z.error=$,ie(z,"onerror",$),z}function le(z){return z.sawRoot&&!z.closedRoot&&ue(z,"Unclosed root tag"),z.state!==H.BEGIN&&z.state!==H.BEGIN_WHITESPACE&&z.state!==H.TEXT&&ne(z,"Unexpected end"),he(z),z.c="",z.closed=!0,ie(z,"onend"),l.call(z,z.strict,z.opt),z}function ue(z,$){if((typeof z=="undefined"?"undefined":(0,S.default)(z))!=="object"||!(z instanceof l))throw new Error("bad call to strictFail");z.strict&&ne(z,$)}function te(z){z.strict||(z.tagName=z.tagName[z.looseCase]());var $=z.tags[z.tags.length-1]||z,me=z.tag={name:z.tagName,attributes:{}};z.opt.xmlns&&(me.ns=$.ns),z.attribList.length=0,ce(z,"onopentagstart",me)}function oe(z,$){var me=z.indexOf(":"),pe=me<0?["",z]:z.split(":"),xe=pe[0],Re=pe[1];return $&&z==="xmlns"&&(xe="xmlns",Re=""),{prefix:xe,local:Re}}function Q(z){if(z.strict||(z.attribName=z.attribName[z.looseCase]()),z.attribList.indexOf(z.attribName)!==-1||z.tag.attributes.hasOwnProperty(z.attribName)){z.attribName=z.attribValue="";return}if(z.opt.xmlns){var $=oe(z.attribName,!0),me=$.prefix,pe=$.local;if(me==="xmlns")if(pe==="xml"&&z.attribValue!==b)ue(z,"xml: prefix must be bound to "+b+`
|
|
|
Actual: `+z.attribValue);else if(pe==="xmlns"&&z.attribValue!==x)ue(z,"xmlns: prefix must be bound to "+x+`
|
|
|
Actual: `+z.attribValue);else{var xe=z.tag,Re=z.tags[z.tags.length-1]||z;xe.ns===Re.ns&&(xe.ns=(0,f.default)(Re.ns)),xe.ns[pe]=z.attribValue}z.attribList.push([z.attribName,z.attribValue])}else z.tag.attributes[z.attribName]=z.attribValue,ce(z,"onattribute",{name:z.attribName,value:z.attribValue});z.attribName=z.attribValue=""}function se(z,$){if(z.opt.xmlns){var me=z.tag,pe=oe(z.tagName);me.prefix=pe.prefix,me.local=pe.local,me.uri=me.ns[pe.prefix]||"",me.prefix&&!me.uri&&(ue(z,"Unbound namespace prefix: "+(0,_.default)(z.tagName)),me.uri=pe.prefix);var xe=z.tags[z.tags.length-1]||z;me.ns&&xe.ns!==me.ns&&(0,r.default)(me.ns).forEach(function(Ie){ce(z,"onopennamespace",{prefix:Ie,uri:me.ns[Ie]})});for(var Re=0,ke=z.attribList.length;Re<ke;Re++){var Ne=z.attribList[Re],Pe=Ne[0],je=Ne[1],Fe=oe(Pe,!0),We=Fe.prefix,_e=Fe.local,Ge=We===""?"":me.ns[We]||"",Ve={name:Pe,value:je,prefix:We,local:_e,uri:Ge};We&&We!=="xmlns"&&!Ge&&(ue(z,"Unbound namespace prefix: "+(0,_.default)(We)),Ve.uri=We),z.tag.attributes[Pe]=Ve,ce(z,"onattribute",Ve)}z.attribList.length=0}z.tag.isSelfClosing=!!$,z.sawRoot=!0,z.tags.push(z.tag),ce(z,"onopentag",z.tag),$||(!z.noscript&&z.tagName.toLowerCase()==="script"?z.state=H.SCRIPT:z.state=H.TEXT,z.tag=null,z.tagName=""),z.attribName=z.attribValue="",z.attribList.length=0}function J(z){if(!z.tagName){ue(z,"Weird empty close tag."),z.textNode+="</>",z.state=H.TEXT;return}if(z.script){if(z.tagName!=="script"){z.script+="</"+z.tagName+">",z.tagName="",z.state=H.SCRIPT;return}ce(z,"onscript",z.script),z.script=""}var $=z.tags.length,me=z.tagName;z.strict||(me=me[z.looseCase]());for(var pe=me;$--;){var xe=z.tags[$];if(xe.name!==pe)ue(z,"Unexpected close tag");else break}if($<0){ue(z,"Unmatched closing tag: "+z.tagName),z.textNode+="</"+z.tagName+">",z.state=H.TEXT;return}z.tagName=me;for(var Re=z.tags.length;Re-- >$;){var ke=z.tag=z.tags.pop();z.tagName=z.tag.name,ce(z,"onclosetag",z.tagName);var Ne={};for(var Pe in ke.ns)Ne[Pe]=ke.ns[Pe];var je=z.tags[z.tags.length-1]||z;z.opt.xmlns&&ke.ns!==je.ns&&(0,r.default)(ke.ns).forEach(function(Fe){var We=ke.ns[Fe];ce(z,"onclosenamespace",{prefix:Fe,uri:We})})}$===0&&(z.closedRoot=!0),z.tagName=z.attribValue=z.attribName="",z.attribList.length=0,z.state=H.TEXT}function ee(z){var $=z.entity,me=$.toLowerCase(),pe,xe="";return z.ENTITIES[$]?z.ENTITIES[$]:z.ENTITIES[me]?z.ENTITIES[me]:($=me,$.charAt(0)==="#"&&($.charAt(1)==="x"?($=$.slice(2),pe=parseInt($,16),xe=pe.toString(16)):($=$.slice(1),pe=parseInt($,10),xe=pe.toString(10))),$=$.replace(/^0+/,""),isNaN(pe)||xe.toLowerCase()!==$?(ue(z,"Invalid character entity"),"&"+z.entity+";"):(0,T.default)(pe))}function ge(z,$){$==="<"?(z.state=H.OPEN_WAKA,z.startTagPosition=z.position):G($)||(ue(z,"Non-whitespace before first tag."),z.textNode=$,z.state=H.TEXT)}function re(z,$){var me="";return $<z.length&&(me=z.charAt($)),me}function Y(z){var $=this;if(this.error)throw this.error;if($.closed)return ne($,"Cannot write after close. Assign an onready handler.");if(z===null)return le($);(typeof z=="undefined"?"undefined":(0,S.default)(z))==="object"&&(z=z.toString());for(var me=0,pe="";!(pe=re(z,me++),$.c=pe,!pe);){$.trackPosition&&($.position++,pe===`
|
|
|
`?($.line++,$.column=0):$.column++);switch($.state){case H.BEGIN:if($.state=H.BEGIN_WHITESPACE,pe==="\uFEFF")continue;ge($,pe);continue;case H.BEGIN_WHITESPACE:ge($,pe);continue;case H.TEXT:if($.sawRoot&&!$.closedRoot){for(var xe=me-1;pe&&pe!=="<"&&pe!=="&";)pe=re(z,me++),pe&&$.trackPosition&&($.position++,pe===`
|
|
|
`?($.line++,$.column=0):$.column++);$.textNode+=z.substring(xe,me-1)}pe==="<"&&!($.sawRoot&&$.closedRoot&&!$.strict)?($.state=H.OPEN_WAKA,$.startTagPosition=$.position):(!G(pe)&&(!$.sawRoot||$.closedRoot)&&ue($,"Text data outside of root node."),pe==="&"?$.state=H.TEXT_ENTITY:$.textNode+=pe);continue;case H.SCRIPT:pe==="<"?$.state=H.SCRIPT_ENDING:$.script+=pe;continue;case H.SCRIPT_ENDING:pe==="/"?$.state=H.CLOSE_TAG:($.script+="<"+pe,$.state=H.SCRIPT);continue;case H.OPEN_WAKA:if(pe==="!")$.state=H.SGML_DECL,$.sgmlDecl="";else if(!G(pe))if(B(F,pe))$.state=H.OPEN_TAG,$.tagName=pe;else if(pe==="/")$.state=H.CLOSE_TAG,$.tagName="";else if(pe==="?")$.state=H.PROC_INST,$.procInstName=$.procInstBody="";else{if(ue($,"Unencoded <"),$.startTagPosition+1<$.position){var Re=$.position-$.startTagPosition;pe=new Array(Re).join(" ")+pe}$.textNode+="<"+pe,$.state=H.TEXT}continue;case H.SGML_DECL:($.sgmlDecl+pe).toUpperCase()===D?(ce($,"onopencdata"),$.state=H.CDATA,$.sgmlDecl="",$.cdata=""):$.sgmlDecl+pe==="--"?($.state=H.COMMENT,$.comment="",$.sgmlDecl=""):($.sgmlDecl+pe).toUpperCase()===c?($.state=H.DOCTYPE,($.doctype||$.sawRoot)&&ue($,"Inappropriately located doctype declaration"),$.doctype="",$.sgmlDecl=""):pe===">"?(ce($,"onsgmldeclaration",$.sgmlDecl),$.sgmlDecl="",$.state=H.TEXT):(W(pe)&&($.state=H.SGML_DECL_QUOTED),$.sgmlDecl+=pe);continue;case H.SGML_DECL_QUOTED:pe===$.q&&($.state=H.SGML_DECL,$.q=""),$.sgmlDecl+=pe;continue;case H.DOCTYPE:pe===">"?($.state=H.TEXT,ce($,"ondoctype",$.doctype),$.doctype=!0):($.doctype+=pe,pe==="["?$.state=H.DOCTYPE_DTD:W(pe)&&($.state=H.DOCTYPE_QUOTED,$.q=pe));continue;case H.DOCTYPE_QUOTED:$.doctype+=pe,pe===$.q&&($.q="",$.state=H.DOCTYPE);continue;case H.DOCTYPE_DTD:$.doctype+=pe,pe==="]"?$.state=H.DOCTYPE:W(pe)&&($.state=H.DOCTYPE_DTD_QUOTED,$.q=pe);continue;case H.DOCTYPE_DTD_QUOTED:$.doctype+=pe,pe===$.q&&($.state=H.DOCTYPE_DTD,$.q="");continue;case H.COMMENT:pe==="-"?$.state=H.COMMENT_ENDING:$.comment+=pe;continue;case H.COMMENT_ENDING:pe==="-"?($.state=H.COMMENT_ENDED,$.comment=be($.opt,$.comment),$.comment&&ce($,"oncomment",$.comment),$.comment=""):($.comment+="-"+pe,$.state=H.COMMENT);continue;case H.COMMENT_ENDED:pe!==">"?(ue($,"Malformed comment"),$.comment+="--"+pe,$.state=H.COMMENT):$.state=H.TEXT;continue;case H.CDATA:pe==="]"?$.state=H.CDATA_ENDING:$.cdata+=pe;continue;case H.CDATA_ENDING:pe==="]"?$.state=H.CDATA_ENDING_2:($.cdata+="]"+pe,$.state=H.CDATA);continue;case H.CDATA_ENDING_2:pe===">"?($.cdata&&ce($,"oncdata",$.cdata),ce($,"onclosecdata"),$.cdata="",$.state=H.TEXT):pe==="]"?$.cdata+="]":($.cdata+="]]"+pe,$.state=H.CDATA);continue;case H.PROC_INST:pe==="?"?$.state=H.PROC_INST_ENDING:G(pe)?$.state=H.PROC_INST_BODY:$.procInstName+=pe;continue;case H.PROC_INST_BODY:if(!$.procInstBody&&G(pe))continue;pe==="?"?$.state=H.PROC_INST_ENDING:$.procInstBody+=pe;continue;case H.PROC_INST_ENDING:pe===">"?(ce($,"onprocessinginstruction",{name:$.procInstName,body:$.procInstBody}),$.procInstName=$.procInstBody="",$.state=H.TEXT):($.procInstBody+="?"+pe,$.state=H.PROC_INST_BODY);continue;case H.OPEN_TAG:B(j,pe)?$.tagName+=pe:(te($),pe===">"?se($):pe==="/"?$.state=H.OPEN_TAG_SLASH:(G(pe)||ue($,"Invalid character in tag name"),$.state=H.ATTRIB));continue;case H.OPEN_TAG_SLASH:pe===">"?(se($,!0),J($)):(ue($,"Forward-slash in opening tag not followed by >"),$.state=H.ATTRIB);continue;case H.ATTRIB:if(G(pe))continue;pe===">"?se($):pe==="/"?$.state=H.OPEN_TAG_SLASH:B(F,pe)?($.attribName=pe,$.attribValue="",$.state=H.ATTRIB_NAME):ue($,"Invalid attribute name");continue;case H.ATTRIB_NAME:pe==="="?$.state=H.ATTRIB_VALUE:pe===">"?(ue($,"Attribute without value"),$.attribValue=$.attribName,Q($),se($)):G(pe)?$.state=H.ATTRIB_NAME_SAW_WHITE:B(j,pe)?$.attribName+=pe:ue($,"Invalid attribute name");continue;case H.ATTRIB_NAME_SAW_WHITE:if(pe==="=")$.state=H.ATTRIB_VALUE;else{if(G(pe))continue;ue($,"Attribute without value"),$.tag.attributes[$.attribName]="",$.attribValue="",ce($,"onattribute",{name:$.attribName,value:""}),$.attribName="",pe===">"?se($):B(F,pe)?($.attribName=pe,$.state=H.ATTRIB_NAME):(ue($,"Invalid attribute name"),$.state=H.ATTRIB)}continue;case H.ATTRIB_VALUE:if(G(pe))continue;W(pe)?($.q=pe,$.state=H.ATTRIB_VALUE_QUOTED):(ue($,"Unquoted attribute value"),$.state=H.ATTRIB_VALUE_UNQUOTED,$.attribValue=pe);continue;case H.ATTRIB_VALUE_QUOTED:if(pe!==$.q){pe==="&"?$.state=H.ATTRIB_VALUE_ENTITY_Q:$.attribValue+=pe;continue}Q($),$.q="",$.state=H.ATTRIB_VALUE_CLOSED;continue;case H.ATTRIB_VALUE_CLOSED:G(pe)?$.state=H.ATTRIB:pe===">"?se($):pe==="/"?$.state=H.OPEN_TAG_SLASH:B(F,pe)?(ue($,"No whitespace between attributes"),$.attribName=pe,$.attribValue="",$.state=H.ATTRIB_NAME):ue($,"Invalid attribute name");continue;case H.ATTRIB_VALUE_UNQUOTED:if(!K(pe)){pe==="&"?$.state=H.ATTRIB_VALUE_ENTITY_U:$.attribValue+=pe;continue}Q($),pe===">"?se($):$.state=H.ATTRIB;continue;case H.CLOSE_TAG:if($.tagName)pe===">"?J($):B(j,pe)?$.tagName+=pe:$.script?($.script+="</"+$.tagName,$.tagName="",$.state=H.SCRIPT):(G(pe)||ue($,"Invalid tagname in closing tag"),$.state=H.CLOSE_TAG_SAW_WHITE);else{if(G(pe))continue;U(F,pe)?$.script?($.script+="</"+pe,$.state=H.SCRIPT):ue($,"Invalid tagname in closing tag."):$.tagName=pe}continue;case H.CLOSE_TAG_SAW_WHITE:if(G(pe))continue;pe===">"?J($):ue($,"Invalid characters in closing tag");continue;case H.TEXT_ENTITY:case H.ATTRIB_VALUE_ENTITY_Q:case H.ATTRIB_VALUE_ENTITY_U:var ke,Ne;switch($.state){case H.TEXT_ENTITY:ke=H.TEXT,Ne="textNode";break;case H.ATTRIB_VALUE_ENTITY_Q:ke=H.ATTRIB_VALUE_QUOTED,Ne="attribValue";break;case H.ATTRIB_VALUE_ENTITY_U:ke=H.ATTRIB_VALUE_UNQUOTED,Ne="attribValue";break}pe===";"?($[Ne]+=ee($),$.entity="",$.state=ke):B($.entity.length?X:k,pe)?$.entity+=pe:(ue($,"Invalid character in entity name"),$[Ne]+="&"+$.entity+pe,$.entity="",$.state=ke);continue;default:throw new Error($,"Unknown state: "+$.state)}}return $.position>=$.bufferCheckPosition&&n($),$}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */T.default||function(){var z=String.fromCharCode,$=Math.floor,me=function(){var xe=16384,Re=[],ke,Ne,Pe=-1,je=arguments.length;if(!je)return"";for(var Fe="";++Pe<je;){var We=Number(arguments[Pe]);if(!isFinite(We)||We<0||We>1114111||$(We)!==We)throw RangeError("Invalid code point: "+We);We<=65535?Re.push(We):(We-=65536,ke=(We>>10)+55296,Ne=We%1024+56320,Re.push(ke,Ne)),(Pe+1===je||Re.length>xe)&&(Fe+=z.apply(null,Re),Re.length=0)}return Fe};o.default?Object.defineProperty(String,"fromCodePoint",{value:me,configurable:!0,writable:!0}):String.fromCodePoint=me}()})(typeof N=="undefined"?(void 0).sax={}:N)}).call(this,I("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/string/from-code-point":63,"babel-runtime/helpers/typeof":67,buffer:73,stream:230,string_decoder:72}],230:[function(I,Z,N){Z.exports=T;var P=I("events").EventEmitter,m=I("inherits");m(T,P),T.Readable=I("readable-stream/readable.js"),T.Writable=I("readable-stream/writable.js"),T.Duplex=I("readable-stream/duplex.js"),T.Transform=I("readable-stream/transform.js"),T.PassThrough=I("readable-stream/passthrough.js"),T.Stream=T;function T(){P.call(this)}T.prototype.pipe=function(L,_){var g=this;function S(h){L.writable&&(L.write(h)===!1&&g.pause&&g.pause())}g.on("data",S);function p(){g.readable&&g.resume&&g.resume()}L.on("drain",p),!L._isStdio&&(!_||_.end!==!1)&&(g.on("end",i),g.on("close",r));var o=!1;function i(){if(o)return;o=!0,L.end()}function r(){if(o)return;o=!0,typeof L.destroy=="function"&&L.destroy()}function d(h){if(f(),P.listenerCount(this,"error")===0)throw h}g.on("error",d),L.on("error",d);function f(){g.removeListener("data",S),L.removeListener("drain",p),g.removeListener("end",i),g.removeListener("close",r),g.removeListener("error",d),L.removeListener("error",d),g.removeListener("end",f),g.removeListener("close",f),L.removeListener("close",f)}return g.on("end",f),g.on("close",f),L.on("close",f),L.emit("pipe",g),L}},{events:192,inherits:196,"readable-stream/duplex.js":213,"readable-stream/passthrough.js":222,"readable-stream/readable.js":223,"readable-stream/transform.js":224,"readable-stream/writable.js":225}],231:[function(I,Z,N){(function(P){var m=I("./lib/request"),T=I("./lib/response"),L=I("xtend"),_=I("builtin-status-codes"),g=I("url"),S=N;S.request=function(p,o){typeof p=="string"?p=g.parse(p):p=L(p);var i=P.location.protocol.search(/^https?:$/)===-1?"http:":"",r=p.protocol||i,d=p.hostname||p.host,f=p.port,h=p.path||"/";d&&d.indexOf(":")!==-1&&(d="["+d+"]"),p.url=(d?r+"//"+d:"")+(f?":"+f:"")+h,p.method=(p.method||"GET").toUpperCase(),p.headers=p.headers||{};var E=new m(p);return o&&E.on("response",o),E},S.get=function(o,i){var r=S.request(o,i);return r.end(),r},S.ClientRequest=m,S.IncomingMessage=T.IncomingMessage,S.Agent=function(){},S.Agent.defaultMaxSockets=4,S.globalAgent=new S.Agent,S.STATUS_CODES=_,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(I,Z,N){(function(P){"use strict";N.fetch=S(P.fetch)&&S(P.ReadableStream),N.writableStream=S(P.WritableStream),N.abortController=S(P.AbortController),N.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),N.blobConstructor=!0}catch(p){}var m;function T(){if(m!==void 0)return m;if(P.XMLHttpRequest){m=new P.XMLHttpRequest;try{m.open("GET",P.XDomainRequest?"/":"https://example.com")}catch(p){m=null}}else m=null;return m}function L(p){var o=T();if(!o)return!1;try{return o.responseType=p,o.responseType===p}catch(i){}return!1}var _=typeof P.ArrayBuffer!="undefined",g=_&&S(P.ArrayBuffer.prototype.slice);N.arraybuffer=N.fetch||_&&L("arraybuffer"),N.msstream=!N.fetch&&g&&L("ms-stream"),N.mozchunkedarraybuffer=!N.fetch&&_&&L("moz-chunked-arraybuffer"),N.overrideMimeType=N.fetch||(T()?S(T().overrideMimeType):!1),N.vbArray=S(P.VBArray);function S(p){return typeof p=="function"}m=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(I,Z,N){(function(P,m,T){"use strict";var L=I("babel-runtime/core-js/object/keys"),_=g(L);function g(n){return n&&n.__esModule?n:{default:n}}var S=I("./capability"),p=I("inherits"),o=I("./response"),i=I("readable-stream"),r=I("to-arraybuffer"),d=o.IncomingMessage,f=o.readyStates;function h(n,s){return S.fetch&&s?"fetch":S.mozchunkedarraybuffer?"moz-chunked-arraybuffer":S.msstream?"ms-stream":S.arraybuffer&&n?"arraybuffer":S.vbArray&&n?"text:vbarray":"text"}var E=Z.exports=function(n){var s=this;i.Writable.call(s),s._opts=n,s._body=[],s._headers={},n.auth&&s.setHeader("Authorization","Basic "+new T(n.auth).toString("base64")),(0,_.default)(n.headers).forEach(function(v){s.setHeader(v,n.headers[v])});var u,w=!0;if(n.mode==="disable-fetch"||"requestTimeout"in n&&!S.abortController)w=!1,u=!0;else if(n.mode==="prefer-streaming")u=!1;else if(n.mode==="allow-wrong-content-type")u=!S.overrideMimeType;else if(!n.mode||n.mode==="default"||n.mode==="prefer-fast")u=!0;else throw new Error("Invalid value for opts.mode");s._mode=h(u,w),s._fetchTimer=null,s.on("finish",function(){s._onFinish()})};p(E,i.Writable),E.prototype.setHeader=function(n,s){var u=this,w=n.toLowerCase();if(l.indexOf(w)!==-1)return;u._headers[w]={name:n,value:s}},E.prototype.getHeader=function(n){var s=this._headers[n.toLowerCase()];return s?s.value:null},E.prototype.removeHeader=function(n){var s=this;delete s._headers[n.toLowerCase()]},E.prototype._onFinish=function(){var n=this;if(n._destroyed)return;var s=n._opts,u=n._headers,w=null;s.method!=="GET"&&s.method!=="HEAD"&&(S.arraybuffer?w=r(T.concat(n._body)):S.blobConstructor?w=new m.Blob(n._body.map(function(b){return r(b)}),{type:(u["content-type"]||{}).value||""}):w=T.concat(n._body).toString());var v=[];if((0,_.default)(u).forEach(function(b){var x=u[b].name,C=u[b].value;Array.isArray(C)?C.forEach(function(F){v.push([x,F])}):v.push([x,C])}),n._mode==="fetch"){var a=null,R=null;if(S.abortController){var D=new AbortController;a=D.signal,n._fetchAbortController=D,"requestTimeout"in s&&s.requestTimeout!==0&&(n._fetchTimer=m.setTimeout(function(){n.emit("requestTimeout"),n._fetchAbortController&&n._fetchAbortController.abort()},s.requestTimeout))}m.fetch(n._opts.url,{method:n._opts.method,headers:v,body:w||void 0,mode:"cors",credentials:s.withCredentials?"include":"same-origin",signal:a}).then(function(b){n._fetchResponse=b,n._connect()},function(b){m.clearTimeout(n._fetchTimer),n._destroyed||n.emit("error",b)})}else{var c=n._xhr=new m.XMLHttpRequest;try{c.open(n._opts.method,n._opts.url,!0)}catch(b){P.nextTick(function(){n.emit("error",b)});return}"responseType"in c&&(c.responseType=n._mode.split(":")[0]),"withCredentials"in c&&(c.withCredentials=!!s.withCredentials),n._mode==="text"&&"overrideMimeType"in c&&c.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in s&&(c.timeout=s.requestTimeout,c.ontimeout=function(){n.emit("requestTimeout")}),v.forEach(function(b){c.setRequestHeader(b[0],b[1])}),n._response=null,c.onreadystatechange=function(){switch(c.readyState){case f.LOADING:case f.DONE:n._onXHRProgress();break}},n._mode==="moz-chunked-arraybuffer"&&(c.onprogress=function(){n._onXHRProgress()}),c.onerror=function(){if(n._destroyed)return;n.emit("error",new Error("XHR error"))};try{c.send(w)}catch(b){P.nextTick(function(){n.emit("error",b)});return}}};function y(n){try{var s=n.status;return s!==null&&s!==0}catch(u){return!1}}E.prototype._onXHRProgress=function(){var n=this;if(!y(n._xhr)||n._destroyed)return;n._response||n._connect(),n._response._onXHRProgress()},E.prototype._connect=function(){var n=this;if(n._destroyed)return;n._response=new d(n._xhr,n._fetchResponse,n._mode,n._fetchTimer),n._response.on("error",function(s){n.emit("error",s)}),n.emit("response",n._response)},E.prototype._write=function(n,s,u){var w=this;w._body.push(n),u()},E.prototype.abort=E.prototype.destroy=function(){var n=this;n._destroyed=!0,m.clearTimeout(n._fetchTimer),n._response&&(n._response._destroyed=!0),n._xhr?n._xhr.abort():n._fetchAbortController&&n._fetchAbortController.abort()},E.prototype.end=function(n,s,u){var w=this;typeof n=="function"&&(u=n,n=void 0),i.Writable.prototype.end.call(w,n,s,u)},E.prototype.flushHeaders=function(){},E.prototype.setTimeout=function(){},E.prototype.setNoDelay=function(){},E.prototype.setSocketKeepAlive=function(){};var l=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,I("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},I("buffer").Buffer)},{"./capability":232,"./response":234,_process:208,"babel-runtime/core-js/object/keys":60,buffer:73,inherits:196,"readable-stream":223,"to-arraybuffer":237}],234:[function(I,Z,N){(function(P,m,T){"use strict";var L=I("babel-runtime/core-js/promise"),_=g(L);function g(d){return d&&d.__esModule?d:{default:d}}var S=I("./capability"),p=I("inherits"),o=I("readable-stream"),i=N.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},r=N.IncomingMessage=function(d,f,h,E){var y=this;if(o.Readable.call(y),y._mode=h,y.headers={},y.rawHeaders=[],y.trailers={},y.rawTrailers=[],y.on("end",function(){P.nextTick(function(){y.emit("close")})}),h==="fetch"){var l=function a(){s.read().then(function(R){if(y._destroyed)return;if(R.done){m.clearTimeout(E),y.push(null);return}y.push(new T(R.value)),a()}).catch(function(R){m.clearTimeout(E),y._destroyed||y.emit("error",R)})};if(y._fetchResponse=f,y.url=f.url,y.statusCode=f.status,y.statusMessage=f.statusText,f.headers.forEach(function(a,R){y.headers[R.toLowerCase()]=a,y.rawHeaders.push(R,a)}),S.writableStream){var n=new WritableStream({write:function(R){return new _.default(function(D,c){y._destroyed?c():y.push(new T(R))?D():y._resumeFetch=D})},close:function(){m.clearTimeout(E),y._destroyed||y.push(null)},abort:function(R){y._destroyed||y.emit("error",R)}});try{f.body.pipeTo(n).catch(function(a){m.clearTimeout(E),y._destroyed||y.emit("error",a)});return}catch(a){}}var s=f.body.getReader();l()}else{y._xhr=d,y._pos=0,y.url=d.responseURL,y.statusCode=d.status,y.statusMessage=d.statusText;var u=d.getAllResponseHeaders().split(/\r?\n/);if(u.forEach(function(a){var R=a.match(/^([^:]+):\s*(.*)/);if(R){var D=R[1].toLowerCase();D==="set-cookie"?(y.headers[D]===void 0&&(y.headers[D]=[]),y.headers[D].push(R[2])):y.headers[D]!==void 0?y.headers[D]+=", "+R[2]:y.headers[D]=R[2],y.rawHeaders.push(R[1],R[2])}}),y._charset="x-user-defined",!S.overrideMimeType){var w=y.rawHeaders["mime-type"];if(w){var v=w.match(/;\s*charset=([^;])(;|$)/);v&&(y._charset=v[1].toLowerCase())}y._charset||(y._charset="utf-8")}}};p(r,o.Readable),r.prototype._read=function(){var d=this,f=d._resumeFetch;f&&(d._resumeFetch=null,f())},r.prototype._onXHRProgress=function(){var d=this,f=d._xhr,h=null;switch(d._mode){case"text:vbarray":if(f.readyState!==i.DONE)break;try{h=new m.VBArray(f.responseBody).toArray()}catch(s){}if(h!==null){d.push(new T(h));break}case"text":try{h=f.responseText}catch(s){d._mode="text:vbarray";break}if(h.length>d._pos){var E=h.substr(d._pos);if(d._charset==="x-user-defined"){for(var y=new T(E.length),l=0;l<E.length;l++)y[l]=E.charCodeAt(l)&255;d.push(y)}else d.push(E,d._charset);d._pos=h.length}break;case"arraybuffer":if(f.readyState!==i.DONE||!f.response)break;h=f.response,d.push(new T(new Uint8Array(h)));break;case"moz-chunked-arraybuffer":if(h=f.response,f.readyState!==i.LOADING||!h)break;d.push(new T(new Uint8Array(h)));break;case"ms-stream":if(h=f.response,f.readyState!==i.LOADING)break;var n=new m.MSStreamReader;n.onprogress=function(){n.result.byteLength>d._pos&&(d.push(new T(new Uint8Array(n.result.slice(d._pos)))),d._pos=n.result.byteLength)},n.onload=function(){d.push(null)},n.readAsArrayBuffer(h);break}d._xhr.readyState===i.DONE&&d._mode!=="ms-stream"&&d.push(null)}}).call(this,I("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},I("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(I,Z,N){"use strict";var P=I("safe-buffer").Buffer,m=P.isEncoding||function(n){n=""+n;switch(n&&n.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function T(n){if(!n)return"utf8";for(var s;;)switch(n){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return n;default:if(s)return;n=(""+n).toLowerCase(),s=!0}}function L(n){var s=T(n);if(typeof s!="string"&&(P.isEncoding===m||!m(n)))throw new Error("Unknown encoding: "+n);return s||n}N.StringDecoder=_;function _(n){this.encoding=L(n);var s;switch(this.encoding){case"utf16le":this.text=d,this.end=f,s=4;break;case"utf8":this.fillLast=o,s=4;break;case"base64":this.text=h,this.end=E,s=3;break;default:this.write=y,this.end=l;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=P.allocUnsafe(s)}_.prototype.write=function(n){if(n.length===0)return"";var s,u;if(this.lastNeed){if(s=this.fillLast(n),s===void 0)return"";u=this.lastNeed,this.lastNeed=0}else u=0;return u<n.length?s?s+this.text(n,u):this.text(n,u):s||""},_.prototype.end=r,_.prototype.text=i,_.prototype.fillLast=function(n){if(this.lastNeed<=n.length)return n.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,this.lastTotal-this.lastNeed,0,n.length),this.lastNeed-=n.length};function g(n){return n<=127?0:n>>5===6?2:n>>4===14?3:n>>3===30?4:n>>6===2?-1:-2}function S(n,s,u){var w=s.length-1;if(w<u)return 0;var v=g(s[w]);return v>=0?(v>0&&(n.lastNeed=v-1),v):--w<u||v===-2?0:(v=g(s[w]),v>=0?(v>0&&(n.lastNeed=v-2),v):--w<u||v===-2?0:(v=g(s[w]),v>=0?(v>0&&(v===2?v=0:n.lastNeed=v-3),v):0))}function p(n,s,u){if((s[0]&192)!==128)return n.lastNeed=0,"\uFFFD";if(n.lastNeed>1&&s.length>1){if((s[1]&192)!==128)return n.lastNeed=1,"\uFFFD";if(n.lastNeed>2&&s.length>2&&(s[2]&192)!==128)return n.lastNeed=2,"\uFFFD"}}function o(n){var s=this.lastTotal-this.lastNeed,u=p(this,n,s);if(u!==void 0)return u;if(this.lastNeed<=n.length)return n.copy(this.lastChar,s,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);n.copy(this.lastChar,s,0,n.length),this.lastNeed-=n.length}function i(n,s){var u=S(this,n,s);if(!this.lastNeed)return n.toString("utf8",s);this.lastTotal=u;var w=n.length-(u-this.lastNeed);return n.copy(this.lastChar,0,w),n.toString("utf8",s,w)}function r(n){var s=n&&n.length?this.write(n):"";return this.lastNeed?s+"\uFFFD":s}function d(n,s){if((n.length-s)%2===0){var u=n.toString("utf16le",s);if(u){var w=u.charCodeAt(u.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1],u.slice(0,-1)}return u}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=n[n.length-1],n.toString("utf16le",s,n.length-1)}function f(n){var s=n&&n.length?this.write(n):"";if(this.lastNeed){var u=this.lastTotal-this.lastNeed;return s+this.lastChar.toString("utf16le",0,u)}return s}function h(n,s){var u=(n.length-s)%3;return u===0?n.toString("base64",s):(this.lastNeed=3-u,this.lastTotal=3,u===1?this.lastChar[0]=n[n.length-1]:(this.lastChar[0]=n[n.length-2],this.lastChar[1]=n[n.length-1]),n.toString("base64",s,n.length-u))}function E(n){var s=n&&n.length?this.write(n):"";return this.lastNeed?s+this.lastChar.toString("base64",0,3-this.lastNeed):s}function y(n){return n.toString(this.encoding)}function l(n){return n&&n.length?this.write(n):""}},{"safe-buffer":228}],236:[function(I,Z,N){(function(P,m){var T=I("process/browser.js").nextTick,L=Function.prototype.apply,_=Array.prototype.slice,g={},S=0;N.setTimeout=function(){return new p(L.call(setTimeout,window,arguments),clearTimeout)},N.setInterval=function(){return new p(L.call(setInterval,window,arguments),clearInterval)},N.clearTimeout=N.clearInterval=function(o){o.close()};function p(o,i){this._id=o,this._clearFn=i}p.prototype.unref=p.prototype.ref=function(){},p.prototype.close=function(){this._clearFn.call(window,this._id)},N.enroll=function(o,i){clearTimeout(o._idleTimeoutId),o._idleTimeout=i},N.unenroll=function(o){clearTimeout(o._idleTimeoutId),o._idleTimeout=-1},N._unrefActive=N.active=function(o){clearTimeout(o._idleTimeoutId);var i=o._idleTimeout;i>=0&&(o._idleTimeoutId=setTimeout(function(){o._onTimeout&&o._onTimeout()},i))},N.setImmediate=typeof P=="function"?P:function(o){var i=S++,r=arguments.length<2?!1:_.call(arguments,1);return g[i]=!0,T(function(){g[i]&&(r?o.apply(null,r):o.call(null),N.clearImmediate(i))}),i},N.clearImmediate=typeof m=="function"?m:function(o){delete g[o]}}).call(this,I("timers").setImmediate,I("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(I,Z,N){var P=I("buffer").Buffer;Z.exports=function(m){if(m instanceof Uint8Array){if(m.byteOffset===0&&m.byteLength===m.buffer.byteLength)return m.buffer;if(typeof m.buffer.slice=="function")return m.buffer.slice(m.byteOffset,m.byteOffset+m.byteLength)}if(P.isBuffer(m)){for(var T=new Uint8Array(m.length),L=m.length,_=0;_<L;_++)T[_]=m[_];return T.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(I,Z,N){"use strict";var P=I("punycode"),m=I("./util");N.parse=s,N.resolve=w,N.resolveObject=v,N.format=u,N.Url=T;function T(){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 L=/^([a-z0-9.+-]+:)/i,_=/:[0-9]*$/,g=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,S=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],p=["{","}","|","\\","^","`"].concat(S),o=["'"].concat(p),i=["%","/","?",";","#"].concat(o),r=["/","?","#"],d=255,f=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,E={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},l={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},n=I("querystring");function s(a,R,D){if(a&&m.isObject(a)&&a instanceof T)return a;var c=new T;return c.parse(a,R,D),c}T.prototype.parse=function(a,R,D){if(!m.isString(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var c=a.indexOf("?"),b=c!==-1&&c<a.indexOf("#")?"?":"#",x=a.split(b),C=/\\/g;x[0]=x[0].replace(C,"/"),a=x.join(b);var F=a;if(F=F.trim(),!D&&a.split("#").length===1){var j=g.exec(F);if(j)return this.path=F,this.href=F,this.pathname=j[1],j[2]?(this.search=j[2],R?this.query=n.parse(this.search.substr(1)):this.query=this.search.substr(1)):R&&(this.search="",this.query={}),this}var k=L.exec(F);if(k){k=k[0];var X=k.toLowerCase();this.protocol=X,F=F.substr(k.length)}if(D||k||F.match(/^\/\/[^@\/]+@[^@\/]+/)){var G=F.substr(0,2)==="//";G&&!(k&&y[k])&&(F=F.substr(2),this.slashes=!0)}if(!y[k]&&(G||k&&!l[k])){for(var W=-1,K=0;K<r.length;K++){var B=F.indexOf(r[K]);B!==-1&&(W===-1||B<W)&&(W=B)}var U,H;W===-1?H=F.lastIndexOf("@"):H=F.lastIndexOf("@",W),H!==-1&&(U=F.slice(0,H),F=F.slice(H+1),this.auth=decodeURIComponent(U)),W=-1;for(var K=0;K<i.length;K++){var B=F.indexOf(i[K]);B!==-1&&(W===-1||B<W)&&(W=B)}W===-1&&(W=F.length),this.host=F.slice(0,W),F=F.slice(W),this.parseHost(),this.hostname=this.hostname||"";var q=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!q)for(var ie=this.hostname.split(/\./),K=0,ce=ie.length;K<ce;K++){var he=ie[K];if(!he)continue;if(!he.match(f)){for(var be="",ne=0,le=he.length;ne<le;ne++)he.charCodeAt(ne)>127?be+="x":be+=he[ne];if(!be.match(f)){var ue=ie.slice(0,K),te=ie.slice(K+1),oe=he.match(h);oe&&(ue.push(oe[1]),te.unshift(oe[2])),te.length&&(F="/"+te.join(".")+F),this.hostname=ue.join(".");break}}}this.hostname.length>d?this.hostname="":this.hostname=this.hostname.toLowerCase(),q||(this.hostname=P.toASCII(this.hostname));var Q=this.port?":"+this.port:"",se=this.hostname||"";this.host=se+Q,this.href+=this.host,q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),F[0]!=="/"&&(F="/"+F))}if(!E[X])for(var K=0,ce=o.length;K<ce;K++){var J=o[K];if(F.indexOf(J)===-1)continue;var ee=encodeURIComponent(J);ee===J&&(ee=escape(J)),F=F.split(J).join(ee)}var ge=F.indexOf("#");ge!==-1&&(this.hash=F.substr(ge),F=F.slice(0,ge));var re=F.indexOf("?");if(re!==-1?(this.search=F.substr(re),this.query=F.substr(re+1),R&&(this.query=n.parse(this.query)),F=F.slice(0,re)):R&&(this.search="",this.query={}),F&&(this.pathname=F),l[X]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Q=this.pathname||"",Y=this.search||"";this.path=Q+Y}return this.href=this.format(),this};function u(a){return m.isString(a)&&(a=s(a)),a instanceof T?a.format():T.prototype.format.call(a)}T.prototype.format=function(){var a=this.auth||"";a&&(a=encodeURIComponent(a),a=a.replace(/%3A/i,":"),a+="@");var R=this.protocol||"",D=this.pathname||"",c=this.hash||"",b=!1,x="";this.host?b=a+this.host:this.hostname&&(b=a+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(b+=":"+this.port)),this.query&&m.isObject(this.query)&&Object.keys(this.query).length&&(x=n.stringify(this.query));var C=this.search||x&&"?"+x||"";return R&&R.substr(-1)!==":"&&(R+=":"),this.slashes||(!R||l[R])&&b!==!1?(b="//"+(b||""),D&&D.charAt(0)!=="/"&&(D="/"+D)):b||(b=""),c&&c.charAt(0)!=="#"&&(c="#"+c),C&&C.charAt(0)!=="?"&&(C="?"+C),D=D.replace(/[?#]/g,function(F){return encodeURIComponent(F)}),C=C.replace("#","%23"),R+b+D+C+c};function w(a,R){return s(a,!1,!0).resolve(R)}T.prototype.resolve=function(a){return this.resolveObject(s(a,!1,!0)).format()};function v(a,R){return a?s(a,!1,!0).resolveObject(R):R}T.prototype.resolveObject=function(a){if(m.isString(a)){var R=new T;R.parse(a,!1,!0),a=R}for(var D=new T,c=Object.keys(this),b=0;b<c.length;b++){var x=c[b];D[x]=this[x]}if(D.hash=a.hash,a.href==="")return D.href=D.format(),D;if(a.slashes&&!a.protocol){for(var C=Object.keys(a),F=0;F<C.length;F++){var j=C[F];j!=="protocol"&&(D[j]=a[j])}return l[D.protocol]&&D.hostname&&!D.pathname&&(D.path=D.pathname="/"),D.href=D.format(),D}if(a.protocol&&a.protocol!==D.protocol){if(!l[a.protocol]){for(var k=Object.keys(a),X=0;X<k.length;X++){var G=k[X];D[G]=a[G]}return D.href=D.format(),D}if(D.protocol=a.protocol,!a.host&&!y[a.protocol]){for(var ce=(a.pathname||"").split("/");ce.length&&!(a.host=ce.shift()););a.host||(a.host=""),a.hostname||(a.hostname=""),ce[0]!==""&&ce.unshift(""),ce.length<2&&ce.unshift(""),D.pathname=ce.join("/")}else D.pathname=a.pathname;if(D.search=a.search,D.query=a.query,D.host=a.host||"",D.auth=a.auth,D.hostname=a.hostname||a.host,D.port=a.port,D.pathname||D.search){var W=D.pathname||"",K=D.search||"";D.path=W+K}return D.slashes=D.slashes||a.slashes,D.href=D.format(),D}var B=D.pathname&&D.pathname.charAt(0)==="/",U=a.host||a.pathname&&a.pathname.charAt(0)==="/",H=U||B||D.host&&a.pathname,q=H,ie=D.pathname&&D.pathname.split("/")||[],ce=a.pathname&&a.pathname.split("/")||[],he=D.protocol&&!l[D.protocol];if(he&&(D.hostname="",D.port=null,D.host&&(ie[0]===""?ie[0]=D.host:ie.unshift(D.host)),D.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(ce[0]===""?ce[0]=a.host:ce.unshift(a.host)),a.host=null),H=H&&(ce[0]===""||ie[0]==="")),U)D.host=a.host||a.host===""?a.host:D.host,D.hostname=a.hostname||a.hostname===""?a.hostname:D.hostname,D.search=a.search,D.query=a.query,ie=ce;else if(ce.length)ie||(ie=[]),ie.pop(),ie=ie.concat(ce),D.search=a.search,D.query=a.query;else if(!m.isNullOrUndefined(a.search)){if(he){D.hostname=D.host=ie.shift();var be=D.host&&D.host.indexOf("@")>0?D.host.split("@"):!1;be&&(D.auth=be.shift(),D.host=D.hostname=be.shift())}return D.search=a.search,D.query=a.query,(!m.isNull(D.pathname)||!m.isNull(D.search))&&(D.path=(D.pathname?D.pathname:"")+(D.search?D.search:"")),D.href=D.format(),D}if(!ie.length)return D.pathname=null,D.search?D.path="/"+D.search:D.path=null,D.href=D.format(),D;for(var ne=ie.slice(-1)[0],le=(D.host||a.host||ie.length>1)&&(ne==="."||ne==="..")||ne==="",ue=0,te=ie.length;te>=0;te--)ne=ie[te],ne==="."?ie.splice(te,1):ne===".."?(ie.splice(te,1),ue++):ue&&(ie.splice(te,1),ue--);if(!H&&!q)for(;ue--;ue)ie.unshift("..");H&&ie[0]!==""&&(!ie[0]||ie[0].charAt(0)!=="/")&&ie.unshift(""),le&&ie.join("/").substr(-1)!=="/"&&ie.push("");var oe=ie[0]===""||ie[0]&&ie[0].charAt(0)==="/";if(he){D.hostname=D.host=oe?"":ie.length?ie.shift():"";var be=D.host&&D.host.indexOf("@")>0?D.host.split("@"):!1;be&&(D.auth=be.shift(),D.host=D.hostname=be.shift())}return H=H||D.host&&ie.length,H&&!oe&&ie.unshift(""),ie.length?D.pathname=ie.join("/"):(D.pathname=null,D.path=null),(!m.isNull(D.pathname)||!m.isNull(D.search))&&(D.path=(D.pathname?D.pathname:"")+(D.search?D.search:"")),D.auth=a.auth||D.auth,D.slashes=D.slashes||a.slashes,D.href=D.format(),D},T.prototype.parseHost=function(){var a=this.host,R=_.exec(a);R&&(R=R[0],R!==":"&&(this.port=R.substr(1)),a=a.substr(0,a.length-R.length)),a&&(this.hostname=a)}},{"./util":239,punycode:209,querystring:212}],239:[function(I,Z,N){"use strict";Z.exports={isString:function(P){return typeof P=="string"},isObject:function(P){return typeof P=="object"&&P!==null},isNull:function(P){return P===null},isNullOrUndefined:function(P){return P==null}}},{}],240:[function(I,Z,N){(function(P){Z.exports=m;function m(L,_){if(T("noDeprecation"))return L;var g=!1;function S(){if(!g){if(T("throwDeprecation"))throw new Error(_);T("traceDeprecation")?console.trace(_):console.warn(_),g=!0}return L.apply(this,arguments)}return S}function T(L){try{if(!P.localStorage)return!1}catch(g){return!1}var _=P.localStorage[L];return _==null?!1:String(_).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(I,Z,N){typeof Object.create=="function"?Z.exports=function(m,T){m.super_=T,m.prototype=Object.create(T.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}})}:Z.exports=function(m,T){m.super_=T;var L=function(){};L.prototype=T.prototype,m.prototype=new L,m.prototype.constructor=m}},{}],242:[function(I,Z,N){Z.exports=function(m){return m&&typeof m=="object"&&typeof m.copy=="function"&&typeof m.fill=="function"&&typeof m.readUInt8=="function"}},{}],243:[function(I,Z,N){(function(P,m){var T=/%[sdj%]/g;N.format=function(W){if(!w(W)){for(var K=[],B=0;B<arguments.length;B++)K.push(g(arguments[B]));return K.join(" ")}for(var B=1,U=arguments,H=U.length,q=String(W).replace(T,function(ce){if(ce==="%%")return"%";if(B>=H)return ce;switch(ce){case"%s":return String(U[B++]);case"%d":return Number(U[B++]);case"%j":try{return JSON.stringify(U[B++])}catch(he){return"[Circular]"}default:return ce}}),ie=U[B];B<H;ie=U[++B])n(ie)||!D(ie)?q+=" "+ie:q+=" "+g(ie);return q},N.deprecate=function(W,K){if(a(m.process))return function(){return N.deprecate(W,K).apply(this,arguments)};if(P.noDeprecation===!0)return W;var B=!1;function U(){if(!B){if(P.throwDeprecation)throw new Error(K);P.traceDeprecation?console.trace(K):console.error(K),B=!0}return W.apply(this,arguments)}return U};var L={},_;N.debuglog=function(W){if(a(_)&&(_=P.env.NODE_DEBUG||""),W=W.toUpperCase(),!L[W])if(new RegExp("\\b"+W+"\\b","i").test(_)){var K=P.pid;L[W]=function(){var B=N.format.apply(N,arguments);console.error("%s %d: %s",W,K,B)}}else L[W]=function(){};return L[W]};function g(W,K){var B={seen:[],stylize:p};return arguments.length>=3&&(B.depth=arguments[2]),arguments.length>=4&&(B.colors=arguments[3]),l(K)?B.showHidden=K:K&&N._extend(B,K),a(B.showHidden)&&(B.showHidden=!1),a(B.depth)&&(B.depth=2),a(B.colors)&&(B.colors=!1),a(B.customInspect)&&(B.customInspect=!0),B.colors&&(B.stylize=S),i(B,W,B.depth)}N.inspect=g,g.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]},g.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function S(W,K){var B=g.styles[K];return B?"["+g.colors[B][0]+"m"+W+"["+g.colors[B][1]+"m":W}function p(W,K){return W}function o(W){var K={};return W.forEach(function(B,U){K[B]=!0}),K}function i(W,K,B){if(W.customInspect&&K&&x(K.inspect)&&K.inspect!==N.inspect&&!(K.constructor&&K.constructor.prototype===K)){var U=K.inspect(B,W);return w(U)||(U=i(W,U,B)),U}var H=r(W,K);if(H)return H;var q=Object.keys(K),ie=o(q);if(W.showHidden&&(q=Object.getOwnPropertyNames(K)),b(K)&&(q.indexOf("message")>=0||q.indexOf("description")>=0))return d(K);if(q.length===0){if(x(K)){var ce=K.name?": "+K.name:"";return W.stylize("[Function"+ce+"]","special")}if(R(K))return W.stylize(RegExp.prototype.toString.call(K),"regexp");if(c(K))return W.stylize(Date.prototype.toString.call(K),"date");if(b(K))return d(K)}var he="",be=!1,ne=["{","}"];if(y(K)&&(be=!0,ne=["[","]"]),x(K)){var le=K.name?": "+K.name:"";he=" [Function"+le+"]"}if(R(K)&&(he=" "+RegExp.prototype.toString.call(K)),c(K)&&(he=" "+Date.prototype.toUTCString.call(K)),b(K)&&(he=" "+d(K)),q.length===0&&(!be||K.length==0))return ne[0]+he+ne[1];if(B<0)return R(K)?W.stylize(RegExp.prototype.toString.call(K),"regexp"):W.stylize("[Object]","special");W.seen.push(K);var ue;return be?ue=f(W,K,B,ie,q):ue=q.map(function(te){return h(W,K,B,ie,te,be)}),W.seen.pop(),E(ue,he,ne)}function r(W,K){if(a(K))return W.stylize("undefined","undefined");if(w(K)){var B="'"+JSON.stringify(K).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return W.stylize(B,"string")}if(u(K))return W.stylize(""+K,"number");if(l(K))return W.stylize(""+K,"boolean");if(n(K))return W.stylize("null","null")}function d(W){return"["+Error.prototype.toString.call(W)+"]"}function f(W,K,B,U,H){for(var q=[],ie=0,ce=K.length;ie<ce;++ie)G(K,String(ie))?q.push(h(W,K,B,U,String(ie),!0)):q.push("");return H.forEach(function(he){he.match(/^\d+$/)||q.push(h(W,K,B,U,he,!0))}),q}function h(W,K,B,U,H,q){var ie,ce,he;if(he=Object.getOwnPropertyDescriptor(K,H)||{value:K[H]},he.get?he.set?ce=W.stylize("[Getter/Setter]","special"):ce=W.stylize("[Getter]","special"):he.set&&(ce=W.stylize("[Setter]","special")),G(U,H)||(ie="["+H+"]"),ce||(W.seen.indexOf(he.value)<0?(n(B)?ce=i(W,he.value,null):ce=i(W,he.value,B-1),ce.indexOf(`
|
|
|
`)>-1&&(q?ce=ce.split(`
|
|
|
`).map(function(be){return" "+be}).join(`
|
|
|
`).substr(2):ce=`
|
|
|
`+ce.split(`
|
|
|
`).map(function(be){return" "+be}).join(`
|
|
|
`))):ce=W.stylize("[Circular]","special")),a(ie)){if(q&&H.match(/^\d+$/))return ce;ie=JSON.stringify(""+H),ie.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ie=ie.substr(1,ie.length-2),ie=W.stylize(ie,"name")):(ie=ie.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ie=W.stylize(ie,"string"))}return ie+": "+ce}function E(W,K,B){var U=0,H=W.reduce(function(q,ie){return U++,ie.indexOf(`
|
|
|
`)>=0&&U++,q+ie.replace(/\u001b\[\d\d?m/g,"").length+1},0);return H>60?B[0]+(K===""?"":K+`
|
|
|
`)+" "+W.join(`,
|
|
|
`)+" "+B[1]:B[0]+K+" "+W.join(", ")+" "+B[1]}function y(W){return Array.isArray(W)}N.isArray=y;function l(W){return typeof W=="boolean"}N.isBoolean=l;function n(W){return W===null}N.isNull=n;function s(W){return W==null}N.isNullOrUndefined=s;function u(W){return typeof W=="number"}N.isNumber=u;function w(W){return typeof W=="string"}N.isString=w;function v(W){return typeof W=="symbol"}N.isSymbol=v;function a(W){return W===void 0}N.isUndefined=a;function R(W){return D(W)&&F(W)==="[object RegExp]"}N.isRegExp=R;function D(W){return typeof W=="object"&&W!==null}N.isObject=D;function c(W){return D(W)&&F(W)==="[object Date]"}N.isDate=c;function b(W){return D(W)&&(F(W)==="[object Error]"||W instanceof Error)}N.isError=b;function x(W){return typeof W=="function"}N.isFunction=x;function C(W){return W===null||typeof W=="boolean"||typeof W=="number"||typeof W=="string"||typeof W=="symbol"||typeof W=="undefined"}N.isPrimitive=C,N.isBuffer=I("./support/isBuffer");function F(W){return Object.prototype.toString.call(W)}function j(W){return W<10?"0"+W.toString(10):W.toString(10)}var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function X(){var W=new Date,K=[j(W.getHours()),j(W.getMinutes()),j(W.getSeconds())].join(":");return[W.getDate(),k[W.getMonth()],K].join(" ")}N.log=function(){console.log("%s - %s",X(),N.format.apply(N,arguments))},N.inherits=I("inherits"),N._extend=function(W,K){if(!K||!D(K))return W;for(var B=Object.keys(K),U=B.length;U--;)W[B[U]]=K[B[U]];return W};function G(W,K){return Object.prototype.hasOwnProperty.call(W,K)}}).call(this,I("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(I,Z,N){"use strict";(function(){"use strict";N.stripBOM=function(P){return P[0]==="\uFEFF"?P.substring(1):P}}).call(void 0)},{}],245:[function(I,Z,N){"use strict";var P=I("babel-runtime/helpers/typeof"),m=_(P),T=I("babel-runtime/core-js/object/keys"),L=_(T);function _(g){return g&&g.__esModule?g:{default:g}}(function(){"use strict";var g,S,p,o,i,r={}.hasOwnProperty;g=I("xmlbuilder"),S=I("./defaults").defaults,o=function(f){return typeof f=="string"&&(f.indexOf("&")>=0||f.indexOf(">")>=0||f.indexOf("<")>=0)},i=function(f){return"<![CDATA["+p(f)+"]]>"},p=function(f){return f.replace("]]>","]]]]><![CDATA[>")},N.Builder=function(){function d(f){var h,E,y;this.options={},E=S["0.2"];for(h in E){if(!r.call(E,h))continue;y=E[h],this.options[h]=y}for(h in f){if(!r.call(f,h))continue;y=f[h],this.options[h]=y}}return d.prototype.buildObject=function(f){var h,E,y,l,n;return h=this.options.attrkey,E=this.options.charkey,(0,L.default)(f).length===1&&this.options.rootName===S["0.2"].rootName?(n=(0,L.default)(f)[0],f=f[n]):n=this.options.rootName,y=function(s){return function(u,w){var v,a,R,D,c,b;if((typeof w=="undefined"?"undefined":(0,m.default)(w))!=="object")s.options.cdata&&o(w)?u.raw(i(w)):u.txt(w);else if(Array.isArray(w))for(D in w){if(!r.call(w,D))continue;a=w[D];for(c in a)R=a[c],u=y(u.ele(c),R).up()}else for(c in w){if(!r.call(w,c))continue;if(a=w[c],c===h){if((typeof a=="undefined"?"undefined":(0,m.default)(a))==="object")for(v in a)b=a[v],u=u.att(v,b)}else if(c===E)s.options.cdata&&o(a)?u=u.raw(i(a)):u=u.txt(a);else if(Array.isArray(a))for(D in a){if(!r.call(a,D))continue;R=a[D],typeof R=="string"?s.options.cdata&&o(R)?u=u.ele(c).raw(i(R)).up():u=u.ele(c,R).up():u=y(u.ele(c),R).up()}else(typeof a=="undefined"?"undefined":(0,m.default)(a))==="object"?u=y(u.ele(c),a).up():typeof a=="string"&&s.options.cdata&&o(a)?u=u.ele(c).raw(i(a)).up():(a==null&&(a=""),u=u.ele(c,a.toString()).up())}return u}}(this),l=g.create(n,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),y(l,f).end(this.options.renderOpts)},d}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(I,Z,N){"use strict";(function(){N.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
|
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],247:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/promise"),m=o(P),T=I("babel-runtime/core-js/object/get-own-property-names"),L=o(T),_=I("babel-runtime/core-js/object/keys"),g=o(_),S=I("babel-runtime/helpers/typeof"),p=o(S);function o(i){return i&&i.__esModule?i:{default:i}}(function(){"use strict";var i,r,d,f,h,E,y,l,n=function(v,a){return function(){return v.apply(a,arguments)}},s=function(v,a){for(var R in a)u.call(a,R)&&(v[R]=a[R]);function D(){this.constructor=v}return D.prototype=a.prototype,v.prototype=new D,v.__super__=a.prototype,v},u={}.hasOwnProperty;y=I("sax"),d=I("events"),i=I("./bom"),E=I("./processors"),l=I("timers").setImmediate,r=I("./defaults").defaults,f=function(v){return(typeof v=="undefined"?"undefined":(0,p.default)(v))==="object"&&v!=null&&(0,g.default)(v).length===0},h=function(v,a,R){var D,c,b;for(D=0,c=v.length;D<c;D++)b=v[D],a=b(a,R);return a},N.Parser=function(w){s(v,w);function v(a){this.parseStringPromise=n(this.parseStringPromise,this),this.parseString=n(this.parseString,this),this.reset=n(this.reset,this),this.assignOrPush=n(this.assignOrPush,this),this.processAsync=n(this.processAsync,this);var R,D,c;if(!(this instanceof N.Parser))return new N.Parser(a);this.options={},D=r["0.2"];for(R in D){if(!u.call(D,R))continue;c=D[R],this.options[R]=c}for(R in a){if(!u.call(a,R))continue;c=a[R],this.options[R]=c}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(E.normalize)),this.reset()}return v.prototype.processAsync=function(){var a,R;try{return this.remaining.length<=this.options.chunkSize?(a=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(a),this.saxParser.close()):(a=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(a),l(this.processAsync))}catch(D){if(R=D,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(R)}},v.prototype.assignOrPush=function(a,R,D){return R in a?(a[R]instanceof Array||(a[R]=[a[R]]),a[R].push(D)):this.options.explicitArray?a[R]=[D]:a[R]=D},v.prototype.reset=function(){var a,R,D,c;return this.removeAllListeners(),this.saxParser=y.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(b){return function(x){if(b.saxParser.resume(),!b.saxParser.errThrown)return b.saxParser.errThrown=!0,b.emit("error",x)}}(this),this.saxParser.onend=function(b){return function(){if(!b.saxParser.ended)return b.saxParser.ended=!0,b.emit("end",b.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,c=[],a=this.options.attrkey,R=this.options.charkey,this.saxParser.onopentag=function(b){return function(x){var C,F,j,k,X;if(j={},j[R]="",!b.options.ignoreAttrs){X=x.attributes;for(C in X){if(!u.call(X,C))continue;!(a in j)&&!b.options.mergeAttrs&&(j[a]={}),F=b.options.attrValueProcessors?h(b.options.attrValueProcessors,x.attributes[C],C):x.attributes[C],k=b.options.attrNameProcessors?h(b.options.attrNameProcessors,C):C,b.options.mergeAttrs?b.assignOrPush(j,k,F):j[a][k]=F}}return j["#name"]=b.options.tagNameProcessors?h(b.options.tagNameProcessors,x.name):x.name,b.options.xmlns&&(j[b.options.xmlnskey]={uri:x.uri,local:x.local}),c.push(j)}}(this),this.saxParser.onclosetag=function(b){return function(){var x,C,F,j,k,X,G,W,K,B;if(X=c.pop(),k=X["#name"],(!b.options.explicitChildren||!b.options.preserveChildrenOrder)&&delete X["#name"],X.cdata===!0&&(x=X.cdata,delete X.cdata),K=c[c.length-1],X[R].match(/^\s*$/)&&!x?(C=X[R],delete X[R]):(b.options.trim&&(X[R]=X[R].trim()),b.options.normalize&&(X[R]=X[R].replace(/\s{2,}/g," ").trim()),X[R]=b.options.valueProcessors?h(b.options.valueProcessors,X[R],k):X[R],(0,g.default)(X).length===1&&R in X&&!b.EXPLICIT_CHARKEY&&(X=X[R])),f(X)&&(X=b.options.emptyTag!==""?b.options.emptyTag:C),b.options.validator!=null&&(B="/"+function(){var U,H,q;for(q=[],U=0,H=c.length;U<H;U++)j=c[U],q.push(j["#name"]);return q}().concat(k).join("/"),function(){var U;try{return X=b.options.validator(B,K&&K[k],X)}catch(H){return U=H,b.emit("error",U)}}()),b.options.explicitChildren&&!b.options.mergeAttrs&&(typeof X=="undefined"?"undefined":(0,p.default)(X))==="object"){if(!b.options.preserveChildrenOrder)j={},b.options.attrkey in X&&(j[b.options.attrkey]=X[b.options.attrkey],delete X[b.options.attrkey]),!b.options.charsAsChildren&&b.options.charkey in X&&(j[b.options.charkey]=X[b.options.charkey],delete X[b.options.charkey]),(0,L.default)(X).length>0&&(j[b.options.childkey]=X),X=j;else if(K){K[b.options.childkey]=K[b.options.childkey]||[],G={};for(F in X){if(!u.call(X,F))continue;G[F]=X[F]}K[b.options.childkey].push(G),delete X["#name"],(0,g.default)(X).length===1&&R in X&&!b.EXPLICIT_CHARKEY&&(X=X[R])}}return c.length>0?b.assignOrPush(K,k,X):(b.options.explicitRoot&&(W=X,X={},X[k]=W),b.resultObject=X,b.saxParser.ended=!0,b.emit("end",b.resultObject))}}(this),D=function(b){return function(x){var C,F;if(F=c[c.length-1],F)return F[R]+=x,b.options.explicitChildren&&b.options.preserveChildrenOrder&&b.options.charsAsChildren&&(b.options.includeWhiteChars||x.replace(/\\n/g,"").trim()!=="")&&(F[b.options.childkey]=F[b.options.childkey]||[],C={"#name":"__text__"},C[R]=x,b.options.normalize&&(C[R]=C[R].replace(/\s{2,}/g," ").trim()),F[b.options.childkey].push(C)),F}}(this),this.saxParser.ontext=D,this.saxParser.oncdata=function(b){return function(x){var C;if(C=D(x),C)return C.cdata=!0}}(this)},v.prototype.parseString=function(a,R){var D;R!=null&&typeof R=="function"&&(this.on("end",function(c){return this.reset(),R(null,c)}),this.on("error",function(c){return this.reset(),R(c)}));try{return a=a.toString(),a.trim()===""?(this.emit("end",null),!0):(a=i.stripBOM(a),this.options.async?(this.remaining=a,l(this.processAsync),this.saxParser):this.saxParser.write(a).close())}catch(c){if(D=c,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw D}else return this.emit("error",D),this.saxParser.errThrown=!0}},v.prototype.parseStringPromise=function(a){return new m.default(function(R){return function(D,c){return R.parseString(a,function(b,x){return b?c(b):D(x)})}}(this))},v}(d),N.parseString=function(w,v,a){var R,D,c;return a!=null?(typeof a=="function"&&(R=a),(typeof v=="undefined"?"undefined":(0,p.default)(v))==="object"&&(D=v)):(typeof v=="function"&&(R=v),D={}),c=new N.Parser(D),c.parseString(w,R)},N.parseStringPromise=function(w,v){var a,R;return(typeof v=="undefined"?"undefined":(0,p.default)(v))==="object"&&(a=v),R=new N.Parser(a),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(I,Z,N){"use strict";(function(){"use strict";var P;P=new RegExp(/(?!xmlns)^.*:/),N.normalize=function(m){return m.toLowerCase()},N.firstCharLowerCase=function(m){return m.charAt(0).toLowerCase()+m.slice(1)},N.stripPrefix=function(m){return m.replace(P,"")},N.parseNumbers=function(m){return isNaN(m)||(m=m%1===0?parseInt(m,10):parseFloat(m)),m},N.parseBooleans=function(m){return/^(?:true|false)$/i.test(m)&&(m=m.toLowerCase()==="true"),m}}).call(void 0)},{}],249:[function(I,Z,N){"use strict";(function(){"use strict";var P,m,T,L,_=function(p,o){for(var i in o)g.call(o,i)&&(p[i]=o[i]);function r(){this.constructor=p}return r.prototype=o.prototype,p.prototype=new r,p.__super__=o.prototype,p},g={}.hasOwnProperty;m=I("./defaults"),P=I("./builder"),T=I("./parser"),L=I("./processors"),N.defaults=m.defaults,N.processors=L,N.ValidationError=function(S){_(p,S);function p(o){this.message=o}return p}(Error),N.Builder=P.Builder,N.Parser=T.Parser,N.parseString=T.parseString,N.parseStringPromise=T.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(I,Z,N){"use strict";(function(){Z.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(I,Z,N){"use strict";(function(){Z.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(void 0)},{}],252:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/get-prototype-of"),m=S(P),T=I("babel-runtime/helpers/typeof"),L=S(T),_=I("babel-runtime/core-js/object/assign"),g=S(_);function S(p){return p&&p.__esModule?p:{default:p}}(function(){var p,o,i,r,d,f,h,E=[].slice,y={}.hasOwnProperty;p=function(){var n,s,u,w,v,a;if(a=arguments[0],v=2<=arguments.length?E.call(arguments,1):[],d(g.default))g.default.apply(null,arguments);else for(n=0,u=v.length;n<u;n++)if(w=v[n],w!=null)for(s in w){if(!y.call(w,s))continue;a[s]=w[s]}return a},d=function(n){return!!n&&Object.prototype.toString.call(n)==="[object Function]"},f=function(n){var s;return!!n&&((s=typeof n=="undefined"?"undefined":(0,L.default)(n))==="function"||s==="object")},i=function(n){return d(Array.isArray)?Array.isArray(n):Object.prototype.toString.call(n)==="[object Array]"},r=function(n){var s;if(i(n))return!n.length;for(s in n){if(!y.call(n,s))continue;return!1}return!0},h=function(n){var s,u;return f(n)&&(u=(0,m.default)(n))&&(s=u.constructor)&&typeof s=="function"&&s instanceof s&&Function.prototype.toString.call(s)===Function.prototype.toString.call(Object)},o=function(n){return d(n.valueOf)?n.valueOf():n},Z.exports.assign=p,Z.exports.isFunction=d,Z.exports.isObject=f,Z.exports.isArray=i,Z.exports.isEmpty=r,Z.exports.isPlainObject=h,Z.exports.getValue=o}).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(I,Z,N){"use strict";(function(){Z.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,_,g;L=I("./NodeType"),g=I("./XMLNode"),Z.exports=_=function(){function S(p,o,i){if(this.parent=p,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),o==null)throw new Error("Missing attribute name. "+this.debugInfo(o));this.name=this.stringify.name(o),this.value=this.stringify.attValue(i),this.type=L.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(o){return this.value=o||""}}),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,m.default)(this)},S.prototype.toString=function(p){return this.options.writer.attribute(this,this.options.writer.filterOptions(p))},S.prototype.debugInfo=function(p){return p=p||this.name,p==null?"parent: <"+this.parent.name+">":"attribute: {"+p+"}, parent: <"+this.parent.name+">"},S.prototype.isEqualNode=function(p){return p.namespaceURI!==this.namespaceURI||(p.prefix!==this.prefix||p.localName!==this.localName)?!1:!(p.value!==this.value)},S}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,_,g,S=function(i,r){for(var d in r)p.call(r,d)&&(i[d]=r[d]);function f(){this.constructor=i}return f.prototype=r.prototype,i.prototype=new f,i.__super__=r.prototype,i},p={}.hasOwnProperty;L=I("./NodeType"),g=I("./XMLCharacterData"),Z.exports=_=function(o){S(i,o);function i(r,d){if(i.__super__.constructor.call(this,r),d==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=L.CData,this.value=this.stringify.cdata(d)}return i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(r){return this.options.writer.cdata(this,this.options.writer.filterOptions(r))},i}(g)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,_,g=function(o,i){for(var r in i)S.call(i,r)&&(o[r]=i[r]);function d(){this.constructor=o}return d.prototype=i.prototype,o.prototype=new d,o.__super__=i.prototype,o},S={}.hasOwnProperty;_=I("./XMLNode"),Z.exports=L=function(p){g(o,p);function o(i){o.__super__.constructor.call(this,i),this.value=""}return Object.defineProperty(o.prototype,"data",{get:function(){return this.value},set:function(r){return this.value=r||""}}),Object.defineProperty(o.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(o.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}}),o.prototype.clone=function(){return(0,m.default)(this)},o.prototype.substringData=function(i,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.appendData=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.insertData=function(i,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.deleteData=function(i,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.replaceData=function(i,r,d){throw new Error("This DOM method is not implemented."+this.debugInfo())},o.prototype.isEqualNode=function(i){return o.__super__.isEqualNode.apply(this,arguments).isEqualNode(i)?!(i.data!==this.data):!1},o}(_)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,_,g,S=function(i,r){for(var d in r)p.call(r,d)&&(i[d]=r[d]);function f(){this.constructor=i}return f.prototype=r.prototype,i.prototype=new f,i.__super__=r.prototype,i},p={}.hasOwnProperty;L=I("./NodeType"),_=I("./XMLCharacterData"),Z.exports=g=function(o){S(i,o);function i(r,d){if(i.__super__.constructor.call(this,r),d==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=L.Comment,this.value=this.stringify.comment(d)}return i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(r){return this.options.writer.comment(this,this.options.writer.filterOptions(r))},i}(_)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/keys"),m=_(P),T=I("babel-runtime/core-js/object/create"),L=_(T);function _(g){return g&&g.__esModule?g:{default:g}}(function(){var g,S,p;S=I("./XMLDOMErrorHandler"),p=I("./XMLDOMStringList"),Z.exports=g=function(){function o(){var i;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=i=(0,L.default)(this.defaultParams)}return Object.defineProperty(o.prototype,"parameterNames",{get:function(){return new p((0,m.default)(this.defaultParams))}}),o.prototype.getParameter=function(i){return this.params.hasOwnProperty(i)?this.params[i]:null},o.prototype.canSetParameter=function(i,r){return!0},o.prototype.setParameter=function(i,r){return r!=null?this.params[i]=r:delete this.params[i]},o}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(I,Z,N){"use strict";(function(){var P;Z.exports=P=function(){function m(){}return m.prototype.handleError=function(T){throw new Error(T)},m}()}).call(void 0)},{}],260:[function(I,Z,N){"use strict";(function(){var P;Z.exports=P=function(){function m(){}return m.prototype.hasFeature=function(T,L){return!0},m.prototype.createDocumentType=function(T,L,_){throw new Error("This DOM method is not implemented.")},m.prototype.createDocument=function(T,L,_){throw new Error("This DOM method is not implemented.")},m.prototype.createHTMLDocument=function(T){throw new Error("This DOM method is not implemented.")},m.prototype.getFeature=function(T,L){throw new Error("This DOM method is not implemented.")},m}()}).call(void 0)},{}],261:[function(I,Z,N){"use strict";(function(){var P;Z.exports=P=function(){function m(T){this.arr=T||[]}return Object.defineProperty(m.prototype,"length",{get:function(){return this.arr.length}}),m.prototype.item=function(T){return this.arr[T]||null},m.prototype.contains=function(T){return this.arr.indexOf(T)!==-1},m}()}).call(void 0)},{}],262:[function(I,Z,N){"use strict";(function(){var P,m,T,L=function(S,p){for(var o in p)_.call(p,o)&&(S[o]=p[o]);function i(){this.constructor=S}return i.prototype=p.prototype,S.prototype=new i,S.__super__=p.prototype,S},_={}.hasOwnProperty;T=I("./XMLNode"),P=I("./NodeType"),Z.exports=m=function(g){L(S,g);function S(p,o,i,r,d,f){if(S.__super__.constructor.call(this,p),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(i==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(o));if(!r)throw new Error("Missing DTD attribute type. "+this.debugInfo(o));if(!d)throw new Error("Missing DTD attribute default. "+this.debugInfo(o));if(d.indexOf("#")!==0&&(d="#"+d),!d.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(o));if(f&&!d.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(o));this.elementName=this.stringify.name(o),this.type=P.AttributeDeclaration,this.attributeName=this.stringify.name(i),this.attributeType=this.stringify.dtdAttType(r),f&&(this.defaultValue=this.stringify.dtdAttDefault(f)),this.defaultValueType=d}return S.prototype.toString=function(p){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(p))},S}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(I,Z,N){"use strict";(function(){var P,m,T,L=function(S,p){for(var o in p)_.call(p,o)&&(S[o]=p[o]);function i(){this.constructor=S}return i.prototype=p.prototype,S.prototype=new i,S.__super__=p.prototype,S},_={}.hasOwnProperty;T=I("./XMLNode"),P=I("./NodeType"),Z.exports=m=function(g){L(S,g);function S(p,o,i){if(S.__super__.constructor.call(this,p),o==null)throw new Error("Missing DTD element name. "+this.debugInfo());i||(i="(#PCDATA)"),Array.isArray(i)&&(i="("+i.join(",")+")"),this.name=this.stringify.name(o),this.type=P.ElementDeclaration,this.value=this.stringify.dtdElementValue(i)}return S.prototype.toString=function(p){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(p))},S}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(I,Z,N){"use strict";(function(){var P,m,T,L,_=function(p,o){for(var i in o)g.call(o,i)&&(p[i]=o[i]);function r(){this.constructor=p}return r.prototype=o.prototype,p.prototype=new r,p.__super__=o.prototype,p},g={}.hasOwnProperty;L=I("./Utility").isObject,T=I("./XMLNode"),P=I("./NodeType"),Z.exports=m=function(S){_(p,S);function p(o,i,r,d){if(p.__super__.constructor.call(this,o),r==null)throw new Error("Missing DTD entity name. "+this.debugInfo(r));if(d==null)throw new Error("Missing DTD entity value. "+this.debugInfo(r));if(this.pe=!!i,this.name=this.stringify.name(r),this.type=P.EntityDeclaration,!L(d))this.value=this.stringify.dtdEntityValue(d),this.internal=!0;else{if(!d.pubID&&!d.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(r));if(d.pubID&&!d.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(r));if(this.internal=!1,d.pubID!=null&&(this.pubID=this.stringify.dtdPubID(d.pubID)),d.sysID!=null&&(this.sysID=this.stringify.dtdSysID(d.sysID)),d.nData!=null&&(this.nData=this.stringify.dtdNData(d.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(r))}}return Object.defineProperty(p.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(p.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(p.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(p.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(p.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(p.prototype,"xmlVersion",{get:function(){return null}}),p.prototype.toString=function(o){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(o))},p}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(I,Z,N){"use strict";(function(){var P,m,T,L=function(S,p){for(var o in p)_.call(p,o)&&(S[o]=p[o]);function i(){this.constructor=S}return i.prototype=p.prototype,S.prototype=new i,S.__super__=p.prototype,S},_={}.hasOwnProperty;T=I("./XMLNode"),P=I("./NodeType"),Z.exports=m=function(g){L(S,g);function S(p,o,i){if(S.__super__.constructor.call(this,p),o==null)throw new Error("Missing DTD notation name. "+this.debugInfo(o));if(!i.pubID&&!i.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(o));this.name=this.stringify.name(o),this.type=P.NotationDeclaration,i.pubID!=null&&(this.pubID=this.stringify.dtdPubID(i.pubID)),i.sysID!=null&&(this.sysID=this.stringify.dtdSysID(i.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(p){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(p))},S}(T)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(I,Z,N){"use strict";(function(){var P,m,T,L,_=function(p,o){for(var i in o)g.call(o,i)&&(p[i]=o[i]);function r(){this.constructor=p}return r.prototype=o.prototype,p.prototype=new r,p.__super__=o.prototype,p},g={}.hasOwnProperty;L=I("./Utility").isObject,T=I("./XMLNode"),P=I("./NodeType"),Z.exports=m=function(S){_(p,S);function p(o,i,r,d){var f;p.__super__.constructor.call(this,o),L(i)&&(f=i,i=f.version,r=f.encoding,d=f.standalone),i||(i="1.0"),this.type=P.Declaration,this.version=this.stringify.xmlVersion(i),r!=null&&(this.encoding=this.stringify.xmlEncoding(r)),d!=null&&(this.standalone=this.stringify.xmlStandalone(d))}return p.prototype.toString=function(o){return this.options.writer.declaration(this,this.options.writer.filterOptions(o))},p}(T)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(I,Z,N){"use strict";(function(){var P,m,T,L,_,g,S,p,o,i=function(f,h){for(var E in h)r.call(h,E)&&(f[E]=h[E]);function y(){this.constructor=f}return y.prototype=h.prototype,f.prototype=new y,f.__super__=h.prototype,f},r={}.hasOwnProperty;o=I("./Utility").isObject,p=I("./XMLNode"),P=I("./NodeType"),m=I("./XMLDTDAttList"),L=I("./XMLDTDEntity"),T=I("./XMLDTDElement"),_=I("./XMLDTDNotation"),S=I("./XMLNamedNodeMap"),Z.exports=g=function(d){i(f,d);function f(h,E,y){var l,n,s,u,w,v;if(f.__super__.constructor.call(this,h),this.type=P.DocType,h.children){for(u=h.children,n=0,s=u.length;n<s;n++)if(l=u[n],l.type===P.Element){this.name=l.name;break}}this.documentObject=h,o(E)&&(w=E,E=w.pubID,y=w.sysID),y==null&&(v=[E,y],y=v[0],E=v[1]),E!=null&&(this.pubID=this.stringify.dtdPubID(E)),y!=null&&(this.sysID=this.stringify.dtdSysID(y))}return Object.defineProperty(f.prototype,"entities",{get:function(){var E,y,l,n,s;for(n={},s=this.children,y=0,l=s.length;y<l;y++)E=s[y],E.type===P.EntityDeclaration&&!E.pe&&(n[E.name]=E);return new S(n)}}),Object.defineProperty(f.prototype,"notations",{get:function(){var E,y,l,n,s;for(n={},s=this.children,y=0,l=s.length;y<l;y++)E=s[y],E.type===P.NotationDeclaration&&(n[E.name]=E);return new S(n)}}),Object.defineProperty(f.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(f.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(f.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),f.prototype.element=function(h,E){var y;return y=new T(this,h,E),this.children.push(y),this},f.prototype.attList=function(h,E,y,l,n){var s;return s=new m(this,h,E,y,l,n),this.children.push(s),this},f.prototype.entity=function(h,E){var y;return y=new L(this,!1,h,E),this.children.push(y),this},f.prototype.pEntity=function(h,E){var y;return y=new L(this,!0,h,E),this.children.push(y),this},f.prototype.notation=function(h,E){var y;return y=new _(this,h,E),this.children.push(y),this},f.prototype.toString=function(h){return this.options.writer.docType(this,this.options.writer.filterOptions(h))},f.prototype.ele=function(h,E){return this.element(h,E)},f.prototype.att=function(h,E,y,l,n){return this.attList(h,E,y,l,n)},f.prototype.ent=function(h,E){return this.entity(h,E)},f.prototype.pent=function(h,E){return this.pEntity(h,E)},f.prototype.not=function(h,E){return this.notation(h,E)},f.prototype.up=function(){return this.root()||this.documentObject},f.prototype.isEqualNode=function(h){return f.__super__.isEqualNode.apply(this,arguments).isEqualNode(h)?h.name!==this.name||h.publicId!==this.publicId?!1:!(h.systemId!==this.systemId):!1},f}(p)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(I,Z,N){"use strict";(function(){var P,m,T,L,_,g,S,p,o=function(d,f){for(var h in f)i.call(f,h)&&(d[h]=f[h]);function E(){this.constructor=d}return E.prototype=f.prototype,d.prototype=new E,d.__super__=f.prototype,d},i={}.hasOwnProperty;p=I("./Utility").isPlainObject,T=I("./XMLDOMImplementation"),m=I("./XMLDOMConfiguration"),_=I("./XMLNode"),P=I("./NodeType"),S=I("./XMLStringifier"),g=I("./XMLStringWriter"),Z.exports=L=function(r){o(d,r);function d(f){d.__super__.constructor.call(this,null),this.name="#document",this.type=P.Document,this.documentURI=null,this.domConfig=new m,f||(f={}),f.writer||(f.writer=new g),this.options=f,this.stringify=new S(f)}return Object.defineProperty(d.prototype,"implementation",{value:new T}),Object.defineProperty(d.prototype,"doctype",{get:function(){var h,E,y,l;for(l=this.children,E=0,y=l.length;E<y;E++)if(h=l[E],h.type===P.DocType)return h;return null}}),Object.defineProperty(d.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(d.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(d.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(d.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].encoding:null}}),Object.defineProperty(d.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(d.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===P.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(d.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(d.prototype,"origin",{get:function(){return null}}),Object.defineProperty(d.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(d.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(d.prototype,"contentType",{get:function(){return null}}),d.prototype.end=function(f){var h;return h={},f?p(f)&&(h=f,f=this.options.writer):f=this.options.writer,f.document(this,f.filterOptions(h))},d.prototype.toString=function(f){return this.options.writer.document(this,this.options.writer.filterOptions(f))},d.prototype.createElement=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createTextNode=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createComment=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createCDATASection=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createProcessingInstruction=function(f,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createAttribute=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createEntityReference=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementsByTagName=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.importNode=function(f,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createElementNS=function(f,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createAttributeNS=function(f,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementsByTagNameNS=function(f,h){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementById=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.adoptNode=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.renameNode=function(f,h,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.getElementsByClassName=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createEvent=function(f){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createNodeIterator=function(f,h,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.createTreeWalker=function(f,h,E){throw new Error("This DOM method is not implemented."+this.debugInfo())},d}(_)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(I,Z,N){"use strict";(function(){var P,m,T,L,_,g,S,p,o,i,r,d,f,h,E,y,l,n,s,u,w,v,a,R,D={}.hasOwnProperty;R=I("./Utility"),v=R.isObject,w=R.isFunction,a=R.isPlainObject,u=R.getValue,P=I("./NodeType"),d=I("./XMLDocument"),h=I("./XMLElement"),L=I("./XMLCData"),_=I("./XMLComment"),y=I("./XMLRaw"),s=I("./XMLText"),E=I("./XMLProcessingInstruction"),i=I("./XMLDeclaration"),r=I("./XMLDocType"),g=I("./XMLDTDAttList"),p=I("./XMLDTDEntity"),S=I("./XMLDTDElement"),o=I("./XMLDTDNotation"),T=I("./XMLAttribute"),n=I("./XMLStringifier"),l=I("./XMLStringWriter"),m=I("./WriterState"),Z.exports=f=function(){function c(b,x,C){var F;this.name="?xml",this.type=P.Document,b||(b={}),F={},b.writer?a(b.writer)&&(F=b.writer,b.writer=new l):b.writer=new l,this.options=b,this.writer=b.writer,this.writerOptions=this.writer.filterOptions(F),this.stringify=new n(b),this.onDataCallback=x||function(){},this.onEndCallback=C||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return c.prototype.createChildNode=function(b){var x,C,F,j,k,X,G,W;switch(b.type){case P.CData:this.cdata(b.value);break;case P.Comment:this.comment(b.value);break;case P.Element:F={},G=b.attribs;for(C in G){if(!D.call(G,C))continue;x=G[C],F[C]=x.value}this.node(b.name,F);break;case P.Dummy:this.dummy();break;case P.Raw:this.raw(b.value);break;case P.Text:this.text(b.value);break;case P.ProcessingInstruction:this.instruction(b.target,b.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+b.constructor.name)}for(W=b.children,k=0,X=W.length;k<X;k++)j=W[k],this.createChildNode(j),j.type===P.Element&&this.up();return this},c.prototype.dummy=function(){return this},c.prototype.node=function(b,x,C){var F;if(b==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(b));return this.openCurrent(),b=u(b),x==null&&(x={}),x=u(x),v(x)||(F=[x,C],C=F[0],x=F[1]),this.currentNode=new h(this,b,x),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,C!=null&&this.text(C),this},c.prototype.element=function(b,x,C){var F,j,k,X,G,W;if(this.currentNode&&this.currentNode.type===P.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(b)||v(b)||w(b))for(X=this.options.noValidation,this.options.noValidation=!0,W=new d(this.options).element("TEMP_ROOT"),W.element(b),this.options.noValidation=X,G=W.children,j=0,k=G.length;j<k;j++)F=G[j],this.createChildNode(F),F.type===P.Element&&this.up();else this.node(b,x,C);return this},c.prototype.attribute=function(b,x){var C,F;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(b));if(b!=null&&(b=u(b)),v(b))for(C in b){if(!D.call(b,C))continue;F=b[C],this.attribute(C,F)}else w(x)&&(x=x.apply()),this.options.keepNullAttributes&&x==null?this.currentNode.attribs[b]=new T(this,b,""):x!=null&&(this.currentNode.attribs[b]=new T(this,b,x));return this},c.prototype.text=function(b){var x;return this.openCurrent(),x=new s(this,b),this.onData(this.writer.text(x,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.cdata=function(b){var x;return this.openCurrent(),x=new L(this,b),this.onData(this.writer.cdata(x,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.comment=function(b){var x;return this.openCurrent(),x=new _(this,b),this.onData(this.writer.comment(x,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.raw=function(b){var x;return this.openCurrent(),x=new y(this,b),this.onData(this.writer.raw(x,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.instruction=function(b,x){var C,F,j,k,X;if(this.openCurrent(),b!=null&&(b=u(b)),x!=null&&(x=u(x)),Array.isArray(b))for(C=0,k=b.length;C<k;C++)F=b[C],this.instruction(F);else if(v(b))for(F in b){if(!D.call(b,F))continue;j=b[F],this.instruction(F,j)}else w(x)&&(x=x.apply()),X=new E(this,b,x),this.onData(this.writer.processingInstruction(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},c.prototype.declaration=function(b,x,C){var F;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return F=new i(this,b,x,C),this.onData(this.writer.declaration(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.doctype=function(b,x,C){if(this.openCurrent(),b==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new r(this,x,C),this.currentNode.rootNodeName=b,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},c.prototype.dtdElement=function(b,x){var C;return this.openCurrent(),C=new S(this,b,x),this.onData(this.writer.dtdElement(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.attList=function(b,x,C,F,j){var k;return this.openCurrent(),k=new g(this,b,x,C,F,j),this.onData(this.writer.dtdAttList(k,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.entity=function(b,x){var C;return this.openCurrent(),C=new p(this,!1,b,x),this.onData(this.writer.dtdEntity(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.pEntity=function(b,x){var C;return this.openCurrent(),C=new p(this,!0,b,x),this.onData(this.writer.dtdEntity(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.prototype.notation=function(b,x){var C;return this.openCurrent(),C=new o(this,b,x),this.onData(this.writer.dtdNotation(C,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},c.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},c.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},c.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},c.prototype.openNode=function(b){var x,C,F,j;if(!b.isOpen){if(!this.root&&this.currentLevel===0&&b.type===P.Element&&(this.root=b),C="",b.type===P.Element){this.writerOptions.state=m.OpenTag,C=this.writer.indent(b,this.writerOptions,this.currentLevel)+"<"+b.name,j=b.attribs;for(F in j){if(!D.call(j,F))continue;x=j[F],C+=this.writer.attribute(x,this.writerOptions,this.currentLevel)}C+=(b.children?">":"/>")+this.writer.endline(b,this.writerOptions,this.currentLevel),this.writerOptions.state=m.InsideTag}else this.writerOptions.state=m.OpenTag,C=this.writer.indent(b,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+b.rootNodeName,b.pubID&&b.sysID?C+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.sysID&&(C+=' SYSTEM "'+b.sysID+'"'),b.children?(C+=" [",this.writerOptions.state=m.InsideTag):(this.writerOptions.state=m.CloseTag,C+=">"),C+=this.writer.endline(b,this.writerOptions,this.currentLevel);return this.onData(C,this.currentLevel),b.isOpen=!0}},c.prototype.closeNode=function(b){var x;if(!b.isClosed)return x="",this.writerOptions.state=m.CloseTag,b.type===P.Element?x=this.writer.indent(b,this.writerOptions,this.currentLevel)+"</"+b.name+">"+this.writer.endline(b,this.writerOptions,this.currentLevel):x=this.writer.indent(b,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(b,this.writerOptions,this.currentLevel),this.writerOptions.state=m.None,this.onData(x,this.currentLevel),b.isClosed=!0},c.prototype.onData=function(b,x){return this.documentStarted=!0,this.onDataCallback(b,x+1)},c.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},c.prototype.debugInfo=function(b){return b==null?"":"node: <"+b+">"},c.prototype.ele=function(){return this.element.apply(this,arguments)},c.prototype.nod=function(b,x,C){return this.node(b,x,C)},c.prototype.txt=function(b){return this.text(b)},c.prototype.dat=function(b){return this.cdata(b)},c.prototype.com=function(b){return this.comment(b)},c.prototype.ins=function(b,x){return this.instruction(b,x)},c.prototype.dec=function(b,x,C){return this.declaration(b,x,C)},c.prototype.dtd=function(b,x,C){return this.doctype(b,x,C)},c.prototype.e=function(b,x,C){return this.element(b,x,C)},c.prototype.n=function(b,x,C){return this.node(b,x,C)},c.prototype.t=function(b){return this.text(b)},c.prototype.d=function(b){return this.cdata(b)},c.prototype.c=function(b){return this.comment(b)},c.prototype.r=function(b){return this.raw(b)},c.prototype.i=function(b,x){return this.instruction(b,x)},c.prototype.att=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},c.prototype.a=function(){return this.currentNode&&this.currentNode.type===P.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},c.prototype.ent=function(b,x){return this.entity(b,x)},c.prototype.pent=function(b,x){return this.pEntity(b,x)},c.prototype.not=function(b,x){return this.notation(b,x)},c}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,_,g,S=function(i,r){for(var d in r)p.call(r,d)&&(i[d]=r[d]);function f(){this.constructor=i}return f.prototype=r.prototype,i.prototype=new f,i.__super__=r.prototype,i},p={}.hasOwnProperty;g=I("./XMLNode"),L=I("./NodeType"),Z.exports=_=function(o){S(i,o);function i(r){i.__super__.constructor.call(this,r),this.type=L.Dummy}return i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(r){return""},i}(g)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,_,g,S,p,o,i,r,d,f=function(y,l){for(var n in l)h.call(l,n)&&(y[n]=l[n]);function s(){this.constructor=y}return s.prototype=l.prototype,y.prototype=new s,y.__super__=l.prototype,y},h={}.hasOwnProperty;d=I("./Utility"),r=d.isObject,i=d.isFunction,o=d.getValue,p=I("./XMLNode"),L=I("./NodeType"),_=I("./XMLAttribute"),S=I("./XMLNamedNodeMap"),Z.exports=g=function(E){f(y,E);function y(l,n,s){var u,w,v,a;if(y.__super__.constructor.call(this,l),n==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(n),this.type=L.Element,this.attribs={},this.schemaTypeInfo=null,s!=null&&this.attribute(s),l.type===L.Document&&(this.isRoot=!0,this.documentObject=l,l.rootObject=this,l.children)){for(a=l.children,w=0,v=a.length;w<v;w++)if(u=a[w],u.type===L.DocType){u.name=this.name;break}}}return Object.defineProperty(y.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(y.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(y.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(y.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(y.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(y.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new S(this.attribs)),this.attributeMap}}),y.prototype.clone=function(){var l,n,s,u;s=(0,m.default)(this),s.isRoot&&(s.documentObject=null),s.attribs={},u=this.attribs;for(n in u){if(!h.call(u,n))continue;l=u[n],s.attribs[n]=l.clone()}return s.children=[],this.children.forEach(function(w){var v;return v=w.clone(),v.parent=s,s.children.push(v)}),s},y.prototype.attribute=function(l,n){var s,u;if(l!=null&&(l=o(l)),r(l))for(s in l){if(!h.call(l,s))continue;u=l[s],this.attribute(s,u)}else i(n)&&(n=n.apply()),this.options.keepNullAttributes&&n==null?this.attribs[l]=new _(this,l,""):n!=null&&(this.attribs[l]=new _(this,l,n));return this},y.prototype.removeAttribute=function(l){var n,s,u;if(l==null)throw new Error("Missing attribute name. "+this.debugInfo());if(l=o(l),Array.isArray(l))for(s=0,u=l.length;s<u;s++)n=l[s],delete this.attribs[n];else delete this.attribs[l];return this},y.prototype.toString=function(l){return this.options.writer.element(this,this.options.writer.filterOptions(l))},y.prototype.att=function(l,n){return this.attribute(l,n)},y.prototype.a=function(l,n){return this.attribute(l,n)},y.prototype.getAttribute=function(l){return this.attribs.hasOwnProperty(l)?this.attribs[l].value:null},y.prototype.setAttribute=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNode=function(l){return this.attribs.hasOwnProperty(l)?this.attribs[l]:null},y.prototype.setAttributeNode=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.removeAttributeNode=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagName=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNS=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setAttributeNS=function(l,n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.removeAttributeNS=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getAttributeNodeNS=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setAttributeNodeNS=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagNameNS=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.hasAttribute=function(l){return this.attribs.hasOwnProperty(l)},y.prototype.hasAttributeNS=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setIdAttribute=function(l,n){return this.attribs.hasOwnProperty(l)?this.attribs[l].isId:n},y.prototype.setIdAttributeNS=function(l,n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.setIdAttributeNode=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagName=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByTagNameNS=function(l,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.getElementsByClassName=function(l){throw new Error("This DOM method is not implemented."+this.debugInfo())},y.prototype.isEqualNode=function(l){var n,s,u;if(!y.__super__.isEqualNode.apply(this,arguments).isEqualNode(l))return!1;if(l.namespaceURI!==this.namespaceURI)return!1;if(l.prefix!==this.prefix)return!1;if(l.localName!==this.localName)return!1;if(l.attribs.length!==this.attribs.length)return!1;for(n=s=0,u=this.attribs.length-1;0<=u?s<=u:s>=u;n=0<=u?++s:--s)if(!this.attribs[n].isEqualNode(l.attribs[n]))return!1;return!0},y}(p)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/keys"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L;Z.exports=L=function(){function _(g){this.nodes=g}return Object.defineProperty(_.prototype,"length",{get:function(){return(0,m.default)(this.nodes).length||0}}),_.prototype.clone=function(){return this.nodes=null},_.prototype.getNamedItem=function(g){return this.nodes[g]},_.prototype.setNamedItem=function(g){var S;return S=this.nodes[g.nodeName],this.nodes[g.nodeName]=g,S||null},_.prototype.removeNamedItem=function(g){var S;return S=this.nodes[g],delete this.nodes[g],S||null},_.prototype.item=function(g){return this.nodes[(0,m.default)(this.nodes)[g]]||null},_.prototype.getNamedItemNS=function(g,S){throw new Error("This DOM method is not implemented.")},_.prototype.setNamedItemNS=function(g){throw new Error("This DOM method is not implemented.")},_.prototype.removeNamedItemNS=function(g,S){throw new Error("This DOM method is not implemented.")},_}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(I,Z,N){"use strict";(function(){var P,m,T,L,_,g,S,p,o,i,r,d,f,h,E,y,l,n,s,u={}.hasOwnProperty;s=I("./Utility"),n=s.isObject,l=s.isFunction,y=s.isEmpty,E=s.getValue,p=null,T=null,L=null,_=null,g=null,f=null,h=null,d=null,S=null,m=null,r=null,o=null,P=null,Z.exports=i=function(){function w(v){this.parent=v,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,p||(p=I("./XMLElement"),T=I("./XMLCData"),L=I("./XMLComment"),_=I("./XMLDeclaration"),g=I("./XMLDocType"),f=I("./XMLRaw"),h=I("./XMLText"),d=I("./XMLProcessingInstruction"),S=I("./XMLDummy"),m=I("./NodeType"),r=I("./XMLNodeList"),o=I("./XMLNamedNodeMap"),P=I("./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 r(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 a;return a=this.parent.children.indexOf(this),this.parent.children[a-1]||null}}),Object.defineProperty(w.prototype,"nextSibling",{get:function(){var a;return a=this.parent.children.indexOf(this),this.parent.children[a+1]||null}}),Object.defineProperty(w.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(w.prototype,"textContent",{get:function(){var a,R,D,c,b;if(this.nodeType===m.Element||this.nodeType===m.DocumentFragment){for(b="",c=this.children,R=0,D=c.length;R<D;R++)a=c[R],a.textContent&&(b+=a.textContent);return b}else return null},set:function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),w.prototype.setParent=function(v){var a,R,D,c,b;for(this.parent=v,v&&(this.options=v.options,this.stringify=v.stringify),c=this.children,b=[],R=0,D=c.length;R<D;R++)a=c[R],b.push(a.setParent(this));return b},w.prototype.element=function(v,a,R){var D,c,b,x,C,F,j,k,X,G,W;if(F=null,a===null&&R==null&&(X=[{},null],a=X[0],R=X[1]),a==null&&(a={}),a=E(a),n(a)||(G=[a,R],R=G[0],a=G[1]),v!=null&&(v=E(v)),Array.isArray(v))for(b=0,j=v.length;b<j;b++)c=v[b],F=this.element(c);else if(l(v))F=this.element(v.apply());else if(n(v))for(C in v){if(!u.call(v,C))continue;if(W=v[C],l(W)&&(W=W.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&C.indexOf(this.stringify.convertAttKey)===0)F=this.attribute(C.substr(this.stringify.convertAttKey.length),W);else if(!this.options.separateArrayItems&&Array.isArray(W)&&y(W))F=this.dummy();else if(n(W)&&y(W))F=this.element(C);else if(!this.options.keepNullNodes&&W==null)F=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(W))for(x=0,k=W.length;x<k;x++)c=W[x],D={},D[C]=c,F=this.element(D);else n(W)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&C.indexOf(this.stringify.convertTextKey)===0?F=this.element(W):(F=this.element(C),F.element(W)):F=this.element(C,W)}else!this.options.keepNullNodes&&R===null?F=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&v.indexOf(this.stringify.convertTextKey)===0?F=this.text(R):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&v.indexOf(this.stringify.convertCDataKey)===0?F=this.cdata(R):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&v.indexOf(this.stringify.convertCommentKey)===0?F=this.comment(R):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&v.indexOf(this.stringify.convertRawKey)===0?F=this.raw(R):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&v.indexOf(this.stringify.convertPIKey)===0?F=this.instruction(v.substr(this.stringify.convertPIKey.length),R):F=this.node(v,a,R);if(F==null)throw new Error("Could not create any elements with: "+v+". "+this.debugInfo());return F},w.prototype.insertBefore=function(v,a,R){var D,c,b,x,C;if(v!=null?v.type:void 0)return b=v,x=a,b.setParent(this),x?(c=children.indexOf(x),C=children.splice(c),children.push(b),Array.prototype.push.apply(children,C)):children.push(b),b;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(v));return c=this.parent.children.indexOf(this),C=this.parent.children.splice(c),D=this.parent.element(v,a,R),Array.prototype.push.apply(this.parent.children,C),D},w.prototype.insertAfter=function(v,a,R){var D,c,b;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(v));return c=this.parent.children.indexOf(this),b=this.parent.children.splice(c+1),D=this.parent.element(v,a,R),Array.prototype.push.apply(this.parent.children,b),D},w.prototype.remove=function(){var v,a;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return v=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[v,v-v+1].concat(a=[])),this.parent},w.prototype.node=function(v,a,R){var D,c;return v!=null&&(v=E(v)),a||(a={}),a=E(a),n(a)||(c=[a,R],R=c[0],a=c[1]),D=new p(this,v,a),R!=null&&D.text(R),this.children.push(D),D},w.prototype.text=function(v){var a;return n(v)&&this.element(v),a=new h(this,v),this.children.push(a),this},w.prototype.cdata=function(v){var a;return a=new T(this,v),this.children.push(a),this},w.prototype.comment=function(v){var a;return a=new L(this,v),this.children.push(a),this},w.prototype.commentBefore=function(v){var a,R,D;return R=this.parent.children.indexOf(this),D=this.parent.children.splice(R),a=this.parent.comment(v),Array.prototype.push.apply(this.parent.children,D),this},w.prototype.commentAfter=function(v){var a,R,D;return R=this.parent.children.indexOf(this),D=this.parent.children.splice(R+1),a=this.parent.comment(v),Array.prototype.push.apply(this.parent.children,D),this},w.prototype.raw=function(v){var a;return a=new f(this,v),this.children.push(a),this},w.prototype.dummy=function(){var v;return v=new S(this),v},w.prototype.instruction=function(v,a){var R,D,c,b,x;if(v!=null&&(v=E(v)),a!=null&&(a=E(a)),Array.isArray(v))for(b=0,x=v.length;b<x;b++)R=v[b],this.instruction(R);else if(n(v))for(R in v){if(!u.call(v,R))continue;D=v[R],this.instruction(R,D)}else l(a)&&(a=a.apply()),c=new d(this,v,a),this.children.push(c);return this},w.prototype.instructionBefore=function(v,a){var R,D,c;return D=this.parent.children.indexOf(this),c=this.parent.children.splice(D),R=this.parent.instruction(v,a),Array.prototype.push.apply(this.parent.children,c),this},w.prototype.instructionAfter=function(v,a){var R,D,c;return D=this.parent.children.indexOf(this),c=this.parent.children.splice(D+1),R=this.parent.instruction(v,a),Array.prototype.push.apply(this.parent.children,c),this},w.prototype.declaration=function(v,a,R){var D,c;return D=this.document(),c=new _(D,v,a,R),D.children.length===0?D.children.unshift(c):D.children[0].type===m.Declaration?D.children[0]=c:D.children.unshift(c),D.root()||D},w.prototype.dtd=function(v,a){var R,D,c,b,x,C,F,j,k,X;for(D=this.document(),c=new g(D,v,a),k=D.children,b=x=0,F=k.length;x<F;b=++x)if(R=k[b],R.type===m.DocType)return D.children[b]=c,c;for(X=D.children,b=C=0,j=X.length;C<j;b=++C)if(R=X[b],R.isRoot)return D.children.splice(b,0,c),c;return D.children.push(c),c},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 v;for(v=this;v;){if(v.type===m.Document)return v.rootObject;if(v.isRoot)return v;v=v.parent}},w.prototype.document=function(){var v;for(v=this;v;){if(v.type===m.Document)return v;v=v.parent}},w.prototype.end=function(v){return this.document().end(v)},w.prototype.prev=function(){var v;if(v=this.parent.children.indexOf(this),v<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[v-1]},w.prototype.next=function(){var v;if(v=this.parent.children.indexOf(this),v===-1||v===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[v+1]},w.prototype.importDocument=function(v){var a;return a=v.root().clone(),a.parent=this,a.isRoot=!1,this.children.push(a),this},w.prototype.debugInfo=function(v){var a,R;return v=v||this.name,v==null&&!((a=this.parent)!=null?a.name:void 0)?"":v==null?"parent: <"+this.parent.name+">":((R=this.parent)!=null?R.name:void 0)?"node: <"+v+">, parent: <"+this.parent.name+">":"node: <"+v+">"},w.prototype.ele=function(v,a,R){return this.element(v,a,R)},w.prototype.nod=function(v,a,R){return this.node(v,a,R)},w.prototype.txt=function(v){return this.text(v)},w.prototype.dat=function(v){return this.cdata(v)},w.prototype.com=function(v){return this.comment(v)},w.prototype.ins=function(v,a){return this.instruction(v,a)},w.prototype.doc=function(){return this.document()},w.prototype.dec=function(v,a,R){return this.declaration(v,a,R)},w.prototype.e=function(v,a,R){return this.element(v,a,R)},w.prototype.n=function(v,a,R){return this.node(v,a,R)},w.prototype.t=function(v){return this.text(v)},w.prototype.d=function(v){return this.cdata(v)},w.prototype.c=function(v){return this.comment(v)},w.prototype.r=function(v){return this.raw(v)},w.prototype.i=function(v,a){return this.instruction(v,a)},w.prototype.u=function(){return this.up()},w.prototype.importXMLBuilder=function(v){return this.importDocument(v)},w.prototype.replaceChild=function(v,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.removeChild=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.appendChild=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.hasChildNodes=function(){return this.children.length!==0},w.prototype.cloneNode=function(v){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(v,a){return!0},w.prototype.hasAttributes=function(){return this.attribs.length!==0},w.prototype.compareDocumentPosition=function(v){var a,R;return a=this,a===v?0:this.document()!==v.document()?(R=P.Disconnected|P.ImplementationSpecific,Math.random()<.5?R|=P.Preceding:R|=P.Following,R):a.isAncestor(v)?P.Contains|P.Preceding:a.isDescendant(v)?P.Contains|P.Following:a.isPreceding(v)?P.Preceding:P.Following},w.prototype.isSameNode=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.lookupPrefix=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isDefaultNamespace=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.lookupNamespaceURI=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isEqualNode=function(v){var a,R,D;if(v.nodeType!==this.nodeType)return!1;if(v.children.length!==this.children.length)return!1;for(a=R=0,D=this.children.length-1;0<=D?R<=D:R>=D;a=0<=D?++R:--R)if(!this.children[a].isEqualNode(v.children[a]))return!1;return!0},w.prototype.getFeature=function(v,a){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.setUserData=function(v,a,R){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.getUserData=function(v){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.contains=function(v){return v?v===this||this.isDescendant(v):!1},w.prototype.isDescendant=function(v){var a,R,D,c,b;for(b=this.children,D=0,c=b.length;D<c;D++){if(a=b[D],v===a)return!0;if(R=a.isDescendant(v),R)return!0}return!1},w.prototype.isAncestor=function(v){return v.isDescendant(this)},w.prototype.isPreceding=function(v){var a,R;return a=this.treePosition(v),R=this.treePosition(this),a===-1||R===-1?!1:a<R},w.prototype.isFollowing=function(v){var a,R;return a=this.treePosition(v),R=this.treePosition(this),a===-1||R===-1?!1:a>R},w.prototype.treePosition=function(v){var a,R;return R=0,a=!1,this.foreachTreeNode(this.document(),function(D){if(R++,!a&&D===v)return a=!0}),a?R:-1},w.prototype.foreachTreeNode=function(v,a){var R,D,c,b,x;for(v||(v=this.document()),b=v.children,D=0,c=b.length;D<c;D++){if(R=b[D],x=a(R))return x;if(x=this.foreachTreeNode(R,a),x)return x}},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(I,Z,N){"use strict";(function(){var P;Z.exports=P=function(){function m(T){this.nodes=T}return Object.defineProperty(m.prototype,"length",{get:function(){return this.nodes.length||0}}),m.prototype.clone=function(){return this.nodes=null},m.prototype.item=function(T){return this.nodes[T]||null},m}()}).call(void 0)},{}],275:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,_,g,S=function(i,r){for(var d in r)p.call(r,d)&&(i[d]=r[d]);function f(){this.constructor=i}return f.prototype=r.prototype,i.prototype=new f,i.__super__=r.prototype,i},p={}.hasOwnProperty;L=I("./NodeType"),_=I("./XMLCharacterData"),Z.exports=g=function(o){S(i,o);function i(r,d,f){if(i.__super__.constructor.call(this,r),d==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=L.ProcessingInstruction,this.target=this.stringify.insTarget(d),this.name=this.target,f&&(this.value=this.stringify.insValue(f))}return i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(r){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(r))},i.prototype.isEqualNode=function(r){return i.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)?!(r.target!==this.target):!1},i}(_)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,_,g,S=function(i,r){for(var d in r)p.call(r,d)&&(i[d]=r[d]);function f(){this.constructor=i}return f.prototype=r.prototype,i.prototype=new f,i.__super__=r.prototype,i},p={}.hasOwnProperty;L=I("./NodeType"),_=I("./XMLNode"),Z.exports=g=function(o){S(i,o);function i(r,d){if(i.__super__.constructor.call(this,r),d==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=L.Raw,this.value=this.stringify.raw(d)}return i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(r){return this.options.writer.raw(this,this.options.writer.filterOptions(r))},i}(_)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(I,Z,N){"use strict";(function(){var P,m,T,L,_=function(p,o){for(var i in o)g.call(o,i)&&(p[i]=o[i]);function r(){this.constructor=p}return r.prototype=o.prototype,p.prototype=new r,p.__super__=o.prototype,p},g={}.hasOwnProperty;P=I("./NodeType"),L=I("./XMLWriterBase"),m=I("./WriterState"),Z.exports=T=function(S){_(p,S);function p(o,i){this.stream=o,p.__super__.constructor.call(this,i)}return p.prototype.endline=function(o,i,r){return o.isLastRootNode&&i.state===m.CloseTag?"":p.__super__.endline.call(this,o,i,r)},p.prototype.document=function(o,i){var r,d,f,h,E,y,l,n,s;for(l=o.children,d=f=0,E=l.length;f<E;d=++f)r=l[d],r.isLastRootNode=d===o.children.length-1;for(i=this.filterOptions(i),n=o.children,s=[],h=0,y=n.length;h<y;h++)r=n[h],s.push(this.writeChildNode(r,i,0));return s},p.prototype.attribute=function(o,i,r){return this.stream.write(p.__super__.attribute.call(this,o,i,r))},p.prototype.cdata=function(o,i,r){return this.stream.write(p.__super__.cdata.call(this,o,i,r))},p.prototype.comment=function(o,i,r){return this.stream.write(p.__super__.comment.call(this,o,i,r))},p.prototype.declaration=function(o,i,r){return this.stream.write(p.__super__.declaration.call(this,o,i,r))},p.prototype.docType=function(o,i,r){var d,f,h,E;if(r||(r=0),this.openNode(o,i,r),i.state=m.OpenTag,this.stream.write(this.indent(o,i,r)),this.stream.write("<!DOCTYPE "+o.root().name),o.pubID&&o.sysID?this.stream.write(' PUBLIC "'+o.pubID+'" "'+o.sysID+'"'):o.sysID&&this.stream.write(' SYSTEM "'+o.sysID+'"'),o.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(o,i,r)),i.state=m.InsideTag,E=o.children,f=0,h=E.length;f<h;f++)d=E[f],this.writeChildNode(d,i,r+1);i.state=m.CloseTag,this.stream.write("]")}return i.state=m.CloseTag,this.stream.write(i.spaceBeforeSlash+">"),this.stream.write(this.endline(o,i,r)),i.state=m.None,this.closeNode(o,i,r)},p.prototype.element=function(o,i,r){var d,f,h,E,y,l,n,s,u,w;r||(r=0),this.openNode(o,i,r),i.state=m.OpenTag,this.stream.write(this.indent(o,i,r)+"<"+o.name),u=o.attribs;for(n in u){if(!g.call(u,n))continue;d=u[n],this.attribute(d,i,r)}if(h=o.children.length,E=h===0?null:o.children[0],h===0||o.children.every(function(v){return(v.type===P.Text||v.type===P.Raw)&&v.value===""}))i.allowEmpty?(this.stream.write(">"),i.state=m.CloseTag,this.stream.write("</"+o.name+">")):(i.state=m.CloseTag,this.stream.write(i.spaceBeforeSlash+"/>"));else if(i.pretty&&h===1&&(E.type===P.Text||E.type===P.Raw)&&E.value!=null)this.stream.write(">"),i.state=m.InsideTag,i.suppressPrettyCount++,s=!0,this.writeChildNode(E,i,r+1),i.suppressPrettyCount--,s=!1,i.state=m.CloseTag,this.stream.write("</"+o.name+">");else{for(this.stream.write(">"+this.endline(o,i,r)),i.state=m.InsideTag,w=o.children,y=0,l=w.length;y<l;y++)f=w[y],this.writeChildNode(f,i,r+1);i.state=m.CloseTag,this.stream.write(this.indent(o,i,r)+"</"+o.name+">")}return this.stream.write(this.endline(o,i,r)),i.state=m.None,this.closeNode(o,i,r)},p.prototype.processingInstruction=function(o,i,r){return this.stream.write(p.__super__.processingInstruction.call(this,o,i,r))},p.prototype.raw=function(o,i,r){return this.stream.write(p.__super__.raw.call(this,o,i,r))},p.prototype.text=function(o,i,r){return this.stream.write(p.__super__.text.call(this,o,i,r))},p.prototype.dtdAttList=function(o,i,r){return this.stream.write(p.__super__.dtdAttList.call(this,o,i,r))},p.prototype.dtdElement=function(o,i,r){return this.stream.write(p.__super__.dtdElement.call(this,o,i,r))},p.prototype.dtdEntity=function(o,i,r){return this.stream.write(p.__super__.dtdEntity.call(this,o,i,r))},p.prototype.dtdNotation=function(o,i,r){return this.stream.write(p.__super__.dtdNotation.call(this,o,i,r))},p}(L)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(I,Z,N){"use strict";(function(){var P,m,T=function(g,S){for(var p in S)L.call(S,p)&&(g[p]=S[p]);function o(){this.constructor=g}return o.prototype=S.prototype,g.prototype=new o,g.__super__=S.prototype,g},L={}.hasOwnProperty;m=I("./XMLWriterBase"),Z.exports=P=function(_){T(g,_);function g(S){g.__super__.constructor.call(this,S)}return g.prototype.document=function(S,p){var o,i,r,d,f;for(p=this.filterOptions(p),d="",f=S.children,i=0,r=f.length;i<r;i++)o=f[i],d+=this.writeChildNode(o,p,0);return p.pretty&&d.slice(-p.newline.length)===p.newline&&(d=d.slice(0,-p.newline.length)),d},g}(m)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(I,Z,N){"use strict";(function(){var P,m=function(_,g){return function(){return _.apply(g,arguments)}},T={}.hasOwnProperty;Z.exports=P=function(){function L(_){this.assertLegalName=m(this.assertLegalName,this),this.assertLegalChar=m(this.assertLegalChar,this);var g,S,p;_||(_={}),this.options=_,this.options.version||(this.options.version="1.0"),S=_.stringify||{};for(g in S){if(!T.call(S,g))continue;p=S[g],this[g]=p}}return L.prototype.name=function(_){return this.options.noValidation?_:this.assertLegalName(""+_||"")},L.prototype.text=function(_){return this.options.noValidation?_:this.assertLegalChar(this.textEscape(""+_||""))},L.prototype.cdata=function(_){return this.options.noValidation?_:(_=""+_||"",_=_.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(_))},L.prototype.comment=function(_){if(this.options.noValidation)return _;if(_=""+_||"",_.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+_);return this.assertLegalChar(_)},L.prototype.raw=function(_){return this.options.noValidation?_:""+_||""},L.prototype.attValue=function(_){return this.options.noValidation?_:this.assertLegalChar(this.attEscape(_=""+_||""))},L.prototype.insTarget=function(_){return this.options.noValidation?_:this.assertLegalChar(""+_||"")},L.prototype.insValue=function(_){if(this.options.noValidation)return _;if(_=""+_||"",_.match(/\?>/))throw new Error("Invalid processing instruction value: "+_);return this.assertLegalChar(_)},L.prototype.xmlVersion=function(_){if(this.options.noValidation)return _;if(_=""+_||"",!_.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+_);return _},L.prototype.xmlEncoding=function(_){if(this.options.noValidation)return _;if(_=""+_||"",!_.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+_);return this.assertLegalChar(_)},L.prototype.xmlStandalone=function(_){return this.options.noValidation?_:_?"yes":"no"},L.prototype.dtdPubID=function(_){return this.options.noValidation?_:this.assertLegalChar(""+_||"")},L.prototype.dtdSysID=function(_){return this.options.noValidation?_:this.assertLegalChar(""+_||"")},L.prototype.dtdElementValue=function(_){return this.options.noValidation?_:this.assertLegalChar(""+_||"")},L.prototype.dtdAttType=function(_){return this.options.noValidation?_:this.assertLegalChar(""+_||"")},L.prototype.dtdAttDefault=function(_){return this.options.noValidation?_:this.assertLegalChar(""+_||"")},L.prototype.dtdEntityValue=function(_){return this.options.noValidation?_:this.assertLegalChar(""+_||"")},L.prototype.dtdNData=function(_){return this.options.noValidation?_:this.assertLegalChar(""+_||"")},L.prototype.convertAttKey="@",L.prototype.convertPIKey="?",L.prototype.convertTextKey="#text",L.prototype.convertCDataKey="#cdata",L.prototype.convertCommentKey="#comment",L.prototype.convertRawKey="#raw",L.prototype.assertLegalChar=function(_){var g,S;if(this.options.noValidation)return _;if(g="",this.options.version==="1.0"){if(g=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=_.match(g))throw new Error("Invalid character in string: "+_+" at index "+S.index)}else if(this.options.version==="1.1"&&(g=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S=_.match(g)))throw new Error("Invalid character in string: "+_+" at index "+S.index);return _},L.prototype.assertLegalName=function(_){var g;if(this.options.noValidation)return _;if(this.assertLegalChar(_),g=/^([: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])*$/,!_.match(g))throw new Error("Invalid character in name");return _},L.prototype.textEscape=function(_){var g;return this.options.noValidation?_:(g=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,_.replace(g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},L.prototype.attEscape=function(_){var g;return this.options.noValidation?_:(g=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,_.replace(g,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},L}()}).call(void 0)},{}],280:[function(I,Z,N){"use strict";var P=I("babel-runtime/core-js/object/create"),m=T(P);function T(L){return L&&L.__esModule?L:{default:L}}(function(){var L,_,g,S=function(i,r){for(var d in r)p.call(r,d)&&(i[d]=r[d]);function f(){this.constructor=i}return f.prototype=r.prototype,i.prototype=new f,i.__super__=r.prototype,i},p={}.hasOwnProperty;L=I("./NodeType"),_=I("./XMLCharacterData"),Z.exports=g=function(o){S(i,o);function i(r,d){if(i.__super__.constructor.call(this,r),d==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=L.Text,this.value=this.stringify.text(d)}return Object.defineProperty(i.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(i.prototype,"wholeText",{get:function(){var d,f,h;for(h="",f=this.previousSibling;f;)h=f.data+h,f=f.previousSibling;for(h+=this.data,d=this.nextSibling;d;)h=h+d.data,d=d.nextSibling;return h}}),i.prototype.clone=function(){return(0,m.default)(this)},i.prototype.toString=function(r){return this.options.writer.text(this,this.options.writer.filterOptions(r))},i.prototype.splitText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.replaceWholeText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},i}(_)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(I,Z,N){"use strict";(function(){var P,m,T,L,_,g,S,p,o,i,r,d,f,h,E,y,l,n={}.hasOwnProperty;l=I("./Utility").assign,P=I("./NodeType"),o=I("./XMLDeclaration"),i=I("./XMLDocType"),T=I("./XMLCData"),L=I("./XMLComment"),d=I("./XMLElement"),h=I("./XMLRaw"),E=I("./XMLText"),f=I("./XMLProcessingInstruction"),r=I("./XMLDummy"),_=I("./XMLDTDAttList"),g=I("./XMLDTDElement"),S=I("./XMLDTDEntity"),p=I("./XMLDTDNotation"),m=I("./WriterState"),Z.exports=y=function(){function s(u){var w,v,a;u||(u={}),this.options=u,v=u.writer||{};for(w in v){if(!n.call(v,w))continue;a=v[w],this["_"+w]=this[w],this[w]=a}}return s.prototype.filterOptions=function(u){var w,v,a,R,D,c,b,x;return u||(u={}),u=l({},this.options,u),w={writer:this},w.pretty=u.pretty||!1,w.allowEmpty=u.allowEmpty||!1,w.indent=(v=u.indent)!=null?v:" ",w.newline=(a=u.newline)!=null?a:`
|
|
|
`,w.offset=(R=u.offset)!=null?R:0,w.dontPrettyTextNodes=(D=(c=u.dontPrettyTextNodes)!=null?c:u.dontprettytextnodes)!=null?D:0,w.spaceBeforeSlash=(b=(x=u.spaceBeforeSlash)!=null?x:u.spacebeforeslash)!=null?b:"",w.spaceBeforeSlash===!0&&(w.spaceBeforeSlash=" "),w.suppressPrettyCount=0,w.user={},w.state=m.None,w},s.prototype.indent=function(u,w,v){var a;return!w.pretty||w.suppressPrettyCount?"":w.pretty&&(a=(v||0)+w.offset+1,a>0)?new Array(a).join(w.indent):""},s.prototype.endline=function(u,w,v){return!w.pretty||w.suppressPrettyCount?"":w.newline},s.prototype.attribute=function(u,w,v){var a;return this.openAttribute(u,w,v),a=" "+u.name+'="'+u.value+'"',this.closeAttribute(u,w,v),a},s.prototype.cdata=function(u,w,v){var a;return this.openNode(u,w,v),w.state=m.OpenTag,a=this.indent(u,w,v)+"<![CDATA[",w.state=m.InsideTag,a+=u.value,w.state=m.CloseTag,a+="]]>"+this.endline(u,w,v),w.state=m.None,this.closeNode(u,w,v),a},s.prototype.comment=function(u,w,v){var a;return this.openNode(u,w,v),w.state=m.OpenTag,a=this.indent(u,w,v)+"<!-- ",w.state=m.InsideTag,a+=u.value,w.state=m.CloseTag,a+=" -->"+this.endline(u,w,v),w.state=m.None,this.closeNode(u,w,v),a},s.prototype.declaration=function(u,w,v){var a;return this.openNode(u,w,v),w.state=m.OpenTag,a=this.indent(u,w,v)+"<?xml",w.state=m.InsideTag,a+=' version="'+u.version+'"',u.encoding!=null&&(a+=' encoding="'+u.encoding+'"'),u.standalone!=null&&(a+=' standalone="'+u.standalone+'"'),w.state=m.CloseTag,a+=w.spaceBeforeSlash+"?>",a+=this.endline(u,w,v),w.state=m.None,this.closeNode(u,w,v),a},s.prototype.docType=function(u,w,v){var a,R,D,c,b;if(v||(v=0),this.openNode(u,w,v),w.state=m.OpenTag,c=this.indent(u,w,v),c+="<!DOCTYPE "+u.root().name,u.pubID&&u.sysID?c+=' PUBLIC "'+u.pubID+'" "'+u.sysID+'"':u.sysID&&(c+=' SYSTEM "'+u.sysID+'"'),u.children.length>0){for(c+=" [",c+=this.endline(u,w,v),w.state=m.InsideTag,b=u.children,R=0,D=b.length;R<D;R++)a=b[R],c+=this.writeChildNode(a,w,v+1);w.state=m.CloseTag,c+="]"}return w.state=m.CloseTag,c+=w.spaceBeforeSlash+">",c+=this.endline(u,w,v),w.state=m.None,this.closeNode(u,w,v),c},s.prototype.element=function(u,w,v){var a,R,D,c,b,x,C,F,j,k,X,G,W,K;v||(v=0),k=!1,X="",this.openNode(u,w,v),w.state=m.OpenTag,X+=this.indent(u,w,v)+"<"+u.name,G=u.attribs;for(j in G){if(!n.call(G,j))continue;a=G[j],X+=this.attribute(a,w,v)}if(D=u.children.length,c=D===0?null:u.children[0],D===0||u.children.every(function(B){return(B.type===P.Text||B.type===P.Raw)&&B.value===""}))w.allowEmpty?(X+=">",w.state=m.CloseTag,X+="</"+u.name+">"+this.endline(u,w,v)):(w.state=m.CloseTag,X+=w.spaceBeforeSlash+"/>"+this.endline(u,w,v));else if(w.pretty&&D===1&&(c.type===P.Text||c.type===P.Raw)&&c.value!=null)X+=">",w.state=m.InsideTag,w.suppressPrettyCount++,k=!0,X+=this.writeChildNode(c,w,v+1),w.suppressPrettyCount--,k=!1,w.state=m.CloseTag,X+="</"+u.name+">"+this.endline(u,w,v);else{if(w.dontPrettyTextNodes){for(W=u.children,b=0,C=W.length;b<C;b++)if(R=W[b],(R.type===P.Text||R.type===P.Raw)&&R.value!=null){w.suppressPrettyCount++,k=!0;break}}for(X+=">"+this.endline(u,w,v),w.state=m.InsideTag,K=u.children,x=0,F=K.length;x<F;x++)R=K[x],X+=this.writeChildNode(R,w,v+1);w.state=m.CloseTag,X+=this.indent(u,w,v)+"</"+u.name+">",k&&w.suppressPrettyCount--,X+=this.endline(u,w,v),w.state=m.None}return this.closeNode(u,w,v),X},s.prototype.writeChildNode=function(u,w,v){switch(u.type){case P.CData:return this.cdata(u,w,v);case P.Comment:return this.comment(u,w,v);case P.Element:return this.element(u,w,v);case P.Raw:return this.raw(u,w,v);case P.Text:return this.text(u,w,v);case P.ProcessingInstruction:return this.processingInstruction(u,w,v);case P.Dummy:return"";case P.Declaration:return this.declaration(u,w,v);case P.DocType:return this.docType(u,w,v);case P.AttributeDeclaration:return this.dtdAttList(u,w,v);case P.ElementDeclaration:return this.dtdElement(u,w,v);case P.EntityDeclaration:return this.dtdEntity(u,w,v);case P.NotationDeclaration:return this.dtdNotation(u,w,v);default:throw new Error("Unknown XML node type: "+u.constructor.name)}},s.prototype.processingInstruction=function(u,w,v){var a;return this.openNode(u,w,v),w.state=m.OpenTag,a=this.indent(u,w,v)+"<?",w.state=m.InsideTag,a+=u.target,u.value&&(a+=" "+u.value),w.state=m.CloseTag,a+=w.spaceBeforeSlash+"?>",a+=this.endline(u,w,v),w.state=m.None,this.closeNode(u,w,v),a},s.prototype.raw=function(u,w,v){var a;return this.openNode(u,w,v),w.state=m.OpenTag,a=this.indent(u,w,v),w.state=m.InsideTag,a+=u.value,w.state=m.CloseTag,a+=this.endline(u,w,v),w.state=m.None,this.closeNode(u,w,v),a},s.prototype.text=function(u,w,v){var a;return this.openNode(u,w,v),w.state=m.OpenTag,a=this.indent(u,w,v),w.state=m.InsideTag,a+=u.value,w.state=m.CloseTag,a+=this.endline(u,w,v),w.state=m.None,this.closeNode(u,w,v),a},s.prototype.dtdAttList=function(u,w,v){var a;return this.openNode(u,w,v),w.state=m.OpenTag,a=this.indent(u,w,v)+"<!ATTLIST",w.state=m.InsideTag,a+=" "+u.elementName+" "+u.attributeName+" "+u.attributeType,u.defaultValueType!=="#DEFAULT"&&(a+=" "+u.defaultValueType),u.defaultValue&&(a+=' "'+u.defaultValue+'"'),w.state=m.CloseTag,a+=w.spaceBeforeSlash+">"+this.endline(u,w,v),w.state=m.None,this.closeNode(u,w,v),a},s.prototype.dtdElement=function(u,w,v){var a;return this.openNode(u,w,v),w.state=m.OpenTag,a=this.indent(u,w,v)+"<!ELEMENT",w.state=m.InsideTag,a+=" "+u.name+" "+u.value,w.state=m.CloseTag,a+=w.spaceBeforeSlash+">"+this.endline(u,w,v),w.state=m.None,this.closeNode(u,w,v),a},s.prototype.dtdEntity=function(u,w,v){var a;return this.openNode(u,w,v),w.state=m.OpenTag,a=this.indent(u,w,v)+"<!ENTITY",w.state=m.InsideTag,u.pe&&(a+=" %"),a+=" "+u.name,u.value?a+=' "'+u.value+'"':(u.pubID&&u.sysID?a+=' PUBLIC "'+u.pubID+'" "'+u.sysID+'"':u.sysID&&(a+=' SYSTEM "'+u.sysID+'"'),u.nData&&(a+=" NDATA "+u.nData)),w.state=m.CloseTag,a+=w.spaceBeforeSlash+">"+this.endline(u,w,v),w.state=m.None,this.closeNode(u,w,v),a},s.prototype.dtdNotation=function(u,w,v){var a;return this.openNode(u,w,v),w.state=m.OpenTag,a=this.indent(u,w,v)+"<!NOTATION",w.state=m.InsideTag,a+=" "+u.name,u.pubID&&u.sysID?a+=' PUBLIC "'+u.pubID+'" "'+u.sysID+'"':u.pubID?a+=' PUBLIC "'+u.pubID+'"':u.sysID&&(a+=' SYSTEM "'+u.sysID+'"'),w.state=m.CloseTag,a+=w.spaceBeforeSlash+">"+this.endline(u,w,v),w.state=m.None,this.closeNode(u,w,v),a},s.prototype.openNode=function(u,w,v){},s.prototype.closeNode=function(u,w,v){},s.prototype.openAttribute=function(u,w,v){},s.prototype.closeAttribute=function(u,w,v){},s}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],282:[function(I,Z,N){"use strict";(function(){var P,m,T,L,_,g,S,p,o,i;i=I("./Utility"),p=i.assign,o=i.isFunction,T=I("./XMLDOMImplementation"),L=I("./XMLDocument"),_=I("./XMLDocumentCB"),S=I("./XMLStringWriter"),g=I("./XMLStreamWriter"),P=I("./NodeType"),m=I("./WriterState"),Z.exports.create=function(r,d,f,h){var E,y;if(r==null)throw new Error("Root element needs a name.");return h=p({},d,f,h),E=new L(h),y=E.element(r),h.headless||(E.declaration(h),(h.pubID!=null||h.sysID!=null)&&E.dtd(h)),y},Z.exports.begin=function(r,d,f){var h;return o(r)&&(h=[r,d],d=h[0],f=h[1],r={}),d?new _(r,d,f):new L(r)},Z.exports.stringWriter=function(r){return new S(r)},Z.exports.streamWriter=function(r,d){return new g(r,d)},Z.exports.implementation=new T,Z.exports.nodeType=P,Z.exports.writerState=m}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(I,Z,N){Z.exports=m;var P=Object.prototype.hasOwnProperty;function m(){for(var T={},L=0;L<arguments.length;L++){var _=arguments[L];for(var g in _)P.call(_,g)&&(T[g]=_[g])}return T}},{}],284:[function(I,Z,N){"use strict";var P=I("buffer").Buffer,m=I("./sha"),T=I("./md5"),L={sha1:m,md5:T},_=64,g=P.alloc(_);g.fill(0);function S(i,r,d){P.isBuffer(r)||(r=P.from(r)),P.isBuffer(d)||(d=P.from(d)),r.length>_?r=i(r):r.length<_&&(r=P.concat([r,g],_));for(var f=P.alloc(_),h=P.alloc(_),E=0;E<_;E++)f[E]=r[E]^54,h[E]=r[E]^92;var y=i(P.concat([f,d]));return i(P.concat([h,y]))}function p(i,r){i=i||"sha1";var d=L[i],f=[],h=0;return d||o("algorithm:",i,"is not yet supported"),{update:function(y){return P.isBuffer(y)||(y=P.from(y)),f.push(y),h+=y.length,this},digest:function(y){var l=P.concat(f),n=r?S(d,r,l):d(l);return f=null,y?n.toString(y):n}}}function o(){var i=[].slice.call(arguments).join(" ");throw new Error([i,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}N.createHash=function(i){return p(i)},N.createHmac=function(i,r){return p(i,r)},N.createCredentials=function(){o("sorry,createCredentials is not implemented yet")},N.createCipher=function(){o("sorry,createCipher is not implemented yet")},N.createCipheriv=function(){o("sorry,createCipheriv is not implemented yet")},N.createDecipher=function(){o("sorry,createDecipher is not implemented yet")},N.createDecipheriv=function(){o("sorry,createDecipheriv is not implemented yet")},N.createSign=function(){o("sorry,createSign is not implemented yet")},N.createVerify=function(){o("sorry,createVerify is not implemented yet")},N.createDiffieHellman=function(){o("sorry,createDiffieHellman is not implemented yet")},N.pbkdf2=function(){o("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(I,Z,N){"use strict";var P=I("buffer").Buffer,m=4,T=P.alloc(m);T.fill(0);var L=8;function _(p,o){if(p.length%m!==0){var i=p.length+(m-p.length%m);p=P.concat([p,T],i)}for(var r=[],d=o?p.readInt32BE:p.readInt32LE,f=0;f<p.length;f+=m)r.push(d.call(p,f));return r}function g(p,o,i){for(var r=P.alloc(o),d=i?r.writeInt32BE:r.writeInt32LE,f=0;f<p.length;f++)d.call(r,p[f],f*4,!0);return r}function S(p,o,i,r){P.isBuffer(p)||(p=P.from(p));var d=o(_(p,r),p.length*L);return g(d,i,r)}Z.exports={hash:S}},{buffer:73}],286:[function(I,Z,N){"use strict";var P=I("./helpers");function m(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function T(r,d){r[d>>5]|=128<<d%32,r[(d+64>>>9<<4)+14]=d;for(var f=1732584193,h=-271733879,E=-1732584194,y=271733878,l=0;l<r.length;l+=16){var n=f,s=h,u=E,w=y;f=_(f,h,E,y,r[l+0],7,-680876936),y=_(y,f,h,E,r[l+1],12,-389564586),E=_(E,y,f,h,r[l+2],17,606105819),h=_(h,E,y,f,r[l+3],22,-1044525330),f=_(f,h,E,y,r[l+4],7,-176418897),y=_(y,f,h,E,r[l+5],12,1200080426),E=_(E,y,f,h,r[l+6],17,-1473231341),h=_(h,E,y,f,r[l+7],22,-45705983),f=_(f,h,E,y,r[l+8],7,1770035416),y=_(y,f,h,E,r[l+9],12,-1958414417),E=_(E,y,f,h,r[l+10],17,-42063),h=_(h,E,y,f,r[l+11],22,-1990404162),f=_(f,h,E,y,r[l+12],7,1804603682),y=_(y,f,h,E,r[l+13],12,-40341101),E=_(E,y,f,h,r[l+14],17,-1502002290),h=_(h,E,y,f,r[l+15],22,1236535329),f=g(f,h,E,y,r[l+1],5,-165796510),y=g(y,f,h,E,r[l+6],9,-1069501632),E=g(E,y,f,h,r[l+11],14,643717713),h=g(h,E,y,f,r[l+0],20,-373897302),f=g(f,h,E,y,r[l+5],5,-701558691),y=g(y,f,h,E,r[l+10],9,38016083),E=g(E,y,f,h,r[l+15],14,-660478335),h=g(h,E,y,f,r[l+4],20,-405537848),f=g(f,h,E,y,r[l+9],5,568446438),y=g(y,f,h,E,r[l+14],9,-1019803690),E=g(E,y,f,h,r[l+3],14,-187363961),h=g(h,E,y,f,r[l+8],20,1163531501),f=g(f,h,E,y,r[l+13],5,-1444681467),y=g(y,f,h,E,r[l+2],9,-51403784),E=g(E,y,f,h,r[l+7],14,1735328473),h=g(h,E,y,f,r[l+12],20,-1926607734),f=S(f,h,E,y,r[l+5],4,-378558),y=S(y,f,h,E,r[l+8],11,-2022574463),E=S(E,y,f,h,r[l+11],16,1839030562),h=S(h,E,y,f,r[l+14],23,-35309556),f=S(f,h,E,y,r[l+1],4,-1530992060),y=S(y,f,h,E,r[l+4],11,1272893353),E=S(E,y,f,h,r[l+7],16,-155497632),h=S(h,E,y,f,r[l+10],23,-1094730640),f=S(f,h,E,y,r[l+13],4,681279174),y=S(y,f,h,E,r[l+0],11,-358537222),E=S(E,y,f,h,r[l+3],16,-722521979),h=S(h,E,y,f,r[l+6],23,76029189),f=S(f,h,E,y,r[l+9],4,-640364487),y=S(y,f,h,E,r[l+12],11,-421815835),E=S(E,y,f,h,r[l+15],16,530742520),h=S(h,E,y,f,r[l+2],23,-995338651),f=p(f,h,E,y,r[l+0],6,-198630844),y=p(y,f,h,E,r[l+7],10,1126891415),E=p(E,y,f,h,r[l+14],15,-1416354905),h=p(h,E,y,f,r[l+5],21,-57434055),f=p(f,h,E,y,r[l+12],6,1700485571),y=p(y,f,h,E,r[l+3],10,-1894986606),E=p(E,y,f,h,r[l+10],15,-1051523),h=p(h,E,y,f,r[l+1],21,-2054922799),f=p(f,h,E,y,r[l+8],6,1873313359),y=p(y,f,h,E,r[l+15],10,-30611744),E=p(E,y,f,h,r[l+6],15,-1560198380),h=p(h,E,y,f,r[l+13],21,1309151649),f=p(f,h,E,y,r[l+4],6,-145523070),y=p(y,f,h,E,r[l+11],10,-1120210379),E=p(E,y,f,h,r[l+2],15,718787259),h=p(h,E,y,f,r[l+9],21,-343485551),f=o(f,n),h=o(h,s),E=o(E,u),y=o(y,w)}return Array(f,h,E,y)}function L(r,d,f,h,E,y){return o(i(o(o(d,r),o(h,y)),E),f)}function _(r,d,f,h,E,y,l){return L(d&f|~d&h,r,d,E,y,l)}function g(r,d,f,h,E,y,l){return L(d&h|f&~h,r,d,E,y,l)}function S(r,d,f,h,E,y,l){return L(d^f^h,r,d,E,y,l)}function p(r,d,f,h,E,y,l){return L(f^(d|~h),r,d,E,y,l)}function o(r,d){var f=(r&65535)+(d&65535),h=(r>>16)+(d>>16)+(f>>16);return h<<16|f&65535}function i(r,d){return r<<d|r>>>32-d}Z.exports=function(d){return P.hash(d,T,16)}},{"./helpers":285}],287:[function(I,Z,N){"use strict";var P=I("./helpers");function m(S,p){S[p>>5]|=128<<24-p%32,S[(p+64>>9<<4)+15]=p;for(var o=Array(80),i=1732584193,r=-271733879,d=-1732584194,f=271733878,h=-1009589776,E=0;E<S.length;E+=16){for(var y=i,l=r,n=d,s=f,u=h,w=0;w<80;w++){w<16?o[w]=S[E+w]:o[w]=g(o[w-3]^o[w-8]^o[w-14]^o[w-16],1);var v=_(_(g(i,5),T(w,r,d,f)),_(_(h,o[w]),L(w)));h=f,f=d,d=g(r,30),r=i,i=v}i=_(i,y),r=_(r,l),d=_(d,n),f=_(f,s),h=_(h,u)}return Array(i,r,d,f,h)}function T(S,p,o,i){return S<20?p&o|~p&i:S<40?p^o^i:S<60?p&o|p&i|o&i:p^o^i}function L(S){return S<20?1518500249:S<40?1859775393:S<60?-1894007588:-899497514}function _(S,p){var o=(S&65535)+(p&65535),i=(S>>16)+(p>>16)+(o>>16);return i<<16|o&65535}function g(S,p){return S<<p|S>>>32-p}Z.exports=function(p){return P.hash(p,m,20,!0)}},{"./helpers":285}],288:[function(I,Z,N){"use strict";Z.exports=function(){return function(){}}},{}],289:[function(I,Z,N){(function(P){"use strict";var m=I("babel-runtime/helpers/typeof"),T=L(m);function L(i){return i&&i.__esModule?i:{default:i}}var _=I("stream"),g=_.Stream,S=I("../lib/common/utils/isArray"),p=S.isArray;Z.exports.string=function(r){return typeof r=="string"},Z.exports.array=p,Z.exports.buffer=P.isBuffer;function o(i){return i instanceof g}Z.exports.writableStream=function(r){return o(r)&&typeof r._write=="function"&&(0,T.default)(r._writableState)==="object"}}).call(this,{isBuffer:I("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":42,"../node_modules/is-buffer/index.js":197,"babel-runtime/helpers/typeof":67,stream:230}],290:[function(I,Z,N){"use strict";N.encodeURIComponent=function(P){try{return encodeURIComponent(P)}catch(m){return P}},N.escape=I("escape-html"),N.timestamp=function(m){if(m){var T=m;return typeof T=="string"&&(T=Number(T)),String(m).length===10&&(T*=1e3),new Date(T)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(I,Z,N){(function(P,m){"use strict";var T=I("babel-runtime/core-js/json/stringify"),L=S(T),_=I("babel-runtime/helpers/typeof"),g=S(_);function S(w){return w&&w.__esModule?w:{default:w}}var p=I("util"),o=I("url"),i=I("http"),r=I("https"),d=I("debug")("urllib"),f=I("humanize-ms"),h,E=0,y=Math.pow(2,31)-10,l=/^https?:\/\//i;function n(w,v){return w===void 0?v:w}function s(w,v){return function(a,R,D){if(a)return v(a);w({data:R,status:D.statusCode,headers:D.headers,res:D})}}N.TIMEOUTS=[f("300s"),f("300s")];var u=["json","text"];N.request=function(v,a,R){return arguments.length===2&&typeof a=="function"&&(R=a,a=null),typeof R=="function"?N.requestWithCallback(v,a,R):(h||(h=I("any-promise")),new h(function(D,c){N.requestWithCallback(v,a,s(D,c))}))},N.requestWithCallback=function(v,a,R){if(!v||typeof v!="string"&&(typeof v=="undefined"?"undefined":(0,g.default)(v))!=="object"){var D=p.format("expect request url to be a string or a http request options, but got %j",v);throw new Error(D)}arguments.length===2&&typeof a=="function"&&(R=a,a=null),a=a||{},E>=y&&(E=0);var c=++E;a.requestUrls=a.requestUrls||[];var b={requestId:c,url:v,args:a,ctx:a.ctx};a.emitter&&a.emitter.emit("request",b),a.timeout=a.timeout||N.TIMEOUTS,a.maxRedirects=a.maxRedirects||10,a.streaming=a.streaming||a.customResponse;var x=Date.now(),C;typeof v=="string"?(l.test(v)||(v="http://"+v),C=o.parse(v)):C=v;var F=(a.type||a.method||C.method||"GET").toUpperCase(),j=C.port||80,k=i,X=n(a.agent,N.agent),G=a.fixJSONCtlChars;C.protocol==="https:"&&(k=r,X=n(a.httpsAgent,N.httpsAgent),C.port||(j=443));var W={host:C.hostname||C.host||"localhost",path:C.path||"/",method:F,port:j,agent:X,headers:a.headers||{},lookup:a.lookup};Array.isArray(a.timeout)?W.requestTimeout=a.timeout[a.timeout.length-1]:typeof a.timeout!="undefined"&&(W.requestTimeout=a.timeout);for(var K=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],B=0;B<K.length;B++){var U=K[B];a.hasOwnProperty(U)&&(W[U]=a[U])}W.rejectUnauthorized===!1&&!W.hasOwnProperty("secureOptions")&&(W.secureOptions=I("constants").SSL_OP_NO_TLSv1_2);var H=a.auth||C.auth;H&&(W.auth=H);var q=a.content||a.data,ie=F==="GET"||F==="HEAD"||a.dataAsQueryString;if(!a.content&&(q&&!(typeof q=="string"||m.isBuffer(q))))if(ie)q=a.nestedQuerystring?qs.stringify(q):querystring.stringify(q);else{var ce=W.headers["Content-Type"]||W.headers["content-type"];ce||(a.contentType==="json"?ce="application/json":ce="application/x-www-form-urlencoded",W.headers["Content-Type"]=ce),parseContentType(ce).type==="application/json"?q=(0,L.default)(q):q=a.nestedQuerystring?qs.stringify(q):querystring.stringify(q)}ie&&q&&(W.path+=(C.query?"&":"?")+q,q=null);var he=0;if(q){var be=q.length;m.isBuffer(q)||(be=m.byteLength(q)),he=W.headers["Content-Length"]=be}a.dataType==="json"&&(W.headers.Accept="application/json"),typeof a.beforeRequest=="function"&&a.beforeRequest(W);var ne=null,le=null,ue=null,te=!1,oe=!1,Q=0,se=-1,J=!1,ee="",ge="",re=null;a.timing&&(re={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function Y(){ne&&(clearTimeout(ne),ne=null)}function z(){le&&(clearTimeout(le),le=null)}function $(_e,Ge,Ve){if(z(),!R){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),c,P.pid,W.method,v),_e&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),c,P.pid,_e.name,_e.message,_e.stack);return}var Ie=R;R=null;var He={};if(Ve&&(se=Ve.statusCode,He=Ve.headers),se===401&&He["www-authenticate"]&&(!a.headers||!a.headers.Authorization)&&a.digestAuth){var Le=He["www-authenticate"];if(Le.indexOf("Digest ")>=0)return d("Request#%d %s: got digest auth header WWW-Authenticate: %s",c,v,Le),a.headers=a.headers||{},a.headers.Authorization=digestAuthHeader(W.method,W.path,Le,a.digestAuth),d("Request#%d %s: auth with digest header: %s",c,v,a.headers.Authorization),Ve.headers["set-cookie"]&&(a.headers.Cookie=Ve.headers["set-cookie"].join(";")),N.requestWithCallback(v,a,Ie)}var Te=Date.now()-x;re&&(re.contentDownload=Te),d("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Te,Q,se,W.method,W.host,W.path,oe,re);var Ae={status:se,statusCode:se,headers:He,size:Q,aborted:J,rt:Te,keepAliveSocket:oe,data:Ge,requestUrls:a.requestUrls,timing:re,remoteAddress:ee,remotePort:ge};if(_e){var ye="";X&&typeof X.getCurrentStatus=="function"&&(ye=", agent status: "+(0,L.default)(X.getCurrentStatus())),_e.message+=", "+W.method+" "+v+" "+se+" (connected: "+te+", keepalive socket: "+oe+ye+`)
|
|
|
headers: `+(0,L.default)(He),_e.data=Ge,_e.path=W.path,_e.status=se,_e.headers=He,_e.res=Ae}Ie(_e,Ge,a.streaming?Ve:Ae),a.emitter&&(b.url=v,b.socket=Fe&&Fe.connection,b.options=W,b.size=he,a.emitter.emit("response",{requestId:c,error:_e,ctx:a.ctx,req:b,res:Ae}))}function me(_e){var Ge=null;if(a.followRedirect&&statuses.redirect[_e.statusCode]){a._followRedirectCount=(a._followRedirectCount||0)+1;var Ve=_e.headers.location;if(!Ve)Ge=new Error("Got statusCode "+_e.statusCode+" but cannot resolve next location from headers"),Ge.name="FollowRedirectError";else if(a._followRedirectCount>a.maxRedirects)Ge=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+v),Ge.name="MaxRedirectError";else{var Ie=a.formatRedirectUrl?a.formatRedirectUrl(v,Ve):o.resolve(v,Ve);d("Request#%d %s: `redirected` from %s to %s",c,W.path,v,Ie),z(),a.headers&&a.headers.Host&&l.test(Ve)&&(a.headers.Host=null);var He=R;return R=null,N.requestWithCallback(Ie,a,He),{redirect:!0,error:null}}}return{redirect:!1,error:Ge}}!W.headers["User-Agent"]&&!W.headers["user-agent"]&&(W.headers["User-Agent"]=navigator.userAgent),a.gzip&&(!W.headers["Accept-Encoding"]&&!W.headers["accept-encoding"]&&(W.headers["Accept-Encoding"]="gzip"));function pe(_e,Ge,Ve){var Ie=_e.headers["content-encoding"];return Ve(null,Ge,Ie)}var xe=a.writeStream;d("Request#%d %s %s with headers %j, options.path: %s",c,F,v,W.headers,W.path),a.requestUrls.push(v);function Re(_e){if(re&&(re.waiting=Date.now()-x),d("Request#%d %s `req response` event emit: status %d, headers: %j",c,v,_e.statusCode,_e.headers),a.streaming){var Ge=me(_e);if(Ge.redirect){_e.resume();return}return Ge.error?(_e.resume(),$(Ge.error,null,_e)):$(null,null,_e)}if(_e.on("close",function(){d("Request#%d %s: `res close` event emit, total size %d",c,v,Q)}),_e.on("error",function(){d("Request#%d %s: `res error` event emit, total size %d",c,v,Q)}),_e.on("aborted",function(){J=!0,d("Request#%d %s: `res aborted` event emit, total size %d",c,v,Q)}),xe){var Ge=me(_e);if(Ge.redirect){_e.resume();return}return Ge.error?(_e.resume(),xe.end(),$(Ge.error,null,_e)):(a.consumeWriteStream===!1?_e.on("end",$.bind(null,null,null,_e)):isNode010||isNode012?first([[xe,"close"],[_e,"aborted"]],function(He,Le,Te){d("Request#%d %s: writeStream or res %s event emitted",c,v,Te),$(ue||null,null,_e)}):xe.on("close",function(){d("Request#%d %s: writeStream close event emitted",c,v),$(ue||null,null,_e)}),_e.pipe(xe))}var Ve=[];_e.on("data",function(Ie){d("Request#%d %s: `res data` event emit, size %d",c,v,Ie.length),Q+=Ie.length,Ve.push(Ie)}),_e.on("end",function(){var Ie=m.concat(Ve,Q);if(d("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",c,v,Q,_e._dumped),ue)return $(ue,Ie,_e);var He=me(_e);if(He.error)return $(He.error,Ie,_e);if(He.redirect)return;pe(_e,Ie,function(Le,Te,Ae){if(Le)return $(Le,Ie,_e);if(!Ae&&u.indexOf(a.dataType)>=0){try{Te=decodeBodyByCharset(Te,_e)}catch(Ee){return d("decodeBodyByCharset error: %s",Ee),$(null,Te,_e)}if(a.dataType==="json")if(Q===0)Te=null;else{var ye=parseJSON(Te,G);ye.error?Le=ye.error:Te=ye.data}}J&&d("Request#%d %s: Remote socket was terminated before `response.end()` was called",c,v),$(Le,Te,_e)})})}var ke,Ne;Array.isArray(a.timeout)?(ke=f(a.timeout[0]),Ne=f(a.timeout[1])):ke=Ne=f(a.timeout),d("ConnectTimeout: %d, ResponseTimeout: %d",ke,Ne);function Pe(){d("Connect timer ticking, timeout: %d",ke),ne=setTimeout(function(){ne=null,se===-1&&(se=-2);var _e="Connect timeout for "+ke+"ms",Ge="ConnectionTimeoutError";Fe.socket||(Ge="SocketAssignTimeoutError",_e+=", working sockets is full"),ue=new Error(_e),ue.name=Ge,ue.requestId=c,d("ConnectTimeout: Request#%d %s %s: %s, connected: %s",c,v,ue.name,_e,te),We()},ke)}function je(){d("Response timer ticking, timeout: %d",Ne),le=setTimeout(function(){le=null;var _e="Response timeout for "+Ne+"ms",Ge="ResponseTimeoutError";ue=new Error(_e),ue.name=Ge,ue.requestId=c,d("ResponseTimeout: Request#%d %s %s: %s, connected: %s",c,v,ue.name,_e,te),We()},Ne)}var Fe;W.mode=a.mode?a.mode:"";try{Fe=k.request(W,Re)}catch(_e){return $(_e)}typeof window=="undefined"?Pe():Fe.on("requestTimeout",function(){se===-1&&(se=-2);var _e="Connect timeout for "+ke+"ms",Ge="ConnectionTimeoutError";ue=new Error(_e),ue.name=Ge,ue.requestId=c,We()});function We(){d("Request#%d %s abort, connected: %s",c,v,te),Fe.socket||(ue.noSocket=!0,$(ue)),Fe.abort()}return re&&Fe.on("finish",function(){re.requestSent=Date.now()-x}),Fe.once("socket",function(_e){re&&(re.queuing=Date.now()-x),isNode010&&_e.socket&&(_e=_e.socket);var Ge=_e.readyState;if(Ge==="opening"){_e.once("lookup",function(Ve,Ie,He){d("Request#%d %s lookup: %s, %s, %s",c,v,Ve,Ie,He),re&&(re.dnslookup=Date.now()-x),Ie&&(ee=Ie)}),_e.once("connect",function(){re&&(re.connected=Date.now()-x),Y(),je(),d("Request#%d %s new socket connected",c,v),te=!0,ee||(ee=_e.remoteAddress),ge=_e.remotePort});return}d("Request#%d %s reuse socket connected, readyState: %s",c,v,Ge),te=!0,oe=!0,ee||(ee=_e.remoteAddress),ge=_e.remotePort,Y(),je()}),Fe.on("error",function(_e){(_e.name==="Error"||_e.name==="TypeError")&&(_e.name=te?"ResponseError":"RequestError"),_e.message+=' (req "error")',d("Request#%d %s `req error` event emit, %s: %s",c,v,_e.name,_e.message),$(ue||_e)}),xe&&xe.once("error",function(_e){_e.message+=' (writeStream "error")',ue=_e,d("Request#%d %s `writeStream error` event emit, %s: %s",c,v,_e.name,_e.message),We()}),a.stream?(a.stream.pipe(Fe),a.stream.once("error",function(_e){_e.message+=' (stream "error")',ue=_e,d("Request#%d %s `readStream error` event emit, %s: %s",c,v,_e.name,_e.message),We()})):Fe.end(q),Fe.requestId=c,Fe}}).call(this,I("_process"),I("buffer").Buffer)},{_process:208,"any-promise":49,"babel-runtime/core-js/json/stringify":53,"babel-runtime/helpers/typeof":67,buffer:73,constants:75,debug:288,http:231,https:193,"humanize-ms":194,url:238,util:243}]},{},[1])(1)})}).call(this,__webpack_require__("IyRk"))},nj2k:function(I,Z,N){I.exports=N.p+"static/nodata.c3b0b86c.svg"},oRuE:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.pad.Iso10126={pad:function(m,T){var L=T*4,_=L-m.sigBytes%L;m.concat(P.lib.WordArray.random(_-1)).concat(P.lib.WordArray.create([_<<24],1))},unpad:function(m){var T=m.words[m.sigBytes-1>>>2]&255;m.sigBytes-=T}},P.pad.Iso10126})},osHv:function(I,Z,N){(function(P){P(N("VrN/"))})(function(P){"use strict";var m=P.Pos;function T(l,n){return l.line-n.line||l.ch-n.ch}var L="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",_=L+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",g=new RegExp("<(/?)(["+L+"]["+_+"]*)","g");function S(l,n,s,u){this.line=n,this.ch=s,this.cm=l,this.text=l.getLine(n),this.min=u?Math.max(u.from,l.firstLine()):l.firstLine(),this.max=u?Math.min(u.to-1,l.lastLine()):l.lastLine()}function p(l,n){var s=l.cm.getTokenTypeAt(m(l.line,n));return s&&/\btag\b/.test(s)}function o(l){return l.line>=l.max?void 0:(l.ch=0,l.text=l.cm.getLine(++l.line),!0)}function i(l){return l.line<=l.min?void 0:(l.text=l.cm.getLine(--l.line),l.ch=l.text.length,!0)}function r(l){for(;;){var n=l.text.indexOf(">",l.ch);if(n==-1){if(o(l))continue;return}if(!p(l,n+1)){l.ch=n+1;continue}var s=l.text.lastIndexOf("/",n),u=s>-1&&!/\S/.test(l.text.slice(s+1,n));return l.ch=n+1,u?"selfClose":"regular"}}function d(l){for(;;){var n=l.ch?l.text.lastIndexOf("<",l.ch-1):-1;if(n==-1){if(i(l))continue;return}if(!p(l,n+1)){l.ch=n;continue}g.lastIndex=n,l.ch=n;var s=g.exec(l.text);if(s&&s.index==n)return s}}function f(l){for(;;){g.lastIndex=l.ch;var n=g.exec(l.text);if(!n){if(o(l))continue;return}if(!p(l,n.index+1)){l.ch=n.index+1;continue}return l.ch=n.index+n[0].length,n}}function h(l){for(;;){var n=l.ch?l.text.lastIndexOf(">",l.ch-1):-1;if(n==-1){if(i(l))continue;return}if(!p(l,n+1)){l.ch=n;continue}var s=l.text.lastIndexOf("/",n),u=s>-1&&!/\S/.test(l.text.slice(s+1,n));return l.ch=n+1,u?"selfClose":"regular"}}function E(l,n){for(var s=[];;){var u=f(l),w,v=l.line,a=l.ch-(u?u[0].length:0);if(!u||!(w=r(l)))return;if(w=="selfClose")continue;if(u[1]){for(var R=s.length-1;R>=0;--R)if(s[R]==u[2]){s.length=R;break}if(R<0&&(!n||n==u[2]))return{tag:u[2],from:m(v,a),to:m(l.line,l.ch)}}else s.push(u[2])}}function y(l,n){for(var s=[];;){var u=h(l);if(!u)return;if(u=="selfClose"){d(l);continue}var w=l.line,v=l.ch,a=d(l);if(!a)return;if(a[1])s.push(a[2]);else{for(var R=s.length-1;R>=0;--R)if(s[R]==a[2]){s.length=R;break}if(R<0&&(!n||n==a[2]))return{tag:a[2],from:m(l.line,l.ch),to:m(w,v)}}}}P.registerHelper("fold","xml",function(l,n){for(var s=new S(l,n.line,0);;){var u=f(s);if(!u||s.line!=n.line)return;var w=r(s);if(!w)return;if(!u[1]&&w!="selfClose"){var v=m(s.line,s.ch),a=E(s,u[2]);return a&&T(a.from,v)>0?{from:v,to:a.from}:null}}}),P.findMatchingTag=function(l,n,s){var u=new S(l,n.line,n.ch,s);if(u.text.indexOf(">")==-1&&u.text.indexOf("<")==-1)return;var w=r(u),v=w&&m(u.line,u.ch),a=w&&d(u);if(!w||!a||T(u,n)>0)return;var R={from:m(u.line,u.ch),to:v,tag:a[2]};return w=="selfClose"?{open:R,close:null,at:"open"}:a[1]?{open:y(u,a[2]),close:R,at:"close"}:(u=new S(l,v.line,v.ch,s),{open:R,close:E(u,a[2]),at:"open"})},P.findEnclosingTag=function(l,n,s,u){for(var w=new S(l,n.line,n.ch,s);;){var v=y(w,u);if(!v)break;var a=new S(l,n.line,n.ch,s),R=E(a,v.tag);if(R)return{open:v,close:R}}},P.scanForClosingTag=function(l,n,s,u){var w=new S(l,n.line,n.ch,u?{from:0,to:u}:null);return E(w,s)}})},"p77/":function(I,Z,N){},pA7S:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("ETIr"),N("cv67"),N("K3mO"),N("OLod"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.WordArray,_=T.BlockCipher,g=m.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],p=[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],o=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],i=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],r=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=g.DES=_.extend({_doReset:function(){for(var y=this._key,l=y.words,n=[],s=0;s<56;s++){var u=S[s]-1;n[s]=l[u>>>5]>>>31-u%32&1}for(var w=this._subKeys=[],v=0;v<16;v++){for(var a=w[v]=[],R=o[v],s=0;s<24;s++)a[s/6|0]|=n[(p[s]-1+R)%28]<<31-s%6,a[4+(s/6|0)]|=n[28+(p[s+24]-1+R)%28]<<31-s%6;a[0]=a[0]<<1|a[0]>>>31;for(var s=1;s<7;s++)a[s]=a[s]>>>(s-1)*4+3;a[7]=a[7]<<5|a[7]>>>27}for(var D=this._invSubKeys=[],s=0;s<16;s++)D[s]=w[15-s]},encryptBlock:function(y,l){this._doCryptBlock(y,l,this._subKeys)},decryptBlock:function(y,l){this._doCryptBlock(y,l,this._invSubKeys)},_doCryptBlock:function(y,l,n){this._lBlock=y[l],this._rBlock=y[l+1],f.call(this,4,252645135),f.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),f.call(this,1,1431655765);for(var s=0;s<16;s++){for(var u=n[s],w=this._lBlock,v=this._rBlock,a=0,R=0;R<8;R++)a|=i[R][((v^u[R])&r[R])>>>0];this._lBlock=v,this._rBlock=w^a}var D=this._lBlock;this._lBlock=this._rBlock,this._rBlock=D,f.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),y[l]=this._lBlock,y[l+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function f(y,l){var n=(this._lBlock>>>y^this._rBlock)&l;this._rBlock^=n,this._lBlock^=n<<y}function h(y,l){var n=(this._rBlock>>>y^this._lBlock)&l;this._lBlock^=n,this._rBlock^=n<<y}m.DES=_._createHelper(d);var E=g.TripleDES=_.extend({_doReset:function(){var y=this._key,l=y.words;if(l.length!==2&&l.length!==4&&l.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var n=l.slice(0,2),s=l.length<4?l.slice(0,2):l.slice(2,4),u=l.length<6?l.slice(0,2):l.slice(4,6);this._des1=d.createEncryptor(L.create(n)),this._des2=d.createEncryptor(L.create(s)),this._des3=d.createEncryptor(L.create(u))},encryptBlock:function(y,l){this._des1.encryptBlock(y,l),this._des2.decryptBlock(y,l),this._des3.encryptBlock(y,l)},decryptBlock:function(y,l){this._des3.decryptBlock(y,l),this._des2.encryptBlock(y,l),this._des1.decryptBlock(y,l)},keySize:192/32,ivSize:64/32,blockSize:64/32});m.TripleDES=_._createHelper(E)}(),P.TripleDES})},qBft:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.pad.AnsiX923={pad:function(m,T){var L=m.sigBytes,_=T*4,g=_-L%_,S=L+g-1;m.clamp(),m.words[S>>>2]|=g<<24-S%4*8,m.sigBytes+=g},unpad:function(m){var T=m.words[m.sigBytes-1>>>2]&255;m.sigBytes-=T}},P.pad.Ansix923})},qM6L:function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.WordArray,_=m.enc,g=_.Utf16=_.Utf16BE={stringify:function(p){for(var o=p.words,i=p.sigBytes,r=[],d=0;d<i;d+=2){var f=o[d>>>2]>>>16-d%4*8&65535;r.push(String.fromCharCode(f))}return r.join("")},parse:function(p){for(var o=p.length,i=[],r=0;r<o;r++)i[r>>>1]|=p.charCodeAt(r)<<16-r%2*16;return L.create(i,o*2)}};_.Utf16LE={stringify:function(p){for(var o=p.words,i=p.sigBytes,r=[],d=0;d<i;d+=2){var f=S(o[d>>>2]>>>16-d%4*8&65535);r.push(String.fromCharCode(f))}return r.join("")},parse:function(p){for(var o=p.length,i=[],r=0;r<o;r++)i[r>>>1]|=S(p.charCodeAt(r)<<16-r%2*16);return L.create(i,o*2)}};function S(p){return p<<8&4278255360|p>>>8&16711935}}(),P.enc.Utf16})},qu8F:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){/** @preserve
|
|
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
|
* derived from CryptoJS.mode.CTR
|
|
|
* Jan Hruby jhruby.web@gmail.com
|
|
|
*/return P.mode.CTRGladman=function(){var m=P.lib.BlockCipherMode.extend();function T(g){if((g>>24&255)===255){var S=g>>16&255,p=g>>8&255,o=g&255;S===255?(S=0,p===255?(p=0,o===255?o=0:++o):++p):++S,g=0,g+=S<<16,g+=p<<8,g+=o}else g+=1<<24;return g}function L(g){return(g[0]=T(g[0]))===0&&(g[1]=T(g[1])),g}var _=m.Encryptor=m.extend({processBlock:function(g,S){var p=this._cipher,o=p.blockSize,i=this._iv,r=this._counter;i&&(r=this._counter=i.slice(0),this._iv=void 0),L(r);var d=r.slice(0);p.encryptBlock(d,0);for(var f=0;f<o;f++)g[S+f]^=d[f]}});return m.Decryptor=_,m}(),P.mode.CTRGladman})},rUJ1:function(I,Z){const N=/[&<>"']/,P=/[&<>"']/g,m=/[<>"']|&(?!#?\w+;)/,T=/[<>"']|&(?!#?\w+;)/g,L={"&":"&","<":"<",">":">",'"':""","'":"'"},_=D=>L[D];function g(D,c){if(c){if(N.test(D))return D.replace(P,_)}else if(m.test(D))return D.replace(T,_);return D}const S=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function p(D){return D.replace(S,(c,b)=>(b=b.toLowerCase(),b==="colon"?":":b.charAt(0)==="#"?b.charAt(1)==="x"?String.fromCharCode(parseInt(b.substring(2),16)):String.fromCharCode(+b.substring(1)):""))}const o=/(^|[^\[])\^/g;function i(D,c){D=D.source||D,c=c||"";const b={replace:(x,C)=>(C=C.source||C,C=C.replace(o,"$1"),D=D.replace(x,C),b),getRegex:()=>new RegExp(D,c)};return b}const r=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function f(D,c,b){if(D){let x;try{x=decodeURIComponent(p(b)).replace(r,"").toLowerCase()}catch(C){return null}if(x.indexOf("javascript:")===0||x.indexOf("vbscript:")===0||x.indexOf("data:")===0)return null}c&&!d.test(b)&&(b=n(c,b));try{b=encodeURI(b).replace(/%25/g,"%")}catch(x){return null}return b}const h={},E=/^[^:]+:\/*[^/]*$/,y=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(D,c){h[" "+D]||(E.test(D)?h[" "+D]=D+"/":h[" "+D]=v(D,"/",!0)),D=h[" "+D];const b=D.indexOf(":")===-1;return c.substring(0,2)==="//"?b?c:D.replace(y,"$1")+c:c.charAt(0)==="/"?b?c:D.replace(l,"$1")+c:D+c}const s={exec:function(){}};function u(D){let c=1,b,x;for(;c<arguments.length;c++){b=arguments[c];for(x in b)Object.prototype.hasOwnProperty.call(b,x)&&(D[x]=b[x])}return D}function w(D,c){const b=D.replace(/\|/g,(F,j,k)=>{let X=!1,G=j;for(;--G>=0&&k[G]==="\\";)X=!X;return X?"|":" |"}),x=b.split(/ \|/);let C=0;if(x.length>c)x.splice(c);else for(;x.length<c;)x.push("");for(;C<x.length;C++)x[C]=x[C].trim().replace(/\\\|/g,"|");return x}function v(D,c,b){const x=D.length;if(x===0)return"";let C=0;for(;C<x;){const F=D.charAt(x-C-1);if(F===c&&!b)C++;else if(F!==c&&b)C++;else break}return D.substr(0,x-C)}function a(D,c){if(D.indexOf(c[1])===-1)return-1;const b=D.length;let x=0,C=0;for(;C<b;C++)if(D[C]==="\\")C++;else if(D[C]===c[0])x++;else if(D[C]===c[1]&&(x--,x<0))return C;return-1}function R(D){D&&D.sanitize&&!D.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")}I.exports={escape:g,unescape:p,edit:i,cleanUrl:f,resolveUrl:n,noopTest:s,merge:u,splitCells:w,rtrim:v,findClosingBracket:a,checkSanitizeDeprecation:R}},rdUC:function(I,Z,N){var P=N("MFOe"),m=P.Global;I.exports={name:"localStorage",read:L,write:_,each:g,remove:S,clearAll:p};function T(){return m.localStorage}function L(o){return T().getItem(o)}function _(o,i){return T().setItem(o,i)}function g(o){for(var i=T().length-1;i>=0;i--){var r=T().key(i);o(L(r),r)}}function S(o){return T().removeItem(o)}function p(){return T().clear()}},sboe:function(I,Z,N){"use strict";N.d(Z,"a",function(){return T});var P=N("cDcd"),m=N.n(P),T=P.createContext(null)},spXi:function(I,Z,N){I.exports={flex_box_center:"flex_box_center___2B_Y7",flex_space_between:"flex_space_between___2olzC",flex_box_vertical_center:"flex_box_vertical_center___2Z4dV",flex_box_center_end:"flex_box_center_end___3FiwX",flex_box_column:"flex_box_column___8kyK-",customTree:"customTree___1KOYx",name:"name___3pqs4"}},u2Z1:function(I,Z,N){"use strict";N.d(Z,"a",function(){return v});var P=N("miYZ"),m=N("tsqr"),T=N("9og8"),L=N("5NDa"),_=N("5rEg"),g=N("2qtc"),S=N("kLXV"),p=N("oBTY"),o=N("tJVT"),i=N("OaEy"),r=N("2fM7"),d=N("WmNS"),f=N.n(d),h=N("cDcd"),E=N.n(h),y=N("ErOA"),l=N("i58Z"),n=N.n(l),s=N("T1X5"),u=N.n(s),w=r.a.Option,v=function(R){var D=R.subId,c=R.value,b=R.selectvalues,x=R.disabled,C=R.knowledgeOptions,F=C===void 0?[]:C,j=R.onChange,k=j===void 0?function(){}:j,X=R.onAddKnowledgeFinish,G=X===void 0?function(){}:X,W=Object(h.useRef)(),K=Object(h.useState)([]),B=Object(o.a)(K,2),U=B[0],H=B[1];c=c||[];var q=function(he,be){he?(H([be.key]),k([be.key])):(H([]),k([]))};Object(h.useEffect)(function(){(b==null?void 0:b.length)>0&&(H(Object(p.a)(b)),k(Object(p.a)(b)))},[F]),Object(h.useEffect)(function(){var ce;((ce=c)===null||ce===void 0?void 0:ce.length)>0&&k(Object(p.a)(c))},[F]);var ie=function(he){he.preventDefault(),W.current="",S.a.confirm({centered:!0,width:700,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",icon:null,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",className:"custom-modal-divider",content:E.a.createElement("div",{className:"font14"},E.a.createElement("div",{style:{display:"flex",marginTop:"48px",marginBottom:"36px"}},E.a.createElement("img",{src:u.a,style:{width:"108px",height:"108px",marginRight:"29px"}}),"\u60A8\u586B\u5199\u7684\u77E5\u8BC6\u70B9\u6682\u65F6\u4EC5\u5BF9\u672C\u4EBA\u53EF\u89C1\uFF0C\u5E73\u53F0\u5BA1\u6838\u901A\u8FC7\u540E\u5C06\u5217\u5165\u516C\u5F00\u77E5\u8BC6\u70B9\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF1B",E.a.createElement("br",null),"\u5E73\u53F0\u5BA1\u6838\u8FC7\u7A0B\u4E2D\u6709\u6743\u5220\u9664\u4E0D\u5408\u9002\u7684\u77E5\u8BC6\u70B9\uFF08\u5305\u62EC\u4F46\u4E0D\u9650\u4E8E\u9519\u8BEF\u3001\u975E\u6CD5\u3001\u4E0D\u96C5\u3001\u4E0D\u5339\u914D\u5F53\u524D\u8BFE\u7A0B\u7B49\u60C5\u5F62\uFF09\uFF0C\u5220\u9664\u540E\u53EF\u80FD\u5F71\u54CD\u60A8\u7684\u8BD5\u9898\u7684\u6B63\u5E38\u4F7F\u7528\u3002",E.a.createElement("br",null),"\u8BF7\u8BA4\u771F\u586B\u5199\u4E0E\u6559\u5B66\u5185\u5BB9\u76F8\u5173\u7684\u771F\u5B9E\u77E5\u8BC6\u70B9 ",E.a.createElement("br",null)),E.a.createElement(_.a,{className:"mt5",maxLength:20,style:{marginBottom:"42px"},placeholder:"\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC720\u5B57\u7684\u77E5\u8BC6\u70B9\u540D\u79F0",defaultValue:W.current,onChange:function(ne){W.current=ne.target.value}})),onOk:function(){return new Promise(function(){var ne=Object(T.a)(f.a.mark(function le(ue,te){var oe,Q;return f.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:if(W.current){J.next=3;break}return m.b.warn("\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0"),J.abrupt("return",te());case 3:if(!(W.current.length>20)){J.next=6;break}return m.b.warn("\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC720\u5B57\u7684\u77E5\u8BC6\u70B9\u540D\u79F0"),J.abrupt("return",te());case 6:return J.next=8,Object(y.a)("/api/tag_disciplines.json",{method:"post",body:{name:W.current,sub_discipline_id:D}});case 8:return oe=J.sent,(oe==null?void 0:oe.status)===0&&(G({id:oe.tag_discipline_id,name:W.current,type:"personal"}),Q=[],Q.push(oe.tag_discipline_id),k([].concat(Q)),H([oe.tag_discipline_id]),k([].concat(Q))),J.abrupt("return",ue());case 11:case"end":return J.stop()}},le)}));return function(le,ue){return ne.apply(this,arguments)}}())}})};return E.a.createElement("div",{className:n.a.wrap},E.a.createElement(r.a,{disabled:!D||x,className:"mr5",style:{width:"242px"},onChange:q,showSearch:!0,allowClear:!0,value:F==null?void 0:F.filter(function(ce){return(U==null?void 0:U.includes(ce==null?void 0:ce.id))||(U==null?void 0:U.includes((ce==null?void 0:ce.id)+""))}).map(function(ce){return ce.name})},F==null?void 0:F.map(function(ce){return E.a.createElement(w,{key:ce.id,value:ce.name},E.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},E.a.createElement("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},ce.name),E.a.createElement("span",null,ce.type==="personal"?"\uFF08\u81EA\u7528\uFF09":"")))})),E.a.createElement("button",{disabled:!D,className:"".concat(n.a.addKnowledge," ").concat(D?"":n.a.disabled),onClick:ie},"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))}},uGsb:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("MlIO"),N("1uat"))})(this,function(P){return function(){var m=P,T=m.x64,L=T.Word,_=T.WordArray,g=m.algo,S=g.SHA512,p=g.SHA384=S.extend({_doReset:function(){this._hash=new _.init([new L.init(3418070365,3238371032),new L.init(1654270250,914150663),new L.init(2438529370,812702999),new L.init(355462360,4144912697),new L.init(1731405415,4290775857),new L.init(2394180231,1750603025),new L.init(3675008525,1694076839),new L.init(1203062813,3204075428)])},_doFinalize:function(){var o=S._doFinalize.call(this);return o.sigBytes-=16,o}});m.SHA384=S._createHelper(p),m.HmacSHA384=S._createHmacHelper(p)}(),P.SHA384})},uGxW:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("OLod"))})(this,function(P){return P.pad.NoPadding={pad:function(){},unpad:function(){}},P.pad.NoPadding})},uK0f:function(I,Z,N){(function(P,m){I.exports=m()})(this,function(){"use strict";function P(m,T,L){L=L||{},L.childrenKeyName=L.childrenKeyName||"children";var _=m||[],g=[],S=0;do{var p=_.filter(function(o){return T(o,S)})[0];if(!p)break;g.push(p),_=p[L.childrenKeyName]||[],S+=1}while(_.length>0);return g}return P})},uMZB:function(I,Z,N){I.exports={header:"header___3a50V",checkboxs:"checkboxs___3TnBC",field:"field___SHW6f","oj-form-container":"oj-form-container___36KBv","oj-left-panel":"oj-left-panel___3Fdj5","oj-form-info":"oj-form-info___dilPb",footer:"footer___1Ie9U","test-case-name":"test-case-name___356US","btn-remove-case":"btn-remove-case___1Z5cd","icon-tag":"icon-tag___3zUaP",btn_back:"btn_back___2UBbR",testJi:"testJi___1dyLk",upBtn:"upBtn___1I0SJ"}},uQRt:function(I,Z,N){I.exports=P;function P(){return N("gaXo"),{}}},ulZh:function(I,Z,N){typeof window!="undefined"&&function(m,T){I.exports=T()}(this,function(){return function(P){var m={};function T(L){if(m[L])return m[L].exports;var _=m[L]={i:L,l:!1,exports:{}};return P[L].call(_.exports,_,_.exports,T),_.l=!0,_.exports}return T.m=P,T.c=m,T.d=function(L,_,g){T.o(L,_)||Object.defineProperty(L,_,{enumerable:!0,get:g})},T.r=function(L){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(L,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(L,"__esModule",{value:!0})},T.t=function(L,_){if(_&1&&(L=T(L)),_&8)return L;if(_&4&&typeof L=="object"&&L&&L.__esModule)return L;var g=Object.create(null);if(T.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:L}),_&2&&typeof L!="string")for(var S in L)T.d(g,S,function(p){return L[p]}.bind(null,S));return g},T.n=function(L){var _=L&&L.__esModule?function(){return L.default}:function(){return L};return T.d(_,"a",_),_},T.o=function(L,_){return Object.prototype.hasOwnProperty.call(L,_)},T.p="/dist/",T(T.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(P,m,T){"use strict";var L=Object.prototype.hasOwnProperty,_="~";function g(){}Object.create&&(g.prototype=Object.create(null),new g().__proto__||(_=!1));function S(r,d,f){this.fn=r,this.context=d,this.once=f||!1}function p(r,d,f,h,E){if(typeof f!="function")throw new TypeError("The listener must be a function");var y=new S(f,h||r,E),l=_?_+d:d;return r._events[l]?r._events[l].fn?r._events[l]=[r._events[l],y]:r._events[l].push(y):(r._events[l]=y,r._eventsCount++),r}function o(r,d){--r._eventsCount===0?r._events=new g:delete r._events[d]}function i(){this._events=new g,this._eventsCount=0}i.prototype.eventNames=function(){var d=[],f,h;if(this._eventsCount===0)return d;for(h in f=this._events)L.call(f,h)&&d.push(_?h.slice(1):h);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(f)):d},i.prototype.listeners=function(d){var f=_?_+d:d,h=this._events[f];if(!h)return[];if(h.fn)return[h.fn];for(var E=0,y=h.length,l=new Array(y);E<y;E++)l[E]=h[E].fn;return l},i.prototype.listenerCount=function(d){var f=_?_+d:d,h=this._events[f];return h?h.fn?1:h.length:0},i.prototype.emit=function(d,f,h,E,y,l){var n=_?_+d:d;if(!this._events[n])return!1;var s=this._events[n],u=arguments.length,w,v;if(s.fn){s.once&&this.removeListener(d,s.fn,void 0,!0);switch(u){case 1:return s.fn.call(s.context),!0;case 2:return s.fn.call(s.context,f),!0;case 3:return s.fn.call(s.context,f,h),!0;case 4:return s.fn.call(s.context,f,h,E),!0;case 5:return s.fn.call(s.context,f,h,E,y),!0;case 6:return s.fn.call(s.context,f,h,E,y,l),!0}for(v=1,w=new Array(u-1);v<u;v++)w[v-1]=arguments[v];s.fn.apply(s.context,w)}else{var a=s.length,R;for(v=0;v<a;v++){s[v].once&&this.removeListener(d,s[v].fn,void 0,!0);switch(u){case 1:s[v].fn.call(s[v].context);break;case 2:s[v].fn.call(s[v].context,f);break;case 3:s[v].fn.call(s[v].context,f,h);break;case 4:s[v].fn.call(s[v].context,f,h,E);break;default:if(!w)for(R=1,w=new Array(u-1);R<u;R++)w[R-1]=arguments[R];s[v].fn.apply(s[v].context,w)}}}return!0},i.prototype.on=function(d,f,h){return p(this,d,f,h,!1)},i.prototype.once=function(d,f,h){return p(this,d,f,h,!0)},i.prototype.removeListener=function(d,f,h,E){var y=_?_+d:d;if(!this._events[y])return this;if(!f)return o(this,y),this;var l=this._events[y];if(l.fn)l.fn===f&&(!E||l.once)&&(!h||l.context===h)&&o(this,y);else{for(var n=0,s=[],u=l.length;n<u;n++)(l[n].fn!==f||E&&!l[n].once||h&&l[n].context!==h)&&s.push(l[n]);s.length?this._events[y]=s.length===1?s[0]:s:o(this,y)}return this},i.prototype.removeAllListeners=function(d){var f;return d?(f=_?_+d:d,this._events[f]&&o(this,f)):(this._events=new g,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prefixed=_,i.EventEmitter=i,P.exports=i},"./node_modules/url-toolkit/src/url-toolkit.js":function(P,m,T){(function(L){var _=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,g=/^([^\/?#]*)([^]*)$/,S=/(?:\/|^)\.(?=\/)/g,p=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(i,r,d){if(d=d||{},i=i.trim(),r=r.trim(),!r){if(!d.alwaysNormalize)return i;var f=o.parseURL(i);if(!f)throw new Error("Error trying to parse base URL.");return f.path=o.normalizePath(f.path),o.buildURLFromParts(f)}var h=o.parseURL(r);if(!h)throw new Error("Error trying to parse relative URL.");if(h.scheme)return d.alwaysNormalize?(h.path=o.normalizePath(h.path),o.buildURLFromParts(h)):r;var E=o.parseURL(i);if(!E)throw new Error("Error trying to parse base URL.");if(!E.netLoc&&E.path&&E.path[0]!=="/"){var y=g.exec(E.path);E.netLoc=y[1],E.path=y[2]}E.netLoc&&!E.path&&(E.path="/");var l={scheme:E.scheme,netLoc:h.netLoc,path:null,params:h.params,query:h.query,fragment:h.fragment};if(!h.netLoc&&(l.netLoc=E.netLoc,h.path[0]!=="/"))if(!h.path)l.path=E.path,h.params||(l.params=E.params,h.query||(l.query=E.query));else{var n=E.path,s=n.substring(0,n.lastIndexOf("/")+1)+h.path;l.path=o.normalizePath(s)}return l.path===null&&(l.path=d.alwaysNormalize?o.normalizePath(h.path):h.path),o.buildURLFromParts(l)},parseURL:function(i){var r=_.exec(i);return r?{scheme:r[1]||"",netLoc:r[2]||"",path:r[3]||"",params:r[4]||"",query:r[5]||"",fragment:r[6]||""}:null},normalizePath:function(i){for(i=i.split("").reverse().join("").replace(S,"");i.length!==(i=i.replace(p,"")).length;);return i.split("").reverse().join("")},buildURLFromParts:function(i){return i.scheme+i.netLoc+i.path+i.params+i.query+i.fragment}};P.exports=o})(this)},"./node_modules/webworkify-webpack/index.js":function(P,m,T){function L(d){var f={};function h(y){if(f[y])return f[y].exports;var l=f[y]={i:y,l:!1,exports:{}};return d[y].call(l.exports,l,l.exports,h),l.l=!0,l.exports}h.m=d,h.c=f,h.i=function(y){return y},h.d=function(y,l,n){h.o(y,l)||Object.defineProperty(y,l,{configurable:!1,enumerable:!0,get:n})},h.r=function(y){Object.defineProperty(y,"__esModule",{value:!0})},h.n=function(y){var l=y&&y.__esModule?function(){return y.default}:function(){return y};return h.d(l,"a",l),l},h.o=function(y,l){return Object.prototype.hasOwnProperty.call(y,l)},h.p="/",h.oe=function(y){throw console.error(y),y};var E=h(h.s=ENTRY_MODULE);return E.default||E}var _="[\\.|\\-|\\+|\\w|/|@]+",g="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+_+").*?\\)";function S(d){return(d+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function p(d){return!isNaN(1*d)}function o(d,f,h){var E={};E[h]=[];var y=f.toString(),l=y.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!l)return E;for(var n=l[1],s=new RegExp("(\\\\n|\\W)"+S(n)+g,"g"),u;u=s.exec(y);){if(u[3]==="dll-reference")continue;E[h].push(u[3])}for(s=new RegExp("\\("+S(n)+'\\("(dll-reference\\s('+_+'))"\\)\\)'+g,"g");u=s.exec(y);)d[u[2]]||(E[h].push(u[1]),d[u[2]]=T(u[1]).m),E[u[2]]=E[u[2]]||[],E[u[2]].push(u[4]);for(var w=Object.keys(E),v=0;v<w.length;v++)for(var a=0;a<E[w[v]].length;a++)p(E[w[v]][a])&&(E[w[v]][a]=1*E[w[v]][a]);return E}function i(d){var f=Object.keys(d);return f.reduce(function(h,E){return h||d[E].length>0},!1)}function r(d,f){for(var h={main:[f]},E={main:[]},y={main:{}};i(h);)for(var l=Object.keys(h),n=0;n<l.length;n++){var s=l[n],u=h[s],w=u.pop();if(y[s]=y[s]||{},y[s][w]||!d[s][w])continue;y[s][w]=!0,E[s]=E[s]||[],E[s].push(w);for(var v=o(d,d[s][w],s),a=Object.keys(v),R=0;R<a.length;R++)h[a[R]]=h[a[R]]||[],h[a[R]]=h[a[R]].concat(v[a[R]])}return E}P.exports=function(d,f){f=f||{};var h={main:T.m},E=f.all?{main:Object.keys(h.main)}:r(h,d),y="";Object.keys(E).filter(function(w){return w!=="main"}).forEach(function(w){for(var v=0;E[w][v];)v++;E[w].push(v),h[w][v]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",y=y+"var "+w+" = ("+L.toString().replace("ENTRY_MODULE",JSON.stringify(v))+")({"+E[w].map(function(a){return""+JSON.stringify(a)+": "+h[w][a].toString()}).join(",")+`});
|
|
|
`}),y=y+"new (("+L.toString().replace("ENTRY_MODULE",JSON.stringify(d))+")({"+E.main.map(function(w){return""+JSON.stringify(w)+": "+h.main[w].toString()}).join(",")+"}))(self);";var l=new window.Blob([y],{type:"text/javascript"});if(f.bare)return l;var n=window.URL||window.webkitURL||window.mozURL||window.msURL,s=n.createObjectURL(l),u=new window.Worker(s);return u.objectURL=s,u}},"./src/config.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"hlsDefaultConfig",function(){return R}),T.d(m,"mergeConfig",function(){return c}),T.d(m,"enableStreamingMode",function(){return b});var L=T("./src/controller/abr-controller.ts"),_=T("./src/controller/audio-stream-controller.ts"),g=T("./src/controller/audio-track-controller.ts"),S=T("./src/controller/subtitle-stream-controller.ts"),p=T("./src/controller/subtitle-track-controller.ts"),o=T("./src/controller/buffer-controller.ts"),i=T("./src/controller/timeline-controller.ts"),r=T("./src/controller/cap-level-controller.ts"),d=T("./src/controller/fps-controller.ts"),f=T("./src/controller/eme-controller.ts"),h=T("./src/controller/cmcd-controller.ts"),E=T("./src/utils/xhr-loader.ts"),y=T("./src/utils/fetch-loader.ts"),l=T("./src/utils/cues.ts"),n=T("./src/utils/mediakeys-helper.ts"),s=T("./src/utils/logger.ts");function u(){return u=Object.assign||function(x){for(var C=1;C<arguments.length;C++){var F=arguments[C];for(var j in F)Object.prototype.hasOwnProperty.call(F,j)&&(x[j]=F[j])}return x},u.apply(this,arguments)}function w(x,C){var F=Object.keys(x);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(x);C&&(j=j.filter(function(k){return Object.getOwnPropertyDescriptor(x,k).enumerable})),F.push.apply(F,j)}return F}function v(x){for(var C=1;C<arguments.length;C++){var F=arguments[C]!=null?arguments[C]:{};C%2?w(Object(F),!0).forEach(function(j){a(x,j,F[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(F)):w(Object(F)).forEach(function(j){Object.defineProperty(x,j,Object.getOwnPropertyDescriptor(F,j))})}return x}function a(x,C,F){return C in x?Object.defineProperty(x,C,{value:F,enumerable:!0,configurable:!0,writable:!0}):x[C]=F,x}var R=v(v({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:E.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:L.default,bufferController:o.default,capLevelController:r.default,fpsController:d.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:n.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},D()),{},{subtitleStreamController:S.SubtitleStreamController,subtitleTrackController:p.default,timelineController:i.TimelineController,audioStreamController:_.default,audioTrackController:g.default,emeController:f.default,cmcdController:h.default});function D(){return{cueHandler:l.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 c(x,C){if((C.liveSyncDurationCount||C.liveMaxLatencyDurationCount)&&(C.liveSyncDuration||C.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(C.liveMaxLatencyDurationCount!==void 0&&(C.liveSyncDurationCount===void 0||C.liveMaxLatencyDurationCount<=C.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(C.liveMaxLatencyDuration!==void 0&&(C.liveSyncDuration===void 0||C.liveMaxLatencyDuration<=C.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return u({},x,C)}function b(x){var C=x.loader;if(C!==y.default&&C!==E.default)s.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),x.progressive=!1;else{var F=Object(y.fetchSupported)();F&&(x.loader=y.default,x.progressive=!0,x.enableSoftwareAES=!0,s.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/polyfills/number.ts"),_=T("./src/utils/ewma-bandwidth-estimator.ts"),g=T("./src/events.ts"),S=T("./src/utils/buffer-helper.ts"),p=T("./src/errors.ts"),o=T("./src/types/loader.ts"),i=T("./src/utils/logger.ts");function r(h,E){for(var y=0;y<E.length;y++){var l=E[y];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(h,l.key,l)}}function d(h,E,y){return E&&r(h.prototype,E),y&&r(h,y),h}var f=function(){function h(y){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=y;var l=y.config;this.bwEstimator=new _.default(l.abrEwmaSlowVoD,l.abrEwmaFastVoD,l.abrEwmaDefaultEstimate),this.registerListeners()}var E=h.prototype;return E.registerListeners=function(){var l=this.hls;l.on(g.Events.FRAG_LOADING,this.onFragLoading,this),l.on(g.Events.FRAG_LOADED,this.onFragLoaded,this),l.on(g.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.on(g.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.on(g.Events.ERROR,this.onError,this)},E.unregisterListeners=function(){var l=this.hls;l.off(g.Events.FRAG_LOADING,this.onFragLoading,this),l.off(g.Events.FRAG_LOADED,this.onFragLoaded,this),l.off(g.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.off(g.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.off(g.Events.ERROR,this.onError,this)},E.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},E.onFragLoading=function(l,n){var s=n.frag;if(s.type===o.PlaylistLevelType.MAIN&&!this.timer){var u;this.fragCurrent=s,this.partCurrent=(u=n.part)!=null?u:null,this.timer=self.setInterval(this.onCheck,100)}},E.onLevelLoaded=function(l,n){var s=this.hls.config;n.details.live?this.bwEstimator.update(s.abrEwmaSlowLive,s.abrEwmaFastLive):this.bwEstimator.update(s.abrEwmaSlowVoD,s.abrEwmaFastVoD)},E._abandonRulesCheck=function(){var l=this.fragCurrent,n=this.partCurrent,s=this.hls,u=s.autoLevelEnabled,w=s.config,v=s.media;if(!l||!v)return;var a=n?n.stats:l.stats,R=n?n.duration:l.duration;if(a.aborted){i.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!u||v.paused||!v.playbackRate||!v.readyState)return;var D=performance.now()-a.loading.start,c=Math.abs(v.playbackRate);if(D<=500*R/c)return;var b=s.levels,x=s.minAutoLevel,C=b[l.level],F=a.total||Math.max(a.loaded,Math.round(R*C.maxBitrate/8)),j=Math.max(1,a.bwEstimate?a.bwEstimate/8:a.loaded*1e3/D),k=(F-a.loaded)/j,X=v.currentTime,G=(S.BufferHelper.bufferInfo(v,X,w.maxBufferHole).end-X)/c;if(G>=2*R/c||k<=G)return;var W=Number.POSITIVE_INFINITY,K;for(K=l.level-1;K>x;K--){var B=b[K].maxBitrate;if(W=R*B/(8*.8*j),W<G)break}if(W>=k)return;var U=this.bwEstimator.getEstimate();i.logger.warn("Fragment "+l.sn+(n?" part "+n.index:"")+" of level "+l.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+K+`
|
|
|
Current BW estimate: `+(Object(L.isFiniteNumber)(U)?(U/1024).toFixed(3):"Unknown")+` Kb/s
|
|
|
Estimated load time for current fragment: `+k.toFixed(3)+` s
|
|
|
Estimated load time for the next fragment: `+W.toFixed(3)+` s
|
|
|
Time to underbuffer: `+G.toFixed(3)+" s"),s.nextLoadLevel=K,this.bwEstimator.sample(D,a.loaded),this.clearTimer(),l.loader&&(this.fragCurrent=this.partCurrent=null,l.loader.abort()),s.trigger(g.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:l,part:n,stats:a})},E.onFragLoaded=function(l,n){var s=n.frag,u=n.part;if(s.type===o.PlaylistLevelType.MAIN&&Object(L.isFiniteNumber)(s.sn)){var w=u?u.stats:s.stats,v=u?u.duration:s.duration;if(this.clearTimer(),this.lastLoadedFragLevel=s.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var a=this.hls.levels[s.level],R=(a.loaded?a.loaded.bytes:0)+w.loaded,D=(a.loaded?a.loaded.duration:0)+v;a.loaded={bytes:R,duration:D},a.realBitrate=Math.round(8*R/D)}if(s.bitrateTest){var c={stats:w,frag:s,part:u,id:s.type};this.onFragBuffered(g.Events.FRAG_BUFFERED,c),s.bitrateTest=!1}}},E.onFragBuffered=function(l,n){var s=n.frag,u=n.part,w=u?u.stats:s.stats;if(w.aborted)return;if(s.type!==o.PlaylistLevelType.MAIN||s.sn==="initSegment")return;var v=w.parsing.end-w.loading.start;this.bwEstimator.sample(v,w.loaded),w.bwEstimate=this.bwEstimator.getEstimate(),s.bitrateTest?this.bitrateTestDelay=v/1e3:this.bitrateTestDelay=0},E.onError=function(l,n){switch(n.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},E.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},E.getNextABRAutoLevel=function(){var l=this.fragCurrent,n=this.partCurrent,s=this.hls,u=s.maxAutoLevel,w=s.config,v=s.minAutoLevel,a=s.media,R=n?n.duration:l?l.duration:0,D=a?a.currentTime:0,c=a&&a.playbackRate!==0?Math.abs(a.playbackRate):1,b=this.bwEstimator?this.bwEstimator.getEstimate():w.abrEwmaDefaultEstimate,x=(S.BufferHelper.bufferInfo(a,D,w.maxBufferHole).end-D)/c,C=this.findBestLevel(b,v,u,x,w.abrBandWidthFactor,w.abrBandWidthUpFactor);if(C>=0)return C;i.logger.trace((x?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var F=R?Math.min(R,w.maxStarvationDelay):w.maxStarvationDelay,j=w.abrBandWidthFactor,k=w.abrBandWidthUpFactor;if(!x){var X=this.bitrateTestDelay;if(X){var G=R?Math.min(R,w.maxLoadingDelay):w.maxLoadingDelay;F=G-X,i.logger.trace("bitrate test took "+Math.round(1e3*X)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*F)+" ms"),j=k=1}}return C=this.findBestLevel(b,v,u,x+F,j,k),Math.max(C,0)},E.findBestLevel=function(l,n,s,u,w,v){for(var a,R=this.fragCurrent,D=this.partCurrent,c=this.lastLoadedFragLevel,b=this.hls.levels,x=b[c],C=!!(x!=null&&(a=x.details)!==null&&a!==void 0&&a.live),F=x==null?void 0:x.codecSet,j=D?D.duration:R?R.duration:0,k=s;k>=n;k--){var X=b[k];if(!X||F&&X.codecSet!==F)continue;var G=X.details,W=(D?G==null?void 0:G.partTarget:G==null?void 0:G.averagetargetduration)||j,K=void 0;k<=c?K=w*l:K=v*l;var B=b[k].maxBitrate,U=B*W/K;if(i.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+k+"/"+Math.round(K)+"/"+B+"/"+W+"/"+u+"/"+U),K>B&&(!U||C&&!this.bitrateTestDelay||U<u))return k}return-1},d(h,[{key:"nextAutoLevel",get:function(){var l=this._nextAutoLevel,n=this.bwEstimator;if(l!==-1&&(!n||!n.canEstimate()))return l;var s=this.getNextABRAutoLevel();return l!==-1&&(s=Math.min(l,s)),s},set:function(l){this._nextAutoLevel=l}}]),h}();m.default=f},"./src/controller/audio-stream-controller.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/polyfills/number.ts"),_=T("./src/controller/base-stream-controller.ts"),g=T("./src/events.ts"),S=T("./src/utils/buffer-helper.ts"),p=T("./src/controller/fragment-tracker.ts"),o=T("./src/types/level.ts"),i=T("./src/types/loader.ts"),r=T("./src/loader/fragment.ts"),d=T("./src/demux/chunk-cache.ts"),f=T("./src/demux/transmuxer-interface.ts"),h=T("./src/types/transmuxer.ts"),E=T("./src/controller/fragment-finders.ts"),y=T("./src/utils/discontinuities.ts"),l=T("./src/errors.ts"),n=T("./src/utils/logger.ts");function s(){return s=Object.assign||function(R){for(var D=1;D<arguments.length;D++){var c=arguments[D];for(var b in c)Object.prototype.hasOwnProperty.call(c,b)&&(R[b]=c[b])}return R},s.apply(this,arguments)}function u(R,D){R.prototype=Object.create(D.prototype),R.prototype.constructor=R,w(R,D)}function w(R,D){return w=Object.setPrototypeOf||function(b,x){return b.__proto__=x,b},w(R,D)}var v=100,a=function(R){u(D,R);function D(b,x){var C;return C=R.call(this,b,x,"[audio-stream-controller]")||this,C.videoBuffer=null,C.videoTrackCC=-1,C.waitingVideoCC=-1,C.audioSwitch=!1,C.trackId=-1,C.waitingData=null,C.mainDetails=null,C.bufferFlushed=!1,C._registerListeners(),C}var c=D.prototype;return c.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},c._registerListeners=function(){var x=this.hls;x.on(g.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(g.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(g.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(g.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),x.on(g.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.on(g.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),x.on(g.Events.ERROR,this.onError,this),x.on(g.Events.BUFFER_RESET,this.onBufferReset,this),x.on(g.Events.BUFFER_CREATED,this.onBufferCreated,this),x.on(g.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.on(g.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),x.on(g.Events.FRAG_BUFFERED,this.onFragBuffered,this)},c._unregisterListeners=function(){var x=this.hls;x.off(g.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(g.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(g.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(g.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),x.off(g.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.off(g.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),x.off(g.Events.ERROR,this.onError,this),x.off(g.Events.BUFFER_RESET,this.onBufferReset,this),x.off(g.Events.BUFFER_CREATED,this.onBufferCreated,this),x.off(g.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.off(g.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),x.off(g.Events.FRAG_BUFFERED,this.onFragBuffered,this)},c.onInitPtsFound=function(x,C){var F=C.frag,j=C.id,k=C.initPTS;if(j==="main"){var X=F.cc;this.initPTS[F.cc]=k,this.log("InitPTS for cc: "+X+" found from main: "+k),this.videoTrackCC=X,this.state===_.State.WAITING_INIT_PTS&&this.tick()}},c.startLoad=function(x){if(!this.levels){this.startPosition=x,this.state=_.State.STOPPED;return}var C=this.lastCurrentTime;this.stopLoad(),this.setInterval(v),this.fragLoadError=0,C>0&&x===-1?(this.log("Override startPosition with lastCurrentTime @"+C.toFixed(3)),this.state=_.State.IDLE):(this.loadedmetadata=!1,this.state=_.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,this.tick()},c.doTick=function(){switch(this.state){case _.State.IDLE:this.doTickIdle();break;case _.State.WAITING_TRACK:{var x,C=this.levels,F=this.trackId,j=C==null||((x=C[F])===null||x===void 0)?void 0:x.details;if(j){if(this.waitForCdnTuneIn(j))break;this.state=_.State.WAITING_INIT_PTS}break}case _.State.FRAG_LOADING_WAITING_RETRY:{var k,X=performance.now(),G=this.retryDate;(!G||X>=G||(k=this.media)!==null&&k!==void 0&&k.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=_.State.IDLE);break}case _.State.WAITING_INIT_PTS:{var W=this.waitingData;if(W){var K=W.frag,B=W.part,U=W.cache,H=W.complete;if(this.initPTS[K.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=_.State.FRAG_LOADING;var q=U.flush(),ie={frag:K,part:B,payload:q,networkDetails:null};this._handleFragmentLoadProgress(ie),H&&R.prototype._handleFragmentLoadComplete.call(this,ie)}else if(this.videoTrackCC!==this.waitingVideoCC)n.logger.log("Waiting fragment cc ("+K.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var ce=this.getLoadPosition(),he=S.BufferHelper.bufferInfo(this.mediaBuffer,ce,this.config.maxBufferHole),be=Object(E.fragmentWithinToleranceTest)(he.end,this.config.maxFragLookUpTolerance,K);be<0&&(n.logger.log("Waiting fragment cc ("+K.cc+") @ "+K.start+" cancelled because another fragment at "+he.end+" is needed"),this.clearWaitingFragment())}}else this.state=_.State.IDLE}}this.onTickEnd()},c.clearWaitingFragment=function(){var x=this.waitingData;x&&(this.fragmentTracker.removeFragment(x.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=_.State.IDLE)},c.onTickEnd=function(){var x=this.media;if(!x||!x.readyState)return;var C=this.mediaBuffer?this.mediaBuffer:x,F=C.buffered;!this.loadedmetadata&&F.length&&(this.loadedmetadata=!0),this.lastCurrentTime=x.currentTime},c.doTickIdle=function(){var x,C,F=this.hls,j=this.levels,k=this.media,X=this.trackId,G=F.config;if(!j||!j[X])return;if(!k&&(this.startFragRequested||!G.startFragPrefetch))return;var W=j[X],K=W.details;if(!K||K.live&&this.levelLastLoaded!==X||this.waitForCdnTuneIn(K)){this.state=_.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,r.ElementaryStreamTypes.AUDIO,i.PlaylistLevelType.AUDIO));var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,i.PlaylistLevelType.AUDIO);if(B===null)return;var U=B.len,H=this.getMaxBufferLength(),q=this.audioSwitch;if(U>=H&&!q)return;if(!q&&this._streamEnded(B,K)){F.trigger(g.Events.BUFFER_EOS,{type:"audio"}),this.state=_.State.ENDED;return}var ie=K.fragments,ce=ie[0].start,he=B.end;if(q){var be=this.getLoadPosition();he=be,K.PTSKnown&&be<ce&&((B.end>ce||B.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),k.currentTime=ce+.05))}var ne=this.getNextFragment(he,K);if(!ne){this.bufferFlushed=!0;return}((x=ne.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((C=ne.decryptdata)!==null&&C!==void 0&&C.key)?this.loadKey(ne,K):this.loadFragment(ne,K,he)},c.getMaxBufferLength=function(){var x=R.prototype.getMaxBufferLength.call(this),C=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,i.PlaylistLevelType.MAIN);return C===null?x:Math.max(x,C.len)},c.onMediaDetaching=function(){this.videoBuffer=null,R.prototype.onMediaDetaching.call(this)},c.onAudioTracksUpdated=function(x,C){var F=C.audioTracks;this.resetTransmuxer(),this.levels=F.map(function(j){return new o.Level(j)})},c.onAudioTrackSwitching=function(x,C){var F=!!C.url;this.trackId=C.id;var j=this.fragCurrent;j!=null&&j.loader&&j.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),F?this.setInterval(v):this.resetTransmuxer(),F?(this.audioSwitch=!0,this.state=_.State.IDLE):this.state=_.State.STOPPED,this.tick()},c.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},c.onLevelLoaded=function(x,C){this.mainDetails=C.details},c.onAudioTrackLoaded=function(x,C){var F,j=this.levels,k=C.details,X=C.id;if(!j){this.warn("Audio tracks were reset while loading level "+X);return}this.log("Track "+X+" loaded ["+k.startSN+","+k.endSN+"],duration:"+k.totalduration);var G=j[X],W=0;if(k.live||(F=G.details)!==null&&F!==void 0&&F.live){var K=this.mainDetails;if(k.fragments[0]||(k.deltaUpdateFailed=!0),k.deltaUpdateFailed||!K)return;!G.details&&k.hasProgramDateTime&&K.hasProgramDateTime?(Object(y.alignMediaPlaylistByPDT)(k,K),W=k.fragments[0].start):W=this.alignPlaylists(k,G.details)}G.details=k,this.levelLastLoaded=X,!this.startFragRequested&&(this.mainDetails||!k.live)&&this.setStartPosition(G.details,W),this.state===_.State.WAITING_TRACK&&!this.waitForCdnTuneIn(k)&&(this.state=_.State.IDLE),this.tick()},c._handleFragmentLoadProgress=function(x){var C,F=x.frag,j=x.part,k=x.payload,X=this.config,G=this.trackId,W=this.levels;if(!W){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+F.sn+" of level "+F.level+" will not be buffered");return}var K=W[G];console.assert(K,"Audio track is defined on fragment load progress");var B=K.details;console.assert(B,"Audio track details are defined on fragment load progress");var U=X.defaultAudioCodec||K.audioCodec||"mp4a.40.2",H=this.transmuxer;H||(H=this.transmuxer=new f.default(this.hls,i.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var q=this.initPTS[F.cc],ie=(C=F.initSegment)===null||C===void 0?void 0:C.data;if(q!==void 0){var ce=!1,he=j?j.index:-1,be=he!==-1,ne=new h.ChunkMetadata(F.level,F.sn,F.stats.chunkCount,k.byteLength,he,be);H.push(k,ie,U,"",F,j,B.totalduration,ce,ne,q)}else{n.logger.log("Unknown video PTS for cc "+F.cc+", waiting for video PTS before demuxing audio frag "+F.sn+" of ["+B.startSN+" ,"+B.endSN+"],track "+G);var le=this.waitingData=this.waitingData||{frag:F,part:j,cache:new d.default,complete:!1},ue=le.cache;ue.push(new Uint8Array(k)),this.waitingVideoCC=this.videoTrackCC,this.state=_.State.WAITING_INIT_PTS}},c._handleFragmentLoadComplete=function(x){if(this.waitingData){this.waitingData.complete=!0;return}R.prototype._handleFragmentLoadComplete.call(this,x)},c.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},c.onBufferCreated=function(x,C){var F=C.tracks.audio;F&&(this.mediaBuffer=F.buffer),C.tracks.video&&(this.videoBuffer=C.tracks.video.buffer)},c.onFragBuffered=function(x,C){var F=C.frag,j=C.part;if(F.type!==i.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(F)){this.warn("Fragment "+F.sn+(j?" p: "+j.index:"")+" of level "+F.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}F.sn!=="initSegment"&&(this.fragPrevious=F,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(g.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(F,j)},c.onError=function(x,C){switch(C.details){case l.ErrorDetails.FRAG_LOAD_ERROR:case l.ErrorDetails.FRAG_LOAD_TIMEOUT:case l.ErrorDetails.KEY_LOAD_ERROR:case l.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(i.PlaylistLevelType.AUDIO,C);break;case l.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case l.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==_.State.ERROR&&this.state!==_.State.STOPPED&&(this.state=C.fatal?_.State.ERROR:_.State.IDLE,this.warn(C.details+" while loading frag, switching to "+this.state+" state"));break;case l.ErrorDetails.BUFFER_FULL_ERROR:if(C.parent==="audio"&&(this.state===_.State.PARSING||this.state===_.State.PARSED)){var F=!0,j=this.getFwdBufferInfo(this.mediaBuffer,i.PlaylistLevelType.AUDIO);j&&j.len>.5&&(F=!this.reduceMaxBufferLength(j.len)),F&&(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}},c.onBufferFlushed=function(x,C){var F=C.type;F===r.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},c._handleTransmuxComplete=function(x){var C,F="audio",j=this.hls,k=x.remuxResult,X=x.chunkMeta,G=this.getCurrentContext(X);if(!G){this.warn("The loading context changed while buffering fragment "+X.sn+" of level "+X.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(X.level);return}var W=G.frag,K=G.part,B=k.audio,U=k.text,H=k.id3,q=k.initSegment;if(this.fragContextChanged(W))return;if(this.state=_.State.PARSING,this.audioSwitch&&B&&this.completeAudioSwitch(),q!=null&&q.tracks&&(this._bufferInitSegment(q.tracks,W,X),j.trigger(g.Events.FRAG_PARSING_INIT_SEGMENT,{frag:W,id:F,tracks:q.tracks})),B){var ie=B.startPTS,ce=B.endPTS,he=B.startDTS,be=B.endDTS;K&&(K.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:ie,endPTS:ce,startDTS:he,endDTS:be}),W.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,ie,ce,he,be),this.bufferFragmentData(B,W,K,X)}if(H!=null&&(C=H.samples)!==null&&C!==void 0&&C.length){var ne=s({frag:W,id:F},H);j.trigger(g.Events.FRAG_PARSING_METADATA,ne)}if(U){var le=s({frag:W,id:F},U);j.trigger(g.Events.FRAG_PARSING_USERDATA,le)}},c._bufferInitSegment=function(x,C,F){if(this.state!==_.State.PARSING)return;x.video&&delete x.video;var j=x.audio;if(!j)return;j.levelCodec=j.codec,j.id="audio",this.log("Init audio buffer, container:"+j.container+", codecs[parsed]=["+j.codec+"]"),this.hls.trigger(g.Events.BUFFER_CODECS,x);var k=j.initSegment;if(k!=null&&k.byteLength){var X={type:"audio",frag:C,part:null,chunkMeta:F,parent:C.type,data:k};this.hls.trigger(g.Events.BUFFER_APPENDING,X)}this.tick()},c.loadFragment=function(x,C,F){var j=this.fragmentTracker.getState(x);this.fragCurrent=x,(this.audioSwitch||j===p.FragmentState.NOT_LOADED||j===p.FragmentState.PARTIAL)&&(x.sn==="initSegment"?this._loadInitSegment(x):C.live&&!Object(L.isFiniteNumber)(this.initPTS[x.cc])?(this.log("Waiting for video PTS in continuity counter "+x.cc+" of live stream before loading audio fragment "+x.sn+" of level "+this.trackId),this.state=_.State.WAITING_INIT_PTS):(this.startFragRequested=!0,R.prototype.loadFragment.call(this,x,C,F)))},c.completeAudioSwitch=function(){var x=this.hls,C=this.media,F=this.trackId;C&&(this.log("Switching audio track : flushing all audio"),R.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,x.trigger(g.Events.AUDIO_TRACK_SWITCHED,{id:F})},D}(_.default);m.default=a},"./src/controller/audio-track-controller.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/events.ts"),_=T("./src/errors.ts"),g=T("./src/controller/base-playlist-controller.ts"),S=T("./src/types/loader.ts");function p(f,h){for(var E=0;E<h.length;E++){var y=h[E];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(f,y.key,y)}}function o(f,h,E){return h&&p(f.prototype,h),E&&p(f,E),f}function i(f,h){f.prototype=Object.create(h.prototype),f.prototype.constructor=f,r(f,h)}function r(f,h){return r=Object.setPrototypeOf||function(y,l){return y.__proto__=l,y},r(f,h)}var d=function(f){i(h,f);function h(y){var l;return l=f.call(this,y,"[audio-track-controller]")||this,l.tracks=[],l.groupId=null,l.tracksInGroup=[],l.trackId=-1,l.trackName="",l.selectDefaultTrack=!0,l.registerListeners(),l}var E=h.prototype;return E.registerListeners=function(){var l=this.hls;l.on(L.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(L.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.on(L.Events.LEVEL_LOADING,this.onLevelLoading,this),l.on(L.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.on(L.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.on(L.Events.ERROR,this.onError,this)},E.unregisterListeners=function(){var l=this.hls;l.off(L.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(L.Events.MANIFEST_PARSED,this.onManifestParsed,this),l.off(L.Events.LEVEL_LOADING,this.onLevelLoading,this),l.off(L.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),l.off(L.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.off(L.Events.ERROR,this.onError,this)},E.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,f.prototype.destroy.call(this)},E.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},E.onManifestParsed=function(l,n){this.tracks=n.audioTracks||[]},E.onAudioTrackLoaded=function(l,n){var s=n.id,u=n.details,w=this.tracksInGroup[s];if(!w){this.warn("Invalid audio track id "+s);return}var v=w.details;w.details=n.details,this.log("audioTrack "+s+" loaded ["+u.startSN+"-"+u.endSN+"]"),s===this.trackId&&(this.retryCount=0,this.playlistLoaded(s,n,v))},E.onLevelLoading=function(l,n){this.switchLevel(n.level)},E.onLevelSwitching=function(l,n){this.switchLevel(n.level)},E.switchLevel=function(l){var n=this.hls.levels[l];if(!(n!=null&&n.audioGroupIds))return;var s=n.audioGroupIds[n.urlId];if(this.groupId!==s){this.groupId=s;var u=this.tracks.filter(function(v){return!s||v.groupId===s});this.selectDefaultTrack&&!u.some(function(v){return v.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=u;var w={audioTracks:u};this.log("Updating audio tracks, "+u.length+' track(s) found in "'+s+'" group-id'),this.hls.trigger(L.Events.AUDIO_TRACKS_UPDATED,w),this.selectInitialTrack()}},E.onError=function(l,n){if(f.prototype.onError.call(this,l,n),n.fatal||!n.context)return;n.context.type===S.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},E.setAudioTrack=function(l){var n=this.tracksInGroup;if(l<0||l>=n.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var s=n[this.trackId];this.log("Now switching to audio-track index "+l);var u=n[l],w=u.id,v=u.groupId,a=v===void 0?"":v,R=u.name,D=u.type,c=u.url;if(this.trackId=l,this.trackName=R,this.selectDefaultTrack=!1,this.hls.trigger(L.Events.AUDIO_TRACK_SWITCHING,{id:w,groupId:a,name:R,type:D,url:c}),u.details&&!u.details.live)return;var b=this.switchParams(u.url,s==null?void 0:s.details);this.loadPlaylist(b)},E.selectInitialTrack=function(){var l=this.tracksInGroup;console.assert(l.length,"Initial audio track should be selected when tracks are known");var n=this.trackName,s=this.findTrackId(n)||this.findTrackId();s!==-1?this.setAudioTrack(s):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(L.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},E.findTrackId=function(l){for(var n=this.tracksInGroup,s=0;s<n.length;s++){var u=n[s];if((!this.selectDefaultTrack||u.default)&&(!l||l===u.name))return u.id}return-1},E.loadPlaylist=function(l){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var s=n.id,u=n.groupId,w=n.url;if(l)try{w=l.addDirectives(w)}catch(v){this.warn("Could not construct new URL with HLS Delivery Directives: "+v)}this.log("loading audio-track playlist for id: "+s),this.clearTimer(),this.hls.trigger(L.Events.AUDIO_TRACK_LOADING,{url:w,id:s,groupId:u,deliveryDirectives:l||null})}},o(h,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(l){this.selectDefaultTrack=!1,this.setAudioTrack(l)}}]),h}(g.default);m.default=d},"./src/controller/base-playlist-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return o});var L=T("./src/polyfills/number.ts"),_=T("./src/types/level.ts"),g=T("./src/controller/level-helper.ts"),S=T("./src/utils/logger.ts"),p=T("./src/errors.ts"),o=function(){function i(d,f){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,f+":"),this.warn=S.logger.warn.bind(S.logger,f+":"),this.hls=d}var r=i.prototype;return r.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},r.onError=function(f,h){h.fatal&&h.type===p.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},r.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},r.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},r.stopLoad=function(){this.canLoad=!1,this.clearTimer()},r.switchParams=function(f,h){var E=h==null?void 0:h.renditionReports;if(E)for(var y=0;y<E.length;y++){var l=E[y],n=""+l.URI;if(n===f.substr(-n.length)){var s=parseInt(l["LAST-MSN"]),u=parseInt(l["LAST-PART"]);if(h&&this.hls.config.lowLatencyMode){var w=Math.min(h.age-h.partTarget,h.targetduration);u!==void 0&&w>h.partTarget&&(u+=1)}if(Object(L.isFiniteNumber)(s))return new _.HlsUrlParameters(s,Object(L.isFiniteNumber)(u)?u:void 0,_.HlsSkip.No)}}},r.loadPlaylist=function(f){},r.shouldLoadTrack=function(f){return this.canLoad&&f&&!!f.url&&(!f.details||f.details.live)},r.playlistLoaded=function(f,h,E){var y=this,l=h.details,n=h.stats,s=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(l.advancedDateTime=Date.now()-s,l.live||E!=null&&E.live){if(l.reloaded(E),E&&this.log("live playlist "+f+" "+(l.advanced?"REFRESHED "+l.lastPartSn+"-"+l.lastPartIndex:"MISSED")),E&&l.fragments.length>0&&Object(g.mergeDetails)(E,l),!this.canLoad||!l.live)return;var u,w=void 0,v=void 0;if(l.canBlockReload&&l.endSN&&l.advanced){var a=this.hls.config.lowLatencyMode,R=l.lastPartSn,D=l.endSN,c=l.lastPartIndex,b=c!==-1,x=R===D,C=a?0:c;b?(w=x?D+1:R,v=x?C:c+1):w=D+1;var F=l.age,j=F+l.ageHeader,k=Math.min(j-l.partTarget,l.targetduration*1.5);if(k>0){if(E&&k>E.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+E.tuneInGoal+" to: "+k+" with playlist age: "+l.age),k=0;else{var X=Math.floor(k/l.targetduration);if(w+=X,v!==void 0){var G=Math.round(k%l.targetduration/l.partTarget);v+=G}this.log("CDN Tune-in age: "+l.ageHeader+"s last advanced "+F.toFixed(2)+"s goal: "+k+" skip sn "+X+" to part "+v)}l.tuneInGoal=k}if(u=this.getDeliveryDirectives(l,h.deliveryDirectives,w,v),a||!x){this.loadPlaylist(u);return}}else u=this.getDeliveryDirectives(l,h.deliveryDirectives,w,v);var W=Object(g.computeReloadInterval)(l,n);w!==void 0&&l.canBlockReload&&(W-=l.partTarget||1),this.log("reload live playlist "+f+" in "+Math.round(W)+" ms"),this.timer=self.setTimeout(function(){return y.loadPlaylist(u)},W)}else this.clearTimer()},r.getDeliveryDirectives=function(f,h,E,y){var l=Object(_.getSkipValue)(f,E);return h!=null&&h.skip&&f.deltaUpdateFailed&&(E=h.msn,y=h.part,l=_.HlsSkip.No),new _.HlsUrlParameters(E,y,l)},r.retryLoadingOrFail=function(f){var h=this,E=this.hls.config,y=this.retryCount<E.levelLoadingMaxRetry;if(y){var l;if(this.retryCount++,f.details.indexOf("LoadTimeOut")>-1&&(l=f.context)!==null&&l!==void 0&&l.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+f.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*E.levelLoadingRetryDelay,E.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return h.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+f.details+'"')}}else this.warn('cannot recover from error "'+f.details+'"'),this.clearTimer(),f.fatal=!0;return y},i}()},"./src/controller/base-stream-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"State",function(){return D}),T.d(m,"default",function(){return c});var L=T("./src/polyfills/number.ts"),_=T("./src/task-loop.ts"),g=T("./src/controller/fragment-tracker.ts"),S=T("./src/utils/buffer-helper.ts"),p=T("./src/utils/logger.ts"),o=T("./src/events.ts"),i=T("./src/errors.ts"),r=T("./src/types/transmuxer.ts"),d=T("./src/utils/mp4-tools.ts"),f=T("./src/utils/discontinuities.ts"),h=T("./src/controller/fragment-finders.ts"),E=T("./src/controller/level-helper.ts"),y=T("./src/loader/fragment-loader.ts"),l=T("./src/crypt/decrypter.ts"),n=T("./src/utils/time-ranges.ts"),s=T("./src/types/loader.ts");function u(b,x){for(var C=0;C<x.length;C++){var F=x[C];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(b,F.key,F)}}function w(b,x,C){return x&&u(b.prototype,x),C&&u(b,C),b}function v(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}function a(b,x){b.prototype=Object.create(x.prototype),b.prototype.constructor=b,R(b,x)}function R(b,x){return R=Object.setPrototypeOf||function(F,j){return F.__proto__=j,F},R(b,x)}var D={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"},c=function(b){a(x,b);function x(F,j,k){var X;return X=b.call(this)||this,X.hls=void 0,X.fragPrevious=null,X.fragCurrent=null,X.fragmentTracker=void 0,X.transmuxer=null,X._state=D.STOPPED,X.media=void 0,X.mediaBuffer=void 0,X.config=void 0,X.bitrateTest=!1,X.lastCurrentTime=0,X.nextLoadPosition=0,X.startPosition=0,X.loadedmetadata=!1,X.fragLoadError=0,X.retryDate=0,X.levels=null,X.fragmentLoader=void 0,X.levelLastLoaded=null,X.startFragRequested=!1,X.decrypter=void 0,X.initPTS=[],X.onvseeking=null,X.onvended=null,X.logPrefix="",X.log=void 0,X.warn=void 0,X.logPrefix=k,X.log=p.logger.log.bind(p.logger,k+":"),X.warn=p.logger.warn.bind(p.logger,k+":"),X.hls=F,X.fragmentLoader=new y.default(F.config),X.fragmentTracker=j,X.config=F.config,X.decrypter=new l.default(F,F.config),F.on(o.Events.KEY_LOADED,X.onKeyLoaded,v(X)),X}var C=x.prototype;return C.doTick=function(){this.onTickEnd()},C.onTickEnd=function(){},C.startLoad=function(j){},C.stopLoad=function(){this.fragmentLoader.abort();var j=this.fragCurrent;j&&this.fragmentTracker.removeFragment(j),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=D.STOPPED},C._streamEnded=function(j,k){var X=this.fragCurrent,G=this.fragmentTracker;if(!k.live&&X&&X.sn===k.endSN&&!j.nextStart){var W=G.getState(X);return W===g.FragmentState.PARTIAL||W===g.FragmentState.OK}return!1},C.onMediaAttached=function(j,k){var X=this.media=this.mediaBuffer=k.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),X.addEventListener("seeking",this.onvseeking),X.addEventListener("ended",this.onvended);var G=this.config;this.levels&&G.autoStartLoad&&this.state===D.STOPPED&&this.startLoad(G.startPosition)},C.onMediaDetaching=function(){var j=this.media;j!=null&&j.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),j&&(j.removeEventListener("seeking",this.onvseeking),j.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},C.onMediaSeeking=function(){var j=this.config,k=this.fragCurrent,X=this.media,G=this.mediaBuffer,W=this.state,K=X?X.currentTime:0,B=S.BufferHelper.bufferInfo(G||X,K,j.maxBufferHole);if(this.log("media seeking to "+(Object(L.isFiniteNumber)(K)?K.toFixed(3):K)+", state: "+W),W===D.ENDED)this.resetLoadingState();else if(k&&!B.len){var U=j.maxFragLookUpTolerance,H=k.start-U,q=k.start+k.duration+U,ie=K>q;(K<H||ie)&&(ie&&k.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),k.loader.abort()),this.resetLoadingState())}X&&(this.lastCurrentTime=K),!this.loadedmetadata&&!B.len&&(this.nextLoadPosition=this.startPosition=K),this.tickImmediate()},C.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},C.onKeyLoaded=function(j,k){if(this.state!==D.KEY_LOADING||k.frag!==this.fragCurrent||!this.levels)return;this.state=D.IDLE;var X=this.levels[k.frag.level].details;X&&this.loadFragment(k.frag,X,k.frag.start)},C.onHandlerDestroying=function(){this.stopLoad(),b.prototype.onHandlerDestroying.call(this)},C.onHandlerDestroyed=function(){this.state=D.STOPPED,this.hls.off(o.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,b.prototype.onHandlerDestroyed.call(this)},C.loadKey=function(j,k){this.log("Loading key for "+j.sn+" of ["+k.startSN+"-"+k.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+j.level),this.state=D.KEY_LOADING,this.fragCurrent=j,this.hls.trigger(o.Events.KEY_LOADING,{frag:j})},C.loadFragment=function(j,k,X){this._loadFragForPlayback(j,k,X)},C._loadFragForPlayback=function(j,k,X){var G=this,W=function(B){if(G.fragContextChanged(j)){G.warn("Fragment "+j.sn+(B.part?" p: "+B.part.index:"")+" of level "+j.level+" was dropped during download."),G.fragmentTracker.removeFragment(j);return}j.stats.chunkCount++,G._handleFragmentLoadProgress(B)};this._doFragLoad(j,k,X,W).then(function(K){if(!K)return;G.fragLoadError=0;var B=G.state;if(G.fragContextChanged(j)){(B===D.FRAG_LOADING||B===D.BACKTRACKING||!G.fragCurrent&&B===D.PARSING)&&(G.fragmentTracker.removeFragment(j),G.state=D.IDLE);return}if("payload"in K&&(G.log("Loaded fragment "+j.sn+" of level "+j.level),G.hls.trigger(o.Events.FRAG_LOADED,K),G.state===D.BACKTRACKING)){G.fragmentTracker.backtrack(j,K),G.resetFragmentLoading(j);return}G._handleFragmentLoadComplete(K)}).catch(function(K){G.warn(K),G.resetFragmentLoading(j)})},C.flushMainBuffer=function(j,k,X){if(X===void 0&&(X=null),!(j-k))return;var G={startOffset:j,endOffset:k,type:X};this.fragLoadError=0,this.hls.trigger(o.Events.BUFFER_FLUSHING,G)},C._loadInitSegment=function(j){var k=this;this._doFragLoad(j).then(function(X){if(!X||k.fragContextChanged(j)||!k.levels)throw new Error("init load aborted");return X}).then(function(X){var G=k.hls,W=X.payload,K=j.decryptdata;if(W&&W.byteLength>0&&K&&K.key&&K.iv&&K.method==="AES-128"){var B=self.performance.now();return k.decrypter.webCryptoDecrypt(new Uint8Array(W),K.key.buffer,K.iv.buffer).then(function(U){var H=self.performance.now();return G.trigger(o.Events.FRAG_DECRYPTED,{frag:j,payload:U,stats:{tstart:B,tdecrypt:H}}),X.payload=U,X})}return X}).then(function(X){var G=k.fragCurrent,W=k.hls,K=k.levels;if(!K)throw new Error("init load aborted, missing levels");var B=K[j.level].details;console.assert(B,"Level details are defined when init segment is loaded");var U=j.stats;k.state=D.IDLE,k.fragLoadError=0,j.data=new Uint8Array(X.payload),U.parsing.start=U.buffering.start=self.performance.now(),U.parsing.end=U.buffering.end=self.performance.now(),X.frag===G&&W.trigger(o.Events.FRAG_BUFFERED,{stats:U,frag:G,part:null,id:j.type}),k.tick()}).catch(function(X){k.warn(X),k.resetFragmentLoading(j)})},C.fragContextChanged=function(j){var k=this.fragCurrent;return!j||!k||j.level!==k.level||j.sn!==k.sn||j.urlId!==k.urlId},C.fragBufferedComplete=function(j,k){var X=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+j.type+" sn: "+j.sn+(k?" part: "+k.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+j.level+" "+n.default.toString(S.BufferHelper.getBuffered(X))),this.state=D.IDLE,this.tick()},C._handleFragmentLoadComplete=function(j){var k=this.transmuxer;if(!k)return;var X=j.frag,G=j.part,W=j.partsLoaded,K=!W||W.length===0||W.some(function(U){return!U}),B=new r.ChunkMetadata(X.level,X.sn,X.stats.chunkCount+1,0,G?G.index:-1,!K);k.flush(B)},C._handleFragmentLoadProgress=function(j){},C._doFragLoad=function(j,k,X,G){var W=this;if(X===void 0&&(X=null),!this.levels)throw new Error("frag load aborted, missing levels");if(X=Math.max(j.start,X||0),this.config.lowLatencyMode&&k){var K=k.partList;if(K&&G){X>j.end&&k.fragmentHint&&(j=k.fragmentHint);var B=this.getNextPart(K,j,X);if(B>-1){var U=K[B];return this.log("Loading part sn: "+j.sn+" p: "+U.index+" cc: "+j.cc+" of playlist ["+k.startSN+"-"+k.endSN+"] parts [0-"+B+"-"+(K.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+j.level+", target: "+parseFloat(X.toFixed(3))),this.nextLoadPosition=U.start+U.duration,this.state=D.FRAG_LOADING,this.hls.trigger(o.Events.FRAG_LOADING,{frag:j,part:K[B],targetBufferTime:X}),this.doFragPartsLoad(j,K,B,G).catch(function(H){return W.handleFragLoadError(H)})}else if(!j.url||this.loadedEndOfParts(K,X))return Promise.resolve(null)}}return this.log("Loading fragment "+j.sn+" cc: "+j.cc+" "+(k?"of ["+k.startSN+"-"+k.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+j.level+", target: "+parseFloat(X.toFixed(3))),Object(L.isFiniteNumber)(j.sn)&&!this.bitrateTest&&(this.nextLoadPosition=j.start+j.duration),this.state=D.FRAG_LOADING,this.hls.trigger(o.Events.FRAG_LOADING,{frag:j,targetBufferTime:X}),this.fragmentLoader.load(j,G).catch(function(H){return W.handleFragLoadError(H)})},C.doFragPartsLoad=function(j,k,X,G){var W=this;return new Promise(function(K,B){var U=[],H=function q(ie){var ce=k[ie];W.fragmentLoader.loadPart(j,ce,G).then(function(he){U[ce.index]=he;var be=he.part;W.hls.trigger(o.Events.FRAG_LOADED,he);var ne=k[ie+1];if(ne&&ne.fragment===j)q(ie+1);else return K({frag:j,part:be,partsLoaded:U})}).catch(B)};H(X)})},C.handleFragLoadError=function(j){var k=j.data;return k&&k.details===i.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(k.frag,k.part):this.hls.trigger(o.Events.ERROR,k),null},C._handleTransmuxerFlush=function(j){var k=this.getCurrentContext(j);if(!k||this.state!==D.PARSING){this.fragCurrent||(this.state=D.IDLE);return}var X=k.frag,G=k.part,W=k.level,K=self.performance.now();X.stats.parsing.end=K,G&&(G.stats.parsing.end=K),this.updateLevelTiming(X,G,W,j.partial)},C.getCurrentContext=function(j){var k=this.levels,X=j.level,G=j.sn,W=j.part;if(!k||!k[X])return this.warn("Levels object was unset while buffering fragment "+G+" of level "+X+". The current chunk will not be buffered."),null;var K=k[X],B=W>-1?Object(E.getPartWith)(K,G,W):null,U=B?B.fragment:Object(E.getFragmentWithSN)(K,G,this.fragCurrent);return U?{frag:U,part:B,level:K}:null},C.bufferFragmentData=function(j,k,X,G){if(!j||this.state!==D.PARSING)return;var W=j.data1,K=j.data2,B=W;if(W&&K&&(B=Object(d.appendUint8Array)(W,K)),!B||!B.length)return;var U={type:j.type,frag:k,part:X,chunkMeta:G,parent:k.type,data:B};this.hls.trigger(o.Events.BUFFER_APPENDING,U),j.dropped&&j.independent&&!X&&this.flushBufferGap(k)},C.flushBufferGap=function(j){var k=this.media;if(!k)return;if(!S.BufferHelper.isBuffered(k,k.currentTime)){this.flushMainBuffer(0,j.start);return}var X=k.currentTime,G=S.BufferHelper.bufferInfo(k,X,0),W=j.duration,K=Math.min(this.config.maxFragLookUpTolerance*2,W*.25),B=Math.max(Math.min(j.start-K,G.end-K),X+K);j.start-B>K&&this.flushMainBuffer(B,j.start)},C.getFwdBufferInfo=function(j,k){var X=this.config,G=this.getLoadPosition();if(!Object(L.isFiniteNumber)(G))return null;var W=S.BufferHelper.bufferInfo(j,G,X.maxBufferHole);if(W.len===0&&W.nextStart!==void 0){var K=this.fragmentTracker.getBufferedFrag(G,k);if(K&&W.nextStart<K.end)return S.BufferHelper.bufferInfo(j,G,Math.max(W.nextStart,X.maxBufferHole))}return W},C.getMaxBufferLength=function(j){var k=this.config,X;return j?X=Math.max(8*k.maxBufferSize/j,k.maxBufferLength):X=k.maxBufferLength,Math.min(X,k.maxMaxBufferLength)},C.reduceMaxBufferLength=function(j){var k=this.config,X=j||k.maxBufferLength;return k.maxMaxBufferLength>=X?(k.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+k.maxMaxBufferLength+"s"),!0):!1},C.getNextFragment=function(j,k){var X,G,W=k.fragments,K=W.length;if(!K)return null;var B=this.config,U=W[0].start,H;if(k.live){var q=B.initialLiveManifestSize;if(K<q)return this.warn("Not enough fragments to start playback (have: "+K+", need: "+q+")"),null;!k.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(H=this.getInitialLiveFragment(k,W),this.startPosition=H?this.hls.liveSyncPosition||H.start:j)}else j<=U&&(H=W[0]);if(!H){var ie=B.lowLatencyMode?k.partEnd:k.fragmentEnd;H=this.getFragmentAtPosition(j,ie,k)}return(X=H)!==null&&X!==void 0&&X.initSegment&&!((G=H)!==null&&G!==void 0&&G.initSegment.data)&&!this.bitrateTest&&(H=H.initSegment),H},C.getNextPart=function(j,k,X){for(var G=-1,W=!1,K=!0,B=0,U=j.length;B<U;B++){var H=j[B];if(K=K&&!H.independent,G>-1&&X<H.start)break;var q=H.loaded;!q&&(W||H.independent||K)&&H.fragment===k&&(G=B),W=q}return G},C.loadedEndOfParts=function(j,k){var X=j[j.length-1];return X&&k>X.start&&X.loaded},C.getInitialLiveFragment=function(j,k){var X=this.fragPrevious,G=null;if(X){if(j.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+X.programDateTime),G=Object(h.findFragmentByPDT)(k,X.endProgramDateTime,this.config.maxFragLookUpTolerance)),!G){var W=X.sn+1;if(W>=j.startSN&&W<=j.endSN){var K=k[W-j.startSN];X.cc===K.cc&&(G=K,this.log("Live playlist, switching playlist, load frag with next SN: "+G.sn))}G||(G=Object(h.findFragWithCC)(k,X.cc),G&&this.log("Live playlist, switching playlist, load frag with same CC: "+G.sn))}}else{var B=this.hls.liveSyncPosition;B!==null&&(G=this.getFragmentAtPosition(B,this.bitrateTest?j.fragmentEnd:j.edge,j))}return G},C.getFragmentAtPosition=function(j,k,X){var G=this.config,W=this.fragPrevious,K=X.fragments,B=X.endSN,U=X.fragmentHint,H=G.maxFragLookUpTolerance,q=!!(G.lowLatencyMode&&X.partList&&U);q&&U&&!this.bitrateTest&&(K=K.concat(U),B=U.sn);var ie;if(j<k){var ce=j>k-H?0:H;ie=Object(h.findFragmentByPTS)(W,K,j,ce)}else ie=K[K.length-1];if(ie){var he=ie.sn-X.startSN,be=W&&ie.level===W.level,ne=K[he+1],le=this.fragmentTracker.getState(ie);if(le===g.FragmentState.BACKTRACKED){ie=null;for(var ue=he;K[ue]&&this.fragmentTracker.getState(K[ue])===g.FragmentState.BACKTRACKED;)W?ie=K[ue--]:ie=K[--ue];ie||(ie=ne)}else W&&ie.sn===W.sn&&!q&&(be&&(ie.sn<B&&this.fragmentTracker.getState(ne)!==g.FragmentState.OK?(this.log("SN "+ie.sn+" just loaded, load next one: "+ne.sn),ie=ne):ie=null))}return ie},C.synchronizeToLiveEdge=function(j){var k=this.config,X=this.media;if(!X)return;var G=this.hls.liveSyncPosition,W=X.currentTime,K=j.fragments[0].start,B=j.edge,U=W>=K-k.maxFragLookUpTolerance&&W<=B;if(G!==null&&X.duration>G&&(W<G||!U)){var H=k.liveMaxLatencyDuration!==void 0?k.liveMaxLatencyDuration:k.liveMaxLatencyDurationCount*j.targetduration;(!U&&X.readyState<4||W<B-H)&&(this.loadedmetadata||(this.nextLoadPosition=G),X.readyState&&(this.warn("Playback: "+W.toFixed(3)+" is located too far from the end of live sliding playlist: "+B+", reset currentTime to : "+G.toFixed(3)),X.currentTime=G))}},C.alignPlaylists=function(j,k){var X=this.levels,G=this.levelLastLoaded,W=this.fragPrevious,K=G!==null?X[G]:null,B=j.fragments.length;if(!B)return this.warn("No fragments in live playlist"),0;var U=j.fragments[0].start,H=!k,q=j.alignedSliding&&Object(L.isFiniteNumber)(U);if(H||!q&&!U){Object(f.alignStream)(W,K,j);var ie=j.fragments[0].start;return this.log("Live playlist sliding: "+ie.toFixed(2)+" start-sn: "+(k?k.startSN:"na")+"->"+j.startSN+" prev-sn: "+(W?W.sn:"na")+" fragments: "+B),ie}return U},C.waitForCdnTuneIn=function(j){var k=3;return j.live&&j.canBlockReload&&j.tuneInGoal>Math.max(j.partHoldBack,j.partTarget*k)},C.setStartPosition=function(j,k){var X=this.startPosition;if(X<k&&(X=-1),X===-1||this.lastCurrentTime===-1){var G=j.startTimeOffset;Object(L.isFiniteNumber)(G)?(X=k+G,G<0&&(X+=j.totalduration),X=Math.min(Math.max(k,X),k+j.totalduration),this.log("Start time offset "+G+" found in playlist, adjust startPosition to "+X),this.startPosition=X):j.live?X=this.hls.liveSyncPosition||k:this.startPosition=X=0,this.lastCurrentTime=X}this.nextLoadPosition=X},C.getLoadPosition=function(){var j=this.media,k=0;return this.loadedmetadata&&j?k=j.currentTime:this.nextLoadPosition&&(k=this.nextLoadPosition),k},C.handleFragLoadAborted=function(j,k){this.transmuxer&&j.sn!=="initSegment"&&j.stats.aborted&&(this.warn("Fragment "+j.sn+(k?" part"+k.index:"")+" of level "+j.level+" was aborted"),this.resetFragmentLoading(j))},C.resetFragmentLoading=function(j){(!this.fragCurrent||!this.fragContextChanged(j))&&(this.state=D.IDLE)},C.onFragmentOrKeyLoadError=function(j,k){if(k.fatal)return;var X=k.frag;if(!X||X.type!==j)return;var G=this.fragCurrent;console.assert(G&&X.sn===G.sn&&X.level===G.level&&X.urlId===G.urlId,"Frag load error must match current frag to retry");var W=this.config;if(this.fragLoadError+1<=W.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(X.level))return;var K=Math.min(Math.pow(2,this.fragLoadError)*W.fragLoadingRetryDelay,W.fragLoadingMaxRetryTimeout);this.warn("Fragment "+X.sn+" of "+j+" "+X.level+" failed to load, retrying in "+K+"ms"),this.retryDate=self.performance.now()+K,this.fragLoadError++,this.state=D.FRAG_LOADING_WAITING_RETRY}else k.levelRetry?(j===s.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=D.IDLE):(p.logger.error(k.details+" reaches max retry, redispatch as fatal ..."),k.fatal=!0,this.hls.stopLoad(),this.state=D.ERROR)},C.afterBufferFlushed=function(j,k,X){if(!j)return;var G=S.BufferHelper.getBuffered(j);this.fragmentTracker.detectEvictedFragments(k,G,X),this.state===D.ENDED&&this.resetLoadingState()},C.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=D.IDLE},C.resetLiveStartWhenNotLoaded=function(j){if(!this.loadedmetadata){this.startFragRequested=!1;var k=this.levels?this.levels[j].details:null;if(k!=null&&k.live)return this.startPosition=-1,this.setStartPosition(k,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},C.updateLevelTiming=function(j,k,X,G){var W=this,K=X.details;console.assert(!!K,"level.details must be defined");var B=Object.keys(j.elementaryStreams).reduce(function(U,H){var q=j.elementaryStreams[H];if(q){var ie=q.endPTS-q.startPTS;if(ie<=0)return W.warn("Could not parse fragment "+j.sn+" "+H+" duration reliably ("+ie+") resetting transmuxer to fallback to playlist timing"),W.resetTransmuxer(),U||!1;var ce=G?0:Object(E.updateFragPTSDTS)(K,j,q.startPTS,q.endPTS,q.startDTS,q.endDTS);return W.hls.trigger(o.Events.LEVEL_PTS_UPDATED,{details:K,level:X,drift:ce,type:H,frag:j,start:q.startPTS,end:q.endPTS}),!0}return U},!1);B?(this.state=D.PARSED,this.hls.trigger(o.Events.FRAG_PARSED,{frag:j,part:k})):this.resetLoadingState()},C.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},w(x,[{key:"state",get:function(){return this._state},set:function(j){var k=this._state;k!==j&&(this._state=j,this.log(k+"->"+j))}}]),x}(_.default)},"./src/controller/buffer-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return h});var L=T("./src/polyfills/number.ts"),_=T("./src/events.ts"),g=T("./src/utils/logger.ts"),S=T("./src/errors.ts"),p=T("./src/utils/buffer-helper.ts"),o=T("./src/utils/mediasource-helper.ts"),i=T("./src/loader/fragment.ts"),r=T("./src/controller/buffer-operation-queue.ts"),d=Object(o.getMediaSource)(),f=/([ha]vc.)(?:\.[^.,]+)+/,h=function(){function E(l){var n=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var s=n.hls,u=n.media,w=n.mediaSource;g.logger.log("[buffer-controller]: Media source opened"),u&&(n.updateMediaElementDuration(),s.trigger(_.Events.MEDIA_ATTACHED,{media:u})),w&&w.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},this._onMediaSourceClose=function(){g.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){g.logger.log("[buffer-controller]: Media source ended")},this.hls=l,this._initSourceBuffer(),this.registerListeners()}var y=E.prototype;return y.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},y.destroy=function(){this.unregisterListeners(),this.details=null},y.registerListeners=function(){var n=this.hls;n.on(_.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(_.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(_.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(_.Events.BUFFER_RESET,this.onBufferReset,this),n.on(_.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.on(_.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(_.Events.BUFFER_EOS,this.onBufferEos,this),n.on(_.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.on(_.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.on(_.Events.FRAG_PARSED,this.onFragParsed,this),n.on(_.Events.FRAG_CHANGED,this.onFragChanged,this)},y.unregisterListeners=function(){var n=this.hls;n.off(_.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(_.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(_.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(_.Events.BUFFER_RESET,this.onBufferReset,this),n.off(_.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.off(_.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(_.Events.BUFFER_EOS,this.onBufferEos,this),n.off(_.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.off(_.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.off(_.Events.FRAG_PARSED,this.onFragParsed,this),n.off(_.Events.FRAG_CHANGED,this.onFragChanged,this)},y._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new r.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},y.onManifestParsed=function(n,s){var u=2;(s.audio&&!s.video||!s.altAudio)&&(u=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=u,this.details=null,g.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},y.onMediaAttaching=function(n,s){var u=this.media=s.media;if(u&&d){var w=this.mediaSource=new d;w.addEventListener("sourceopen",this._onMediaSourceOpen),w.addEventListener("sourceended",this._onMediaSourceEnded),w.addEventListener("sourceclose",this._onMediaSourceClose),u.src=self.URL.createObjectURL(w),this._objectUrl=u.src}},y.onMediaDetaching=function(){var n=this.media,s=this.mediaSource,u=this._objectUrl;if(s){if(g.logger.log("[buffer-controller]: media source detaching"),s.readyState==="open")try{s.endOfStream()}catch(w){g.logger.warn("[buffer-controller]: onMediaDetaching: "+w.message+" while calling endOfStream")}this.onBufferReset(),s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),n&&(u&&self.URL.revokeObjectURL(u),n.src===u?(n.removeAttribute("src"),n.load()):g.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(_.Events.MEDIA_DETACHED,void 0)},y.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(s){var u=n.sourceBuffer[s];try{u&&(n.removeBufferListeners(s),n.mediaSource&&n.mediaSource.removeSourceBuffer(u),n.sourceBuffer[s]=void 0)}catch(w){g.logger.warn("[buffer-controller]: Failed to reset the "+s+" buffer",w)}}),this._initSourceBuffer()},y.onBufferCodecs=function(n,s){var u=this,w=this.getSourceBufferTypes().length;if(Object.keys(s).forEach(function(v){if(w){var a=u.tracks[v];if(a&&typeof a.buffer.changeType=="function"){var R=s[v],D=R.codec,c=R.levelCodec,b=R.container,x=(a.levelCodec||a.codec).replace(f,"$1"),C=(c||D).replace(f,"$1");if(x!==C){var F=b+";codecs="+(c||D);u.appendChangeType(v,F)}}}else u.pendingTracks[v]=s[v]}),w)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},y.appendChangeType=function(n,s){var u=this,w=this.operationQueue,v={execute:function(){var R=u.sourceBuffer[n];R&&(g.logger.log("[buffer-controller]: changing "+n+" sourceBuffer type to "+s),R.changeType(s)),w.shiftAndExecuteNext(n)},onStart:function(){},onComplete:function(){},onError:function(R){g.logger.warn("[buffer-controller]: Failed to change "+n+" SourceBuffer type",R)}};w.append(v,n)},y.onBufferAppending=function(n,s){var u=this,w=this.hls,v=this.operationQueue,a=this.tracks,R=s.data,D=s.type,c=s.frag,b=s.part,x=s.chunkMeta,C=x.buffering[D],F=self.performance.now();C.start=F;var j=c.stats.buffering,k=b?b.stats.buffering:null;j.start===0&&(j.start=F),k&&k.start===0&&(k.start=F);var X=a.audio,G=D==="audio"&&x.id===1&&(X==null?void 0:X.container)==="audio/mpeg",W={execute:function(){if(C.executeStart=self.performance.now(),G){var B=u.sourceBuffer[D];if(B){var U=c.start-B.timestampOffset;Math.abs(U)>=.1&&(g.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+c.start+" (delta: "+U+") sn: "+c.sn+")"),B.timestampOffset=c.start)}}u.appendExecutor(R,D)},onStart:function(){},onComplete:function(){var B=self.performance.now();C.executeEnd=C.end=B,j.first===0&&(j.first=B),k&&k.first===0&&(k.first=B);var U=u.sourceBuffer,H={};for(var q in U)H[q]=p.BufferHelper.getBuffered(U[q]);u.appendError=0,u.hls.trigger(_.Events.BUFFER_APPENDED,{type:D,frag:c,part:b,chunkMeta:x,parent:c.type,timeRanges:H})},onError:function(B){g.logger.error("[buffer-controller]: Error encountered while trying to append to the "+D+" SourceBuffer",B);var U={type:S.ErrorTypes.MEDIA_ERROR,parent:c.type,details:S.ErrorDetails.BUFFER_APPEND_ERROR,err:B,fatal:!1};B.code===DOMException.QUOTA_EXCEEDED_ERR?U.details=S.ErrorDetails.BUFFER_FULL_ERROR:(u.appendError++,U.details=S.ErrorDetails.BUFFER_APPEND_ERROR,u.appendError>w.config.appendErrorMaxRetry&&(g.logger.error("[buffer-controller]: Failed "+w.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),U.fatal=!0)),w.trigger(_.Events.ERROR,U)}};v.append(W,D)},y.onBufferFlushing=function(n,s){var u=this,w=this.operationQueue,v=function(R){return{execute:u.removeExecutor.bind(u,R,s.startOffset,s.endOffset),onStart:function(){},onComplete:function(){u.hls.trigger(_.Events.BUFFER_FLUSHED,{type:R})},onError:function(c){g.logger.warn("[buffer-controller]: Failed to remove from "+R+" SourceBuffer",c)}}};s.type?w.append(v(s.type),s.type):this.getSourceBufferTypes().forEach(function(a){w.append(v(a),a)})},y.onFragParsed=function(n,s){var u=this,w=s.frag,v=s.part,a=[],R=v?v.elementaryStreams:w.elementaryStreams;R[i.ElementaryStreamTypes.AUDIOVIDEO]?a.push("audiovideo"):(R[i.ElementaryStreamTypes.AUDIO]&&a.push("audio"),R[i.ElementaryStreamTypes.VIDEO]&&a.push("video"));var D=function(){var b=self.performance.now();w.stats.buffering.end=b,v&&(v.stats.buffering.end=b);var x=v?v.stats:w.stats;u.hls.trigger(_.Events.FRAG_BUFFERED,{frag:w,part:v,stats:x,id:w.type})};a.length===0&&g.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+w.type+" level: "+w.level+" sn: "+w.sn),this.blockBuffers(D,a)},y.onFragChanged=function(n,s){this.flushBackBuffer()},y.onBufferEos=function(n,s){var u=this,w=this.getSourceBufferTypes().reduce(function(v,a){var R=u.sourceBuffer[a];return(!s.type||s.type===a)&&(R&&!R.ended&&(R.ended=!0,g.logger.log("[buffer-controller]: "+a+" sourceBuffer now EOS"))),v&&!!(!R||R.ended)},!0);w&&this.blockBuffers(function(){var v=u.mediaSource;if(!v||v.readyState!=="open")return;v.endOfStream()})},y.onLevelUpdated=function(n,s){var u=s.details;if(!u.fragments.length)return;this.details=u,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},y.flushBackBuffer=function(){var n=this.hls,s=this.details,u=this.media,w=this.sourceBuffer;if(!u||s===null)return;var v=this.getSourceBufferTypes();if(!v.length)return;var a=s.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(L.isFiniteNumber)(a)||a<0)return;var R=u.currentTime,D=s.levelTargetDuration,c=Math.max(a,D),b=Math.floor(R/D)*D-c;v.forEach(function(x){var C=w[x];if(C){var F=p.BufferHelper.getBuffered(C);F.length>0&&b>F.start(0)&&(n.trigger(_.Events.BACK_BUFFER_REACHED,{bufferEnd:b}),s.live&&n.trigger(_.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:b}),n.trigger(_.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:b,type:x}))}})},y.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,s=this.hls,u=this.media,w=this.mediaSource,v=n.fragments[0].start+n.totalduration,a=u.duration,R=Object(L.isFiniteNumber)(w.duration)?w.duration:0;n.live&&s.config.liveDurationInfinity?(g.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),w.duration=Infinity,this.updateSeekableRange(n)):(v>R&&v>a||!Object(L.isFiniteNumber)(a))&&(g.logger.log("[buffer-controller]: Updating Media Source duration to "+v.toFixed(3)),w.duration=v)},y.updateSeekableRange=function(n){var s=this.mediaSource,u=n.fragments,w=u.length;if(w&&n.live&&s!==null&&s!==void 0&&s.setLiveSeekableRange){var v=Math.max(0,u[0].start),a=Math.max(v,v+n.totalduration);s.setLiveSeekableRange(v,a)}},y.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,s=this.operationQueue,u=this.pendingTracks,w=Object.keys(u).length;if(w&&!n||w===2){this.createSourceBuffers(u),this.pendingTracks={};var v=this.getSourceBufferTypes();if(v.length===0){this.hls.trigger(_.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}v.forEach(function(a){s.executeNext(a)})}},y.createSourceBuffers=function(n){var s=this.sourceBuffer,u=this.mediaSource;if(!u)throw Error("createSourceBuffers called when mediaSource was null");var w=0;for(var v in n)if(!s[v]){var a=n[v];if(!a)throw Error("source buffer exists for track "+v+", however track does not");var R=a.levelCodec||a.codec,D=a.container+";codecs="+R;g.logger.log("[buffer-controller]: creating sourceBuffer("+D+")");try{var c=s[v]=u.addSourceBuffer(D),b=v;this.addBufferListener(b,"updatestart",this._onSBUpdateStart),this.addBufferListener(b,"updateend",this._onSBUpdateEnd),this.addBufferListener(b,"error",this._onSBUpdateError),this.tracks[v]={buffer:c,codec:R,container:a.container,levelCodec:a.levelCodec,id:a.id},w++}catch(x){g.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+x.message),this.hls.trigger(_.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:x,mimeType:D})}}w&&this.hls.trigger(_.Events.BUFFER_CREATED,{tracks:this.tracks})},y._onSBUpdateStart=function(n){var s=this.operationQueue,u=s.current(n);u.onStart()},y._onSBUpdateEnd=function(n){var s=this.operationQueue,u=s.current(n);u.onComplete(),s.shiftAndExecuteNext(n)},y._onSBUpdateError=function(n,s){g.logger.error("[buffer-controller]: "+n+" SourceBuffer error",s),this.hls.trigger(_.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var u=this.operationQueue.current(n);u&&u.onError(s)},y.removeExecutor=function(n,s,u){var w=this.media,v=this.mediaSource,a=this.operationQueue,R=this.sourceBuffer,D=R[n];if(!w||!v||!D){g.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),a.shiftAndExecuteNext(n);return}var c=Object(L.isFiniteNumber)(w.duration)?w.duration:Infinity,b=Object(L.isFiniteNumber)(v.duration)?v.duration:Infinity,x=Math.max(0,s),C=Math.min(u,c,b);C>x?(g.logger.log("[buffer-controller]: Removing ["+x+","+C+"] from the "+n+" SourceBuffer"),console.assert(!D.updating,n+" sourceBuffer must not be updating"),D.remove(x,C)):a.shiftAndExecuteNext(n)},y.appendExecutor=function(n,s){var u=this.operationQueue,w=this.sourceBuffer,v=w[s];if(!v){g.logger.warn("[buffer-controller]: Attempting to append to the "+s+" SourceBuffer, but it does not exist"),u.shiftAndExecuteNext(s);return}v.ended=!1,console.assert(!v.updating,s+" sourceBuffer must not be updating"),v.appendBuffer(n)},y.blockBuffers=function(n,s){var u=this;if(s===void 0&&(s=this.getSourceBufferTypes()),!s.length){g.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(n);return}var w=this.operationQueue,v=s.map(function(a){return w.appendBlocker(a)});Promise.all(v).then(function(){n(),s.forEach(function(a){var R=u.sourceBuffer[a];(!R||!R.updating)&&w.shiftAndExecuteNext(a)})})},y.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},y.addBufferListener=function(n,s,u){var w=this.sourceBuffer[n];if(!w)return;var v=u.bind(this,n);this.listeners[n].push({event:s,listener:v}),w.addEventListener(s,v)},y.removeBufferListeners=function(n){var s=this.sourceBuffer[n];if(!s)return;this.listeners[n].forEach(function(u){s.removeEventListener(u.event,u.listener)})},E}()},"./src/controller/buffer-operation-queue.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return _});var L=T("./src/utils/logger.ts"),_=function(){function g(p){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=p}var S=g.prototype;return S.append=function(o,i){var r=this.queues[i];r.push(o),r.length===1&&this.buffers[i]&&this.executeNext(i)},S.insertAbort=function(o,i){var r=this.queues[i];r.unshift(o),this.executeNext(i)},S.appendBlocker=function(o){var i,r=new Promise(function(f){i=f}),d={execute:i,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(d,o),r},S.executeNext=function(o){var i=this.buffers,r=this.queues,d=i[o],f=r[o];if(f.length){var h=f[0];try{h.execute()}catch(E){L.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),h.onError(E),(!d||!d.updating)&&(f.shift(),this.executeNext(o))}}},S.shiftAndExecuteNext=function(o){this.queues[o].shift(),this.executeNext(o)},S.current=function(o){return this.queues[o][0]},g}()},"./src/controller/cap-level-controller.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/events.ts");function _(p,o){for(var i=0;i<o.length;i++){var r=o[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(p,r.key,r)}}function g(p,o,i){return o&&_(p.prototype,o),i&&_(p,i),p}var S=function(){function p(i){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=i,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var o=p.prototype;return o.setStreamController=function(r){this.streamController=r},o.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},o.registerListeners=function(){var r=this.hls;r.on(L.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.on(L.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(L.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(L.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.on(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},o.unregisterListener=function(){var r=this.hls;r.off(L.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.off(L.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(L.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(L.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.off(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},o.onFpsDropLevelCapping=function(r,d){p.isLevelAllowed(d.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(d.droppedLevel)},o.onMediaAttaching=function(r,d){this.media=d.media instanceof HTMLVideoElement?d.media:null},o.onManifestParsed=function(r,d){var f=this.hls;this.restrictedLevels=[],this.firstLevel=d.firstLevel,f.config.capLevelToPlayerSize&&d.video&&this.startCapping()},o.onBufferCodecs=function(r,d){var f=this.hls;f.config.capLevelToPlayerSize&&d.video&&this.startCapping()},o.onMediaDetaching=function(){this.stopCapping()},o.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var r=this.hls.levels;if(r.length){var d=this.hls;d.autoLevelCapping=this.getMaxLevel(r.length-1),d.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=d.autoLevelCapping}}},o.getMaxLevel=function(r){var d=this,f=this.hls.levels;if(!f.length)return-1;var h=f.filter(function(E,y){return p.isLevelAllowed(y,d.restrictedLevels)&&y<=r});return this.clientRect=null,p.getMaxLevelByMediaSize(h,this.mediaWidth,this.mediaHeight)},o.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()},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},o.getDimensions=function(){if(this.clientRect)return this.clientRect;var r=this.media,d={width:0,height:0};if(r){var f=r.getBoundingClientRect();d.width=f.width,d.height=f.height,!d.width&&!d.height&&(d.width=f.right-f.left||r.width||0,d.height=f.bottom-f.top||r.height||0)}return this.clientRect=d,d},p.isLevelAllowed=function(r,d){return d===void 0&&(d=[]),d.indexOf(r)===-1},p.getMaxLevelByMediaSize=function(r,d,f){if(!r||!r.length)return-1;for(var h=function(s,u){return u?s.width!==u.width||s.height!==u.height:!0},E=r.length-1,y=0;y<r.length;y+=1){var l=r[y];if((l.width>=d||l.height>=f)&&h(l,r[y+1])){E=y;break}}return E},g(p,[{key:"mediaWidth",get:function(){return this.getDimensions().width*p.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*p.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var r=1;try{r=self.devicePixelRatio}catch(d){}return r}}]),p}();m.default=S},"./src/controller/cmcd-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return h});var L=T("./src/events.ts"),_=T("./src/types/cmcd.ts"),g=T("./src/utils/buffer-helper.ts"),S=T("./src/utils/logger.ts");function p(E,y){for(var l=0;l<y.length;l++){var n=y[l];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(E,n.key,n)}}function o(E,y,l){return y&&p(E.prototype,y),l&&p(E,l),E}function i(E,y){var l=typeof Symbol!="undefined"&&E[Symbol.iterator]||E["@@iterator"];if(l)return(l=l.call(E)).next.bind(l);if(Array.isArray(E)||(l=r(E))||y&&E&&typeof E.length=="number"){l&&(E=l);var n=0;return function(){return n>=E.length?{done:!0}:{done:!1,value:E[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r(E,y){if(!E)return;if(typeof E=="string")return d(E,y);var l=Object.prototype.toString.call(E).slice(8,-1);if(l==="Object"&&E.constructor&&(l=E.constructor.name),l==="Map"||l==="Set")return Array.from(E);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return d(E,y)}function d(E,y){(y==null||y>E.length)&&(y=E.length);for(var l=0,n=new Array(y);l<y;l++)n[l]=E[l];return n}function f(){return f=Object.assign||function(E){for(var y=1;y<arguments.length;y++){var l=arguments[y];for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(E[n]=l[n])}return E},f.apply(this,arguments)}var h=function(){function E(l){var n=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){n.initialized&&(n.starved=!0),n.buffering=!0},this.onPlaying=function(){n.initialized||(n.initialized=!0),n.buffering=!1},this.applyPlaylistData=function(w){try{n.apply(w,{ot:_.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(v){S.logger.warn("Could not generate manifest CMCD data.",v)}},this.applyFragmentData=function(w){try{var v=w.frag,a=n.hls.levels[v.level],R=n.getObjectType(v),D={d:v.duration*1e3,ot:R};(R===_.CMCDObjectType.VIDEO||R===_.CMCDObjectType.AUDIO||R==_.CMCDObjectType.MUXED)&&(D.br=a.bitrate/1e3,D.tb=n.getTopBandwidth(R),D.bl=n.getBufferLength(R)),n.apply(w,D)}catch(c){S.logger.warn("Could not generate segment CMCD data.",c)}},this.hls=l;var s=this.config=l.config,u=s.cmcd;u!=null&&(s.pLoader=this.createPlaylistLoader(),s.fLoader=this.createFragmentLoader(),this.sid=u.sessionId||E.uuid(),this.cid=u.contentId,this.useHeaders=u.useHeaders===!0,this.registerListeners())}var y=E.prototype;return y.registerListeners=function(){var n=this.hls;n.on(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(L.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.on(L.Events.BUFFER_CREATED,this.onBufferCreated,this)},y.unregisterListeners=function(){var n=this.hls;n.off(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(L.Events.MEDIA_DETACHED,this.onMediaDetached,this),n.off(L.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},y.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},y.onMediaAttached=function(n,s){this.media=s.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},y.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},y.onBufferCreated=function(n,s){var u,w;this.audioBuffer=(u=s.tracks.audio)===null||u===void 0?void 0:u.buffer,this.videoBuffer=(w=s.tracks.video)===null||w===void 0?void 0:w.buffer},y.createData=function(){var n;return{v:_.CMCDVersion,sf:_.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(n=this.media)===null||n===void 0?void 0:n.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},y.apply=function(n,s){s===void 0&&(s={}),f(s,this.createData());var u=s.ot===_.CMCDObjectType.INIT||s.ot===_.CMCDObjectType.VIDEO||s.ot===_.CMCDObjectType.MUXED;if(this.starved&&u&&(s.bs=!0,s.su=!0,this.starved=!1),s.su==null&&(s.su=this.buffering),this.useHeaders){var w=E.toHeaders(s);if(!Object.keys(w).length)return;n.headers||(n.headers={}),f(n.headers,w)}else{var v=E.toQuery(s);if(!v)return;n.url=E.appendQueryToUri(n.url,v)}},y.getObjectType=function(n){var s=n.type;return s==="subtitle"?_.CMCDObjectType.TIMED_TEXT:n.sn==="initSegment"?_.CMCDObjectType.INIT:s==="audio"?_.CMCDObjectType.AUDIO:s==="main"?this.hls.audioTracks.length?_.CMCDObjectType.VIDEO:_.CMCDObjectType.MUXED:void 0},y.getTopBandwidth=function(n){for(var s=0,u=n===_.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,w=i(u),v;!(v=w()).done;){var a=v.value;a.bitrate>s&&(s=a.bitrate)}return s>0?s:NaN},y.getBufferLength=function(n){var s=this.hls.media,u=n===_.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!u||!s)return NaN;var w=g.BufferHelper.bufferInfo(u,s.currentTime,this.config.maxBufferHole);return w.len*1e3},y.createPlaylistLoader=function(){var n=this.config.pLoader,s=this.applyPlaylistData,u=n||this.config.loader;return function(){function w(a){this.loader=void 0,this.loader=new u(a)}var v=w.prototype;return v.destroy=function(){this.loader.destroy()},v.abort=function(){this.loader.abort()},v.load=function(R,D,c){s(R),this.loader.load(R,D,c)},o(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},y.createFragmentLoader=function(){var n=this.config.fLoader,s=this.applyFragmentData,u=n||this.config.loader;return function(){function w(a){this.loader=void 0,this.loader=new u(a)}var v=w.prototype;return v.destroy=function(){this.loader.destroy()},v.abort=function(){this.loader.abort()},v.load=function(R,D,c){s(R),this.loader.load(R,D,c)},o(w,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),w}()},E.uuid=function(){var n=URL.createObjectURL(new Blob),s=n.toString();return URL.revokeObjectURL(n),s.substr(s.lastIndexOf("/")+1)},E.serialize=function(n){for(var s=[],u=function(G){return!Number.isNaN(G)&&G!=null&&G!==""&&G!==!1},w=function(G){return Math.round(G)},v=function(G){return w(G/100)*100},a=function(G){return encodeURIComponent(G)},R={br:w,d:w,bl:v,dl:v,mtp:v,nor:a,rtp:v,tb:w},D=Object.keys(n||{}).sort(),c=i(D),b;!(b=c()).done;){var x=b.value,C=n[x];if(!u(C))continue;if(x==="v"&&C===1)continue;if(x=="pr"&&C===1)continue;var F=R[x];F&&(C=F(C));var j=typeof C,k=void 0;x==="ot"||x==="sf"||x==="st"?k=x+"="+C:j==="boolean"?k=x:j==="number"?k=x+"="+C:k=x+"="+JSON.stringify(C),s.push(k)}return s.join(",")},E.toHeaders=function(n){for(var s=Object.keys(n),u={},w=["Object","Request","Session","Status"],v=[{},{},{},{}],a={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,D=s;R<D.length;R++){var c=D[R],b=a[c]!=null?a[c]:1;v[b][c]=n[c]}for(var x=0;x<v.length;x++){var C=E.serialize(v[x]);C&&(u["CMCD-"+w[x]]=C)}return u},E.toQuery=function(n){return"CMCD="+encodeURIComponent(E.serialize(n))},E.appendQueryToUri=function(n,s){if(!s)return n;var u=n.includes("?")?"&":"?";return""+n+u+s},E}()},"./src/controller/eme-controller.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/events.ts"),_=T("./src/errors.ts"),g=T("./src/utils/logger.ts"),S=T("./src/utils/mediakeys-helper.ts");function p(h,E){for(var y=0;y<E.length;y++){var l=E[y];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(h,l.key,l)}}function o(h,E,y){return E&&p(h.prototype,E),y&&p(h,y),h}var i=3,r=function(E,y,l){var n={audioCapabilities:[],videoCapabilities:[]};return E.forEach(function(s){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+s+'"',robustness:l.audioRobustness||""})}),y.forEach(function(s){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+s+'"',robustness:l.videoRobustness||""})}),[n]},d=function(E,y,l,n){switch(E){case S.KeySystems.WIDEVINE:return r(y,l,n);default:throw new Error("Unknown key-system: "+E)}},f=function(){function h(y){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=y,this._config=y.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 E=h.prototype;return E.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},E._registerListeners=function(){this.hls.on(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(L.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(L.Events.MANIFEST_PARSED,this.onManifestParsed,this)},E._unregisterListeners=function(){this.hls.off(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(L.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(L.Events.MANIFEST_PARSED,this.onManifestParsed,this)},E.getLicenseServerUrl=function(l){switch(l){case S.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+l+'"')},E._attemptKeySystemAccess=function(l,n,s){var u=this,w=d(l,n,s,this._drmSystemOptions);g.logger.log("Requesting encrypted media key-system access");var v=this.requestMediaKeySystemAccess(l,w);this.mediaKeysPromise=v.then(function(a){return u._onMediaKeySystemAccessObtained(l,a)}),v.catch(function(a){g.logger.error('Failed to obtain key-system "'+l+'" access:',a)})},E._onMediaKeySystemAccessObtained=function(l,n){var s=this;g.logger.log('Access for key-system "'+l+'" obtained');var u={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:n,mediaKeySystemDomain:l};this._mediaKeysList.push(u);var w=Promise.resolve().then(function(){return n.createMediaKeys()}).then(function(v){return u.mediaKeys=v,g.logger.log('Media-keys created for key-system "'+l+'"'),s._onMediaKeysCreated(),v});return w.catch(function(v){g.logger.error("Failed to create media-keys:",v)}),w},E._onMediaKeysCreated=function(){var l=this;this._mediaKeysList.forEach(function(n){n.mediaKeysSession||(n.mediaKeysSession=n.mediaKeys.createSession(),l._onNewMediaKeySession(n.mediaKeysSession))})},E._onNewMediaKeySession=function(l){var n=this;g.logger.log("New key-system session "+l.sessionId),l.addEventListener("message",function(s){n._onKeySessionMessage(l,s.message)},!1)},E._onKeySessionMessage=function(l,n){g.logger.log("Got EME message event, creating license request"),this._requestLicense(n,function(s){g.logger.log("Received license data (length: "+(s&&s.byteLength)+"), updating key-session"),l.update(s)})},E.onMediaEncrypted=function(l){var n=this;if(g.logger.log('Media is encrypted using "'+l.initDataType+'" init data type'),!this.mediaKeysPromise){g.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(L.Events.ERROR,{type:_.ErrorTypes.KEY_SYSTEM_ERROR,details:_.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var s=function(w){if(!n._media)return;n._attemptSetMediaKeys(w),n._generateRequestWithPreferredKeySession(l.initDataType,l.initData)};this.mediaKeysPromise.then(s).catch(s)},E._attemptSetMediaKeys=function(l){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var n=this._mediaKeysList[0];if(!n||!n.mediaKeys){g.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(L.Events.ERROR,{type:_.ErrorTypes.KEY_SYSTEM_ERROR,details:_.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}g.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(n.mediaKeys),this._hasSetMediaKeys=!0}},E._generateRequestWithPreferredKeySession=function(l,n){var s=this,u=this._mediaKeysList[0];if(!u){g.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(L.Events.ERROR,{type:_.ErrorTypes.KEY_SYSTEM_ERROR,details:_.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(u.mediaKeysSessionInitialized){g.logger.warn("Key-Session already initialized but requested again");return}var w=u.mediaKeysSession;if(!w){g.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(L.Events.ERROR,{type:_.ErrorTypes.KEY_SYSTEM_ERROR,details:_.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!n){g.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(L.Events.ERROR,{type:_.ErrorTypes.KEY_SYSTEM_ERROR,details:_.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}g.logger.log('Generating key-session request for "'+l+'" init data type'),u.mediaKeysSessionInitialized=!0,w.generateRequest(l,n).then(function(){g.logger.debug("Key-session generation succeeded")}).catch(function(v){g.logger.error("Error generating key-session request:",v),s.hls.trigger(L.Events.ERROR,{type:_.ErrorTypes.KEY_SYSTEM_ERROR,details:_.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},E._createLicenseXhr=function(l,n,s){var u=new XMLHttpRequest;u.responseType="arraybuffer",u.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,u,l,n,s);var w=this._licenseXhrSetup;if(w)try{w.call(this.hls,u,l),w=void 0}catch(v){g.logger.error(v)}try{u.readyState||u.open("POST",l,!0),w&&w.call(this.hls,u,l)}catch(v){throw new Error("issue setting up KeySystem license XHR "+v)}return u},E._onLicenseRequestReadyStageChange=function(l,n,s,u){switch(l.readyState){case 4:if(l.status===200){this._requestLicenseFailureCount=0,g.logger.log("License request succeeded");var w=l.response,v=this._licenseResponseCallback;if(v)try{w=v.call(this.hls,l,n)}catch(R){g.logger.error(R)}u(w)}else{if(g.logger.error("License Request XHR failed ("+n+"). Status: "+l.status+" ("+l.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>i){this.hls.trigger(L.Events.ERROR,{type:_.ErrorTypes.KEY_SYSTEM_ERROR,details:_.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var a=i-this._requestLicenseFailureCount+1;g.logger.warn("Retrying license request, "+a+" attempts left"),this._requestLicense(s,u)}break}},E._generateLicenseRequestChallenge=function(l,n){switch(l.mediaKeySystemDomain){case S.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+l.mediaKeySystemDomain)},E._requestLicense=function(l,n){g.logger.log("Requesting content license for key-system");var s=this._mediaKeysList[0];if(!s){g.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(L.Events.ERROR,{type:_.ErrorTypes.KEY_SYSTEM_ERROR,details:_.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var u=this.getLicenseServerUrl(s.mediaKeySystemDomain),w=this._createLicenseXhr(u,l,n);g.logger.log("Sending license request to URL: "+u);var v=this._generateLicenseRequestChallenge(s,l);w.send(v)}catch(a){g.logger.error("Failure requesting DRM license: "+a),this.hls.trigger(L.Events.ERROR,{type:_.ErrorTypes.KEY_SYSTEM_ERROR,details:_.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},E.onMediaAttached=function(l,n){if(!this._emeEnabled)return;var s=n.media;this._media=s,s.addEventListener("encrypted",this._onMediaEncrypted)},E.onMediaDetached=function(){var l=this._media,n=this._mediaKeysList;if(!l)return;l.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(n.map(function(s){if(s.mediaKeysSession)return s.mediaKeysSession.close().catch(function(){})})).then(function(){return l.setMediaKeys(null)}).catch(function(){})},E.onManifestParsed=function(l,n){if(!this._emeEnabled)return;var s=n.levels.map(function(w){return w.audioCodec}).filter(function(w){return!!w}),u=n.levels.map(function(w){return w.videoCodec}).filter(function(w){return!!w});this._attemptKeySystemAccess(S.KeySystems.WIDEVINE,s,u)},o(h,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),h}();m.default=f},"./src/controller/fps-controller.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/events.ts"),_=T("./src/utils/logger.ts"),g=function(){function S(o){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=o,this.registerListeners()}var p=S.prototype;return p.setStreamController=function(i){this.streamController=i},p.registerListeners=function(){this.hls.on(L.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},p.unregisterListeners=function(){this.hls.off(L.Events.MEDIA_ATTACHING,this.onMediaAttaching)},p.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},p.onMediaAttaching=function(i,r){var d=this.hls.config;if(d.capLevelOnFPSDrop){var f=r.media instanceof self.HTMLVideoElement?r.media:null;this.media=f,f&&typeof f.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),d.fpsDroppedMonitoringPeriod)}},p.checkFPS=function(i,r,d){var f=performance.now();if(r){if(this.lastTime){var h=f-this.lastTime,E=d-this.lastDroppedFrames,y=r-this.lastDecodedFrames,l=1e3*E/h,n=this.hls;if(n.trigger(L.Events.FPS_DROP,{currentDropped:E,currentDecoded:y,totalDroppedFrames:d}),l>0&&E>n.config.fpsDroppedMonitoringThreshold*y){var s=n.currentLevel;_.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+s),s>0&&(n.autoLevelCapping===-1||n.autoLevelCapping>=s)&&(s=s-1,n.trigger(L.Events.FPS_DROP_LEVEL_CAPPING,{level:s,droppedLevel:n.currentLevel}),n.autoLevelCapping=s,this.streamController.nextLevelSwitch())}}this.lastTime=f,this.lastDroppedFrames=d,this.lastDecodedFrames=r}},p.checkFPSInterval=function(){var i=this.media;if(i)if(this.isVideoPlaybackQualityAvailable){var r=i.getVideoPlaybackQuality();this.checkFPS(i,r.totalVideoFrames,r.droppedVideoFrames)}else this.checkFPS(i,i.webkitDecodedFrameCount,i.webkitDroppedFrameCount)},S}();m.default=g},"./src/controller/fragment-finders.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"findFragmentByPDT",function(){return g}),T.d(m,"findFragmentByPTS",function(){return S}),T.d(m,"fragmentWithinToleranceTest",function(){return p}),T.d(m,"pdtWithinToleranceTest",function(){return o}),T.d(m,"findFragWithCC",function(){return i});var L=T("./src/polyfills/number.ts"),_=T("./src/utils/binary-search.ts");function g(r,d,f){if(d===null||!Array.isArray(r)||!r.length||!Object(L.isFiniteNumber)(d))return null;var h=r[0].programDateTime;if(d<(h||0))return null;var E=r[r.length-1].endProgramDateTime;if(d>=(E||0))return null;f=f||0;for(var y=0;y<r.length;++y){var l=r[y];if(o(d,f,l))return l}return null}function S(r,d,f,h){f===void 0&&(f=0),h===void 0&&(h=0);var E=null;if(r?E=d[r.sn-d[0].sn+1]||null:f===0&&d[0].start===0&&(E=d[0]),E&&p(f,h,E)===0)return E;var y=_.default.search(d,p.bind(null,f,h));return y||E}function p(r,d,f){r===void 0&&(r=0),d===void 0&&(d=0);var h=Math.min(d,f.duration+(f.deltaPTS?f.deltaPTS:0));return f.start+f.duration-h<=r?1:f.start-h>r&&f.start?-1:0}function o(r,d,f){var h=Math.min(d,f.duration+(f.deltaPTS?f.deltaPTS:0))*1e3,E=f.endProgramDateTime||0;return E-h>r}function i(r,d){return _.default.search(r,function(f){return f.cc<d?1:f.cc>d?-1:0})}},"./src/controller/fragment-tracker.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"FragmentState",function(){return g}),T.d(m,"FragmentTracker",function(){return S});var L=T("./src/events.ts"),_=T("./src/types/loader.ts"),g;(function(i){i.NOT_LOADED="NOT_LOADED",i.BACKTRACKED="BACKTRACKED",i.APPENDING="APPENDING",i.PARTIAL="PARTIAL",i.OK="OK"})(g||(g={}));var S=function(){function i(d){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=d,this._registerListeners()}var r=i.prototype;return r._registerListeners=function(){var f=this.hls;f.on(L.Events.BUFFER_APPENDED,this.onBufferAppended,this),f.on(L.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.on(L.Events.FRAG_LOADED,this.onFragLoaded,this)},r._unregisterListeners=function(){var f=this.hls;f.off(L.Events.BUFFER_APPENDED,this.onBufferAppended,this),f.off(L.Events.FRAG_BUFFERED,this.onFragBuffered,this),f.off(L.Events.FRAG_LOADED,this.onFragLoaded,this)},r.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},r.getAppendedFrag=function(f,h){if(h===_.PlaylistLevelType.MAIN){var E=this.activeFragment,y=this.activeParts;if(!E)return null;if(y)for(var l=y.length;l--;){var n=y[l],s=n?n.end:E.appendedPTS;if(n.start<=f&&s!==void 0&&f<=s)return l>9&&(this.activeParts=y.slice(l-9)),n}else if(E.start<=f&&E.appendedPTS!==void 0&&f<=E.appendedPTS)return E}return this.getBufferedFrag(f,h)},r.getBufferedFrag=function(f,h){for(var E=this.fragments,y=Object.keys(E),l=y.length;l--;){var n=E[y[l]];if((n==null?void 0:n.body.type)===h&&n.buffered){var s=n.body;if(s.start<=f&&f<=s.end)return s}}return null},r.detectEvictedFragments=function(f,h,E){var y=this;Object.keys(this.fragments).forEach(function(l){var n=y.fragments[l];if(!n)return;if(!n.buffered){n.body.type===E&&y.removeFragment(n.body);return}var s=n.range[f];if(!s)return;s.time.some(function(u){var w=!y.isTimeBuffered(u.startPTS,u.endPTS,h);return w&&y.removeFragment(n.body),w})})},r.detectPartialFragments=function(f){var h=this,E=this.timeRanges,y=f.frag,l=f.part;if(!E||y.sn==="initSegment")return;var n=o(y),s=this.fragments[n];if(!s)return;Object.keys(E).forEach(function(u){var w=y.elementaryStreams[u];if(!w)return;var v=E[u],a=l!==null||w.partial===!0;s.range[u]=h.getBufferedTimes(y,l,a,v)}),s.backtrack=s.loaded=null,Object.keys(s.range).length?s.buffered=!0:this.removeFragment(s.body)},r.fragBuffered=function(f){var h=o(f),E=this.fragments[h];E&&(E.backtrack=E.loaded=null,E.buffered=!0)},r.getBufferedTimes=function(f,h,E,y){for(var l={time:[],partial:E},n=h?h.start:f.start,s=h?h.end:f.end,u=f.minEndPTS||s,w=f.maxStartPTS||n,v=0;v<y.length;v++){var a=y.start(v)-this.bufferPadding,R=y.end(v)+this.bufferPadding;if(w>=a&&u<=R){l.time.push({startPTS:Math.max(n,y.start(v)),endPTS:Math.min(s,y.end(v))});break}else if(n<R&&s>a)l.partial=!0,l.time.push({startPTS:Math.max(n,y.start(v)),endPTS:Math.min(s,y.end(v))});else if(s<=a)break}return l},r.getPartialFragment=function(f){var h=null,E,y,l,n=0,s=this.bufferPadding,u=this.fragments;return Object.keys(u).forEach(function(w){var v=u[w];if(!v)return;p(v)&&(y=v.body.start-s,l=v.body.end+s,f>=y&&f<=l&&(E=Math.min(f-y,l-f),n<=E&&(h=v.body,n=E)))}),h},r.getState=function(f){var h=o(f),E=this.fragments[h];return E?E.buffered?p(E)?g.PARTIAL:g.OK:E.backtrack?g.BACKTRACKED:g.APPENDING:g.NOT_LOADED},r.backtrack=function(f,h){var E=o(f),y=this.fragments[E];if(!y||y.backtrack)return null;var l=y.backtrack=h||y.loaded;return y.loaded=null,l},r.getBacktrackData=function(f){var h=o(f),E=this.fragments[h];if(E){var y,l=E.backtrack;if(l!=null&&(y=l.payload)!==null&&y!==void 0&&y.byteLength)return l;this.removeFragment(f)}return null},r.isTimeBuffered=function(f,h,E){for(var y,l,n=0;n<E.length;n++){if(y=E.start(n)-this.bufferPadding,l=E.end(n)+this.bufferPadding,f>=y&&h<=l)return!0;if(h<=y)return!1}return!1},r.onFragLoaded=function(f,h){var E=h.frag,y=h.part;if(E.sn==="initSegment"||E.bitrateTest||y)return;var l=o(E);this.fragments[l]={body:E,loaded:h,backtrack:null,buffered:!1,range:Object.create(null)}},r.onBufferAppended=function(f,h){var E=this,y=h.frag,l=h.part,n=h.timeRanges;if(y.type===_.PlaylistLevelType.MAIN)if(this.activeFragment=y,l){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(l)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(u){var w=n[u];if(E.detectEvictedFragments(u,w),!l)for(var v=0;v<w.length;v++)y.appendedPTS=Math.max(w.end(v),y.appendedPTS||0)})},r.onFragBuffered=function(f,h){this.detectPartialFragments(h)},r.hasFragment=function(f){var h=o(f);return!!this.fragments[h]},r.removeFragmentsInRange=function(f,h,E){var y=this;Object.keys(this.fragments).forEach(function(l){var n=y.fragments[l];if(!n)return;if(n.buffered){var s=n.body;s.type===E&&s.start<h&&s.end>f&&y.removeFragment(s)}})},r.removeFragment=function(f){var h=o(f);f.stats.loaded=0,f.clearElementaryStreamInfo(),delete this.fragments[h]},r.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},i}();function p(i){var r,d;return i.buffered&&(((r=i.range.video)===null||r===void 0?void 0:r.partial)||((d=i.range.audio)===null||d===void 0?void 0:d.partial))}function o(i){return i.type+"_"+i.level+"_"+i.urlId+"_"+i.sn}},"./src/controller/gap-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"STALL_MINIMUM_DURATION_MS",function(){return p}),T.d(m,"MAX_START_GAP_JUMP",function(){return o}),T.d(m,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return i}),T.d(m,"SKIP_BUFFER_RANGE_START",function(){return r}),T.d(m,"default",function(){return d});var L=T("./src/utils/buffer-helper.ts"),_=T("./src/errors.ts"),g=T("./src/events.ts"),S=T("./src/utils/logger.ts"),p=250,o=2,i=.1,r=.05,d=function(){function f(E,y,l,n){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=E,this.media=y,this.fragmentTracker=l,this.hls=n}var h=f.prototype;return h.destroy=function(){this.hls=this.fragmentTracker=this.media=null},h.poll=function(y){var l=this.config,n=this.media,s=this.stalled,u=n.currentTime,w=n.seeking,v=this.seeking&&!w,a=!this.seeking&&w;if(this.seeking=w,u!==y){if(this.moved=!0,s!==null){if(this.stallReported){var R=self.performance.now()-s;S.logger.warn("playback not stuck anymore @"+u+", after "+Math.round(R)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((a||v)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!L.BufferHelper.getBuffered(n).length)return;var D=L.BufferHelper.bufferInfo(n,u,0),c=D.len>0,b=D.nextStart||0;if(!c&&!b)return;if(w){var x=D.len>o,C=!b||b-u>o&&!this.fragmentTracker.getPartialFragment(u);if(x||C)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var F,j=Math.max(b,D.start||0)-u,k=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,X=k==null||((F=k.details)===null||F===void 0)?void 0:F.live,G=X?k.details.targetduration*2:o;if(j>0&&j<=G){this._trySkipBufferHole(null);return}}var W=self.performance.now();if(s===null){this.stalled=W;return}var K=W-s;!w&&K>=p&&this._reportStall(D.len);var B=L.BufferHelper.bufferInfo(n,u,l.maxBufferHole);this._tryFixBufferStall(B,K)},h._tryFixBufferStall=function(y,l){var n=this.config,s=this.fragmentTracker,u=this.media,w=u.currentTime,v=s.getPartialFragment(w);if(v){var a=this._trySkipBufferHole(v);if(a)return}y.len>n.maxBufferHole&&l>n.highBufferWatchdogPeriod*1e3&&(S.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},h._reportStall=function(y){var l=this.hls,n=this.media,s=this.stallReported;s||(this.stallReported=!0,S.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+y+")"),l.trigger(g.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:y}))},h._trySkipBufferHole=function(y){for(var l=this.config,n=this.hls,s=this.media,u=s.currentTime,w=0,v=L.BufferHelper.getBuffered(s),a=0;a<v.length;a++){var R=v.start(a);if(u+l.maxBufferHole>=w&&u<R){var D=Math.max(R+r,s.currentTime+i);return S.logger.warn("skipping hole, adjusting currentTime from "+u+" to "+D),this.moved=!0,this.stalled=null,s.currentTime=D,y&&n.trigger(g.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+u+" to "+D,frag:y}),D}w=v.end(a)}return 0},h._tryNudgeBuffer=function(){var y=this.config,l=this.hls,n=this.media,s=n.currentTime,u=(this.nudgeRetry||0)+1;if(this.nudgeRetry=u,u<y.nudgeMaxRetry){var w=s+u*y.nudgeOffset;S.logger.warn("Nudging 'currentTime' from "+s+" to "+w),n.currentTime=w,l.trigger(g.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else S.logger.error("Playhead still not moving while enough data buffered @"+s+" after "+y.nudgeMaxRetry+" nudges"),l.trigger(g.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},f}()},"./src/controller/id3-track-controller.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/events.ts"),_=T("./src/utils/texttrack-utils.ts"),g=T("./src/demux/id3.ts"),S=.25,p=function(){function o(r){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=r,this._registerListeners()}var i=o.prototype;return i.destroy=function(){this._unregisterListeners()},i._registerListeners=function(){var d=this.hls;d.on(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.on(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.on(L.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),d.on(L.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},i._unregisterListeners=function(){var d=this.hls;d.off(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.off(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.off(L.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),d.off(L.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},i.onMediaAttached=function(d,f){this.media=f.media},i.onMediaDetaching=function(){if(!this.id3Track)return;Object(_.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},i.getID3Track=function(d){if(!this.media)return;for(var f=0;f<d.length;f++){var h=d[f];if(h.kind==="metadata"&&h.label==="id3")return Object(_.sendAddTrackEvent)(h,this.media),h}return this.media.addTextTrack("metadata","id3")},i.onFragParsingMetadata=function(d,f){if(!this.media)return;var h=f.frag,E=f.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var y=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,l=0;l<E.length;l++){var n=g.getID3Frames(E[l].data);if(n){var s=E[l].pts,u=l<E.length-1?E[l+1].pts:h.end,w=u-s;w<=0&&(u=s+S);for(var v=0;v<n.length;v++){var a=n[v];if(!g.isTimeStampFrame(a)){var R=new y(s,u,"");R.value=a,this.id3Track.addCue(R)}}}}},i.onBufferFlushing=function(d,f){var h=f.startOffset,E=f.endOffset,y=f.type;if(!y||y==="audio"){var l=this.id3Track;l&&Object(_.removeCuesInRange)(l,h,E)}},o}();m.default=p},"./src/controller/latency-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return o});var L=T("./src/errors.ts"),_=T("./src/events.ts"),g=T("./src/utils/logger.ts");function S(i,r){for(var d=0;d<r.length;d++){var f=r[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(i,f.key,f)}}function p(i,r,d){return r&&S(i.prototype,r),d&&S(i,d),i}var o=function(){function i(d){var f=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 f.timeupdate()},this.hls=d,this.config=d.config,this.registerListeners()}var r=i.prototype;return r.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},r.registerListeners=function(){this.hls.on(_.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(_.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(_.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(_.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(_.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){this.hls.off(_.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(_.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(_.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(_.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(_.Events.ERROR,this.onError)},r.onMediaAttached=function(f,h){this.media=h.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},r.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},r.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},r.onLevelUpdated=function(f,h){var E=h.details;this.levelDetails=E,E.advanced&&this.timeupdate(),!E.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},r.onError=function(f,h){if(h.details!==L.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,g.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},r.timeupdate=function(){var f=this.media,h=this.levelDetails;if(!f||!h)return;this.currentTime=f.currentTime;var E=this.computeLatency();if(E===null)return;this._latency=E;var y=this.config,l=y.lowLatencyMode,n=y.maxLiveSyncPlaybackRate;if(!l||n===1)return;var s=this.targetLatency;if(s===null)return;var u=E-s,w=Math.min(this.maxLatency,s+h.targetduration),v=u<w;if(h.live&&v&&u>.05&&this.forwardBufferLength>1){var a=Math.min(2,Math.max(1,n)),R=Math.round(2/(1+Math.exp(-.75*u-this.edgeStalled))*20)/20;f.playbackRate=Math.min(a,Math.max(1,R))}else f.playbackRate!==1&&f.playbackRate!==0&&(f.playbackRate=1)},r.estimateLiveEdge=function(){var f=this.levelDetails;return f===null?null:f.edge+f.age},r.computeLatency=function(){var f=this.estimateLiveEdge();return f===null?null:f-this.currentTime},p(i,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var f=this.config,h=this.levelDetails;return f.liveMaxLatencyDuration!==void 0?f.liveMaxLatencyDuration:h?f.liveMaxLatencyDurationCount*h.targetduration:0}},{key:"targetLatency",get:function(){var f=this.levelDetails;if(f===null)return null;var h=f.holdBack,E=f.partHoldBack,y=f.targetduration,l=this.config,n=l.liveSyncDuration,s=l.liveSyncDurationCount,u=l.lowLatencyMode,w=this.hls.userConfig,v=u&&E||h;(w.liveSyncDuration||w.liveSyncDurationCount||v===0)&&(v=n!==void 0?n:s*y);var a=y,R=1;return v+Math.min(this.stallCount*R,a)}},{key:"liveSyncPosition",get:function(){var f=this.estimateLiveEdge(),h=this.targetLatency,E=this.levelDetails;if(f===null||h===null||E===null)return null;var y=E.edge,l=f-h-this.edgeStalled,n=y-E.totalduration,s=y-(this.config.lowLatencyMode&&E.partTarget||E.targetduration);return Math.min(Math.max(n,l),s)}},{key:"drift",get:function(){var f=this.levelDetails;return f===null?1:f.drift}},{key:"edgeStalled",get:function(){var f=this.levelDetails;if(f===null)return 0;var h=(this.config.lowLatencyMode&&f.partTarget||f.targetduration)*3;return Math.max(f.age-h,0)}},{key:"forwardBufferLength",get:function(){var f=this.media,h=this.levelDetails;if(!f||!h)return 0;var E=f.buffered.length;return E?f.buffered.end(E-1):h.edge-this.currentTime}}]),i}()},"./src/controller/level-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return l});var L=T("./src/types/level.ts"),_=T("./src/events.ts"),g=T("./src/errors.ts"),S=T("./src/utils/codecs.ts"),p=T("./src/controller/level-helper.ts"),o=T("./src/controller/base-playlist-controller.ts"),i=T("./src/types/loader.ts");function r(){return r=Object.assign||function(n){for(var s=1;s<arguments.length;s++){var u=arguments[s];for(var w in u)Object.prototype.hasOwnProperty.call(u,w)&&(n[w]=u[w])}return n},r.apply(this,arguments)}function d(n,s){for(var u=0;u<s.length;u++){var w=s[u];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(n,w.key,w)}}function f(n,s,u){return s&&d(n.prototype,s),u&&d(n,u),n}function h(n,s){n.prototype=Object.create(s.prototype),n.prototype.constructor=n,E(n,s)}function E(n,s){return E=Object.setPrototypeOf||function(w,v){return w.__proto__=v,w},E(n,s)}var y=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),l=function(n){h(s,n);function s(w){var v;return v=n.call(this,w,"[level-controller]")||this,v._levels=[],v._firstLevel=-1,v._startLevel=void 0,v.currentLevelIndex=-1,v.manualLevelIndex=-1,v.onParsedComplete=void 0,v._registerListeners(),v}var u=s.prototype;return u._registerListeners=function(){var v=this.hls;v.on(_.Events.MANIFEST_LOADED,this.onManifestLoaded,this),v.on(_.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.on(_.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.on(_.Events.FRAG_LOADED,this.onFragLoaded,this),v.on(_.Events.ERROR,this.onError,this)},u._unregisterListeners=function(){var v=this.hls;v.off(_.Events.MANIFEST_LOADED,this.onManifestLoaded,this),v.off(_.Events.LEVEL_LOADED,this.onLevelLoaded,this),v.off(_.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),v.off(_.Events.FRAG_LOADED,this.onFragLoaded,this),v.off(_.Events.ERROR,this.onError,this)},u.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,n.prototype.destroy.call(this)},u.startLoad=function(){var v=this._levels;v.forEach(function(a){a.loadError=0}),n.prototype.startLoad.call(this)},u.onManifestLoaded=function(v,a){var R=[],D=[],c=[],b,x={},C,F=!1,j=!1,k=!1;if(a.levels.forEach(function(K){var B=K.attrs;F=F||!!(K.width&&K.height),j=j||!!K.videoCodec,k=k||!!K.audioCodec,y&&K.audioCodec&&K.audioCodec.indexOf("mp4a.40.34")!==-1&&(K.audioCodec=void 0);var U=K.bitrate+"-"+K.attrs.RESOLUTION+"-"+K.attrs.CODECS;C=x[U],C?C.url.push(K.url):(C=new L.Level(K),x[U]=C,R.push(C)),B&&(B.AUDIO&&Object(p.addGroupId)(C,"audio",B.AUDIO),B.SUBTITLES&&Object(p.addGroupId)(C,"text",B.SUBTITLES))}),(F||j)&&k&&(R=R.filter(function(K){var B=K.videoCodec,U=K.width,H=K.height;return!!B||!!(U&&H)})),R=R.filter(function(K){var B=K.audioCodec,U=K.videoCodec;return(!B||Object(S.isCodecSupportedInMp4)(B,"audio"))&&(!U||Object(S.isCodecSupportedInMp4)(U,"video"))}),a.audioTracks&&(D=a.audioTracks.filter(function(K){return!K.audioCodec||Object(S.isCodecSupportedInMp4)(K.audioCodec,"audio")}),Object(p.assignTrackIdsByGroup)(D)),a.subtitles&&(c=a.subtitles,Object(p.assignTrackIdsByGroup)(c)),R.length>0){b=R[0].bitrate,R.sort(function(K,B){return K.bitrate-B.bitrate}),this._levels=R;for(var X=0;X<R.length;X++)if(R[X].bitrate===b){this._firstLevel=X,this.log("manifest loaded, "+R.length+" level(s) found, first bitrate: "+b);break}var G=k&&!j,W={levels:R,audioTracks:D,subtitleTracks:c,firstLevel:this._firstLevel,stats:a.stats,audio:k,video:j,altAudio:!G&&D.some(function(K){return!!K.url})};this.hls.trigger(_.Events.MANIFEST_PARSED,W),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(_.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:a.url,reason:"no level with compatible codecs found in manifest"})},u.onError=function(v,a){if(n.prototype.onError.call(this,v,a),a.fatal)return;var R=a.context,D=this._levels[this.currentLevelIndex];if(R&&(R.type===i.PlaylistContextType.AUDIO_TRACK&&D.audioGroupIds&&R.groupId===D.audioGroupIds[D.urlId]||R.type===i.PlaylistContextType.SUBTITLE_TRACK&&D.textGroupIds&&R.groupId===D.textGroupIds[D.urlId])){this.redundantFailover(this.currentLevelIndex);return}var c=!1,b=!0,x;switch(a.details){case g.ErrorDetails.FRAG_LOAD_ERROR:case g.ErrorDetails.FRAG_LOAD_TIMEOUT:case g.ErrorDetails.KEY_LOAD_ERROR:case g.ErrorDetails.KEY_LOAD_TIMEOUT:if(a.frag){var C=this._levels[a.frag.level];C?(C.fragmentError++,C.fragmentError>this.hls.config.fragLoadingMaxRetry&&(x=a.frag.level)):x=a.frag.level}break;case g.ErrorDetails.LEVEL_LOAD_ERROR:case g.ErrorDetails.LEVEL_LOAD_TIMEOUT:R&&(R.deliveryDirectives&&(b=!1),x=R.level),c=!0;break;case g.ErrorDetails.REMUX_ALLOC_ERROR:x=a.level,c=!0;break}x!==void 0&&this.recoverLevel(a,x,c,b)},u.recoverLevel=function(v,a,R,D){var c=v.details,b=this._levels[a];if(b.loadError++,R){var x=this.retryLoadingOrFail(v);if(x)v.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(D){var C=b.url.length;if(C>1&&b.loadError<C)v.levelRetry=!0,this.redundantFailover(a);else if(this.manualLevelIndex===-1){var F=a===0?this._levels.length-1:a-1;this.currentLevelIndex!==F&&this._levels[F].loadError===0&&(this.warn(c+": switch to "+F),v.levelRetry=!0,this.hls.nextAutoLevel=F)}}},u.redundantFailover=function(v){var a=this._levels[v],R=a.url.length;if(R>1){var D=(a.urlId+1)%R;this.warn("Switching to redundant URL-id "+D),this._levels.forEach(function(c){c.urlId=D}),this.level=v}},u.onFragLoaded=function(v,a){var R=a.frag;if(R!==void 0&&R.type===i.PlaylistLevelType.MAIN){var D=this._levels[R.level];D!==void 0&&(D.fragmentError=0,D.loadError=0)}},u.onLevelLoaded=function(v,a){var R,D=a.level,c=a.details,b=this._levels[D];if(!b){var x;this.warn("Invalid level index "+D),(x=a.deliveryDirectives)!==null&&x!==void 0&&x.skip&&(c.deltaUpdateFailed=!0);return}D===this.currentLevelIndex?(b.fragmentError===0&&(b.loadError=0,this.retryCount=0),this.playlistLoaded(D,a,b.details)):(R=a.deliveryDirectives)!==null&&R!==void 0&&R.skip&&(c.deltaUpdateFailed=!0)},u.onAudioTrackSwitched=function(v,a){var R=this.hls.levels[this.currentLevelIndex];if(!R)return;if(R.audioGroupIds){for(var D=-1,c=this.hls.audioTracks[a.id].groupId,b=0;b<R.audioGroupIds.length;b++)if(R.audioGroupIds[b]===c){D=b;break}D!==R.urlId&&(R.urlId=D,this.startLoad())}},u.loadPlaylist=function(v){var a=this.currentLevelIndex,R=this._levels[a];if(this.canLoad&&R&&R.url.length>0){var D=R.urlId,c=R.url[D];if(v)try{c=v.addDirectives(c)}catch(b){this.warn("Could not construct new URL with HLS Delivery Directives: "+b)}this.log("Attempt loading level index "+a+(v?" at sn "+v.msn+" part "+v.part:"")+" with URL-id "+D+" "+c),this.clearTimer(),this.hls.trigger(_.Events.LEVEL_LOADING,{url:c,level:a,id:D,deliveryDirectives:v||null})}},u.removeLevel=function(v,a){var R=function(b,x){return x!==a},D=this._levels.filter(function(c,b){return b!==v?!0:c.url.length>1&&a!==void 0?(c.url=c.url.filter(R),c.audioGroupIds&&(c.audioGroupIds=c.audioGroupIds.filter(R)),c.textGroupIds&&(c.textGroupIds=c.textGroupIds.filter(R)),c.urlId=0,!0):!1}).map(function(c,b){var x=c.details;return x!=null&&x.fragments&&x.fragments.forEach(function(C){C.level=b}),c});this._levels=D,this.hls.trigger(_.Events.LEVELS_UPDATED,{levels:D})},f(s,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(v){var a,R=this._levels;if(R.length===0)return;if(this.currentLevelIndex===v&&(a=R[v])!==null&&a!==void 0&&a.details)return;if(v<0||v>=R.length){var D=v<0;if(this.hls.trigger(_.Events.ERROR,{type:g.ErrorTypes.OTHER_ERROR,details:g.ErrorDetails.LEVEL_SWITCH_ERROR,level:v,fatal:D,reason:"invalid level idx"}),D)return;v=Math.min(v,R.length-1)}this.clearTimer();var c=this.currentLevelIndex,b=R[c],x=R[v];this.log("switching to level "+v+" from "+c),this.currentLevelIndex=v;var C=r({},x,{level:v,maxBitrate:x.maxBitrate,uri:x.uri,urlId:x.urlId});delete C._urlId,this.hls.trigger(_.Events.LEVEL_SWITCHING,C);var F=x.details;if(!F||F.live){var j=this.switchParams(x.uri,b==null?void 0:b.details);this.loadPlaylist(j)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(v){this.manualLevelIndex=v,this._startLevel===void 0&&(this._startLevel=v),v!==-1&&(this.level=v)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(v){this._firstLevel=v}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var v=this.hls.config.startLevel;return v!==void 0?v:this._firstLevel}else return this._startLevel},set:function(v){this._startLevel=v}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(v){this.level=v,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=v)}}]),s}(o.default)},"./src/controller/level-helper.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"addGroupId",function(){return g}),T.d(m,"assignTrackIdsByGroup",function(){return S}),T.d(m,"updatePTS",function(){return p}),T.d(m,"updateFragPTSDTS",function(){return i}),T.d(m,"mergeDetails",function(){return r}),T.d(m,"mapPartIntersection",function(){return d}),T.d(m,"mapFragmentIntersection",function(){return f}),T.d(m,"adjustSliding",function(){return h}),T.d(m,"addSliding",function(){return E}),T.d(m,"computeReloadInterval",function(){return y}),T.d(m,"getFragmentWithSN",function(){return l}),T.d(m,"getPartWith",function(){return n});var L=T("./src/polyfills/number.ts"),_=T("./src/utils/logger.ts");function g(s,u,w){switch(u){case"audio":s.audioGroupIds||(s.audioGroupIds=[]),s.audioGroupIds.push(w);break;case"text":s.textGroupIds||(s.textGroupIds=[]),s.textGroupIds.push(w);break}}function S(s){var u={};s.forEach(function(w){var v=w.groupId||"";w.id=u[v]=u[v]||0,u[v]++})}function p(s,u,w){var v=s[u],a=s[w];o(v,a)}function o(s,u){var w=u.startPTS;if(Object(L.isFiniteNumber)(w)){var v=0,a;u.sn>s.sn?(v=w-s.start,a=s):(v=s.start-w,a=u),a.duration!==v&&(a.duration=v)}else if(u.sn>s.sn){var R=s.cc===u.cc;R&&s.minEndPTS?u.start=s.start+(s.minEndPTS-s.start):u.start=s.start+s.duration}else u.start=Math.max(s.start-u.duration,0)}function i(s,u,w,v,a,R){var D=v-w;D<=0&&(_.logger.warn("Fragment should have a positive duration",u),v=w+u.duration,R=a+u.duration);var c=w,b=v,x=u.startPTS,C=u.endPTS;if(Object(L.isFiniteNumber)(x)){var F=Math.abs(x-w);Object(L.isFiniteNumber)(u.deltaPTS)?u.deltaPTS=Math.max(F,u.deltaPTS):u.deltaPTS=F,c=Math.max(w,x),w=Math.min(w,x),a=Math.min(a,u.startDTS),b=Math.min(v,C),v=Math.max(v,C),R=Math.max(R,u.endDTS)}u.duration=v-w;var j=w-u.start;u.appendedPTS=v,u.start=u.startPTS=w,u.maxStartPTS=c,u.startDTS=a,u.endPTS=v,u.minEndPTS=b,u.endDTS=R;var k=u.sn;if(!s||k<s.startSN||k>s.endSN)return 0;var X,G=k-s.startSN,W=s.fragments;for(W[G]=u,X=G;X>0;X--)o(W[X],W[X-1]);for(X=G;X<W.length-1;X++)o(W[X],W[X+1]);return s.fragmentHint&&o(W[W.length-1],s.fragmentHint),s.PTSKnown=s.alignedSliding=!0,j}function r(s,u){for(var w=null,v=s.fragments,a=v.length-1;a>=0;a--){var R=v[a].initSegment;if(R){w=R;break}}s.fragmentHint&&delete s.fragmentHint.endPTS;var D=0,c;if(f(s,u,function(X,G){X.relurl&&(D=X.cc-G.cc),Object(L.isFiniteNumber)(X.startPTS)&&Object(L.isFiniteNumber)(X.endPTS)&&(G.start=G.startPTS=X.startPTS,G.startDTS=X.startDTS,G.appendedPTS=X.appendedPTS,G.maxStartPTS=X.maxStartPTS,G.endPTS=X.endPTS,G.endDTS=X.endDTS,G.minEndPTS=X.minEndPTS,G.duration=X.endPTS-X.startPTS,G.duration&&(c=G),u.PTSKnown=u.alignedSliding=!0),G.elementaryStreams=X.elementaryStreams,G.loader=X.loader,G.stats=X.stats,G.urlId=X.urlId,X.initSegment&&(G.initSegment=X.initSegment,w=X.initSegment)}),w){var b=u.fragmentHint?u.fragments.concat(u.fragmentHint):u.fragments;b.forEach(function(X){var G;(!X.initSegment||X.initSegment.relurl===((G=w)===null||G===void 0?void 0:G.relurl))&&(X.initSegment=w)})}if(u.skippedSegments&&(u.deltaUpdateFailed=u.fragments.some(function(X){return!X}),u.deltaUpdateFailed)){_.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var x=u.skippedSegments;x--;)u.fragments.shift();u.startSN=u.fragments[0].sn,u.startCC=u.fragments[0].cc}var C=u.fragments;if(D){_.logger.warn("discontinuity sliding from playlist, take drift into account");for(var F=0;F<C.length;F++)C[F].cc+=D}u.skippedSegments&&(u.startCC=u.fragments[0].cc),d(s.partList,u.partList,function(X,G){G.elementaryStreams=X.elementaryStreams,G.stats=X.stats}),c?i(u,c,c.startPTS,c.endPTS,c.startDTS,c.endDTS):h(s,u),C.length&&(u.totalduration=u.edge-C[0].start),u.driftStartTime=s.driftStartTime,u.driftStart=s.driftStart;var j=u.advancedDateTime;if(u.advanced&&j){var k=u.edge;u.driftStart||(u.driftStartTime=j,u.driftStart=k),u.driftEndTime=j,u.driftEnd=k}else u.driftEndTime=s.driftEndTime,u.driftEnd=s.driftEnd,u.advancedDateTime=s.advancedDateTime}function d(s,u,w){if(s&&u)for(var v=0,a=0,R=s.length;a<=R;a++){var D=s[a],c=u[a+v];D&&c&&D.index===c.index&&D.fragment.sn===c.fragment.sn?w(D,c):v--}}function f(s,u,w){for(var v=u.skippedSegments,a=Math.max(s.startSN,u.startSN)-u.startSN,R=(s.fragmentHint?1:0)+(v?u.endSN:Math.min(s.endSN,u.endSN))-u.startSN,D=u.startSN-s.startSN,c=u.fragmentHint?u.fragments.concat(u.fragmentHint):u.fragments,b=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments,x=a;x<=R;x++){var C=b[D+x],F=c[x];v&&!F&&x<v&&(F=u.fragments[x]=C),C&&F&&w(C,F)}}function h(s,u){var w=u.startSN+u.skippedSegments-s.startSN,v=s.fragments;if(w<0||w>=v.length)return;E(u,v[w].start)}function E(s,u){if(u){for(var w=s.fragments,v=s.skippedSegments;v<w.length;v++)w[v].start+=u;s.fragmentHint&&(s.fragmentHint.start+=u)}}function y(s,u){var w=1e3*s.levelTargetDuration,v=w/2,a=s.age,R=a>0&&a<w*3,D=u.loading.end-u.loading.start,c,b=s.availabilityDelay;if(s.updated===!1)if(R){var x=333*s.misses;c=Math.max(Math.min(v,D*2),x),s.availabilityDelay=(s.availabilityDelay||0)+c}else c=v;else R?(b=Math.min(b||w/2,a),s.availabilityDelay=b,c=b+w-a):c=w-D;return Math.round(c)}function l(s,u,w){if(!s||!s.details)return null;var v=s.details,a=v.fragments[u-v.startSN];return a||(a=v.fragmentHint,a&&a.sn===u?a:u<v.startSN&&w&&w.sn===u?w:null)}function n(s,u,w){if(!s||!s.details)return null;var v=s.details.partList;if(v)for(var a=v.length;a--;){var R=v[a];if(R.index===w&&R.fragment.sn===u)return R}return null}},"./src/controller/stream-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return v});var L=T("./src/polyfills/number.ts"),_=T("./src/controller/base-stream-controller.ts"),g=T("./src/is-supported.ts"),S=T("./src/events.ts"),p=T("./src/utils/buffer-helper.ts"),o=T("./src/controller/fragment-tracker.ts"),i=T("./src/types/loader.ts"),r=T("./src/loader/fragment.ts"),d=T("./src/demux/transmuxer-interface.ts"),f=T("./src/types/transmuxer.ts"),h=T("./src/controller/gap-controller.ts"),E=T("./src/errors.ts"),y=T("./src/utils/logger.ts");function l(a,R){for(var D=0;D<R.length;D++){var c=R[D];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}}function n(a,R,D){return R&&l(a.prototype,R),D&&l(a,D),a}function s(a,R){a.prototype=Object.create(R.prototype),a.prototype.constructor=a,u(a,R)}function u(a,R){return u=Object.setPrototypeOf||function(c,b){return c.__proto__=b,c},u(a,R)}var w=100,v=function(a){s(R,a);function R(c,b){var x;return x=a.call(this,c,b,"[stream-controller]")||this,x.audioCodecSwap=!1,x.gapController=null,x.level=-1,x._forceStartLoad=!1,x.altAudio=!1,x.audioOnly=!1,x.fragPlaying=null,x.onvplaying=null,x.onvseeked=null,x.fragLastKbps=0,x.stalled=!1,x.couldBacktrack=!1,x.audioCodecSwitch=!1,x.videoBuffer=null,x._registerListeners(),x}var D=R.prototype;return D._registerListeners=function(){var b=this.hls;b.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.on(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.on(S.Events.LEVEL_LOADING,this.onLevelLoading,this),b.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.on(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),b.on(S.Events.ERROR,this.onError,this),b.on(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),b.on(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.on(S.Events.BUFFER_CREATED,this.onBufferCreated,this),b.on(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),b.on(S.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),b.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},D._unregisterListeners=function(){var b=this.hls;b.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),b.off(S.Events.MANIFEST_PARSED,this.onManifestParsed,this),b.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.off(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),b.off(S.Events.ERROR,this.onError,this),b.off(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),b.off(S.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.off(S.Events.BUFFER_CREATED,this.onBufferCreated,this),b.off(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),b.off(S.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),b.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},D.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},D.startLoad=function(b){if(this.levels){var x=this.lastCurrentTime,C=this.hls;if(this.stopLoad(),this.setInterval(w),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var F=C.startLevel;F===-1&&(C.config.testBandwidth?(F=0,this.bitrateTest=!0):F=C.nextAutoLevel),this.level=C.nextLoadLevel=F,this.loadedmetadata=!1}x>0&&b===-1&&(this.log("Override startPosition with lastCurrentTime @"+x.toFixed(3)),b=x),this.state=_.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=b,this.tick()}else this._forceStartLoad=!0,this.state=_.State.STOPPED},D.stopLoad=function(){this._forceStartLoad=!1,a.prototype.stopLoad.call(this)},D.doTick=function(){switch(this.state){case _.State.IDLE:this.doTickIdle();break;case _.State.WAITING_LEVEL:{var b,x=this.levels,C=this.level,F=x==null||((b=x[C])===null||b===void 0)?void 0:b.details;if(F&&(!F.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(F))break;this.state=_.State.IDLE;break}break}case _.State.FRAG_LOADING_WAITING_RETRY:{var j,k=self.performance.now(),X=this.retryDate;(!X||k>=X||(j=this.media)!==null&&j!==void 0&&j.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=_.State.IDLE)}break;default:break}this.onTickEnd()},D.onTickEnd=function(){a.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},D.doTickIdle=function(){var b,x,C=this.hls,F=this.levelLastLoaded,j=this.levels,k=this.media,X=C.config,G=C.nextLoadLevel;if(F===null||!k&&(this.startFragRequested||!X.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!j||!j[G])return;var W=j[G];this.level=C.nextLoadLevel=G;var K=W.details;if(!K||this.state===_.State.WAITING_LEVEL||K.live&&this.levelLastLoaded!==G){this.state=_.State.WAITING_LEVEL;return}var B=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:k,i.PlaylistLevelType.MAIN);if(B===null)return;var U=B.len,H=this.getMaxBufferLength(W.maxBitrate);if(U>=H)return;if(this._streamEnded(B,K)){var q={};this.altAudio&&(q.type="video"),this.hls.trigger(S.Events.BUFFER_EOS,q),this.state=_.State.ENDED;return}var ie=B.end,ce=this.getNextFragment(ie,K);if(this.couldBacktrack&&!this.fragPrevious&&ce&&ce.sn!=="initSegment"){var he=ce.sn-K.startSN;he>1&&(ce=K.fragments[he-1],this.fragmentTracker.removeFragment(ce))}if(ce&&this.fragmentTracker.getState(ce)===o.FragmentState.OK&&this.nextLoadPosition>ie){var be=this.audioOnly&&!this.altAudio?r.ElementaryStreamTypes.AUDIO:r.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(k,be,i.PlaylistLevelType.MAIN),ce=this.getNextFragment(this.nextLoadPosition,K)}if(!ce)return;ce.initSegment&&!ce.initSegment.data&&!this.bitrateTest&&(ce=ce.initSegment),((b=ce.decryptdata)===null||b===void 0?void 0:b.keyFormat)==="identity"&&!((x=ce.decryptdata)!==null&&x!==void 0&&x.key)?this.loadKey(ce,K):this.loadFragment(ce,K,ie)},D.loadFragment=function(b,x,C){var F,j=this.fragmentTracker.getState(b);if(this.fragCurrent=b,j===o.FragmentState.BACKTRACKED){var k=this.fragmentTracker.getBacktrackData(b);if(k){this._handleFragmentLoadProgress(k),this._handleFragmentLoadComplete(k);return}else j=o.FragmentState.NOT_LOADED}j===o.FragmentState.NOT_LOADED||j===o.FragmentState.PARTIAL?b.sn==="initSegment"?this._loadInitSegment(b):this.bitrateTest?(b.bitrateTest=!0,this.log("Fragment "+b.sn+" of level "+b.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(b)):(this.startFragRequested=!0,a.prototype.loadFragment.call(this,b,x,C)):j===o.FragmentState.APPENDING?this.reduceMaxBufferLength(b.duration)&&this.fragmentTracker.removeFragment(b):((F=this.media)===null||F===void 0?void 0:F.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},D.getAppendedFrag=function(b){var x=this.fragmentTracker.getAppendedFrag(b,i.PlaylistLevelType.MAIN);return x&&"fragment"in x?x.fragment:x},D.getBufferedFrag=function(b){return this.fragmentTracker.getBufferedFrag(b,i.PlaylistLevelType.MAIN)},D.followingBufferedFrag=function(b){return b?this.getBufferedFrag(b.end+.5):null},D.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},D.nextLevelSwitch=function(){var b=this.levels,x=this.media;if(x!=null&&x.readyState){var C,F=this.getAppendedFrag(x.currentTime);if(F&&F.start>1&&this.flushMainBuffer(0,F.start-1),!x.paused&&b){var j=this.hls.nextLoadLevel,k=b[j],X=this.fragLastKbps;X&&this.fragCurrent?C=this.fragCurrent.duration*k.maxBitrate/(1e3*X)+1:C=0}else C=0;var G=this.getBufferedFrag(x.currentTime+C);if(G){var W=this.followingBufferedFrag(G);if(W){this.abortCurrentFrag();var K=W.maxStartPTS?W.maxStartPTS:W.start,B=W.duration,U=Math.max(G.end,K+Math.min(Math.max(B-this.config.maxFragLookUpTolerance,B*.5),B*.75));this.flushMainBuffer(U,Number.POSITIVE_INFINITY)}}}},D.abortCurrentFrag=function(){var b=this.fragCurrent;this.fragCurrent=null,b!=null&&b.loader&&b.loader.abort(),this.state===_.State.KEY_LOADING&&(this.state=_.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},D.flushMainBuffer=function(b,x){a.prototype.flushMainBuffer.call(this,b,x,this.altAudio?"video":null)},D.onMediaAttached=function(b,x){a.prototype.onMediaAttached.call(this,b,x);var C=x.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),C.addEventListener("playing",this.onvplaying),C.addEventListener("seeked",this.onvseeked),this.gapController=new h.default(this.config,C,this.fragmentTracker,this.hls)},D.onMediaDetaching=function(){var b=this.media;b&&(b.removeEventListener("playing",this.onvplaying),b.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),a.prototype.onMediaDetaching.call(this)},D.onMediaPlaying=function(){this.tick()},D.onMediaSeeked=function(){var b=this.media,x=b?b.currentTime:null;Object(L.isFiniteNumber)(x)&&this.log("Media seeked to "+x.toFixed(3)),this.tick()},D.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},D.onManifestParsed=function(b,x){var C=!1,F=!1,j;x.levels.forEach(function(k){j=k.audioCodec,j&&(j.indexOf("mp4a.40.2")!==-1&&(C=!0),j.indexOf("mp4a.40.5")!==-1&&(F=!0))}),this.audioCodecSwitch=C&&F&&!Object(g.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=x.levels,this.startFragRequested=!1},D.onLevelLoading=function(b,x){var C=this.levels;if(!C||this.state!==_.State.IDLE)return;var F=C[x.level];(!F.details||F.details.live&&this.levelLastLoaded!==x.level||this.waitForCdnTuneIn(F.details))&&(this.state=_.State.WAITING_LEVEL)},D.onLevelLoaded=function(b,x){var C,F=this.levels,j=x.level,k=x.details,X=k.totalduration;if(!F){this.warn("Levels were reset while loading level "+j);return}this.log("Level "+j+" loaded ["+k.startSN+","+k.endSN+"], cc ["+k.startCC+", "+k.endCC+"] duration:"+X);var G=this.fragCurrent;G&&(this.state===_.State.FRAG_LOADING||this.state===_.State.FRAG_LOADING_WAITING_RETRY)&&(G.level!==x.level&&G.loader&&(this.state=_.State.IDLE,G.loader.abort()));var W=F[j],K=0;if(k.live||(C=W.details)!==null&&C!==void 0&&C.live){if(k.fragments[0]||(k.deltaUpdateFailed=!0),k.deltaUpdateFailed)return;K=this.alignPlaylists(k,W.details)}if(W.details=k,this.levelLastLoaded=j,this.hls.trigger(S.Events.LEVEL_UPDATED,{details:k,level:j}),this.state===_.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(k))return;this.state=_.State.IDLE}this.startFragRequested?k.live&&this.synchronizeToLiveEdge(k):this.setStartPosition(k,K),this.tick()},D._handleFragmentLoadProgress=function(b){var x,C=b.frag,F=b.part,j=b.payload,k=this.levels;if(!k){this.warn("Levels were reset while fragment load was in progress. Fragment "+C.sn+" of level "+C.level+" will not be buffered");return}var X=k[C.level],G=X.details;if(!G){this.warn("Dropping fragment "+C.sn+" of level "+C.level+" after level details were reset");return}var W=X.videoCodec,K=G.PTSKnown||!G.live,B=(x=C.initSegment)===null||x===void 0?void 0:x.data,U=this._getAudioCodec(X),H=this.transmuxer=this.transmuxer||new d.default(this.hls,i.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),q=F?F.index:-1,ie=q!==-1,ce=new f.ChunkMetadata(C.level,C.sn,C.stats.chunkCount,j.byteLength,q,ie),he=this.initPTS[C.cc];H.push(j,B,U,W,C,F,G.totalduration,K,ce,he)},D.onAudioTrackSwitching=function(b,x){var C=this.altAudio,F=!!x.url,j=x.id;if(!F){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var k=this.fragCurrent;k!=null&&k.loader&&(this.log("Switching to main audio track, cancel main fragment load"),k.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var X=this.hls;C&&X.trigger(S.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),X.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:j})}},D.onAudioTrackSwitched=function(b,x){var C=x.id,F=!!this.hls.audioTracks[C].url;if(F){var j=this.videoBuffer;j&&this.mediaBuffer!==j&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=j)}this.altAudio=F,this.tick()},D.onBufferCreated=function(b,x){var C=x.tracks,F,j,k=!1;for(var X in C){var G=C[X];if(G.id==="main"){if(j=X,F=G,X==="video"){var W=C[X];W&&(this.videoBuffer=W.buffer)}}else k=!0}k&&F?(this.log("Alternate track found, use "+j+".buffered to schedule main fragment loading"),this.mediaBuffer=F.buffer):this.mediaBuffer=this.media},D.onFragBuffered=function(b,x){var C=x.frag,F=x.part;if(C&&C.type!==i.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(C)){this.warn("Fragment "+C.sn+(F?" p: "+F.index:"")+" of level "+C.level+" finished buffering, but was aborted. state: "+this.state),this.state===_.State.PARSED&&(this.state=_.State.IDLE);return}var j=F?F.stats:C.stats;this.fragLastKbps=Math.round(8*j.total/(j.buffering.end-j.loading.first)),C.sn!=="initSegment"&&(this.fragPrevious=C),this.fragBufferedComplete(C,F)},D.onError=function(b,x){switch(x.details){case E.ErrorDetails.FRAG_LOAD_ERROR:case E.ErrorDetails.FRAG_LOAD_TIMEOUT:case E.ErrorDetails.KEY_LOAD_ERROR:case E.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(i.PlaylistLevelType.MAIN,x);break;case E.ErrorDetails.LEVEL_LOAD_ERROR:case E.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==_.State.ERROR&&(x.fatal?(this.warn(""+x.details),this.state=_.State.ERROR):!x.levelRetry&&this.state===_.State.WAITING_LEVEL&&(this.state=_.State.IDLE));break;case E.ErrorDetails.BUFFER_FULL_ERROR:if(x.parent==="main"&&(this.state===_.State.PARSING||this.state===_.State.PARSED)){var C=!0,F=this.getFwdBufferInfo(this.media,i.PlaylistLevelType.MAIN);F&&F.len>.5&&(C=!this.reduceMaxBufferLength(F.len)),C&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},D.checkBuffer=function(){var b=this.media,x=this.gapController;if(!b||!x||!b.readyState)return;var C=p.BufferHelper.getBuffered(b);!this.loadedmetadata&&C.length?(this.loadedmetadata=!0,this.seekToStartPos()):x.poll(this.lastCurrentTime),this.lastCurrentTime=b.currentTime},D.onFragLoadEmergencyAborted=function(){this.state=_.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},D.onBufferFlushed=function(b,x){var C=x.type;if(C!==r.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var F=(C===r.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(F,C,i.PlaylistLevelType.MAIN)}},D.onLevelsUpdated=function(b,x){this.levels=x.levels},D.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},D.seekToStartPos=function(){var b=this.media,x=b.currentTime,C=this.startPosition;if(C>=0&&x<C){if(b.seeking){y.logger.log("could not seek to "+C+", already seeking at "+x);return}var F=p.BufferHelper.getBuffered(b),j=F.length?F.start(0):0,k=j-C;k>0&&(k<this.config.maxBufferHole||k<this.config.maxFragLookUpTolerance)&&(y.logger.log("adjusting start position by "+k+" to match buffer start"),C+=k,this.startPosition=C),this.log("seek to target start position "+C+" from current time "+x),b.currentTime=C}},D._getAudioCodec=function(b){var x=this.config.defaultAudioCodec||b.audioCodec;return this.audioCodecSwap&&x&&(this.log("Swapping audio codec"),x.indexOf("mp4a.40.5")!==-1?x="mp4a.40.2":x="mp4a.40.5"),x},D._loadBitrateTestFrag=function(b){var x=this;this._doFragLoad(b).then(function(C){var F=x.hls;if(!C||F.nextLoadLevel||x.fragContextChanged(b))return;x.fragLoadError=0,x.state=_.State.IDLE,x.startFragRequested=!1,x.bitrateTest=!1;var j=b.stats;j.parsing.start=j.parsing.end=j.buffering.start=j.buffering.end=self.performance.now(),F.trigger(S.Events.FRAG_LOADED,C)})},D._handleTransmuxComplete=function(b){var x,C="main",F=this.hls,j=b.remuxResult,k=b.chunkMeta,X=this.getCurrentContext(k);if(!X){this.warn("The loading context changed while buffering fragment "+k.sn+" of level "+k.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(k.level);return}var G=X.frag,W=X.part,K=X.level,B=j.video,U=j.text,H=j.id3,q=j.initSegment,ie=this.altAudio?void 0:j.audio;if(this.fragContextChanged(G))return;if(this.state=_.State.PARSING,q){q.tracks&&(this._bufferInitSegment(K,q.tracks,G,k),F.trigger(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:G,id:C,tracks:q.tracks}));var ce=q.initPTS,he=q.timescale;Object(L.isFiniteNumber)(ce)&&(this.initPTS[G.cc]=ce,F.trigger(S.Events.INIT_PTS_FOUND,{frag:G,id:C,initPTS:ce,timescale:he}))}if(B&&j.independent!==!1){if(K.details){var be=B.startPTS,ne=B.endPTS,le=B.startDTS,ue=B.endDTS;if(W)W.elementaryStreams[B.type]={startPTS:be,endPTS:ne,startDTS:le,endDTS:ue};else if(B.firstKeyFrame&&B.independent&&(this.couldBacktrack=!0),B.dropped&&B.independent){var te=this.getLoadPosition()+this.config.maxBufferHole;if(te<be){this.backtrack(G);return}G.setElementaryStreamInfo(B.type,G.start,ne,G.start,ue,!0)}G.setElementaryStreamInfo(B.type,be,ne,le,ue),this.bufferFragmentData(B,G,W,k)}}else if(j.independent===!1){this.backtrack(G);return}if(ie){var oe=ie.startPTS,Q=ie.endPTS,se=ie.startDTS,J=ie.endDTS;W&&(W.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:oe,endPTS:Q,startDTS:se,endDTS:J}),G.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,oe,Q,se,J),this.bufferFragmentData(ie,G,W,k)}if(H!=null&&(x=H.samples)!==null&&x!==void 0&&x.length){var ee={frag:G,id:C,samples:H.samples};F.trigger(S.Events.FRAG_PARSING_METADATA,ee)}if(U){var ge={frag:G,id:C,samples:U.samples};F.trigger(S.Events.FRAG_PARSING_USERDATA,ge)}},D._bufferInitSegment=function(b,x,C,F){var j=this;if(this.state!==_.State.PARSING)return;this.audioOnly=!!x.audio&&!x.video,this.altAudio&&!this.audioOnly&&delete x.audio;var k=x.audio,X=x.video,G=x.audiovideo;if(k){var W=b.audioCodec,K=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(W&&(W.indexOf("mp4a.40.5")!==-1?W="mp4a.40.2":W="mp4a.40.5"),k.metadata.channelCount!==1&&K.indexOf("firefox")===-1&&(W="mp4a.40.5")),K.indexOf("android")!==-1&&k.container!=="audio/mpeg"&&(W="mp4a.40.2",this.log("Android: force audio codec to "+W)),b.audioCodec&&b.audioCodec!==W&&this.log('Swapping manifest audio codec "'+b.audioCodec+'" for "'+W+'"'),k.levelCodec=W,k.id="main",this.log("Init audio buffer, container:"+k.container+", codecs[selected/level/parsed]=["+(W||"")+"/"+(b.audioCodec||"")+"/"+k.codec+"]")}X&&(X.levelCodec=b.videoCodec,X.id="main",this.log("Init video buffer, container:"+X.container+", codecs[level/parsed]=["+(b.videoCodec||"")+"/"+X.codec+"]")),G&&this.log("Init audiovideo buffer, container:"+G.container+", codecs[level/parsed]=["+(b.attrs.CODECS||"")+"/"+G.codec+"]"),this.hls.trigger(S.Events.BUFFER_CODECS,x),Object.keys(x).forEach(function(B){var U=x[B],H=U.initSegment;H!=null&&H.byteLength&&j.hls.trigger(S.Events.BUFFER_APPENDING,{type:B,data:H,frag:C,part:null,chunkMeta:F,parent:C.type})}),this.tick()},D.backtrack=function(b){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(b);var x=this.fragmentTracker.backtrack(b);this.fragPrevious=null,this.nextLoadPosition=b.start,x?this.resetFragmentLoading(b):this.state=_.State.BACKTRACKING},D.checkFragmentChanged=function(){var b=this.media,x=null;if(b&&b.readyState>1&&b.seeking===!1){var C=b.currentTime;if(p.BufferHelper.isBuffered(b,C)?x=this.getAppendedFrag(C):p.BufferHelper.isBuffered(b,C+.1)&&(x=this.getAppendedFrag(C+.1)),x){var F=this.fragPlaying,j=x.level;(!F||x.sn!==F.sn||F.level!==j||x.urlId!==F.urlId)&&(this.hls.trigger(S.Events.FRAG_CHANGED,{frag:x}),(!F||F.level!==j)&&this.hls.trigger(S.Events.LEVEL_SWITCHED,{level:j}),this.fragPlaying=x)}}},n(R,[{key:"nextLevel",get:function(){var b=this.nextBufferedFrag;return b?b.level:-1}},{key:"currentLevel",get:function(){var b=this.media;if(b){var x=this.getAppendedFrag(b.currentTime);if(x)return x.level}return-1}},{key:"nextBufferedFrag",get:function(){var b=this.media;if(b){var x=this.getAppendedFrag(b.currentTime);return this.followingBufferedFrag(x)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),R}(_.default)},"./src/controller/subtitle-stream-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"SubtitleStreamController",function(){return s});var L=T("./src/events.ts"),_=T("./src/utils/logger.ts"),g=T("./src/utils/buffer-helper.ts"),S=T("./src/controller/fragment-finders.ts"),p=T("./src/utils/discontinuities.ts"),o=T("./src/controller/level-helper.ts"),i=T("./src/controller/fragment-tracker.ts"),r=T("./src/controller/base-stream-controller.ts"),d=T("./src/types/loader.ts"),f=T("./src/types/level.ts");function h(u,w){for(var v=0;v<w.length;v++){var a=w[v];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(u,a.key,a)}}function E(u,w,v){return w&&h(u.prototype,w),v&&h(u,v),u}function y(u,w){u.prototype=Object.create(w.prototype),u.prototype.constructor=u,l(u,w)}function l(u,w){return l=Object.setPrototypeOf||function(a,R){return a.__proto__=R,a},l(u,w)}var n=500,s=function(u){y(w,u);function w(a,R){var D;return D=u.call(this,a,R,"[subtitle-stream-controller]")||this,D.levels=[],D.currentTrackId=-1,D.tracksBuffered=[],D.mainDetails=null,D._registerListeners(),D}var v=w.prototype;return v.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},v._registerListeners=function(){var R=this.hls;R.on(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.on(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.on(L.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.on(L.Events.LEVEL_LOADED,this.onLevelLoaded,this),R.on(L.Events.ERROR,this.onError,this),R.on(L.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),R.on(L.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),R.on(L.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.on(L.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),R.on(L.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},v._unregisterListeners=function(){var R=this.hls;R.off(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),R.off(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this),R.off(L.Events.MANIFEST_LOADING,this.onManifestLoading,this),R.off(L.Events.LEVEL_LOADED,this.onLevelLoaded,this),R.off(L.Events.ERROR,this.onError,this),R.off(L.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),R.off(L.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),R.off(L.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),R.off(L.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),R.off(L.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},v.startLoad=function(){this.stopLoad(),this.state=r.State.IDLE,this.setInterval(n),this.tick()},v.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},v.onLevelLoaded=function(R,D){this.mainDetails=D.details},v.onSubtitleFragProcessed=function(R,D){var c=D.frag,b=D.success;if(this.fragPrevious=c,this.state=r.State.IDLE,!b)return;var x=this.tracksBuffered[this.currentTrackId];if(!x)return;for(var C,F=c.start,j=0;j<x.length;j++)if(F>=x[j].start&&F<=x[j].end){C=x[j];break}var k=c.start+c.duration;C?C.end=k:(C={start:F,end:k},x.push(C)),this.fragmentTracker.fragBuffered(c)},v.onBufferFlushing=function(R,D){var c=D.startOffset,b=D.endOffset;if(c===0&&b!==Number.POSITIVE_INFINITY){var x=this.currentTrackId,C=this.levels;if(!C.length||!C[x]||!C[x].details)return;var F=C[x].details,j=F.targetduration,k=b-j;if(k<=0)return;D.endOffsetSubtitles=Math.max(0,k),this.tracksBuffered.forEach(function(X){for(var G=0;G<X.length;){if(X[G].end<=k){X.shift();continue}else if(X[G].start<k)X[G].start=k;else break;G++}}),this.fragmentTracker.removeFragmentsInRange(c,k,d.PlaylistLevelType.SUBTITLE)}},v.onError=function(R,D){var c,b=D.frag;if(!b||b.type!==d.PlaylistLevelType.SUBTITLE)return;(c=this.fragCurrent)!==null&&c!==void 0&&c.loader&&this.fragCurrent.loader.abort(),this.state=r.State.IDLE},v.onSubtitleTracksUpdated=function(R,D){var c=this,b=D.subtitleTracks;this.tracksBuffered=[],this.levels=b.map(function(x){return new f.Level(x)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(x){c.tracksBuffered[x.id]=[]}),this.mediaBuffer=null},v.onSubtitleTrackSwitch=function(R,D){if(this.currentTrackId=D.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var c=this.levels[this.currentTrackId];c!=null&&c.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,c&&this.setInterval(n)},v.onSubtitleTrackLoaded=function(R,D){var c,b=D.details,x=D.id,C=this.currentTrackId,F=this.levels;if(!F.length)return;var j=F[C];if(x>=F.length||x!==C||!j)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,b.live||(c=j.details)!==null&&c!==void 0&&c.live){var k=this.mainDetails;if(b.deltaUpdateFailed||!k)return;var X=k.fragments[0];if(!j.details)b.hasProgramDateTime&&k.hasProgramDateTime?Object(p.alignMediaPlaylistByPDT)(b,k):X&&Object(o.addSliding)(b,X.start);else{var G=this.alignPlaylists(b,j.details);G===0&&X&&Object(o.addSliding)(b,X.start)}}if(j.details=b,this.levelLastLoaded=x,this.tick(),b.live&&!this.fragCurrent&&this.media&&this.state===r.State.IDLE){var W=Object(S.findFragmentByPTS)(null,b.fragments,this.media.currentTime,0);W||(this.warn("Subtitle playlist not aligned with playback"),j.details=void 0)}},v._handleFragmentLoadComplete=function(R){var D=R.frag,c=R.payload,b=D.decryptdata,x=this.hls;if(this.fragContextChanged(D))return;if(c&&c.byteLength>0&&b&&b.key&&b.iv&&b.method==="AES-128"){var C=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(c),b.key.buffer,b.iv.buffer).then(function(F){var j=performance.now();x.trigger(L.Events.FRAG_DECRYPTED,{frag:D,payload:F,stats:{tstart:C,tdecrypt:j}})})}},v.doTick=function(){if(!this.media){this.state=r.State.IDLE;return}if(this.state===r.State.IDLE){var R,D=this.currentTrackId,c=this.levels;if(!c.length||!c[D]||!c[D].details)return;var b=c[D].details,x=b.targetduration,C=this.config,F=this.media,j=g.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,F.currentTime-x,C.maxBufferHole),k=j.end,X=j.len,G=this.getMaxBufferLength()+x;if(X>G)return;console.assert(b,"Subtitle track details are defined on idle subtitle stream controller tick");var W=b.fragments,K=W.length,B=b.edge,U,H=this.fragPrevious;if(k<B){var q=C.maxFragLookUpTolerance;H&&b.hasProgramDateTime&&(U=Object(S.findFragmentByPDT)(W,H.endProgramDateTime,q)),U||(U=Object(S.findFragmentByPTS)(H,W,k,q),!U&&H&&H.start<W[0].start&&(U=W[0]))}else U=W[K-1];(R=U)!==null&&R!==void 0&&R.encrypted?(_.logger.log("Loading key for "+U.sn),this.state=r.State.KEY_LOADING,this.hls.trigger(L.Events.KEY_LOADING,{frag:U})):U&&this.fragmentTracker.getState(U)===i.FragmentState.NOT_LOADED&&this.loadFragment(U,b,k)}},v.loadFragment=function(R,D,c){this.fragCurrent=R,u.prototype.loadFragment.call(this,R,D,c)},E(w,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),w}(r.default)},"./src/controller/subtitle-track-controller.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/events.ts"),_=T("./src/utils/texttrack-utils.ts"),g=T("./src/controller/base-playlist-controller.ts"),S=T("./src/types/loader.ts");function p(h,E){for(var y=0;y<E.length;y++){var l=E[y];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(h,l.key,l)}}function o(h,E,y){return E&&p(h.prototype,E),y&&p(h,y),h}function i(h,E){h.prototype=Object.create(E.prototype),h.prototype.constructor=h,r(h,E)}function r(h,E){return r=Object.setPrototypeOf||function(l,n){return l.__proto__=n,l},r(h,E)}var d=function(h){i(E,h);function E(l){var n;return n=h.call(this,l,"[subtitle-track-controller]")||this,n.media=null,n.tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.selectDefaultTrack=!0,n.queuedDefaultTrack=-1,n.trackChangeListener=function(){return n.onTextTracksChanged()},n.asyncPollTrackChange=function(){return n.pollTrackChange(0)},n.useTextTrackPolling=!1,n.subtitlePollingInterval=-1,n.subtitleDisplay=!0,n.registerListeners(),n}var y=E.prototype;return y.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,h.prototype.destroy.call(this)},y.registerListeners=function(){var n=this.hls;n.on(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.on(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(L.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(L.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(L.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(L.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.on(L.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.on(L.Events.ERROR,this.onError,this)},y.unregisterListeners=function(){var n=this.hls;n.off(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),n.off(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(L.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(L.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(L.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(L.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.off(L.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),n.off(L.Events.ERROR,this.onError,this)},y.onMediaAttached=function(n,s){if(this.media=s.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)},y.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},y.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var n=f(this.media.textTracks);n.forEach(function(s){Object(_.clearCurrentCues)(s)}),this.subtitleTrack=-1,this.media=null},y.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},y.onManifestParsed=function(n,s){this.tracks=s.subtitleTracks},y.onSubtitleTrackLoaded=function(n,s){var u=s.id,w=s.details,v=this.trackId,a=this.tracksInGroup[v];if(!a){this.warn("Invalid subtitle track id "+u);return}var R=a.details;a.details=s.details,this.log("subtitle track "+u+" loaded ["+w.startSN+"-"+w.endSN+"]"),u===this.trackId&&(this.retryCount=0,this.playlistLoaded(u,s,R))},y.onLevelLoading=function(n,s){this.switchLevel(s.level)},y.onLevelSwitching=function(n,s){this.switchLevel(s.level)},y.switchLevel=function(n){var s=this.hls.levels[n];if(!(s!=null&&s.textGroupIds))return;var u=s.textGroupIds[s.urlId];if(this.groupId!==u){var w=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,v=this.tracks.filter(function(D){return!u||D.groupId===u});this.tracksInGroup=v;var a=this.findTrackId(w==null?void 0:w.name)||this.findTrackId();this.groupId=u;var R={subtitleTracks:v};this.log("Updating subtitle tracks, "+v.length+' track(s) found in "'+u+'" group-id'),this.hls.trigger(L.Events.SUBTITLE_TRACKS_UPDATED,R),a!==-1&&this.setSubtitleTrack(a,w)}},y.findTrackId=function(n){for(var s=this.tracksInGroup,u=0;u<s.length;u++){var w=s[u];if((!this.selectDefaultTrack||w.default)&&(!n||n===w.name))return w.id}return-1},y.onError=function(n,s){if(h.prototype.onError.call(this,n,s),s.fatal||!s.context)return;s.context.type===S.PlaylistContextType.SUBTITLE_TRACK&&s.context.id===this.trackId&&s.context.groupId===this.groupId&&this.retryLoadingOrFail(s)},y.loadPlaylist=function(n){var s=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(s)){var u=s.id,w=s.groupId,v=s.url;if(n)try{v=n.addDirectives(v)}catch(a){this.warn("Could not construct new URL with HLS Delivery Directives: "+a)}this.log("Loading subtitle playlist for id "+u),this.hls.trigger(L.Events.SUBTITLE_TRACK_LOADING,{url:v,id:u,groupId:w,deliveryDirectives:n||null})}},y.toggleTrackModes=function(n){var s=this,u=this.media,w=this.subtitleDisplay,v=this.trackId;if(!u)return;var a=f(u.textTracks),R=a.filter(function(b){return b.groupId===s.groupId});if(n===-1)[].slice.call(a).forEach(function(b){b.mode="disabled"});else{var D=R[v];D&&(D.mode="disabled")}var c=R[n];c&&(c.mode=w?"showing":"hidden")},y.setSubtitleTrack=function(n,s){var u,w=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=n;return}if(this.trackId!==n&&this.toggleTrackModes(n),this.trackId===n&&(n===-1||(u=w[n])!==null&&u!==void 0&&u.details)||n<-1||n>=w.length)return;this.clearTimer();var v=w[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,v){var a=v.id,R=v.groupId,D=R===void 0?"":R,c=v.name,b=v.type,x=v.url;this.hls.trigger(L.Events.SUBTITLE_TRACK_SWITCH,{id:a,groupId:D,name:c,type:b,url:x});var C=this.switchParams(v.url,s==null?void 0:s.details);this.loadPlaylist(C)}else this.hls.trigger(L.Events.SUBTITLE_TRACK_SWITCH,{id:n})},y.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,s=f(this.media.textTracks),u=0;u<s.length;u++)if(s[u].mode==="hidden")n=u;else if(s[u].mode==="showing"){n=u;break}this.subtitleTrack!==n&&(this.subtitleTrack=n)},o(E,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(n){this.selectDefaultTrack=!1;var s=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(n,s)}}]),E}(g.default);function f(h){for(var E=[],y=0;y<h.length;y++){var l=h[y];l.kind==="subtitles"&&l.label&&E.push(h[y])}return E}m.default=d},"./src/controller/timeline-controller.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"TimelineController",function(){return f});var L=T("./src/polyfills/number.ts"),_=T("./src/events.ts"),g=T("./src/utils/cea-608-parser.ts"),S=T("./src/utils/output-filter.ts"),p=T("./src/utils/webvtt-parser.ts"),o=T("./src/utils/texttrack-utils.ts"),i=T("./src/utils/imsc1-ttml-parser.ts"),r=T("./src/types/loader.ts"),d=T("./src/utils/logger.ts"),f=function(){function l(s){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=y(),this.captionsProperties=void 0,this.hls=s,this.config=s.config,this.Cues=s.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 u=new S.default(this,"textTrack1"),w=new S.default(this,"textTrack2"),v=new S.default(this,"textTrack3"),a=new S.default(this,"textTrack4");this.cea608Parser1=new g.default(1,u,w),this.cea608Parser2=new g.default(3,v,a)}s.on(_.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.on(_.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(_.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.on(_.Events.MANIFEST_LOADED,this.onManifestLoaded,this),s.on(_.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),s.on(_.Events.FRAG_LOADING,this.onFragLoading,this),s.on(_.Events.FRAG_LOADED,this.onFragLoaded,this),s.on(_.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),s.on(_.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),s.on(_.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),s.on(_.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),s.on(_.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var n=l.prototype;return n.destroy=function(){var u=this.hls;u.off(_.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.off(_.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(_.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(_.Events.MANIFEST_LOADED,this.onManifestLoaded,this),u.off(_.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),u.off(_.Events.FRAG_LOADING,this.onFragLoading,this),u.off(_.Events.FRAG_LOADED,this.onFragLoaded,this),u.off(_.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),u.off(_.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),u.off(_.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),u.off(_.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),u.off(_.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},n.addCues=function(u,w,v,a,R){for(var D=!1,c=R.length;c--;){var b=R[c],x=E(b[0],b[1],w,v);if(x>=0&&(b[0]=Math.min(b[0],w),b[1]=Math.max(b[1],v),D=!0,x/(v-w)>.5))return}if(D||R.push([w,v]),this.config.renderTextTracksNatively){var C=this.captionsTracks[u];this.Cues.newCue(C,w,v,a)}else{var F=this.Cues.newCue(null,w,v,a);this.hls.trigger(_.Events.CUES_PARSED,{type:"captions",cues:F,track:u})}},n.onInitPtsFound=function(u,w){var v=this,a=w.frag,R=w.id,D=w.initPTS,c=w.timescale,b=this.unparsedVttFrags;R==="main"&&(this.initPTS[a.cc]=D,this.timescale[a.cc]=c),b.length&&(this.unparsedVttFrags=[],b.forEach(function(x){v.onFragLoaded(_.Events.FRAG_LOADED,x)}))},n.getExistingTrack=function(u){var w=this.media;if(w)for(var v=0;v<w.textTracks.length;v++){var a=w.textTracks[v];if(a[u])return a}return null},n.createCaptionsTrack=function(u){this.config.renderTextTracksNatively?this.createNativeTrack(u):this.createNonNativeTrack(u)},n.createNativeTrack=function(u){if(this.captionsTracks[u])return;var w=this.captionsProperties,v=this.captionsTracks,a=this.media,R=w[u],D=R.label,c=R.languageCode,b=this.getExistingTrack(u);if(b)v[u]=b,Object(o.clearCurrentCues)(v[u]),Object(o.sendAddTrackEvent)(v[u],a);else{var x=this.createTextTrack("captions",D,c);x&&(x[u]=!0,v[u]=x)}},n.createNonNativeTrack=function(u){if(this.nonNativeCaptionsTracks[u])return;var w=this.captionsProperties[u];if(!w)return;var v=w.label,a={_id:u,label:v,kind:"captions",default:w.media?!!w.media.default:!1,closedCaptions:w.media};this.nonNativeCaptionsTracks[u]=a,this.hls.trigger(_.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[a]})},n.createTextTrack=function(u,w,v){var a=this.media;return a?a.addTextTrack(u,w,v):void 0},n.onMediaAttaching=function(u,w){this.media=w.media,this._cleanTracks()},n.onMediaDetaching=function(){var u=this.captionsTracks;Object.keys(u).forEach(function(w){Object(o.clearCurrentCues)(u[w]),delete u[w]}),this.nonNativeCaptionsTracks={}},n.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=y(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},n._cleanTracks=function(){var u=this.media;if(!u)return;var w=u.textTracks;if(w)for(var v=0;v<w.length;v++)Object(o.clearCurrentCues)(w[v])},n.onSubtitleTracksUpdated=function(u,w){var v=this;this.textTracks=[];var a=w.subtitleTracks||[],R=a.some(function(x){return x.textCodec===i.IMSC1_CODEC});if(this.config.enableWebVTT||R&&this.config.enableIMSC1){var D=this.tracks&&a&&this.tracks.length===a.length;if(this.tracks=a||[],this.config.renderTextTracksNatively){var c=this.media?this.media.textTracks:[];this.tracks.forEach(function(x,C){var F;if(C<c.length){for(var j=null,k=0;k<c.length;k++)if(h(c[k],x)){j=c[k];break}j&&(F=j)}F?Object(o.clearCurrentCues)(F):(F=v.createTextTrack("subtitles",x.name,x.lang),F&&(F.mode="disabled")),F&&(F.groupId=x.groupId,v.textTracks.push(F))})}else if(!D&&this.tracks&&this.tracks.length){var b=this.tracks.map(function(x){return{label:x.name,kind:x.type.toLowerCase(),default:x.default,subtitleTrack:x}});this.hls.trigger(_.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:b})}}},n.onManifestLoaded=function(u,w){var v=this;this.config.enableCEA708Captions&&w.captions&&w.captions.forEach(function(a){var R=/(?:CC|SERVICE)([1-4])/.exec(a.instreamId);if(!R)return;var D="textTrack"+R[1],c=v.captionsProperties[D];if(!c)return;c.label=a.name,a.lang&&(c.languageCode=a.lang),c.media=a})},n.onFragLoading=function(u,w){var v=this.cea608Parser1,a=this.cea608Parser2,R=this.lastSn,D=this.lastPartIndex;if(!this.enabled||!(v&&a))return;if(w.frag.type===r.PlaylistLevelType.MAIN){var c,b,x=w.frag.sn,C=(c=w==null||((b=w.part)===null||b===void 0)?void 0:b.index)!=null?c:-1;x===R+1||x===R&&C===D+1||(v.reset(),a.reset()),this.lastSn=x,this.lastPartIndex=C}},n.onFragLoaded=function(u,w){var v=w.frag,a=w.payload,R=this.initPTS,D=this.unparsedVttFrags;if(v.type===r.PlaylistLevelType.SUBTITLE)if(a.byteLength){if(!Object(L.isFiniteNumber)(R[v.cc])){D.push(w),R.length&&this.hls.trigger(_.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:v,error:new Error("Missing initial subtitle PTS")});return}var c=v.decryptdata;if(c==null||c.key==null||c.method!=="AES-128"){var b=this.tracks[v.level],x=this.vttCCs;x[v.cc]||(x[v.cc]={start:v.start,prevCC:this.prevCC,new:!0},this.prevCC=v.cc),b&&b.textCodec===i.IMSC1_CODEC?this._parseIMSC1(v,a):this._parseVTTs(v,a,x)}}else this.hls.trigger(_.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:v,error:new Error("Empty subtitle payload")})},n._parseIMSC1=function(u,w){var v=this,a=this.hls;Object(i.parseIMSC1)(w,this.initPTS[u.cc],this.timescale[u.cc],function(R){v._appendCues(R,u.level),a.trigger(_.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:u})},function(R){d.logger.log("Failed to parse IMSC1: "+R),a.trigger(_.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:u,error:R})})},n._parseVTTs=function(u,w,v){var a=this,R=this.hls;Object(p.parseWebVTT)(w,this.initPTS[u.cc],this.timescale[u.cc],v,u.cc,u.start,function(D){a._appendCues(D,u.level),R.trigger(_.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:u})},function(D){a._fallbackToIMSC1(u,w),d.logger.log("Failed to parse VTT cue: "+D),R.trigger(_.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:u,error:D})})},n._fallbackToIMSC1=function(u,w){var v=this,a=this.tracks[u.level];a.textCodec||Object(i.parseIMSC1)(w,this.initPTS[u.cc],this.timescale[u.cc],function(){a.textCodec=i.IMSC1_CODEC,v._parseIMSC1(u,w)},function(){a.textCodec="wvtt"})},n._appendCues=function(u,w){var v=this.hls;if(this.config.renderTextTracksNatively){var a=this.textTracks[w];if(a.mode==="disabled")return;u.forEach(function(c){return Object(o.addCueToTrack)(a,c)})}else{var R=this.tracks[w],D=R.default?"default":"subtitles"+w;v.trigger(_.Events.CUES_PARSED,{type:"subtitles",cues:u,track:D})}},n.onFragDecrypted=function(u,w){var v=w.frag;if(v.type===r.PlaylistLevelType.SUBTITLE){if(!Object(L.isFiniteNumber)(this.initPTS[v.cc])){this.unparsedVttFrags.push(w);return}this.onFragLoaded(_.Events.FRAG_LOADED,w)}},n.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},n.onFragParsingUserdata=function(u,w){var v=this.cea608Parser1,a=this.cea608Parser2;if(!this.enabled||!(v&&a))return;for(var R=0;R<w.samples.length;R++){var D=w.samples[R].bytes;if(D){var c=this.extractCea608Data(D);v.addData(w.samples[R].pts,c[0]),a.addData(w.samples[R].pts,c[1])}}},n.onBufferFlushing=function(u,w){var v=w.startOffset,a=w.endOffset,R=w.endOffsetSubtitles,D=w.type,c=this.media;if(!c||c.currentTime<a)return;if(!D||D==="video"){var b=this.captionsTracks;Object.keys(b).forEach(function(C){return Object(o.removeCuesInRange)(b[C],v,a)})}if(this.config.renderTextTracksNatively&&(v===0&&R!==void 0)){var x=this.textTracks;Object.keys(x).forEach(function(C){return Object(o.removeCuesInRange)(x[C],v,R)})}},n.extractCea608Data=function(u){for(var w=u[0]&31,v=2,a=[[],[]],R=0;R<w;R++){var D=u[v++],c=127&u[v++],b=127&u[v++],x=(4&D)!==0,C=3&D;if(c===0&&b===0)continue;x&&((C===0||C===1)&&(a[C].push(c),a[C].push(b)))}return a},l}();function h(l,n){return l&&l.label===n.name&&!(l.textTrack1||l.textTrack2)}function E(l,n,s,u){return Math.min(n,u)-Math.max(l,s)}function y(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return L});var L=function(){function _(S,p){this.subtle=void 0,this.aesIV=void 0,this.subtle=S,this.aesIV=p}var g=_.prototype;return g.decrypt=function(p,o){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},o,p)},_}()},"./src/crypt/aes-decryptor.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"removePadding",function(){return _}),T.d(m,"default",function(){return g});var L=T("./src/utils/typed-array.ts");function _(S){var p=S.byteLength,o=p&&new DataView(S.buffer).getUint8(p-1);return o?Object(L.sliceUint8)(S,0,p-o):S}var g=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 p=S.prototype;return p.uint8ArrayToUint32Array_=function(i){for(var r=new DataView(i),d=new Uint32Array(4),f=0;f<4;f++)d[f]=r.getUint32(f*4);return d},p.initTable=function(){var i=this.sBox,r=this.invSBox,d=this.subMix,f=d[0],h=d[1],E=d[2],y=d[3],l=this.invSubMix,n=l[0],s=l[1],u=l[2],w=l[3],v=new Uint32Array(256),a=0,R=0,D=0;for(D=0;D<256;D++)D<128?v[D]=D<<1:v[D]=D<<1^283;for(D=0;D<256;D++){var c=R^R<<1^R<<2^R<<3^R<<4;c=c>>>8^c&255^99,i[a]=c,r[c]=a;var b=v[a],x=v[b],C=v[x],F=v[c]*257^c*16843008;f[a]=F<<24|F>>>8,h[a]=F<<16|F>>>16,E[a]=F<<8|F>>>24,y[a]=F,F=C*16843009^x*65537^b*257^a*16843008,n[c]=F<<24|F>>>8,s[c]=F<<16|F>>>16,u[c]=F<<8|F>>>24,w[c]=F,a?(a=b^v[v[v[C^b]]],R^=v[v[R]]):a=R=1}},p.expandKey=function(i){for(var r=this.uint8ArrayToUint32Array_(i),d=!0,f=0;f<r.length&&d;)d=r[f]===this.key[f],f++;if(d)return;this.key=r;var h=this.keySize=r.length;if(h!==4&&h!==6&&h!==8)throw new Error("Invalid aes key size="+h);var E=this.ksRows=(h+6+1)*4,y,l,n=this.keySchedule=new Uint32Array(E),s=this.invKeySchedule=new Uint32Array(E),u=this.sBox,w=this.rcon,v=this.invSubMix,a=v[0],R=v[1],D=v[2],c=v[3],b,x;for(y=0;y<E;y++){if(y<h){b=n[y]=r[y];continue}x=b,y%h===0?(x=x<<8|x>>>24,x=u[x>>>24]<<24|u[x>>>16&255]<<16|u[x>>>8&255]<<8|u[x&255],x^=w[y/h|0]<<24):h>6&&y%h===4&&(x=u[x>>>24]<<24|u[x>>>16&255]<<16|u[x>>>8&255]<<8|u[x&255]),n[y]=b=(n[y-h]^x)>>>0}for(l=0;l<E;l++)y=E-l,l&3?x=n[y]:x=n[y-4],l<4||y<=4?s[l]=x:s[l]=a[u[x>>>24]]^R[u[x>>>16&255]]^D[u[x>>>8&255]]^c[u[x&255]],s[l]=s[l]>>>0},p.networkToHostOrderSwap=function(i){return i<<24|(i&65280)<<8|(i&16711680)>>8|i>>>24},p.decrypt=function(i,r,d){for(var f=this.keySize+6,h=this.invKeySchedule,E=this.invSBox,y=this.invSubMix,l=y[0],n=y[1],s=y[2],u=y[3],w=this.uint8ArrayToUint32Array_(d),v=w[0],a=w[1],R=w[2],D=w[3],c=new Int32Array(i),b=new Int32Array(c.length),x,C,F,j,k,X,G,W,K,B,U,H,q,ie,ce=this.networkToHostOrderSwap;r<c.length;){for(K=ce(c[r]),B=ce(c[r+1]),U=ce(c[r+2]),H=ce(c[r+3]),k=K^h[0],X=H^h[1],G=U^h[2],W=B^h[3],q=4,ie=1;ie<f;ie++)x=l[k>>>24]^n[X>>16&255]^s[G>>8&255]^u[W&255]^h[q],C=l[X>>>24]^n[G>>16&255]^s[W>>8&255]^u[k&255]^h[q+1],F=l[G>>>24]^n[W>>16&255]^s[k>>8&255]^u[X&255]^h[q+2],j=l[W>>>24]^n[k>>16&255]^s[X>>8&255]^u[G&255]^h[q+3],k=x,X=C,G=F,W=j,q=q+4;x=E[k>>>24]<<24^E[X>>16&255]<<16^E[G>>8&255]<<8^E[W&255]^h[q],C=E[X>>>24]<<24^E[G>>16&255]<<16^E[W>>8&255]<<8^E[k&255]^h[q+1],F=E[G>>>24]<<24^E[W>>16&255]<<16^E[k>>8&255]<<8^E[X&255]^h[q+2],j=E[W>>>24]<<24^E[k>>16&255]<<16^E[X>>8&255]<<8^E[G&255]^h[q+3],b[r]=ce(x^v),b[r+1]=ce(j^a),b[r+2]=ce(F^R),b[r+3]=ce(C^D),v=K,a=B,R=U,D=H,r=r+4}return b.buffer},S}()},"./src/crypt/decrypter.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return r});var L=T("./src/crypt/aes-crypto.ts"),_=T("./src/crypt/fast-aes-key.ts"),g=T("./src/crypt/aes-decryptor.ts"),S=T("./src/utils/logger.ts"),p=T("./src/utils/mp4-tools.ts"),o=T("./src/utils/typed-array.ts"),i=16,r=function(){function d(h,E,y){var l=y===void 0?{}:y,n=l.removePKCS7Padding,s=n===void 0?!0:n;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=h,this.config=E,this.removePKCS7Padding=s,s)try{var u=self.crypto;u&&(this.subtle=u.subtle||u.webkitSubtle)}catch(w){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var f=d.prototype;return f.destroy=function(){this.observer=null},f.isSync=function(){return this.config.enableSoftwareAES},f.flush=function(){var E=this.currentResult;if(!E){this.reset();return}var y=new Uint8Array(E);return this.reset(),this.removePKCS7Padding?Object(g.removePadding)(y):y},f.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},f.decrypt=function(E,y,l,n){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(E),y,l);var s=this.flush();s&&n(s.buffer)}else this.webCryptoDecrypt(new Uint8Array(E),y,l).then(n)},f.softwareDecrypt=function(E,y,l){var n=this.currentIV,s=this.currentResult,u=this.remainderData;this.logOnce("JS AES decrypt"),u&&(E=Object(p.appendUint8Array)(u,E),this.remainderData=null);var w=this.getValidChunk(E);if(!w.length)return null;n&&(l=n);var v=this.softwareDecrypter;v||(v=this.softwareDecrypter=new g.default),v.expandKey(y);var a=s;return this.currentResult=v.decrypt(w.buffer,0,l),this.currentIV=Object(o.sliceUint8)(w,-16).buffer,a||null},f.webCryptoDecrypt=function(E,y,l){var n=this,s=this.subtle;return(this.key!==y||!this.fastAesKey)&&(this.key=y,this.fastAesKey=new _.default(s,y)),this.fastAesKey.expandKey().then(function(u){if(!s)return Promise.reject(new Error("web crypto not initialized"));var w=new L.default(s,l);return w.decrypt(E.buffer,u)}).catch(function(u){return n.onWebCryptoError(u,E,y,l)})},f.onWebCryptoError=function(E,y,l,n){return S.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",E),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(y,l,n)},f.getValidChunk=function(E){var y=E,l=E.length-E.length%i;return l!==E.length&&(y=Object(o.sliceUint8)(E,0,l),this.remainderData=Object(o.sliceUint8)(E,l)),y},f.logOnce=function(E){if(!this.logEnabled)return;S.logger.log("[decrypter.ts]: "+E),this.logEnabled=!1},d}()},"./src/crypt/fast-aes-key.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return L});var L=function(){function _(S,p){this.subtle=void 0,this.key=void 0,this.subtle=S,this.key=p}var g=_.prototype;return g.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},_}()},"./src/demux/aacdemuxer.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/demux/base-audio-demuxer.ts"),_=T("./src/demux/adts.ts"),g=T("./src/utils/logger.ts"),S=T("./src/demux/id3.ts");function p(r,d){r.prototype=Object.create(d.prototype),r.prototype.constructor=r,o(r,d)}function o(r,d){return o=Object.setPrototypeOf||function(h,E){return h.__proto__=E,h},o(r,d)}var i=function(r){p(d,r);function d(h,E){var y;return y=r.call(this)||this,y.observer=void 0,y.config=void 0,y.observer=h,y.config=E,y}var f=d.prototype;return f.resetInitSegment=function(E,y,l){r.prototype.resetInitSegment.call(this,E,y,l),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:E,duration:l,inputTimeScale:9e4,dropped:0}},d.probe=function(E){if(!E)return!1;for(var y=S.getID3Data(E,0)||[],l=y.length,n=E.length;l<n;l++)if(_.probe(E,l))return g.logger.log("ADTS sync word found !"),!0;return!1},f.canParse=function(E,y){return _.canParse(E,y)},f.appendFrame=function(E,y,l){_.initTrackConfig(E,this.observer,y,l,E.manifestCodec);var n=_.appendFrame(E,y,l,this.initPTS,this.frameIndex);if(n&&n.missing===0)return n},d}(L.default);i.minProbeByteLength=9,m.default=i},"./src/demux/adts.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"getAudioConfig",function(){return S}),T.d(m,"isHeaderPattern",function(){return p}),T.d(m,"getHeaderLength",function(){return o}),T.d(m,"getFullFrameLength",function(){return i}),T.d(m,"canGetFrameLength",function(){return r}),T.d(m,"isHeader",function(){return d}),T.d(m,"canParse",function(){return f}),T.d(m,"probe",function(){return h}),T.d(m,"initTrackConfig",function(){return E}),T.d(m,"getFrameDuration",function(){return y}),T.d(m,"parseFrameHeader",function(){return l}),T.d(m,"appendFrame",function(){return n});var L=T("./src/utils/logger.ts"),_=T("./src/errors.ts"),g=T("./src/events.ts");function S(s,u,w,v){var a,R,D,c,b=navigator.userAgent.toLowerCase(),x=v,C=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];a=((u[w+2]&192)>>>6)+1;var F=(u[w+2]&60)>>>2;if(F>C.length-1){s.trigger(g.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+F});return}return D=(u[w+2]&1)<<2,D|=(u[w+3]&192)>>>6,L.logger.log("manifest codec:"+v+", ADTS type:"+a+", samplingIndex:"+F),/firefox/i.test(b)?F>=6?(a=5,c=new Array(4),R=F-3):(a=2,c=new Array(2),R=F):b.indexOf("android")!==-1?(a=2,c=new Array(2),R=F):(a=5,c=new Array(4),v&&(v.indexOf("mp4a.40.29")!==-1||v.indexOf("mp4a.40.5")!==-1)||!v&&F>=6?R=F-3:((v&&v.indexOf("mp4a.40.2")!==-1&&(F>=6&&D===1||/vivaldi/i.test(b))||!v&&D===1)&&(a=2,c=new Array(2)),R=F)),c[0]=a<<3,c[0]|=(F&14)>>1,c[1]|=(F&1)<<7,c[1]|=D<<3,a===5&&(c[1]|=(R&14)>>1,c[2]=(R&1)<<7,c[2]|=2<<2,c[3]=0),{config:c,samplerate:C[F],channelCount:D,codec:"mp4a.40."+a,manifestCodec:x}}function p(s,u){return s[u]===255&&(s[u+1]&246)===240}function o(s,u){return s[u+1]&1?7:9}function i(s,u){return(s[u+3]&3)<<11|s[u+4]<<3|(s[u+5]&224)>>>5}function r(s,u){return u+5<s.length}function d(s,u){return u+1<s.length&&p(s,u)}function f(s,u){return r(s,u)&&p(s,u)&&i(s,u)<=s.length-u}function h(s,u){if(d(s,u)){var w=o(s,u);if(u+w>=s.length)return!1;var v=i(s,u);if(v<=w)return!1;var a=u+v;return a===s.length||d(s,a)}return!1}function E(s,u,w,v,a){if(!s.samplerate){var R=S(u,w,v,a);if(!R)return;s.config=R.config,s.samplerate=R.samplerate,s.channelCount=R.channelCount,s.codec=R.codec,s.manifestCodec=R.manifestCodec,L.logger.log("parsed codec:"+s.codec+", rate:"+R.samplerate+", channels:"+R.channelCount)}}function y(s){return 1024*9e4/s}function l(s,u,w,v,a){var R=o(s,u),D=i(s,u);if(D-=R,D>0){var c=w+v*a;return{headerLength:R,frameLength:D,stamp:c}}}function n(s,u,w,v,a){var R=y(s.samplerate),D=l(u,w,v,a,R);if(D){var c=D.frameLength,b=D.headerLength,x=D.stamp,C=b+c,F=Math.max(0,w+C-u.length),j;F?(j=new Uint8Array(C-b),j.set(u.subarray(w+b,u.length),0)):j=u.subarray(w+b,w+C);var k={unit:j,pts:x};return F||s.samples.push(k),{sample:k,length:C,missing:F}}}},"./src/demux/base-audio-demuxer.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"initPTSFn",function(){return i});var L=T("./src/polyfills/number.ts"),_=T("./src/demux/id3.ts"),g=T("./src/demux/dummy-demuxed-track.ts"),S=T("./src/utils/mp4-tools.ts"),p=T("./src/utils/typed-array.ts"),o=function(){function r(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var d=r.prototype;return d.resetInitSegment=function(h,E,y){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},d.resetTimeStamp=function(){},d.resetContiguity=function(){},d.canParse=function(h,E){return!1},d.appendFrame=function(h,E,y){},d.demux=function(h,E){this.cachedData&&(h=Object(S.appendUint8Array)(this.cachedData,h),this.cachedData=null);var y=_.getID3Data(h,0),l=y?y.length:0,n,s,u=this._audioTrack,w=this._id3Track,v=y?_.getTimeStamp(y):void 0,a=h.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=i(v,E)),y&&y.length>0&&w.samples.push({pts:this.initPTS,dts:this.initPTS,data:y}),s=this.initPTS;l<a;){if(this.canParse(h,l)){var R=this.appendFrame(u,h,l);R?(this.frameIndex++,s=R.sample.pts,l+=R.length,n=l):l=a}else _.canParse(h,l)?(y=_.getID3Data(h,l),w.samples.push({pts:s,dts:s,data:y}),l+=y.length,n=l):l++;if(l===a&&n!==a){var D=Object(p.sliceUint8)(h,n);this.cachedData?this.cachedData=Object(S.appendUint8Array)(this.cachedData,D):this.cachedData=D}}return{audioTrack:u,avcTrack:Object(g.dummyTrack)(),id3Track:w,textTrack:Object(g.dummyTrack)()}},d.demuxSampleAes=function(h,E,y){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},d.flush=function(h){var E=this.cachedData;return E&&(this.cachedData=null,this.demux(E,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(g.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(g.dummyTrack)()}},d.destroy=function(){},r}(),i=function(d,f){return Object(L.isFiniteNumber)(d)?d*90:f*9e4};m.default=o},"./src/demux/chunk-cache.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return L});var L=function(){function g(){this.chunks=[],this.dataLength=0}var S=g.prototype;return S.push=function(o){this.chunks.push(o),this.dataLength+=o.length},S.flush=function(){var o=this.chunks,i=this.dataLength,r;if(o.length)o.length===1?r=o[0]:r=_(o,i);else return new Uint8Array(0);return this.reset(),r},S.reset=function(){this.chunks.length=0,this.dataLength=0},g}();function _(g,S){for(var p=new Uint8Array(S),o=0,i=0;i<g.length;i++){var r=g[i];p.set(r,o),o+=r.length}return p}},"./src/demux/dummy-demuxed-track.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"dummyTrack",function(){return L});function L(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/utils/logger.ts"),_=function(){function g(p){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=p,this.bytesAvailable=p.byteLength,this.word=0,this.bitsAvailable=0}var S=g.prototype;return S.loadWord=function(){var o=this.data,i=this.bytesAvailable,r=o.byteLength-i,d=new Uint8Array(4),f=Math.min(4,i);if(f===0)throw new Error("no bytes available");d.set(o.subarray(r,r+f)),this.word=new DataView(d.buffer).getUint32(0),this.bitsAvailable=f*8,this.bytesAvailable-=f},S.skipBits=function(o){var i;this.bitsAvailable>o?(this.word<<=o,this.bitsAvailable-=o):(o-=this.bitsAvailable,i=o>>3,o-=i>>3,this.bytesAvailable-=i,this.loadWord(),this.word<<=o,this.bitsAvailable-=o)},S.readBits=function(o){var i=Math.min(this.bitsAvailable,o),r=this.word>>>32-i;return o>32&&L.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=i,this.bitsAvailable>0?this.word<<=i:this.bytesAvailable>0&&this.loadWord(),i=o-i,i>0&&this.bitsAvailable?r<<i|this.readBits(i):r},S.skipLZ=function(){var o;for(o=0;o<this.bitsAvailable;++o)if((this.word&2147483648>>>o)!==0)return this.word<<=o,this.bitsAvailable-=o,o;return this.loadWord(),o+this.skipLZ()},S.skipUEG=function(){this.skipBits(1+this.skipLZ())},S.skipEG=function(){this.skipBits(1+this.skipLZ())},S.readUEG=function(){var o=this.skipLZ();return this.readBits(o+1)-1},S.readEG=function(){var o=this.readUEG();return 1&o?1+o>>>1:-1*(o>>>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(o){for(var i=8,r=8,d,f=0;f<o;f++)r!==0&&(d=this.readEG(),r=(i+d+256)%256),i=r===0?i:r},S.readSPS=function(){var o=0,i=0,r=0,d=0,f,h,E,y=this.readUByte.bind(this),l=this.readBits.bind(this),n=this.readUEG.bind(this),s=this.readBoolean.bind(this),u=this.skipBits.bind(this),w=this.skipEG.bind(this),v=this.skipUEG.bind(this),a=this.skipScalingList.bind(this);y();var R=y();if(l(5),u(3),y(),v(),R===100||R===110||R===122||R===244||R===44||R===83||R===86||R===118||R===128){var D=n();if(D===3&&u(1),v(),v(),u(1),s())for(h=D!==3?8:12,E=0;E<h;E++)s()&&(E<6?a(16):a(64))}v();var c=n();if(c===0)n();else if(c===1)for(u(1),w(),w(),f=n(),E=0;E<f;E++)w();v(),u(1);var b=n(),x=n(),C=l(1);C===0&&u(1),u(1),s()&&(o=n(),i=n(),r=n(),d=n());var F=[1,1];if(s()&&s()){var j=y();switch(j){case 1:F=[1,1];break;case 2:F=[12,11];break;case 3:F=[10,11];break;case 4:F=[16,11];break;case 5:F=[40,33];break;case 6:F=[24,11];break;case 7:F=[20,11];break;case 8:F=[32,11];break;case 9:F=[80,33];break;case 10:F=[18,11];break;case 11:F=[15,11];break;case 12:F=[64,33];break;case 13:F=[160,99];break;case 14:F=[4,3];break;case 15:F=[3,2];break;case 16:F=[2,1];break;case 255:{F=[y()<<8|y(),y()<<8|y()];break}}}return{width:Math.ceil((b+1)*16-o*2-i*2),height:(2-C)*(x+1)*16-(C?2:4)*(r+d),pixelRatio:F}},S.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},g}();m.default=_},"./src/demux/id3.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"isHeader",function(){return L}),T.d(m,"isFooter",function(){return _}),T.d(m,"getID3Data",function(){return g}),T.d(m,"canParse",function(){return p}),T.d(m,"getTimeStamp",function(){return o}),T.d(m,"isTimeStampFrame",function(){return i}),T.d(m,"getID3Frames",function(){return d}),T.d(m,"decodeFrame",function(){return f}),T.d(m,"utf8ArrayToStr",function(){return n}),T.d(m,"testables",function(){return s});var L=function(a,R){return R+10<=a.length&&(a[R]===73&&a[R+1]===68&&a[R+2]===51&&(a[R+3]<255&&a[R+4]<255&&(a[R+6]<128&&a[R+7]<128&&a[R+8]<128&&a[R+9]<128)))},_=function(a,R){return R+10<=a.length&&(a[R]===51&&a[R+1]===68&&a[R+2]===73&&(a[R+3]<255&&a[R+4]<255&&(a[R+6]<128&&a[R+7]<128&&a[R+8]<128&&a[R+9]<128)))},g=function(a,R){for(var D=R,c=0;L(a,R);){c+=10;var b=S(a,R+6);c+=b,_(a,R+10)&&(c+=10),R+=c}return c>0?a.subarray(D,D+c):void 0},S=function(a,R){var D=0;return D=(a[R]&127)<<21,D|=(a[R+1]&127)<<14,D|=(a[R+2]&127)<<7,D|=a[R+3]&127,D},p=function(a,R){return L(a,R)&&S(a,R+6)+10<=a.length-R},o=function(a){for(var R=d(a),D=0;D<R.length;D++){var c=R[D];if(i(c))return l(c)}return},i=function(a){return a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp"},r=function(a){var R=String.fromCharCode(a[0],a[1],a[2],a[3]),D=S(a,4),c=10;return{type:R,size:D,data:a.subarray(c,c+D)}},d=function(a){for(var R=0,D=[];L(a,R);){var c=S(a,R+6);R+=10;for(var b=R+c;R+8<b;){var x=r(a.subarray(R)),C=f(x);C&&D.push(C),R+=x.size+10}_(a,R)&&(R+=10)}return D},f=function(a){return a.type==="PRIV"?h(a):a.type[0]==="W"?y(a):E(a)},h=function(a){if(a.size<2)return;var R=n(a.data,!0),D=new Uint8Array(a.data.subarray(R.length+1));return{key:a.type,info:R,data:D.buffer}},E=function(a){if(a.size<2)return;if(a.type==="TXXX"){var R=1,D=n(a.data.subarray(R),!0);R+=D.length+1;var c=n(a.data.subarray(R));return{key:a.type,info:D,data:c}}var b=n(a.data.subarray(1));return{key:a.type,data:b}},y=function(a){if(a.type==="WXXX"){if(a.size<2)return;var R=1,D=n(a.data.subarray(R),!0);R+=D.length+1;var c=n(a.data.subarray(R));return{key:a.type,info:D,data:c}}var b=n(a.data);return{key:a.type,data:b}},l=function(a){if(a.data.byteLength===8){var R=new Uint8Array(a.data),D=R[3]&1,c=(R[4]<<23)+(R[5]<<15)+(R[6]<<7)+R[7];return c/=45,D&&(c+=4772185884e-2),Math.round(c)}return},n=function(a,R){R===void 0&&(R=!1);var D=w();if(D){var c=D.decode(a);if(R){var b=c.indexOf("\0");return b!==-1?c.substring(0,b):c}return c.replace(/\0/g,"")}for(var x=a.length,C,F,j,k="",X=0;X<x;){if(C=a[X++],C===0&&R)return k;if(C===0||C===3)continue;switch(C>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:k+=String.fromCharCode(C);break;case 12:case 13:F=a[X++],k+=String.fromCharCode((C&31)<<6|F&63);break;case 14:F=a[X++],j=a[X++],k+=String.fromCharCode((C&15)<<12|(F&63)<<6|(j&63)<<0);break;default:}}return k},s={decodeTextFrame:E},u;function w(){return!u&&typeof self.TextDecoder!="undefined"&&(u=new self.TextDecoder("utf-8")),u}},"./src/demux/mp3demuxer.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/demux/base-audio-demuxer.ts"),_=T("./src/demux/id3.ts"),g=T("./src/utils/logger.ts"),S=T("./src/demux/mpegaudio.ts");function p(r,d){r.prototype=Object.create(d.prototype),r.prototype.constructor=r,o(r,d)}function o(r,d){return o=Object.setPrototypeOf||function(h,E){return h.__proto__=E,h},o(r,d)}var i=function(r){p(d,r);function d(){return r.apply(this,arguments)||this}var f=d.prototype;return f.resetInitSegment=function(E,y,l){r.prototype.resetInitSegment.call(this,E,y,l),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:E,duration:l,inputTimeScale:9e4,dropped:0}},d.probe=function(E){if(!E)return!1;for(var y=_.getID3Data(E,0)||[],l=y.length,n=E.length;l<n;l++)if(S.probe(E,l))return g.logger.log("MPEG Audio sync word found !"),!0;return!1},f.canParse=function(E,y){return S.canParse(E,y)},f.appendFrame=function(E,y,l){return this.initPTS===null?void 0:S.appendFrame(E,y,l,this.initPTS,this.frameIndex)},d}(L.default);i.minProbeByteLength=4,m.default=i},"./src/demux/mp4demuxer.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/utils/mp4-tools.ts"),_=T("./src/demux/dummy-demuxed-track.ts"),g=function(){function S(o,i){this.remainderData=null,this.config=void 0,this.config=i}var p=S.prototype;return p.resetTimeStamp=function(){},p.resetInitSegment=function(){},p.resetContiguity=function(){},S.probe=function(i){return Object(L.findBox)({data:i,start:0,end:Math.min(i.length,16384)},["moof"]).length>0},p.demux=function(i){var r=i,d=Object(_.dummyTrack)();if(this.config.progressive){this.remainderData&&(r=Object(L.appendUint8Array)(this.remainderData,i));var f=Object(L.segmentValidRange)(r);this.remainderData=f.remainder,d.samples=f.valid||new Uint8Array}else d.samples=r;return{audioTrack:Object(_.dummyTrack)(),avcTrack:d,id3Track:Object(_.dummyTrack)(),textTrack:Object(_.dummyTrack)()}},p.flush=function(){var i=Object(_.dummyTrack)();return i.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(_.dummyTrack)(),avcTrack:i,id3Track:Object(_.dummyTrack)(),textTrack:Object(_.dummyTrack)()}},p.demuxSampleAes=function(i,r,d){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},p.destroy=function(){},S}();g.minProbeByteLength=1024,m.default=g},"./src/demux/mpegaudio.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"appendFrame",function(){return o}),T.d(m,"parseHeader",function(){return i}),T.d(m,"isHeaderPattern",function(){return r}),T.d(m,"isHeader",function(){return d}),T.d(m,"canParse",function(){return f}),T.d(m,"probe",function(){return h});var L=null,_=[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],g=[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]],p=[0,1,1,4];function o(E,y,l,n,s){if(l+24>y.length)return;var u=i(y,l);if(u&&l+u.frameLength<=y.length){var w=u.samplesPerFrame*9e4/u.sampleRate,v=n+s*w,a={unit:y.subarray(l,l+u.frameLength),pts:v,dts:v};return E.config=[],E.channelCount=u.channelCount,E.samplerate=u.sampleRate,E.samples.push(a),{sample:a,length:u.frameLength,missing:0}}}function i(E,y){var l=E[y+1]>>3&3,n=E[y+1]>>1&3,s=E[y+2]>>4&15,u=E[y+2]>>2&3;if(l!==1&&s!==0&&s!==15&&u!==3){var w=E[y+2]>>1&1,v=E[y+3]>>6,a=l===3?3-n:n===3?3:4,R=_[a*14+s-1]*1e3,D=l===3?0:l===2?1:2,c=g[D*3+u],b=v===3?1:2,x=S[l][n],C=p[n],F=x*8*C,j=Math.floor(x*R/c+w)*C;if(L===null){var k=navigator.userAgent||"",X=k.match(/Chrome\/(\d+)/i);L=X?parseInt(X[1]):0}var G=!!L&&L<=87;return G&&n===2&&R>=224e3&&v===0&&(E[y+3]=E[y+3]|128),{sampleRate:c,channelCount:b,frameLength:j,samplesPerFrame:F}}}function r(E,y){return E[y]===255&&(E[y+1]&224)===224&&(E[y+1]&6)!==0}function d(E,y){return y+1<E.length&&r(E,y)}function f(E,y){var l=4;return r(E,y)&&l<=E.length-y}function h(E,y){if(y+1<E.length&&r(E,y)){var l=4,n=i(E,y),s=l;n!=null&&n.frameLength&&(s=n.frameLength);var u=y+s;return u===E.length||d(E,u)}return!1}},"./src/demux/sample-aes.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/crypt/decrypter.ts"),_=T("./src/demux/tsdemuxer.ts"),g=function(){function S(o,i,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new L.default(o,i,{removePKCS7Padding:!1})}var p=S.prototype;return p.decryptBuffer=function(i,r){this.decrypter.decrypt(i,this.keyData.key.buffer,this.keyData.iv.buffer,r)},p.decryptAacSample=function(i,r,d,f){var h=i[r].unit,E=h.subarray(16,h.length-h.length%16),y=E.buffer.slice(E.byteOffset,E.byteOffset+E.length),l=this;this.decryptBuffer(y,function(n){var s=new Uint8Array(n);h.set(s,16),f||l.decryptAacSamples(i,r+1,d)})},p.decryptAacSamples=function(i,r,d){for(;;r++){if(r>=i.length){d();return}if(i[r].unit.length<32)continue;var f=this.decrypter.isSync();if(this.decryptAacSample(i,r,d,f),!f)return}},p.getAvcEncryptedData=function(i){for(var r=Math.floor((i.length-48)/160)*16+16,d=new Int8Array(r),f=0,h=32;h<=i.length-16;h+=160,f+=16)d.set(i.subarray(h,h+16),f);return d},p.getAvcDecryptedUnit=function(i,r){for(var d=new Uint8Array(r),f=0,h=32;h<=i.length-16;h+=160,f+=16)i.set(d.subarray(f,f+16),h);return i},p.decryptAvcSample=function(i,r,d,f,h,E){var y=Object(_.discardEPB)(h.data),l=this.getAvcEncryptedData(y),n=this;this.decryptBuffer(l.buffer,function(s){h.data=n.getAvcDecryptedUnit(y,s),E||n.decryptAvcSamples(i,r,d+1,f)})},p.decryptAvcSamples=function(i,r,d,f){if(i instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;r++,d=0){if(r>=i.length){f();return}for(var h=i[r].units;!(d>=h.length);d++){var E=h[d];if(E.data.length<=48||E.type!==1&&E.type!==5)continue;var y=this.decrypter.isSync();if(this.decryptAvcSample(i,r,d,f,E,y),!y)return}}},S}();m.default=g},"./src/demux/transmuxer-interface.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return h});var L=T("./node_modules/webworkify-webpack/index.js"),_=T.n(L),g=T("./src/events.ts"),S=T("./src/demux/transmuxer.ts"),p=T("./src/utils/logger.ts"),o=T("./src/errors.ts"),i=T("./src/utils/mediasource-helper.ts"),r=T("./node_modules/eventemitter3/index.js"),d=T.n(r),f=Object(i.getMediaSource)()||{isTypeSupported:function(){return!1}},h=function(){function E(l,n,s,u){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=l,this.id=n,this.onTransmuxComplete=s,this.onFlush=u;var v=l.config,a=function(x,C){C=C||{},C.frag=w.frag,C.id=w.id,l.trigger(x,C)};this.observer=new r.EventEmitter,this.observer.on(g.Events.FRAG_DECRYPTED,a),this.observer.on(g.Events.ERROR,a);var R={mp4:f.isTypeSupported("video/mp4"),mpeg:f.isTypeSupported("audio/mpeg"),mp3:f.isTypeSupported('audio/mp4; codecs="mp3"')},D=navigator.vendor;if(v.enableWorker&&typeof Worker!="undefined"){p.logger.log("demuxing in webworker");var c;try{c=this.worker=L("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),c.addEventListener("message",this.onwmsg),c.onerror=function(b){l.trigger(g.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(b.message+" ("+b.filename+":"+b.lineno+")")})},c.postMessage({cmd:"init",typeSupported:R,vendor:D,id:n,config:JSON.stringify(v)})}catch(b){p.logger.warn("Error in worker:",b),p.logger.error("Error while initializing DemuxerWorker, fallback to inline"),c&&self.URL.revokeObjectURL(c.objectURL),this.transmuxer=new S.default(this.observer,R,v,D,n),this.worker=null}}else this.transmuxer=new S.default(this.observer,R,v,D,n)}var y=E.prototype;return y.destroy=function(){var n=this.worker;if(n)n.removeEventListener("message",this.onwmsg),n.terminate(),this.worker=null;else{var s=this.transmuxer;s&&(s.destroy(),this.transmuxer=null)}var u=this.observer;u&&u.removeAllListeners(),this.observer=null},y.push=function(n,s,u,w,v,a,R,D,c,b){var x=this;c.transmuxing.start=self.performance.now();var C=this.transmuxer,F=this.worker,j=a?a.start:v.start,k=v.decryptdata,X=this.frag,G=!(X&&v.cc===X.cc),W=!(X&&c.level===X.level),K=X?c.sn-X.sn:-1,B=this.part?c.part-this.part.index:1,U=!W&&(K===1||K===0&&B===1),H=self.performance.now();(W||K||v.stats.parsing.start===0)&&(v.stats.parsing.start=H),a&&(B||!U)&&(a.stats.parsing.start=H);var q=new S.TransmuxState(G,U,D,W,j);if(!U||G){p.logger.log("[transmuxer-interface, "+v.type+"]: Starting new transmux session for sn: "+c.sn+" p: "+c.part+" level: "+c.level+" id: "+c.id+`
|
|
|
discontinuity: `+G+`
|
|
|
trackSwitch: `+W+`
|
|
|
contiguous: `+U+`
|
|
|
accurateTimeOffset: `+D+`
|
|
|
timeOffset: `+j);var ie=new S.TransmuxConfig(u,w,s,R,b);this.configureTransmuxer(ie)}if(this.frag=v,this.part=a,F)F.postMessage({cmd:"demux",data:n,decryptdata:k,chunkMeta:c,state:q},n instanceof ArrayBuffer?[n]:[]);else if(C){var ce=C.push(n,k,c,q);Object(S.isPromise)(ce)?ce.then(function(he){x.handleTransmuxComplete(he)}):this.handleTransmuxComplete(ce)}},y.flush=function(n){var s=this;n.transmuxing.start=self.performance.now();var u=this.transmuxer,w=this.worker;if(w)w.postMessage({cmd:"flush",chunkMeta:n});else if(u){var v=u.flush(n);Object(S.isPromise)(v)?v.then(function(a){s.handleFlushResult(a,n)}):this.handleFlushResult(v,n)}},y.handleFlushResult=function(n,s){var u=this;n.forEach(function(w){u.handleTransmuxComplete(w)}),this.onFlush(s)},y.onWorkerMessage=function(n){var s=n.data,u=this.hls;switch(s.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(s.data);break}case"flush":{this.onFlush(s.data);break}default:{s.data=s.data||{},s.data.frag=this.frag,s.data.id=this.id,u.trigger(s.event,s.data);break}}},y.configureTransmuxer=function(n){var s=this.worker,u=this.transmuxer;s?s.postMessage({cmd:"configure",config:n}):u&&u.configure(n)},y.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},E}()},"./src/demux/transmuxer-worker.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return o});var L=T("./src/demux/transmuxer.ts"),_=T("./src/events.ts"),g=T("./src/utils/logger.ts"),S=T("./node_modules/eventemitter3/index.js"),p=T.n(S);function o(h){var E=new S.EventEmitter,y=function(n,s){h.postMessage({event:n,data:s})};E.on(_.Events.FRAG_DECRYPTED,y),E.on(_.Events.ERROR,y),h.addEventListener("message",function(l){var n=l.data;switch(n.cmd){case"init":{var s=JSON.parse(n.config);h.transmuxer=new L.default(E,n.typeSupported,s,n.vendor,n.id),Object(g.enableLogs)(s.debug),y("init",null);break}case"configure":{h.transmuxer.configure(n.config);break}case"demux":{var u=h.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(L.isPromise)(u)?u.then(function(a){i(h,a)}):i(h,u);break}case"flush":{var w=n.chunkMeta,v=h.transmuxer.flush(w);Object(L.isPromise)(v)?v.then(function(a){d(h,a,w)}):d(h,v,w);break}default:break}})}function i(h,E){if(f(E.remuxResult))return;var y=[],l=E.remuxResult,n=l.audio,s=l.video;n&&r(y,n),s&&r(y,s),h.postMessage({event:"transmuxComplete",data:E},y)}function r(h,E){E.data1&&h.push(E.data1.buffer),E.data2&&h.push(E.data2.buffer)}function d(h,E,y){E.forEach(function(l){i(h,l)}),h.postMessage({event:"flush",data:y})}function f(h){return!h.audio&&!h.video&&!h.text&&!h.id3&&!h.initSegment}},"./src/demux/transmuxer.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return s}),T.d(m,"isPromise",function(){return v}),T.d(m,"TransmuxConfig",function(){return a}),T.d(m,"TransmuxState",function(){return R});var L=T("./src/events.ts"),_=T("./src/errors.ts"),g=T("./src/crypt/decrypter.ts"),S=T("./src/demux/aacdemuxer.ts"),p=T("./src/demux/mp4demuxer.ts"),o=T("./src/demux/tsdemuxer.ts"),i=T("./src/demux/mp3demuxer.ts"),r=T("./src/remux/mp4-remuxer.ts"),d=T("./src/remux/passthrough-remuxer.ts"),f=T("./src/demux/chunk-cache.ts"),h=T("./src/utils/mp4-tools.ts"),E=T("./src/utils/logger.ts"),y;try{y=self.performance.now.bind(self.performance)}catch(D){E.logger.debug("Unable to use Performance API on this environment"),y=self.Date.now}var l=[{demux:o.default,remux:r.default},{demux:p.default,remux:d.default},{demux:S.default,remux:r.default},{demux:i.default,remux:r.default}],n=1024;l.forEach(function(D){var c=D.demux;n=Math.max(n,c.minProbeByteLength)});var s=function(){function D(b,x,C,F,j){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new f.default,this.observer=b,this.typeSupported=x,this.config=C,this.vendor=F,this.id=j}var c=D.prototype;return c.configure=function(x){this.transmuxConfig=x,this.decrypter&&this.decrypter.reset()},c.push=function(x,C,F,j){var k=this,X=F.transmuxing;X.executeStart=y();var G=new Uint8Array(x),W=this.cache,K=this.config,B=this.currentTransmuxState,U=this.transmuxConfig;j&&(this.currentTransmuxState=j);var H=u(G,C);if(H&&H.method==="AES-128"){var q=this.getDecrypter();if(K.enableSoftwareAES){var ie=q.softwareDecrypt(G,H.key.buffer,H.iv.buffer);if(!ie)return X.executeEnd=y(),w(F);G=new Uint8Array(ie)}else return this.decryptionPromise=q.webCryptoDecrypt(G,H.key.buffer,H.iv.buffer).then(function(Y){var z=k.push(Y,null,F);return k.decryptionPromise=null,z}),this.decryptionPromise}var ce=j||B,he=ce.contiguous,be=ce.discontinuity,ne=ce.trackSwitch,le=ce.accurateTimeOffset,ue=ce.timeOffset,te=U.audioCodec,oe=U.videoCodec,Q=U.defaultInitPts,se=U.duration,J=U.initSegmentData;if((be||ne)&&this.resetInitSegment(J,te,oe,se),be&&this.resetInitialTimestamp(Q),he||this.resetContiguity(),this.needsProbing(G,be,ne)){if(W.dataLength){var ee=W.flush();G=Object(h.appendUint8Array)(ee,G)}this.configureTransmuxer(G,U)}var ge=this.transmux(G,H,ue,le,F),re=this.currentTransmuxState;return re.contiguous=!0,re.discontinuity=!1,re.trackSwitch=!1,X.executeEnd=y(),ge},c.flush=function(x){var C=this,F=x.transmuxing;F.executeStart=y();var j=this.decrypter,k=this.cache,X=this.currentTransmuxState,G=this.decryptionPromise;if(G)return G.then(function(){return C.flush(x)});var W=[],K=X.timeOffset;if(j){var B=j.flush();B&&W.push(this.push(B,null,x))}var U=k.dataLength;k.reset();var H=this.demuxer,q=this.remuxer;if(!H||!q)return U>=n&&this.observer.emit(L.Events.ERROR,L.Events.ERROR,{type:_.ErrorTypes.MEDIA_ERROR,details:_.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),F.executeEnd=y(),[w(x)];var ie=H.flush(K);return v(ie)?ie.then(function(ce){return C.flushRemux(W,ce,x),W}):(this.flushRemux(W,ie,x),W)},c.flushRemux=function(x,C,F){var j=C.audioTrack,k=C.avcTrack,X=C.id3Track,G=C.textTrack,W=this.currentTransmuxState,K=W.accurateTimeOffset,B=W.timeOffset;E.logger.log("[transmuxer.ts]: Flushed fragment "+F.sn+(F.part>-1?" p: "+F.part:"")+" of level "+F.level);var U=this.remuxer.remux(j,k,X,G,B,K,!0,this.id);x.push({remuxResult:U,chunkMeta:F}),F.transmuxing.executeEnd=y()},c.resetInitialTimestamp=function(x){var C=this.demuxer,F=this.remuxer;if(!C||!F)return;C.resetTimeStamp(x),F.resetTimeStamp(x)},c.resetContiguity=function(){var x=this.demuxer,C=this.remuxer;if(!x||!C)return;x.resetContiguity(),C.resetNextTimestamp()},c.resetInitSegment=function(x,C,F,j){var k=this.demuxer,X=this.remuxer;if(!k||!X)return;k.resetInitSegment(C,F,j),X.resetInitSegment(x,C,F)},c.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},c.transmux=function(x,C,F,j,k){var X;return C&&C.method==="SAMPLE-AES"?X=this.transmuxSampleAes(x,C,F,j,k):X=this.transmuxUnencrypted(x,F,j,k),X},c.transmuxUnencrypted=function(x,C,F,j){var k=this.demuxer.demux(x,C,!1,!this.config.progressive),X=k.audioTrack,G=k.avcTrack,W=k.id3Track,K=k.textTrack,B=this.remuxer.remux(X,G,W,K,C,F,!1,this.id);return{remuxResult:B,chunkMeta:j}},c.transmuxSampleAes=function(x,C,F,j,k){var X=this;return this.demuxer.demuxSampleAes(x,C,F).then(function(G){var W=X.remuxer.remux(G.audioTrack,G.avcTrack,G.id3Track,G.textTrack,F,j,!1,X.id);return{remuxResult:W,chunkMeta:k}})},c.configureTransmuxer=function(x,C){for(var F=this.config,j=this.observer,k=this.typeSupported,X=this.vendor,G=C.audioCodec,W=C.defaultInitPts,K=C.duration,B=C.initSegmentData,U=C.videoCodec,H,q=0,ie=l.length;q<ie;q++)if(l[q].demux.probe(x)){H=l[q];break}H||(E.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),H={demux:p.default,remux:d.default});var ce=this.demuxer,he=this.remuxer,be=H.remux,ne=H.demux;(!he||!(he instanceof be))&&(this.remuxer=new be(j,F,k,X)),(!ce||!(ce instanceof ne))&&(this.demuxer=new ne(j,F,k),this.probe=ne.probe),this.resetInitSegment(B,G,U,K),this.resetInitialTimestamp(W)},c.needsProbing=function(x,C,F){return!this.demuxer||!this.remuxer||C||F},c.getDecrypter=function(){var x=this.decrypter;return x||(x=this.decrypter=new g.default(this.observer,this.config)),x},D}();function u(D,c){var b=null;return D.byteLength>0&&c!=null&&c.key!=null&&c.iv!==null&&c.method!=null&&(b=c),b}var w=function(c){return{remuxResult:{},chunkMeta:c}};function v(D){return"then"in D&&D.then instanceof Function}var a=function(c,b,x,C,F){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=c,this.videoCodec=b,this.initSegmentData=x,this.duration=C,this.defaultInitPts=F},R=function(c,b,x,C,F){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=c,this.contiguous=b,this.accurateTimeOffset=x,this.trackSwitch=C,this.timeOffset=F}},"./src/demux/tsdemuxer.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"discardEPB",function(){return w});var L=T("./src/demux/adts.ts"),_=T("./src/demux/mpegaudio.ts"),g=T("./src/demux/exp-golomb.ts"),S=T("./src/demux/id3.ts"),p=T("./src/demux/sample-aes.ts"),o=T("./src/events.ts"),i=T("./src/utils/mp4-tools.ts"),r=T("./src/utils/logger.ts"),d=T("./src/errors.ts"),f={video:1,audio:2,id3:3,text:4},h=function(){function v(R,D,c){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=D,this.typeSupported=c}v.probe=function(D){var c=v.syncOffset(D);return c<0?!1:(c&&r.logger.warn("MPEG2-TS detected but first sync word found @ offset "+c+", junk ahead ?"),!0)},v.syncOffset=function(D){for(var c=Math.min(1e3,D.length-3*188),b=0;b<c;){if(D[b]===71&&D[b+188]===71&&D[b+2*188]===71)return b;b++}return-1},v.createTrack=function(D,c){return{container:D==="video"||D==="audio"?"video/mp2t":void 0,type:D,id:f[D],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:D==="audio"?c:void 0}};var a=v.prototype;return a.resetInitSegment=function(D,c,b){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=v.createTrack("video",b),this._audioTrack=v.createTrack("audio",b),this._id3Track=v.createTrack("id3",b),this._txtTrack=v.createTrack("text",b),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=D,this.videoCodec=c,this._duration=b},a.resetTimeStamp=function(){},a.resetContiguity=function(){var D=this._audioTrack,c=this._avcTrack,b=this._id3Track;D&&(D.pesData=null),c&&(c.pesData=null),b&&(b.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},a.demux=function(D,c,b,x){b===void 0&&(b=!1),x===void 0&&(x=!1),b||(this.sampleAes=null);var C,F=this._avcTrack,j=this._audioTrack,k=this._id3Track,X=F.pid,G=F.pesData,W=j.pid,K=k.pid,B=j.pesData,U=k.pesData,H=!1,q=this.pmtParsed,ie=this._pmtId,ce=D.length;if(this.remainderData&&(D=Object(i.appendUint8Array)(this.remainderData,D),ce=D.length,this.remainderData=null),ce<188&&!x)return this.remainderData=D,{audioTrack:j,avcTrack:F,id3Track:k,textTrack:this._txtTrack};var he=Math.max(0,v.syncOffset(D));ce-=(ce+he)%188,ce<D.byteLength&&!x&&(this.remainderData=new Uint8Array(D.buffer,ce,D.buffer.byteLength-ce));for(var be=he;be<ce;be+=188)if(D[be]===71){var ne=!!(D[be+1]&64),le=((D[be+1]&31)<<8)+D[be+2],ue=(D[be+3]&48)>>4,te=void 0;if(ue>1){if(te=be+5+D[be+4],te===be+188)continue}else te=be+4;switch(le){case X:ne&&(G&&(C=n(G))&&this.parseAVCPES(C,!1),G={data:[],size:0}),G&&(G.data.push(D.subarray(te,be+188)),G.size+=be+188-te);break;case W:ne&&(B&&(C=n(B))&&(j.isAAC?this.parseAACPES(C):this.parseMPEGPES(C)),B={data:[],size:0}),B&&(B.data.push(D.subarray(te,be+188)),B.size+=be+188-te);break;case K:ne&&(U&&(C=n(U))&&this.parseID3PES(C),U={data:[],size:0}),U&&(U.data.push(D.subarray(te,be+188)),U.size+=be+188-te);break;case 0:ne&&(te+=D[te]+1),ie=this._pmtId=y(D,te);break;case ie:{ne&&(te+=D[te]+1);var oe=l(D,te,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,b);X=oe.avc,X>0&&(F.pid=X),W=oe.audio,W>0&&(j.pid=W,j.isAAC=oe.isAAC),K=oe.id3,K>0&&(k.pid=K),H&&!q&&(r.logger.log("reparse from beginning"),H=!1,be=he-188),q=this.pmtParsed=!0;break}case 17:case 8191:break;default:H=!0;break}}else this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});F.pesData=G,j.pesData=B,k.pesData=U;var Q={audioTrack:j,avcTrack:F,id3Track:k,textTrack:this._txtTrack};return x&&this.extractRemainingSamples(Q),Q},a.flush=function(){var D=this.remainderData;this.remainderData=null;var c;return D?c=this.demux(D,-1,!1,!0):c={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(c),this.sampleAes?this.decrypt(c,this.sampleAes):c},a.extractRemainingSamples=function(D){var c=D.audioTrack,b=D.avcTrack,x=D.id3Track,C=b.pesData,F=c.pesData,j=x.pesData,k;C&&(k=n(C))?(this.parseAVCPES(k,!0),b.pesData=null):b.pesData=C,F&&(k=n(F))?(c.isAAC?this.parseAACPES(k):this.parseMPEGPES(k),c.pesData=null):(F!=null&&F.size&&r.logger.log("last AAC PES packet truncated,might overlap between fragments"),c.pesData=F),j&&(k=n(j))?(this.parseID3PES(k),x.pesData=null):x.pesData=j},a.demuxSampleAes=function(D,c,b){var x=this.demux(D,b,!0,!this.config.progressive),C=this.sampleAes=new p.default(this.observer,this.config,c);return this.decrypt(x,C)},a.decrypt=function(D,c){return new Promise(function(b){var x=D.audioTrack,C=D.avcTrack;x.samples&&x.isAAC?c.decryptAacSamples(x.samples,0,function(){C.samples?c.decryptAvcSamples(C.samples,0,0,function(){b(D)}):b(D)}):C.samples&&c.decryptAvcSamples(C.samples,0,0,function(){b(D)})})},a.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},a.parseAVCPES=function(D,c){var b=this,x=this._avcTrack,C=this.parseAVCNALu(D.data),F=!1,j=this.avcSample,k,X=!1;D.data=null,j&&C.length&&!x.audFound&&(s(j,x),j=this.avcSample=E(!1,D.pts,D.dts,"")),C.forEach(function(G){switch(G.type){case 1:{k=!0,j||(j=b.avcSample=E(!0,D.pts,D.dts,"")),F&&(j.debug+="NDR "),j.frame=!0;var W=G.data;if(X&&W.length>4){var K=new g.default(W).readSliceType();(K===2||K===4||K===7||K===9)&&(j.key=!0)}break}case 5:k=!0,j||(j=b.avcSample=E(!0,D.pts,D.dts,"")),F&&(j.debug+="IDR "),j.key=!0,j.frame=!0;break;case 6:{k=!0,F&&j&&(j.debug+="SEI ");var B=new g.default(w(G.data));B.readUByte();for(var U=0,H=0,q=!1,ie=0;!q&&B.bytesAvailable>1;){U=0;do ie=B.readUByte(),U+=ie;while(ie===255);H=0;do ie=B.readUByte(),H+=ie;while(ie===255);if(U===4&&B.bytesAvailable!==0){q=!0;var ce=B.readUByte();if(ce===181){var he=B.readUShort();if(he===49){var be=B.readUInt();if(be===1195456820){var ne=B.readUByte();if(ne===3){for(var le=B.readUByte(),ue=B.readUByte(),te=31&le,oe=[le,ue],Q=0;Q<te;Q++)oe.push(B.readUByte()),oe.push(B.readUByte()),oe.push(B.readUByte());u(b._txtTrack.samples,{type:3,pts:D.pts,bytes:oe})}}}}}else if(U===5&&B.bytesAvailable!==0){if(q=!0,H>16){for(var se=[],J=0;J<16;J++)se.push(B.readUByte().toString(16)),(J===3||J===5||J===7||J===9)&&se.push("-");for(var ee=H-16,ge=new Uint8Array(ee),re=0;re<ee;re++)ge[re]=B.readUByte();u(b._txtTrack.samples,{pts:D.pts,payloadType:U,uuid:se.join(""),userData:Object(S.utf8ArrayToStr)(ge),userDataBytes:ge})}}else if(H<B.bytesAvailable)for(var Y=0;Y<H;Y++)B.readUByte()}break}case 7:if(k=!0,X=!0,F&&j&&(j.debug+="SPS "),!x.sps){var z=new g.default(G.data),$=z.readSPS();x.width=$.width,x.height=$.height,x.pixelRatio=$.pixelRatio,x.sps=[G.data],x.duration=b._duration;for(var me=G.data.subarray(1,4),pe="avc1.",xe=0;xe<3;xe++){var Re=me[xe].toString(16);Re.length<2&&(Re="0"+Re),pe+=Re}x.codec=pe}break;case 8:k=!0,F&&j&&(j.debug+="PPS "),x.pps||(x.pps=[G.data]);break;case 9:k=!1,x.audFound=!0,j&&s(j,x),j=b.avcSample=E(!1,D.pts,D.dts,F?"AUD ":"");break;case 12:k=!1;break;default:k=!1,j&&(j.debug+="unknown NAL "+G.type+" ");break}if(j&&k){var ke=j.units;ke.push(G)}}),c&&j&&(s(j,x),this.avcSample=null)},a.getLastNalUnit=function(){var D,c=this.avcSample,b;if(!c||c.units.length===0){var x=this._avcTrack.samples;c=x[x.length-1]}if((D=c)!==null&&D!==void 0&&D.units){var C=c.units;b=C[C.length-1]}return b},a.parseAVCNALu=function(D){var c=D.byteLength,b=this._avcTrack,x=b.naluState||0,C=x,F=[],j=0,k,X,G,W=-1,K=0;for(x===-1&&(W=0,K=D[0]&31,x=0,j=1);j<c;){if(k=D[j++],!x){x=k?0:1;continue}if(x===1){x=k?0:2;continue}if(!k)x=3;else if(k===1){if(W>=0){var B={data:D.subarray(W,j-x-1),type:K};F.push(B)}else{var U=this.getLastNalUnit();if(U&&(C&&j<=4-C&&(U.state&&(U.data=U.data.subarray(0,U.data.byteLength-C))),X=j-x-1,X>0)){var H=new Uint8Array(U.data.byteLength+X);H.set(U.data,0),H.set(D.subarray(0,X),U.data.byteLength),U.data=H,U.state=0}}j<c?(G=D[j]&31,W=j,K=G,x=0):x=-1}else x=0}if(W>=0&&x>=0){var q={data:D.subarray(W,c),type:K,state:x};F.push(q)}if(F.length===0){var ie=this.getLastNalUnit();if(ie){var ce=new Uint8Array(ie.data.byteLength+D.byteLength);ce.set(ie.data,0),ce.set(D,ie.data.byteLength),ie.data=ce}}return b.naluState=x,F},a.parseAACPES=function(D){var c=0,b=this._audioTrack,x=this.aacOverFlow,C=D.data;if(x){this.aacOverFlow=null;var F=x.sample.unit.byteLength,j=Math.min(x.missing,F),k=F-j;x.sample.unit.set(C.subarray(0,j),k),b.samples.push(x.sample),c=x.missing}var X,G;for(X=c,G=C.length;X<G-1&&!L.isHeader(C,X);X++);if(X!==c){var W,K;if(X<G-1?(W="AAC PES did not start with ADTS header,offset:"+X,K=!1):(W="no ADTS header found in AAC PES",K=!0),r.logger.warn("parsing error:"+W),this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.FRAG_PARSING_ERROR,fatal:K,reason:W}),K)return}L.initTrackConfig(b,this.observer,C,X,this.audioCodec);var B;if(D.pts!==void 0)B=D.pts;else if(x){var U=L.getFrameDuration(b.samplerate);B=x.sample.pts+U}else{r.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var H=0;X<G;)if(L.isHeader(C,X)){if(X+5<G){var q=L.appendFrame(b,C,X,B,H);if(q)if(q.missing)this.aacOverFlow=q;else{X+=q.length,H++;continue}}break}else X++},a.parseMPEGPES=function(D){var c=D.data,b=c.length,x=0,C=0,F=D.pts;if(F===void 0){r.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;C<b;)if(_.isHeader(c,C)){var j=_.appendFrame(this._audioTrack,c,C,F,x);if(j)C+=j.length,x++;else break}else C++},a.parseID3PES=function(D){if(D.pts===void 0){r.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(D)},v}();h.minProbeByteLength=188;function E(v,a,R,D){return{key:v,frame:!1,pts:a,dts:R,units:[],debug:D,length:0}}function y(v,a){return(v[a+10]&31)<<8|v[a+11]}function l(v,a,R,D){var c={audio:-1,avc:-1,id3:-1,isAAC:!0},b=(v[a+1]&15)<<8|v[a+2],x=a+3+b-4,C=(v[a+10]&15)<<8|v[a+11];for(a+=12+C;a<x;){var F=(v[a+1]&31)<<8|v[a+2];switch(v[a]){case 207:if(!D){r.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:c.audio===-1&&(c.audio=F);break;case 21:c.id3===-1&&(c.id3=F);break;case 219:if(!D){r.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:c.avc===-1&&(c.avc=F);break;case 3:case 4:R?c.audio===-1&&(c.audio=F,c.isAAC=!1):r.logger.log("MPEG audio found, not supported in this browser");break;case 36:r.logger.warn("Unsupported HEVC stream type found");break;default:break}a+=((v[a+3]&15)<<8|v[a+4])+5}return c}function n(v){var a=0,R,D,c,b,x,C=v.data;if(!v||v.size===0)return null;for(;C[0].length<19&&C.length>1;){var F=new Uint8Array(C[0].length+C[1].length);F.set(C[0]),F.set(C[1],C[0].length),C[0]=F,C.splice(1,1)}R=C[0];var j=(R[0]<<16)+(R[1]<<8)+R[2];if(j===1){if(D=(R[4]<<8)+R[5],D&&D>v.size-6)return null;var k=R[7];k&192&&(b=(R[9]&14)*536870912+(R[10]&255)*4194304+(R[11]&254)*16384+(R[12]&255)*128+(R[13]&254)/2,k&64?(x=(R[14]&14)*536870912+(R[15]&255)*4194304+(R[16]&254)*16384+(R[17]&255)*128+(R[18]&254)/2,b-x>60*9e4&&(r.logger.warn(Math.round((b-x)/9e4)+"s delta between PTS and DTS, align them"),b=x)):x=b),c=R[8];var X=c+9;if(v.size<=X)return null;v.size-=X;for(var G=new Uint8Array(v.size),W=0,K=C.length;W<K;W++){R=C[W];var B=R.byteLength;if(X)if(X>B){X-=B;continue}else R=R.subarray(X),B-=X,X=0;G.set(R,a),a+=B}return D&&(D-=c+3),{data:G,pts:b,dts:x,len:D}}return null}function s(v,a){if(v.units.length&&v.frame){if(v.pts===void 0){var R=a.samples,D=R.length;if(D){var c=R[D-1];v.pts=c.pts,v.dts=c.dts}else{a.dropped++;return}}a.samples.push(v)}v.debug.length&&r.logger.log(v.pts+"/"+v.dts+":"+v.debug)}function u(v,a){var R=v.length;if(R>0){if(a.pts>=v[R-1].pts)v.push(a);else for(var D=R-1;D>=0;D--)if(a.pts<v[D].pts){v.splice(D,0,a);break}}else v.push(a)}function w(v){for(var a=v.byteLength,R=[],D=1;D<a-2;)v[D]===0&&v[D+1]===0&&v[D+2]===3?(R.push(D+2),D+=2):D++;if(R.length===0)return v;var c=a-R.length,b=new Uint8Array(c),x=0;for(D=0;D<c;x++,D++)x===R[0]&&(x++,R.shift()),b[D]=v[x];return b}m.default=h},"./src/errors.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"ErrorTypes",function(){return L}),T.d(m,"ErrorDetails",function(){return _});var L;(function(g){g.NETWORK_ERROR="networkError",g.MEDIA_ERROR="mediaError",g.KEY_SYSTEM_ERROR="keySystemError",g.MUX_ERROR="muxError",g.OTHER_ERROR="otherError"})(L||(L={}));var _;(function(g){g.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",g.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",g.KEY_SYSTEM_NO_SESSION="keySystemNoSession",g.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",g.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",g.MANIFEST_LOAD_ERROR="manifestLoadError",g.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",g.MANIFEST_PARSING_ERROR="manifestParsingError",g.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",g.LEVEL_EMPTY_ERROR="levelEmptyError",g.LEVEL_LOAD_ERROR="levelLoadError",g.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",g.LEVEL_SWITCH_ERROR="levelSwitchError",g.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",g.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",g.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",g.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",g.FRAG_LOAD_ERROR="fragLoadError",g.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",g.FRAG_DECRYPT_ERROR="fragDecryptError",g.FRAG_PARSING_ERROR="fragParsingError",g.REMUX_ALLOC_ERROR="remuxAllocError",g.KEY_LOAD_ERROR="keyLoadError",g.KEY_LOAD_TIMEOUT="keyLoadTimeOut",g.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",g.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",g.BUFFER_APPEND_ERROR="bufferAppendError",g.BUFFER_APPENDING_ERROR="bufferAppendingError",g.BUFFER_STALLED_ERROR="bufferStalledError",g.BUFFER_FULL_ERROR="bufferFullError",g.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",g.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",g.INTERNAL_EXCEPTION="internalException",g.INTERNAL_ABORTED="aborted",g.UNKNOWN="unknown"})(_||(_={}))},"./src/events.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"Events",function(){return L});var L;(function(_){_.MEDIA_ATTACHING="hlsMediaAttaching",_.MEDIA_ATTACHED="hlsMediaAttached",_.MEDIA_DETACHING="hlsMediaDetaching",_.MEDIA_DETACHED="hlsMediaDetached",_.BUFFER_RESET="hlsBufferReset",_.BUFFER_CODECS="hlsBufferCodecs",_.BUFFER_CREATED="hlsBufferCreated",_.BUFFER_APPENDING="hlsBufferAppending",_.BUFFER_APPENDED="hlsBufferAppended",_.BUFFER_EOS="hlsBufferEos",_.BUFFER_FLUSHING="hlsBufferFlushing",_.BUFFER_FLUSHED="hlsBufferFlushed",_.MANIFEST_LOADING="hlsManifestLoading",_.MANIFEST_LOADED="hlsManifestLoaded",_.MANIFEST_PARSED="hlsManifestParsed",_.LEVEL_SWITCHING="hlsLevelSwitching",_.LEVEL_SWITCHED="hlsLevelSwitched",_.LEVEL_LOADING="hlsLevelLoading",_.LEVEL_LOADED="hlsLevelLoaded",_.LEVEL_UPDATED="hlsLevelUpdated",_.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",_.LEVELS_UPDATED="hlsLevelsUpdated",_.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",_.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",_.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",_.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",_.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",_.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",_.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",_.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",_.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",_.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",_.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",_.CUES_PARSED="hlsCuesParsed",_.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",_.INIT_PTS_FOUND="hlsInitPtsFound",_.FRAG_LOADING="hlsFragLoading",_.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",_.FRAG_LOADED="hlsFragLoaded",_.FRAG_DECRYPTED="hlsFragDecrypted",_.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",_.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",_.FRAG_PARSING_METADATA="hlsFragParsingMetadata",_.FRAG_PARSED="hlsFragParsed",_.FRAG_BUFFERED="hlsFragBuffered",_.FRAG_CHANGED="hlsFragChanged",_.FPS_DROP="hlsFpsDrop",_.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",_.ERROR="hlsError",_.DESTROYING="hlsDestroying",_.KEY_LOADING="hlsKeyLoading",_.KEY_LOADED="hlsKeyLoaded",_.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",_.BACK_BUFFER_REACHED="hlsBackBufferReached"})(L||(L={}))},"./src/hls.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return v});var L=T("./node_modules/url-toolkit/src/url-toolkit.js"),_=T.n(L),g=T("./src/loader/playlist-loader.ts"),S=T("./src/loader/key-loader.ts"),p=T("./src/controller/id3-track-controller.ts"),o=T("./src/controller/latency-controller.ts"),i=T("./src/controller/level-controller.ts"),r=T("./src/controller/fragment-tracker.ts"),d=T("./src/controller/stream-controller.ts"),f=T("./src/is-supported.ts"),h=T("./src/utils/logger.ts"),E=T("./src/config.ts"),y=T("./node_modules/eventemitter3/index.js"),l=T.n(y),n=T("./src/events.ts"),s=T("./src/errors.ts");function u(a,R){for(var D=0;D<R.length;D++){var c=R[D];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}}function w(a,R,D){return R&&u(a.prototype,R),D&&u(a,D),a}var v=function(){a.isSupported=function(){return Object(f.isSupported)()};function a(D){D===void 0&&(D={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new y.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 c=this.config=Object(E.mergeConfig)(a.DefaultConfig,D);this.userConfig=D,Object(h.enableLogs)(c.debug),this._autoLevelCapping=-1,c.progressive&&Object(E.enableStreamingMode)(c);var b=c.abrController,x=c.bufferController,C=c.capLevelController,F=c.fpsController,j=this.abrController=new b(this),k=this.bufferController=new x(this),X=this.capLevelController=new C(this),G=new F(this),W=new g.default(this),K=new S.default(this),B=new p.default(this),U=this.levelController=new i.default(this),H=new r.FragmentTracker(this),q=this.streamController=new d.default(this,H);X.setStreamController(q),G.setStreamController(q);var ie=[U,q];this.networkControllers=ie;var ce=[W,K,j,k,X,G,B,H];this.audioTrackController=this.createController(c.audioTrackController,null,ie),this.createController(c.audioStreamController,H,ie),this.subtitleTrackController=this.createController(c.subtitleTrackController,null,ie),this.createController(c.subtitleStreamController,H,ie),this.createController(c.timelineController,null,ce),this.emeController=this.createController(c.emeController,null,ce),this.cmcdController=this.createController(c.cmcdController,null,ce),this.latencyController=this.createController(o.default,null,ce),this.coreComponents=ce}var R=a.prototype;return R.createController=function(c,b,x){if(c){var C=b?new c(this,b):new c(this);return x&&x.push(C),C}return null},R.on=function(c,b,x){x===void 0&&(x=this),this._emitter.on(c,b,x)},R.once=function(c,b,x){x===void 0&&(x=this),this._emitter.once(c,b,x)},R.removeAllListeners=function(c){this._emitter.removeAllListeners(c)},R.off=function(c,b,x,C){x===void 0&&(x=this),this._emitter.off(c,b,x,C)},R.listeners=function(c){return this._emitter.listeners(c)},R.emit=function(c,b,x){return this._emitter.emit(c,b,x)},R.trigger=function(c,b){if(this.config.debug)return this.emit(c,c,b);try{return this.emit(c,c,b)}catch(x){h.logger.error("An internal error happened while handling event "+c+'. Error message: "'+x.message+'". Here is a stacktrace:',x),this.trigger(n.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:c,error:x})}return!1},R.listenerCount=function(c){return this._emitter.listenerCount(c)},R.destroy=function(){h.logger.log("destroy"),this.trigger(n.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(c){return c.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(c){return c.destroy()}),this.coreComponents.length=0},R.attachMedia=function(c){h.logger.log("attachMedia"),this._media=c,this.trigger(n.Events.MEDIA_ATTACHING,{media:c})},R.detachMedia=function(){h.logger.log("detachMedia"),this.trigger(n.Events.MEDIA_DETACHING,void 0),this._media=null},R.loadSource=function(c){this.stopLoad();var b=this.media,x=this.url,C=this.url=L.buildAbsoluteURL(self.location.href,c,{alwaysNormalize:!0});h.logger.log("loadSource:"+C),b&&x&&x!==C&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(b)),this.trigger(n.Events.MANIFEST_LOADING,{url:c})},R.startLoad=function(c){c===void 0&&(c=-1),h.logger.log("startLoad("+c+")"),this.networkControllers.forEach(function(b){b.startLoad(c)})},R.stopLoad=function(){h.logger.log("stopLoad"),this.networkControllers.forEach(function(c){c.stopLoad()})},R.swapAudioCodec=function(){h.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},R.recoverMediaError=function(){h.logger.log("recoverMediaError");var c=this._media;this.detachMedia(),c&&this.attachMedia(c)},R.removeLevel=function(c,b){b===void 0&&(b=0),this.levelController.removeLevel(c,b)},w(a,[{key:"levels",get:function(){var c=this.levelController.levels;return c||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(c){h.logger.log("set currentLevel:"+c),this.loadLevel=c,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(c){h.logger.log("set nextLevel:"+c),this.levelController.manualLevel=c,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(c){h.logger.log("set loadLevel:"+c),this.levelController.manualLevel=c}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(c){this.levelController.nextLoadLevel=c}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(c){h.logger.log("set firstLevel:"+c),this.levelController.firstLevel=c}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(c){h.logger.log("set startLevel:"+c),c!==-1&&(c=Math.max(c,this.minAutoLevel)),this.levelController.startLevel=c}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(c){var b=!!c;b!==this.config.capLevelToPlayerSize&&(b?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=b)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(c){this._autoLevelCapping!==c&&(h.logger.log("set autoLevelCapping:"+c),this._autoLevelCapping=c)}},{key:"bandwidthEstimate",get:function(){var c=this.abrController.bwEstimator;return c?c.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var c=this.levels,b=this.config.minAutoBitrate;if(!c)return 0;for(var x=c.length,C=0;C<x;C++)if(c[C].maxBitrate>b)return C;return 0}},{key:"maxAutoLevel",get:function(){var c=this.levels,b=this.autoLevelCapping,x;return b===-1&&c&&c.length?x=c.length-1:x=b,x}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(c){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,c)}},{key:"audioTracks",get:function(){var c=this.audioTrackController;return c?c.audioTracks:[]}},{key:"audioTrack",get:function(){var c=this.audioTrackController;return c?c.audioTrack:-1},set:function(c){var b=this.audioTrackController;b&&(b.audioTrack=c)}},{key:"subtitleTracks",get:function(){var c=this.subtitleTrackController;return c?c.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var c=this.subtitleTrackController;return c?c.subtitleTrack:-1},set:function(c){var b=this.subtitleTrackController;b&&(b.subtitleTrack=c)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var c=this.subtitleTrackController;return c?c.subtitleDisplay:!1},set:function(c){var b=this.subtitleTrackController;b&&(b.subtitleDisplay=c)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(c){this.config.lowLatencyMode=c}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return n.Events}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return a.defaultConfig?a.defaultConfig:E.hlsDefaultConfig},set:function(c){a.defaultConfig=c}}]),a}();v.defaultConfig=void 0},"./src/is-supported.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"isSupported",function(){return g}),T.d(m,"changeTypeSupported",function(){return S});var L=T("./src/utils/mediasource-helper.ts");function _(){return self.SourceBuffer||self.WebKitSourceBuffer}function g(){var p=Object(L.getMediaSource)();if(!p)return!1;var o=_(),i=p&&typeof p.isTypeSupported=="function"&&p.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!o||o.prototype&&typeof o.prototype.appendBuffer=="function"&&typeof o.prototype.remove=="function";return!!i&&!!r}function S(){var p,o=_();return typeof(o==null||((p=o.prototype)===null||p===void 0)?void 0:p.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return h}),T.d(m,"LoadError",function(){return y});var L=T("./src/polyfills/number.ts"),_=T("./src/errors.ts");function g(l,n){l.prototype=Object.create(n.prototype),l.prototype.constructor=l,r(l,n)}function S(l){var n=typeof Map=="function"?new Map:void 0;return S=function(u){if(u===null||!i(u))return u;if(typeof u!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(u))return n.get(u);n.set(u,w)}function w(){return p(u,arguments,d(this).constructor)}return w.prototype=Object.create(u.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),r(w,u)},S(l)}function p(l,n,s){return o()?p=Reflect.construct:p=function(w,v,a){var R=[null];R.push.apply(R,v);var D=Function.bind.apply(w,R),c=new D;return a&&r(c,a.prototype),c},p.apply(null,arguments)}function o(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(l){return!1}}function i(l){return Function.toString.call(l).indexOf("[native code]")!==-1}function r(l,n){return r=Object.setPrototypeOf||function(u,w){return u.__proto__=w,u},r(l,n)}function d(l){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(s){return s.__proto__||Object.getPrototypeOf(s)},d(l)}var f=Math.pow(2,17),h=function(){function l(s){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=s}var n=l.prototype;return n.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},n.abort=function(){this.loader&&this.loader.abort()},n.load=function(u,w){var v=this,a=u.url;if(!a)return Promise.reject(new y({type:_.ErrorTypes.NETWORK_ERROR,details:_.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,networkDetails:null},"Fragment does not have a "+(a?"part list":"url")));this.abort();var R=this.config,D=R.fLoader,c=R.loader;return new Promise(function(b,x){v.loader&&v.loader.destroy();var C=v.loader=u.loader=D?new D(R):new c(R),F=E(u),j={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:f};u.stats=C.stats,C.load(F,j,{onSuccess:function(X,G,W,K){v.resetLoader(u,C),b({frag:u,part:null,payload:X.data,networkDetails:K})},onError:function(X,G,W){v.resetLoader(u,C),x(new y({type:_.ErrorTypes.NETWORK_ERROR,details:_.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,response:X,networkDetails:W}))},onAbort:function(X,G,W){v.resetLoader(u,C),x(new y({type:_.ErrorTypes.NETWORK_ERROR,details:_.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:u,networkDetails:W}))},onTimeout:function(X,G,W){v.resetLoader(u,C),x(new y({type:_.ErrorTypes.NETWORK_ERROR,details:_.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:u,networkDetails:W}))},onProgress:function(X,G,W,K){w&&w({frag:u,part:null,payload:W,networkDetails:K})}})})},n.loadPart=function(u,w,v){var a=this;this.abort();var R=this.config,D=R.fLoader,c=R.loader;return new Promise(function(b,x){a.loader&&a.loader.destroy();var C=a.loader=u.loader=D?new D(R):new c(R),F=E(u,w),j={timeout:R.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:R.fragLoadingMaxRetryTimeout,highWaterMark:f};w.stats=C.stats,C.load(F,j,{onSuccess:function(X,G,W,K){a.resetLoader(u,C),a.updateStatsFromPart(u,w);var B={frag:u,part:w,payload:X.data,networkDetails:K};v(B),b(B)},onError:function(X,G,W){a.resetLoader(u,C),x(new y({type:_.ErrorTypes.NETWORK_ERROR,details:_.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:u,part:w,response:X,networkDetails:W}))},onAbort:function(X,G,W){u.stats.aborted=w.stats.aborted,a.resetLoader(u,C),x(new y({type:_.ErrorTypes.NETWORK_ERROR,details:_.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:u,part:w,networkDetails:W}))},onTimeout:function(X,G,W){a.resetLoader(u,C),x(new y({type:_.ErrorTypes.NETWORK_ERROR,details:_.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:u,part:w,networkDetails:W}))}})})},n.updateStatsFromPart=function(u,w){var v=u.stats,a=w.stats,R=a.total;if(v.loaded+=a.loaded,R){var D=Math.round(u.duration/w.duration),c=Math.min(Math.round(v.loaded/R),D),b=D-c,x=b*Math.round(v.loaded/c);v.total=v.loaded+x}else v.total=Math.max(v.loaded,v.total);var C=v.loading,F=a.loading;C.start?C.first+=F.first-F.start:(C.start=F.start,C.first=F.first),C.end=F.end},n.resetLoader=function(u,w){u.loader=null,this.loader===w&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),w.destroy()},l}();function E(l,n){n===void 0&&(n=null);var s=n||l,u={frag:l,part:n,responseType:"arraybuffer",url:s.url,headers:{},rangeStart:0,rangeEnd:0},w=s.byteRangeStartOffset,v=s.byteRangeEndOffset;return Object(L.isFiniteNumber)(w)&&Object(L.isFiniteNumber)(v)&&(u.rangeStart=w,u.rangeEnd=v),u}var y=function(l){g(n,l);function n(s){for(var u,w=arguments.length,v=new Array(w>1?w-1:0),a=1;a<w;a++)v[a-1]=arguments[a];return u=l.call.apply(l,[this].concat(v))||this,u.data=void 0,u.data=s,u}return n}(S(Error))},"./src/loader/fragment.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"ElementaryStreamTypes",function(){return h}),T.d(m,"BaseSegment",function(){return E}),T.d(m,"Fragment",function(){return y}),T.d(m,"Part",function(){return l});var L=T("./src/polyfills/number.ts"),_=T("./node_modules/url-toolkit/src/url-toolkit.js"),g=T.n(_),S=T("./src/utils/logger.ts"),p=T("./src/loader/level-key.ts"),o=T("./src/loader/load-stats.ts");function i(n,s){n.prototype=Object.create(s.prototype),n.prototype.constructor=n,r(n,s)}function r(n,s){return r=Object.setPrototypeOf||function(w,v){return w.__proto__=v,w},r(n,s)}function d(n,s){for(var u=0;u<s.length;u++){var w=s[u];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(n,w.key,w)}}function f(n,s,u){return s&&d(n.prototype,s),u&&d(n,u),n}var h;(function(n){n.AUDIO="audio",n.VIDEO="video",n.AUDIOVIDEO="audiovideo"})(h||(h={}));var E=function(){function n(u){var w;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(w={},w[h.AUDIO]=null,w[h.VIDEO]=null,w[h.AUDIOVIDEO]=null,w),this.baseurl=u}var s=n.prototype;return s.setByteRange=function(w,v){var a=w.split("@",2),R=[];a.length===1?R[0]=v?v.byteRangeEndOffset:0:R[0]=parseInt(a[1]),R[1]=parseInt(a[0])+R[0],this._byteRange=R},f(n,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(_.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(w){this._url=w}}]),n}(),y=function(n){i(s,n);function s(w,v){var a;return a=n.call(this,v)||this,a._decryptdata=null,a.rawProgramDateTime=null,a.programDateTime=null,a.tagList=[],a.duration=0,a.sn=0,a.levelkey=void 0,a.type=void 0,a.loader=null,a.level=-1,a.cc=0,a.startPTS=void 0,a.endPTS=void 0,a.appendedPTS=void 0,a.startDTS=void 0,a.endDTS=void 0,a.start=0,a.deltaPTS=void 0,a.maxStartPTS=void 0,a.minEndPTS=void 0,a.stats=new o.LoadStats,a.urlId=0,a.data=void 0,a.bitrateTest=!1,a.title=null,a.initSegment=null,a.type=w,a}var u=s.prototype;return u.createInitializationVector=function(v){for(var a=new Uint8Array(16),R=12;R<16;R++)a[R]=v>>8*(15-R)&255;return a},u.setDecryptDataFromLevelKey=function(v,a){var R=v;return(v==null?void 0:v.method)==="AES-128"&&v.uri&&!v.iv&&(R=p.LevelKey.fromURI(v.uri),R.method=v.method,R.iv=this.createInitializationVector(a),R.keyFormat="identity"),R},u.setElementaryStreamInfo=function(v,a,R,D,c,b){b===void 0&&(b=!1);var x=this.elementaryStreams,C=x[v];if(!C){x[v]={startPTS:a,endPTS:R,startDTS:D,endDTS:c,partial:b};return}C.startPTS=Math.min(C.startPTS,a),C.endPTS=Math.max(C.endPTS,R),C.startDTS=Math.min(C.startDTS,D),C.endDTS=Math.max(C.endDTS,c)},u.clearElementaryStreamInfo=function(){var v=this.elementaryStreams;v[h.AUDIO]=null,v[h.VIDEO]=null,v[h.AUDIOVIDEO]=null},f(s,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var v=this.sn;typeof v!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&S.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),v=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,v)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(L.isFiniteNumber)(this.programDateTime))return null;var v=Object(L.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+v*1e3}},{key:"encrypted",get:function(){var v;return!!((v=this.decryptdata)!==null&&v!==void 0&&v.keyFormat&&this.decryptdata.uri)}}]),s}(E),l=function(n){i(s,n);function s(u,w,v,a,R){var D;D=n.call(this,v)||this,D.fragOffset=0,D.duration=0,D.gap=!1,D.independent=!1,D.relurl=void 0,D.fragment=void 0,D.index=void 0,D.stats=new o.LoadStats,D.duration=u.decimalFloatingPoint("DURATION"),D.gap=u.bool("GAP"),D.independent=u.bool("INDEPENDENT"),D.relurl=u.enumeratedString("URI"),D.fragment=w,D.index=a;var c=u.enumeratedString("BYTERANGE");return c&&D.setByteRange(c,R),R&&(D.fragOffset=R.fragOffset+R.duration),D}return f(s,[{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)}}]),s}(E)},"./src/loader/key-loader.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return S});var L=T("./src/events.ts"),_=T("./src/errors.ts"),g=T("./src/utils/logger.ts"),S=function(){function p(i){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=i,this._registerListeners()}var o=p.prototype;return o._registerListeners=function(){this.hls.on(L.Events.KEY_LOADING,this.onKeyLoading,this)},o._unregisterListeners=function(){this.hls.off(L.Events.KEY_LOADING,this.onKeyLoading)},o.destroy=function(){this._unregisterListeners();for(var r in this.loaders){var d=this.loaders[r];d&&d.destroy()}this.loaders={}},o.onKeyLoading=function(r,d){var f=d.frag,h=f.type,E=this.loaders[h];if(!f.decryptdata){g.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var y=f.decryptdata.uri;if(y!==this.decrypturl||this.decryptkey===null){var l=this.hls.config;if(E&&(g.logger.warn("abort previous key loader for type:"+h),E.abort()),!y){g.logger.warn("key uri is falsy");return}var n=l.loader,s=f.loader=this.loaders[h]=new n(l);this.decrypturl=y,this.decryptkey=null;var u={url:y,frag:f,responseType:"arraybuffer"},w={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},v={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};s.load(u,w,v)}else this.decryptkey&&(f.decryptdata.key=this.decryptkey,this.hls.trigger(L.Events.KEY_LOADED,{frag:f}))},o.loadsuccess=function(r,d,f){var h=f.frag;if(!h.decryptdata){g.logger.error("after key load, decryptdata unset");return}this.decryptkey=h.decryptdata.key=new Uint8Array(r.data),h.loader=null,delete this.loaders[h.type],this.hls.trigger(L.Events.KEY_LOADED,{frag:h})},o.loaderror=function(r,d){var f=d.frag,h=f.loader;h&&h.abort(),delete this.loaders[f.type],this.hls.trigger(L.Events.ERROR,{type:_.ErrorTypes.NETWORK_ERROR,details:_.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:f,response:r})},o.loadtimeout=function(r,d){var f=d.frag,h=f.loader;h&&h.abort(),delete this.loaders[f.type],this.hls.trigger(L.Events.ERROR,{type:_.ErrorTypes.NETWORK_ERROR,details:_.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:f})},p}()},"./src/loader/level-details.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"LevelDetails",function(){return p});var L=T("./src/polyfills/number.ts");function _(o,i){for(var r=0;r<i.length;r++){var d=i[r];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(o,d.key,d)}}function g(o,i,r){return i&&_(o.prototype,i),r&&_(o,r),o}var S=10,p=function(){function o(r){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=r}var i=o.prototype;return i.reloaded=function(d){if(!d){this.advanced=!0,this.updated=!0;return}var f=this.lastPartSn-d.lastPartSn,h=this.lastPartIndex-d.lastPartIndex;this.updated=this.endSN!==d.endSN||!!h||!!f,this.advanced=this.endSN>d.endSN||f>0||f===0&&h>0,this.updated||this.advanced?this.misses=Math.floor(d.misses*.6):this.misses=d.misses+1,this.availabilityDelay=d.availabilityDelay},g(o,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(L.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||S}},{key:"drift",get:function(){var d=this.driftEndTime-this.driftStartTime;if(d>0){var f=this.driftEnd-this.driftStart;return f*1e3/d}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var d;return(d=this.partList)!==null&&d!==void 0&&d.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var d;return(d=this.fragments)!==null&&d!==void 0&&d.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 d;return(d=this.partList)!==null&&d!==void 0&&d.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var d;return(d=this.partList)!==null&&d!==void 0&&d.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),o}()},"./src/loader/level-key.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"LevelKey",function(){return p});var L=T("./node_modules/url-toolkit/src/url-toolkit.js"),_=T.n(L);function g(o,i){for(var r=0;r<i.length;r++){var d=i[r];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(o,d.key,d)}}function S(o,i,r){return i&&g(o.prototype,i),r&&g(o,r),o}var p=function(){o.fromURL=function(r,d){return new o(r,d)},o.fromURI=function(r){return new o(r)};function o(i,r){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,r?this._uri=Object(L.buildAbsoluteURL)(i,r,{alwaysNormalize:!0}):this._uri=i}return S(o,[{key:"uri",get:function(){return this._uri}}]),o}()},"./src/loader/load-stats.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"LoadStats",function(){return L});var L=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(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return s});var L=T("./src/polyfills/number.ts"),_=T("./node_modules/url-toolkit/src/url-toolkit.js"),g=T.n(_),S=T("./src/loader/fragment.ts"),p=T("./src/loader/level-details.ts"),o=T("./src/loader/level-key.ts"),i=T("./src/utils/attr-list.ts"),r=T("./src/utils/logger.ts"),d=T("./src/utils/codecs.ts"),f=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,h=/#EXT-X-MEDIA:(.*)/g,E=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),y=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("|")),l=/\.(mp4|m4s|m4v|m4a)$/i;function n(R){var D,c;return l.test((D=(c=_.parseURL(R))===null||c===void 0?void 0:c.path)!=null?D:"")}var s=function(){function R(){}return R.findGroup=function(c,b){for(var x=0;x<c.length;x++){var C=c[x];if(C.id===b)return C}},R.convertAVC1ToAVCOTI=function(c){var b=c.split(".");if(b.length>2){var x=b.shift()+".";return x+=parseInt(b.shift()).toString(16),x+=("000"+parseInt(b.shift()).toString(16)).substr(-4),x}return c},R.resolve=function(c,b){return _.buildAbsoluteURL(b,c,{alwaysNormalize:!0})},R.parseMasterPlaylist=function(c,b){var x=[],C={},F=!1;f.lastIndex=0;for(var j;(j=f.exec(c))!=null;)if(j[1]){var k=new i.AttrList(j[1]),X={attrs:k,bitrate:k.decimalInteger("AVERAGE-BANDWIDTH")||k.decimalInteger("BANDWIDTH"),name:k.NAME,url:R.resolve(j[2],b)},G=k.decimalResolution("RESOLUTION");G&&(X.width=G.width,X.height=G.height),u((k.CODECS||"").split(/[ ,]+/).filter(function(K){return K}),X),X.videoCodec&&X.videoCodec.indexOf("avc1")!==-1&&(X.videoCodec=R.convertAVC1ToAVCOTI(X.videoCodec)),x.push(X)}else if(j[3]){var W=new i.AttrList(j[3]);W["DATA-ID"]&&(F=!0,C[W["DATA-ID"]]=W)}return{levels:x,sessionData:F?C:null}},R.parseMasterPlaylistMedia=function(c,b,x,C){C===void 0&&(C=[]);var F,j=[],k=0;for(h.lastIndex=0;(F=h.exec(c))!==null;){var X=new i.AttrList(F[1]);if(X.TYPE===x){var G={attrs:X,bitrate:0,id:k++,groupId:X["GROUP-ID"],instreamId:X["INSTREAM-ID"],name:X.NAME||X.LANGUAGE||"",type:x,default:X.bool("DEFAULT"),autoselect:X.bool("AUTOSELECT"),forced:X.bool("FORCED"),lang:X.LANGUAGE,url:X.URI?R.resolve(X.URI,b):""};if(C.length){var W=R.findGroup(C,G.groupId)||C[0];w(G,W,"audioCodec"),w(G,W,"textCodec")}j.push(G)}}return j},R.parseLevelPlaylist=function(c,b,x,C,F){var j=new p.LevelDetails(b),k=j.fragments,X=null,G=0,W=0,K=0,B=0,U=null,H=new S.Fragment(C,b),q,ie,ce,he=-1,be=!1;for(E.lastIndex=0,j.m3u8=c;(q=E.exec(c))!==null;){be&&(be=!1,H=new S.Fragment(C,b),H.start=K,H.sn=G,H.cc=B,H.level=x,X&&(H.initSegment=X,H.rawProgramDateTime=X.rawProgramDateTime));var ne=q[1];if(ne){H.duration=parseFloat(ne);var le=(" "+q[2]).slice(1);H.title=le||null,H.tagList.push(le?["INF",ne,le]:["INF",ne])}else if(q[3])Object(L.isFiniteNumber)(H.duration)&&(H.start=K,ce&&(H.levelkey=ce),H.sn=G,H.level=x,H.cc=B,H.urlId=F,k.push(H),H.relurl=(" "+q[3]).slice(1),a(H,U),U=H,K+=H.duration,G++,W=0,be=!0);else if(q[4]){var ue=(" "+q[4]).slice(1);U?H.setByteRange(ue,U):H.setByteRange(ue)}else if(q[5])H.rawProgramDateTime=(" "+q[5]).slice(1),H.tagList.push(["PROGRAM-DATE-TIME",H.rawProgramDateTime]),he===-1&&(he=k.length);else{if(q=q[0].match(y),!q){r.logger.warn("No matches on slow regex match for level playlist!");continue}for(ie=1;ie<q.length&&!(typeof q[ie]!="undefined");ie++);var te=(" "+q[ie]).slice(1),oe=(" "+q[ie+1]).slice(1),Q=q[ie+2]?(" "+q[ie+2]).slice(1):"";switch(te){case"PLAYLIST-TYPE":j.type=oe.toUpperCase();break;case"MEDIA-SEQUENCE":G=j.startSN=parseInt(oe);break;case"SKIP":{var se=new i.AttrList(oe),J=se.decimalInteger("SKIPPED-SEGMENTS");if(Object(L.isFiniteNumber)(J)){j.skippedSegments=J;for(var ee=J;ee--;)k.unshift(null);G+=J}var ge=se.enumeratedString("RECENTLY-REMOVED-DATERANGES");ge&&(j.recentlyRemovedDateranges=ge.split(" "));break}case"TARGETDURATION":j.targetduration=parseFloat(oe);break;case"VERSION":j.version=parseInt(oe);break;case"EXTM3U":break;case"ENDLIST":j.live=!1;break;case"#":(oe||Q)&&H.tagList.push(Q?[oe,Q]:[oe]);break;case"DIS":B++;case"GAP":H.tagList.push([te]);break;case"BITRATE":H.tagList.push([te,oe]);break;case"DISCONTINUITY-SEQ":B=parseInt(oe);break;case"KEY":{var re,Y=new i.AttrList(oe),z=Y.enumeratedString("METHOD"),$=Y.URI,me=Y.hexadecimalInteger("IV"),pe=Y.enumeratedString("KEYFORMATVERSIONS"),xe=Y.enumeratedString("KEYID"),Re=(re=Y.enumeratedString("KEYFORMAT"))!=null?re:"identity",ke=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(ke.indexOf(Re)>-1){r.logger.warn("Keyformat "+Re+" is not supported from the manifest");continue}else if(Re!=="identity")continue;z&&(ce=o.LevelKey.fromURL(b,$),$&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(z)>=0&&(ce.method=z,ce.keyFormat=Re,xe&&(ce.keyID=xe),pe&&(ce.keyFormatVersions=pe),ce.iv=me));break}case"START":{var Ne=new i.AttrList(oe),Pe=Ne.decimalFloatingPoint("TIME-OFFSET");Object(L.isFiniteNumber)(Pe)&&(j.startTimeOffset=Pe);break}case"MAP":{var je=new i.AttrList(oe);H.relurl=je.URI,je.BYTERANGE&&H.setByteRange(je.BYTERANGE),H.level=x,H.sn="initSegment",ce&&(H.levelkey=ce),H.initSegment=null,X=H,be=!0;break}case"SERVER-CONTROL":{var Fe=new i.AttrList(oe);j.canBlockReload=Fe.bool("CAN-BLOCK-RELOAD"),j.canSkipUntil=Fe.optionalFloat("CAN-SKIP-UNTIL",0),j.canSkipDateRanges=j.canSkipUntil>0&&Fe.bool("CAN-SKIP-DATERANGES"),j.partHoldBack=Fe.optionalFloat("PART-HOLD-BACK",0),j.holdBack=Fe.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var We=new i.AttrList(oe);j.partTarget=We.decimalFloatingPoint("PART-TARGET");break}case"PART":{var _e=j.partList;_e||(_e=j.partList=[]);var Ge=W>0?_e[_e.length-1]:void 0,Ve=W++,Ie=new S.Part(new i.AttrList(oe),H,b,Ve,Ge);_e.push(Ie),H.duration+=Ie.duration;break}case"PRELOAD-HINT":{var He=new i.AttrList(oe);j.preloadHint=He;break}case"RENDITION-REPORT":{var Le=new i.AttrList(oe);j.renditionReports=j.renditionReports||[],j.renditionReports.push(Le);break}default:r.logger.warn("line parsed but not handled: "+q);break}}}U&&!U.relurl?(k.pop(),K-=U.duration,j.partList&&(j.fragmentHint=U)):j.partList&&(a(H,U),H.cc=B,j.fragmentHint=H);var Te=k.length,Ae=k[0],ye=k[Te-1];if(K+=j.skippedSegments*j.targetduration,K>0&&Te&&ye){j.averagetargetduration=K/Te;var Ee=ye.sn;j.endSN=Ee!=="initSegment"?Ee:0,Ae&&(j.startCC=Ae.cc,Ae.initSegment||j.fragments.every(function(we){return we.relurl&&n(we.relurl)})&&(r.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),H=new S.Fragment(C,b),H.relurl=ye.relurl,H.level=x,H.sn="initSegment",Ae.initSegment=H,j.needSidxRanges=!0))}else j.endSN=0,j.startCC=0;return j.fragmentHint&&(K+=j.fragmentHint.duration),j.totalduration=K,j.endCC=B,he>0&&v(k,he),j},R}();function u(R,D){["video","audio","text"].forEach(function(c){var b=R.filter(function(C){return Object(d.isCodecType)(C,c)});if(b.length){var x=b.filter(function(C){return C.lastIndexOf("avc1",0)===0||C.lastIndexOf("mp4a",0)===0});D[c+"Codec"]=x.length>0?x[0]:b[0],R=R.filter(function(C){return b.indexOf(C)===-1})}}),D.unknownCodecs=R}function w(R,D,c){var b=D[c];b&&(R[c]=b)}function v(R,D){for(var c=R[D],b=D;b--;){var x=R[b];if(!x)return;x.programDateTime=c.programDateTime-x.duration*1e3,c=x}}function a(R,D){R.rawProgramDateTime?R.programDateTime=Date.parse(R.rawProgramDateTime):D!=null&&D.programDateTime&&(R.programDateTime=D.endProgramDateTime),Object(L.isFiniteNumber)(R.programDateTime)||(R.programDateTime=null,R.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/polyfills/number.ts"),_=T("./src/events.ts"),g=T("./src/errors.ts"),S=T("./src/utils/logger.ts"),p=T("./src/utils/mp4-tools.ts"),o=T("./src/loader/m3u8-parser.ts"),i=T("./src/types/loader.ts"),r=T("./src/utils/attr-list.ts");function d(E){var y=E.type;switch(y){case i.PlaylistContextType.AUDIO_TRACK:return i.PlaylistLevelType.AUDIO;case i.PlaylistContextType.SUBTITLE_TRACK:return i.PlaylistLevelType.SUBTITLE;default:return i.PlaylistLevelType.MAIN}}function f(E,y){var l=E.url;return(l===void 0||l.indexOf("data:")===0)&&(l=y.url),l}var h=function(){function E(l){this.hls=void 0,this.loaders=Object.create(null),this.hls=l,this.registerListeners()}var y=E.prototype;return y.registerListeners=function(){var n=this.hls;n.on(_.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(_.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(_.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.on(_.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},y.unregisterListeners=function(){var n=this.hls;n.off(_.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(_.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(_.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.off(_.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},y.createInternalLoader=function(n){var s=this.hls.config,u=s.pLoader,w=s.loader,v=u||w,a=new v(s);return n.loader=a,this.loaders[n.type]=a,a},y.getInternalLoader=function(n){return this.loaders[n.type]},y.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},y.destroyInternalLoaders=function(){for(var n in this.loaders){var s=this.loaders[n];s&&s.destroy(),this.resetInternalLoader(n)}},y.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},y.onManifestLoading=function(n,s){var u=s.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:i.PlaylistContextType.MANIFEST,url:u,deliveryDirectives:null})},y.onLevelLoading=function(n,s){var u=s.id,w=s.level,v=s.url,a=s.deliveryDirectives;this.load({id:u,groupId:null,level:w,responseType:"text",type:i.PlaylistContextType.LEVEL,url:v,deliveryDirectives:a})},y.onAudioTrackLoading=function(n,s){var u=s.id,w=s.groupId,v=s.url,a=s.deliveryDirectives;this.load({id:u,groupId:w,level:null,responseType:"text",type:i.PlaylistContextType.AUDIO_TRACK,url:v,deliveryDirectives:a})},y.onSubtitleTrackLoading=function(n,s){var u=s.id,w=s.groupId,v=s.url,a=s.deliveryDirectives;this.load({id:u,groupId:w,level:null,responseType:"text",type:i.PlaylistContextType.SUBTITLE_TRACK,url:v,deliveryDirectives:a})},y.load=function(n){var s,u=this.hls.config,w=this.getInternalLoader(n);if(w){var v=w.context;if(v&&v.url===n.url){S.logger.trace("[playlist-loader]: playlist request ongoing");return}S.logger.log("[playlist-loader]: aborting previous loader for type: "+n.type),w.abort()}var a,R,D,c;switch(n.type){case i.PlaylistContextType.MANIFEST:a=u.manifestLoadingMaxRetry,R=u.manifestLoadingTimeOut,D=u.manifestLoadingRetryDelay,c=u.manifestLoadingMaxRetryTimeout;break;case i.PlaylistContextType.LEVEL:case i.PlaylistContextType.AUDIO_TRACK:case i.PlaylistContextType.SUBTITLE_TRACK:a=0,R=u.levelLoadingTimeOut;break;default:a=u.levelLoadingMaxRetry,R=u.levelLoadingTimeOut,D=u.levelLoadingRetryDelay,c=u.levelLoadingMaxRetryTimeout;break}if(w=this.createInternalLoader(n),(s=n.deliveryDirectives)!==null&&s!==void 0&&s.part){var b;if(n.type===i.PlaylistContextType.LEVEL&&n.level!==null?b=this.hls.levels[n.level].details:n.type===i.PlaylistContextType.AUDIO_TRACK&&n.id!==null?b=this.hls.audioTracks[n.id].details:n.type===i.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(b=this.hls.subtitleTracks[n.id].details),b){var x=b.partTarget,C=b.targetduration;x&&C&&(R=Math.min(Math.max(x*3,C*.8)*1e3,R))}}var F={timeout:R,maxRetry:a,retryDelay:D,maxRetryDelay:c,highWaterMark:0},j={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};w.load(n,F,j)},y.loadsuccess=function(n,s,u,w){if(w===void 0&&(w=null),u.isSidxRequest){this.handleSidxRequest(n,u),this.handlePlaylistLoaded(n,s,u,w);return}this.resetInternalLoader(u.type);var v=n.data;if(v.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,u,"no EXTM3U delimiter",w);return}s.parsing.start=performance.now(),v.indexOf("#EXTINF:")>0||v.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,s,u,w):this.handleMasterPlaylist(n,s,u,w)},y.loaderror=function(n,s,u){u===void 0&&(u=null),this.handleNetworkError(s,u,!1,n)},y.loadtimeout=function(n,s,u){u===void 0&&(u=null),this.handleNetworkError(s,u,!0)},y.handleMasterPlaylist=function(n,s,u,w){var v=this.hls,a=n.data,R=f(n,u),D=o.default.parseMasterPlaylist(a,R),c=D.levels,b=D.sessionData;if(!c.length){this.handleManifestParsingError(n,u,"no level found in manifest",w);return}var x=c.map(function(G){return{id:G.attrs.AUDIO,audioCodec:G.audioCodec}}),C=c.map(function(G){return{id:G.attrs.SUBTITLES,textCodec:G.textCodec}}),F=o.default.parseMasterPlaylistMedia(a,R,"AUDIO",x),j=o.default.parseMasterPlaylistMedia(a,R,"SUBTITLES",C),k=o.default.parseMasterPlaylistMedia(a,R,"CLOSED-CAPTIONS");if(F.length){var X=F.some(function(G){return!G.url});!X&&c[0].audioCodec&&!c[0].attrs.AUDIO&&(S.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),F.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new r.AttrList({}),bitrate:0,url:""}))}v.trigger(_.Events.MANIFEST_LOADED,{levels:c,audioTracks:F,subtitles:j,captions:k,url:R,stats:s,networkDetails:w,sessionData:b})},y.handleTrackOrLevelPlaylist=function(n,s,u,w){var v=this.hls,a=u.id,R=u.level,D=u.type,c=f(n,u),b=Object(L.isFiniteNumber)(a)?a:0,x=Object(L.isFiniteNumber)(R)?R:b,C=d(u),F=o.default.parseLevelPlaylist(n.data,c,x,C,b);if(!F.fragments.length){v.trigger(_.Events.ERROR,{type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:c,reason:"no fragments found in level",level:typeof u.level=="number"?u.level:void 0});return}if(D===i.PlaylistContextType.MANIFEST){var j={attrs:new r.AttrList({}),bitrate:0,details:F,name:"",url:c};v.trigger(_.Events.MANIFEST_LOADED,{levels:[j],audioTracks:[],url:c,stats:s,networkDetails:w,sessionData:null})}if(s.parsing.end=performance.now(),F.needSidxRanges){var k,X=(k=F.fragments[0].initSegment)===null||k===void 0?void 0:k.url;this.load({url:X,isSidxRequest:!0,type:D,level:R,levelDetails:F,id:a,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}u.levelDetails=F,this.handlePlaylistLoaded(n,s,u,w)},y.handleSidxRequest=function(n,s){var u=Object(p.parseSegmentIndex)(new Uint8Array(n.data));if(!u)return;var w=u.references,v=s.levelDetails;w.forEach(function(a,R){var D=a.info,c=v.fragments[R];c.byteRange.length===0&&c.setByteRange(String(1+D.end-D.start)+"@"+String(D.start)),c.initSegment&&c.initSegment.setByteRange(String(u.moovEndOffset)+"@0")})},y.handleManifestParsingError=function(n,s,u,w){this.hls.trigger(_.Events.ERROR,{type:g.ErrorTypes.NETWORK_ERROR,details:g.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:s.type===i.PlaylistContextType.MANIFEST,url:n.url,reason:u,response:n,context:s,networkDetails:w})},y.handleNetworkError=function(n,s,u,w){u===void 0&&(u=!1),S.logger.warn("[playlist-loader]: A network "+(u?"timeout":"error")+" occurred while loading "+n.type+" level: "+n.level+" id: "+n.id+' group-id: "'+n.groupId+'"');var v=g.ErrorDetails.UNKNOWN,a=!1,R=this.getInternalLoader(n);switch(n.type){case i.PlaylistContextType.MANIFEST:v=u?g.ErrorDetails.MANIFEST_LOAD_TIMEOUT:g.ErrorDetails.MANIFEST_LOAD_ERROR,a=!0;break;case i.PlaylistContextType.LEVEL:v=u?g.ErrorDetails.LEVEL_LOAD_TIMEOUT:g.ErrorDetails.LEVEL_LOAD_ERROR,a=!1;break;case i.PlaylistContextType.AUDIO_TRACK:v=u?g.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:g.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,a=!1;break;case i.PlaylistContextType.SUBTITLE_TRACK:v=u?g.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:g.ErrorDetails.SUBTITLE_LOAD_ERROR,a=!1;break}R&&this.resetInternalLoader(n.type);var D={type:g.ErrorTypes.NETWORK_ERROR,details:v,fatal:a,url:n.url,loader:R,context:n,networkDetails:s};w&&(D.response=w),this.hls.trigger(_.Events.ERROR,D)},y.handlePlaylistLoaded=function(n,s,u,w){var v=u.type,a=u.level,R=u.id,D=u.groupId,c=u.loader,b=u.levelDetails,x=u.deliveryDirectives;if(!(b!=null&&b.targetduration)){this.handleManifestParsingError(n,u,"invalid target duration",w);return}if(!c)return;b.live&&(c.getCacheAge&&(b.ageHeader=c.getCacheAge()||0),(!c.getCacheAge||isNaN(b.ageHeader))&&(b.ageHeader=0));switch(v){case i.PlaylistContextType.MANIFEST:case i.PlaylistContextType.LEVEL:this.hls.trigger(_.Events.LEVEL_LOADED,{details:b,level:a||0,id:R||0,stats:s,networkDetails:w,deliveryDirectives:x});break;case i.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(_.Events.AUDIO_TRACK_LOADED,{details:b,id:R||0,groupId:D||"",stats:s,networkDetails:w,deliveryDirectives:x});break;case i.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(_.Events.SUBTITLE_TRACK_LOADED,{details:b,id:R||0,groupId:D||"",stats:s,networkDetails:w,deliveryDirectives:x});break}},E}();m.default=h},"./src/polyfills/number.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"isFiniteNumber",function(){return L}),T.d(m,"MAX_SAFE_INTEGER",function(){return _});var L=Number.isFinite||function(g){return typeof g=="number"&&isFinite(g)},_=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(P,m,T){"use strict";T.r(m);var L=function(){function _(){}return _.getSilentFrame=function(S,p){switch(S){case"mp4a.40.2":if(p===1)return new Uint8Array([0,200,0,128,35,128]);if(p===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(p===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(p===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(p===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(p===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(p===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(p===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(p===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},_}();m.default=L},"./src/remux/mp4-generator.ts":function(P,m,T){"use strict";T.r(m);var L=Math.pow(2,32)-1,_=function(){function g(){}return g.init=function(){g.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 p;for(p in g.types)g.types.hasOwnProperty(p)&&(g.types[p]=[p.charCodeAt(0),p.charCodeAt(1),p.charCodeAt(2),p.charCodeAt(3)]);var o=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);g.HDLR_TYPES={video:o,audio:i};var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),d=new Uint8Array([0,0,0,0,0,0,0,0]);g.STTS=g.STSC=g.STCO=d,g.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),g.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),g.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),g.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var f=new Uint8Array([105,115,111,109]),h=new Uint8Array([97,118,99,49]),E=new Uint8Array([0,0,0,1]);g.FTYP=g.box(g.types.ftyp,f,E,f,h),g.DINF=g.box(g.types.dinf,g.box(g.types.dref,r))},g.box=function(p){for(var o=8,i=arguments.length,r=new Array(i>1?i-1:0),d=1;d<i;d++)r[d-1]=arguments[d];for(var f=r.length,h=f;f--;)o+=r[f].byteLength;var E=new Uint8Array(o);for(E[0]=o>>24&255,E[1]=o>>16&255,E[2]=o>>8&255,E[3]=o&255,E.set(p,4),f=0,o=8;f<h;f++)E.set(r[f],o),o+=r[f].byteLength;return E},g.hdlr=function(p){return g.box(g.types.hdlr,g.HDLR_TYPES[p])},g.mdat=function(p){return g.box(g.types.mdat,p)},g.mdhd=function(p,o){o*=p;var i=Math.floor(o/(L+1)),r=Math.floor(o%(L+1));return g.box(g.types.mdhd,new Uint8Array([1,0,0,0,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,i>>24,i>>16&255,i>>8&255,i&255,r>>24,r>>16&255,r>>8&255,r&255,85,196,0,0]))},g.mdia=function(p){return g.box(g.types.mdia,g.mdhd(p.timescale,p.duration),g.hdlr(p.type),g.minf(p))},g.mfhd=function(p){return g.box(g.types.mfhd,new Uint8Array([0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255]))},g.minf=function(p){return p.type==="audio"?g.box(g.types.minf,g.box(g.types.smhd,g.SMHD),g.DINF,g.stbl(p)):g.box(g.types.minf,g.box(g.types.vmhd,g.VMHD),g.DINF,g.stbl(p))},g.moof=function(p,o,i){return g.box(g.types.moof,g.mfhd(p),g.traf(i,o))},g.moov=function(p){for(var o=p.length,i=[];o--;)i[o]=g.trak(p[o]);return g.box.apply(null,[g.types.moov,g.mvhd(p[0].timescale,p[0].duration)].concat(i).concat(g.mvex(p)))},g.mvex=function(p){for(var o=p.length,i=[];o--;)i[o]=g.trex(p[o]);return g.box.apply(null,[g.types.mvex].concat(i))},g.mvhd=function(p,o){o*=p;var i=Math.floor(o/(L+1)),r=Math.floor(o%(L+1)),d=new Uint8Array([1,0,0,0,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,i>>24,i>>16&255,i>>8&255,i&255,r>>24,r>>16&255,r>>8&255,r&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return g.box(g.types.mvhd,d)},g.sdtp=function(p){var o=p.samples||[],i=new Uint8Array(4+o.length),r,d;for(r=0;r<o.length;r++)d=o[r].flags,i[r+4]=d.dependsOn<<4|d.isDependedOn<<2|d.hasRedundancy;return g.box(g.types.sdtp,i)},g.stbl=function(p){return g.box(g.types.stbl,g.stsd(p),g.box(g.types.stts,g.STTS),g.box(g.types.stsc,g.STSC),g.box(g.types.stsz,g.STSZ),g.box(g.types.stco,g.STCO))},g.avc1=function(p){var o=[],i=[],r,d,f;for(r=0;r<p.sps.length;r++)d=p.sps[r],f=d.byteLength,o.push(f>>>8&255),o.push(f&255),o=o.concat(Array.prototype.slice.call(d));for(r=0;r<p.pps.length;r++)d=p.pps[r],f=d.byteLength,i.push(f>>>8&255),i.push(f&255),i=i.concat(Array.prototype.slice.call(d));var h=g.box(g.types.avcC,new Uint8Array([1,o[3],o[4],o[5],252|3,224|p.sps.length].concat(o).concat([p.pps.length]).concat(i))),E=p.width,y=p.height,l=p.pixelRatio[0],n=p.pixelRatio[1];return g.box(g.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,E>>8&255,E&255,y>>8&255,y&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]),h,g.box(g.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),g.box(g.types.pasp,new Uint8Array([l>>24,l>>16&255,l>>8&255,l&255,n>>24,n>>16&255,n>>8&255,n&255])))},g.esds=function(p){var o=p.config.length;return new Uint8Array([0,0,0,0,3,23+o,0,1,0,4,15+o,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([o]).concat(p.config).concat([6,1,2]))},g.mp4a=function(p){var o=p.samplerate;return g.box(g.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,p.channelCount,0,16,0,0,0,0,o>>8&255,o&255,0,0]),g.box(g.types.esds,g.esds(p)))},g.mp3=function(p){var o=p.samplerate;return g.box(g.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,p.channelCount,0,16,0,0,0,0,o>>8&255,o&255,0,0]))},g.stsd=function(p){return p.type==="audio"?!p.isAAC&&p.codec==="mp3"?g.box(g.types.stsd,g.STSD,g.mp3(p)):g.box(g.types.stsd,g.STSD,g.mp4a(p)):g.box(g.types.stsd,g.STSD,g.avc1(p))},g.tkhd=function(p){var o=p.id,i=p.duration*p.timescale,r=p.width,d=p.height,f=Math.floor(i/(L+1)),h=Math.floor(i%(L+1));return g.box(g.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,o>>24&255,o>>16&255,o>>8&255,o&255,0,0,0,0,f>>24,f>>16&255,f>>8&255,f&255,h>>24,h>>16&255,h>>8&255,h&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,r&255,0,0,d>>8&255,d&255,0,0]))},g.traf=function(p,o){var i=g.sdtp(p),r=p.id,d=Math.floor(o/(L+1)),f=Math.floor(o%(L+1));return g.box(g.types.traf,g.box(g.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),g.box(g.types.tfdt,new Uint8Array([1,0,0,0,d>>24,d>>16&255,d>>8&255,d&255,f>>24,f>>16&255,f>>8&255,f&255])),g.trun(p,i.length+16+20+8+16+8+8),i)},g.trak=function(p){return p.duration=p.duration||4294967295,g.box(g.types.trak,g.tkhd(p),g.mdia(p))},g.trex=function(p){var o=p.id;return g.box(g.types.trex,new Uint8Array([0,0,0,0,o>>24,o>>16&255,o>>8&255,o&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},g.trun=function(p,o){var i=p.samples||[],r=i.length,d=12+16*r,f=new Uint8Array(d),h,E,y,l,n,s;for(o+=8+d,f.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255],0),h=0;h<r;h++)E=i[h],y=E.duration,l=E.size,n=E.flags,s=E.cts,f.set([y>>>24&255,y>>>16&255,y>>>8&255,y&255,l>>>24&255,l>>>16&255,l>>>8&255,l&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.paddingValue<<1|n.isNonSync,n.degradPrio&240<<8,n.degradPrio&15,s>>>24&255,s>>>16&255,s>>>8&255,s&255],12+16*h);return g.box(g.types.trun,f)},g.initSegment=function(p){g.types||g.init();var o=g.moov(p),i=new Uint8Array(g.FTYP.byteLength+o.byteLength);return i.set(g.FTYP),i.set(o,g.FTYP.byteLength),i},g}();_.types=void 0,_.HDLR_TYPES=void 0,_.STTS=void 0,_.STSC=void 0,_.STCO=void 0,_.STSZ=void 0,_.VMHD=void 0,_.SMHD=void 0,_.STSD=void 0,_.FTYP=void 0,_.DINF=void 0,m.default=_},"./src/remux/mp4-remuxer.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return s}),T.d(m,"normalizePts",function(){return u});var L=T("./src/polyfills/number.ts"),_=T("./src/remux/aac-helper.ts"),g=T("./src/remux/mp4-generator.ts"),S=T("./src/events.ts"),p=T("./src/errors.ts"),o=T("./src/utils/logger.ts"),i=T("./src/types/loader.ts"),r=T("./src/utils/timescale-conversion.ts");function d(){return d=Object.assign||function(R){for(var D=1;D<arguments.length;D++){var c=arguments[D];for(var b in c)Object.prototype.hasOwnProperty.call(c,b)&&(R[b]=c[b])}return R},d.apply(this,arguments)}var f=10*1e3,h=1024,E=1152,y=null,l=null,n=!1,s=function(){function R(c,b,x,C){if(C===void 0&&(C=""),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=c,this.config=b,this.typeSupported=x,this.ISGenerated=!1,y===null){var F=navigator.userAgent||"",j=F.match(/Chrome\/(\d+)/i);y=j?parseInt(j[1]):0}if(l===null){var k=navigator.userAgent.match(/Safari\/(\d+)/i);l=k?parseInt(k[1]):0}n=!!y&&y<75||!!l&&l<600}var D=R.prototype;return D.destroy=function(){},D.resetTimeStamp=function(b){o.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=b},D.resetNextTimestamp=function(){o.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},D.resetInitSegment=function(){o.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},D.getVideoStartPts=function(b){var x=!1,C=b.reduce(function(F,j){var k=j.pts-F;return k<-4294967296?(x=!0,u(F,j.pts)):k>0?F:j.pts},b[0].pts);return x&&o.logger.debug("PTS rollover detected"),C},D.remux=function(b,x,C,F,j,k,X,G){var W,K,B,U,H,q,ie=j,ce=j,he=b.pid>-1,be=x.pid>-1,ne=x.samples.length,le=b.samples.length>0,ue=ne>1,te=(!he||le)&&(!be||ue)||this.ISGenerated||X;if(te){this.ISGenerated||(B=this.generateIS(b,x,j));var oe=this.isVideoContiguous,Q=-1;if(ue&&(Q=w(x.samples),!oe&&this.config.forceKeyFrameOnDiscontinuity))if(q=!0,Q>0){o.logger.warn("[mp4-remuxer]: Dropped "+Q+" out of "+ne+" video samples due to a missing keyframe");var se=this.getVideoStartPts(x.samples);x.samples=x.samples.slice(Q),x.dropped+=Q,ce+=(x.samples[0].pts-se)/(x.timescale||9e4)}else Q===-1&&(o.logger.warn("[mp4-remuxer]: No keyframe found out of "+ne+" video samples"),q=!1);if(this.ISGenerated){if(le&&ue){var J=this.getVideoStartPts(x.samples),ee=u(b.samples[0].pts,J)-J,ge=ee/x.inputTimeScale;ie+=Math.max(0,ge),ce+=Math.max(0,-ge)}if(le){if(b.samplerate||(o.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),B=this.generateIS(b,x,j)),K=this.remuxAudio(b,ie,this.isAudioContiguous,k,be||ue||G===i.PlaylistLevelType.AUDIO?ce:void 0),ue){var re=K?K.endPTS-K.startPTS:0;x.inputTimeScale||(o.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),B=this.generateIS(b,x,j)),W=this.remuxVideo(x,ce,oe,re)}}else ue&&(W=this.remuxVideo(x,ce,oe,0));W&&(W.firstKeyFrame=Q,W.independent=Q!==-1)}}return this.ISGenerated&&(C.samples.length&&(H=this.remuxID3(C,j)),F.samples.length&&(U=this.remuxText(F,j))),{audio:K,video:W,initSegment:B,independent:q,text:U,id3:H}},D.generateIS=function(b,x,C){var F=b.samples,j=x.samples,k=this.typeSupported,X={},G=!Object(L.isFiniteNumber)(this._initPTS),W="audio/mp4",K,B,U;if(G&&(K=B=Infinity),b.config&&F.length&&(b.timescale=b.samplerate,b.isAAC||(k.mpeg?(W="audio/mpeg",b.codec=""):k.mp3&&(b.codec="mp3")),X.audio={id:"audio",container:W,codec:b.codec,initSegment:!b.isAAC&&k.mpeg?new Uint8Array(0):g.default.initSegment([b]),metadata:{channelCount:b.channelCount}},G&&(U=b.inputTimeScale,K=B=F[0].pts-Math.round(U*C))),x.sps&&x.pps&&j.length&&(x.timescale=x.inputTimeScale,X.video={id:"main",container:"video/mp4",codec:x.codec,initSegment:g.default.initSegment([x]),metadata:{width:x.width,height:x.height}},G)){U=x.inputTimeScale;var H=this.getVideoStartPts(j),q=Math.round(U*C);B=Math.min(B,u(j[0].dts,H)-q),K=Math.min(K,H-q)}if(Object.keys(X).length)return this.ISGenerated=!0,G&&(this._initPTS=K,this._initDTS=B),{tracks:X,initPTS:K,timescale:U}},D.remuxVideo=function(b,x,C,F){var j=b.inputTimeScale,k=b.samples,X=[],G=k.length,W=this._initPTS,K=this.nextAvcDts,B=8,U,H,q,ie=Number.POSITIVE_INFINITY,ce=Number.NEGATIVE_INFINITY,he=0,be=!1;if(!C||K===null){var ne=x*j,le=k[0].pts-u(k[0].dts,k[0].pts);K=ne-le}for(var ue=0;ue<G;ue++){var te=k[ue];if(te.pts=u(te.pts-W,K),te.dts=u(te.dts-W,K),te.dts>te.pts){var oe=9e4*.2;he=Math.max(Math.min(he,te.pts-te.dts),-1*oe)}te.dts<k[ue>0?ue-1:ue].dts&&(be=!0)}be&&k.sort(function(pt,gt){var at=pt.dts-gt.dts,Rt=pt.pts-gt.pts;return at||Rt}),H=k[0].dts,q=k[k.length-1].dts;var Q=Math.round((q-H)/(G-1));if(he<0){if(he<Q*-2){o.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(r.toMsFromMpegTsClock)(-Q,!0)+" ms");for(var se=he,J=0;J<G;J++)k[J].dts=se=Math.max(se,k[J].pts-Q),k[J].pts=Math.max(se,k[J].pts)}else{o.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(r.toMsFromMpegTsClock)(he,!0)+" ms to overcome this issue");for(var ee=0;ee<G;ee++)k[ee].dts=k[ee].dts+he}H=k[0].dts}if(C){var ge=H-K,re=ge>Q,Y=ge<-1;if(re||Y){re?o.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(ge,!0)+" ms ("+ge+"dts) hole between fragments detected, filling it"):o.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(-ge,!0)+" ms ("+ge+"dts) overlapping between fragments detected"),H=K;var z=k[0].pts-ge;k[0].dts=H,k[0].pts=z,o.logger.log("Video: First PTS/DTS adjusted: "+Object(r.toMsFromMpegTsClock)(z,!0)+"/"+Object(r.toMsFromMpegTsClock)(H,!0)+", delta: "+Object(r.toMsFromMpegTsClock)(ge,!0)+" ms")}}n&&(H=Math.max(0,H));for(var $=0,me=0,pe=0;pe<G;pe++){for(var xe=k[pe],Re=xe.units,ke=Re.length,Ne=0,Pe=0;Pe<ke;Pe++)Ne+=Re[Pe].data.length;me+=Ne,$+=ke,xe.length=Ne,xe.dts=Math.max(xe.dts,H),xe.pts=Math.max(xe.pts,xe.dts,0),ie=Math.min(xe.pts,ie),ce=Math.max(xe.pts,ce)}q=k[G-1].dts;var je=me+4*$+8,Fe;try{Fe=new Uint8Array(je)}catch(pt){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:p.ErrorTypes.MUX_ERROR,details:p.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:je,reason:"fail allocating video mdat "+je});return}var We=new DataView(Fe.buffer);We.setUint32(0,je),Fe.set(g.default.types.mdat,4);for(var _e=0;_e<G;_e++){for(var Ge=k[_e],Ve=Ge.units,Ie=0,He=0,Le=Ve.length;He<Le;He++){var Te=Ve[He],Ae=Te.data,ye=Te.data.byteLength;We.setUint32(B,ye),B+=4,Fe.set(Ae,B),B+=ye,Ie+=4+ye}if(_e<G-1)U=k[_e+1].dts-Ge.dts;else{var Ee=this.config,we=Ge.dts-k[_e>0?_e-1:_e].dts;if(Ee.stretchShortVideoTrack&&this.nextAudioPts!==null){var Oe=Math.floor(Ee.maxBufferHole*j),Ce=(F?ie+F*j:this.nextAudioPts)-Ge.pts;Ce>Oe?(U=Ce-we,U<0&&(U=we),o.logger.log("[mp4-remuxer]: It is approximately "+Ce/90+" ms to the next segment; using duration "+U/90+" ms for the last video frame.")):U=we}else U=we}var Be=Math.round(Ge.pts-Ge.dts);X.push(new v(Ge.key,U,Ie,Be))}if(X.length&&y&&y<70){var Ke=X[0].flags;Ke.dependsOn=2,Ke.isNonSync=0}console.assert(U!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=K=q+U,this.isVideoContiguous=!0;var qe=g.default.moof(b.sequenceNumber++,H,d({},b,{samples:X})),et="video",it={data1:qe,data2:Fe,startPTS:ie/j,endPTS:(ce+U)/j,startDTS:H/j,endDTS:K/j,type:et,hasAudio:!1,hasVideo:!0,nb:X.length,dropped:b.dropped};return b.samples=[],b.dropped=0,console.assert(Fe.length,"MDAT length must not be zero"),it},D.remuxAudio=function(b,x,C,F,j){var k=b.inputTimeScale,X=b.samplerate?b.samplerate:k,G=k/X,W=b.isAAC?h:E,K=W*G,B=this._initPTS,U=!b.isAAC&&this.typeSupported.mpeg,H=[],q=b.samples,ie=U?0:8,ce=this.nextAudioPts||-1,he=x*k;if(this.isAudioContiguous=C=C||q.length&&ce>0&&(F&&Math.abs(he-ce)<9e3||Math.abs(u(q[0].pts-B,he)-ce)<20*K),q.forEach(function(Ae){Ae.pts=u(Ae.pts-B,he)}),!C||ce<0){if(q=q.filter(function(Ae){return Ae.pts>=0}),!q.length)return;j===0?ce=0:F?ce=Math.max(0,he):ce=q[0].pts}if(b.isAAC)for(var be=j!==void 0,ne=this.config.maxAudioFramesDrift,le=0,ue=ce;le<q.length;le++){var te=q[le],oe=te.pts,Q=oe-ue,se=Math.abs(1e3*Q/k);if(Q<=-ne*K&&be)le===0&&(o.logger.warn("Audio frame @ "+(oe/k).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Q/k)+" ms."),this.nextAudioPts=ce=ue=oe);else if(Q>=ne*K&&se<f&&be){var J=Math.round(Q/K);ue=oe-J*K,ue<0&&(J--,ue+=K),le===0&&(this.nextAudioPts=ce=ue),o.logger.warn("[mp4-remuxer]: Injecting "+J+" audio frame @ "+(ue/k).toFixed(3)+"s due to "+Math.round(1e3*Q/k)+" ms gap.");for(var ee=0;ee<J;ee++){var ge=Math.max(ue,0),re=_.default.getSilentFrame(b.manifestCodec||b.codec,b.channelCount);re||(o.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),re=te.unit.subarray()),q.splice(le,0,{unit:re,pts:ge}),ue+=K,le++}}te.pts=ue,ue+=K}for(var Y=null,z=null,$,me=0,pe=q.length;pe--;)me+=q[pe].unit.byteLength;for(var xe=0,Re=q.length;xe<Re;xe++){var ke=q[xe],Ne=ke.unit,Pe=ke.pts;if(z!==null){var je=H[xe-1];je.duration=Math.round((Pe-z)/G)}else if(C&&b.isAAC&&(Pe=ce),Y=Pe,me>0){me+=ie;try{$=new Uint8Array(me)}catch(Ae){this.observer.emit(S.Events.ERROR,S.Events.ERROR,{type:p.ErrorTypes.MUX_ERROR,details:p.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:me,reason:"fail allocating audio mdat "+me});return}if(!U){var Fe=new DataView($.buffer);Fe.setUint32(0,me),$.set(g.default.types.mdat,4)}}else return;$.set(Ne,ie);var We=Ne.byteLength;ie+=We,H.push(new v(!0,W,We,0)),z=Pe}var _e=H.length;if(!_e)return;var Ge=H[H.length-1];this.nextAudioPts=ce=z+G*Ge.duration;var Ve=U?new Uint8Array(0):g.default.moof(b.sequenceNumber++,Y/G,d({},b,{samples:H}));b.samples=[];var Ie=Y/k,He=ce/k,Le="audio",Te={data1:Ve,data2:$,startPTS:Ie,endPTS:He,startDTS:Ie,endDTS:He,type:Le,hasAudio:!0,hasVideo:!1,nb:_e};return this.isAudioContiguous=!0,console.assert($.length,"MDAT length must not be zero"),Te},D.remuxEmptyAudio=function(b,x,C,F){var j=b.inputTimeScale,k=b.samplerate?b.samplerate:j,X=j/k,G=this.nextAudioPts,W=(G!==null?G:F.startDTS*j)+this._initDTS,K=F.endDTS*j+this._initDTS,B=X*h,U=Math.ceil((K-W)/B),H=_.default.getSilentFrame(b.manifestCodec||b.codec,b.channelCount);if(o.logger.warn("[mp4-remuxer]: remux empty Audio"),!H){o.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var q=[],ie=0;ie<U;ie++){var ce=W+ie*B;q.push({unit:H,pts:ce,dts:ce})}return b.samples=q,this.remuxAudio(b,x,C,!1)},D.remuxID3=function(b,x){var C=b.samples.length;if(!C)return;for(var F=b.inputTimeScale,j=this._initPTS,k=this._initDTS,X=0;X<C;X++){var G=b.samples[X];G.pts=u(G.pts-j,x*F)/F,G.dts=u(G.dts-k,x*F)/F}var W=b.samples;return b.samples=[],{samples:W}},D.remuxText=function(b,x){var C=b.samples.length;if(!C)return;for(var F=b.inputTimeScale,j=this._initPTS,k=0;k<C;k++){var X=b.samples[k];X.pts=u(X.pts-j,x*F)/F}b.samples.sort(function(W,K){return W.pts-K.pts});var G=b.samples;return b.samples=[],{samples:G}},R}();function u(R,D){var c;if(D===null)return R;for(D<R?c=-8589934592:c=8589934592;Math.abs(R-D)>4294967296;)R+=c;return R}function w(R){for(var D=0;D<R.length;D++)if(R[D].key)return D;return-1}var v=function(D,c,b,x){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=c,this.size=b,this.cts=x,this.flags=new a(D)},a=function(D){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=D?2:1,this.isNonSync=D?0:1}},"./src/remux/passthrough-remuxer.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/polyfills/number.ts"),_=T("./src/utils/mp4-tools.ts"),g=T("./src/loader/fragment.ts"),S=T("./src/utils/logger.ts"),p=function(){function r(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var d=r.prototype;return d.destroy=function(){},d.resetTimeStamp=function(h){this.initPTS=h,this.lastEndDTS=null},d.resetNextTimestamp=function(){this.lastEndDTS=null},d.resetInitSegment=function(h,E,y){this.audioCodec=E,this.videoCodec=y,this.generateInitSegment(h),this.emitInitSegment=!0},d.generateInitSegment=function(h){var E=this.audioCodec,y=this.videoCodec;if(!h||!h.byteLength){this.initTracks=void 0,this.initData=void 0;return}var l=this.initData=Object(_.parseInitSegment)(h);E||(E=i(l.audio,g.ElementaryStreamTypes.AUDIO)),y||(y=i(l.video,g.ElementaryStreamTypes.VIDEO));var n={};l.audio&&l.video?n.audiovideo={container:"video/mp4",codec:E+","+y,initSegment:h,id:"main"}:l.audio?n.audio={container:"audio/mp4",codec:E,initSegment:h,id:"audio"}:l.video?n.video={container:"video/mp4",codec:y,initSegment:h,id:"main"}:S.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n},d.remux=function(h,E,y,l,n){var s=this.initPTS,u=this.lastEndDTS,w={audio:void 0,video:void 0,text:l,id3:y,initSegment:void 0};Object(L.isFiniteNumber)(u)||(u=this.lastEndDTS=n||0);var v=E.samples;if(!v||!v.length)return w;var a={initPTS:void 0,timescale:1},R=this.initData;if((!R||!R.length)&&(this.generateInitSegment(v),R=this.initData),!R||!R.length)return S.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),w;this.emitInitSegment&&(a.tracks=this.initTracks,this.emitInitSegment=!1),Object(L.isFiniteNumber)(s)||(this.initPTS=a.initPTS=s=o(R,v,u));var D=Object(_.getDuration)(v,R),c=u,b=D+c;Object(_.offsetStartDTS)(R,v,s),D>0?this.lastEndDTS=b:(S.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var x=!!R.audio,C=!!R.video,F="";x&&(F+="audio"),C&&(F+="video");var j={data1:v,startPTS:c,startDTS:c,endPTS:b,endDTS:b,type:F,hasAudio:x,hasVideo:C,nb:1,dropped:0};return w.audio=j.type==="audio"?j:void 0,w.video=j.type!=="audio"?j:void 0,w.text=l,w.id3=y,w.initSegment=a,w},r}(),o=function(d,f,h){return Object(_.getStartDTS)(d,f)-h};function i(r,d){var f=r==null?void 0:r.codec;return f&&f.length>4?f:f==="hvc1"?"hvc1.1.c.L120.90":f==="av01"?"av01.0.04M.08":f==="avc1"||d===g.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}m.default=p},"./src/task-loop.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return L});var L=function(){function _(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var g=_.prototype;return g.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},g.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},g.onHandlerDestroyed=function(){},g.hasInterval=function(){return!!this._tickInterval},g.hasNextTick=function(){return!!this._tickTimer},g.setInterval=function(p){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,p),!0)},g.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},g.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},g.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},g.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},g.doTick=function(){},_}()},"./src/types/cmcd.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"CMCDVersion",function(){return L}),T.d(m,"CMCDObjectType",function(){return _}),T.d(m,"CMCDStreamingFormat",function(){return g}),T.d(m,"CMCDStreamType",function(){return S});var L=1,_;(function(p){p.MANIFEST="m",p.AUDIO="a",p.VIDEO="v",p.MUXED="av",p.INIT="i",p.CAPTION="c",p.TIMED_TEXT="tt",p.KEY="k",p.OTHER="o"})(_||(_={}));var g;(function(p){p.DASH="d",p.HLS="h",p.SMOOTH="s",p.OTHER="o"})(g||(g={}));var S;(function(p){p.VOD="v",p.LIVE="l"})(S||(S={}))},"./src/types/level.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"HlsSkip",function(){return g}),T.d(m,"getSkipValue",function(){return S}),T.d(m,"HlsUrlParameters",function(){return p}),T.d(m,"Level",function(){return o});function L(i,r){for(var d=0;d<r.length;d++){var f=r[d];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(i,f.key,f)}}function _(i,r,d){return r&&L(i.prototype,r),d&&L(i,d),i}var g;(function(i){i.No="",i.Yes="YES",i.v2="v2"})(g||(g={}));function S(i,r){var d=i.canSkipUntil,f=i.canSkipDateRanges,h=i.endSN,E=r!==void 0?r-h:0;return d&&E<d?f?g.v2:g.Yes:g.No}var p=function(){function i(d,f,h){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=d,this.part=f,this.skip=h}var r=i.prototype;return r.addDirectives=function(f){var h=new self.URL(f);return this.msn!==void 0&&h.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&h.searchParams.set("_HLS_part",this.part.toString()),this.skip&&h.searchParams.set("_HLS_skip",this.skip),h.toString()},i}(),o=function(){function i(r){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[r.url],this.attrs=r.attrs,this.bitrate=r.bitrate,r.details&&(this.details=r.details),this.id=r.id||0,this.name=r.name,this.width=r.width||0,this.height=r.height||0,this.audioCodec=r.audioCodec,this.videoCodec=r.videoCodec,this.unknownCodecs=r.unknownCodecs,this.codecSet=[r.videoCodec,r.audioCodec].filter(function(d){return d}).join(",").replace(/\.[^.,]+/g,"")}return _(i,[{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(d){var f=d%this.url.length;this._urlId!==f&&(this.details=void 0,this._urlId=f)}}]),i}()},"./src/types/loader.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"PlaylistContextType",function(){return L}),T.d(m,"PlaylistLevelType",function(){return _});var L;(function(g){g.MANIFEST="manifest",g.LEVEL="level",g.AUDIO_TRACK="audioTrack",g.SUBTITLE_TRACK="subtitleTrack"})(L||(L={}));var _;(function(g){g.MAIN="main",g.AUDIO="audio",g.SUBTITLE="subtitle"})(_||(_={}))},"./src/types/transmuxer.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"ChunkMetadata",function(){return L});var L=function(S,p,o,i,r,d){i===void 0&&(i=0),r===void 0&&(r=-1),d===void 0&&(d=!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=_(),this.buffering={audio:_(),video:_(),audiovideo:_()},this.level=S,this.sn=p,this.id=o,this.size=i,this.part=r,this.partial=d};function _(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"AttrList",function(){return g});var L=/^(\d+)x(\d+)$/,_=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,g=function(){function S(o){typeof o=="string"&&(o=S.parseAttrList(o));for(var i in o)o.hasOwnProperty(i)&&(this[i]=o[i])}var p=S.prototype;return p.decimalInteger=function(i){var r=parseInt(this[i],10);return r>Number.MAX_SAFE_INTEGER?Infinity:r},p.hexadecimalInteger=function(i){if(this[i]){var r=(this[i]||"0x").slice(2);r=(r.length&1?"0":"")+r;for(var d=new Uint8Array(r.length/2),f=0;f<r.length/2;f++)d[f]=parseInt(r.slice(f*2,f*2+2),16);return d}else return null},p.hexadecimalIntegerAsNumber=function(i){var r=parseInt(this[i],16);return r>Number.MAX_SAFE_INTEGER?Infinity:r},p.decimalFloatingPoint=function(i){return parseFloat(this[i])},p.optionalFloat=function(i,r){var d=this[i];return d?parseFloat(d):r},p.enumeratedString=function(i){return this[i]},p.bool=function(i){return this[i]==="YES"},p.decimalResolution=function(i){var r=L.exec(this[i]);return r===null?void 0:{width:parseInt(r[1],10),height:parseInt(r[2],10)}},S.parseAttrList=function(i){var r,d={},f='"';for(_.lastIndex=0;(r=_.exec(i))!==null;){var h=r[2];h.indexOf(f)===0&&h.lastIndexOf(f)===h.length-1&&(h=h.slice(1,-1)),d[r[1]]=h}return d},S}()},"./src/utils/binary-search.ts":function(P,m,T){"use strict";T.r(m);var L={search:function(g,S){for(var p=0,o=g.length-1,i=null,r=null;p<=o;){i=(p+o)/2|0,r=g[i];var d=S(r);if(d>0)p=i+1;else if(d<0)o=i-1;else return r}return null}};m.default=L},"./src/utils/buffer-helper.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"BufferHelper",function(){return g});var L=T("./src/utils/logger.ts"),_={length:0,start:function(){return 0},end:function(){return 0}},g=function(){function S(){}return S.isBuffered=function(o,i){try{if(o){for(var r=S.getBuffered(o),d=0;d<r.length;d++)if(i>=r.start(d)&&i<=r.end(d))return!0}}catch(f){}return!1},S.bufferInfo=function(o,i,r){try{if(o){var d=S.getBuffered(o),f=[],h;for(h=0;h<d.length;h++)f.push({start:d.start(h),end:d.end(h)});return this.bufferedInfo(f,i,r)}}catch(E){}return{len:0,start:i,end:i,nextStart:void 0}},S.bufferedInfo=function(o,i,r){i=Math.max(0,i),o.sort(function(a,R){var D=a.start-R.start;return D||R.end-a.end});var d=[];if(r)for(var f=0;f<o.length;f++){var h=d.length;if(h){var E=d[h-1].end;o[f].start-E<r?o[f].end>E&&(d[h-1].end=o[f].end):d.push(o[f])}else d.push(o[f])}else d=o;for(var y=0,l,n=i,s=i,u=0;u<d.length;u++){var w=d[u].start,v=d[u].end;if(i+r>=w&&i<v)n=w,s=v,y=s-i;else if(i+r<w){l=w;break}}return{len:y,start:n||0,end:s||0,nextStart:l}},S.getBuffered=function(o){try{return o.buffered}catch(i){return L.logger.log("failed to get media.buffered",i),_}},S}()},"./src/utils/cea-608-parser.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"Row",function(){return s}),T.d(m,"CaptionScreen",function(){return u});var L=T("./src/utils/logger.ts"),_={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},g=function(b){var x=b;return _.hasOwnProperty(b)&&(x=_[b]),String.fromCharCode(x)},S=15,p=100,o={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},i={17:2,18:4,21:6,22:8,23:10,19:13,20:15},r={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},d={25:2,26:4,29:6,30:8,31:10,27:13,28:15},f=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],h;(function(c){c[c.ERROR=0]="ERROR",c[c.TEXT=1]="TEXT",c[c.WARNING=2]="WARNING",c[c.INFO=2]="INFO",c[c.DEBUG=3]="DEBUG",c[c.DATA=3]="DATA"})(h||(h={}));var E=function(){function c(){this.time=null,this.verboseLevel=h.ERROR}var b=c.prototype;return b.log=function(C,F){this.verboseLevel>=C&&L.logger.log(this.time+" ["+C+"] "+F)},c}(),y=function(b){for(var x=[],C=0;C<b.length;C++)x.push(b[C].toString(16));return x},l=function(){function c(x,C,F,j,k){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=x||"white",this.underline=C||!1,this.italics=F||!1,this.background=j||"black",this.flash=k||!1}var b=c.prototype;return b.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},b.setStyles=function(C){for(var F=["foreground","underline","italics","background","flash"],j=0;j<F.length;j++){var k=F[j];C.hasOwnProperty(k)&&(this[k]=C[k])}},b.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},b.equals=function(C){return this.foreground===C.foreground&&this.underline===C.underline&&this.italics===C.italics&&this.background===C.background&&this.flash===C.flash},b.copy=function(C){this.foreground=C.foreground,this.underline=C.underline,this.italics=C.italics,this.background=C.background,this.flash=C.flash},b.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},c}(),n=function(){function c(x,C,F,j,k,X){this.uchar=void 0,this.penState=void 0,this.uchar=x||" ",this.penState=new l(C,F,j,k,X)}var b=c.prototype;return b.reset=function(){this.uchar=" ",this.penState.reset()},b.setChar=function(C,F){this.uchar=C,this.penState.copy(F)},b.setPenState=function(C){this.penState.copy(C)},b.equals=function(C){return this.uchar===C.uchar&&this.penState.equals(C.penState)},b.copy=function(C){this.uchar=C.uchar,this.penState.copy(C.penState)},b.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},c}(),s=function(){function c(x){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var C=0;C<p;C++)this.chars.push(new n);this.logger=x,this.pos=0,this.currPenState=new l}var b=c.prototype;return b.equals=function(C){for(var F=!0,j=0;j<p;j++)if(!this.chars[j].equals(C.chars[j])){F=!1;break}return F},b.copy=function(C){for(var F=0;F<p;F++)this.chars[F].copy(C.chars[F])},b.isEmpty=function(){for(var C=!0,F=0;F<p;F++)if(!this.chars[F].isEmpty()){C=!1;break}return C},b.setCursor=function(C){this.pos!==C&&(this.pos=C),this.pos<0?(this.logger.log(h.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>p&&(this.logger.log(h.DEBUG,"Too large cursor position "+this.pos),this.pos=p)},b.moveCursor=function(C){var F=this.pos+C;if(C>1)for(var j=this.pos+1;j<F+1;j++)this.chars[j].setPenState(this.currPenState);this.setCursor(F)},b.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},b.insertChar=function(C){C>=144&&this.backSpace();var F=g(C);if(this.pos>=p){this.logger.log(h.ERROR,"Cannot insert "+C.toString(16)+" ("+F+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(F,this.currPenState),this.moveCursor(1)},b.clearFromPos=function(C){var F;for(F=C;F<p;F++)this.chars[F].reset()},b.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},b.clearToEndOfRow=function(){this.clearFromPos(this.pos)},b.getTextString=function(){for(var C=[],F=!0,j=0;j<p;j++){var k=this.chars[j].uchar;k!==" "&&(F=!1),C.push(k)}return F?"":C.join("")},b.setPenStyles=function(C){this.currPenState.setStyles(C);var F=this.chars[this.pos];F.setPenState(this.currPenState)},c}(),u=function(){function c(x){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var C=0;C<S;C++)this.rows.push(new s(x));this.logger=x,this.currRow=S-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var b=c.prototype;return b.reset=function(){for(var C=0;C<S;C++)this.rows[C].clear();this.currRow=S-1},b.equals=function(C){for(var F=!0,j=0;j<S;j++)if(!this.rows[j].equals(C.rows[j])){F=!1;break}return F},b.copy=function(C){for(var F=0;F<S;F++)this.rows[F].copy(C.rows[F])},b.isEmpty=function(){for(var C=!0,F=0;F<S;F++)if(!this.rows[F].isEmpty()){C=!1;break}return C},b.backSpace=function(){var C=this.rows[this.currRow];C.backSpace()},b.clearToEndOfRow=function(){var C=this.rows[this.currRow];C.clearToEndOfRow()},b.insertChar=function(C){var F=this.rows[this.currRow];F.insertChar(C)},b.setPen=function(C){var F=this.rows[this.currRow];F.setPenStyles(C)},b.moveCursor=function(C){var F=this.rows[this.currRow];F.moveCursor(C)},b.setCursor=function(C){this.logger.log(h.INFO,"setCursor: "+C);var F=this.rows[this.currRow];F.setCursor(C)},b.setPAC=function(C){this.logger.log(h.INFO,"pacData = "+JSON.stringify(C));var F=C.row-1;if(this.nrRollUpRows&&F<this.nrRollUpRows-1&&(F=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==F){for(var j=0;j<S;j++)this.rows[j].clear();var k=this.currRow+1-this.nrRollUpRows,X=this.lastOutputScreen;if(X){var G=X.rows[k].cueStartTime,W=this.logger.time;if(G&&W!==null&&G<W)for(var K=0;K<this.nrRollUpRows;K++)this.rows[F-this.nrRollUpRows+K+1].copy(X.rows[k+K])}}this.currRow=F;var B=this.rows[this.currRow];if(C.indent!==null){var U=C.indent,H=Math.max(U-1,0);B.setCursor(C.indent),C.color=B.chars[H].penState.foreground}var q={foreground:C.color,underline:C.underline,italics:C.italics,background:"black",flash:!1};this.setPen(q)},b.setBkgData=function(C){this.logger.log(h.INFO,"bkgData = "+JSON.stringify(C)),this.backSpace(),this.setPen(C),this.insertChar(32)},b.setRollUpRows=function(C){this.nrRollUpRows=C},b.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(h.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(h.TEXT,this.getDisplayText());var C=this.currRow+1-this.nrRollUpRows,F=this.rows.splice(C,1)[0];F.clear(),this.rows.splice(this.currRow,0,F),this.logger.log(h.INFO,"Rolling up")},b.getDisplayText=function(C){C=C||!1;for(var F=[],j="",k=-1,X=0;X<S;X++){var G=this.rows[X].getTextString();G&&(k=X+1,C?F.push("Row "+k+": '"+G+"'"):F.push(G.trim()))}return F.length>0&&(C?j="["+F.join(" | ")+"]":j=F.join(`
|
|
|
`)),j},b.getTextAndFormat=function(){return this.rows},c}(),w=function(){function c(x,C,F){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=x,this.outputFilter=C,this.mode=null,this.verbose=0,this.displayedMemory=new u(F),this.nonDisplayedMemory=new u(F),this.lastOutputScreen=new u(F),this.currRollUpRow=this.displayedMemory.rows[S-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=F}var b=c.prototype;return b.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},b.getHandler=function(){return this.outputFilter},b.setHandler=function(C){this.outputFilter=C},b.setPAC=function(C){this.writeScreen.setPAC(C)},b.setBkgData=function(C){this.writeScreen.setBkgData(C)},b.setMode=function(C){if(C===this.mode)return;this.mode=C,this.logger.log(h.INFO,"MODE="+C),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=C},b.insertChars=function(C){for(var F=0;F<C.length;F++)this.writeScreen.insertChar(C[F]);var j=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(h.INFO,j+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(h.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},b.ccRCL=function(){this.logger.log(h.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},b.ccBS=function(){if(this.logger.log(h.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},b.ccAOF=function(){},b.ccAON=function(){},b.ccDER=function(){this.logger.log(h.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},b.ccRU=function(C){this.logger.log(h.INFO,"RU("+C+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(C)},b.ccFON=function(){this.logger.log(h.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},b.ccRDC=function(){this.logger.log(h.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},b.ccTR=function(){this.logger.log(h.INFO,"TR"),this.setMode("MODE_TEXT")},b.ccRTD=function(){this.logger.log(h.INFO,"RTD"),this.setMode("MODE_TEXT")},b.ccEDM=function(){this.logger.log(h.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},b.ccCR=function(){this.logger.log(h.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},b.ccENM=function(){this.logger.log(h.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},b.ccEOC=function(){if(this.logger.log(h.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var C=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=C,this.writeScreen=this.nonDisplayedMemory,this.logger.log(h.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},b.ccTO=function(C){this.logger.log(h.INFO,"TO("+C+") - Tab Offset"),this.writeScreen.moveCursor(C)},b.ccMIDROW=function(C){var F={flash:!1};if(F.underline=C%2===1,F.italics=C>=46,F.italics)F.foreground="white";else{var j=Math.floor(C/2)-16,k=["white","green","blue","cyan","red","yellow","magenta"];F.foreground=k[j]}this.logger.log(h.INFO,"MIDROW: "+JSON.stringify(F)),this.writeScreen.setPen(F)},b.outputDataUpdate=function(C){C===void 0&&(C=!1);var F=this.logger.time;if(F===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=F:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,F,this.lastOutputScreen),C&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:F),this.lastOutputScreen.copy(this.displayedMemory))},b.cueSplitAtTime=function(C){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,C,this.displayedMemory),this.cueStartTime=C))},c}(),v=function(){function c(x,C,F){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var j=new E;this.channels=[null,new w(x,C,j),new w(x+1,F,j)],this.cmdHistory=D(),this.logger=j}var b=c.prototype;return b.getHandler=function(C){return this.channels[C].getHandler()},b.setHandler=function(C,F){this.channels[C].setHandler(F)},b.addData=function(C,F){var j,k,X,G=!1;this.logger.time=C;for(var W=0;W<F.length;W+=2){if(k=F[W]&127,X=F[W+1]&127,k===0&&X===0)continue;if(this.logger.log(h.DATA,"["+y([F[W],F[W+1]])+"] -> ("+y([k,X])+")"),j=this.parseCmd(k,X),j||(j=this.parseMidrow(k,X)),j||(j=this.parsePAC(k,X)),j||(j=this.parseBackgroundAttributes(k,X)),!j&&(G=this.parseChars(k,X),G)){var K=this.currentChannel;if(K&&K>0){var B=this.channels[K];B.insertChars(G)}else this.logger.log(h.WARNING,"No channel found yet. TEXT-MODE?")}!j&&!G&&this.logger.log(h.WARNING,"Couldn't parse cleaned data "+y([k,X])+" orig: "+y([F[W],F[W+1]]))}},b.parseCmd=function(C,F){var j=this.cmdHistory,k=(C===20||C===28||C===21||C===29)&&F>=32&&F<=47,X=(C===23||C===31)&&F>=33&&F<=35;if(!(k||X))return!1;if(R(C,F,j))return a(null,null,j),this.logger.log(h.DEBUG,"Repeated command ("+y([C,F])+") is dropped"),!0;var G=C===20||C===21||C===23?1:2,W=this.channels[G];return C===20||C===21||C===28||C===29?F===32?W.ccRCL():F===33?W.ccBS():F===34?W.ccAOF():F===35?W.ccAON():F===36?W.ccDER():F===37?W.ccRU(2):F===38?W.ccRU(3):F===39?W.ccRU(4):F===40?W.ccFON():F===41?W.ccRDC():F===42?W.ccTR():F===43?W.ccRTD():F===44?W.ccEDM():F===45?W.ccCR():F===46?W.ccENM():F===47&&W.ccEOC():W.ccTO(F-32),a(C,F,j),this.currentChannel=G,!0},b.parseMidrow=function(C,F){var j=0;if((C===17||C===25)&&F>=32&&F<=47){if(C===17?j=1:j=2,j!==this.currentChannel)return this.logger.log(h.ERROR,"Mismatch channel in midrow parsing"),!1;var k=this.channels[j];return k?(k.ccMIDROW(F),this.logger.log(h.DEBUG,"MIDROW ("+y([C,F])+")"),!0):!1}return!1},b.parsePAC=function(C,F){var j,k=this.cmdHistory,X=(C>=17&&C<=23||C>=25&&C<=31)&&F>=64&&F<=127,G=(C===16||C===24)&&F>=64&&F<=95;if(!(X||G))return!1;if(R(C,F,k))return a(null,null,k),!0;var W=C<=23?1:2;F>=64&&F<=95?j=W===1?o[C]:r[C]:j=W===1?i[C]:d[C];var K=this.channels[W];return K?(K.setPAC(this.interpretPAC(j,F)),a(C,F,k),this.currentChannel=W,!0):!1},b.interpretPAC=function(C,F){var j,k={color:null,italics:!1,indent:null,underline:!1,row:C};return F>95?j=F-96:j=F-64,k.underline=(j&1)===1,j<=13?k.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(j/2)]:j<=15?(k.italics=!0,k.color="white"):k.indent=Math.floor((j-16)/2)*4,k},b.parseChars=function(C,F){var j,k=null,X=null;if(C>=25?(j=2,X=C-8):(j=1,X=C),X>=17&&X<=19){var G;X===17?G=F+80:X===18?G=F+112:G=F+144,this.logger.log(h.INFO,"Special char '"+g(G)+"' in channel "+j),k=[G]}else C>=32&&C<=127&&(k=F===0?[C]:[C,F]);if(k){var W=y(k);this.logger.log(h.DEBUG,"Char codes = "+W.join(",")),a(C,F,this.cmdHistory)}return k},b.parseBackgroundAttributes=function(C,F){var j=(C===16||C===24)&&F>=32&&F<=47,k=(C===23||C===31)&&F>=45&&F<=47;if(!(j||k))return!1;var X,G={};C===16||C===24?(X=Math.floor((F-32)/2),G.background=f[X],F%2===1&&(G.background=G.background+"_semi")):F===45?G.background="transparent":(G.foreground="black",F===47&&(G.underline=!0));var W=C<=23?1:2,K=this.channels[W];return K.setBkgData(G),a(C,F,this.cmdHistory),!0},b.reset=function(){for(var C=0;C<Object.keys(this.channels).length;C++){var F=this.channels[C];F&&F.reset()}this.cmdHistory=D()},b.cueSplitAtTime=function(C){for(var F=0;F<this.channels.length;F++){var j=this.channels[F];j&&j.cueSplitAtTime(C)}},c}();function a(c,b,x){x.a=c,x.b=b}function R(c,b,x){return x.a===c&&x.b===b}function D(){return{a:null,b:null}}m.default=v},"./src/utils/codecs.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"isCodecType",function(){return _}),T.d(m,"isCodecSupportedInMp4",function(){return g});var L={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 _(S,p){var o=L[p];return!!o&&o[S.slice(0,4)]===!0}function g(S,p){return MediaSource.isTypeSupported((p||"video")+'/mp4;codecs="'+S+'"')}},"./src/utils/cues.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/utils/vttparser.ts"),_=T("./src/utils/webvtt-parser.ts"),g=T("./src/utils/texttrack-utils.ts"),S=/\s/,p={newCue:function(i,r,d,f){for(var h=[],E,y,l,n,s,u=self.VTTCue||self.TextTrackCue,w=0;w<f.rows.length;w++)if(E=f.rows[w],l=!0,n=0,s="",!E.isEmpty()){for(var v=0;v<E.chars.length;v++)S.test(E.chars[v].uchar)&&l?n++:(s+=E.chars[v].uchar,l=!1);E.cueStartTime=r,r===d&&(d+=1e-4),n>=16?n--:n++;var a=Object(L.fixLineBreaks)(s.trim()),R=Object(_.generateCueId)(r,d,a);(!i||!i.cues||!i.cues.getCueById(R))&&(y=new u(r,d,a),y.id=R,y.line=w+1,y.align="left",y.position=10+Math.min(80,Math.floor(n*8/32)*10),h.push(y))}return i&&h.length&&(h.sort(function(D,c){return D.line==="auto"||c.line==="auto"?0:D.line>8&&c.line>8?c.line-D.line:D.line-c.line}),h.forEach(function(D){return Object(g.addCueToTrack)(i,D)})),h}};m.default=p},"./src/utils/discontinuities.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"findFirstFragWithCC",function(){return S}),T.d(m,"shouldAlignOnDiscontinuities",function(){return p}),T.d(m,"findDiscontinuousReferenceFrag",function(){return o}),T.d(m,"adjustSlidingStart",function(){return r}),T.d(m,"alignStream",function(){return d}),T.d(m,"alignPDT",function(){return h}),T.d(m,"alignFragmentByPDTDelta",function(){return E}),T.d(m,"alignMediaPlaylistByPDT",function(){return y});var L=T("./src/polyfills/number.ts"),_=T("./src/utils/logger.ts"),g=T("./src/controller/level-helper.ts");function S(l,n){for(var s=null,u=0,w=l.length;u<w;u++){var v=l[u];if(v&&v.cc===n){s=v;break}}return s}function p(l,n,s){return!!(n.details&&(s.endCC>s.startCC||l&&l.cc<s.startCC))}function o(l,n){var s=l.fragments,u=n.fragments;if(!u.length||!s.length){_.logger.log("No fragments to align");return}var w=S(s,u[0].cc);if(!w||w&&!w.startPTS){_.logger.log("No frag in previous level to align on");return}return w}function i(l,n){if(l){var s=l.start+n;l.start=l.startPTS=s,l.endPTS=s+l.duration}}function r(l,n){for(var s=n.fragments,u=0,w=s.length;u<w;u++)i(s[u],l);n.fragmentHint&&i(n.fragmentHint,l),n.alignedSliding=!0}function d(l,n,s){if(!n)return;f(l,s,n),!s.alignedSliding&&n.details&&h(s,n.details),!s.alignedSliding&&n.details&&!s.skippedSegments&&Object(g.adjustSliding)(n.details,s)}function f(l,n,s){if(p(l,s,n)){var u=o(s.details,n);u&&Object(L.isFiniteNumber)(u.start)&&(_.logger.log("Adjusting PTS using last level due to CC increase within current level "+n.url),r(u.start,n))}}function h(l,n){if(!n.fragments.length||!l.hasProgramDateTime||!n.hasProgramDateTime)return;var s=n.fragments[0].programDateTime,u=l.fragments[0].programDateTime,w=(u-s)/1e3+n.fragments[0].start;w&&Object(L.isFiniteNumber)(w)&&(_.logger.log("Adjusting PTS using programDateTime delta "+(u-s)+"ms, sliding:"+w.toFixed(3)+" "+l.url+" "),r(w,l))}function E(l,n){var s=l.programDateTime;if(!s)return;var u=(s-n)/1e3;l.start=l.startPTS=u,l.endPTS=u+l.duration}function y(l,n){if(!n.fragments.length||!l.hasProgramDateTime||!n.hasProgramDateTime)return;var s=n.fragments[0].programDateTime,u=n.fragments[0].start,w=s-u*1e3;l.fragments.forEach(function(v){E(v,w)}),l.fragmentHint&&E(l.fragmentHint,w),l.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/utils/ewma.ts"),_=function(){function g(p,o,i){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new L.default(p),this.fast_=new L.default(o)}var S=g.prototype;return S.update=function(o,i){var r=this.slow_,d=this.fast_;this.slow_.halfLife!==o&&(this.slow_=new L.default(o,r.getEstimate(),r.getTotalWeight())),this.fast_.halfLife!==i&&(this.fast_=new L.default(i,d.getEstimate(),d.getTotalWeight()))},S.sample=function(o,i){o=Math.max(o,this.minDelayMs_);var r=8*i,d=o/1e3,f=r/d;this.fast_.sample(d,f),this.slow_.sample(d,f)},S.canEstimate=function(){var o=this.fast_;return o&&o.getTotalWeight()>=this.minWeight_},S.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},S.destroy=function(){},g}();m.default=_},"./src/utils/ewma.ts":function(P,m,T){"use strict";T.r(m);var L=function(){function _(S,p,o){p===void 0&&(p=0),o===void 0&&(o=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_=p,this.totalWeight_=o}var g=_.prototype;return g.sample=function(p,o){var i=Math.pow(this.alpha_,p);this.estimate_=o*(1-i)+i*this.estimate_,this.totalWeight_+=p},g.getTotalWeight=function(){return this.totalWeight_},g.getEstimate=function(){if(this.alpha_){var p=1-Math.pow(this.alpha_,this.totalWeight_);if(p)return this.estimate_/p}return this.estimate_},_}();m.default=L},"./src/utils/fetch-loader.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"fetchSupported",function(){return E});var L=T("./src/polyfills/number.ts"),_=T("./src/loader/load-stats.ts"),g=T("./src/demux/chunk-cache.ts");function S(u,w){u.prototype=Object.create(w.prototype),u.prototype.constructor=u,d(u,w)}function p(u){var w=typeof Map=="function"?new Map:void 0;return p=function(a){if(a===null||!r(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof w!="undefined"){if(w.has(a))return w.get(a);w.set(a,R)}function R(){return o(a,arguments,f(this).constructor)}return R.prototype=Object.create(a.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),d(R,a)},p(u)}function o(u,w,v){return i()?o=Reflect.construct:o=function(R,D,c){var b=[null];b.push.apply(b,D);var x=Function.bind.apply(R,b),C=new x;return c&&d(C,c.prototype),C},o.apply(null,arguments)}function i(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(u){return!1}}function r(u){return Function.toString.call(u).indexOf("[native code]")!==-1}function d(u,w){return d=Object.setPrototypeOf||function(a,R){return a.__proto__=R,a},d(u,w)}function f(u){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},f(u)}function h(){return h=Object.assign||function(u){for(var w=1;w<arguments.length;w++){var v=arguments[w];for(var a in v)Object.prototype.hasOwnProperty.call(v,a)&&(u[a]=v[a])}return u},h.apply(this,arguments)}function E(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(u){}return!1}var y=function(){function u(v){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=v.fetchSetup||n,this.controller=new self.AbortController,this.stats=new _.LoadStats}var w=u.prototype;return w.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},w.abortInternal=function(){var a=this.response;(!a||!a.ok)&&(this.stats.aborted=!0,this.controller.abort())},w.abort=function(){var a;this.abortInternal(),(a=this.callbacks)!==null&&a!==void 0&&a.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},w.load=function(a,R,D){var c=this,b=this.stats;if(b.loading.start)throw new Error("Loader can only be used once.");b.loading.start=self.performance.now();var x=l(a,this.controller.signal),C=D.onProgress,F=a.responseType==="arraybuffer",j=F?"byteLength":"length";this.context=a,this.config=R,this.callbacks=D,this.request=this.fetchSetup(a,x),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){c.abortInternal(),D.onTimeout(b,a,c.response)},R.timeout),self.fetch(this.request).then(function(k){if(c.response=c.loader=k,!k.ok){var X=k.status,G=k.statusText;throw new s(G||"fetch, bad network response",X,k)}return b.loading.first=Math.max(self.performance.now(),b.loading.start),b.total=parseInt(k.headers.get("Content-Length")||"0"),C&&Object(L.isFiniteNumber)(R.highWaterMark)?c.loadProgressively(k,b,a,R.highWaterMark,C):F?k.arrayBuffer():k.text()}).then(function(k){var X=c.response;self.clearTimeout(c.requestTimeout),b.loading.end=Math.max(self.performance.now(),b.loading.first),b.loaded=b.total=k[j];var G={url:X.url,data:k};C&&!Object(L.isFiniteNumber)(R.highWaterMark)&&C(b,a,k,X),D.onSuccess(G,b,a,X)}).catch(function(k){if(self.clearTimeout(c.requestTimeout),b.aborted)return;var X=k.code||0;D.onError({code:X,text:k.message},a,k.details)})},w.getCacheAge=function(){var a=null;if(this.response){var R=this.response.headers.get("age");a=R?parseFloat(R):null}return a},w.loadProgressively=function(a,R,D,c,b){c===void 0&&(c=0);var x=new g.default,C=a.body.getReader(),F=function j(){return C.read().then(function(k){if(k.done)return x.dataLength&&b(R,D,x.flush(),a),Promise.resolve(new ArrayBuffer(0));var X=k.value,G=X.length;return R.loaded+=G,G<c||x.dataLength?(x.push(X),x.dataLength>=c&&b(R,D,x.flush(),a)):b(R,D,X,a),j()}).catch(function(){return Promise.reject()})};return F()},u}();function l(u,w){var v={method:"GET",mode:"cors",credentials:"same-origin",signal:w,headers:new self.Headers(h({},u.headers))};return u.rangeEnd&&v.headers.set("Range","bytes="+u.rangeStart+"-"+String(u.rangeEnd-1)),v}function n(u,w){return new self.Request(u.url,w)}var s=function(u){S(w,u);function w(v,a,R){var D;return D=u.call(this,v)||this,D.code=void 0,D.details=void 0,D.code=a,D.details=R,D}return w}(p(Error));m.default=y},"./src/utils/imsc1-ttml-parser.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"IMSC1_CODEC",function(){return r}),T.d(m,"parseIMSC1",function(){return E});var L=T("./src/utils/mp4-tools.ts"),_=T("./src/utils/vttparser.ts"),g=T("./src/utils/vttcue.ts"),S=T("./src/demux/id3.ts"),p=T("./src/utils/timescale-conversion.ts"),o=T("./src/utils/webvtt-parser.ts");function i(){return i=Object.assign||function(c){for(var b=1;b<arguments.length;b++){var x=arguments[b];for(var C in x)Object.prototype.hasOwnProperty.call(x,C)&&(c[C]=x[C])}return c},i.apply(this,arguments)}var r="stpp.ttml.im1t",d=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,f=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,h={left:"start",center:"center",right:"end",start:"start",end:"end"};function E(c,b,x,C,F){var j=Object(L.findBox)(new Uint8Array(c),["mdat"]);if(j.length===0){F(new Error("Could not parse IMSC1 mdat"));return}var k=j[0],X=Object(S.utf8ArrayToStr)(new Uint8Array(c,k.start,k.end-k.start)),G=Object(p.toTimescaleFromScale)(b,1,x);try{C(y(X,G))}catch(W){F(W)}}function y(c,b){var x=new DOMParser,C=x.parseFromString(c,"text/xml"),F=C.getElementsByTagName("tt")[0];if(!F)throw new Error("Invalid ttml");var j={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},k=Object.keys(j).reduce(function(B,U){return B[U]=F.getAttribute("ttp:"+U)||j[U],B},{}),X=F.getAttribute("xml:space")!=="preserve",G=n(l(F,"styling","style")),W=n(l(F,"layout","region")),K=l(F,"body","[begin]");return[].map.call(K,function(B){var U=s(B,X);if(!U||!B.hasAttribute("begin"))return null;var H=a(B.getAttribute("begin"),k),q=a(B.getAttribute("dur"),k),ie=a(B.getAttribute("end"),k);if(H===null)throw v(B);if(ie===null){if(q===null)throw v(B);ie=H+q}var ce=new g.default(H-b,ie-b,U);ce.id=Object(o.generateCueId)(ce.startTime,ce.endTime,ce.text);var he=W[B.getAttribute("region")],be=G[B.getAttribute("style")];ce.position=10,ce.size=80;var ne=u(he,be),le=ne.textAlign;if(le){var ue=h[le];ue&&(ce.lineAlign=ue),ce.align=le}return i(ce,ne),ce}).filter(function(B){return B!==null})}function l(c,b,x){var C=c.getElementsByTagName(b)[0];return C?[].slice.call(C.querySelectorAll(x)):[]}function n(c){return c.reduce(function(b,x){var C=x.getAttribute("xml:id");return C&&(b[C]=x),b},{})}function s(c,b){return[].slice.call(c.childNodes).reduce(function(x,C,F){var j;return C.nodeName==="br"&&F?x+`
|
|
|
`:(j=C.childNodes)!==null&&j!==void 0&&j.length?s(C,b):b?x+C.textContent.trim().replace(/\s+/g," "):x+C.textContent},"")}function u(c,b){var x="http://www.w3.org/ns/ttml#styling",C=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return C.reduce(function(F,j){var k=w(b,x,j)||w(c,x,j);return k&&(F[j]=k),F},{})}function w(c,b,x){return c.hasAttributeNS(b,x)?c.getAttributeNS(b,x):null}function v(c){return new Error("Could not parse ttml timestamp "+c)}function a(c,b){if(!c)return null;var x=Object(_.parseTimeStamp)(c);return x===null&&(d.test(c)?x=R(c,b):f.test(c)&&(x=D(c,b))),x}function R(c,b){var x=d.exec(c),C=(x[4]|0)+(x[5]|0)/b.subFrameRate;return(x[1]|0)*3600+(x[2]|0)*60+(x[3]|0)+C/b.frameRate}function D(c,b){var x=f.exec(c),C=Number(x[1]),F=x[2];switch(F){case"h":return C*3600;case"m":return C*60;case"ms":return C*1e3;case"f":return C/b.frameRate;case"t":return C/b.tickRate}return C}},"./src/utils/logger.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"enableLogs",function(){return o}),T.d(m,"logger",function(){return i});var L=function(){},_={trace:L,debug:L,log:L,warn:L,info:L,error:L},g=_;function S(r){var d=self.console[r];return d?d.bind(self.console,"["+r+"] >"):L}function p(r){for(var d=arguments.length,f=new Array(d>1?d-1:0),h=1;h<d;h++)f[h-1]=arguments[h];f.forEach(function(E){g[E]=r[E]?r[E].bind(r):S(E)})}function o(r){if(self.console&&r===!0||typeof r=="object"){p(r,"debug","log","info","warn","error");try{g.log()}catch(d){g=_}}else g=_}var i=g},"./src/utils/mediakeys-helper.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"KeySystems",function(){return L}),T.d(m,"requestMediaKeySystemAccess",function(){return _});var L;(function(g){g.WIDEVINE="com.widevine.alpha",g.PLAYREADY="com.microsoft.playready"})(L||(L={}));var _=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"getMediaSource",function(){return L});function L(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"bin2str",function(){return p}),T.d(m,"readUint16",function(){return o}),T.d(m,"readUint32",function(){return i}),T.d(m,"writeUint32",function(){return r}),T.d(m,"findBox",function(){return d}),T.d(m,"parseSegmentIndex",function(){return f}),T.d(m,"parseInitSegment",function(){return h}),T.d(m,"getStartDTS",function(){return E}),T.d(m,"getDuration",function(){return y}),T.d(m,"computeRawDurationFromSamples",function(){return l}),T.d(m,"offsetStartDTS",function(){return n}),T.d(m,"segmentValidRange",function(){return s}),T.d(m,"appendUint8Array",function(){return u});var L=T("./src/utils/typed-array.ts"),_=T("./src/loader/fragment.ts"),g=Math.pow(2,32)-1,S=[].push;function p(w){return String.fromCharCode.apply(null,w)}function o(w,v){"data"in w&&(v+=w.start,w=w.data);var a=w[v]<<8|w[v+1];return a<0?65536+a:a}function i(w,v){"data"in w&&(v+=w.start,w=w.data);var a=w[v]<<24|w[v+1]<<16|w[v+2]<<8|w[v+3];return a<0?4294967296+a:a}function r(w,v,a){"data"in w&&(v+=w.start,w=w.data),w[v]=a>>24,w[v+1]=a>>16&255,w[v+2]=a>>8&255,w[v+3]=a&255}function d(w,v){var a=[];if(!v.length)return a;var R,D,c;"data"in w?(R=w.data,D=w.start,c=w.end):(R=w,D=0,c=R.byteLength);for(var b=D;b<c;){var x=i(R,b),C=p(R.subarray(b+4,b+8)),F=x>1?b+x:c;if(C===v[0])if(v.length===1)a.push({data:R,start:b+8,end:F});else{var j=d({data:R,start:b+8,end:F},v.slice(1));j.length&&S.apply(a,j)}b=F}return a}function f(w){var v=d(w,["moov"]),a=v[0],R=a?a.end:null,D=d(w,["sidx"]);if(!D||!D[0])return null;var c=[],b=D[0],x=b.data[0],C=x===0?8:16,F=i(b,C);C+=4;var j=0,k=0;x===0?C+=8:C+=16,C+=2;var X=b.end+k,G=o(b,C);C+=2;for(var W=0;W<G;W++){var K=C,B=i(b,K);K+=4;var U=B&2147483647,H=(B&2147483648)>>>31;if(H===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var q=i(b,K);K+=4,c.push({referenceSize:U,subsegmentDuration:q,info:{duration:q/F,start:X,end:X+U-1}}),X+=U,K+=4,C=K}return{earliestPresentationTime:j,timescale:F,version:x,referencesCount:G,references:c,moovEndOffset:R}}function h(w){for(var v=[],a=d(w,["moov","trak"]),R=0;R<a.length;R++){var D=a[R],c=d(D,["tkhd"])[0];if(c){var b=c.data[c.start],x=b===0?12:20,C=i(c,x),F=d(D,["mdia","mdhd"])[0];if(F){b=F.data[F.start],x=b===0?12:20;var j=i(F,x),k=d(D,["mdia","hdlr"])[0];if(k){var X=p(k.data.subarray(k.start+8,k.start+12)),G={soun:_.ElementaryStreamTypes.AUDIO,vide:_.ElementaryStreamTypes.VIDEO}[X];if(G){var W=d(D,["mdia","minf","stbl","stsd"])[0],K=void 0;W&&(K=p(W.data.subarray(W.start+12,W.start+16))),v[C]={timescale:j,type:G},v[G]={timescale:j,id:C,codec:K}}}}}}var B=d(w,["moov","mvex","trex"]);return B.forEach(function(U){var H=i(U,4),q=v[H];q&&(q.default={duration:i(U,12),flags:i(U,20)})}),v}function E(w,v){return d(v,["moof","traf"]).reduce(function(a,R){var D=d(R,["tfdt"])[0],c=D.data[D.start],b=d(R,["tfhd"]).reduce(function(x,C){var F=i(C,4),j=w[F];if(j){var k=i(D,4);c===1&&(k*=Math.pow(2,32),k+=i(D,8));var X=j.timescale||9e4,G=k/X;if(isFinite(G)&&(x===null||G<x))return G}return x},null);return b!==null&&isFinite(b)&&(a===null||b<a)?b:a},null)||0}function y(w,v){for(var a=0,R=0,D=0,c=d(w,["moof","traf"]),b=0;b<c.length;b++){var x=c[b],C=d(x,["tfhd"])[0],F=i(C,4),j=v[F];if(!j)continue;var k=j.default,X=i(C,0)|(k==null?void 0:k.flags),G=k==null?void 0:k.duration;X&8&&(X&2?G=i(C,12):G=i(C,8));for(var W=j.timescale||9e4,K=d(x,["trun"]),B=0;B<K.length;B++){if(G){var U=i(K[B],4);a=G*U}else a=l(K[B]);j.type===_.ElementaryStreamTypes.VIDEO?R+=a/W:j.type===_.ElementaryStreamTypes.AUDIO&&(D+=a/W)}}if(R===0&&D===0){var H=f(w);if(H!=null&&H.references)return H.references.reduce(function(q,ie){return q+ie.info.duration||0},0)}return R||D}function l(w){var v=i(w,0),a=8;v&1&&(a+=4),v&4&&(a+=4);for(var R=0,D=i(w,4),c=0;c<D;c++){if(v&256){var b=i(w,a);R+=b,a+=4}v&512&&(a+=4),v&1024&&(a+=4),v&2048&&(a+=4)}return R}function n(w,v,a){d(v,["moof","traf"]).forEach(function(R){d(R,["tfhd"]).forEach(function(D){var c=i(D,4),b=w[c];if(!b)return;var x=b.timescale||9e4;d(R,["tfdt"]).forEach(function(C){var F=C.data[C.start],j=i(C,4);if(F===0)r(C,4,j-a*x);else{j*=Math.pow(2,32),j+=i(C,8),j-=a*x,j=Math.max(j,0);var k=Math.floor(j/(g+1)),X=Math.floor(j%(g+1));r(C,4,k),r(C,8,X)}})})})}function s(w){var v={valid:null,remainder:null},a=d(w,["moof"]);if(a){if(a.length<2)return v.remainder=w,v}else return v;var R=a[a.length-1];return v.valid=Object(L.sliceUint8)(w,0,R.start-8),v.remainder=Object(L.sliceUint8)(w,R.start-8),v}function u(w,v){var a=new Uint8Array(w.length+v.length);return a.set(w),a.set(v,w.length),a}},"./src/utils/output-filter.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"default",function(){return L});var L=function(){function _(S,p){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=S,this.trackName=p}var g=_.prototype;return g.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},g.newCue=function(p,o,i){(this.startTime===null||this.startTime>p)&&(this.startTime=p),this.endTime=o,this.screen=i,this.timelineController.createCaptionsTrack(this.trackName)},g.reset=function(){this.cueRanges=[]},_}()},"./src/utils/texttrack-utils.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"sendAddTrackEvent",function(){return _}),T.d(m,"addCueToTrack",function(){return g}),T.d(m,"clearCurrentCues",function(){return S}),T.d(m,"removeCuesInRange",function(){return p}),T.d(m,"getCuesInRange",function(){return i});var L=T("./src/utils/logger.ts");function _(r,d){var f;try{f=new Event("addtrack")}catch(h){f=document.createEvent("Event"),f.initEvent("addtrack",!1,!1)}f.track=r,d.dispatchEvent(f)}function g(r,d){var f=r.mode;if(f==="disabled"&&(r.mode="hidden"),r.cues&&!r.cues.getCueById(d.id))try{if(r.addCue(d),!r.cues.getCueById(d.id))throw new Error("addCue is failed for: "+d)}catch(E){L.logger.debug("[texttrack-utils]: "+E);var h=new self.TextTrackCue(d.startTime,d.endTime,d.text);h.id=d.id,r.addCue(h)}f==="disabled"&&(r.mode=f)}function S(r){var d=r.mode;if(d==="disabled"&&(r.mode="hidden"),r.cues)for(var f=r.cues.length;f--;)r.removeCue(r.cues[f]);d==="disabled"&&(r.mode=d)}function p(r,d,f){var h=r.mode;if(h==="disabled"&&(r.mode="hidden"),r.cues&&r.cues.length>0)for(var E=i(r.cues,d,f),y=0;y<E.length;y++)r.removeCue(E[y]);h==="disabled"&&(r.mode=h)}function o(r,d){if(d<r[0].startTime)return 0;var f=r.length-1;if(d>r[f].endTime)return-1;for(var h=0,E=f;h<=E;){var y=Math.floor((E+h)/2);if(d<r[y].startTime)E=y-1;else if(d>r[y].startTime&&h<f)h=y+1;else return y}return r[h].startTime-d<d-r[E].startTime?h:E}function i(r,d,f){var h=[],E=o(r,d);if(E>-1)for(var y=E,l=r.length;y<l;y++){var n=r[y];if(n.startTime>=d&&n.endTime<=f)h.push(n);else if(n.startTime>f)return h}return h}},"./src/utils/time-ranges.ts":function(P,m,T){"use strict";T.r(m);var L={toString:function(g){for(var S="",p=g.length,o=0;o<p;o++)S+="["+g.start(o).toFixed(3)+","+g.end(o).toFixed(3)+"]";return S}};m.default=L},"./src/utils/timescale-conversion.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"toTimescaleFromBase",function(){return _}),T.d(m,"toTimescaleFromScale",function(){return g}),T.d(m,"toMsFromMpegTsClock",function(){return S}),T.d(m,"toMpegTsClockFromTimescale",function(){return p});var L=9e4;function _(o,i,r,d){r===void 0&&(r=1),d===void 0&&(d=!1);var f=o*i*r;return d?Math.round(f):f}function g(o,i,r,d){return r===void 0&&(r=1),d===void 0&&(d=!1),_(o,i,1/r,d)}function S(o,i){return i===void 0&&(i=!1),_(o,1e3,1/L,i)}function p(o,i){return i===void 0&&(i=1),_(o,L,1/i)}},"./src/utils/typed-array.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"sliceUint8",function(){return L});function L(_,g,S){return Uint8Array.prototype.slice?_.slice(g,S):new Uint8Array(Array.prototype.slice.call(_,g,S))}},"./src/utils/vttcue.ts":function(P,m,T){"use strict";T.r(m),m.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var L=["","lr","rl"],_=["start","middle","end","left","right"];function g(r,d){if(typeof d!="string")return!1;if(!Array.isArray(r))return!1;var f=d.toLowerCase();return~r.indexOf(f)?f:!1}function S(r){return g(L,r)}function p(r){return g(_,r)}function o(r){for(var d=arguments.length,f=new Array(d>1?d-1:0),h=1;h<d;h++)f[h-1]=arguments[h];for(var E=1;E<arguments.length;E++){var y=arguments[E];for(var l in y)r[l]=y[l]}return r}function i(r,d,f){var h=this,E={enumerable:!0};h.hasBeenReset=!1;var y="",l=!1,n=r,s=d,u=f,w=null,v="",a=!0,R="auto",D="start",c=50,b="middle",x=50,C="middle";Object.defineProperty(h,"id",o({},E,{get:function(){return y},set:function(j){y=""+j}})),Object.defineProperty(h,"pauseOnExit",o({},E,{get:function(){return l},set:function(j){l=!!j}})),Object.defineProperty(h,"startTime",o({},E,{get:function(){return n},set:function(j){if(typeof j!="number")throw new TypeError("Start time must be set to a number.");n=j,this.hasBeenReset=!0}})),Object.defineProperty(h,"endTime",o({},E,{get:function(){return s},set:function(j){if(typeof j!="number")throw new TypeError("End time must be set to a number.");s=j,this.hasBeenReset=!0}})),Object.defineProperty(h,"text",o({},E,{get:function(){return u},set:function(j){u=""+j,this.hasBeenReset=!0}})),Object.defineProperty(h,"region",o({},E,{get:function(){return w},set:function(j){w=j,this.hasBeenReset=!0}})),Object.defineProperty(h,"vertical",o({},E,{get:function(){return v},set:function(j){var k=S(j);if(k===!1)throw new SyntaxError("An invalid or illegal string was specified.");v=k,this.hasBeenReset=!0}})),Object.defineProperty(h,"snapToLines",o({},E,{get:function(){return a},set:function(j){a=!!j,this.hasBeenReset=!0}})),Object.defineProperty(h,"line",o({},E,{get:function(){return R},set:function(j){if(typeof j!="number"&&j!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");R=j,this.hasBeenReset=!0}})),Object.defineProperty(h,"lineAlign",o({},E,{get:function(){return D},set:function(j){var k=p(j);if(!k)throw new SyntaxError("An invalid or illegal string was specified.");D=k,this.hasBeenReset=!0}})),Object.defineProperty(h,"position",o({},E,{get:function(){return c},set:function(j){if(j<0||j>100)throw new Error("Position must be between 0 and 100.");c=j,this.hasBeenReset=!0}})),Object.defineProperty(h,"positionAlign",o({},E,{get:function(){return b},set:function(j){var k=p(j);if(!k)throw new SyntaxError("An invalid or illegal string was specified.");b=k,this.hasBeenReset=!0}})),Object.defineProperty(h,"size",o({},E,{get:function(){return x},set:function(j){if(j<0||j>100)throw new Error("Size must be between 0 and 100.");x=j,this.hasBeenReset=!0}})),Object.defineProperty(h,"align",o({},E,{get:function(){return C},set:function(j){var k=p(j);if(!k)throw new SyntaxError("An invalid or illegal string was specified.");C=k,this.hasBeenReset=!0}})),h.displayState=void 0}return i.prototype.getCueAsHTML=function(){var r=self.WebVTT;return r.convertCueToDOMTree(self,this.text)},i}()},"./src/utils/vttparser.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"parseTimeStamp",function(){return g}),T.d(m,"fixLineBreaks",function(){return d}),T.d(m,"VTTParser",function(){return f});var L=T("./src/utils/vttcue.ts"),_=function(){function h(){}var E=h.prototype;return E.decode=function(l,n){if(!l)return"";if(typeof l!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(l))},h}();function g(h){function E(l,n,s,u){return(l|0)*3600+(n|0)*60+(s|0)+parseFloat(u||0)}var y=h.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return y?parseFloat(y[2])>59?E(y[2],y[3],0,y[4]):E(y[1],y[2],y[3],y[4]):null}var S=function(){function h(){this.values=Object.create(null)}var E=h.prototype;return E.set=function(l,n){!this.get(l)&&n!==""&&(this.values[l]=n)},E.get=function(l,n,s){return s?this.has(l)?this.values[l]:n[s]:this.has(l)?this.values[l]:n},E.has=function(l){return l in this.values},E.alt=function(l,n,s){for(var u=0;u<s.length;++u)if(n===s[u]){this.set(l,n);break}},E.integer=function(l,n){/^-?\d+$/.test(n)&&this.set(l,parseInt(n,10))},E.percent=function(l,n){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(n)){var s=parseFloat(n);if(s>=0&&s<=100)return this.set(l,s),!0}return!1},h}();function p(h,E,y,l){var n=l?h.split(l):[h];for(var s in n){if(typeof n[s]!="string")continue;var u=n[s].split(y);if(u.length!==2)continue;var w=u[0],v=u[1];E(w,v)}}var o=new L.default(0,0,""),i=o.align==="middle"?"middle":"center";function r(h,E,y){var l=h;function n(){var w=g(h);if(w===null)throw new Error("Malformed timestamp: "+l);return h=h.replace(/^[^\sa-zA-Z-]+/,""),w}function s(w,v){var a=new S;p(w,function(c,b){var x;switch(c){case"region":for(var C=y.length-1;C>=0;C--)if(y[C].id===b){a.set(c,y[C].region);break}break;case"vertical":a.alt(c,b,["rl","lr"]);break;case"line":x=b.split(","),a.integer(c,x[0]),a.percent(c,x[0])&&a.set("snapToLines",!1),a.alt(c,x[0],["auto"]),x.length===2&&a.alt("lineAlign",x[1],["start",i,"end"]);break;case"position":x=b.split(","),a.percent(c,x[0]),x.length===2&&a.alt("positionAlign",x[1],["start",i,"end","line-left","line-right","auto"]);break;case"size":a.percent(c,b);break;case"align":a.alt(c,b,["start",i,"end","left","right"]);break}},/:/,/\s/),v.region=a.get("region",null),v.vertical=a.get("vertical","");var R=a.get("line","auto");R==="auto"&&o.line===-1&&(R=-1),v.line=R,v.lineAlign=a.get("lineAlign","start"),v.snapToLines=a.get("snapToLines",!0),v.size=a.get("size",100),v.align=a.get("align",i);var D=a.get("position","auto");D==="auto"&&o.position===50&&(D=v.align==="start"||v.align==="left"?0:v.align==="end"||v.align==="right"?100:50),v.position=D}function u(){h=h.replace(/^\s+/,"")}if(u(),E.startTime=n(),u(),h.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+l);h=h.substr(3),u(),E.endTime=n(),u(),s(h,E)}function d(h){return h.replace(/<br(?: \/)?>/gi,`
|
|
|
`)}var f=function(){function h(){this.state="INITIAL",this.buffer="",this.decoder=new _,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var E=h.prototype;return E.parse=function(l){var n=this;l&&(n.buffer+=n.decoder.decode(l,{stream:!0}));function s(){var D=n.buffer,c=0;for(D=d(D);c<D.length&&D[c]!=="\r"&&D[c]!==`
|
|
|
`;)++c;var b=D.substr(0,c);return D[c]==="\r"&&++c,D[c]===`
|
|
|
`&&++c,n.buffer=D.substr(c),b}function u(D){p(D,function(c,b){},/:/)}try{var w="";if(n.state==="INITIAL"){if(!/\r\n|\n/.test(n.buffer))return this;w=s();var v=w.match(/^()?WEBVTT([ \t].*)?$/);if(!v||!v[0])throw new Error("Malformed WebVTT signature.");n.state="HEADER"}for(var a=!1;n.buffer;){if(!/\r\n|\n/.test(n.buffer))return this;a?a=!1:w=s();switch(n.state){case"HEADER":/:/.test(w)?u(w):w||(n.state="ID");continue;case"NOTE":w||(n.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(w)){n.state="NOTE";break}if(!w)continue;if(n.cue=new L.default(0,0,""),n.state="CUE",w.indexOf("-->")===-1){n.cue.id=w;continue}case"CUE":if(!n.cue){n.state="BADCUE";continue}try{r(w,n.cue,n.regionList)}catch(D){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":{var R=w.indexOf("-->")!==-1;if(!w||R&&(a=!0)){n.oncue&&n.cue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}if(n.cue===null)continue;n.cue.text&&(n.cue.text+=`
|
|
|
`),n.cue.text+=w}continue;case"BADCUE":w||(n.state="ID")}}}catch(D){n.state==="CUETEXT"&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state=n.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},E.flush=function(){var l=this;try{if((l.cue||l.state==="HEADER")&&(l.buffer+=`
|
|
|
|
|
|
`,l.parse()),l.state==="INITIAL"||l.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){l.onparsingerror&&l.onparsingerror(n)}return l.onflush&&l.onflush(),this},h}()},"./src/utils/webvtt-parser.ts":function(P,m,T){"use strict";T.r(m),T.d(m,"generateCueId",function(){return f}),T.d(m,"parseWebVTT",function(){return E});var L=T("./src/polyfills/number.ts"),_=T("./src/utils/vttparser.ts"),g=T("./src/demux/id3.ts"),S=T("./src/utils/timescale-conversion.ts"),p=T("./src/remux/mp4-remuxer.ts"),o=/\r\n|\n\r|\n|\r/g,i=function(l,n,s){return s===void 0&&(s=0),l.substr(s,n.length)===n},r=function(l){var n=parseInt(l.substr(-3)),s=parseInt(l.substr(-6,2)),u=parseInt(l.substr(-9,2)),w=l.length>9?parseInt(l.substr(0,l.indexOf(":"))):0;if(!Object(L.isFiniteNumber)(n)||!Object(L.isFiniteNumber)(s)||!Object(L.isFiniteNumber)(u)||!Object(L.isFiniteNumber)(w))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+l);return n+=1e3*s,n+=60*1e3*u,n+=60*60*1e3*w,n},d=function(l){for(var n=5381,s=l.length;s;)n=n*33^l.charCodeAt(--s);return(n>>>0).toString()};function f(y,l,n){return d(y.toString())+d(l.toString())+d(n)}var h=function(l,n,s){var u=l[n],w=l[u.prevCC];if(!w||!w.new&&u.new){l.ccOffset=l.presentationOffset=u.start,u.new=!1;return}for(;(v=w)!==null&&v!==void 0&&v.new;){var v;l.ccOffset+=u.start-w.start,u.new=!1,u=w,w=l[u.prevCC]}l.presentationOffset=s};function E(y,l,n,s,u,w,v,a){var R=new _.VTTParser,D=Object(g.utf8ArrayToStr)(new Uint8Array(y)).trim().replace(o,`
|
|
|
`).split(`
|
|
|
`),c=[],b=Object(S.toMpegTsClockFromTimescale)(l,n),x="00:00.000",C=0,F=0,j,k=!0,X=!1;R.oncue=function(G){var W=s[u],K=s.ccOffset,B=(C-b)/9e4;if(W!=null&&W.new&&(F!==void 0?K=s.ccOffset=W.start:h(s,u,B)),B&&(K=B-s.presentationOffset),X){var U=G.endTime-G.startTime,H=Object(p.normalizePts)((G.startTime+K-F)*9e4,w*9e4)/9e4;G.startTime=H,G.endTime=H+U}var q=G.text.trim();G.text=decodeURIComponent(encodeURIComponent(q)),G.id||(G.id=f(G.startTime,G.endTime,q)),G.endTime>0&&c.push(G)},R.onparsingerror=function(G){j=G},R.onflush=function(){if(j){a(j);return}v(c)},D.forEach(function(G){if(k)if(i(G,"X-TIMESTAMP-MAP=")){k=!1,X=!0,G.substr(16).split(",").forEach(function(W){i(W,"LOCAL:")?x=W.substr(6):i(W,"MPEGTS:")&&(C=parseInt(W.substr(7)))});try{F=r(x)/1e3}catch(W){X=!1,j=W}return}else G===""&&(k=!1);R.parse(G+`
|
|
|
`)}),R.flush()}},"./src/utils/xhr-loader.ts":function(P,m,T){"use strict";T.r(m);var L=T("./src/utils/logger.ts"),_=T("./src/loader/load-stats.ts"),g=/^age:\s*[\d.]+\s*$/m,S=function(){function p(i){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=i?i.xhrSetup:null,this.stats=new _.LoadStats,this.retryDelay=0}var o=p.prototype;return o.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},o.abortInternal=function(){var r=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),r&&(r.onreadystatechange=null,r.onprogress=null,r.readyState!==4&&(this.stats.aborted=!0,r.abort()))},o.abort=function(){var r;this.abortInternal(),(r=this.callbacks)!==null&&r!==void 0&&r.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},o.load=function(r,d,f){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=r,this.config=d,this.callbacks=f,this.retryDelay=d.retryDelay,this.loadInternal()},o.loadInternal=function(){var r=this.config,d=this.context;if(!r)return;var f=this.loader=new self.XMLHttpRequest,h=this.stats;h.loading.first=0,h.loaded=0;var E=this.xhrSetup;try{if(E)try{E(f,d.url)}catch(n){f.open("GET",d.url,!0),E(f,d.url)}f.readyState||f.open("GET",d.url,!0);var y=this.context.headers;if(y)for(var l in y)f.setRequestHeader(l,y[l])}catch(n){this.callbacks.onError({code:f.status,text:n.message},d,f);return}d.rangeEnd&&f.setRequestHeader("Range","bytes="+d.rangeStart+"-"+(d.rangeEnd-1)),f.onreadystatechange=this.readystatechange.bind(this),f.onprogress=this.loadprogress.bind(this),f.responseType=d.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),f.send()},o.readystatechange=function(){var r=this.context,d=this.loader,f=this.stats;if(!r||!d)return;var h=d.readyState,E=this.config;if(f.aborted)return;if(h>=2)if(self.clearTimeout(this.requestTimeout),f.loading.first===0&&(f.loading.first=Math.max(self.performance.now(),f.loading.start)),h===4){d.onreadystatechange=null,d.onprogress=null;var y=d.status;if(y>=200&&y<300){f.loading.end=Math.max(self.performance.now(),f.loading.first);var l,n;if(r.responseType==="arraybuffer"?(l=d.response,n=l.byteLength):(l=d.responseText,n=l.length),f.loaded=f.total=n,!this.callbacks)return;var s=this.callbacks.onProgress;if(s&&s(f,r,l,d),!this.callbacks)return;var u={url:d.responseURL,data:l};this.callbacks.onSuccess(u,f,r,d)}else f.retry>=E.maxRetry||y>=400&&y<499?(L.logger.error(y+" while loading "+r.url),this.callbacks.onError({code:y,text:d.statusText},r,d)):(L.logger.warn(y+" while loading "+r.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,E.maxRetryDelay),f.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),E.timeout)},o.loadtimeout=function(){L.logger.warn("timeout while loading "+this.context.url);var r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))},o.loadprogress=function(r){var d=this.stats;d.loaded=r.loaded,r.lengthComputable&&(d.total=r.total)},o.getCacheAge=function(){var r=null;if(this.loader&&g.test(this.loader.getAllResponseHeaders())){var d=this.loader.getResponseHeader("age");r=d?parseFloat(d):null}return r},p}();m.default=S}}).default})},w7YG:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("ETIr"),N("cv67"),N("K3mO"),N("OLod"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.StreamCipher,_=m.algo,g=_.RC4=L.extend({_doReset:function(){for(var o=this._key,i=o.words,r=o.sigBytes,d=this._S=[],f=0;f<256;f++)d[f]=f;for(var f=0,h=0;f<256;f++){var E=f%r,y=i[E>>>2]>>>24-E%4*8&255;h=(h+d[f]+y)%256;var l=d[f];d[f]=d[h],d[h]=l}this._i=this._j=0},_doProcessBlock:function(o,i){o[i]^=S.call(this)},keySize:256/32,ivSize:0});function S(){for(var o=this._S,i=this._i,r=this._j,d=0,f=0;f<4;f++){i=(i+1)%256,r=(r+o[i])%256;var h=o[i];o[i]=o[r],o[r]=h,d|=o[(o[i]+o[r])%256]<<24-f*8}return this._i=i,this._j=r,d}m.RC4=L._createHelper(g);var p=_.RC4Drop=g.extend({cfg:g.cfg.extend({drop:192}),_doReset:function(){g._doReset.call(this);for(var o=this.cfg.drop;o>0;o--)S.call(this)}});m.RC4Drop=L._createHelper(p)}(),P.RC4})},wZgz:function(I,Z,N){(function(P,m,T){I.exports=Z=m(N("Ib8C"),N("ETIr"),N("cv67"),N("K3mO"),N("OLod"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.BlockCipher,_=m.algo,g=[],S=[],p=[],o=[],i=[],r=[],d=[],f=[],h=[],E=[];(function(){for(var n=[],s=0;s<256;s++)s<128?n[s]=s<<1:n[s]=s<<1^283;for(var u=0,w=0,s=0;s<256;s++){var v=w^w<<1^w<<2^w<<3^w<<4;v=v>>>8^v&255^99,g[u]=v,S[v]=u;var a=n[u],R=n[a],D=n[R],c=n[v]*257^v*16843008;p[u]=c<<24|c>>>8,o[u]=c<<16|c>>>16,i[u]=c<<8|c>>>24,r[u]=c;var c=D*16843009^R*65537^a*257^u*16843008;d[v]=c<<24|c>>>8,f[v]=c<<16|c>>>16,h[v]=c<<8|c>>>24,E[v]=c,u?(u=a^n[n[n[D^a]]],w^=n[n[w]]):u=w=1}})();var y=[0,1,2,4,8,16,32,64,128,27,54],l=_.AES=L.extend({_doReset:function(){var n;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var s=this._keyPriorReset=this._key,u=s.words,w=s.sigBytes/4,v=this._nRounds=w+6,a=(v+1)*4,R=this._keySchedule=[],D=0;D<a;D++)D<w?R[D]=u[D]:(n=R[D-1],D%w?w>6&&D%w==4&&(n=g[n>>>24]<<24|g[n>>>16&255]<<16|g[n>>>8&255]<<8|g[n&255]):(n=n<<8|n>>>24,n=g[n>>>24]<<24|g[n>>>16&255]<<16|g[n>>>8&255]<<8|g[n&255],n^=y[D/w|0]<<24),R[D]=R[D-w]^n);for(var c=this._invKeySchedule=[],b=0;b<a;b++){var D=a-b;if(b%4)var n=R[D];else var n=R[D-4];b<4||D<=4?c[b]=n:c[b]=d[g[n>>>24]]^f[g[n>>>16&255]]^h[g[n>>>8&255]]^E[g[n&255]]}},encryptBlock:function(n,s){this._doCryptBlock(n,s,this._keySchedule,p,o,i,r,g)},decryptBlock:function(n,s){var u=n[s+1];n[s+1]=n[s+3],n[s+3]=u,this._doCryptBlock(n,s,this._invKeySchedule,d,f,h,E,S);var u=n[s+1];n[s+1]=n[s+3],n[s+3]=u},_doCryptBlock:function(n,s,u,w,v,a,R,D){for(var c=this._nRounds,b=n[s]^u[0],x=n[s+1]^u[1],C=n[s+2]^u[2],F=n[s+3]^u[3],j=4,k=1;k<c;k++){var X=w[b>>>24]^v[x>>>16&255]^a[C>>>8&255]^R[F&255]^u[j++],G=w[x>>>24]^v[C>>>16&255]^a[F>>>8&255]^R[b&255]^u[j++],W=w[C>>>24]^v[F>>>16&255]^a[b>>>8&255]^R[x&255]^u[j++],K=w[F>>>24]^v[b>>>16&255]^a[x>>>8&255]^R[C&255]^u[j++];b=X,x=G,C=W,F=K}var X=(D[b>>>24]<<24|D[x>>>16&255]<<16|D[C>>>8&255]<<8|D[F&255])^u[j++],G=(D[x>>>24]<<24|D[C>>>16&255]<<16|D[F>>>8&255]<<8|D[b&255])^u[j++],W=(D[C>>>24]<<24|D[F>>>16&255]<<16|D[b>>>8&255]<<8|D[x&255])^u[j++],K=(D[F>>>24]<<24|D[b>>>16&255]<<16|D[x>>>8&255]<<8|D[C&255])^u[j++];n[s]=X,n[s+1]=G,n[s+2]=W,n[s+3]=K},keySize:256/32});m.AES=L._createHelper(l)}(),P.AES})},wbyO:function(I,Z,N){(function(P,m){I.exports=Z=m(N("Ib8C"))})(this,function(P){return function(){var m=P,T=m.lib,L=T.WordArray,_=m.enc,g=_.Base64url={stringify:function(p,o=!0){var i=p.words,r=p.sigBytes,d=o?this._safe_map:this._map;p.clamp();for(var f=[],h=0;h<r;h+=3)for(var E=i[h>>>2]>>>24-h%4*8&255,y=i[h+1>>>2]>>>24-(h+1)%4*8&255,l=i[h+2>>>2]>>>24-(h+2)%4*8&255,n=E<<16|y<<8|l,s=0;s<4&&h+s*.75<r;s++)f.push(d.charAt(n>>>6*(3-s)&63));var u=d.charAt(64);if(u)for(;f.length%4;)f.push(u);return f.join("")},parse:function(p,o=!0){var i=p.length,r=o?this._safe_map:this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var f=0;f<r.length;f++)d[r.charCodeAt(f)]=f}var h=r.charAt(64);if(h){var E=p.indexOf(h);E!==-1&&(i=E)}return S(p,i,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function S(p,o,i){for(var r=[],d=0,f=0;f<o;f++)if(f%4){var h=i[p.charCodeAt(f-1)]<<f%4*2,E=i[p.charCodeAt(f)]>>>6-f%4*2,y=h|E;r[d>>>2]|=y<<24-d%4*8,d++}return L.create(r,d)}}(),P.enc.Base64url})},ynwM:function(I,Z,N){var P=N("MFOe"),m=P.Global;I.exports={name:"oldFF-globalStorage",read:L,write:_,each:g,remove:S,clearAll:p};var T=m.globalStorage;function L(o){return T[o]}function _(o,i){T[o]=i}function g(o){for(var i=T.length-1;i>=0;i--){var r=T.key(i);o(T[r],r)}}function S(o){return T.removeItem(o)}function p(){g(function(o,i){delete T[o]})}}}]);
|