|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[239,5,6,7,8,9,12,16],{"+NIl":function(H,Z,I){(function(N){N(I("VrN/"))})(function(N){"use strict";N.defineMode("stex",function(g,S){"use strict";function k(n,l){n.cmdState.push(l)}function v(n){return n.cmdState.length>0?n.cmdState[n.cmdState.length-1]:null}function m(n){var l=n.cmdState.pop();l&&l.closeBracket()}function C(n){for(var l=n.cmdState,f=l.length-1;f>=0;f--){var d=l[f];if(d.name=="DEFAULT")continue;return d}return{styleIdentifier:function(){return null}}}function _(n,l,f){return function(){this.name=n,this.bracketNo=0,this.style=l,this.styles=f,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var e={};e.importmodule=_("importmodule","tag",["string","builtin"]),e.documentclass=_("documentclass","tag",["","atom"]),e.usepackage=_("usepackage","tag",["atom"]),e.begin=_("begin","tag",["atom"]),e.end=_("end","tag",["atom"]),e.label=_("label","tag",["atom"]),e.ref=_("ref","tag",["atom"]),e.eqref=_("eqref","tag",["atom"]),e.cite=_("cite","tag",["atom"]),e.bibitem=_("bibitem","tag",["atom"]),e.Bibitem=_("Bibitem","tag",["atom"]),e.RBibitem=_("RBibitem","tag",["atom"]),e.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function h(n,l){n.f=l}function r(n,l){var f;if(n.match(/^\\[a-zA-Z@]+/)){var d=n.current().slice(1);return f=e.hasOwnProperty(d)?e[d]:e.DEFAULT,f=new f,k(l,f),h(l,i),f.style}if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/\\]/))return"tag";if(n.match("\\["))return h(l,function(o,s){return c(o,s,"\\]")}),"keyword";if(n.match("\\("))return h(l,function(o,s){return c(o,s,"\\)")}),"keyword";if(n.match("$$"))return h(l,function(o,s){return c(o,s,"$$")}),"keyword";if(n.match("$"))return h(l,function(o,s){return c(o,s,"$")}),"keyword";var u=n.next();if(u=="%")return n.skipToEnd(),"comment";if(u=="}"||u=="]"){if(f=v(l),f)f.closeBracket(u),h(l,i);else return"error";return"bracket"}else return u=="{"||u=="["?(f=e.DEFAULT,f=new f,k(l,f),"bracket"):/\d/.test(u)?(n.eatWhile(/[\w.%]/),"atom"):(n.eatWhile(/[\w\-_]/),f=C(l),f.name=="begin"&&(f.argument=n.current()),f.styleIdentifier())}function c(n,l,f){if(n.eatSpace())return null;if(f&&n.match(f))return h(l,r),"keyword";if(n.match(/^\\[a-zA-Z@]+/))return"tag";if(n.match(/^[a-zA-Z]+/))return"variable-2";if(n.match(/^\\[$&%#{}_]/))return"tag";if(n.match(/^\\[,;!\/]/))return"tag";if(n.match(/^[\^_&]/))return"tag";if(n.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(n.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var d=n.next();return d=="{"||d=="}"||d=="["||d=="]"||d=="("||d==")"?"bracket":d=="%"?(n.skipToEnd(),"comment"):"error"}function i(n,l){var f=n.peek(),d;return f=="{"||f=="["?(d=v(l),d.openBracket(f),n.eat(f),h(l,r),"bracket"):/[ \t\r]/.test(f)?(n.eat(f),null):(h(l,r),m(l),r(n,l))}return{startState:function(){var n=S.inMathMode?function(l,f){return c(l,f)}:r;return{cmdState:[],f:n}},copyState:function(n){return{cmdState:n.cmdState.slice(),f:n.f}},token:function(n,l){return l.f(n,l)},blankLine:function(n){n.f=r,n.cmdState.length=0},lineComment:"%"}}),N.defineMIME("text/x-stex","stex"),N.defineMIME("text/x-latex","stex")})},"+ua5":function(H,Z,I){},"/cxE":function(H,Z,I){"use strict";I.d(Z,"f",function(){return S}),I.d(Z,"g",function(){return k}),I.d(Z,"h",function(){return v}),I.d(Z,"e",function(){return C}),I.d(Z,"b",function(){return _}),I.d(Z,"c",function(){return e}),I.d(Z,"d",function(){return h}),I.d(Z,"a",function(){return r});class N{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(c){setTimeout(()=>{throw c.stack?new Error(c.message+`
|
|
|
|
|
|
`+c.stack):c},0)}}emit(c){this.listeners.forEach(i=>{i(c)})}onUnexpectedError(c){this.unexpectedErrorHandler(c),this.emit(c)}onUnexpectedExternalError(c){this.unexpectedErrorHandler(c)}}const g=new N;function S(c){C(c)||g.onUnexpectedError(c);return}function k(c){C(c)||g.onUnexpectedExternalError(c);return}function v(c){if(c instanceof Error){let{name:i,message:n}=c;const l=c.stacktrace||c.stack;return{$isError:!0,name:i,message:n,stack:l}}return c}const m="Canceled";function C(c){return c instanceof Error&&c.name===m&&c.message===m}function _(){const c=new Error(m);return c.name=c.message,c}function e(c){return c?new Error(`Illegal argument: ${c}`):new Error("Illegal argument")}function h(c){return c?new Error(`Illegal state: ${c}`):new Error("Illegal state")}class r extends Error{constructor(c){super("NotSupported");c&&(this.message=c)}}},"19Vz":function(H,Z,I){(function(N){N(I("VrN/"))})(function(N){N.defineOption("placeholder","",function(_,e,h){var r=h&&h!=N.Init;if(e&&!r)_.on("blur",v),_.on("change",m),_.on("swapDoc",m),N.on(_.getInputField(),"compositionupdate",_.state.placeholderCompose=function(){k(_)}),m(_);else if(!e&&r){_.off("blur",v),_.off("change",m),_.off("swapDoc",m),N.off(_.getInputField(),"compositionupdate",_.state.placeholderCompose),g(_);var c=_.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}e&&!_.hasFocus()&&v(_)});function g(_){_.state.placeholder&&(_.state.placeholder.parentNode.removeChild(_.state.placeholder),_.state.placeholder=null)}function S(_){g(_);var e=_.state.placeholder=document.createElement("pre");e.style.cssText="height: 0; overflow: visible",e.style.direction=_.getOption("direction"),e.className="CodeMirror-placeholder CodeMirror-line-like";var h=_.getOption("placeholder");typeof h=="string"&&(h=document.createTextNode(h)),e.appendChild(h),_.display.lineSpace.insertBefore(e,_.display.lineSpace.firstChild)}function k(_){setTimeout(function(){var e=!1,h=_.getInputField();h.nodeName=="TEXTAREA"?e=!h.value:_.lineCount()==1&&(e=!/[^\u200b]/.test(h.querySelector(".CodeMirror-line").textContent)),e?S(_):g(_)},20)}function v(_){C(_)&&S(_)}function m(_){var e=_.getWrapperElement(),h=C(_);e.className=e.className.replace(" CodeMirror-empty","")+(h?" CodeMirror-empty":""),h?S(_):g(_)}function C(_){return _.lineCount()===1&&_.getLine(0)===""}})},"1T2W":function(H,Z,I){H.exports={"code-panel-container":"code-panel-container___1BMQ9","action-oj-bar":"action-oj-bar___1PRBr",active:"active___2710v"}},"1eCo":function(H,Z,I){(function(N){N(I("VrN/"))})(function(N){"use strict";var g={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},S={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};N.defineMode("xml",function(k,v){var m=k.indentUnit,C={},_=v.htmlMode?g:S;for(var e in _)C[e]=_[e];for(var e in v)C[e]=v[e];var h,r;function c(T,F){function P(z){return F.tokenize=z,z(T,F)}var A=T.next();if(A=="<")return T.eat("!")?T.eat("[")?T.match("CDATA[")?P(l("atom","]]>")):null:T.match("--")?P(l("comment","-->")):T.match("DOCTYPE",!0,!0)?(T.eatWhile(/[\w\._\-]/),P(f(1))):null:T.eat("?")?(T.eatWhile(/[\w\._\-]/),F.tokenize=l("meta","?>"),"meta"):(h=T.eat("/")?"closeTag":"openTag",F.tokenize=i,"tag bracket");if(A=="&"){var X;return T.eat("#")?T.eat("x")?X=T.eatWhile(/[a-fA-F\d]/)&&T.eat(";"):X=T.eatWhile(/[\d]/)&&T.eat(";"):X=T.eatWhile(/[\w\.\-:]/)&&T.eat(";"),X?"atom":"error"}else return T.eatWhile(/[^&<]/),null}c.isInText=!0;function i(T,F){var P=T.next();if(P==">"||P=="/"&&T.eat(">"))return F.tokenize=c,h=P==">"?"endTag":"selfcloseTag","tag bracket";if(P=="=")return h="equals",null;if(P=="<"){F.tokenize=c,F.state=s,F.tagName=F.tagStart=null;var A=F.tokenize(T,F);return A?A+" tag error":"tag error"}else return/[\'\"]/.test(P)?(F.tokenize=n(P),F.stringStartCol=T.column(),F.tokenize(T,F)):(T.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function n(T){var F=function(P,A){for(;!P.eol();)if(P.next()==T){A.tokenize=i;break}return"string"};return F.isInAttribute=!0,F}function l(T,F){return function(P,A){for(;!P.eol();){if(P.match(F)){A.tokenize=c;break}P.next()}return T}}function f(T){return function(F,P){for(var A;(A=F.next())!=null;){if(A=="<")return P.tokenize=f(T+1),P.tokenize(F,P);if(A==">")if(T==1){P.tokenize=c;break}else return P.tokenize=f(T-1),P.tokenize(F,P)}return"meta"}}function d(T,F,P){this.prev=T.context,this.tagName=F,this.indent=T.indented,this.startOfLine=P,(C.doNotIndent.hasOwnProperty(F)||T.context&&T.context.noIndent)&&(this.noIndent=!0)}function u(T){T.context&&(T.context=T.context.prev)}function o(T,F){for(var P;;){if(!T.context)return;if(P=T.context.tagName,!C.contextGrabbers.hasOwnProperty(P)||!C.contextGrabbers[P].hasOwnProperty(F))return;u(T)}}function s(T,F,P){return T=="openTag"?(P.tagStart=F.column(),E):T=="closeTag"?b:s}function E(T,F,P){return T=="word"?(P.tagName=F.current(),r="tag",R):C.allowMissingTagName&&T=="endTag"?(r="tag bracket",R(T,F,P)):(r="error",E)}function b(T,F,P){if(T=="word"){var A=F.current();return P.context&&P.context.tagName!=A&&C.implicitlyClosed.hasOwnProperty(P.context.tagName)&&u(P),P.context&&P.context.tagName==A||C.matchClosing===!1?(r="tag",p):(r="tag error",D)}else return C.allowMissingTagName&&T=="endTag"?(r="tag bracket",p(T,F,P)):(r="error",D)}function p(T,F,P){return T!="endTag"?(r="error",p):(u(P),s)}function D(T,F,P){return r="error",p(T,F,P)}function R(T,F,P){if(T=="word")return r="attribute",y;if(T=="endTag"||T=="selfcloseTag"){var A=P.tagName,X=P.tagStart;return P.tagName=P.tagStart=null,T=="selfcloseTag"||C.autoSelfClosers.hasOwnProperty(A)?o(P,A):(o(P,A),P.context=new d(P,A,X==P.indented)),s}return r="error",R}function y(T,F,P){return T=="equals"?x:(C.allowMissing||(r="error"),R(T,F,P))}function x(T,F,P){return T=="string"?w:T=="word"&&C.allowUnquoted?(r="string",R):(r="error",R(T,F,P))}function w(T,F,P){return T=="string"?w:R(T,F,P)}return{startState:function(T){var F={tokenize:c,state:s,indented:T||0,tagName:null,tagStart:null,context:null};return T!=null&&(F.baseIndent=T),F},token:function(T,F){if(!F.tagName&&T.sol()&&(F.indented=T.indentation()),T.eatSpace())return null;h=null;var P=F.tokenize(T,F);return(P||h)&&P!="comment"&&(r=null,F.state=F.state(h||P,T,F),r&&(P=r=="error"?P+" error":r)),P},indent:function(T,F,P){var A=T.context;if(T.tokenize.isInAttribute)return T.tagStart==T.indented?T.stringStartCol+1:T.indented+m;if(A&&A.noIndent)return N.Pass;if(T.tokenize!=i&&T.tokenize!=c)return P?P.match(/^(\s*)/)[0].length:0;if(T.tagName)return C.multilineTagIndentPastTag!==!1?T.tagStart+T.tagName.length+2:T.tagStart+m*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/<!\[CDATA\[/.test(F))return 0;var X=F&&/^<(\/)?([\w_:\.-]*)/.exec(F);if(X&&X[1])for(;A;)if(A.tagName==X[2]){A=A.prev;break}else if(C.implicitlyClosed.hasOwnProperty(A.tagName))A=A.prev;else break;else if(X)for(;A;){var z=C.contextGrabbers[A.tagName];if(z&&z.hasOwnProperty(X[2]))A=A.prev;else break}for(;A&&A.prev&&!A.startOfLine;)A=A.prev;return A?A.indent+m:T.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(T){T.state==x&&(T.state=R)},xmlCurrentTag:function(T){return T.tagName?{name:T.tagName,close:T.type=="closeTag"}:null},xmlCurrentContext:function(T){for(var F=[],P=T.context;P;P=P.prev)P.tagName&&F.push(P.tagName);return F.reverse()}}}),N.defineMIME("text/xml","xml"),N.defineMIME("application/xml","xml"),N.mimeModes.hasOwnProperty("text/html")||N.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1uat":function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("MlIO"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.Hasher,v=g.x64,m=v.Word,C=v.WordArray,_=g.algo;function e(){return m.create.apply(m,arguments)}var h=[e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591)],r=[];(function(){for(var i=0;i<80;i++)r[i]=e()})();var c=_.SHA512=k.extend({_doReset:function(){this._hash=new C.init([new m.init(1779033703,4089235720),new m.init(3144134277,2227873595),new m.init(1013904242,4271175723),new m.init(2773480762,1595750129),new m.init(1359893119,2917565137),new m.init(2600822924,725511199),new m.init(528734635,4215389547),new m.init(1541459225,327033209)])},_doProcessBlock:function(i,n){for(var l=this._hash.words,f=l[0],d=l[1],u=l[2],o=l[3],s=l[4],E=l[5],b=l[6],p=l[7],D=f.high,R=f.low,y=d.high,x=d.low,w=u.high,T=u.low,F=o.high,P=o.low,A=s.high,X=s.low,z=E.high,O=E.low,B=b.high,U=b.low,L=p.high,G=p.low,ee=D,oe=R,ae=y,be=x,_e=w,fe=T,Re=F,Oe=P,de=A,te=X,W=z,Y=O,V=B,Q=U,q=L,ie=G,ne=0;ne<80;ne++){var J,$,le=r[ne];if(ne<16)$=le.high=i[n+ne*2]|0,J=le.low=i[n+ne*2+1]|0;else{var ce=r[ne-15],we=ce.high,Fe=ce.low,Xe=(we>>>1|Fe<<31)^(we>>>8|Fe<<24)^we>>>7,$e=(Fe>>>1|we<<31)^(Fe>>>8|we<<24)^(Fe>>>7|we<<25),Ye=r[ne-2],Ze=Ye.high,qe=Ye.low,Pe=(Ze>>>19|qe<<13)^(Ze<<3|qe>>>29)^Ze>>>6,Ie=(qe>>>19|Ze<<13)^(qe<<3|Ze>>>29)^(qe>>>6|Ze<<26),Je=r[ne-7],rt=Je.high,ye=Je.low,ue=r[ne-16],he=ue.high,me=ue.low;J=$e+ye,$=Xe+rt+(J>>>0<$e>>>0?1:0),J=J+Ie,$=$+Pe+(J>>>0<Ie>>>0?1:0),J=J+me,$=$+he+(J>>>0<me>>>0?1:0),le.high=$,le.low=J}var Ce=de&W^~de&V,ge=te&Y^~te&Q,Ee=ee&ae^ee&_e^ae&_e,Ae=oe&be^oe&fe^be&fe,De=(ee>>>28|oe<<4)^(ee<<30|oe>>>2)^(ee<<25|oe>>>7),Me=(oe>>>28|ee<<4)^(oe<<30|ee>>>2)^(oe<<25|ee>>>7),He=(de>>>14|te<<18)^(de>>>18|te<<14)^(de<<23|te>>>9),nt=(te>>>14|de<<18)^(te>>>18|de<<14)^(te<<23|de>>>9),at=h[ne],it=at.high,st=at.low,Tt=ie+nt,pt=q+He+(Tt>>>0<ie>>>0?1:0),Tt=Tt+ge,pt=pt+Ce+(Tt>>>0<ge>>>0?1:0),Tt=Tt+st,pt=pt+it+(Tt>>>0<st>>>0?1:0),Tt=Tt+J,pt=pt+$+(Tt>>>0<J>>>0?1:0),ht=Me+Ae,Ft=De+Ee+(ht>>>0<Me>>>0?1:0);q=V,ie=Q,V=W,Q=Y,W=de,Y=te,te=Oe+Tt|0,de=Re+pt+(te>>>0<Oe>>>0?1:0)|0,Re=_e,Oe=fe,_e=ae,fe=be,ae=ee,be=oe,oe=Tt+ht|0,ee=pt+Ft+(oe>>>0<Tt>>>0?1:0)|0}R=f.low=R+oe,f.high=D+ee+(R>>>0<oe>>>0?1:0),x=d.low=x+be,d.high=y+ae+(x>>>0<be>>>0?1:0),T=u.low=T+fe,u.high=w+_e+(T>>>0<fe>>>0?1:0),P=o.low=P+Oe,o.high=F+Re+(P>>>0<Oe>>>0?1:0),X=s.low=X+te,s.high=A+de+(X>>>0<te>>>0?1:0),O=E.low=O+Y,E.high=z+W+(O>>>0<Y>>>0?1:0),U=b.low=U+Q,b.high=B+V+(U>>>0<Q>>>0?1:0),G=p.low=G+ie,p.high=L+q+(G>>>0<ie>>>0?1:0)},_doFinalize:function(){var i=this._data,n=i.words,l=this._nDataBytes*8,f=i.sigBytes*8;n[f>>>5]|=128<<24-f%32,n[(f+128>>>10<<5)+30]=Math.floor(l/4294967296),n[(f+128>>>10<<5)+31]=l,i.sigBytes=n.length*4,this._process();var d=this._hash.toX32();return d},clone:function(){var i=k.clone.call(this);return i._hash=this._hash.clone(),i},blockSize:1024/32});g.SHA512=k._createHelper(c),g.HmacSHA512=k._createHmacHelper(c)}(),N.SHA512})},"24hK":function(H,Z,I){"use strict";I.d(Z,"a",function(){return g});class N{constructor(S){this.element=S,this.next=N.Undefined,this.prev=N.Undefined}}N.Undefined=new N(void 0);class g{constructor(){this._first=N.Undefined,this._last=N.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===N.Undefined}clear(){let S=this._first;for(;S!==N.Undefined;){const k=S.next;S.prev=N.Undefined,S.next=N.Undefined,S=k}this._first=N.Undefined,this._last=N.Undefined,this._size=0}unshift(S){return this._insert(S,!1)}push(S){return this._insert(S,!0)}_insert(S,k){const v=new N(S);if(this._first===N.Undefined)this._first=v,this._last=v;else if(k){const C=this._last;this._last=v,v.prev=C,C.next=v}else{const C=this._first;this._first=v,v.next=C,C.prev=v}this._size+=1;let m=!1;return()=>{m||(m=!0,this._remove(v))}}shift(){if(this._first===N.Undefined)return;{const S=this._first.element;return this._remove(this._first),S}}pop(){if(this._last===N.Undefined)return;{const S=this._last.element;return this._remove(this._last),S}}_remove(S){if(S.prev!==N.Undefined&&S.next!==N.Undefined){const k=S.prev;k.next=S.next,S.next.prev=k}else S.prev===N.Undefined&&S.next===N.Undefined?(this._first=N.Undefined,this._last=N.Undefined):S.next===N.Undefined?(this._last=this._last.prev,this._last.next=N.Undefined):S.prev===N.Undefined&&(this._first=this._first.next,this._first.prev=N.Undefined);this._size-=1}*[Symbol.iterator](){let S=this._first;for(;S!==N.Undefined;)yield S.element,S=S.next}}},"3/fG":function(H,Z,I){"use strict";I.d(Z,"a",function(){return g});function N(S,k){let v;return k.length===0?v=S:v=S.replace(/\{(\d+)\}/g,function(m,C){const _=C[0];return typeof k[_]!="undefined"?k[_]:m}),v}function g(S,k,...v){return N(k,v)}},"3y9D":function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,v=S.Hasher,m=g.algo,C=[],_=m.SHA1=v.extend({_doReset:function(){this._hash=new k.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,h){for(var r=this._hash.words,c=r[0],i=r[1],n=r[2],l=r[3],f=r[4],d=0;d<80;d++){if(d<16)C[d]=e[h+d]|0;else{var u=C[d-3]^C[d-8]^C[d-14]^C[d-16];C[d]=u<<1|u>>>31}var o=(c<<5|c>>>27)+f+C[d];d<20?o+=(i&n|~i&l)+1518500249:d<40?o+=(i^n^l)+1859775393:d<60?o+=(i&n|i&l|n&l)-1894007588:o+=(i^n^l)-899497514,f=l,l=n,n=i<<30|i>>>2,i=c,c=o}r[0]=r[0]+c|0,r[1]=r[1]+i|0,r[2]=r[2]+n|0,r[3]=r[3]+l|0,r[4]=r[4]+f|0},_doFinalize:function(){var e=this._data,h=e.words,r=this._nDataBytes*8,c=e.sigBytes*8;return h[c>>>5]|=128<<24-c%32,h[(c+64>>>9<<4)+14]=Math.floor(r/4294967296),h[(c+64>>>9<<4)+15]=r,e.sigBytes=h.length*4,this._process(),this._hash},clone:function(){var e=v.clone.call(this);return e._hash=this._hash.clone(),e}});g.SHA1=v._createHelper(_),g.HmacSHA1=v._createHmacHelper(_)}(),N.SHA1})},4:function(H,Z){},"5VLF":function(H,Z,I){"use strict";var N,g;function S(k,v,m){var C=function(_,e){return k.js_beautify(_,e)};return C.js=k.js_beautify,C.css=v.css_beautify,C.html=m.html_beautify,C.js_beautify=k.js_beautify,C.css_beautify=v.css_beautify,C.html_beautify=m.html_beautify,C}!(N=[I("6UM0"),I("TXwP"),I("psGv")],g=function(k,v,m){return S(k,v,m)}.apply(Z,N),g!==void 0&&(H.exports=g))},"5Y4S":function(H,Z,I){"use strict";I.d(Z,"a",function(){return S});var N=I("MNsG");const g=N.b.performance&&typeof N.b.performance.now=="function";class S{constructor(k){this._highResolution=g&&k,this._startTime=this._now(),this._stopTime=-1}static create(k=!0){return new S(k)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?N.b.performance.now():Date.now()}}},"5hvy":function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("MlIO"))})(this,function(N){return function(g){var S=N,k=S.lib,v=k.WordArray,m=k.Hasher,C=S.x64,_=C.Word,e=S.algo,h=[],r=[],c=[];(function(){for(var l=1,f=0,d=0;d<24;d++){h[l+5*f]=(d+1)*(d+2)/2%64;var u=f%5,o=(2*l+3*f)%5;l=u,f=o}for(var l=0;l<5;l++)for(var f=0;f<5;f++)r[l+5*f]=f+(2*l+3*f)%5*5;for(var s=1,E=0;E<24;E++){for(var b=0,p=0,D=0;D<7;D++){if(s&1){var R=(1<<D)-1;R<32?p^=1<<R:b^=1<<R-32}s&128?s=s<<1^113:s<<=1}c[E]=_.create(b,p)}})();var i=[];(function(){for(var l=0;l<25;l++)i[l]=_.create()})();var n=e.SHA3=m.extend({cfg:m.cfg.extend({outputLength:512}),_doReset:function(){for(var l=this._state=[],f=0;f<25;f++)l[f]=new _.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(l,f){for(var d=this._state,u=this.blockSize/2,o=0;o<u;o++){var s=l[f+2*o],E=l[f+2*o+1];s=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360;var b=d[o];b.high^=E,b.low^=s}for(var p=0;p<24;p++){for(var D=0;D<5;D++){for(var R=0,y=0,x=0;x<5;x++){var b=d[D+5*x];R^=b.high,y^=b.low}var w=i[D];w.high=R,w.low=y}for(var D=0;D<5;D++)for(var T=i[(D+4)%5],F=i[(D+1)%5],P=F.high,A=F.low,R=T.high^(P<<1|A>>>31),y=T.low^(A<<1|P>>>31),x=0;x<5;x++){var b=d[D+5*x];b.high^=R,b.low^=y}for(var X=1;X<25;X++){var R,y,b=d[X],z=b.high,O=b.low,B=h[X];B<32?(R=z<<B|O>>>32-B,y=O<<B|z>>>32-B):(R=O<<B-32|z>>>64-B,y=z<<B-32|O>>>64-B);var U=i[r[X]];U.high=R,U.low=y}var L=i[0],G=d[0];L.high=G.high,L.low=G.low;for(var D=0;D<5;D++)for(var x=0;x<5;x++){var X=D+5*x,b=d[X],ee=i[X],oe=i[(D+1)%5+5*x],ae=i[(D+2)%5+5*x];b.high=ee.high^~oe.high&ae.high,b.low=ee.low^~oe.low&ae.low}var b=d[0],be=c[p];b.high^=be.high,b.low^=be.low}},_doFinalize:function(){var l=this._data,f=l.words,d=this._nDataBytes*8,u=l.sigBytes*8,o=this.blockSize*32;f[u>>>5]|=1<<24-u%32,f[(g.ceil((u+1)/o)*o>>>5)-1]|=128,l.sigBytes=f.length*4,this._process();for(var s=this._state,E=this.cfg.outputLength/8,b=E/8,p=[],D=0;D<b;D++){var R=s[D],y=R.high,x=R.low;y=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,p.push(x),p.push(y)}return new v.init(p,E)},clone:function(){for(var l=m.clone.call(this),f=l._state=this._state.slice(0),d=0;d<25;d++)f[d]=f[d].clone();return l}});S.SHA3=m._createHelper(n),S.HmacSHA3=m._createHmacHelper(n)}(Math),N.SHA3})},"5nXd":function(H,Z,I){var N=I("MFOe"),g=N.slice,S=N.pluck,k=N.each,v=N.bind,m=N.create,C=N.isList,_=N.isFunction,e=N.isObject;H.exports={createStore:c};var h={version:"2.0.12",enabled:!1,get:function(i,n){var l=this.storage.read(this._namespacePrefix+i);return this._deserialize(l,n)},set:function(i,n){return n===void 0?this.remove(i):(this.storage.write(this._namespacePrefix+i,this._serialize(n)),n)},remove:function(i){this.storage.remove(this._namespacePrefix+i)},each:function(i){var n=this;this.storage.each(function(l,f){i.call(n,n._deserialize(l),(f||"").replace(n._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(i){return this._namespacePrefix=="__storejs_"+i+"_"},createStore:function(){return c.apply(this,arguments)},addPlugin:function(i){this._addPlugin(i)},namespace:function(i){return c(this.storage,this.plugins,i)}};function r(){var i=typeof console=="undefined"?null:console;if(!i)return;var n=i.warn?i.warn:i.log;n.apply(i,arguments)}function c(i,n,l){l||(l=""),i&&!C(i)&&(i=[i]),n&&!C(n)&&(n=[n]);var f=l?"__storejs_"+l+"_":"",d=l?new RegExp("^"+f):null,u=/^[a-zA-Z0-9_\-]*$/;if(!u.test(l))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var o={_namespacePrefix:f,_namespaceRegexp:d,_testStorage:function(E){try{var b="__storejs__test__";E.write(b,b);var p=E.read(b)===b;return E.remove(b),p}catch(D){return!1}},_assignPluginFnProp:function(E,b){var p=this[b];this[b]=function(){var R=g(arguments,0),y=this;function x(){return p?(k(arguments,function(T,F){R[F]=T}),p.apply(y,R)):void 0}var w=[x].concat(R);return E.apply(y,w)}},_serialize:function(E){return JSON.stringify(E)},_deserialize:function(E,b){if(!E)return b;var p="";try{p=JSON.parse(E)}catch(D){p=E}return p!==void 0?p:b},_addStorage:function(E){if(this.enabled)return;this._testStorage(E)&&(this.storage=E,this.enabled=!0)},_addPlugin:function(E){var b=this;if(C(E)){k(E,function(R){b._addPlugin(R)});return}var p=S(this.plugins,function(R){return E===R});if(p)return;if(this.plugins.push(E),!_(E))throw new Error("Plugins must be function values that return objects");var D=E.call(this);if(!e(D))throw new Error("Plugins must return an object of function properties");k(D,function(R,y){if(!_(R))throw new Error("Bad plugin property: "+y+" from plugin "+E.name+". Plugins should only return functions.");b._assignPluginFnProp(R,y)})},addStorage:function(E){r("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(E)}},s=m(o,h,{plugins:[]});return s.raw={},k(s,function(E,b){_(E)&&(s.raw[b]=v(s,E))}),k(i,function(E){s._addStorage(E)}),k(n,function(E){s._addPlugin(E)}),s}},"6+eU":function(H,Z,I){"use strict";I.d(Z,"a",function(){return p});var N=I("wx14"),g=I("rePB"),S=I("VTBJ"),k=I("1OyB"),v=I("vuIU"),m=I("Ji7U"),C=I("LK+K"),_=I("q1tI"),e=I.n(_),h=I("TSYQ"),r=I.n(h),c=function(R){var y,x="".concat(R.rootPrefixCls,"-item"),w=r()(x,"".concat(x,"-").concat(R.page),(y={},Object(g.a)(y,"".concat(x,"-active"),R.active),Object(g.a)(y,R.className,!!R.className),Object(g.a)(y,"".concat(x,"-disabled"),!R.page),y)),T=function(){R.onClick(R.page)},F=function(A){R.onKeyPress(A,R.onClick,R.page)};return e.a.createElement("li",{title:R.showTitle?R.page:null,className:w,onClick:T,onKeyPress:F,tabIndex:"0"},R.itemRender(R.page,"page",e.a.createElement("a",{rel:"nofollow"},R.page)))},i=c,n={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},l=function(D){Object(m.a)(y,D);var R=Object(C.a)(y);function y(){var x;Object(k.a)(this,y);for(var w=arguments.length,T=new Array(w),F=0;F<w;F++)T[F]=arguments[F];return x=R.call.apply(R,[this].concat(T)),x.state={goInputText:""},x.buildOptionText=function(P){return"".concat(P," ").concat(x.props.locale.items_per_page)},x.changeSize=function(P){x.props.changeSize(Number(P))},x.handleChange=function(P){x.setState({goInputText:P.target.value})},x.handleBlur=function(P){var A=x.props,X=A.goButton,z=A.quickGo,O=A.rootPrefixCls,B=x.state.goInputText;if(X||B==="")return;if(P.relatedTarget&&(P.relatedTarget.className.indexOf("".concat(O,"-prev"))>=0||P.relatedTarget.className.indexOf("".concat(O,"-next"))>=0))return;x.setState({goInputText:""}),z(x.getValidValue())},x.go=function(P){var A=x.state.goInputText;if(A==="")return;(P.keyCode===n.ENTER||P.type==="click")&&(x.setState({goInputText:""}),x.props.quickGo(x.getValidValue()))},x}return Object(v.a)(y,[{key:"getValidValue",value:function(){var w=this.state,T=w.goInputText,F=w.current;return!T||isNaN(T)?F:Number(T)}},{key:"getPageSizeOptions",value:function(){var w=this.props,T=w.pageSize,F=w.pageSizeOptions;return F.some(function(P){return P.toString()===T.toString()})?F:F.concat([T.toString()]).sort(function(P,A){var X=isNaN(Number(P))?0:Number(P),z=isNaN(Number(A))?0:Number(A);return X-z})}},{key:"render",value:function(){var w=this,T=this.props,F=T.pageSize,P=T.locale,A=T.rootPrefixCls,X=T.changeSize,z=T.quickGo,O=T.goButton,B=T.selectComponentClass,U=T.buildOptionText,L=T.selectPrefixCls,G=T.disabled,ee=this.state.goInputText,oe="".concat(A,"-options"),ae=B,be=null,_e=null,fe=null;if(!X&&!z)return null;var Re=this.getPageSizeOptions();if(X&&ae){var Oe=Re.map(function(de,te){return e.a.createElement(ae.Option,{key:te,value:de.toString()},(U||w.buildOptionText)(de))});be=e.a.createElement(ae,{disabled:G,prefixCls:L,showSearch:!1,className:"".concat(oe,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(F||Re[0]).toString(),onChange:this.changeSize,getPopupContainer:function(te){return te.parentNode}},Oe)}return z&&(O&&(fe=typeof O=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:G,className:"".concat(oe,"-quick-jumper-button")},P.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},O)),_e=e.a.createElement("div",{className:"".concat(oe,"-quick-jumper")},P.jump_to,e.a.createElement("input",{disabled:G,type:"text",value:ee,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),P.page,fe)),e.a.createElement("li",{className:"".concat(oe)},be,_e)}}]),y}(e.a.Component);l.defaultProps={pageSizeOptions:["10","20","50","100"]};var f=l,d=I("N2Kk");function u(){}function o(D){return typeof D=="number"&&isFinite(D)&&Math.floor(D)===D}function s(D,R,y){return y}function E(D,R,y){var x=typeof D=="undefined"?R.pageSize:D;return Math.floor((y.total-1)/x)+1}var b=function(D){Object(m.a)(y,D);var R=Object(C.a)(y);function y(x){var w;Object(k.a)(this,y),w=R.call(this,x),w.getJumpPrevPage=function(){return Math.max(1,w.state.current-(w.props.showLessItems?3:5))},w.getJumpNextPage=function(){return Math.min(E(void 0,w.state,w.props),w.state.current+(w.props.showLessItems?3:5))},w.getItemIcon=function(X,z){var O=w.props.prefixCls,B=X||e.a.createElement("button",{type:"button","aria-label":z,className:"".concat(O,"-item-link")});return typeof X=="function"&&(B=e.a.createElement(X,Object(S.a)({},w.props))),B},w.savePaginationNode=function(X){w.paginationNode=X},w.isValid=function(X){return o(X)&&X!==w.state.current},w.shouldDisplayQuickJumper=function(){var X=w.props,z=X.showQuickJumper,O=X.pageSize,B=X.total;return B<=O?!1:z},w.handleKeyDown=function(X){(X.keyCode===n.ARROW_UP||X.keyCode===n.ARROW_DOWN)&&X.preventDefault()},w.handleKeyUp=function(X){var z=w.getValidValue(X),O=w.state.currentInputValue;z!==O&&w.setState({currentInputValue:z}),X.keyCode===n.ENTER?w.handleChange(z):X.keyCode===n.ARROW_UP?w.handleChange(z-1):X.keyCode===n.ARROW_DOWN&&w.handleChange(z+1)},w.changePageSize=function(X){var z=w.state.current,O=E(X,w.state,w.props);z=z>O?O:z,O===0&&(z=w.state.current),typeof X=="number"&&("pageSize"in w.props||w.setState({pageSize:X}),"current"in w.props||w.setState({current:z,currentInputValue:z})),w.props.onShowSizeChange(z,X),"onChange"in w.props&&w.props.onChange&&w.props.onChange(z,X)},w.handleChange=function(X){var z=w.props.disabled,O=X;if(w.isValid(O)&&!z){var B=E(void 0,w.state,w.props);O>B?O=B:O<1&&(O=1),"current"in w.props||w.setState({current:O,currentInputValue:O});var U=w.state.pageSize;return w.props.onChange(O,U),O}return w.state.current},w.prev=function(){w.hasPrev()&&w.handleChange(w.state.current-1)},w.next=function(){w.hasNext()&&w.handleChange(w.state.current+1)},w.jumpPrev=function(){w.handleChange(w.getJumpPrevPage())},w.jumpNext=function(){w.handleChange(w.getJumpNextPage())},w.hasPrev=function(){return w.state.current>1},w.hasNext=function(){return w.state.current<E(void 0,w.state,w.props)},w.runIfEnter=function(X,z){if(X.key==="Enter"||X.charCode===13){for(var O=arguments.length,B=new Array(O>2?O-2:0),U=2;U<O;U++)B[U-2]=arguments[U];z.apply(void 0,B)}},w.runIfEnterPrev=function(X){w.runIfEnter(X,w.prev)},w.runIfEnterNext=function(X){w.runIfEnter(X,w.next)},w.runIfEnterJumpPrev=function(X){w.runIfEnter(X,w.jumpPrev)},w.runIfEnterJumpNext=function(X){w.runIfEnter(X,w.jumpNext)},w.handleGoTO=function(X){(X.keyCode===n.ENTER||X.type==="click")&&w.handleChange(w.state.currentInputValue)};var T=x.onChange!==u,F="current"in x;F&&!T&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var P=x.defaultCurrent;"current"in x&&(P=x.current);var A=x.defaultPageSize;return"pageSize"in x&&(A=x.pageSize),P=Math.min(P,E(A,void 0,x)),w.state={current:P,currentInputValue:P,pageSize:A},w}return Object(v.a)(y,[{key:"componentDidUpdate",value:function(w,T){var F=this.props.prefixCls;if(T.current!==this.state.current&&this.paginationNode){var P=this.paginationNode.querySelector(".".concat(F,"-item-").concat(T.current));P&&document.activeElement===P&&P.blur()}}},{key:"getValidValue",value:function(w){var T=w.target.value,F=E(void 0,this.state,this.props),P=this.state.currentInputValue,A;return T===""?A=T:isNaN(Number(T))?A=P:T>=F?A=F:A=Number(T),A}},{key:"getShowSizeChanger",value:function(){var w=this.props,T=w.showSizeChanger,F=w.total,P=w.totalBoundaryShowSizeChanger;return typeof T!="undefined"?T:F>P}},{key:"renderPrev",value:function(w){var T=this.props,F=T.prevIcon,P=T.itemRender,A=P(w,"prev",this.getItemIcon(F,"prev page")),X=!this.hasPrev();return Object(_.isValidElement)(A)?Object(_.cloneElement)(A,{disabled:X}):A}},{key:"renderNext",value:function(w){var T=this.props,F=T.nextIcon,P=T.itemRender,A=P(w,"next",this.getItemIcon(F,"next page")),X=!this.hasNext();return Object(_.isValidElement)(A)?Object(_.cloneElement)(A,{disabled:X}):A}},{key:"render",value:function(){var w=this,T=this.props,F=T.prefixCls,P=T.className,A=T.style,X=T.disabled,z=T.hideOnSinglePage,O=T.total,B=T.locale,U=T.showQuickJumper,L=T.showLessItems,G=T.showTitle,ee=T.showTotal,oe=T.simple,ae=T.itemRender,be=T.showPrevNextJumpers,_e=T.jumpPrevIcon,fe=T.jumpNextIcon,Re=T.selectComponentClass,Oe=T.selectPrefixCls,de=T.pageSizeOptions,te=this.state,W=te.current,Y=te.pageSize,V=te.currentInputValue;if(z===!0&&O<=Y)return null;var Q=E(void 0,this.state,this.props),q=[],ie=null,ne=null,J=null,$=null,le=null,ce=U&&U.goButton,we=L?1:2,Fe=W-1>0?W-1:0,Xe=W+1<Q?W+1:Q,$e=Object.keys(this.props).reduce(function(ge,Ee){return(Ee.substr(0,5)==="data-"||Ee.substr(0,5)==="aria-"||Ee==="role")&&(ge[Ee]=w.props[Ee]),ge},{});if(oe)return ce&&(typeof ce=="boolean"?le=e.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},B.jump_to_confirm):le=e.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ce),le=e.a.createElement("li",{title:G?"".concat(B.jump_to).concat(W,"/").concat(Q):null,className:"".concat(F,"-simple-pager")},le)),e.a.createElement("ul",Object(N.a)({className:r()(F,"".concat(F,"-simple"),Object(g.a)({},"".concat(F,"-disabled"),X),P),style:A,ref:this.savePaginationNode},$e),e.a.createElement("li",{title:G?B.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:r()("".concat(F,"-prev"),Object(g.a)({},"".concat(F,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Fe)),e.a.createElement("li",{title:G?"".concat(W,"/").concat(Q):null,className:"".concat(F,"-simple-pager")},e.a.createElement("input",{type:"text",value:V,disabled:X,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),e.a.createElement("span",{className:"".concat(F,"-slash")},"/"),Q),e.a.createElement("li",{title:G?B.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:r()("".concat(F,"-next"),Object(g.a)({},"".concat(F,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Xe)),le);if(Q<=3+we*2){var Ye={locale:B,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:G,itemRender:ae};Q||q.push(e.a.createElement(i,Object(N.a)({},Ye,{key:"noPager",page:Q,className:"".concat(F,"-disabled")})));for(var Ze=1;Ze<=Q;Ze+=1){var qe=W===Ze;q.push(e.a.createElement(i,Object(N.a)({},Ye,{key:Ze,page:Ze,active:qe})))}}else{var Pe=L?B.prev_3:B.prev_5,Ie=L?B.next_3:B.next_5;be&&(ie=e.a.createElement("li",{title:G?Pe:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:r()("".concat(F,"-jump-prev"),Object(g.a)({},"".concat(F,"-jump-prev-custom-icon"),!!_e))},ae(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(_e,"prev page"))),ne=e.a.createElement("li",{title:G?Ie:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:r()("".concat(F,"-jump-next"),Object(g.a)({},"".concat(F,"-jump-next-custom-icon"),!!fe))},ae(this.getJumpNextPage(),"jump-next",this.getItemIcon(fe,"next page")))),$=e.a.createElement(i,{locale:B,last:!0,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Q,page:Q,active:!1,showTitle:G,itemRender:ae}),J=e.a.createElement(i,{locale:B,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:G,itemRender:ae});var Je=Math.max(1,W-we),rt=Math.min(W+we,Q);W-1<=we&&(rt=1+we*2),Q-W<=we&&(Je=Q-we*2);for(var ye=Je;ye<=rt;ye+=1){var ue=W===ye;q.push(e.a.createElement(i,{locale:B,rootPrefixCls:F,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:ye,page:ye,active:ue,showTitle:G,itemRender:ae}))}W-1>=we*2&&W!==1+2&&(q[0]=Object(_.cloneElement)(q[0],{className:"".concat(F,"-item-after-jump-prev")}),q.unshift(ie)),Q-W>=we*2&&W!==Q-2&&(q[q.length-1]=Object(_.cloneElement)(q[q.length-1],{className:"".concat(F,"-item-before-jump-next")}),q.push(ne)),Je!==1&&q.unshift(J),rt!==Q&&q.push($)}var he=null;ee&&(he=e.a.createElement("li",{className:"".concat(F,"-total-text")},ee(O,[O===0?0:(W-1)*Y+1,W*Y>O?O:W*Y])));var me=!this.hasPrev()||!Q,Ce=!this.hasNext()||!Q;return e.a.createElement("ul",Object(N.a)({className:r()(F,P,Object(g.a)({},"".concat(F,"-disabled"),X)),style:A,unselectable:"unselectable",ref:this.savePaginationNode},$e),he,e.a.createElement("li",{title:G?B.prev_page:null,onClick:this.prev,tabIndex:me?null:0,onKeyPress:this.runIfEnterPrev,className:r()("".concat(F,"-prev"),Object(g.a)({},"".concat(F,"-disabled"),me)),"aria-disabled":me},this.renderPrev(Fe)),q,e.a.createElement("li",{title:G?B.next_page:null,onClick:this.next,tabIndex:Ce?null:0,onKeyPress:this.runIfEnterNext,className:r()("".concat(F,"-next"),Object(g.a)({},"".concat(F,"-disabled"),Ce)),"aria-disabled":Ce},this.renderNext(Xe)),e.a.createElement(f,{disabled:X,locale:B,rootPrefixCls:F,selectComponentClass:Re,selectPrefixCls:Oe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:W,pageSize:Y,pageSizeOptions:de,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ce}))}}],[{key:"getDerivedStateFromProps",value:function(w,T){var F={};if("current"in w&&(F.current=w.current,w.current!==T.current&&(F.currentInputValue=F.current)),"pageSize"in w&&w.pageSize!==T.pageSize){var P=T.current,A=E(w.pageSize,T,w);P=P>A?A:P,"current"in w||(F.current=P,F.currentInputValue=P),F.pageSize=w.pageSize}return F}}]),y}(e.a.Component);b.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:u,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:u,locale:d.a,style:{},itemRender:s,totalBoundaryShowSizeChanger:50};var p=b},"6RRn":function(H,Z,I){"use strict";var N=I("wCXF"),g=I("n6Qo");I.d(Z,"b",function(){return g.a});var S=I("IBYe"),k=I("6eGT"),v=I("hW8S");I.d(Z,"a",function(){return v.a}),Z.c=N.b},"6UM0":function(H,Z,I){var N,g;(function(){var S;(function(){"use strict";var v=[function(e,h,r){var c=r(1).Beautifier,i=r(5).Options;function n(l,f){var d=new c(l,f);return d.beautify()}e.exports=n,e.exports.defaultOptions=function(){return new i}},function(e,h,r){var c=r(2).Output,i=r(3).Token,n=r(4),l=r(5).Options,f=r(7).Tokenizer,d=r(7).line_starters,u=r(7).positionable_operators,o=r(7).TOKEN;function s(L,G){return G.indexOf(L)!==-1}function E(L){return L.replace(/^\s+/g,"")}function b(L){for(var G={},ee=0;ee<L.length;ee++)G[L[ee].replace(/-/g,"_")]=L[ee];return G}function p(L,G){return L&&L.type===o.RESERVED&&L.text===G}function D(L,G){return L&&L.type===o.RESERVED&&s(L.text,G)}var R=["case","return","do","if","throw","else","await","break","continue","async"],y=["before-newline","after-newline","preserve-newline"],x=b(y),w=[x.before_newline,x.preserve_newline],T={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function F(L,G){if(G.multiline_frame||G.mode===T.ForInitializer||G.mode===T.Conditional)return;L.remove_indent(G.start_line_index)}function P(L){L=L.replace(n.allLineBreaks,`
|
|
|
`);for(var G=[],ee=L.indexOf(`
|
|
|
`);ee!==-1;)G.push(L.substring(0,ee)),L=L.substring(ee+1),ee=L.indexOf(`
|
|
|
`);return L.length&&G.push(L),G}function A(L){return L===T.ArrayLiteral}function X(L){return s(L,[T.Expression,T.ForInitializer,T.Conditional])}function z(L,G){for(var ee=0;ee<L.length;ee++){var oe=L[ee].trim();if(oe.charAt(0)!==G)return!1}return!0}function O(L,G){for(var ee=0,oe=L.length,ae;ee<oe;ee++)if(ae=L[ee],ae&&ae.indexOf(G)!==0)return!1;return!0}function B(L,G){G=G||{},this._source_text=L||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new l(G)}B.prototype.create_flags=function(L,G){var ee=0;L&&(ee=L.indentation_level,!this._output.just_added_newline()&&L.line_indent_level>ee&&(ee=L.line_indent_level));var oe={mode:G,parent:L,last_token:L?L.last_token:new i(o.START_BLOCK,""),last_word:L?L.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:ee,alignment:0,line_indent_level:L?L.line_indent_level:ee,start_line_index:this._output.get_line_number(),ternary_depth:0};return oe},B.prototype._reset=function(L){var G=L.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new c(this._options,G),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(T.BlockStatement);var ee=new f(L,this._options);return this._tokens=ee.tokenize(),L},B.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var L,G=this._reset(this._source_text),ee=this._options.eol;this._options.eol==="auto"&&(ee=`
|
|
|
`,G&&n.lineBreak.test(G||"")&&(ee=G.match(n.lineBreak)[0]));for(var oe=this._tokens.next();oe;)this.handle_token(oe),this._last_last_text=this._flags.last_token.text,this._flags.last_token=oe,oe=this._tokens.next();return L=this._output.get_code(ee),L},B.prototype.handle_token=function(L,G){L.type===o.START_EXPR?this.handle_start_expr(L):L.type===o.END_EXPR?this.handle_end_expr(L):L.type===o.START_BLOCK?this.handle_start_block(L):L.type===o.END_BLOCK?this.handle_end_block(L):L.type===o.WORD?this.handle_word(L):L.type===o.RESERVED?this.handle_word(L):L.type===o.SEMICOLON?this.handle_semicolon(L):L.type===o.STRING?this.handle_string(L):L.type===o.EQUALS?this.handle_equals(L):L.type===o.OPERATOR?this.handle_operator(L):L.type===o.COMMA?this.handle_comma(L):L.type===o.BLOCK_COMMENT?this.handle_block_comment(L,G):L.type===o.COMMENT?this.handle_comment(L,G):L.type===o.DOT?this.handle_dot(L):L.type===o.EOF?this.handle_eof(L):L.type===o.UNKNOWN?this.handle_unknown(L,G):this.handle_unknown(L,G)},B.prototype.handle_whitespace_and_comments=function(L,G){var ee=L.newlines,oe=this._options.keep_array_indentation&&A(this._flags.mode);if(L.comments_before)for(var ae=L.comments_before.next();ae;)this.handle_whitespace_and_comments(ae,G),this.handle_token(ae,G),ae=L.comments_before.next();if(oe)for(var be=0;be<ee;be+=1)this.print_newline(be>0,G);else if(this._options.max_preserve_newlines&&ee>this._options.max_preserve_newlines&&(ee=this._options.max_preserve_newlines),this._options.preserve_newlines&&ee>1){this.print_newline(!1,G);for(var _e=1;_e<ee;_e+=1)this.print_newline(!0,G)}};var U=["async","break","continue","return","throw","yield"];B.prototype.allow_wrap_or_preserved_newline=function(L,G){if(G=G===void 0?!1:G,this._output.just_added_newline())return;var ee=this._options.preserve_newlines&&L.newlines||G,oe=s(this._flags.last_token.text,u)||s(L.text,u);if(oe){var ae=s(this._flags.last_token.text,u)&&s(this._options.operator_position,w)||s(L.text,u);ee=ee&&ae}if(ee)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(D(this._flags.last_token,U))return;this._output.set_wrap_point()}},B.prototype.print_newline=function(L,G){if(!G&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==o.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var ee=this._tokens.peek();this._flags.mode===T.Statement&&!(this._flags.if_block&&p(ee,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(L)&&(this._flags.multiline_frame=!0)},B.prototype.print_token_line_indentation=function(L){this._output.just_added_newline()&&(this._options.keep_array_indentation&&L.newlines&&(L.text==="["||A(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(L.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},B.prototype.print_token=function(L){if(this._output.raw){this._output.add_raw_token(L);return}if(this._options.comma_first&&L.previous&&L.previous.type===o.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var G=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(G),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(L),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(L),this._output.non_breaking_space=!0,this._output.add_token(L.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},B.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},B.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},B.prototype.set_mode=function(L){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,L),this._flags=this.create_flags(this._previous_flags,L),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},B.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===T.Statement&&F(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},B.prototype.start_of_object_property=function(){return this._flags.parent.mode===T.ObjectLiteral&&this._flags.mode===T.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||D(this._flags.last_token,["get","set"]))},B.prototype.start_of_statement=function(L){var G=!1;return G=G||D(this._flags.last_token,["var","let","const"])&&L.type===o.WORD,G=G||p(this._flags.last_token,"do"),G=G||!(this._flags.parent.mode===T.ObjectLiteral&&this._flags.mode===T.Statement)&&D(this._flags.last_token,U)&&!L.newlines,G=G||p(this._flags.last_token,"else")&&!(p(L,"if")&&!L.comments_before),G=G||this._flags.last_token.type===o.END_EXPR&&(this._previous_flags.mode===T.ForInitializer||this._previous_flags.mode===T.Conditional),G=G||this._flags.last_token.type===o.WORD&&this._flags.mode===T.BlockStatement&&!this._flags.in_case&&!(L.text==="--"||L.text==="++")&&this._last_last_text!=="function"&&L.type!==o.WORD&&L.type!==o.RESERVED,G=G||this._flags.mode===T.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||D(this._flags.last_token,["get","set"])),G?(this.set_mode(T.Statement),this.indent(),this.handle_whitespace_and_comments(L,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L,D(L,["do","for","if","while"])),!0):!1},B.prototype.handle_start_expr=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L);var G=T.Expression;if(L.text==="["){if(this._flags.last_token.type===o.WORD||this._flags.last_token.text===")"){D(this._flags.last_token,d)&&(this._output.space_before_token=!0),this.print_token(L),this.set_mode(G),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}G=T.ArrayLiteral,A(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),s(this._flags.last_token.type,[o.START_EXPR,o.END_EXPR,o.WORD,o.OPERATOR,o.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===o.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,G=T.ForInitializer):s(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,G=T.Conditional):s(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&L.whitespace_before===""?this._output.space_before_token=!1:(s(this._flags.last_token.text,d)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===o.EQUALS||this._flags.last_token.type===o.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L);else if(this._flags.last_token.type===o.WORD){this._output.space_before_token=!1;var ee=this._tokens.peek(-3);if(this._options.space_after_named_function&&ee){var oe=this._tokens.peek(-4);D(ee,["async","function"])||ee.text==="*"&&D(oe,["async","function"])?this._output.space_before_token=!0:this._flags.mode===T.ObjectLiteral?(ee.text==="{"||ee.text===","||ee.text==="*"&&(oe.text==="{"||oe.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(L);(this._flags.last_token.type===o.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&s(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===o.START_BLOCK?this.print_newline():(this._flags.last_token.type===o.END_EXPR||this._flags.last_token.type===o.START_EXPR||this._flags.last_token.type===o.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===o.COMMA)&&this.allow_wrap_or_preserved_newline(L,L.newlines),this.print_token(L),this.set_mode(G),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},B.prototype.handle_end_expr=function(L){for(;this._flags.mode===T.Statement;)this.restore_mode();this.handle_whitespace_and_comments(L),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(L,L.text==="]"&&A(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===o.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(L),this.restore_mode(),F(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===T.Conditional&&(this._previous_flags.mode=T.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},B.prototype.handle_start_block=function(L){this.handle_whitespace_and_comments(L);var G=this._tokens.peek(),ee=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===o.END_EXPR?(this.set_mode(T.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(T.BlockStatement):ee&&(s(ee.text,[":",","])&&s(G.type,[o.STRING,o.WORD,o.RESERVED])||s(G.text,["get","set","..."])&&s(ee.type,[o.WORD,o.RESERVED]))?s(this._last_last_text,["class","interface"])&&!s(ee.text,[":",","])?this.set_mode(T.BlockStatement):this.set_mode(T.ObjectLiteral):this._flags.last_token.type===o.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(T.BlockStatement):s(this._flags.last_token.type,[o.EQUALS,o.START_EXPR,o.COMMA,o.OPERATOR])||D(this._flags.last_token,["return","throw","import","default"])?this.set_mode(T.ObjectLiteral):this.set_mode(T.BlockStatement),this._flags.last_token&&(D(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var oe=!G.comments_before&&G.text==="}",ae=oe&&this._flags.last_word==="function"&&this._flags.last_token.type===o.END_EXPR;if(this._options.brace_preserve_inline){var be=0,_e=null;this._flags.inline_frame=!0;do if(be+=1,_e=this._tokens.peek(be-1),_e.newlines){this._flags.inline_frame=!1;break}while(_e.type!==o.EOF&&!(_e.type===o.END_BLOCK&&_e.opened===L))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&L.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==o.OPERATOR&&(ae||this._flags.last_token.type===o.EQUALS||D(this._flags.last_token,R)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(A(this._previous_flags.mode)&&(this._flags.last_token.type===o.START_EXPR||this._flags.last_token.type===o.COMMA)&&((this._flags.last_token.type===o.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===o.COMMA||this._flags.last_token.type===o.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(L),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==o.OPERATOR&&this._flags.last_token.type!==o.START_EXPR&&(this._flags.last_token.type===o.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(L),this.indent(),!oe&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},B.prototype.handle_end_block=function(L){for(this.handle_whitespace_and_comments(L);this._flags.mode===T.Statement;)this.restore_mode();var G=this._flags.last_token.type===o.START_BLOCK;this._flags.inline_frame&&!G?this._output.space_before_token=!0:this._options.brace_style==="expand"?G||this.print_newline():G||(A(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(L)},B.prototype.handle_word=function(L){if(L.type===o.RESERVED){if(s(L.text,["set","get"])&&this._flags.mode!==T.ObjectLiteral)L.type=o.WORD;else if(L.text==="import"&&s(this._tokens.peek().text,["(","."]))L.type=o.WORD;else if(s(L.text,["as","from"])&&!this._flags.import_block)L.type=o.WORD;else if(this._flags.mode===T.ObjectLiteral){var G=this._tokens.peek();G.text===":"&&(L.type=o.WORD)}}if(this.start_of_statement(L)?D(this._flags.last_token,["var","let","const"])&&L.type===o.WORD&&(this._flags.declaration_statement=!0):L.newlines&&!X(this._flags.mode)&&(this._flags.last_token.type!==o.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==o.EQUALS&&(this._options.preserve_newlines||!D(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(L),this.print_newline()):this.handle_whitespace_and_comments(L),this._flags.do_block&&!this._flags.do_while)if(p(L,"while")){this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&p(L,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===T.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&D(L,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(L),this._flags.in_case=!0;return}if((this._flags.last_token.type===o.COMMA||this._flags.last_token.type===o.START_EXPR||this._flags.last_token.type===o.EQUALS||this._flags.last_token.type===o.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L)),p(L,"function")){(s(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(s(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===o.OPERATOR))&&(!this._output.just_added_blankline()&&!L.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===o.RESERVED||this._flags.last_token.type===o.WORD?D(this._flags.last_token,["get","set","new","export"])||D(this._flags.last_token,U)?this._output.space_before_token=!0:p(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===o.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(X(this._flags.mode)||A(this._flags.mode))||this.print_newline(),this.print_token(L),this._flags.last_word=L.text;return}var ee="NONE";if(this._flags.last_token.type===o.END_BLOCK?this._previous_flags.inline_frame?ee="SPACE":D(L,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&L.newlines?ee="NEWLINE":(ee="SPACE",this._output.space_before_token=!0):ee="NEWLINE":this._flags.last_token.type===o.SEMICOLON&&this._flags.mode===T.BlockStatement?ee="NEWLINE":this._flags.last_token.type===o.SEMICOLON&&X(this._flags.mode)?ee="SPACE":this._flags.last_token.type===o.STRING?ee="NEWLINE":this._flags.last_token.type===o.RESERVED||this._flags.last_token.type===o.WORD||this._flags.last_token.text==="*"&&(s(this._last_last_text,["function","yield"])||this._flags.mode===T.ObjectLiteral&&s(this._last_last_text,["{",","]))?ee="SPACE":this._flags.last_token.type===o.START_BLOCK?this._flags.inline_frame?ee="SPACE":ee="NEWLINE":this._flags.last_token.type===o.END_EXPR&&(this._output.space_before_token=!0,ee="NEWLINE"),D(L,d)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ee="SPACE":ee="NEWLINE"),D(L,["else","catch","finally"]))if((!(this._flags.last_token.type===o.END_BLOCK&&this._previous_flags.mode===T.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&L.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var oe=this._output.current_line;oe.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ee==="NEWLINE"?D(this._flags.last_token,R)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&D(L,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==o.END_EXPR?(this._flags.last_token.type!==o.START_EXPR||!D(L,["var","let","const"]))&&this._flags.last_token.text!==":"&&(p(L,"if")&&p(L.previous,"else")?this._output.space_before_token=!0:this.print_newline()):D(L,d)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&A(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ee==="SPACE"&&(this._output.space_before_token=!0);L.previous&&(L.previous.type===o.WORD||L.previous.type===o.RESERVED)&&(this._output.space_before_token=!0),this.print_token(L),this._flags.last_word=L.text,L.type===o.RESERVED&&(L.text==="do"?this._flags.do_block=!0:L.text==="if"?this._flags.if_block=!0:L.text==="import"?this._flags.import_block=!0:this._flags.import_block&&p(L,"from")&&(this._flags.import_block=!1))},B.prototype.handle_semicolon=function(L){this.start_of_statement(L)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(L);for(var G=this._tokens.peek();this._flags.mode===T.Statement&&!(this._flags.if_block&&p(G,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(L)},B.prototype.handle_string=function(L){L.text.startsWith("`")&&L.newlines===0&&L.whitespace_before===""&&(L.previous.text===")"||this._flags.last_token.type===o.WORD)||(this.start_of_statement(L)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(L),this._flags.last_token.type===o.RESERVED||this._flags.last_token.type===o.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===o.COMMA||this._flags.last_token.type===o.START_EXPR||this._flags.last_token.type===o.EQUALS||this._flags.last_token.type===o.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(L):L.text.startsWith("`")&&this._flags.last_token.type===o.END_EXPR&&(L.previous.text==="]"||L.previous.text===")")&&L.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(L)},B.prototype.handle_equals=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0},B.prototype.handle_comma=function(L){this.handle_whitespace_and_comments(L,!0),this.print_token(L),this._output.space_before_token=!0,this._flags.declaration_statement?(X(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(L)):this._flags.mode===T.ObjectLiteral||this._flags.mode===T.Statement&&this._flags.parent.mode===T.ObjectLiteral?(this._flags.mode===T.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(L)},B.prototype.handle_operator=function(L){var G=L.text==="*"&&(D(this._flags.last_token,["function","yield"])||s(this._flags.last_token.type,[o.START_BLOCK,o.COMMA,o.END_BLOCK,o.SEMICOLON])),ee=s(L.text,["-","+"])&&(s(this._flags.last_token.type,[o.START_BLOCK,o.START_EXPR,o.EQUALS,o.OPERATOR])||s(this._flags.last_token.text,d)||this._flags.last_token.text===",");if(!this.start_of_statement(L)){var oe=!G;this.handle_whitespace_and_comments(L,oe)}if(L.text==="*"&&this._flags.last_token.type===o.DOT){this.print_token(L);return}if(L.text==="::"){this.print_token(L);return}if(this._flags.last_token.type===o.OPERATOR&&s(this._options.operator_position,w)&&this.allow_wrap_or_preserved_newline(L),L.text===":"&&this._flags.in_case){this.print_token(L),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==o.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var ae=!0,be=!0,_e=!1;if(L.text===":"?this._flags.ternary_depth===0?ae=!1:(this._flags.ternary_depth-=1,_e=!0):L.text==="?"&&(this._flags.ternary_depth+=1),!ee&&!G&&this._options.preserve_newlines&&s(L.text,u)){var fe=L.text===":",Re=fe&&_e,Oe=fe&&!_e;switch(this._options.operator_position){case x.before_newline:this._output.space_before_token=!Oe,this.print_token(L),(!fe||Re)&&this.allow_wrap_or_preserved_newline(L),this._output.space_before_token=!0;return;case x.after_newline:this._output.space_before_token=!0,!fe||Re?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(L):this._output.space_before_token=!1,this.print_token(L),this._output.space_before_token=!0;return;case x.preserve_newline:Oe||this.allow_wrap_or_preserved_newline(L),ae=!(this._output.just_added_newline()||Oe),this._output.space_before_token=ae,this.print_token(L),this._output.space_before_token=!0;return}}if(G){this.allow_wrap_or_preserved_newline(L),ae=!1;var de=this._tokens.peek();be=de&&s(de.type,[o.WORD,o.RESERVED])}else if(L.text==="...")this.allow_wrap_or_preserved_newline(L),ae=this._flags.last_token.type===o.START_BLOCK,be=!1;else if(s(L.text,["--","++","!","~"])||ee){if((this._flags.last_token.type===o.COMMA||this._flags.last_token.type===o.START_EXPR)&&this.allow_wrap_or_preserved_newline(L),ae=!1,be=!1,L.newlines&&(L.text==="--"||L.text==="++"||L.text==="~")){var te=D(this._flags.last_token,R)&&L.newlines;te&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(te,!0)}this._flags.last_token.text===";"&&X(this._flags.mode)&&(ae=!0),this._flags.last_token.type===o.RESERVED?ae=!0:this._flags.last_token.type===o.END_EXPR?ae=!(this._flags.last_token.text==="]"&&(L.text==="--"||L.text==="++")):this._flags.last_token.type===o.OPERATOR&&(ae=s(L.text,["--","-","++","+"])&&s(this._flags.last_token.text,["--","-","++","+"]),s(L.text,["+","-"])&&s(this._flags.last_token.text,["--","++"])&&(be=!0)),(this._flags.mode===T.BlockStatement&&!this._flags.inline_frame||this._flags.mode===T.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||ae,this.print_token(L),this._output.space_before_token=be},B.prototype.handle_block_comment=function(L,G){if(this._output.raw){this._output.add_raw_token(L),L.directives&&L.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(L.directives){this.print_newline(!1,G),this.print_token(L),L.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!n.newline.test(L.text)&&!L.newlines){this._output.space_before_token=!0,this.print_token(L),this._output.space_before_token=!0;return}else this.print_block_commment(L,G)},B.prototype.print_block_commment=function(L,G){var ee=P(L.text),oe,ae=!1,be=!1,_e=L.whitespace_before,fe=_e.length;if(this.print_newline(!1,G),this.print_token_line_indentation(L),this._output.add_token(ee[0]),this.print_newline(!1,G),ee.length>1){for(ee=ee.slice(1),ae=z(ee,"*"),be=O(ee,_e),ae&&(this._flags.alignment=1),oe=0;oe<ee.length;oe++)ae?(this.print_token_line_indentation(L),this._output.add_token(E(ee[oe]))):be&&ee[oe]?(this.print_token_line_indentation(L),this._output.add_token(ee[oe].substring(fe))):(this._output.current_line.set_indent(-1),this._output.add_token(ee[oe])),this.print_newline(!1,G);this._flags.alignment=0}},B.prototype.handle_comment=function(L,G){L.newlines?this.print_newline(!1,G):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(L),this.print_newline(!1,G)},B.prototype.handle_dot=function(L){this.start_of_statement(L)||this.handle_whitespace_and_comments(L,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),D(this._flags.last_token,R)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(L,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(L)},B.prototype.handle_unknown=function(L,G){this.print_token(L),L.text[L.text.length-1]===`
|
|
|
`&&this.print_newline(!1,G)},B.prototype.handle_eof=function(L){for(;this._flags.mode===T.Statement;)this.restore_mode();this.handle_whitespace_and_comments(L)},e.exports.Beautifier=B},function(e){function h(i){this.__parent=i,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}h.prototype.clone_empty=function(){var i=new h(this.__parent);return i.set_indent(this.__indent_count,this.__alignment_count),i},h.prototype.item=function(i){return i<0?this.__items[this.__items.length+i]:this.__items[i]},h.prototype.has_match=function(i){for(var n=this.__items.length-1;n>=0;n--)if(this.__items[n].match(i))return!0;return!1},h.prototype.set_indent=function(i,n){this.is_empty()&&(this.__indent_count=i||0,this.__alignment_count=n||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},h.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},h.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},h.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var i=this.__parent.current_line;return i.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),i.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),i.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,i.__items[0]===" "&&(i.__items.splice(0,1),i.__character_count-=1),!0}return!1},h.prototype.is_empty=function(){return this.__items.length===0},h.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},h.prototype.push=function(i){this.__items.push(i);var n=i.lastIndexOf(`
|
|
|
`);n!==-1?this.__character_count=i.length-n:this.__character_count+=i.length},h.prototype.pop=function(){var i=null;return this.is_empty()||(i=this.__items.pop(),this.__character_count-=i.length),i},h.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},h.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},h.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},h.prototype.toString=function(){var i="";return this.is_empty()?this.__parent.indent_empty_lines&&(i=this.__parent.get_indent_string(this.__indent_count)):(i=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),i+=this.__items.join("")),i};function r(i,n){this.__cache=[""],this.__indent_size=i.indent_size,this.__indent_string=i.indent_char,i.indent_with_tabs||(this.__indent_string=new Array(i.indent_size+1).join(i.indent_char)),n=n||"",i.indent_level>0&&(n=new Array(i.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}r.prototype.get_indent_size=function(i,n){var l=this.__base_string_length;return n=n||0,i<0&&(l=0),l+=i*this.__indent_size,l+=n,l},r.prototype.get_indent_string=function(i,n){var l=this.__base_string;return n=n||0,i<0&&(i=0,l=""),n+=i*this.__indent_size,this.__ensure_cache(n),l+=this.__cache[n],l},r.prototype.__ensure_cache=function(i){for(;i>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var i=this.__cache.length,n=0,l="";this.__indent_size&&i>=this.__indent_size&&(n=Math.floor(i/this.__indent_size),i-=n*this.__indent_size,l=new Array(n+1).join(this.__indent_string)),i&&(l+=new Array(i+1).join(" ")),this.__cache.push(l)};function c(i,n){this.__indent_cache=new r(i,n),this.raw=!1,this._end_with_newline=i.end_with_newline,this.indent_size=i.indent_size,this.wrap_line_length=i.wrap_line_length,this.indent_empty_lines=i.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new h(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(i,n){return this.__indent_cache.get_indent_string(i,n)},c.prototype.get_indent_size=function(i,n){return this.__indent_cache.get_indent_size(i,n)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(i){return this.is_empty()||!i&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(i){this.trim(!0);var n=this.current_line.pop();n&&(n[n.length-1]===`
|
|
|
`&&(n=n.replace(/\n+$/g,"")),this.current_line.push(n)),this._end_with_newline&&this.__add_outputline();var l=this.__lines.join(`
|
|
|
`);return i!==`
|
|
|
`&&(l=l.replace(/[\n]/g,i)),l},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(i,n){return i=i||0,n=n||0,this.next_line.set_indent(i,n),this.__lines.length>1?(this.current_line.set_indent(i,n),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(i){for(var n=0;n<i.newlines;n++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(i.whitespace_before),this.current_line.push(i.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},c.prototype.add_token=function(i){this.__add_space_before_token(),this.current_line.push(i),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},c.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},c.prototype.remove_indent=function(i){for(var n=this.__lines.length;i<n;)this.__lines[i]._remove_indent(),i++;this.current_line._remove_wrap_indent()},c.prototype.trim=function(i){for(i=i===void 0?!1:i,this.current_line.trim();i&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},c.prototype.just_added_newline=function(){return this.current_line.is_empty()},c.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},c.prototype.ensure_empty_line_above=function(i,n){for(var l=this.__lines.length-2;l>=0;){var f=this.__lines[l];if(f.is_empty())break;if(f.item(0).indexOf(i)!==0&&f.item(-1)!==n){this.__lines.splice(l+1,0,new h(this)),this.previous_line=this.__lines[this.__lines.length-2];break}l--}},e.exports.Output=c},function(e){function h(r,c,i,n){this.type=r,this.text=c,this.comments_before=null,this.newlines=i||0,this.whitespace_before=n||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=h},function(e,h){var r="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",c="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",i="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",n="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",l="(?:\\\\u[0-9a-fA-F]{4}|["+r+i+"])",f="(?:\\\\u[0-9a-fA-F]{4}|["+c+i+n+"])*";h.identifier=new RegExp(l+f,"g"),h.identifierStart=new RegExp(l),h.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+c+i+n+"])+");var d=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;h.newline=/[\n\r\u2028\u2029]/,h.lineBreak=new RegExp(`\r
|
|
|
|`+h.newline.source),h.allLineBreaks=new RegExp(h.lineBreak.source,"g")},function(e,h,r){var c=r(6).Options,i=["before-newline","after-newline","preserve-newline"];function n(l){c.call(this,l,"js");var f=this.raw_options.brace_style||null;f==="expand-strict"?this.raw_options.brace_style="expand":f==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var d=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var u=0;u<d.length;u++)d[u]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=d[u];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",i),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}n.prototype=new c,e.exports.Options=n},function(e){function h(i,n){this.raw_options=r(i,n),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}h.prototype._get_array=function(i,n){var l=this.raw_options[i],f=n||[];return typeof l=="object"?l!==null&&typeof l.concat=="function"&&(f=l.concat()):typeof l=="string"&&(f=l.split(/[^a-zA-Z0-9_\/\-]+/)),f},h.prototype._get_boolean=function(i,n){var l=this.raw_options[i],f=l===void 0?!!n:!!l;return f},h.prototype._get_characters=function(i,n){var l=this.raw_options[i],f=n||"";return typeof l=="string"&&(f=l.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),f},h.prototype._get_number=function(i,n){var l=this.raw_options[i];n=parseInt(n,10),isNaN(n)&&(n=0);var f=parseInt(l,10);return isNaN(f)&&(f=n),f},h.prototype._get_selection=function(i,n,l){var f=this._get_selection_list(i,n,l);if(f.length!==1)throw new Error("Invalid Option Value: The option '"+i+`' can only be one of the following values:
|
|
|
`+n+`
|
|
|
You passed in: '`+this.raw_options[i]+"'");return f[0]},h.prototype._get_selection_list=function(i,n,l){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(l=l||[n[0]],!this._is_valid_selection(l,n))throw new Error("Invalid Default Value!");var f=this._get_array(i,l);if(!this._is_valid_selection(f,n))throw new Error("Invalid Option Value: The option '"+i+`' can contain only the following values:
|
|
|
`+n+`
|
|
|
You passed in: '`+this.raw_options[i]+"'");return f},h.prototype._is_valid_selection=function(i,n){return i.length&&n.length&&!i.some(function(l){return n.indexOf(l)===-1})};function r(i,n){var l={};i=c(i);var f;for(f in i)f!==n&&(l[f]=i[f]);if(n&&i[n])for(f in i[n])l[f]=i[n][f];return l}function c(i){var n={},l;for(l in i){var f=l.replace(/-/g,"_");n[f]=i[l]}return n}e.exports.Options=h,e.exports.normalizeOpts=c,e.exports.mergeOpts=r},function(e,h,r){var c=r(8).InputScanner,i=r(9).Tokenizer,n=r(9).TOKEN,l=r(13).Directives,f=r(4),d=r(12).Pattern,u=r(14).TemplatablePattern;function o(z,O){return O.indexOf(z)!==-1}var s={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:n.START,RAW:n.RAW,EOF:n.EOF},E=new l(/\/\*/,/\*\//),b=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,p=/[0-9]/,D=/[^\d\.]/,R=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),y=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";y=y.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),y="\\?\\.(?!\\d) "+y,y=y.replace(/ /g,"|");var x=new RegExp(y),w="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),T=w.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),F=new RegExp("^(?:"+T.join("|")+")$"),P,A=function(z,O){i.call(this,z,O),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var B=new d(this._input),U=new u(this._input).read_options(this._options);this.__patterns={template:U,identifier:U.starting_with(f.identifier).matching(f.identifierMatch),number:B.matching(b),punct:B.matching(x),comment:B.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:B.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:B.matching(/<!--/),html_comment_end:B.matching(/-->/),include:B.starting_with(/#include/).until_after(f.lineBreak),shebang:B.starting_with(/#!/).until_after(f.lineBreak),xml:B.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:U.until(/['\\\n\r\u2028\u2029]/),double_quote:U.until(/["\\\n\r\u2028\u2029]/),template_text:U.until(/[`\\$]/),template_expression:U.until(/[`}\\]/)}};A.prototype=new i,A.prototype._is_comment=function(z){return z.type===s.COMMENT||z.type===s.BLOCK_COMMENT||z.type===s.UNKNOWN},A.prototype._is_opening=function(z){return z.type===s.START_BLOCK||z.type===s.START_EXPR},A.prototype._is_closing=function(z,O){return(z.type===s.END_BLOCK||z.type===s.END_EXPR)&&O&&(z.text==="]"&&O.text==="["||z.text===")"&&O.text==="("||z.text==="}"&&O.text==="{")},A.prototype._reset=function(){P=!1},A.prototype._get_next_token=function(z,O){var B=null;this._readWhitespace();var U=this._input.peek();return U===null?this._create_token(s.EOF,""):(B=B||this._read_non_javascript(U),B=B||this._read_string(U),B=B||this._read_word(z),B=B||this._read_singles(U),B=B||this._read_comment(U),B=B||this._read_regexp(U,z),B=B||this._read_xml(U,z),B=B||this._read_punctuation(),B=B||this._create_token(s.UNKNOWN,this._input.next()),B)},A.prototype._read_word=function(z){var O;if(O=this.__patterns.identifier.read(),O!=="")return O=O.replace(f.allLineBreaks,`
|
|
|
`),!(z.type===s.DOT||z.type===s.RESERVED&&(z.text==="set"||z.text==="get"))&&F.test(O)?(O==="in"||O==="of")&&(z.type===s.WORD||z.type===s.STRING)?this._create_token(s.OPERATOR,O):this._create_token(s.RESERVED,O):this._create_token(s.WORD,O);if(O=this.__patterns.number.read(),O!=="")return this._create_token(s.WORD,O)},A.prototype._read_singles=function(z){var O=null;return z==="("||z==="["?O=this._create_token(s.START_EXPR,z):z===")"||z==="]"?O=this._create_token(s.END_EXPR,z):z==="{"?O=this._create_token(s.START_BLOCK,z):z==="}"?O=this._create_token(s.END_BLOCK,z):z===";"?O=this._create_token(s.SEMICOLON,z):z==="."&&D.test(this._input.peek(1))?O=this._create_token(s.DOT,z):z===","&&(O=this._create_token(s.COMMA,z)),O&&this._input.next(),O},A.prototype._read_punctuation=function(){var z=this.__patterns.punct.read();if(z!=="")return z==="="?this._create_token(s.EQUALS,z):z==="?."?this._create_token(s.DOT,z):this._create_token(s.OPERATOR,z)},A.prototype._read_non_javascript=function(z){var O="";if(z==="#"){if(this._is_first_token()&&(O=this.__patterns.shebang.read(),O))return this._create_token(s.UNKNOWN,O.trim()+`
|
|
|
`);if(O=this.__patterns.include.read(),O)return this._create_token(s.UNKNOWN,O.trim()+`
|
|
|
`);z=this._input.next();var B="#";if(this._input.hasNext()&&this._input.testChar(p)){do z=this._input.next(),B+=z;while(this._input.hasNext()&&z!=="#"&&z!=="=");return z==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(B+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(B+="{}",this._input.next(),this._input.next())),this._create_token(s.WORD,B)}this._input.back()}else if(z==="<"&&this._is_first_token()){if(O=this.__patterns.html_comment_start.read(),O){for(;this._input.hasNext()&&!this._input.testChar(f.newline);)O+=this._input.next();return P=!0,this._create_token(s.COMMENT,O)}}else if(P&&z==="-"&&(O=this.__patterns.html_comment_end.read(),O))return P=!1,this._create_token(s.COMMENT,O);return null},A.prototype._read_comment=function(z){var O=null;if(z==="/"){var B="";if(this._input.peek(1)==="*"){B=this.__patterns.block_comment.read();var U=E.get_directives(B);U&&U.ignore==="start"&&(B+=E.readIgnored(this._input)),B=B.replace(f.allLineBreaks,`
|
|
|
`),O=this._create_token(s.BLOCK_COMMENT,B),O.directives=U}else this._input.peek(1)==="/"&&(B=this.__patterns.comment.read(),O=this._create_token(s.COMMENT,B))}return O},A.prototype._read_string=function(z){if(z==="`"||z==="'"||z==='"'){var O=this._input.next();return this.has_char_escapes=!1,z==="`"?O+=this._read_string_recursive("`",!0,"${"):O+=this._read_string_recursive(z),this.has_char_escapes&&this._options.unescape_strings&&(O=X(O)),this._input.peek()===z&&(O+=this._input.next()),O=O.replace(f.allLineBreaks,`
|
|
|
`),this._create_token(s.STRING,O)}return null},A.prototype._allow_regexp_or_xml=function(z){return z.type===s.RESERVED&&o(z.text,["return","case","throw","else","do","typeof","yield"])||z.type===s.END_EXPR&&z.text===")"&&z.opened.previous.type===s.RESERVED&&o(z.opened.previous.text,["if","while","for"])||o(z.type,[s.COMMENT,s.START_EXPR,s.START_BLOCK,s.START,s.END_BLOCK,s.OPERATOR,s.EQUALS,s.EOF,s.SEMICOLON,s.COMMA])},A.prototype._read_regexp=function(z,O){if(z==="/"&&this._allow_regexp_or_xml(O)){for(var B=this._input.next(),U=!1,L=!1;this._input.hasNext()&&(U||L||this._input.peek()!==z)&&!this._input.testChar(f.newline);)B+=this._input.peek(),U?U=!1:(U=this._input.peek()==="\\",this._input.peek()==="["?L=!0:this._input.peek()==="]"&&(L=!1)),this._input.next();return this._input.peek()===z&&(B+=this._input.next(),B+=this._input.read(f.identifier)),this._create_token(s.STRING,B)}return null},A.prototype._read_xml=function(z,O){if(this._options.e4x&&z==="<"&&this._allow_regexp_or_xml(O)){var B="",U=this.__patterns.xml.read_match();if(U){for(var L=U[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),G=L.indexOf("{")===0,ee=0;U;){var oe=!!U[1],ae=U[2],be=!!U[U.length-1]||ae.slice(0,8)==="![CDATA[";if(!be&&(ae===L||G&&ae.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(oe?--ee:++ee),B+=U[0],ee<=0)break;U=this.__patterns.xml.read_match()}return U||(B+=this._input.match(/[\s\S]*/g)[0]),B=B.replace(f.allLineBreaks,`
|
|
|
`),this._create_token(s.STRING,B)}}return null};function X(z){for(var O="",B=0,U=new c(z),L=null;U.hasNext();)if(L=U.match(/([\s]|[^\\]|\\\\)+/g),L&&(O+=L[0]),U.peek()==="\\"){if(U.next(),U.peek()==="x")L=U.match(/x([0-9A-Fa-f]{2})/g);else if(U.peek()==="u")L=U.match(/u([0-9A-Fa-f]{4})/g);else{O+="\\",U.hasNext()&&(O+=U.next());continue}if(!L)return z;if(B=parseInt(L[1],16),B>126&&B<=255&&L[0].indexOf("x")===0)return z;if(B>=0&&B<32){O+="\\"+L[0];continue}else B===34||B===39||B===92?O+="\\"+String.fromCharCode(B):O+=String.fromCharCode(B)}return O}A.prototype._read_string_recursive=function(z,O,B){var U,L;z==="'"?L=this.__patterns.single_quote:z==='"'?L=this.__patterns.double_quote:z==="`"?L=this.__patterns.template_text:z==="}"&&(L=this.__patterns.template_expression);for(var G=L.read(),ee="";this._input.hasNext();){if(ee=this._input.next(),ee===z||!O&&f.newline.test(ee)){this._input.back();break}else ee==="\\"&&this._input.hasNext()?(U=this._input.peek(),U==="x"||U==="u"?this.has_char_escapes=!0:U==="\r"&&this._input.peek(1)===`
|
|
|
`&&this._input.next(),ee+=this._input.next()):B&&(B==="${"&&ee==="$"&&this._input.peek()==="{"&&(ee+=this._input.next()),B===ee&&(z==="`"?ee+=this._read_string_recursive("}",O,"`"):ee+=this._read_string_recursive("`",O,"${"),this._input.hasNext()&&(ee+=this._input.next())));ee+=L.read(),G+=ee}return G},e.exports.Tokenizer=A,e.exports.TOKEN=s,e.exports.positionable_operators=R.slice(),e.exports.line_starters=w.slice()},function(e){var h=RegExp.prototype.hasOwnProperty("sticky");function r(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position<this.__input_length},r.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__input.charAt(this.__position),this.__position+=1),c},r.prototype.peek=function(c){var i=null;return c=c||0,c+=this.__position,c>=0&&c<this.__input_length&&(i=this.__input.charAt(c)),i},r.prototype.__match=function(c,i){c.lastIndex=i;var n=c.exec(this.__input);return n&&!(h&&c.sticky)&&(n.index!==i&&(n=null)),n},r.prototype.test=function(c,i){return i=i||0,i+=this.__position,i>=0&&i<this.__input_length?!!this.__match(c,i):!1},r.prototype.testChar=function(c,i){var n=this.peek(i);return c.lastIndex=0,n!==null&&c.test(n)},r.prototype.match=function(c){var i=this.__match(c,this.__position);return i?this.__position+=i[0].length:i=null,i},r.prototype.read=function(c,i,n){var l="",f;return c&&(f=this.match(c),f&&(l+=f[0])),i&&(f||!c)&&(l+=this.readUntil(i,n)),l},r.prototype.readUntil=function(c,i){var n="",l=this.__position;c.lastIndex=this.__position;var f=c.exec(this.__input);return f?(l=f.index,i&&(l+=f[0].length)):l=this.__input_length,n=this.__input.substring(this.__position,l),this.__position=l,n},r.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},r.prototype.get_regexp=function(c,i){var n=null,l="g";return i&&h&&(l="y"),typeof c=="string"&&c!==""?n=new RegExp(c,l):c&&(n=new RegExp(c.source,l)),n},r.prototype.get_literal_regexp=function(c){return RegExp(c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},r.prototype.peekUntilAfter=function(c){var i=this.__position,n=this.readUntilAfter(c);return this.__position=i,n},r.prototype.lookBack=function(c){var i=this.__position-1;return i>=c.length&&this.__input.substring(i-c.length,i).toLowerCase()===c},e.exports.InputScanner=r},function(e,h,r){var c=r(8).InputScanner,i=r(3).Token,n=r(10).TokenStream,l=r(11).WhitespacePattern,f={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},d=function(u,o){this._input=new c(u),this._options=o||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new l(this._input)};d.prototype.tokenize=function(){this._input.restart(),this.__tokens=new n,this._reset();for(var u,o=new i(f.START,""),s=null,E=[],b=new n;o.type!==f.EOF;){for(u=this._get_next_token(o,s);this._is_comment(u);)b.add(u),u=this._get_next_token(o,s);b.isEmpty()||(u.comments_before=b,b=new n),u.parent=s,this._is_opening(u)?(E.push(s),s=u):s&&this._is_closing(u,s)&&(u.opened=s,s.closed=u,s=E.pop(),u.parent=s),u.previous=o,o.next=u,this.__tokens.add(u),o=u}return this.__tokens},d.prototype._is_first_token=function(){return this.__tokens.isEmpty()},d.prototype._reset=function(){},d.prototype._get_next_token=function(u,o){this._readWhitespace();var s=this._input.read(/.+/g);return s?this._create_token(f.RAW,s):this._create_token(f.EOF,"")},d.prototype._is_comment=function(u){return!1},d.prototype._is_opening=function(u){return!1},d.prototype._is_closing=function(u,o){return!1},d.prototype._create_token=function(u,o){var s=new i(u,o,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return s},d.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=d,e.exports.TOKEN=f},function(e){function h(r){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=r}h.prototype.restart=function(){this.__position=0},h.prototype.isEmpty=function(){return this.__tokens_length===0},h.prototype.hasNext=function(){return this.__position<this.__tokens_length},h.prototype.next=function(){var r=null;return this.hasNext()&&(r=this.__tokens[this.__position],this.__position+=1),r},h.prototype.peek=function(r){var c=null;return r=r||0,r+=this.__position,r>=0&&r<this.__tokens_length&&(c=this.__tokens[r]),c},h.prototype.add=function(r){this.__parent_token&&(r.parent=this.__parent_token),this.__tokens.push(r),this.__tokens_length+=1},e.exports.TokenStream=h},function(e,h,r){var c=r(12).Pattern;function i(n,l){c.call(this,n,l),l?this._line_regexp=this._input.get_regexp(l._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}i.prototype=new c,i.prototype.__set_whitespace_patterns=function(n,l){n+="\\t ",l+="\\n\\r",this._match_pattern=this._input.get_regexp("["+n+l+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+l+"]")},i.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var n=this._input.read(this._match_pattern);if(n===" ")this.whitespace_before_token=" ";else if(n){var l=this.__split(this._newline_regexp,n);this.newline_count=l.length-1,this.whitespace_before_token=l[this.newline_count]}return n},i.prototype.matching=function(n,l){var f=this._create();return f.__set_whitespace_patterns(n,l),f._update(),f},i.prototype._create=function(){return new i(this._input,this)},i.prototype.__split=function(n,l){n.lastIndex=0;for(var f=0,d=[],u=n.exec(l);u;)d.push(l.substring(f,u.index)),f=u.index+u[0].length,u=n.exec(l);return f<l.length?d.push(l.substring(f,l.length)):d.push(""),d},e.exports.WhitespacePattern=i},function(e){function h(r,c){this._input=r,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,c&&(this._starting_pattern=this._input.get_regexp(c._starting_pattern,!0),this._match_pattern=this._input.get_regexp(c._match_pattern,!0),this._until_pattern=this._input.get_regexp(c._until_pattern),this._until_after=c._until_after)}h.prototype.read=function(){var r=this._input.read(this._starting_pattern);return(!this._starting_pattern||r)&&(r+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),r},h.prototype.read_match=function(){return this._input.match(this._match_pattern)},h.prototype.until_after=function(r){var c=this._create();return c._until_after=!0,c._until_pattern=this._input.get_regexp(r),c._update(),c},h.prototype.until=function(r){var c=this._create();return c._until_after=!1,c._until_pattern=this._input.get_regexp(r),c._update(),c},h.prototype.starting_with=function(r){var c=this._create();return c._starting_pattern=this._input.get_regexp(r,!0),c._update(),c},h.prototype.matching=function(r){var c=this._create();return c._match_pattern=this._input.get_regexp(r,!0),c._update(),c},h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){},e.exports.Pattern=h},function(e){function h(r,c){r=typeof r=="string"?r:r.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(r+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(r+/\sbeautify\signore:end\s/.source+c,"g")}h.prototype.get_directives=function(r){if(!r.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var i=this.__directive_pattern.exec(r);i;)c[i[1]]=i[2],i=this.__directive_pattern.exec(r);return c},h.prototype.readIgnored=function(r){return r.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=h},function(e,h,r){var c=r(12).Pattern,i={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function n(l,f){c.call(this,l,f),this.__template_pattern=null,this._disabled=Object.assign({},i),this._excluded=Object.assign({},i),f&&(this.__template_pattern=this._input.get_regexp(f.__template_pattern),this._excluded=Object.assign(this._excluded,f._excluded),this._disabled=Object.assign(this._disabled,f._disabled));var d=new c(l);this.__patterns={handlebars_comment:d.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:d.starting_with(/{{{/).until_after(/}}}/),handlebars:d.starting_with(/{{/).until_after(/}}/),php:d.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:d.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:d.starting_with(/{%/).until_after(/%}/),django_value:d.starting_with(/{{/).until_after(/}}/),django_comment:d.starting_with(/{#/).until_after(/#}/),smarty:d.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:d.starting_with(/{\*/).until_after(/\*}/),smarty_literal:d.starting_with(/{literal}/).until_after(/{\/literal}/)}}n.prototype=new c,n.prototype._create=function(){return new n(this._input,this)},n.prototype._update=function(){this.__set_templated_pattern()},n.prototype.disable=function(l){var f=this._create();return f._disabled[l]=!0,f._update(),f},n.prototype.read_options=function(l){var f=this._create();for(var d in i)f._disabled[d]=l.templating.indexOf(d)===-1;return f._update(),f},n.prototype.exclude=function(l){var f=this._create();return f._excluded[l]=!0,f._update(),f},n.prototype.read=function(){var l="";this._match_pattern?l=this._input.read(this._starting_pattern):l=this._input.read(this._starting_pattern,this.__template_pattern);for(var f=this._read_template();f;)this._match_pattern?f+=this._input.read(this._match_pattern):f+=this._input.readUntil(this.__template_pattern),l+=f,f=this._read_template();return this._until_after&&(l+=this._input.readUntilAfter(this._until_pattern)),l},n.prototype.__set_templated_pattern=function(){var l=[];this._disabled.php||l.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||l.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||l.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(l.push(this.__patterns.django._starting_pattern.source),l.push(this.__patterns.django_value._starting_pattern.source),l.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||l.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&l.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+l.join("|")+")")},n.prototype._read_template=function(){var l="",f=this._input.peek();if(f==="<"){var d=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&d==="?"&&(l=l||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&d==="%"&&(l=l||this.__patterns.erb.read())}else f==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(l=l||this.__patterns.handlebars_comment.read(),l=l||this.__patterns.handlebars_unescaped.read(),l=l||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(l=l||this.__patterns.django_value.read()),this._excluded.django||(l=l||this.__patterns.django_comment.read(),l=l||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(l=l||this.__patterns.smarty_comment.read(),l=l||this.__patterns.smarty_literal.read(),l=l||this.__patterns.smarty.read()));return l},e.exports.TemplatablePattern=n}],m={};function C(e){var h=m[e];if(h!==void 0)return h.exports;var r=m[e]={exports:{}};return v[e](r,r.exports,C),r.exports}var _=C(0);S=_})();var k=S;!(N=[],g=function(){return{js_beautify:k}}.apply(Z,N),g!==void 0&&(H.exports=g))})()},"6eGT":function(H,Z,I){"use strict";function N(g){return null}Z.a=N},"746U":function(H,Z,I){"use strict";I.d(Z,"f",function(){return N}),I.d(Z,"l",function(){return g}),I.d(Z,"k",function(){return S}),I.d(Z,"j",function(){return k}),I.d(Z,"g",function(){return v}),I.d(Z,"m",function(){return m}),I.d(Z,"h",function(){return C}),I.d(Z,"n",function(){return _}),I.d(Z,"c",function(){return e}),I.d(Z,"a",function(){return h}),I.d(Z,"i",function(){return r}),I.d(Z,"o",function(){return c}),I.d(Z,"e",function(){return l}),I.d(Z,"d",function(){return f}),I.d(Z,"p",function(){return d}),I.d(Z,"b",function(){return u});function N(o){return Array.isArray(o)}function g(o){return typeof o=="string"}function S(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function k(o){return typeof o=="number"&&!isNaN(o)}function v(o){return o===!0||o===!1}function m(o){return typeof o=="undefined"}function C(o){return!_(o)}function _(o){return m(o)||o===null}function e(o,s){if(!o)throw new Error(s?`Unexpected type, expected '${s}'`:"Unexpected type")}function h(o){if(_(o))throw new Error("Assertion Failed: argument is undefined or null");return o}function r(o){return typeof o=="function"}function c(o,s){const E=Math.min(o.length,s.length);for(let b=0;b<E;b++)i(o[b],s[b])}function i(o,s){if(g(s)){if(typeof o!==s)throw new Error(`argument does not match constraint: typeof ${s}`)}else if(r(s)){try{if(o instanceof s)return}catch(E){}if(!_(o)&&o.constructor===s)return;if(s.length===1&&s.call(void 0,o)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function n(o){let s=[],E=Object.getPrototypeOf(o);for(;Object.prototype!==E;)s=s.concat(Object.getOwnPropertyNames(E)),E=Object.getPrototypeOf(E);return s}function l(o){const s=[];for(const E of n(o))typeof o[E]=="function"&&s.push(E);return s}function f(o,s){const E=p=>function(){const D=Array.prototype.slice.call(arguments,0);return s(p,D)};let b={};for(const p of o)b[p]=E(p);return b}function d(o){return o===null?void 0:o}function u(o,s="Unreachable"){throw new Error(s)}},"7Cbv":function(H,Z,I){"use strict";var N=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),g=new Uint8Array(16);function S(){if(!N)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return N(g)}var k=/^(?:[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 v(i){return typeof i=="string"&&k.test(i)}for(var m=v,C=[],_=0;_<256;++_)C.push((_+256).toString(16).substr(1));function e(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=(C[i[n+0]]+C[i[n+1]]+C[i[n+2]]+C[i[n+3]]+"-"+C[i[n+4]]+C[i[n+5]]+"-"+C[i[n+6]]+C[i[n+7]]+"-"+C[i[n+8]]+C[i[n+9]]+"-"+C[i[n+10]]+C[i[n+11]]+C[i[n+12]]+C[i[n+13]]+C[i[n+14]]+C[i[n+15]]).toLowerCase();if(!m(l))throw TypeError("Stringified UUID is invalid");return l}var h=e;function r(i,n,l){i=i||{};var f=i.random||(i.rng||S)();if(f[6]=f[6]&15|64,f[8]=f[8]&63|128,n){l=l||0;for(var d=0;d<16;++d)n[l+d]=f[d];return n}return h(f)}var c=Z.a=r},"7ahc":function(H,Z,I){"use strict";I.d(Z,"a",function(){return E});var N=I("k1fw"),g=I("0Owb"),S=I("+L6B"),k=I("2/Rp"),v=I("y8nQ"),m=I("Vl3Y"),C=I("tJVT"),_=I("OaEy"),e=I("2fM7"),h=I("q1tI"),r=I.n(h),c=I("VrN/"),i=I.n(c),n=I("p77/"),l=I.n(n),f=I("c5Ni"),d=I.n(f),u=e.a.Option,o={labelCol:{span:4},wrapperCol:{span:20}},s={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(b){var p=b.callback,D=b.onCancel,R=Object(h.useState)("python"),y=Object(C.a)(R,2),x=y[0],w=y[1];function T(P){w(s[P][1])}function F(P){p(P)}return r.a.createElement(m.a,Object(g.a)({},o,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:F}),r.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},r.a.createElement(e.a,{onChange:T},Object.keys(s).map(function(P){return r.a.createElement(u,{key:P,value:P},s[P][0])}))),r.a.createElement(m.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},r.a.createElement(E,{mode:x})),r.a.createElement("div",{className:"flex-container flex-end"},r.a.createElement(k.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),r.a.createElement(k.a,{type:"ghost",onClick:D},"\u53D6\u6D88")))};function E(b){var p=b.value,D=b.onChange,R=b.mode,y=b.options,x=y===void 0?{}:y,w=Object(h.useRef)(),T=Object(h.useState)(),F=Object(C.a)(T,2),P=F[0],A=F[1];return Object(h.useEffect)(function(){if(P){function X(z){var O=z.getValue();D&&D(O)}return P.on("change",X),function(){P.off("change",X)}}},[P,D]),Object(h.useEffect)(function(){P&&P.setOption("mode",R)},[P,R]),Object(h.useEffect)(function(){P&&((p!==P.getValue()||p==="")&&setTimeout(function(){P.setValue(p||" ")},300))},[P,p]),Object(h.useEffect)(function(){if(w.current&&!P){var X=i.a.fromTextArea(w.current,Object(N.a)({mode:R,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},x));A(X)}},[w.current,P]),r.a.createElement("div",{className:"my-codemirror-container"},r.a.createElement("textarea",{ref:w}))}},"815F":function(H,Z,I){"use strict";I.d(Z,"e",function(){return C}),I.d(Z,"c",function(){return e}),I.d(Z,"d",function(){return h}),I.d(Z,"a",function(){return c}),I.d(Z,"f",function(){return i}),I.d(Z,"b",function(){return n});var N=I("KQm4"),g=I("VTBJ"),S=I("Ff2n"),k=I("Zm9Q"),v=I("Kwbf"),m=I("OZM5");function C(l,f){return l!=null?l:f}function _(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=new Map;function d(u){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(u||[]).forEach(function(s){var E=s.key,b=s.children;Object(v.a)(E!=null,"Tree node must have a certain key: [".concat(o).concat(E,"]"));var p=String(E);Object(v.a)(!f.has(p)||E===null||E===void 0,"Same 'key' exist in the Tree: ".concat(p)),f.set(p,!0),d(b,"".concat(o).concat(p," > "))})}d(l)}function e(l){function f(d){var u=Object(k.a)(d);return u.map(function(o){if(!Object(m.i)(o))return Object(v.a)(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var s=o.key,E=o.props,b=E.children,p=Object(S.a)(E,["children"]),D=Object(g.a)({key:s},p),R=f(b);return R.length&&(D.children=R),D}).filter(function(o){return o})}return f(l)}function h(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],d=new Set(f===!0?[]:f),u=[];function o(s){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return s.map(function(b,p){var D=Object(m.h)(E?E.pos:"0",p),R=C(b.key,D),y=Object(g.a)(Object(g.a)({},b),{},{parent:E,pos:D,children:null,data:b,isStart:[].concat(Object(N.a)(E?E.isStart:[]),[p===0]),isEnd:[].concat(Object(N.a)(E?E.isEnd:[]),[p===s.length-1])});return u.push(y),f===!0||d.has(R)?y.children=o(b.children||[],y):y.children=[],y})}return o(l),u}function r(l,f,d){var u;d?typeof d=="string"?u=function(E){return E[d]}:typeof d=="function"&&(u=function(E){return d(E)}):u=function(E,b){return C(E.key,b)};function o(s,E,b){var p=s?s.children:l,D=s?Object(m.h)(b.pos,E):"0";if(s){var R=u(s,D),y={node:s,index:E,pos:D,key:R,parentPos:b.node?b.pos:null,level:b.level+1};f(y)}p&&p.forEach(function(x,w){o(x,w,{node:s,pos:D,level:b?b.level+1:-1})})}o(null)}function c(l){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=f.initWrapper,u=f.processEntity,o=f.onProcessFinished,s=arguments.length>2?arguments[2]:void 0,E={},b={},p={posEntities:E,keyEntities:b};return d&&(p=d(p)||p),r(l,function(D){var R=D.node,y=D.index,x=D.pos,w=D.key,T=D.parentPos,F=D.level,P={node:R,index:y,key:w,pos:x,level:F},A=C(w,x);E[x]=P,b[A]=P,P.parent=E[T],P.parent&&(P.parent.children=P.parent.children||[],P.parent.children.push(P)),u&&u(P,p)},s),o&&o(p),p}function i(l,f){var d=f.expandedKeys,u=f.selectedKeys,o=f.loadedKeys,s=f.loadingKeys,E=f.checkedKeys,b=f.halfCheckedKeys,p=f.dragOverNodeKey,D=f.dropPosition,R=f.keyEntities,y=R[l],x={eventKey:l,expanded:d.indexOf(l)!==-1,selected:u.indexOf(l)!==-1,loaded:o.indexOf(l)!==-1,loading:s.indexOf(l)!==-1,checked:E.indexOf(l)!==-1,halfChecked:b.indexOf(l)!==-1,pos:String(y?y.pos:""),dragOver:p===l&&D===0,dragOverGapTop:p===l&&D===-1,dragOverGapBottom:p===l&&D===1};return x}function n(l){var f=l.data,d=l.expanded,u=l.selected,o=l.checked,s=l.loaded,E=l.loading,b=l.halfChecked,p=l.dragOver,D=l.dragOverGapTop,R=l.dragOverGapBottom,y=l.pos,x=l.active,w=Object(g.a)(Object(g.a)({},f),{},{expanded:d,selected:u,checked:o,loaded:s,loading:E,halfChecked:b,dragOver:p,dragOverGapTop:D,dragOverGapBottom:R,pos:y,active:x});return"props"in w||Object.defineProperty(w,"props",{get:function(){return Object(v.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),l}}),w}},"8EBN":function(H,Z,I){(function(N){N(I("VrN/"))})(function(N){"use strict";N.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var g=0;g<N.modeInfo.length;g++){var S=N.modeInfo[g];S.mimes&&(S.mime=S.mimes[0])}N.findModeByMIME=function(k){k=k.toLowerCase();for(var v=0;v<N.modeInfo.length;v++){var m=N.modeInfo[v];if(m.mime==k)return m;if(m.mimes){for(var C=0;C<m.mimes.length;C++)if(m.mimes[C]==k)return m}}if(/\+xml$/.test(k))return N.findModeByMIME("application/xml");if(/\+json$/.test(k))return N.findModeByMIME("application/json")},N.findModeByExtension=function(k){k=k.toLowerCase();for(var v=0;v<N.modeInfo.length;v++){var m=N.modeInfo[v];if(m.ext){for(var C=0;C<m.ext.length;C++)if(m.ext[C]==k)return m}}},N.findModeByFileName=function(k){for(var v=0;v<N.modeInfo.length;v++){var m=N.modeInfo[v];if(m.file&&m.file.test(k))return m}var C=k.lastIndexOf("."),_=C>-1&&k.substring(C+1,k.length);if(_)return N.findModeByExtension(_)},N.findModeByName=function(k){k=k.toLowerCase();for(var v=0;v<N.modeInfo.length;v++){var m=N.modeInfo[v];if(m.name.toLowerCase()==k)return m;if(m.alias){for(var C=0;C<m.alias.length;C++)if(m.alias[C].toLowerCase()==k)return m}}}})},"8HAY":function(H,Z,I){"use strict";I.d(Z,"a",function(){return v}),I.d(Z,"b",function(){return m}),I.d(Z,"d",function(){return C}),I.d(Z,"e",function(){return _}),I.d(Z,"c",function(){return e});var N=I("MI8n"),g=I("pmY6"),S=I("3/fG"),k=function(h,r,c,i){function n(l){return l instanceof c?l:new c(function(f){f(l)})}return new(c||(c=Promise))(function(l,f){function d(s){try{o(i.next(s))}catch(E){f(E)}}function u(s){try{o(i.throw(s))}catch(E){f(E)}}function o(s){s.done?l(s.value):n(s.value).then(d,u)}o((i=i.apply(h,r||[])).next())})};class v extends g.a{constructor(h,r="",c="",i=!0,n){super();this._onDidChange=this._register(new N.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=h,this._label=r,this._cssClass=c,this._enabled=i,this._actionCallback=n}get id(){return this._id}get label(){return this._label}set label(h){this._setLabel(h)}_setLabel(h){this._label!==h&&(this._label=h,this._onDidChange.fire({label:h}))}get tooltip(){return this._tooltip||""}set tooltip(h){this._setTooltip(h)}_setTooltip(h){this._tooltip!==h&&(this._tooltip=h,this._onDidChange.fire({tooltip:h}))}get class(){return this._cssClass}set class(h){this._setClass(h)}_setClass(h){this._cssClass!==h&&(this._cssClass=h,this._onDidChange.fire({class:h}))}get enabled(){return this._enabled}set enabled(h){this._setEnabled(h)}_setEnabled(h){this._enabled!==h&&(this._enabled=h,this._onDidChange.fire({enabled:h}))}get checked(){return this._checked}set checked(h){this._setChecked(h)}_setChecked(h){this._checked!==h&&(this._checked=h,this._onDidChange.fire({checked:h}))}run(h,r){return k(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(h))})}}class m extends g.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new N.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new N.b),this.onDidRun=this._onDidRun.event}run(h,r){return k(this,void 0,void 0,function*(){if(!h.enabled)return;this._onBeforeRun.fire({action:h});let c;try{yield this.runAction(h,r)}catch(i){c=i}this._onDidRun.fire({action:h,error:c})})}runAction(h,r){return k(this,void 0,void 0,function*(){yield h.run(r)})}}class C extends v{constructor(h){super(C.ID,h,h?"separator text":"separator");this.checked=!1,this.enabled=!1}}C.ID="vs.actions.separator";class _{constructor(h,r,c,i){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=h,this.label=r,this.class=i,this._actions=c}get actions(){return this._actions}dispose(){}run(){return k(this,void 0,void 0,function*(){})}}class e extends v{constructor(){super(e.ID,S.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8hTe":function(H,Z,I){H.exports={button:"button___1wy9m"}},"9Bee":function(H,Z,I){"use strict";var N=I("DYRE"),g=I("zeV3"),S=I("+L6B"),k=I("2/Rp"),v=I("k1fw"),m=I("9og8"),C=I("tJVT"),_=I("WmNS"),e=I.n(_),h=I("q1tI"),r=I.n(h),c=I("vg9a"),i=I("DlQD"),n=I.n(i),l=I("rUJ1");function f(ye,ue){var he=ye.match(/^(\s+)(?:```)/);if(he===null)return ue;var me=he[1];return ue.split(`
|
|
|
`).map(function(Ce){var ge=Ce.match(/^\s+/);if(ge===null)return Ce;var Ee=Object(C.a)(ge,1),Ae=Ee[0];return Ae.length>=me.length?Ce.slice(me.length):Ce}).join(`
|
|
|
`)}var d=[],u=["<ul>"],o=new n.a.Renderer,s=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function E(){d.length=0,u=["<ul>"]}var b={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function p(ye,ue,he,me){if(ue>=ye.length||ye[ue].level<=he)return ue;var Ce=ye[ue];me.push("<li><a href='#"+Ce.anchor+"'>"+Ce.text+"</a>"),ue++;var ge=[];return ue=p(ye,ue,Ce.level,ge),ge.length>0&&(me.push("<ul>"),ge.forEach(function(Ee){me.push(Ee)}),me.push("</ul>")),me.push("</li>"),ue=p(ye,ue,he,me),ue}function D(){return p(d,0,0,u),u.push("</ul>"),u.join("")}var R={heading:function(ue){var he=s.exec(ue);if(he)return{type:"heading",raw:he[0],depth:he[1].length,text:he[2]}},fences:function(ue){var he=this.rules.block.fences.exec(ue);if(he){var me=he[0],Ce=f(me,he[3]||""),ge=he[2]?he[2].trim():he[2];if(["latex","katex","math"].indexOf(ge)>=0){var Ee=w(),Ae=Ce;Ce=Ee,T[Ee]={type:"block",expression:Ae}}return{type:"code",raw:me,lang:ge,text:Ce}}}},y=/(?:\${2})([^\n`]+?)(?:\${2})/gi,x=0,w=function(){return"__special_katext_id_".concat(x++,"__")},T={};function F(){return T}function P(){x=0,T={}}function A(ye){return ye=ye.replace(y,function(ue,he){var me=w();return T[me]={type:"inline",expression:he},me}),ye}var X=o.listitem;o.listitem=function(ye){return X(A(ye))};var z=o.paragraph;o.paragraph=function(ye){return z(A(ye))};var O=o.tablecell;o.tablecell=function(ye,ue){return O(A(ye),ue)},o.code=function(ye,ue,he){var me=(ue||"").match(/\S*/)[0];return me?["latex","katex","math"].indexOf(me)>=0?"<p class='editormd-tex'>".concat(ye,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(ue,'">').concat(he?ye:Object(l.escape)(ye,!0),`</code></pre>
|
|
|
`):'<pre class="prettyprint linenums"><code>'+(he?ye:Object(l.escape)(ye,!0))+"</code></pre>"},o.heading=function(ye,ue,he){var me=this.options.headerPrefix+he.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return d.push({anchor:me,level:ue,text:ye}),"<h"+ue+' id="'+me+'">'+ye+"</h"+ue+">"},n.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),n.a.use({tokenizer:R,renderer:o});var B=n.a,U=I("SJMd"),L=I("ulZh"),G=I.n(L),ee=I("m3rI"),oe=I("Oy/b"),ae=I("p5ED"),be=I("ErOA"),_e=I("STEk");/* **********************************
|
|
|
cropro version 1.2.0
|
|
|
@license SEE LICENSE IN LICENSE
|
|
|
|
|
|
copyright Alan Mendelevich
|
|
|
see README and LICENSE for details
|
|
|
********************************** *//*! *****************************************************************************
|
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
purpose with or without fee is hereby granted.
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
|
***************************************************************************** */var fe=function(ye,ue){return(fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,me){he.__proto__=me}||function(he,me){for(var Ce in me)Object.prototype.hasOwnProperty.call(me,Ce)&&(he[Ce]=me[Ce])})(ye,ue)};function Re(ye,ue){if(typeof ue!="function"&&ue!==null)throw new TypeError("Class extends value "+String(ue)+" is not a constructor or null");function he(){this.constructor=ye}fe(ye,ue),ye.prototype=ue===null?Object.create(ue):(he.prototype=ue.prototype,new he)}function Oe(ye,ue,he,me){return new(he||(he=Promise))(function(Ce,ge){function Ee(Me){try{De(me.next(Me))}catch(He){ge(He)}}function Ae(Me){try{De(me.throw(Me))}catch(He){ge(He)}}function De(Me){var He;Me.done?Ce(Me.value):(He=Me.value,He instanceof he?He:new he(function(nt){nt(He)})).then(Ee,Ae)}De((me=me.apply(ye,ue||[])).next())})}function de(ye,ue){var he,me,Ce,ge,Ee={label:0,sent:function(){if(1&Ce[0])throw Ce[1];return Ce[1]},trys:[],ops:[]};return ge={next:Ae(0),throw:Ae(1),return:Ae(2)},typeof Symbol=="function"&&(ge[Symbol.iterator]=function(){return this}),ge;function Ae(De){return function(Me){return function(He){if(he)throw new TypeError("Generator is already executing.");for(;Ee;)try{if(he=1,me&&(Ce=2&He[0]?me.return:He[0]?me.throw||((Ce=me.return)&&Ce.call(me),0):me.next)&&!(Ce=Ce.call(me,He[1])).done)return Ce;switch(me=0,Ce&&(He=[2&He[0],Ce.value]),He[0]){case 0:case 1:Ce=He;break;case 4:return Ee.label++,{value:He[1],done:!1};case 5:Ee.label++,me=He[1],He=[0];continue;case 7:He=Ee.ops.pop(),Ee.trys.pop();continue;default:if(!(Ce=Ee.trys,(Ce=Ce.length>0&&Ce[Ce.length-1])||He[0]!==6&&He[0]!==2)){Ee=0;continue}if(He[0]===3&&(!Ce||He[1]>Ce[0]&&He[1]<Ce[3])){Ee.label=He[1];break}if(He[0]===6&&Ee.label<Ce[1]){Ee.label=Ce[1],Ce=He;break}if(Ce&&Ee.label<Ce[2]){Ee.label=Ce[2],Ee.ops.push(He);break}Ce[2]&&Ee.ops.pop(),Ee.trys.pop();continue}He=ue.call(ye,Ee)}catch(nt){He=[6,nt],me=0}finally{he=Ce=0}if(5&He[0])throw He[1];return{value:He[0]?He[1]:void 0,done:!0}}([De,Me])}}}var te=function(){function ye(){}return ye.addKey=function(ue){ye.key=ue},Object.defineProperty(ye,"isLicensed",{get:function(){return!!ye.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ye.key)},enumerable:!1,configurable:!0}),ye}(),W=function(){function ye(){}return ye.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ye.setAttributes=function(ue,he){for(var me=0,Ce=he;me<Ce.length;me++){var ge=Ce[me],Ee=ge[0],Ae=ge[1];ue.setAttribute(Ee,Ae)}},ye.createRect=function(ue,he,me){var Ce=document.createElementNS("http://www.w3.org/2000/svg","rect");return Ce.setAttribute("width",ue.toString()),Ce.setAttribute("height",he.toString()),me&&ye.setAttributes(Ce,me),Ce},ye.createLine=function(ue,he,me,Ce,ge){var Ee=document.createElementNS("http://www.w3.org/2000/svg","line");return Ee.setAttribute("x1",ue.toString()),Ee.setAttribute("y1",he.toString()),Ee.setAttribute("x2",me.toString()),Ee.setAttribute("y2",Ce.toString()),ge&&ye.setAttributes(Ee,ge),Ee},ye.createPolygon=function(ue,he){var me=document.createElementNS("http://www.w3.org/2000/svg","polygon");return me.setAttribute("points",ue),he&&ye.setAttributes(me,he),me},ye.createCircle=function(ue,he){var me=document.createElementNS("http://www.w3.org/2000/svg","circle");return me.setAttribute("cx",(ue/2).toString()),me.setAttribute("cy",(ue/2).toString()),me.setAttribute("r",ue.toString()),he&&ye.setAttributes(me,he),me},ye.createEllipse=function(ue,he,me){var Ce=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Ce.setAttribute("cx",(ue/2).toString()),Ce.setAttribute("cy",(he/2).toString()),Ce.setAttribute("rx",(ue/2).toString()),Ce.setAttribute("ry",(he/2).toString()),me&&ye.setAttributes(Ce,me),Ce},ye.createGroup=function(ue){var he=document.createElementNS("http://www.w3.org/2000/svg","g");return ue&&ye.setAttributes(he,ue),he},ye.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ye.createMarker=function(ue,he,me,Ce,ge,Ee,Ae){var De=document.createElementNS("http://www.w3.org/2000/svg","marker");return ye.setAttributes(De,[["id",ue],["orient",he],["markerWidth",me.toString()],["markerHeight",Ce.toString()],["refX",ge.toString()],["refY",Ee.toString()]]),De.appendChild(Ae),De},ye.createText=function(ue){var he=document.createElementNS("http://www.w3.org/2000/svg","text");return he.setAttribute("x","0"),he.setAttribute("y","0"),ue&&ye.setAttributes(he,ue),he},ye.createTSpan=function(ue,he){var me=document.createElementNS("http://www.w3.org/2000/svg","tspan");return me.textContent=ue,he&&ye.setAttributes(me,he),me},ye.createImage=function(ue){var he=document.createElementNS("http://www.w3.org/2000/svg","image");return ue&&ye.setAttributes(he,ue),he},ye.createPoint=function(ue,he){var me=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return me.x=ue,me.y=he,me},ye.createPath=function(ue,he){var me=document.createElementNS("http://www.w3.org/2000/svg","path");return me.setAttribute("d",ue),he&&ye.setAttributes(me,he),me},ye.createElement=function(ue,he){var me=document.createElementNS("http://www.w3.org/2000/svg",ue);return he&&ye.setAttributes(me,he),me},ye.getHollowRectanglePath=function(ue,he,me,Ce,ge,Ee,Ae,De){return"M"+ue+","+he+"V"+(he+Ce)+"H"+(ue+me)+"V"+he+"H"+ge+"V"+Ee+"H"+(ge+Ae)+"V"+(Ee+De)+"H"+ge+"V"+he+"Z"},ye}(),Y=function(){function ye(ue){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ue+"_"}return Object.defineProperty(ye.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),ye.prototype.addClass=function(ue){return this.styleSheet===void 0&&this.addStyleSheet(),ue.name=""+this.classNamePrefix+ue.localName,this.classes.push(ue),this.styleSheet.sheet.insertRule("."+ue.name+" {"+ue.style+"}",this.styleSheet.sheet.cssRules.length),ue},ye.prototype.addRule=function(ue){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ue),this.styleSheet.sheet.insertRule(ue.selector+" {"+ue.style+"}",this.styleSheet.sheet.cssRules.length)},ye.prototype.addStyleSheet=function(){var ue;this.styleSheet=document.createElement("style"),((ue=this.styleSheetRoot)!==null&&ue!==void 0?ue:document.head).appendChild(this.styleSheet),this.addRule(new V("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new V("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new V("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new Q("_fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new Q("_fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},ye.prototype.removeStyleSheet=function(){var ue;this.styleSheet&&(((ue=this.styleSheetRoot)!==null&&ue!==void 0?ue:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ye}(),V=function(ye,ue){this.selector=ye,this.style=ue},Q=function(ye,ue){this.localName=ye,this.style=ue},q=function(){function ye(){this.blocks=[],this.display=""}return ye.prototype.addButtonBlock=function(ue){ue.className=this.blockClassName,ue.buttonClassName=this.buttonClassName,ue.buttonColorsClassName=this.buttonColorsClassName,ue.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(ue)},ye.prototype.addElementBlock=function(ue){ue.className===void 0&&(ue.className=this.blockClassName),this.blocks.push(ue)},ye.prototype.getUI=function(){var ue=document.createElement("div");return ue.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,ue.style.display=this.display,this.blocks.forEach(function(he){return ue.appendChild(he.getUI())}),ue},ye}(),ie=function(){function ye(){}return ye.prototype.getUI=function(){var ue=document.createElement("div");if(ue.className=this.className,this.minWidth!==void 0&&(ue.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":ue.style.justifyContent="flex-start";break;case"center":ue.style.justifyContent="center";break;case"end":ue.style.justifyContent="flex-end"}return ue.style.whiteSpace="nowrap",ue},ye}(),ne=function(ye){function ue(){var he=ye!==null&&ye.apply(this,arguments)||this;return he.buttons=[],he}return Re(ue,ye),ue.prototype.addButton=function(he){he.className=this.buttonClassName,he.colorsClassName=this.buttonColorsClassName,he.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(he)},ue.prototype.getUI=function(){var he=ye.prototype.getUI.call(this);return this.buttons.forEach(function(me){return he.appendChild(me.getUI())}),he},ue}(ie),J=function(){function ye(ue,he){this._isActive=!1,this._isHidden=!1,this._icon=ue,this.title=he,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(ye.prototype,"icon",{get:function(){return this._icon},set:function(ue){this._icon=ue,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"isActive",{get:function(){return this._isActive},set:function(ue){this._isActive=ue,this.adjustClassName()},enumerable:!1,configurable:!0}),ye.prototype.getUI=function(){var ue=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return ue.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},ye.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},ye.prototype.hide=function(){this._isHidden=!0},ye}(),$=function(ye){function ue(){var he=ye!==null&&ye.apply(this,arguments)||this;return he.elements=[],he}return Re(ue,ye),ue.prototype.addElement=function(he){this.elements.push(he)},ue.prototype.getUI=function(){var he=ye.prototype.getUI.call(this);return this.elements.forEach(function(me){return he.appendChild(me)}),he},ue}(ie),le=function(){function ye(ue,he){this.horizontal=ue,this.vertical=he}return Object.defineProperty(ye.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),ye.prototype.getVerticalLength=function(ue){return ue/this.ratio},ye.prototype.getHorizontalLength=function(ue){return ue*this.ratio},ye}(),ce=function(){function ye(){}return ye.getIcon=function(ue,he){if(ue>0&&he>0){var me=new le(ue,he),Ce=me.ratio>=1?20:me.getHorizontalLength(20),ge=me.ratio<1?20:me.getVerticalLength(20),Ee=document.createElementNS("http://www.w3.org/2000/svg","svg");Ee.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ee.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ee);var Ae=W.createDefs();Ee.appendChild(Ae);var De=W.createElement("clipPath",[["id","text-bg-clip"]]);Ae.appendChild(De);var Me=W.createPath(W.getHollowRectanglePath((24-Ce)/2,(24-ge)/2,Ce,ge,(24-Ce)/2+2,(24-ge)/2+2,Ce-4,ge-4));Ee.appendChild(Me);var He=W.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);He.appendChild(W.createTSpan(ue+":"+he)),Ee.appendChild(He);var nt=He.getBBox();W.setAttributes(He,[["x",((24-nt.width)/2).toString()],["y",((24-nt.height)/2-nt.y).toString()]]);var at=W.createPath(W.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(nt.width))/2,(24-Math.ceil(nt.height))/2,Math.ceil(nt.width),Math.ceil(nt.height)));return De.appendChild(at),W.setAttributes(Me,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ee),Ee.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},ye}(),we=function(ye){function ue(he,me,Ce){var ge=ye.call(this,he,me)||this;return ge.isDropdownOpen=!1,ge.onClick=ge.dropdownButtonClicked,ge.dropdownButtons=Ce,ge}return Re(ue,ye),ue.prototype.setupDropdown=function(){var he=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(me){me.className=he.className,me.colorsClassName=he.colorsClassName,he.dropdownBlock.appendChild(me.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},ue.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},ue.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},ue.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},ue.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},ue.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},ue}(J),Fe=function(){function ye(ue,he){this.GRIP_SIZE=10,this.color=ue,this.fillColor=he,this.visual=W.createGroup(),this.visual.appendChild(W.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(W.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ye.prototype.ownsTarget=function(ue){return ue===this.visual||ue===this.visual.childNodes[0]||ue===this.visual.childNodes[1]},ye.prototype.setCenter=function(ue,he){this.visual.childNodes.forEach(function(me){return W.setAttributes(me,[["cx",ue.toString()],["cy",he.toString()]])})},ye}(),Xe=function(){function ye(ue,he,me,Ce){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=ue,this.canvasHeight=he,this.margin=me,this.container=Ce,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(ye.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(ue){this._aspectRatio=ue,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ue){this._isGridVisible=ue,this.gridContainer&&W.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(ue){this._zoomFactor=ue,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),ye.prototype.open=function(){var ue=this;this.cropShadeElement=W.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=W.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var he=0;he<this.numberOfGridLines;he++)this.horizontalGridLines.push(W.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(W.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(me){return ue.gridContainer.appendChild(me)}),this.verticalGridLines.forEach(function(me){return ue.gridContainer.appendChild(me)}),this.cropRectElement=W.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Fe(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Fe(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Fe(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Fe(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},ye.prototype.setCropRectangle=function(ue){this.cropRect=ue;var he=Object.assign({},this.cropRect);this.zoomFactor!==1&&(he.width=this.cropRect.width*this.zoomFactor,he.height=this.cropRect.height*this.zoomFactor,he.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-he.width/2,he.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-he.height/2),W.setAttributes(this.cropRectElement,[["x",he.x.toString()],["y",he.y.toString()],["width",he.width.toString()],["height",he.height.toString()]]);var me=he.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(ge,Ee){var Ae=he.y+me*(Ee+1);W.setAttributes(ge,[["x1",""+he.x],["y1",""+Ae],["x2",""+(he.x+he.width)],["y2",""+Ae]])});var Ce=he.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(ge,Ee){var Ae=he.x+Ce*(Ee+1);W.setAttributes(ge,[["x1",""+Ae],["y1",""+he.y],["x2",""+Ae],["y2",""+(he.y+he.height)]])}),W.setAttributes(this.cropShadeElement,[["d",W.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,he.x,he.y,he.width,he.height)]]),this.topLeftGrip.setCenter(he.x,he.y),this.topRightGrip.setCenter(he.x+he.width,he.y),this.bottomLeftGrip.setCenter(he.x,he.y+he.height),this.bottomRightGrip.setCenter(he.x+he.width,he.y+he.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},ye.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},ye.prototype.clientToLocalCoordinates=function(ue,he){var me=this.container.getBoundingClientRect();return{x:ue-me.left+this.margin,y:he-me.top+this.margin}},ye.prototype.onPointerDown=function(ue){this.container.setPointerCapture(ue.pointerId),this.previousPoint=this.clientToLocalCoordinates(ue.clientX,ue.clientY),this.cropRectElement===ue.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(ue.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(ue.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(ue.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(ue.target)&&(this.activeGrip=this.bottomRightGrip)},ye.prototype.onPointerMove=function(ue){if(this.isMoving)this.move(this.clientToLocalCoordinates(ue.clientX,ue.clientY));else if(this.activeGrip){var he=this.clientToLocalCoordinates(ue.clientX,ue.clientY);this.resize(he)}ue.preventDefault()},ye.prototype.onPointerUp=function(ue){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(ue.pointerId)},ye.prototype.move=function(ue){var he=ue.x-this.previousPoint.x,me=ue.y-this.previousPoint.y;this.zoomFactor!==1&&(he=-he/this.zoomFactor,me=-me/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+he),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+me),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=ue},ye.prototype.resize=function(ue){var he=Object.assign({},this.cropRect),me=ue.x-this.previousPoint.x,Ce=ue.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:he.x+me<this.margin&&(me=this.margin-he.x),he.x+=me,he.width=this.cropRect.x+this.cropRect.width-he.x;break;case this.bottomRightGrip:case this.topRightGrip:he.width+me>this.canvasWidth*this.zoomFactor&&(me=this.canvasWidth*this.zoomFactor-he.width),he.width+=me}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(he.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(me),he.height=this.aspectRatio.getVerticalLength(he.width)):(he.y+=Ce,he.height=this.cropRect.y+this.cropRect.height-he.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?he.height=this.aspectRatio.getVerticalLength(he.width):he.height+=Ce}he.width<10&&(he.x=this.cropRect.x,he.width=10),he.height<10&&(he.y=this.cropRect.y,he.height=10),this.previousPoint=ue,he.x>=this.margin&&he.y>=this.margin&&he.x-this.margin+he.width<=this.canvasWidth&&he.y-this.margin+he.height<=this.canvasHeight&&(this.cropRect=he,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},ye.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var ue=this.cropRect.x+this.cropRect.width/2,he=this.cropRect.y+this.cropRect.height/2,me=this.aspectRatio.getHorizontalLength(this.cropRect.height),Ce=this.aspectRatio.getVerticalLength(this.cropRect.width);me/this.canvasWidth<Ce/this.canvasHeight?this.cropRect.width=me:this.cropRect.height=Ce,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=ue-this.cropRect.width/2,this.cropRect.y=he-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},ye.prototype.getRescaledRect=function(ue,he,me,Ce,ge,Ee){var Ae=me/ue,De=Ce/he;return{x:(ge.x-Ee)*Ae+Ee,y:(ge.y-Ee)*De+Ee,width:ge.width*Ae,height:ge.height*De}},ye.prototype.scaleCanvas=function(ue,he){var me=this.getRescaledRect(this.canvasWidth,this.canvasHeight,ue,he,this.cropRect,this.margin);this.canvasWidth=ue,this.canvasHeight=he,this.onCropChange&&this.onCropChange(me),this.setCropRectangle(me)},ye}(),$e=function(){function ye(ue){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=ue,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(ye.prototype,"angle",{get:function(){return this._angle},set:function(ue){this._angle=ue,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),ye.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},ye.prototype.onPointerDown=function(ue){this.controlContainer.setPointerCapture(ue.pointerId),this.isDragging=!0,this.previousPoint={x:ue.clientX,y:ue.clientY}},ye.prototype.onPointerMove=function(ue){this.isDragging&&(this.onAngleChange&&this.onAngleChange((ue.clientX-this.previousPoint.x)/5),this.previousPoint.x=ue.clientX)},ye.prototype.onPointerUp=function(ue){this.isDragging&&this.onAngleChange&&this.onAngleChange((ue.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(ue.pointerId)},ye.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var ue=this.angleLabelText.getBBox();W.setAttributes(this.angleLabelElement,[["x",((this.width-ue.width)/2).toString()],["y",(this.height/2).toString()]])}},ye.prototype.positionScaleShape=function(){if(this.scaleShape){var ue=this.scaleShape.transform.baseVal.getItem(0);ue.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(ue,0)}},ye.prototype.getVisual=function(){var ue=document.createElementNS("http://www.w3.org/2000/svg","svg");ue.setAttribute("xmlns","http://www.w3.org/2000/svg"),ue.setAttribute("width",this.width+"px"),ue.setAttribute("height",this.height+"px"),ue.setAttribute("viewBox","0 0 "+this.width+" "+this.height),ue.style.flexShrink="0",document.body.appendChild(ue);for(var he="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,me=1;me<=this.width/5+10;me++){var Ce=me%5==0?this.height/3:this.height/6;he+="h4v"+-Ce+"h1v"+Ce}he+="v1H0Z",this.scaleShape=W.createPath(he);var ge=W.createTransform();this.scaleShape.transform.baseVal.appendItem(ge),ue.appendChild(this.scaleShape),this.angleLabelElement=W.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=W.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ee=W.createTSpan("");return Ee.innerHTML="°",this.angleLabelElement.appendChild(Ee),ue.appendChild(this.angleLabelElement),document.body.removeChild(ue),ue},ye}(),Ye=function(){function ye(){this.naturalSize=!1,this.imageType="image/png"}return ye.prototype.rasterize=function(ue,he,me,Ce,ge,Ee,Ae){var De=this;return new Promise(function(Me){var He=document.createElement("canvas");He.width=ue.width.baseVal.value-2*Ce,He.height=ue.height.baseVal.value-2*Ce;var nt=1,at=1;De.naturalSize===!0?(nt=he.naturalWidth/(ue.width.baseVal.value-2*Ce)/Ee,at=he.naturalHeight/(ue.height.baseVal.value-2*Ce)/Ae,He.width=he.naturalWidth/Ee,He.height=he.naturalHeight/Ae):De.width!==void 0&&De.height!==void 0&&(nt=De.width/me.width,at=De.height/me.height,He.width*=nt,He.height*=at);var it=He.getContext("2d");it.translate(He.width/2,He.height/2),it.rotate(ge*Math.PI/180),it.scale(Ee,Ae),it.translate(-He.width/2,-He.height/2),it.drawImage(he,0,0,He.width,He.height);var st=document.createElement("canvas");st.width=me.width*nt,st.height=me.height*at,st.getContext("2d").putImageData(it.getImageData((me.x-Ce)*nt,(me.y-Ce)*at,me.width*nt,me.height*at),0,0),Me(st.toDataURL(De.imageType,De.imageQuality))})},ye}(),Ze=function(){function ye(ue){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=ye.instanceCounter++,this.styles=new Y(this.instanceNo),this.target=ue,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(ye.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(ue){this._zoomToCropEnabled=ue,ue?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ue){this._isGridVisible=ue,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"gridLines",{get:function(){return this._gridLines},set:function(ue){this._gridLines=ue,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(ue){this._rotationAngle=ue,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"aspectRatio",{get:function(){var ue;return(ue=this._aspectRatio)!==null&&ue!==void 0?ue:this.aspectRatios[0]},set:function(ue){this._aspectRatio=ue},enumerable:!1,configurable:!0}),ye.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},ye.prototype.show=function(){this.showUI(),this.open()},ye.prototype.close=function(ue){ue===void 0&&(ue=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),ue||this.closeEventListeners.forEach(function(he){return he()}),this._isOpen=!1)},ye.prototype.addRenderEventListener=function(ue){this.renderEventListeners.push(ue)},ye.prototype.removeRenderEventListener=function(ue){this.renderEventListeners.indexOf(ue)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(ue),1)},ye.prototype.addCloseEventListener=function(ue){this.closeEventListeners.push(ue)},ye.prototype.removeCloseEventListener=function(ue){this.closeEventListeners.indexOf(ue)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(ue),1)},ye.prototype.setupResizeObserver=function(){var ue=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ue.resize(ue.target.clientWidth,ue.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},ye.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var ue=1*this.target.clientWidth/this.target.clientHeight,he=this.contentDiv.clientWidth/ue>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*ue:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,me=he+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/ue;this.resize(he,me)}},ye.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ye.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",W.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},ye.prototype.resize=function(ue,he){this.imageWidth=Math.round(ue),this.imageHeight=Math.round(he),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},ye.prototype.setEditingTarget=function(){var ue=document.createElement("canvas");ue.width=this.target.naturalWidth,ue.height=this.target.naturalHeight,ue.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var he=ue.toDataURL();W.setAttributes(this.editingTarget,[["href",he]]),this.setEditingTargetSize()},ye.prototype.setTopLeft=function(){var ue=this.target.getBoundingClientRect(),he=this.editorCanvas.getBoundingClientRect();this.left=ue.left-he.left-this.CANVAS_MARGIN,this.top=ue.top-he.top-this.CANVAS_MARGIN},ye.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=W.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=W.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=W.createGroup(),this.editingTargetRotationScaleContainer=W.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var ue=W.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(ue);var he=W.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(he),this.editingTargetContainer=W.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},ye.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},ye.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=W.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Xe(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},ye.prototype.zoomToCrop=function(){if(this.cropRect){var ue=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,he=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=ue+"px "+he+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-ue+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-he+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},ye.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},ye.prototype.cropRectChanged=function(ue){this.cropRect=ue,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},ye.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},ye.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},ye.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ye.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var ue=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,he=this.target.offsetTop>ue+this.CANVAS_MARGIN?this.target.offsetTop-(ue+this.CANVAS_MARGIN):0;this.coverDiv.style.top=he+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},ye.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},ye.prototype.addTopToolbar=function(){var ue=this;this.topToolbar=new q,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var he=new ne;he.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(he);var me=[];this.aspectRatios.forEach(function(at){var it=new J(ce.getIcon(at.horizontal,at.vertical),at.horizontal===0&&at.vertical===0?"FREE":at.horizontal+":"+at.vertical);it.onClick=function(){return ue.ratioButtonClicked(at)},me.push(it)}),this.aspectRatioButton=new we(ce.getIcon(0,0),"Aspect ratio",me),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,he.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var Ce=new J('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");Ce.isActive=this.isGridVisible,Ce.onClick=function(){ue.isGridVisible=!ue.isGridVisible,Ce.isActive=ue.isGridVisible},he.addButton(Ce);var ge=new J('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(ge.isActive=this.zoomToCropEnabled,ge.onClick=function(){ue.zoomToCropEnabled=!ue.zoomToCropEnabled,ge.isActive=ue.zoomToCropEnabled},he.addButton(ge),!te.isLicensed){var Ee=new $;this.topToolbar.addElementBlock(Ee);var Ae=document.createElement("div");Ae.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var De=document.createElement("a");De.style.color="currentColor",De.href="https://markerjs.com/products/cropro",De.target="_blank",De.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',Ae.appendChild(De),Ee.addElement(Ae)}var Me=new ne;Me.minWidth=3*this.toolbarHeight+"px",Me.contentAlign="end",this.topToolbar.addButtonBlock(Me);var He=new J('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");He.onClick=this.startRenderAndClose,Me.addButton(He),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(He.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var nt=new J('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");nt.onClick=this.close,Me.addButton(nt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(nt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},ye.prototype.addBottomToolbar=function(){var ue=this;this.bottomToolbar=new q,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var he=new ne;he.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(he);var me=new J('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");me.onClick=this.rotateLeftButtonClicked,he.addButton(me);var Ce=new J('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");Ce.onClick=this.rotateRightButtonClicked,he.addButton(Ce);var ge=new $;ge.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(ge),this.straightener=new $e("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(Me){ue.rotateBy(Me),ue.straightener.angle=ue.rotationAngle},ge.addElement(this.straightener.getUI());var Ee=new ne;Ee.minWidth=2*this.toolbarHeight+"px",Ee.contentAlign="end",this.bottomToolbar.addButtonBlock(Ee);var Ae=new J('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");Ae.onClick=this.flipHorizontallyButtonClicked,Ee.addButton(Ae);var De=new J('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");De.onClick=this.flipVerticallyButtonClicked,Ee.addButton(De)},ye.prototype.ratioButtonClicked=function(ue){this.aspectRatio=ue,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},ye.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=ce.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},ye.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new le(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},ye.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ye.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},ye.prototype.restoreState=function(ue){if(ue){var he=this.cropLayer.getRescaledRect(ue.width,ue.height,this.imageWidth,this.imageHeight,ue.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(he),this.cropRectChanged(he),this.flippedHorizontally=ue.flippedHorizontally,this.flippedVertically=ue.flippedVertically,this.applyFlip(),this.rotationAngle=ue.rotationAngle,this.applyRotation()}},ye.prototype.clientToLocalCoordinates=function(ue,he){var me=this.cropImage.getBoundingClientRect();return{x:ue-me.left,y:he-me.top}},ye.prototype.onWindowResize=function(){this.positionUI()},ye.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var ue=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=ue+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},ye.prototype.rotateLeftButtonClicked=function(){var ue=this.rotationAngle-90;this.rotationAngle%90!=0&&(ue+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(ue)},ye.prototype.rotateRightButtonClicked=function(){var ue=this.rotationAngle+90;this.rotationAngle%90!=0&&(ue-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(ue)},ye.prototype.rotateTo=function(ue){ue=(ue=ue>180?ue-360:ue)<=-180?ue+360:ue,this.rotationAngle=ue,this.applyRotation()},ye.prototype.rotateBy=function(ue){this.rotateTo((this.rotationAngle+ue)%360)},ye.prototype.applyRotation=function(){var ue=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var he=this.editingTargetRotationContainer.transform.baseVal.getItem(0);he.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(he,0);var me=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/me.width,this.imageHeight/me.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=ue},ye.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},ye.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},ye.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},ye.prototype.startRenderAndClose=function(){return Oe(this,void 0,void 0,function(){var ue,he;return de(this,function(me){switch(me.label){case 0:return[4,this.render()];case 1:return ue=me.sent(),he=this.getState(),this.renderEventListeners.forEach(function(Ce){return Ce(ue,he)}),this.close(!0),[2]}})})},ye.prototype.render=function(){return Oe(this,void 0,void 0,function(){var ue;return de(this,function(he){switch(he.label){case 0:return(ue=new Ye).naturalSize=this.renderAtNaturalSize,ue.imageType=this.renderImageType,ue.imageQuality=this.renderImageQuality,ue.width=this.renderWidth,ue.height=this.renderHeight,this.unzoomFromCrop(),W.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,ue.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return he.sent(),[4,ue.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,he.sent()]}})})},ye.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Q("toolbar",`
|
|
|
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
overflow: hidden;
|
|
|
line-height: 0px;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Q("toolbar_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Q("toolbar-block",`
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
box-sizing: content-box;
|
|
|
`));var ue=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Q("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.toolbarHeight-2*ue)+`px;
|
|
|
height: `+(this.toolbarHeight-2*ue)+`px;
|
|
|
padding: `+ue+`px;
|
|
|
cursor: default;
|
|
|
user-select: none;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Q("toolbar_button_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Q("toolbar_active_button",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
|
`)),this.styles.addRule(new V("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new V("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Q("toolbar_dropdown",`
|
|
|
position: absolute;
|
|
|
max-width: `+4*this.toolbarHeight+`px;
|
|
|
z-index: 20;
|
|
|
white-space: normal;
|
|
|
box-sizing: content-box;
|
|
|
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
|
|
|
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
|
|
|
line-height: 0px;
|
|
|
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Q("toolbar_dropdown_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Q("toolbar_straightener_block",`
|
|
|
display: flex;
|
|
|
overflow: hidden;
|
|
|
justify-content: center;
|
|
|
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
|
|
|
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new Q("toolbar_straightener",`
|
|
|
display: flex;
|
|
|
overflow: hidden;
|
|
|
justify-content: center;
|
|
|
height: `+(this.toolbarHeight-2*ue)+`px;
|
|
|
padding: `+ue+`px;
|
|
|
cursor: default;
|
|
|
user-select: none;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Q("toolbar_straightener_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`))},ye.instanceCounter=0,ye}(),qe=I("8hTe"),Pe=I.n(qe),Ie=/<pre[^>]*>/g;function Je(ye){var ue=document.createElement("div");return ue.innerHTML=ye,ue.childNodes.length===0?"":ue.childNodes[0].nodeValue}var rt=Z.a=function(ye){var ue=ye.value,he=ue===void 0?"":ue,me=ye.edit,Ce=me===void 0?!1:me,ge=ye.className,Ee=ye.showTextOnly,Ae=ye.showLines,De=ye.replaces,Me=ye.zoomImg,He=ye.hasMask,nt=ye.style,at=nt===void 0?{}:nt,it=ye.stylesPrev,st=it===void 0?{}:it,Tt=String(he),pt=Object(h.useRef)(),ht=Object(h.useRef)(),Ft=Object(h.useState)(""),Lt=Object(C.a)(Ft,2),Yt=Lt[0],$t=Lt[1],Mt=Object(h.useState)("office"),wt=Object(C.a)(Mt,2),Jt=wt[0],Dt=wt[1],St=function(){var Ht=new Ze(ht.current);Ht.displayMode="popup",Ht.addRenderEventListener(function(){var Gt=Object(m.a)(e.a.mark(function yt(xt){var Kt;return e.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return pt.current.style.display="none",qt.next=3,Object(be.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xt}});case 3:Kt=qt.sent,Kt!=null&&Kt.id&&De(ht.current.getAttribute("src").replace(ee.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 5:case"end":return qt.stop()}},yt)}));return function(yt){return Gt.apply(this,arguments)}}()),Ht.show()},_t=function(){var Ht=new _e.a(ht.current);Ht.settings.displayMode="popup",Ht.addEventListener("render",function(){var Gt=Object(m.a)(e.a.mark(function yt(xt){var Kt;return e.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:if(pt.current.style.display="none",!ht.current){qt.next=6;break}return qt.next=4,Object(be.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:xt.dataUrl}});case 4:Kt=qt.sent,Kt!=null&&Kt.id&&De(ht.current.getAttribute("src").replace(ee.a.API_SERVER,""),"/api/attachments/".concat(Kt==null?void 0:Kt.id,"?type=").concat(Kt.content_type));case 6:case"end":return qt.stop()}},yt)}));return function(yt){return Gt.apply(this,arguments)}}()),Ht.show(),window.markerArea=Ht},Et=Object(h.useMemo)(function(){pt.current&&(pt.current.style.zIndex=-1);try{var dt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ht=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Gt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Tt=Tt.replace(dt,"("+ee.a.API_SERVER+"/api/attachments/").replace(Ht,'"'+ee.a.API_SERVER+"/api/attachments/").replace(Gt,'"'+ee.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(Ar){}var yt=B(Tt),xt=F();if(Tt.match(/\[TOC\]/)&&(yt=yt.replace("<p>[TOC]</p>",D()),E()),yt=yt.replace(/(__special_katext_id_\d+__)/g,function(Ar,qt){var ut=xt[qt],kt=ut.type,Hr=ut.expression;return Object(oe.renderToString)(Je(Hr)||"",{displayMode:kt==="block",throwOnError:!1,output:"html"})}),yt=yt.replace(/▁/g,"\u2581\u2581\u2581"),P(),Ee){var Kt=document.createElement("div");return Kt.innerHTML=yt,Kt.innerText}return setTimeout(function(){return mt()},500),yt},[Tt]),Bt=Object(h.useRef)();b.WebkitLineClamp=Ae,Ae&&(at=Object(v.a)(Object(v.a)({},at),b));function Dr(dt){var Ht=dt.target;if(Ht.tagName.toUpperCase()==="IMG"){if(Me){var Gt=Ht.getAttribute("src");$t(Gt),Dt("image")}}else if(Ht.tagName.toUpperCase()==="A"){var yt=Ht.getAttribute("href");if(yt.indexOf("office")>-1)dt.preventDefault(),$t(yt),Dt("office");else if(yt.indexOf("application/pdf")>-1)dt.preventDefault(),$t(yt),Dt("pdf");else if(yt.indexOf("text/html")>-1)dt.preventDefault(),$t(yt),Dt("html");else if(yt.startsWith("#")){dt.preventDefault();var xt=document.getElementById(yt.replace("#",""));xt&&xt.scrollIntoView(!0)}}}var mt=function(){var Ht,Gt=(Ht=Bt.current)===null||Ht===void 0?void 0:Ht.querySelectorAll("video");Gt==null||Gt.forEach(function(yt){if(yt.oncontextmenu=function(){return!1},yt.src.indexOf(".m3u8")>-1&&!yt.canPlayType("application/vnd.apple.mpegurl")){if(G.a.isSupported()){var xt=new G.a;xt.loadSource(yt.src),xt.attachMedia(yt)}}})};Object(h.useEffect)(function(){if(Bt.current&&Et&&(Et.match(Ie)&&window.PR.prettyPrint()),Bt.current)return Bt.current.addEventListener("click",Dr),function(){Bt.current.removeEventListener("click",Dr),P(),E()}},[Et,Bt.current,Dr]);var Ct=function(Ht){if(!Ce)return;Ht.target.nodeName==="IMG"?(pt.current.style.zIndex=1,pt.current.style.display="flex",pt.current.style.width=Ht.target.clientWidth+"px",pt.current.style.height=Ht.target.clientHeight+"px",pt.current.style.top=Ht.target.offsetTop+"px",pt.current.style.left=Ht.target.offsetLeft+"px",ht.current.src=Ht.target.getAttribute("src")):pt.current.style.display="none"};return r.a.createElement("div",{style:{position:"relative"}},r.a.createElement("div",{ref:Bt,style:Object(v.a)({},at),className:"".concat(ge||""," markdown-body ").concat(Pe.a.mdBody),onMouseOver:Ct,dangerouslySetInnerHTML:{__html:Et}}),r.a.createElement("div",{ref:pt,className:Pe.a.button},r.a.createElement(g.a,null,r.a.createElement(k.a,{onClick:function(){return St()}},"\u88C1\u526A"),r.a.createElement(k.a,{onClick:function(){return _t()}},"\u7F16\u8F91"))),r.a.createElement("img",{ref:ht,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),r.a.createElement(ae.a,{close:!0,data:Yt,type:Yt!=null&&Yt.length?Jt:"",style:Object(v.a)({},st),onClose:function(){return $t("")}}))}},"9OqN":function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.mode.CTR=function(){var g=N.lib.BlockCipherMode.extend(),S=g.Encryptor=g.extend({processBlock:function(k,v){var m=this._cipher,C=m.blockSize,_=this._iv,e=this._counter;_&&(e=this._counter=_.slice(0),this._iv=void 0);var h=e.slice(0);m.encryptBlock(h,0),e[C-1]=e[C-1]+1|0;for(var r=0;r<C;r++)k[v+r]^=h[r]}});return g.Decryptor=S,g}(),N.mode.CTR})},"9VGf":function(H,Z,I){"use strict";I.d(Z,"a",function(){return S});var N=I("q1tI"),g=I.n(N);function S(k,v){var m=Object(N.useRef)();Object(N.useEffect)(function(){m.current=k}),Object(N.useEffect)(function(){function C(){m.current()}if(v!==null){var _=setInterval(C,v);return function(){return clearInterval(_)}}},[v])}},ALsQ:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.mode.CFB=function(){var g=N.lib.BlockCipherMode.extend();g.Encryptor=g.extend({processBlock:function(k,v){var m=this._cipher,C=m.blockSize;S.call(this,k,v,C,m),this._prevBlock=k.slice(v,v+C)}}),g.Decryptor=g.extend({processBlock:function(k,v){var m=this._cipher,C=m.blockSize,_=k.slice(v,v+C);S.call(this,k,v,C,m),this._prevBlock=_}});function S(k,v,m,C){var _,e=this._iv;e?(_=e.slice(0),this._iv=void 0):_=this._prevBlock,C.encryptBlock(_,0);for(var h=0;h<m;h++)k[v+h]^=_[h]}return g}(),N.mode.CFB})},B7Ph:function(H,Z,I){"use strict";I.d(Z,"a",function(){return oe});var N=I("5NDa"),g=I("5rEg"),S=I("sRBo"),k=I("kaz8"),v=I("5Dmo"),m=I("3S7+"),C=I("14J3"),_=I("BMrR"),e=I("7Kak"),h=I("9yH6"),r=I("+L6B"),c=I("2/Rp"),i=I("2qtc"),n=I("kLXV"),l=I("miYZ"),f=I("tsqr"),d=I("k1fw"),u=I("9og8"),o=I("tJVT"),s=I("oBTY"),E=I("DZo9"),b=I("8z0m"),p=I("WmNS"),D=I.n(p),R=I("q1tI"),y=I.n(R),x=I("Bvq2"),w=I.n(x),T=I("nj2k"),F=I.n(T),P=I("mxV5"),A=I.n(P),X=I("KhGG"),z=I("ErOA"),O=I("7Cbv"),B=I("1vsH"),U=I("p5ED"),L=b.a.Dragger,G=function(be){for(var _e=function(q){return q&&q.substring(0,q.lastIndexOf("."))},fe=Object(s.a)(be),Re=0,Oe=[],de=0;de<fe.length;de++){for(var te="",W=0;W<Oe.length;W++)if(_e(Oe[W][0].name)==_e(fe[de].name)){Re=1,te=W;break}if(Re==1)Oe[te].push(fe[de]),Re=0;else if(Re==0){var Y=new Array;Y.push(fe[de]),Oe.push(Y)}}var V=Oe.map(function(Q){if(Q[0].name.includes(".in"))return Q.length===2?Q:[Q[0],{}];if(Q[0].name.includes(".out"))return Q.length===2?Q.reverse():[{},Q[0]]});return V},ee=function(be){var _e=be.onClose,fe=be.onOK,Re=be.visible,Oe=be.wrapClassName,de=be.rootIdentifier,te=be.multiple,W=te===void 0?!1:te,Y=be.defaultMultipleValue,V=Y===void 0?!0:Y,Q=Object(R.useState)([]),q=Object(o.a)(Q,2),ie=q[0],ne=q[1],J=Object(R.useState)({}),$=Object(o.a)(J,2),le=$[0],ce=$[1],we=Object(R.useState)(!1),Fe=Object(o.a)(we,2),Xe=Fe[0],$e=Fe[1],Ye=Object(R.useState)(!0),Ze=Object(o.a)(Ye,2),qe=Ze[0],Pe=Ze[1],Ie=Object(R.useState)(null),Je=Object(o.a)(Ie,2),rt=Je[0],ye=Je[1],ue=Object(R.useRef)([]),he=Object(R.useRef)(0),me=function(){_e()};Object(R.useEffect)(function(){Ce()},[]),Object(R.useEffect)(function(){Re&&(ue.current=[],he.current=0,ne([]),Pe(V))},[Re]);var Ce=function(){var at=Object(u.a)(D.a.mark(function it(){var st,Tt;return D.a.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:return ht.prev=0,ht.next=3,Object(z.a)("/api/buckets/get_upload_token_for_big_files",{method:"get"});case 3:st=ht.sent,(st==null?void 0:st.status)===0&&(st!=null&&st.is_oss?(Tt=JSON.parse(Object(X.a)(st.data)),ce(Tt),ye(!1)):ye(!0)),ht.next=9;break;case 7:ht.prev=7,ht.t0=ht.catch(0);case 9:case"end":return ht.stop()}},it,null,[[0,7]])}));return function(){return at.apply(this,arguments)}}(),ge=function(it){return it&&it.substring(0,it.lastIndexOf("."))},Ee=function(it){var st,Tt,pt=ge((st=it[0])===null||st===void 0?void 0:st.name)||ge((Tt=it[1])===null||Tt===void 0?void 0:Tt.name),ht=ie.filter(function(Ft){return ge(Ft.name)!==pt});ue.current=Object(s.a)(ht),ne(Object(s.a)(ht))},Ae=function(it){if(!qe){var st=new FormData;st.append("file",it.file);var Tt=Object(z.a)("/api/attachments/get_file_content.json",{method:"post",body:st},!0);Tt.then(function(wt){if(wt.status===0){he.current=he.current+1;var Jt=ue.current.map(function(St){if(St.name===it.name){var _t,Et=Object(d.a)({},St);return it!=null&&(_t=it.name)!==null&&_t!==void 0&&_t.includes(".in")?Et.input=wt==null?void 0:wt.content:Et.output=wt==null?void 0:wt.content,Et}return St});if(ue.current=Object(s.a)(Jt),ne(Object(s.a)(Jt)),he.current>0&&he.current===ie.length){$e(!1);var Dt=G(Jt);Dt=Dt.filter(function(St){var _t,Et;return!!((_t=St[0])!==null&&_t!==void 0&&_t.name&&(Et=St[1])!==null&&Et!==void 0&&Et.name)}),Dt=Dt.map(function(St){return Object(d.a)(Object(d.a)(Object(d.a)({},St[0]),St[1]),{},{is_file:!1})}),fe(Dt),_e()}}else $e(!1),_e()});return}if(rt){var pt=new FormData;pt.append("file",it.file),pt.append("identifier",de);var ht=Object(z.a)("/api/attachments.json",{method:"post",body:pt},!0);ht.then(function(wt){if(wt.filename){he.current=he.current+1;var Jt=ue.current.map(function(St){if(St.name===(wt==null?void 0:wt.filename)){var _t,Et=Object(d.a)(Object(d.a)({},St),{},{is_oss:!rt});return wt!=null&&(_t=wt.filename)!==null&&_t!==void 0&&_t.includes(".in")?(Et.in_object_key=wt==null?void 0:wt.object,Et.in_object_size=wt==null?void 0:wt.size,Et.input=wt==null?void 0:wt.filename,Et.in_file=it):(Et.out_object_key=wt==null?void 0:wt.object,Et.out_object_size=wt==null?void 0:wt.size,Et.output=wt==null?void 0:wt.filename,Et.out_file=it),Et}return St});if(ue.current=Object(s.a)(Jt),ne(Object(s.a)(Jt)),he.current>0&&he.current===ie.length){$e(!1);var Dt=G(Jt);Dt=Dt.filter(function(St){var _t,Et;return!!((_t=St[0])!==null&&_t!==void 0&&_t.name&&(Et=St[1])!==null&&Et!==void 0&&Et.name)}),Dt=Dt.map(function(St){return Object(d.a)(Object(d.a)(Object(d.a)({},St[0]),St[1]),{},{is_file:!0})}),fe(Dt),_e()}}else $e(!1),_e()});return}var Ft=new A.a({endpoint:le.end_point,region:le.region,accessKeyId:le.access_key_id,accessKeySecret:le.access_key_secret,bucket:le.bucket,stsToken:le.security_token}),Lt=it.name,Yt={container_type:"TestSet",file_name:Lt},$t=Object(O.a)(),Mt="testsets/".concat(de,"/").concat($t).concat(Lt.indexOf(".")>-1?"."+Lt.split(".").pop():"");de===null&&(Mt="testsets/".concat($t).concat(Lt.indexOf(".")>-1?"."+Lt.split(".").pop():"")),Ft.multipartUpload(Mt,new Blob([it.file],{type:it.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:Lt+""},url:le==null?void 0:le.callback_url,host:le==null?void 0:le.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(z.e)(Yt)}}).then(function(wt){if(wt.data.status===0){he.current=he.current+1;var Jt=ue.current.map(function(St){var _t,Et;if(St.name===((_t=wt.data)===null||_t===void 0||((Et=_t.data)===null||Et===void 0)?void 0:Et.file_name)){var Bt,Dr,mt,Ct=Object(d.a)(Object(d.a)({},St),{},{is_oss:!rt});if((Bt=wt.data)!==null&&Bt!==void 0&&(Dr=Bt.data)!==null&&Dr!==void 0&&(mt=Dr.file_name)!==null&&mt!==void 0&&mt.includes(".in")){var dt,Ht,Gt,yt,xt,Kt;Ct.in_object_key=(dt=wt.data)===null||dt===void 0||((Ht=dt.data)===null||Ht===void 0)?void 0:Ht.object,Ct.in_object_size=(Gt=wt.data)===null||Gt===void 0||((yt=Gt.data)===null||yt===void 0)?void 0:yt.size,Ct.input=(xt=wt.data)===null||xt===void 0||((Kt=xt.data)===null||Kt===void 0)?void 0:Kt.file_name,Ct.in_file=it}else{var Ar,qt,ut,kt,Hr,Yr;Ct.out_object_key=(Ar=wt.data)===null||Ar===void 0||((qt=Ar.data)===null||qt===void 0)?void 0:qt.object,Ct.out_object_size=(ut=wt.data)===null||ut===void 0||((kt=ut.data)===null||kt===void 0)?void 0:kt.size,Ct.output=(Hr=wt.data)===null||Hr===void 0||((Yr=Hr.data)===null||Yr===void 0)?void 0:Yr.file_name,Ct.out_file=it}return Ct}return St});if(ue.current=Object(s.a)(Jt),ne(Object(s.a)(Jt)),he.current>0&&he.current===ie.length){$e(!1);var Dt=G(Jt);Dt=Dt.filter(function(St){var _t,Et;return!!((_t=St[0])!==null&&_t!==void 0&&_t.name&&(Et=St[1])!==null&&Et!==void 0&&Et.name)}),Dt=Dt.map(function(St){return Object(d.a)(Object(d.a)(Object(d.a)({},St[0]),St[1]),{},{is_file:!0})}),fe(Dt),_e()}}})},De=function(it){return new Promise(function(st,Tt){for(var pt=0,ht=[],Ft=function($t){it[$t].file.slice(0,1).arrayBuffer().then(function(){pt++,pt===it.length&&(ht.length?(f.b.warn("".concat(ht.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Tt()):st(it))}).catch(function(Mt){console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",Mt),pt++,ht.push(it[$t].name),pt===it.length&&(ht.length?(f.b.warn("".concat(ht.join("\uFF0C"),"\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01")),Tt()):st(it))})},Lt=0;Lt<it.length;Lt++)Ft(Lt)})},Me=function(){var at=Object(u.a)(D.a.mark(function it(){var st;return D.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:if(!(ie.length===0)){pt.next=3;break}return f.b.warn("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6"),pt.abrupt("return");case 3:return pt.next=5,De(ie);case 5:if($e(!0),st=G(ie),!st.some(function(ht){var Ft,Lt;return!((Ft=ht[0])!==null&&Ft!==void 0&&Ft.name&&(Lt=ht[1])!==null&&Lt!==void 0&&Lt.name)})){pt.next=10;break}return n.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 ht=Object(u.a)(D.a.mark(function Lt(){return D.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:ie.map(function(){var Mt=Object(u.a)(D.a.mark(function wt(Jt){return D.a.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:Ae(Jt);case 1:case"end":return St.stop()}},wt)}));return function(wt){return Mt.apply(this,arguments)}}());case 1:case"end":return $t.stop()}},Lt)}));function Ft(){return ht.apply(this,arguments)}return Ft}(),onCancel:function(){$e(!1)}}),pt.abrupt("return");case 10:ie.map(function(){var ht=Object(u.a)(D.a.mark(function Ft(Lt){return D.a.wrap(function($t){for(;;)switch($t.prev=$t.next){case 0:Ae(Lt);case 1:case"end":return $t.stop()}},Ft)}));return function(Ft){return ht.apply(this,arguments)}}());case 11:case"end":return pt.stop()}},it)}));return function(){return at.apply(this,arguments)}}(),He={name:"file",fileList:ie,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:function(it){if(ie!=null&&ie.some(function(Tt){return Tt.name===it.name}))return f.b.info("".concat(it.name,"\u6587\u4EF6\u5DF2\u5B58\u5728")),!1;if(it.size/1024/1024>100)return f.b.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(it.name))return f.b.warn("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;var st={name:it.name,uid:it.uid,file:it,percent:0};return ie.push(st),ue.current=Object(s.a)(ie),ne(Object(s.a)(ie)),!1}},nt=G(ie);return console.log(ie,nt,"fileList"),y.a.createElement(n.a,{visible:Re,wrapClassName:Oe,onOk:Me,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:Xe},onCancel:me,width:"1000px",title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},y.a.createElement("div",{className:w.a.wrap},ie.length?y.a.createElement("div",null,y.a.createElement(_.a,{justify:"space-between",align:"middle",className:"mb20"},y.a.createElement("div",{style:{visibility:W?"visible":"hidden"}},"\u6D4B\u8BD5\u7528\u4F8B\u7C7B\u578B\uFF1A",y.a.createElement(h.a.Group,{className:"ml10",value:qe,onChange:function(it){return Pe(it.target.value)}},y.a.createElement(h.a,{value:!1},"\u6587\u672C"),y.a.createElement(h.a,{value:!0},"\u6587\u4EF6"))),y.a.createElement(b.a,He,y.a.createElement(c.a,{className:w.a.btnS},"\u4E0A\u4F20\u6587\u4EF6"))),y.a.createElement(oe,{data:nt,onRemove:Ee})):y.a.createElement("div",{className:w.a.noData},y.a.createElement("img",{src:F.a,alt:""}),y.a.createElement(b.a,He,y.a.createElement(c.a,{className:w.a.btn},"\u4E0A\u4F20\u6587\u4EF6"))),y.a.createElement("div",{className:w.a.text},"\u4E0A\u4F20\u9650\u5236\uFF1A",y.a.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",y.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",y.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",y.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",y.a.createElement("br",null))))},oe=function(be){var _e=be.data,fe=_e===void 0?[]:_e,Re=be.onRemove,Oe=be.width,de=Oe===void 0?"auto":Oe,te=be.showScore,W=te===void 0?!1:te,Y=be.disabled,V=Y===void 0?!1:Y,Q=be.inputChange,q=be.onEvaluatingChange,ie=be.showEvaluatingSetting,ne=ie===void 0?!1:ie,J={value:"",filename:"",dataUrl:""},$=Object(R.useState)(Object(d.a)({},J)),le=Object(o.a)($,2),ce=le[0],we=le[1],Fe=function(Ze){var qe=document.createElement("a");document.body.appendChild(qe);var Pe=URL.createObjectURL(Ze.file);qe.href=Pe,qe.download=Ze.name,qe.click(),URL.revokeObjectURL(Pe),document.body.removeChild(qe)},Xe=function(Ze,qe){Object(B.y)(Ze,qe)},$e=function(Ze,qe){n.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:y.a.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:function(){Re(Ze,qe)},onCancel:function(){}})};return fe.length?y.a.createElement("div",{style:{width:de}},y.a.createElement("div",{className:w.a.head},ne&&y.a.createElement("div",{style:{width:"10%"}},"\u9690\u85CF",y.a.createElement(m.a,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},y.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),y.a.createElement("div",{style:{width:"20%"}},"\u7528\u4F8B"),y.a.createElement("div",{style:{width:W?"25%":"35%",padding:"0 12px"}},"\u8F93\u5165"),y.a.createElement("div",{style:{width:W?"25%":"35%",padding:"0 12px"}},"\u8F93\u51FA"),W&&y.a.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),ne&&y.a.createElement("div",{style:{width:"20%"}},"\u9884\u671F\u8F93\u51FA",y.a.createElement(m.a,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},y.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ne&&y.a.createElement("div",{style:{width:"20%"}},"\u7279\u6B8A\u5224\u5B9A",y.a.createElement(m.a,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},y.a.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),y.a.createElement("div",{style:{width:"10%"}},"\u64CD\u4F5C")),fe.map(function(Ye,Ze){var qe,Pe,Ie,Je;return y.a.createElement("div",{key:Ze,className:w.a.list},ne&&y.a.createElement("div",{style:{width:"10%"}},y.a.createElement(k.a,{checked:!!Ye.hidden,onChange:function(ye){q(ye.target.checked?1:0,Ze,"hidden")}})),y.a.createElement("div",{style:{width:"20%"}},"\u6D4B\u8BD5\u7528\u4F8B",Ze+1),y.a.createElement("div",{className:w.a.info,style:{width:W?"25%":"35%"}},y.a.createElement("span",{title:Ye.input||((qe=Ye[0])===null||qe===void 0?void 0:qe.name),onClick:Object(u.a)(D.a.mark(function rt(){var ye,ue;return D.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:if(Ye.input?Ye.input_file_url?ye=Ye.input_file_url:ye=Ye.in_file:ye=Ye[0],!(typeof ye=="string")){me.next=14;break}return me.next=4,fetch(ye,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return ue=me.sent,me.t0=we,me.next=8,ue.text();case 8:me.t1=me.sent,me.t2=ye,me.t3={value:me.t1,filename:"",dataUrl:me.t2},(0,me.t0)(me.t3),me.next=18;break;case 14:return me.next=16,Object(B.G)(ye.file);case 16:ue=me.sent,we({value:ue.text,filename:ye.name,dataUrl:ue.link});case 18:case"end":return me.stop()}},rt)}))},Ye.input||((Pe=Ye[0])===null||Pe===void 0?void 0:Pe.name))),y.a.createElement("div",{className:w.a.info,style:{width:W?"25%":"35%"}},y.a.createElement("span",{title:Ye.output||((Ie=Ye[1])===null||Ie===void 0?void 0:Ie.name),onClick:Object(u.a)(D.a.mark(function rt(){var ye,ue;return D.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:if(Ye.input?Ye.output_file_url?ye=Ye.output_file_url:ye=Ye.out_file:ye=Ye[1],!(typeof ye=="string")){me.next=14;break}return me.next=4,fetch(ye,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 4:return ue=me.sent,me.t0=we,me.next=8,ue.text();case 8:me.t1=me.sent,me.t2=ye,me.t3={value:me.t1,filename:"",dataUrl:me.t2},(0,me.t0)(me.t3),me.next=18;break;case 14:return me.next=16,Object(B.G)(ye.file);case 16:ue=me.sent,we({value:ue.text,filename:ye.name,dataUrl:ue.link});case 18:case"end":return me.stop()}},rt)}))},Ye.output||((Je=Ye[1])===null||Je===void 0?void 0:Je.name))),W&&y.a.createElement("div",{style:{width:"20%"}},y.a.createElement(g.a,{disabled:V,style:{width:"70%"},onChange:function(ye){return Q(ye,Ze)},value:Ye.score}),y.a.createElement("span",null,"\xA0%")),ne&&y.a.createElement("div",{style:{width:"20%"}},y.a.createElement(k.a,{checked:Ye.is_invisible||!1,onChange:function(ye){q(ye.target.checked,Ze,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),ne&&y.a.createElement("div",{style:{width:"20%"}},y.a.createElement(k.a,{checked:Ye.last_match_rule||!1,onChange:function(ye){q(ye.target.checked,Ze,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),y.a.createElement("div",{onClick:function(){return $e(Ye,Ze)},style:{width:"10%"}},y.a.createElement("span",{className:w.a.del},"\u5220\u9664")))}),y.a.createElement(U.a,{close:!0,data:ce.dataUrl,filename:ce.filename,type:ce.dataUrl.length?"txt":"",onClose:function(){return we(Object(d.a)({},J))},monacoEditor:{value:ce.value,language:"txt",onChange:function(){},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):y.a.createElement(y.a.Fragment,null)};Z.b=ee},BU3w:function(H,Z,I){"use strict";I.d(Z,"a",function(){return m});var N=I("MNnm"),g="rc-util-key";function S(C){if(C.attachTo)return C.attachTo;var _=document.querySelector("head");return _||document.body}function k(C){var _,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(N.a)())return null;var h=document.createElement("style");if((_=e.csp)===null||_===void 0?void 0:_.nonce){var r;h.nonce=(r=e.csp)===null||r===void 0?void 0:r.nonce}h.innerHTML=C;var c=S(e),i=c.firstChild;return e.prepend&&c.prepend?c.prepend(h):e.prepend&&i?c.insertBefore(h,i):c.appendChild(h),h}var v=new Map;function m(C,_){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h=S(e);if(!v.has(h)){var r=k("",e),c=r.parentNode;v.set(h,c),c.removeChild(r)}var i=Array.from(v.get(h).children).find(function(u){return u.tagName==="STYLE"&&u[g]===_});if(i){var n,l;if(((n=e.csp)===null||n===void 0?void 0:n.nonce)&&i.nonce!==((l=e.csp)===null||l===void 0?void 0:l.nonce)){var f;i.nonce=(f=e.csp)===null||f===void 0?void 0:f.nonce}return i.innerHTML!==C&&(i.innerHTML=C),i}var d=k(C,e);return d[g]=_,d}},Bd2K:function(H,Z,I){(function(N){N(I("VrN/"),I("osHv"))})(function(N){N.defineOption("autoCloseTags",!1,function(e,h,r){if(r!=N.Init&&r&&e.removeKeyMap("autoCloseTags"),!h)return;var c={name:"autoCloseTags"};(typeof h!="object"||h.whenClosing!==!1)&&(c["'/'"]=function(i){return m(i)}),(typeof h!="object"||h.whenOpening!==!1)&&(c["'>'"]=function(i){return k(i)}),e.addKeyMap(c)});var g=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],S=["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 k(e){if(e.getOption("disableInput"))return N.Pass;for(var h=e.listSelections(),r=[],c=e.getOption("autoCloseTags"),i=0;i<h.length;i++){if(!h[i].empty())return N.Pass;var n=h[i].head,l=e.getTokenAt(n),f=N.innerMode(e.getMode(),l.state),d=f.state,u=f.mode.xmlCurrentTag&&f.mode.xmlCurrentTag(d),o=u&&u.name;if(!o)return N.Pass;var s=f.mode.configuration=="html",E=typeof c=="object"&&c.dontCloseTags||s&&g,b=typeof c=="object"&&c.indentTags||s&&S;l.end>n.ch&&(o=o.slice(0,o.length-l.end+n.ch));var p=o.toLowerCase();if(!o||l.type=="string"&&(l.end!=n.ch||!/[\"\']/.test(l.string.charAt(l.string.length-1))||l.string.length==1)||l.type=="tag"&&u.close||l.string.indexOf("/")==n.ch-l.start-1||E&&C(E,p)>-1||_(e,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(d)||[],o,n,!0))return N.Pass;var D=typeof c=="object"&&c.emptyTags;if(D&&C(D,o)>-1){r[i]={text:"/>",newPos:N.Pos(n.line,n.ch+2)};continue}var R=b&&C(b,p)>-1;r[i]={indent:R,text:">"+(R?`
|
|
|
|
|
|
`:"")+"</"+o+">",newPos:R?N.Pos(n.line+1,0):N.Pos(n.line,n.ch+1)}}for(var y=typeof c=="object"&&c.dontIndentOnAutoClose,i=h.length-1;i>=0;i--){var x=r[i];e.replaceRange(x.text,h[i].head,h[i].anchor,"+insert");var w=e.listSelections().slice(0);w[i]={head:x.newPos,anchor:x.newPos},e.setSelections(w),!y&&x.indent&&(e.indentLine(x.newPos.line,null,!0),e.indentLine(x.newPos.line+1,null,!0))}}function v(e,h){for(var r=e.listSelections(),c=[],i=h?"/":"</",n=e.getOption("autoCloseTags"),l=typeof n=="object"&&n.dontIndentOnSlash,f=0;f<r.length;f++){if(!r[f].empty())return N.Pass;var d=r[f].head,u=e.getTokenAt(d),o=N.innerMode(e.getMode(),u.state),s=o.state;if(h&&(u.type=="string"||u.string.charAt(0)!="<"||u.start!=d.ch-1))return N.Pass;var E,b=o.mode.name!="xml"&&e.getMode().name=="htmlmixed";if(b&&o.mode.name=="javascript")E=i+"script";else if(b&&o.mode.name=="css")E=i+"style";else{var p=o.mode.xmlCurrentContext&&o.mode.xmlCurrentContext(s);if(!p||p.length&&_(e,p,p[p.length-1],d))return N.Pass;E=i+p[p.length-1]}e.getLine(d.line).charAt(u.end)!=">"&&(E+=">"),c[f]=E}if(e.replaceSelections(c),r=e.listSelections(),!l)for(var f=0;f<r.length;f++)(f==r.length-1||r[f].head.line<r[f+1].head.line)&&e.indentLine(r[f].head.line)}function m(e){return e.getOption("disableInput")?N.Pass:v(e,!0)}N.commands.closeTag=function(e){return v(e)};function C(e,h){if(e.indexOf)return e.indexOf(h);for(var r=0,c=e.length;r<c;++r)if(e[r]==h)return r;return-1}function _(e,h,r,c,i){if(!N.scanForClosingTag)return!1;var n=Math.min(e.lastLine()+1,c.line+500),l=N.scanForClosingTag(e,c,null,n);if(!l||l.tag!=r)return!1;for(var f=i?1:0,d=h.length-1;d>=0&&h[d]==r;d--)++f;c=l.to;for(var d=1;d<f;d++){var u=N.scanForClosingTag(e,c,null,n);if(!u||u.tag!=r)return!1;c=u.to}return!0}})},BjJ7:function(H,Z,I){"use strict";I.d(Z,"d",function(){return g}),I.d(Z,"c",function(){return S}),I.d(Z,"e",function(){return k}),I.d(Z,"b",function(){return v}),I.d(Z,"a",function(){return C});var N=I("m3rI");function g(_){var e=!0;if(_.length>0){for(var h=0;h<_.length;h++)if(_[h].compile_success==0||!_[h].compile_success){e=!1;break}}else e=!1;return e}function S(_){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",h=[],r=0;r<_.length;r++){var c=_[r],i=e?"".concat(e,"/").concat(c.name):"".concat(c.name);h.push({title:c.name,isLeaf:!(c.type==="tree"),key:i})}return h}function k(_,e,h){for(var r=0;r<_.length;r++){var c=_[r];if(c.key===e){c.children=h;break}c.children&&k(c.children,e,h)}return _}function v(_,e,h){var r;return function(){var c=this,i=arguments,n=function(){r=null,h||_.apply(c,i)},l=h&&!r;clearTimeout(r),r=setTimeout(n,e),l&&_.apply(c,i)}}var m=!0,C=N.a.API_SERVER},Bvq2:function(H,Z,I){H.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(H,Z,I){},"C/vA":function(H,Z,I){"use strict";I.d(Z,"a",function(){return N});function N(g){const S=this;let k=!1,v;return function(){return k||(k=!0,v=g.apply(S,arguments)),v}}},"Cg/j":function(H,Z,I){"use strict";I.d(Z,"b",function(){return N}),I.d(Z,"a",function(){return g}),I.d(Z,"c",function(){return k}),I.d(Z,"d",function(){return v});var N;(function(m){m.serviceIds=new Map,m.DI_TARGET="$di$target",m.DI_DEPENDENCIES="$di$dependencies";function C(_){return _[m.DI_DEPENDENCIES]||[]}m.getServiceDependencies=C})(N||(N={}));const g=k("instantiationService");function S(m,C,_,e){C[N.DI_TARGET]===C?C[N.DI_DEPENDENCIES].push({id:m,index:_,optional:e}):(C[N.DI_DEPENDENCIES]=[{id:m,index:_,optional:e}],C[N.DI_TARGET]=C)}function k(m){if(N.serviceIds.has(m))return N.serviceIds.get(m);const C=function(_,e,h){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");S(C,_,h,!1)};return C.toString=()=>m,N.serviceIds.set(m,C),C}function v(m){return function(C,_,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");S(m,C,e,!0)}}},CrYA:function(H,Z,I){var N=I("MFOe"),g=N.Global;H.exports={name:"sessionStorage",read:k,write:v,each:m,remove:C,clearAll:_};function S(){return g.sessionStorage}function k(e){return S().getItem(e)}function v(e,h){return S().setItem(e,h)}function m(e){for(var h=S().length-1;h>=0;h--){var r=S().key(h);e(k(r),r)}}function C(e){return S().removeItem(e)}function _(){return S().clear()}},DlQD:function(H,Z,I){(function(N,g){H.exports=g()})(this,function(){"use strict";function N(he,me){for(var Ce=0;Ce<me.length;Ce++){var ge=me[Ce];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(he,ge.key,ge)}}function g(he,me,Ce){return me&&N(he.prototype,me),Ce&&N(he,Ce),he}function S(he,me){if(!he)return;if(typeof he=="string")return k(he,me);var Ce=Object.prototype.toString.call(he).slice(8,-1);if(Ce==="Object"&&he.constructor&&(Ce=he.constructor.name),Ce==="Map"||Ce==="Set")return Array.from(he);if(Ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ce))return k(he,me)}function k(he,me){(me==null||me>he.length)&&(me=he.length);for(var Ce=0,ge=new Array(me);Ce<me;Ce++)ge[Ce]=he[Ce];return ge}function v(he,me){var Ce;if(typeof Symbol=="undefined"||he[Symbol.iterator]==null){if(Array.isArray(he)||(Ce=S(he))||me&&he&&typeof he.length=="number"){Ce&&(he=Ce);var ge=0;return function(){return ge>=he.length?{done:!0}:{done:!1,value:he[ge++]}}}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 Ce=he[Symbol.iterator](),Ce.next.bind(Ce)}function m(he,me){return me={exports:{}},he(me,me.exports),me.exports}var C=m(function(he){function me(){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 Ce(ge){he.exports.defaults=ge}he.exports={defaults:me(),getDefaults:me,changeDefaults:Ce}}),_=C.defaults,e=C.getDefaults,h=C.changeDefaults,r=/[&<>"']/,c=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,n=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},f=function(me){return l[me]};function d(he,me){if(me){if(r.test(he))return he.replace(c,f)}else if(i.test(he))return he.replace(n,f);return he}var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function o(he){return he.replace(u,function(me,Ce){return Ce=Ce.toLowerCase(),Ce==="colon"?":":Ce.charAt(0)==="#"?Ce.charAt(1)==="x"?String.fromCharCode(parseInt(Ce.substring(2),16)):String.fromCharCode(+Ce.substring(1)):""})}var s=/(^|[^\[])\^/g;function E(he,me){he=he.source||he,me=me||"";var Ce={replace:function(Ee,Ae){return Ae=Ae.source||Ae,Ae=Ae.replace(s,"$1"),he=he.replace(Ee,Ae),Ce},getRegex:function(){return new RegExp(he,me)}};return Ce}var b=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(he,me,Ce){if(he){var ge;try{ge=decodeURIComponent(o(Ce)).replace(b,"").toLowerCase()}catch(Ee){return null}if(ge.indexOf("javascript:")===0||ge.indexOf("vbscript:")===0||ge.indexOf("data:")===0)return null}me&&!p.test(Ce)&&(Ce=T(me,Ce));try{Ce=encodeURI(Ce).replace(/%25/g,"%")}catch(Ee){return null}return Ce}var R={},y=/^[^:]+:\/*[^/]*$/,x=/^([^:]+:)[\s\S]*$/,w=/^([^:]+:\/*[^/]*)[\s\S]*$/;function T(he,me){R[" "+he]||(y.test(he)?R[" "+he]=he+"/":R[" "+he]=X(he,"/",!0)),he=R[" "+he];var Ce=he.indexOf(":")===-1;return me.substring(0,2)==="//"?Ce?me:he.replace(x,"$1")+me:me.charAt(0)==="/"?Ce?me:he.replace(w,"$1")+me:he+me}var F={exec:function(){}};function P(he){for(var me=1,Ce,ge;me<arguments.length;me++){Ce=arguments[me];for(ge in Ce)Object.prototype.hasOwnProperty.call(Ce,ge)&&(he[ge]=Ce[ge])}return he}function A(he,me){var Ce=he.replace(/\|/g,function(Ae,De,Me){for(var He=!1,nt=De;--nt>=0&&Me[nt]==="\\";)He=!He;return He?"|":" |"}),ge=Ce.split(/ \|/),Ee=0;if(ge.length>me)ge.splice(me);else for(;ge.length<me;)ge.push("");for(;Ee<ge.length;Ee++)ge[Ee]=ge[Ee].trim().replace(/\\\|/g,"|");return ge}function X(he,me,Ce){var ge=he.length;if(ge===0)return"";for(var Ee=0;Ee<ge;){var Ae=he.charAt(ge-Ee-1);if(Ae===me&&!Ce)Ee++;else if(Ae!==me&&Ce)Ee++;else break}return he.substr(0,ge-Ee)}function z(he,me){if(he.indexOf(me[1])===-1)return-1;for(var Ce=he.length,ge=0,Ee=0;Ee<Ce;Ee++)if(he[Ee]==="\\")Ee++;else if(he[Ee]===me[0])ge++;else if(he[Ee]===me[1]&&(ge--,ge<0))return Ee;return-1}function O(he){he&&he.sanitize&&!he.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 B={escape:d,unescape:o,edit:E,cleanUrl:D,resolveUrl:T,noopTest:F,merge:P,splitCells:A,rtrim:X,findClosingBracket:z,checkSanitizeDeprecation:O},U=C.defaults,L=B.rtrim,G=B.splitCells,ee=B.escape,oe=B.findClosingBracket;function ae(he,me,Ce){var ge=me.href,Ee=me.title?ee(me.title):null,Ae=he[1].replace(/\\([\[\]])/g,"$1");return he[0].charAt(0)!=="!"?{type:"link",raw:Ce,href:ge,title:Ee,text:Ae}:{type:"image",raw:Ce,href:ge,title:Ee,text:ee(Ae)}}function be(he,me){var Ce=he.match(/^(\s+)(?:```)/);if(Ce===null)return me;var ge=Ce[1];return me.split(`
|
|
|
`).map(function(Ee){var Ae=Ee.match(/^\s+/);if(Ae===null)return Ee;var De=Ae[0];return De.length>=ge.length?Ee.slice(ge.length):Ee}).join(`
|
|
|
`)}var _e=function(){function he(Ce){this.options=Ce||U}var me=he.prototype;return me.space=function(ge){var Ee=this.rules.block.newline.exec(ge);if(Ee)return Ee[0].length>1?{type:"space",raw:Ee[0]}:{raw:`
|
|
|
`}},me.code=function(ge,Ee){var Ae=this.rules.block.code.exec(ge);if(Ae){var De=Ee[Ee.length-1];if(De&&De.type==="paragraph")return{raw:Ae[0],text:Ae[0].trimRight()};var Me=Ae[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ae[0],codeBlockStyle:"indented",text:this.options.pedantic?Me:L(Me,`
|
|
|
`)}}},me.fences=function(ge){var Ee=this.rules.block.fences.exec(ge);if(Ee){var Ae=Ee[0],De=be(Ae,Ee[3]||"");return{type:"code",raw:Ae,lang:Ee[2]?Ee[2].trim():Ee[2],text:De}}},me.heading=function(ge){var Ee=this.rules.block.heading.exec(ge);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[1].length,text:Ee[2]}},me.nptable=function(ge){var Ee=this.rules.block.nptable.exec(ge);if(Ee){var Ae={type:"table",header:G(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:Ee[0]};if(Ae.header.length===Ae.align.length){var De=Ae.align.length,Me;for(Me=0;Me<De;Me++)/^ *-+: *$/.test(Ae.align[Me])?Ae.align[Me]="right":/^ *:-+: *$/.test(Ae.align[Me])?Ae.align[Me]="center":/^ *:-+ *$/.test(Ae.align[Me])?Ae.align[Me]="left":Ae.align[Me]=null;for(De=Ae.cells.length,Me=0;Me<De;Me++)Ae.cells[Me]=G(Ae.cells[Me],Ae.header.length);return Ae}}},me.hr=function(ge){var Ee=this.rules.block.hr.exec(ge);if(Ee)return{type:"hr",raw:Ee[0]}},me.blockquote=function(ge){var Ee=this.rules.block.blockquote.exec(ge);if(Ee){var Ae=Ee[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Ee[0],text:Ae}}},me.list=function(ge){var Ee=this.rules.block.list.exec(ge);if(Ee){for(var Ae=Ee[0],De=Ee[2],Me=De.length>1,He=De[De.length-1]===")",nt={type:"list",raw:Ae,ordered:Me,start:Me?+De.slice(0,-1):"",loose:!1,items:[]},at=Ee[0].match(this.rules.block.item),it=!1,st,Tt,pt,ht,Ft,Lt,Yt,$t=at.length,Mt=0;Mt<$t;Mt++)st=at[Mt],Ae=st,Tt=st.length,st=st.replace(/^ *([*+-]|\d+[.)]) */,""),~st.indexOf(`
|
|
|
`)&&(Tt-=st.length,st=this.options.pedantic?st.replace(/^ {1,4}/gm,""):st.replace(new RegExp("^ {1,"+Tt+"}","gm"),"")),Mt!==$t-1&&(pt=this.rules.block.bullet.exec(at[Mt+1])[0],(Me?pt.length===1||!He&&pt[pt.length-1]===")":pt.length>1||this.options.smartLists&&pt!==De)&&(ht=at.slice(Mt+1).join(`
|
|
|
`),nt.raw=nt.raw.substring(0,nt.raw.length-ht.length),Mt=$t-1)),Ft=it||/\n\n(?!\s*$)/.test(st),Mt!==$t-1&&(it=st.charAt(st.length-1)===`
|
|
|
`,Ft||(Ft=it)),Ft&&(nt.loose=!0),Lt=/^\[[ xX]\] /.test(st),Yt=void 0,Lt&&(Yt=st[1]!==" ",st=st.replace(/^\[[ xX]\] +/,"")),nt.items.push({type:"list_item",raw:Ae,task:Lt,checked:Yt,loose:Ft,text:st});return nt}},me.html=function(ge){var Ee=this.rules.block.html.exec(ge);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]):ee(Ee[0]):Ee[0]}},me.def=function(ge){var Ee=this.rules.block.def.exec(ge);if(Ee){Ee[3]&&(Ee[3]=Ee[3].substring(1,Ee[3].length-1));var Ae=Ee[1].toLowerCase().replace(/\s+/g," ");return{tag:Ae,raw:Ee[0],href:Ee[2],title:Ee[3]}}},me.table=function(ge){var Ee=this.rules.block.table.exec(ge);if(Ee){var Ae={type:"table",header:G(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(Ae.header.length===Ae.align.length){Ae.raw=Ee[0];var De=Ae.align.length,Me;for(Me=0;Me<De;Me++)/^ *-+: *$/.test(Ae.align[Me])?Ae.align[Me]="right":/^ *:-+: *$/.test(Ae.align[Me])?Ae.align[Me]="center":/^ *:-+ *$/.test(Ae.align[Me])?Ae.align[Me]="left":Ae.align[Me]=null;for(De=Ae.cells.length,Me=0;Me<De;Me++)Ae.cells[Me]=G(Ae.cells[Me].replace(/^ *\| *| *\| *$/g,""),Ae.header.length);return Ae}}},me.lheading=function(ge){var Ee=this.rules.block.lheading.exec(ge);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[2].charAt(0)==="="?1:2,text:Ee[1]}},me.paragraph=function(ge){var Ee=this.rules.block.paragraph.exec(ge);if(Ee)return{type:"paragraph",raw:Ee[0],text:Ee[1].charAt(Ee[1].length-1)===`
|
|
|
`?Ee[1].slice(0,-1):Ee[1]}},me.text=function(ge,Ee){var Ae=this.rules.block.text.exec(ge);if(Ae){var De=Ee[Ee.length-1];return De&&De.type==="text"?{raw:Ae[0],text:Ae[0]}:{type:"text",raw:Ae[0],text:Ae[0]}}},me.escape=function(ge){var Ee=this.rules.inline.escape.exec(ge);if(Ee)return{type:"escape",raw:Ee[0],text:ee(Ee[1])}},me.tag=function(ge,Ee,Ae){var De=this.rules.inline.tag.exec(ge);if(De)return!Ee&&/^<a /i.test(De[0])?Ee=!0:Ee&&/^<\/a>/i.test(De[0])&&(Ee=!1),!Ae&&/^<(pre|code|kbd|script)(\s|>)/i.test(De[0])?Ae=!0:Ae&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(De[0])&&(Ae=!1),{type:this.options.sanitize?"text":"html",raw:De[0],inLink:Ee,inRawBlock:Ae,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(De[0]):ee(De[0]):De[0]}},me.link=function(ge){var Ee=this.rules.inline.link.exec(ge);if(Ee){var Ae=oe(Ee[2],"()");if(Ae>-1){var De=Ee[0].indexOf("!")===0?5:4,Me=De+Ee[1].length+Ae;Ee[2]=Ee[2].substring(0,Ae),Ee[0]=Ee[0].substring(0,Me).trim(),Ee[3]=""}var He=Ee[2],nt="";if(this.options.pedantic){var at=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(He);at?(He=at[1],nt=at[3]):nt=""}else nt=Ee[3]?Ee[3].slice(1,-1):"";He=He.trim().replace(/^<([\s\S]*)>$/,"$1");var it=ae(Ee,{href:He&&He.replace(this.rules.inline._escapes,"$1"),title:nt&&nt.replace(this.rules.inline._escapes,"$1")},Ee[0]);return it}},me.reflink=function(ge,Ee){var Ae;if((Ae=this.rules.inline.reflink.exec(ge))||(Ae=this.rules.inline.nolink.exec(ge))){var De=(Ae[2]||Ae[1]).replace(/\s+/g," ");if(De=Ee[De.toLowerCase()],!De||!De.href){var Me=Ae[0].charAt(0);return{type:"text",raw:Me,text:Me}}var He=ae(Ae,De,Ae[0]);return He}},me.strong=function(ge,Ee,Ae){Ae===void 0&&(Ae="");var De=this.rules.inline.strong.start.exec(ge);if(De&&(!De[1]||De[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){Ee=Ee.slice(-1*ge.length);var Me=De[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Me.lastIndex=0;for(var He;(De=Me.exec(Ee))!=null;)if(He=this.rules.inline.strong.middle.exec(Ee.slice(0,De.index+3)),He)return{type:"strong",raw:ge.slice(0,He[0].length),text:ge.slice(2,He[0].length-2)}}},me.em=function(ge,Ee,Ae){Ae===void 0&&(Ae="");var De=this.rules.inline.em.start.exec(ge);if(De&&(!De[1]||De[1]&&(Ae===""||this.rules.inline.punctuation.exec(Ae)))){Ee=Ee.slice(-1*ge.length);var Me=De[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Me.lastIndex=0;for(var He;(De=Me.exec(Ee))!=null;)if(He=this.rules.inline.em.middle.exec(Ee.slice(0,De.index+2)),He)return{type:"em",raw:ge.slice(0,He[0].length),text:ge.slice(1,He[0].length-1)}}},me.codespan=function(ge){var Ee=this.rules.inline.code.exec(ge);if(Ee){var Ae=Ee[2].replace(/\n/g," "),De=/[^ ]/.test(Ae),Me=Ae.startsWith(" ")&&Ae.endsWith(" ");return De&&Me&&(Ae=Ae.substring(1,Ae.length-1)),Ae=ee(Ae,!0),{type:"codespan",raw:Ee[0],text:Ae}}},me.br=function(ge){var Ee=this.rules.inline.br.exec(ge);if(Ee)return{type:"br",raw:Ee[0]}},me.del=function(ge){var Ee=this.rules.inline.del.exec(ge);if(Ee)return{type:"del",raw:Ee[0],text:Ee[1]}},me.autolink=function(ge,Ee){var Ae=this.rules.inline.autolink.exec(ge);if(Ae){var De,Me;return Ae[2]==="@"?(De=ee(this.options.mangle?Ee(Ae[1]):Ae[1]),Me="mailto:"+De):(De=ee(Ae[1]),Me=De),{type:"link",raw:Ae[0],text:De,href:Me,tokens:[{type:"text",raw:De,text:De}]}}},me.url=function(ge,Ee){var Ae;if(Ae=this.rules.inline.url.exec(ge)){var De,Me;if(Ae[2]==="@")De=ee(this.options.mangle?Ee(Ae[0]):Ae[0]),Me="mailto:"+De;else{var He;do He=Ae[0],Ae[0]=this.rules.inline._backpedal.exec(Ae[0])[0];while(He!==Ae[0]);De=ee(Ae[0]),Ae[1]==="www."?Me="http://"+De:Me=De}return{type:"link",raw:Ae[0],text:De,href:Me,tokens:[{type:"text",raw:De,text:De}]}}},me.inlineText=function(ge,Ee,Ae){var De=this.rules.inline.text.exec(ge);if(De){var Me;return Ee?Me=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(De[0]):ee(De[0]):De[0]:Me=ee(this.options.smartypants?Ae(De[0]):De[0]),{type:"text",raw:De[0],text:Me}}},he}(),fe=B.noopTest,Re=B.edit,Oe=B.merge,de={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:fe,table:fe,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};de._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,de._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,de.def=Re(de.def).replace("label",de._label).replace("title",de._title).getRegex(),de.bullet=/(?:[*+-]|\d{1,9}[.)])/,de.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,de.item=Re(de.item,"gm").replace(/bull/g,de.bullet).getRegex(),de.list=Re(de.list).replace(/bull/g,de.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+de.def.source+")").getRegex(),de._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",de._comment=/<!--(?!-?>)[\s\S]*?-->/,de.html=Re(de.html,"i").replace("comment",de._comment).replace("tag",de._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),de.paragraph=Re(de._paragraph).replace("hr",de.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",de._tag).getRegex(),de.blockquote=Re(de.blockquote).replace("paragraph",de.paragraph).getRegex(),de.normal=Oe({},de),de.gfm=Oe({},de.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*|$)"}),de.gfm.nptable=Re(de.gfm.nptable).replace("hr",de.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",de._tag).getRegex(),de.gfm.table=Re(de.gfm.table).replace("hr",de.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",de._tag).getRegex(),de.pedantic=Oe({},de.normal,{html:Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",de._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:fe,paragraph:Re(de.normal._paragraph).replace("hr",de.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",de.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var te={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:fe,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:fe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};te._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",te.punctuation=Re(te.punctuation).replace(/punctuation/g,te._punctuation).getRegex(),te._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",te._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",te.em.start=Re(te.em.start).replace(/punctuation/g,te._punctuation).getRegex(),te.em.middle=Re(te.em.middle).replace(/punctuation/g,te._punctuation).replace(/overlapSkip/g,te._overlapSkip).getRegex(),te.em.endAst=Re(te.em.endAst,"g").replace(/punctuation/g,te._punctuation).getRegex(),te.em.endUnd=Re(te.em.endUnd,"g").replace(/punctuation/g,te._punctuation).getRegex(),te.strong.start=Re(te.strong.start).replace(/punctuation/g,te._punctuation).getRegex(),te.strong.middle=Re(te.strong.middle).replace(/punctuation/g,te._punctuation).replace(/blockSkip/g,te._blockSkip).getRegex(),te.strong.endAst=Re(te.strong.endAst,"g").replace(/punctuation/g,te._punctuation).getRegex(),te.strong.endUnd=Re(te.strong.endUnd,"g").replace(/punctuation/g,te._punctuation).getRegex(),te.blockSkip=Re(te._blockSkip,"g").getRegex(),te.overlapSkip=Re(te._overlapSkip,"g").getRegex(),te._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,te._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,te._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])?)+(?![-_])/,te.autolink=Re(te.autolink).replace("scheme",te._scheme).replace("email",te._email).getRegex(),te._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,te.tag=Re(te.tag).replace("comment",de._comment).replace("attribute",te._attribute).getRegex(),te._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,te._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,te._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,te.link=Re(te.link).replace("label",te._label).replace("href",te._href).replace("title",te._title).getRegex(),te.reflink=Re(te.reflink).replace("label",te._label).getRegex(),te.reflinkSearch=Re(te.reflinkSearch,"g").replace("reflink",te.reflink).replace("nolink",te.nolink).getRegex(),te.normal=Oe({},te),te.pedantic=Oe({},te.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Re(/^!?\[(label)\]\((.*?)\)/).replace("label",te._label).getRegex(),reflink:Re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",te._label).getRegex()}),te.gfm=Oe({},te.normal,{escape:Re(te.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),te.gfm.url=Re(te.gfm.url,"i").replace("email",te.gfm._extended_email).getRegex(),te.breaks=Oe({},te.gfm,{br:Re(te.br).replace("{2,}","*").getRegex(),text:Re(te.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var W={block:de,inline:te},Y=C.defaults,V=W.block,Q=W.inline;function q(he){return he.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 ie(he){var me="",Ce,ge,Ee=he.length;for(Ce=0;Ce<Ee;Ce++)ge=he.charCodeAt(Ce),Math.random()>.5&&(ge="x"+ge.toString(16)),me+="&#"+ge+";";return me}var ne=function(){function he(Ce){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ce||Y,this.options.tokenizer=this.options.tokenizer||new _e,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ge={block:V.normal,inline:Q.normal};this.options.pedantic?(ge.block=V.pedantic,ge.inline=Q.pedantic):this.options.gfm&&(ge.block=V.gfm,this.options.breaks?ge.inline=Q.breaks:ge.inline=Q.gfm),this.tokenizer.rules=ge}he.lex=function(ge,Ee){var Ae=new he(Ee);return Ae.lex(ge)};var me=he.prototype;return me.lex=function(ge){return ge=ge.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(ge,this.tokens,!0),this.inline(this.tokens),this.tokens},me.blockTokens=function(ge,Ee,Ae){Ee===void 0&&(Ee=[]),Ae===void 0&&(Ae=!0),ge=ge.replace(/^ +$/gm,"");for(var De,Me,He,nt;ge;){if(De=this.tokenizer.space(ge)){ge=ge.substring(De.raw.length),De.type&&Ee.push(De);continue}if(De=this.tokenizer.code(ge,Ee)){ge=ge.substring(De.raw.length),De.type?Ee.push(De):(nt=Ee[Ee.length-1],nt.raw+=`
|
|
|
`+De.raw,nt.text+=`
|
|
|
`+De.text);continue}if(De=this.tokenizer.fences(ge)){ge=ge.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.heading(ge)){ge=ge.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.nptable(ge)){ge=ge.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.hr(ge)){ge=ge.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.blockquote(ge)){ge=ge.substring(De.raw.length),De.tokens=this.blockTokens(De.text,[],Ae),Ee.push(De);continue}if(De=this.tokenizer.list(ge)){for(ge=ge.substring(De.raw.length),He=De.items.length,Me=0;Me<He;Me++)De.items[Me].tokens=this.blockTokens(De.items[Me].text,[],!1);Ee.push(De);continue}if(De=this.tokenizer.html(ge)){ge=ge.substring(De.raw.length),Ee.push(De);continue}if(Ae&&(De=this.tokenizer.def(ge))){ge=ge.substring(De.raw.length),this.tokens.links[De.tag]||(this.tokens.links[De.tag]={href:De.href,title:De.title});continue}if(De=this.tokenizer.table(ge)){ge=ge.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.lheading(ge)){ge=ge.substring(De.raw.length),Ee.push(De);continue}if(Ae&&(De=this.tokenizer.paragraph(ge))){ge=ge.substring(De.raw.length),Ee.push(De);continue}if(De=this.tokenizer.text(ge,Ee)){ge=ge.substring(De.raw.length),De.type?Ee.push(De):(nt=Ee[Ee.length-1],nt.raw+=`
|
|
|
`+De.raw,nt.text+=`
|
|
|
`+De.text);continue}if(ge){var at="Infinite loop on byte: "+ge.charCodeAt(0);if(this.options.silent){console.error(at);break}else throw new Error(at)}}return Ee},me.inline=function(ge){var Ee,Ae,De,Me,He,nt,at=ge.length;for(Ee=0;Ee<at;Ee++){nt=ge[Ee];switch(nt.type){case"paragraph":case"text":case"heading":{nt.tokens=[],this.inlineTokens(nt.text,nt.tokens);break}case"table":{for(nt.tokens={header:[],cells:[]},Me=nt.header.length,Ae=0;Ae<Me;Ae++)nt.tokens.header[Ae]=[],this.inlineTokens(nt.header[Ae],nt.tokens.header[Ae]);for(Me=nt.cells.length,Ae=0;Ae<Me;Ae++)for(He=nt.cells[Ae],nt.tokens.cells[Ae]=[],De=0;De<He.length;De++)nt.tokens.cells[Ae][De]=[],this.inlineTokens(He[De],nt.tokens.cells[Ae][De]);break}case"blockquote":{this.inline(nt.tokens);break}case"list":{for(Me=nt.items.length,Ae=0;Ae<Me;Ae++)this.inline(nt.items[Ae].tokens);break}}}return ge},me.inlineTokens=function(ge,Ee,Ae,De,Me){Ee===void 0&&(Ee=[]),Ae===void 0&&(Ae=!1),De===void 0&&(De=!1),Me===void 0&&(Me="");var He,nt=ge,at;if(this.tokens.links){var it=Object.keys(this.tokens.links);if(it.length>0)for(;(at=this.tokenizer.rules.inline.reflinkSearch.exec(nt))!=null;)it.includes(at[0].slice(at[0].lastIndexOf("[")+1,-1))&&(nt=nt.slice(0,at.index)+"["+"a".repeat(at[0].length-2)+"]"+nt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(at=this.tokenizer.rules.inline.blockSkip.exec(nt))!=null;)nt=nt.slice(0,at.index)+"["+"a".repeat(at[0].length-2)+"]"+nt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ge;){if(He=this.tokenizer.escape(ge)){ge=ge.substring(He.raw.length),Ee.push(He);continue}if(He=this.tokenizer.tag(ge,Ae,De)){ge=ge.substring(He.raw.length),Ae=He.inLink,De=He.inRawBlock,Ee.push(He);continue}if(He=this.tokenizer.link(ge)){ge=ge.substring(He.raw.length),He.type==="link"&&(He.tokens=this.inlineTokens(He.text,[],!0,De)),Ee.push(He);continue}if(He=this.tokenizer.reflink(ge,this.tokens.links)){ge=ge.substring(He.raw.length),He.type==="link"&&(He.tokens=this.inlineTokens(He.text,[],!0,De)),Ee.push(He);continue}if(He=this.tokenizer.strong(ge,nt,Me)){ge=ge.substring(He.raw.length),He.tokens=this.inlineTokens(He.text,[],Ae,De),Ee.push(He);continue}if(He=this.tokenizer.em(ge,nt,Me)){ge=ge.substring(He.raw.length),He.tokens=this.inlineTokens(He.text,[],Ae,De),Ee.push(He);continue}if(He=this.tokenizer.codespan(ge)){ge=ge.substring(He.raw.length),Ee.push(He);continue}if(He=this.tokenizer.br(ge)){ge=ge.substring(He.raw.length),Ee.push(He);continue}if(He=this.tokenizer.del(ge)){ge=ge.substring(He.raw.length),He.tokens=this.inlineTokens(He.text,[],Ae,De),Ee.push(He);continue}if(He=this.tokenizer.autolink(ge,ie)){ge=ge.substring(He.raw.length),Ee.push(He);continue}if(!Ae&&(He=this.tokenizer.url(ge,ie))){ge=ge.substring(He.raw.length),Ee.push(He);continue}if(He=this.tokenizer.inlineText(ge,De,q)){ge=ge.substring(He.raw.length),Me=He.raw.slice(-1),Ee.push(He);continue}if(ge){var st="Infinite loop on byte: "+ge.charCodeAt(0);if(this.options.silent){console.error(st);break}else throw new Error(st)}}return Ee},g(he,null,[{key:"rules",get:function(){return{block:V,inline:Q}}}]),he}(),J=C.defaults,$=B.cleanUrl,le=B.escape,ce=function(){function he(Ce){this.options=Ce||J}var me=he.prototype;return me.code=function(ge,Ee,Ae){var De=(Ee||"").match(/\S*/)[0];if(this.options.highlight){var Me=this.options.highlight(ge,De);Me!=null&&Me!==ge&&(Ae=!0,ge=Me)}return De?'<pre><code class="'+this.options.langPrefix+le(De,!0)+'">'+(Ae?ge:le(ge,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(Ae?ge:le(ge,!0))+`</code></pre>
|
|
|
`},me.blockquote=function(ge){return`<blockquote>
|
|
|
`+ge+`</blockquote>
|
|
|
`},me.html=function(ge){return ge},me.heading=function(ge,Ee,Ae,De){return this.options.headerIds?"<h"+Ee+' id="'+this.options.headerPrefix+De.slug(Ae)+'">'+ge+"</h"+Ee+`>
|
|
|
`:"<h"+Ee+">"+ge+"</h"+Ee+`>
|
|
|
`},me.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},me.list=function(ge,Ee,Ae){var De=Ee?"ol":"ul",Me=Ee&&Ae!==1?' start="'+Ae+'"':"";return"<"+De+Me+`>
|
|
|
`+ge+"</"+De+`>
|
|
|
`},me.listitem=function(ge){return"<li>"+ge+`</li>
|
|
|
`},me.checkbox=function(ge){return"<input "+(ge?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},me.paragraph=function(ge){return"<p>"+ge+`</p>
|
|
|
`},me.table=function(ge,Ee){return Ee&&(Ee="<tbody>"+Ee+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+ge+`</thead>
|
|
|
`+Ee+`</table>
|
|
|
`},me.tablerow=function(ge){return`<tr>
|
|
|
`+ge+`</tr>
|
|
|
`},me.tablecell=function(ge,Ee){var Ae=Ee.header?"th":"td",De=Ee.align?"<"+Ae+' align="'+Ee.align+'">':"<"+Ae+">";return De+ge+"</"+Ae+`>
|
|
|
`},me.strong=function(ge){return"<strong>"+ge+"</strong>"},me.em=function(ge){return"<em>"+ge+"</em>"},me.codespan=function(ge){return"<code>"+ge+"</code>"},me.br=function(){return this.options.xhtml?"<br/>":"<br>"},me.del=function(ge){return"<del>"+ge+"</del>"},me.link=function(ge,Ee,Ae){if(ge=$(this.options.sanitize,this.options.baseUrl,ge),ge===null)return Ae;var De='<a href="'+le(ge)+'"';return Ee&&(De+=' title="'+Ee+'"'),De+=">"+Ae+"</a>",De},me.image=function(ge,Ee,Ae){if(ge=$(this.options.sanitize,this.options.baseUrl,ge),ge===null)return Ae;var De='<img src="'+ge+'" alt="'+Ae+'"';return Ee&&(De+=' title="'+Ee+'"'),De+=this.options.xhtml?"/>":">",De},me.text=function(ge){return ge},he}(),we=function(){function he(){}var me=he.prototype;return me.strong=function(ge){return ge},me.em=function(ge){return ge},me.codespan=function(ge){return ge},me.del=function(ge){return ge},me.html=function(ge){return ge},me.text=function(ge){return ge},me.link=function(ge,Ee,Ae){return""+Ae},me.image=function(ge,Ee,Ae){return""+Ae},me.br=function(){return""},he}(),Fe=function(){function he(){this.seen={}}var me=he.prototype;return me.slug=function(ge){var Ee=ge.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Ee)){var Ae=Ee;do this.seen[Ae]++,Ee=Ae+"-"+this.seen[Ae];while(this.seen.hasOwnProperty(Ee))}return this.seen[Ee]=0,Ee},he}(),Xe=C.defaults,$e=B.unescape,Ye=function(){function he(Ce){this.options=Ce||Xe,this.options.renderer=this.options.renderer||new ce,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new we,this.slugger=new Fe}he.parse=function(ge,Ee){var Ae=new he(Ee);return Ae.parse(ge)};var me=he.prototype;return me.parse=function(ge,Ee){Ee===void 0&&(Ee=!0);var Ae="",De,Me,He,nt,at,it,st,Tt,pt,ht,Ft,Lt,Yt,$t,Mt,wt,Jt,Dt,St=ge.length;for(De=0;De<St;De++){ht=ge[De];switch(ht.type){case"space":continue;case"hr":{Ae+=this.renderer.hr();continue}case"heading":{Ae+=this.renderer.heading(this.parseInline(ht.tokens),ht.depth,$e(this.parseInline(ht.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ae+=this.renderer.code(ht.text,ht.lang,ht.escaped);continue}case"table":{for(Tt="",st="",nt=ht.header.length,Me=0;Me<nt;Me++)st+=this.renderer.tablecell(this.parseInline(ht.tokens.header[Me]),{header:!0,align:ht.align[Me]});for(Tt+=this.renderer.tablerow(st),pt="",nt=ht.cells.length,Me=0;Me<nt;Me++){for(it=ht.tokens.cells[Me],st="",at=it.length,He=0;He<at;He++)st+=this.renderer.tablecell(this.parseInline(it[He]),{header:!1,align:ht.align[He]});pt+=this.renderer.tablerow(st)}Ae+=this.renderer.table(Tt,pt);continue}case"blockquote":{pt=this.parse(ht.tokens),Ae+=this.renderer.blockquote(pt);continue}case"list":{for(Ft=ht.ordered,Lt=ht.start,Yt=ht.loose,nt=ht.items.length,pt="",Me=0;Me<nt;Me++)Mt=ht.items[Me],wt=Mt.checked,Jt=Mt.task,$t="",Mt.task&&(Dt=this.renderer.checkbox(wt),Yt?Mt.tokens.length>0&&Mt.tokens[0].type==="text"?(Mt.tokens[0].text=Dt+" "+Mt.tokens[0].text,Mt.tokens[0].tokens&&Mt.tokens[0].tokens.length>0&&Mt.tokens[0].tokens[0].type==="text"&&(Mt.tokens[0].tokens[0].text=Dt+" "+Mt.tokens[0].tokens[0].text)):Mt.tokens.unshift({type:"text",text:Dt}):$t+=Dt),$t+=this.parse(Mt.tokens,Yt),pt+=this.renderer.listitem($t,Jt,wt);Ae+=this.renderer.list(pt,Ft,Lt);continue}case"html":{Ae+=this.renderer.html(ht.text);continue}case"paragraph":{Ae+=this.renderer.paragraph(this.parseInline(ht.tokens));continue}case"text":{for(pt=ht.tokens?this.parseInline(ht.tokens):ht.text;De+1<St&&ge[De+1].type==="text";)ht=ge[++De],pt+=`
|
|
|
`+(ht.tokens?this.parseInline(ht.tokens):ht.text);Ae+=Ee?this.renderer.paragraph(pt):pt;continue}default:{var _t='Token with "'+ht.type+'" type was not found.';if(this.options.silent){console.error(_t);return}else throw new Error(_t)}}}return Ae},me.parseInline=function(ge,Ee){Ee=Ee||this.renderer;var Ae="",De,Me,He=ge.length;for(De=0;De<He;De++){Me=ge[De];switch(Me.type){case"escape":{Ae+=Ee.text(Me.text);break}case"html":{Ae+=Ee.html(Me.text);break}case"link":{Ae+=Ee.link(Me.href,Me.title,this.parseInline(Me.tokens,Ee));break}case"image":{Ae+=Ee.image(Me.href,Me.title,Me.text);break}case"strong":{Ae+=Ee.strong(this.parseInline(Me.tokens,Ee));break}case"em":{Ae+=Ee.em(this.parseInline(Me.tokens,Ee));break}case"codespan":{Ae+=Ee.codespan(Me.text);break}case"br":{Ae+=Ee.br();break}case"del":{Ae+=Ee.del(this.parseInline(Me.tokens,Ee));break}case"text":{Ae+=Ee.text(Me.text);break}default:{var nt='Token with "'+Me.type+'" type was not found.';if(this.options.silent){console.error(nt);return}else throw new Error(nt)}}}return Ae},he}(),Ze=B.merge,qe=B.checkSanitizeDeprecation,Pe=B.escape,Ie=C.getDefaults,Je=C.changeDefaults,rt=C.defaults;function ye(he,me,Ce){if(typeof he=="undefined"||he===null)throw new Error("marked(): input parameter is undefined or null");if(typeof he!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(he)+", string expected");if(typeof me=="function"&&(Ce=me,me=null),me=Ze({},ye.defaults,me||{}),qe(me),Ce){var ge=me.highlight,Ee;try{Ee=ne.lex(he,me)}catch(He){return Ce(He)}var Ae=function(nt){var at;if(!nt)try{at=Ye.parse(Ee,me)}catch(it){nt=it}return me.highlight=ge,nt?Ce(nt):Ce(null,at)};if(!ge||ge.length<3)return Ae();if(delete me.highlight,!Ee.length)return Ae();var De=0;ye.walkTokens(Ee,function(He){He.type==="code"&&(De++,setTimeout(function(){ge(He.text,He.lang,function(nt,at){if(nt)return Ae(nt);at!=null&&at!==He.text&&(He.text=at,He.escaped=!0),De--,De===0&&Ae()})},0))}),De===0&&Ae();return}try{var Me=ne.lex(he,me);return me.walkTokens&&ye.walkTokens(Me,me.walkTokens),Ye.parse(Me,me)}catch(He){if(He.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,me.silent)return"<p>An error occurred:</p><pre>"+Pe(He.message+"",!0)+"</pre>";throw He}}ye.options=ye.setOptions=function(he){return Ze(ye.defaults,he),Je(ye.defaults),ye},ye.getDefaults=Ie,ye.defaults=rt,ye.use=function(he){var me=Ze({},he);if(he.renderer&&function(){var ge=ye.defaults.renderer||new ce,Ee=function(Me){var He=ge[Me];ge[Me]=function(){for(var nt=arguments.length,at=new Array(nt),it=0;it<nt;it++)at[it]=arguments[it];var st=he.renderer[Me].apply(ge,at);return st===!1&&(st=He.apply(ge,at)),st}};for(var Ae in he.renderer)Ee(Ae);me.renderer=ge}(),he.tokenizer&&function(){var ge=ye.defaults.tokenizer||new _e,Ee=function(Me){var He=ge[Me];ge[Me]=function(){for(var nt=arguments.length,at=new Array(nt),it=0;it<nt;it++)at[it]=arguments[it];var st=he.tokenizer[Me].apply(ge,at);return st===!1&&(st=He.apply(ge,at)),st}};for(var Ae in he.tokenizer)Ee(Ae);me.tokenizer=ge}(),he.walkTokens){var Ce=ye.defaults.walkTokens;me.walkTokens=function(ge){he.walkTokens(ge),Ce&&Ce(ge)}}ye.setOptions(me)},ye.walkTokens=function(he,me){for(var Ce=v(he),ge;!(ge=Ce()).done;){var Ee=ge.value;me(Ee);switch(Ee.type){case"table":{for(var Ae=v(Ee.tokens.header),De;!(De=Ae()).done;){var Me=De.value;ye.walkTokens(Me,me)}for(var He=v(Ee.tokens.cells),nt;!(nt=He()).done;)for(var at=nt.value,it=v(at),st;!(st=it()).done;){var Tt=st.value;ye.walkTokens(Tt,me)}break}case"list":{ye.walkTokens(Ee.items,me);break}default:Ee.tokens&&ye.walkTokens(Ee.tokens,me)}}},ye.Parser=Ye,ye.parser=Ye.parse,ye.Renderer=ce,ye.TextRenderer=we,ye.Lexer=ne,ye.lexer=ne.lex,ye.Tokenizer=_e,ye.Slugger=Fe,ye.parse=ye;var ue=ye;return ue})},"DlR+":function(H,Z,I){var N=I("MFOe"),g=N.Global,S=N.trim;H.exports={name:"cookieStorage",read:v,write:C,each:m,remove:_,clearAll:e};var k=g.document;function v(r){if(!r||!h(r))return null;var c="(?:^|.*;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(k.cookie.replace(new RegExp(c),"$1"))}function m(r){for(var c=k.cookie.split(/; ?/g),i=c.length-1;i>=0;i--){if(!S(c[i]))continue;var n=c[i].split("="),l=unescape(n[0]),f=unescape(n[1]);r(f,l)}}function C(r,c){if(!r)return;k.cookie=escape(r)+"="+escape(c)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function _(r){if(!r||!h(r))return;k.cookie=escape(r)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function e(){m(function(r,c){_(c)})}function h(r){return new RegExp("(?:^|;\\s*)"+escape(r).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(k.cookie)}},E4JC:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("ETIr"),I("cv67"),I("K3mO"),I("OLod"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.StreamCipher,v=g.algo,m=[],C=[],_=[],e=v.Rabbit=k.extend({_doReset:function(){for(var r=this._key.words,c=this.cfg.iv,i=0;i<4;i++)r[i]=(r[i]<<8|r[i]>>>24)&16711935|(r[i]<<24|r[i]>>>8)&4278255360;var n=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],l=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 i=0;i<4;i++)h.call(this);for(var i=0;i<8;i++)l[i]^=n[i+4&7];if(c){var f=c.words,d=f[0],u=f[1],o=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,s=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,E=o>>>16|s&4294901760,b=s<<16|o&65535;l[0]^=o,l[1]^=E,l[2]^=s,l[3]^=b,l[4]^=o,l[5]^=E,l[6]^=s,l[7]^=b;for(var i=0;i<4;i++)h.call(this)}},_doProcessBlock:function(r,c){var i=this._X;h.call(this),m[0]=i[0]^i[5]>>>16^i[3]<<16,m[1]=i[2]^i[7]>>>16^i[5]<<16,m[2]=i[4]^i[1]>>>16^i[7]<<16,m[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)m[n]=(m[n]<<8|m[n]>>>24)&16711935|(m[n]<<24|m[n]>>>8)&4278255360,r[c+n]^=m[n]},blockSize:128/32,ivSize:64/32});function h(){for(var r=this._X,c=this._C,i=0;i<8;i++)C[i]=c[i];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0<C[0]>>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0<C[1]>>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0<C[2]>>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0<C[3]>>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0<C[4]>>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0<C[5]>>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0<C[6]>>>0?1:0)|0,this._b=c[7]>>>0<C[7]>>>0?1:0;for(var i=0;i<8;i++){var n=r[i]+c[i],l=n&65535,f=n>>>16,d=((l*l>>>17)+l*f>>>15)+f*f,u=((n&4294901760)*n|0)+((n&65535)*n|0);_[i]=d^u}r[0]=_[0]+(_[7]<<16|_[7]>>>16)+(_[6]<<16|_[6]>>>16)|0,r[1]=_[1]+(_[0]<<8|_[0]>>>24)+_[7]|0,r[2]=_[2]+(_[1]<<16|_[1]>>>16)+(_[0]<<16|_[0]>>>16)|0,r[3]=_[3]+(_[2]<<8|_[2]>>>24)+_[1]|0,r[4]=_[4]+(_[3]<<16|_[3]>>>16)+(_[2]<<16|_[2]>>>16)|0,r[5]=_[5]+(_[4]<<8|_[4]>>>24)+_[3]|0,r[6]=_[6]+(_[5]<<16|_[5]>>>16)+(_[4]<<16|_[4]>>>16)|0,r[7]=_[7]+(_[6]<<8|_[6]>>>24)+_[5]|0}g.Rabbit=k._createHelper(e)}(),N.Rabbit})},ELLl:function(H,Z,I){(function(N){N(I("VrN/"))})(function(N){var g={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},S=N.Pos;N.defineOption("autoCloseBrackets",!1,function(l,f,d){d&&d!=N.Init&&(l.removeKeyMap(v),l.state.closeBrackets=null),f&&(m(k(f,"pairs")),l.state.closeBrackets=f,l.addKeyMap(v))});function k(l,f){return f=="pairs"&&typeof l=="string"?l:typeof l=="object"&&l[f]!=null?l[f]:g[f]}var v={Backspace:e,Enter:h};function m(l){for(var f=0;f<l.length;f++){var d=l.charAt(f),u="'"+d+"'";v[u]||(v[u]=C(d))}}m(g.pairs+"`");function C(l){return function(f){return c(f,l)}}function _(l){var f=l.state.closeBrackets;if(!f||f.override)return f;var d=l.getModeAt(l.getCursor());return d.closeBrackets||f}function e(l){var f=_(l);if(!f||l.getOption("disableInput"))return N.Pass;for(var d=k(f,"pairs"),u=l.listSelections(),o=0;o<u.length;o++){if(!u[o].empty())return N.Pass;var s=i(l,u[o].head);if(!s||d.indexOf(s)%2!=0)return N.Pass}for(var o=u.length-1;o>=0;o--){var E=u[o].head;l.replaceRange("",S(E.line,E.ch-1),S(E.line,E.ch+1),"+delete")}}function h(l){var f=_(l),d=f&&k(f,"explode");if(!d||l.getOption("disableInput"))return N.Pass;for(var u=l.listSelections(),o=0;o<u.length;o++){if(!u[o].empty())return N.Pass;var s=i(l,u[o].head);if(!s||d.indexOf(s)%2!=0)return N.Pass}l.operation(function(){var E=l.lineSeparator()||`
|
|
|
`;l.replaceSelection(E+E,null),l.execCommand("goCharLeft"),u=l.listSelections();for(var b=0;b<u.length;b++){var p=u[b].head.line;l.indentLine(p,null,!0),l.indentLine(p+1,null,!0)}})}function r(l){var f=N.cmpPos(l.anchor,l.head)>0;return{anchor:new S(l.anchor.line,l.anchor.ch+(f?-1:1)),head:new S(l.head.line,l.head.ch+(f?1:-1))}}function c(l,f){var d=_(l);if(!d||l.getOption("disableInput"))return N.Pass;var u=k(d,"pairs"),o=u.indexOf(f);if(o==-1)return N.Pass;for(var s=k(d,"closeBefore"),E=k(d,"triples"),b=u.charAt(o+1)==f,p=l.listSelections(),D=o%2==0,R,y=0;y<p.length;y++){var x=p[y],w=x.head,T,F=l.getRange(w,S(w.line,w.ch+1));if(D&&!x.empty())T="surround";else if((b||!D)&&F==f)b&&n(l,w)?T="both":E.indexOf(f)>=0&&l.getRange(w,S(w.line,w.ch+3))==f+f+f?T="skipThree":T="skip";else if(b&&w.ch>1&&E.indexOf(f)>=0&&l.getRange(S(w.line,w.ch-2),w)==f+f){if(w.ch>2&&/\bstring/.test(l.getTokenTypeAt(S(w.line,w.ch-2))))return N.Pass;T="addFour"}else if(b){var P=w.ch==0?" ":l.getRange(S(w.line,w.ch-1),w);if(!N.isWordChar(F)&&P!=f&&!N.isWordChar(P))T="both";else return N.Pass}else if(D&&(F.length===0||/\s/.test(F)||s.indexOf(F)>-1))T="both";else return N.Pass;if(!R)R=T;else if(R!=T)return N.Pass}var A=o%2?u.charAt(o-1):f,X=o%2?f:u.charAt(o+1);l.operation(function(){if(R=="skip")l.execCommand("goCharRight");else if(R=="skipThree")for(var z=0;z<3;z++)l.execCommand("goCharRight");else if(R=="surround"){for(var O=l.getSelections(),z=0;z<O.length;z++)O[z]=A+O[z]+X;l.replaceSelections(O,"around"),O=l.listSelections().slice();for(var z=0;z<O.length;z++)O[z]=r(O[z]);l.setSelections(O)}else R=="both"?(l.replaceSelection(A+X,null),l.triggerElectric(A+X),l.execCommand("goCharLeft")):R=="addFour"&&(l.replaceSelection(A+A+A+A,"before"),l.execCommand("goCharRight"))})}function i(l,f){var d=l.getRange(S(f.line,f.ch-1),S(f.line,f.ch+1));return d.length==2?d:null}function n(l,f){var d=l.getTokenAt(S(f.line,f.ch+1));return/\bstring/.test(d.type)&&d.start==f.ch&&(f.ch==0||!/\bstring/.test(l.getTokenTypeAt(f)))}})},ELcG:function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){/** @preserve
|
|
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
|
|
|
|
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
|
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
*/return function(g){var S=N,k=S.lib,v=k.WordArray,m=k.Hasher,C=S.algo,_=v.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]),e=v.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]),h=v.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=v.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]),c=v.create([0,1518500249,1859775393,2400959708,2840853838]),i=v.create([1352829926,1548603684,1836072691,2053994217,0]),n=C.RIPEMD160=m.extend({_doReset:function(){this._hash=v.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(E,b){for(var p=0;p<16;p++){var D=b+p,R=E[D];E[D]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360}var y=this._hash.words,x=c.words,w=i.words,T=_.words,F=e.words,P=h.words,A=r.words,X,z,O,B,U,L,G,ee,oe,ae;L=X=y[0],G=z=y[1],ee=O=y[2],oe=B=y[3],ae=U=y[4];for(var be,p=0;p<80;p+=1)be=X+E[b+T[p]]|0,p<16?be+=l(z,O,B)+x[0]:p<32?be+=f(z,O,B)+x[1]:p<48?be+=d(z,O,B)+x[2]:p<64?be+=u(z,O,B)+x[3]:be+=o(z,O,B)+x[4],be=be|0,be=s(be,P[p]),be=be+U|0,X=U,U=B,B=s(O,10),O=z,z=be,be=L+E[b+F[p]]|0,p<16?be+=o(G,ee,oe)+w[0]:p<32?be+=u(G,ee,oe)+w[1]:p<48?be+=d(G,ee,oe)+w[2]:p<64?be+=f(G,ee,oe)+w[3]:be+=l(G,ee,oe)+w[4],be=be|0,be=s(be,A[p]),be=be+ae|0,L=ae,ae=oe,oe=s(ee,10),ee=G,G=be;be=y[1]+O+oe|0,y[1]=y[2]+B+ae|0,y[2]=y[3]+U+L|0,y[3]=y[4]+X+G|0,y[4]=y[0]+z+ee|0,y[0]=be},_doFinalize:function(){var E=this._data,b=E.words,p=this._nDataBytes*8,D=E.sigBytes*8;b[D>>>5]|=128<<24-D%32,b[(D+64>>>9<<4)+14]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,E.sigBytes=(b.length+1)*4,this._process();for(var R=this._hash,y=R.words,x=0;x<5;x++){var w=y[x];y[x]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}return R},clone:function(){var E=m.clone.call(this);return E._hash=this._hash.clone(),E}});function l(E,b,p){return E^b^p}function f(E,b,p){return E&b|~E&p}function d(E,b,p){return(E|~b)^p}function u(E,b,p){return E&p|b&~p}function o(E,b,p){return E^(b|~p)}function s(E,b){return E<<b|E>>>32-b}S.RIPEMD160=m._createHelper(n),S.HmacRIPEMD160=m._createHmacHelper(n)}(Math),N.RIPEMD160})},ETIr:function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,v=g.enc,m=v.Base64={stringify:function(_){var e=_.words,h=_.sigBytes,r=this._map;_.clamp();for(var c=[],i=0;i<h;i+=3)for(var n=e[i>>>2]>>>24-i%4*8&255,l=e[i+1>>>2]>>>24-(i+1)%4*8&255,f=e[i+2>>>2]>>>24-(i+2)%4*8&255,d=n<<16|l<<8|f,u=0;u<4&&i+u*.75<h;u++)c.push(r.charAt(d>>>6*(3-u)&63));var o=r.charAt(64);if(o)for(;c.length%4;)c.push(o);return c.join("")},parse:function(_){var e=_.length,h=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var c=0;c<h.length;c++)r[h.charCodeAt(c)]=c}var i=h.charAt(64);if(i){var n=_.indexOf(i);n!==-1&&(e=n)}return C(_,e,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function C(_,e,h){for(var r=[],c=0,i=0;i<e;i++)if(i%4){var n=h[_.charCodeAt(i-1)]<<i%4*2,l=h[_.charCodeAt(i)]>>>6-i%4*2,f=n|l;r[c>>>2]|=f<<24-c%4*8,c++}return k.create(r,c)}}(),N.enc.Base64})},"F+F2":function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){return function(){if(typeof ArrayBuffer!="function")return;var g=N,S=g.lib,k=S.WordArray,v=k.init,m=k.init=function(C){if(C instanceof ArrayBuffer&&(C=new Uint8Array(C)),(C instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&C instanceof Uint8ClampedArray||C instanceof Int16Array||C instanceof Uint16Array||C instanceof Int32Array||C instanceof Uint32Array||C instanceof Float32Array||C instanceof Float64Array)&&(C=new Uint8Array(C.buffer,C.byteOffset,C.byteLength)),C instanceof Uint8Array){for(var _=C.byteLength,e=[],h=0;h<_;h++)e[h>>>2]|=C[h]<<24-h%4*8;v.call(this,e,_)}else v.apply(this,arguments)};m.prototype=k}(),N.lib.WordArray})},FWmy:function(H,Z,I){"use strict";I.d(Z,"a",function(){return N});function N(g,S){if(!g)throw new Error(S?`Assertion failed (${S})`:"Assertion Failed")}},GRuw:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("lPiR"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,v=g.algo,m=v.SHA256,C=v.SHA224=m.extend({_doReset:function(){this._hash=new k.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var _=m._doFinalize.call(this);return _.sigBytes-=4,_}});g.SHA224=m._createHelper(C),g.HmacSHA224=m._createHmacHelper(C)}(),N.SHA224})},GfqC:function(H,Z,I){"use strict";var N=I("q1tI"),g=I.n(N),S=I("TSYQ"),k=I.n(S);function v(B,U){var L="cannot "+B.method+" "+B.action+" "+U.status+"'",G=new Error(L);return G.status=U.status,G.method=B.method,G.url=B.action,G}function m(B){var U=B.responseText||B.response;if(!U)return U;try{return JSON.parse(U)}catch(L){return U}}function C(B){var U=new XMLHttpRequest;B.onProgress&&U.upload&&(U.upload.onprogress=function(oe){oe.total>0&&(oe.percent=oe.loaded/oe.total*100),B.onProgress(oe)});var L=new FormData;B.data&&Object.keys(B.data).forEach(function(ee){var oe=B.data[ee];if(Array.isArray(oe)){oe.forEach(function(ae){L.append(ee+"[]",ae)});return}L.append(ee,B.data[ee])}),B.file instanceof Blob?L.append(B.filename,B.file,B.file.name):L.append(B.filename,B.file),U.onerror=function(oe){B.onError(oe)},U.onload=function(){return U.status<200||U.status>=300?B.onError(v(B,U),m(U)):B.onSuccess(m(U),U)},U.open(B.method,B.action,!0),B.withCredentials&&"withCredentials"in U&&(U.withCredentials=!0);var G=B.headers||{};return G["X-Requested-With"]!==null&&U.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(G).forEach(function(ee){G[ee]!==null&&U.setRequestHeader(ee,G[ee])}),U.send(L),{abort:function(){U.abort()}}}var _=+new Date,e=0;function h(){return"rc-upload-"+_+"-"+ ++e}function r(B,U){return B.indexOf(U,B.length-U.length)!==-1}var c=function(B,U){if(B&&U){var L=Array.isArray(U)?U:U.split(","),G=B.name||"",ee=B.type||"",oe=ee.replace(/\/.*$/,"");return L.some(function(ae){var be=ae.trim();return be.charAt(0)==="."?r(G.toLowerCase(),be.toLowerCase()):/\/\*$/.test(be)?oe===be.replace(/\/.*$/,""):ee===be})}return!0};function i(B,U){var L=B.createReader(),G=[];function ee(){L.readEntries(function(oe){var ae=Array.prototype.slice.apply(oe);G=G.concat(ae);var be=!ae.length;be?U(G):ee()})}ee()}var n=function(U,L,G){var ee=function oe(ae,be){be=be||"",ae.isFile?ae.file(function(_e){G(_e)&&(ae.fullPath&&!_e.webkitRelativePath&&(Object.defineProperties(_e,{webkitRelativePath:{writable:!0}}),_e.webkitRelativePath=ae.fullPath.replace(/^\//,""),Object.defineProperties(_e,{webkitRelativePath:{writable:!1}})),L([_e]))}):ae.isDirectory&&i(ae,function(_e){_e.forEach(function(fe){oe(fe,""+be+ae.name+"/")})})};U.forEach(function(oe){ee(oe.webkitGetAsEntry())})},l=n,f=Object.assign||function(B){for(var U=1;U<arguments.length;U++){var L=arguments[U];for(var G in L)Object.prototype.hasOwnProperty.call(L,G)&&(B[G]=L[G])}return B},d=function(){function B(U,L){var G=[],ee=!0,oe=!1,ae=void 0;try{for(var be=U[Symbol.iterator](),_e;!(ee=(_e=be.next()).done)&&!(G.push(_e.value),L&&G.length===L);ee=!0);}catch(fe){oe=!0,ae=fe}finally{try{!ee&&be.return&&be.return()}finally{if(oe)throw ae}}return G}return function(U,L){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return B(U,L);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function B(U,L){for(var G=0;G<L.length;G++){var ee=L[G];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(U,ee.key,ee)}}return function(U,L,G){return L&&B(U.prototype,L),G&&B(U,G),U}}();function o(B,U,L){return U in B?Object.defineProperty(B,U,{value:L,enumerable:!0,configurable:!0,writable:!0}):B[U]=L,B}function s(B,U){var L={};for(var G in B){if(U.indexOf(G)>=0)continue;if(!Object.prototype.hasOwnProperty.call(B,G))continue;L[G]=B[G]}return L}function E(B,U){if(!(B instanceof U))throw new TypeError("Cannot call a class as a function")}function b(B,U){if(!B)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:B}function p(B,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);B.prototype=Object.create(U&&U.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(B,U):B.__proto__=U)}var D=function(U){return Object.keys(U).reduce(function(L,G){return(G.substr(0,5)==="data-"||G.substr(0,5)==="aria-"||G==="role")&&(L[G]=U[G]),L},{})},R=function(B){p(U,B);function U(){var L,G,ee,oe;E(this,U);for(var ae=arguments.length,be=Array(ae),_e=0;_e<ae;_e++)be[_e]=arguments[_e];return oe=(G=(ee=b(this,(L=U.__proto__||Object.getPrototypeOf(U)).call.apply(L,[this].concat(be))),ee),ee.state={uid:h()},ee.reqs={},ee.onChange=function(fe){var Re=fe.target.files;ee.uploadFiles(Re),ee.reset()},ee.onClick=function(fe){var Re=ee.fileInput;if(!Re)return;var Oe=ee.props,de=Oe.children,te=Oe.onClick;de&&de.type==="button"&&(Re.parentNode.focus(),Re.parentNode.querySelector("button").blur()),Re.click(),te&&te(fe)},ee.onKeyDown=function(fe){fe.key==="Enter"&&ee.onClick()},ee.onFileDrop=function(fe){var Re=ee.props.multiple;if(fe.preventDefault(),fe.type==="dragover")return;if(ee.props.directory)l(Array.prototype.slice.call(fe.dataTransfer.items),ee.uploadFiles,function(de){return c(de,ee.props.accept)});else{var Oe=Array.prototype.slice.call(fe.dataTransfer.files).filter(function(de){return c(de,ee.props.accept)});Re===!1&&(Oe=Oe.slice(0,1)),ee.uploadFiles(Oe)}},ee.uploadFiles=function(fe){var Re=Array.prototype.slice.call(fe);Re.map(function(Oe){return Oe.uid=h(),Oe}).forEach(function(Oe){ee.upload(Oe,Re)})},ee.saveFileInput=function(fe){ee.fileInput=fe},G),b(ee,oe)}return u(U,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(G,ee){var oe=this,ae=this.props;if(!ae.beforeUpload)return setTimeout(function(){return oe.post(G)},0);var be=ae.beforeUpload(G,ee);be&&be.then?be.then(function(_e){var fe=Object.prototype.toString.call(_e);return fe==="[object File]"||fe==="[object Blob]"?oe.post(_e):oe.post(G)}).catch(function(_e){console.log(_e)}):be!==!1&&setTimeout(function(){return oe.post(G)},0);return}},{key:"post",value:function(G){var ee=this;if(!this._isMounted)return;var oe=this.props,ae=oe.onStart,be=oe.onProgress,_e=oe.transformFile,fe=_e===void 0?function(Re){return Re}:_e;new Promise(function(Re){var Oe=oe.action;return typeof Oe=="function"&&(Oe=Oe(G)),Re(Oe)}).then(function(Re){var Oe=G.uid,de=oe.customRequest||C,te=Promise.resolve(fe(G)).then(function(W){var Y=oe.data;return typeof Y=="function"&&(Y=Y(W)),Promise.all([W,Y])}).catch(function(W){console.error(W)});te.then(function(W){var Y=d(W,2),V=Y[0],Q=Y[1],q={action:Re,filename:oe.name,data:Q,file:V,headers:oe.headers,withCredentials:oe.withCredentials,method:oe.method||"post",onProgress:be?function(ie){be(ie,G)}:null,onSuccess:function(ne,J){delete ee.reqs[Oe],oe.onSuccess(ne,G,J)},onError:function(ne,J){delete ee.reqs[Oe],oe.onError(ne,J,G)}};ae(G),ee.reqs[Oe]=de(q)})})}},{key:"reset",value:function(){this.setState({uid:h()})}},{key:"abort",value:function(G){var ee=this.reqs;if(G){var oe=G;G&&G.uid&&(oe=G.uid),ee[oe]&&ee[oe].abort&&ee[oe].abort(),delete ee[oe]}else Object.keys(ee).forEach(function(ae){ee[ae]&&ee[ae].abort&&ee[ae].abort(),delete ee[ae]})}},{key:"render",value:function(){var G,ee=this.props,oe=ee.component,ae=ee.prefixCls,be=ee.className,_e=ee.disabled,fe=ee.id,Re=ee.style,Oe=ee.multiple,de=ee.accept,te=ee.children,W=ee.directory,Y=ee.openFileDialogOnClick,V=ee.onMouseEnter,Q=ee.onMouseLeave,q=s(ee,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),ie=k()((G={},o(G,ae,!0),o(G,ae+"-disabled",_e),o(G,be,be),G)),ne=_e?{}:{onClick:Y?this.onClick:function(){},onKeyDown:Y?this.onKeyDown:function(){},onMouseEnter:V,onMouseLeave:Q,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return g.a.createElement(oe,f({},ne,{className:ie,role:"button",style:Re}),g.a.createElement("input",f({},D(q),{id:fe,type:"file",ref:this.saveFileInput,onClick:function($){return $.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:de,directory:W?"directory":null,webkitdirectory:W?"webkitdirectory":null,multiple:Oe,onChange:this.onChange})),te)}}]),U}(N.Component),y=R,x=Object.assign||function(B){for(var U=1;U<arguments.length;U++){var L=arguments[U];for(var G in L)Object.prototype.hasOwnProperty.call(L,G)&&(B[G]=L[G])}return B},w=function(){function B(U,L){for(var G=0;G<L.length;G++){var ee=L[G];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(U,ee.key,ee)}}return function(U,L,G){return L&&B(U.prototype,L),G&&B(U,G),U}}();function T(B,U){if(!(B instanceof U))throw new TypeError("Cannot call a class as a function")}function F(B,U){if(!B)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:B}function P(B,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);B.prototype=Object.create(U&&U.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(B,U):B.__proto__=U)}function A(){}var X=function(B){P(U,B);function U(){var L,G,ee,oe;T(this,U);for(var ae=arguments.length,be=Array(ae),_e=0;_e<ae;_e++)be[_e]=arguments[_e];return oe=(G=(ee=F(this,(L=U.__proto__||Object.getPrototypeOf(U)).call.apply(L,[this].concat(be))),ee),ee.saveUploader=function(fe){ee.uploader=fe},G),F(ee,oe)}return w(U,[{key:"abort",value:function(G){this.uploader.abort(G)}},{key:"render",value:function(){return g.a.createElement(y,x({},this.props,{ref:this.saveUploader}))}}]),U}(N.Component);X.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:A,onError:A,onSuccess:A,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var z=X,O=Z.a=z},HmJG:function(H,Z,I){},IBYe:function(H,Z,I){"use strict";function N(g){return null}Z.a=N},Ib8C:function(H,Z,I){(function(N){(function(g,S){H.exports=Z=S()})(this,function(){var g=g||function(S,k){var v;if(typeof window!="undefined"&&window.crypto&&(v=window.crypto),typeof self!="undefined"&&self.crypto&&(v=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(v=globalThis.crypto),!v&&typeof window!="undefined"&&window.msCrypto&&(v=window.msCrypto),!v&&typeof N!="undefined"&&N.crypto&&(v=N.crypto),!v&&!0)try{v=I(4)}catch(o){}var m=function(){if(v){if(typeof v.getRandomValues=="function")try{return v.getRandomValues(new Uint32Array(1))[0]}catch(o){}if(typeof v.randomBytes=="function")try{return v.randomBytes(4).readInt32LE()}catch(o){}}throw new Error("Native crypto module could not be used to get secure random number.")},C=Object.create||function(){function o(){}return function(s){var E;return o.prototype=s,E=new o,o.prototype=null,E}}(),_={},e=_.lib={},h=e.Base=function(){return{extend:function(o){var s=C(this);return o&&s.mixIn(o),(!s.hasOwnProperty("init")||this.init===s.init)&&(s.init=function(){s.$super.init.apply(this,arguments)}),s.init.prototype=s,s.$super=this,s},create:function(){var o=this.extend();return o.init.apply(o,arguments),o},init:function(){},mixIn:function(o){for(var s in o)o.hasOwnProperty(s)&&(this[s]=o[s]);o.hasOwnProperty("toString")&&(this.toString=o.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),r=e.WordArray=h.extend({init:function(o,s){o=this.words=o||[],s!=k?this.sigBytes=s:this.sigBytes=o.length*4},toString:function(o){return(o||i).stringify(this)},concat:function(o){var s=this.words,E=o.words,b=this.sigBytes,p=o.sigBytes;if(this.clamp(),b%4)for(var D=0;D<p;D++){var R=E[D>>>2]>>>24-D%4*8&255;s[b+D>>>2]|=R<<24-(b+D)%4*8}else for(var y=0;y<p;y+=4)s[b+y>>>2]=E[y>>>2];return this.sigBytes+=p,this},clamp:function(){var o=this.words,s=this.sigBytes;o[s>>>2]&=4294967295<<32-s%4*8,o.length=S.ceil(s/4)},clone:function(){var o=h.clone.call(this);return o.words=this.words.slice(0),o},random:function(o){for(var s=[],E=0;E<o;E+=4)s.push(m());return new r.init(s,o)}}),c=_.enc={},i=c.Hex={stringify:function(o){for(var s=o.words,E=o.sigBytes,b=[],p=0;p<E;p++){var D=s[p>>>2]>>>24-p%4*8&255;b.push((D>>>4).toString(16)),b.push((D&15).toString(16))}return b.join("")},parse:function(o){for(var s=o.length,E=[],b=0;b<s;b+=2)E[b>>>3]|=parseInt(o.substr(b,2),16)<<24-b%8*4;return new r.init(E,s/2)}},n=c.Latin1={stringify:function(o){for(var s=o.words,E=o.sigBytes,b=[],p=0;p<E;p++){var D=s[p>>>2]>>>24-p%4*8&255;b.push(String.fromCharCode(D))}return b.join("")},parse:function(o){for(var s=o.length,E=[],b=0;b<s;b++)E[b>>>2]|=(o.charCodeAt(b)&255)<<24-b%4*8;return new r.init(E,s)}},l=c.Utf8={stringify:function(o){try{return decodeURIComponent(escape(n.stringify(o)))}catch(s){throw new Error("Malformed UTF-8 data")}},parse:function(o){return n.parse(unescape(encodeURIComponent(o)))}},f=e.BufferedBlockAlgorithm=h.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(o){typeof o=="string"&&(o=l.parse(o)),this._data.concat(o),this._nDataBytes+=o.sigBytes},_process:function(o){var s,E=this._data,b=E.words,p=E.sigBytes,D=this.blockSize,R=D*4,y=p/R;o?y=S.ceil(y):y=S.max((y|0)-this._minBufferSize,0);var x=y*D,w=S.min(x*4,p);if(x){for(var T=0;T<x;T+=D)this._doProcessBlock(b,T);s=b.splice(0,x),E.sigBytes-=w}return new r.init(s,w)},clone:function(){var o=h.clone.call(this);return o._data=this._data.clone(),o},_minBufferSize:0}),d=e.Hasher=f.extend({cfg:h.extend(),init:function(o){this.cfg=this.cfg.extend(o),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(o){return this._append(o),this._process(),this},finalize:function(o){o&&this._append(o);var s=this._doFinalize();return s},blockSize:512/32,_createHelper:function(o){return function(s,E){return new o.init(E).finalize(s)}},_createHmacHelper:function(o){return function(s,E){return new u.HMAC.init(o,E).finalize(s)}}}),u=_.algo={};return _}(Math);return g})}).call(this,I("IyRk"))},J66h:function(H,Z,I){(function(N){var g,S;(function(k,v){H.exports=v(k)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof N!="undefined"?N:this,function(k){"use strict";k=k||{};var v=k.Base64,m="2.6.4",C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=function(A){for(var X={},z=0,O=A.length;z<O;z++)X[A.charAt(z)]=z;return X}(C),e=String.fromCharCode,h=function(A){if(A.length<2){var X=A.charCodeAt(0);return X<128?A:X<2048?e(192|X>>>6)+e(128|X&63):e(224|X>>>12&15)+e(128|X>>>6&63)+e(128|X&63)}else{var X=65536+(A.charCodeAt(0)-55296)*1024+(A.charCodeAt(1)-56320);return e(240|X>>>18&7)+e(128|X>>>12&63)+e(128|X>>>6&63)+e(128|X&63)}},r=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,c=function(A){return A.replace(r,h)},i=function(A){var X=[0,2,1][A.length%3],z=A.charCodeAt(0)<<16|(A.length>1?A.charCodeAt(1):0)<<8|(A.length>2?A.charCodeAt(2):0),O=[C.charAt(z>>>18),C.charAt(z>>>12&63),X>=2?"=":C.charAt(z>>>6&63),X>=1?"=":C.charAt(z&63)];return O.join("")},n=k.btoa&&typeof k.btoa=="function"?function(A){return k.btoa(A)}:function(A){if(A.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return A.replace(/[\s\S]{1,3}/g,i)},l=function(A){return n(c(String(A)))},f=function(A){return A.replace(/[+\/]/g,function(X){return X=="+"?"-":"_"}).replace(/=/g,"")},d=function(A,X){return X?f(l(A)):l(A)},u=function(A){return d(A,!0)},o;k.Uint8Array&&(o=function(A,X){for(var z="",O=0,B=A.length;O<B;O+=3){var U=A[O],L=A[O+1],G=A[O+2],ee=U<<16|L<<8|G;z+=C.charAt(ee>>>18)+C.charAt(ee>>>12&63)+(typeof L!="undefined"?C.charAt(ee>>>6&63):"=")+(typeof G!="undefined"?C.charAt(ee&63):"=")}return X?f(z):z});var s=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,E=function(A){switch(A.length){case 4:var X=(7&A.charCodeAt(0))<<18|(63&A.charCodeAt(1))<<12|(63&A.charCodeAt(2))<<6|63&A.charCodeAt(3),z=X-65536;return e((z>>>10)+55296)+e((z&1023)+56320);case 3:return e((15&A.charCodeAt(0))<<12|(63&A.charCodeAt(1))<<6|63&A.charCodeAt(2));default:return e((31&A.charCodeAt(0))<<6|63&A.charCodeAt(1))}},b=function(A){return A.replace(s,E)},p=function(A){var X=A.length,z=X%4,O=(X>0?_[A.charAt(0)]<<18:0)|(X>1?_[A.charAt(1)]<<12:0)|(X>2?_[A.charAt(2)]<<6:0)|(X>3?_[A.charAt(3)]:0),B=[e(O>>>16),e(O>>>8&255),e(O&255)];return B.length-=[0,0,2,1][z],B.join("")},D=k.atob&&typeof k.atob=="function"?function(A){return k.atob(A)}:function(A){return A.replace(/\S{1,4}/g,p)},R=function(A){return D(String(A).replace(/[^A-Za-z0-9\+\/]/g,""))},y=function(A){return b(D(A))},x=function(A){return String(A).replace(/[-_]/g,function(X){return X=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},w=function(A){return y(x(A))},T;k.Uint8Array&&(T=function(A){return Uint8Array.from(R(x(A)),function(X){return X.charCodeAt(0)})});var F=function(){var A=k.Base64;return k.Base64=v,A};if(k.Base64={VERSION:m,atob:R,btoa:n,fromBase64:w,toBase64:d,utob:c,encode:d,encodeURI:u,btou:b,decode:w,noConflict:F,fromUint8Array:o,toUint8Array:T},typeof Object.defineProperty=="function"){var P=function(A){return{value:A,enumerable:!1,writable:!0,configurable:!0}};k.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",P(function(){return w(this)})),Object.defineProperty(String.prototype,"toBase64",P(function(A){return d(this,A)})),Object.defineProperty(String.prototype,"toBase64URI",P(function(){return d(this,!0)}))}}return k.Meteor&&(Base64=k.Base64),H.exports?H.exports.Base64=k.Base64:!(g=[],S=function(){return k.Base64}.apply(Z,g),S!==void 0&&(H.exports=S)),{Base64:k.Base64}})}).call(this,I("IyRk"))},JYp7:function(H,Z,I){"use strict";I.d(Z,"a",function(){return N});var N;(function(g){function S(s){return s&&typeof s=="object"&&typeof s[Symbol.iterator]=="function"}g.is=S;const k=Object.freeze([]);function v(){return k}g.empty=v;function*m(s){yield s}g.single=m;function C(s){return s||k}g.from=C;function _(s){return!s||s[Symbol.iterator]().next().done===!0}g.isEmpty=_;function e(s){return s[Symbol.iterator]().next().value}g.first=e;function h(s,E){for(const b of s)if(E(b))return!0;return!1}g.some=h;function r(s,E){for(const b of s)if(E(b))return b;return}g.find=r;function*c(s,E){for(const b of s)E(b)&&(yield b)}g.filter=c;function*i(s,E){let b=0;for(const p of s)yield E(p,b++)}g.map=i;function*n(...s){for(const E of s)for(const b of E)yield b}g.concat=n;function*l(s){for(const E of s)for(const b of E)yield b}g.concatNested=l;function f(s,E,b){let p=b;for(const D of s)p=E(p,D);return p}g.reduce=f;function*d(s,E,b=s.length){for(E<0&&(E+=s.length),b<0?b+=s.length:b>s.length&&(b=s.length);E<b;E++)yield s[E]}g.slice=d;function u(s,E=Number.POSITIVE_INFINITY){const b=[];if(E===0)return[b,s];const p=s[Symbol.iterator]();for(let D=0;D<E;D++){const R=p.next();if(R.done)return[b,g.empty()];b.push(R.value)}return[b,{[Symbol.iterator](){return p}}]}g.consume=u;function o(s,E,b=(p,D)=>p===D){const p=s[Symbol.iterator](),D=E[Symbol.iterator]();for(;;){const R=p.next(),y=D.next();if(R.done!==y.done)return!1;if(R.done)return!0;if(!b(R.value,y.value))return!1}}g.equals=o})(N||(N={}))},K3mO:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("3y9D"),I("WYAk"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.Base,v=S.WordArray,m=g.algo,C=m.MD5,_=m.EvpKDF=k.extend({cfg:k.extend({keySize:128/32,hasher:C,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,h){for(var r,c=this.cfg,i=c.hasher.create(),n=v.create(),l=n.words,f=c.keySize,d=c.iterations;l.length<f;){r&&i.update(r),r=i.update(e).finalize(h),i.reset();for(var u=1;u<d;u++)r=i.finalize(r),i.reset();n.concat(r)}return n.sigBytes=f*4,n}});g.EvpKDF=function(e,h,r){return _.create(r).compute(e,h)}}(),N.EvpKDF})},KhGG:function(H,Z,I){"use strict";I.d(Z,"a",function(){return p}),I.d(Z,"c",function(){return y});var N=I("0Owb"),g=I("miYZ"),S=I("tsqr"),k=I("oBTY"),v=I("tJVT"),m=I("PpiC"),C=I("k1fw"),_=I("9og8"),e=I("DZo9"),h=I("8z0m"),r=I("WmNS"),c=I.n(r),i=I("q1tI"),n=I.n(i),l=I("ErOA"),f=I("NFKh"),d=I.n(f),u=I("7Cbv"),o=I("9kvl"),s=I("mxV5"),E=I.n(s),b=h.a.Dragger,p=function(T){var F="bf3c199c2470cb477d907b1e0917c17b",P="5183666c72eec9e4",A=d.a.enc.Utf8.parse(F),X=d.a.enc.Utf8.parse(P),z=d.a.AES.decrypt(T,A,{iv:X,mode:d.a.mode.CBC});return z.toString(d.a.enc.Utf8)},D,R=function(){var w=Object(_.a)(c.a.mark(function T(F){var P,A,X,z,O,B,U,L,G,ee,oe;return c.a.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:return U=F.identifier,L=F.oldFilename,G=F.newFilename,be.next=3,Object(l.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 3:return ee=be.sent,ee.data=JSON.parse(p(ee.data)),oe=new E.a({endpoint:ee==null||((P=ee.data)===null||P===void 0)?void 0:P.end_point,region:ee==null||((A=ee.data)===null||A===void 0)?void 0:A.region,accessKeyId:ee==null||((X=ee.data)===null||X===void 0)?void 0:X.access_key_id,accessKeySecret:ee==null||((z=ee.data)===null||z===void 0)?void 0:z.access_key_secret,bucket:ee==null||((O=ee.data)===null||O===void 0)?void 0:O.bucket,stsToken:ee==null||((B=ee.data)===null||B===void 0)?void 0:B.security_token}),be.abrupt("return",new Promise(function(_e,fe){console.log(11111,"".concat(U,"/").concat(L),"".concat(U,"/").concat(G),ee.data),oe.copy("/".concat(U,"/").concat(L),"/".concat(U,"/").concat(G)).then(function(Re){console.log("\u62F7\u8D1D\u6210\u529F",Re)}).catch(function(Re){console.log(Re)})}));case 7:case"end":return be.stop()}},T)}));return function(F){return w.apply(this,arguments)}}(),y=function(){var w=Object(_.a)(c.a.mark(function T(F,P,A){var X,z,O,B,U,L,G,ee,oe,ae;return c.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:return P.file_name=F.name,_e.next=3,Object(l.a)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return G=_e.sent,console.log("decrypt(res.data):",p(G.data)),G.data=JSON.parse(p(G.data)),ee=F.name.split("."),ee.pop(),oe=P.realFileName?ee:Object(u.a)(),ae=new E.a({endpoint:G==null||((X=G.data)===null||X===void 0)?void 0:X.end_point,region:G==null||((z=G.data)===null||z===void 0)?void 0:z.region,accessKeyId:G==null||((O=G.data)===null||O===void 0)?void 0:O.access_key_id,accessKeySecret:G==null||((B=G.data)===null||B===void 0)?void 0:B.access_key_secret,bucket:G==null||((U=G.data)===null||U===void 0)?void 0:U.bucket,stsToken:G==null||((L=G.data)===null||L===void 0)?void 0:L.security_token}),_e.abrupt("return",new Promise(function(fe,Re){var Oe;ae.multipartUpload("".concat(oe),new Blob([F],{type:F.type}),Object(C.a)(Object(C.a)({timeout:200*1e3,partSize:102400},A),{},{callback:{url:G==null||((Oe=G.data)===null||Oe===void 0)?void 0:Oe.callback_url,host:G==null?void 0:G.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(l.e)(P)}})).then(function(de){var te;F.response=(te=de.data)===null||te===void 0?void 0:te.data,fe(de==null?void 0:de.data)}).catch(function(de){Re(de),console.log("err:",de)})}));case 11:case"end":return _e.stop()}},T)}));return function(F,P,A){return w.apply(this,arguments)}}(),x=function(T){var F=T.user,P=T.cancelUpload,A=Object(m.a)(T,["user","cancelUpload"]),X=Object(i.useState)([]),z=Object(v.a)(X,2),O=z[0],B=z[1],U=Object(i.useState)(),L=Object(v.a)(U,2),G=L[0],ee=L[1],oe={onRemove:function(_e){B(Object(k.a)(O.filter(function(fe){return fe.name!==_e.name}))),A.onChange(O.filter(function(fe){return fe.name!==_e.name}))},disabled:A.disabled,multiple:!0,fileList:O==null?void 0:O.map(function(be){return be.file}),customRequest:function(){},beforeUpload:function(){var be=Object(_.a)(c.a.mark(function fe(Re){var Oe;return c.a.wrap(function(te){for(;;)switch(te.prev=te.next){case 0:if(Oe=A.maxSize||1024*1024*1024*1,!O.filter(function(W){return W.name===Re.name}).length){te.next=4;break}return S.b.info("".concat(Re.name,"\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9")),te.abrupt("return");case 4:if(!((Re==null?void 0:Re.size)>Oe)){te.next=7;break}return S.b.info("\u6587\u4EF6\u8D85\u8FC7".concat(Oe/1024/1024/1024,"GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42")),te.abrupt("return",!1);case 7:return O.push({name:Re.name,file:Re}),B(Object(k.a)(O)),A.onChange(O),te.abrupt("return",!1);case 11:case"end":return te.stop()}},fe)}));function _e(fe){return be.apply(this,arguments)}return _e}()},ae=function(){var be=Object(_.a)(c.a.mark(function _e(fe,Re){var Oe,de,te,W,Y,V,Q,q,ie,ne;return c.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return Re.file_name=fe.name,Q=fe.name,$.next=4,Object(l.a)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if(q=$.sent,q.data=JSON.parse(p(q.data)),!((q==null?void 0:q.status)!==0)){$.next=12;break}return O[O.findIndex(function(le){return le.name===Q})].status="error",O[O.findIndex(function(le){return le.name===Q})].file.status="error",A.onChange(O),S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),$.abrupt("return");case 12:return G=new E.a({endpoint:q==null||((Oe=q.data)===null||Oe===void 0)?void 0:Oe.end_point,region:q==null||((de=q.data)===null||de===void 0)?void 0:de.region,accessKeyId:q==null||((te=q.data)===null||te===void 0)?void 0:te.access_key_id,accessKeySecret:q==null||((W=q.data)===null||W===void 0)?void 0:W.access_key_secret,bucket:q==null||((Y=q.data)===null||Y===void 0)?void 0:Y.bucket,stsToken:q==null||((V=q.data)===null||V===void 0)?void 0:V.security_token}),console.log(fe,"file"),ee(G),ie=fe.name.split("."),ie.pop(),ne=Re.realFileName?ie:Object(u.a)(),$.abrupt("return",new Promise(function(le,ce){try{var we;G.multipartUpload("".concat(A.identifier,"/").concat(ne).concat(Q.indexOf(".")>-1?"."+Q.split(".").pop():""),new Blob([fe.file],{type:fe.file.type}),{timeout:3600*1e3,partSize:1002400,progress:function(Xe,$e,Ye){try{console.log("\u8FDB\u5EA6",Xe,$e,Ye);var Ze=O.findIndex(function(qe){return qe.name===Q});O[Ze].file.percent=Xe*100,O[Ze].tempCheckpoint=$e,B(Object(k.a)(O))}catch(qe){}},checkpoint:O[O.findIndex(function(Fe){return Fe.name===Q})].tempCheckpoint,callback:{customValue:{id:Q+""},url:q==null||((we=q.data)===null||we===void 0)?void 0:we.callback_url,host:q==null?void 0:q.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(l.e)(Re)}}).then(function(Fe){var Xe,$e=O.findIndex(function(Ie){return Ie.name===Q}),Ye="done";if(((Xe=Fe.data)===null||Xe===void 0?void 0:Xe.status)===0){var Ze;fe.response=(Ze=Fe.data)===null||Ze===void 0?void 0:Ze.data;var qe=O.findIndex(function(Ie){return Ie.name===Q});O[qe].status="done",O[qe].file.status="done"}else{var Pe;S.b.warn((Pe=Fe.data)===null||Pe===void 0?void 0:Pe.message),Ye="error"}O[$e].status=Ye,O[$e].file.status=Ye,A.onChange(O),le(Fe==null?void 0:Fe.data)}).catch(function(Fe){O[O.findIndex(function(Xe){return Xe.name===Q})].status="error",O[O.findIndex(function(Xe){return Xe.name===Q})].file.status="error",S.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),B(Object(k.a)(O)),A.onChange(O),ce(Fe),console.log("err:",Fe)})}catch(Fe){}}));case 19:case"end":return $.stop()}},_e)}));return function(fe,Re){return be.apply(this,arguments)}}();return Object(i.useEffect)(function(){O.every(function(be){return be==="done"||be==="error"})&&A.onComplete(O)},[O]),Object(i.useEffect)(function(){if(P){var be;(be=G)===null||be===void 0||be.cancel()}},[P]),Object(i.useEffect)(function(){A.uploading&&O.map(function(){var be=Object(_.a)(c.a.mark(function _e(fe){var Re,Oe;return c.a.wrap(function(te){for(;;)switch(te.prev=te.next){case 0:if(!((!fe.status||fe.status==="error")&&!P)){te.next=6;break}return fe.status="uploading",fe.file.status="uploading",te.next=5,ae(fe,{login:F==null||((Re=F.userInfo)===null||Re===void 0)?void 0:Re.login,container_type:A.container_type,container_id:A.container_id,description:A.description,realFileName:A.realFileName});case 5:Oe=te.sent;case 6:case"end":return te.stop()}},_e)}));return function(_e){return be.apply(this,arguments)}}())},[A.uploading]),n.a.createElement(b,Object(N.a)({},oe,{height:A.height,className:A.className}),n.a.createElement("p",{className:"ant-upload-hint"},A.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};Z.b=Object(o.a)(function(w){var T=w.loading,F=w.globalSetting,P=w.user;return{globalSetting:F,loading:T.models.competitions,user:P}})(x)},KmYQ:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.pad.ZeroPadding={pad:function(g,S){var k=S*4;g.clamp(),g.sigBytes+=k-(g.sigBytes%k||k)},unpad:function(g){for(var S=g.words,k=g.sigBytes-1,k=g.sigBytes-1;k>=0;k--)if(S[k>>>2]>>>24-k%4*8&255){g.sigBytes=k+1;break}}},N.pad.ZeroPadding})},L9qf:function(H,Z,I){H.exports={flex_box_center:"flex_box_center___3J7Qj",flex_space_between:"flex_space_between___3P3xx",flex_box_vertical_center:"flex_box_vertical_center___3QrMz",flex_box_center_end:"flex_box_center_end___37g4V",flex_box_column:"flex_box_column___2PxMN",wrap:"wrap___1xDeN",in:"in___364z1",btns:"btns___8vHXH",customModal:"customModal___2Vkln"}},LdHM:function(H,Z,I){"use strict";I.d(Z,"b",function(){return s}),I.d(Z,"a",function(){return b});var N=I("1OyB"),g=I("vuIU"),S=I("Ji7U"),k=I("LK+K"),v=I("q1tI"),m=I("rePB"),C=I("Ff2n"),_=I("ODXe"),e=I("4IlW"),h=I("bX4T"),r=I("YrtM"),c=I("TSYQ"),i=I.n(c),n=I("+nKL"),l=I("8OUc"),f=function(G,ee){var oe=G.prefixCls,ae=G.id,be=G.flattenOptions,_e=G.childrenAsData,fe=G.values,Re=G.searchValue,Oe=G.multiple,de=G.defaultActiveFirstOption,te=G.height,W=G.itemHeight,Y=G.notFoundContent,V=G.open,Q=G.menuItemSelectedIcon,q=G.virtual,ie=G.onSelect,ne=G.onToggleOpen,J=G.onActiveValue,$=G.onScroll,le=G.onMouseEnter,ce="".concat(oe,"-item"),we=Object(r.a)(function(){return be},[V,be],function(ue,he){return he[0]&&ue[1]!==he[1]}),Fe=v.useRef(null),Xe=function(he){he.preventDefault()},$e=function(he){Fe.current&&Fe.current.scrollTo({index:he})},Ye=function(he){for(var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ce=we.length,ge=0;ge<Ce;ge+=1){var Ee=(he+ge*me+Ce)%Ce,Ae=we[Ee],De=Ae.group,Me=Ae.data;if(!De&&!Me.disabled)return Ee}return-1},Ze=v.useState(function(){return Ye(0)}),qe=Object(_.a)(Ze,2),Pe=qe[0],Ie=qe[1],Je=function(he){Ie(he);var me=we[he];if(!me){J(null,-1);return}J(me.data.value,he)};v.useEffect(function(){Je(de!==!1?Ye(0):-1)},[we.length,Re]),v.useEffect(function(){var ue=setTimeout(function(){if(!Oe&&V&&fe.size===1){var he=Array.from(fe)[0],me=we.findIndex(function(Ce){var ge=Ce.data;return ge.value===he});Je(me),$e(me)}});return function(){return clearTimeout(ue)}},[V]);var rt=function(he){he!==void 0&&ie(he,{selected:!fe.has(he)}),Oe||ne(!1)};if(v.useImperativeHandle(ee,function(){return{onKeyDown:function(he){var me=he.which;switch(me){case e.a.UP:case e.a.DOWN:{var Ce=0;if(me===e.a.UP?Ce=-1:me===e.a.DOWN&&(Ce=1),Ce!==0){var ge=Ye(Pe+Ce,Ce);$e(ge),Je(ge)}break}case e.a.ENTER:{var Ee=we[Pe];Ee&&!Ee.data.disabled?rt(Ee.data.value):rt(void 0),V&&he.preventDefault();break}case e.a.ESC:ne(!1)}},onKeyUp:function(){},scrollTo:function(he){$e(he)}}}),we.length===0)return v.createElement("div",{role:"listbox",id:"".concat(ae,"_list"),className:"".concat(ce,"-empty"),onMouseDown:Xe},Y);function ye(ue){var he=we[ue];if(!he)return null;var me=he.data||{},Ce=me.value,ge=me.label,Ee=me.children,Ae=Object(h.a)(me,!0),De=_e?Ee:ge;return he?v.createElement("div",Object.assign({"aria-label":typeof De=="string"?De:null},Ae,{key:ue,role:"option",id:"".concat(ae,"_list_").concat(ue),"aria-selected":fe.has(Ce)}),Ce):null}return v.createElement(v.Fragment,null,v.createElement("div",{role:"listbox",id:"".concat(ae,"_list"),style:{height:0,width:0,overflow:"hidden"}},ye(Pe-1),ye(Pe),ye(Pe+1)),v.createElement(n.a,{itemKey:"key",ref:Fe,data:we,height:te,itemHeight:W,fullHeight:!1,onMouseDown:Xe,onScroll:$,virtual:q,onMouseEnter:le},function(ue,he){var me,Ce=ue.group,ge=ue.groupOption,Ee=ue.data,Ae=Ee.label,De=Ee.key;if(Ce)return v.createElement("div",{className:i()(ce,"".concat(ce,"-group"))},Ae!==void 0?Ae:De);var Me=Ee.disabled,He=Ee.value,nt=Ee.title,at=Ee.children,it=Ee.style,st=Ee.className,Tt=Object(C.a)(Ee,["disabled","value","title","children","style","className"]),pt=fe.has(He),ht="".concat(ce,"-option"),Ft=i()(ce,ht,st,(me={},Object(m.a)(me,"".concat(ht,"-grouped"),ge),Object(m.a)(me,"".concat(ht,"-active"),Pe===he&&!Me),Object(m.a)(me,"".concat(ht,"-disabled"),Me),Object(m.a)(me,"".concat(ht,"-selected"),pt),me)),Lt=_e?at:Ae,Yt=!Q||typeof Q=="function"||pt;return v.createElement("div",Object.assign({},Tt,{"aria-selected":pt,className:Ft,title:nt,onMouseMove:function(){if(Pe===he||Me)return;Je(he)},onClick:function(){Me||rt(He)},style:it}),v.createElement("div",{className:"".concat(ht,"-content")},Lt||He),v.isValidElement(Q)||pt,Yt&&v.createElement(l.a,{className:"".concat(ce,"-option-state"),customizeIcon:Q,customizeIconProps:{isSelected:pt}},pt?"\u2713":null))}))},d=v.forwardRef(f);d.displayName="OptionList";var u=d,o=function(){return null};o.isSelectOption=!0;var s=o,E=function(){return null};E.isSelectOptGroup=!0;var b=E,p=I("VTBJ"),D=I("Zm9Q");function R(L){var G=L.key,ee=L.props,oe=ee.children,ae=ee.value,be=Object(C.a)(ee,["children","value"]);return Object(p.a)({key:G,value:ae!==void 0?ae:G,children:oe},be)}function y(L){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(D.a)(L).map(function(ee,oe){if(!v.isValidElement(ee)||!ee.type)return null;var ae=ee.type.isSelectOptGroup,be=ee.key,_e=ee.props,fe=_e.children,Re=Object(C.a)(_e,["children"]);return G||!ae?R(ee):Object(p.a)(Object(p.a)({key:"__RC_SELECT_GRP__".concat(be===null?oe:be,"__"),label:be},Re),{},{options:y(fe)})}).filter(function(ee){return ee})}var x=I("2Qr1"),w=I("qNPg"),T=I("U8pU"),F=I("Kwbf"),P=I("WKfj");function A(L){var G=L.mode,ee=L.options,oe=L.children,ae=L.backfill,be=L.allowClear,_e=L.placeholder,fe=L.getInputElement,Re=L.showSearch,Oe=L.onSearch,de=L.defaultOpen,te=L.autoFocus,W=L.labelInValue,Y=L.value,V=L.inputValue,Q=L.optionLabelProp,q=G==="multiple"||G==="tags",ie=Re!==void 0?Re:q||G==="combobox",ne=ee||y(oe);if(Object(F.a)(G!=="tags"||ne.every(function(ce){return!ce.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),G==="tags"||G==="combobox"){var J=ne.some(function(ce){return ce.options?ce.options.some(function(we){return typeof("value"in we?we.value:we.key)=="number"}):typeof("value"in ce?ce.value:ce.key)=="number"});Object(F.a)(!J,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(F.a)(G!=="combobox"||!Q,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(F.a)(G==="combobox"||!ae,"`backfill` only works with `combobox` mode."),Object(F.a)(G==="combobox"||!fe,"`getInputElement` only work with `combobox` mode."),Object(F.b)(G!=="combobox"||!fe||!be||!_e,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Oe&&!ie&&G!=="combobox"&&G!=="tags"&&Object(F.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(F.b)(!de||te,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Y!=null){var $=Object(P.d)(Y);Object(F.a)(!W||$.every(function(ce){return Object(T.a)(ce)==="object"&&("key"in ce||"value"in ce)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(F.a)(!q||Array.isArray(Y),"`value` should be array when `mode` is `multiple` or `tags`")}if(oe){var le=null;Object(D.a)(oe).some(function(ce){if(!v.isValidElement(ce)||!ce.type)return!1;var we=ce.type;if(we.isSelectOption)return!1;if(we.isSelectOptGroup){var Fe=Object(D.a)(ce.props.children).every(function(Xe){return!v.isValidElement(Xe)||!ce.type||Xe.type.isSelectOption?!0:(le=Xe.type,!1)});return!Fe}return le=we,!0}),le&&Object(F.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(le.displayName||le.name||le,"`.")),Object(F.a)(V===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var X=A,z=Object(w.a)({prefixCls:"rc-select",components:{optionList:u},convertChildrenToData:y,flattenOptions:x.d,getLabeledValue:x.e,filterOptions:x.b,isValueDisabled:x.g,findValueOption:x.c,warningProps:X,fillOptionsWithMissingValue:x.a}),O=function(L){Object(S.a)(ee,L);var G=Object(k.a)(ee);function ee(){var oe;return Object(N.a)(this,ee),oe=G.apply(this,arguments),oe.selectRef=v.createRef(),oe.focus=function(){oe.selectRef.current.focus()},oe.blur=function(){oe.selectRef.current.blur()},oe}return Object(g.a)(ee,[{key:"render",value:function(){return v.createElement(z,Object.assign({ref:this.selectRef},this.props))}}]),ee}(v.Component);O.Option=s,O.OptGroup=b;var B=O,U=Z.c=B},M8RZ:function(H,Z,I){"use strict";I.d(Z,"a",function(){return e});var N=I("fWQN"),g=I("mtLc"),S=I("yKVA"),k=I("879j"),v=I("q1tI"),m=I.n(v),C=I("i8i4"),_=I.n(C),e=function(h){Object(S.a)(c,h);var r=Object(k.a)(c);function c(i){var n;Object(N.a)(this,c),n=r.call(this,i);var l=window.document;return n.node=l.createElement("div"),l.body.appendChild(n.node),n}return Object(g.a)(c,[{key:"render",value:function(){var n=this.props.children;return Object(C.createPortal)(n,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),c}(m.a.Component)},MFOe:function(H,Z,I){(function(N){var g=m(),S=C(),k=_(),v=typeof window!="undefined"?window:N;H.exports={assign:g,create:S,trim:k,bind:e,slice:h,each:r,map:c,pluck:i,isList:n,isFunction:l,isObject:f,Global:v};function m(){return Object.assign?Object.assign:function(u,o,s,E){for(var b=1;b<arguments.length;b++)r(Object(arguments[b]),function(p,D){u[D]=p});return u}}function C(){if(Object.create)return function(o,s,E,b){var p=h(arguments,1);return g.apply(this,[Object.create(o)].concat(p))};{function d(){}return function(o,s,E,b){var p=h(arguments,1);return d.prototype=o,g.apply(this,[new d].concat(p))}}}function _(){return String.prototype.trim?function(u){return String.prototype.trim.call(u)}:function(u){return u.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function e(d,u){return function(){return u.apply(d,Array.prototype.slice.call(arguments,0))}}function h(d,u){return Array.prototype.slice.call(d,u||0)}function r(d,u){i(d,function(o,s){return u(o,s),!1})}function c(d,u){var o=n(d)?[]:{};return i(d,function(s,E){return o[E]=u(s,E),!1}),o}function i(d,u){if(n(d)){for(var o=0;o<d.length;o++)if(u(d[o],o))return d[o]}else for(var s in d)if(d.hasOwnProperty(s)&&u(d[s],s))return d[s]}function n(d){return d!=null&&typeof d!="function"&&typeof d.length=="number"}function l(d){return d&&{}.toString.call(d)==="[object Function]"}function f(d){return d&&{}.toString.call(d)==="[object Object]"}}).call(this,I("IyRk"))},MI8n:function(H,Z,I){"use strict";I.d(Z,"c",function(){return v}),I.d(Z,"b",function(){return e}),I.d(Z,"e",function(){return h}),I.d(Z,"a",function(){return r}),I.d(Z,"d",function(){return c}),I.d(Z,"f",function(){return i});var N=I("/cxE"),g=I("pmY6"),S=I("24hK"),k=I("5Y4S"),v;(function(n){n.None=()=>g.a.None;function l(A){return(X,z=null,O)=>{let B=!1,U;return U=A(L=>B?void 0:(U?U.dispose():B=!0,X.call(z,L)),null,O),B&&U.dispose(),U}}n.once=l;function f(A,X){return b((z,O=null,B)=>A(U=>z.call(O,X(U)),null,B))}n.map=f;function d(A,X){return b((z,O=null,B)=>A(U=>{X(U),z.call(O,U)},null,B))}n.forEach=d;function u(A,X){return b((z,O=null,B)=>A(U=>X(U)&&z.call(O,U),null,B))}n.filter=u;function o(A){return A}n.signal=o;function s(...A){return(X,z=null,O)=>Object(g.e)(...A.map(B=>B(U=>X.call(z,U),null,O)))}n.any=s;function E(A,X,z){let O=z;return f(A,B=>(O=X(O,B),O))}n.reduce=E;function b(A){let X;const z=new e({onFirstListenerAdd(){X=A(z.fire,z)},onLastListenerRemove(){X.dispose()}});return z.event}function p(A,X,z=100,O=!1,B){let U,L,G,ee=0;const oe=new e({leakWarningThreshold:B,onFirstListenerAdd(){U=A(ae=>{ee++,L=X(L,ae),O&&!G&&(oe.fire(L),L=void 0),clearTimeout(G),G=setTimeout(()=>{const be=L;L=void 0,G=void 0,(!O||ee>1)&&oe.fire(be),ee=0},z)})},onLastListenerRemove(){U.dispose()}});return oe.event}n.debounce=p;function D(A,X=(z,O)=>z===O){let z=!0,O;return u(A,B=>{const U=z||!X(B,O);return z=!1,O=B,U})}n.latch=D;function R(A,X){return[n.filter(A,X),n.filter(A,z=>!X(z))]}n.split=R;function y(A,X=!1,z=[]){let O=z.slice(),B=A(G=>{O?O.push(G):L.fire(G)});const U=()=>{O&&O.forEach(G=>L.fire(G)),O=null},L=new e({onFirstListenerAdd(){B||(B=A(G=>L.fire(G)))},onFirstListenerDidAdd(){O&&(X?setTimeout(U):U())},onLastListenerRemove(){B&&B.dispose(),B=null}});return L.event}n.buffer=y;class x{constructor(A){this.event=A}map(A){return new x(f(this.event,A))}forEach(A){return new x(d(this.event,A))}filter(A){return new x(u(this.event,A))}reduce(A,X){return new x(E(this.event,A,X))}latch(){return new x(D(this.event))}debounce(A,X=100,z=!1,O){return new x(p(this.event,A,X,z,O))}on(A,X,z){return this.event(A,X,z)}once(A,X,z){return l(this.event)(A,X,z)}}function w(A){return new x(A)}n.chain=w;function T(A,X,z=O=>O){const O=(...G)=>L.fire(z(...G)),B=()=>A.on(X,O),U=()=>A.removeListener(X,O),L=new e({onFirstListenerAdd:B,onLastListenerRemove:U});return L.event}n.fromNodeEventEmitter=T;function F(A,X,z=O=>O){const O=(...G)=>L.fire(z(...G)),B=()=>A.addEventListener(X,O),U=()=>A.removeEventListener(X,O),L=new e({onFirstListenerAdd:B,onLastListenerRemove:U});return L.event}n.fromDOMEventEmitter=F;function P(A){return new Promise(X=>l(A)(X))}n.toPromise=P})(v||(v={}));class m{constructor(n){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${n}_${m._idPool++}`}start(n){this._stopWatch=new k.a(!0),this._listenerCount=n}stop(){if(this._stopWatch){const n=this._stopWatch.elapsed();this._elapsedOverall+=n,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${n.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}m._idPool=0;let C=-1;class _{constructor(n,l=Math.random().toString(18).slice(2,5)){this.customThreshold=n,this.name=l,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(n){let l=C;if(typeof this.customThreshold=="number"&&(l=this.customThreshold),l<=0||n<l)return;this._stacks||(this._stacks=new Map);const f=new Error().stack.split(`
|
|
|
`).slice(3).join(`
|
|
|
`),d=this._stacks.get(f)||0;if(this._stacks.set(f,d+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=l*.5;let u,o=0;for(const[s,E]of this._stacks)(!u||o<E)&&(u=s,o=E);console.warn(`[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${o}):`),console.warn(u)}return()=>{const u=this._stacks.get(f)||0;this._stacks.set(f,u-1)}}}class e{constructor(n){var l;this._disposed=!1,this._options=n,this._leakageMon=C>0?new _(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((l=this._options)===null||l===void 0?void 0:l._profName)?new m(this._options._profName):void 0}get event(){return this._event||(this._event=(n,l,f)=>{var d;this._listeners||(this._listeners=new S.a);const u=this._listeners.isEmpty();u&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const o=this._listeners.push(l?[n,l]:n);u&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,n,l);const s=(d=this._leakageMon)===null||d===void 0?void 0:d.check(this._listeners.size),E=Object(g.i)(()=>{if(s&&s(),!this._disposed&&(o(),this._options&&this._options.onLastListenerRemove)){const b=this._listeners&&!this._listeners.isEmpty();b||this._options.onLastListenerRemove(this)}});return f instanceof g.b?f.add(E):Array.isArray(f)&&f.push(E),E}),this._event}fire(n){var l,f;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new S.a);for(let d of this._listeners)this._deliveryQueue.push([d,n]);for((l=this._perfMon)===null||l===void 0||l.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[d,u]=this._deliveryQueue.shift();try{typeof d=="function"?d.call(void 0,u):d[0].call(d[1],u)}catch(o){Object(N.f)(o)}}(f=this._perfMon)===null||f===void 0||f.stop()}}dispose(){var n,l,f,d,u;this._disposed||(this._disposed=!0,(n=this._listeners)===null||n===void 0||n.clear(),(l=this._deliveryQueue)===null||l===void 0||l.clear(),(d=(f=this._options)===null||f===void 0?void 0:f.onLastListenerRemove)===null||d===void 0||d.call(f),(u=this._leakageMon)===null||u===void 0||u.dispose())}}class h extends e{constructor(n){super(n);this._isPaused=0,this._eventQueue=new S.a,this._mergeFn=n==null?void 0:n.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const n=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(n))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(n){this._listeners&&(this._isPaused!==0?this._eventQueue.push(n):super.fire(n))}}class r extends h{constructor(n){var l;super(n);this._delay=(l=n.delay)!==null&&l!==void 0?l:100}fire(n){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(n)}}class c{constructor(){this.buffers=[]}wrapEvent(n){return(l,f,d)=>n(u=>{const o=this.buffers[this.buffers.length-1];o?o.push(()=>l.call(f,u)):l.call(f,u)},void 0,d)}bufferEvents(n){const l=[];this.buffers.push(l);const f=n();return this.buffers.pop(),l.forEach(d=>d()),f}}class i{constructor(){this.listening=!1,this.inputEvent=v.None,this.inputEventListener=g.a.None,this.emitter=new e({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(n){this.inputEvent=n,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=n(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(H,Z,I){"use strict";(function(N,g){I.d(Z,"b",function(){return f}),I.d(Z,"i",function(){return s}),I.d(Z,"f",function(){return E}),I.d(Z,"d",function(){return b}),I.d(Z,"g",function(){return p}),I.d(Z,"h",function(){return D}),I.d(Z,"c",function(){return R}),I.d(Z,"k",function(){return y}),I.d(Z,"j",function(){return x}),I.d(Z,"a",function(){return w}),I.d(Z,"e",function(){return P});var S;const k="en";let v=!1,m=!1,C=!1,_=!1,e=!1,h=!1,r=!1,c,i=k,n,l;const f=typeof self=="object"?self:typeof N=="object"?N:{};let d;typeof f.vscode!="undefined"&&typeof f.vscode.process!="undefined"?d=f.vscode.process:typeof g!="undefined"&&(d=g);const u=typeof((S=d==null?void 0:d.versions)===null||S===void 0?void 0:S.electron)=="string"&&d.type==="renderer";if(typeof navigator=="object"&&!u)l=navigator.userAgent,v=l.indexOf("Windows")>=0,m=l.indexOf("Macintosh")>=0,r=(l.indexOf("Macintosh")>=0||l.indexOf("iPad")>=0||l.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,C=l.indexOf("Linux")>=0,h=!0,c=navigator.language,i=c;else if(typeof d=="object"){v=d.platform==="win32",m=d.platform==="darwin",C=d.platform==="linux",_=C&&!!d.env.SNAP&&!!d.env.SNAP_REVISION,c=k,i=k;const A=d.env.VSCODE_NLS_CONFIG;if(A)try{const X=JSON.parse(A),z=X.availableLanguages["*"];c=X.locale,i=z||k,n=X._translationsConfigFile}catch(X){}e=!0}else console.error("Unable to resolve platform.");let o=0;m?o=1:v?o=3:C&&(o=2);const s=v,E=m,b=C,p=e,D=h,R=r,y=l,x=function(){if(f.setImmediate)return f.setImmediate.bind(f);if(typeof f.postMessage=="function"&&!f.importScripts){let z=[];f.addEventListener("message",B=>{if(B.data&&B.data.vscodeSetImmediateId)for(let U=0,L=z.length;U<L;U++){const G=z[U];if(G.id===B.data.vscodeSetImmediateId){z.splice(U,1),G.callback();return}}});let O=0;return B=>{const U=++O;z.push({id:U,callback:B}),f.postMessage({vscodeSetImmediateId:U},"*")}}if(typeof(d==null?void 0:d.nextTick)=="function")return d.nextTick.bind(d);const X=Promise.resolve();return z=>X.then(z)}(),w=m||r?2:v?1:3;let T=!0,F=!1;function P(){if(!F){F=!0;const A=new Uint8Array(2);A[0]=1,A[1]=2;const X=new Uint16Array(A.buffer);T=X[0]===(2<<8)+1}return T}}).call(this,I("IyRk"),I("Q2Ig"))},MlIO:function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){return function(g){var S=N,k=S.lib,v=k.Base,m=k.WordArray,C=S.x64={},_=C.Word=v.extend({init:function(h,r){this.high=h,this.low=r}}),e=C.WordArray=v.extend({init:function(h,r){h=this.words=h||[],r!=g?this.sigBytes=r:this.sigBytes=h.length*8},toX32:function(){for(var h=this.words,r=h.length,c=[],i=0;i<r;i++){var n=h[i];c.push(n.high),c.push(n.low)}return m.create(c,this.sigBytes)},clone:function(){for(var h=v.clone.call(this),r=h.words=this.words.slice(0),c=r.length,i=0;i<c;i++)r[i]=r[i].clone();return h}})}(),N})},N0LK:function(H,Z,I){"use strict";I.d(Z,"C",function(){return N}),I.d(Z,"v",function(){return S}),I.d(Z,"s",function(){return k}),I.d(Z,"t",function(){return v}),I.d(Z,"U",function(){return m}),I.d(Z,"J",function(){return C}),I.d(Z,"O",function(){return _}),I.d(Z,"p",function(){return e}),I.d(Z,"T",function(){return h}),I.d(Z,"q",function(){return r}),I.d(Z,"N",function(){return c}),I.d(Z,"M",function(){return i}),I.d(Z,"Q",function(){return n}),I.d(Z,"u",function(){return l}),I.d(Z,"x",function(){return f}),I.d(Z,"I",function(){return d}),I.d(Z,"f",function(){return u}),I.d(Z,"h",function(){return o}),I.d(Z,"g",function(){return s}),I.d(Z,"i",function(){return E}),I.d(Z,"G",function(){return b}),I.d(Z,"H",function(){return p}),I.d(Z,"r",function(){return D}),I.d(Z,"R",function(){return R}),I.d(Z,"d",function(){return y}),I.d(Z,"e",function(){return x}),I.d(Z,"E",function(){return w}),I.d(Z,"F",function(){return T}),I.d(Z,"j",function(){return F}),I.d(Z,"z",function(){return P}),I.d(Z,"K",function(){return X}),I.d(Z,"L",function(){return z}),I.d(Z,"m",function(){return B}),I.d(Z,"k",function(){return L}),I.d(Z,"A",function(){return ee}),I.d(Z,"a",function(){return oe}),I.d(Z,"n",function(){return ae}),I.d(Z,"l",function(){return be}),I.d(Z,"D",function(){return _e}),I.d(Z,"B",function(){return fe}),I.d(Z,"b",function(){return Re}),I.d(Z,"S",function(){return Oe}),I.d(Z,"o",function(){return de}),I.d(Z,"P",function(){return te}),I.d(Z,"w",function(){return W}),I.d(Z,"c",function(){return Y}),I.d(Z,"y",function(){return q});function N($){return!$||typeof $!="string"?!0:$.trim().length===0}const g=/{(\d+)}/g;function S($,...le){return le.length===0?$:$.replace(g,function(ce,we){const Fe=parseInt(we,10);return isNaN(Fe)||Fe<0||Fe>=le.length?ce:le[Fe]})}function k($){return $.replace(/[<>&]/g,function(le){switch(le){case"<":return"<";case">":return">";case"&":return"&";default:return le}})}function v($){return $.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function m($,le=" "){const ce=C($,le);return _(ce,le)}function C($,le){if(!$||!le)return $;const ce=le.length;if(ce===0||$.length===0)return $;let we=0;for(;$.indexOf(le,we)===we;)we=we+ce;return $.substring(we)}function _($,le){if(!$||!le)return $;const ce=le.length,we=$.length;if(ce===0||we===0)return $;let Fe=we,Xe=-1;for(;!(Xe=$.lastIndexOf(le,Fe-1),Xe===-1||Xe+ce!==Fe);){if(Xe===0)return"";Fe=Xe}return $.substring(0,Fe)}function e($){return $.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function h($){return $.replace(/\*/g,"")}function r($,le,ce={}){if(!$)throw new Error("Cannot create regex from empty string");le||($=v($)),ce.wholeWord&&(/\B/.test($.charAt(0))||($="\\b"+$),/\B/.test($.charAt($.length-1))||($=$+"\\b"));let we="";return ce.global&&(we+="g"),ce.matchCase||(we+="i"),ce.multiline&&(we+="m"),ce.unicode&&(we+="u"),new RegExp($,we)}function c($){if($.source==="^"||$.source==="^$"||$.source==="$"||$.source==="^\\s*$")return!1;const le=$.exec("");return!!(le&&$.lastIndex===0)}function i($){return($.global?"g":"")+($.ignoreCase?"i":"")+($.multiline?"m":"")+($.unicode?"u":"")}function n($){return $.split(/\r\n|\r|\n/)}function l($){for(let le=0,ce=$.length;le<ce;le++){const we=$.charCodeAt(le);if(we!==32&&we!==9)return le}return-1}function f($,le=0,ce=$.length){for(let we=le;we<ce;we++){const Fe=$.charCodeAt(we);if(Fe!==32&&Fe!==9)return $.substring(le,we)}return $.substring(le,ce)}function d($,le=$.length-1){for(let ce=le;ce>=0;ce--){const we=$.charCodeAt(ce);if(we!==32&&we!==9)return ce}return-1}function u($,le){return $<le?-1:$>le?1:0}function o($,le,ce=0,we=$.length,Fe=0,Xe=le.length){for(;ce<we&&Fe<Xe;ce++,Fe++){let Ze=$.charCodeAt(ce),qe=le.charCodeAt(Fe);if(Ze<qe)return-1;if(Ze>qe)return 1}const $e=we-ce,Ye=Xe-Fe;return $e<Ye?-1:$e>Ye?1:0}function s($,le){return E($,le,0,$.length,0,le.length)}function E($,le,ce=0,we=$.length,Fe=0,Xe=le.length){for(;ce<we&&Fe<Xe;ce++,Fe++){let Ze=$.charCodeAt(ce),qe=le.charCodeAt(Fe);if(Ze===qe)continue;if(Ze>=128||qe>=128)return o($.toLowerCase(),le.toLowerCase(),ce,we,Fe,Xe);b(Ze)&&(Ze-=32),b(qe)&&(qe-=32);const Pe=Ze-qe;if(Pe===0)continue;return Pe}const $e=we-ce,Ye=Xe-Fe;return $e<Ye?-1:$e>Ye?1:0}function b($){return $>=97&&$<=122}function p($){return $>=65&&$<=90}function D($,le){return $.length===le.length&&E($,le)===0}function R($,le){const ce=le.length;return le.length>$.length?!1:E($,le,0,ce)===0}function y($,le){let ce,we=Math.min($.length,le.length);for(ce=0;ce<we;ce++)if($.charCodeAt(ce)!==le.charCodeAt(ce))return ce;return we}function x($,le){let ce,we=Math.min($.length,le.length);const Fe=$.length-1,Xe=le.length-1;for(ce=0;ce<we;ce++)if($.charCodeAt(Fe-ce)!==le.charCodeAt(Xe-ce))return ce;return we}function w($){return 55296<=$&&$<=56319}function T($){return 56320<=$&&$<=57343}function F($,le){return($-55296<<10)+(le-56320)+65536}function P($,le,ce){const we=$.charCodeAt(ce);if(w(we)&&ce+1<le){const Fe=$.charCodeAt(ce+1);if(T(Fe))return F(we,Fe)}return we}function A($,le){const ce=$.charCodeAt(le-1);if(T(ce)&&le>1){const we=$.charCodeAt(le-2);if(w(we))return F(we,ce)}return ce}function X($,le){const ce=V.getInstance(),we=le,Fe=$.length,Xe=P($,Fe,le);le+=Xe>=65536?2:1;let $e=ce.getGraphemeBreakType(Xe);for(;le<Fe;){const Ye=P($,Fe,le),Ze=ce.getGraphemeBreakType(Ye);if(Y($e,Ze))break;le+=Ye>=65536?2:1,$e=Ze}return le-we}function z($,le){const ce=V.getInstance(),we=le,Fe=A($,le);le-=Fe>=65536?2:1;let Xe=ce.getGraphemeBreakType(Fe);for(;le>0;){const $e=A($,le),Ye=ce.getGraphemeBreakType($e);if(Y(Ye,Xe))break;le-=$e>=65536?2:1,Xe=Ye}return we-le}const O=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function B($){return O.test($)}const U=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function L($){return U.test($)}const G=/^[\t\n\r\x20-\x7E]*$/;function ee($){return G.test($)}const oe=/[\u2028\u2029]/;function ae($){return oe.test($)}function be($){for(let le=0,ce=$.length;le<ce;le++)if(_e($.charCodeAt(le)))return!0;return!1}function _e($){return $=+$,$>=11904&&$<=55215||$>=63744&&$<=64255||$>=65281&&$<=65374}function fe($){return $>=127462&&$<=127487||$===8986||$===8987||$===9200||$===9203||$>=9728&&$<=10175||$===11088||$===11093||$>=127744&&$<=128591||$>=128640&&$<=128764||$>=128992&&$<=129003||$>=129280&&$<=129535||$>=129648&&$<=129750}const Re=String.fromCharCode(65279);function Oe($){return!!($&&$.length>0&&$.charCodeAt(0)===65279)}function de($,le=!1){return $?(le&&($=$.replace(/\\./g,"")),$.toLowerCase()!==$):!1}function te($){const le=90-65+1;return $=$%(2*le),$<le?String.fromCharCode(97+$):String.fromCharCode(65+$-le)}function W($){const le=V.getInstance();return le.getGraphemeBreakType($)}function Y($,le){return $===0?le!==5&&le!==7:$===2&&le===3?!1:$===4||$===2||$===3||(le===4||le===2||le===3)?!0:$===8&&(le===8||le===9||le===11||le===12)||(($===11||$===9)&&(le===9||le===10)||(($===12||$===10)&&le===10||(le===5||le===13||(le===7||($===1||$===13&&le===14)))))?!1:!($===6&&le===6)}class V{constructor(){this._data=Q()}static getInstance(){return V._INSTANCE||(V._INSTANCE=new V),V._INSTANCE}getGraphemeBreakType($){if($<32)return $===10?3:$===13?2:4;if($<127)return 0;const le=this._data,ce=le.length/3;let we=1;for(;we<=ce;)if($<le[3*we])we=2*we;else if($>le[3*we+1])we=2*we+1;else return le[3*we+2];return 0}}V._INSTANCE=null;function Q(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function q($,le){if($===0)return 0;const ce=ie($,le);if(ce!==void 0)return ce;const we=A(le,$);return $-=ne(we),$}function ie($,le){let ce=A(le,$);for($-=ne(ce);J(ce)||ce===65039||ce===8419;){if($===0)return;ce=A(le,$),$-=ne(ce)}if(!fe(ce))return;if($>=0){const we=A(le,$);we===8205&&($-=ne(we))}return $}function ne($){return $>=65536?2:1}function J($){return 127995<=$&&$<=127999}},NFKh:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("MlIO"),I("F+F2"),I("qM6L"),I("ETIr"),I("wbyO"),I("cv67"),I("3y9D"),I("lPiR"),I("GRuw"),I("1uat"),I("uGsb"),I("5hvy"),I("ELcG"),I("WYAk"),I("e7zE"),I("K3mO"),I("OLod"),I("ALsQ"),I("9OqN"),I("qu8F"),I("S6kV"),I("gb/T"),I("qBft"),I("oRuE"),I("jO9C"),I("KmYQ"),I("uGxW"),I("bQjk"),I("wZgz"),I("pA7S"),I("w7YG"),I("E4JC"),I("PVpz"))})(this,function(N){return N})},NvD2:function(H,Z,I){"use strict";I.d(Z,"a",function(){return m});var N=I("Kwbf");function g(C,_){var e=new Set;return C.forEach(function(h){_.has(h)||e.add(h)}),e}function S(C){var _=C||{},e=_.disabled,h=_.disableCheckbox,r=_.checkable;return!!(e||h)||r===!1}function k(C,_,e,h){for(var r=new Set(C),c=new Set,i=0;i<=e;i+=1){var n=_.get(i)||new Set;n.forEach(function(u){var o=u.key,s=u.node,E=u.children,b=E===void 0?[]:E;r.has(o)&&!h(s)&&b.filter(function(p){return!h(p.node)}).forEach(function(p){r.add(p.key)})})}for(var l=new Set,f=e;f>=0;f-=1){var d=_.get(f)||new Set;d.forEach(function(u){var o=u.parent,s=u.node;if(h(s)||!u.parent||l.has(u.parent.key))return;if(h(u.parent.node)){l.add(o.key);return}var E=!0,b=!1;(o.children||[]).filter(function(p){return!h(p.node)}).forEach(function(p){var D=p.key,R=r.has(D);E&&!R&&(E=!1),!b&&(R||c.has(D))&&(b=!0)}),E&&r.add(o.key),b&&c.add(o.key),l.add(o.key)})}return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(g(c,r))}}function v(C,_,e,h,r){for(var c=new Set(C),i=new Set(_),n=0;n<=h;n+=1){var l=e.get(n)||new Set;l.forEach(function(o){var s=o.key,E=o.node,b=o.children,p=b===void 0?[]:b;!c.has(s)&&!i.has(s)&&!r(E)&&p.filter(function(D){return!r(D.node)}).forEach(function(D){c.delete(D.key)})})}i=new Set;for(var f=new Set,d=h;d>=0;d-=1){var u=e.get(d)||new Set;u.forEach(function(o){var s=o.parent,E=o.node;if(r(E)||!o.parent||f.has(o.parent.key))return;if(r(o.parent.node)){f.add(s.key);return}var b=!0,p=!1;(s.children||[]).filter(function(D){return!r(D.node)}).forEach(function(D){var R=D.key,y=c.has(R);b&&!y&&(b=!1),!p&&(y||i.has(R))&&(p=!0)}),b||c.delete(s.key),p&&i.add(s.key),f.add(s.key)})}return{checkedKeys:Array.from(c),halfCheckedKeys:Array.from(g(i,c))}}function m(C,_,e,h){var r=[],c;h?c=h:c=S;var i=new Set(C.filter(function(d){var u=!!e[d];return u||r.push(d),u})),n=new Map,l=0;Object.keys(e).forEach(function(d){var u=e[d],o=u.level,s=n.get(o);s||(s=new Set,n.set(o,s)),s.add(u),l=Math.max(l,o)}),Object(N.a)(!r.length,"Tree missing follow keys: ".concat(r.slice(0,100).map(function(d){return"'".concat(d,"'")}).join(", ")));var f;return _===!0?f=k(i,n,l,c):f=v(i,_.halfCheckedKeys,n,l,c),f}},OLod:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("K3mO"))})(this,function(N){N.lib.Cipher||function(g){var S=N,k=S.lib,v=k.Base,m=k.WordArray,C=k.BufferedBlockAlgorithm,_=S.enc,e=_.Utf8,h=_.Base64,r=S.algo,c=r.EvpKDF,i=k.Cipher=C.extend({cfg:v.extend(),createEncryptor:function(w,T){return this.create(this._ENC_XFORM_MODE,w,T)},createDecryptor:function(w,T){return this.create(this._DEC_XFORM_MODE,w,T)},init:function(w,T,F){this.cfg=this.cfg.extend(F),this._xformMode=w,this._key=T,this.reset()},reset:function(){C.reset.call(this),this._doReset()},process:function(w){return this._append(w),this._process()},finalize:function(w){w&&this._append(w);var T=this._doFinalize();return T},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function w(T){return typeof T=="string"?x:D}return function(T){return{encrypt:function(F,P,A){return w(P).encrypt(T,F,P,A)},decrypt:function(F,P,A){return w(P).decrypt(T,F,P,A)}}}}()}),n=k.StreamCipher=i.extend({_doFinalize:function(){var w=this._process(!0);return w},blockSize:1}),l=S.mode={},f=k.BlockCipherMode=v.extend({createEncryptor:function(w,T){return this.Encryptor.create(w,T)},createDecryptor:function(w,T){return this.Decryptor.create(w,T)},init:function(w,T){this._cipher=w,this._iv=T}}),d=l.CBC=function(){var w=f.extend();w.Encryptor=w.extend({processBlock:function(F,P){var A=this._cipher,X=A.blockSize;T.call(this,F,P,X),A.encryptBlock(F,P),this._prevBlock=F.slice(P,P+X)}}),w.Decryptor=w.extend({processBlock:function(F,P){var A=this._cipher,X=A.blockSize,z=F.slice(P,P+X);A.decryptBlock(F,P),T.call(this,F,P,X),this._prevBlock=z}});function T(F,P,A){var X,z=this._iv;z?(X=z,this._iv=g):X=this._prevBlock;for(var O=0;O<A;O++)F[P+O]^=X[O]}return w}(),u=S.pad={},o=u.Pkcs7={pad:function(w,T){for(var F=T*4,P=F-w.sigBytes%F,A=P<<24|P<<16|P<<8|P,X=[],z=0;z<P;z+=4)X.push(A);var O=m.create(X,P);w.concat(O)},unpad:function(w){var T=w.words[w.sigBytes-1>>>2]&255;w.sigBytes-=T}},s=k.BlockCipher=i.extend({cfg:i.cfg.extend({mode:d,padding:o}),reset:function(){var w;i.reset.call(this);var T=this.cfg,F=T.iv,P=T.mode;this._xformMode==this._ENC_XFORM_MODE?w=P.createEncryptor:(w=P.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==w?this._mode.init(this,F&&F.words):(this._mode=w.call(P,this,F&&F.words),this._mode.__creator=w)},_doProcessBlock:function(w,T){this._mode.processBlock(w,T)},_doFinalize:function(){var w,T=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(T.pad(this._data,this.blockSize),w=this._process(!0)):(w=this._process(!0),T.unpad(w)),w},blockSize:128/32}),E=k.CipherParams=v.extend({init:function(w){this.mixIn(w)},toString:function(w){return(w||this.formatter).stringify(this)}}),b=S.format={},p=b.OpenSSL={stringify:function(w){var T,F=w.ciphertext,P=w.salt;return P?T=m.create([1398893684,1701076831]).concat(P).concat(F):T=F,T.toString(h)},parse:function(w){var T,F=h.parse(w),P=F.words;return P[0]==1398893684&&P[1]==1701076831&&(T=m.create(P.slice(2,4)),P.splice(0,4),F.sigBytes-=16),E.create({ciphertext:F,salt:T})}},D=k.SerializableCipher=v.extend({cfg:v.extend({format:p}),encrypt:function(w,T,F,P){P=this.cfg.extend(P);var A=w.createEncryptor(F,P),X=A.finalize(T),z=A.cfg;return E.create({ciphertext:X,key:F,iv:z.iv,algorithm:w,mode:z.mode,padding:z.padding,blockSize:w.blockSize,formatter:P.format})},decrypt:function(w,T,F,P){P=this.cfg.extend(P),T=this._parse(T,P.format);var A=w.createDecryptor(F,P).finalize(T.ciphertext);return A},_parse:function(w,T){return typeof w=="string"?T.parse(w,this):w}}),R=S.kdf={},y=R.OpenSSL={execute:function(w,T,F,P){P||(P=m.random(64/8));var A=c.create({keySize:T+F}).compute(w,P),X=m.create(A.words.slice(T),F*4);return A.sigBytes=T*4,E.create({key:A,iv:X,salt:P})}},x=k.PasswordBasedCipher=D.extend({cfg:D.cfg.extend({kdf:y}),encrypt:function(w,T,F,P){P=this.cfg.extend(P);var A=P.kdf.execute(F,w.keySize,w.ivSize);P.iv=A.iv;var X=D.encrypt.call(this,w,T,A.key,P);return X.mixIn(A),X},decrypt:function(w,T,F,P){P=this.cfg.extend(P),T=this._parse(T,P.format);var A=P.kdf.execute(F,w.keySize,w.ivSize,T.salt);P.iv=A.iv;var X=D.decrypt.call(this,w,T,A.key,P);return X}})}()})},OZM5:function(H,Z,I){"use strict";I.d(Z,"b",function(){return h}),I.d(Z,"a",function(){return r}),I.d(Z,"k",function(){return c}),I.d(Z,"h",function(){return i}),I.d(Z,"i",function(){return n}),I.d(Z,"g",function(){return l}),I.d(Z,"c",function(){return f}),I.d(Z,"d",function(){return d}),I.d(Z,"j",function(){return s}),I.d(Z,"e",function(){return E}),I.d(Z,"f",function(){return b});var N=I("KQm4"),g=I("U8pU"),S=I("Ff2n"),k=I("q1tI"),v=I.n(k),m=I("Kwbf"),C=I("WaYH"),_=.25,e=2;function h(p,D){var R=p.slice(),y=R.indexOf(D);return y>=0&&R.splice(y,1),R}function r(p,D){var R=p.slice();return R.indexOf(D)===-1&&R.push(D),R}function c(p){return p.split("-")}function i(p,D){return"".concat(p,"-").concat(D)}function n(p){return p&&p.type&&p.type.isTreeNode}function l(p,D){var R=[p],y=D[p];function x(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];w.forEach(function(T){var F=T.key,P=T.children;R.push(F),x(P)})}return x(y.children),R}function f(p,D){var R=p.clientY,y=D.selectHandle.getBoundingClientRect(),x=y.top,w=y.bottom,T=y.height,F=Math.max(T*_,e);return R<=x+F?-1:R>=w-F?1:0}function d(p,D){if(!p)return;var R=D.multiple;return R?p.slice():p.length?[p[0]]:p}var u=function(D){return D};function o(p,D){if(!p)return[];var R=D||{},y=R.processProps,x=y===void 0?u:y,w=Array.isArray(p)?p:[p];return w.map(function(T){var F=T.children,P=Object(S.a)(T,["children"]),A=o(F,D);return v.a.createElement(C.a,Object.assign({},x(P)),A)})}function s(p){if(!p)return null;var D;if(Array.isArray(p))D={checkedKeys:p,halfCheckedKeys:void 0};else if(Object(g.a)(p)==="object")D={checkedKeys:p.checked||void 0,halfCheckedKeys:p.halfChecked||void 0};else return Object(m.a)(!1,"`checkedKeys` is not an array or an object"),null;return D}function E(p,D){var R=new Set;function y(x){if(R.has(x))return;var w=D[x];if(!w)return;R.add(x);var T=w.parent,F=w.node;if(F.disabled)return;T&&y(T.key)}return(p||[]).forEach(function(x){y(x)}),Object(N.a)(R)}function b(p){var D={};return Object.keys(p).forEach(function(R){(R.startsWith("data-")||R.startsWith("aria-"))&&(D[R]=p[R])}),D}},Ot1p:function(H,Z,I){"use strict";var N=I("2qtc"),g=I("kLXV"),S=I("rAM+"),k=I("miYZ"),v=I("tsqr"),m=I("9og8"),C=I("tJVT"),_=I("jrin"),e=I("WmNS"),h=I.n(e),r=I("q1tI"),c=I.n(r),i=I("VrN/"),n=I.n(i),l=I("bdgK"),f=I("p77/"),d=I("Bd2K"),u=I("ELLl"),o=I("19Vz"),s=I("lZu9"),E=I("+NIl"),b=I("kSUc"),p=I("9Bee"),D=function(Me){var He=Me.value,nt=He===void 0?"":He,at=Me.className,it=Me.showTextOnly,st=Me.showLines,Tt=Me.style,pt=Tt===void 0?{}:Tt,ht=Object(r.useMemo)(function(){return""},[nt]);return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{dangerouslySetInnerHTML:{__html:ht}}))},R=I("0Owb"),y=I("dejd"),x=I("C+DQ"),w=I("1vsH"),T=I("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 P(Me){var He=Me.onActionCallback,nt=Me.title,at=Me.icon,it=Me.actionName,st=Me.className,Tt=st===void 0?"":st,pt=Me.children;function ht(){He(it)}return c.a.createElement("a",{title:nt,className:Tt,onClick:ht},c.a.createElement("i",{className:"md-iconfont ".concat(at)}),pt)}var A=function(Me){var He=Me.watch,nt=Me.showNullButton,at=Me.onActionCallback,it=Me.fullScreen,st=Me.insertTemp,Tt=Me.hidetoolBar,pt=Me.uuid,ht=Me.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(w.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(w.F)("_educoder_session"),"&key=").concat(pt,"&api=").concat(encodeURIComponent(T.a.PROXY_SERVER)));var Ft=[].concat(F,[{title:"".concat(He?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(He?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return c.a.createElement("ul",{className:"markdown-toolbar-container"},!Tt&&Ft.map(function(Lt,Yt){return c.a.createElement("li",{key:Yt},Lt.actionName?c.a.createElement(P,Object(R.a)({},Lt,{onActionCallback:at})):c.a.createElement("span",{className:"v-line"}))}),nt?c.a.createElement("li",null,c.a.createElement(P,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:at},c.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,st&&c.a.createElement("li",null,c.a.createElement(P,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(st),onActionCallback:at},c.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),c.a.createElement("li",{className:"btn-full-screen"},c.a.createElement(P,{icon:"".concat(it?"icon-shrink":"icon-enlarge"),title:it?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:at})))},X=I("M8RZ"),z=I("+L6B"),O=I("2/Rp"),B=I("y8nQ"),U=I("Vl3Y"),L=I("5NDa"),G=I("5rEg"),ee={labelCol:{span:4},wrapperCol:{span:20}},oe=function(Me){var He=Me.callback,nt=Me.onCancel;function at(it){He(it)}return c.a.createElement(U.a,Object(R.a)({},ee,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:at}),c.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},c.a.createElement(G.a,null)),c.a.createElement(U.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},c.a.createElement(G.a,null)),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(O.a,{type:"ghost",onClick:nt},"\u53D6\u6D88")))},ae=I("7ahc"),be=I("HmJG"),_e=I("BjJ7"),fe=U.a.useForm,Re={width:280,marginRight:10},Oe={labelCol:{span:5},wrapperCol:{span:19}},de=function(Me){var He=Me.callback,nt=Me.onCancel,at=fe(),it=Object(C.a)(at,1),st=it[0];function Tt(Ft){He(Ft)}function pt(Ft,Lt){if(Ft.status===-1){v.b.error(Ft.message);return}st.setFieldsValue({src:"/api/attachments/".concat(Ft.id),type:Lt.type})}function ht(Ft){var Lt=Ft.target.files[0];W(Lt,pt)}return c.a.createElement(U.a,Object(R.a)({form:st},Oe,{className:"upload-image-panel",onFinish:Tt}),c.a.createElement(U.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},c.a.createElement("div",{className:"flex-container"},c.a.createElement(U.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},c.a.createElement(G.a,{style:Re})),c.a.createElement(te,{onFileChange:ht}))),c.a.createElement(U.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},c.a.createElement(G.a,{style:{width:264}})),c.a.createElement(U.a.Item,{style:{textAlign:"right"}},c.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(O.a,{type:"ghost",onClick:nt},"\u53D6\u6D88")))};function te(Me){var He=Me.onFileChange;return c.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",c.a.createElement("input",{type:"file",onChange:He}))}function W(Me,He){if(!Me)throw new String("\u6CA1\u6709\u6587\u4EF6");var nt=new FormData;nt.append("editormd-image-file",Me),nt.append("file_param_name","editormd-image-file"),nt.append("byxhr","true");var at=new window.XMLHttpRequest;at.withCredentials=!0,at.addEventListener("load",function(it){He(JSON.parse(it.target.responseText),Me)},!1),at.addEventListener("error",function(it){console.error(it)},!1),at.open("POST","".concat(_e.a,"/api/attachments.json")),at.send(nt)}var Y=I("giR+"),V=I("fyUT"),Q=I("7Kak"),q=I("9yH6"),ie=q.a.Group,ne={margin:"0 8px"},J=function(Me){var He=Me.callback,nt=Me.onCancel;function at(it){He(it)}return c.a.createElement(U.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:at},c.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},c.a.createElement("span",{style:ne},"\u5355\u5143\u683C\u6570\uFF1A"),c.a.createElement("span",{style:ne},"\u884C\u6570"),c.a.createElement(U.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},c.a.createElement(V.a,null)),c.a.createElement("span",{style:ne},"\u5217\u6570"),c.a.createElement(U.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},c.a.createElement(V.a,null))),c.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},c.a.createElement("span",{style:ne},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),c.a.createElement(U.a.Item,{name:"align"},c.a.createElement(ie,null,c.a.createElement(q.a,{value:"default"},c.a.createElement("i",{className:"fa fa-align-justify"})),c.a.createElement(q.a,{value:"left"},c.a.createElement("i",{className:"fa fa-align-left"})),c.a.createElement(q.a,{value:"center"},c.a.createElement("i",{className:"fa fa-align-center"})),c.a.createElement(q.a,{value:"right"},c.a.createElement("i",{className:"fa fa-align-right"}))))),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),c.a.createElement(O.a,{type:"ghost",onClick:nt},"\u53D6\u6D88")))},$=I("ErOA"),le=I("7Cbv"),ce="link",we="upload-image",Fe="code-block",Xe="add-table",$e="------------",Ye={default:$e,left:":".concat($e),center:":".concat($e,":"),right:"".concat($e,":")},Ze=I("9VGf"),qe,Pe;function Ie(){}var Je=0,rt=1e4,ye="\u2581",ue=`
|
|
|
**\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 he(Me){return/^\d+$/.test(Me)?"".concat(Me,"px"):Me}var me=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ce=me?"Cmd":"Ctrl",ge=["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=(qe={},Object(_.a)(qe,Ce+"-B","bold"),Object(_.a)(qe,Ce+"-I","italic"),qe),Ae=(Pe={},Object(_.a)(Pe,ce,"\u6DFB\u52A0\u94FE\u63A5"),Object(_.a)(Pe,Fe,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(_.a)(Pe,we,"\u6DFB\u52A0\u6587\u4EF6"),Object(_.a)(Pe,Xe,"\u6DFB\u52A0\u8868\u683C"),Pe),De=Z.a=function(Me){var He=Me.defaultValue,nt=He===void 0?"":He,at=Me.onChange,it=Me.width,st=it===void 0?"100%":it,Tt=Me.height,pt=Tt===void 0?400:Tt,ht=Me.miniToolbar,Ft=ht===void 0?!1:ht,Lt=Me.isFocus,Yt=Lt===void 0?!1:Lt,$t=Me.watch,Mt=Me.insertTemp,wt=Me.mode,Jt=wt===void 0?"markdown":wt,Dt=Me.id,St=Dt===void 0?"markdown-editor-id":Dt,_t=Me.showResizeBar,Et=_t===void 0?!1:_t,Bt=Me.noStorage,Dr=Bt===void 0?!1:Bt,mt=Me.showNullButton,Ct=mt===void 0?!1:mt,dt=Me.hidetoolBar,Ht=dt===void 0?!1:dt,Gt=Me.fullScreen,yt=Gt===void 0?!1:Gt,xt=Me.onBlur,Kt=Me.onCMBeforeChange,Ar=Me.onFullScreen,qt=Me.className,ut=qt===void 0?"":qt,kt=Me.disablePaste,Hr=kt===void 0?!1:kt,Yr=Me.placeholder,On=Yr===void 0?"":Yr,cn=Me.values,zr=cn===void 0?"":cn,Pt=Object(r.useState)(null),dn=Object(C.a)(Pt,2),ct=dn[0],jr=dn[1],xr=Object(r.useState)(nt),Gn=Object(C.a)(xr,2),An=Gn[0],hn=Gn[1],Ei=Object(r.useState)($t),Kn=Object(C.a)(Ei,2),bn=Kn[0],Fr=Kn[1],di=Object(r.useState)(yt),fn=Object(C.a)(di,2),Vr=fn[0],dr=fn[1],nn=Object(r.useState)(""),_n=Object(C.a)(nn,2),jt=_n[0],lr=_n[1],ur=Object(r.useState)(0),Rr=Object(C.a)(ur,2),br=Rr[0],hi=Rr[1],Fn=Object(r.useState)(pt),$i=Object(C.a)(Fn,2),Ji=$i[0],Oi=$i[1],pn=Object(r.useState)(!1),Ki=Object(C.a)(pn,2),Zr=Ki[0],ri=Ki[1],kn=Object(r.useRef)(Object(le.a)()),sn=Object(r.useRef)(!1),Tn=Object(r.useRef)(),fi=Object(r.useRef)(),zn=Object(r.useRef)(),Vn=Object(r.useRef)(),ki=Object(r.useRef)(),Mi=function(){var Ut=Object(m.a)(h.a.mark(function er(){var zt,ar;return h.a.wrap(function(Lr){for(;;)switch(Lr.prev=Lr.next){case 0:return Lr.next=2,Object($.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:kn.current}});case 2:ar=Lr.sent,ar!=null&&(zt=ar.attachments)!==null&&zt!==void 0&&zt.length&&(console.log("cm:",ct,fi),ar.attachments.map(function(mr){mr.content_type.indexOf("image")>-1?ct.replaceSelection(".concat(mr.content_type,")")):mr.content_type.indexOf("video")>-1?ct.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):mr.content_type.indexOf("pdf")>-1?ct.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(mr.id,"?type=").concat(mr.content_type,'&disposition=inline" target="_blank">').concat(mr.name,"</a>")):ct.replaceSelection("[".concat(mr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(mr.id,"?type=").concat(mr.content_type,")"))}));case 4:case"end":return Lr.stop()}},er)}));return function(){return Ut.apply(this,arguments)}}();Object(r.useEffect)(function(){hn(zr),ct==null||ct.setValue(zr)},[zr]),Object(r.useEffect)(function(){Ar==null||Ar(Vr)},[Vr]),Object(r.useEffect)(function(){if(fi.current){var Ut=n.a.fromTextArea(fi.current,{mode:Jt,lineNumbers:!Ft,lineWrapping:!0,value:nt,autoCloseTags:!0,autoCloseBrackets:!0});Yt&&Ut.focus();function er(zt,ar){if(Hr){ar.preventDefault();return}var _r=ar.clipboardData;if(_r){var Lr=_r.types.toString(),mr=_r.items;if(Lr==="Files"||_r.types.indexOf("Files")>-1){if(ar.preventDefault(),Jt=="stex")return;try{var qr,Un=mr[1];((qr=mr[0])===null||qr===void 0?void 0:qr.kind)==="file"&&(Un=mr[0]);var hr=Un.getAsFile(),vi=hr.name.split(".").pop();W(hr,function(kr){if(kr.id){var Sn,Rn,li;(hr==null||((Sn=hr.type)===null||Sn===void 0)?void 0:Sn.indexOf("image"))>-1?Ut.replaceSelection(".concat(kr.content_type,")")):(hr==null||((Rn=hr.type)===null||Rn===void 0)?void 0:Rn.indexOf("video"))>-1?Ut.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(kr.id,'"></video>')):(hr==null||((li=hr.type)===null||li===void 0)?void 0:li.indexOf("pdf"))>-1?Ut.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(kr.id,"?type=").concat(hr.type,'&disposition=inline" target="_blank">').concat(hr.name,"</a>")):ge.includes(vi)?Ut.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(kr.id,'?type=office&disposition=inline" target="_blank">').concat(hr.name,"</a>")):Ut.replaceSelection("[".concat(hr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(kr.id,"?type=").concat(kr.content_type,")"))}else(kr==null?void 0:kr.status)===401&&(document.location.href="/user/login")})}catch(kr){v.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Ut.on("paste",er),Ut.on("dragleave",function(zt,ar){zn.current.classList.remove("mouse-hover-md")}),Ut.on("dragover",function(zt,ar){zn.current.classList.add("mouse-hover-md")}),Ut.on("drop",function(zt,ar){zn.current.classList.add("mouse-hover-md");var _r;if(_r=ar.dataTransfer.files,_r.length>0){ar.preventDefault(),ar.stopPropagation();for(var Lr=function(Un){var hr=_r[Un],vi=hr.name.split(".").pop();W(hr,function(kr){if(kr.id){var Sn,Rn,li;(hr==null||((Sn=hr.type)===null||Sn===void 0)?void 0:Sn.indexOf("image"))>-1?Ut.replaceSelection(".concat(kr.content_type,")")):(hr==null||((Rn=hr.type)===null||Rn===void 0)?void 0:Rn.indexOf("video"))>-1?Ut.replaceSelection('<video width="100%" controls src="'.concat(T.a.API_SERVER,"/api/attachments/").concat(kr.id,'"></video>')):(hr==null||((li=hr.type)===null||li===void 0)?void 0:li.indexOf("pdf"))>-1?Ut.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(kr.id,"?type=").concat(hr.type,'&disposition=inline" target="_blank">').concat(hr.name,"</a>")):ge.includes(vi)?Ut.replaceSelection('<a href="'.concat(T.a.API_SERVER,"/api/attachments/").concat(kr.id,'?type=office&disposition=inline" target="_blank">').concat(hr.name,"</a>")):Ut.replaceSelection("[".concat(hr.name,"](").concat(T.a.API_SERVER,"/api/attachments/").concat(kr.id,"?type=").concat(kr.content_type,")"))}else(kr==null?void 0:kr.status)===401&&(document.location.href="/user/login")})},mr=0;mr<_r.length;mr++)Lr(mr)}}),jr(Ut),function(){Ut.off("paste",er)}}},[]);var Xn=Object(r.useCallback)(function(){if(zn.current)try{}catch(Ut){console.log(Ut,"---- to set md editor body height")}},[Ji,zn,Vr]);Object(r.useEffect)(function(){function Ut(){var zt=new l.default(function(ar){var _r=Object(S.a)(ar),Lr;try{for(_r.s();!(Lr=_r.n()).done;){var mr=Lr.value;(mr.target.offsetHeight>0||mr.target.offsetWidth>0)&&(Xn(),ct.setSize("100%","100%"),ct.refresh())}}catch(qr){_r.e(qr)}finally{_r.f()}});return zt.observe(fi.current.parentElement),zt}if(ct){var er=Ut();return function(){er.unobserve(fi.current.parentElement)}}},[ct,Xn]),Object(r.useEffect)(function(){if(ct){for(var Ut=[],er=function(){var mr=ar[zt];_r=Object(C.a)(mr,2);var qr=_r[0],Un=_r[1],hr=Object(_.a)({},qr,function(){ji(Un)});Ut.push(hr),ct.addKeyMap(hr)},zt=0,ar=Object.entries(Ee);zt<ar.length;zt++){var _r;er()}return Tn.current=setInterval(function(){sn.current&&Mi()},4e3),function(){clearInterval(Tn.current);var Lr=Object(S.a)(Ut),mr;try{for(Lr.s();!(mr=Lr.n()).done;){var qr=mr.value;ct.removeKeyMap(qr)}}catch(Un){Lr.e(Un)}finally{Lr.f()}}}},[ct]),Object(r.useEffect)(function(){yt!==Vr&&dr(yt)},[yt]),Object(Ze.a)(function(){if(!Dr&&br>0){var Ut=new Date().getTime(),er=window.sessionStorage.getItem(St);Ut>=br+rt&&(!er||er!==An)&&(window.sessionStorage.setItem(St,An),ri(!0))}},rt),Object(r.useEffect)(function(){Fr($t)},[ct,$t]),Object(r.useEffect)(function(){ct&&(Yt&&ct.focus())},[ct,Yt]),Object(r.useEffect)(function(){if(bn&&ct){var Ut=ct.getScrollerElement();function er(zt){var ar=zt.target;if(ki.current){var _r=ar.scrollTop/ar.scrollHeight;ki.current.scrollTop=ki.current.scrollHeight*_r}}return Ut.addEventListener("scroll",er),function(){Ut.removeEventListener("scroll",er)}}},[ct,bn]),Object(r.useEffect)(function(){if(ct&&Kt){function Ut(er,zt){Kt(er,zt)}return ct.on("beforeChange",Ut),function(){ct.off("beforeChange",Ut)}}},[ct,Kt]),Object(r.useEffect)(function(){if(ct&&xt){function Ut(){xt(ct.getValue())}return ct.on("blur",Ut),function(){ct.off("blur",Ut)}}},[ct,xt]),Object(r.useEffect)(function(){if(ct){function Ut(er){var zt=er.getValue();hn(zt),hi(new Date().getTime()),er.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),at&&at(zt)}return ct.on("change",Ut),function(){ct.off("change",Ut)}}},[ct,at]),Object(r.useEffect)(function(){ct&&(nt==null?(ct.setValue(""),hn("")):nt!==ct.getValue()&&(ct.setValue(nt),hn(nt),ct.setCursor(ct.lineCount(),0)))},[ct,nt]);var ji=Object(r.useCallback)(function(Ut){var er=ct.getCursor(),zt=ct.getSelection(),ar=zt.split(`
|
|
|
`);switch(Ut){case"bold":return ct.replaceSelection("**"+zt+"**"),zt===""&&ct.setCursor(er.line,er.ch+2),ct.focus();case"italic":return ct.replaceSelection("*"+zt+"*"),zt===""&&ct.setCursor(er.line,er.ch+1),ct.focus();case"code":return ct.replaceSelection("`"+zt+"`"),zt===""&&ct.setCursor(er.line,er.ch+1),ct.focus();case"inline-latex":return ct.replaceSelection("`$$"+zt+"$$`"),zt===""&&ct.setCursor(er.line,er.ch+3),ct.focus();case"latex":return ct.replaceSelection("```latex\n"+zt+"\n```"),ct.setCursor(er.line+1,zt.length+1),ct.focus();case"line-break":return ct.replaceSelection(`<br/>
|
|
|
`),ct.focus();case"list-ul":return zt===""?ct.replaceSelection("- "+zt):ct.replaceSelection(ar.map(function(_r){return _r===""?"":"- ".concat(_r)}).join(`
|
|
|
`)),ct.focus();case"list-ol":return zt===""?ct.replaceSelection("1. "+zt):ct.replaceSelection(ar.map(function(_r,Lr){return _r===""?"":"".concat(Lr+1,". ").concat(_r)}).join(`
|
|
|
`)),ct.focus();case"add-null-ch":return zt===""&&ct.setCursor(er.line,er.ch+1),ct.replaceSelection(ye),ct.focus();case"inster-template-1":return zt===""&&ct.setCursor(er.line,er.ch),ct.replaceSelection(ue),ct.focus();case"eraser":return ct.setValue(""),ct.focus();case"trigger-watch":return Fr(!bn),ct.focus();case"trigger-full-screen":return dr(!Vr),ct.focus();case ce:lr(ce);return;case Fe:lr(Fe);return;case we:lr(we);return;case Xe:lr(Xe);return;default:throw new Error}},[ct,bn,Vr]),pi=Object(r.useCallback)(function(Ut){lr("");switch(jt){case ce:var er=Ut.title,zt=Ut.link;return ct.replaceSelection("[".concat(er,"](").concat(zt,")")),ct.focus();case Fe:var ar=Ut.language,_r=Ut.content;return ct.replaceSelection(["```"+ar,_r,"```"].join(`
|
|
|
`)),ct.focus();case we:var Lr=Ut.src,mr=Ut.alt;return mr?ct.replaceSelection(".concat(Lr,' "').concat(mr,'" )')):ct.replaceSelection("")),ct.focus();case Xe:for(var qr=Ut.row,Un=Ut.col,hr=Ut.align,vi=`
|
|
|
`,kr=0;kr<qr;kr++){for(var Sn=[],Rn=[],li=0;li<Un;li++)kr===1&&Rn.push(Ye[hr]),Sn.push(" ");kr===1&&(vi+="| ".concat(Rn.join(" | "),` |
|
|
|
`)),vi+="| ".concat(Sn.join(Un===1?"":" | "),` |
|
|
|
`)}return ct.replaceSelection(vi+`
|
|
|
`),ct.focus();default:throw new Error}},[ct,jt]),mi=Object(r.useMemo)(function(){switch(jt){case ce:return c.a.createElement(oe,{callback:pi,onCancel:Yn});case Fe:return c.a.createElement(ae.b,{callback:pi,onCancel:Yn});case we:return c.a.createElement(de,{callback:pi,onCancel:Yn});case Xe:return c.a.createElement(J,{callback:pi,onCancel:Yn});default:return null}},[jt]);function Yn(){lr("")}Object(r.useEffect)(function(){if(Vn.current){var Ut=Vn.current,er=!1,zt=0;function ar(mr){er=!0,zt=mr.pageY}function _r(){er=!1}function Lr(mr){if(er){var qr=mr.pageY-zt;qr<0&&(qr=0),qr>300&&(qr=300);var Un=pt+qr+"px";Oi(Un)}}return Ut.addEventListener("mousedown",ar),document.addEventListener("mousemove",Lr),document.addEventListener("mouseup",_r),function(){Ut.removeEventListener("mousedown",ar),document.removeEventListener("mousemove",Lr),document.removeEventListener("mouseup",_r)}}},[ct,Vn]),Object(r.useEffect)(function(){Oi(pt)},[pt]);var $n=he(st),Pi=he(Ji),ni={width:$n,height:Pi},gi=Object(r.useMemo)(function(){if(br){var Ut=new Date(br),er=Ut.getHours(),zt=Ut.getMinutes(),ar=Ut.getSeconds();return er=er<10?"0"+er:er,zt=zt<10?"0"+zt:zt,ar=ar<10?"0"+ar:ar,"".concat(er,":").concat(zt,":").concat(ar)}return 0},[br]);function Fi(){window.sessionStorage.removeItem(St),ri(!1),hi(0)}function ii(){ri(!1),hi(0),ct.setValue(window.sessionStorage.getItem(St))}function Ur(Ut,er){var zt=ct.getValue();zt=zt.replace(Ut,er),hn(zt),ct==null||ct.setValue(zt)}return c.a.createElement(r.Fragment,null,c.a.createElement("div",{className:"markdown-editor-wrapper",ref:zn},c.a.createElement("div",{className:"markdown-editor-container ".concat(ut," ").concat(bn?"on-preview":""," ").concat(Ft?"mini":""," ").concat(Vr?"full-screen":""),style:ni},c.a.createElement(A,{insertTemp:Mt,watch:bn,fullScreen:Vr,showNullButton:Ct,onActionCallback:ji,hidetoolBar:Ht,uuid:kn.current,setOpenPhones:function(){sn.current=!0}}),c.a.createElement("div",{className:"markdown-editor-body"},c.a.createElement("div",{className:"codemirror-container"},c.a.createElement("textarea",{ref:fi,placeholder:On})),bn?c.a.createElement("div",{ref:ki,className:"preview-container"},Jt==="stex"&&c.a.createElement(D,{value:An}),Jt!=="stex"&&c.a.createElement(p.a,{edit:!0,value:An,replaces:Ur})):null))),Et?c.a.createElement("a",{ref:Vn,className:"editor-resize"}):null,c.a.createElement(X.a,null,Ae[jt]?c.a.createElement(g.a,{centered:!0,title:Ae[jt],visible:!0,onCancel:Yn,footer:null,className:"markdown-popup-form"},mi):null))}},PD8m:function(H,Z){H.exports={name:"memoryStorage",read:N,write:g,each:S,remove:k,clearAll:v};var I={};function N(m){return I[m]}function g(m,C){I[m]=C}function S(m){for(var C in I)I.hasOwnProperty(C)&&m(I[C],C)}function k(m){delete I[m]}function v(m){I={}}},PVpz:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("ETIr"),I("cv67"),I("K3mO"),I("OLod"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.StreamCipher,v=g.algo,m=[],C=[],_=[],e=v.RabbitLegacy=k.extend({_doReset:function(){var r=this._key.words,c=this.cfg.iv,i=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],n=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 l=0;l<4;l++)h.call(this);for(var l=0;l<8;l++)n[l]^=i[l+4&7];if(c){var f=c.words,d=f[0],u=f[1],o=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360,s=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,E=o>>>16|s&4294901760,b=s<<16|o&65535;n[0]^=o,n[1]^=E,n[2]^=s,n[3]^=b,n[4]^=o,n[5]^=E,n[6]^=s,n[7]^=b;for(var l=0;l<4;l++)h.call(this)}},_doProcessBlock:function(r,c){var i=this._X;h.call(this),m[0]=i[0]^i[5]>>>16^i[3]<<16,m[1]=i[2]^i[7]>>>16^i[5]<<16,m[2]=i[4]^i[1]>>>16^i[7]<<16,m[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)m[n]=(m[n]<<8|m[n]>>>24)&16711935|(m[n]<<24|m[n]>>>8)&4278255360,r[c+n]^=m[n]},blockSize:128/32,ivSize:64/32});function h(){for(var r=this._X,c=this._C,i=0;i<8;i++)C[i]=c[i];c[0]=c[0]+1295307597+this._b|0,c[1]=c[1]+3545052371+(c[0]>>>0<C[0]>>>0?1:0)|0,c[2]=c[2]+886263092+(c[1]>>>0<C[1]>>>0?1:0)|0,c[3]=c[3]+1295307597+(c[2]>>>0<C[2]>>>0?1:0)|0,c[4]=c[4]+3545052371+(c[3]>>>0<C[3]>>>0?1:0)|0,c[5]=c[5]+886263092+(c[4]>>>0<C[4]>>>0?1:0)|0,c[6]=c[6]+1295307597+(c[5]>>>0<C[5]>>>0?1:0)|0,c[7]=c[7]+3545052371+(c[6]>>>0<C[6]>>>0?1:0)|0,this._b=c[7]>>>0<C[7]>>>0?1:0;for(var i=0;i<8;i++){var n=r[i]+c[i],l=n&65535,f=n>>>16,d=((l*l>>>17)+l*f>>>15)+f*f,u=((n&4294901760)*n|0)+((n&65535)*n|0);_[i]=d^u}r[0]=_[0]+(_[7]<<16|_[7]>>>16)+(_[6]<<16|_[6]>>>16)|0,r[1]=_[1]+(_[0]<<8|_[0]>>>24)+_[7]|0,r[2]=_[2]+(_[1]<<16|_[1]>>>16)+(_[0]<<16|_[0]>>>16)|0,r[3]=_[3]+(_[2]<<8|_[2]>>>24)+_[1]|0,r[4]=_[4]+(_[3]<<16|_[3]>>>16)+(_[2]<<16|_[2]>>>16)|0,r[5]=_[5]+(_[4]<<8|_[4]>>>24)+_[3]|0,r[6]=_[6]+(_[5]<<16|_[5]>>>16)+(_[4]<<16|_[4]>>>16)|0,r[7]=_[7]+(_[6]<<8|_[6]>>>24)+_[5]|0}g.RabbitLegacy=k._createHelper(e)}(),N.RabbitLegacy})},RELg:function(H,Z,I){var N=I("MFOe"),g=N.Global;H.exports={name:"oldIE-userDataStorage",write:C,read:_,each:e,remove:h,clearAll:r};var S="storejs",k=g.document,v=n(),m=(g.navigator?g.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function C(l,f){if(m)return;var d=i(l);v(function(u){u.setAttribute(d,f),u.save(S)})}function _(l){if(m)return;var f=i(l),d=null;return v(function(u){d=u.getAttribute(f)}),d}function e(l){v(function(f){for(var d=f.XMLDocument.documentElement.attributes,u=d.length-1;u>=0;u--){var o=d[u];l(f.getAttribute(o.name),o.name)}})}function h(l){var f=i(l);v(function(d){d.removeAttribute(f),d.save(S)})}function r(){v(function(l){var f=l.XMLDocument.documentElement.attributes;l.load(S);for(var d=f.length-1;d>=0;d--)l.removeAttribute(f[d].name);l.save(S)})}var c=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function i(l){return l.replace(/^\d/,"___$&").replace(c,"___")}function n(){if(!k||!k.documentElement||!k.documentElement.addBehavior)return null;var l="script",f,d,u;try{d=new ActiveXObject("htmlfile"),d.open(),d.write("<"+l+">document.w=window</"+l+'><iframe src="/favicon.ico"></iframe>'),d.close(),f=d.w.frames[0].document,u=f.createElement("div")}catch(o){u=k.createElement("div"),f=k.body}return function(o){var s=[].slice.call(arguments,0);s.unshift(u),f.appendChild(u),u.addBehavior("#default#userData"),u.load(S),o.apply(this,s),f.removeChild(u);return}}},S6kV:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.mode.OFB=function(){var g=N.lib.BlockCipherMode.extend(),S=g.Encryptor=g.extend({processBlock:function(k,v){var m=this._cipher,C=m.blockSize,_=this._iv,e=this._keystream;_&&(e=this._keystream=_.slice(0),this._iv=void 0),m.encryptBlock(e,0);for(var h=0;h<C;h++)k[v+h]^=e[h]}});return g.Decryptor=S,g}(),N.mode.OFB})},"SA+Z":function(H,Z,I){var N=I("wTVA"),g=I("EbDI"),S=I("ZhPi"),k=I("wkBT");function v(m){return N(m)||g(m)||S(m)||k()}H.exports=v,H.exports.__esModule=!0,H.exports.default=H.exports},SJMd:function(H,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 I,N,g,S=!1,k,v;window.PR_SHOULD_USE_CONTINUATION=!0;var m,C;(function(){var _=window,e=["break,continue,do,else,for,if,return,while"],h=[e,"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=[h,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],c=[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"],i=[r,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],n=[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"],l="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",f=[r,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],d="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",u=[e,"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"],o=[e,"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"],s=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],E=[c,n,i,f,d,u,o,s],b=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,p="str",D="kwd",R="com",y="typ",x="lit",w="pun",T="pln",F="tag",P="dec",A="src",X="atn",z="atv",O="nocode",B="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function U(ie){for(var ne=0,J=!1,$=!1,le=0,ce=ie.length;le<ce;++le){var we=ie[le];if(we.ignoreCase)$=!0;else if(/[a-z]/i.test(we.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){J=!0,$=!1;break}}var Fe={b:8,t:9,n:10,v:11,f:12,r:13};function Xe(Pe){var Ie=Pe.charCodeAt(0);if(Ie!==92)return Ie;var Je=Pe.charAt(1);return Ie=Fe[Je],Ie||("0"<=Je&&Je<="7"?parseInt(Pe.substring(1),8):Je==="u"||Je==="x"?parseInt(Pe.substring(2),16):Pe.charCodeAt(1))}function $e(Pe){if(Pe<32)return(Pe<16?"\\x0":"\\x")+Pe.toString(16);var Ie=String.fromCharCode(Pe);return Ie==="\\"||Ie==="-"||Ie==="]"||Ie==="^"?"\\"+Ie:Ie}function Ye(Pe){var Ie=Pe.substring(1,Pe.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")),Je=[],rt=Ie[0]==="^",ye=["["];rt&&ye.push("^");for(var ue=rt?1:0,he=Ie.length;ue<he;++ue){var me=Ie[ue];if(/\\[bdsw]/i.test(me))ye.push(me);else{var Ce=Xe(me),ge;ue+2<he&&Ie[ue+1]==="-"?(ge=Xe(Ie[ue+2]),ue+=2):ge=Ce,Je.push([Ce,ge]),ge<65||Ce>122||(ge<65||Ce>90||Je.push([Math.max(65,Ce)|32,Math.min(ge,90)|32]),ge<97||Ce>122||Je.push([Math.max(97,Ce)&~32,Math.min(ge,122)&~32]))}}Je.sort(function(Me,He){return Me[0]-He[0]||He[1]-Me[1]});for(var Ee=[],Ae=[],ue=0;ue<Je.length;++ue){var De=Je[ue];De[0]<=Ae[1]+1?Ae[1]=Math.max(Ae[1],De[1]):Ee.push(Ae=De)}for(var ue=0;ue<Ee.length;++ue){var De=Ee[ue];ye.push($e(De[0])),De[1]>De[0]&&(De[1]+1>De[0]&&ye.push("-"),ye.push($e(De[1])))}return ye.push("]"),ye.join("")}function Ze(Pe){for(var Ie=Pe.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")),Je=Ie.length,rt=[],ye=0,ue=0;ye<Je;++ye){var he=Ie[ye];if(he==="(")++ue;else if(he.charAt(0)==="\\"){var me=+he.substring(1);me&&(me<=ue?rt[me]=-1:Ie[ye]=$e(me))}}for(var ye=1;ye<rt.length;++ye)rt[ye]===-1&&(rt[ye]=++ne);for(var ye=0,ue=0;ye<Je;++ye){var he=Ie[ye];if(he==="(")++ue,rt[ue]||(Ie[ye]="(?:");else if(he.charAt(0)==="\\"){var me=+he.substring(1);me&&me<=ue&&(Ie[ye]="\\"+rt[me])}}for(var ye=0;ye<Je;++ye)Ie[ye]==="^"&&Ie[ye+1]!=="^"&&(Ie[ye]="");if(Pe.ignoreCase&&J)for(var ye=0;ye<Je;++ye){var he=Ie[ye],Ce=he.charAt(0);he.length>=2&&Ce==="["?Ie[ye]=Ye(he):Ce!=="\\"&&(Ie[ye]=he.replace(/[a-zA-Z]/g,function(Ae){var De=Ae.charCodeAt(0);return"["+String.fromCharCode(De&~32,De|32)+"]"}))}return Ie.join("")}for(var qe=[],le=0,ce=ie.length;le<ce;++le){var we=ie[le];if(we.global||we.multiline)throw new Error(""+we);qe.push("(?:"+Ze(we)+")")}return new RegExp(qe.join("|"),$?"gi":"g")}function L(ie,ne){var J=/(?:^|\s)nocode(?:\s|$)/,$=[],le=0,ce=[],we=0;function Fe(Xe){var $e=Xe.nodeType;if($e==1){if(J.test(Xe.className))return;for(var Ye=Xe.firstChild;Ye;Ye=Ye.nextSibling)Fe(Ye);var Ze=Xe.nodeName.toLowerCase();(Ze==="br"||Ze==="li")&&($[we]=`
|
|
|
`,ce[we<<1]=le++,ce[we++<<1|1]=Xe)}else if($e==3||$e==4){var qe=Xe.nodeValue;qe.length&&(ne?qe=qe.replace(/\r\n?/g,`
|
|
|
`):qe=qe.replace(/[ \t\r\n]+/g," "),$[we]=qe,ce[we<<1]=le,le+=qe.length,ce[we++<<1|1]=Xe)}}return Fe(ie),{sourceCode:$.join("").replace(/\n$/,""),spans:ce}}function G(ie,ne,J,$,le){if(!J)return;var ce={sourceNode:ie,pre:1,langExtension:null,numberLines:null,sourceCode:J,spans:null,basePos:ne,decorations:null};$(ce),le.push.apply(le,ce.decorations)}var ee=/\S/;function oe(ie){for(var ne=void 0,J=ie.firstChild;J;J=J.nextSibling){var $=J.nodeType;ne=$===1?ne?ie:J:$===3&&ee.test(J.nodeValue)?ie:ne}return ne===ie?void 0:ne}function ae(ie,ne){var J={},$;(function(){for(var we=ie.concat(ne),Fe=[],Xe={},$e=0,Ye=we.length;$e<Ye;++$e){var Ze=we[$e],qe=Ze[3];if(qe)for(var Pe=qe.length;--Pe>=0;)J[qe.charAt(Pe)]=Ze;var Ie=Ze[1],Je=""+Ie;Xe.hasOwnProperty(Je)||(Fe.push(Ie),Xe[Je]=null)}Fe.push(/[\0-\uffff]/),$=U(Fe)})();var le=ne.length,ce=function(we){for(var Fe=we.sourceCode,Xe=we.basePos,$e=we.sourceNode,Ye=[Xe,T],Ze=0,qe=Fe.match($)||[],Pe={},Ie=0,Je=qe.length;Ie<Je;++Ie){var rt=qe[Ie],ye=Pe[rt],ue=void 0,he;if(typeof ye=="string")he=!1;else{var me=J[rt.charAt(0)];if(me)ue=rt.match(me[1]),ye=me[0];else{for(var Ce=0;Ce<le;++Ce)if(me=ne[Ce],ue=rt.match(me[1]),ue){ye=me[0];break}ue||(ye=T)}he=ye.length>=5&&ye.substring(0,5)==="lang-",he&&!(ue&&typeof ue[1]=="string")&&(he=!1,ye=A),he||(Pe[rt]=ye)}var ge=Ze;if(Ze+=rt.length,!he)Ye.push(Xe+ge,ye);else{var Ee=ue[1],Ae=rt.indexOf(Ee),De=Ae+Ee.length;ue[2]&&(De=rt.length-ue[2].length,Ae=De-Ee.length);var Me=ye.substring(5);G($e,Xe+ge,rt.substring(0,Ae),ce,Ye),G($e,Xe+ge+Ae,Ee,te(Me,Ee),Ye),G($e,Xe+ge+De,rt.substring(De),ce,Ye)}}we.decorations=Ye};return ce}function be(ie){var ne=[],J=[];ie.tripleQuotedStrings?ne.push([p,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ie.multiLineStrings?ne.push([p,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ne.push([p,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ie.verbatimStrings&&J.push([p,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var $=ie.hashComments;$&&(ie.cStyleComments?($>1?ne.push([R,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ne.push([R,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),J.push([p,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ne.push([R,/^#[^\r\n]*/,null,"#"])),ie.cStyleComments&&(J.push([R,/^\/\/[^\r\n]*/,null]),J.push([R,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var le=ie.regexLiterals;if(le){var ce=le>1?"":`
|
|
|
\r`,we=ce?".":"[\\S\\s]",Fe="/(?=[^/*"+ce+"])(?:[^/\\x5B\\x5C"+ce+"]|\\x5C"+we+"|\\x5B(?:[^\\x5C\\x5D"+ce+"]|\\x5C"+we+")*(?:\\x5D|$))+/";J.push(["lang-regex",RegExp("^"+B+"("+Fe+")")])}var Xe=ie.types;Xe&&J.push([y,Xe]);var $e=(""+ie.keywords).replace(/^ | $/g,"");$e.length&&J.push([D,new RegExp("^(?:"+$e.replace(/[\s,]+/g,"|")+")\\b"),null]),ne.push([T,/^\s+/,null,` \r
|
|
|
\xA0`]);var Ye="^.[^\\s\\w.$@'\"`/\\\\]*";return ie.regexLiterals&&(Ye+="(?!s*/)"),J.push([x,/^@[a-z_$][a-z_$@0-9]*/i,null],[y,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[T,/^[a-z_$][a-z_$@0-9]*/i,null],[x,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[T,/^\\[\s\S]?/,null],[w,new RegExp(Ye),null]),ae(ne,J)}var _e=be({keywords:E,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function fe(ie,ne,J){for(var $=/(?:^|\s)nocode(?:\s|$)/,le=/\r\n?|\n/,ce=ie.ownerDocument,we=ce.createElement("li");ie.firstChild;)we.appendChild(ie.firstChild);var Fe=[we];function Xe(Ie){var Je=Ie.nodeType;if(Je==1&&!$.test(Ie.className))if(Ie.nodeName==="br")$e(Ie),Ie.parentNode&&Ie.parentNode.removeChild(Ie);else for(var rt=Ie.firstChild;rt;rt=rt.nextSibling)Xe(rt);else if((Je==3||Je==4)&&J){var ye=Ie.nodeValue,ue=ye.match(le);if(ue){var he=ye.substring(0,ue.index);Ie.nodeValue=he;var me=ye.substring(ue.index+ue[0].length);if(me){var Ce=Ie.parentNode;Ce.insertBefore(ce.createTextNode(me),Ie.nextSibling)}$e(Ie),he||Ie.parentNode.removeChild(Ie)}}}function $e(Ie){for(;!Ie.nextSibling;)if(Ie=Ie.parentNode,!Ie)return;function Je(ue,he){var me=he?ue.cloneNode(!1):ue,Ce=ue.parentNode;if(Ce){var ge=Je(Ce,1),Ee=ue.nextSibling;ge.appendChild(me);for(var Ae=Ee;Ae;Ae=Ee)Ee=Ae.nextSibling,ge.appendChild(Ae)}return me}for(var rt=Je(Ie.nextSibling,0),ye;(ye=rt.parentNode)&&ye.nodeType===1;)rt=ye;Fe.push(rt)}for(var Ye=0;Ye<Fe.length;++Ye)Xe(Fe[Ye]);ne===(ne|0)&&Fe[0].setAttribute("value",ne);var Ze=ce.createElement("ol");Ze.className="linenums";for(var qe=Math.max(0,ne-1|0)||0,Ye=0,Pe=Fe.length;Ye<Pe;++Ye)we=Fe[Ye],we.className="L"+(Ye+qe)%10,we.firstChild||we.appendChild(ce.createTextNode("\xA0")),Ze.appendChild(we);ie.appendChild(Ze)}function Re(ie){var ne=/\bMSIE\s(\d+)/.exec(navigator.userAgent);ne=ne&&+ne[1]<=8;var J=/\n/g,$=ie.sourceCode,le=$.length,ce=0,we=ie.spans,Fe=we.length,Xe=0,$e=ie.decorations,Ye=$e.length,Ze=0;$e[Ye]=le;var qe,Pe;for(Pe=qe=0;Pe<Ye;)$e[Pe]!==$e[Pe+2]?($e[qe++]=$e[Pe++],$e[qe++]=$e[Pe++]):Pe+=2;for(Ye=qe,Pe=qe=0;Pe<Ye;){for(var Ie=$e[Pe],Je=$e[Pe+1],rt=Pe+2;rt+2<=Ye&&$e[rt+1]===Je;)rt+=2;$e[qe++]=Ie,$e[qe++]=Je,Pe=rt}Ye=$e.length=qe;var ye=ie.sourceNode,ue="";ye&&(ue=ye.style.display,ye.style.display="none");try{for(var he=null;Xe<Fe;){var me=we[Xe],Ce=we[Xe+2]||le,ge=$e[Ze+2]||le,rt=Math.min(Ce,ge),Ee=we[Xe+1],Ae;if(Ee.nodeType!==1&&(Ae=$.substring(ce,rt))){ne&&(Ae=Ae.replace(J,"\r")),Ee.nodeValue=Ae;var De=Ee.ownerDocument,Me=De.createElement("span");Me.className=$e[Ze+1];var He=Ee.parentNode;He.replaceChild(Me,Ee),Me.appendChild(Ee),ce<Ce&&(we[Xe+1]=Ee=De.createTextNode($.substring(rt,Ce)),He.insertBefore(Ee,Me.nextSibling))}ce=rt,ce>=Ce&&(Xe+=2),ce>=ge&&(Ze+=2)}}finally{ye&&(ye.style.display=ue)}}var Oe={};function de(ie,ne){for(var J=ne.length;--J>=0;){var $=ne[J];Oe.hasOwnProperty($)?_.console&&console.warn("cannot override language handler %s",$):Oe[$]=ie}}function te(ie,ne){return ie&&Oe.hasOwnProperty(ie)||(ie=/^\s*</.test(ne)?"default-markup":"default-code"),Oe[ie]}de(_e,["default-code"]),de(ae([],[[T,/^[^<?]+/],[P,/^<!\w[^>]*(?:>|$)/],[R,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[w,/^(?:<[%?]|[%?]>)/],["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"]),de(ae([[T,/^[\s]+/,null,` \r
|
|
|
`],[z,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[F,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[X,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[w,/^[=<>\/]+/],["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"]),de(ae([],[[z,/^[\s\S]+/]]),["uq.val"]),de(be({keywords:c,hashComments:!0,cStyleComments:!0,types:b}),["c","cc","cpp","cxx","cyc","m"]),de(be({keywords:"null,true,false"}),["json"]),de(be({keywords:n,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:b}),["cs"]),de(be({keywords:i,cStyleComments:!0}),["java"]),de(be({keywords:s,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),de(be({keywords:u,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),de(be({keywords:d,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),de(be({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),de(be({keywords:f,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),de(be({keywords:l,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),de(ae([],[[p,/^[\s\S]+/]]),["regex"]);function W(ie){var ne=ie.langExtension;try{var J=L(ie.sourceNode,ie.pre),$=J.sourceCode;ie.sourceCode=$,ie.spans=J.spans,ie.basePos=0,te(ne,$)(ie),Re(ie)}catch(le){_.console&&console.log(le&&le.stack||le)}}function Y(ie,ne,J){var $=J||!1,le=ne||null,ce=document.createElement("div");ce.innerHTML="<pre>"+ie+"</pre>",ce=ce.firstChild,$&&fe(ce,$,!0);var we={langExtension:le,numberLines:$,sourceNode:ce,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return W(we),ce.innerHTML}function V(ie,ne){var J=ne||document.body,$=J.ownerDocument||document;function le(me){return J.getElementsByTagName(me)}for(var ce=[le("pre"),le("code"),le("xmp")],we=[],Fe=0;Fe<ce.length;++Fe)for(var Xe=0,$e=ce[Fe].length;Xe<$e;++Xe)we.push(ce[Fe][Xe]);ce=null;var Ye=Date;Ye.now||(Ye={now:function(){return+new Date}});var Ze=0,qe=/\blang(?:uage)?-([\w.]+)(?!\S)/,Pe=/\bprettyprint\b/,Ie=/\bprettyprinted\b/,Je=/pre|xmp/i,rt=/^code$/i,ye=/^(?:pre|code|xmp)$/i,ue={};function he(){for(var me=_.PR_SHOULD_USE_CONTINUATION?Ye.now()+250:Infinity;Ze<we.length&&Ye.now()<me;Ze++){for(var Ce=we[Ze],ge=ue,Ee=Ce;Ee=Ee.previousSibling;){var Ae=Ee.nodeType,De=(Ae===7||Ae===8)&&Ee.nodeValue;if(De?!/^\??prettify\b/.test(De):Ae!==3||/\S/.test(Ee.nodeValue))break;if(De){ge={},De.replace(/\b(\w+)=([\w:.%+-]+)/g,function($t,Mt,wt){ge[Mt]=wt});break}}var Me=Ce.className;if((ge!==ue||Pe.test(Me))&&!Ie.test(Me)){for(var He=!1,nt=Ce.parentNode;nt;nt=nt.parentNode){var at=nt.tagName;if(ye.test(at)&&nt.className&&Pe.test(nt.className)){He=!0;break}}if(!He){Ce.className+=" prettyprinted";var it=ge.lang;if(!it){it=Me.match(qe);var st;!it&&(st=oe(Ce))&&rt.test(st.tagName)&&(it=st.className.match(qe)),it&&(it=it[1])}var Tt;if(Je.test(Ce.tagName))Tt=1;else{var pt=Ce.currentStyle,ht=$.defaultView,Ft=pt?pt.whiteSpace:ht&&ht.getComputedStyle?ht.getComputedStyle(Ce,null).getPropertyValue("white-space"):0;Tt=Ft&&Ft.substring(0,3)==="pre"}var Lt=ge.linenums;(Lt=Lt==="true"||+Lt)||(Lt=Me.match(/\blinenums\b(?::(\d+))?/),Lt=Lt?Lt[1]&&Lt[1].length?+Lt[1]:!0:!1),Lt&&fe(Ce,Lt,Tt);var Yt={langExtension:it,sourceNode:Ce,numberLines:Lt,pre:Tt,sourceCode:null,basePos:null,spans:null,decorations:null};W(Yt)}}}Ze<we.length?_.setTimeout(he,250):typeof ie=="function"&&ie()}he()}var Q=_.PR={createSimpleLexer:ae,registerLangHandler:de,sourceDecorator:be,PR_ATTRIB_NAME:X,PR_ATTRIB_VALUE:z,PR_COMMENT:R,PR_DECLARATION:P,PR_KEYWORD:D,PR_LITERAL:x,PR_NOCODE:O,PR_PLAIN:T,PR_PUNCTUATION:w,PR_SOURCE:A,PR_STRING:p,PR_TAG:F,PR_TYPE:y,prettyPrintOne:S?_.prettyPrintOne=Y:m=Y,prettyPrint:C=S?_.prettyPrint=V:C=V},q=_.define;typeof q=="function"&&q.amd&&q("google-code-prettify",[],function(){return Q})})()},STEk:function(H,Z,I){"use strict";I.d(Z,"a",function(){return de});/*! *****************************************************************************
|
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
purpose with or without fee is hereby granted.
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
|
***************************************************************************** */var N=function(te,W){return(N=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,V){Y.__proto__=V}||function(Y,V){for(var Q in V)Object.prototype.hasOwnProperty.call(V,Q)&&(Y[Q]=V[Q])})(te,W)};function g(te,W){function Y(){this.constructor=te}N(te,W),te.prototype=W===null?Object.create(W):(Y.prototype=W.prototype,new Y)}function S(te,W,Y,V){return new(Y||(Y=Promise))(function(Q,q){function ie($){try{J(V.next($))}catch(le){q(le)}}function ne($){try{J(V.throw($))}catch(le){q(le)}}function J($){var le;$.done?Q($.value):(le=$.value,le instanceof Y?le:new Y(function(ce){ce(le)})).then(ie,ne)}J((V=V.apply(te,W||[])).next())})}function k(te,W){var Y,V,Q,q,ie={label:0,sent:function(){if(1&Q[0])throw Q[1];return Q[1]},trys:[],ops:[]};return q={next:ne(0),throw:ne(1),return:ne(2)},typeof Symbol=="function"&&(q[Symbol.iterator]=function(){return this}),q;function ne(J){return function($){return function(le){if(Y)throw new TypeError("Generator is already executing.");for(;ie;)try{if(Y=1,V&&(Q=2&le[0]?V.return:le[0]?V.throw||((Q=V.return)&&Q.call(V),0):V.next)&&!(Q=Q.call(V,le[1])).done)return Q;switch(V=0,Q&&(le=[2&le[0],Q.value]),le[0]){case 0:case 1:Q=le;break;case 4:return ie.label++,{value:le[1],done:!1};case 5:ie.label++,V=le[1],le=[0];continue;case 7:le=ie.ops.pop(),ie.trys.pop();continue;default:if(!(Q=ie.trys,(Q=Q.length>0&&Q[Q.length-1])||le[0]!==6&&le[0]!==2)){ie=0;continue}if(le[0]===3&&(!Q||le[1]>Q[0]&&le[1]<Q[3])){ie.label=le[1];break}if(le[0]===6&&ie.label<Q[1]){ie.label=Q[1],Q=le;break}if(Q&&ie.label<Q[2]){ie.label=Q[2],ie.ops.push(le);break}Q[2]&&ie.ops.pop(),ie.trys.pop();continue}le=W.call(te,ie)}catch(ce){le=[6,ce],V=0}finally{Y=Q=0}if(5&le[0])throw le[1];return{value:le[0]?le[1]:void 0,done:!0}}([J,$])}}}function v(){for(var te=0,W=0,Y=arguments.length;W<Y;W++)te+=arguments[W].length;var V=Array(te),Q=0;for(W=0;W<Y;W++)for(var q=arguments[W],ie=0,ne=q.length;ie<ne;ie++,Q++)V[Q]=q[ie];return V}var m=function(){function te(){}return te.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},te.setAttributes=function(W,Y){for(var V=0,Q=Y;V<Q.length;V++){var q=Q[V],ie=q[0],ne=q[1];W.setAttribute(ie,ne)}},te.createRect=function(W,Y,V){var Q=document.createElementNS("http://www.w3.org/2000/svg","rect");return Q.setAttribute("width",W.toString()),Q.setAttribute("height",Y.toString()),V&&te.setAttributes(Q,V),Q},te.createLine=function(W,Y,V,Q,q){var ie=document.createElementNS("http://www.w3.org/2000/svg","line");return ie.setAttribute("x1",W.toString()),ie.setAttribute("y1",Y.toString()),ie.setAttribute("x2",V.toString()),ie.setAttribute("y2",Q.toString()),q&&te.setAttributes(ie,q),ie},te.createPolygon=function(W,Y){var V=document.createElementNS("http://www.w3.org/2000/svg","polygon");return V.setAttribute("points",W),Y&&te.setAttributes(V,Y),V},te.createCircle=function(W,Y){var V=document.createElementNS("http://www.w3.org/2000/svg","circle");return V.setAttribute("cx",(W/2).toString()),V.setAttribute("cy",(W/2).toString()),V.setAttribute("r",W.toString()),Y&&te.setAttributes(V,Y),V},te.createEllipse=function(W,Y,V){var Q=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Q.setAttribute("cx",(W/2).toString()),Q.setAttribute("cy",(Y/2).toString()),Q.setAttribute("rx",(W/2).toString()),Q.setAttribute("ry",(Y/2).toString()),V&&te.setAttributes(Q,V),Q},te.createGroup=function(W){var Y=document.createElementNS("http://www.w3.org/2000/svg","g");return W&&te.setAttributes(Y,W),Y},te.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},te.createMarker=function(W,Y,V,Q,q,ie,ne){var J=document.createElementNS("http://www.w3.org/2000/svg","marker");return te.setAttributes(J,[["id",W],["orient",Y],["markerWidth",V.toString()],["markerHeight",Q.toString()],["refX",q.toString()],["refY",ie.toString()]]),J.appendChild(ne),J},te.createText=function(W){var Y=document.createElementNS("http://www.w3.org/2000/svg","text");return Y.setAttribute("x","0"),Y.setAttribute("y","0"),W&&te.setAttributes(Y,W),Y},te.createTSpan=function(W,Y){var V=document.createElementNS("http://www.w3.org/2000/svg","tspan");return V.textContent=W,Y&&te.setAttributes(V,Y),V},te.createImage=function(W){var Y=document.createElementNS("http://www.w3.org/2000/svg","image");return W&&te.setAttributes(Y,W),Y},te.createPoint=function(W,Y){var V=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return V.x=W,V.y=Y,V},te.createPath=function(W,Y){var V=document.createElementNS("http://www.w3.org/2000/svg","path");return V.setAttribute("d",W),Y&&te.setAttributes(V,Y),V},te}(),C=function(){function te(){}return te.addKey=function(W){te.key=W},Object.defineProperty(te,"isLicensed",{get:function(){return!!te.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(te.key)},enumerable:!1,configurable:!0}),te}(),_=function(){function te(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return te.prototype.rasterize=function(W,Y,V){var Q=this;return new Promise(function(q){var ie=V!==void 0?V:document.createElement("canvas");W===null&&(Q.markersOnly=!0,Q.naturalSize=!1);var ne=document.createElementNS("http://www.w3.org/2000/svg","svg");ne.setAttribute("xmlns","http://www.w3.org/2000/svg"),ne.setAttribute("width",Y.width.baseVal.valueAsString),ne.setAttribute("height",Y.height.baseVal.valueAsString),ne.setAttribute("viewBox","0 0 "+Y.viewBox.baseVal.width.toString()+" "+Y.viewBox.baseVal.height.toString()),ne.innerHTML=Y.innerHTML,Q.naturalSize===!0?(ne.width.baseVal.value=W.naturalWidth,ne.height.baseVal.value=W.naturalHeight):Q.width!==void 0&&Q.height!==void 0&&(ne.width.baseVal.value=Q.width,ne.height.baseVal.value=Q.height),ie.width=ne.width.baseVal.value,ie.height=ne.height.baseVal.value;var J=ne.outerHTML,$=ie.getContext("2d");Q.markersOnly!==!0&&$.drawImage(W,0,0,ie.width,ie.height);var le=window.URL,ce=new Image(ie.width,ie.height);ce.setAttribute("crossOrigin","anonymous");var we=new Blob([J],{type:"image/svg+xml"}),Fe=le.createObjectURL(we);ce.onload=function(){$.drawImage(ce,0,0),le.revokeObjectURL(Fe);var Xe=ie.toDataURL(Q.imageType,Q.imageQuality);q(Xe)},ce.src=Fe})},te}(),e=function(){},h=function(){function te(W){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+W+"_"}return Object.defineProperty(te.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),te.prototype.addClass=function(W){return this.styleSheet===void 0&&this.addStyleSheet(),W.name=""+this.classNamePrefix+W.localName,this.classes.push(W),this.styleSheet.sheet.insertRule("."+W.name+" {"+W.style+"}",this.styleSheet.sheet.cssRules.length),W},te.prototype.addRule=function(W){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(W),this.styleSheet.sheet.insertRule(W.selector+" {"+W.style+"}",this.styleSheet.sheet.cssRules.length)},te.prototype.addStyleSheet=function(){var W;this.styleSheet=document.createElement("style"),((W=this.styleSheetRoot)!==null&&W!==void 0?W:document.head).appendChild(this.styleSheet),this.addRule(new r("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new r("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new r("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new c("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new c("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},te.prototype.removeStyleSheet=function(){var W;this.styleSheet&&(((W=this.styleSheetRoot)!==null&&W!==void 0?W:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},te}(),r=function(te,W){this.selector=te,this.style=W},c=function(te,W){this.localName=te,this.style=W},i=function(){function te(W,Y,V,Q,q){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=W,this.displayMode=Y,this.markerItems=V,this.uiStyleSettings=Q,this.styles=q,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return te.prototype.show=function(W){var Y=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=W,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var V=document.createElement("div");V.className=this.toolbarBlockStyleClass.name,V.style.whiteSpace="nowrap",this.uiContainer.appendChild(V),this.addActionButton(V,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(V,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(V,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(V,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(V,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(V,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(V,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(V,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(q){var ie=document.createElement("div");ie.className=""+Y.toolbarButtonStyleClass.name,ie.setAttribute("data-type-name",q.typeName),ie.innerHTML=q.icon,ie.addEventListener("click",function(){Y.markerToolbarButtonClicked(ie,q)}),Y.buttons.push(ie),Y.markerButtons.push(ie)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var Q=document.createElement("div");Q.className=this.toolbarBlockStyleClass.name,Q.style.whiteSpace="nowrap",Q.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Q),this.addActionButton(Q,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(Q,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},te.prototype.addButtonClickListener=function(W){this.buttonClickListeners.push(W)},te.prototype.removeButtonClickListener=function(W){this.buttonClickListeners.indexOf(W)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(W),1)},te.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},te.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var W=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Y=0;Y<this.markerButtons.length;Y++)Y<W||Y===W&&this.markerButtons.length-1===W?this.markerButtonBlock.appendChild(this.markerButtons[Y]):(Y===W&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Y]))}},te.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},te.prototype.resetButtonStyles=function(){var W=this;this.buttons.forEach(function(Y){Y.className=Y.className.replace(W.uiStyleSettings.toolbarButtonStyleColorsClassName?W.uiStyleSettings.toolbarButtonStyleColorsClassName:W.toolbarButtonStyleColorsClass.name,"").trim(),Y.className=Y.className.replace(W.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?W.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:W.toolbarActiveButtonStyleColorsClass.name,"").trim(),Y.className+=" "+(W.uiStyleSettings.toolbarButtonStyleColorsClassName?W.uiStyleSettings.toolbarButtonStyleColorsClassName:W.toolbarButtonStyleColorsClass.name)})},te.prototype.addActionButton=function(W,Y,V){var Q=this,q=document.createElement("div");switch(q.className=""+this.toolbarButtonStyleClass.name,q.innerHTML=Y,q.setAttribute("data-action",V),q.addEventListener("click",function(){Q.actionToolbarButtonClicked(q,V)}),V){case"select":q.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":q.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":q.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":q.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":q.style.fill=this.uiStyleSettings.closeButtonColor}W.appendChild(q),this.buttons.push(q)},te.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new c("toolbar",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new c("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new c("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new c("toolbar-overflow-block",`
|
|
|
position: absolute;
|
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
z-index: 10;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new c("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var W=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new c("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*W)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*W)+`px;
|
|
|
padding: `+W+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new c("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new c("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new r("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new r("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},te.prototype.markerToolbarButtonClicked=function(W,Y){this.setActiveButton(W),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(V){return V("marker",Y)}),this.markerButtonOverflowBlock.style.display="none"},te.prototype.actionToolbarButtonClicked=function(W,Y){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(V){return V("action",Y)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},te.prototype.setActiveButton=function(W){this.resetButtonStyles(),W.className=W.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),W.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},te.prototype.setActiveMarkerButton=function(W){var Y=this.markerButtons.find(function(V){return V.getAttribute("data-type-name")===W});Y&&this.setActiveButton(Y)},te.prototype.setCurrentMarker=function(W){var Y=this;this.currentMarker=W,this.buttons.filter(function(V){return/delete|notes/.test(V.getAttribute("data-action"))}).forEach(function(V){Y.currentMarker===void 0?(V.style.fillOpacity="0.4",V.style.pointerEvents="none"):(V.style.fillOpacity="1",V.style.pointerEvents="all")})},te}(),n=function(){function te(W,Y,V,Q){this.panels=[],this.panelButtons=[],this.markerjsContainer=W,this.displayMode=Y,this.uiStyleSettings=V,this.styles=Q,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return te.prototype.addStyles=function(){var W;this.toolboxStyleClass=this.styles.addClass(new c("toolbox",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
font-family: sans-serif;
|
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new c("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var Y=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new c("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new c("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new c("toolbox-panel-row",`
|
|
|
display: flex;
|
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
cursor: default;
|
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new c("toolbox-panel-row_colors",`
|
|
|
background-color: `+((W=this.uiStyleSettings.toolboxBackgroundColor)!==null&&W!==void 0?W:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new c("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Y)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Y)+`px;
|
|
|
padding: `+Y+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new c("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new c("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new r("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new r("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},te.prototype.show=function(W){var Y;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=W,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Y=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Y!==void 0?Y:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},te.prototype.setPanelButtons=function(W){var Y,V,Q=this;this.panels=W,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Y=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Y!==void 0?Y:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((V=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&V!==void 0?V:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(q){var ie;q.uiStyleSettings=Q.uiStyleSettings;var ne=document.createElement("div");ne.className=Q.toolboxButtonStyleClass.name+" "+((ie=Q.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ie!==void 0?ie:Q.toolboxButtonStyleColorsClass.name),ne.innerHTML=q.icon,ne.title=q.title,ne.addEventListener("click",function(){Q.panelButtonClick(q)}),Q.panelButtons.push(ne),Q.buttonRow.appendChild(ne)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},te.prototype.panelButtonClick=function(W){var Y=this,V=-1;if(W!==this.activePanel){V=this.panels.indexOf(W),this.panelRow.innerHTML="";var Q=W.getUi();Q.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Q),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=W}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Y.displayMode==="inline"?Y.panelRow.style.display="none":Y.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(q,ie){var ne,J;q.className=Y.toolboxButtonStyleClass.name+" "+(ie===V?""+((ne=Y.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ne!==void 0?ne:Y.toolboxActiveButtonStyleColorsClass.name):""+((J=Y.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&J!==void 0?J:Y.toolboxButtonStyleColorsClass.name))})},te}(),l=function(te,W){this.title=te,this.icon=W},f=function(te){function W(Y,V,Q,q){var ie=te.call(this,Y,q||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return ie.colors=[],ie.addTransparent=!1,ie.colorBoxes=[],ie.colors=V,ie.currentColor=Q,ie.setCurrentColor=ie.setCurrentColor.bind(ie),ie.getColorBox=ie.getColorBox.bind(ie),ie}return g(W,te),W.prototype.getUi=function(){var Y=this,V=document.createElement("div");return V.style.overflow="hidden",V.style.whiteSpace="nowrap",this.colors.forEach(function(Q){var q=Y.getColorBox(Q);V.appendChild(q),Y.colorBoxes.push(q)}),V},W.prototype.getColorBox=function(Y){var V=this,Q=this.uiStyleSettings.toolbarHeight/4,q=this.uiStyleSettings.toolbarHeight-Q,ie=document.createElement("div");ie.style.display="inline-block",ie.style.boxSizing="content-box",ie.style.width=q-2+"px",ie.style.height=q-2+"px",ie.style.padding="1px",ie.style.marginRight="2px",ie.style.marginBottom="2px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderRadius=(q+2)/2+"px",ie.style.borderColor=Y===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){V.setCurrentColor(Y,ie)});var ne=document.createElement("div");return ne.style.display="inline-block",ne.style.width=q-2+"px",ne.style.height=q-2+"px",ne.style.backgroundColor=Y,ne.style.borderRadius=q/2+"px",Y==="transparent"&&(ne.style.fill=this.uiStyleSettings.toolboxAccentColor,ne.innerHTML=`<svg viewBox="0 0 24 24">
|
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
|
</svg>`),ie.appendChild(ne),ie},W.prototype.setCurrentColor=function(Y,V){var Q=this;this.currentColor=Y,this.colorBoxes.forEach(function(q){q.style.borderColor=q===V?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Y)},W}(l),d=function(){function te(W,Y,V){this._state="new",this._isSelected=!1,this._container=W,this._overlayContainer=Y,this.globalSettings=V,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(te.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(W){return!1},Object.defineProperty(te.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),te.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},te.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},te.prototype.pointerDown=function(W,Y){},te.prototype.dblClick=function(W,Y){},te.prototype.manipulate=function(W){},te.prototype.pointerUp=function(W){this.stateChanged()},te.prototype.dispose=function(){},te.prototype.addMarkerVisualToContainer=function(W){this.container.childNodes.length>0?this.container.insertBefore(W,this.container.childNodes[0]):this.container.appendChild(W)},te.prototype.getState=function(){return{typeName:te.typeName,state:this.state,notes:this.notes}},te.prototype.restoreState=function(W){this._state=W.state,this.notes=W.notes},te.prototype.scale=function(W,Y){},te.prototype.colorChanged=function(W){this.onColorChanged&&this.onColorChanged(W),this.stateChanged()},te.prototype.fillColorChanged=function(W){this.onFillColorChanged&&this.onFillColorChanged(W),this.stateChanged()},te.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var W=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),W.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(W)&&this.onStateChanged(this)}},te.typeName="MarkerBase",te}(),u=function(){function te(){this.findGripByVisual=this.findGripByVisual.bind(this)}return te.prototype.findGripByVisual=function(W){return this.topLeft.ownsTarget(W)?this.topLeft:this.topCenter.ownsTarget(W)?this.topCenter:this.topRight.ownsTarget(W)?this.topRight:this.centerLeft.ownsTarget(W)?this.centerLeft:this.centerRight.ownsTarget(W)?this.centerRight:this.bottomLeft.ownsTarget(W)?this.bottomLeft:this.bottomCenter.ownsTarget(W)?this.bottomCenter:this.bottomRight.ownsTarget(W)?this.bottomRight:void 0},te}(),o=function(){function te(){this.GRIP_SIZE=10,this.visual=m.createGroup(),this.visual.appendChild(m.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(m.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return te.prototype.ownsTarget=function(W){return W===this.visual||W===this.visual.childNodes[0]||W===this.visual.childNodes[1]},te}(),s=function(){function te(){}return te.toITransformMatrix=function(W){return{a:W.a,b:W.b,c:W.c,d:W.d,e:W.e,f:W.f}},te.toSVGMatrix=function(W,Y){return W.a=Y.a,W.b=Y.b,W.c=Y.c,W.d=Y.d,W.e=Y.e,W.f=Y.f,W},te}(),E=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.left=0,q.top=0,q.width=0,q.height=0,q.defaultSize={x:50,y:20},q.offsetX=0,q.offsetY=0,q.rotationAngle=0,q.CB_DISTANCE=10,q._suppressMarkerCreateEvent=!1,q.container.transform.baseVal.appendItem(m.createTransform()),q.setupControlBox(),q}return g(W,te),Object.defineProperty(W.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(W.prototype,"visual",{get:function(){return this._visual},set:function(Y){this._visual=Y;var V=m.createTransform();this._visual.transform.baseVal.appendItem(V)},enumerable:!1,configurable:!0}),W.prototype.ownsTarget=function(Y){return!!te.prototype.ownsTarget.call(this,Y)||!!(this.controlGrips.findGripByVisual(Y)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Y))},W.prototype.pointerDown=function(Y,V){te.prototype.pointerDown.call(this,Y,V),this.state==="new"&&(this.left=Y.x,this.top=Y.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Q=this.unrotatePoint(Y);if(this.manipulationStartX=Q.x,this.manipulationStartY=Q.y,this.offsetX=Q.x-this.left,this.offsetY=Q.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(V),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(V)){this.activeGrip=this.rotatorGrip;var q=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=q.x-this.width/2,this.top=q.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ie=this.container.transform.baseVal.getItem(0);ie.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ie,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},W.prototype.pointerUp=function(Y){var V=this.state;te.prototype.pointerUp.call(this,Y),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Y),this._state="select",V==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},W.prototype.moveVisual=function(Y){this.visual.style.transform="translate("+Y.x+"px, "+Y.y+"px)"},W.prototype.manipulate=function(Y){var V=this.unrotatePoint(Y);this.state==="creating"?this.resize(Y):this.state==="move"?(this.left=this.manipulationStartLeft+(V.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(V.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(V):this.state==="rotate"&&this.rotate(Y)},W.prototype.resize=function(Y){var V=this.manipulationStartLeft,Q=this.manipulationStartWidth,q=this.manipulationStartTop,ie=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:V=this.manipulationStartLeft+Y.x-this.manipulationStartX,Q=this.manipulationStartWidth+this.manipulationStartLeft-V;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Q=this.manipulationStartWidth+Y.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:q=this.manipulationStartTop+Y.y-this.manipulationStartY,ie=this.manipulationStartHeight+this.manipulationStartTop-q;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ie=this.manipulationStartHeight+Y.y-this.manipulationStartY}Q>=0?(this.left=V,this.width=Q):(this.left=V+Q,this.width=-Q),ie>=0?(this.top=q,this.height=ie):(this.top=q+ie,this.height=-ie),this.setSize()},W.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},W.prototype.rotate=function(Y){if(Math.abs(Y.x-this.centerX)>.1){var V=Math.sign(Y.x-this.centerX);this.rotationAngle=180*Math.atan((Y.y-this.centerY)/(Y.x-this.centerX))/Math.PI+90*V,this.applyRotation()}},W.prototype.applyRotation=function(){var Y=this.container.transform.baseVal.getItem(0);Y.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Y,0)},W.prototype.rotatePoint=function(Y){if(this.rotationAngle===0)return Y;var V=this.container.getCTM(),Q=m.createPoint(Y.x,Y.y);return{x:(Q=Q.matrixTransform(V)).x,y:Q.y}},W.prototype.unrotatePoint=function(Y){if(this.rotationAngle===0)return Y;var V=this.container.getCTM();V=V.inverse();var Q=m.createPoint(Y.x,Y.y);return{x:(Q=Q.matrixTransform(V)).x,y:Q.y}},W.prototype.select=function(){te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},W.prototype.deselect=function(){te.prototype.deselect.call(this),this.controlBox.style.display="none"},W.prototype.setupControlBox=function(){this.controlBox=m.createGroup();var Y=m.createTransform();Y.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Y),this.container.appendChild(this.controlBox),this.controlRect=m.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=m.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new u,this.addControlGrips(),this.controlBox.style.display="none"},W.prototype.adjustControlBox=function(){var Y=this.controlBox.transform.baseVal.getItem(0);Y.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Y,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},W.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},W.prototype.createGrip=function(){var Y=new o;return Y.visual.transform.baseVal.appendItem(m.createTransform()),this.controlBox.appendChild(Y.visual),Y},W.prototype.positionGrips=function(){var Y=this.controlGrips.topLeft.GRIP_SIZE,V=-Y/2,Q=V,q=(this.width+this.CB_DISTANCE)/2-Y/2,ie=(this.height+this.CB_DISTANCE)/2-Y/2,ne=this.height+this.CB_DISTANCE-Y/2,J=this.width+this.CB_DISTANCE-Y/2;this.positionGrip(this.controlGrips.topLeft.visual,V,Q),this.positionGrip(this.controlGrips.topCenter.visual,q,Q),this.positionGrip(this.controlGrips.topRight.visual,J,Q),this.positionGrip(this.controlGrips.centerLeft.visual,V,ie),this.positionGrip(this.controlGrips.centerRight.visual,J,ie),this.positionGrip(this.controlGrips.bottomLeft.visual,V,ne),this.positionGrip(this.controlGrips.bottomCenter.visual,q,ne),this.positionGrip(this.controlGrips.bottomRight.visual,J,ne),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,q,Q-3*this.CB_DISTANCE)},W.prototype.positionGrip=function(Y,V,Q){var q=Y.transform.baseVal.getItem(0);q.setTranslate(V,Q),Y.transform.baseVal.replaceItem(q,0)},W.prototype.hideControlBox=function(){this.controlBox.style.display="none"},W.prototype.showControlBox=function(){this.controlBox.style.display=""},W.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:s.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:s.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},te.prototype.getState.call(this))},W.prototype.restoreState=function(Y){te.prototype.restoreState.call(this,Y);var V=Y;this.left=V.left,this.top=V.top,this.width=V.width,this.height=V.height,this.rotationAngle=V.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(s.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,V.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(s.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,V.containerTransformMatrix))},W.prototype.scale=function(Y,V){te.prototype.scale.call(this,Y,V);var Q=this.rotatePoint({x:this.left,y:this.top}),q=this.unrotatePoint({x:Q.x*Y,y:Q.y*V});this.left=q.x,this.top=q.y,this.width=this.width*Y,this.height=this.height*V,this.adjustControlBox()},W}(d),b=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.fillColor="transparent",q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.opacity=1,q.setStrokeColor=q.setStrokeColor.bind(q),q.setFillColor=q.setFillColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.createVisual=q.createVisual.bind(q),q}return g(W,te),W.prototype.ownsTarget=function(Y){return!(!te.prototype.ownsTarget.call(this,Y)&&Y!==this.visual)},W.prototype.createVisual=function(){this.visual=m.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function(Y,V){te.prototype.pointerDown.call(this,Y,V),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},W.prototype.manipulate=function(Y){te.prototype.manipulate.call(this,Y)},W.prototype.resize=function(Y){te.prototype.resize.call(this,Y),this.setSize()},W.prototype.setSize=function(){te.prototype.setSize.call(this),m.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},W.prototype.pointerUp=function(Y){te.prototype.pointerUp.call(this,Y),this.setSize()},W.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.visual&&m.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Y),this.stateChanged()},W.prototype.setFillColor=function(Y){this.fillColor=Y,this.visual&&m.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},W.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.visual&&m.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},W.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.visual&&m.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},W.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},te.prototype.getState.call(this))},W.prototype.restoreState=function(Y){var V=Y;this.fillColor=V.fillColor,this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.opacity=V.opacity,this.createVisual(),te.prototype.restoreState.call(this,Y),this.setSize()},W.prototype.scale=function(Y,V){te.prototype.scale.call(this,Y,V),this.setSize()},W.title="Rectangle marker",W}(E),p=function(te){function W(Y,V,Q,q){var ie=te.call(this,Y,q||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ie.widths=[],ie.widthBoxes=[],ie.widths=V,ie.currentWidth=Q,ie.setCurrentWidth=ie.setCurrentWidth.bind(ie),ie}return g(W,te),W.prototype.getUi=function(){var Y=this,V=document.createElement("div");return V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2",this.widths.forEach(function(Q){var q=document.createElement("div");q.style.display="flex",q.style.flexGrow="2",q.style.alignItems="center",q.style.justifyContent="space-between",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.borderColor=Q===Y.currentWidth?Y.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){Y.setCurrentWidth(Q,q)}),V.appendChild(q);var ie=document.createElement("div");ie.innerText=Q.toString(),ie.style.marginRight="5px",q.appendChild(ie);var ne=document.createElement("div");ne.style.minHeight="20px",ne.style.flexGrow="2",ne.style.display="flex",ne.style.alignItems="center";var J=document.createElement("hr");J.style.minWidth="20px",J.style.border="0px",J.style.borderTop=Q+"px solid "+Y.uiStyleSettings.toolboxColor,J.style.flexGrow="2",ne.appendChild(J),q.appendChild(ne),Y.widthBoxes.push(q)}),V},W.prototype.setCurrentWidth=function(Y,V){var Q=this;this.currentWidth=Y,this.widthBoxes.forEach(function(q){q.style.borderColor=q===V?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},W}(l),D=function(te){function W(Y,V,Q,q){var ie=te.call(this,Y,q||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return ie.styles=[],ie.styleBoxes=[],ie.styles=V,ie.currentStyle=Q,ie.setCurrentStyle=ie.setCurrentStyle.bind(ie),ie}return g(W,te),W.prototype.getUi=function(){var Y=this,V=document.createElement("div");return V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2",this.styles.forEach(function(Q){var q=document.createElement("div");q.style.display="flex",q.style.alignItems="center",q.style.justifyContent="space-between",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.overflow="hidden",q.style.maxWidth=100/Y.styles.length-5+"%",q.style.borderColor=Q===Y.currentStyle?Y.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){Y.setCurrentStyle(Q,q)}),V.appendChild(q);var ie=document.createElement("div");ie.style.minHeight="20px",ie.style.flexGrow="2",ie.style.overflow="hidden";var ne=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Y.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Q!==""?'stroke-dasharray="'+Q+'"':"")+` />
|
|
|
</svg>`;ie.innerHTML=ne,q.appendChild(ie),Y.styleBoxes.push(q)}),V},W.prototype.setCurrentStyle=function(Y,V){var Q=this;this.currentStyle=Y,this.styleBoxes.forEach(function(q){q.style.borderColor=q===V?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},W}(l),R=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.strokeColor=Q.defaultColor,q.strokeWidth=Q.defaultStrokeWidth,q.strokeDasharray=Q.defaultStrokeDasharray,q.strokePanel=new f("Line color",Q.defaultColorSet,Q.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.strokeWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new D("Line style",Q.defaultStrokeDasharrays,Q.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q}return g(W,te),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=te.prototype.getState.call(this);return Y.typeName=W.typeName,Y},W.typeName="FrameMarker",W.title="Frame marker",W.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',W}(b),y=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},x=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.x1=0,q.y1=0,q.x2=0,q.y2=0,q.defaultLength=50,q.manipulationStartX=0,q.manipulationStartY=0,q.manipulationStartX1=0,q.manipulationStartY1=0,q.manipulationStartX2=0,q.manipulationStartY2=0,q.setupControlBox(),q}return g(W,te),W.prototype.ownsTarget=function(Y){return!!te.prototype.ownsTarget.call(this,Y)||!(!this.grip1.ownsTarget(Y)&&!this.grip2.ownsTarget(Y))},W.prototype.pointerDown=function(Y,V){te.prototype.pointerDown.call(this,Y,V),this.manipulationStartX=Y.x,this.manipulationStartY=Y.y,this.state==="new"&&(this.x1=Y.x,this.y1=Y.y,this.x2=Y.x,this.y2=Y.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(V)?this.activeGrip=this.grip1:this.grip2.ownsTarget(V)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},W.prototype.pointerUp=function(Y){var V=this.state;te.prototype.pointerUp.call(this,Y),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(Y),this._state="select",V==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},W.prototype.adjustVisual=function(){},W.prototype.manipulate=function(Y){this.state==="creating"?this.resize(Y):this.state==="move"?(this.x1=this.manipulationStartX1+Y.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Y.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Y.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Y.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Y)},W.prototype.resize=function(Y){switch(this.activeGrip){case this.grip1:this.x1=Y.x,this.y1=Y.y;break;case this.grip2:case void 0:this.x2=Y.x,this.y2=Y.y}this.adjustVisual(),this.adjustControlBox()},W.prototype.select=function(){te.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},W.prototype.deselect=function(){te.prototype.deselect.call(this),this.controlBox.style.display="none"},W.prototype.setupControlBox=function(){this.controlBox=m.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},W.prototype.adjustControlBox=function(){this.positionGrips()},W.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},W.prototype.createGrip=function(){var Y=new o;return Y.visual.transform.baseVal.appendItem(m.createTransform()),this.controlBox.appendChild(Y.visual),Y},W.prototype.positionGrips=function(){var Y=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Y/2,this.y1-Y/2),this.positionGrip(this.grip2.visual,this.x2-Y/2,this.y2-Y/2)},W.prototype.positionGrip=function(Y,V,Q){var q=Y.transform.baseVal.getItem(0);q.setTranslate(V,Q),Y.transform.baseVal.replaceItem(q,0)},W.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},te.prototype.getState.call(this))},W.prototype.restoreState=function(Y){te.prototype.restoreState.call(this,Y);var V=Y;this.x1=V.x1,this.y1=V.y1,this.x2=V.x2,this.y2=V.y2},W.prototype.scale=function(Y,V){te.prototype.scale.call(this,Y,V),this.x1=this.x1*Y,this.y1=this.y1*V,this.x2=this.x2*Y,this.y2=this.y2*V,this.adjustVisual(),this.adjustControlBox()},W}(d),w=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.setStrokeColor=q.setStrokeColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.strokeColor=Q.defaultColor,q.strokeWidth=Q.defaultStrokeWidth,q.strokeDasharray=Q.defaultStrokeDasharray,q.strokePanel=new f("Line color",Q.defaultColorSet,Q.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.strokeWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new D("Line style",Q.defaultStrokeDasharrays,Q.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q}return g(W,te),W.prototype.ownsTarget=function(Y){return!(!te.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.selectorLine&&Y!==this.visibleLine)},W.prototype.createVisual=function(){this.visual=m.createGroup(),this.selectorLine=m.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=m.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function(Y,V){te.prototype.pointerDown.call(this,Y,V),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},W.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),m.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),m.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),m.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},W.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.adjustVisual(),this.colorChanged(Y)},W.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.adjustVisual()},W.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.adjustVisual(),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},te.prototype.getState.call(this));return Y.typeName=W.typeName,Y},W.prototype.restoreState=function(Y){te.prototype.restoreState.call(this,Y);var V=Y;this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.createVisual(),this.adjustVisual()},W.typeName="LineMarker",W.title="Line marker",W.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',W}(x),T=function(te){function W(Y,V,Q,q){var ie=te.call(this,Y,q||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return ie.fonts=[],ie.fontBoxes=[],ie.fonts=V,ie.currentFont=Q,ie.setCurrentFont=ie.setCurrentFont.bind(ie),ie}return g(W,te),W.prototype.getUi=function(){var Y=this,V=document.createElement("div");return V.style.overflow="hidden",V.style.flexGrow="2",this.fonts.forEach(function(Q){var q=document.createElement("div");q.style.display="inline-block",q.style.alignItems="center",q.style.justifyContent="space-between",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.overflow="hidden",q.style.maxWidth=100/Y.fonts.length-5+"%",q.style.borderColor=Q===Y.currentFont?Y.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){Y.setCurrentFont(Q,q)}),V.appendChild(q);var ie=document.createElement("div");ie.style.display="flex",ie.style.minHeight="20px",ie.style.flexGrow="2",ie.style.fontFamily=Q,ie.style.overflow="hidden";var ne=document.createElement("div");ne.style.whiteSpace="nowrap",ne.style.overflow="hidden",ne.style.textOverflow="ellipsis",ne.innerHTML="The quick brown fox jumps over the lazy dog",ie.appendChild(ne),q.appendChild(ie),Y.fontBoxes.push(q)}),V},W.prototype.setCurrentFont=function(Y,V){var Q=this;this.currentFont=Y,this.fontBoxes.forEach(function(q){q.style.borderColor=q===V?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},W}(l),F=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.color="transparent",q.padding=5,q.DEFAULT_TEXT="your text here",q.text=q.DEFAULT_TEXT,q.isMoved=!1,q.color=Q.defaultColor,q.fontFamily=Q.defaultFontFamily,q.defaultSize={x:100,y:30},q.setColor=q.setColor.bind(q),q.setFont=q.setFont.bind(q),q.renderText=q.renderText.bind(q),q.sizeText=q.sizeText.bind(q),q.textEditDivClicked=q.textEditDivClicked.bind(q),q.showTextEditor=q.showTextEditor.bind(q),q.setSize=q.setSize.bind(q),q.positionTextEditor=q.positionTextEditor.bind(q),q.colorPanel=new f("Color",Q.defaultColorSet,Q.defaultColor),q.colorPanel.onColorChanged=q.setColor,q.fontFamilyPanel=new T("Font",Q.defaultFontFamilies,Q.defaultFontFamily),q.fontFamilyPanel.onFontChanged=q.setFont,q}return g(W,te),W.prototype.ownsTarget=function(Y){if(te.prototype.ownsTarget.call(this,Y)||Y===this.visual||Y===this.textElement||Y===this.bgRectangle)return!0;var V=!1;return this.textElement.childNodes.forEach(function(Q){Q===Y&&(V=!0)}),V},W.prototype.createVisual=function(){this.visual=m.createGroup(),this.bgRectangle=m.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=m.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(m.createTransform()),this.textElement.transform.baseVal.appendItem(m.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},W.prototype.pointerDown=function(Y,V){te.prototype.pointerDown.call(this,Y,V),this.isMoved=!1,this.pointerDownPoint=Y,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},W.prototype.renderText=function(){var Y=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(V){Y.textElement.appendChild(m.createTSpan(V.trim()===""?" ":V.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},W.prototype.getTextScale=function(){var Y=this.textElement.getBBox(),V=1;if(Y.width>0&&Y.height>0){var Q=(1*this.width-this.width*this.padding*2/100)/Y.width,q=(1*this.height-this.height*this.padding*2/100)/Y.height;V=Math.min(Q,q)}return V},W.prototype.getTextPosition=function(Y){var V=this.textElement.getBBox(),Q=0,q=0;return V.width>0&&V.height>0&&(Q=(this.width-V.width*Y)/2,q=this.height/2-V.height*Y/2),{x:Q,y:q}},W.prototype.sizeText=function(){var Y=this.textElement.getBBox(),V=this.getTextScale(),Q=this.getTextPosition(V);Q.y-=Y.y*V,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Q.x+"px, "+Q.y+"px) scale("+V+", "+V+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Q.x,Q.y),this.textElement.transform.baseVal.getItem(1).setScale(V,V))},W.prototype.manipulate=function(Y){te.prototype.manipulate.call(this,Y),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Y.x-this.pointerDownPoint.x)>5||Math.abs(Y.y-this.pointerDownPoint.y)>5)},W.prototype.resize=function(Y){te.prototype.resize.call(this,Y),this.isMoved=!0,this.setSize(),this.sizeText()},W.prototype.setSize=function(){te.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(m.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),m.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},W.prototype.pointerUp=function(Y){var V=this.state;V==="creating"&&(this._suppressMarkerCreateEvent=!0),te.prototype.pointerUp.call(this,Y),this.setSize(),(V==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},W.prototype.showTextEditor=function(){var Y=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(V){V.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var V=Number.parseFloat(Y.textEditor.style.fontSize);Y.textEditor.clientWidth>=Number.parseInt(Y.textEditor.style.maxWidth)&&V>.9;)V-=.1,Y.textEditor.style.fontSize=Math.max(V,.9)+"em"}),this.textEditor.addEventListener("keyup",function(V){V.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(V){if(V.clipboardData){var Q=V.clipboardData.getData("text"),q=window.getSelection();if(!q.rangeCount)return!1;q.deleteFromDocument(),q.getRangeAt(0).insertNode(document.createTextNode(Q)),V.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Y.textEditDivClicked(Y.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},W.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Y=this.getTextScale(),V=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Q=this.textElement.getBBox(),q={x:Q.width*Y,y:Q.height*Y};V.x-=q.x/2,V.y-=q.y/2,this.textEditor.style.top=V.y+"px",this.textEditor.style.left=V.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-V.x+"px",this.textEditor.style.fontSize=Math.max(16*Y,12)+"px",this.textElement.style.display="none"}},W.prototype.textEditDivClicked=function(Y){this.text=Y.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},W.prototype.select=function(){te.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},W.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),te.prototype.deselect.call(this)},W.prototype.dblClick=function(Y,V){te.prototype.dblClick.call(this,Y,V),this.showTextEditor()},W.prototype.setColor=function(Y){this.textElement&&m.setAttributes(this.textElement,[["fill",Y]]),this.color=Y,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Y)},W.prototype.setFont=function(Y){this.textElement&&m.setAttributes(this.textElement,[["font-family",Y]]),this.fontFamily=Y,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},W.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},W.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},te.prototype.getState.call(this));return Y.typeName=W.typeName,Y},W.prototype.restoreState=function(Y){var V=Y;this.color=V.color,this.fontFamily=V.fontFamily,this.padding=V.padding,this.text=V.text,this.createVisual(),te.prototype.restoreState.call(this,Y),this.setSize()},W.prototype.scale=function(Y,V){te.prototype.scale.call(this,Y,V),this.setSize(),this.sizeText(),this.positionTextEditor()},W.typeName="TextMarker",W.title="Text marker",W.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',W}(E),P=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.color="transparent",q.lineWidth=3,q.drawing=!1,q.pixelRatio=1,q.color=Q.defaultColor,q.lineWidth=Q.defaultStrokeWidth,q.pixelRatio=Q.freehandPixelRatio,q.setColor=q.setColor.bind(q),q.addCanvas=q.addCanvas.bind(q),q.finishCreation=q.finishCreation.bind(q),q.setLineWidth=q.setLineWidth.bind(q),q.colorPanel=new f("Color",Q.defaultColorSet,Q.defaultColor),q.colorPanel.onColorChanged=q.setColor,q.lineWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),q.lineWidthPanel.onWidthChanged=q.setLineWidth,q}return g(W,te),W.prototype.ownsTarget=function(Y){return!(!te.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.drawingImage)},W.prototype.createVisual=function(){this.visual=m.createGroup(),this.drawingImage=m.createImage(),this.visual.appendChild(this.drawingImage);var Y=m.createTransform();this.visual.transform.baseVal.appendItem(Y),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function(Y,V){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(Y.x,Y.y),this.drawing=!0):te.prototype.pointerDown.call(this,Y,V)},W.prototype.manipulate=function(Y){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Y.x,Y.y),this.canvasContext.stroke()):te.prototype.manipulate.call(this,Y)},W.prototype.resize=function(Y){te.prototype.resize.call(this,Y),m.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),m.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},W.prototype.pointerUp=function(Y){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):te.prototype.pointerUp.call(this,Y)},W.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},W.prototype.select=function(){this.state==="creating"&&this.finishCreation(),te.prototype.select.call(this)},W.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),te.prototype.deselect.call(this)},W.prototype.finishCreation=function(){for(var Y=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),V=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Q=V[0],q=V[1],ie=V[2],ne=V[3],J=!1,$=0;$<this.canvasElement.height;$++)for(var le=0;le<this.canvasElement.width;le++)Y.data[$*this.canvasElement.width*4+4*le+3]>0&&(J=!0,$<q&&(q=$),le<Q&&(Q=le),$>ne&&(ne=$),le>ie&&(ie=le));if(J){this.left=Q/this.pixelRatio,this.top=q/this.pixelRatio,this.width=(ie-Q)/this.pixelRatio,this.height=(ne-q)/this.pixelRatio;var ce=document.createElement("canvas");ce.width=ie-Q,ce.height=ne-q,ce.getContext("2d").putImageData(this.canvasContext.getImageData(Q,q,ie-Q,ne-q),0,0),this.drawingImgUrl=ce.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},W.prototype.setDrawingImage=function(){m.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),m.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},W.prototype.setColor=function(Y){this.color=Y,this.colorChanged(Y)},W.prototype.setLineWidth=function(Y){this.lineWidth=Y},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=Object.assign({drawingImgUrl:this.drawingImgUrl},te.prototype.getState.call(this));return Y.typeName=W.typeName,Y},W.prototype.restoreState=function(Y){this.createVisual(),te.prototype.restoreState.call(this,Y),this.drawingImgUrl=Y.drawingImgUrl,this.setDrawingImage()},W.prototype.scale=function(Y,V){te.prototype.scale.call(this,Y,V),this.setDrawingImage()},W.typeName="FreehandMarker",W.title="Freehand marker",W.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',W}(E),A=function(te){function W(Y,V,Q){var q=te.call(this,Y,Q||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return q.typeBoxes=[],q.currentType=V,q.setCurrentType=q.setCurrentType.bind(q),q}return g(W,te),W.prototype.getUi=function(){var Y=this,V=document.createElement("div");V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2";for(var Q=function(ne){var J="both";switch(ne){case 0:J="both";break;case 1:J="start";break;case 2:J="end";break;case 3:J="none"}var $=document.createElement("div");if($.style.display="flex",$.style.flexGrow="2",$.style.alignItems="center",$.style.justifyContent="space-between",$.style.padding="5px",$.style.borderWidth="2px",$.style.borderStyle="solid",$.style.borderColor=J===q.currentType?q.uiStyleSettings.toolboxAccentColor:"transparent",$.addEventListener("click",function(){Y.setCurrentType(J,$)}),V.appendChild($),J==="both"||J==="start"){var le=document.createElement("div");le.style.display="flex",le.style.alignItems="center",le.style.minHeight="20px",le.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,5 10,0 10,10" fill="`+(q.uiStyleSettings!==void 0?q.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,le.style.marginLeft="5px",$.appendChild(le)}var ce=document.createElement("div");ce.style.display="flex",ce.style.alignItems="center",ce.style.minHeight="20px",ce.style.flexGrow="2";var we=document.createElement("hr");if(we.style.minWidth="20px",we.style.border="0px",we.style.borderTop="3px solid "+(q.uiStyleSettings!==void 0?q.uiStyleSettings.toolboxColor:"#eeeeee"),we.style.flexGrow="2",ce.appendChild(we),$.appendChild(ce),J==="both"||J==="end"){var Fe=document.createElement("div");Fe.style.display="flex",Fe.style.alignItems="center",Fe.style.minHeight="20px",Fe.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,0 10,5 0,10" fill="`+(q.uiStyleSettings!==void 0?q.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Fe.style.marginRight="5px",$.appendChild(Fe)}q.typeBoxes.push($)},q=this,ie=0;ie<4;ie++)Q(ie);return V},W.prototype.setCurrentType=function(Y,V){var Q=this;this.currentType=Y,this.typeBoxes.forEach(function(q){q.style.borderColor=q===V?Q.uiStyleSettings!==void 0?Q.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},W}(l),X=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.arrowType="end",q.arrowBaseHeight=10,q.arrowBaseWidth=10,q.getArrowPoints=q.getArrowPoints.bind(q),q.setArrowType=q.setArrowType.bind(q),q.arrowTypePanel=new A("Arrow type","end"),q.arrowTypePanel.onArrowTypeChanged=q.setArrowType,q}return g(W,te),W.prototype.ownsTarget=function(Y){return!(!te.prototype.ownsTarget.call(this,Y)&&Y!==this.arrow1&&Y!==this.arrow2)},W.prototype.getArrowPoints=function(Y,V){var Q=this.arrowBaseWidth+2*this.strokeWidth,q=this.arrowBaseHeight+2*this.strokeWidth;return Y-Q/2+","+(V+q/2)+" "+Y+","+(V-q/2)+" "+(Y+Q/2)+","+(V+q/2)},W.prototype.createTips=function(){this.arrow1=m.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(m.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=m.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(m.createTransform()),this.visual.appendChild(this.arrow2)},W.prototype.pointerDown=function(Y,V){te.prototype.pointerDown.call(this,Y,V),this.state==="creating"&&this.createTips()},W.prototype.adjustVisual=function(){if(te.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",m.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),m.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var Y=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),V=this.arrow1.transform.baseVal.getItem(0);V.setRotate(Y,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(V,0);var Q=this.arrow2.transform.baseVal.getItem(0);Q.setRotate(Y+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Q,0)}},W.prototype.setArrowType=function(Y){this.arrowType=Y,this.adjustVisual(),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=Object.assign({arrowType:this.arrowType},te.prototype.getState.call(this));return Y.typeName=W.typeName,Y},W.prototype.restoreState=function(Y){te.prototype.restoreState.call(this,Y);var V=Y;this.arrowType=V.arrowType,this.createTips(),this.adjustVisual()},W.typeName="ArrowMarker",W.title="Arrow marker",W.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',W}(w),z=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.fillColor=Q.defaultFillColor,q.strokeWidth=0,q.fillPanel=new f("Color",Q.defaultColorSet,Q.defaultFillColor),q.fillPanel.onColorChanged=q.setFillColor,q}return g(W,te),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=te.prototype.getState.call(this);return Y.typeName=W.typeName,Y},W.typeName="CoverMarker",W.title="Cover marker",W.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',W}(b),O=function(te){function W(Y,V,Q,q){var ie=te.call(this,Y,q||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return ie.opacities=[],ie.opacityBoxes=[],ie.opacities=V,ie.currentOpacity=Q,ie.setCurrentOpacity=ie.setCurrentOpacity.bind(ie),ie}return g(W,te),W.prototype.getUi=function(){var Y=this,V=document.createElement("div");return V.style.display="flex",V.style.overflow="hidden",V.style.flexGrow="2",V.style.justifyContent="space-between",this.opacities.forEach(function(Q){var q=document.createElement("div");q.style.display="flex",q.style.alignItems="center",q.style.justifyContent="center",q.style.padding="5px",q.style.borderWidth="2px",q.style.borderStyle="solid",q.style.borderColor=Q===Y.currentOpacity?Y.uiStyleSettings.toolboxAccentColor:"transparent",q.addEventListener("click",function(){Y.setCurrentOpacity(Q,q)}),V.appendChild(q);var ie=document.createElement("div");ie.innerText=100*Q+"%",q.appendChild(ie),Y.opacityBoxes.push(q)}),V},W.prototype.setCurrentOpacity=function(Y,V){var Q=this;this.currentOpacity=Y,this.opacityBoxes.forEach(function(q){q.style.borderColor=q===V?Q.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},W}(l),B=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.setOpacity=q.setOpacity.bind(q),q.fillColor=Q.defaultHighlightColor,q.strokeWidth=0,q.opacity=Q.defaultHighlightOpacity,q.fillPanel=new f("Color",Q.defaultColorSet,q.fillColor),q.fillPanel.onColorChanged=q.setFillColor,q.opacityPanel=new O("Opacity",Q.defaultOpacitySteps,q.opacity),q.opacityPanel.onOpacityChanged=q.setOpacity,q}return g(W,te),W.prototype.setOpacity=function(Y){this.opacity=Y,this.visual&&m.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=te.prototype.getState.call(this);return Y.typeName=W.typeName,Y},W.typeName="HighlightMarker",W.title="Highlight marker",W.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',W}(z),U='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',L=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.bgColor="transparent",q.tipPosition={x:0,y:0},q.tipBase1Position={x:0,y:0},q.tipBase2Position={x:0,y:0},q.tipMoving=!1,q.color=Q.defaultStrokeColor,q.bgColor=Q.defaultFillColor,q.fontFamily=Q.defaultFontFamily,q.defaultSize={x:100,y:30},q.setBgColor=q.setBgColor.bind(q),q.getTipPoints=q.getTipPoints.bind(q),q.positionTip=q.positionTip.bind(q),q.setTipPoints=q.setTipPoints.bind(q),q.colorPanel=new f("Text color",Q.defaultColorSet,q.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),q.colorPanel.onColorChanged=q.setColor,q.bgColorPanel=new f("Fill color",Q.defaultColorSet,q.bgColor,U),q.bgColorPanel.onColorChanged=q.setBgColor,q.fontFamilyPanel=new T("Font",Q.defaultFontFamilies,Q.defaultFontFamily),q.fontFamilyPanel.onFontChanged=q.setFont,q.tipGrip=new o,q.tipGrip.visual.transform.baseVal.appendItem(m.createTransform()),q.controlBox.appendChild(q.tipGrip.visual),q}return g(W,te),W.prototype.ownsTarget=function(Y){return te.prototype.ownsTarget.call(this,Y)||this.tipGrip.ownsTarget(Y)||this.tip===Y},W.prototype.createTip=function(){m.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=m.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},W.prototype.pointerDown=function(Y,V){this.state==="new"&&te.prototype.pointerDown.call(this,Y,V),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(V)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):te.prototype.pointerDown.call(this,Y,V)},W.prototype.pointerUp=function(Y){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,te.prototype.pointerUp.call(this,Y);else{var V=this.state==="creating";te.prototype.pointerUp.call(this,Y),this.setTipPoints(V),this.positionTip()}},W.prototype.manipulate=function(Y){if(this.tipMoving){var V=this.unrotatePoint(Y);this.tipPosition={x:V.x-this.manipulationStartLeft,y:V.y-this.manipulationStartTop},this.positionTip()}else te.prototype.manipulate.call(this,Y)},W.prototype.setBgColor=function(Y){this.bgRectangle&&this.tip&&(m.setAttributes(this.bgRectangle,[["fill",Y]]),m.setAttributes(this.tip,[["fill",Y]])),this.bgColor=Y,this.fillColorChanged(Y)},W.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},W.prototype.setTipPoints=function(Y){Y===void 0&&(Y=!1);var V=Math.min(this.height/2,15),Q=this.height/5;Y&&(this.tipPosition={x:V+Q/2,y:this.height+20});var q=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?q<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Q=this.width/5,V=Math.min(this.width/2,15),this.tipBase1Position={x:V,y:0},this.tipBase2Position={x:V+Q,y:0}):(this.tipBase1Position={x:0,y:V},this.tipBase2Position={x:0,y:V+Q}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?q<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Q=this.width/5,V=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-V-Q,y:0},this.tipBase2Position={x:this.width-V,y:0}):(this.tipBase1Position={x:this.width,y:V},this.tipBase2Position={x:this.width,y:V+Q}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?q<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Q=this.width/5,V=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-V-Q,y:this.height},this.tipBase2Position={x:this.width-V,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-V-Q},this.tipBase2Position={x:this.width,y:this.height-V}):q<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Q=this.width/5,V=Math.min(this.width/2,15),this.tipBase1Position={x:V,y:this.height},this.tipBase2Position={x:V+Q,y:this.height}):(this.tipBase1Position={x:0,y:this.height-V},this.tipBase2Position={x:0,y:this.height-V-Q})},W.prototype.resize=function(Y){te.prototype.resize.call(this,Y),this.positionTip()},W.prototype.positionTip=function(){m.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Y=this.tipGrip.visual.transform.baseVal.getItem(0);Y.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Y,0)},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),W.prototype.select=function(){this.positionTip(),te.prototype.select.call(this)},W.prototype.getState=function(){var Y=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},te.prototype.getState.call(this));return Y.typeName=W.typeName,Y},W.prototype.restoreState=function(Y){var V=Y;this.bgColor=V.bgColor,this.tipPosition=V.tipPosition,te.prototype.restoreState.call(this,Y),this.createTip(),this.setTipPoints()},W.prototype.scale=function(Y,V){te.prototype.scale.call(this,Y,V),this.tipPosition={x:this.tipPosition.x*Y,y:this.tipPosition.y*V},this.positionTip()},W.typeName="CalloutMarker",W.title="Callout marker",W.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',W}(F),G=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.fillColor="transparent",q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.opacity=1,q.strokeColor=Q.defaultColor,q.strokeWidth=Q.defaultStrokeWidth,q.strokeDasharray=Q.defaultStrokeDasharray,q.fillColor=Q.defaultFillColor,q.setStrokeColor=q.setStrokeColor.bind(q),q.setFillColor=q.setFillColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.setOpacity=q.setOpacity.bind(q),q.createVisual=q.createVisual.bind(q),q.strokePanel=new f("Line color",v(Q.defaultColorSet,["transparent"]),Q.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.fillPanel=new f("Fill color",v(Q.defaultColorSet,["transparent"]),q.fillColor,U),q.fillPanel.onColorChanged=q.setFillColor,q.strokeWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new D("Line style",Q.defaultStrokeDasharrays,Q.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q.opacityPanel=new O("Opacity",Q.defaultOpacitySteps,q.opacity),q.opacityPanel.onOpacityChanged=q.setOpacity,q}return g(W,te),W.prototype.ownsTarget=function(Y){return!(!te.prototype.ownsTarget.call(this,Y)&&Y!==this.visual)},W.prototype.createVisual=function(){this.visual=m.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function(Y,V){te.prototype.pointerDown.call(this,Y,V),this.state==="new"&&(this.createVisual(),this.moveVisual(Y),this._state="creating")},W.prototype.manipulate=function(Y){te.prototype.manipulate.call(this,Y)},W.prototype.resize=function(Y){te.prototype.resize.call(this,Y),this.setSize()},W.prototype.setSize=function(){te.prototype.setSize.call(this),m.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},W.prototype.pointerUp=function(Y){te.prototype.pointerUp.call(this,Y),this.setSize()},W.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.visual&&m.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Y),this.stateChanged()},W.prototype.setFillColor=function(Y){this.fillColor=Y,this.visual&&m.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Y),this.stateChanged()},W.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.visual&&m.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},W.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.visual&&m.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},W.prototype.setOpacity=function(Y){this.opacity=Y,this.visual&&m.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},te.prototype.getState.call(this));return Y.typeName=W.typeName,Y},W.prototype.restoreState=function(Y){var V=Y;this.fillColor=V.fillColor,this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.opacity=V.opacity,this.createVisual(),te.prototype.restoreState.call(this,Y),this.setSize()},W.prototype.scale=function(Y,V){te.prototype.scale.call(this,Y,V),this.setSize()},W.typeName="EllipseMarker",W.title="Ellipse marker",W.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',W}(E),ee=function(te){function W(Y,V,Q){return te.call(this,Y,V,Q)||this}return g(W,te),Object.defineProperty(W.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),W.prototype.ownsTarget=function(Y){return!(!te.prototype.ownsTarget.call(this,Y)&&Y!==this.tip1&&Y!==this.tip2)},W.prototype.createTips=function(){this.tip1=m.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(m.createTransform()),this.visual.appendChild(this.tip1),this.tip2=m.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(m.createTransform()),this.visual.appendChild(this.tip2)},W.prototype.pointerDown=function(Y,V){te.prototype.pointerDown.call(this,Y,V),this.state==="creating"&&this.createTips()},W.prototype.adjustVisual=function(){if(te.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(m.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),m.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var Y=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),V=this.tip1.transform.baseVal.getItem(0);V.setRotate(Y,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(V,0);var Q=this.tip2.transform.baseVal.getItem(0);Q.setRotate(Y+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Q,0)}},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=te.prototype.getState.call(this);return Y.typeName=W.typeName,Y},W.prototype.restoreState=function(Y){te.prototype.restoreState.call(this,Y),this.createTips(),this.adjustVisual()},W.typeName="MeasurementMarker",W.title="Measurement marker",W.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',W}(w),oe=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.strokePanel.colors=Q.defaultColorSet,q.fillColor="transparent",q}return g(W,te),Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=te.prototype.getState.call(this);return Y.typeName=W.typeName,Y},W.typeName="EllipseFrameMarker",W.title="Ellipse frame marker",W.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',W}(G),ae=function(){function te(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(te.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),te.prototype.addUndoStep=function(W){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(W)||(this.undoStack.push(W),JSON.stringify(this.lastRedoStep)!==JSON.stringify(W)&&this.redoStack.splice(0,this.redoStack.length))},te.prototype.replaceLastUndoStep=function(W){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=W)},te.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},te.prototype.undo=function(){if(this.undoStack.length>1){var W=this.undoStack.pop();return W!==void 0&&this.redoStack.push(W),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},te.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},te}(),be=function(te){function W(Y,V,Q){var q=te.call(this,Y,V,Q)||this;return q.strokeColor="transparent",q.strokeWidth=0,q.strokeDasharray="",q.curveX=0,q.curveY=0,q.manipulationStartCurveX=0,q.manipulationStartCurveY=0,q.setStrokeColor=q.setStrokeColor.bind(q),q.setStrokeWidth=q.setStrokeWidth.bind(q),q.setStrokeDasharray=q.setStrokeDasharray.bind(q),q.positionGrips=q.positionGrips.bind(q),q.addControlGrips=q.addControlGrips.bind(q),q.adjustVisual=q.adjustVisual.bind(q),q.setupControlBox=q.setupControlBox.bind(q),q.resize=q.resize.bind(q),q.strokeColor=Q.defaultColor,q.strokeWidth=Q.defaultStrokeWidth,q.strokeDasharray=Q.defaultStrokeDasharray,q.strokePanel=new f("Line color",Q.defaultColorSet,Q.defaultColor),q.strokePanel.onColorChanged=q.setStrokeColor,q.strokeWidthPanel=new p("Line width",Q.defaultStrokeWidths,Q.defaultStrokeWidth),q.strokeWidthPanel.onWidthChanged=q.setStrokeWidth,q.strokeStylePanel=new D("Line style",Q.defaultStrokeDasharrays,Q.defaultStrokeDasharray),q.strokeStylePanel.onStyleChanged=q.setStrokeDasharray,q}return g(W,te),W.prototype.ownsTarget=function(Y){return!(!te.prototype.ownsTarget.call(this,Y)&&Y!==this.visual&&Y!==this.selectorCurve&&Y!==this.visibleCurve&&!this.curveGrip.ownsTarget(Y))},W.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},W.prototype.createVisual=function(){this.visual=m.createGroup(),this.selectorCurve=m.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=m.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},W.prototype.pointerDown=function(Y,V){te.prototype.pointerDown.call(this,Y,V),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Y.x,this.curveY=Y.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(V)&&(this.activeGrip=this.curveGrip,this._state="resize")},W.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),m.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),m.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),m.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},W.prototype.setupControlBox=function(){te.prototype.setupControlBox.call(this),this.curveControlLine1=m.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=m.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},W.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,te.prototype.addControlGrips.call(this)},W.prototype.positionGrips=function(){te.prototype.positionGrips.call(this);var Y=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Y/2,this.curveY-Y/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},W.prototype.manipulate=function(Y){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Y.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Y.y-this.manipulationStartY),te.prototype.manipulate.call(this,Y)},W.prototype.resize=function(Y){this.activeGrip===this.curveGrip&&(this.curveX=Y.x,this.curveY=Y.y),te.prototype.resize.call(this,Y),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},W.prototype.setStrokeColor=function(Y){this.strokeColor=Y,this.adjustVisual(),this.colorChanged(Y)},W.prototype.setStrokeWidth=function(Y){this.strokeWidth=Y,this.adjustVisual()},W.prototype.setStrokeDasharray=function(Y){this.strokeDasharray=Y,this.adjustVisual()},W.prototype.scale=function(Y,V){this.curveX=this.curveX*Y,this.curveY=this.curveY*V,te.prototype.scale.call(this,Y,V)},Object.defineProperty(W.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),W.prototype.getState=function(){var Y=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},te.prototype.getState.call(this));return Y.typeName=W.typeName,Y},W.prototype.restoreState=function(Y){te.prototype.restoreState.call(this,Y);var V=Y;this.strokeColor=V.strokeColor,this.strokeWidth=V.strokeWidth,this.strokeDasharray=V.strokeDasharray,this.curveX=V.curveX,this.curveY=V.curveY,this.createVisual(),this.adjustVisual()},W.typeName="CurveMarker",W.title="Curve marker",W.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',W}(x),_e=function(){function te(W,Y){Y===void 0&&(Y=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=W,this.cancelable=Y}return Object.defineProperty(te.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),te.prototype.preventDefault=function(){this._defaultPrevented=!0},te}(),fe=function(te){function W(Y,V,Q){var q=te.call(this,Y,!1)||this;return q.dataUrl=V,q.state=Q,q}return g(W,te),W}(_e),Re=function(te){function W(Y,V,Q){Q===void 0&&(Q=!1);var q=te.call(this,Y,Q)||this;return q.marker=V,q}return g(W,te),W}(_e),Oe=function(){function te(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return te.prototype.addEventListener=function(W,Y){this[W].push(Y)},te.prototype.removeEventListener=function(W,Y){var V=this[W].indexOf(Y);V>-1&&this[W].splice(V,1)},te}(),de=function(){function te(W){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new y,this._isOpen=!1,this.undoRedoManager=new ae,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Oe,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=te.instanceCounter++,this.styles=new h(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=W,this.targetRoot=document.body,this.width=W.clientWidth,this.height=W.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(te.prototype,"ALL_MARKER_TYPES",{get:function(){return[R,P,X,F,oe,G,B,L,ee,z,w,be]},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[R,P,X,F,G,B,L]},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"BASIC_MARKER_TYPES",{get:function(){return[R,P,X,F,B]},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(W){var Y=this;this._availableMarkerTypes.splice(0),W.forEach(function(V){if(typeof V=="string"){var Q=Y.ALL_MARKER_TYPES.find(function(q){return q.typeName===V});Q!==void 0&&Y._availableMarkerTypes.push(Q)}else Y._availableMarkerTypes.push(V)})},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(W){this._zoomLevel=W,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),te.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),C.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},te.prototype.show=function(){var W=this;this.styles.styleSheetRoot===void 0&&e.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=e.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Y){return Y(new _e(W))})},te.prototype.render=function(){return S(this,void 0,void 0,function(){var W;return k(this,function(Y){switch(Y.label){case 0:return this.setCurrentMarker(),(W=new _).naturalSize=this.renderAtNaturalSize,W.imageType=this.renderImageType,W.imageQuality=this.renderImageQuality,W.markersOnly=this.renderMarkersOnly,W.width=this.renderWidth,W.height=this.renderHeight,[4,W.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Y.sent(),[4,W.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Y.sent()]}})})},te.prototype.close=function(W){var Y=this;if(W===void 0&&(W=!1),this.isOpen){var V=!1;W||this.eventListeners.beforeclose.forEach(function(Q){var q=new _e(Y,!0);Q(q),q.defaultPrevented&&(V=!0)}),V||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Q){return Q(new _e(Y))}),this.detachEvents(),this._isOpen=!1)}},te.prototype.addMarkersToToolbar=function(){for(var W,Y=[],V=0;V<arguments.length;V++)Y[V]=arguments[V];(W=this._availableMarkerTypes).push.apply(W,Y)},te.prototype.addRenderEventListener=function(W){this.addEventListener("render",function(Y){W(Y.dataUrl,Y.state)})},te.prototype.removeRenderEventListener=function(W){},te.prototype.addCloseEventListener=function(W){this.addEventListener("close",function(){W()})},te.prototype.removeCloseEventListener=function(W){},te.prototype.setupResizeObserver=function(){var W=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){W.resize(W.target.clientWidth,W.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return W.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},te.prototype.onPopupTargetResize=function(){var W=1*this.target.clientWidth/this.target.clientHeight,Y=this.editorCanvas.clientWidth/W>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*W:this.editorCanvas.clientWidth,V=Y<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/W;this.resize(Y,V)},te.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},te.prototype.resize=function(W,Y){this._isResizing=!0;var V=W/this.imageWidth,Q=Y/this.imageHeight;this.imageWidth=Math.round(W),this.imageHeight=Math.round(Y),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(V,Q),this._isResizing=!1},te.prototype.scaleMarkers=function(W,Y){var V,Q=this;this._currentMarker&&this._currentMarker instanceof F?this._currentMarker.scale(W,Y):(V=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(q){q!==Q._currentMarker&&q.scale(W,Y)}),V!==void 0&&this.setCurrentMarker(V)},te.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},te.prototype.setTopLeft=function(){var W=this.editingTarget.getBoundingClientRect(),Y=this.editorCanvas.getBoundingClientRect();this.left=W.left-Y.left,this.top=W.top-Y.top},te.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},te.prototype.addDefs=function(){for(var W,Y=[],V=0;V<arguments.length;V++)Y[V]=arguments[V];this.defs=m.createDefs(),this.addDefsToImage(),(W=this.defs).append.apply(W,Y)},te.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},te.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},te.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},te.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},te.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},te.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},te.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},te.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var W=document.createElement("a");W.href="https://markerjs.com/",W.target="_blank",W.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',W.title="Powered by marker.js",W.style.display="grid",W.style.alignItems="center",W.style.justifyItems="center",W.style.padding="3px",W.style.width="20px",W.style.height="20px",this.logoUI.appendChild(W),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},te.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},te.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},te.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},te.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var W=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=W+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new i(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new n(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},te.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},te.prototype.removeMarker=function(W){this.markerImage.removeChild(W.container),this.markers.indexOf(W)>-1&&this.markers.splice(this.markers.indexOf(W),1),W.dispose()},te.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},te.prototype.toolbarButtonClicked=function(W,Y){if(W==="marker"&&Y!==void 0)this.createNewMarker(Y);else if(W==="action")switch(Y){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},te.prototype.deleteSelectedMarker=function(){var W=this;if(this._currentMarker!==void 0){var Y=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Q){var q=new Re(W,W._currentMarker,!0);Q(q),q.defaultPrevented&&(Y=!0)}),!Y){var V=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(Q){return Q(new Re(W,V))})}}},te.prototype.clear=function(){var W=this,Y=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ie){var ne=new Re(W,void 0,!0);ie(ne),ne.defaultPrevented&&(Y=!0)}),!Y)){this.setCurrentMarker();for(var V=function(ie){var ne=Q.markers[ie];Q.setCurrentMarker(Q.markers[ie]),Q._currentMarker.dispose(),Q.markerImage.removeChild(Q._currentMarker.container),Q.markers.splice(Q.markers.indexOf(Q._currentMarker),1),Q.eventListeners.markerdelete.forEach(function(J){return J(new Re(W,ne))})},Q=this,q=this.markers.length-1;q>=0;q--)V(q);this.addUndoStep()}},Object.defineProperty(te.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),te.prototype.showNotesEditor=function(){var W;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(W=this._currentMarker.notes)!==null&&W!==void 0?W:"",this.overlayContainer.appendChild(this.notesArea))},te.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},te.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},te.prototype.addUndoStep=function(){var W=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Y=this.getState(),V=this.undoRedoManager.getLastUndoStep();if(!V||V.width===Y.width&&V.height===Y.height){var Q=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Y),Q<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(q){return q(new _e(W))})}else this.undoRedoManager.replaceLastUndoStep(Y),this.eventListeners.statechange.forEach(function(q){return q(new _e(W))})}},te.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},te.prototype.undoStep=function(){var W=this,Y=this.undoRedoManager.undo();Y!==void 0&&(this.restoreState(Y),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(V){return V(new _e(W))}))},te.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},te.prototype.redoStep=function(){var W=this,Y=this.undoRedoManager.redo();Y!==void 0&&(this.restoreState(Y),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(V){return V(new _e(W))}))},te.prototype.stepZoom=function(){var W=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=W<this.zoomSteps.length-1?this.zoomSteps[W+1]:this.zoomSteps[0]},te.prototype.panTo=function(W){this.contentDiv.scrollBy({left:this.prevPanPoint.x-W.x,top:this.prevPanPoint.y-W.y}),this.prevPanPoint=W},te.prototype.startRenderAndClose=function(){return S(this,void 0,void 0,function(){var W,Y,V=this;return k(this,function(Q){switch(Q.label){case 0:return[4,this.render()];case 1:return W=Q.sent(),Y=this.getState(),this.eventListeners.render.forEach(function(q){return q(new fe(V,W,Y))}),this.close(!0),[2]}})})},te.prototype.getState=function(W){W===!0&&this.setCurrentMarker();var Y={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(V){return Y.markers.push(V.getState())}),Y},te.prototype.restoreState=function(W){var Y=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);W.markers.forEach(function(V){var Q=Y._availableMarkerTypes.find(function(ie){return ie.typeName===V.typeName});if(Q!==void 0){var q=Y.addNewMarker(Q);q.restoreState(V),Y.markers.push(q)}}),W.width&&W.height&&(W.width!==this.imageWidth||W.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/W.width,this.imageHeight/W.height),this.eventListeners.restorestate.forEach(function(V){return V(new _e(Y))})},te.prototype.addNewMarker=function(W){var Y=m.createGroup();return this.markerImage.appendChild(Y),new W(Y,this.overlayContainer,this.settings)},te.prototype.createNewMarker=function(W){var Y,V=this;(Y=typeof W=="string"?this._availableMarkerTypes.find(function(Q){return Q.typeName===W}):W)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Y),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(Y.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Q){return Q(new Re(V,V._currentMarker))}))},te.prototype.markerCreated=function(W){var Y=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(W),this.setCurrentMarker(W),W instanceof P&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(P):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(V){return V(new Re(Y,Y._currentMarker))})},te.prototype.colorChanged=function(W){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=W,this.settings.defaultStrokeColor=W)},te.prototype.fillColorChanged=function(W){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=W)},te.prototype.markerStateChanged=function(W){var Y=this;this.eventListeners.markerchange.forEach(function(V){return V(new Re(Y,W))})},te.prototype.setCurrentMarker=function(W){var Y=this;this._currentMarker!==W&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(V){return V(new Re(Y,Y._currentMarker))})),this._currentMarker=W,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(V){return V(new Re(Y,Y._currentMarker))}))},te.prototype.onPointerDown=function(W){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||W.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Y=this.markers.find(function(V){return V.ownsTarget(W.target)});Y!==void 0?(this.setCurrentMarker(Y),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(W.clientX,W.clientY),W.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:W.clientX,y:W.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(W.clientX,W.clientY))},te.prototype.onDblClick=function(W){if(this._isFocused||this.focus(),this.mode==="select"){var Y=this.markers.find(function(V){return V.ownsTarget(W.target)});Y!==void 0&&Y!==this._currentMarker&&this.setCurrentMarker(Y),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(W.clientX,W.clientY),W.target):this.setCurrentMarker()}},te.prototype.onPointerMove=function(W){this.touchPoints!==1&&W.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||W.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(W.clientX,W.clientY)):this.zoomLevel>1&&this.panTo({x:W.clientX,y:W.clientY}))},te.prototype.onPointerUp=function(W){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(W.clientX,W.clientY)),this.isDragging=!1,this.addUndoStep()},te.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},te.prototype.onKeyUp=function(W){this._currentMarker===void 0||this.notesArea!==void 0||W.key!=="Delete"&&W.key!=="Backspace"||this.deleteSelectedMarker()},te.prototype.clientToLocalCoordinates=function(W,Y){var V=this.markerImage.getBoundingClientRect();return{x:(W-V.left)/this.zoomLevel,y:(Y-V.top)/this.zoomLevel}},te.prototype.onWindowResize=function(){this.positionUI()},te.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var W=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=W+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},te.prototype.addLicenseKey=function(W){C.addKey(W)},te.prototype.addEventListener=function(W,Y){this.eventListeners.addEventListener(W,Y)},te.prototype.removeEventListener=function(W,Y){this.eventListeners.removeEventListener(W,Y)},te.prototype.renderState=function(W){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(W),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(te.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),te.prototype.focus=function(){var W=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Y){return Y(new _e(W))}))},te.prototype.blur=function(){var W=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Y){return Y(new _e(W))}))},te.instanceCounter=0,te}()},T8No:function(H,Z,I){"use strict";I.d(Z,"a",function(){return C}),I.d(Z,"e",function(){return _}),I.d(Z,"c",function(){return w}),I.d(Z,"b",function(){return T}),I.d(Z,"d",function(){return F}),I.d(Z,"f",function(){return X});var N=I("MNsG"),g=I("N0LK"),S=I("Cg/j");let k=N.k||"";const v=new Map;v.set("false",!1),v.set("true",!0),v.set("isMac",N.f),v.set("isLinux",N.d),v.set("isWindows",N.i),v.set("isWeb",N.h),v.set("isMacNative",N.f&&!N.h),v.set("isEdge",k.indexOf("Edg/")>=0),v.set("isFirefox",k.indexOf("Firefox")>=0),v.set("isChrome",k.indexOf("Chrome")>=0),v.set("isSafari",k.indexOf("Safari")>=0);const m=Object.prototype.hasOwnProperty;class C{static has(O){return c.create(O)}static equals(O,B){return i.create(O,B)}static regex(O,B){return p.create(O,B)}static not(O){return d.create(O)}static and(...O){return y.create(O,null)}static or(...O){return x.create(O,null,!0)}static deserialize(O,B=!1){return O?this._deserializeOrExpression(O,B):void 0}static _deserializeOrExpression(O,B){let U=O.split("||");return x.create(U.map(L=>this._deserializeAndExpression(L,B)),null,!0)}static _deserializeAndExpression(O,B){let U=O.split("&&");return y.create(U.map(L=>this._deserializeOne(L,B)),null)}static _deserializeOne(O,B){if(O=O.trim(),O.indexOf("!=")>=0){let U=O.split("!=");return f.create(U[0].trim(),this._deserializeValue(U[1],B))}if(O.indexOf("==")>=0){let U=O.split("==");return i.create(U[0].trim(),this._deserializeValue(U[1],B))}if(O.indexOf("=~")>=0){let U=O.split("=~");return p.create(U[0].trim(),this._deserializeRegexValue(U[1],B))}if(O.indexOf(" in ")>=0){let U=O.split(" in ");return n.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(O)){const U=O.split(">=");return s.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(O)){const U=O.split(">");return o.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(O)){const U=O.split("<=");return b.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(O)){const U=O.split("<");return E.create(U[0].trim(),U[1].trim())}return/^\!\s*/.test(O)?d.create(O.substr(1).trim()):c.create(O)}static _deserializeValue(O,B){if(O=O.trim(),O==="true")return!0;if(O==="false")return!1;let U=/^'([^']*)'$/.exec(O);return U?U[1].trim():O}static _deserializeRegexValue(O,B){if(Object(g.C)(O)){if(B)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let U=O.indexOf("/"),L=O.lastIndexOf("/");if(U===L||U<0){if(B)throw new Error(`bad regexp-value '${O}', missing /-enclosure`);return console.warn(`bad regexp-value '${O}', missing /-enclosure`),null}let G=O.slice(U+1,L),ee=O[L+1]==="i"?"i":"";try{return new RegExp(G,ee)}catch(oe){if(B)throw new Error(`bad regexp-value '${O}', parse error: ${oe}`);return console.warn(`bad regexp-value '${O}', parse error: ${oe}`),null}}}function _(O,B){const U=O?O.substituteConstants():void 0,L=B?B.substituteConstants():void 0;return!U&&!L?!0:!U||!L?!1:U.equals(L)}function e(O,B){return O.cmp(B)}class h{constructor(){this.type=0}cmp(O){return this.type-O.type}equals(O){return O.type===this.type}substituteConstants(){return this}evaluate(O){return!1}serialize(){return"false"}keys(){return[]}negate(){return r.INSTANCE}}h.INSTANCE=new h;class r{constructor(){this.type=1}cmp(O){return this.type-O.type}equals(O){return O.type===this.type}substituteConstants(){return this}evaluate(O){return!0}serialize(){return"true"}keys(){return[]}negate(){return h.INSTANCE}}r.INSTANCE=new r;class c{constructor(O,B){this.key=O,this.negated=B,this.type=2}static create(O,B=null){const U=v.get(O);return typeof U=="boolean"?U?r.INSTANCE:h.INSTANCE:new c(O,B)}cmp(O){return O.type!==this.type?this.type-O.type:P(this.key,O.key)}equals(O){return O.type===this.type?this.key===O.key:!1}substituteConstants(){const O=v.get(this.key);return typeof O=="boolean"?O?r.INSTANCE:h.INSTANCE:this}evaluate(O){return!!O.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=d.create(this.key,this)),this.negated}}class i{constructor(O,B,U){this.key=O,this.value=B,this.negated=U,this.type=4}static create(O,B,U=null){if(typeof B=="boolean")return B?c.create(O,U):d.create(O,U);const L=v.get(O);if(typeof L=="boolean"){const G=L?"true":"false";return B===G?r.INSTANCE:h.INSTANCE}return new i(O,B,U)}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){const O=v.get(this.key);if(typeof O=="boolean"){const B=O?"true":"false";return this.value===B?r.INSTANCE:h.INSTANCE}return this}evaluate(O){return O.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this.value,this)),this.negated}}class n{constructor(O,B){this.key=O,this.valueKey=B,this.type=10,this.negated=null}static create(O,B){return new n(O,B)}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.valueKey,O.key,O.valueKey)}equals(O){return O.type===this.type?this.key===O.key&&this.valueKey===O.valueKey:!1}substituteConstants(){return this}evaluate(O){const B=O.getValue(this.valueKey),U=O.getValue(this.key);return Array.isArray(B)?B.indexOf(U)>=0:typeof U=="string"&&typeof B=="object"&&B!==null?m.call(B,U):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=l.create(this)),this.negated}}class l{constructor(O){this._actual=O,this.type=11}static create(O){return new l(O)}cmp(O){return O.type!==this.type?this.type-O.type:this._actual.cmp(O._actual)}equals(O){return O.type===this.type?this._actual.equals(O._actual):!1}substituteConstants(){return this}evaluate(O){return!this._actual.evaluate(O)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class f{constructor(O,B,U){this.key=O,this.value=B,this.negated=U,this.type=5}static create(O,B,U=null){if(typeof B=="boolean")return B?d.create(O,U):c.create(O,U);const L=v.get(O);if(typeof L=="boolean"){const G=L?"true":"false";return B===G?h.INSTANCE:r.INSTANCE}return new f(O,B,U)}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){const O=v.get(this.key);if(typeof O=="boolean"){const B=O?"true":"false";return this.value===B?h.INSTANCE:r.INSTANCE}return this}evaluate(O){return O.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=i.create(this.key,this.value,this)),this.negated}}class d{constructor(O,B){this.key=O,this.negated=B,this.type=3}static create(O,B=null){const U=v.get(O);return typeof U=="boolean"?U?h.INSTANCE:r.INSTANCE:new d(O,B)}cmp(O){return O.type!==this.type?this.type-O.type:P(this.key,O.key)}equals(O){return O.type===this.type?this.key===O.key:!1}substituteConstants(){const O=v.get(this.key);return typeof O=="boolean"?O?h.INSTANCE:r.INSTANCE:this}evaluate(O){return!O.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=c.create(this.key,this)),this.negated}}function u(O,B){if(typeof O=="string"){const U=parseFloat(O);isNaN(U)||(O=U)}return typeof O=="string"||typeof O=="number"?B(O):h.INSTANCE}class o{constructor(O,B,U){this.key=O,this.value=B,this.negated=U,this.type=12}static create(O,B,U=null){return u(B,L=>new o(O,L,U))}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this.key,this.value,this)),this.negated}}class s{constructor(O,B,U){this.key=O,this.value=B,this.negated=U,this.type=13}static create(O,B,U=null){return u(B,L=>new s(O,L,U))}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class E{constructor(O,B,U){this.key=O,this.value=B,this.negated=U,this.type=14}static create(O,B,U=null){return u(B,L=>new E(O,L,U))}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this.value,this)),this.negated}}class b{constructor(O,B,U){this.key=O,this.value=B,this.negated=U,this.type=15}static create(O,B,U=null){return u(B,L=>new b(O,L,U))}cmp(O){return O.type!==this.type?this.type-O.type:A(this.key,this.value,O.key,O.value)}equals(O){return O.type===this.type?this.key===O.key&&this.value===O.value:!1}substituteConstants(){return this}evaluate(O){return typeof this.value=="string"?!1:parseFloat(O.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this.value,this)),this.negated}}class p{constructor(O,B){this.key=O,this.regexp=B,this.type=7,this.negated=null}static create(O,B){return new p(O,B)}cmp(O){if(O.type!==this.type)return this.type-O.type;if(this.key<O.key)return-1;if(this.key>O.key)return 1;const B=this.regexp?this.regexp.source:"",U=O.regexp?O.regexp.source:"";return B<U?-1:B>U?1:0}equals(O){if(O.type===this.type){const B=this.regexp?this.regexp.source:"",U=O.regexp?O.regexp.source:"";return this.key===O.key&&B===U}return!1}substituteConstants(){return this}evaluate(O){let B=O.getValue(this.key);return this.regexp?this.regexp.test(B):!1}serialize(){const O=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${O}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this)),this.negated}}class D{constructor(O){this._actual=O,this.type=8}static create(O){return new D(O)}cmp(O){return O.type!==this.type?this.type-O.type:this._actual.cmp(O._actual)}equals(O){return O.type===this.type?this._actual.equals(O._actual):!1}substituteConstants(){return this}evaluate(O){return!this._actual.evaluate(O)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function R(O){let B=null;for(let U=0,L=O.length;U<L;U++){const G=O[U].substituteConstants();if(O[U]!==G&&B===null){B=[];for(let ee=0;ee<U;ee++)B[ee]=O[ee]}B!==null&&(B[U]=G)}return B===null?O:B}class y{constructor(O,B){this.expr=O,this.negated=B,this.type=6}static create(O,B){return y._normalizeArr(O,B)}cmp(O){if(O.type!==this.type)return this.type-O.type;if(this.expr.length<O.expr.length)return-1;if(this.expr.length>O.expr.length)return 1;for(let B=0,U=this.expr.length;B<U;B++){const L=e(this.expr[B],O.expr[B]);if(L!==0)return L}return 0}equals(O){if(O.type===this.type){if(this.expr.length!==O.expr.length)return!1;for(let B=0,U=this.expr.length;B<U;B++)if(!this.expr[B].equals(O.expr[B]))return!1;return!0}return!1}substituteConstants(){const O=R(this.expr);return O===this.expr?this:y.create(O,this.negated)}evaluate(O){for(let B=0,U=this.expr.length;B<U;B++)if(!this.expr[B].evaluate(O))return!1;return!0}static _normalizeArr(O,B){const U=[];let L=!1;for(const G of O){if(!G)continue;if(G.type===1){L=!0;continue}if(G.type===0)return h.INSTANCE;if(G.type===6){U.push(...G.expr);continue}U.push(G)}if(U.length===0&&L)return r.INSTANCE;if(U.length===0)return;if(U.length===1)return U[0];U.sort(e);for(let G=1;G<U.length;G++)U[G-1].equals(U[G])&&(U.splice(G,1),G--);if(U.length===1)return U[0];for(;U.length>1;){const G=U[U.length-1];if(G.type!==9)break;U.pop();const ee=U.pop(),oe=U.length===0,ae=x.create(G.expr.map(be=>y.create([be,ee],null)),null,oe);ae&&(U.push(ae),U.sort(e))}return U.length===1?U[0]:new y(U,B)}serialize(){return this.expr.map(O=>O.serialize()).join(" && ")}keys(){const O=[];for(let B of this.expr)O.push(...B.keys());return O}negate(){if(!this.negated){const O=[];for(let B of this.expr)O.push(B.negate());this.negated=x.create(O,this,!0)}return this.negated}}class x{constructor(O,B){this.expr=O,this.negated=B,this.type=9}static create(O,B,U){return x._normalizeArr(O,B,U)}cmp(O){if(O.type!==this.type)return this.type-O.type;if(this.expr.length<O.expr.length)return-1;if(this.expr.length>O.expr.length)return 1;for(let B=0,U=this.expr.length;B<U;B++){const L=e(this.expr[B],O.expr[B]);if(L!==0)return L}return 0}equals(O){if(O.type===this.type){if(this.expr.length!==O.expr.length)return!1;for(let B=0,U=this.expr.length;B<U;B++)if(!this.expr[B].equals(O.expr[B]))return!1;return!0}return!1}substituteConstants(){const O=R(this.expr);return O===this.expr?this:x.create(O,this.negated,!1)}evaluate(O){for(let B=0,U=this.expr.length;B<U;B++)if(this.expr[B].evaluate(O))return!0;return!1}static _normalizeArr(O,B,U){let L=[],G=!1;if(O){for(let ee=0,oe=O.length;ee<oe;ee++){const ae=O[ee];if(!ae)continue;if(ae.type===0){G=!0;continue}if(ae.type===1)return r.INSTANCE;if(ae.type===9){L=L.concat(ae.expr);continue}L.push(ae)}if(L.length===0&&G)return h.INSTANCE;L.sort(e)}if(L.length===0)return;if(L.length===1)return L[0];for(let ee=1;ee<L.length;ee++)L[ee-1].equals(L[ee])&&(L.splice(ee,1),ee--);if(L.length===1)return L[0];if(U){for(let ee=0;ee<L.length;ee++)for(let oe=ee+1;oe<L.length;oe++)X(L[ee],L[oe])&&(L.splice(oe,1),oe--);if(L.length===1)return L[0]}return new x(L,B)}serialize(){return this.expr.map(O=>O.serialize()).join(" || ")}keys(){const O=[];for(let B of this.expr)O.push(...B.keys());return O}negate(){if(!this.negated){let O=[];for(let B of this.expr)O.push(B.negate());for(;O.length>1;){const B=O.shift(),U=O.shift(),L=[];for(const ee of z(B))for(const oe of z(U))L.push(y.create([ee,oe],null));const G=O.length===0;O.unshift(x.create(L,null,G))}this.negated=O[0]}return this.negated}}class w extends c{constructor(O,B,U){super(O,null);this._defaultValue=B,typeof U=="object"?w._info.push(Object.assign(Object.assign({},U),{key:O})):U!==!0&&w._info.push({key:O,description:U,type:B!=null?typeof B:void 0})}static all(){return w._info.values()}bindTo(O){return O.createKey(this.key,this._defaultValue)}getValue(O){return O.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(O){return i.create(this.key,O)}}w._info=[];const T=Object(S.c)("contextKeyService"),F="setContext";function P(O,B){return O<B?-1:O>B?1:0}function A(O,B,U,L){return O<U?-1:O>U?1:B<L?-1:B>L?1:0}function X(O,B){if(B.type===6&&O.type!==9&&O.type!==6){for(const G of B.expr)if(O.equals(G))return!0}const U=O.negate(),L=z(U).concat(z(B));L.sort(e);for(let G=0;G<L.length;G++){const ee=L[G],oe=ee.negate();for(let ae=G+1;ae<L.length;ae++){const be=L[ae];if(oe.equals(be))return!0}}return!1}function z(O){return O.type===9?O.expr:[O]}},TXwP:function(H,Z,I){var N,g;(function(){var S;(function(){"use strict";var v=[,,function(e){function h(i){this.__parent=i,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}h.prototype.clone_empty=function(){var i=new h(this.__parent);return i.set_indent(this.__indent_count,this.__alignment_count),i},h.prototype.item=function(i){return i<0?this.__items[this.__items.length+i]:this.__items[i]},h.prototype.has_match=function(i){for(var n=this.__items.length-1;n>=0;n--)if(this.__items[n].match(i))return!0;return!1},h.prototype.set_indent=function(i,n){this.is_empty()&&(this.__indent_count=i||0,this.__alignment_count=n||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},h.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},h.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},h.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var i=this.__parent.current_line;return i.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),i.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),i.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,i.__items[0]===" "&&(i.__items.splice(0,1),i.__character_count-=1),!0}return!1},h.prototype.is_empty=function(){return this.__items.length===0},h.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},h.prototype.push=function(i){this.__items.push(i);var n=i.lastIndexOf(`
|
|
|
`);n!==-1?this.__character_count=i.length-n:this.__character_count+=i.length},h.prototype.pop=function(){var i=null;return this.is_empty()||(i=this.__items.pop(),this.__character_count-=i.length),i},h.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},h.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},h.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},h.prototype.toString=function(){var i="";return this.is_empty()?this.__parent.indent_empty_lines&&(i=this.__parent.get_indent_string(this.__indent_count)):(i=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),i+=this.__items.join("")),i};function r(i,n){this.__cache=[""],this.__indent_size=i.indent_size,this.__indent_string=i.indent_char,i.indent_with_tabs||(this.__indent_string=new Array(i.indent_size+1).join(i.indent_char)),n=n||"",i.indent_level>0&&(n=new Array(i.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}r.prototype.get_indent_size=function(i,n){var l=this.__base_string_length;return n=n||0,i<0&&(l=0),l+=i*this.__indent_size,l+=n,l},r.prototype.get_indent_string=function(i,n){var l=this.__base_string;return n=n||0,i<0&&(i=0,l=""),n+=i*this.__indent_size,this.__ensure_cache(n),l+=this.__cache[n],l},r.prototype.__ensure_cache=function(i){for(;i>=this.__cache.length;)this.__add_column()},r.prototype.__add_column=function(){var i=this.__cache.length,n=0,l="";this.__indent_size&&i>=this.__indent_size&&(n=Math.floor(i/this.__indent_size),i-=n*this.__indent_size,l=new Array(n+1).join(this.__indent_string)),i&&(l+=new Array(i+1).join(" ")),this.__cache.push(l)};function c(i,n){this.__indent_cache=new r(i,n),this.raw=!1,this._end_with_newline=i.end_with_newline,this.indent_size=i.indent_size,this.wrap_line_length=i.wrap_line_length,this.indent_empty_lines=i.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new h(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}c.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},c.prototype.get_line_number=function(){return this.__lines.length},c.prototype.get_indent_string=function(i,n){return this.__indent_cache.get_indent_string(i,n)},c.prototype.get_indent_size=function(i,n){return this.__indent_cache.get_indent_size(i,n)},c.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},c.prototype.add_new_line=function(i){return this.is_empty()||!i&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},c.prototype.get_code=function(i){this.trim(!0);var n=this.current_line.pop();n&&(n[n.length-1]===`
|
|
|
`&&(n=n.replace(/\n+$/g,"")),this.current_line.push(n)),this._end_with_newline&&this.__add_outputline();var l=this.__lines.join(`
|
|
|
`);return i!==`
|
|
|
`&&(l=l.replace(/[\n]/g,i)),l},c.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},c.prototype.set_indent=function(i,n){return i=i||0,n=n||0,this.next_line.set_indent(i,n),this.__lines.length>1?(this.current_line.set_indent(i,n),!0):(this.current_line.set_indent(),!1)},c.prototype.add_raw_token=function(i){for(var n=0;n<i.newlines;n++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(i.whitespace_before),this.current_line.push(i.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},c.prototype.add_token=function(i){this.__add_space_before_token(),this.current_line.push(i),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},c.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},c.prototype.remove_indent=function(i){for(var n=this.__lines.length;i<n;)this.__lines[i]._remove_indent(),i++;this.current_line._remove_wrap_indent()},c.prototype.trim=function(i){for(i=i===void 0?!1:i,this.current_line.trim();i&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},c.prototype.just_added_newline=function(){return this.current_line.is_empty()},c.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},c.prototype.ensure_empty_line_above=function(i,n){for(var l=this.__lines.length-2;l>=0;){var f=this.__lines[l];if(f.is_empty())break;if(f.item(0).indexOf(i)!==0&&f.item(-1)!==n){this.__lines.splice(l+1,0,new h(this)),this.previous_line=this.__lines[this.__lines.length-2];break}l--}},e.exports.Output=c},,,,function(e){function h(i,n){this.raw_options=r(i,n),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}h.prototype._get_array=function(i,n){var l=this.raw_options[i],f=n||[];return typeof l=="object"?l!==null&&typeof l.concat=="function"&&(f=l.concat()):typeof l=="string"&&(f=l.split(/[^a-zA-Z0-9_\/\-]+/)),f},h.prototype._get_boolean=function(i,n){var l=this.raw_options[i],f=l===void 0?!!n:!!l;return f},h.prototype._get_characters=function(i,n){var l=this.raw_options[i],f=n||"";return typeof l=="string"&&(f=l.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),f},h.prototype._get_number=function(i,n){var l=this.raw_options[i];n=parseInt(n,10),isNaN(n)&&(n=0);var f=parseInt(l,10);return isNaN(f)&&(f=n),f},h.prototype._get_selection=function(i,n,l){var f=this._get_selection_list(i,n,l);if(f.length!==1)throw new Error("Invalid Option Value: The option '"+i+`' can only be one of the following values:
|
|
|
`+n+`
|
|
|
You passed in: '`+this.raw_options[i]+"'");return f[0]},h.prototype._get_selection_list=function(i,n,l){if(!n||n.length===0)throw new Error("Selection list cannot be empty.");if(l=l||[n[0]],!this._is_valid_selection(l,n))throw new Error("Invalid Default Value!");var f=this._get_array(i,l);if(!this._is_valid_selection(f,n))throw new Error("Invalid Option Value: The option '"+i+`' can contain only the following values:
|
|
|
`+n+`
|
|
|
You passed in: '`+this.raw_options[i]+"'");return f},h.prototype._is_valid_selection=function(i,n){return i.length&&n.length&&!i.some(function(l){return n.indexOf(l)===-1})};function r(i,n){var l={};i=c(i);var f;for(f in i)f!==n&&(l[f]=i[f]);if(n&&i[n])for(f in i[n])l[f]=i[n][f];return l}function c(i){var n={},l;for(l in i){var f=l.replace(/-/g,"_");n[f]=i[l]}return n}e.exports.Options=h,e.exports.normalizeOpts=c,e.exports.mergeOpts=r},,function(e){var h=RegExp.prototype.hasOwnProperty("sticky");function r(c){this.__input=c||"",this.__input_length=this.__input.length,this.__position=0}r.prototype.restart=function(){this.__position=0},r.prototype.back=function(){this.__position>0&&(this.__position-=1)},r.prototype.hasNext=function(){return this.__position<this.__input_length},r.prototype.next=function(){var c=null;return this.hasNext()&&(c=this.__input.charAt(this.__position),this.__position+=1),c},r.prototype.peek=function(c){var i=null;return c=c||0,c+=this.__position,c>=0&&c<this.__input_length&&(i=this.__input.charAt(c)),i},r.prototype.__match=function(c,i){c.lastIndex=i;var n=c.exec(this.__input);return n&&!(h&&c.sticky)&&(n.index!==i&&(n=null)),n},r.prototype.test=function(c,i){return i=i||0,i+=this.__position,i>=0&&i<this.__input_length?!!this.__match(c,i):!1},r.prototype.testChar=function(c,i){var n=this.peek(i);return c.lastIndex=0,n!==null&&c.test(n)},r.prototype.match=function(c){var i=this.__match(c,this.__position);return i?this.__position+=i[0].length:i=null,i},r.prototype.read=function(c,i,n){var l="",f;return c&&(f=this.match(c),f&&(l+=f[0])),i&&(f||!c)&&(l+=this.readUntil(i,n)),l},r.prototype.readUntil=function(c,i){var n="",l=this.__position;c.lastIndex=this.__position;var f=c.exec(this.__input);return f?(l=f.index,i&&(l+=f[0].length)):l=this.__input_length,n=this.__input.substring(this.__position,l),this.__position=l,n},r.prototype.readUntilAfter=function(c){return this.readUntil(c,!0)},r.prototype.get_regexp=function(c,i){var n=null,l="g";return i&&h&&(l="y"),typeof c=="string"&&c!==""?n=new RegExp(c,l):c&&(n=new RegExp(c.source,l)),n},r.prototype.get_literal_regexp=function(c){return RegExp(c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},r.prototype.peekUntilAfter=function(c){var i=this.__position,n=this.readUntilAfter(c);return this.__position=i,n},r.prototype.lookBack=function(c){var i=this.__position-1;return i>=c.length&&this.__input.substring(i-c.length,i).toLowerCase()===c},e.exports.InputScanner=r},,,,,function(e){function h(r,c){r=typeof r=="string"?r:r.source,c=typeof c=="string"?c:c.source,this.__directives_block_pattern=new RegExp(r+/ beautify( \w+[:]\w+)+ /.source+c,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(r+/\sbeautify\signore:end\s/.source+c,"g")}h.prototype.get_directives=function(r){if(!r.match(this.__directives_block_pattern))return null;var c={};this.__directive_pattern.lastIndex=0;for(var i=this.__directive_pattern.exec(r);i;)c[i[1]]=i[2],i=this.__directive_pattern.exec(r);return c},h.prototype.readIgnored=function(r){return r.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=h},,function(e,h,r){var c=r(16).Beautifier,i=r(17).Options;function n(l,f){var d=new c(l,f);return d.beautify()}e.exports=n,e.exports.defaultOptions=function(){return new i}},function(e,h,r){var c=r(17).Options,i=r(2).Output,n=r(8).InputScanner,l=r(13).Directives,f=new l(/\/\*/,/\*\//),d=/\r\n|[\r\n]/,u=/\r\n|[\r\n]/g,o=/\s/,s=/(?:\s|\n)+/g,E=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,b=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function p(D,R){this._source_text=D||"",this._options=new c(R),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}p.prototype.eatString=function(D){var R="";for(this._ch=this._input.next();this._ch;){if(R+=this._ch,this._ch==="\\")R+=this._input.next();else if(D.indexOf(this._ch)!==-1||this._ch===`
|
|
|
`)break;this._ch=this._input.next()}return R},p.prototype.eatWhitespace=function(D){for(var R=o.test(this._input.peek()),y=0;o.test(this._input.peek());)this._ch=this._input.next(),D&&this._ch===`
|
|
|
`&&((y===0||y<this._options.max_preserve_newlines)&&(y++,this._output.add_new_line(!0)));return R},p.prototype.foundNestedPseudoClass=function(){for(var D=0,R=1,y=this._input.peek(R);y;){if(y==="{")return!0;if(y==="(")D+=1;else if(y===")"){if(D===0)return!1;D-=1}else if(y===";"||y==="}")return!1;R++,y=this._input.peek(R)}return!1},p.prototype.print_string=function(D){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(D)},p.prototype.preserveSingleSpace=function(D){D&&(this._output.space_before_token=!0)},p.prototype.indent=function(){this._indentLevel++},p.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},p.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var D=this._source_text,R=this._options.eol;R==="auto"&&(R=`
|
|
|
`,D&&d.test(D||"")&&(R=D.match(d)[0])),D=D.replace(u,`
|
|
|
`);var y=D.match(/^[\t ]*/)[0];this._output=new i(this._options,y),this._input=new n(D),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var x=0,w=!1,T=!1,F=!1,P=!1,A=!1,X=!1,z=this._ch,O=!1,B,U,L;B=this._input.read(s),U=B!=="",L=z,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),z=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var G=this._input.read(E),ee=f.get_directives(G);ee&&ee.ignore==="start"&&(G+=f.readIgnored(this._input)),this.print_string(G),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(b)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(U),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var oe=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);oe.match(/[ :]$/)&&(oe=this.eatString(": ").replace(/\s$/,""),this.print_string(oe),this._output.space_before_token=!0),oe=oe.replace(/\s$/,""),oe==="extend"?P=!0:oe==="import"&&(A=!0),oe in this.NESTED_AT_RULE?(this._nestedLevel+=1,oe in this.CONDITIONAL_GROUP_RULE&&(F=!0)):!w&&x===0&&oe.indexOf(":")!==-1&&(T=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(U),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")T&&(T=!1,this.outdent()),F?(F=!1,w=this._indentLevel>=this._nestedLevel):w=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&w&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(L==="("?this._output.space_before_token=!1:L!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),L==="{"&&this._output.trim(!0),A=!1,P=!1,T&&(this.outdent(),T=!1),this.print_string(this._ch),w=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var ae=0;ae<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;ae++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[ae])){O=!0;break}(w||F)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!P&&x===0?(this.print_string(":"),T||(T=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var be=L==='"'||L==="'";this.preserveSingleSpace(be||U),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")O=!1,x===0?(T&&(this.outdent(),T=!1),P=!1,A=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),x++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),x&&(x--,this.outdent()));else{var _e=!1;this._input.lookBack("with")&&(_e=!0),this.preserveSingleSpace(U||_e),this.print_string(this._ch),T&&L==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),X=!0):(this.eatWhitespace(),x++,this.indent())}else if(this._ch===")")x&&(x--,this.outdent()),X&&this._input.peek()===";"&&this._options.selector_separator_newline&&(X=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!T||X)&&x===0&&!A&&!P?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!T&&x===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&o.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(U),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),o.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var fe=L==='"'||L==="'";this.preserveSingleSpace(fe||U),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
|
`&&O&&this._output.add_new_line()}var Re=this._output.get_code(R);return Re},e.exports.Beautifier=p},function(e,h,r){var c=r(6).Options;function i(n){c.call(this,n,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var l=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||l;var f=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var d=0;d<f.length;d++)f[d]!=="expand"?this.brace_style="collapse":this.brace_style=f[d]}i.prototype=new c,e.exports.Options=i}],m={};function C(e){var h=m[e];if(h!==void 0)return h.exports;var r=m[e]={exports:{}};return v[e](r,r.exports,C),r.exports}var _=C(15);S=_})();var k=S;!(N=[],g=function(){return{css_beautify:k}}.apply(Z,N),g!==void 0&&(H.exports=g))})()},Vhoy:function(H,Z,I){"use strict";I.d(Z,"d",function(){return k}),I.d(Z,"e",function(){return v}),I.d(Z,"c",function(){return m}),I.d(Z,"b",function(){return C}),I.d(Z,"a",function(){return _});var N=I("MI8n");class g{constructor(){this._icons=new Map,this._onDidRegister=new N.b}add(e){const h=this._icons.get(e.id);h?e.description?h.description=e.description:console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const S=new g,k=S;function v(e,h){return new C(e,h)}function m(e){return e?e.replace(/\$\((.*?)\)/g,(h,r)=>` ${r} `).trim():""}class C{constructor(e,h,r){this.id=e,this.definition=h,this.description=r,S.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var _;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const h=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function r(n){if(n instanceof C)return["codicon","codicon-"+n.id];const l=h.exec(n.id);if(!l)return r(C.error);let[,f,d]=l;const u=["codicon","codicon-"+f];return d&&u.push("codicon-modifier-"+d.substr(1)),u}e.asClassNameArray=r;function c(n){return r(n).join(" ")}e.asClassName=c;function i(n){return"."+r(n).join(".")}e.asCSSSelector=i})(_||(_={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",e.add.definition),e.gistNew=new e("gist-new",e.add.definition),e.repoCreate=new e("repo-create",e.add.definition),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eba4"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.layers=new e("layers",{fontCharacter:"\\ebd2"}),e.layersDot=new e("layers-dot",{fontCharacter:"\\ebd3"}),e.layersActive=new e("layers-active",{fontCharacter:"\\ebd4"}),e.compass=new e("compass",{fontCharacter:"\\ebd5"}),e.compassDot=new e("compass-dot",{fontCharacter:"\\ebd6"}),e.compassActive=new e("compass-active",{fontCharacter:"\\ebd7"}),e.azure=new e("azure",{fontCharacter:"\\ebd8"}),e.issueDraft=new e("issue-draft",{fontCharacter:"\\ebd9"}),e.gitPullRequestClosed=new e("git-pull-request-closed",{fontCharacter:"\\ebda"}),e.gitPullRequestDraft=new e("git-pull-request-draft",{fontCharacter:"\\ebdb"}),e.debugAll=new e("debug-all",{fontCharacter:"\\ebdc"}),e.debugCoverage=new e("debug-coverage",{fontCharacter:"\\ebdd"}),e.runErrors=new e("run-errors",{fontCharacter:"\\ebde"}),e.folderLibrary=new e("folder-library",{fontCharacter:"\\ebdf"}),e.debugContinueSmall=new e("debug-continue-small",{fontCharacter:"\\ebe0"}),e.beakerStop=new e("beaker-stop",{fontCharacter:"\\ebe1"}),e.graphLine=new e("graph-line",{fontCharacter:"\\ebe2"}),e.graphScatter=new e("graph-scatter",{fontCharacter:"\\ebe3"}),e.pieChart=new e("pie-chart",{fontCharacter:"\\ebe4"}),e.bracket=new e("bracket",e.json.definition),e.bracketDot=new e("bracket-dot",{fontCharacter:"\\ebe5"}),e.bracketError=new e("bracket-error",{fontCharacter:"\\ebe6"}),e.lockSmall=new e("lock-small",{fontCharacter:"\\ebe7"}),e.azureDevops=new e("azure-devops",{fontCharacter:"\\ebe8"}),e.verifiedFilled=new e("verified-filled",{fontCharacter:"\\ebe9"})}(C||(C={}))},"VrN/":function(H,Z,I){(function(N,g){H.exports=g()})(this,function(){"use strict";var N=navigator.userAgent,g=navigator.platform,S=/gecko\/\d/i.test(N),k=/MSIE \d/.test(N),v=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(N),m=/Edge\/(\d+)/.exec(N),C=k||v||m,_=C&&(k?document.documentMode||6:+(m||v)[1]),e=!m&&/WebKit\//.test(N),h=e&&/Qt\/\d+\.\d+/.test(N),r=!m&&/Chrome\//.test(N),c=/Opera\//.test(N),i=/Apple Computer/.test(navigator.vendor),n=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(N),l=/PhantomJS/.test(N),f=!m&&/AppleWebKit/.test(N)&&/Mobile\/\w+/.test(N),d=/Android/.test(N),u=f||d||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(N),o=f||/Mac/.test(g),s=/\bCrOS\b/.test(N),E=/win/i.test(g),b=c&&N.match(/Version\/(\d*\.\d*)/);b&&(b=Number(b[1])),b&&b>=15&&(c=!1,e=!0);var p=o&&(h||c&&(b==null||b<12.11)),D=S||C&&_>=9;function R(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var y=function(t,a){var j=t.className,M=R(a).exec(j);if(M){var K=j.slice(M.index+M[0].length);t.className=j.slice(0,M.index)+(K?M[1]+K:"")}};function x(t){for(var a=t.childNodes.length;a>0;--a)t.removeChild(t.firstChild);return t}function w(t,a){return x(t).appendChild(a)}function T(t,a,j,M){var K=document.createElement(t);if(j&&(K.className=j),M&&(K.style.cssText=M),typeof a=="string")K.appendChild(document.createTextNode(a));else if(a)for(var re=0;re<a.length;++re)K.appendChild(a[re]);return K}function F(t,a,j,M){var K=T(t,a,j,M);return K.setAttribute("role","presentation"),K}var P;document.createRange?P=function(t,a,j,M){var K=document.createRange();return K.setEnd(M||t,j),K.setStart(t,a),K}:P=function(t,a,j){var M=document.body.createTextRange();try{M.moveToElementText(t.parentNode)}catch(K){return M}return M.collapse(!0),M.moveEnd("character",j),M.moveStart("character",a),M};function A(t,a){if(a.nodeType==3&&(a=a.parentNode),t.contains)return t.contains(a);do if(a.nodeType==11&&(a=a.host),a==t)return!0;while(a=a.parentNode)}function X(){var t;try{t=document.activeElement}catch(a){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function z(t,a){var j=t.className;R(a).test(j)||(t.className+=(j?" ":"")+a)}function O(t,a){for(var j=t.split(" "),M=0;M<j.length;M++)j[M]&&!R(j[M]).test(a)&&(a+=" "+j[M]);return a}var B=function(t){t.select()};f?B=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:C&&(B=function(t){try{t.select()}catch(a){}});function U(t){var a=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,a)}}function L(t,a,j){a||(a={});for(var M in t)t.hasOwnProperty(M)&&(j!==!1||!a.hasOwnProperty(M))&&(a[M]=t[M]);return a}function G(t,a,j,M,K){a==null&&(a=t.search(/[^\s\u00a0]/),a==-1&&(a=t.length));for(var re=M||0,se=K||0;;){var pe=t.indexOf(" ",re);if(pe<0||pe>=a)return se+(a-re);se+=pe-re,se+=j-se%j,re=pe+1}}var ee=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};ee.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-+new Date)},ee.prototype.set=function(t,a){this.f=a;var j=+new Date+t;(!this.id||j<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,t),this.time=j)};function oe(t,a){for(var j=0;j<t.length;++j)if(t[j]==a)return j;return-1}var ae=50,be={toString:function(){return"CodeMirror.Pass"}},_e={scroll:!1},fe={origin:"*mouse"},Re={origin:"+move"};function Oe(t,a,j){for(var M=0,K=0;;){var re=t.indexOf(" ",M);re==-1&&(re=t.length);var se=re-M;if(re==t.length||K+se>=a)return M+Math.min(se,a-K);if(K+=re-M,K+=j-K%j,M=re+1,K>=a)return M}}var de=[""];function te(t){for(;de.length<=t;)de.push(W(de)+" ");return de[t]}function W(t){return t[t.length-1]}function Y(t,a){for(var j=[],M=0;M<t.length;M++)j[M]=a(t[M],M);return j}function V(t,a,j){for(var M=0,K=j(a);M<t.length&&j(t[M])<=K;)M++;t.splice(M,0,a)}function Q(){}function q(t,a){var j;return Object.create?j=Object.create(t):(Q.prototype=t,j=new Q),a&&L(a,j),j}var ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ne(t){return/\w/.test(t)||t>"\x80"&&(t.toUpperCase()!=t.toLowerCase()||ie.test(t))}function J(t,a){return a?a.source.indexOf("\\w")>-1&&ne(t)?!0:a.test(t):ne(t)}function $(t){for(var a in t)if(t.hasOwnProperty(a)&&t[a])return!1;return!0}var le=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ce(t){return t.charCodeAt(0)>=768&&le.test(t)}function we(t,a,j){for(;(j<0?a>0:a<t.length)&&ce(t.charAt(a));)a+=j;return a}function Fe(t,a,j){for(var M=a>j?-1:1;;){if(a==j)return a;var K=(a+j)/2,re=M<0?Math.ceil(K):Math.floor(K);if(re==a)return t(re)?a:j;t(re)?j=re:a=re+M}}function Xe(t,a,j,M){if(!t)return M(a,j,"ltr",0);for(var K=!1,re=0;re<t.length;++re){var se=t[re];(se.from<j&&se.to>a||a==j&&se.to==a)&&(M(Math.max(se.from,a),Math.min(se.to,j),se.level==1?"rtl":"ltr",re),K=!0)}K||M(a,j,"ltr")}var $e=null;function Ye(t,a,j){var M;$e=null;for(var K=0;K<t.length;++K){var re=t[K];if(re.from<a&&re.to>a)return K;re.to==a&&(re.from!=re.to&&j=="before"?M=K:$e=K),re.from==a&&(re.from!=re.to&&j!="before"?M=K:$e=K)}return M!=null?M:$e}var Ze=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",a="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function j(Te){return Te<=247?t.charAt(Te):1424<=Te&&Te<=1524?"R":1536<=Te&&Te<=1785?a.charAt(Te-1536):1774<=Te&&Te<=2220?"r":8192<=Te&&Te<=8203?"w":Te==8204?"b":"L"}var M=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,K=/[stwN]/,re=/[LRr]/,se=/[Lb1n]/,pe=/[1n]/;function ve(Te,Ue,We){this.level=Te,this.from=Ue,this.to=We}return function(Te,Ue){var We=Ue=="ltr"?"L":"R";if(Te.length==0||Ue=="ltr"&&!M.test(Te))return!1;for(var tt=Te.length,et=[],lt=0;lt<tt;++lt)et.push(j(Te.charCodeAt(lt)));for(var ft=0,bt=We;ft<tt;++ft){var At=et[ft];At=="m"?et[ft]=bt:bt=At}for(var Nt=0,Rt=We;Nt<tt;++Nt){var Wt=et[Nt];Wt=="1"&&Rt=="r"?et[Nt]="n":re.test(Wt)&&(Rt=Wt,Wt=="r"&&(et[Nt]="R"))}for(var nr=1,Zt=et[0];nr<tt-1;++nr){var Tr=et[nr];Tr=="+"&&Zt=="1"&&et[nr+1]=="1"?et[nr]="1":Tr==","&&Zt==et[nr+1]&&(Zt=="1"||Zt=="n")&&(et[nr]=Zt),Zt=Tr}for(var un=0;un<tt;++un){var oi=et[un];if(oi==",")et[un]="N";else if(oi=="%"){var Cn=void 0;for(Cn=un+1;Cn<tt&&et[Cn]=="%";++Cn);for(var Ni=un&&et[un-1]=="!"||Cn<tt&&et[Cn]=="1"?"1":"N",Ii=un;Ii<Cn;++Ii)et[Ii]=Ni;un=Cn-1}}for(var Hn=0,Di=We;Hn<tt;++Hn){var ci=et[Hn];Di=="L"&&ci=="1"?et[Hn]="L":re.test(ci)&&(Di=ci)}for(var ti=0;ti<tt;++ti)if(K.test(et[ti])){var Wn=void 0;for(Wn=ti+1;Wn<tt&&K.test(et[Wn]);++Wn);for(var Ln=(ti?et[ti-1]:We)=="L",Li=(Wn<tt?et[Wn]:We)=="L",Za=Ln==Li?Ln?"L":"R":We,Ca=ti;Ca<Wn;++Ca)et[Ca]=Za;ti=Wn-1}for(var _i=[],la,si=0;si<tt;)if(se.test(et[si])){var ps=si;for(++si;si<tt&&se.test(et[si]);++si);_i.push(new ve(0,ps,si))}else{var ga=si,La=_i.length,ka=Ue=="rtl"?1:0;for(++si;si<tt&&et[si]!="L";++si);for(var Ci=ga;Ci<si;)if(pe.test(et[Ci])){ga<Ci&&(_i.splice(La,0,new ve(1,ga,Ci)),La+=ka);var qa=Ci;for(++Ci;Ci<si&&pe.test(et[Ci]);++Ci);_i.splice(La,0,new ve(2,qa,Ci)),La+=ka,ga=Ci}else++Ci;ga<si&&_i.splice(La,0,new ve(1,ga,si))}return Ue=="ltr"&&(_i[0].level==1&&(la=Te.match(/^\s+/))&&(_i[0].from=la[0].length,_i.unshift(new ve(0,0,la[0].length))),W(_i).level==1&&(la=Te.match(/\s+$/))&&(W(_i).to-=la[0].length,_i.push(new ve(0,tt-la[0].length,tt)))),Ue=="rtl"?_i.reverse():_i}}();function qe(t,a){var j=t.order;return j==null&&(j=t.order=Ze(t.text,a)),j}var Pe=[],Ie=function(t,a,j){if(t.addEventListener)t.addEventListener(a,j,!1);else if(t.attachEvent)t.attachEvent("on"+a,j);else{var M=t._handlers||(t._handlers={});M[a]=(M[a]||Pe).concat(j)}};function Je(t,a){return t._handlers&&t._handlers[a]||Pe}function rt(t,a,j){if(t.removeEventListener)t.removeEventListener(a,j,!1);else if(t.detachEvent)t.detachEvent("on"+a,j);else{var M=t._handlers,K=M&&M[a];if(K){var re=oe(K,j);re>-1&&(M[a]=K.slice(0,re).concat(K.slice(re+1)))}}}function ye(t,a){var j=Je(t,a);if(!j.length)return;for(var M=Array.prototype.slice.call(arguments,2),K=0;K<j.length;++K)j[K].apply(null,M)}function ue(t,a,j){return typeof a=="string"&&(a={type:a,preventDefault:function(){this.defaultPrevented=!0}}),ye(t,j||a.type,t,a),Ae(a)||a.codemirrorIgnore}function he(t){var a=t._handlers&&t._handlers.cursorActivity;if(!a)return;for(var j=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),M=0;M<a.length;++M)oe(j,a[M])==-1&&j.push(a[M])}function me(t,a){return Je(t,a).length>0}function Ce(t){t.prototype.on=function(a,j){Ie(this,a,j)},t.prototype.off=function(a,j){rt(this,a,j)}}function ge(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Ee(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ae(t){return t.defaultPrevented!=null?t.defaultPrevented:t.returnValue==!1}function De(t){ge(t),Ee(t)}function Me(t){return t.target||t.srcElement}function He(t){var a=t.which;return a==null&&(t.button&1?a=1:t.button&2?a=3:t.button&4&&(a=2)),o&&t.ctrlKey&&a==1&&(a=3),a}var nt=function(){if(C&&_<9)return!1;var t=T("div");return"draggable"in t||"dragDrop"in t}(),at;function it(t){if(at==null){var a=T("span","\u200B");w(t,T("span",[a,document.createTextNode("x")])),t.firstChild.offsetHeight!=0&&(at=a.offsetWidth<=1&&a.offsetHeight>2&&!(C&&_<8))}var j=at?T("span","\u200B"):T("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return j.setAttribute("cm-text",""),j}var st;function Tt(t){if(st!=null)return st;var a=w(t,document.createTextNode("A\u062EA")),j=P(a,0,1).getBoundingClientRect(),M=P(a,1,2).getBoundingClientRect();return x(t),!j||j.left==j.right?!1:st=M.right-j.right<3}var pt=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(t){for(var a=0,j=[],M=t.length;a<=M;){var K=t.indexOf(`
|
|
|
`,a);K==-1&&(K=t.length);var re=t.slice(a,t.charAt(K-1)=="\r"?K-1:K),se=re.indexOf("\r");se!=-1?(j.push(re.slice(0,se)),a+=se+1):(j.push(re),a=K+1)}return j}:function(t){return t.split(/\r\n?|\n/)},ht=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(a){return!1}}:function(t){var a;try{a=t.ownerDocument.selection.createRange()}catch(j){}return!a||a.parentElement()!=t?!1:a.compareEndPoints("StartToEnd",a)!=0},Ft=function(){var t=T("div");return"oncopy"in t?!0:(t.setAttribute("oncopy","return;"),typeof t.oncopy=="function")}(),Lt=null;function Yt(t){if(Lt!=null)return Lt;var a=w(t,T("span","x")),j=a.getBoundingClientRect(),M=P(a,0,1).getBoundingClientRect();return Lt=Math.abs(j.left-M.left)>1}var $t={},Mt={};function wt(t,a){arguments.length>2&&(a.dependencies=Array.prototype.slice.call(arguments,2)),$t[t]=a}function Jt(t,a){Mt[t]=a}function Dt(t){if(typeof t=="string"&&Mt.hasOwnProperty(t))t=Mt[t];else if(t&&typeof t.name=="string"&&Mt.hasOwnProperty(t.name)){var a=Mt[t.name];typeof a=="string"&&(a={name:a}),t=q(a,t),t.name=a.name}else{if(typeof t=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Dt("application/xml");if(typeof t=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Dt("application/json")}return typeof t=="string"?{name:t}:t||{name:"null"}}function St(t,a){a=Dt(a);var j=$t[a.name];if(!j)return St(t,"text/plain");var M=j(t,a);if(_t.hasOwnProperty(a.name)){var K=_t[a.name];for(var re in K){if(!K.hasOwnProperty(re))continue;M.hasOwnProperty(re)&&(M["_"+re]=M[re]),M[re]=K[re]}}if(M.name=a.name,a.helperType&&(M.helperType=a.helperType),a.modeProps)for(var se in a.modeProps)M[se]=a.modeProps[se];return M}var _t={};function Et(t,a){var j=_t.hasOwnProperty(t)?_t[t]:_t[t]={};L(a,j)}function Bt(t,a){if(a===!0)return a;if(t.copyState)return t.copyState(a);var j={};for(var M in a){var K=a[M];K instanceof Array&&(K=K.concat([])),j[M]=K}return j}function Dr(t,a){for(var j;t.innerMode&&!(j=t.innerMode(a),!j||j.mode==t);)a=j.state,t=j.mode;return j||{mode:t,state:a}}function mt(t,a,j){return t.startState?t.startState(a,j):!0}var Ct=function(t,a,j){this.pos=this.start=0,this.string=t,this.tabSize=a||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=j};Ct.prototype.eol=function(){return this.pos>=this.string.length},Ct.prototype.sol=function(){return this.pos==this.lineStart},Ct.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ct.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ct.prototype.eat=function(t){var a=this.string.charAt(this.pos),j;if(typeof t=="string"?j=a==t:j=a&&(t.test?t.test(a):t(a)),j)return++this.pos,a},Ct.prototype.eatWhile=function(t){for(var a=this.pos;this.eat(t););return this.pos>a},Ct.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Ct.prototype.skipToEnd=function(){this.pos=this.string.length},Ct.prototype.skipTo=function(t){var a=this.string.indexOf(t,this.pos);if(a>-1)return this.pos=a,!0},Ct.prototype.backUp=function(t){this.pos-=t},Ct.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=G(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?G(this.string,this.lineStart,this.tabSize):0)},Ct.prototype.indentation=function(){return G(this.string,null,this.tabSize)-(this.lineStart?G(this.string,this.lineStart,this.tabSize):0)},Ct.prototype.match=function(t,a,j){if(typeof t=="string"){var M=function(se){return j?se.toLowerCase():se},K=this.string.substr(this.pos,t.length);if(M(K)==M(t))return a!==!1&&(this.pos+=t.length),!0}else{var re=this.string.slice(this.pos).match(t);return re&&re.index>0?null:(re&&a!==!1&&(this.pos+=re[0].length),re)}},Ct.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ct.prototype.hideFirstChars=function(t,a){this.lineStart+=t;try{return a()}finally{this.lineStart-=t}},Ct.prototype.lookAhead=function(t){var a=this.lineOracle;return a&&a.lookAhead(t)},Ct.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};function dt(t,a){if(a-=t.first,a<0||a>=t.size)throw new Error("There is no line "+(a+t.first)+" in the document.");for(var j=t;!j.lines;)for(var M=0;;++M){var K=j.children[M],re=K.chunkSize();if(a<re){j=K;break}a-=re}return j.lines[a]}function Ht(t,a,j){var M=[],K=a.line;return t.iter(a.line,j.line+1,function(re){var se=re.text;K==j.line&&(se=se.slice(0,j.ch)),K==a.line&&(se=se.slice(a.ch)),M.push(se),++K}),M}function Gt(t,a,j){var M=[];return t.iter(a,j,function(K){M.push(K.text)}),M}function yt(t,a){var j=a-t.height;if(j)for(var M=t;M;M=M.parent)M.height+=j}function xt(t){if(t.parent==null)return null;for(var a=t.parent,j=oe(a.lines,t),M=a.parent;M;a=M,M=M.parent)for(var K=0;!(M.children[K]==a);++K)j+=M.children[K].chunkSize();return j+a.first}function Kt(t,a){var j=t.first;e:do{for(var M=0;M<t.children.length;++M){var K=t.children[M],re=K.height;if(a<re){t=K;continue e}a-=re,j+=K.chunkSize()}return j}while(!t.lines);for(var se=0;se<t.lines.length;++se){var pe=t.lines[se],ve=pe.height;if(a<ve)break;a-=ve}return j+se}function Ar(t,a){return a>=t.first&&a<t.first+t.size}function qt(t,a){return String(t.lineNumberFormatter(a+t.firstLineNumber))}function ut(t,a,j){if(j===void 0&&(j=null),!(this instanceof ut))return new ut(t,a,j);this.line=t,this.ch=a,this.sticky=j}function kt(t,a){return t.line-a.line||t.ch-a.ch}function Hr(t,a){return t.sticky==a.sticky&&kt(t,a)==0}function Yr(t){return ut(t.line,t.ch)}function On(t,a){return kt(t,a)<0?a:t}function cn(t,a){return kt(t,a)<0?t:a}function zr(t,a){return Math.max(t.first,Math.min(a,t.first+t.size-1))}function Pt(t,a){if(a.line<t.first)return ut(t.first,0);var j=t.first+t.size-1;return a.line>j?ut(j,dt(t,j).text.length):dn(a,dt(t,a.line).text.length)}function dn(t,a){var j=t.ch;return j==null||j>a?ut(t.line,a):j<0?ut(t.line,0):t}function ct(t,a){for(var j=[],M=0;M<a.length;M++)j[M]=Pt(t,a[M]);return j}var jr=function(t,a){this.state=t,this.lookAhead=a},xr=function(t,a,j,M){this.state=a,this.doc=t,this.line=j,this.maxLookAhead=M||0,this.baseTokens=null,this.baseTokenPos=1};xr.prototype.lookAhead=function(t){var a=this.doc.getLine(this.line+t);return a!=null&&t>this.maxLookAhead&&(this.maxLookAhead=t),a},xr.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var a=this.baseTokens[this.baseTokenPos+1];return{type:a&&a.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},xr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},xr.fromSaved=function(t,a,j){return a instanceof jr?new xr(t,Bt(t.mode,a.state),j,a.lookAhead):new xr(t,Bt(t.mode,a),j)},xr.prototype.save=function(t){var a=t!==!1?Bt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new jr(a,this.maxLookAhead):a};function Gn(t,a,j,M){var K=[t.state.modeGen],re={};Vr(t,a.text,t.doc.mode,j,function(Te,Ue){return K.push(Te,Ue)},re,M);for(var se=j.state,pe=function(Te){j.baseTokens=K;var Ue=t.state.overlays[Te],We=1,tt=0;j.state=!0,Vr(t,a.text,Ue.mode,j,function(et,lt){for(var ft=We;tt<et;){var bt=K[We];bt>et&&K.splice(We,1,et,K[We+1],bt),We+=2,tt=Math.min(et,bt)}if(!lt)return;if(Ue.opaque)K.splice(ft,We-ft,et,"overlay "+lt),We=ft+2;else for(;ft<We;ft+=2){var At=K[ft+1];K[ft+1]=(At?At+" ":"")+"overlay "+lt}},re),j.state=se,j.baseTokens=null,j.baseTokenPos=1},ve=0;ve<t.state.overlays.length;++ve)pe(ve);return{styles:K,classes:re.bgClass||re.textClass?re:null}}function An(t,a,j){if(!a.styles||a.styles[0]!=t.state.modeGen){var M=hn(t,xt(a)),K=a.text.length>t.options.maxHighlightLength&&Bt(t.doc.mode,M.state),re=Gn(t,a,M);K&&(M.state=K),a.stateAfter=M.save(!K),a.styles=re.styles,re.classes?a.styleClasses=re.classes:a.styleClasses&&(a.styleClasses=null),j===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return a.styles}function hn(t,a,j){var M=t.doc,K=t.display;if(!M.mode.startState)return new xr(M,!0,a);var re=dr(t,a,j),se=re>M.first&&dt(M,re-1).stateAfter,pe=se?xr.fromSaved(M,se,re):new xr(M,mt(M.mode),re);return M.iter(re,a,function(ve){Ei(t,ve.text,pe);var Te=pe.line;ve.stateAfter=Te==a-1||Te%5==0||Te>=K.viewFrom&&Te<K.viewTo?pe.save():null,pe.nextLine()}),j&&(M.modeFrontier=pe.line),pe}function Ei(t,a,j,M){var K=t.doc.mode,re=new Ct(a,t.options.tabSize,j);for(re.start=re.pos=M||0,a==""&&Kn(K,j.state);!re.eol();)bn(K,re,j.state),re.start=re.pos}function Kn(t,a){if(t.blankLine)return t.blankLine(a);if(!t.innerMode)return;var j=Dr(t,a);if(j.mode.blankLine)return j.mode.blankLine(j.state)}function bn(t,a,j,M){for(var K=0;K<10;K++){M&&(M[0]=Dr(t,j).mode);var re=t.token(a,j);if(a.pos>a.start)return re}throw new Error("Mode "+t.name+" failed to advance stream.")}var Fr=function(t,a,j){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=a||null,this.state=j};function di(t,a,j,M){var K=t.doc,re=K.mode,se;a=Pt(K,a);var pe=dt(K,a.line),ve=hn(t,a.line,j),Te=new Ct(pe.text,t.options.tabSize,ve),Ue;for(M&&(Ue=[]);(M||Te.pos<a.ch)&&!Te.eol();)Te.start=Te.pos,se=bn(re,Te,ve.state),M&&Ue.push(new Fr(Te,se,Bt(K.mode,ve.state)));return M?Ue:new Fr(Te,se,ve.state)}function fn(t,a){if(t)for(;;){var j=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!j)break;t=t.slice(0,j.index)+t.slice(j.index+j[0].length);var M=j[1]?"bgClass":"textClass";a[M]==null?a[M]=j[2]:new RegExp("(?:^|\\s)"+j[2]+"(?:$|\\s)").test(a[M])||(a[M]+=" "+j[2])}return t}function Vr(t,a,j,M,K,re,se){var pe=j.flattenSpans;pe==null&&(pe=t.options.flattenSpans);var ve=0,Te=null,Ue=new Ct(a,t.options.tabSize,M),We,tt=t.options.addModeClass&&[null];for(a==""&&fn(Kn(j,M.state),re);!Ue.eol();){if(Ue.pos>t.options.maxHighlightLength?(pe=!1,se&&Ei(t,a,M,Ue.pos),Ue.pos=a.length,We=null):We=fn(bn(j,Ue,M.state,tt),re),tt){var et=tt[0].name;et&&(We="m-"+(We?et+" "+We:et))}if(!pe||Te!=We){for(;ve<Ue.start;)ve=Math.min(Ue.start,ve+5e3),K(ve,Te);Te=We}Ue.start=Ue.pos}for(;ve<Ue.pos;){var lt=Math.min(Ue.pos,ve+5e3);K(lt,Te),ve=lt}}function dr(t,a,j){for(var M,K,re=t.doc,se=j?-1:a-(t.doc.mode.innerMode?1e3:100),pe=a;pe>se;--pe){if(pe<=re.first)return re.first;var ve=dt(re,pe-1),Te=ve.stateAfter;if(Te&&(!j||pe+(Te instanceof jr?Te.lookAhead:0)<=re.modeFrontier))return pe;var Ue=G(ve.text,null,t.options.tabSize);(K==null||M>Ue)&&(K=pe-1,M=Ue)}return K}function nn(t,a){if(t.modeFrontier=Math.min(t.modeFrontier,a),t.highlightFrontier<a-10)return;for(var j=t.first,M=a-1;M>j;M--){var K=dt(t,M).stateAfter;if(K&&(!(K instanceof jr)||M+K.lookAhead<a)){j=M+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,j)}var _n=!1,jt=!1;function lr(){_n=!0}function ur(){jt=!0}function Rr(t,a,j){this.marker=t,this.from=a,this.to=j}function br(t,a){if(t)for(var j=0;j<t.length;++j){var M=t[j];if(M.marker==a)return M}}function hi(t,a){for(var j,M=0;M<t.length;++M)t[M]!=a&&(j||(j=[])).push(t[M]);return j}function Fn(t,a){t.markedSpans=t.markedSpans?t.markedSpans.concat([a]):[a],a.marker.attachLine(t)}function $i(t,a,j){var M;if(t)for(var K=0;K<t.length;++K){var re=t[K],se=re.marker,pe=re.from==null||(se.inclusiveLeft?re.from<=a:re.from<a);if(pe||re.from==a&&se.type=="bookmark"&&(!j||!re.marker.insertLeft)){var ve=re.to==null||(se.inclusiveRight?re.to>=a:re.to>a);(M||(M=[])).push(new Rr(se,re.from,ve?null:re.to))}}return M}function Ji(t,a,j){var M;if(t)for(var K=0;K<t.length;++K){var re=t[K],se=re.marker,pe=re.to==null||(se.inclusiveRight?re.to>=a:re.to>a);if(pe||re.from==a&&se.type=="bookmark"&&(!j||re.marker.insertLeft)){var ve=re.from==null||(se.inclusiveLeft?re.from<=a:re.from<a);(M||(M=[])).push(new Rr(se,ve?null:re.from-a,re.to==null?null:re.to-a))}}return M}function Oi(t,a){if(a.full)return null;var j=Ar(t,a.from.line)&&dt(t,a.from.line).markedSpans,M=Ar(t,a.to.line)&&dt(t,a.to.line).markedSpans;if(!j&&!M)return null;var K=a.from.ch,re=a.to.ch,se=kt(a.from,a.to)==0,pe=$i(j,K,se),ve=Ji(M,re,se),Te=a.text.length==1,Ue=W(a.text).length+(Te?K:0);if(pe)for(var We=0;We<pe.length;++We){var tt=pe[We];if(tt.to==null){var et=br(ve,tt.marker);et?Te&&(tt.to=et.to==null?null:et.to+Ue):tt.to=K}}if(ve)for(var lt=0;lt<ve.length;++lt){var ft=ve[lt];if(ft.to!=null&&(ft.to+=Ue),ft.from==null){var bt=br(pe,ft.marker);bt||(ft.from=Ue,Te&&(pe||(pe=[])).push(ft))}else ft.from+=Ue,Te&&(pe||(pe=[])).push(ft)}pe&&(pe=pn(pe)),ve&&ve!=pe&&(ve=pn(ve));var At=[pe];if(!Te){var Nt=a.text.length-2,Rt;if(Nt>0&&pe)for(var Wt=0;Wt<pe.length;++Wt)pe[Wt].to==null&&(Rt||(Rt=[])).push(new Rr(pe[Wt].marker,null,null));for(var nr=0;nr<Nt;++nr)At.push(Rt);At.push(ve)}return At}function pn(t){for(var a=0;a<t.length;++a){var j=t[a];j.from!=null&&j.from==j.to&&j.marker.clearWhenEmpty!==!1&&t.splice(a--,1)}return t.length?t:null}function Ki(t,a,j){var M=null;if(t.iter(a.line,j.line+1,function(et){if(et.markedSpans)for(var lt=0;lt<et.markedSpans.length;++lt){var ft=et.markedSpans[lt].marker;ft.readOnly&&(!M||oe(M,ft)==-1)&&(M||(M=[])).push(ft)}}),!M)return null;for(var K=[{from:a,to:j}],re=0;re<M.length;++re)for(var se=M[re],pe=se.find(0),ve=0;ve<K.length;++ve){var Te=K[ve];if(kt(Te.to,pe.from)<0||kt(Te.from,pe.to)>0)continue;var Ue=[ve,1],We=kt(Te.from,pe.from),tt=kt(Te.to,pe.to);(We<0||!se.inclusiveLeft&&!We)&&Ue.push({from:Te.from,to:pe.from}),(tt>0||!se.inclusiveRight&&!tt)&&Ue.push({from:pe.to,to:Te.to}),K.splice.apply(K,Ue),ve+=Ue.length-3}return K}function Zr(t){var a=t.markedSpans;if(!a)return;for(var j=0;j<a.length;++j)a[j].marker.detachLine(t);t.markedSpans=null}function ri(t,a){if(!a)return;for(var j=0;j<a.length;++j)a[j].marker.attachLine(t);t.markedSpans=a}function kn(t){return t.inclusiveLeft?-1:0}function sn(t){return t.inclusiveRight?1:0}function Tn(t,a){var j=t.lines.length-a.lines.length;if(j!=0)return j;var M=t.find(),K=a.find(),re=kt(M.from,K.from)||kn(t)-kn(a);if(re)return-re;var se=kt(M.to,K.to)||sn(t)-sn(a);return se||a.id-t.id}function fi(t,a){var j=jt&&t.markedSpans,M;if(j)for(var K=void 0,re=0;re<j.length;++re)K=j[re],K.marker.collapsed&&(a?K.from:K.to)==null&&(!M||Tn(M,K.marker)<0)&&(M=K.marker);return M}function zn(t){return fi(t,!0)}function Vn(t){return fi(t,!1)}function ki(t,a){var j=jt&&t.markedSpans,M;if(j)for(var K=0;K<j.length;++K){var re=j[K];re.marker.collapsed&&(re.from==null||re.from<a)&&(re.to==null||re.to>a)&&(!M||Tn(M,re.marker)<0)&&(M=re.marker)}return M}function Mi(t,a,j,M,K){var re=dt(t,a),se=jt&&re.markedSpans;if(se)for(var pe=0;pe<se.length;++pe){var ve=se[pe];if(!ve.marker.collapsed)continue;var Te=ve.marker.find(0),Ue=kt(Te.from,j)||kn(ve.marker)-kn(K),We=kt(Te.to,M)||sn(ve.marker)-sn(K);if(Ue>=0&&We<=0||Ue<=0&&We>=0)continue;if(Ue<=0&&(ve.marker.inclusiveRight&&K.inclusiveLeft?kt(Te.to,j)>=0:kt(Te.to,j)>0)||Ue>=0&&(ve.marker.inclusiveRight&&K.inclusiveLeft?kt(Te.from,M)<=0:kt(Te.from,M)<0))return!0}}function Xn(t){for(var a;a=zn(t);)t=a.find(-1,!0).line;return t}function ji(t){for(var a;a=Vn(t);)t=a.find(1,!0).line;return t}function pi(t){for(var a,j;a=Vn(t);)t=a.find(1,!0).line,(j||(j=[])).push(t);return j}function mi(t,a){var j=dt(t,a),M=Xn(j);return j==M?a:xt(M)}function Yn(t,a){if(a>t.lastLine())return a;var j=dt(t,a),M;if(!$n(t,j))return a;for(;M=Vn(j);)j=M.find(1,!0).line;return xt(j)+1}function $n(t,a){var j=jt&&a.markedSpans;if(j)for(var M=void 0,K=0;K<j.length;++K){if(M=j[K],!M.marker.collapsed)continue;if(M.from==null)return!0;if(M.marker.widgetNode)continue;if(M.from==0&&M.marker.inclusiveLeft&&Pi(t,a,M))return!0}}function Pi(t,a,j){if(j.to==null){var M=j.marker.find(1,!0);return Pi(t,M.line,br(M.line.markedSpans,j.marker))}if(j.marker.inclusiveRight&&j.to==a.text.length)return!0;for(var K=void 0,re=0;re<a.markedSpans.length;++re)if(K=a.markedSpans[re],K.marker.collapsed&&!K.marker.widgetNode&&K.from==j.to&&(K.to==null||K.to!=j.from)&&(K.marker.inclusiveLeft||j.marker.inclusiveRight)&&Pi(t,a,K))return!0}function ni(t){t=Xn(t);for(var a=0,j=t.parent,M=0;M<j.lines.length;++M){var K=j.lines[M];if(K==t)break;a+=K.height}for(var re=j.parent;re;j=re,re=j.parent)for(var se=0;se<re.children.length;++se){var pe=re.children[se];if(pe==j)break;a+=pe.height}return a}function gi(t){if(t.height==0)return 0;for(var a=t.text.length,j,M=t;j=zn(M);){var K=j.find(0,!0);M=K.from.line,a+=K.from.ch-K.to.ch}for(M=t;j=Vn(M);){var re=j.find(0,!0);a-=M.text.length-re.from.ch,M=re.to.line,a+=M.text.length-re.to.ch}return a}function Fi(t){var a=t.display,j=t.doc;a.maxLine=dt(j,j.first),a.maxLineLength=gi(a.maxLine),a.maxLineChanged=!0,j.iter(function(M){var K=gi(M);K>a.maxLineLength&&(a.maxLineLength=K,a.maxLine=M)})}var ii=function(t,a,j){this.text=t,ri(this,a),this.height=j?j(this):1};ii.prototype.lineNo=function(){return xt(this)},Ce(ii);function Ur(t,a,j,M){t.text=a,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),t.order!=null&&(t.order=null),Zr(t),ri(t,j);var K=M?M(t):1;K!=t.height&&yt(t,K)}function Ut(t){t.parent=null,Zr(t)}var er={},zt={};function ar(t,a){if(!t||/^\s*$/.test(t))return null;var j=a.addModeClass?zt:er;return j[t]||(j[t]=t.replace(/\S+/g,"cm-$&"))}function _r(t,a){var j=F("span",null,null,e?"padding-right: .1px":null),M={pre:F("pre",[j],"CodeMirror-line"),content:j,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};a.measure={};for(var K=0;K<=(a.rest?a.rest.length:0);K++){var re=K?a.rest[K-1]:a.line,se=void 0;M.pos=0,M.addToken=mr,Tt(t.display.measure)&&(se=qe(re,t.doc.direction))&&(M.addToken=Un(M.addToken,se)),M.map=[];var pe=a!=t.display.externalMeasured&&xt(re);vi(re,M,An(t,re,pe)),re.styleClasses&&(re.styleClasses.bgClass&&(M.bgClass=O(re.styleClasses.bgClass,M.bgClass||"")),re.styleClasses.textClass&&(M.textClass=O(re.styleClasses.textClass,M.textClass||""))),M.map.length==0&&M.map.push(0,0,M.content.appendChild(it(t.display.measure))),K==0?(a.measure.map=M.map,a.measure.cache={}):((a.measure.maps||(a.measure.maps=[])).push(M.map),(a.measure.caches||(a.measure.caches=[])).push({}))}if(e){var ve=M.content.lastChild;(/\bcm-tab\b/.test(ve.className)||ve.querySelector&&ve.querySelector(".cm-tab"))&&(M.content.className="cm-tab-wrap-hack")}return ye(t,"renderLine",t,a.line,M.pre),M.pre.className&&(M.textClass=O(M.pre.className,M.textClass||"")),M}function Lr(t){var a=T("span","\u2022","cm-invalidchar");return a.title="\\u"+t.charCodeAt(0).toString(16),a.setAttribute("aria-label",a.title),a}function mr(t,a,j,M,K,re,se){if(!a)return;var pe=t.splitSpaces?qr(a,t.trailingSpace):a,ve=t.cm.state.specialChars,Te=!1,Ue;if(!ve.test(a))t.col+=a.length,Ue=document.createTextNode(pe),t.map.push(t.pos,t.pos+a.length,Ue),C&&_<9&&(Te=!0),t.pos+=a.length;else{Ue=document.createDocumentFragment();for(var We=0;;){ve.lastIndex=We;var tt=ve.exec(a),et=tt?tt.index-We:a.length-We;if(et){var lt=document.createTextNode(pe.slice(We,We+et));C&&_<9?Ue.appendChild(T("span",[lt])):Ue.appendChild(lt),t.map.push(t.pos,t.pos+et,lt),t.col+=et,t.pos+=et}if(!tt)break;We+=et+1;var ft=void 0;if(tt[0]==" "){var bt=t.cm.options.tabSize,At=bt-t.col%bt;ft=Ue.appendChild(T("span",te(At),"cm-tab")),ft.setAttribute("role","presentation"),ft.setAttribute("cm-text"," "),t.col+=At}else tt[0]=="\r"||tt[0]==`
|
|
|
`?(ft=Ue.appendChild(T("span",tt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ft.setAttribute("cm-text",tt[0]),t.col+=1):(ft=t.cm.options.specialCharPlaceholder(tt[0]),ft.setAttribute("cm-text",tt[0]),C&&_<9?Ue.appendChild(T("span",[ft])):Ue.appendChild(ft),t.col+=1);t.map.push(t.pos,t.pos+1,ft),t.pos++}}if(t.trailingSpace=pe.charCodeAt(a.length-1)==32,j||M||K||Te||re||se){var Nt=j||"";M&&(Nt+=M),K&&(Nt+=K);var Rt=T("span",[Ue],Nt,re);if(se)for(var Wt in se)se.hasOwnProperty(Wt)&&Wt!="style"&&Wt!="class"&&Rt.setAttribute(Wt,se[Wt]);return t.content.appendChild(Rt)}t.content.appendChild(Ue)}function qr(t,a){if(t.length>1&&!/ /.test(t))return t;for(var j=a,M="",K=0;K<t.length;K++){var re=t.charAt(K);re==" "&&j&&(K==t.length-1||t.charCodeAt(K+1)==32)&&(re="\xA0"),M+=re,j=re==" "}return M}function Un(t,a){return function(j,M,K,re,se,pe,ve){K=K?K+" cm-force-border":"cm-force-border";for(var Te=j.pos,Ue=Te+M.length;;){for(var We=void 0,tt=0;tt<a.length&&!(We=a[tt],We.to>Te&&We.from<=Te);tt++);if(We.to>=Ue)return t(j,M,K,re,se,pe,ve);t(j,M.slice(0,We.to-Te),K,re,null,pe,ve),re=null,M=M.slice(We.to-Te),Te=We.to}}}function hr(t,a,j,M){var K=!M&&j.widgetNode;K&&t.map.push(t.pos,t.pos+a,K),!M&&t.cm.display.input.needsContentAttribute&&(K||(K=t.content.appendChild(document.createElement("span"))),K.setAttribute("cm-marker",j.id)),K&&(t.cm.display.input.setUneditable(K),t.content.appendChild(K)),t.pos+=a,t.trailingSpace=!1}function vi(t,a,j){var M=t.markedSpans,K=t.text,re=0;if(!M){for(var se=1;se<j.length;se+=2)a.addToken(a,K.slice(re,re=j[se]),ar(j[se+1],a.cm.options));return}for(var pe=K.length,ve=0,Te=1,Ue="",We,tt,et=0,lt,ft,bt,At,Nt;;){if(et==ve){lt=ft=bt=tt="",Nt=null,At=null,et=Infinity;for(var Rt=[],Wt=void 0,nr=0;nr<M.length;++nr){var Zt=M[nr],Tr=Zt.marker;if(Tr.type=="bookmark"&&Zt.from==ve&&Tr.widgetNode)Rt.push(Tr);else if(Zt.from<=ve&&(Zt.to==null||Zt.to>ve||Tr.collapsed&&Zt.to==ve&&Zt.from==ve)){if(Zt.to!=null&&Zt.to!=ve&&et>Zt.to&&(et=Zt.to,ft=""),Tr.className&&(lt+=" "+Tr.className),Tr.css&&(tt=(tt?tt+";":"")+Tr.css),Tr.startStyle&&Zt.from==ve&&(bt+=" "+Tr.startStyle),Tr.endStyle&&Zt.to==et&&(Wt||(Wt=[])).push(Tr.endStyle,Zt.to),Tr.title&&((Nt||(Nt={})).title=Tr.title),Tr.attributes)for(var un in Tr.attributes)(Nt||(Nt={}))[un]=Tr.attributes[un];Tr.collapsed&&(!At||Tn(At.marker,Tr)<0)&&(At=Zt)}else Zt.from>ve&&et>Zt.from&&(et=Zt.from)}if(Wt)for(var oi=0;oi<Wt.length;oi+=2)Wt[oi+1]==et&&(ft+=" "+Wt[oi]);if(!At||At.from==ve)for(var Cn=0;Cn<Rt.length;++Cn)hr(a,0,Rt[Cn]);if(At&&(At.from||0)==ve){if(hr(a,(At.to==null?pe+1:At.to)-ve,At.marker,At.from==null),At.to==null)return;At.to==ve&&(At=!1)}}if(ve>=pe)break;for(var Ni=Math.min(pe,et);;){if(Ue){var Ii=ve+Ue.length;if(!At){var Hn=Ii>Ni?Ue.slice(0,Ni-ve):Ue;a.addToken(a,Hn,We?We+lt:lt,bt,ve+Hn.length==et?ft:"",tt,Nt)}if(Ii>=Ni){Ue=Ue.slice(Ni-ve),ve=Ni;break}ve=Ii,bt=""}Ue=K.slice(re,re=j[Te++]),We=ar(j[Te++],a.cm.options)}}}function kr(t,a,j){this.line=a,this.rest=pi(a),this.size=this.rest?xt(W(this.rest))-j+1:1,this.node=this.text=null,this.hidden=$n(t,a)}function Sn(t,a,j){for(var M=[],K,re=a;re<j;re=K){var se=new kr(t.doc,dt(t.doc,re),re);K=re+se.size,M.push(se)}return M}var Rn=null;function li(t){Rn?Rn.ops.push(t):t.ownsGroup=Rn={ops:[t],delayedCallbacks:[]}}function ua(t){var a=t.delayedCallbacks,j=0;do{for(;j<a.length;j++)a[j].call(null);for(var M=0;M<t.ops.length;M++){var K=t.ops[M];if(K.cursorActivityHandlers)for(;K.cursorActivityCalled<K.cursorActivityHandlers.length;)K.cursorActivityHandlers[K.cursorActivityCalled++].call(null,K.cm)}}while(j<a.length)}function Mr(t,a){var j=t.ownsGroup;if(!j)return;try{ua(j)}finally{Rn=null,a(j)}}var wr=null;function gr(t,a){var j=Je(t,a);if(!j.length)return;var M=Array.prototype.slice.call(arguments,2),K;Rn?K=Rn.delayedCallbacks:wr?K=wr:(K=wr=[],setTimeout(ai,0));for(var re=function(pe){K.push(function(){return j[pe].apply(null,M)})},se=0;se<j.length;++se)re(se)}function ai(){var t=wr;wr=null;for(var a=0;a<t.length;++a)t[a]()}function zi(t,a,j,M){for(var K=0;K<a.changes.length;K++){var re=a.changes[K];re=="text"?ir(t,a):re=="gutter"?Wr(t,a,j,M):re=="class"?or(t,a):re=="widget"&&vr(t,a,M)}a.changes=null}function Vi(t){return t.node==t.text&&(t.node=T("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),C&&_<8&&(t.node.style.zIndex=2)),t.node}function tr(t,a){var j=a.bgClass?a.bgClass+" "+(a.line.bgClass||""):a.line.bgClass;if(j&&(j+=" CodeMirror-linebackground"),a.background)j?a.background.className=j:(a.background.parentNode.removeChild(a.background),a.background=null);else if(j){var M=Vi(a);a.background=M.insertBefore(T("div",null,j),M.firstChild),t.display.input.setUneditable(a.background)}}function It(t,a){var j=t.display.externalMeasured;return j&&j.line==a.line?(t.display.externalMeasured=null,a.measure=j.measure,j.built):_r(t,a)}function ir(t,a){var j=a.text.className,M=It(t,a);a.text==a.node&&(a.node=M.pre),a.text.parentNode.replaceChild(M.pre,a.text),a.text=M.pre,M.bgClass!=a.bgClass||M.textClass!=a.textClass?(a.bgClass=M.bgClass,a.textClass=M.textClass,or(t,a)):j&&(a.text.className=j)}function or(t,a){tr(t,a),a.line.wrapClass?Vi(a).className=a.line.wrapClass:a.node!=a.text&&(a.node.className="");var j=a.textClass?a.textClass+" "+(a.line.textClass||""):a.line.textClass;a.text.className=j||""}function Wr(t,a,j,M){if(a.gutter&&(a.node.removeChild(a.gutter),a.gutter=null),a.gutterBackground&&(a.node.removeChild(a.gutterBackground),a.gutterBackground=null),a.line.gutterClass){var K=Vi(a);a.gutterBackground=T("div",null,"CodeMirror-gutter-background "+a.line.gutterClass,"left: "+(t.options.fixedGutter?M.fixedPos:-M.gutterTotalWidth)+"px; width: "+M.gutterTotalWidth+"px"),t.display.input.setUneditable(a.gutterBackground),K.insertBefore(a.gutterBackground,a.text)}var re=a.line.gutterMarkers;if(t.options.lineNumbers||re){var se=Vi(a),pe=a.gutter=T("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?M.fixedPos:-M.gutterTotalWidth)+"px");if(t.display.input.setUneditable(pe),se.insertBefore(pe,a.text),a.line.gutterClass&&(pe.className+=" "+a.line.gutterClass),t.options.lineNumbers&&(!re||!re["CodeMirror-linenumbers"])&&(a.lineNumber=pe.appendChild(T("div",qt(t.options,j),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+M.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),re)for(var ve=0;ve<t.display.gutterSpecs.length;++ve){var Te=t.display.gutterSpecs[ve].className,Ue=re.hasOwnProperty(Te)&&re[Te];Ue&&pe.appendChild(T("div",[Ue],"CodeMirror-gutter-elt","left: "+M.gutterLeft[Te]+"px; width: "+M.gutterWidth[Te]+"px"))}}}function vr(t,a,j){a.alignable&&(a.alignable=null);for(var M=R("CodeMirror-linewidget"),K=a.node.firstChild,re=void 0;K;K=re)re=K.nextSibling,M.test(K.className)&&a.node.removeChild(K);an(t,a,j)}function mn(t,a,j,M){var K=It(t,a);return a.text=a.node=K.pre,K.bgClass&&(a.bgClass=K.bgClass),K.textClass&&(a.textClass=K.textClass),or(t,a),Wr(t,a,j,M),an(t,a,M),a.node}function an(t,a,j){if(Ai(t,a.line,a,j,!0),a.rest)for(var M=0;M<a.rest.length;M++)Ai(t,a.rest[M],a,j,!1)}function Ai(t,a,j,M,K){if(!a.widgets)return;for(var re=Vi(j),se=0,pe=a.widgets;se<pe.length;++se){var ve=pe[se],Te=T("div",[ve.node],"CodeMirror-linewidget"+(ve.className?" "+ve.className:""));ve.handleMouseEvents||Te.setAttribute("cm-ignore-events","true"),In(ve,Te,j,M),t.display.input.setUneditable(Te),K&&ve.above?re.insertBefore(Te,j.gutter||j.text):re.appendChild(Te),gr(ve,"redraw")}}function In(t,a,j,M){if(t.noHScroll){(j.alignable||(j.alignable=[])).push(a);var K=M.wrapperWidth;a.style.left=M.fixedPos+"px",t.coverGutter||(K-=M.gutterTotalWidth,a.style.paddingLeft=M.gutterTotalWidth+"px"),a.style.width=K+"px"}t.coverGutter&&(a.style.zIndex=5,a.style.position="relative",t.noHScroll||(a.style.marginLeft=-M.gutterTotalWidth+"px"))}function Mn(t){if(t.height!=null)return t.height;var a=t.doc.cm;if(!a)return 0;if(!A(document.body,t.node)){var j="position: relative;";t.coverGutter&&(j+="margin-left: -"+a.display.gutters.offsetWidth+"px;"),t.noHScroll&&(j+="width: "+a.display.wrapper.clientWidth+"px;"),w(a.display.measure,T("div",[t.node],null,j))}return t.height=t.node.parentNode.offsetHeight}function Bn(t,a){for(var j=Me(a);j!=t.wrapper;j=j.parentNode)if(!j||j.nodeType==1&&j.getAttribute("cm-ignore-events")=="true"||j.parentNode==t.sizer&&j!=t.mover)return!0}function Xi(t){return t.lineSpace.offsetTop}function ke(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function Ge(t){if(t.cachedPaddingH)return t.cachedPaddingH;var a=w(t.measure,T("pre","x","CodeMirror-line-like")),j=window.getComputedStyle?window.getComputedStyle(a):a.currentStyle,M={left:parseInt(j.paddingLeft),right:parseInt(j.paddingRight)};return!isNaN(M.left)&&!isNaN(M.right)&&(t.cachedPaddingH=M),M}function Ve(t){return ae-t.display.nativeBarWidth}function Ne(t){return t.display.scroller.clientWidth-Ve(t)-t.display.barWidth}function xe(t){return t.display.scroller.clientHeight-Ve(t)-t.display.barHeight}function Le(t,a,j){var M=t.options.lineWrapping,K=M&&Ne(t);if(!a.measure.heights||M&&a.measure.width!=K){var re=a.measure.heights=[];if(M){a.measure.width=K;for(var se=a.text.firstChild.getClientRects(),pe=0;pe<se.length-1;pe++){var ve=se[pe],Te=se[pe+1];Math.abs(ve.bottom-Te.bottom)>2&&re.push((ve.bottom+Te.top)/2-j.top)}}re.push(j.bottom-j.top)}}function Se(t,a,j){if(t.line==a)return{map:t.measure.map,cache:t.measure.cache};for(var M=0;M<t.rest.length;M++)if(t.rest[M]==a)return{map:t.measure.maps[M],cache:t.measure.caches[M]};for(var K=0;K<t.rest.length;K++)if(xt(t.rest[K])>j)return{map:t.measure.maps[K],cache:t.measure.caches[K],before:!0}}function je(t,a){a=Xn(a);var j=xt(a),M=t.display.externalMeasured=new kr(t.doc,a,j);M.lineN=j;var K=M.built=_r(t,M);return M.text=K.pre,w(t.display.lineMeasure,K.pre),M}function Be(t,a,j,M){return Qe(t,Ke(t,a),j,M)}function ze(t,a){if(a>=t.display.viewFrom&&a<t.display.viewTo)return t.display.view[ln(t,a)];var j=t.display.externalMeasured;if(j&&a>=j.lineN&&a<j.lineN+j.size)return j}function Ke(t,a){var j=xt(a),M=ze(t,j);M&&!M.text?M=null:M&&M.changes&&(zi(t,M,j,En(t)),t.curOp.forceUpdate=!0),M||(M=je(t,a));var K=Se(M,a,j);return{line:a,view:M,rect:null,map:K.map,cache:K.cache,before:K.before,hasHeights:!1}}function Qe(t,a,j,M,K){a.before&&(j=-1);var re=j+(M||""),se;return a.cache.hasOwnProperty(re)?se=a.cache[re]:(a.rect||(a.rect=a.view.text.getBoundingClientRect()),a.hasHeights||(Le(t,a.view,a.rect),a.hasHeights=!0),se=Ot(t,a,j,M),se.bogus||(a.cache[re]=se)),{left:se.left,right:se.right,top:K?se.rtop:se.top,bottom:K?se.rbottom:se.bottom}}var ot={left:0,right:0,top:0,bottom:0};function vt(t,a,j){for(var M,K,re,se,pe,ve,Te=0;Te<t.length;Te+=3)if(pe=t[Te],ve=t[Te+1],a<pe?(K=0,re=1,se="left"):a<ve?(K=a-pe,re=K+1):(Te==t.length-3||a==ve&&t[Te+3]>a)&&(re=ve-pe,K=re-1,a>=ve&&(se="right")),K!=null){if(M=t[Te+2],pe==ve&&j==(M.insertLeft?"left":"right")&&(se=j),j=="left"&&K==0)for(;Te&&t[Te-2]==t[Te-3]&&t[Te-1].insertLeft;)M=t[(Te-=3)+2],se="left";if(j=="right"&&K==ve-pe)for(;Te<t.length-3&&t[Te+3]==t[Te+4]&&!t[Te+5].insertLeft;)M=t[(Te+=3)+2],se="right";break}return{node:M,start:K,end:re,collapse:se,coverStart:pe,coverEnd:ve}}function gt(t,a){var j=ot;if(a=="left")for(var M=0;M<t.length&&!((j=t[M]).left!=j.right);M++);else for(var K=t.length-1;K>=0&&!((j=t[K]).left!=j.right);K--);return j}function Ot(t,a,j,M){var K=vt(a.map,j,M),re=K.node,se=K.start,pe=K.end,ve=K.collapse,Te;if(re.nodeType==3){for(var Ue=0;Ue<4;Ue++){for(;se&&ce(a.line.text.charAt(K.coverStart+se));)--se;for(;K.coverStart+pe<K.coverEnd&&ce(a.line.text.charAt(K.coverStart+pe));)++pe;if(C&&_<9&&se==0&&pe==K.coverEnd-K.coverStart?Te=re.parentNode.getBoundingClientRect():Te=gt(P(re,se,pe).getClientRects(),M),Te.left||Te.right||se==0)break;pe=se,se=se-1,ve="right"}C&&_<11&&(Te=Xt(t.display.measure,Te))}else{se>0&&(ve=M="right");var We;t.options.lineWrapping&&(We=re.getClientRects()).length>1?Te=We[M=="right"?We.length-1:0]:Te=re.getBoundingClientRect()}if(C&&_<9&&!se&&(!Te||!Te.left&&!Te.right)){var tt=re.parentNode.getClientRects()[0];tt?Te={left:tt.left,right:tt.left+Jn(t.display),top:tt.top,bottom:tt.bottom}:Te=ot}for(var et=Te.top-a.rect.top,lt=Te.bottom-a.rect.top,ft=(et+lt)/2,bt=a.view.measure.heights,At=0;At<bt.length-1&&!(ft<bt[At]);At++);var Nt=At?bt[At-1]:0,Rt=bt[At],Wt={left:(ve=="right"?Te.right:Te.left)-a.rect.left,right:(ve=="left"?Te.left:Te.right)-a.rect.left,top:Nt,bottom:Rt};return!Te.left&&!Te.right&&(Wt.bogus=!0),t.options.singleCursorHeightPerLine||(Wt.rtop=et,Wt.rbottom=lt),Wt}function Xt(t,a){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Yt(t))return a;var j=screen.logicalXDPI/screen.deviceXDPI,M=screen.logicalYDPI/screen.deviceYDPI;return{left:a.left*j,right:a.right*j,top:a.top*M,bottom:a.bottom*M}}function sr(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var a=0;a<t.rest.length;a++)t.measure.caches[a]={}}function cr(t){t.display.externalMeasure=null,x(t.display.lineMeasure);for(var a=0;a<t.display.view.length;a++)sr(t.display.view[a])}function fr(t){cr(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function Er(){return r&&d?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function yr(){return r&&d?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function pr(t){var a=0;if(t.widgets)for(var j=0;j<t.widgets.length;++j)t.widgets[j].above&&(a+=Mn(t.widgets[j]));return a}function Pr(t,a,j,M,K){if(!K){var re=pr(a);j.top+=re,j.bottom+=re}if(M=="line")return j;M||(M="local");var se=ni(a);if(M=="local"?se+=Xi(t.display):se-=t.display.viewOffset,M=="page"||M=="window"){var pe=t.display.lineSpace.getBoundingClientRect();se+=pe.top+(M=="window"?0:yr());var ve=pe.left+(M=="window"?0:Er());j.left+=ve,j.right+=ve}return j.top+=se,j.bottom+=se,j}function Sr(t,a,j){if(j=="div")return a;var M=a.left,K=a.top;if(j=="page")M-=Er(),K-=yr();else if(j=="local"||!j){var re=t.display.sizer.getBoundingClientRect();M+=re.left,K+=re.top}var se=t.display.lineSpace.getBoundingClientRect();return{left:M-se.left,top:K-se.top}}function gn(t,a,j,M,K){return M||(M=dt(t.doc,a.line)),Pr(t,M,Be(t,M,a.ch,K),j)}function Cr(t,a,j,M,K,re){M=M||dt(t.doc,a.line),K||(K=Ke(t,M));function se(lt,ft){var bt=Qe(t,K,lt,ft?"right":"left",re);return ft?bt.left=bt.right:bt.right=bt.left,Pr(t,M,bt,j)}var pe=qe(M,t.doc.direction),ve=a.ch,Te=a.sticky;if(ve>=M.text.length?(ve=M.text.length,Te="before"):ve<=0&&(ve=0,Te="after"),!pe)return se(Te=="before"?ve-1:ve,Te=="before");function Ue(lt,ft,bt){var At=pe[ft],Nt=At.level==1;return se(bt?lt-1:lt,Nt!=bt)}var We=Ye(pe,ve,Te),tt=$e,et=Ue(ve,We,Te=="before");return tt!=null&&(et.other=Ue(ve,tt,Te!="before")),et}function rr(t,a){var j=0;a=Pt(t.doc,a),t.options.lineWrapping||(j=Jn(t.display)*a.ch);var M=dt(t.doc,a.line),K=ni(M)+Xi(t.display);return{left:j,right:j,top:K,bottom:K+M.height}}function Qt(t,a,j,M,K){var re=ut(t,a,j);return re.xRel=K,M&&(re.outside=M),re}function Or(t,a,j){var M=t.doc;if(j+=t.display.viewOffset,j<0)return Qt(M.first,0,null,-1,-1);var K=Kt(M,j),re=M.first+M.size-1;if(K>re)return Qt(M.first+M.size-1,dt(M,re).text.length,null,1,1);a<0&&(a=0);for(var se=dt(M,K);;){var pe=vn(t,se,K,a,j),ve=ki(se,pe.ch+(pe.xRel>0||pe.outside>0?1:0));if(!ve)return pe;var Te=ve.find(1);if(Te.line==K)return Te;se=dt(M,K=Te.line)}}function Nr(t,a,j,M){M-=pr(a);var K=a.text.length,re=Fe(function(se){return Qe(t,j,se-1).bottom<=M},K,0);return K=Fe(function(se){return Qe(t,j,se).top>M},re,K),{begin:re,end:K}}function Vt(t,a,j,M){j||(j=Ke(t,a));var K=Pr(t,a,Qe(t,j,M),"line").top;return Nr(t,a,j,K)}function Br(t,a,j,M){return t.bottom<=j?!1:t.top>j?!0:(M?t.left:t.right)>a}function vn(t,a,j,M,K){K-=ni(a);var re=Ke(t,a),se=pr(a),pe=0,ve=a.text.length,Te=!0,Ue=qe(a,t.doc.direction);if(Ue){var We=(t.options.lineWrapping?en:Gr)(t,a,j,re,Ue,M,K);Te=We.level!=1,pe=Te?We.from:We.to-1,ve=Te?We.to:We.from-1}var tt=null,et=null,lt=Fe(function(nr){var Zt=Qe(t,re,nr);return Zt.top+=se,Zt.bottom+=se,Br(Zt,M,K,!1)?(Zt.top<=K&&Zt.left<=M&&(tt=nr,et=Zt),!0):!1},pe,ve),ft,bt,At=!1;if(et){var Nt=M-et.left<et.right-M,Rt=Nt==Te;lt=tt+(Rt?0:1),bt=Rt?"after":"before",ft=Nt?et.left:et.right}else{!Te&&(lt==ve||lt==pe)&<++,bt=lt==0?"after":lt==a.text.length?"before":Qe(t,re,lt-(Te?1:0)).bottom+se<=K==Te?"after":"before";var Wt=Cr(t,ut(j,lt,bt),"line",a,re);ft=Wt.left,At=K<Wt.top?-1:K>=Wt.bottom?1:0}return lt=we(a.text,lt,1),Qt(j,lt,bt,At,M-ft)}function Gr(t,a,j,M,K,re,se){var pe=Fe(function(We){var tt=K[We],et=tt.level!=1;return Br(Cr(t,ut(j,et?tt.to:tt.from,et?"before":"after"),"line",a,M),re,se,!0)},0,K.length-1),ve=K[pe];if(pe>0){var Te=ve.level!=1,Ue=Cr(t,ut(j,Te?ve.from:ve.to,Te?"after":"before"),"line",a,M);Br(Ue,re,se,!0)&&Ue.top>se&&(ve=K[pe-1])}return ve}function en(t,a,j,M,K,re,se){var pe=Nr(t,a,M,se),ve=pe.begin,Te=pe.end;/\s/.test(a.text.charAt(Te-1))&&Te--;for(var Ue=null,We=null,tt=0;tt<K.length;tt++){var et=K[tt];if(et.from>=Te||et.to<=ve)continue;var lt=et.level!=1,ft=Qe(t,M,lt?Math.min(Te,et.to)-1:Math.max(ve,et.from)).right,bt=ft<re?re-ft+1e9:ft-re;(!Ue||We>bt)&&(Ue=et,We=bt)}return Ue||(Ue=K[K.length-1]),Ue.from<ve&&(Ue={from:ve,to:Ue.to,level:Ue.level}),Ue.to>Te&&(Ue={from:Ue.from,to:Te,level:Ue.level}),Ue}var Jr;function Dn(t){if(t.cachedTextHeight!=null)return t.cachedTextHeight;if(Jr==null){Jr=T("pre",null,"CodeMirror-line-like");for(var a=0;a<49;++a)Jr.appendChild(document.createTextNode("x")),Jr.appendChild(T("br"));Jr.appendChild(document.createTextNode("x"))}w(t.measure,Jr);var j=Jr.offsetHeight/50;return j>3&&(t.cachedTextHeight=j),x(t.measure),j||1}function Jn(t){if(t.cachedCharWidth!=null)return t.cachedCharWidth;var a=T("span","xxxxxxxxxx"),j=T("pre",[a],"CodeMirror-line-like");w(t.measure,j);var M=a.getBoundingClientRect(),K=(M.right-M.left)/10;return K>2&&(t.cachedCharWidth=K),K||10}function En(t){for(var a=t.display,j={},M={},K=a.gutters.clientLeft,re=a.gutters.firstChild,se=0;re;re=re.nextSibling,++se){var pe=t.display.gutterSpecs[se].className;j[pe]=re.offsetLeft+re.clientLeft+K,M[pe]=re.clientWidth}return{fixedPos:yi(a),gutterTotalWidth:a.gutters.offsetWidth,gutterLeft:j,gutterWidth:M,wrapperWidth:a.wrapper.clientWidth}}function yi(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function Ui(t){var a=Dn(t.display),j=t.options.lineWrapping,M=j&&Math.max(5,t.display.scroller.clientWidth/Jn(t.display)-3);return function(K){if($n(t.doc,K))return 0;var re=0;if(K.widgets)for(var se=0;se<K.widgets.length;se++)K.widgets[se].height&&(re+=K.widgets[se].height);return j?re+(Math.ceil(K.text.length/M)||1)*a:re+a}}function xi(t){var a=t.doc,j=Ui(t);a.iter(function(M){var K=j(M);K!=M.height&&yt(M,K)})}function Qn(t,a,j,M){var K=t.display;if(!j&&Me(a).getAttribute("cm-not-content")=="true")return null;var re,se,pe=K.lineSpace.getBoundingClientRect();try{re=a.clientX-pe.left,se=a.clientY-pe.top}catch(We){return null}var ve=Or(t,re,se),Te;if(M&&ve.xRel>0&&(Te=dt(t.doc,ve.line).text).length==ve.ch){var Ue=G(Te,Te.length,t.options.tabSize)-Te.length;ve=ut(ve.line,Math.max(0,Math.round((re-Ge(t.display).left)/Jn(t.display))-Ue))}return ve}function ln(t,a){if(a>=t.display.viewTo)return null;if(a-=t.display.viewFrom,a<0)return null;for(var j=t.display.view,M=0;M<j.length;M++)if(a-=j[M].size,a<0)return M}function tn(t,a,j,M){a==null&&(a=t.doc.first),j==null&&(j=t.doc.first+t.doc.size),M||(M=0);var K=t.display;if(M&&j<K.viewTo&&(K.updateLineNumbers==null||K.updateLineNumbers>a)&&(K.updateLineNumbers=a),t.curOp.viewChanged=!0,a>=K.viewTo)jt&&mi(t.doc,a)<K.viewTo&&yn(t);else if(j<=K.viewFrom)jt&&Yn(t.doc,j+M)>K.viewFrom?yn(t):(K.viewFrom+=M,K.viewTo+=M);else if(a<=K.viewFrom&&j>=K.viewTo)yn(t);else if(a<=K.viewFrom){var re=Bi(t,j,j+M,1);re?(K.view=K.view.slice(re.index),K.viewFrom=re.lineN,K.viewTo+=M):yn(t)}else if(j>=K.viewTo){var se=Bi(t,a,a,-1);se?(K.view=K.view.slice(0,se.index),K.viewTo=se.lineN):yn(t)}else{var pe=Bi(t,a,a,-1),ve=Bi(t,j,j+M,1);pe&&ve?(K.view=K.view.slice(0,pe.index).concat(Sn(t,pe.lineN,ve.lineN)).concat(K.view.slice(ve.index)),K.viewTo+=M):yn(t)}var Te=K.externalMeasured;Te&&(j<Te.lineN?Te.lineN+=M:a<Te.lineN+Te.size&&(K.externalMeasured=null))}function xn(t,a,j){t.curOp.viewChanged=!0;var M=t.display,K=t.display.externalMeasured;if(K&&a>=K.lineN&&a<K.lineN+K.size&&(M.externalMeasured=null),a<M.viewFrom||a>=M.viewTo)return;var re=M.view[ln(t,a)];if(re.node==null)return;var se=re.changes||(re.changes=[]);oe(se,j)==-1&&se.push(j)}function yn(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Bi(t,a,j,M){var K=ln(t,a),re,se=t.display.view;if(!jt||j==t.doc.first+t.doc.size)return{index:K,lineN:j};for(var pe=t.display.viewFrom,ve=0;ve<K;ve++)pe+=se[ve].size;if(pe!=a){if(M>0){if(K==se.length-1)return null;re=pe+se[K].size-a,K++}else re=pe-a;a+=re,j+=re}for(;mi(t.doc,j)!=j;){if(K==(M<0?0:se.length-1))return null;j+=M*se[K-(M<0?1:0)].size,K+=M}return{index:K,lineN:j}}function ta(t,a,j){var M=t.display,K=M.view;K.length==0||a>=M.viewTo||j<=M.viewFrom?(M.view=Sn(t,a,j),M.viewFrom=a):(M.viewFrom>a?M.view=Sn(t,a,M.viewFrom).concat(M.view):M.viewFrom<a&&(M.view=M.view.slice(ln(t,a))),M.viewFrom=a,M.viewTo<j?M.view=M.view.concat(Sn(t,M.viewTo,j)):M.viewTo>j&&(M.view=M.view.slice(0,ln(t,j)))),M.viewTo=j}function ra(t){for(var a=t.display.view,j=0,M=0;M<a.length;M++){var K=a[M];!K.hidden&&(!K.node||K.changes)&&++j}return j}function Qr(t){t.display.input.showSelection(t.display.input.prepareSelection())}function Yi(t,a){a===void 0&&(a=!0);for(var j=t.doc,M={},K=M.cursors=document.createDocumentFragment(),re=M.selection=document.createDocumentFragment(),se=0;se<j.sel.ranges.length;se++){if(!a&&se==j.sel.primIndex)continue;var pe=j.sel.ranges[se];if(pe.from().line>=t.display.viewTo||pe.to().line<t.display.viewFrom)continue;var ve=pe.empty();(ve||t.options.showCursorWhenSelecting)&&na(t,pe.head,K),ve||$r(t,pe,re)}return M}function na(t,a,j){var M=Cr(t,a,"div",null,null,!t.options.singleCursorHeightPerLine),K=j.appendChild(T("div","\xA0","CodeMirror-cursor"));if(K.style.left=M.left+"px",K.style.top=M.top+"px",K.style.height=Math.max(0,M.bottom-M.top)*t.options.cursorHeight+"px",M.other){var re=j.appendChild(T("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));re.style.display="",re.style.left=M.other.left+"px",re.style.top=M.other.top+"px",re.style.height=(M.other.bottom-M.other.top)*.85+"px"}}function on(t,a){return t.top-a.top||t.left-a.left}function $r(t,a,j){var M=t.display,K=t.doc,re=document.createDocumentFragment(),se=Ge(t.display),pe=se.left,ve=Math.max(M.sizerWidth,Ne(t)-M.sizer.offsetLeft)-se.right,Te=K.direction=="ltr";function Ue(Rt,Wt,nr,Zt){Wt<0&&(Wt=0),Wt=Math.round(Wt),Zt=Math.round(Zt),re.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+Rt+`px;
|
|
|
top: `+Wt+"px; width: "+(nr==null?ve-Rt:nr)+`px;
|
|
|
height: `+(Zt-Wt)+"px"))}function We(Rt,Wt,nr){var Zt=dt(K,Rt),Tr=Zt.text.length,un,oi;function Cn(Hn,Di){return gn(t,ut(Rt,Hn),"div",Zt,Di)}function Ni(Hn,Di,ci){var ti=Vt(t,Zt,null,Hn),Wn=Di=="ltr"==(ci=="after")?"left":"right",Ln=ci=="after"?ti.begin:ti.end-(/\s/.test(Zt.text.charAt(ti.end-1))?2:1);return Cn(Ln,Wn)[Wn]}var Ii=qe(Zt,K.direction);return Xe(Ii,Wt||0,nr==null?Tr:nr,function(Hn,Di,ci,ti){var Wn=ci=="ltr",Ln=Cn(Hn,Wn?"left":"right"),Li=Cn(Di-1,Wn?"right":"left"),Za=Wt==null&&Hn==0,Ca=nr==null&&Di==Tr,_i=ti==0,la=!Ii||ti==Ii.length-1;if(Li.top-Ln.top<=3){var si=(Te?Za:Ca)&&_i,ps=(Te?Ca:Za)&&la,ga=si?pe:(Wn?Ln:Li).left,La=ps?ve:(Wn?Li:Ln).right;Ue(ga,Ln.top,La-ga,Ln.bottom)}else{var ka,Ci,qa,ms;Wn?(ka=Te&&Za&&_i?pe:Ln.left,Ci=Te?ve:Ni(Hn,ci,"before"),qa=Te?pe:Ni(Di,ci,"after"),ms=Te&&Ca&&la?ve:Li.right):(ka=Te?Ni(Hn,ci,"before"):pe,Ci=!Te&&Za&&_i?ve:Ln.right,qa=!Te&&Ca&&la?pe:Li.left,ms=Te?Ni(Di,ci,"after"):ve),Ue(ka,Ln.top,Ci-ka,Ln.bottom),Ln.bottom<Li.top&&Ue(pe,Ln.bottom,null,Li.top),Ue(qa,Li.top,ms-qa,Li.bottom)}(!un||on(Ln,un)<0)&&(un=Ln),on(Li,un)<0&&(un=Li),(!oi||on(Ln,oi)<0)&&(oi=Ln),on(Li,oi)<0&&(oi=Li)}),{start:un,end:oi}}var tt=a.from(),et=a.to();if(tt.line==et.line)We(tt.line,tt.ch,et.ch);else{var lt=dt(K,tt.line),ft=dt(K,et.line),bt=Xn(lt)==Xn(ft),At=We(tt.line,tt.ch,bt?lt.text.length+1:null).end,Nt=We(et.line,bt?0:null,et.ch).start;bt&&(At.top<Nt.top-2?(Ue(At.right,At.top,null,At.bottom),Ue(pe,Nt.top,Nt.left,Nt.bottom)):Ue(At.right,At.top,Nt.left-At.right,At.bottom)),At.bottom<Nt.top&&Ue(pe,At.bottom,null,Nt.top)}j.appendChild(re)}function Zn(t){if(!t.state.focused)return;var a=t.display;clearInterval(a.blinker);var j=!0;a.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?a.blinker=setInterval(function(){t.hasFocus()||va(t),a.cursorDiv.style.visibility=(j=!j)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(a.cursorDiv.style.visibility="hidden")}function So(t){t.state.focused||(t.display.input.focus(),ia(t))}function eo(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,va(t))},100)}function ia(t,a){if(t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),t.options.readOnly=="nocursor")return;t.state.focused||(ye(t,"focus",t,a),t.state.focused=!0,z(t.display.wrapper,"CodeMirror-focused"),!t.curOp&&t.display.selForContextMenu!=t.doc.sel&&(t.display.input.reset(),e&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Zn(t)}function va(t,a){if(t.state.delayingBlurEvent)return;t.state.focused&&(ye(t,"blur",t,a),t.state.focused=!1,y(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150)}function Ma(t){for(var a=t.display,j=a.lineDiv.offsetTop,M=0;M<a.view.length;M++){var K=a.view[M],re=t.options.lineWrapping,se=void 0,pe=0;if(K.hidden)continue;if(C&&_<8){var ve=K.node.offsetTop+K.node.offsetHeight;se=ve-j,j=ve}else{var Te=K.node.getBoundingClientRect();se=Te.bottom-Te.top,!re&&K.text.firstChild&&(pe=K.text.firstChild.getBoundingClientRect().right-Te.left-1)}var Ue=K.line.height-se;if((Ue>.005||Ue<-.005)&&(yt(K.line,se),to(K.line),K.rest))for(var We=0;We<K.rest.length;We++)to(K.rest[We]);if(pe>t.display.sizerWidth){var tt=Math.ceil(pe/Jn(t.display));tt>t.display.maxLineLength&&(t.display.maxLineLength=tt,t.display.maxLine=K.line,t.display.maxLineChanged=!0)}}}function to(t){if(t.widgets)for(var a=0;a<t.widgets.length;++a){var j=t.widgets[a],M=j.node.parentNode;M&&(j.height=M.offsetHeight)}}function Pa(t,a,j){var M=j&&j.top!=null?Math.max(0,j.top):t.scroller.scrollTop;M=Math.floor(M-Xi(t));var K=j&&j.bottom!=null?j.bottom:M+t.wrapper.clientHeight,re=Kt(a,M),se=Kt(a,K);if(j&&j.ensure){var pe=j.ensure.from.line,ve=j.ensure.to.line;pe<re?(re=pe,se=Kt(a,ni(dt(a,pe))+t.wrapper.clientHeight)):Math.min(ve,a.lastLine())>=se&&(re=Kt(a,ni(dt(a,ve))-t.wrapper.clientHeight),se=ve)}return{from:re,to:Math.max(se,re+1)}}function Xo(t,a){if(ue(t,"scrollCursorIntoView"))return;var j=t.display,M=j.sizer.getBoundingClientRect(),K=null;if(a.top+M.top<0?K=!0:a.bottom+M.top>(window.innerHeight||document.documentElement.clientHeight)&&(K=!1),K!=null&&!l){var re=T("div","\u200B",null,`position: absolute;
|
|
|
top: `+(a.top-j.viewOffset-Xi(t.display))+`px;
|
|
|
height: `+(a.bottom-a.top+Ve(t)+j.barHeight)+`px;
|
|
|
left: `+a.left+"px; width: "+Math.max(2,a.right-a.left)+"px;");t.display.lineSpace.appendChild(re),re.scrollIntoView(K),t.display.lineSpace.removeChild(re)}}function Yo(t,a,j,M){M==null&&(M=0);var K;!t.options.lineWrapping&&a==j&&(a=a.ch?ut(a.line,a.sticky=="before"?a.ch-1:a.ch,"after"):a,j=a.sticky=="before"?ut(a.line,a.ch+1,"before"):a);for(var re=0;re<5;re++){var se=!1,pe=Cr(t,a),ve=!j||j==a?pe:Cr(t,j);K={left:Math.min(pe.left,ve.left),top:Math.min(pe.top,ve.top)-M,right:Math.max(pe.left,ve.left),bottom:Math.max(pe.bottom,ve.bottom)+M};var Te=ro(t,K),Ue=t.doc.scrollTop,We=t.doc.scrollLeft;if(Te.scrollTop!=null&&(_a(t,Te.scrollTop),Math.abs(t.doc.scrollTop-Ue)>1&&(se=!0)),Te.scrollLeft!=null&&(Hi(t,Te.scrollLeft),Math.abs(t.doc.scrollLeft-We)>1&&(se=!0)),!se)break}return K}function Co(t,a){var j=ro(t,a);j.scrollTop!=null&&_a(t,j.scrollTop),j.scrollLeft!=null&&Hi(t,j.scrollLeft)}function ro(t,a){var j=t.display,M=Dn(t.display);a.top<0&&(a.top=0);var K=t.curOp&&t.curOp.scrollTop!=null?t.curOp.scrollTop:j.scroller.scrollTop,re=xe(t),se={};a.bottom-a.top>re&&(a.bottom=a.top+re);var pe=t.doc.height+ke(j),ve=a.top<M,Te=a.bottom>pe-M;if(a.top<K)se.scrollTop=ve?0:a.top;else if(a.bottom>K+re){var Ue=Math.min(a.top,(Te?pe:a.bottom)-re);Ue!=K&&(se.scrollTop=Ue)}var We=t.options.fixedGutter?0:j.gutters.offsetWidth,tt=t.curOp&&t.curOp.scrollLeft!=null?t.curOp.scrollLeft:j.scroller.scrollLeft-We,et=Ne(t)-j.gutters.offsetWidth,lt=a.right-a.left>et;return lt&&(a.right=a.left+et),a.left<10?se.scrollLeft=0:a.left<tt?se.scrollLeft=Math.max(0,a.left+We-(lt?0:10)):a.right>et+tt-3&&(se.scrollLeft=a.right+(lt?0:10)-et),se}function no(t,a){if(a==null)return;Na(t),t.curOp.scrollTop=(t.curOp.scrollTop==null?t.doc.scrollTop:t.curOp.scrollTop)+a}function ya(t){Na(t);var a=t.getCursor();t.curOp.scrollToPos={from:a,to:a,margin:t.options.cursorScrollMargin}}function ba(t,a,j){(a!=null||j!=null)&&Na(t),a!=null&&(t.curOp.scrollLeft=a),j!=null&&(t.curOp.scrollTop=j)}function $o(t,a){Na(t),t.curOp.scrollToPos=a}function Na(t){var a=t.curOp.scrollToPos;if(a){t.curOp.scrollToPos=null;var j=rr(t,a.from),M=rr(t,a.to);Oa(t,j,M,a.margin)}}function Oa(t,a,j,M){var K=ro(t,{left:Math.min(a.left,j.left),top:Math.min(a.top,j.top)-M,right:Math.max(a.right,j.right),bottom:Math.max(a.bottom,j.bottom)+M});ba(t,K.scrollLeft,K.scrollTop)}function _a(t,a){if(Math.abs(t.doc.scrollTop-a)<2)return;S||Ia(t,{top:a}),Ea(t,a,!0),S&&Ia(t),Ra(t,100)}function Ea(t,a,j){if(a=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,a)),t.display.scroller.scrollTop==a&&!j)return;t.doc.scrollTop=a,t.display.scrollbars.setScrollTop(a),t.display.scroller.scrollTop!=a&&(t.display.scroller.scrollTop=a)}function Hi(t,a,j,M){if(a=Math.max(0,Math.min(a,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(j?a==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-a)<2)&&!M)return;t.doc.scrollLeft=a,Ir(t),t.display.scroller.scrollLeft!=a&&(t.display.scroller.scrollLeft=a),t.display.scrollbars.setScrollLeft(a)}function ca(t){var a=t.display,j=a.gutters.offsetWidth,M=Math.round(t.doc.height+ke(t.display));return{clientHeight:a.scroller.clientHeight,viewHeight:a.wrapper.clientHeight,scrollWidth:a.scroller.scrollWidth,clientWidth:a.scroller.clientWidth,viewWidth:a.wrapper.clientWidth,barLeft:t.options.fixedGutter?j:0,docHeight:M,scrollHeight:M+Ve(t)+a.barHeight,nativeBarWidth:a.nativeBarWidth,gutterWidth:j}}var aa=function(t,a,j){this.cm=j;var M=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),K=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");M.tabIndex=K.tabIndex=-1,t(M),t(K),Ie(M,"scroll",function(){M.clientHeight&&a(M.scrollTop,"vertical")}),Ie(K,"scroll",function(){K.clientWidth&&a(K.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,C&&_<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};aa.prototype.update=function(t){var a=t.scrollWidth>t.clientWidth+1,j=t.scrollHeight>t.clientHeight+1,M=t.nativeBarWidth;if(j){this.vert.style.display="block",this.vert.style.bottom=a?M+"px":"0";var K=t.viewHeight-(a?M:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+K)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(a){this.horiz.style.display="block",this.horiz.style.right=j?M+"px":"0",this.horiz.style.left=t.barLeft+"px";var re=t.viewWidth-t.barLeft-(j?M:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+re)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(M==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:j?M:0,bottom:a?M:0}},aa.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},aa.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},aa.prototype.zeroWidthHack=function(){var t=o&&!n?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ee,this.disableVert=new ee},aa.prototype.enableZeroWidthBar=function(t,a,j){t.style.pointerEvents="auto";function M(){var K=t.getBoundingClientRect(),re=j=="vert"?document.elementFromPoint(K.right-1,(K.top+K.bottom)/2):document.elementFromPoint((K.right+K.left)/2,K.bottom-1);re!=t?t.style.pointerEvents="none":a.set(1e3,M)}a.set(1e3,M)},aa.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Aa=function(){};Aa.prototype.update=function(){return{bottom:0,right:0}},Aa.prototype.setScrollLeft=function(){},Aa.prototype.setScrollTop=function(){},Aa.prototype.clear=function(){};function da(t,a){a||(a=ca(t));var j=t.display.barWidth,M=t.display.barHeight;ja(t,a);for(var K=0;K<4&&j!=t.display.barWidth||M!=t.display.barHeight;K++)j!=t.display.barWidth&&t.options.lineWrapping&&Ma(t),ja(t,ca(t)),j=t.display.barWidth,M=t.display.barHeight}function ja(t,a){var j=t.display,M=j.scrollbars.update(a);j.sizer.style.paddingRight=(j.barWidth=M.right)+"px",j.sizer.style.paddingBottom=(j.barHeight=M.bottom)+"px",j.heightForcer.style.borderBottom=M.bottom+"px solid transparent",M.right&&M.bottom?(j.scrollbarFiller.style.display="block",j.scrollbarFiller.style.height=M.bottom+"px",j.scrollbarFiller.style.width=M.right+"px"):j.scrollbarFiller.style.display="",M.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(j.gutterFiller.style.display="block",j.gutterFiller.style.height=M.bottom+"px",j.gutterFiller.style.width=a.gutterWidth+"px"):j.gutterFiller.style.display=""}var io={native:aa,null:Aa};function Fa(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&y(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new io[t.options.scrollbarStyle](function(a){t.display.wrapper.insertBefore(a,t.display.scrollbarFiller),Ie(a,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),a.setAttribute("cm-not-content","true")},function(a,j){j=="horizontal"?Hi(t,a):_a(t,a)},t),t.display.scrollbars.addClass&&z(t.display.wrapper,t.display.scrollbars.addClass)}var ao=0;function oa(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ao},li(t.curOp)}function ha(t){var a=t.curOp;a&&Mr(a,function(j){for(var M=0;M<j.ops.length;M++)j.ops[M].cm.curOp=null;Oo(j)})}function Oo(t){for(var a=t.ops,j=0;j<a.length;j++)Jo(a[j]);for(var M=0;M<a.length;M++)Qo(a[M]);for(var K=0;K<a.length;K++)Zo(a[K]);for(var re=0;re<a.length;re++)oo(a[re]);for(var se=0;se<a.length;se++)qo(a[se])}function Jo(t){var a=t.cm,j=a.display;Ao(a),t.updateMaxLine&&Fi(a),t.mustUpdate=t.viewChanged||t.forceUpdate||t.scrollTop!=null||t.scrollToPos&&(t.scrollToPos.from.line<j.viewFrom||t.scrollToPos.to.line>=j.viewTo)||j.maxLineChanged&&a.options.lineWrapping,t.update=t.mustUpdate&&new Wi(a,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Qo(t){t.updatedDisplay=t.mustUpdate&&fa(t.cm,t.update)}function Zo(t){var a=t.cm,j=a.display;t.updatedDisplay&&Ma(a),t.barMeasure=ca(a),j.maxLineChanged&&!a.options.lineWrapping&&(t.adjustWidthTo=Be(a,j.maxLine,j.maxLine.text.length).left+3,a.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(j.scroller.clientWidth,j.sizer.offsetLeft+t.adjustWidthTo+Ve(a)+a.display.barWidth),t.maxScrollLeft=Math.max(0,j.sizer.offsetLeft+t.adjustWidthTo-Ne(a))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=j.input.prepareSelection())}function oo(t){var a=t.cm;t.adjustWidthTo!=null&&(a.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<a.doc.scrollLeft&&Hi(a,Math.min(a.display.scroller.scrollLeft,t.maxScrollLeft),!0),a.display.maxLineChanged=!1);var j=t.focus&&t.focus==X();t.preparedSelection&&a.display.input.showSelection(t.preparedSelection,j),(t.updatedDisplay||t.startHeight!=a.doc.height)&&da(a,t.barMeasure),t.updatedDisplay&&Xr(a,t.barMeasure),t.selectionChanged&&Zn(a),a.state.focused&&t.updateInput&&a.display.input.reset(t.typing),j&&So(t.cm)}function qo(t){var a=t.cm,j=a.display,M=a.doc;if(t.updatedDisplay&&Ua(a,t.update),j.wheelStartX!=null&&(t.scrollTop!=null||t.scrollLeft!=null||t.scrollToPos)&&(j.wheelStartX=j.wheelStartY=null),t.scrollTop!=null&&Ea(a,t.scrollTop,t.forceScroll),t.scrollLeft!=null&&Hi(a,t.scrollLeft,!0,!0),t.scrollToPos){var K=Yo(a,Pt(M,t.scrollToPos.from),Pt(M,t.scrollToPos.to),t.scrollToPos.margin);Xo(a,K)}var re=t.maybeHiddenMarkers,se=t.maybeUnhiddenMarkers;if(re)for(var pe=0;pe<re.length;++pe)re[pe].lines.length||ye(re[pe],"hide");if(se)for(var ve=0;ve<se.length;++ve)se[ve].lines.length&&ye(se[ve],"unhide");j.wrapper.offsetHeight&&(M.scrollTop=a.display.scroller.scrollTop),t.changeObjs&&ye(a,"changes",a,t.changeObjs),t.update&&t.update.finish()}function wi(t,a){if(t.curOp)return a();oa(t);try{return a()}finally{ha(t)}}function Pn(t,a){return function(){if(t.curOp)return a.apply(t,arguments);oa(t);try{return a.apply(t,arguments)}finally{ha(t)}}}function ui(t){return function(){if(this.curOp)return t.apply(this,arguments);oa(this);try{return t.apply(this,arguments)}finally{ha(this)}}}function Nn(t){return function(){var a=this.cm;if(!a||a.curOp)return t.apply(this,arguments);oa(a);try{return t.apply(this,arguments)}finally{ha(a)}}}function Ra(t,a){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(a,U(es,t))}function es(t){var a=t.doc;if(a.highlightFrontier>=t.display.viewTo)return;var j=+new Date+t.options.workTime,M=hn(t,a.highlightFrontier),K=[];a.iter(M.line,Math.min(a.first+a.size,t.display.viewTo+500),function(re){if(M.line>=t.display.viewFrom){var se=re.styles,pe=re.text.length>t.options.maxHighlightLength?Bt(a.mode,M.state):null,ve=Gn(t,re,M,!0);pe&&(M.state=pe),re.styles=ve.styles;var Te=re.styleClasses,Ue=ve.classes;Ue?re.styleClasses=Ue:Te&&(re.styleClasses=null);for(var We=!se||se.length!=re.styles.length||Te!=Ue&&(!Te||!Ue||Te.bgClass!=Ue.bgClass||Te.textClass!=Ue.textClass),tt=0;!We&&tt<se.length;++tt)We=se[tt]!=re.styles[tt];We&&K.push(M.line),re.stateAfter=M.save(),M.nextLine()}else re.text.length<=t.options.maxHighlightLength&&Ei(t,re.text,M),re.stateAfter=M.line%5==0?M.save():null,M.nextLine();if(+new Date>j)return Ra(t,t.options.workDelay),!0}),a.highlightFrontier=M.line,a.modeFrontier=Math.max(a.modeFrontier,M.line),K.length&&wi(t,function(){for(var re=0;re<K.length;re++)xn(t,K[re],"text")})}var Wi=function(t,a,j){var M=t.display;this.viewport=a,this.visible=Pa(M,t.doc,a),this.editorIsHidden=!M.wrapper.offsetWidth,this.wrapperHeight=M.wrapper.clientHeight,this.wrapperWidth=M.wrapper.clientWidth,this.oldDisplayWidth=Ne(t),this.force=j,this.dims=En(t),this.events=[]};Wi.prototype.signal=function(t,a){me(t,a)&&this.events.push(arguments)},Wi.prototype.finish=function(){for(var t=0;t<this.events.length;t++)ye.apply(null,this.events[t])};function Ao(t){var a=t.display;!a.scrollbarsClipped&&a.scroller.offsetWidth&&(a.nativeBarWidth=a.scroller.offsetWidth-a.scroller.clientWidth,a.heightForcer.style.height=Ve(t)+"px",a.sizer.style.marginBottom=-a.nativeBarWidth+"px",a.sizer.style.borderRightWidth=Ve(t)+"px",a.scrollbarsClipped=!0)}function Ro(t){if(t.hasFocus())return null;var a=X();if(!a||!A(t.display.lineDiv,a))return null;var j={activeElt:a};if(window.getSelection){var M=window.getSelection();M.anchorNode&&M.extend&&A(t.display.lineDiv,M.anchorNode)&&(j.anchorNode=M.anchorNode,j.anchorOffset=M.anchorOffset,j.focusNode=M.focusNode,j.focusOffset=M.focusOffset)}return j}function Io(t){if(!t||!t.activeElt||t.activeElt==X())return;if(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&A(document.body,t.anchorNode)&&A(document.body,t.focusNode)){var a=window.getSelection(),j=document.createRange();j.setEnd(t.anchorNode,t.anchorOffset),j.collapse(!1),a.removeAllRanges(),a.addRange(j),a.extend(t.focusNode,t.focusOffset)}}function fa(t,a){var j=t.display,M=t.doc;if(a.editorIsHidden)return yn(t),!1;if(!a.force&&a.visible.from>=j.viewFrom&&a.visible.to<=j.viewTo&&(j.updateLineNumbers==null||j.updateLineNumbers>=j.viewTo)&&j.renderedView==j.view&&ra(t)==0)return!1;qn(t)&&(yn(t),a.dims=En(t));var K=M.first+M.size,re=Math.max(a.visible.from-t.options.viewportMargin,M.first),se=Math.min(K,a.visible.to+t.options.viewportMargin);j.viewFrom<re&&re-j.viewFrom<20&&(re=Math.max(M.first,j.viewFrom)),j.viewTo>se&&j.viewTo-se<20&&(se=Math.min(K,j.viewTo)),jt&&(re=mi(t.doc,re),se=Yn(t.doc,se));var pe=re!=j.viewFrom||se!=j.viewTo||j.lastWrapHeight!=a.wrapperHeight||j.lastWrapWidth!=a.wrapperWidth;ta(t,re,se),j.viewOffset=ni(dt(t.doc,j.viewFrom)),t.display.mover.style.top=j.viewOffset+"px";var ve=ra(t);if(!pe&&ve==0&&!a.force&&j.renderedView==j.view&&(j.updateLineNumbers==null||j.updateLineNumbers>=j.viewTo))return!1;var Te=Ro(t);return ve>4&&(j.lineDiv.style.display="none"),Do(t,j.updateLineNumbers,a.dims),ve>4&&(j.lineDiv.style.display=""),j.renderedView=j.view,Io(Te),x(j.cursorDiv),x(j.selectionDiv),j.gutters.style.height=j.sizer.style.minHeight=0,pe&&(j.lastWrapHeight=a.wrapperHeight,j.lastWrapWidth=a.wrapperWidth,Ra(t,400)),j.updateLineNumbers=null,!0}function Ua(t,a){for(var j=a.viewport,M=!0;;M=!1){if(!M||!t.options.lineWrapping||a.oldDisplayWidth==Ne(t)){if(j&&j.top!=null&&(j={top:Math.min(t.doc.height+ke(t.display)-xe(t),j.top)}),a.visible=Pa(t.display,t.doc,j),a.visible.from>=t.display.viewFrom&&a.visible.to<=t.display.viewTo)break}else M&&(a.visible=Pa(t.display,t.doc,j));if(!fa(t,a))break;Ma(t);var K=ca(t);Qr(t),da(t,K),Xr(t,K),a.force=!1}a.signal(t,"update",t),(t.display.viewFrom!=t.display.reportedViewFrom||t.display.viewTo!=t.display.reportedViewTo)&&(a.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function Ia(t,a){var j=new Wi(t,a);if(fa(t,j)){Ma(t),Ua(t,j);var M=ca(t);Qr(t),da(t,M),Xr(t,M),j.finish()}}function Do(t,a,j){var M=t.display,K=t.options.lineNumbers,re=M.lineDiv,se=re.firstChild;function pe(lt){var ft=lt.nextSibling;return e&&o&&t.display.currentWheelTarget==lt?lt.style.display="none":lt.parentNode.removeChild(lt),ft}for(var ve=M.view,Te=M.viewFrom,Ue=0;Ue<ve.length;Ue++){var We=ve[Ue];if(!We.hidden)if(!We.node||We.node.parentNode!=re){var tt=mn(t,We,Te,j);re.insertBefore(tt,se)}else{for(;se!=We.node;)se=pe(se);var et=K&&a!=null&&a<=Te&&We.lineNumber;We.changes&&(oe(We.changes,"gutter")>-1&&(et=!1),zi(t,We,Te,j)),et&&(x(We.lineNumber),We.lineNumber.appendChild(document.createTextNode(qt(t.options,Te)))),se=We.node.nextSibling}Te+=We.size}for(;se;)se=pe(se)}function Ba(t){var a=t.gutters.offsetWidth;t.sizer.style.marginLeft=a+"px"}function Xr(t,a){t.display.sizer.style.minHeight=a.docHeight+"px",t.display.heightForcer.style.top=a.docHeight+"px",t.display.gutters.style.height=a.docHeight+t.display.barHeight+Ve(t)+"px"}function Ir(t){var a=t.display,j=a.view;if(!a.alignWidgets&&(!a.gutters.firstChild||!t.options.fixedGutter))return;for(var M=yi(a)-a.scroller.scrollLeft+t.doc.scrollLeft,K=a.gutters.offsetWidth,re=M+"px",se=0;se<j.length;se++)if(!j[se].hidden){t.options.fixedGutter&&(j[se].gutter&&(j[se].gutter.style.left=re),j[se].gutterBackground&&(j[se].gutterBackground.style.left=re));var pe=j[se].alignable;if(pe)for(var ve=0;ve<pe.length;ve++)pe[ve].style.left=re}t.options.fixedGutter&&(a.gutters.style.left=M+K+"px")}function qn(t){if(!t.options.lineNumbers)return!1;var a=t.doc,j=qt(t.options,a.first+a.size-1),M=t.display;if(j.length!=M.lineNumChars){var K=M.measure.appendChild(T("div",[T("div",j)],"CodeMirror-linenumber CodeMirror-gutter-elt")),re=K.firstChild.offsetWidth,se=K.offsetWidth-re;return M.lineGutter.style.width="",M.lineNumInnerWidth=Math.max(re,M.lineGutter.offsetWidth-se)+1,M.lineNumWidth=M.lineNumInnerWidth+se,M.lineNumChars=M.lineNumInnerWidth?j.length:-1,M.lineGutter.style.width=M.lineNumWidth+"px",Ba(t.display),!0}return!1}function Ti(t,a){for(var j=[],M=!1,K=0;K<t.length;K++){var re=t[K],se=null;if(typeof re!="string"&&(se=re.style,re=re.className),re=="CodeMirror-linenumbers")if(a)M=!0;else continue;j.push({className:re,style:se})}return a&&!M&&j.push({className:"CodeMirror-linenumbers",style:null}),j}function xa(t){var a=t.gutters,j=t.gutterSpecs;x(a),t.lineGutter=null;for(var M=0;M<j.length;++M){var K=j[M],re=K.className,se=K.style,pe=a.appendChild(T("div",null,"CodeMirror-gutter "+re));se&&(pe.style.cssText=se),re=="CodeMirror-linenumbers"&&(t.lineGutter=pe,pe.style.width=(t.lineNumWidth||1)+"px")}a.style.display=j.length?"":"none",Ba(t)}function Qi(t){xa(t.display),tn(t),Ir(t)}function Da(t,a,j,M){var K=this;this.input=j,K.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),K.scrollbarFiller.setAttribute("cm-not-content","true"),K.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),K.gutterFiller.setAttribute("cm-not-content","true"),K.lineDiv=F("div",null,"CodeMirror-code"),K.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),K.cursorDiv=T("div",null,"CodeMirror-cursors"),K.measure=T("div",null,"CodeMirror-measure"),K.lineMeasure=T("div",null,"CodeMirror-measure"),K.lineSpace=F("div",[K.measure,K.lineMeasure,K.selectionDiv,K.cursorDiv,K.lineDiv],null,"position: relative; outline: none");var re=F("div",[K.lineSpace],"CodeMirror-lines");K.mover=T("div",[re],null,"position: relative"),K.sizer=T("div",[K.mover],"CodeMirror-sizer"),K.sizerWidth=null,K.heightForcer=T("div",null,null,"position: absolute; height: "+ae+"px; width: 1px;"),K.gutters=T("div",null,"CodeMirror-gutters"),K.lineGutter=null,K.scroller=T("div",[K.sizer,K.heightForcer,K.gutters],"CodeMirror-scroll"),K.scroller.setAttribute("tabIndex","-1"),K.wrapper=T("div",[K.scrollbarFiller,K.gutterFiller,K.scroller],"CodeMirror"),C&&_<8&&(K.gutters.style.zIndex=-1,K.scroller.style.paddingRight=0),!e&&!(S&&u)&&(K.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(K.wrapper):t(K.wrapper)),K.viewFrom=K.viewTo=a.first,K.reportedViewFrom=K.reportedViewTo=a.first,K.view=[],K.renderedView=null,K.externalMeasured=null,K.viewOffset=0,K.lastWrapHeight=K.lastWrapWidth=0,K.updateLineNumbers=null,K.nativeBarWidth=K.barHeight=K.barWidth=0,K.scrollbarsClipped=!1,K.lineNumWidth=K.lineNumInnerWidth=K.lineNumChars=null,K.alignWidgets=!1,K.cachedCharWidth=K.cachedTextHeight=K.cachedPaddingH=null,K.maxLine=null,K.maxLineLength=0,K.maxLineChanged=!1,K.wheelDX=K.wheelDY=K.wheelStartX=K.wheelStartY=null,K.shift=!1,K.selForContextMenu=null,K.activeTouch=null,K.gutterSpecs=Ti(M.gutters,M.lineNumbers),xa(K),j.init(K)}var sa=0,ei=null;C?ei=-.53:S?ei=15:r?ei=-.7:i&&(ei=-1/3);function Ha(t){var a=t.wheelDeltaX,j=t.wheelDeltaY;return a==null&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(a=t.detail),j==null&&t.detail&&t.axis==t.VERTICAL_AXIS?j=t.detail:j==null&&(j=t.wheelDelta),{x:a,y:j}}function so(t){var a=Ha(t);return a.x*=ei,a.y*=ei,a}function lo(t,a){var j=Ha(a),M=j.x,K=j.y,re=t.display,se=re.scroller,pe=se.scrollWidth>se.clientWidth,ve=se.scrollHeight>se.clientHeight;if(!(M&&pe||K&&ve))return;if(K&&o&&e){e:for(var Te=a.target,Ue=re.view;Te!=se;Te=Te.parentNode)for(var We=0;We<Ue.length;We++)if(Ue[We].node==Te){t.display.currentWheelTarget=Te;break e}}if(M&&!S&&!c&&ei!=null){K&&ve&&_a(t,Math.max(0,se.scrollTop+K*ei)),Hi(t,Math.max(0,se.scrollLeft+M*ei)),(!K||K&&ve)&&ge(a),re.wheelStartX=null;return}if(K&&ei!=null){var tt=K*ei,et=t.doc.scrollTop,lt=et+re.wrapper.clientHeight;tt<0?et=Math.max(0,et+tt-50):lt=Math.min(t.doc.height,lt+tt+50),Ia(t,{top:et,bottom:lt})}sa<20&&(re.wheelStartX==null?(re.wheelStartX=se.scrollLeft,re.wheelStartY=se.scrollTop,re.wheelDX=M,re.wheelDY=K,setTimeout(function(){if(re.wheelStartX==null)return;var ft=se.scrollLeft-re.wheelStartX,bt=se.scrollTop-re.wheelStartY,At=bt&&re.wheelDY&&bt/re.wheelDY||ft&&re.wheelDX&&ft/re.wheelDX;if(re.wheelStartX=re.wheelStartY=null,!At)return;ei=(ei*sa+At)/(sa+1),++sa},200)):(re.wheelDX+=M,re.wheelDY+=K))}var Si=function(t,a){this.ranges=t,this.primIndex=a};Si.prototype.primary=function(){return this.ranges[this.primIndex]},Si.prototype.equals=function(t){if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var a=0;a<this.ranges.length;a++){var j=this.ranges[a],M=t.ranges[a];if(!Hr(j.anchor,M.anchor)||!Hr(j.head,M.head))return!1}return!0},Si.prototype.deepCopy=function(){for(var t=[],a=0;a<this.ranges.length;a++)t[a]=new Kr(Yr(this.ranges[a].anchor),Yr(this.ranges[a].head));return new Si(t,this.primIndex)},Si.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},Si.prototype.contains=function(t,a){a||(a=t);for(var j=0;j<this.ranges.length;j++){var M=this.ranges[j];if(kt(a,M.from())>=0&&kt(t,M.to())<=0)return j}return-1};var Kr=function(t,a){this.anchor=t,this.head=a};Kr.prototype.from=function(){return cn(this.anchor,this.head)},Kr.prototype.to=function(){return On(this.anchor,this.head)},Kr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Gi(t,a,j){var M=t&&t.options.selectionsMayTouch,K=a[j];a.sort(function(tt,et){return kt(tt.from(),et.from())}),j=oe(a,K);for(var re=1;re<a.length;re++){var se=a[re],pe=a[re-1],ve=kt(pe.to(),se.from());if(M&&!se.empty()?ve>0:ve>=0){var Te=cn(pe.from(),se.from()),Ue=On(pe.to(),se.to()),We=pe.empty()?se.from()==se.head:pe.from()==pe.head;re<=j&&--j,a.splice(--re,2,new Kr(We?Ue:Te,We?Te:Ue))}}return new Si(a,j)}function Zi(t,a){return new Si([new Kr(t,a||t)],0)}function qi(t){return t.text?ut(t.from.line+t.text.length-1,W(t.text).length+(t.text.length==1?t.from.ch:0)):t.to}function uo(t,a){if(kt(t,a.from)<0)return t;if(kt(t,a.to)<=0)return qi(a);var j=t.line+a.text.length-(a.to.line-a.from.line)-1,M=t.ch;return t.line==a.to.line&&(M+=qi(a).ch-a.to.ch),ut(j,M)}function Wa(t,a){for(var j=[],M=0;M<t.sel.ranges.length;M++){var K=t.sel.ranges[M];j.push(new Kr(uo(K.anchor,a),uo(K.head,a)))}return Gi(t.cm,j,t.sel.primIndex)}function Lo(t,a,j){return t.line==a.line?ut(j.line,t.ch-a.ch+j.ch):ut(j.line+(t.line-a.line),t.ch)}function ko(t,a,j){for(var M=[],K=ut(t.first,0),re=K,se=0;se<a.length;se++){var pe=a[se],ve=Lo(pe.from,K,re),Te=Lo(qi(pe),K,re);if(K=pe.to,re=Te,j=="around"){var Ue=t.sel.ranges[se],We=kt(Ue.head,Ue.anchor)<0;M[se]=new Kr(We?Te:ve,We?ve:Te)}else M[se]=new Kr(ve,ve)}return new Si(M,t.sel.primIndex)}function pa(t){t.doc.mode=St(t.options,t.doc.modeOption),co(t)}function co(t){t.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null)}),t.doc.modeFrontier=t.doc.highlightFrontier=t.doc.first,Ra(t,100),t.state.modeGen++,t.curOp&&tn(t)}function gs(t,a){return a.from.ch==0&&a.to.ch==0&&W(a.text)==""&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function ts(t,a,j,M){function K(Nt){return j?j[Nt]:null}function re(Nt,Rt,Wt){Ur(Nt,Rt,Wt,M),gr(Nt,"change",Nt,a)}function se(Nt,Rt){for(var Wt=[],nr=Nt;nr<Rt;++nr)Wt.push(new ii(Te[nr],K(nr),M));return Wt}var pe=a.from,ve=a.to,Te=a.text,Ue=dt(t,pe.line),We=dt(t,ve.line),tt=W(Te),et=K(Te.length-1),lt=ve.line-pe.line;if(a.full)t.insert(0,se(0,Te.length)),t.remove(Te.length,t.size-Te.length);else if(gs(t,a)){var ft=se(0,Te.length-1);re(We,We.text,et),lt&&t.remove(pe.line,lt),ft.length&&t.insert(pe.line,ft)}else if(Ue==We)if(Te.length==1)re(Ue,Ue.text.slice(0,pe.ch)+tt+Ue.text.slice(ve.ch),et);else{var bt=se(1,Te.length-1);bt.push(new ii(tt+Ue.text.slice(ve.ch),et,M)),re(Ue,Ue.text.slice(0,pe.ch)+Te[0],K(0)),t.insert(pe.line+1,bt)}else if(Te.length==1)re(Ue,Ue.text.slice(0,pe.ch)+Te[0]+We.text.slice(ve.ch),K(0)),t.remove(pe.line+1,lt);else{re(Ue,Ue.text.slice(0,pe.ch)+Te[0],K(0)),re(We,tt+We.text.slice(ve.ch),et);var At=se(1,Te.length-1);lt>1&&t.remove(pe.line+1,lt-1),t.insert(pe.line+1,At)}gr(t,"change",t,a)}function wa(t,a,j){function M(K,re,se){if(K.linked)for(var pe=0;pe<K.linked.length;++pe){var ve=K.linked[pe];if(ve.doc==re)continue;var Te=se&&ve.sharedHist;if(j&&!Te)continue;a(ve.doc,Te),M(ve.doc,K,Te)}}M(t,null,!0)}function vs(t,a){if(a.cm)throw new Error("This document is already in use.");t.doc=a,a.cm=t,xi(t),pa(t),ys(t),t.options.lineWrapping||Fi(t),t.options.mode=a.modeOption,tn(t)}function ys(t){(t.doc.direction=="rtl"?z:y)(t.display.lineDiv,"CodeMirror-rtl")}function pl(t){wi(t,function(){ys(t),tn(t)})}function Mo(t){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=t||1}function rs(t,a){var j={from:Yr(a.from),to:qi(a),text:Ht(t,a.from,a.to)};return Es(t,j,a.from.line,a.to.line+1),wa(t,function(M){return Es(M,j,a.from.line,a.to.line+1)},!0),j}function bs(t){for(;t.length;){var a=W(t);if(a.ranges)t.pop();else break}}function ml(t,a){if(a)return bs(t.done),W(t.done);if(t.done.length&&!W(t.done).ranges)return W(t.done);if(t.done.length>1&&!t.done[t.done.length-2].ranges)return t.done.pop(),W(t.done)}function _s(t,a,j,M){var K=t.history;K.undone.length=0;var re=+new Date,se,pe;if((K.lastOp==M||K.lastOrigin==a.origin&&a.origin&&(a.origin.charAt(0)=="+"&&K.lastModTime>re-(t.cm?t.cm.options.historyEventDelay:500)||a.origin.charAt(0)=="*"))&&(se=ml(K,K.lastOp==M)))pe=W(se.changes),kt(a.from,a.to)==0&&kt(a.from,pe.to)==0?pe.to=qi(a):se.changes.push(rs(t,a));else{var ve=W(K.done);for((!ve||!ve.ranges)&&Po(t.sel,K.done),se={changes:[rs(t,a)],generation:K.generation},K.done.push(se);K.done.length>K.undoDepth;)K.done.shift(),K.done[0].ranges||K.done.shift()}K.done.push(j),K.generation=++K.maxGeneration,K.lastModTime=K.lastSelTime=re,K.lastOp=K.lastSelOp=M,K.lastOrigin=K.lastSelOrigin=a.origin,pe||ye(t,"historyAdded")}function gl(t,a,j,M){var K=a.charAt(0);return K=="*"||K=="+"&&j.ranges.length==M.ranges.length&&j.somethingSelected()==M.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function vl(t,a,j,M){var K=t.history,re=M&&M.origin;j==K.lastSelOp||re&&K.lastSelOrigin==re&&(K.lastModTime==K.lastSelTime&&K.lastOrigin==re||gl(t,re,W(K.done),a))?K.done[K.done.length-1]=a:Po(a,K.done),K.lastSelTime=+new Date,K.lastSelOrigin=re,K.lastSelOp=j,M&&M.clearRedo!==!1&&bs(K.undone)}function Po(t,a){var j=W(a);j&&j.ranges&&j.equals(t)||a.push(t)}function Es(t,a,j,M){var K=a["spans_"+t.id],re=0;t.iter(Math.max(t.first,j),Math.min(t.first+t.size,M),function(se){se.markedSpans&&((K||(K=a["spans_"+t.id]={}))[re]=se.markedSpans),++re})}function yl(t){if(!t)return null;for(var a,j=0;j<t.length;++j)t[j].marker.explicitlyCleared?a||(a=t.slice(0,j)):a&&a.push(t[j]);return a?a.length?a:null:t}function bl(t,a){var j=a["spans_"+t.id];if(!j)return null;for(var M=[],K=0;K<a.text.length;++K)M.push(yl(j[K]));return M}function xs(t,a){var j=bl(t,a),M=Oi(t,a);if(!j)return M;if(!M)return j;for(var K=0;K<j.length;++K){var re=j[K],se=M[K];if(re&&se){e:for(var pe=0;pe<se.length;++pe){for(var ve=se[pe],Te=0;Te<re.length;++Te)if(re[Te].marker==ve.marker)continue e;re.push(ve)}}else se&&(j[K]=se)}return j}function Ga(t,a,j){for(var M=[],K=0;K<t.length;++K){var re=t[K];if(re.ranges){M.push(j?Si.prototype.deepCopy.call(re):re);continue}var se=re.changes,pe=[];M.push({changes:pe});for(var ve=0;ve<se.length;++ve){var Te=se[ve],Ue=void 0;if(pe.push({from:Te.from,to:Te.to,text:Te.text}),a)for(var We in Te)(Ue=We.match(/^spans_(\d+)$/))&&(oe(a,Number(Ue[1]))>-1&&(W(pe)[We]=Te[We],delete Te[We]))}}return M}function ns(t,a,j,M){if(M){var K=t.anchor;if(j){var re=kt(a,K)<0;re!=kt(j,K)<0?(K=a,a=j):re!=kt(a,j)<0&&(a=j)}return new Kr(K,a)}else return new Kr(j||a,a)}function No(t,a,j,M,K){K==null&&(K=t.cm&&(t.cm.display.shift||t.extend)),bi(t,new Si([ns(t.sel.primary(),a,j,K)],0),M)}function ws(t,a,j){for(var M=[],K=t.cm&&(t.cm.display.shift||t.extend),re=0;re<t.sel.ranges.length;re++)M[re]=ns(t.sel.ranges[re],a[re],null,K);var se=Gi(t.cm,M,t.sel.primIndex);bi(t,se,j)}function is(t,a,j,M){var K=t.sel.ranges.slice(0);K[a]=j,bi(t,Gi(t.cm,K,t.sel.primIndex),M)}function Ts(t,a,j,M){bi(t,Zi(a,j),M)}function _l(t,a,j){var M={ranges:a.ranges,update:function(K){this.ranges=[];for(var re=0;re<K.length;re++)this.ranges[re]=new Kr(Pt(t,K[re].anchor),Pt(t,K[re].head))},origin:j&&j.origin};return ye(t,"beforeSelectionChange",t,M),t.cm&&ye(t.cm,"beforeSelectionChange",t.cm,M),M.ranges!=a.ranges?Gi(t.cm,M.ranges,M.ranges.length-1):a}function Ss(t,a,j){var M=t.history.done,K=W(M);K&&K.ranges?(M[M.length-1]=a,jo(t,a,j)):bi(t,a,j)}function bi(t,a,j){jo(t,a,j),vl(t,t.sel,t.cm?t.cm.curOp.id:NaN,j)}function jo(t,a,j){(me(t,"beforeSelectionChange")||t.cm&&me(t.cm,"beforeSelectionChange"))&&(a=_l(t,a,j));var M=j&&j.bias||(kt(a.primary().head,t.sel.primary().head)<0?-1:1);Cs(t,As(t,a,M,!0)),!(j&&j.scroll===!1)&&t.cm&&ya(t.cm)}function Cs(t,a){if(a.equals(t.sel))return;t.sel=a,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,he(t.cm)),gr(t,"cursorActivity",t)}function Os(t){Cs(t,As(t,t.sel,null,!1))}function As(t,a,j,M){for(var K,re=0;re<a.ranges.length;re++){var se=a.ranges[re],pe=a.ranges.length==t.sel.ranges.length&&t.sel.ranges[re],ve=Fo(t,se.anchor,pe&&pe.anchor,j,M),Te=Fo(t,se.head,pe&&pe.head,j,M);(K||ve!=se.anchor||Te!=se.head)&&(K||(K=a.ranges.slice(0,re)),K[re]=new Kr(ve,Te))}return K?Gi(t.cm,K,a.primIndex):a}function Ka(t,a,j,M,K){var re=dt(t,a.line);if(re.markedSpans)for(var se=0;se<re.markedSpans.length;++se){var pe=re.markedSpans[se],ve=pe.marker,Te="selectLeft"in ve?!ve.selectLeft:ve.inclusiveLeft,Ue="selectRight"in ve?!ve.selectRight:ve.inclusiveRight;if((pe.from==null||(Te?pe.from<=a.ch:pe.from<a.ch))&&(pe.to==null||(Ue?pe.to>=a.ch:pe.to>a.ch))){if(K&&(ye(ve,"beforeCursorEnter"),ve.explicitlyCleared))if(re.markedSpans){--se;continue}else break;if(!ve.atomic)continue;if(j){var We=ve.find(M<0?1:-1),tt=void 0;if((M<0?Ue:Te)&&(We=Rs(t,We,-M,We&&We.line==a.line?re:null)),We&&We.line==a.line&&(tt=kt(We,j))&&(M<0?tt<0:tt>0))return Ka(t,We,a,M,K)}var et=ve.find(M<0?-1:1);return(M<0?Te:Ue)&&(et=Rs(t,et,M,et.line==a.line?re:null)),et?Ka(t,et,a,M,K):null}}return a}function Fo(t,a,j,M,K){var re=M||1,se=Ka(t,a,j,re,K)||!K&&Ka(t,a,j,re,!0)||Ka(t,a,j,-re,K)||!K&&Ka(t,a,j,-re,!0);return se||(t.cantEdit=!0,ut(t.first,0))}function Rs(t,a,j,M){return j<0&&a.ch==0?a.line>t.first?Pt(t,ut(a.line-1)):null:j>0&&a.ch==(M||dt(t,a.line)).text.length?a.line<t.first+t.size-1?ut(a.line+1,0):null:new ut(a.line,a.ch+j)}function Is(t){t.setSelection(ut(t.firstLine(),0),ut(t.lastLine()),_e)}function Ds(t,a,j){var M={canceled:!1,from:a.from,to:a.to,text:a.text,origin:a.origin,cancel:function(){return M.canceled=!0}};return j&&(M.update=function(K,re,se,pe){K&&(M.from=Pt(t,K)),re&&(M.to=Pt(t,re)),se&&(M.text=se),pe!==void 0&&(M.origin=pe)}),ye(t,"beforeChange",t,M),t.cm&&ye(t.cm,"beforeChange",t.cm,M),M.canceled?(t.cm&&(t.cm.curOp.updateInput=2),null):{from:M.from,to:M.to,text:M.text,origin:M.origin}}function za(t,a,j){if(t.cm){if(!t.cm.curOp)return Pn(t.cm,za)(t,a,j);if(t.cm.state.suppressEdits)return}if((me(t,"beforeChange")||t.cm&&me(t.cm,"beforeChange"))&&(a=Ds(t,a,!0),!a))return;var M=_n&&!j&&Ki(t,a.from,a.to);if(M)for(var K=M.length-1;K>=0;--K)Ls(t,{from:M[K].from,to:M[K].to,text:K?[""]:a.text,origin:a.origin});else Ls(t,a)}function Ls(t,a){if(a.text.length==1&&a.text[0]==""&&kt(a.from,a.to)==0)return;var j=Wa(t,a);_s(t,a,j,t.cm?t.cm.curOp.id:NaN),ho(t,a,j,Oi(t,a));var M=[];wa(t,function(K,re){!re&&oe(M,K.history)==-1&&(Ns(K.history,a),M.push(K.history)),ho(K,a,null,Oi(K,a))})}function Uo(t,a,j){var M=t.cm&&t.cm.state.suppressEdits;if(M&&!j)return;for(var K=t.history,re,se=t.sel,pe=a=="undo"?K.done:K.undone,ve=a=="undo"?K.undone:K.done,Te=0;Te<pe.length&&!(re=pe[Te],j?re.ranges&&!re.equals(t.sel):!re.ranges);Te++);if(Te==pe.length)return;for(K.lastOrigin=K.lastSelOrigin=null;;)if(re=pe.pop(),re.ranges){if(Po(re,ve),j&&!re.equals(t.sel)){bi(t,re,{clearRedo:!1});return}se=re}else if(M){pe.push(re);return}else break;var Ue=[];Po(se,ve),ve.push({changes:Ue,generation:K.generation}),K.generation=re.generation||++K.maxGeneration;for(var We=me(t,"beforeChange")||t.cm&&me(t.cm,"beforeChange"),tt=function(ft){var bt=re.changes[ft];if(bt.origin=a,We&&!Ds(t,bt,!1))return pe.length=0,{};Ue.push(rs(t,bt));var At=ft?Wa(t,bt):W(pe);ho(t,bt,At,xs(t,bt)),!ft&&t.cm&&t.cm.scrollIntoView({from:bt.from,to:qi(bt)});var Nt=[];wa(t,function(Rt,Wt){!Wt&&oe(Nt,Rt.history)==-1&&(Ns(Rt.history,bt),Nt.push(Rt.history)),ho(Rt,bt,null,xs(Rt,bt))})},et=re.changes.length-1;et>=0;--et){var lt=tt(et);if(lt)return lt.v}}function ks(t,a){if(a==0)return;if(t.first+=a,t.sel=new Si(Y(t.sel.ranges,function(K){return new Kr(ut(K.anchor.line+a,K.anchor.ch),ut(K.head.line+a,K.head.ch))}),t.sel.primIndex),t.cm){tn(t.cm,t.first,t.first-a,a);for(var j=t.cm.display,M=j.viewFrom;M<j.viewTo;M++)xn(t.cm,M,"gutter")}}function ho(t,a,j,M){if(t.cm&&!t.cm.curOp)return Pn(t.cm,ho)(t,a,j,M);if(a.to.line<t.first){ks(t,a.text.length-1-(a.to.line-a.from.line));return}if(a.from.line>t.lastLine())return;if(a.from.line<t.first){var K=a.text.length-1-(t.first-a.from.line);ks(t,K),a={from:ut(t.first,0),to:ut(a.to.line+K,a.to.ch),text:[W(a.text)],origin:a.origin}}var re=t.lastLine();a.to.line>re&&(a={from:a.from,to:ut(re,dt(t,re).text.length),text:[a.text[0]],origin:a.origin}),a.removed=Ht(t,a.from,a.to),j||(j=Wa(t,a)),t.cm?El(t.cm,a,M):ts(t,a,M),jo(t,j,_e),t.cantEdit&&Fo(t,ut(t.firstLine(),0))&&(t.cantEdit=!1)}function El(t,a,j){var M=t.doc,K=t.display,re=a.from,se=a.to,pe=!1,ve=re.line;t.options.lineWrapping||(ve=xt(Xn(dt(M,re.line))),M.iter(ve,se.line+1,function(et){if(et==K.maxLine)return pe=!0,!0})),M.sel.contains(a.from,a.to)>-1&&he(t),ts(M,a,j,Ui(t)),t.options.lineWrapping||(M.iter(ve,re.line+a.text.length,function(et){var lt=gi(et);lt>K.maxLineLength&&(K.maxLine=et,K.maxLineLength=lt,K.maxLineChanged=!0,pe=!1)}),pe&&(t.curOp.updateMaxLine=!0)),nn(M,re.line),Ra(t,400);var Te=a.text.length-(se.line-re.line)-1;a.full?tn(t):re.line==se.line&&a.text.length==1&&!gs(t.doc,a)?xn(t,re.line,"text"):tn(t,re.line,se.line+1,Te);var Ue=me(t,"changes"),We=me(t,"change");if(We||Ue){var tt={from:re,to:se,text:a.text,removed:a.removed,origin:a.origin};We&&gr(t,"change",t,tt),Ue&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(tt)}t.display.selForContextMenu=null}function Va(t,a,j,M,K){var re;M||(M=j),kt(M,j)<0&&(re=[M,j],j=re[0],M=re[1]),typeof a=="string"&&(a=t.splitLines(a)),za(t,{from:j,to:M,text:a,origin:K})}function Ms(t,a,j,M){j<t.line?t.line+=M:a<t.line&&(t.line=a,t.ch=0)}function Ps(t,a,j,M){for(var K=0;K<t.length;++K){var re=t[K],se=!0;if(re.ranges){re.copied||(re=t[K]=re.deepCopy(),re.copied=!0);for(var pe=0;pe<re.ranges.length;pe++)Ms(re.ranges[pe].anchor,a,j,M),Ms(re.ranges[pe].head,a,j,M);continue}for(var ve=0;ve<re.changes.length;++ve){var Te=re.changes[ve];if(j<Te.from.line)Te.from=ut(Te.from.line+M,Te.from.ch),Te.to=ut(Te.to.line+M,Te.to.ch);else if(a<=Te.to.line){se=!1;break}}se||(t.splice(0,K+1),K=0)}}function Ns(t,a){var j=a.from.line,M=a.to.line,K=a.text.length-(M-j)-1;Ps(t.done,j,M,K),Ps(t.undone,j,M,K)}function fo(t,a,j,M){var K=a,re=a;return typeof a=="number"?re=dt(t,zr(t,a)):K=xt(a),K==null?null:(M(re,K)&&t.cm&&xn(t.cm,K,j),re)}function po(t){this.lines=t,this.parent=null;for(var a=0,j=0;j<t.length;++j)t[j].parent=this,a+=t[j].height;this.height=a}po.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,a){for(var j=t,M=t+a;j<M;++j){var K=this.lines[j];this.height-=K.height,Ut(K),gr(K,"delete")}this.lines.splice(t,a)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,a,j){this.height+=j,this.lines=this.lines.slice(0,t).concat(a).concat(this.lines.slice(t));for(var M=0;M<a.length;++M)a[M].parent=this},iterN:function(t,a,j){for(var M=t+a;t<M;++t)if(j(this.lines[t]))return!0}};function mo(t){this.children=t;for(var a=0,j=0,M=0;M<t.length;++M){var K=t[M];a+=K.chunkSize(),j+=K.height,K.parent=this}this.size=a,this.height=j,this.parent=null}mo.prototype={chunkSize:function(){return this.size},removeInner:function(t,a){this.size-=a;for(var j=0;j<this.children.length;++j){var M=this.children[j],K=M.chunkSize();if(t<K){var re=Math.min(a,K-t),se=M.height;if(M.removeInner(t,re),this.height-=se-M.height,K==re&&(this.children.splice(j--,1),M.parent=null),(a-=re)==0)break;t=0}else t-=K}if(this.size-a<25&&(this.children.length>1||!(this.children[0]instanceof po))){var pe=[];this.collapse(pe),this.children=[new po(pe)],this.children[0].parent=this}},collapse:function(t){for(var a=0;a<this.children.length;++a)this.children[a].collapse(t)},insertInner:function(t,a,j){this.size+=a.length,this.height+=j;for(var M=0;M<this.children.length;++M){var K=this.children[M],re=K.chunkSize();if(t<=re){if(K.insertInner(t,a,j),K.lines&&K.lines.length>50){for(var se=K.lines.length%25+25,pe=se;pe<K.lines.length;){var ve=new po(K.lines.slice(pe,pe+=25));K.height-=ve.height,this.children.splice(++M,0,ve),ve.parent=this}K.lines=K.lines.slice(0,se),this.maybeSpill()}break}t-=re}},maybeSpill:function(){if(this.children.length<=10)return;var t=this;do{var a=t.children.splice(t.children.length-5,5),j=new mo(a);if(t.parent){t.size-=j.size,t.height-=j.height;var K=oe(t.parent.children,t);t.parent.children.splice(K+1,0,j)}else{var M=new mo(t.children);M.parent=t,t.children=[M,j],t=M}j.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()},iterN:function(t,a,j){for(var M=0;M<this.children.length;++M){var K=this.children[M],re=K.chunkSize();if(t<re){var se=Math.min(a,re-t);if(K.iterN(t,se,j))return!0;if((a-=se)==0)break;t=0}else t-=re}}};var go=function(t,a,j){if(j)for(var M in j)j.hasOwnProperty(M)&&(this[M]=j[M]);this.doc=t,this.node=a};go.prototype.clear=function(){var t=this.doc.cm,a=this.line.widgets,j=this.line,M=xt(j);if(M==null||!a)return;for(var K=0;K<a.length;++K)a[K]==this&&a.splice(K--,1);a.length||(j.widgets=null);var re=Mn(this);yt(j,Math.max(0,j.height-re)),t&&(wi(t,function(){js(t,j,-re),xn(t,M,"widget")}),gr(t,"lineWidgetCleared",t,this,M))},go.prototype.changed=function(){var t=this,a=this.height,j=this.doc.cm,M=this.line;this.height=null;var K=Mn(this)-a;if(!K)return;$n(this.doc,M)||yt(M,M.height+K),j&&wi(j,function(){j.curOp.forceUpdate=!0,js(j,M,K),gr(j,"lineWidgetChanged",j,t,xt(M))})},Ce(go);function js(t,a,j){ni(a)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&no(t,j)}function xl(t,a,j,M){var K=new go(t,j,M),re=t.cm;return re&&K.noHScroll&&(re.display.alignWidgets=!0),fo(t,a,"widget",function(se){var pe=se.widgets||(se.widgets=[]);if(K.insertAt==null?pe.push(K):pe.splice(Math.min(pe.length-1,Math.max(0,K.insertAt)),0,K),K.line=se,re&&!$n(t,se)){var ve=ni(se)<t.scrollTop;yt(se,se.height+Mn(K)),ve&&no(re,K.height),re.curOp.forceUpdate=!0}return!0}),re&&gr(re,"lineWidgetAdded",re,K,typeof a=="number"?a:xt(a)),K}var Fs=0,Ta=function(t,a){this.lines=[],this.type=a,this.doc=t,this.id=++Fs};Ta.prototype.clear=function(){if(this.explicitlyCleared)return;var t=this.doc.cm,a=t&&!t.curOp;if(a&&oa(t),me(this,"clear")){var j=this.find();j&&gr(this,"clear",j.from,j.to)}for(var M=null,K=null,re=0;re<this.lines.length;++re){var se=this.lines[re],pe=br(se.markedSpans,this);t&&!this.collapsed?xn(t,xt(se),"text"):t&&(pe.to!=null&&(K=xt(se)),pe.from!=null&&(M=xt(se))),se.markedSpans=hi(se.markedSpans,pe),pe.from==null&&this.collapsed&&!$n(this.doc,se)&&t&&yt(se,Dn(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var ve=0;ve<this.lines.length;++ve){var Te=Xn(this.lines[ve]),Ue=gi(Te);Ue>t.display.maxLineLength&&(t.display.maxLine=Te,t.display.maxLineLength=Ue,t.display.maxLineChanged=!0)}M!=null&&t&&this.collapsed&&tn(t,M,K+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Os(t.doc)),t&&gr(t,"markerCleared",t,this,M,K),a&&ha(t),this.parent&&this.parent.clear()},Ta.prototype.find=function(t,a){t==null&&this.type=="bookmark"&&(t=1);for(var j,M,K=0;K<this.lines.length;++K){var re=this.lines[K],se=br(re.markedSpans,this);if(se.from!=null&&(j=ut(a?re:xt(re),se.from),t==-1))return j;if(se.to!=null&&(M=ut(a?re:xt(re),se.to),t==1))return M}return j&&{from:j,to:M}},Ta.prototype.changed=function(){var t=this,a=this.find(-1,!0),j=this,M=this.doc.cm;if(!a||!M)return;wi(M,function(){var K=a.line,re=xt(a.line),se=ze(M,re);if(se&&(sr(se),M.curOp.selectionChanged=M.curOp.forceUpdate=!0),M.curOp.updateMaxLine=!0,!$n(j.doc,K)&&j.height!=null){var pe=j.height;j.height=null;var ve=Mn(j)-pe;ve&&yt(K,K.height+ve)}gr(M,"markerChanged",M,t)})},Ta.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var a=this.doc.cm.curOp;(!a.maybeHiddenMarkers||oe(a.maybeHiddenMarkers,this)==-1)&&(a.maybeUnhiddenMarkers||(a.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},Ta.prototype.detachLine=function(t){if(this.lines.splice(oe(this.lines,t),1),!this.lines.length&&this.doc.cm){var a=this.doc.cm.curOp;(a.maybeHiddenMarkers||(a.maybeHiddenMarkers=[])).push(this)}},Ce(Ta);function Xa(t,a,j,M,K){if(M&&M.shared)return wl(t,a,j,M,K);if(t.cm&&!t.cm.curOp)return Pn(t.cm,Xa)(t,a,j,M,K);var re=new Ta(t,K),se=kt(a,j);if(M&&L(M,re,!1),se>0||se==0&&re.clearWhenEmpty!==!1)return re;if(re.replacedWith&&(re.collapsed=!0,re.widgetNode=F("span",[re.replacedWith],"CodeMirror-widget"),M.handleMouseEvents||re.widgetNode.setAttribute("cm-ignore-events","true"),M.insertLeft&&(re.widgetNode.insertLeft=!0)),re.collapsed){if(Mi(t,a.line,a,j,re)||a.line!=j.line&&Mi(t,j.line,a,j,re))throw new Error("Inserting collapsed marker partially overlapping an existing one");ur()}re.addToHistory&&_s(t,{from:a,to:j,origin:"markText"},t.sel,NaN);var pe=a.line,ve=t.cm,Te;if(t.iter(pe,j.line+1,function(We){ve&&re.collapsed&&!ve.options.lineWrapping&&Xn(We)==ve.display.maxLine&&(Te=!0),re.collapsed&&pe!=a.line&&yt(We,0),Fn(We,new Rr(re,pe==a.line?a.ch:null,pe==j.line?j.ch:null)),++pe}),re.collapsed&&t.iter(a.line,j.line+1,function(We){$n(t,We)&&yt(We,0)}),re.clearOnEnter&&Ie(re,"beforeCursorEnter",function(){return re.clear()}),re.readOnly&&(lr(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),re.collapsed&&(re.id=++Fs,re.atomic=!0),ve){if(Te&&(ve.curOp.updateMaxLine=!0),re.collapsed)tn(ve,a.line,j.line+1);else if(re.className||re.startStyle||re.endStyle||re.css||re.attributes||re.title)for(var Ue=a.line;Ue<=j.line;Ue++)xn(ve,Ue,"text");re.atomic&&Os(ve.doc),gr(ve,"markerAdded",ve,re)}return re}var vo=function(t,a){this.markers=t,this.primary=a;for(var j=0;j<t.length;++j)t[j].parent=this};vo.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();gr(this,"clear")},vo.prototype.find=function(t,a){return this.primary.find(t,a)},Ce(vo);function wl(t,a,j,M,K){M=L(M),M.shared=!1;var re=[Xa(t,a,j,M,K)],se=re[0],pe=M.widgetNode;return wa(t,function(ve){pe&&(M.widgetNode=pe.cloneNode(!0)),re.push(Xa(ve,Pt(ve,a),Pt(ve,j),M,K));for(var Te=0;Te<ve.linked.length;++Te)if(ve.linked[Te].isParent)return;se=W(re)}),new vo(re,se)}function Us(t){return t.findMarks(ut(t.first,0),t.clipPos(ut(t.lastLine())),function(a){return a.parent})}function Tl(t,a){for(var j=0;j<a.length;j++){var M=a[j],K=M.find(),re=t.clipPos(K.from),se=t.clipPos(K.to);if(kt(re,se)){var pe=Xa(t,re,se,M.primary,M.primary.type);M.markers.push(pe),pe.parent=M}}}function Sl(t){for(var a=function(M){var K=t[M],re=[K.primary.doc];wa(K.primary.doc,function(ve){return re.push(ve)});for(var se=0;se<K.markers.length;se++){var pe=K.markers[se];oe(re,pe.doc)==-1&&(pe.parent=null,K.markers.splice(se--,1))}},j=0;j<t.length;j++)a(j)}var Cl=0,Ri=function(t,a,j,M,K){if(!(this instanceof Ri))return new Ri(t,a,j,M,K);j==null&&(j=0),mo.call(this,[new po([new ii("",null)])]),this.first=j,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=j;var re=ut(j,0);this.sel=Zi(re),this.history=new Mo(null),this.id=++Cl,this.modeOption=a,this.lineSep=M,this.direction=K=="rtl"?"rtl":"ltr",this.extend=!1,typeof t=="string"&&(t=this.splitLines(t)),ts(this,{from:re,to:re,text:t}),bi(this,Zi(re),_e)};Ri.prototype=q(mo.prototype,{constructor:Ri,iter:function(t,a,j){j?this.iterN(t-this.first,a-t,j):this.iterN(this.first,this.first+this.size,t)},insert:function(t,a){for(var j=0,M=0;M<a.length;++M)j+=a[M].height;this.insertInner(t-this.first,a,j)},remove:function(t,a){this.removeInner(t-this.first,a)},getValue:function(t){var a=Gt(this,this.first,this.first+this.size);return t===!1?a:a.join(t||this.lineSeparator())},setValue:Nn(function(t){var a=ut(this.first,0),j=this.first+this.size-1;za(this,{from:a,to:ut(j,dt(this,j).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&ba(this.cm,0,0),bi(this,Zi(a),_e)}),replaceRange:function(t,a,j,M){a=Pt(this,a),j=j?Pt(this,j):a,Va(this,t,a,j,M)},getRange:function(t,a,j){var M=Ht(this,Pt(this,t),Pt(this,a));return j===!1?M:M.join(j||this.lineSeparator())},getLine:function(t){var a=this.getLineHandle(t);return a&&a.text},getLineHandle:function(t){if(Ar(this,t))return dt(this,t)},getLineNumber:function(t){return xt(t)},getLineHandleVisualStart:function(t){return typeof t=="number"&&(t=dt(this,t)),Xn(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return Pt(this,t)},getCursor:function(t){var a=this.sel.primary(),j;return t==null||t=="head"?j=a.head:t=="anchor"?j=a.anchor:t=="end"||t=="to"||t===!1?j=a.to():j=a.from(),j},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Nn(function(t,a,j){Ts(this,Pt(this,typeof t=="number"?ut(t,a||0):t),null,j)}),setSelection:Nn(function(t,a,j){Ts(this,Pt(this,t),Pt(this,a||t),j)}),extendSelection:Nn(function(t,a,j){No(this,Pt(this,t),a&&Pt(this,a),j)}),extendSelections:Nn(function(t,a){ws(this,ct(this,t),a)}),extendSelectionsBy:Nn(function(t,a){var j=Y(this.sel.ranges,t);ws(this,ct(this,j),a)}),setSelections:Nn(function(t,a,j){if(!t.length)return;for(var M=[],K=0;K<t.length;K++)M[K]=new Kr(Pt(this,t[K].anchor),Pt(this,t[K].head));a==null&&(a=Math.min(t.length-1,this.sel.primIndex)),bi(this,Gi(this.cm,M,a),j)}),addSelection:Nn(function(t,a,j){var M=this.sel.ranges.slice(0);M.push(new Kr(Pt(this,t),Pt(this,a||t))),bi(this,Gi(this.cm,M,M.length-1),j)}),getSelection:function(t){for(var a=this.sel.ranges,j,M=0;M<a.length;M++){var K=Ht(this,a[M].from(),a[M].to());j=j?j.concat(K):K}return t===!1?j:j.join(t||this.lineSeparator())},getSelections:function(t){for(var a=[],j=this.sel.ranges,M=0;M<j.length;M++){var K=Ht(this,j[M].from(),j[M].to());t!==!1&&(K=K.join(t||this.lineSeparator())),a[M]=K}return a},replaceSelection:function(t,a,j){for(var M=[],K=0;K<this.sel.ranges.length;K++)M[K]=t;this.replaceSelections(M,a,j||"+input")},replaceSelections:Nn(function(t,a,j){for(var M=[],K=this.sel,re=0;re<K.ranges.length;re++){var se=K.ranges[re];M[re]={from:se.from(),to:se.to(),text:this.splitLines(t[re]),origin:j}}for(var pe=a&&a!="end"&&ko(this,M,a),ve=M.length-1;ve>=0;ve--)za(this,M[ve]);pe?Ss(this,pe):this.cm&&ya(this.cm)}),undo:Nn(function(){Uo(this,"undo")}),redo:Nn(function(){Uo(this,"redo")}),undoSelection:Nn(function(){Uo(this,"undo",!0)}),redoSelection:Nn(function(){Uo(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,a=0,j=0,M=0;M<t.done.length;M++)t.done[M].ranges||++a;for(var K=0;K<t.undone.length;K++)t.undone[K].ranges||++j;return{undo:a,redo:j}},clearHistory:function(){var t=this;this.history=new Mo(this.history.maxGeneration),wa(this,function(a){return a.history=t.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:Ga(this.history.done),undone:Ga(this.history.undone)}},setHistory:function(t){var a=this.history=new Mo(this.history.maxGeneration);a.done=Ga(t.done.slice(0),null,!0),a.undone=Ga(t.undone.slice(0),null,!0)},setGutterMarker:Nn(function(t,a,j){return fo(this,t,"gutter",function(M){var K=M.gutterMarkers||(M.gutterMarkers={});return K[a]=j,!j&&$(K)&&(M.gutterMarkers=null),!0})}),clearGutter:Nn(function(t){var a=this;this.iter(function(j){j.gutterMarkers&&j.gutterMarkers[t]&&fo(a,j,"gutter",function(){return j.gutterMarkers[t]=null,$(j.gutterMarkers)&&(j.gutterMarkers=null),!0})})}),lineInfo:function(t){var a;if(typeof t=="number"){if(!Ar(this,t))return null;if(a=t,t=dt(this,t),!t)return null}else if(a=xt(t),a==null)return null;return{line:a,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:Nn(function(t,a,j){return fo(this,t,a=="gutter"?"gutter":"class",function(M){var K=a=="text"?"textClass":a=="background"?"bgClass":a=="gutter"?"gutterClass":"wrapClass";if(!M[K])M[K]=j;else{if(R(j).test(M[K]))return!1;M[K]+=" "+j}return!0})}),removeLineClass:Nn(function(t,a,j){return fo(this,t,a=="gutter"?"gutter":"class",function(M){var K=a=="text"?"textClass":a=="background"?"bgClass":a=="gutter"?"gutterClass":"wrapClass",re=M[K];if(re)if(j==null)M[K]=null;else{var se=re.match(R(j));if(!se)return!1;var pe=se.index+se[0].length;M[K]=re.slice(0,se.index)+(!se.index||pe==re.length?"":" ")+re.slice(pe)||null}else return!1;return!0})}),addLineWidget:Nn(function(t,a,j){return xl(this,t,a,j)}),removeLineWidget:function(t){t.clear()},markText:function(t,a,j){return Xa(this,Pt(this,t),Pt(this,a),j,j&&j.type||"range")},setBookmark:function(t,a){var j={replacedWith:a&&(a.nodeType==null?a.widget:a),insertLeft:a&&a.insertLeft,clearWhenEmpty:!1,shared:a&&a.shared,handleMouseEvents:a&&a.handleMouseEvents};return t=Pt(this,t),Xa(this,t,t,j,"bookmark")},findMarksAt:function(t){t=Pt(this,t);var a=[],j=dt(this,t.line).markedSpans;if(j)for(var M=0;M<j.length;++M){var K=j[M];(K.from==null||K.from<=t.ch)&&(K.to==null||K.to>=t.ch)&&a.push(K.marker.parent||K.marker)}return a},findMarks:function(t,a,j){t=Pt(this,t),a=Pt(this,a);var M=[],K=t.line;return this.iter(t.line,a.line+1,function(re){var se=re.markedSpans;if(se)for(var pe=0;pe<se.length;pe++){var ve=se[pe];!(ve.to!=null&&K==t.line&&t.ch>=ve.to||ve.from==null&&K!=t.line||ve.from!=null&&K==a.line&&ve.from>=a.ch)&&(!j||j(ve.marker))&&M.push(ve.marker.parent||ve.marker)}++K}),M},getAllMarks:function(){var t=[];return this.iter(function(a){var j=a.markedSpans;if(j)for(var M=0;M<j.length;++M)j[M].from!=null&&t.push(j[M].marker)}),t},posFromIndex:function(t){var a,j=this.first,M=this.lineSeparator().length;return this.iter(function(K){var re=K.text.length+M;if(re>t)return a=t,!0;t-=re,++j}),Pt(this,ut(j,a))},indexFromPos:function(t){t=Pt(this,t);var a=t.ch;if(t.line<this.first||t.ch<0)return 0;var j=this.lineSeparator().length;return this.iter(this.first,t.line,function(M){a+=M.text.length+j}),a},copy:function(t){var a=new Ri(Gt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return a.scrollTop=this.scrollTop,a.scrollLeft=this.scrollLeft,a.sel=this.sel,a.extend=!1,t&&(a.history.undoDepth=this.history.undoDepth,a.setHistory(this.getHistory())),a},linkedDoc:function(t){t||(t={});var a=this.first,j=this.first+this.size;t.from!=null&&t.from>a&&(a=t.from),t.to!=null&&t.to<j&&(j=t.to);var M=new Ri(Gt(this,a,j),t.mode||this.modeOption,a,this.lineSep,this.direction);return t.sharedHist&&(M.history=this.history),(this.linked||(this.linked=[])).push({doc:M,sharedHist:t.sharedHist}),M.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],Tl(M,Us(this)),M},unlinkDoc:function(t){if(t instanceof wn&&(t=t.doc),this.linked)for(var a=0;a<this.linked.length;++a){var j=this.linked[a];if(j.doc!=t)continue;this.linked.splice(a,1),t.unlinkDoc(this),Sl(Us(this));break}if(t.history==this.history){var M=[t.id];wa(t,function(K){return M.push(K.id)},!0),t.history=new Mo(null),t.history.done=Ga(this.history.done,M),t.history.undone=Ga(this.history.undone,M)}},iterLinkedDocs:function(t){wa(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):pt(t)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Nn(function(t){if(t!="rtl"&&(t="ltr"),t==this.direction)return;this.direction=t,this.iter(function(a){return a.order=null}),this.cm&&pl(this.cm)})}),Ri.prototype.eachLine=Ri.prototype.iter;var Bs=0;function Ol(t){var a=this;if(Hs(a),ue(a,t)||Bn(a.display,t))return;ge(t),C&&(Bs=+new Date);var j=Qn(a,t,!0),M=t.dataTransfer.files;if(!j||a.isReadOnly())return;if(M&&M.length&&window.FileReader&&window.File)for(var K=M.length,re=Array(K),se=0,pe=function(){++se==K&&Pn(a,function(){j=Pt(a.doc,j);var et={from:j,to:j,text:a.doc.splitLines(re.filter(function(lt){return lt!=null}).join(a.doc.lineSeparator())),origin:"paste"};za(a.doc,et),Ss(a.doc,Zi(Pt(a.doc,j),Pt(a.doc,qi(et))))})()},ve=function(et,lt){if(a.options.allowDropFileTypes&&oe(a.options.allowDropFileTypes,et.type)==-1){pe();return}var ft=new FileReader;ft.onerror=function(){return pe()},ft.onload=function(){var bt=ft.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(bt)){pe();return}re[lt]=bt,pe()},ft.readAsText(et)},Te=0;Te<M.length;Te++)ve(M[Te],Te);else{if(a.state.draggingText&&a.doc.sel.contains(j)>-1){a.state.draggingText(t),setTimeout(function(){return a.display.input.focus()},20);return}try{var Ue=t.dataTransfer.getData("Text");if(Ue){var We;if(a.state.draggingText&&!a.state.draggingText.copy&&(We=a.listSelections()),jo(a.doc,Zi(j,j)),We)for(var tt=0;tt<We.length;++tt)Va(a.doc,"",We[tt].anchor,We[tt].head,"drag");a.replaceSelection(Ue,"around","paste"),a.display.input.focus()}}catch(et){}}}function Al(t,a){if(C&&(!t.state.draggingText||+new Date-Bs<100)){De(a);return}if(ue(t,a)||Bn(t.display,a))return;if(a.dataTransfer.setData("Text",t.getSelection()),a.dataTransfer.effectAllowed="copyMove",a.dataTransfer.setDragImage&&!i){var j=T("img",null,null,"position: fixed; left: 0; top: 0;");j.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",c&&(j.width=j.height=1,t.display.wrapper.appendChild(j),j._top=j.offsetTop),a.dataTransfer.setDragImage(j,0,0),c&&j.parentNode.removeChild(j)}}function Rl(t,a){var j=Qn(t,a);if(!j)return;var M=document.createDocumentFragment();na(t,j,M),t.display.dragCursor||(t.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),w(t.display.dragCursor,M)}function Hs(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function Ws(t){if(!document.getElementsByClassName)return;for(var a=document.getElementsByClassName("CodeMirror"),j=[],M=0;M<a.length;M++){var K=a[M].CodeMirror;K&&j.push(K)}j.length&&j[0].operation(function(){for(var re=0;re<j.length;re++)t(j[re])})}var Gs=!1;function Il(){if(Gs)return;Dl(),Gs=!0}function Dl(){var t;Ie(window,"resize",function(){t==null&&(t=setTimeout(function(){t=null,Ws(Ll)},100))}),Ie(window,"blur",function(){return Ws(va)})}function Ll(t){var a=t.display;a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.scrollbarsClipped=!1,t.setSize()}for(var Sa={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},yo=0;yo<10;yo++)Sa[yo+48]=Sa[yo+96]=String(yo);for(var Bo=65;Bo<=90;Bo++)Sa[Bo]=String.fromCharCode(Bo);for(var bo=1;bo<=12;bo++)Sa[bo+111]=Sa[bo+63235]="F"+bo;var ma={};ma.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ma.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ma.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},ma.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ma.default=o?ma.macDefault:ma.pcDefault;function kl(t){var a=t.split(/-(?!$)/);t=a[a.length-1];for(var j,M,K,re,se=0;se<a.length-1;se++){var pe=a[se];if(/^(cmd|meta|m)$/i.test(pe))re=!0;else if(/^a(lt)?$/i.test(pe))j=!0;else if(/^(c|ctrl|control)$/i.test(pe))M=!0;else if(/^s(hift)?$/i.test(pe))K=!0;else throw new Error("Unrecognized modifier name: "+pe)}return j&&(t="Alt-"+t),M&&(t="Ctrl-"+t),re&&(t="Cmd-"+t),K&&(t="Shift-"+t),t}function Ml(t){var a={};for(var j in t)if(t.hasOwnProperty(j)){var M=t[j];if(/^(name|fallthrough|(de|at)tach)$/.test(j))continue;if(M=="..."){delete t[j];continue}for(var K=Y(j.split(" "),kl),re=0;re<K.length;re++){var se=void 0,pe=void 0;re==K.length-1?(pe=K.join(" "),se=M):(pe=K.slice(0,re+1).join(" "),se="...");var ve=a[pe];if(!ve)a[pe]=se;else if(ve!=se)throw new Error("Inconsistent bindings for "+pe)}delete t[j]}for(var Te in a)t[Te]=a[Te];return t}function Ya(t,a,j,M){a=Ho(a);var K=a.call?a.call(t,M):a[t];if(K===!1)return"nothing";if(K==="...")return"multi";if(K!=null&&j(K))return"handled";if(a.fallthrough){if(Object.prototype.toString.call(a.fallthrough)!="[object Array]")return Ya(t,a.fallthrough,j,M);for(var re=0;re<a.fallthrough.length;re++){var se=Ya(t,a.fallthrough[re],j,M);if(se)return se}}}function Ks(t){var a=typeof t=="string"?t:Sa[t.keyCode];return a=="Ctrl"||a=="Alt"||a=="Shift"||a=="Mod"}function zs(t,a,j){var M=t;return a.altKey&&M!="Alt"&&(t="Alt-"+t),(p?a.metaKey:a.ctrlKey)&&M!="Ctrl"&&(t="Ctrl-"+t),(p?a.ctrlKey:a.metaKey)&&M!="Mod"&&(t="Cmd-"+t),!j&&a.shiftKey&&M!="Shift"&&(t="Shift-"+t),t}function Vs(t,a){if(c&&t.keyCode==34&&t.char)return!1;var j=Sa[t.keyCode];return j==null||t.altGraphKey?!1:(t.keyCode==3&&t.code&&(j=t.code),zs(j,t,a))}function Ho(t){return typeof t=="string"?ma[t]:t}function $a(t,a){for(var j=t.doc.sel.ranges,M=[],K=0;K<j.length;K++){for(var re=a(j[K]);M.length&&kt(re.from,W(M).to)<=0;){var se=M.pop();if(kt(se.from,re.from)<0){re.from=se.from;break}}M.push(re)}wi(t,function(){for(var pe=M.length-1;pe>=0;pe--)Va(t.doc,"",M[pe].from,M[pe].to,"+delete");ya(t)})}function as(t,a,j){var M=we(t.text,a+j,j);return M<0||M>t.text.length?null:M}function os(t,a,j){var M=as(t,a.ch,j);return M==null?null:new ut(a.line,M,j<0?"after":"before")}function ss(t,a,j,M,K){if(t){a.doc.direction=="rtl"&&(K=-K);var re=qe(j,a.doc.direction);if(re){var se=K<0?W(re):re[0],pe=K<0==(se.level==1),ve=pe?"after":"before",Te;if(se.level>0||a.doc.direction=="rtl"){var Ue=Ke(a,j);Te=K<0?j.text.length-1:0;var We=Qe(a,Ue,Te).top;Te=Fe(function(tt){return Qe(a,Ue,tt).top==We},K<0==(se.level==1)?se.from:se.to-1,Te),ve=="before"&&(Te=as(j,Te,1))}else Te=K<0?se.to:se.from;return new ut(M,Te,ve)}}return new ut(M,K<0?j.text.length:0,K<0?"before":"after")}function Pl(t,a,j,M){var K=qe(a,t.doc.direction);if(!K)return os(a,j,M);j.ch>=a.text.length?(j.ch=a.text.length,j.sticky="before"):j.ch<=0&&(j.ch=0,j.sticky="after");var re=Ye(K,j.ch,j.sticky),se=K[re];if(t.doc.direction=="ltr"&&se.level%2==0&&(M>0?se.to>j.ch:se.from<j.ch))return os(a,j,M);var pe=function(At,Nt){return as(a,At instanceof ut?At.ch:At,Nt)},ve,Te=function(At){return t.options.lineWrapping?(ve=ve||Ke(t,a),Vt(t,a,ve,At)):{begin:0,end:a.text.length}},Ue=Te(j.sticky=="before"?pe(j,-1):j.ch);if(t.doc.direction=="rtl"||se.level==1){var We=se.level==1==M<0,tt=pe(j,We?1:-1);if(tt!=null&&(We?tt<=se.to&&tt<=Ue.end:tt>=se.from&&tt>=Ue.begin)){var et=We?"before":"after";return new ut(j.line,tt,et)}}var lt=function(At,Nt,Rt){for(var Wt=function(un,oi){return oi?new ut(j.line,pe(un,1),"before"):new ut(j.line,un,"after")};At>=0&&At<K.length;At+=Nt){var nr=K[At],Zt=Nt>0==(nr.level!=1),Tr=Zt?Rt.begin:pe(Rt.end,-1);if(nr.from<=Tr&&Tr<nr.to)return Wt(Tr,Zt);if(Tr=Zt?nr.from:pe(nr.to,-1),Rt.begin<=Tr&&Tr<Rt.end)return Wt(Tr,Zt)}},ft=lt(re+M,M,Ue);if(ft)return ft;var bt=M>0?Ue.end:pe(Ue.begin,-1);return bt!=null&&!(M>0&&bt==a.text.length)&&(ft=lt(M>0?0:K.length-1,M,Te(bt)),ft)?ft:null}var _o={selectAll:Is,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),_e)},killLine:function(t){return $a(t,function(a){if(a.empty()){var j=dt(t.doc,a.head.line).text.length;return a.head.ch==j&&a.head.line<t.lastLine()?{from:a.head,to:ut(a.head.line+1,0)}:{from:a.head,to:ut(a.head.line,j)}}else return{from:a.from(),to:a.to()}})},deleteLine:function(t){return $a(t,function(a){return{from:ut(a.from().line,0),to:Pt(t.doc,ut(a.to().line+1,0))}})},delLineLeft:function(t){return $a(t,function(a){return{from:ut(a.from().line,0),to:a.from()}})},delWrappedLineLeft:function(t){return $a(t,function(a){var j=t.charCoords(a.head,"div").top+5,M=t.coordsChar({left:0,top:j},"div");return{from:M,to:a.from()}})},delWrappedLineRight:function(t){return $a(t,function(a){var j=t.charCoords(a.head,"div").top+5,M=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:j},"div");return{from:a.from(),to:M}})},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(ut(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(ut(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(a){return Xs(t,a.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(a){return Ys(t,a.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(a){return Nl(t,a.head.line)},{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy(function(a){var j=t.cursorCoords(a.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:j},"div")},Re)},goLineLeft:function(t){return t.extendSelectionsBy(function(a){var j=t.cursorCoords(a.head,"div").top+5;return t.coordsChar({left:0,top:j},"div")},Re)},goLineLeftSmart:function(t){return t.extendSelectionsBy(function(a){var j=t.cursorCoords(a.head,"div").top+5,M=t.coordsChar({left:0,top:j},"div");return M.ch<t.getLine(M.line).search(/\S/)?Ys(t,a.head):M},Re)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"codepoint")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection(" ")},insertSoftTab:function(t){for(var a=[],j=t.listSelections(),M=t.options.tabSize,K=0;K<j.length;K++){var re=j[K].from(),se=G(t.getLine(re.line),re.ch,M);a.push(te(M-se%M))}t.replaceSelections(a)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return wi(t,function(){for(var a=t.listSelections(),j=[],M=0;M<a.length;M++){if(!a[M].empty())continue;var K=a[M].head,re=dt(t.doc,K.line).text;if(re){if(K.ch==re.length&&(K=new ut(K.line,K.ch-1)),K.ch>0)K=new ut(K.line,K.ch+1),t.replaceRange(re.charAt(K.ch-1)+re.charAt(K.ch-2),ut(K.line,K.ch-2),K,"+transpose");else if(K.line>t.doc.first){var se=dt(t.doc,K.line-1).text;se&&(K=new ut(K.line,1),t.replaceRange(re.charAt(0)+t.doc.lineSeparator()+se.charAt(se.length-1),ut(K.line-1,se.length-1),K,"+transpose"))}}j.push(new Kr(K,K))}t.setSelections(j)})},newlineAndIndent:function(t){return wi(t,function(){for(var a=t.listSelections(),j=a.length-1;j>=0;j--)t.replaceRange(t.doc.lineSeparator(),a[j].anchor,a[j].head,"+input");a=t.listSelections();for(var M=0;M<a.length;M++)t.indentLine(a[M].from().line,null,!0);ya(t)})},openLine:function(t){return t.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(t){return t.toggleOverwrite()}};function Xs(t,a){var j=dt(t.doc,a),M=Xn(j);return M!=j&&(a=xt(M)),ss(!0,t,M,a,1)}function Nl(t,a){var j=dt(t.doc,a),M=ji(j);return M!=j&&(a=xt(M)),ss(!0,t,j,a,-1)}function Ys(t,a){var j=Xs(t,a.line),M=dt(t.doc,j.line),K=qe(M,t.doc.direction);if(!K||K[0].level==0){var re=Math.max(j.ch,M.text.search(/\S/)),se=a.line==j.line&&a.ch<=re&&a.ch;return ut(j.line,se?0:re,j.sticky)}return j}function Wo(t,a,j){if(typeof a=="string"&&(a=_o[a],!a))return!1;t.display.input.ensurePolled();var M=t.display.shift,K=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),j&&(t.display.shift=!1),K=a(t)!=be}finally{t.display.shift=M,t.state.suppressEdits=!1}return K}function jl(t,a,j){for(var M=0;M<t.state.keyMaps.length;M++){var K=Ya(a,t.state.keyMaps[M],j,t);if(K)return K}return t.options.extraKeys&&Ya(a,t.options.extraKeys,j,t)||Ya(a,t.options.keyMap,j,t)}var Fl=new ee;function Eo(t,a,j,M){var K=t.state.keySeq;if(K){if(Ks(a))return"handled";if(/\'$/.test(a)?t.state.keySeq=null:Fl.set(50,function(){t.state.keySeq==K&&(t.state.keySeq=null,t.display.input.reset())}),$s(t,K+" "+a,j,M))return!0}return $s(t,a,j,M)}function $s(t,a,j,M){var K=jl(t,a,M);return K=="multi"&&(t.state.keySeq=a),K=="handled"&&gr(t,"keyHandled",t,a,j),(K=="handled"||K=="multi")&&(ge(j),Zn(t)),!!K}function Js(t,a){var j=Vs(a,!0);return j?a.shiftKey&&!t.state.keySeq?Eo(t,"Shift-"+j,a,function(M){return Wo(t,M,!0)})||Eo(t,j,a,function(M){if(typeof M=="string"?/^go[A-Z]/.test(M):M.motion)return Wo(t,M)}):Eo(t,j,a,function(M){return Wo(t,M)}):!1}function Ul(t,a,j){return Eo(t,"'"+j+"'",a,function(M){return Wo(t,M,!0)})}var ls=null;function Qs(t){var a=this;if(t.target&&t.target!=a.display.input.getField())return;if(a.curOp.focus=X(),ue(a,t))return;C&&_<11&&t.keyCode==27&&(t.returnValue=!1);var j=t.keyCode;a.display.shift=j==16||t.shiftKey;var M=Js(a,t);c&&(ls=M?j:null,!M&&j==88&&!Ft&&(o?t.metaKey:t.ctrlKey)&&a.replaceSelection("",null,"cut")),S&&!o&&!M&&j==46&&t.shiftKey&&!t.ctrlKey&&document.execCommand&&document.execCommand("cut"),j==18&&!/\bCodeMirror-crosshair\b/.test(a.display.lineDiv.className)&&Bl(a)}function Bl(t){var a=t.display.lineDiv;z(a,"CodeMirror-crosshair");function j(M){(M.keyCode==18||!M.altKey)&&(y(a,"CodeMirror-crosshair"),rt(document,"keyup",j),rt(document,"mouseover",j))}Ie(document,"keyup",j),Ie(document,"mouseover",j)}function Zs(t){t.keyCode==16&&(this.doc.sel.shift=!1),ue(this,t)}function el(t){var a=this;if(t.target&&t.target!=a.display.input.getField())return;if(Bn(a.display,t)||ue(a,t)||t.ctrlKey&&!t.altKey||o&&t.metaKey)return;var j=t.keyCode,M=t.charCode;if(c&&j==ls){ls=null,ge(t);return}if(c&&(!t.which||t.which<10)&&Js(a,t))return;var K=String.fromCharCode(M==null?j:M);if(K=="\b")return;if(Ul(a,t,K))return;a.display.input.onKeyPress(t)}var Hl=400,us=function(t,a,j){this.time=t,this.pos=a,this.button=j};us.prototype.compare=function(t,a,j){return this.time+Hl>t&&kt(a,this.pos)==0&&j==this.button};var xo,wo;function Wl(t,a){var j=+new Date;return wo&&wo.compare(j,t,a)?(xo=wo=null,"triple"):xo&&xo.compare(j,t,a)?(wo=new us(j,t,a),xo=null,"double"):(xo=new us(j,t,a),wo=null,"single")}function tl(t){var a=this,j=a.display;if(ue(a,t)||j.activeTouch&&j.input.supportsTouch())return;if(j.input.ensurePolled(),j.shift=t.shiftKey,Bn(j,t)){e||(j.scroller.draggable=!1,setTimeout(function(){return j.scroller.draggable=!0},100));return}if(cs(a,t))return;var M=Qn(a,t),K=He(t),re=M?Wl(M,K):"single";if(window.focus(),K==1&&a.state.selectingText&&a.state.selectingText(t),M&&Gl(a,K,M,re,t))return;K==1?M?zl(a,M,re,t):Me(t)==j.scroller&&ge(t):K==2?(M&&No(a.doc,M),setTimeout(function(){return j.input.focus()},20)):K==3&&(D?a.display.input.onContextMenu(t):eo(a))}function Gl(t,a,j,M,K){var re="Click";return M=="double"?re="Double"+re:M=="triple"&&(re="Triple"+re),re=(a==1?"Left":a==2?"Middle":"Right")+re,Eo(t,zs(re,K),K,function(se){if(typeof se=="string"&&(se=_o[se]),!se)return!1;var pe=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),pe=se(t,j)!=be}finally{t.state.suppressEdits=!1}return pe})}function Kl(t,a,j){var M=t.getOption("configureMouse"),K=M?M(t,a,j):{};if(K.unit==null){var re=s?j.shiftKey&&j.metaKey:j.altKey;K.unit=re?"rectangle":a=="single"?"char":a=="double"?"word":"line"}return(K.extend==null||t.doc.extend)&&(K.extend=t.doc.extend||j.shiftKey),K.addNew==null&&(K.addNew=o?j.metaKey:j.ctrlKey),K.moveOnDrag==null&&(K.moveOnDrag=!(o?j.altKey:j.ctrlKey)),K}function zl(t,a,j,M){C?setTimeout(U(So,t),0):t.curOp.focus=X();var K=Kl(t,j,M),re=t.doc.sel,se;t.options.dragDrop&&nt&&!t.isReadOnly()&&j=="single"&&(se=re.contains(a))>-1&&(kt((se=re.ranges[se]).from(),a)<0||a.xRel>0)&&(kt(se.to(),a)>0||a.xRel<0)?Vl(t,M,a,K):Xl(t,M,a,K)}function Vl(t,a,j,M){var K=t.display,re=!1,se=Pn(t,function(Te){e&&(K.scroller.draggable=!1),t.state.draggingText=!1,rt(K.wrapper.ownerDocument,"mouseup",se),rt(K.wrapper.ownerDocument,"mousemove",pe),rt(K.scroller,"dragstart",ve),rt(K.scroller,"drop",se),re||(ge(Te),M.addNew||No(t.doc,j,null,null,M.extend),e&&!i||C&&_==9?setTimeout(function(){K.wrapper.ownerDocument.body.focus({preventScroll:!0}),K.input.focus()},20):K.input.focus())}),pe=function(Te){re=re||Math.abs(a.clientX-Te.clientX)+Math.abs(a.clientY-Te.clientY)>=10},ve=function(){return re=!0};e&&(K.scroller.draggable=!0),t.state.draggingText=se,se.copy=!M.moveOnDrag,K.scroller.dragDrop&&K.scroller.dragDrop(),Ie(K.wrapper.ownerDocument,"mouseup",se),Ie(K.wrapper.ownerDocument,"mousemove",pe),Ie(K.scroller,"dragstart",ve),Ie(K.scroller,"drop",se),eo(t),setTimeout(function(){return K.input.focus()},20)}function rl(t,a,j){if(j=="char")return new Kr(a,a);if(j=="word")return t.findWordAt(a);if(j=="line")return new Kr(ut(a.line,0),Pt(t.doc,ut(a.line+1,0)));var M=j(t,a);return new Kr(M.from,M.to)}function Xl(t,a,j,M){var K=t.display,re=t.doc;ge(a);var se,pe,ve=re.sel,Te=ve.ranges;if(M.addNew&&!M.extend?(pe=re.sel.contains(j),pe>-1?se=Te[pe]:se=new Kr(j,j)):(se=re.sel.primary(),pe=re.sel.primIndex),M.unit=="rectangle")M.addNew||(se=new Kr(j,j)),j=Qn(t,a,!0,!0),pe=-1;else{var Ue=rl(t,j,M.unit);M.extend?se=ns(se,Ue.anchor,Ue.head,M.extend):se=Ue}M.addNew?pe==-1?(pe=Te.length,bi(re,Gi(t,Te.concat([se]),pe),{scroll:!1,origin:"*mouse"})):Te.length>1&&Te[pe].empty()&&M.unit=="char"&&!M.extend?(bi(re,Gi(t,Te.slice(0,pe).concat(Te.slice(pe+1)),0),{scroll:!1,origin:"*mouse"}),ve=re.sel):is(re,pe,se,fe):(pe=0,bi(re,new Si([se],0),fe),ve=re.sel);var We=j;function tt(Rt){if(kt(We,Rt)==0)return;if(We=Rt,M.unit=="rectangle"){for(var Wt=[],nr=t.options.tabSize,Zt=G(dt(re,j.line).text,j.ch,nr),Tr=G(dt(re,Rt.line).text,Rt.ch,nr),un=Math.min(Zt,Tr),oi=Math.max(Zt,Tr),Cn=Math.min(j.line,Rt.line),Ni=Math.min(t.lastLine(),Math.max(j.line,Rt.line));Cn<=Ni;Cn++){var Ii=dt(re,Cn).text,Hn=Oe(Ii,un,nr);un==oi?Wt.push(new Kr(ut(Cn,Hn),ut(Cn,Hn))):Ii.length>Hn&&Wt.push(new Kr(ut(Cn,Hn),ut(Cn,Oe(Ii,oi,nr))))}Wt.length||Wt.push(new Kr(j,j)),bi(re,Gi(t,ve.ranges.slice(0,pe).concat(Wt),pe),{origin:"*mouse",scroll:!1}),t.scrollIntoView(Rt)}else{var Di=se,ci=rl(t,Rt,M.unit),ti=Di.anchor,Wn;kt(ci.anchor,ti)>0?(Wn=ci.head,ti=cn(Di.from(),ci.anchor)):(Wn=ci.anchor,ti=On(Di.to(),ci.head));var Ln=ve.ranges.slice(0);Ln[pe]=Yl(t,new Kr(Pt(re,ti),Wn)),bi(re,Gi(t,Ln,pe),fe)}}var et=K.wrapper.getBoundingClientRect(),lt=0;function ft(Rt){var Wt=++lt,nr=Qn(t,Rt,!0,M.unit=="rectangle");if(!nr)return;if(kt(nr,We)!=0){t.curOp.focus=X(),tt(nr);var Zt=Pa(K,re);(nr.line>=Zt.to||nr.line<Zt.from)&&setTimeout(Pn(t,function(){lt==Wt&&ft(Rt)}),150)}else{var Tr=Rt.clientY<et.top?-20:Rt.clientY>et.bottom?20:0;Tr&&setTimeout(Pn(t,function(){if(lt!=Wt)return;K.scroller.scrollTop+=Tr,ft(Rt)}),50)}}function bt(Rt){t.state.selectingText=!1,lt=Infinity,Rt&&(ge(Rt),K.input.focus()),rt(K.wrapper.ownerDocument,"mousemove",At),rt(K.wrapper.ownerDocument,"mouseup",Nt),re.history.lastSelOrigin=null}var At=Pn(t,function(Rt){Rt.buttons===0||!He(Rt)?bt(Rt):ft(Rt)}),Nt=Pn(t,bt);t.state.selectingText=Nt,Ie(K.wrapper.ownerDocument,"mousemove",At),Ie(K.wrapper.ownerDocument,"mouseup",Nt)}function Yl(t,a){var j=a.anchor,M=a.head,K=dt(t.doc,j.line);if(kt(j,M)==0&&j.sticky==M.sticky)return a;var re=qe(K);if(!re)return a;var se=Ye(re,j.ch,j.sticky),pe=re[se];if(pe.from!=j.ch&&pe.to!=j.ch)return a;var ve=se+(pe.from==j.ch==(pe.level!=1)?0:1);if(ve==0||ve==re.length)return a;var Te;if(M.line!=j.line)Te=(M.line-j.line)*(t.doc.direction=="ltr"?1:-1)>0;else{var Ue=Ye(re,M.ch,M.sticky),We=Ue-se||(M.ch-j.ch)*(pe.level==1?-1:1);Ue==ve-1||Ue==ve?Te=We<0:Te=We>0}var tt=re[ve+(Te?-1:0)],et=Te==(tt.level==1),lt=et?tt.from:tt.to,ft=et?"after":"before";return j.ch==lt&&j.sticky==ft?a:new Kr(new ut(j.line,lt,ft),M)}function nl(t,a,j,M){var K,re;if(a.touches)K=a.touches[0].clientX,re=a.touches[0].clientY;else try{K=a.clientX,re=a.clientY}catch(tt){return!1}if(K>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;M&&ge(a);var se=t.display,pe=se.lineDiv.getBoundingClientRect();if(re>pe.bottom||!me(t,j))return Ae(a);re-=pe.top-se.viewOffset;for(var ve=0;ve<t.display.gutterSpecs.length;++ve){var Te=se.gutters.childNodes[ve];if(Te&&Te.getBoundingClientRect().right>=K){var Ue=Kt(t.doc,re),We=t.display.gutterSpecs[ve];return ye(t,j,t,Ue,We.className,a),Ae(a)}}}function cs(t,a){return nl(t,a,"gutterClick",!0)}function il(t,a){if(Bn(t.display,a)||$l(t,a))return;if(ue(t,a,"contextmenu"))return;D||t.display.input.onContextMenu(a)}function $l(t,a){return me(t,"gutterContextMenu")?nl(t,a,"gutterContextMenu",!1):!1}function al(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),fr(t)}var Ja={toString:function(){return"CodeMirror.Init"}},ol={},Go={};function Jl(t){var a=t.optionHandlers;function j(M,K,re,se){t.defaults[M]=K,re&&(a[M]=se?function(pe,ve,Te){Te!=Ja&&re(pe,ve,Te)}:re)}t.defineOption=j,t.Init=Ja,j("value","",function(M,K){return M.setValue(K)},!0),j("mode",null,function(M,K){M.doc.modeOption=K,pa(M)},!0),j("indentUnit",2,pa,!0),j("indentWithTabs",!1),j("smartIndent",!0),j("tabSize",4,function(M){co(M),fr(M),tn(M)},!0),j("lineSeparator",null,function(M,K){if(M.doc.lineSep=K,!K)return;var re=[],se=M.doc.first;M.doc.iter(function(ve){for(var Te=0;;){var Ue=ve.text.indexOf(K,Te);if(Ue==-1)break;Te=Ue+K.length,re.push(ut(se,Ue))}se++});for(var pe=re.length-1;pe>=0;pe--)Va(M.doc,K,re[pe],ut(re[pe].line,re[pe].ch+K.length))}),j("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(M,K,re){M.state.specialChars=new RegExp(K.source+(K.test(" ")?"":"| "),"g"),re!=Ja&&M.refresh()}),j("specialCharPlaceholder",Lr,function(M){return M.refresh()},!0),j("electricChars",!0),j("inputStyle",u?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),j("spellcheck",!1,function(M,K){return M.getInputField().spellcheck=K},!0),j("autocorrect",!1,function(M,K){return M.getInputField().autocorrect=K},!0),j("autocapitalize",!1,function(M,K){return M.getInputField().autocapitalize=K},!0),j("rtlMoveVisually",!E),j("wholeLineUpdateBefore",!0),j("theme","default",function(M){al(M),Qi(M)},!0),j("keyMap","default",function(M,K,re){var se=Ho(K),pe=re!=Ja&&Ho(re);pe&&pe.detach&&pe.detach(M,se),se.attach&&se.attach(M,pe||null)}),j("extraKeys",null),j("configureMouse",null),j("lineWrapping",!1,Zl,!0),j("gutters",[],function(M,K){M.display.gutterSpecs=Ti(K,M.options.lineNumbers),Qi(M)},!0),j("fixedGutter",!0,function(M,K){M.display.gutters.style.left=K?yi(M.display)+"px":"0",M.refresh()},!0),j("coverGutterNextToScrollbar",!1,function(M){return da(M)},!0),j("scrollbarStyle","native",function(M){Fa(M),da(M),M.display.scrollbars.setScrollTop(M.doc.scrollTop),M.display.scrollbars.setScrollLeft(M.doc.scrollLeft)},!0),j("lineNumbers",!1,function(M,K){M.display.gutterSpecs=Ti(M.options.gutters,K),Qi(M)},!0),j("firstLineNumber",1,Qi,!0),j("lineNumberFormatter",function(M){return M},Qi,!0),j("showCursorWhenSelecting",!1,Qr,!0),j("resetSelectionOnContextMenu",!0),j("lineWiseCopyCut",!0),j("pasteLinesPerSelection",!0),j("selectionsMayTouch",!1),j("readOnly",!1,function(M,K){K=="nocursor"&&(va(M),M.display.input.blur()),M.display.input.readOnlyChanged(K)}),j("screenReaderLabel",null,function(M,K){K=K===""?null:K,M.display.input.screenReaderLabelChanged(K)}),j("disableInput",!1,function(M,K){K||M.display.input.reset()},!0),j("dragDrop",!0,Ql),j("allowDropFileTypes",null),j("cursorBlinkRate",530),j("cursorScrollMargin",0),j("cursorHeight",1,Qr,!0),j("singleCursorHeightPerLine",!0,Qr,!0),j("workTime",100),j("workDelay",100),j("flattenSpans",!0,co,!0),j("addModeClass",!1,co,!0),j("pollInterval",100),j("undoDepth",200,function(M,K){return M.doc.history.undoDepth=K}),j("historyEventDelay",1250),j("viewportMargin",10,function(M){return M.refresh()},!0),j("maxHighlightLength",1e4,co,!0),j("moveInputWithCursor",!0,function(M,K){K||M.display.input.resetPosition()}),j("tabindex",null,function(M,K){return M.display.input.getField().tabIndex=K||""}),j("autofocus",null),j("direction","ltr",function(M,K){return M.doc.setDirection(K)},!0),j("phrases",null)}function Ql(t,a,j){var M=j&&j!=Ja;if(!a!=!M){var K=t.display.dragFunctions,re=a?Ie:rt;re(t.display.scroller,"dragstart",K.start),re(t.display.scroller,"dragenter",K.enter),re(t.display.scroller,"dragover",K.over),re(t.display.scroller,"dragleave",K.leave),re(t.display.scroller,"drop",K.drop)}}function Zl(t){t.options.lineWrapping?(z(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(y(t.display.wrapper,"CodeMirror-wrap"),Fi(t)),xi(t),tn(t),fr(t),setTimeout(function(){return da(t)},100)}function wn(t,a){var j=this;if(!(this instanceof wn))return new wn(t,a);this.options=a=a?L(a):{},L(ol,a,!1);var M=a.value;typeof M=="string"?M=new Ri(M,a.mode,null,a.lineSeparator,a.direction):a.mode&&(M.modeOption=a.mode),this.doc=M;var K=new wn.inputStyles[a.inputStyle](this),re=this.display=new Da(t,M,K,a);re.wrapper.CodeMirror=this,al(this),a.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fa(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ee,keySeq:null,specialChars:null},a.autofocus&&!u&&re.input.focus(),C&&_<11&&setTimeout(function(){return j.display.input.reset(!0)},20),ql(this),Il(),oa(this),this.curOp.forceUpdate=!0,vs(this,M),a.autofocus&&!u||this.hasFocus()?setTimeout(function(){j.hasFocus()&&!j.state.focused&&ia(j)},20):va(this);for(var se in Go)Go.hasOwnProperty(se)&&Go[se](this,a[se],Ja);qn(this),a.finishInit&&a.finishInit(this);for(var pe=0;pe<ds.length;++pe)ds[pe](this);ha(this),e&&a.lineWrapping&&getComputedStyle(re.lineDiv).textRendering=="optimizelegibility"&&(re.lineDiv.style.textRendering="auto")}wn.defaults=ol,wn.optionHandlers=Go;function ql(t){var a=t.display;Ie(a.scroller,"mousedown",Pn(t,tl)),C&&_<11?Ie(a.scroller,"dblclick",Pn(t,function(ve){if(ue(t,ve))return;var Te=Qn(t,ve);if(!Te||cs(t,ve)||Bn(t.display,ve))return;ge(ve);var Ue=t.findWordAt(Te);No(t.doc,Ue.anchor,Ue.head)})):Ie(a.scroller,"dblclick",function(ve){return ue(t,ve)||ge(ve)}),Ie(a.scroller,"contextmenu",function(ve){return il(t,ve)}),Ie(a.input.getField(),"contextmenu",function(ve){a.scroller.contains(ve.target)||il(t,ve)});var j,M={end:0};function K(){a.activeTouch&&(j=setTimeout(function(){return a.activeTouch=null},1e3),M=a.activeTouch,M.end=+new Date)}function re(ve){if(ve.touches.length!=1)return!1;var Te=ve.touches[0];return Te.radiusX<=1&&Te.radiusY<=1}function se(ve,Te){if(Te.left==null)return!0;var Ue=Te.left-ve.left,We=Te.top-ve.top;return Ue*Ue+We*We>20*20}Ie(a.scroller,"touchstart",function(ve){if(!ue(t,ve)&&!re(ve)&&!cs(t,ve)){a.input.ensurePolled(),clearTimeout(j);var Te=+new Date;a.activeTouch={start:Te,moved:!1,prev:Te-M.end<=300?M:null},ve.touches.length==1&&(a.activeTouch.left=ve.touches[0].pageX,a.activeTouch.top=ve.touches[0].pageY)}}),Ie(a.scroller,"touchmove",function(){a.activeTouch&&(a.activeTouch.moved=!0)}),Ie(a.scroller,"touchend",function(ve){var Te=a.activeTouch;if(Te&&!Bn(a,ve)&&Te.left!=null&&!Te.moved&&new Date-Te.start<300){var Ue=t.coordsChar(a.activeTouch,"page"),We;!Te.prev||se(Te,Te.prev)?We=new Kr(Ue,Ue):!Te.prev.prev||se(Te,Te.prev.prev)?We=t.findWordAt(Ue):We=new Kr(ut(Ue.line,0),Pt(t.doc,ut(Ue.line+1,0))),t.setSelection(We.anchor,We.head),t.focus(),ge(ve)}K()}),Ie(a.scroller,"touchcancel",K),Ie(a.scroller,"scroll",function(){a.scroller.clientHeight&&(_a(t,a.scroller.scrollTop),Hi(t,a.scroller.scrollLeft,!0),ye(t,"scroll",t))}),Ie(a.scroller,"mousewheel",function(ve){return lo(t,ve)}),Ie(a.scroller,"DOMMouseScroll",function(ve){return lo(t,ve)}),Ie(a.wrapper,"scroll",function(){return a.wrapper.scrollTop=a.wrapper.scrollLeft=0}),a.dragFunctions={enter:function(ve){ue(t,ve)||De(ve)},over:function(ve){ue(t,ve)||(Rl(t,ve),De(ve))},start:function(ve){return Al(t,ve)},drop:Pn(t,Ol),leave:function(ve){ue(t,ve)||Hs(t)}};var pe=a.input.getField();Ie(pe,"keyup",function(ve){return Zs.call(t,ve)}),Ie(pe,"keydown",Pn(t,Qs)),Ie(pe,"keypress",Pn(t,el)),Ie(pe,"focus",function(ve){return ia(t,ve)}),Ie(pe,"blur",function(ve){return va(t,ve)})}var ds=[];wn.defineInitHook=function(t){return ds.push(t)};function To(t,a,j,M){var K=t.doc,re;j==null&&(j="add"),j=="smart"&&(K.mode.indent?re=hn(t,a).state:j="prev");var se=t.options.tabSize,pe=dt(K,a),ve=G(pe.text,null,se);pe.stateAfter&&(pe.stateAfter=null);var Te=pe.text.match(/^\s*/)[0],Ue;if(!M&&!/\S/.test(pe.text))Ue=0,j="not";else if(j=="smart"&&(Ue=K.mode.indent(re,pe.text.slice(Te.length),pe.text),Ue==be||Ue>150)){if(!M)return;j="prev"}j=="prev"?a>K.first?Ue=G(dt(K,a-1).text,null,se):Ue=0:j=="add"?Ue=ve+t.options.indentUnit:j=="subtract"?Ue=ve-t.options.indentUnit:typeof j=="number"&&(Ue=ve+j),Ue=Math.max(0,Ue);var We="",tt=0;if(t.options.indentWithTabs)for(var et=Math.floor(Ue/se);et;--et)tt+=se,We+=" ";if(tt<Ue&&(We+=te(Ue-tt)),We!=Te)return Va(K,We,ut(a,0),ut(a,Te.length),"+input"),pe.stateAfter=null,!0;for(var lt=0;lt<K.sel.ranges.length;lt++){var ft=K.sel.ranges[lt];if(ft.head.line==a&&ft.head.ch<Te.length){var bt=ut(a,Te.length);is(K,lt,new Kr(bt,bt));break}}}var ea=null;function Ko(t){ea=t}function hs(t,a,j,M,K){var re=t.doc;t.display.shift=!1,M||(M=re.sel);var se=+new Date-200,pe=K=="paste"||t.state.pasteIncoming>se,ve=pt(a),Te=null;if(pe&&M.ranges.length>1)if(ea&&ea.text.join(`
|
|
|
`)==a){if(M.ranges.length%ea.text.length==0){Te=[];for(var Ue=0;Ue<ea.text.length;Ue++)Te.push(re.splitLines(ea.text[Ue]))}}else ve.length==M.ranges.length&&t.options.pasteLinesPerSelection&&(Te=Y(ve,function(At){return[At]}));for(var We=t.curOp.updateInput,tt=M.ranges.length-1;tt>=0;tt--){var et=M.ranges[tt],lt=et.from(),ft=et.to();et.empty()&&(j&&j>0?lt=ut(lt.line,lt.ch-j):t.state.overwrite&&!pe?ft=ut(ft.line,Math.min(dt(re,ft.line).text.length,ft.ch+W(ve).length)):pe&&ea&&ea.lineWise&&ea.text.join(`
|
|
|
`)==ve.join(`
|
|
|
`)&&(lt=ft=ut(lt.line,0)));var bt={from:lt,to:ft,text:Te?Te[tt%Te.length]:ve,origin:K||(pe?"paste":t.state.cutIncoming>se?"cut":"+input")};za(t.doc,bt),gr(t,"inputRead",t,bt)}a&&!pe&&ll(t,a),ya(t),t.curOp.updateInput<2&&(t.curOp.updateInput=We),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function sl(t,a){var j=t.clipboardData&&t.clipboardData.getData("Text");if(j)return t.preventDefault(),!a.isReadOnly()&&!a.options.disableInput&&wi(a,function(){return hs(a,j,0,null,"paste")}),!0}function ll(t,a){if(!t.options.electricChars||!t.options.smartIndent)return;for(var j=t.doc.sel,M=j.ranges.length-1;M>=0;M--){var K=j.ranges[M];if(K.head.ch>100||M&&j.ranges[M-1].head.line==K.head.line)continue;var re=t.getModeAt(K.head),se=!1;if(re.electricChars){for(var pe=0;pe<re.electricChars.length;pe++)if(a.indexOf(re.electricChars.charAt(pe))>-1){se=To(t,K.head.line,"smart");break}}else re.electricInput&&(re.electricInput.test(dt(t.doc,K.head.line).text.slice(0,K.head.ch))&&(se=To(t,K.head.line,"smart")));se&&gr(t,"electricInput",t,K.head.line)}}function ul(t){for(var a=[],j=[],M=0;M<t.doc.sel.ranges.length;M++){var K=t.doc.sel.ranges[M].head.line,re={anchor:ut(K,0),head:ut(K+1,0)};j.push(re),a.push(t.getRange(re.anchor,re.head))}return{text:a,ranges:j}}function cl(t,a,j,M){t.setAttribute("autocorrect",j?"":"off"),t.setAttribute("autocapitalize",M?"":"off"),t.setAttribute("spellcheck",!!a)}function dl(){var t=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),a=T("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return e?t.style.width="1000px":t.setAttribute("wrap","off"),f&&(t.style.border="1px solid black"),cl(t),a}function eu(t){var a=t.optionHandlers,j=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(M,K){var re=this.options,se=re[M];if(re[M]==K&&M!="mode")return;re[M]=K,a.hasOwnProperty(M)&&Pn(this,a[M])(this,K,se),ye(this,"optionChange",this,M)},getOption:function(M){return this.options[M]},getDoc:function(){return this.doc},addKeyMap:function(M,K){this.state.keyMaps[K?"push":"unshift"](Ho(M))},removeKeyMap:function(M){for(var K=this.state.keyMaps,re=0;re<K.length;++re)if(K[re]==M||K[re].name==M)return K.splice(re,1),!0},addOverlay:ui(function(M,K){var re=M.token?M:t.getMode(this.options,M);if(re.startState)throw new Error("Overlays may not be stateful.");V(this.state.overlays,{mode:re,modeSpec:M,opaque:K&&K.opaque,priority:K&&K.priority||0},function(se){return se.priority}),this.state.modeGen++,tn(this)}),removeOverlay:ui(function(M){for(var K=this.state.overlays,re=0;re<K.length;++re){var se=K[re].modeSpec;if(se==M||typeof M=="string"&&se.name==M){K.splice(re,1),this.state.modeGen++,tn(this);return}}}),indentLine:ui(function(M,K,re){typeof K!="string"&&typeof K!="number"&&(K==null?K=this.options.smartIndent?"smart":"prev":K=K?"add":"subtract"),Ar(this.doc,M)&&To(this,M,K,re)}),indentSelection:ui(function(M){for(var K=this.doc.sel.ranges,re=-1,se=0;se<K.length;se++){var pe=K[se];if(pe.empty())pe.head.line>re&&(To(this,pe.head.line,M,!0),re=pe.head.line,se==this.doc.sel.primIndex&&ya(this));else{var ve=pe.from(),Te=pe.to(),Ue=Math.max(re,ve.line);re=Math.min(this.lastLine(),Te.line-(Te.ch?0:1))+1;for(var We=Ue;We<re;++We)To(this,We,M);var tt=this.doc.sel.ranges;ve.ch==0&&K.length==tt.length&&tt[se].from().ch>0&&is(this.doc,se,new Kr(ve,tt[se].to()),_e)}}}),getTokenAt:function(M,K){return di(this,M,K)},getLineTokens:function(M,K){return di(this,ut(M),K,!0)},getTokenTypeAt:function(M){M=Pt(this.doc,M);var K=An(this,dt(this.doc,M.line)),re=0,se=(K.length-1)/2,pe=M.ch,ve;if(pe==0)ve=K[2];else for(;;){var Te=re+se>>1;if((Te?K[Te*2-1]:0)>=pe)se=Te;else if(K[Te*2+1]<pe)re=Te+1;else{ve=K[Te*2+2];break}}var Ue=ve?ve.indexOf("overlay "):-1;return Ue<0?ve:Ue==0?null:ve.slice(0,Ue-1)},getModeAt:function(M){var K=this.doc.mode;return K.innerMode?t.innerMode(K,this.getTokenAt(M).state).mode:K},getHelper:function(M,K){return this.getHelpers(M,K)[0]},getHelpers:function(M,K){var re=[];if(!j.hasOwnProperty(K))return re;var se=j[K],pe=this.getModeAt(M);if(typeof pe[K]=="string")se[pe[K]]&&re.push(se[pe[K]]);else if(pe[K])for(var ve=0;ve<pe[K].length;ve++){var Te=se[pe[K][ve]];Te&&re.push(Te)}else pe.helperType&&se[pe.helperType]?re.push(se[pe.helperType]):se[pe.name]&&re.push(se[pe.name]);for(var Ue=0;Ue<se._global.length;Ue++){var We=se._global[Ue];We.pred(pe,this)&&oe(re,We.val)==-1&&re.push(We.val)}return re},getStateAfter:function(M,K){var re=this.doc;return M=zr(re,M==null?re.first+re.size-1:M),hn(this,M+1,K).state},cursorCoords:function(M,K){var re,se=this.doc.sel.primary();return M==null?re=se.head:typeof M=="object"?re=Pt(this.doc,M):re=M?se.from():se.to(),Cr(this,re,K||"page")},charCoords:function(M,K){return gn(this,Pt(this.doc,M),K||"page")},coordsChar:function(M,K){return M=Sr(this,M,K||"page"),Or(this,M.left,M.top)},lineAtHeight:function(M,K){return M=Sr(this,{top:M,left:0},K||"page").top,Kt(this.doc,M+this.display.viewOffset)},heightAtLine:function(M,K,re){var se=!1,pe;if(typeof M=="number"){var ve=this.doc.first+this.doc.size-1;M<this.doc.first?M=this.doc.first:M>ve&&(M=ve,se=!0),pe=dt(this.doc,M)}else pe=M;return Pr(this,pe,{top:0,left:0},K||"page",re||se).top+(se?this.doc.height-ni(pe):0)},defaultTextHeight:function(){return Dn(this.display)},defaultCharWidth:function(){return Jn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(M,K,re,se,pe){var ve=this.display;M=Cr(this,Pt(this.doc,M));var Te=M.bottom,Ue=M.left;if(K.style.position="absolute",K.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(K),ve.sizer.appendChild(K),se=="over")Te=M.top;else if(se=="above"||se=="near"){var We=Math.max(ve.wrapper.clientHeight,this.doc.height),tt=Math.max(ve.sizer.clientWidth,ve.lineSpace.clientWidth);(se=="above"||M.bottom+K.offsetHeight>We)&&M.top>K.offsetHeight?Te=M.top-K.offsetHeight:M.bottom+K.offsetHeight<=We&&(Te=M.bottom),Ue+K.offsetWidth>tt&&(Ue=tt-K.offsetWidth)}K.style.top=Te+"px",K.style.left=K.style.right="",pe=="right"?(Ue=ve.sizer.clientWidth-K.offsetWidth,K.style.right="0px"):(pe=="left"?Ue=0:pe=="middle"&&(Ue=(ve.sizer.clientWidth-K.offsetWidth)/2),K.style.left=Ue+"px"),re&&Co(this,{left:Ue,top:Te,right:Ue+K.offsetWidth,bottom:Te+K.offsetHeight})},triggerOnKeyDown:ui(Qs),triggerOnKeyPress:ui(el),triggerOnKeyUp:Zs,triggerOnMouseDown:ui(tl),execCommand:function(M){if(_o.hasOwnProperty(M))return _o[M].call(null,this)},triggerElectric:ui(function(M){ll(this,M)}),findPosH:function(M,K,re,se){var pe=1;K<0&&(pe=-1,K=-K);for(var ve=Pt(this.doc,M),Te=0;Te<K&&!(ve=fs(this.doc,ve,pe,re,se),ve.hitSide);++Te);return ve},moveH:ui(function(M,K){var re=this;this.extendSelectionsBy(function(se){return re.display.shift||re.doc.extend||se.empty()?fs(re.doc,se.head,M,K,re.options.rtlMoveVisually):M<0?se.from():se.to()},Re)}),deleteH:ui(function(M,K){var re=this.doc.sel,se=this.doc;re.somethingSelected()?se.replaceSelection("",null,"+delete"):$a(this,function(pe){var ve=fs(se,pe.head,M,K,!1);return M<0?{from:ve,to:pe.head}:{from:pe.head,to:ve}})}),findPosV:function(M,K,re,se){var pe=1,ve=se;K<0&&(pe=-1,K=-K);for(var Te=Pt(this.doc,M),Ue=0;Ue<K;++Ue){var We=Cr(this,Te,"div");if(ve==null?ve=We.left:We.left=ve,Te=hl(this,We,pe,re),Te.hitSide)break}return Te},moveV:ui(function(M,K){var re=this,se=this.doc,pe=[],ve=!this.display.shift&&!se.extend&&se.sel.somethingSelected();if(se.extendSelectionsBy(function(Ue){if(ve)return M<0?Ue.from():Ue.to();var We=Cr(re,Ue.head,"div");Ue.goalColumn!=null&&(We.left=Ue.goalColumn),pe.push(We.left);var tt=hl(re,We,M,K);return K=="page"&&Ue==se.sel.primary()&&no(re,gn(re,tt,"div").top-We.top),tt},Re),pe.length)for(var Te=0;Te<se.sel.ranges.length;Te++)se.sel.ranges[Te].goalColumn=pe[Te]}),findWordAt:function(M){var K=this.doc,re=dt(K,M.line).text,se=M.ch,pe=M.ch;if(re){var ve=this.getHelper(M,"wordChars");(M.sticky=="before"||pe==re.length)&&se?--se:++pe;for(var Te=re.charAt(se),Ue=J(Te,ve)?function(We){return J(We,ve)}:/\s/.test(Te)?function(We){return/\s/.test(We)}:function(We){return!/\s/.test(We)&&!J(We)};se>0&&Ue(re.charAt(se-1));)--se;for(;pe<re.length&&Ue(re.charAt(pe));)++pe}return new Kr(ut(M.line,se),ut(M.line,pe))},toggleOverwrite:function(M){if(M!=null&&M==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?z(this.display.cursorDiv,"CodeMirror-overwrite"):y(this.display.cursorDiv,"CodeMirror-overwrite"),ye(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==X()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ui(function(M,K){ba(this,M,K)}),getScrollInfo:function(){var M=this.display.scroller;return{left:M.scrollLeft,top:M.scrollTop,height:M.scrollHeight-Ve(this)-this.display.barHeight,width:M.scrollWidth-Ve(this)-this.display.barWidth,clientHeight:xe(this),clientWidth:Ne(this)}},scrollIntoView:ui(function(M,K){M==null?(M={from:this.doc.sel.primary().head,to:null},K==null&&(K=this.options.cursorScrollMargin)):typeof M=="number"?M={from:ut(M,0),to:null}:M.from==null&&(M={from:M,to:null}),M.to||(M.to=M.from),M.margin=K||0,M.from.line!=null?$o(this,M):Oa(this,M.from,M.to,M.margin)}),setSize:ui(function(M,K){var re=this,se=function(ve){return typeof ve=="number"||/^\d+$/.test(String(ve))?ve+"px":ve};M!=null&&(this.display.wrapper.style.width=se(M)),K!=null&&(this.display.wrapper.style.height=se(K)),this.options.lineWrapping&&cr(this);var pe=this.display.viewFrom;this.doc.iter(pe,this.display.viewTo,function(ve){if(ve.widgets){for(var Te=0;Te<ve.widgets.length;Te++)if(ve.widgets[Te].noHScroll){xn(re,pe,"widget");break}}++pe}),this.curOp.forceUpdate=!0,ye(this,"refresh",this)}),operation:function(M){return wi(this,M)},startOperation:function(){return oa(this)},endOperation:function(){return ha(this)},refresh:ui(function(){var M=this.display.cachedTextHeight;tn(this),this.curOp.forceUpdate=!0,fr(this),ba(this,this.doc.scrollLeft,this.doc.scrollTop),Ba(this.display),(M==null||Math.abs(M-Dn(this.display))>.5||this.options.lineWrapping)&&xi(this),ye(this,"refresh",this)}),swapDoc:ui(function(M){var K=this.doc;return K.cm=null,this.state.selectingText&&this.state.selectingText(),vs(this,M),fr(this),this.display.input.reset(),ba(this,M.scrollLeft,M.scrollTop),this.curOp.forceScroll=!0,gr(this,"swapDoc",this,K),K}),phrase:function(M){var K=this.options.phrases;return K&&Object.prototype.hasOwnProperty.call(K,M)?K[M]:M},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}},Ce(t),t.registerHelper=function(M,K,re){j.hasOwnProperty(M)||(j[M]=t[M]={_global:[]}),j[M][K]=re},t.registerGlobalHelper=function(M,K,re,se){t.registerHelper(M,K,se),j[M]._global.push({pred:re,val:se})}}function fs(t,a,j,M,K){var re=a,se=j,pe=dt(t,a.line),ve=K&&t.direction=="rtl"?-j:j;function Te(){var Nt=a.line+ve;return Nt<t.first||Nt>=t.first+t.size?!1:(a=new ut(Nt,a.ch,a.sticky),pe=dt(t,Nt))}function Ue(Nt){var Rt;if(M=="codepoint"){var Wt=pe.text.charCodeAt(a.ch+(M>0?0:-1));isNaN(Wt)?Rt=null:Rt=new ut(a.line,Math.max(0,Math.min(pe.text.length,a.ch+j*(Wt>=55296&&Wt<56320?2:1))),-j)}else K?Rt=Pl(t.cm,pe,a,j):Rt=os(pe,a,j);if(Rt==null)if(!Nt&&Te())a=ss(K,t.cm,pe,a.line,ve);else return!1;else a=Rt;return!0}if(M=="char"||M=="codepoint")Ue();else if(M=="column")Ue(!0);else if(M=="word"||M=="group")for(var We=null,tt=M=="group",et=t.cm&&t.cm.getHelper(a,"wordChars"),lt=!0;!(j<0&&!Ue(!lt));lt=!1){var ft=pe.text.charAt(a.ch)||`
|
|
|
`,bt=J(ft,et)?"w":tt&&ft==`
|
|
|
`?"n":!tt||/\s/.test(ft)?null:"p";if(tt&&!lt&&!bt&&(bt="s"),We&&We!=bt){j<0&&(j=1,Ue(),a.sticky="after");break}if(bt&&(We=bt),j>0&&!Ue(!lt))break}var At=Fo(t,a,re,se,!0);return Hr(re,At)&&(At.hitSide=!0),At}function hl(t,a,j,M){var K=t.doc,re=a.left,se;if(M=="page"){var pe=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ve=Math.max(pe-.5*Dn(t.display),3);se=(j>0?a.bottom:a.top)+j*ve}else M=="line"&&(se=j>0?a.bottom+3:a.top-3);for(var Te;!(Te=Or(t,re,se),!Te.outside);){if(j<0?se<=0:se>=K.height){Te.hitSide=!0;break}se+=j*5}return Te}var rn=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ee,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};rn.prototype.init=function(t){var a=this,j=this,M=j.cm,K=j.div=t.lineDiv;cl(K,M.options.spellcheck,M.options.autocorrect,M.options.autocapitalize);function re(pe){for(var ve=pe.target;ve;ve=ve.parentNode){if(ve==K)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ve.className))break}return!1}Ie(K,"paste",function(pe){if(!re(pe)||ue(M,pe)||sl(pe,M))return;_<=11&&setTimeout(Pn(M,function(){return a.updateFromDOM()}),20)}),Ie(K,"compositionstart",function(pe){a.composing={data:pe.data,done:!1}}),Ie(K,"compositionupdate",function(pe){a.composing||(a.composing={data:pe.data,done:!1})}),Ie(K,"compositionend",function(pe){a.composing&&(pe.data!=a.composing.data&&a.readFromDOMSoon(),a.composing.done=!0)}),Ie(K,"touchstart",function(){return j.forceCompositionEnd()}),Ie(K,"input",function(){a.composing||a.readFromDOMSoon()});function se(pe){if(!re(pe)||ue(M,pe))return;if(M.somethingSelected())Ko({lineWise:!1,text:M.getSelections()}),pe.type=="cut"&&M.replaceSelection("",null,"cut");else if(M.options.lineWiseCopyCut){var ve=ul(M);Ko({lineWise:!0,text:ve.text}),pe.type=="cut"&&M.operation(function(){M.setSelections(ve.ranges,0,_e),M.replaceSelection("",null,"cut")})}else return;if(pe.clipboardData){pe.clipboardData.clearData();var Te=ea.text.join(`
|
|
|
`);if(pe.clipboardData.setData("Text",Te),pe.clipboardData.getData("Text")==Te){pe.preventDefault();return}}var Ue=dl(),We=Ue.firstChild;M.display.lineSpace.insertBefore(Ue,M.display.lineSpace.firstChild),We.value=ea.text.join(`
|
|
|
`);var tt=document.activeElement;B(We),setTimeout(function(){M.display.lineSpace.removeChild(Ue),tt.focus(),tt==K&&j.showPrimarySelection()},50)}Ie(K,"copy",se),Ie(K,"cut",se)},rn.prototype.screenReaderLabelChanged=function(t){t?this.div.setAttribute("aria-label",t):this.div.removeAttribute("aria-label")},rn.prototype.prepareSelection=function(){var t=Yi(this.cm,!1);return t.focus=document.activeElement==this.div,t},rn.prototype.showSelection=function(t,a){if(!t||!this.cm.display.view.length)return;(t.focus||a)&&this.showPrimarySelection(),this.showMultipleSelections(t)},rn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},rn.prototype.showPrimarySelection=function(){var t=this.getSelection(),a=this.cm,j=a.doc.sel.primary(),M=j.from(),K=j.to();if(a.display.viewTo==a.display.viewFrom||M.line>=a.display.viewTo||K.line<a.display.viewFrom){t.removeAllRanges();return}var re=zo(a,t.anchorNode,t.anchorOffset),se=zo(a,t.focusNode,t.focusOffset);if(re&&!re.bad&&se&&!se.bad&&kt(cn(re,se),M)==0&&kt(On(re,se),K)==0)return;var pe=a.display.view,ve=M.line>=a.display.viewFrom&&fl(a,M)||{node:pe[0].measure.map[2],offset:0},Te=K.line<a.display.viewTo&&fl(a,K);if(!Te){var Ue=pe[pe.length-1].measure,We=Ue.maps?Ue.maps[Ue.maps.length-1]:Ue.map;Te={node:We[We.length-1],offset:We[We.length-2]-We[We.length-3]}}if(!ve||!Te){t.removeAllRanges();return}var tt=t.rangeCount&&t.getRangeAt(0),et;try{et=P(ve.node,ve.offset,Te.offset,Te.node)}catch(lt){}et&&(!S&&a.state.focused?(t.collapse(ve.node,ve.offset),et.collapsed||(t.removeAllRanges(),t.addRange(et))):(t.removeAllRanges(),t.addRange(et)),tt&&t.anchorNode==null?t.addRange(tt):S&&this.startGracePeriod()),this.rememberSelection()},rn.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation(function(){return t.cm.curOp.selectionChanged=!0})},20)},rn.prototype.showMultipleSelections=function(t){w(this.cm.display.cursorDiv,t.cursors),w(this.cm.display.selectionDiv,t.selection)},rn.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},rn.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var a=t.getRangeAt(0).commonAncestorContainer;return A(this.div,a)},rn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},rn.prototype.blur=function(){this.div.blur()},rn.prototype.getField=function(){return this.div},rn.prototype.supportsTouch=function(){return!0},rn.prototype.receivedFocus=function(){var t=this;this.selectionInEditor()?this.pollSelection():wi(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function a(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,a))}this.polling.set(this.cm.options.pollInterval,a)},rn.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},rn.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var t=this.getSelection(),a=this.cm;if(d&&r&&this.cm.display.gutterSpecs.length&&tu(t.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var j=zo(a,t.anchorNode,t.anchorOffset),M=zo(a,t.focusNode,t.focusOffset);j&&M&&wi(a,function(){bi(a.doc,Zi(j,M),_e),(j.bad||M.bad)&&(a.curOp.selectionChanged=!0)})},rn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t=this.cm,a=t.display,j=t.doc.sel.primary(),M=j.from(),K=j.to();if(M.ch==0&&M.line>t.firstLine()&&(M=ut(M.line-1,dt(t.doc,M.line-1).length)),K.ch==dt(t.doc,K.line).text.length&&K.line<t.lastLine()&&(K=ut(K.line+1,0)),M.line<a.viewFrom||K.line>a.viewTo-1)return!1;var re,se,pe;M.line==a.viewFrom||(re=ln(t,M.line))==0?(se=xt(a.view[0].line),pe=a.view[0].node):(se=xt(a.view[re].line),pe=a.view[re-1].node.nextSibling);var ve=ln(t,K.line),Te,Ue;if(ve==a.view.length-1?(Te=a.viewTo-1,Ue=a.lineDiv.lastChild):(Te=xt(a.view[ve+1].line)-1,Ue=a.view[ve+1].node.previousSibling),!pe)return!1;for(var We=t.doc.splitLines(ru(t,pe,Ue,se,Te)),tt=Ht(t.doc,ut(se,0),ut(Te,dt(t.doc,Te).text.length));We.length>1&&tt.length>1;)if(W(We)==W(tt))We.pop(),tt.pop(),Te--;else if(We[0]==tt[0])We.shift(),tt.shift(),se++;else break;for(var et=0,lt=0,ft=We[0],bt=tt[0],At=Math.min(ft.length,bt.length);et<At&&ft.charCodeAt(et)==bt.charCodeAt(et);)++et;for(var Nt=W(We),Rt=W(tt),Wt=Math.min(Nt.length-(We.length==1?et:0),Rt.length-(tt.length==1?et:0));lt<Wt&&Nt.charCodeAt(Nt.length-lt-1)==Rt.charCodeAt(Rt.length-lt-1);)++lt;if(We.length==1&&tt.length==1&&se==M.line)for(;et&&et>M.ch&&Nt.charCodeAt(Nt.length-lt-1)==Rt.charCodeAt(Rt.length-lt-1);)et--,lt++;We[We.length-1]=Nt.slice(0,Nt.length-lt).replace(/^\u200b+/,""),We[0]=We[0].slice(et).replace(/\u200b+$/,"");var nr=ut(se,et),Zt=ut(Te,tt.length?W(tt).length-lt:0);if(We.length>1||We[0]||kt(nr,Zt))return Va(t.doc,We,nr,Zt,"+input"),!0},rn.prototype.ensurePolled=function(){this.forceCompositionEnd()},rn.prototype.reset=function(){this.forceCompositionEnd()},rn.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},rn.prototype.readFromDOMSoon=function(){var t=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing)if(t.composing.done)t.composing=null;else return;t.updateFromDOM()},80)},rn.prototype.updateFromDOM=function(){var t=this;(this.cm.isReadOnly()||!this.pollContent())&&wi(this.cm,function(){return tn(t.cm)})},rn.prototype.setUneditable=function(t){t.contentEditable="false"},rn.prototype.onKeyPress=function(t){if(t.charCode==0||this.composing)return;t.preventDefault(),this.cm.isReadOnly()||Pn(this.cm,hs)(this.cm,String.fromCharCode(t.charCode==null?t.keyCode:t.charCode),0)},rn.prototype.readOnlyChanged=function(t){this.div.contentEditable=String(t!="nocursor")},rn.prototype.onContextMenu=function(){},rn.prototype.resetPosition=function(){},rn.prototype.needsContentAttribute=!0;function fl(t,a){var j=ze(t,a.line);if(!j||j.hidden)return null;var M=dt(t.doc,a.line),K=Se(j,M,a.line),re=qe(M,t.doc.direction),se="left";if(re){var pe=Ye(re,a.ch);se=pe%2?"right":"left"}var ve=vt(K.map,a.ch,se);return ve.offset=ve.collapse=="right"?ve.end:ve.start,ve}function tu(t){for(var a=t;a;a=a.parentNode)if(/CodeMirror-gutter-wrapper/.test(a.className))return!0;return!1}function Qa(t,a){return a&&(t.bad=!0),t}function ru(t,a,j,M,K){var re="",se=!1,pe=t.doc.lineSeparator(),ve=!1;function Te(et){return function(lt){return lt.id==et}}function Ue(){se&&(re+=pe,ve&&(re+=pe),se=ve=!1)}function We(et){et&&(Ue(),re+=et)}function tt(et){if(et.nodeType==1){var lt=et.getAttribute("cm-text");if(lt){We(lt);return}var ft=et.getAttribute("cm-marker"),bt;if(ft){var At=t.findMarks(ut(M,0),ut(K+1,0),Te(+ft));At.length&&(bt=At[0].find(0))&&We(Ht(t.doc,bt.from,bt.to).join(pe));return}if(et.getAttribute("contenteditable")=="false")return;var Nt=/^(pre|div|p|li|table|br)$/i.test(et.nodeName);if(!/^br$/i.test(et.nodeName)&&et.textContent.length==0)return;Nt&&Ue();for(var Rt=0;Rt<et.childNodes.length;Rt++)tt(et.childNodes[Rt]);/^(pre|p)$/i.test(et.nodeName)&&(ve=!0),Nt&&(se=!0)}else et.nodeType==3&&We(et.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(tt(a),a==j);)a=a.nextSibling,ve=!1;return re}function zo(t,a,j){var M;if(a==t.display.lineDiv){if(M=t.display.lineDiv.childNodes[j],!M)return Qa(t.clipPos(ut(t.display.viewTo-1)),!0);a=null,j=0}else for(M=a;;M=M.parentNode){if(!M||M==t.display.lineDiv)return null;if(M.parentNode&&M.parentNode==t.display.lineDiv)break}for(var K=0;K<t.display.view.length;K++){var re=t.display.view[K];if(re.node==M)return nu(re,a,j)}}function nu(t,a,j){var M=t.text.firstChild,K=!1;if(!a||!A(M,a))return Qa(ut(xt(t.line),0),!0);if(a==M&&(K=!0,a=M.childNodes[j],j=0,!a)){var re=t.rest?W(t.rest):t.line;return Qa(ut(xt(re),re.text.length),K)}var se=a.nodeType==3?a:null,pe=a;for(!se&&a.childNodes.length==1&&a.firstChild.nodeType==3&&(se=a.firstChild,j&&(j=se.nodeValue.length));pe.parentNode!=M;)pe=pe.parentNode;var ve=t.measure,Te=ve.maps;function Ue(bt,At,Nt){for(var Rt=-1;Rt<(Te?Te.length:0);Rt++)for(var Wt=Rt<0?ve.map:Te[Rt],nr=0;nr<Wt.length;nr+=3){var Zt=Wt[nr+2];if(Zt==bt||Zt==At){var Tr=xt(Rt<0?t.line:t.rest[Rt]),un=Wt[nr]+Nt;return(Nt<0||Zt!=bt)&&(un=Wt[nr+(Nt?1:0)]),ut(Tr,un)}}}var We=Ue(se,pe,j);if(We)return Qa(We,K);for(var tt=pe.nextSibling,et=se?se.nodeValue.length-j:0;tt;tt=tt.nextSibling){if(We=Ue(tt,tt.firstChild,0),We)return Qa(ut(We.line,We.ch-et),K);et+=tt.textContent.length}for(var lt=pe.previousSibling,ft=j;lt;lt=lt.previousSibling){if(We=Ue(lt,lt.firstChild,-1),We)return Qa(ut(We.line,We.ch+ft),K);ft+=lt.textContent.length}}var jn=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new ee,this.hasSelection=!1,this.composing=null};jn.prototype.init=function(t){var a=this,j=this,M=this.cm;this.createField(t);var K=this.textarea;t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),f&&(K.style.width="0px"),Ie(K,"input",function(){C&&_>=9&&a.hasSelection&&(a.hasSelection=null),j.poll()}),Ie(K,"paste",function(se){if(ue(M,se)||sl(se,M))return;M.state.pasteIncoming=+new Date,j.fastPoll()});function re(se){if(ue(M,se))return;if(M.somethingSelected())Ko({lineWise:!1,text:M.getSelections()});else if(M.options.lineWiseCopyCut){var pe=ul(M);Ko({lineWise:!0,text:pe.text}),se.type=="cut"?M.setSelections(pe.ranges,null,_e):(j.prevInput="",K.value=pe.text.join(`
|
|
|
`),B(K))}else return;se.type=="cut"&&(M.state.cutIncoming=+new Date)}Ie(K,"cut",re),Ie(K,"copy",re),Ie(t.scroller,"paste",function(se){if(Bn(t,se)||ue(M,se))return;if(!K.dispatchEvent){M.state.pasteIncoming=+new Date,j.focus();return}var pe=new Event("paste");pe.clipboardData=se.clipboardData,K.dispatchEvent(pe)}),Ie(t.lineSpace,"selectstart",function(se){Bn(t,se)||ge(se)}),Ie(K,"compositionstart",function(){var se=M.getCursor("from");j.composing&&j.composing.range.clear(),j.composing={start:se,range:M.markText(se,M.getCursor("to"),{className:"CodeMirror-composing"})}}),Ie(K,"compositionend",function(){j.composing&&(j.poll(),j.composing.range.clear(),j.composing=null)})},jn.prototype.createField=function(t){this.wrapper=dl(),this.textarea=this.wrapper.firstChild},jn.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},jn.prototype.prepareSelection=function(){var t=this.cm,a=t.display,j=t.doc,M=Yi(t);if(t.options.moveInputWithCursor){var K=Cr(t,j.sel.primary().head,"div"),re=a.wrapper.getBoundingClientRect(),se=a.lineDiv.getBoundingClientRect();M.teTop=Math.max(0,Math.min(a.wrapper.clientHeight-10,K.top+se.top-re.top)),M.teLeft=Math.max(0,Math.min(a.wrapper.clientWidth-10,K.left+se.left-re.left))}return M},jn.prototype.showSelection=function(t){var a=this.cm,j=a.display;w(j.cursorDiv,t.cursors),w(j.selectionDiv,t.selection),t.teTop!=null&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},jn.prototype.reset=function(t){if(this.contextMenuPending||this.composing)return;var a=this.cm;if(a.somethingSelected()){this.prevInput="";var j=a.getSelection();this.textarea.value=j,a.state.focused&&B(this.textarea),C&&_>=9&&(this.hasSelection=j)}else t||(this.prevInput=this.textarea.value="",C&&_>=9&&(this.hasSelection=null))},jn.prototype.getField=function(){return this.textarea},jn.prototype.supportsTouch=function(){return!1},jn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!u||X()!=this.textarea))try{this.textarea.focus()}catch(t){}},jn.prototype.blur=function(){this.textarea.blur()},jn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},jn.prototype.receivedFocus=function(){this.slowPoll()},jn.prototype.slowPoll=function(){var t=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},jn.prototype.fastPoll=function(){var t=!1,a=this;a.pollingFast=!0;function j(){var M=a.poll();!M&&!t?(t=!0,a.polling.set(60,j)):(a.pollingFast=!1,a.slowPoll())}a.polling.set(20,j)},jn.prototype.poll=function(){var t=this,a=this.cm,j=this.textarea,M=this.prevInput;if(this.contextMenuPending||!a.state.focused||ht(j)&&!M&&!this.composing||a.isReadOnly()||a.options.disableInput||a.state.keySeq)return!1;var K=j.value;if(K==M&&!a.somethingSelected())return!1;if(C&&_>=9&&this.hasSelection===K||o&&/[\uf700-\uf7ff]/.test(K))return a.display.input.reset(),!1;if(a.doc.sel==a.display.selForContextMenu){var re=K.charCodeAt(0);if(re==8203&&!M&&(M="\u200B"),re==8666)return this.reset(),this.cm.execCommand("undo")}for(var se=0,pe=Math.min(M.length,K.length);se<pe&&M.charCodeAt(se)==K.charCodeAt(se);)++se;return wi(a,function(){hs(a,K.slice(se),M.length-se,null,t.composing?"*compose":null),K.length>1e3||K.indexOf(`
|
|
|
`)>-1?j.value=t.prevInput="":t.prevInput=K,t.composing&&(t.composing.range.clear(),t.composing.range=a.markText(t.composing.start,a.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},jn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},jn.prototype.onKeyPress=function(){C&&_>=9&&(this.hasSelection=null),this.fastPoll()},jn.prototype.onContextMenu=function(t){var a=this,j=a.cm,M=j.display,K=a.textarea;a.contextMenuPending&&a.contextMenuPending();var re=Qn(j,t),se=M.scroller.scrollTop;if(!re||c)return;var pe=j.options.resetSelectionOnContextMenu;pe&&j.doc.sel.contains(re)==-1&&Pn(j,bi)(j.doc,Zi(re),_e);var ve=K.style.cssText,Te=a.wrapper.style.cssText,Ue=a.wrapper.offsetParent.getBoundingClientRect();a.wrapper.style.cssText="position: static",K.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(t.clientY-Ue.top-5)+"px; left: "+(t.clientX-Ue.left-5)+`px;
|
|
|
z-index: 1000; background: `+(C?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var We;e&&(We=window.scrollY),M.input.focus(),e&&window.scrollTo(null,We),M.input.reset(),j.somethingSelected()||(K.value=a.prevInput=" "),a.contextMenuPending=et,M.selForContextMenu=j.doc.sel,clearTimeout(M.detectingSelectAll);function tt(){if(K.selectionStart!=null){var ft=j.somethingSelected(),bt="\u200B"+(ft?K.value:"");K.value="\u21DA",K.value=bt,a.prevInput=ft?"":"\u200B",K.selectionStart=1,K.selectionEnd=bt.length,M.selForContextMenu=j.doc.sel}}function et(){if(a.contextMenuPending!=et)return;if(a.contextMenuPending=!1,a.wrapper.style.cssText=Te,K.style.cssText=ve,C&&_<9&&M.scrollbars.setScrollTop(M.scroller.scrollTop=se),K.selectionStart!=null){(!C||C&&_<9)&&tt();var ft=0,bt=function(){M.selForContextMenu==j.doc.sel&&K.selectionStart==0&&K.selectionEnd>0&&a.prevInput=="\u200B"?Pn(j,Is)(j):ft++<10?M.detectingSelectAll=setTimeout(bt,500):(M.selForContextMenu=null,M.input.reset())};M.detectingSelectAll=setTimeout(bt,200)}}if(C&&_>=9&&tt(),D){De(t);var lt=function(){rt(window,"mouseup",lt),setTimeout(et,20)};Ie(window,"mouseup",lt)}else setTimeout(et,50)},jn.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled=t=="nocursor",this.textarea.readOnly=!!t},jn.prototype.setUneditable=function(){},jn.prototype.needsContentAttribute=!1;function iu(t,a){if(a=a?L(a):{},a.value=t.value,!a.tabindex&&t.tabIndex&&(a.tabindex=t.tabIndex),!a.placeholder&&t.placeholder&&(a.placeholder=t.placeholder),a.autofocus==null){var j=X();a.autofocus=j==t||t.getAttribute("autofocus")!=null&&j==document.body}function M(){t.value=pe.getValue()}var K;if(t.form&&(Ie(t.form,"submit",M),!a.leaveSubmitMethodAlone)){var re=t.form;K=re.submit;try{var se=re.submit=function(){M(),re.submit=K,re.submit(),re.submit=se}}catch(ve){}}a.finishInit=function(ve){ve.save=M,ve.getTextArea=function(){return t},ve.toTextArea=function(){ve.toTextArea=isNaN,M(),t.parentNode.removeChild(ve.getWrapperElement()),t.style.display="",t.form&&(rt(t.form,"submit",M),!a.leaveSubmitMethodAlone&&typeof t.form.submit=="function"&&(t.form.submit=K))}},t.style.display="none";var pe=wn(function(ve){return t.parentNode.insertBefore(ve,t.nextSibling)},a);return pe}function au(t){t.off=rt,t.on=Ie,t.wheelEventPixels=so,t.Doc=Ri,t.splitLines=pt,t.countColumn=G,t.findColumn=Oe,t.isWordChar=ne,t.Pass=be,t.signal=ye,t.Line=ii,t.changeEnd=qi,t.scrollbarModel=io,t.Pos=ut,t.cmpPos=kt,t.modes=$t,t.mimeModes=Mt,t.resolveMode=Dt,t.getMode=St,t.modeExtensions=_t,t.extendMode=Et,t.copyState=Bt,t.startState=mt,t.innerMode=Dr,t.commands=_o,t.keyMap=ma,t.keyName=Vs,t.isModifierKey=Ks,t.lookupKey=Ya,t.normalizeKeyMap=Ml,t.StringStream=Ct,t.SharedTextMarker=vo,t.TextMarker=Ta,t.LineWidget=go,t.e_preventDefault=ge,t.e_stopPropagation=Ee,t.e_stop=De,t.addClass=z,t.contains=A,t.rmClass=y,t.keyNames=Sa}Jl(wn),eu(wn);var ou="iter insert remove copy getEditor constructor".split(" ");for(var Vo in Ri.prototype)Ri.prototype.hasOwnProperty(Vo)&&oe(ou,Vo)<0&&(wn.prototype[Vo]=function(t){return function(){return t.apply(this.doc,arguments)}}(Ri.prototype[Vo]));return Ce(Ri),wn.inputStyles={textarea:jn,contenteditable:rn},wn.defineMode=function(t){!wn.defaults.mode&&t!="null"&&(wn.defaults.mode=t),wt.apply(this,arguments)},wn.defineMIME=Jt,wn.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),wn.defineMIME("text/plain","null"),wn.defineExtension=function(t,a){wn.prototype[t]=a},wn.defineDocExtension=function(t,a){Ri.prototype[t]=a},wn.fromTextArea=iu,au(wn),wn.version="5.58.2",wn})},WYAk:function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){(function(){var g=N,S=g.lib,k=S.Base,v=g.enc,m=v.Utf8,C=g.algo,_=C.HMAC=k.extend({init:function(e,h){e=this._hasher=new e.init,typeof h=="string"&&(h=m.parse(h));var r=e.blockSize,c=r*4;h.sigBytes>c&&(h=e.finalize(h)),h.clamp();for(var i=this._oKey=h.clone(),n=this._iKey=h.clone(),l=i.words,f=n.words,d=0;d<r;d++)l[d]^=1549556828,f[d]^=909522486;i.sigBytes=n.sigBytes=c,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var h=this._hasher,r=h.finalize(e);h.reset();var c=h.finalize(this._oKey.clone().concat(r));return c}})})()})},WaYH:function(H,Z,I){"use strict";var N=I("rePB"),g=I("Ff2n"),S=I("VTBJ"),k=I("1OyB"),v=I("vuIU"),m=I("JX7q"),C=I("Ji7U"),_=I("LK+K"),e=I("q1tI"),h=I("TSYQ"),r=I.n(h),c=I("sboe"),i=I("OZM5"),n=function(D){var R=D.prefixCls,y=D.level,x=D.isStart,w=D.isEnd;if(!y)return null;for(var T="".concat(R,"-indent-unit"),F=[],P=0;P<y;P+=1){var A;F.push(e.createElement("span",{key:P,className:r()(T,(A={},Object(N.a)(A,"".concat(T,"-start"),x[P+1]),Object(N.a)(A,"".concat(T,"-end"),w[P+1]),Object(N.a)(A,"".concat(T,"-end-first-level"),!P&&w[0]),A))}))}return e.createElement("span",{"aria-hidden":"true",className:"".concat(R,"-indent")},F)},l=n,f=I("815F"),d="open",u="close",o="---",s=function(p){Object(C.a)(R,p);var D=Object(_.a)(R);function R(){var y;return Object(k.a)(this,R),y=D.apply(this,arguments),y.state={dragNodeHighlight:!1},y.onSelectorClick=function(x){var w=y.props.context.onNodeClick;w(x,Object(f.b)(y.props)),y.isSelectable()?y.onSelect(x):y.onCheck(x)},y.onSelectorDoubleClick=function(x){var w=y.props.context.onNodeDoubleClick;w(x,Object(f.b)(y.props))},y.onSelect=function(x){if(y.isDisabled())return;var w=y.props.context.onNodeSelect;x.preventDefault(),w(x,Object(f.b)(y.props))},y.onCheck=function(x){if(y.isDisabled())return;var w=y.props,T=w.disableCheckbox,F=w.checked,P=y.props.context.onNodeCheck;if(!y.isCheckable()||T)return;x.preventDefault();var A=!F;P(x,Object(f.b)(y.props),A)},y.onMouseEnter=function(x){var w=y.props.context.onNodeMouseEnter;w(x,Object(f.b)(y.props))},y.onMouseLeave=function(x){var w=y.props.context.onNodeMouseLeave;w(x,Object(f.b)(y.props))},y.onContextMenu=function(x){var w=y.props.context.onNodeContextMenu;w(x,Object(f.b)(y.props))},y.onDragStart=function(x){var w=y.props.context.onNodeDragStart;x.stopPropagation(),y.setState({dragNodeHighlight:!0}),w(x,Object(m.a)(y));try{x.dataTransfer.setData("text/plain","")}catch(T){}},y.onDragEnter=function(x){var w=y.props.context.onNodeDragEnter;x.preventDefault(),x.stopPropagation(),w(x,Object(m.a)(y))},y.onDragOver=function(x){var w=y.props.context.onNodeDragOver;x.preventDefault(),x.stopPropagation(),w(x,Object(m.a)(y))},y.onDragLeave=function(x){var w=y.props.context.onNodeDragLeave;x.stopPropagation(),w(x,Object(m.a)(y))},y.onDragEnd=function(x){var w=y.props.context.onNodeDragEnd;x.stopPropagation(),y.setState({dragNodeHighlight:!1}),w(x,Object(m.a)(y))},y.onDrop=function(x){var w=y.props.context.onNodeDrop;x.preventDefault(),x.stopPropagation(),y.setState({dragNodeHighlight:!1}),w(x,Object(m.a)(y))},y.onExpand=function(x){var w=y.props.context.onNodeExpand;w(x,Object(f.b)(y.props))},y.setSelectHandle=function(x){y.selectHandle=x},y.getNodeState=function(){var x=y.props.expanded;return y.isLeaf()?null:x?d:u},y.hasChildren=function(){var x=y.props.eventKey,w=y.props.context.keyEntities,T=w[x]||{},F=T.children;return!!(F||[]).length},y.isLeaf=function(){var x=y.props,w=x.isLeaf,T=x.loaded,F=y.props.context.loadData,P=y.hasChildren();return w===!1?!1:w||!F&&!P||F&&T&&!P},y.isDisabled=function(){var x=y.props.disabled,w=y.props.context.disabled;return!!(w||x)},y.isCheckable=function(){var x=y.props.checkable,w=y.props.context.checkable;return!w||x===!1?!1:w},y.syncLoadData=function(x){var w=x.expanded,T=x.loading,F=x.loaded,P=y.props.context,A=P.loadData,X=P.onNodeLoad;if(T)return;A&&w&&!y.isLeaf()&&(!y.hasChildren()&&!F&&X(Object(f.b)(y.props)))},y.renderSwitcher=function(){var x=y.props,w=x.expanded,T=x.switcherIcon,F=y.props.context,P=F.prefixCls,A=F.switcherIcon,X=T||A;if(y.isLeaf())return e.createElement("span",{className:r()("".concat(P,"-switcher"),"".concat(P,"-switcher-noop"))},typeof X=="function"?X(Object(S.a)(Object(S.a)({},y.props),{},{isLeaf:!0})):X);var z=r()("".concat(P,"-switcher"),"".concat(P,"-switcher_").concat(w?d:u));return e.createElement("span",{onClick:y.onExpand,className:z},typeof X=="function"?X(Object(S.a)(Object(S.a)({},y.props),{},{isLeaf:!1})):X)},y.renderCheckbox=function(){var x=y.props,w=x.checked,T=x.halfChecked,F=x.disableCheckbox,P=y.props.context.prefixCls,A=y.isDisabled(),X=y.isCheckable();if(!X)return null;var z=typeof X!="boolean"?X:null;return e.createElement("span",{className:r()("".concat(P,"-checkbox"),w&&"".concat(P,"-checkbox-checked"),!w&&T&&"".concat(P,"-checkbox-indeterminate"),(A||F)&&"".concat(P,"-checkbox-disabled")),onClick:y.onCheck},z)},y.renderIcon=function(){var x=y.props.loading,w=y.props.context.prefixCls;return e.createElement("span",{className:r()("".concat(w,"-iconEle"),"".concat(w,"-icon__").concat(y.getNodeState()||"docu"),x&&"".concat(w,"-icon_loading"))})},y.renderSelector=function(){var x=y.state.dragNodeHighlight,w=y.props,T=w.title,F=w.selected,P=w.icon,A=w.loading,X=w.data,z=y.props.context,O=z.prefixCls,B=z.showIcon,U=z.icon,L=z.draggable,G=z.loadData,ee=z.titleRender,oe=y.isDisabled(),ae="".concat(O,"-node-content-wrapper"),be;if(B){var _e=P||U;be=_e?e.createElement("span",{className:r()("".concat(O,"-iconEle"),"".concat(O,"-icon__customize"))},typeof _e=="function"?_e(y.props):_e):y.renderIcon()}else G&&A&&(be=y.renderIcon());var fe;typeof T=="function"?fe=T(X):ee?fe=ee(X):fe=T;var Re=e.createElement("span",{className:"".concat(O,"-title")},fe);return e.createElement("span",{ref:y.setSelectHandle,title:typeof T=="string"?T:"",className:r()("".concat(ae),"".concat(ae,"-").concat(y.getNodeState()||"normal"),!oe&&(F||x)&&"".concat(O,"-node-selected"),!oe&&L&&"draggable"),draggable:!oe&&L||void 0,"aria-grabbed":!oe&&L||void 0,onMouseEnter:y.onMouseEnter,onMouseLeave:y.onMouseLeave,onContextMenu:y.onContextMenu,onClick:y.onSelectorClick,onDoubleClick:y.onSelectorDoubleClick,onDragStart:L?y.onDragStart:void 0},be,Re)},y}return Object(v.a)(R,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var x=this.props.selectable,w=this.props.context.selectable;return typeof x=="boolean"?x:w}},{key:"render",value:function(){var x,w=this.props,T=w.eventKey,F=w.className,P=w.style,A=w.dragOver,X=w.dragOverGapTop,z=w.dragOverGapBottom,O=w.isLeaf,B=w.isStart,U=w.isEnd,L=w.expanded,G=w.selected,ee=w.checked,oe=w.halfChecked,ae=w.loading,be=w.domRef,_e=w.active,fe=w.onMouseMove,Re=Object(g.a)(w,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Oe=this.props.context,de=Oe.prefixCls,te=Oe.filterTreeNode,W=Oe.draggable,Y=Oe.keyEntities,V=this.isDisabled(),Q=Object(i.f)(Re),q=Y[T]||{},ie=q.level,ne=U[U.length-1];return e.createElement("div",Object.assign({ref:be,className:r()(F,"".concat(de,"-treenode"),(x={},Object(N.a)(x,"".concat(de,"-treenode-disabled"),V),Object(N.a)(x,"".concat(de,"-treenode-switcher-").concat(L?"open":"close"),!O),Object(N.a)(x,"".concat(de,"-treenode-checkbox-checked"),ee),Object(N.a)(x,"".concat(de,"-treenode-checkbox-indeterminate"),oe),Object(N.a)(x,"".concat(de,"-treenode-selected"),G),Object(N.a)(x,"".concat(de,"-treenode-loading"),ae),Object(N.a)(x,"".concat(de,"-treenode-active"),_e),Object(N.a)(x,"".concat(de,"-treenode-leaf-last"),ne),Object(N.a)(x,"drag-over",!V&&A),Object(N.a)(x,"drag-over-gap-top",!V&&X),Object(N.a)(x,"drag-over-gap-bottom",!V&&z),Object(N.a)(x,"filter-node",te&&te(Object(f.b)(this.props))),x)),style:P,onDragEnter:W?this.onDragEnter:void 0,onDragOver:W?this.onDragOver:void 0,onDragLeave:W?this.onDragLeave:void 0,onDrop:W?this.onDrop:void 0,onDragEnd:W?this.onDragEnd:void 0,onMouseMove:fe},Q),e.createElement(l,{prefixCls:de,level:ie,isStart:B,isEnd:U}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),R}(e.Component),E=function(D){return e.createElement(c.a.Consumer,null,function(R){return e.createElement(s,Object.assign({},D,{context:R}))})};E.displayName="TreeNode",E.defaultProps={title:o},E.isTreeNode=1;var b=Z.a=E},XIdC:function(H,Z,I){"use strict";var N=I("rePB"),g=I("ODXe"),S=I("Ff2n"),k=I("q1tI"),v=I.n(k),m=I("TSYQ"),C=I.n(m),_=I("6cGi"),e=I("4IlW"),h=k.forwardRef(function(r,c){var i,n=r.prefixCls,l=n===void 0?"rc-switch":n,f=r.className,d=r.checked,u=r.defaultChecked,o=r.disabled,s=r.loadingIcon,E=r.checkedChildren,b=r.unCheckedChildren,p=r.onClick,D=r.onChange,R=r.onKeyDown,y=Object(S.a)(r,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),x=Object(_.a)(!1,{value:d,defaultValue:u}),w=Object(g.a)(x,2),T=w[0],F=w[1];function P(O,B){var U=T;return o||(U=O,F(U),D==null||D(U,B)),U}function A(O){O.which===e.a.LEFT?P(!1,O):O.which===e.a.RIGHT&&P(!0,O),R==null||R(O)}function X(O){var B=P(!T,O);p==null||p(B,O)}var z=C()(l,f,(i={},Object(N.a)(i,"".concat(l,"-checked"),T),Object(N.a)(i,"".concat(l,"-disabled"),o),i));return k.createElement("button",Object.assign({},y,{type:"button",role:"switch","aria-checked":T,disabled:o,className:z,ref:c,onKeyDown:A,onClick:X}),s,k.createElement("span",{className:"".concat(l,"-inner")},T?E:b))});h.displayName="Switch",Z.a=h},Y1PL:function(H,Z,I){"use strict";I.r(Z),I.d(Z,"ResizableTextArea",function(){return oe});var N=I("wx14"),g=I("1OyB"),S=I("vuIU"),k=I("Ji7U"),v=I("LK+K"),m=I("q1tI"),C=I("VTBJ"),_=I("rePB"),e=I("Zm9Q"),h=I("Kwbf"),r=I("c+Xe"),c=I("m+aA"),i=I("bdgK"),n=new Map;function l(_e){_e.forEach(function(fe){var Re,Oe=fe.target;(Re=n.get(Oe))===null||Re===void 0||Re.forEach(function(de){return de(Oe)})})}var f=new i.default(l),d=null,u=null;function o(_e,fe){n.has(_e)||(n.set(_e,new Set),f.observe(_e)),n.get(_e).add(fe)}function s(_e,fe){n.has(_e)&&(n.get(_e).delete(fe),n.get(_e).size||(f.unobserve(_e),n.delete(_e)))}var E=function(_e){Object(k.a)(Re,_e);var fe=Object(v.a)(Re);function Re(){return Object(g.a)(this,Re),fe.apply(this,arguments)}return Object(S.a)(Re,[{key:"render",value:function(){return this.props.children}}]),Re}(m.Component),b=m.createContext(null);function p(_e){var fe=_e.children,Re=_e.onBatchResize,Oe=m.useRef(0),de=m.useRef([]),te=m.useContext(b),W=m.useCallback(function(Y,V,Q){Oe.current+=1;var q=Oe.current;de.current.push({size:Y,element:V,data:Q}),Promise.resolve().then(function(){q===Oe.current&&(Re==null||Re(de.current),de.current=[])}),te==null||te(Y,V,Q)},[Re,te]);return m.createElement(b.Provider,{value:W},fe)}function D(_e){var fe=_e.children,Re=_e.disabled,Oe=m.useRef(null),de=m.useRef(null),te=m.useContext(b),W=m.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Y=m.isValidElement(fe)&&Object(r.c)(fe),V=Y?fe.ref:null,Q=m.useMemo(function(){return Object(r.a)(V,Oe)},[V,Oe]),q=m.useRef(_e);q.current=_e;var ie=m.useCallback(function(ne){var J=q.current,$=J.onResize,le=J.data,ce=ne.getBoundingClientRect(),we=ce.width,Fe=ce.height,Xe=ne.offsetWidth,$e=ne.offsetHeight,Ye=Math.floor(we),Ze=Math.floor(Fe);if(W.current.width!==Ye||W.current.height!==Ze||W.current.offsetWidth!==Xe||W.current.offsetHeight!==$e){var qe={width:Ye,height:Ze,offsetWidth:Xe,offsetHeight:$e};W.current=qe;var Pe=Xe===Math.round(we)?we:Xe,Ie=$e===Math.round(Fe)?Fe:$e,Je=Object(C.a)(Object(C.a)({},qe),{},{offsetWidth:Pe,offsetHeight:Ie});te==null||te(Je,ne,le),$&&Promise.resolve().then(function(){$(Je,ne)})}},[]);return m.useEffect(function(){var ne=Object(c.a)(Oe.current)||Object(c.a)(de.current);return ne&&!Re&&o(ne,ie),function(){return s(ne,ie)}},[Oe.current,Re]),m.createElement(E,{ref:de},Y?m.cloneElement(fe,{ref:Q}):fe)}var R="rc-observer-key";function y(_e){var fe=_e.children,Re=Object(e.a)(fe);return Re.map(function(Oe,de){var te=(Oe==null?void 0:Oe.key)||"".concat(R,"-").concat(de);return m.createElement(D,Object(N.a)({},_e,{key:te}),Oe)})}y.Collection=p;var x=y,w=I("bT9E"),T=I("TSYQ"),F=I.n(T),P=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important
|
|
|
`,A=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],X={},z;function O(_e){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Re=_e.getAttribute("id")||_e.getAttribute("data-reactid")||_e.getAttribute("name");if(fe&&X[Re])return X[Re];var Oe=window.getComputedStyle(_e),de=Oe.getPropertyValue("box-sizing")||Oe.getPropertyValue("-moz-box-sizing")||Oe.getPropertyValue("-webkit-box-sizing"),te=parseFloat(Oe.getPropertyValue("padding-bottom"))+parseFloat(Oe.getPropertyValue("padding-top")),W=parseFloat(Oe.getPropertyValue("border-bottom-width"))+parseFloat(Oe.getPropertyValue("border-top-width")),Y=A.map(function(Q){return"".concat(Q,":").concat(Oe.getPropertyValue(Q))}).join(";"),V={sizingStyle:Y,paddingSize:te,borderSize:W,boxSizing:de};return fe&&Re&&(X[Re]=V),V}function B(_e){var fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Oe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;z||(z=document.createElement("textarea"),z.setAttribute("tab-index","-1"),z.setAttribute("aria-hidden","true"),document.body.appendChild(z)),_e.getAttribute("wrap")?z.setAttribute("wrap",_e.getAttribute("wrap")):z.removeAttribute("wrap");var de=O(_e,fe),te=de.paddingSize,W=de.borderSize,Y=de.boxSizing,V=de.sizingStyle;z.setAttribute("style","".concat(V,";").concat(P)),z.value=_e.value||_e.placeholder||"";var Q=Number.MIN_SAFE_INTEGER,q=Number.MAX_SAFE_INTEGER,ie=z.scrollHeight,ne;if(Y==="border-box"?ie+=W:Y==="content-box"&&(ie-=te),Re!==null||Oe!==null){z.value=" ";var J=z.scrollHeight-te;Re!==null&&(Q=J*Re,Y==="border-box"&&(Q=Q+te+W),ie=Math.max(Q,ie)),Oe!==null&&(q=J*Oe,Y==="border-box"&&(q=q+te+W),ne=ie>q?"":"hidden",ie=Math.min(q,ie))}return{height:ie,minHeight:Q,maxHeight:q,overflowY:ne,resize:"none"}}var U=I("Gytx"),L=I.n(U),G;(function(_e){_e[_e.NONE=0]="NONE",_e[_e.RESIZING=1]="RESIZING",_e[_e.RESIZED=2]="RESIZED"})(G||(G={}));var ee=function(_e){Object(k.a)(Re,_e);var fe=Object(v.a)(Re);function Re(Oe){var de;return Object(g.a)(this,Re),de=fe.call(this,Oe),de.nextFrameActionId=void 0,de.resizeFrameId=void 0,de.textArea=void 0,de.saveTextArea=function(te){de.textArea=te},de.handleResize=function(te){var W=de.state.resizeStatus,Y=de.props,V=Y.autoSize,Q=Y.onResize;if(W!==G.NONE)return;typeof Q=="function"&&Q(te),V&&de.resizeOnNextFrame()},de.resizeOnNextFrame=function(){cancelAnimationFrame(de.nextFrameActionId),de.nextFrameActionId=requestAnimationFrame(de.resizeTextarea)},de.resizeTextarea=function(){var te=de.props.autoSize;if(!te||!de.textArea)return;var W=te.minRows,Y=te.maxRows,V=B(de.textArea,!1,W,Y);de.setState({textareaStyles:V,resizeStatus:G.RESIZING},function(){cancelAnimationFrame(de.resizeFrameId),de.resizeFrameId=requestAnimationFrame(function(){de.setState({resizeStatus:G.RESIZED},function(){de.resizeFrameId=requestAnimationFrame(function(){de.setState({resizeStatus:G.NONE}),de.fixFirefoxAutoScroll()})})})})},de.renderTextArea=function(){var te=de.props,W=te.prefixCls,Y=W===void 0?"rc-textarea":W,V=te.autoSize,Q=te.onResize,q=te.className,ie=te.disabled,ne=de.state,J=ne.textareaStyles,$=ne.resizeStatus,le=Object(w.a)(de.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ce=F()(Y,q,Object(_.a)({},"".concat(Y,"-disabled"),ie));"value"in le&&(le.value=le.value||"");var we=Object(C.a)(Object(C.a)(Object(C.a)({},de.props.style),J),$===G.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return m.createElement(x,{onResize:de.handleResize,disabled:!(V||Q)},m.createElement("textarea",Object(N.a)({},le,{className:ce,style:we,ref:de.saveTextArea})))},de.state={textareaStyles:{},resizeStatus:G.NONE},de}return Object(S.a)(Re,[{key:"componentDidUpdate",value:function(de){(de.value!==this.props.value||!L()(de.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 de=this.textArea.selectionStart,te=this.textArea.selectionEnd;this.textArea.setSelectionRange(de,te)}}catch(W){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Re}(m.Component),oe=ee,ae=function(_e){Object(k.a)(Re,_e);var fe=Object(v.a)(Re);function Re(Oe){var de;Object(g.a)(this,Re),de=fe.call(this,Oe),de.resizableTextArea=void 0,de.focus=function(){de.resizableTextArea.textArea.focus()},de.saveTextArea=function(W){de.resizableTextArea=W},de.handleChange=function(W){var Y=de.props.onChange;de.setValue(W.target.value,function(){de.resizableTextArea.resizeTextarea()}),Y&&Y(W)},de.handleKeyDown=function(W){var Y=de.props,V=Y.onPressEnter,Q=Y.onKeyDown;W.keyCode===13&&V&&V(W),Q&&Q(W)};var te=typeof Oe.value=="undefined"||Oe.value===null?Oe.defaultValue:Oe.value;return de.state={value:te},de}return Object(S.a)(Re,[{key:"setValue",value:function(de,te){"value"in this.props||this.setState({value:de},te)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return m.createElement(oe,Object(N.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(de){return"value"in de?{value:de.value}:null}}]),Re}(m.Component),be=Z.default=ae},ZD9Y:function(H,Z,I){"use strict";var N=I("BoS7"),g=I("Sdc0"),S=I("OaEy"),k=I("2fM7"),v=I("q1tI"),m=I.n(v),C=I("lOMy"),_=I.n(C),e=k.a.Option;Z.a=function(h){var r=h.onFontSizeChange,c=h.cmFontSize,i=h.cmCodeMode,n=h.onCodeModeChange,l=h.onTabToSpace,f=h.className,d=f===void 0?"":f,u=h.tabToSpace,o=h.children;return m.a.createElement("div",{className:"tpi-code-setting ".concat(d)},m.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),m.a.createElement("section",null,m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),m.a.createElement(k.a,{bordered:!1,size:"small",value:i,onChange:n},m.a.createElement(e,{value:"vs"},"\u767D\u8272\u80CC\u666F"),m.a.createElement(e,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),m.a.createElement(k.a,{bordered:!1,size:"small",value:c,onChange:r},m.a.createElement(e,{value:12},"12px"),m.a.createElement(e,{value:14},"14px"),m.a.createElement(e,{value:16},"16px"),m.a.createElement(e,{value:18},"18px"),m.a.createElement(e,{value:20},"20px"),m.a.createElement(e,{value:22},"22px"))),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"Tab\u8F6C\u6362"),m.a.createElement(g.a,{checked:u,onChange:l}))),m.a.createElement("h3",null,"\u5FEB\u6377\u952E"),m.a.createElement("section",null,m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),m.a.createElement("span",null,"Ctrl + S")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),m.a.createElement("span",null,"F1 / Alt + F1")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),m.a.createElement("span",null,"Ctrl + ]/[")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),m.a.createElement("span",null,"Ctrl + Shift + \\")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),m.a.createElement("span",null,"Home")),m.a.createElement("div",{className:"file-item"},m.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),m.a.createElement("span",null,"End"))),o)}},ZW9T:function(H,Z,I){"use strict";I.d(Z,"a",function(){return U});var N=I("k1fw"),g=I("oBTY"),S=I("miYZ"),k=I("tsqr"),v=I("rAM+"),m=I("tJVT"),C=I("PpiC"),_=I("q1tI"),e=I.n(_),h=I("bdgK"),r=I("9og8"),c=I("WmNS"),i=I.n(c),n={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},l={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},f={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
|
`)}]},d={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
|
`)}]},u=I("5VLF"),o=I.n(u),s={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},E=function(G,ee){return ee.map(function(oe){return{label:oe,kind:G.languages.CompletionItemKind.Keyword,insertText:oe}})},b=function(G){return Object.keys(s.tables).map(function(ee){return{label:ee,kind:G.languages.CompletionItemKind.Variable,insertText:ee}})},p=function(G,ee){var oe=s.tables[G];return oe?oe.map(function(ae){return{label:ae,kind:ee.languages.CompletionItemKind.Field,insertText:ae}}):[]};function D(L,G,ee,oe,ae){var be=G.getWordUntilPosition(ee),_e={startLineNumber:ee.lineNumber,endLineNumber:ee.lineNumber,startColumn:be.startColumn,endColumn:be.endColumn},fe=oe.map(function(Re){return{label:Re,kind:L.languages.CompletionItemKind.Keyword,insertText:Re,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:_e}});return ae.map(function(Re){fe.push(Object(N.a)(Object(N.a)({},Re),{},{range:_e}))}),fe}var R=function(L){s.languages.map(function(ae){return L.languages.registerDocumentFormattingEditProvider(ae,{provideDocumentFormattingEdits:function(_e,fe,Re){return Object(r.a)(i.a.mark(function Oe(){var de;return i.a.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:return de=o()(_e.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),W.abrupt("return",[{range:_e.getFullModelRange(),text:de}]);case 2:case"end":return W.stop()}},Oe)}))()}}),ae});var G=f.quickKey.map(function(ae){return{label:ae.label,kind:L.languages.CompletionItemKind.Method,insertText:ae.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ee=d.quickKey.map(function(ae){return{label:ae.label,kind:L.languages.CompletionItemKind.Method,insertText:ae.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),oe=l.quickKey.map(function(ae){return{label:ae.label,kind:L.languages.CompletionItemKind.Method,insertText:ae.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet}});L.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(be,_e){var fe=be.getWordUntilPosition(_e),Re={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn},Oe=be.getLineContent(_e.lineNumber).substring(fe.startColumn-2,fe.endColumn);return{suggestions:[].concat(Object(g.a)(f.keywords.map(function(de){return{label:de,kind:L.languages.CompletionItemKind.Function,documentation:de,insertText:de,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(g.a)(f.quickKey.map(function(de){return{label:de.label,kind:L.languages.CompletionItemKind.Function,documentation:de.content,insertText:Oe.startsWith("#")?de.content.replace(/#/,""):de.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}}),L.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(be,_e){var fe=be.getWordUntilPosition(_e),Re={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn};return{suggestions:Object(g.a)(n.keywords.map(function(Oe){return{label:Oe,kind:L.languages.CompletionItemKind.Function,documentation:Oe,insertText:Oe,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}}))}}}),L.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(be,_e){var fe=be.getWordUntilPosition(_e),Re={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn},Oe=be.getLineContent(_e.lineNumber).substring(fe.startColumn-2,fe.endColumn);return{suggestions:[].concat(Object(g.a)(l.keywords.map(function(de){return{label:de,kind:L.languages.CompletionItemKind.Function,documentation:de,insertText:de,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(g.a)(l.quickKey.map(function(de){return{label:de.label,kind:L.languages.CompletionItemKind.Function,documentation:de.content,insertText:Oe.startsWith("#")?de.content.replace(/#/,""):de.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}}),L.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(be,_e){var fe=be.getWordUntilPosition(_e),Re={startLineNumber:_e.lineNumber,endLineNumber:_e.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn},Oe=be.getLineContent(_e.lineNumber).substring(fe.startColumn-2,fe.endColumn);return{suggestions:[].concat(Object(g.a)(d.keywords.map(function(de){return{label:de,kind:L.languages.CompletionItemKind.Function,documentation:de,insertText:de,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})),Object(g.a)(d.quickKey.map(function(de){return{label:de.label,kind:L.languages.CompletionItemKind.Function,documentation:de.content,insertText:Oe.startsWith("#")?de.content.replace(/#/,""):de.content,insertTextRules:L.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Re}})))}}})},y="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",x=I("fjLI"),w=I("LvDl"),T=I("+ua5");function F(L){return/^\d+$/.test(L)?"".concat(L,"px"):L}function P(){}var A=!1,X={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function z(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],G=L;if(Array.isArray(L)){for(var ee=0;ee<L.length;ee++){var oe=X[L[ee]];if(oe)return oe}return G[0]}return X[G]||G}var O=null,B=Z.b=function(L){var G=L.width,ee=G===void 0?"100%":G,oe=L.height,ae=oe===void 0?"100%":oe,be=L.value,_e=L.language,fe=_e===void 0?"javascript":_e,Re=L.style,Oe=Re===void 0?{}:Re,de=L.options,te=de===void 0?{}:de,W=L.overrideServices,Y=W===void 0?{}:W,V=L.theme,Q=V===void 0?"vs-dark":V,q=L.onEditBlur,ie=L.onSave,ne=L.autoHeight,J=ne===void 0?!1:ne,$=L.forbidCopy,le=$===void 0?!1:$,ce=L.onChange,we=ce===void 0?P:ce,Fe=L.editorDidMount,Xe=Fe===void 0?P:Fe,$e=L.onFocus,Ye=$e===void 0?P:$e,Ze=L.filename,qe=Ze===void 0?"educoder.txt":Ze,Pe=L.errorLine,Ie=L.errorContent,Je=Ie===void 0?"":Ie,rt=Object(C.a)(L,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),ye=Object(_.useRef)(),ue=Object(_.useRef)({}),he=Object(_.useRef)(),me=Object(_.useRef)(),Ce=Object(_.useRef)(!1),ge=Object(_.useRef)(),Ee=Object(_.useState)(!1),Ae=Object(m.a)(Ee,2),De=Ae[0],Me=Ae[1];function He(){var _t;return ye.current&&(_t=new h.default(function(Et){var Bt=Object(v.a)(Et),Dr;try{for(Bt.s();!(Dr=Bt.n()).done;){var mt=Dr.value;(mt.target.offsetHeight>0||mt.target.offsetWidth>0)&&ue.current.instance.layout()}}catch(Ct){Bt.e(Ct)}finally{Bt.f()}}),_t.observe(ye.current)),_t}function nt(){k.b.warn(decodeURIComponent(y))}var at=function(){var Et=ue.current.instance;if(be!=null&&Et&&De){var Bt=Et.getModel();Bt&&be!==Bt.getValue()&&(A=!0,Bt.setValue(be),Et.layout(),A=!1)}};Object(_.useEffect)(function(){me.current&&clearTimeout(me.current),me.current=setTimeout(function(){at()},500)},[be,De,ue.current]),Object(_.useEffect)(function(){if(Pe&&ue.current&&ue.current.instance){var _t=ue.current.instance;_t.changeViewZones(function(Bt){var Dr=document.createElement("div");Dr.style.padding="10px 20px",Dr.style.width="calc(100% - 20px)",Dr.className="my-error-line-wrp",Dr.innerHTML=Je,Bt.addZone({afterLineNumber:Pe||11,heightInLines:3,domNode:Dr})});var Et={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};_t.addOverlayWidget(Et),_t.revealPositionInCenter({lineNumber:20,column:1})}},[Pe,ue.current,De]);function it(){var _t=ue.current.instance;if(_t){var Et=_t.getSelection(),Bt=ue.current.pastePos||{},Dr=new O.Range(Bt.startLineNumber||Et.endLineNumber,Bt.startColumn||Et.endColumn,Bt.endLineNumber||Et.endLineNumber,Bt.endColumn||Et.endColumn);setTimeout(function(){_t.executeEdits("",[{range:Dr,text:""}])},300)}}function st(_t){(window.navigator.platform.match("Mac")?_t.metaKey:_t.ctrlKey)&&_t.keyCode==83&&(_t.preventDefault(),ie())}var Tt=function(){if(J&&ue.current.instance){var Et=ue.current.instance.getContentHeight();Dt(Et<ae?ae:Et)}else Dt(ae)};function pt(_t){var Et=document.createEvent("MouseEvents");Et.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),_t.dispatchEvent(Et)}function ht(_t,Et){var Bt=window.URL||window.webkitURL||window,Dr=new Blob([Et]),mt=document.createElementNS("http://www.w3.org/1999/xhtml","a");mt.href=Bt.createObjectURL(Dr),mt.download=_t,pt(mt)}Object(_.useEffect)(function(){Tt()},[Tt]),Object(_.useEffect)(function(){ye.current&&!De&&Promise.all([I.e(18),I.e(29)]).then(I.t.bind(null,"M/lh",7)).then(function(_t){try{O=_t,ue.current.instance=O.editor.create(ye.current,{value:be,language:z(fe),theme:Q,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Y);var Et=ue.current.instance,Bt=x.d._menuItems,Dr=Object(g.a)(Bt).find(function(Gt){return Gt[0]._debugName=="EditorContext"}),mt=Dr[1],Ct=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],dt=function(yt,xt){var Kt=yt._first;do{var Ar,qt,ut=xt.includes((Ar=Kt.element)===null||Ar===void 0||((qt=Ar.command)===null||qt===void 0)?void 0:qt.id);ut&&yt._remove(Kt)}while(Kt=Kt.next)};if(Xe(Et,O),setTimeout(function(){Tt(),ue.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){ht(qe||"educoder.txt",Et.getValue())}}),Et.getDomNode().addEventListener("input",function(){he.current.autoFormat&&Et.getAction("editor.action.formatDocument").run()})},500),ue.current.subscription=Et.onDidChangeModelContent(function(Gt){Ce.current?clearTimeout(ge.current):(Tt(),we(Et.getValue(),Gt)),ge.current=setTimeout(function(){Ce.current=!1},500)}),window.Monaco||R(O,z(fe)),le&&(dt(mt,Ct),ye.current.classList.add("noCopyPaste"),Et.onKeyDown(function(Gt){var yt=Gt.keyCode,xt=Gt.ctrlKey,Kt=Gt.metaKey;(yt===33||yt===52)&&(Kt||xt)&&(nt(),Gt.preventDefault())})),window.Monaco=O,q&&Et.onDidBlurEditorWidget(function(){q(Et.getValue())}),Ye&&Et.onDidFocusEditorText(function(){Ye(Et.getValue())}),le){Et.addCommand(O.KeyMod.CtrlCmd|O.KeyCode.KEY_V,function(){return nt(),null}),Et.onDidPaste(function(Gt){ue.current.pastePos=Gt});try{window.addEventListener("paste",it)}catch(Gt){}}var Ht=He();return Me(!0),function(){var Gt=ue.current.instance;Gt.dispose();var yt=Gt.getModel();yt&&yt.dispose(),ue.current.subscription&&ue.current.subscription.dispose(),le&&window.removeEventListener("paste",it),Ht.unobserve(ye.current)}}catch(Gt){}})},[]),Object(_.useEffect)(function(){var _t=ue.current.instance;if(_t&&De)return document.addEventListener("keydown",st,!1),function(){document.removeEventListener("keydown",st)}},[ie,De]),Object(_.useEffect)(function(){var _t=ue.current.instance;if(_t&&De){var Et=z(fe);O.editor.setModelLanguage(_t.getModel(),Et),console.log("language:",fe,_t.getModel(),Et)}},[fe,De]),Object(_.useEffect)(function(){var _t=ue.current.instance;_t&&De&&O.editor.setTheme(Q)},[Q,De]),Object(_.useEffect)(function(){var _t=ue.current.instance;he.current=te,_t&&De&&(_t.updateOptions(Object(N.a)({},te)),setTimeout(function(){_t.getModel().updateOptions(Object(N.a)({},te))},200))},[JSON.stringify(te),De]),Object(_.useEffect)(function(){var _t=ue.current.instance;_t&&De&&_t.layout()},[ee,ae,De]);var Ft=Object(_.useState)(F(ee)),Lt=Object(m.a)(Ft,2),Yt=Lt[0],$t=Lt[1],Mt=Object(_.useState)(F(ae)),wt=Object(m.a)(Mt,2),Jt=wt[0],Dt=wt[1],St=Object(N.a)(Object(N.a)({},Oe),{},{width:Yt,height:Jt});return e.a.createElement("div",{className:"my-monaco-editor",ref:ye,style:St})};function U(L){var G=L.width,ee=G===void 0?"100%":G,oe=L.height,ae=oe===void 0?"100%":oe,be=L.original,_e=L.modified,fe=L.language,Re=L.options,Oe=Re===void 0?{}:Re,de=Object(_.useRef)(),te=Object(_.useState)(null),W=Object(m.a)(te,2),Y=W[0],V=W[1];function Q(J){var $;return de.current&&($=new h.default(function(le){var ce=Object(v.a)(le),we;try{for(ce.s();!(we=ce.n()).done;){var Fe=we.value;(Fe.target.offsetHeight>0||Fe.target.offsetWidth>0)&&J.layout()}}catch(Xe){ce.e(Xe)}finally{ce.f()}}),$.observe(de.current)),$}Object(_.useEffect)(function(){de.current&&Promise.all([I.e(18),I.e(29)]).then(I.t.bind(null,"M/lh",7)).then(function(J){O=J;var $=O.editor.createDiffEditor(de.current,Object(N.a)(Object(N.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Oe),{},{wordWrap:!0}));V($);var le=Q($);return function(){$.dispose();var ce=$.getModel();ce&&ce.dispose(),le.unobserve(de.current)}})},[]),Object(_.useEffect)(function(){Y&&Y.setModel({original:O.editor.createModel(be,fe),modified:O.editor.createModel(_e,fe)})},[be,_e,fe,Y]);var q=F(ee),ie=F(ae),ne={width:q,height:ie};return e.a.createElement("div",{className:"my-diff-editor",ref:de,style:ne})}},Zss7:function(H,Z,I){var N;(function(g){var S=/^\s+/,k=/\s+$/,v=0,m=g.round,C=g.min,_=g.max,e=g.random;function h(W,Y){if(W=W||"",Y=Y||{},W instanceof h)return W;if(!(this instanceof h))return new h(W,Y);var V=r(W);this._originalInput=W,this._r=V.r,this._g=V.g,this._b=V.b,this._a=V.a,this._roundA=m(100*this._a)/100,this._format=Y.format||V.format,this._gradientType=Y.gradientType,this._r<1&&(this._r=m(this._r)),this._g<1&&(this._g=m(this._g)),this._b<1&&(this._b=m(this._b)),this._ok=V.ok,this._tc_id=v++}h.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 W=this.toRgb();return(W.r*299+W.g*587+W.b*114)/1e3},getLuminance:function(){var W=this.toRgb(),Y,V,Q,q,ie,ne;return Y=W.r/255,V=W.g/255,Q=W.b/255,Y<=.03928?q=Y/12.92:q=g.pow((Y+.055)/1.055,2.4),V<=.03928?ie=V/12.92:ie=g.pow((V+.055)/1.055,2.4),Q<=.03928?ne=Q/12.92:ne=g.pow((Q+.055)/1.055,2.4),.2126*q+.7152*ie+.0722*ne},setAlpha:function(W){return this._a=B(W),this._roundA=m(100*this._a)/100,this},toHsv:function(){var W=l(this._r,this._g,this._b);return{h:W.h*360,s:W.s,v:W.v,a:this._a}},toHsvString:function(){var W=l(this._r,this._g,this._b),Y=m(W.h*360),V=m(W.s*100),Q=m(W.v*100);return this._a==1?"hsv("+Y+", "+V+"%, "+Q+"%)":"hsva("+Y+", "+V+"%, "+Q+"%, "+this._roundA+")"},toHsl:function(){var W=i(this._r,this._g,this._b);return{h:W.h*360,s:W.s,l:W.l,a:this._a}},toHslString:function(){var W=i(this._r,this._g,this._b),Y=m(W.h*360),V=m(W.s*100),Q=m(W.l*100);return this._a==1?"hsl("+Y+", "+V+"%, "+Q+"%)":"hsla("+Y+", "+V+"%, "+Q+"%, "+this._roundA+")"},toHex:function(W){return d(this._r,this._g,this._b,W)},toHexString:function(W){return"#"+this.toHex(W)},toHex8:function(W){return u(this._r,this._g,this._b,this._a,W)},toHex8String:function(W){return"#"+this.toHex8(W)},toRgb:function(){return{r:m(this._r),g:m(this._g),b:m(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+m(this._r)+", "+m(this._g)+", "+m(this._b)+")":"rgba("+m(this._r)+", "+m(this._g)+", "+m(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:m(U(this._r,255)*100)+"%",g:m(U(this._g,255)*100)+"%",b:m(U(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%)":"rgba("+m(U(this._r,255)*100)+"%, "+m(U(this._g,255)*100)+"%, "+m(U(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:z[d(this._r,this._g,this._b,!0)]||!1},toFilter:function(W){var Y="#"+o(this._r,this._g,this._b,this._a),V=Y,Q=this._gradientType?"GradientType = 1, ":"";if(W){var q=h(W);V="#"+o(q._r,q._g,q._b,q._a)}return"progid:DXImageTransform.Microsoft.gradient("+Q+"startColorstr="+Y+",endColorstr="+V+")"},toString:function(W){var Y=!!W;W=W||this._format;var V=!1,Q=this._a<1&&this._a>=0,q=!Y&&Q&&(W==="hex"||W==="hex6"||W==="hex3"||W==="hex4"||W==="hex8"||W==="name");return q?W==="name"&&this._a===0?this.toName():this.toRgbString():(W==="rgb"&&(V=this.toRgbString()),W==="prgb"&&(V=this.toPercentageRgbString()),(W==="hex"||W==="hex6")&&(V=this.toHexString()),W==="hex3"&&(V=this.toHexString(!0)),W==="hex4"&&(V=this.toHex8String(!0)),W==="hex8"&&(V=this.toHex8String()),W==="name"&&(V=this.toName()),W==="hsl"&&(V=this.toHslString()),W==="hsv"&&(V=this.toHsvString()),V||this.toHexString())},clone:function(){return h(this.toString())},_applyModification:function(W,Y){var V=W.apply(null,[this].concat([].slice.call(Y)));return this._r=V._r,this._g=V._g,this._b=V._b,this.setAlpha(V._a),this},lighten:function(){return this._applyModification(p,arguments)},brighten:function(){return this._applyModification(D,arguments)},darken:function(){return this._applyModification(R,arguments)},desaturate:function(){return this._applyModification(s,arguments)},saturate:function(){return this._applyModification(E,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(y,arguments)},_applyCombination:function(W,Y){return W.apply(null,[this].concat([].slice.call(Y)))},analogous:function(){return this._applyCombination(P,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(F,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},h.fromRatio=function(W,Y){if(typeof W=="object"){var V={};for(var Q in W)W.hasOwnProperty(Q)&&(Q==="a"?V[Q]=W[Q]:V[Q]=be(W[Q]));W=V}return h(W,Y)};function r(W){var Y={r:0,g:0,b:0},V=1,Q=null,q=null,ie=null,ne=!1,J=!1;return typeof W=="string"&&(W=de(W)),typeof W=="object"&&(Oe(W.r)&&Oe(W.g)&&Oe(W.b)?(Y=c(W.r,W.g,W.b),ne=!0,J=String(W.r).substr(-1)==="%"?"prgb":"rgb"):Oe(W.h)&&Oe(W.s)&&Oe(W.v)?(Q=be(W.s),q=be(W.v),Y=f(W.h,Q,q),ne=!0,J="hsv"):Oe(W.h)&&Oe(W.s)&&Oe(W.l)&&(Q=be(W.s),ie=be(W.l),Y=n(W.h,Q,ie),ne=!0,J="hsl"),W.hasOwnProperty("a")&&(V=W.a)),V=B(V),{ok:ne,format:W.format||J,r:C(255,_(Y.r,0)),g:C(255,_(Y.g,0)),b:C(255,_(Y.b,0)),a:V}}function c(W,Y,V){return{r:U(W,255)*255,g:U(Y,255)*255,b:U(V,255)*255}}function i(W,Y,V){W=U(W,255),Y=U(Y,255),V=U(V,255);var Q=_(W,Y,V),q=C(W,Y,V),ie,ne,J=(Q+q)/2;if(Q==q)ie=ne=0;else{var $=Q-q;ne=J>.5?$/(2-Q-q):$/(Q+q);switch(Q){case W:ie=(Y-V)/$+(Y<V?6:0);break;case Y:ie=(V-W)/$+2;break;case V:ie=(W-Y)/$+4;break}ie/=6}return{h:ie,s:ne,l:J}}function n(W,Y,V){var Q,q,ie;W=U(W,360),Y=U(Y,100),V=U(V,100);function ne(le,ce,we){return we<0&&(we+=1),we>1&&(we-=1),we<1/6?le+(ce-le)*6*we:we<1/2?ce:we<2/3?le+(ce-le)*(2/3-we)*6:le}if(Y===0)Q=q=ie=V;else{var J=V<.5?V*(1+Y):V+Y-V*Y,$=2*V-J;Q=ne($,J,W+1/3),q=ne($,J,W),ie=ne($,J,W-1/3)}return{r:Q*255,g:q*255,b:ie*255}}function l(W,Y,V){W=U(W,255),Y=U(Y,255),V=U(V,255);var Q=_(W,Y,V),q=C(W,Y,V),ie,ne,J=Q,$=Q-q;if(ne=Q===0?0:$/Q,Q==q)ie=0;else{switch(Q){case W:ie=(Y-V)/$+(Y<V?6:0);break;case Y:ie=(V-W)/$+2;break;case V:ie=(W-Y)/$+4;break}ie/=6}return{h:ie,s:ne,v:J}}function f(W,Y,V){W=U(W,360)*6,Y=U(Y,100),V=U(V,100);var Q=g.floor(W),q=W-Q,ie=V*(1-Y),ne=V*(1-q*Y),J=V*(1-(1-q)*Y),$=Q%6,le=[V,ne,ie,ie,J,V][$],ce=[J,V,V,ne,ie,ie][$],we=[ie,ie,J,V,V,ne][$];return{r:le*255,g:ce*255,b:we*255}}function d(W,Y,V,Q){var q=[ae(m(W).toString(16)),ae(m(Y).toString(16)),ae(m(V).toString(16))];return Q&&q[0].charAt(0)==q[0].charAt(1)&&q[1].charAt(0)==q[1].charAt(1)&&q[2].charAt(0)==q[2].charAt(1)?q[0].charAt(0)+q[1].charAt(0)+q[2].charAt(0):q.join("")}function u(W,Y,V,Q,q){var ie=[ae(m(W).toString(16)),ae(m(Y).toString(16)),ae(m(V).toString(16)),ae(_e(Q))];return q&&ie[0].charAt(0)==ie[0].charAt(1)&&ie[1].charAt(0)==ie[1].charAt(1)&&ie[2].charAt(0)==ie[2].charAt(1)&&ie[3].charAt(0)==ie[3].charAt(1)?ie[0].charAt(0)+ie[1].charAt(0)+ie[2].charAt(0)+ie[3].charAt(0):ie.join("")}function o(W,Y,V,Q){var q=[ae(_e(Q)),ae(m(W).toString(16)),ae(m(Y).toString(16)),ae(m(V).toString(16))];return q.join("")}h.equals=function(W,Y){return!W||!Y?!1:h(W).toRgbString()==h(Y).toRgbString()},h.random=function(){return h.fromRatio({r:e(),g:e(),b:e()})};function s(W,Y){Y=Y===0?0:Y||10;var V=h(W).toHsl();return V.s-=Y/100,V.s=L(V.s),h(V)}function E(W,Y){Y=Y===0?0:Y||10;var V=h(W).toHsl();return V.s+=Y/100,V.s=L(V.s),h(V)}function b(W){return h(W).desaturate(100)}function p(W,Y){Y=Y===0?0:Y||10;var V=h(W).toHsl();return V.l+=Y/100,V.l=L(V.l),h(V)}function D(W,Y){Y=Y===0?0:Y||10;var V=h(W).toRgb();return V.r=_(0,C(255,V.r-m(255*-(Y/100)))),V.g=_(0,C(255,V.g-m(255*-(Y/100)))),V.b=_(0,C(255,V.b-m(255*-(Y/100)))),h(V)}function R(W,Y){Y=Y===0?0:Y||10;var V=h(W).toHsl();return V.l-=Y/100,V.l=L(V.l),h(V)}function y(W,Y){var V=h(W).toHsl(),Q=(V.h+Y)%360;return V.h=Q<0?360+Q:Q,h(V)}function x(W){var Y=h(W).toHsl();return Y.h=(Y.h+180)%360,h(Y)}function w(W){var Y=h(W).toHsl(),V=Y.h;return[h(W),h({h:(V+120)%360,s:Y.s,l:Y.l}),h({h:(V+240)%360,s:Y.s,l:Y.l})]}function T(W){var Y=h(W).toHsl(),V=Y.h;return[h(W),h({h:(V+90)%360,s:Y.s,l:Y.l}),h({h:(V+180)%360,s:Y.s,l:Y.l}),h({h:(V+270)%360,s:Y.s,l:Y.l})]}function F(W){var Y=h(W).toHsl(),V=Y.h;return[h(W),h({h:(V+72)%360,s:Y.s,l:Y.l}),h({h:(V+216)%360,s:Y.s,l:Y.l})]}function P(W,Y,V){Y=Y||6,V=V||30;var Q=h(W).toHsl(),q=360/V,ie=[h(W)];for(Q.h=(Q.h-(q*Y>>1)+720)%360;--Y;)Q.h=(Q.h+q)%360,ie.push(h(Q));return ie}function A(W,Y){Y=Y||6;for(var V=h(W).toHsv(),Q=V.h,q=V.s,ie=V.v,ne=[],J=1/Y;Y--;)ne.push(h({h:Q,s:q,v:ie})),ie=(ie+J)%1;return ne}h.mix=function(W,Y,V){V=V===0?0:V||50;var Q=h(W).toRgb(),q=h(Y).toRgb(),ie=V/100,ne={r:(q.r-Q.r)*ie+Q.r,g:(q.g-Q.g)*ie+Q.g,b:(q.b-Q.b)*ie+Q.b,a:(q.a-Q.a)*ie+Q.a};return h(ne)},h.readability=function(W,Y){var V=h(W),Q=h(Y);return(g.max(V.getLuminance(),Q.getLuminance())+.05)/(g.min(V.getLuminance(),Q.getLuminance())+.05)},h.isReadable=function(W,Y,V){var Q=h.readability(W,Y),q,ie;ie=!1,q=te(V);switch(q.level+q.size){case"AAsmall":case"AAAlarge":ie=Q>=4.5;break;case"AAlarge":ie=Q>=3;break;case"AAAsmall":ie=Q>=7;break}return ie},h.mostReadable=function(W,Y,V){var Q=null,q=0,ie,ne,J,$;V=V||{},ne=V.includeFallbackColors,J=V.level,$=V.size;for(var le=0;le<Y.length;le++)ie=h.readability(W,Y[le]),ie>q&&(q=ie,Q=h(Y[le]));return h.isReadable(W,Q,{level:J,size:$})||!ne?Q:(V.includeFallbackColors=!1,h.mostReadable(W,["#fff","#000"],V))};var X=h.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"},z=h.hexNames=O(X);function O(W){var Y={};for(var V in W)W.hasOwnProperty(V)&&(Y[W[V]]=V);return Y}function B(W){return W=parseFloat(W),(isNaN(W)||W<0||W>1)&&(W=1),W}function U(W,Y){ee(W)&&(W="100%");var V=oe(W);return W=C(Y,_(0,parseFloat(W))),V&&(W=parseInt(W*Y,10)/100),g.abs(W-Y)<1e-6?1:W%Y/parseFloat(Y)}function L(W){return C(1,_(0,W))}function G(W){return parseInt(W,16)}function ee(W){return typeof W=="string"&&W.indexOf(".")!=-1&&parseFloat(W)===1}function oe(W){return typeof W=="string"&&W.indexOf("%")!=-1}function ae(W){return W.length==1?"0"+W:""+W}function be(W){return W<=1&&(W=W*100+"%"),W}function _e(W){return g.round(parseFloat(W)*255).toString(16)}function fe(W){return G(W)/255}var Re=function(){var W="[-\\+]?\\d+%?",Y="[-\\+]?\\d*\\.\\d+%?",V="(?:"+Y+")|(?:"+W+")",Q="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",q="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?";return{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+Q),rgba:new RegExp("rgba"+q),hsl:new RegExp("hsl"+Q),hsla:new RegExp("hsla"+q),hsv:new RegExp("hsv"+Q),hsva:new RegExp("hsva"+q),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 Oe(W){return!!Re.CSS_UNIT.exec(W)}function de(W){W=W.replace(S,"").replace(k,"").toLowerCase();var Y=!1;if(X[W])W=X[W],Y=!0;else if(W=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var V;return(V=Re.rgb.exec(W))?{r:V[1],g:V[2],b:V[3]}:(V=Re.rgba.exec(W))?{r:V[1],g:V[2],b:V[3],a:V[4]}:(V=Re.hsl.exec(W))?{h:V[1],s:V[2],l:V[3]}:(V=Re.hsla.exec(W))?{h:V[1],s:V[2],l:V[3],a:V[4]}:(V=Re.hsv.exec(W))?{h:V[1],s:V[2],v:V[3]}:(V=Re.hsva.exec(W))?{h:V[1],s:V[2],v:V[3],a:V[4]}:(V=Re.hex8.exec(W))?{r:G(V[1]),g:G(V[2]),b:G(V[3]),a:fe(V[4]),format:Y?"name":"hex8"}:(V=Re.hex6.exec(W))?{r:G(V[1]),g:G(V[2]),b:G(V[3]),format:Y?"name":"hex"}:(V=Re.hex4.exec(W))?{r:G(V[1]+""+V[1]),g:G(V[2]+""+V[2]),b:G(V[3]+""+V[3]),a:fe(V[4]+""+V[4]),format:Y?"name":"hex8"}:(V=Re.hex3.exec(W))?{r:G(V[1]+""+V[1]),g:G(V[2]+""+V[2]),b:G(V[3]+""+V[3]),format:Y?"name":"hex"}:!1}function te(W){var Y,V;return W=W||{level:"AA",size:"small"},Y=(W.level||"AA").toUpperCase(),V=(W.size||"small").toLowerCase(),Y!=="AA"&&Y!=="AAA"&&(Y="AA"),V!=="small"&&V!=="large"&&(V="small"),{level:Y,size:V}}H.exports?H.exports=h:!(N=function(){return h}.call(Z,I,Z,H),N!==void 0&&(H.exports=N))})(Math)},bCnd:function(H,Z,I){"use strict";I.d(Z,"b",function(){return k}),I.d(Z,"a",function(){return v});var N=I("je13"),g=I.n(N),S=!1;function k(m,C){var _=g.a.get("__ec");_||(_={}),_[m]=C,g.a.set("__ec",_)}function v(m,C){var _=g.a.get("__ec");return _?_[m]===void 0?C:_[m]:C}},bQjk:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return function(g){var S=N,k=S.lib,v=k.CipherParams,m=S.enc,C=m.Hex,_=S.format,e=_.Hex={stringify:function(h){return h.ciphertext.toString(C)},parse:function(h){var r=C.parse(h);return v.create({ciphertext:r})}}}(),N.format.Hex})},bT9E:function(H,Z,I){"use strict";I.d(Z,"a",function(){return g});var N=I("VTBJ");function g(S,k){var v=Object(N.a)({},S);return Array.isArray(k)&&k.forEach(function(m){delete v[m]}),v}},biw7:function(H,Z,I){"use strict";var N=I("q1tI"),g=I.n(N),S=N.createContext(null);Z.a=S},c5Ni:function(H,Z,I){},cDPC:function(H,Z,I){"use strict";var N=I("tJVT"),g=I("q1tI"),S=I.n(g),k=I("i3hx"),v=I.n(k);Z.a=function(m){var C=m.defaultX,_=C===void 0?"40%":C,e=m.leftChild,h=m.rightChild,r=m.className,c=m.hideResize,i=c===void 0?!1:c,n=Object(g.useState)(_),l=Object(N.a)(n,2),f=l[0],d=l[1],u=Object(g.useRef)();function o(){u.current=!0}Object(g.useEffect)(function(){function b(D){u.current&&d(D.pageX)}function p(){u.current=!1}return window.addEventListener("mousemove",b),window.addEventListener("mouseup",p),function(){window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",p)}},[]);var s=typeof f=="number"&&f!==.01?"".concat(f,"px"):_,E="calc(100% - ".concat(i?"0px":"4px"," - ").concat(s,")");return S.a.createElement("div",{className:"split-panel-container ".concat(r)},S.a.createElement("section",{style:{width:s,display:f===.01?"none":""}},e),S.a.createElement("section",{className:"resize-x-bar",onMouseDown:o},S.a.createElement("a",{className:"btn-resize"},S.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},S.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"})))),S.a.createElement("section",{style:{width:E}},h))}},cv67:function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){return function(g){var S=N,k=S.lib,v=k.WordArray,m=k.Hasher,C=S.algo,_=[];(function(){for(var n=0;n<64;n++)_[n]=g.abs(g.sin(n+1))*4294967296|0})();var e=C.MD5=m.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(n,l){for(var f=0;f<16;f++){var d=l+f,u=n[d];n[d]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}var o=this._hash.words,s=n[l+0],E=n[l+1],b=n[l+2],p=n[l+3],D=n[l+4],R=n[l+5],y=n[l+6],x=n[l+7],w=n[l+8],T=n[l+9],F=n[l+10],P=n[l+11],A=n[l+12],X=n[l+13],z=n[l+14],O=n[l+15],B=o[0],U=o[1],L=o[2],G=o[3];B=h(B,U,L,G,s,7,_[0]),G=h(G,B,U,L,E,12,_[1]),L=h(L,G,B,U,b,17,_[2]),U=h(U,L,G,B,p,22,_[3]),B=h(B,U,L,G,D,7,_[4]),G=h(G,B,U,L,R,12,_[5]),L=h(L,G,B,U,y,17,_[6]),U=h(U,L,G,B,x,22,_[7]),B=h(B,U,L,G,w,7,_[8]),G=h(G,B,U,L,T,12,_[9]),L=h(L,G,B,U,F,17,_[10]),U=h(U,L,G,B,P,22,_[11]),B=h(B,U,L,G,A,7,_[12]),G=h(G,B,U,L,X,12,_[13]),L=h(L,G,B,U,z,17,_[14]),U=h(U,L,G,B,O,22,_[15]),B=r(B,U,L,G,E,5,_[16]),G=r(G,B,U,L,y,9,_[17]),L=r(L,G,B,U,P,14,_[18]),U=r(U,L,G,B,s,20,_[19]),B=r(B,U,L,G,R,5,_[20]),G=r(G,B,U,L,F,9,_[21]),L=r(L,G,B,U,O,14,_[22]),U=r(U,L,G,B,D,20,_[23]),B=r(B,U,L,G,T,5,_[24]),G=r(G,B,U,L,z,9,_[25]),L=r(L,G,B,U,p,14,_[26]),U=r(U,L,G,B,w,20,_[27]),B=r(B,U,L,G,X,5,_[28]),G=r(G,B,U,L,b,9,_[29]),L=r(L,G,B,U,x,14,_[30]),U=r(U,L,G,B,A,20,_[31]),B=c(B,U,L,G,R,4,_[32]),G=c(G,B,U,L,w,11,_[33]),L=c(L,G,B,U,P,16,_[34]),U=c(U,L,G,B,z,23,_[35]),B=c(B,U,L,G,E,4,_[36]),G=c(G,B,U,L,D,11,_[37]),L=c(L,G,B,U,x,16,_[38]),U=c(U,L,G,B,F,23,_[39]),B=c(B,U,L,G,X,4,_[40]),G=c(G,B,U,L,s,11,_[41]),L=c(L,G,B,U,p,16,_[42]),U=c(U,L,G,B,y,23,_[43]),B=c(B,U,L,G,T,4,_[44]),G=c(G,B,U,L,A,11,_[45]),L=c(L,G,B,U,O,16,_[46]),U=c(U,L,G,B,b,23,_[47]),B=i(B,U,L,G,s,6,_[48]),G=i(G,B,U,L,x,10,_[49]),L=i(L,G,B,U,z,15,_[50]),U=i(U,L,G,B,R,21,_[51]),B=i(B,U,L,G,A,6,_[52]),G=i(G,B,U,L,p,10,_[53]),L=i(L,G,B,U,F,15,_[54]),U=i(U,L,G,B,E,21,_[55]),B=i(B,U,L,G,w,6,_[56]),G=i(G,B,U,L,O,10,_[57]),L=i(L,G,B,U,y,15,_[58]),U=i(U,L,G,B,X,21,_[59]),B=i(B,U,L,G,D,6,_[60]),G=i(G,B,U,L,P,10,_[61]),L=i(L,G,B,U,b,15,_[62]),U=i(U,L,G,B,T,21,_[63]),o[0]=o[0]+B|0,o[1]=o[1]+U|0,o[2]=o[2]+L|0,o[3]=o[3]+G|0},_doFinalize:function(){var n=this._data,l=n.words,f=this._nDataBytes*8,d=n.sigBytes*8;l[d>>>5]|=128<<24-d%32;var u=g.floor(f/4294967296),o=f;l[(d+64>>>9<<4)+15]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,l[(d+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,n.sigBytes=(l.length+1)*4,this._process();for(var s=this._hash,E=s.words,b=0;b<4;b++){var p=E[b];E[b]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360}return s},clone:function(){var n=m.clone.call(this);return n._hash=this._hash.clone(),n}});function h(n,l,f,d,u,o,s){var E=n+(l&f|~l&d)+u+s;return(E<<o|E>>>32-o)+l}function r(n,l,f,d,u,o,s){var E=n+(l&d|f&~d)+u+s;return(E<<o|E>>>32-o)+l}function c(n,l,f,d,u,o,s){var E=n+(l^f^d)+u+s;return(E<<o|E>>>32-o)+l}function i(n,l,f,d,u,o,s){var E=n+(f^(l|~d))+u+s;return(E<<o|E>>>32-o)+l}S.MD5=m._createHelper(e),S.HmacMD5=m._createHmacHelper(e)}(Math),N.MD5})},dejd:function(H,Z,I){},dmUQ:function(H,Z,I){"use strict";var N=I("Ff2n"),g=I("rePB"),S=I("1OyB"),k=I("vuIU"),v=I("Ji7U"),m=I("md7G"),C=I("foSv"),_=I("q1tI"),e=I.n(_),h=I("TSYQ"),r=I.n(h),c=I("4IlW");function i(w,T){var F=Object.keys(w);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(w);T&&(P=P.filter(function(A){return Object.getOwnPropertyDescriptor(w,A).enumerable})),F.push.apply(F,P)}return F}function n(w){for(var T=1;T<arguments.length;T++){var F=arguments[T]!=null?arguments[T]:{};T%2?i(Object(F),!0).forEach(function(P){Object(g.a)(w,P,F[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(F)):i(Object(F)).forEach(function(P){Object.defineProperty(w,P,Object.getOwnPropertyDescriptor(F,P))})}return w}function l(w){var T=f();return function(){var P=Object(C.a)(w),A;if(T){var X=Object(C.a)(this).constructor;A=Reflect.construct(P,arguments,X)}else A=P.apply(this,arguments);return Object(m.a)(this,A)}}function f(){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}}function d(){}function u(w){w.preventDefault()}var o=function(T){return T.replace(/[^\w.-]+/g,"")},s=200,E=600,b=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,p=function(T){return T!=null},D=function(T,F){return F===T||typeof F=="number"&&typeof T=="number"&&isNaN(F)&&isNaN(T)},R=function(w){Object(v.a)(F,w);var T=l(F);function F(P){var A;Object(S.a)(this,F),A=T.call(this,P),A.onKeyDown=function(O){var B=A.props,U=B.onKeyDown,L=B.onPressEnter;if(O.keyCode===c.a.UP){var G=A.getRatio(O);A.up(O,G,null),A.stop()}else if(O.keyCode===c.a.DOWN){var ee=A.getRatio(O);A.down(O,ee,null),A.stop()}else O.keyCode===c.a.ENTER&&L&&L(O);if(A.recordCursorPosition(),A.lastKeyCode=O.keyCode,U){for(var oe=arguments.length,ae=new Array(oe>1?oe-1:0),be=1;be<oe;be++)ae[be-1]=arguments[be];U.apply(void 0,[O].concat(ae))}},A.onKeyUp=function(O){var B=A.props.onKeyUp;if(A.stop(),A.recordCursorPosition(),B){for(var U=arguments.length,L=new Array(U>1?U-1:0),G=1;G<U;G++)L[G-1]=arguments[G];B.apply(void 0,[O].concat(L))}},A.onChange=function(O){var B=A.props.onChange;A.state.focused&&(A.inputting=!0),A.rawInput=A.props.parser(A.getValueFromEvent(O)),A.setState({inputValue:A.rawInput}),B(A.toNumber(A.rawInput))},A.onMouseUp=function(){var O=A.props.onMouseUp;A.recordCursorPosition(),O&&O.apply(void 0,arguments)},A.onFocus=function(){var O;A.setState({focused:!0}),(O=A.props).onFocus.apply(O,arguments)},A.onBlur=function(){var O=A.props.onBlur;A.inputting=!1,A.setState({focused:!1});var B=A.getCurrentValidValue(A.state.inputValue),U=A.setValue(B,d);if(O){var L=A.input.value,G=A.getInputDisplayValue({focus:!1,value:U});A.input.value=G&&Number(G),O.apply(void 0,arguments),A.input.value=L}},A.getRatio=function(O){var B=1;return O.metaKey||O.ctrlKey?B=.1:O.shiftKey&&(B=10),B},A.getFullNum=function(O){return isNaN(O)?O:/e/i.test(String(O))?Number(O).toFixed(18).replace(/\.?0+$/,""):O},A.getPrecision=function(O){if(p(A.props.precision))return A.props.precision;var B=String(O);if(B.indexOf("e-")>=0)return parseInt(B.slice(B.indexOf("e-")+2),10);var U=0;return B.indexOf(".")>=0&&(U=B.length-B.indexOf(".")-1),U},A.getInputDisplayValue=function(O){var B=O||A.state,U=B.focused,L=B.inputValue,G=B.value,ee;U?ee=L:ee=A.toPrecisionAsStep(G),ee==null&&(ee="");var oe=A.formatWrapper(ee);return p(A.props.decimalSeparator)&&(oe=oe.toString().replace(".",A.props.decimalSeparator)),oe},A.recordCursorPosition=function(){try{A.cursorStart=A.input.selectionStart,A.cursorEnd=A.input.selectionEnd,A.currentValue=A.input.value,A.cursorBefore=A.input.value.substring(0,A.cursorStart),A.cursorAfter=A.input.value.substring(A.cursorEnd)}catch(O){}},A.restoreByAfter=function(O){if(O===void 0)return!1;var B=A.input.value,U=B.lastIndexOf(O);if(U===-1)return!1;var L=A.cursorBefore.length;return A.lastKeyCode===c.a.DELETE&&A.cursorBefore.charAt(L-1)===O[0]?(A.fixCaret(L,L),!0):U+O.length===B.length?(A.fixCaret(U,U),!0):!1},A.partRestoreByAfter=function(O){return O===void 0?!1:Array.prototype.some.call(O,function(B,U){var L=O.substring(U);return A.restoreByAfter(L)})},A.isNotCompleteNumber=function(O){return isNaN(O)||O===""||O===null||O&&O.toString().indexOf(".")===O.toString().length-1},A.stop=function(){A.autoStepTimer&&clearTimeout(A.autoStepTimer)},A.down=function(O,B,U){A.pressingUpOrDown=!0,A.step("down",O,B,U)},A.up=function(O,B,U){A.pressingUpOrDown=!0,A.step("up",O,B,U)},A.saveInput=function(O){A.input=O};var X=P.value;X===void 0&&(X=P.defaultValue),A.state={focused:P.autoFocus};var z=A.getValidValue(A.toNumber(X));return A.state=n(n({},A.state),{},{inputValue:A.toPrecisionAsStep(z),value:z}),A}return Object(k.a)(F,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(A){var X=this.props,z=X.value,O=X.onChange,B=X.max,U=X.min,L=this.state.focused;if(A){if(!D(A.value,z)||!D(A.max,B)||!D(A.min,U)){var G=L?z:this.getValidValue(z),ee;this.pressingUpOrDown?ee=G:this.inputting?ee=this.rawInput:ee=this.toPrecisionAsStep(G),this.setState({value:G,inputValue:ee})}var oe="value"in this.props?z:this.state.value;"max"in this.props&&A.max!==B&&typeof oe=="number"&&oe>B&&O&&O(B),"min"in this.props&&A.min!==U&&typeof oe=="number"&&oe<U&&O&&O(U)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var ae=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===c.a.BACKSPACE?ae=this.cursorStart-1:this.lastKeyCode===c.a.DELETE&&(ae=this.cursorStart):ae=this.input.value.length,this.fixCaret(ae,ae)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case c.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case c.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(be){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(A){var X=A;return X===""?X="":this.isNotCompleteNumber(parseFloat(X))?X=this.state.value:X=this.getValidValue(X),this.toNumber(X)}},{key:"getValueFromEvent",value:function(A){var X=A.target.value.trim().replace(/。/g,".");return p(this.props.decimalSeparator)&&(X=X.replace(this.props.decimalSeparator,".")),X}},{key:"getValidValue",value:function(A){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,O=parseFloat(A);return isNaN(O)?A:(O<X&&(O=X),O>z&&(O=z),O)}},{key:"setValue",value:function(A,X){var z=this.props.precision,O=this.isNotCompleteNumber(parseFloat(A))?null:parseFloat(A),B=this.state.value,U=B===void 0?null:B,L=this.state.inputValue,G=L===void 0?null:L,ee=typeof O=="number"?O.toFixed(z):"".concat(O),oe=O!==U||ee!=="".concat(G);return"value"in this.props?(G=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:G},X)):this.setState({value:O,inputValue:this.toPrecisionAsStep(A)},X),oe&&this.props.onChange(O),O}},{key:"getMaxPrecision",value:function(A){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.props,O=z.precision,B=z.step;if(p(O))return O;var U=this.getPrecision(X),L=this.getPrecision(B),G=this.getPrecision(A);return A?Math.max(G,U+L):U+L}},{key:"getPrecisionFactor",value:function(A){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,z=this.getMaxPrecision(A,X);return Math.pow(10,z)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(A){return this.props.formatter?this.props.formatter(A):A}},{key:"toPrecisionAsStep",value:function(A){if(this.isNotCompleteNumber(A)||A==="")return A;var X=Math.abs(this.getMaxPrecision(A));return isNaN(X)?A.toString():Number(A).toFixed(X)}},{key:"toNumber",value:function(A){var X=this.props.precision,z=this.state.focused,O=A&&A.length>16&&z;return this.isNotCompleteNumber(A)||O?A:p(X)?Math.round(A*Math.pow(10,X))/Math.pow(10,X):Number(A)}},{key:"upStep",value:function(A,X){var z=this.props.step,O=this.getPrecisionFactor(A,X),B=Math.abs(this.getMaxPrecision(A,X)),U=((O*A+O*z*X)/O).toFixed(B);return this.toNumber(U)}},{key:"downStep",value:function(A,X){var z=this.props.step,O=this.getPrecisionFactor(A,X),B=Math.abs(this.getMaxPrecision(A,X)),U=((O*A-O*z*X)/O).toFixed(B);return this.toNumber(U)}},{key:"step",value:function(A,X){var z=this,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,B=arguments.length>3?arguments[3]:void 0;this.stop(),X&&(X.persist(),X.preventDefault());var U=this.props;if(U.disabled)return;var L=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(L))return;var G=this["".concat(A,"Step")](L,O),ee=G>U.max||G<U.min;if(G>U.max?G=U.max:G<U.min&&(G=U.min),this.setValue(G,null),this.setState({focused:!0},function(){z.pressingUpOrDown=!1}),ee)return;this.autoStepTimer=setTimeout(function(){z[A](X,O,!0)},B?s:E)}},{key:"fixCaret",value:function(A,X){if(A===void 0||X===void 0||!this.input||!this.input.value)return;try{var z=this.input.selectionStart,O=this.input.selectionEnd;(A!==z||X!==O)&&this.input.setSelectionRange(A,X)}catch(B){}}},{key:"render",value:function(){var A,X=this.props,z=X.prefixCls,O=X.disabled,B=X.readOnly,U=X.useTouch,L=X.autoComplete,G=X.upHandler,ee=X.downHandler,oe=X.className,ae=X.max,be=X.min,_e=X.style,fe=X.title,Re=X.onMouseEnter,Oe=X.onMouseLeave,de=X.onMouseOver,te=X.onMouseOut,W=X.required,Y=X.onClick,V=X.tabIndex,Q=X.type,q=X.placeholder,ie=X.id,ne=X.inputMode,J=X.pattern,$=X.step,le=X.maxLength,ce=X.autoFocus,we=X.name,Fe=X.onPaste,Xe=X.onInput,$e=Object(N.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"]),Ye=this.state,Ze=Ye.value,qe=Ye.focused,Pe=r()(z,(A={},Object(g.a)(A,oe,!!oe),Object(g.a)(A,"".concat(z,"-disabled"),O),Object(g.a)(A,"".concat(z,"-focused"),qe),A)),Ie={};Object.keys($e).forEach(function(De){(De.substr(0,5)==="data-"||De.substr(0,5)==="aria-"||De==="role")&&(Ie[De]=$e[De])});var Je=!B&&!O,rt=this.getInputDisplayValue(null),ye=(Ze||Ze===0)&&(isNaN(Ze)||Number(Ze)>=ae),ue=(Ze||Ze===0)&&(isNaN(Ze)||Number(Ze)<=be),he=ye||O||B,me=ue||O||B,Ce=r()("".concat(z,"-handler"),"".concat(z,"-handler-up"),Object(g.a)({},"".concat(z,"-handler-up-disabled"),he)),ge=r()("".concat(z,"-handler"),"".concat(z,"-handler-down"),Object(g.a)({},"".concat(z,"-handler-down-disabled"),me)),Ee=U?{onTouchStart:he?d:this.up,onTouchEnd:this.stop}:{onMouseDown:he?d:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ae=U?{onTouchStart:me?d:this.down,onTouchEnd:this.stop}:{onMouseDown:me?d:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return e.a.createElement("div",{className:Pe,style:_e,title:fe,onMouseEnter:Re,onMouseLeave:Oe,onMouseOver:de,onMouseOut:te,onFocus:function(){return null},onBlur:function(){return null}},e.a.createElement("div",{className:"".concat(z,"-handler-wrap")},e.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Increase Value","aria-disabled":he,className:Ce}),G||e.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-up-inner"),onClick:u})),e.a.createElement("span",Object.assign({unselectable:"on"},Ae,{role:"button","aria-label":"Decrease Value","aria-disabled":me,className:ge}),ee||e.a.createElement("span",{unselectable:"on",className:"".concat(z,"-handler-down-inner"),onClick:u}))),e.a.createElement("div",{className:"".concat(z,"-input-wrap")},e.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":be,"aria-valuemax":ae,"aria-valuenow":Ze,required:W,type:Q,placeholder:q,onPaste:Fe,onClick:Y,onMouseUp:this.onMouseUp,className:"".concat(z,"-input"),tabIndex:V,autoComplete:L,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Je?this.onKeyDown:d,onKeyUp:Je?this.onKeyUp:d,autoFocus:ce,maxLength:le,readOnly:B,disabled:O,max:ae,min:be,step:$,name:we,title:fe,id:ie,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(rt),pattern:J,inputMode:ne,onInput:Xe},Ie))))}}]),F}(e.a.Component);R.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:b,min:-b,step:1,style:{},onChange:d,onKeyDown:d,onPressEnter:d,onFocus:d,onBlur:d,parser:o,required:!1,autoComplete:"off"};var y=R,x=Z.a=y},e7zE:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("3y9D"),I("WYAk"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.Base,v=S.WordArray,m=g.algo,C=m.SHA1,_=m.HMAC,e=m.PBKDF2=k.extend({cfg:k.extend({keySize:128/32,hasher:C,iterations:1}),init:function(h){this.cfg=this.cfg.extend(h)},compute:function(h,r){for(var c=this.cfg,i=_.create(c.hasher,h),n=v.create(),l=v.create([1]),f=n.words,d=l.words,u=c.keySize,o=c.iterations;f.length<u;){var s=i.update(r).finalize(l);i.reset();for(var E=s.words,b=E.length,p=s,D=1;D<o;D++){p=i.finalize(p),i.reset();for(var R=p.words,y=0;y<b;y++)E[y]^=R[y]}n.concat(s),d[0]++}return n.sigBytes=u*4,n}});g.PBKDF2=function(h,r,c){return e.create(c).compute(h,r)}}(),N.PBKDF2})},eRFJ:function(H,Z,I){H.exports={header:"header___2DEfS",field:"field___2KFR1","oj-form-container":"oj-form-container___11-CJ","oj-left-panel":"oj-left-panel___2_COu","oj-form-info":"oj-form-info___3RmjJ",footer:"footer___13GF0",result:"result___2TPH2",passText:"passText___m4yU3",noPassText:"noPassText___bU8yW",pass:"pass___1qwzN",noPass:"noPass___35fR7","test-case-name":"test-case-name___JX6gg","btn-remove-case":"btn-remove-case___20q0s","icon-tag":"icon-tag___ahN2d",btn_back:"btn_back___2GR2u",testJi:"testJi___lY3ok",upBtn:"upBtn___14ov-","oj-problems":"oj-problems___3xexO",row:"row____2CFx",a:"a___1o_MZ",b:"b___2s_8T",inputTwo:"inputTwo___2QE50",inputOne:"inputOne___3VLjS",cusModal:"cusModal___3HaCu","oj-custom-large-spin":"oj-custom-large-spin___18Uw5",MdEditor:"MdEditor___2TQ6G"}},fcSX:function(H,Z,I){"use strict";var N=I("Ff2n"),g=I("1OyB"),S=I("vuIU"),k=I("Ji7U"),v=I("md7G"),m=I("foSv"),C=I("1W/9"),_=I("q1tI"),e=I("rePB"),h=I("JX7q"),r=I("TSYQ"),c=I.n(r),i=I("qx4F"),n=I("4IlW");function l(O){return Array.isArray(O)?O:[O]}var f={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},d=Object.keys(f).filter(function(O){if(typeof document=="undefined")return!1;var B=document.getElementsByTagName("html")[0];return O in(B?B.style:{})})[0],u=f[d];function o(O,B,U,L){O.addEventListener?O.addEventListener(B,U,L):O.attachEvent&&O.attachEvent("on".concat(B),U)}function s(O,B,U,L){O.removeEventListener?O.removeEventListener(B,U,L):O.attachEvent&&O.detachEvent("on".concat(B),U)}function E(O,B){var U=typeof O=="function"?O(B):O;return Array.isArray(U)?U.length===2?U:[U[0],U[1]]:[U]}var b=function(B){return!isNaN(parseFloat(B))&&isFinite(B)},p=!(typeof window!="undefined"&&window.document&&window.document.createElement),D=function O(B,U,L,G){if(!U||U===document||U instanceof Document)return!1;if(U===B.parentNode)return!0;var ee=Math.max(Math.abs(L),Math.abs(G))===Math.abs(G),oe=Math.max(Math.abs(L),Math.abs(G))===Math.abs(L),ae=U.scrollHeight-U.clientHeight,be=U.scrollWidth-U.clientWidth,_e=document.defaultView.getComputedStyle(U),fe=_e.overflowY==="auto"||_e.overflowY==="scroll",Re=_e.overflowX==="auto"||_e.overflowX==="scroll",Oe=ae&&fe,de=be&ℜreturn ee&&(!Oe||Oe&&(U.scrollTop>=ae&&G<0||U.scrollTop<=0&&G>0))||oe&&(!de||de&&(U.scrollLeft>=be&&L<0||U.scrollLeft<=0&&L>0))?O(B,U.parentNode,L,G):!1};function R(O){var B=y();return function(){var L=Object(m.a)(O),G;if(B){var ee=Object(m.a)(this).constructor;G=Reflect.construct(L,arguments,ee)}else G=L.apply(this,arguments);return Object(v.a)(this,G)}}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(O){return!1}}var x={},w=function(O){Object(k.a)(U,O);var B=R(U);function U(L){var G;return Object(g.a)(this,U),G=B.call(this,L),G.domFocus=function(){G.dom&&G.dom.focus()},G.removeStartHandler=function(ee){if(ee.touches.length>1)return;G.startPos={x:ee.touches[0].clientX,y:ee.touches[0].clientY}},G.removeMoveHandler=function(ee){if(ee.changedTouches.length>1)return;var oe=ee.currentTarget,ae=ee.changedTouches[0].clientX-G.startPos.x,be=ee.changedTouches[0].clientY-G.startPos.y;(oe===G.maskDom||oe===G.handlerDom||oe===G.contentDom&&D(oe,ee.target,ae,be))&&ee.cancelable&&ee.preventDefault()},G.transitionEnd=function(ee){var oe=ee.target;s(oe,u,G.transitionEnd),oe.style.transition=""},G.onKeyDown=function(ee){if(ee.keyCode===n.a.ESC){var oe=G.props.onClose;ee.stopPropagation(),oe&&oe(ee)}},G.onWrapperTransitionEnd=function(ee){var oe=G.props,ae=oe.open,be=oe.afterVisibleChange;ee.target===G.contentWrapper&&ee.propertyName.match(/transform$/)&&(G.dom.style.transition="",!ae&&G.getCurrentDrawerSome()&&(document.body.style.overflowX="",G.maskDom&&(G.maskDom.style.left="",G.maskDom.style.width="")),be&&be(!!ae))},G.openLevelTransition=function(){var ee=G.props,oe=ee.open,ae=ee.width,be=ee.height,_e=G.getHorizontalBoolAndPlacementName(),fe=_e.isHorizontal,Re=_e.placementName,Oe=G.contentDom?G.contentDom.getBoundingClientRect()[fe?"width":"height"]:0,de=(fe?ae:be)||Oe;G.setLevelAndScrolling(oe,Re,de)},G.setLevelTransform=function(ee,oe,ae,be){var _e=G.props,fe=_e.placement,Re=_e.levelMove,Oe=_e.duration,de=_e.ease,te=_e.showMask;G.levelDom.forEach(function(W){W.style.transition="transform ".concat(Oe," ").concat(de),o(W,u,G.transitionEnd);var Y=ee?ae:0;if(Re){var V=E(Re,{target:W,open:ee});Y=ee?V[0]:V[1]||0}var Q=typeof Y=="number"?"".concat(Y,"px"):Y,q=fe==="left"||fe==="top"?Q:"-".concat(Q);q=te&&fe==="right"&&be?"calc(".concat(q," + ").concat(be,"px)"):q,W.style.transform=Y?"".concat(oe,"(").concat(q,")"):""})},G.setLevelAndScrolling=function(ee,oe,ae){var be=G.props.onChange;if(!p){var _e=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(i.a)(!0):0;G.setLevelTransform(ee,oe,ae,_e),G.toggleScrollingToDrawerAndBody(_e)}be&&be(ee)},G.toggleScrollingToDrawerAndBody=function(ee){var oe=G.props,ae=oe.getOpenCount,be=oe.getContainer,_e=oe.showMask,fe=oe.open,Re=be&&be(),Oe=ae&&ae();if(Re&&Re.parentNode===document.body&&_e){var de=["touchstart"],te=[document.body,G.maskDom,G.handlerDom,G.contentDom];fe&&document.body.style.overflow!=="hidden"?(ee&&G.addScrollingEffect(ee),Oe===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",te.forEach(function(W,Y){if(!W)return;o(W,de[Y]||"touchmove",Y?G.removeMoveHandler:G.removeStartHandler,G.passive)})):G.getCurrentDrawerSome()&&(Oe||(document.body.style.overflow=""),document.body.style.touchAction="",ee&&G.remScrollingEffect(ee),te.forEach(function(W,Y){if(!W)return;s(W,de[Y]||"touchmove",Y?G.removeMoveHandler:G.removeStartHandler,G.passive)}))}},G.addScrollingEffect=function(ee){var oe=G.props,ae=oe.placement,be=oe.duration,_e=oe.ease,fe=oe.getOpenCount,Re=oe.switchScrollingEffect,Oe=fe&&fe();Oe===1&&Re();var de="width ".concat(be," ").concat(_e),te="transform ".concat(be," ").concat(_e);G.dom.style.transition="none";switch(ae){case"right":G.dom.style.transform="translateX(-".concat(ee,"px)");break;case"top":case"bottom":G.dom.style.width="calc(100% - ".concat(ee,"px)"),G.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(G.timeout),G.timeout=setTimeout(function(){G.dom&&(G.dom.style.transition="".concat(te,",").concat(de),G.dom.style.width="",G.dom.style.transform="")})},G.remScrollingEffect=function(ee){var oe=G.props,ae=oe.placement,be=oe.duration,_e=oe.ease,fe=oe.getOpenCount,Re=oe.switchScrollingEffect,Oe=fe&&fe();Oe||Re(!0),d&&(document.body.style.overflowX="hidden"),G.dom.style.transition="none";var de,te="width ".concat(be," ").concat(_e),W="transform ".concat(be," ").concat(_e);switch(ae){case"left":{G.dom.style.width="100%",te="width 0s ".concat(_e," ").concat(be);break}case"right":{G.dom.style.transform="translateX(".concat(ee,"px)"),G.dom.style.width="100%",te="width 0s ".concat(_e," ").concat(be),G.maskDom&&(G.maskDom.style.left="-".concat(ee,"px"),G.maskDom.style.width="calc(100% + ".concat(ee,"px)"));break}case"top":case"bottom":{G.dom.style.width="calc(100% + ".concat(ee,"px)"),G.dom.style.height="100%",G.dom.style.transform="translateZ(0)",de="height 0s ".concat(_e," ").concat(be);break}default:break}clearTimeout(G.timeout),G.timeout=setTimeout(function(){G.dom&&(G.dom.style.transition="".concat(W,",").concat(de?"".concat(de,","):"").concat(te),G.dom.style.transform="",G.dom.style.width="",G.dom.style.height="")})},G.getCurrentDrawerSome=function(){return!Object.keys(x).some(function(ee){return x[ee]})},G.getLevelDom=function(ee){var oe=ee.level,ae=ee.getContainer;if(p)return;var be=ae&&ae(),_e=be?be.parentNode:null;if(G.levelDom=[],oe==="all"){var fe=_e?Array.prototype.slice.call(_e.children):[];fe.forEach(function(Re){Re.nodeName!=="SCRIPT"&&Re.nodeName!=="STYLE"&&Re.nodeName!=="LINK"&&Re!==be&&G.levelDom.push(Re)})}else oe&&l(oe).forEach(function(Re){document.querySelectorAll(Re).forEach(function(Oe){G.levelDom.push(Oe)})})},G.getHorizontalBoolAndPlacementName=function(){var ee=G.props.placement,oe=ee==="left"||ee==="right",ae="translate".concat(oe?"X":"Y");return{isHorizontal:oe,placementName:ae}},G.state={_self:Object(h.a)(G)},G}return Object(S.a)(U,[{key:"componentDidMount",value:function(){var G=this;if(!p){var ee=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return ee=!0,null}}))}catch(fe){}this.passive=ee?{passive:!1}:!1}var oe=this.props,ae=oe.open,be=oe.getContainer,_e=be&&be();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),ae&&(_e&&_e.parentNode===document.body&&(x[this.drawerId]=ae),this.openLevelTransition(),this.forceUpdate(function(){G.domFocus()}))}},{key:"componentDidUpdate",value:function(G){var ee=this.props,oe=ee.open,ae=ee.getContainer,be=ae&&ae();oe!==G.open&&(oe&&this.domFocus(),be&&be.parentNode===document.body&&(x[this.drawerId]=!!oe),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var G=this.props,ee=G.getOpenCount,oe=G.open,ae=G.switchScrollingEffect,be=typeof ee=="function"&&ee();delete x[this.drawerId],oe&&(this.setLevelTransform(!1),document.body.style.touchAction=""),be||(document.body.style.overflow="",ae(!0))}},{key:"render",value:function(){var G,ee=this,oe=this.props,ae=oe.className,be=oe.children,_e=oe.style,fe=oe.width,Re=oe.height,Oe=oe.defaultOpen,de=oe.open,te=oe.prefixCls,W=oe.placement,Y=oe.level,V=oe.levelMove,Q=oe.ease,q=oe.duration,ie=oe.getContainer,ne=oe.handler,J=oe.onChange,$=oe.afterVisibleChange,le=oe.showMask,ce=oe.maskClosable,we=oe.maskStyle,Fe=oe.onClose,Xe=oe.onHandleClick,$e=oe.keyboard,Ye=oe.getOpenCount,Ze=oe.switchScrollingEffect,qe=Object(N.a)(oe,["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"]),Pe=this.dom?de:!1,Ie=c()(te,(G={},Object(e.a)(G,"".concat(te,"-").concat(W),!0),Object(e.a)(G,"".concat(te,"-open"),Pe),Object(e.a)(G,ae||"",!!ae),Object(e.a)(G,"no-mask",!le),G)),Je=this.getHorizontalBoolAndPlacementName(),rt=Je.placementName,ye=W==="left"||W==="top"?"-100%":"100%",ue=Pe?"":"".concat(rt,"(").concat(ye,")"),he=ne&&_.cloneElement(ne,{onClick:function(Ce){ne.props.onClick&&ne.props.onClick(),Xe&&Xe(Ce)},ref:function(Ce){ee.handlerDom=Ce}});return _.createElement("div",Object.assign({},qe,{tabIndex:-1,className:Ie,style:_e,ref:function(Ce){ee.dom=Ce},onKeyDown:Pe&&$e?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),le&&_.createElement("div",{className:"".concat(te,"-mask"),onClick:ce?Fe:void 0,style:we,ref:function(Ce){ee.maskDom=Ce}}),_.createElement("div",{className:"".concat(te,"-content-wrapper"),style:{transform:ue,msTransform:ue,width:b(fe)?"".concat(fe,"px"):fe,height:b(Re)?"".concat(Re,"px"):Re},ref:function(Ce){ee.contentWrapper=Ce}},_.createElement("div",{className:"".concat(te,"-content"),ref:function(Ce){ee.contentDom=Ce},onTouchStart:Pe&&le?this.removeStartHandler:void 0,onTouchMove:Pe&&le?this.removeMoveHandler:void 0},be),he))}}],[{key:"getDerivedStateFromProps",value:function(G,ee){var oe=ee.prevProps,ae=ee._self,be={prevProps:G};if(oe!==void 0){var _e=G.placement,fe=G.level;_e!==oe.placement&&(ae.contentDom=null),fe!==oe.level&&ae.getLevelDom(G)}return be}}]),U}(_.Component);w.defaultProps={switchScrollingEffect:function(){}};var T=w;function F(O){var B=P();return function(){var L=Object(m.a)(O),G;if(B){var ee=Object(m.a)(this).constructor;G=Reflect.construct(L,arguments,ee)}else G=L.apply(this,arguments);return Object(v.a)(this,G)}}function P(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(O){return!1}}var A=function(O){Object(k.a)(U,O);var B=F(U);function U(L){var G;Object(g.a)(this,U),G=B.call(this,L),G.onHandleClick=function(oe){var ae=G.props,be=ae.onHandleClick,_e=ae.open;if(be&&be(oe),typeof _e=="undefined"){var fe=G.state.open;G.setState({open:!fe})}},G.onClose=function(oe){var ae=G.props,be=ae.onClose,_e=ae.open;be&&be(oe),typeof _e=="undefined"&&G.setState({open:!1})};var ee=typeof L.open!="undefined"?L.open:!!L.defaultOpen;return G.state={open:ee},"onMaskClick"in L&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),G}return Object(S.a)(U,[{key:"render",value:function(){var G=this,ee=this.props,oe=ee.defaultOpen,ae=ee.getContainer,be=ee.wrapperClassName,_e=ee.forceRender,fe=ee.handler,Re=Object(N.a)(ee,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),Oe=this.state.open;if(!ae)return _.createElement("div",{className:be,ref:function(W){G.dom=W}},_.createElement(T,Object.assign({},Re,{open:Oe,handler:fe,getContainer:function(){return G.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var de=!!fe||_e;return _.createElement(C.a,{visible:Oe,forceRender:de,getContainer:ae,wrapperClassName:be},function(te){var W=te.visible,Y=te.afterClose,V=Object(N.a)(te,["visible","afterClose"]);return _.createElement(T,Object.assign({},Re,V,{open:W!==void 0?W:Oe,afterVisibleChange:Y!==void 0?Y:Re.afterVisibleChange,handler:fe,onClose:G.onClose,onHandleClick:G.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(G,ee){var oe=ee.prevProps,ae={prevProps:G};return typeof oe!="undefined"&&G.open!==oe.open&&(ae.open=G.open),ae}}]),U}(_.Component);A.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:_.createElement("div",{className:"drawer-handle"},_.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var X=A,z=Z.a=X},fjLI:function(H,Z,I){"use strict";I.d(Z,"f",function(){return i}),I.d(Z,"b",function(){return n}),I.d(Z,"a",function(){return l}),I.d(Z,"d",function(){return f}),I.d(Z,"e",function(){return d}),I.d(Z,"c",function(){return u});var N=I("8HAY"),g=I("Vhoy"),S=I("MI8n"),k=I("JYp7"),v=I("pmY6"),m=I("24hK"),C=I("nnTU"),_=I("T8No"),e=I("Cg/j"),h=I("t9D7"),r=function(o,s,E,b){var p=arguments.length,D=p<3?s:b===null?b=Object.getOwnPropertyDescriptor(s,E):b,R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(o,s,E,b);else for(var y=o.length-1;y>=0;y--)(R=o[y])&&(D=(p<3?R(D):p>3?R(s,E,D):R(s,E))||D);return p>3&&D&&Object.defineProperty(s,E,D),D},c=function(o,s){return function(E,b){s(E,b,o)}};function i(o){return o.command!==void 0}class n{constructor(o){this.id=n._idPool++,this._debugName=o}}n._idPool=0,n.CommandPalette=new n("CommandPalette"),n.EditorContext=new n("EditorContext"),n.SimpleEditorContext=new n("SimpleEditorContext"),n.EditorContextCopy=new n("EditorContextCopy"),n.EditorContextPeek=new n("EditorContextPeek"),n.MenubarEditMenu=new n("MenubarEditMenu"),n.MenubarCopy=new n("MenubarCopy"),n.MenubarGoMenu=new n("MenubarGoMenu"),n.MenubarSelectionMenu=new n("MenubarSelectionMenu"),n.InlineCompletionsActions=new n("InlineCompletionsActions");const l=Object(e.c)("menuService"),f=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new S.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:o=>o===n.CommandPalette}}addCommand(o){return this.addCommands(k.a.single(o))}addCommands(o){for(const s of o)this._commands.set(s.id,s);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(v.i)(()=>{let s=!1;for(const E of o)s=this._commands.delete(E.id)||s;s&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(o){return this._commands.get(o)}getCommands(){const o=new Map;return this._commands.forEach((s,E)=>o.set(E,s)),o}appendMenuItem(o,s){return this.appendMenuItems(k.a.single({id:o,item:s}))}appendMenuItems(o){const s=new Set,E=new m.a;for(const{id:b,item:p}of o){let D=this._menuItems.get(b);D||(D=new m.a,this._menuItems.set(b,D)),E.push(D.push(p)),s.add(b)}return this._onDidChangeMenu.fire(s),Object(v.i)(()=>{if(E.size>0){for(let b of E)b();this._onDidChangeMenu.fire(s),E.clear()}})}getMenuItems(o){let s;return this._menuItems.has(o)?s=[...this._menuItems.get(o)]:s=[],o===n.CommandPalette&&this._appendImplicitItems(s),s}_appendImplicitItems(o){const s=new Set;for(const E of o)i(E)&&(s.add(E.command.id),E.alt&&s.add(E.alt.id));this._commands.forEach((E,b)=>{s.has(b)||o.push({command:E})})}};class d extends N.e{constructor(o,s,E,b){super(`submenuitem.${o.submenu.id}`,typeof o.title=="string"?o.title:o.title.value,[],"submenu");this.item=o,this._menuService=s,this._contextKeyService=E,this._options=b}get actions(){const o=[],s=this._menuService.createMenu(this.item.submenu,this._contextKeyService),E=s.getActions(this._options);s.dispose();for(const[,b]of E)b.length>0&&(o.push(...b),o.push(new N.d));return o.length&&o.pop(),o}}let u=class o{constructor(s,E,b,p,D){var R,y;if(this._commandService=D,this.id=s.id,this.label=(b==null?void 0:b.renderShortTitle)&&s.shortTitle?typeof s.shortTitle=="string"?s.shortTitle:s.shortTitle.value:typeof s.title=="string"?s.title:s.title.value,this.tooltip=(y=typeof s.tooltip=="string"?s.tooltip:(R=s.tooltip)===null||R===void 0?void 0:R.value)!==null&&y!==void 0?y:"",this.enabled=!s.precondition||p.contextMatchesRules(s.precondition),this.checked=void 0,s.toggled){const x=s.toggled.condition?s.toggled:{condition:s.toggled};this.checked=p.contextMatchesRules(x.condition),this.checked&&x.tooltip&&(this.tooltip=typeof x.tooltip=="string"?x.tooltip:x.tooltip.value),x.title&&(this.label=typeof x.title=="string"?x.title:x.title.value)}this.item=s,this.alt=E?new o(E,void 0,b,p,D):void 0,this._options=b,h.d.isThemeIcon(s.icon)&&(this.class=g.a.asClassName(s.icon))}dispose(){}run(...s){var E,b;let p=[];return((E=this._options)===null||E===void 0?void 0:E.arg)&&(p=[...p,this._options.arg]),((b=this._options)===null||b===void 0?void 0:b.shouldForwardArgs)&&(p=[...p,...s]),this._commandService.executeCommand(this.id,...p)}};u=r([c(3,_.b),c(4,C.b)],u)},fyJ8:function(H,Z,I){"use strict";var N=I("rePB"),g=I("VTBJ"),S=I("Ff2n"),k=I("U8pU"),v=I("q1tI"),m=I.n(v),C=I("TSYQ"),_=I.n(C),e=I("c+Xe"),h=I("sR1s");function r(f){return f&&Object(k.a)(f)==="object"&&!Array.isArray(f)&&!v.isValidElement(f)}function c(f){return typeof f=="string"?!0:Object(e.c)(f)}function i(f,d){var u,o=f.prefixCls,s=f.className,E=f.record,b=f.index,p=f.dataIndex,D=f.render,R=f.children,y=f.component,x=y===void 0?"td":y,w=f.colSpan,T=f.rowSpan,F=f.fixLeft,P=f.fixRight,A=f.firstFixLeft,X=f.lastFixLeft,z=f.firstFixRight,O=f.lastFixRight,B=f.appendNode,U=f.additionalProps,L=U===void 0?{}:U,G=f.ellipsis,ee=f.align,oe=f.rowType,ae=f.isSticky,be="".concat(o,"-cell"),_e,fe;if(R)fe=R;else{var Re=Object(h.b)(E,p);if(fe=Re,D){var Oe=D(Re,E,b);r(Oe)?(fe=Oe.children,_e=Oe.props):fe=Oe}}Object(k.a)(fe)==="object"&&!Array.isArray(fe)&&!v.isValidElement(fe)&&(fe=null),G&&(X||z)&&(fe=v.createElement("span",{className:"".concat(be,"-content")},fe));var de=_e||{},te=de.colSpan,W=de.rowSpan,Y=de.style,V=de.className,Q=Object(S.a)(de,["colSpan","rowSpan","style","className"]),q=te!==void 0?te:w,ie=W!==void 0?W:T;if(q===0||ie===0)return null;var ne={},J=typeof F=="number",$=typeof P=="number";J&&(ne.position="sticky",ne.left=F),$&&(ne.position="sticky",ne.right=P);var le={};ee&&(le.textAlign=ee);var ce,we=G===!0?{showTitle:!0}:G;we&&(we.showTitle||oe==="header")&&(typeof fe=="string"||typeof fe=="number"?ce=fe.toString():v.isValidElement(fe)&&typeof fe.props.children=="string"&&(ce=fe.props.children));var Fe=Object(g.a)(Object(g.a)(Object(g.a)({title:ce},Q),L),{},{colSpan:q&&q!==1?q:null,rowSpan:ie&&ie!==1?ie:null,className:_()(be,s,(u={},Object(N.a)(u,"".concat(be,"-fix-left"),J),Object(N.a)(u,"".concat(be,"-fix-left-first"),A),Object(N.a)(u,"".concat(be,"-fix-left-last"),X),Object(N.a)(u,"".concat(be,"-fix-right"),$),Object(N.a)(u,"".concat(be,"-fix-right-first"),z),Object(N.a)(u,"".concat(be,"-fix-right-last"),O),Object(N.a)(u,"".concat(be,"-ellipsis"),G),Object(N.a)(u,"".concat(be,"-with-append"),B),Object(N.a)(u,"".concat(be,"-fix-sticky"),(J||$)&&ae),u),L.className,V),style:Object(g.a)(Object(g.a)(Object(g.a)(Object(g.a)({},L.style),le),ne),Y),ref:c(x)?d:null});return v.createElement(x,Object.assign({},Fe),B,fe)}var n=v.forwardRef(i);n.displayName="Cell";var l=v.memo(n,function(f,d){return d.shouldCellUpdate?!d.shouldCellUpdate(d.record,f.record):!1});Z.a=l},gRFJ:function(H,Z,I){H.exports=[I("rdUC"),I("ynwM"),I("RELg"),I("DlR+"),I("CrYA"),I("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(H){return H<10?"0"+H:H}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(H){return rx_escapable.lastIndex=0,rx_escapable.test(H)?'"'+H.replace(rx_escapable,function(Z){var I=meta[Z];return typeof I=="string"?I:"\\u"+("0000"+Z.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+H+'"'}function str(H,Z){var I,N,g,S,k=gap,v,m=Z[H];m&&typeof m=="object"&&typeof m.toJSON=="function"&&(m=m.toJSON(H)),typeof rep=="function"&&(m=rep.call(Z,H,m));switch(typeof m){case"string":return quote(m);case"number":return isFinite(m)?String(m):"null";case"boolean":case"null":return String(m);case"object":if(!m)return"null";if(gap+=indent,v=[],Object.prototype.toString.apply(m)==="[object Array]"){for(S=m.length,I=0;I<S;I+=1)v[I]=str(I,m)||"null";return g=v.length===0?"[]":gap?`[
|
|
|
`+gap+v.join(`,
|
|
|
`+gap)+`
|
|
|
`+k+"]":"["+v.join(",")+"]",gap=k,g}if(rep&&typeof rep=="object")for(S=rep.length,I=0;I<S;I+=1)typeof rep[I]=="string"&&(N=rep[I],g=str(N,m),g&&v.push(quote(N)+(gap?": ":":")+g));else for(N in m)Object.prototype.hasOwnProperty.call(m,N)&&(g=str(N,m),g&&v.push(quote(N)+(gap?": ":":")+g));return g=v.length===0?"{}":gap?`{
|
|
|
`+gap+v.join(`,
|
|
|
`+gap)+`
|
|
|
`+k+"}":"{"+v.join(",")+"}",gap=k,g}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(H,Z,I){var N;if(gap="",indent="",typeof I=="number")for(N=0;N<I;N+=1)indent+=" ";else typeof I=="string"&&(indent=I);if(rep=Z,Z&&typeof Z!="function"&&(typeof Z!="object"||typeof Z.length!="number"))throw new Error("JSON.stringify");return str("",{"":H})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(H,Z){var I,N,g=H[Z];if(g&&typeof g=="object")for(I in g)Object.prototype.hasOwnProperty.call(g,I)&&(N=walk(g,I),N!==void 0?g[I]=N:delete g[I]);return reviver.call(H,Z,g)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(H){return"\\u"+("0000"+H.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(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.mode.ECB=function(){var g=N.lib.BlockCipherMode.extend();return g.Encryptor=g.extend({processBlock:function(S,k){this._cipher.encryptBlock(S,k)}}),g.Decryptor=g.extend({processBlock:function(S,k){this._cipher.decryptBlock(S,k)}}),g}(),N.mode.ECB})},h78n:function(H,Z,I){"use strict";I.d(Z,"a",function(){return A});var N=I("q1tI"),g=I.n(N),S=I("TSYQ"),k=I.n(S),v={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},m=function(O){var B=O.map(function(){return Object(N.useRef)()}),U=Object(N.useRef)();return Object(N.useEffect)(function(){var L=Date.now(),G=!1;Object.keys(B).forEach(function(ee){var oe=B[ee].current;if(!oe)return;G=!0;var ae=oe.style;ae.transitionDuration=".3s, .3s, .3s, .06s",U.current&&L-U.current<100&&(ae.transitionDuration="0s, 0s")}),G&&(U.current=Date.now())}),[B]};function C(){return C=Object.assign||function(z){for(var O=1;O<arguments.length;O++){var B=arguments[O];for(var U in B)Object.prototype.hasOwnProperty.call(B,U)&&(z[U]=B[U])}return z},C.apply(this,arguments)}function _(z,O){return i(z)||c(z,O)||h(z,O)||e()}function e(){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 h(z,O){if(!z)return;if(typeof z=="string")return r(z,O);var B=Object.prototype.toString.call(z).slice(8,-1);if(B==="Object"&&z.constructor&&(B=z.constructor.name),B==="Map"||B==="Set")return Array.from(z);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return r(z,O)}function r(z,O){(O==null||O>z.length)&&(O=z.length);for(var B=0,U=new Array(O);B<O;B++)U[B]=z[B];return U}function c(z,O){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(z)))return;var B=[],U=!0,L=!1,G=void 0;try{for(var ee=z[Symbol.iterator](),oe;!(U=(oe=ee.next()).done)&&!(B.push(oe.value),O&&B.length===O);U=!0);}catch(ae){L=!0,G=ae}finally{try{!U&&ee.return!=null&&ee.return()}finally{if(L)throw G}}return B}function i(z){if(Array.isArray(z))return z}function n(z,O){if(z==null)return{};var B=l(z,O),U,L;if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(z);for(L=0;L<G.length;L++){if(U=G[L],O.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;B[U]=z[U]}}return B}function l(z,O){if(z==null)return{};var B={},U=Object.keys(z),L,G;for(G=0;G<U.length;G++){if(L=U[G],O.indexOf(L)>=0)continue;B[L]=z[L]}return B}var f=function(O){var B=O.className,U=O.percent,L=O.prefixCls,G=O.strokeColor,ee=O.strokeLinecap,oe=O.strokeWidth,ae=O.style,be=O.trailColor,_e=O.trailWidth,fe=O.transition,Re=n(O,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Re.gapPosition;var Oe=Array.isArray(U)?U:[U],de=Array.isArray(G)?G:[G],te=m(Oe),W=_(te,1),Y=W[0],V=oe/2,Q=100-oe/2,q="M ".concat(ee==="round"?V:0,",").concat(V,`
|
|
|
L `).concat(ee==="round"?Q:100,",").concat(V),ie="0 0 100 ".concat(oe),ne=0;return g.a.createElement("svg",C({className:k()("".concat(L,"-line"),B),viewBox:ie,preserveAspectRatio:"none",style:ae},Re),g.a.createElement("path",{className:"".concat(L,"-line-trail"),d:q,strokeLinecap:ee,stroke:be,strokeWidth:_e||oe,fillOpacity:"0"}),Oe.map(function(J,$){var le={strokeDasharray:"".concat(J,"px, 100px"),strokeDashoffset:"-".concat(ne,"px"),transition:fe||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ce=de[$]||de[de.length-1];return ne+=J,g.a.createElement("path",{key:$,className:"".concat(L,"-line-path"),d:q,strokeLinecap:ee,stroke:ce,strokeWidth:oe,fillOpacity:"0",ref:Y[$],style:le})}))};f.defaultProps=v;var d=f;function u(){return u=Object.assign||function(z){for(var O=1;O<arguments.length;O++){var B=arguments[O];for(var U in B)Object.prototype.hasOwnProperty.call(B,U)&&(z[U]=B[U])}return z},u.apply(this,arguments)}function o(z,O){return D(z)||p(z,O)||E(z,O)||s()}function s(){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 E(z,O){if(!z)return;if(typeof z=="string")return b(z,O);var B=Object.prototype.toString.call(z).slice(8,-1);if(B==="Object"&&z.constructor&&(B=z.constructor.name),B==="Map"||B==="Set")return Array.from(z);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return b(z,O)}function b(z,O){(O==null||O>z.length)&&(O=z.length);for(var B=0,U=new Array(O);B<O;B++)U[B]=z[B];return U}function p(z,O){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(z)))return;var B=[],U=!0,L=!1,G=void 0;try{for(var ee=z[Symbol.iterator](),oe;!(U=(oe=ee.next()).done)&&!(B.push(oe.value),O&&B.length===O);U=!0);}catch(ae){L=!0,G=ae}finally{try{!U&&ee.return!=null&&ee.return()}finally{if(L)throw G}}return B}function D(z){if(Array.isArray(z))return z}function R(z,O){if(z==null)return{};var B=y(z,O),U,L;if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(z);for(L=0;L<G.length;L++){if(U=G[L],O.indexOf(U)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(z,U))continue;B[U]=z[U]}}return B}function y(z,O){if(z==null)return{};var B={},U=Object.keys(z),L,G;for(G=0;G<U.length;G++){if(L=U[G],O.indexOf(L)>=0)continue;B[L]=z[L]}return B}var x=0;function w(z){return+z.replace("%","")}function T(z){return Array.isArray(z)?z:[z]}function F(z,O,B,U){var L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,G=arguments.length>5?arguments[5]:void 0,ee=50-U/2,oe=0,ae=-ee,be=0,_e=-2*ee;switch(G){case"left":oe=-ee,ae=0,be=2*ee,_e=0;break;case"right":oe=ee,ae=0,be=-2*ee,_e=0;break;case"bottom":ae=ee,_e=2*ee;break;default:}var fe="M 50,50 m ".concat(oe,",").concat(ae,`
|
|
|
a `).concat(ee,",").concat(ee," 0 1 1 ").concat(be,",").concat(-_e,`
|
|
|
a `).concat(ee,",").concat(ee," 0 1 1 ").concat(-be,",").concat(_e),Re=Math.PI*2*ee,Oe={stroke:B,strokeDasharray:"".concat(O/100*(Re-L),"px ").concat(Re,"px"),strokeDashoffset:"-".concat(L/2+z/100*(Re-L),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:fe,pathStyle:Oe}}var P=function(O){var B=O.prefixCls,U=O.strokeWidth,L=O.trailWidth,G=O.gapDegree,ee=O.gapPosition,oe=O.trailColor,ae=O.strokeLinecap,be=O.style,_e=O.className,fe=O.strokeColor,Re=O.percent,Oe=R(O,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),de=Object(N.useMemo)(function(){return x+=1,x},[]),te=F(0,100,oe,U,G,ee),W=te.pathString,Y=te.pathStyle,V=T(Re),Q=T(fe),q=Q.find(function(le){return Object.prototype.toString.call(le)==="[object Object]"}),ie=m(V),ne=o(ie,1),J=ne[0],$=function(){var ce=0;return V.map(function(we,Fe){var Xe=Q[Fe]||Q[Q.length-1],$e=Object.prototype.toString.call(Xe)==="[object Object]"?"url(#".concat(B,"-gradient-").concat(de,")"):"",Ye=F(ce,we,Xe,U,G,ee);return ce+=we,g.a.createElement("path",{key:Fe,className:"".concat(B,"-circle-path"),d:Ye.pathString,stroke:$e,strokeLinecap:ae,strokeWidth:U,opacity:we===0?0:1,fillOpacity:"0",style:Ye.pathStyle,ref:J[Fe]})})};return g.a.createElement("svg",u({className:k()("".concat(B,"-circle"),_e),viewBox:"0 0 100 100",style:be},Oe),q&&g.a.createElement("defs",null,g.a.createElement("linearGradient",{id:"".concat(B,"-gradient-").concat(de),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(q).sort(function(le,ce){return w(le)-w(ce)}).map(function(le,ce){return g.a.createElement("stop",{key:ce,offset:le,stopColor:q[le]})}))),g.a.createElement("path",{className:"".concat(B,"-circle-trail"),d:W,stroke:oe,strokeLinecap:ae,strokeWidth:L||U,fillOpacity:"0",style:Y}),$().reverse())};P.defaultProps=v;var A=P,X={Line:d,Circle:A}},hW8S:function(H,Z,I){"use strict";I.d(Z,"a",function(){return k}),I.d(Z,"c",function(){return v}),I.d(Z,"b",function(){return m});var N=I("VTBJ"),g=I("Ff2n"),S=I("Kwbf"),k="RC_TABLE_INTERNAL_COL_DEFINE";function v(C){var _=C.expandable,e=Object(g.a)(C,["expandable"]);return"expandable"in C?Object(N.a)(Object(N.a)({},e),_):e}function m(C){return Object.keys(C).reduce(function(_,e){return(e.substr(0,5)==="data-"||e.substr(0,5)==="aria-")&&(_[e]=C[e]),_},{})}},i3hx:function(H,Z,I){},ic2d:function(H,Z,I){"use strict";I.d(Z,"a",function(){return k});var N=I("FWmy"),g=I("746U");class S{constructor(){this.data=new Map}add(v,m){N.a(g.l(v)),N.a(g.k(m)),N.a(!this.data.has(v),"There is already an extension with this id"),this.data.set(v,m)}as(v){return this.data.get(v)||null}}const k=new S},jO9C:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.pad.Iso97971={pad:function(g,S){g.concat(N.lib.WordArray.create([2147483648],1)),N.pad.ZeroPadding.pad(g,S)},unpad:function(g){N.pad.ZeroPadding.unpad(g),g.sigBytes--}},N.pad.Iso97971})},je13:function(H,Z,I){var N=I("5nXd"),g=I("gRFJ"),S=[I("uQRt")];H.exports=N.createStore(g,S)},k3GJ:function(H,Z,I){"use strict";I.d(Z,"a",function(){return mn});var N=I("rePB"),g=I("ODXe"),S=I("Ff2n"),k=I("VTBJ"),v=I("q1tI"),m=I("TSYQ"),C=I.n(m),_=I("Zm9Q"),e=I("6cGi"),h=I("KQm4"),r=I("xEkU"),c=I.n(r),i=I("t23M");function n(ke){var Ge=Object(v.useRef)(),Ve=Object(v.useRef)(!1);function Ne(){for(var xe=arguments.length,Le=new Array(xe),Se=0;Se<xe;Se++)Le[Se]=arguments[Se];Ve.current||(c.a.cancel(Ge.current),Ge.current=c()(function(){ke.apply(void 0,Le)}))}return Object(v.useEffect)(function(){return function(){Ve.current=!0,c.a.cancel(Ge.current)}},[]),Ne}function l(ke){var Ge=Object(v.useRef)([]),Ve=Object(v.useState)({}),Ne=Object(g.a)(Ve,2),xe=Ne[1],Le=Object(v.useRef)(typeof ke=="function"?ke():ke),Se=n(function(){var Be=Le.current;Ge.current.forEach(function(ze){Be=ze(Be)}),Ge.current=[],Le.current=Be,xe({})});function je(Be){Ge.current.push(Be),Se()}return[Le.current,je]}var f=I("4IlW");function d(ke,Ge){var Ve,Ne=ke.prefixCls,xe=ke.id,Le=ke.active,Se=ke.rtl,je=ke.tab,Be=je.key,ze=je.tab,Ke=je.disabled,Qe=je.closeIcon,ot=ke.tabBarGutter,vt=ke.tabPosition,gt=ke.closable,Ot=ke.renderWrapper,Xt=ke.removeAriaLabel,sr=ke.editable,cr=ke.onClick,fr=ke.onRemove,Er=ke.onFocus,yr="".concat(Ne,"-tab");v.useEffect(function(){return fr},[]);var pr={};vt==="top"||vt==="bottom"?pr[Se?"marginLeft":"marginRight"]=ot:pr.marginBottom=ot;var Pr=sr&>!==!1&&!Ke;function Sr(rr){if(Ke)return;cr(rr)}function gn(rr){rr.preventDefault(),rr.stopPropagation(),sr.onEdit("remove",{key:Be,event:rr})}var Cr=v.createElement("div",{key:Be,ref:Ge,className:C()(yr,(Ve={},Object(N.a)(Ve,"".concat(yr,"-with-remove"),Pr),Object(N.a)(Ve,"".concat(yr,"-active"),Le),Object(N.a)(Ve,"".concat(yr,"-disabled"),Ke),Ve)),style:pr,onClick:Sr},v.createElement("div",{role:"tab","aria-selected":Le,id:xe&&"".concat(xe,"-tab-").concat(Be),className:"".concat(yr,"-btn"),"aria-controls":xe&&"".concat(xe,"-panel-").concat(Be),"aria-disabled":Ke,tabIndex:Ke?null:0,onClick:function(Qt){Qt.stopPropagation(),Sr(Qt)},onKeyDown:function(Qt){[f.a.SPACE,f.a.ENTER].includes(Qt.which)&&(Qt.preventDefault(),Sr(Qt))},onFocus:Er},ze),Pr&&v.createElement("button",{type:"button","aria-label":Xt||"remove",tabIndex:0,className:"".concat(yr,"-remove"),onClick:function(Qt){Qt.stopPropagation(),gn(Qt)}},Qe||sr.removeIcon||"\xD7"));return Ot&&(Cr=Ot(Cr)),Cr}var u=v.forwardRef(d),o={width:0,height:0,left:0,top:0};function s(ke,Ge,Ve){return Object(v.useMemo)(function(){for(var Ne,xe=new Map,Le=Ge.get((Ne=ke[0])===null||Ne===void 0?void 0:Ne.key)||o,Se=Le.left+Le.width,je=0;je<ke.length;je+=1){var Be=ke[je].key,ze=Ge.get(Be);if(!ze){var Ke;ze=Ge.get((Ke=ke[je-1])===null||Ke===void 0?void 0:Ke.key)||o}var Qe=xe.get(Be)||Object(k.a)({},ze);Qe.right=Se-Qe.left-Qe.width,xe.set(Be,Qe)}return xe},[ke.map(function(Ne){return Ne.key}).join("_"),Ge,Ve])}var E={width:0,height:0,left:0,top:0,right:0};function b(ke,Ge,Ve,Ne,xe){var Le=xe.tabs,Se=xe.tabPosition,je=xe.rtl,Be,ze,Ke;["top","bottom"].includes(Se)?(Be="width",ze=je?"right":"left",Ke=Math.abs(Ge.left)):(Be="height",ze="top",Ke=-Ge.top);var Qe=Ge[Be],ot=Ve[Be],vt=Ne[Be],gt=Qe;return ot+vt>Qe&&(gt=Qe-vt),Object(v.useMemo)(function(){if(!Le.length)return[0,0];for(var Ot=Le.length,Xt=Ot,sr=0;sr<Ot;sr+=1){var cr=ke.get(Le[sr].key)||E;if(cr[ze]+cr[Be]>Ke+gt){Xt=sr-1;break}}for(var fr=0,Er=Ot-1;Er>=0;Er-=1){var yr=ke.get(Le[Er].key)||E;if(yr[ze]<Ke){fr=Er+1;break}}return[fr,Xt]},[ke,Ke,gt,Se,Le.map(function(Ot){return Ot.key}).join("_"),je])}var p=I("wx14"),D=I("1OyB"),R=I("vuIU"),y=I("JX7q"),x=I("Ji7U"),w=I("LK+K"),T=I("I8Z2"),F=I("bT9E"),P=I("2GS6"),A=I("Gytx"),X=I.n(A),z=I("U8pU"),O=/iPhone/i,B=/iPod/i,U=/iPad/i,L=/\bAndroid(?:.+)Mobile\b/i,G=/Android/i,ee=/\bAndroid(?:.+)SD4930UR\b/i,oe=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,ae=/Windows Phone/i,be=/\bWindows(?:.+)ARM\b/i,_e=/BlackBerry/i,fe=/BB10/i,Re=/Opera Mini/i,Oe=/\b(CriOS|Chrome)(?:.+)Mobile/i,de=/Mobile(?:.+)Firefox\b/i;function te(ke,Ge){return ke.test(Ge)}function W(ke){var Ge=ke||(typeof navigator!="undefined"?navigator.userAgent:""),Ve=(Ge||"").split("[FBAN");if(typeof Ve[1]!="undefined"){var Ne=Ve,xe=Object(g.a)(Ne,1);Ge=xe[0]}if(Ve=Ge.split("Twitter"),typeof Ve[1]!="undefined"){var Le=Ve,Se=Object(g.a)(Le,1);Ge=Se[0]}var je={apple:{phone:te(O,Ge)&&!te(ae,Ge),ipod:te(B,Ge),tablet:!te(O,Ge)&&te(U,Ge)&&!te(ae,Ge),device:(te(O,Ge)||te(B,Ge)||te(U,Ge))&&!te(ae,Ge)},amazon:{phone:te(ee,Ge),tablet:!te(ee,Ge)&&te(oe,Ge),device:te(ee,Ge)||te(oe,Ge)},android:{phone:!te(ae,Ge)&&te(ee,Ge)||!te(ae,Ge)&&te(L,Ge),tablet:!te(ae,Ge)&&!te(ee,Ge)&&!te(L,Ge)&&(te(oe,Ge)||te(G,Ge)),device:!te(ae,Ge)&&(te(ee,Ge)||te(oe,Ge)||te(L,Ge)||te(G,Ge))||te(/\bokhttp\b/i,Ge)},windows:{phone:te(ae,Ge),tablet:te(be,Ge),device:te(ae,Ge)||te(be,Ge)},other:{blackberry:te(_e,Ge),blackberry10:te(fe,Ge),opera:te(Re,Ge),firefox:te(de,Ge),chrome:te(Oe,Ge),device:te(_e,Ge)||te(fe,Ge)||te(Re,Ge)||te(de,Ge)||te(Oe,Ge)},any:null,phone:null,tablet:null};return je.any=je.apple.device||je.android.device||je.windows.device||je.other.device,je.phone=je.apple.phone||je.android.phone||je.windows.phone,je.tablet=je.apple.tablet||je.android.tablet||je.windows.tablet,je}var Y=Object(k.a)(Object(k.a)({},W()),{},{isMobile:W}),V=Y;function Q(){}function q(ke,Ge,Ve){var Ne=Ge||"";return ke.key||"".concat(Ne,"item_").concat(Ve)}function ie(ke){return"".concat(ke,"-menu-")}function ne(ke,Ge){var Ve=-1;v.Children.forEach(ke,function(Ne){Ve+=1,Ne&&Ne.type&&Ne.type.isMenuItemGroup?v.Children.forEach(Ne.props.children,function(xe){Ve+=1,Ge(xe,Ve)}):Ge(Ne,Ve)})}function J(ke,Ge,Ve){if(!ke||Ve.find)return;v.Children.forEach(ke,function(Ne){if(Ne){var xe=Ne.type;if(!xe||!(xe.isSubMenu||xe.isMenuItem||xe.isMenuItemGroup))return;Ge.indexOf(Ne.key)!==-1?Ve.find=!0:Ne.props.children&&J(Ne.props.children,Ge,Ve)}})}var $=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],le=function(Ge){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ne=Ge&&typeof Ge.getBoundingClientRect=="function"&&Ge.getBoundingClientRect().width;if(Ne){if(Ve){var xe=getComputedStyle(Ge),Le=xe.marginLeft,Se=xe.marginRight;Ne+=+Le.replace("px","")+ +Se.replace("px","")}Ne=+Ne.toFixed(6)}return Ne||0},ce=function(Ge,Ve,Ne){Ge&&Object(z.a)(Ge.style)==="object"&&(Ge.style[Ve]=Ne)},we=function(){return V.any},Fe=I("bdgK"),Xe=I("i8i4"),$e=I.n(Xe),Ye=I("wgJM"),Ze=I("l4aY"),qe=I("m+aA"),Pe=I("c+Xe"),Ie=I("zT1h"),Je=I("QC+M");function rt(ke,Ge,Ve){return Ve?ke[0]===Ge[0]:ke[0]===Ge[0]&&ke[1]===Ge[1]}function ye(ke,Ge,Ve){var Ne=ke[Ge]||{};return Object(k.a)(Object(k.a)({},Ne),Ve)}function ue(ke,Ge,Ve,Ne){for(var xe=Ve.points,Le=Object.keys(ke),Se=0;Se<Le.length;Se+=1){var je=Le[Se];if(rt(ke[je].points,xe,Ne))return"".concat(Ge,"-placement-").concat(je)}return""}var he=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var ke=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ke)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(ke==null?void 0:ke.substr(0,4)))},me=I("MNnm");function Ce(ke,Ge){var Ve={};return Ve[ke.toLowerCase()]=Ge.toLowerCase(),Ve["Webkit".concat(ke)]="webkit".concat(Ge),Ve["Moz".concat(ke)]="moz".concat(Ge),Ve["ms".concat(ke)]="MS".concat(Ge),Ve["O".concat(ke)]="o".concat(Ge.toLowerCase()),Ve}function ge(ke,Ge){var Ve={animationend:Ce("Animation","AnimationEnd"),transitionend:Ce("Transition","TransitionEnd")};return ke&&("AnimationEvent"in Ge||delete Ve.animationend.animation,"TransitionEvent"in Ge||delete Ve.transitionend.transition),Ve}var Ee=ge(Object(me.a)(),typeof window!="undefined"?window:{}),Ae={};if(Object(me.a)()){var De=document.createElement("div");Ae=De.style}var Me={};function He(ke){if(Me[ke])return Me[ke];var Ge=Ee[ke];if(Ge)for(var Ve=Object.keys(Ge),Ne=Ve.length,xe=0;xe<Ne;xe+=1){var Le=Ve[xe];if(Object.prototype.hasOwnProperty.call(Ge,Le)&&Le in Ae)return Me[ke]=Ge[Le],Me[ke]}return""}var nt=He("animationend"),at=He("transitionend"),it=!!(nt&&at),st=nt||"animationend",Tt=at||"transitionend";function pt(ke,Ge){if(!ke)return null;if(Object(z.a)(ke)==="object"){var Ve=Ge.replace(/-\w/g,function(Ne){return Ne[1].toUpperCase()});return ke[Ve]}return"".concat(ke,"-").concat(Ge)}var ht="none",Ft="appear",Lt="enter",Yt="leave",$t="none",Mt="prepare",wt="start",Jt="active",Dt="end";function St(ke){var Ge=Object(v.useRef)(!1),Ve=Object(v.useState)(ke),Ne=Object(g.a)(Ve,2),xe=Ne[0],Le=Ne[1];function Se(je){Ge.current||Le(je)}return Object(v.useEffect)(function(){return function(){Ge.current=!0}},[]),[xe,Se]}var _t=Object(me.a)()?v.useLayoutEffect:v.useEffect,Et=_t,Bt=function(){var ke=v.useRef(null);function Ge(){Ye.a.cancel(ke.current)}function Ve(Ne){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;Ge();var Le=Object(Ye.a)(function(){xe<=1?Ne({isCanceled:function(){return Le!==ke.current}}):Ve(Ne,xe-1)});ke.current=Le}return v.useEffect(function(){return function(){Ge()}},[]),[Ve,Ge]},Dr=[Mt,wt,Jt,Dt],mt=!1,Ct=!0;function dt(ke){return ke===Jt||ke===Dt}var Ht=function(ke,Ge){var Ve=v.useState($t),Ne=Object(g.a)(Ve,2),xe=Ne[0],Le=Ne[1],Se=Bt(),je=Object(g.a)(Se,2),Be=je[0],ze=je[1];function Ke(){Le(Mt)}return Et(function(){if(xe!==$t&&xe!==Dt){var Qe=Dr.indexOf(xe),ot=Dr[Qe+1],vt=Ge(xe);vt===mt?Le(ot):Be(function(gt){function Ot(){if(gt.isCanceled())return;Le(ot)}vt===!0?Ot():Promise.resolve(vt).then(Ot)})}},[ke,xe]),v.useEffect(function(){return function(){ze()}},[]),[Ke,xe]},Gt=function(ke){var Ge=Object(v.useRef)(),Ve=Object(v.useRef)(ke);Ve.current=ke;var Ne=v.useCallback(function(Se){Ve.current(Se)},[]);function xe(Se){Se&&(Se.removeEventListener(Tt,Ne),Se.removeEventListener(st,Ne))}function Le(Se){Ge.current&&Ge.current!==Se&&xe(Ge.current),Se&&Se!==Ge.current&&(Se.addEventListener(Tt,Ne),Se.addEventListener(st,Ne),Ge.current=Se)}return v.useEffect(function(){return function(){xe(Ge.current)}},[]),[Le,xe]};function yt(ke,Ge,Ve,Ne){var xe=Ne.motionEnter,Le=xe===void 0?!0:xe,Se=Ne.motionAppear,je=Se===void 0?!0:Se,Be=Ne.motionLeave,ze=Be===void 0?!0:Be,Ke=Ne.motionDeadline,Qe=Ne.motionLeaveImmediately,ot=Ne.onAppearPrepare,vt=Ne.onEnterPrepare,gt=Ne.onLeavePrepare,Ot=Ne.onAppearStart,Xt=Ne.onEnterStart,sr=Ne.onLeaveStart,cr=Ne.onAppearActive,fr=Ne.onEnterActive,Er=Ne.onLeaveActive,yr=Ne.onAppearEnd,pr=Ne.onEnterEnd,Pr=Ne.onLeaveEnd,Sr=Ne.onVisibleChanged,gn=St(),Cr=Object(g.a)(gn,2),rr=Cr[0],Qt=Cr[1],Or=St(ht),Nr=Object(g.a)(Or,2),Vt=Nr[0],Br=Nr[1],vn=St(null),Gr=Object(g.a)(vn,2),en=Gr[0],Jr=Gr[1],Dn=Object(v.useRef)(!1),Jn=Object(v.useRef)(null),En=Object(v.useRef)(!1),yi=Object(v.useRef)(null);function Ui(){var on=Ve();return on||yi.current}var xi=Object(v.useRef)(!1);function Qn(on){var $r=Ui();if(on&&!on.deadline&&on.target!==$r)return;var Zn;Vt===Ft&&xi.current?Zn=yr==null?void 0:yr($r,on):Vt===Lt&&xi.current?Zn=pr==null?void 0:pr($r,on):Vt===Yt&&xi.current&&(Zn=Pr==null?void 0:Pr($r,on)),Zn!==!1&&!En.current&&(Br(ht),Jr(null))}var ln=Gt(Qn),tn=Object(g.a)(ln,1),xn=tn[0],yn=v.useMemo(function(){var on,$r,Zn;switch(Vt){case"appear":return on={},Object(N.a)(on,Mt,ot),Object(N.a)(on,wt,Ot),Object(N.a)(on,Jt,cr),on;case"enter":return $r={},Object(N.a)($r,Mt,vt),Object(N.a)($r,wt,Xt),Object(N.a)($r,Jt,fr),$r;case"leave":return Zn={},Object(N.a)(Zn,Mt,gt),Object(N.a)(Zn,wt,sr),Object(N.a)(Zn,Jt,Er),Zn;default:return{}}},[Vt]),Bi=Ht(Vt,function(on){if(on===Mt){var $r=yn[Mt];return $r?$r(Ui()):mt}if(Qr in yn){var Zn;Jr(((Zn=yn[Qr])===null||Zn===void 0?void 0:Zn.call(yn,Ui(),null))||null)}return Qr===Jt&&(xn(Ui()),Ke>0&&(clearTimeout(Jn.current),Jn.current=setTimeout(function(){Qn({deadline:!0})},Ke))),Ct}),ta=Object(g.a)(Bi,2),ra=ta[0],Qr=ta[1],Yi=dt(Qr);xi.current=Yi,Et(function(){Qt(Ge);var on=Dn.current;if(Dn.current=!0,!ke)return;var $r;!on&&Ge&&je&&($r=Ft),on&&Ge&&Le&&($r=Lt),(on&&!Ge&&ze||!on&&Qe&&!Ge&&ze)&&($r=Yt),$r&&(Br($r),ra())},[Ge]),Object(v.useEffect)(function(){(Vt===Ft&&!je||Vt===Lt&&!Le||Vt===Yt&&!ze)&&Br(ht)},[je,Le,ze]),Object(v.useEffect)(function(){return function(){clearTimeout(Jn.current),En.current=!0}},[]),Object(v.useEffect)(function(){rr!==void 0&&Vt===ht&&(Sr==null||Sr(rr))},[rr,Vt]);var na=en;return yn[Mt]&&Qr===wt&&(na=Object(k.a)({transition:"none"},na)),[Vt,Qr,na,rr!=null?rr:Ge]}var xt=function(ke){Object(x.a)(Ve,ke);var Ge=Object(w.a)(Ve);function Ve(){return Object(D.a)(this,Ve),Ge.apply(this,arguments)}return Object(R.a)(Ve,[{key:"render",value:function(){return this.props.children}}]),Ve}(v.Component),Kt=xt;function Ar(ke){var Ge=ke;Object(z.a)(ke)==="object"&&(Ge=ke.transitionSupport);function Ve(xe){return!!(xe.motionName&&Ge)}var Ne=v.forwardRef(function(xe,Le){var Se=xe.visible,je=Se===void 0?!0:Se,Be=xe.removeOnLeave,ze=Be===void 0?!0:Be,Ke=xe.forceRender,Qe=xe.children,ot=xe.motionName,vt=xe.leavedClassName,gt=xe.eventProps,Ot=Ve(xe),Xt=Object(v.useRef)(),sr=Object(v.useRef)();function cr(){try{return Object(qe.a)(Xt.current||sr.current)}catch(Br){return null}}var fr=yt(Ot,je,cr,xe),Er=Object(g.a)(fr,4),yr=Er[0],pr=Er[1],Pr=Er[2],Sr=Er[3],gn=v.useRef(Sr);Sr&&(gn.current=!0);var Cr=Object(v.useRef)(Le);Cr.current=Le;var rr=v.useCallback(function(Br){Xt.current=Br,Object(Pe.b)(Cr.current,Br)},[]),Qt,Or=Object(k.a)(Object(k.a)({},gt),{},{visible:je});if(!Qe)Qt=null;else if(yr===ht||!Ve(xe))Sr?Qt=Qe(Object(k.a)({},Or),rr):!ze&&gn.current?Qt=Qe(Object(k.a)(Object(k.a)({},Or),{},{className:vt}),rr):Ke?Qt=Qe(Object(k.a)(Object(k.a)({},Or),{},{style:{display:"none"}}),rr):Qt=null;else{var Nr,Vt;pr===Mt?Vt="prepare":dt(pr)?Vt="active":pr===wt&&(Vt="start"),Qt=Qe(Object(k.a)(Object(k.a)({},Or),{},{className:C()(pt(ot,yr),(Nr={},Object(N.a)(Nr,pt(ot,"".concat(yr,"-").concat(Vt)),Vt),Object(N.a)(Nr,ot,typeof ot=="string"),Nr)),style:Pr}),rr)}return v.createElement(Kt,{ref:sr},Qt)});return Ne.displayName="CSSMotion",Ne}var qt=Ar(it),ut="add",kt="keep",Hr="remove",Yr="removed";function On(ke){var Ge;return ke&&Object(z.a)(ke)==="object"&&"key"in ke?Ge=ke:Ge={key:ke},Object(k.a)(Object(k.a)({},Ge),{},{key:String(Ge.key)})}function cn(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return ke.map(On)}function zr(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ve=[],Ne=0,xe=Ge.length,Le=cn(ke),Se=cn(Ge);Le.forEach(function(ze){for(var Ke=!1,Qe=Ne;Qe<xe;Qe+=1){var ot=Se[Qe];if(ot.key===ze.key){Ne<Qe&&(Ve=Ve.concat(Se.slice(Ne,Qe).map(function(vt){return Object(k.a)(Object(k.a)({},vt),{},{status:ut})})),Ne=Qe),Ve.push(Object(k.a)(Object(k.a)({},ot),{},{status:kt})),Ne+=1,Ke=!0;break}}Ke||Ve.push(Object(k.a)(Object(k.a)({},ze),{},{status:Hr}))}),Ne<xe&&(Ve=Ve.concat(Se.slice(Ne).map(function(ze){return Object(k.a)(Object(k.a)({},ze),{},{status:ut})})));var je={};Ve.forEach(function(ze){var Ke=ze.key;je[Ke]=(je[Ke]||0)+1});var Be=Object.keys(je).filter(function(ze){return je[ze]>1});return Be.forEach(function(ze){Ve=Ve.filter(function(Ke){var Qe=Ke.key,ot=Ke.status;return Qe!==ze||ot!==Hr}),Ve.forEach(function(Ke){Ke.key===ze&&(Ke.status=kt)})}),Ve}var Pt=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function dn(ke){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qt,Ve=function(Ne){Object(x.a)(Le,Ne);var xe=Object(w.a)(Le);function Le(){var Se;return Object(D.a)(this,Le),Se=xe.apply(this,arguments),Se.state={keyEntities:[]},Se.removeKey=function(je){Se.setState(function(Be){var ze=Be.keyEntities;return{keyEntities:ze.map(function(Ke){return Ke.key!==je?Ke:Object(k.a)(Object(k.a)({},Ke),{},{status:Yr})})}})},Se}return Object(R.a)(Le,[{key:"render",value:function(){var je=this,Be=this.state.keyEntities,ze=this.props,Ke=ze.component,Qe=ze.children,ot=ze.onVisibleChanged,vt=Object(S.a)(ze,["component","children","onVisibleChanged"]),gt=Ke||v.Fragment,Ot={};return Pt.forEach(function(Xt){Ot[Xt]=vt[Xt],delete vt[Xt]}),delete vt.keys,v.createElement(gt,vt,Be.map(function(Xt){var sr=Xt.status,cr=Object(S.a)(Xt,["status"]),fr=sr===ut||sr===kt;return v.createElement(Ge,Object(p.a)({},Ot,{key:cr.key,visible:fr,eventProps:cr,onVisibleChanged:function(yr){ot==null||ot(yr,{key:cr.key}),yr||je.removeKey(cr.key)}}),Qe)}))}}],[{key:"getDerivedStateFromProps",value:function(je,Be){var ze=je.keys,Ke=Be.keyEntities,Qe=cn(ze),ot=zr(Ke,Qe);return{keyEntities:ot.filter(function(vt){var gt=Ke.find(function(Ot){var Xt=Ot.key;return vt.key===Xt});return!(gt&>.status===Yr&&vt.status===Hr)})}}}]),Le}(v.Component);return Ve.defaultProps={component:"div"},Ve}var ct=dn(it),jr=qt;function xr(ke){var Ge=ke.prefixCls,Ve=ke.motion,Ne=ke.animation,xe=ke.transitionName;return Ve||(Ne?{motionName:"".concat(Ge,"-").concat(Ne)}:xe?{motionName:xe}:null)}function Gn(ke){var Ge=ke.prefixCls,Ve=ke.visible,Ne=ke.zIndex,xe=ke.mask,Le=ke.maskMotion,Se=ke.maskAnimation,je=ke.maskTransitionName;if(!xe)return null;var Be={};return(Le||je||Se)&&(Be=Object(k.a)({motionAppear:!0},xr({motion:Le,prefixCls:Ge,transitionName:je,animation:Se}))),v.createElement(jr,Object(p.a)({},Be,{visible:Ve,removeOnLeave:!0}),function(ze){var Ke=ze.className;return v.createElement("div",{style:{zIndex:Ne},className:C()("".concat(Ge,"-mask"),Ke)})})}var An=I("9mu1"),hn=I("o0o1"),Ei=I.n(hn),Kn=I("HaE+"),bn=["measure","align",null,"motion"],Fr=function(ke,Ge){var Ve=Object(v.useState)(null),Ne=Object(g.a)(Ve,2),xe=Ne[0],Le=Ne[1],Se=Object(v.useRef)(),je=Object(v.useRef)(!1);function Be(Qe){je.current||Le(Qe)}function ze(){Ye.a.cancel(Se.current)}function Ke(Qe){ze(),Se.current=Object(Ye.a)(function(){Be(function(ot){switch(xe){case"align":return"motion";case"motion":return"stable";default:}return ot}),Qe==null||Qe()})}return Object(v.useEffect)(function(){Be("measure")},[ke]),Object(v.useEffect)(function(){switch(xe){case"measure":Ge();break;default:}xe&&(Se.current=Object(Ye.a)(Object(Kn.a)(Ei.a.mark(function Qe(){var ot,vt;return Ei.a.wrap(function(Ot){for(;;)switch(Ot.prev=Ot.next){case 0:ot=bn.indexOf(xe),vt=bn[ot+1],vt&&ot!==-1&&Be(vt);case 3:case"end":return Ot.stop()}},Qe)}))))},[xe]),Object(v.useEffect)(function(){return function(){je.current=!0,ze()}},[]),[xe,Ke]},di=function(ke){var Ge=v.useState({width:0,height:0}),Ve=Object(g.a)(Ge,2),Ne=Ve[0],xe=Ve[1];function Le(je){xe({width:je.offsetWidth,height:je.offsetHeight})}var Se=v.useMemo(function(){var je={};if(ke){var Be=Ne.width,ze=Ne.height;ke.indexOf("height")!==-1&&ze?je.height=ze:ke.indexOf("minHeight")!==-1&&ze&&(je.minHeight=ze),ke.indexOf("width")!==-1&&Be?je.width=Be:ke.indexOf("minWidth")!==-1&&Be&&(je.minWidth=Be)}return je},[ke,Ne]);return[Se,Le]},fn=v.forwardRef(function(ke,Ge){var Ve=ke.visible,Ne=ke.prefixCls,xe=ke.className,Le=ke.style,Se=ke.children,je=ke.zIndex,Be=ke.stretch,ze=ke.destroyPopupOnHide,Ke=ke.forceRender,Qe=ke.align,ot=ke.point,vt=ke.getRootDomNode,gt=ke.getClassNameFromAlign,Ot=ke.onAlign,Xt=ke.onMouseEnter,sr=ke.onMouseLeave,cr=ke.onMouseDown,fr=ke.onTouchStart,Er=Object(v.useRef)(),yr=Object(v.useRef)(),pr=Object(v.useState)(),Pr=Object(g.a)(pr,2),Sr=Pr[0],gn=Pr[1],Cr=di(Be),rr=Object(g.a)(Cr,2),Qt=rr[0],Or=rr[1];function Nr(){Be&&Or(vt())}var Vt=Fr(Ve,Nr),Br=Object(g.a)(Vt,2),vn=Br[0],Gr=Br[1],en=Object(v.useRef)();function Jr(){return ot||vt}function Dn(){var ln;(ln=Er.current)===null||ln===void 0||ln.forceAlign()}function Jn(ln,tn){var xn=gt(tn);Sr!==xn&&gn(xn),vn==="align"&&(Sr!==xn?Promise.resolve().then(function(){Dn()}):Gr(function(){var yn;(yn=en.current)===null||yn===void 0||yn.call(en)}),Ot==null||Ot(ln,tn))}var En=Object(k.a)({},xr(ke));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(ln){var tn=En[ln];En[ln]=function(xn,yn){return Gr(),tn==null?void 0:tn(xn,yn)}});function yi(){return new Promise(function(ln){en.current=ln})}v.useEffect(function(){!En.motionName&&vn==="motion"&&Gr()},[En.motionName,vn]),v.useImperativeHandle(Ge,function(){return{forceAlign:Dn,getElement:function(){return yr.current}}});var Ui=Object(k.a)(Object(k.a)({},Qt),{},{zIndex:je,opacity:vn==="motion"||vn==="stable"||!Ve?void 0:0,pointerEvents:vn==="stable"?void 0:"none"},Le),xi=!0;(Qe==null?void 0:Qe.points)&&(vn==="align"||vn==="stable")&&(xi=!1);var Qn=Se;return v.Children.count(Se)>1&&(Qn=v.createElement("div",{className:"".concat(Ne,"-content")},Se)),v.createElement(jr,Object(p.a)({visible:Ve,ref:yr,leavedClassName:"".concat(Ne,"-hidden")},En,{onAppearPrepare:yi,onEnterPrepare:yi,removeOnLeave:ze,forceRender:Ke}),function(ln,tn){var xn=ln.className,yn=ln.style,Bi=C()(Ne,xe,Sr,xn);return v.createElement(An.a,{target:Jr(),key:"popup",ref:Er,monitorWindowResize:!0,disabled:xi,align:Qe,onAlign:Jn},v.createElement("div",{ref:tn,className:Bi,onMouseEnter:Xt,onMouseLeave:sr,onMouseDownCapture:cr,onTouchStartCapture:fr,style:Object(k.a)(Object(k.a)({},yn),Ui)},Qn))})});fn.displayName="PopupInner";var Vr=fn,dr=v.forwardRef(function(ke,Ge){var Ve=ke.prefixCls,Ne=ke.visible,xe=ke.zIndex,Le=ke.children,Se=ke.mobile;Se=Se===void 0?{}:Se;var je=Se.popupClassName,Be=Se.popupStyle,ze=Se.popupMotion,Ke=ze===void 0?{}:ze,Qe=Se.popupRender,ot=v.useRef();v.useImperativeHandle(Ge,function(){return{forceAlign:function(){},getElement:function(){return ot.current}}});var vt=Object(k.a)({zIndex:xe},Be),gt=Le;return v.Children.count(Le)>1&&(gt=v.createElement("div",{className:"".concat(Ve,"-content")},Le)),Qe&&(gt=Qe(gt)),v.createElement(jr,Object(p.a)({visible:Ne,ref:ot,removeOnLeave:!0},Ke),function(Ot,Xt){var sr=Ot.className,cr=Ot.style,fr=C()(Ve,je,sr);return v.createElement("div",{ref:Xt,className:fr,style:Object(k.a)(Object(k.a)({},cr),vt)},gt)})});dr.displayName="MobilePopupInner";var nn=dr,_n=["visible","mobile"],jt=v.forwardRef(function(ke,Ge){var Ve=ke.visible,Ne=ke.mobile,xe=Object(S.a)(ke,_n),Le=Object(v.useState)(Ve),Se=Object(g.a)(Le,2),je=Se[0],Be=Se[1],ze=Object(v.useState)(!1),Ke=Object(g.a)(ze,2),Qe=Ke[0],ot=Ke[1],vt=Object(k.a)(Object(k.a)({},xe),{},{visible:je});Object(v.useEffect)(function(){Be(Ve),Ve&&Ne&&ot(he())},[Ve,Ne]);var gt=Qe?v.createElement(nn,Object(p.a)({},vt,{mobile:Ne,ref:Ge})):v.createElement(Vr,Object(p.a)({},vt,{ref:Ge}));return v.createElement("div",null,v.createElement(Gn,vt),gt)});jt.displayName="Popup";var lr=jt,ur=v.createContext(null),Rr=ur;function br(){}function hi(){return""}function Fn(ke){return ke?ke.ownerDocument:window.document}var $i=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Ji(ke){var Ge=function(Ve){Object(x.a)(xe,Ve);var Ne=Object(w.a)(xe);function xe(Le){var Se;Object(D.a)(this,xe),Se=Ne.call(this,Le),Se.popupRef=v.createRef(),Se.triggerRef=v.createRef(),Se.attachId=void 0,Se.clickOutsideHandler=void 0,Se.touchOutsideHandler=void 0,Se.contextMenuOutsideHandler1=void 0,Se.contextMenuOutsideHandler2=void 0,Se.mouseDownTimeout=void 0,Se.focusTime=void 0,Se.preClickTime=void 0,Se.preTouchTime=void 0,Se.delayTimer=void 0,Se.hasPopupMouseDown=void 0,Se.onMouseEnter=function(Be){var ze=Se.props.mouseEnterDelay;Se.fireEvents("onMouseEnter",Be),Se.delaySetPopupVisible(!0,ze,ze?null:Be)},Se.onMouseMove=function(Be){Se.fireEvents("onMouseMove",Be),Se.setPoint(Be)},Se.onMouseLeave=function(Be){Se.fireEvents("onMouseLeave",Be),Se.delaySetPopupVisible(!1,Se.props.mouseLeaveDelay)},Se.onPopupMouseEnter=function(){Se.clearDelayTimer()},Se.onPopupMouseLeave=function(Be){var ze;if(Be.relatedTarget&&!Be.relatedTarget.setTimeout&&Object(Ze.a)((ze=Se.popupRef.current)===null||ze===void 0?void 0:ze.getElement(),Be.relatedTarget))return;Se.delaySetPopupVisible(!1,Se.props.mouseLeaveDelay)},Se.onFocus=function(Be){Se.fireEvents("onFocus",Be),Se.clearDelayTimer(),Se.isFocusToShow()&&(Se.focusTime=Date.now(),Se.delaySetPopupVisible(!0,Se.props.focusDelay))},Se.onMouseDown=function(Be){Se.fireEvents("onMouseDown",Be),Se.preClickTime=Date.now()},Se.onTouchStart=function(Be){Se.fireEvents("onTouchStart",Be),Se.preTouchTime=Date.now()},Se.onBlur=function(Be){Se.fireEvents("onBlur",Be),Se.clearDelayTimer(),Se.isBlurToHide()&&Se.delaySetPopupVisible(!1,Se.props.blurDelay)},Se.onContextMenu=function(Be){Be.preventDefault(),Se.fireEvents("onContextMenu",Be),Se.setPopupVisible(!0,Be)},Se.onContextMenuClose=function(){Se.isContextMenuToShow()&&Se.close()},Se.onClick=function(Be){if(Se.fireEvents("onClick",Be),Se.focusTime){var ze;if(Se.preClickTime&&Se.preTouchTime?ze=Math.min(Se.preClickTime,Se.preTouchTime):Se.preClickTime?ze=Se.preClickTime:Se.preTouchTime&&(ze=Se.preTouchTime),Math.abs(ze-Se.focusTime)<20)return;Se.focusTime=0}Se.preClickTime=0,Se.preTouchTime=0,Se.isClickToShow()&&(Se.isClickToHide()||Se.isBlurToHide())&&Be&&Be.preventDefault&&Be.preventDefault();var Ke=!Se.state.popupVisible;(Se.isClickToHide()&&!Ke||Ke&&Se.isClickToShow())&&Se.setPopupVisible(!Se.state.popupVisible,Be)},Se.onPopupMouseDown=function(){if(Se.hasPopupMouseDown=!0,clearTimeout(Se.mouseDownTimeout),Se.mouseDownTimeout=window.setTimeout(function(){Se.hasPopupMouseDown=!1},0),Se.context){var Be;(Be=Se.context).onPopupMouseDown.apply(Be,arguments)}},Se.onDocumentClick=function(Be){if(Se.props.mask&&!Se.props.maskClosable)return;var ze=Be.target,Ke=Se.getRootDomNode(),Qe=Se.getPopupDomNode();(!Object(Ze.a)(Ke,ze)||Se.isContextMenuOnly())&&!Object(Ze.a)(Qe,ze)&&!Se.hasPopupMouseDown&&Se.close()},Se.getRootDomNode=function(){var Be=Se.props.getTriggerDOMNode;if(Be)return Be(Se.triggerRef.current);try{var ze=Object(qe.a)(Se.triggerRef.current);if(ze)return ze}catch(Ke){}return $e.a.findDOMNode(Object(y.a)(Se))},Se.getPopupClassNameFromAlign=function(Be){var ze=[],Ke=Se.props,Qe=Ke.popupPlacement,ot=Ke.builtinPlacements,vt=Ke.prefixCls,gt=Ke.alignPoint,Ot=Ke.getPopupClassNameFromAlign;return Qe&&ot&&ze.push(ue(ot,vt,Be,gt)),Ot&&ze.push(Ot(Be)),ze.join(" ")},Se.getComponent=function(){var Be=Se.props,ze=Be.prefixCls,Ke=Be.destroyPopupOnHide,Qe=Be.popupClassName,ot=Be.onPopupAlign,vt=Be.popupMotion,gt=Be.popupAnimation,Ot=Be.popupTransitionName,Xt=Be.popupStyle,sr=Be.mask,cr=Be.maskAnimation,fr=Be.maskTransitionName,Er=Be.maskMotion,yr=Be.zIndex,pr=Be.popup,Pr=Be.stretch,Sr=Be.alignPoint,gn=Be.mobile,Cr=Be.forceRender,rr=Se.state,Qt=rr.popupVisible,Or=rr.point,Nr=Se.getPopupAlign(),Vt={};return Se.isMouseEnterToShow()&&(Vt.onMouseEnter=Se.onPopupMouseEnter),Se.isMouseLeaveToHide()&&(Vt.onMouseLeave=Se.onPopupMouseLeave),Vt.onMouseDown=Se.onPopupMouseDown,Vt.onTouchStart=Se.onPopupMouseDown,v.createElement(lr,Object(p.a)({prefixCls:ze,destroyPopupOnHide:Ke,visible:Qt,point:Sr&&Or,className:Qe,align:Nr,onAlign:ot,animation:gt,getClassNameFromAlign:Se.getPopupClassNameFromAlign},Vt,{stretch:Pr,getRootDomNode:Se.getRootDomNode,style:Xt,mask:sr,zIndex:yr,transitionName:Ot,maskAnimation:cr,maskTransitionName:fr,maskMotion:Er,ref:Se.popupRef,motion:vt,mobile:gn,forceRender:Cr}),typeof pr=="function"?pr():pr)},Se.attachParent=function(Be){Ye.a.cancel(Se.attachId);var ze=Se.props,Ke=ze.getPopupContainer,Qe=ze.getDocument,ot=Se.getRootDomNode(),vt;Ke?(ot||Ke.length===0)&&(vt=Ke(ot)):vt=Qe(Se.getRootDomNode()).body,vt?vt.appendChild(Be):Se.attachId=Object(Ye.a)(function(){Se.attachParent(Be)})},Se.getContainer=function(){var Be=Se.props.getDocument,ze=Be(Se.getRootDomNode()).createElement("div");return ze.style.position="absolute",ze.style.top="0",ze.style.left="0",ze.style.width="100%",Se.attachParent(ze),ze},Se.setPoint=function(Be){var ze=Se.props.alignPoint;if(!ze||!Be)return;Se.setState({point:{pageX:Be.pageX,pageY:Be.pageY}})},Se.handlePortalUpdate=function(){Se.state.prevPopupVisible!==Se.state.popupVisible&&Se.props.afterPopupVisibleChange(Se.state.popupVisible)},Se.triggerContextValue={onPopupMouseDown:Se.onPopupMouseDown};var je;return"popupVisible"in Le?je=!!Le.popupVisible:je=!!Le.defaultPopupVisible,Se.state={prevPopupVisible:je,popupVisible:je},$i.forEach(function(Be){Se["fire".concat(Be)]=function(ze){Se.fireEvents(Be,ze)}}),Se}return Object(R.a)(xe,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Se=this.props,je=this.state;if(je.popupVisible){var Be;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(Be=Se.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Ie.a)(Be,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(Be=Be||Se.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Ie.a)(Be,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(Be=Be||Se.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Ie.a)(Be,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Ie.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Ye.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var Se;return((Se=this.popupRef.current)===null||Se===void 0?void 0:Se.getElement())||null}},{key:"getPopupAlign",value:function(){var Se=this.props,je=Se.popupPlacement,Be=Se.popupAlign,ze=Se.builtinPlacements;return je&&ze?ye(ze,je,Be):Be}},{key:"setPopupVisible",value:function(Se,je){var Be=this.props.alignPoint,ze=this.state.popupVisible;this.clearDelayTimer(),ze!==Se&&("popupVisible"in this.props||this.setState({popupVisible:Se,prevPopupVisible:ze}),this.props.onPopupVisibleChange(Se)),Be&&je&&Se&&this.setPoint(je)}},{key:"delaySetPopupVisible",value:function(Se,je,Be){var ze=this,Ke=je*1e3;if(this.clearDelayTimer(),Ke){var Qe=Be?{pageX:Be.pageX,pageY:Be.pageY}:null;this.delayTimer=window.setTimeout(function(){ze.setPopupVisible(Se,Qe),ze.clearDelayTimer()},Ke)}else this.setPopupVisible(Se,Be)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(Se){var je=this.props.children.props,Be=this.props;return je[Se]&&Be[Se]?this["fire".concat(Se)]:je[Se]||Be[Se]}},{key:"isClickToShow",value:function(){var Se=this.props,je=Se.action,Be=Se.showAction;return je.indexOf("click")!==-1||Be.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var Se=this.props.action;return Se==="contextMenu"||Se.length===1&&Se[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var Se=this.props,je=Se.action,Be=Se.showAction;return je.indexOf("contextMenu")!==-1||Be.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var Se=this.props,je=Se.action,Be=Se.hideAction;return je.indexOf("click")!==-1||Be.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var Se=this.props,je=Se.action,Be=Se.showAction;return je.indexOf("hover")!==-1||Be.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var Se=this.props,je=Se.action,Be=Se.hideAction;return je.indexOf("hover")!==-1||Be.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var Se=this.props,je=Se.action,Be=Se.showAction;return je.indexOf("focus")!==-1||Be.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var Se=this.props,je=Se.action,Be=Se.hideAction;return je.indexOf("focus")!==-1||Be.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var Se;(Se=this.popupRef.current)===null||Se===void 0||Se.forceAlign()}}},{key:"fireEvents",value:function(Se,je){var Be=this.props.children.props[Se];Be&&Be(je);var ze=this.props[Se];ze&&ze(je)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var Se=this.state.popupVisible,je=this.props,Be=je.children,ze=je.forceRender,Ke=je.alignPoint,Qe=je.className,ot=je.autoDestroy,vt=v.Children.only(Be),gt={key:"trigger"};this.isContextMenuToShow()?gt.onContextMenu=this.onContextMenu:gt.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(gt.onClick=this.onClick,gt.onMouseDown=this.onMouseDown,gt.onTouchStart=this.onTouchStart):(gt.onClick=this.createTwoChains("onClick"),gt.onMouseDown=this.createTwoChains("onMouseDown"),gt.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(gt.onMouseEnter=this.onMouseEnter,Ke&&(gt.onMouseMove=this.onMouseMove)):gt.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?gt.onMouseLeave=this.onMouseLeave:gt.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(gt.onFocus=this.onFocus,gt.onBlur=this.onBlur):(gt.onFocus=this.createTwoChains("onFocus"),gt.onBlur=this.createTwoChains("onBlur"));var Ot=C()(vt&&vt.props&&vt.props.className,Qe);Ot&&(gt.className=Ot);var Xt=Object(k.a)({},gt);Object(Pe.c)(vt)&&(Xt.ref=Object(Pe.a)(this.triggerRef,vt.ref));var sr=v.cloneElement(vt,Xt),cr;return(Se||this.popupRef.current||ze)&&(cr=v.createElement(ke,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!Se&&ot&&(cr=null),v.createElement(Rr.Provider,{value:this.triggerContextValue},sr,cr)}}],[{key:"getDerivedStateFromProps",value:function(Se,je){var Be=Se.popupVisible,ze={};return Be!==void 0&&je.popupVisible!==Be&&(ze.popupVisible=Be,ze.prevPopupVisible=je.popupVisible),ze}}]),xe}(v.Component);return Ge.contextType=Rr,Ge.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:hi,getDocument:Fn,onPopupVisibleChange:br,afterPopupVisibleChange:br,onPopupAlign:br,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Ge}var Oi=Ji(Je.a),pn={adjustX:1,adjustY:1},Ki={topLeft:{points:["bl","tl"],overflow:pn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:pn,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:pn,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:pn,offset:[4,0]}},Zr={topLeft:{points:["bl","tl"],overflow:pn,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:pn,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:pn,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:pn,offset:[4,0]}},ri=Ki,kn=0,sn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},Tn=function(Ge,Ve,Ne){var xe=ie(Ve),Le=Ge.getState();Ge.setState({defaultActiveFirst:Object(k.a)(Object(k.a)({},Le.defaultActiveFirst),{},Object(N.a)({},xe,Ne))})},fi=function(ke){Object(x.a)(Ve,ke);var Ge=Object(w.a)(Ve);function Ve(Ne){var xe;Object(D.a)(this,Ve),xe=Ge.call(this,Ne),xe.onDestroy=function(Ke){xe.props.onDestroy(Ke)},xe.onKeyDown=function(Ke){var Qe=Ke.keyCode,ot=xe.menuInstance,vt=xe.props.store,gt=xe.getVisible();if(Qe===f.a.ENTER)return xe.onTitleClick(Ke),Tn(vt,xe.props.eventKey,!0),!0;if(Qe===f.a.RIGHT)return gt?ot.onKeyDown(Ke):(xe.triggerOpenChange(!0),Tn(vt,xe.props.eventKey,!0)),!0;if(Qe===f.a.LEFT){var Ot;if(gt)Ot=ot.onKeyDown(Ke);else return;return Ot||(xe.triggerOpenChange(!1),Ot=!0),Ot}return gt&&(Qe===f.a.UP||Qe===f.a.DOWN)?ot.onKeyDown(Ke):void 0},xe.onOpenChange=function(Ke){xe.props.onOpenChange(Ke)},xe.onPopupVisibleChange=function(Ke){xe.triggerOpenChange(Ke,Ke?"mouseenter":"mouseleave")},xe.onMouseEnter=function(Ke){var Qe=xe.props,ot=Qe.eventKey,vt=Qe.onMouseEnter,gt=Qe.store;Tn(gt,xe.props.eventKey,!1),vt({key:ot,domEvent:Ke})},xe.onMouseLeave=function(Ke){var Qe=xe.props,ot=Qe.parentMenu,vt=Qe.eventKey,gt=Qe.onMouseLeave;ot.subMenuInstance=Object(y.a)(xe),gt({key:vt,domEvent:Ke})},xe.onTitleMouseEnter=function(Ke){var Qe=xe.props,ot=Qe.eventKey,vt=Qe.onItemHover,gt=Qe.onTitleMouseEnter;vt({key:ot,hover:!0}),gt({key:ot,domEvent:Ke})},xe.onTitleMouseLeave=function(Ke){var Qe=xe.props,ot=Qe.parentMenu,vt=Qe.eventKey,gt=Qe.onItemHover,Ot=Qe.onTitleMouseLeave;ot.subMenuInstance=Object(y.a)(xe),gt({key:vt,hover:!1}),Ot({key:vt,domEvent:Ke})},xe.onTitleClick=function(Ke){var Qe=Object(y.a)(xe),ot=Qe.props;if(ot.onTitleClick({key:ot.eventKey,domEvent:Ke}),ot.triggerSubMenuAction==="hover")return;xe.triggerOpenChange(!xe.getVisible(),"click"),Tn(ot.store,xe.props.eventKey,!1)},xe.onSubMenuClick=function(Ke){typeof xe.props.onClick=="function"&&xe.props.onClick(xe.addKeyPath(Ke))},xe.onSelect=function(Ke){xe.props.onSelect(Ke)},xe.onDeselect=function(Ke){xe.props.onDeselect(Ke)},xe.getPrefixCls=function(){return"".concat(xe.props.rootPrefixCls,"-submenu")},xe.getActiveClassName=function(){return"".concat(xe.getPrefixCls(),"-active")},xe.getDisabledClassName=function(){return"".concat(xe.getPrefixCls(),"-disabled")},xe.getSelectedClassName=function(){return"".concat(xe.getPrefixCls(),"-selected")},xe.getOpenClassName=function(){return"".concat(xe.props.rootPrefixCls,"-submenu-open")},xe.getVisible=function(){return xe.state.isOpen},xe.getMode=function(){return xe.state.mode},xe.saveMenuInstance=function(Ke){xe.menuInstance=Ke},xe.addKeyPath=function(Ke){return Object(k.a)(Object(k.a)({},Ke),{},{keyPath:(Ke.keyPath||[]).concat(xe.props.eventKey)})},xe.triggerOpenChange=function(Ke,Qe){var ot=xe.props.eventKey,vt=function(){xe.onOpenChange({key:ot,item:Object(y.a)(xe),trigger:Qe,open:Ke})};Qe==="mouseenter"?xe.mouseenterTimeout=setTimeout(function(){vt()},0):vt()},xe.isChildrenSelected=function(){var Ke={find:!1};return J(xe.props.children,xe.props.selectedKeys,Ke),Ke.find},xe.isInlineMode=function(){return xe.getMode()==="inline"},xe.adjustWidth=function(){if(!xe.subMenuTitle||!xe.menuInstance)return;var Ke=Xe.findDOMNode(xe.menuInstance);if(Ke.offsetWidth>=xe.subMenuTitle.offsetWidth)return;Ke.style.minWidth="".concat(xe.subMenuTitle.offsetWidth,"px")},xe.saveSubMenuTitle=function(Ke){xe.subMenuTitle=Ke},xe.getBaseProps=function(){var Ke=Object(y.a)(xe),Qe=Ke.props,ot=xe.getMode();return{mode:ot==="horizontal"?"vertical":ot,visible:xe.getVisible(),level:Qe.level+1,inlineIndent:Qe.inlineIndent,focusable:!1,onClick:xe.onSubMenuClick,onSelect:xe.onSelect,onDeselect:xe.onDeselect,onDestroy:xe.onDestroy,selectedKeys:Qe.selectedKeys,eventKey:"".concat(Qe.eventKey,"-menu-"),openKeys:Qe.openKeys,motion:Qe.motion,onOpenChange:xe.onOpenChange,subMenuOpenDelay:Qe.subMenuOpenDelay,parentMenu:Object(y.a)(xe),subMenuCloseDelay:Qe.subMenuCloseDelay,forceSubMenuRender:Qe.forceSubMenuRender,triggerSubMenuAction:Qe.triggerSubMenuAction,builtinPlacements:Qe.builtinPlacements,defaultActiveFirst:Qe.store.getState().defaultActiveFirst[ie(Qe.eventKey)],multiple:Qe.multiple,prefixCls:Qe.rootPrefixCls,id:xe.internalMenuId,manualRef:xe.saveMenuInstance,itemIcon:Qe.itemIcon,expandIcon:Qe.expandIcon,direction:Qe.direction}},xe.getMotion=function(Ke,Qe){var ot=Object(y.a)(xe),vt=ot.haveRendered,gt=xe.props,Ot=gt.motion,Xt=gt.rootPrefixCls,sr=Object(k.a)(Object(k.a)({},Ot),{},{leavedClassName:"".concat(Xt,"-hidden"),removeOnLeave:!1,motionAppear:vt||!Qe||Ke!=="inline"});return sr};var Le=Ne.store,Se=Ne.eventKey,je=Le.getState(),Be=je.defaultActiveFirst;xe.isRootMenu=!1;var ze=!1;return Be&&(ze=Be[Se]),Tn(Le,Se,ze),xe.state={mode:Ne.mode,isOpen:Ne.isOpen},xe}return Object(R.a)(Ve,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var xe=this,Le=this.props,Se=Le.mode,je=Le.parentMenu,Be=Le.manualRef,ze=Le.isOpen,Ke=function(){xe.setState({mode:Se,isOpen:ze})},Qe=ze!==this.state.isOpen,ot=Se!==this.state.mode;if((ot||Qe)&&(Ye.a.cancel(this.updateStateRaf),ot?this.updateStateRaf=Object(Ye.a)(Ke):Ke()),Be&&Be(this),Se!=="horizontal"||!(je==null?void 0:je.isRootMenu)||!ze)return;this.minWidthTimeout=setTimeout(function(){return xe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var xe=this.props,Le=xe.onDestroy,Se=xe.eventKey;Le&&Le(Se),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),Ye.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(xe,Le){var Se=this.getBaseProps();return v.createElement(Fi,Object(p.a)({},Se,{id:this.internalMenuId,className:xe,style:Le}),this.props.children)}},{key:"renderChildren",value:function(){var xe=this,Le=this.getBaseProps(),Se=Le.mode,je=Le.visible,Be=Le.forceSubMenuRender,ze=Le.direction,Ke=this.getMotion(Se,je);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||je||Be,!this.haveOpened)return v.createElement("div",null);var Qe=C()("".concat(Le.prefixCls,"-sub"),Object(N.a)({},"".concat(Le.prefixCls,"-rtl"),ze==="rtl"));return this.isInlineMode()?v.createElement(jr,Object(p.a)({visible:Le.visible,forceRender:Be},Ke),function(ot){var vt=ot.className,gt=ot.style,Ot=C()(Qe,vt);return xe.renderPopupMenu(Ot,gt)}):this.renderPopupMenu(Qe)}},{key:"render",value:function(){var xe,Le,Se,je=Object(k.a)({},this.props),Be=this.getVisible(),ze=this.getPrefixCls(),Ke=this.isInlineMode(),Qe=this.getMode(),ot=C()(ze,"".concat(ze,"-").concat(Qe),(xe={},Object(N.a)(xe,je.className,!!je.className),Object(N.a)(xe,this.getOpenClassName(),Be),Object(N.a)(xe,this.getActiveClassName(),je.active||Be&&!Ke),Object(N.a)(xe,this.getDisabledClassName(),je.disabled),Object(N.a)(xe,this.getSelectedClassName(),this.isChildrenSelected()),xe));this.internalMenuId||(je.eventKey?this.internalMenuId="".concat(je.eventKey,"$Menu"):(kn+=1,this.internalMenuId="$__$".concat(kn,"$Menu")));var vt={},gt={},Ot={};je.disabled||(vt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},gt={onClick:this.onTitleClick},Ot={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Xt={},sr=je.direction,cr=sr==="rtl";Ke&&(cr?Xt.paddingRight=je.inlineIndent*je.level:Xt.paddingLeft=je.inlineIndent*je.level);var fr={};this.getVisible()&&(fr={"aria-owns":this.internalMenuId});var Er=null;Qe!=="horizontal"&&(Er=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Er=v.createElement(this.props.expandIcon,Object(k.a)({},this.props))));var yr=v.createElement("div",Object(p.a)({ref:this.saveSubMenuTitle,style:Xt,className:"".concat(ze,"-title"),role:"button"},Ot,gt,{"aria-expanded":Be},fr,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,Er||v.createElement("i",{className:"".concat(ze,"-arrow")})),pr=this.renderChildren(),Pr=((Le=je.parentMenu)===null||Le===void 0?void 0:Le.isRootMenu)?je.parentMenu.props.getPopupContainer:function(Jr){return Jr.parentNode},Sr=sn[Qe],gn=je.popupOffset?{offset:je.popupOffset}:{},Cr=C()((Se={},Object(N.a)(Se,je.popupClassName,je.popupClassName&&!Ke),Object(N.a)(Se,"".concat(ze,"-rtl"),cr),Se)),rr=je.disabled,Qt=je.triggerSubMenuAction,Or=je.subMenuOpenDelay,Nr=je.forceSubMenuRender,Vt=je.subMenuCloseDelay,Br=je.builtinPlacements;$.forEach(function(Jr){return delete je[Jr]}),delete je.onClick;var vn=cr?Object(k.a)(Object(k.a)({},Zr),Br):Object(k.a)(Object(k.a)({},Ki),Br);delete je.direction;var Gr=this.getBaseProps(),en=Ke?null:this.getMotion(Gr.mode,Gr.visible);return v.createElement("li",Object(p.a)({},je,vt,{className:ot,role:"menuitem"}),v.createElement(Oi,{prefixCls:ze,popupClassName:C()("".concat(ze,"-popup"),Cr),getPopupContainer:Pr,builtinPlacements:vn,popupPlacement:Sr,popupVisible:Ke?!1:Be,popupAlign:gn,popup:Ke?null:pr,action:rr||Ke?[]:[Qt],mouseEnterDelay:Or,mouseLeaveDelay:Vt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Nr,popupMotion:en},yr),Ke?pr:null)}}]),Ve}(v.Component);fi.defaultProps={onMouseEnter:Q,onMouseLeave:Q,onTitleMouseEnter:Q,onTitleMouseLeave:Q,onTitleClick:Q,manualRef:Q,mode:"vertical",title:""};var zn=Object(T.b)(function(ke,Ge){var Ve=ke.openKeys,Ne=ke.activeKey,xe=ke.selectedKeys,Le=Ge.eventKey,Se=Ge.subMenuKey;return{isOpen:Ve.indexOf(Le)>-1,active:Ne[Se]===Le,selectedKeys:xe}})(fi);zn.isSubMenu=!0;var Vn=zn,ki="menuitem-overflowed",Mi=.5,Xn=function(ke){Object(x.a)(Ve,ke);var Ge=Object(w.a)(Ve);function Ve(){var Ne;return Object(D.a)(this,Ve),Ne=Ge.apply(this,arguments),Ne.resizeObserver=null,Ne.mutationObserver=null,Ne.originalTotalWidth=0,Ne.overflowedItems=[],Ne.menuItemSizes=[],Ne.cancelFrameId=null,Ne.state={lastVisibleIndex:void 0},Ne.childRef=v.createRef(),Ne.getMenuItemNodes=function(){var xe=Ne.props.prefixCls,Le=Ne.childRef.current;return Le?[].slice.call(Le.children).filter(function(Se){return Se.className.split(" ").indexOf("".concat(xe,"-overflowed-submenu"))<0}):[]},Ne.getOverflowedSubMenuItem=function(xe,Le,Se){var je=Ne.props,Be=je.overflowedIndicator,ze=je.level,Ke=je.mode,Qe=je.prefixCls,ot=je.theme;if(ze!==1||Ke!=="horizontal")return null;var vt=Ne.props.children[0],gt=vt.props,Ot=gt.children,Xt=gt.title,sr=gt.style,cr=Object(S.a)(gt,["children","title","style"]),fr=Object(k.a)({},sr),Er="".concat(xe,"-overflowed-indicator"),yr="".concat(xe,"-overflowed-indicator");Le.length===0&&Se!==!0?fr=Object(k.a)(Object(k.a)({},fr),{},{display:"none"}):Se&&(fr=Object(k.a)(Object(k.a)({},fr),{},{visibility:"hidden",position:"absolute"}),Er="".concat(Er,"-placeholder"),yr="".concat(yr,"-placeholder"));var pr=ot?"".concat(Qe,"-").concat(ot):"",Pr={};return $.forEach(function(Sr){cr[Sr]!==void 0&&(Pr[Sr]=cr[Sr])}),v.createElement(Vn,Object(p.a)({title:Be,className:"".concat(Qe,"-overflowed-submenu"),popupClassName:pr},Pr,{key:Er,eventKey:yr,disabled:!1,style:fr}),Le)},Ne.setChildrenWidthAndResize=function(){if(Ne.props.mode!=="horizontal")return;var xe=Ne.childRef.current;if(!xe)return;var Le=xe.children;if(!Le||Le.length===0)return;var Se=xe.children[Le.length-1];ce(Se,"display","inline-block");var je=Ne.getMenuItemNodes(),Be=je.filter(function(ze){return ze.className.split(" ").indexOf(ki)>=0});Be.forEach(function(ze){ce(ze,"display","inline-block")}),Ne.menuItemSizes=je.map(function(ze){return le(ze,!0)}),Be.forEach(function(ze){ce(ze,"display","none")}),Ne.overflowedIndicatorWidth=le(xe.children[xe.children.length-1],!0),Ne.originalTotalWidth=Ne.menuItemSizes.reduce(function(ze,Ke){return ze+Ke},0),Ne.handleResize(),ce(Se,"display","none")},Ne.handleResize=function(){if(Ne.props.mode!=="horizontal")return;var xe=Ne.childRef.current;if(!xe)return;var Le=le(xe);Ne.overflowedItems=[];var Se=0,je;Ne.originalTotalWidth>Le+Mi&&(je=-1,Ne.menuItemSizes.forEach(function(Be){Se+=Be,Se+Ne.overflowedIndicatorWidth<=Le&&(je+=1)})),Ne.setState({lastVisibleIndex:je})},Ne}return Object(R.a)(Ve,[{key:"componentDidMount",value:function(){var xe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var Le=this.childRef.current;if(!Le)return;this.resizeObserver=new Fe.default(function(Se){Se.forEach(function(){var je=xe.cancelFrameId;cancelAnimationFrame(je),xe.cancelFrameId=requestAnimationFrame(xe.setChildrenWidthAndResize)})}),[].slice.call(Le.children).concat(Le).forEach(function(Se){xe.resizeObserver.observe(Se)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){xe.resizeObserver.disconnect(),[].slice.call(Le.children).concat(Le).forEach(function(Se){xe.resizeObserver.observe(Se)}),xe.setChildrenWidthAndResize()}),this.mutationObserver.observe(Le,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(xe){var Le=this,Se=this.state.lastVisibleIndex;return(xe||[]).reduce(function(je,Be,ze){var Ke=Be;if(Le.props.mode==="horizontal"){var Qe=Le.getOverflowedSubMenuItem(Be.props.eventKey,[]);Se!==void 0&&Le.props.className.indexOf("".concat(Le.props.prefixCls,"-root"))!==-1&&(ze>Se&&(Ke=v.cloneElement(Be,{style:{display:"none"},eventKey:"".concat(Be.props.eventKey,"-hidden"),className:"".concat(ki)})),ze===Se+1&&(Le.overflowedItems=xe.slice(Se+1).map(function(vt){return v.cloneElement(vt,{key:vt.props.eventKey,mode:"vertical-left"})}),Qe=Le.getOverflowedSubMenuItem(Be.props.eventKey,Le.overflowedItems)));var ot=[].concat(Object(h.a)(je),[Qe,Ke]);return ze===xe.length-1&&ot.push(Le.getOverflowedSubMenuItem(Be.props.eventKey,[],!0)),ot}return[].concat(Object(h.a)(je),[Ke])},[])}},{key:"render",value:function(){var xe=this.props,Le=xe.visible,Se=xe.prefixCls,je=xe.overflowedIndicator,Be=xe.mode,ze=xe.level,Ke=xe.tag,Qe=xe.children,ot=xe.theme,vt=Object(S.a)(xe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),gt=Ke;return v.createElement(gt,Object(p.a)({ref:this.childRef},vt),this.renderChildren(Qe))}}]),Ve}(v.Component);Xn.defaultProps={tag:"div",className:""};var ji=Xn;function pi(ke){return ke.length?ke.every(function(Ge){return!!Ge.props.disabled}):!0}function mi(ke,Ge,Ve){var Ne=ke.getState();ke.setState({activeKey:Object(k.a)(Object(k.a)({},Ne.activeKey),{},Object(N.a)({},Ge,Ve))})}function Yn(ke){return ke.eventKey||"0-menu-"}function $n(ke,Ge){var Ve=Ge,Ne=ke.children,xe=ke.eventKey;if(Ve){var Le;if(ne(Ne,function(Se,je){Se&&Se.props&&!Se.props.disabled&&Ve===q(Se,xe,je)&&(Le=!0)}),Le)return Ve}return Ve=null,ke.defaultActiveFirst&&ne(Ne,function(Se,je){!Ve&&Se&&!Se.props.disabled&&(Ve=q(Se,xe,je))}),Ve}function Pi(ke){if(!ke)return;var Ge=this.instanceArray.indexOf(ke);Ge!==-1?this.instanceArray[Ge]=ke:this.instanceArray.push(ke)}var ni=function(ke){Object(x.a)(Ve,ke);var Ge=Object(w.a)(Ve);function Ve(Ne){var xe;return Object(D.a)(this,Ve),xe=Ge.call(this,Ne),xe.onKeyDown=function(Le,Se){var je=Le.keyCode,Be;if(xe.getFlatInstanceArray().forEach(function(Ke){Ke&&Ke.props.active&&Ke.onKeyDown&&(Be=Ke.onKeyDown(Le))}),Be)return 1;var ze=null;return(je===f.a.UP||je===f.a.DOWN)&&(ze=xe.step(je===f.a.UP?-1:1)),ze?(Le.preventDefault(),mi(xe.props.store,Yn(xe.props),ze.props.eventKey),typeof Se=="function"&&Se(ze),1):void 0},xe.onItemHover=function(Le){var Se=Le.key,je=Le.hover;mi(xe.props.store,Yn(xe.props),je?Se:null)},xe.onDeselect=function(Le){xe.props.onDeselect(Le)},xe.onSelect=function(Le){xe.props.onSelect(Le)},xe.onClick=function(Le){xe.props.onClick(Le)},xe.onOpenChange=function(Le){xe.props.onOpenChange(Le)},xe.onDestroy=function(Le){xe.props.onDestroy(Le)},xe.getFlatInstanceArray=function(){return xe.instanceArray},xe.step=function(Le){var Se=xe.getFlatInstanceArray(),je=xe.props.store.getState().activeKey[Yn(xe.props)],Be=Se.length;if(!Be)return null;Le<0&&(Se=Se.concat().reverse());var ze=-1;if(Se.every(function(vt,gt){return vt&&vt.props.eventKey===je?(ze=gt,!1):!0}),!xe.props.defaultActiveFirst&&ze!==-1&&pi(Se.slice(ze,Be-1)))return;var Ke=(ze+1)%Be,Qe=Ke;do{var ot=Se[Qe];if(!ot||ot.props.disabled)Qe=(Qe+1)%Be;else return ot}while(Qe!==Ke);return null},xe.renderCommonMenuItem=function(Le,Se,je){var Be=xe.props.store.getState(),ze=Object(y.a)(xe),Ke=ze.props,Qe=q(Le,Ke.eventKey,Se),ot=Le.props;if(!ot||typeof Le.type=="string")return Le;var vt=Qe===Be.activeKey,gt=Object(k.a)(Object(k.a)({mode:ot.mode||Ke.mode,level:Ke.level,inlineIndent:Ke.inlineIndent,renderMenuItem:xe.renderMenuItem,rootPrefixCls:Ke.prefixCls,index:Se,parentMenu:Ke.parentMenu,manualRef:ot.disabled?void 0:Object(P.a)(Le.ref,Pi.bind(Object(y.a)(xe))),eventKey:Qe,active:!ot.disabled&&vt,multiple:Ke.multiple,onClick:function(Xt){(ot.onClick||Q)(Xt),xe.onClick(Xt)},onItemHover:xe.onItemHover,motion:Ke.motion,subMenuOpenDelay:Ke.subMenuOpenDelay,subMenuCloseDelay:Ke.subMenuCloseDelay,forceSubMenuRender:Ke.forceSubMenuRender,onOpenChange:xe.onOpenChange,onDeselect:xe.onDeselect,onSelect:xe.onSelect,builtinPlacements:Ke.builtinPlacements,itemIcon:ot.itemIcon||xe.props.itemIcon,expandIcon:ot.expandIcon||xe.props.expandIcon},je),{},{direction:Ke.direction});return(Ke.mode==="inline"||we())&&(gt.triggerSubMenuAction="click"),v.cloneElement(Le,Object(k.a)(Object(k.a)({},gt),{},{key:Qe||Se}))},xe.renderMenuItem=function(Le,Se,je){if(!Le)return null;var Be=xe.props.store.getState(),ze={openKeys:Be.openKeys,selectedKeys:Be.selectedKeys,triggerSubMenuAction:xe.props.triggerSubMenuAction,subMenuKey:je};return xe.renderCommonMenuItem(Le,Se,ze)},Ne.store.setState({activeKey:Object(k.a)(Object(k.a)({},Ne.store.getState().activeKey),{},Object(N.a)({},Ne.eventKey,$n(Ne,Ne.activeKey)))}),xe.instanceArray=[],xe}return Object(R.a)(Ve,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(xe){return this.props.visible||xe.visible||this.props.className!==xe.className||!X()(this.props.style,xe.style)}},{key:"componentDidUpdate",value:function(xe){var Le=this.props,Se="activeKey"in Le?Le.activeKey:Le.store.getState().activeKey[Yn(Le)],je=$n(Le,Se);if(je!==Se)mi(Le.store,Yn(Le),je);else if("activeKey"in xe){var Be=$n(xe,xe.activeKey);je!==Be&&mi(Le.store,Yn(Le),je)}}},{key:"render",value:function(){var xe=this,Le=Object(p.a)({},this.props);this.instanceArray=[];var Se=C()(Le.prefixCls,Le.className,"".concat(Le.prefixCls,"-").concat(Le.mode)),je={className:Se,role:Le.role||"menu"};Le.id&&(je.id=Le.id),Le.focusable&&(je.tabIndex=0,je.onKeyDown=this.onKeyDown);var Be=Le.prefixCls,ze=Le.eventKey,Ke=Le.visible,Qe=Le.level,ot=Le.mode,vt=Le.overflowedIndicator,gt=Le.theme;return $.forEach(function(Ot){return delete Le[Ot]}),delete Le.onClick,v.createElement(ji,Object(p.a)({},Le,{prefixCls:Be,mode:ot,tag:"ul",level:Qe,theme:gt,visible:Ke,overflowedIndicator:vt},je),Object(_.a)(Le.children).map(function(Ot,Xt){return xe.renderMenuItem(Ot,Xt,ze||"0-menu-")}))}}]),Ve}(v.Component);ni.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:Q};var gi=Object(T.b)()(ni),Fi=gi,ii=I("Kwbf");function Ur(ke,Ge,Ve){var Ne=ke.prefixCls,xe=ke.motion,Le=ke.defaultMotions,Se=Le===void 0?{}:Le,je=ke.openAnimation,Be=ke.openTransitionName,ze=Ge.switchingModeFromInline;if(xe)return xe;if(Object(z.a)(je)==="object"&&je)Object(ii.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof je=="string")return{motionName:"".concat(Ne,"-open-").concat(je)};if(Be)return{motionName:Be};var Ke=Se[Ve];return Ke||(ze?null:Se.other)}var Ut=function(ke){Object(x.a)(Ve,ke);var Ge=Object(w.a)(Ve);function Ve(Ne){var xe;Object(D.a)(this,Ve),xe=Ge.call(this,Ne),xe.onSelect=function(je){var Be=Object(y.a)(xe),ze=Be.props;if(ze.selectable){var Ke=xe.store.getState(),Qe=Ke.selectedKeys,ot=je.key;ze.multiple?Qe=Qe.concat([ot]):Qe=[ot],"selectedKeys"in ze||xe.store.setState({selectedKeys:Qe}),ze.onSelect(Object(k.a)(Object(k.a)({},je),{},{selectedKeys:Qe}))}},xe.onClick=function(je){var Be=xe.getRealMenuMode(),ze=Object(y.a)(xe),Ke=ze.store,Qe=ze.props.onOpenChange;Be!=="inline"&&!("openKeys"in xe.props)&&(Ke.setState({openKeys:[]}),Qe([])),xe.props.onClick(je)},xe.onKeyDown=function(je,Be){xe.innerMenu.getWrappedInstance().onKeyDown(je,Be)},xe.onOpenChange=function(je){var Be=Object(y.a)(xe),ze=Be.props,Ke=xe.store.getState().openKeys.concat(),Qe=!1,ot=function(gt){var Ot=!1;if(gt.open)Ot=Ke.indexOf(gt.key)===-1,Ot&&Ke.push(gt.key);else{var Xt=Ke.indexOf(gt.key);Ot=Xt!==-1,Ot&&Ke.splice(Xt,1)}Qe=Qe||Ot};Array.isArray(je)?je.forEach(ot):ot(je),Qe&&("openKeys"in xe.props||xe.store.setState({openKeys:Ke}),ze.onOpenChange(Ke))},xe.onDeselect=function(je){var Be=Object(y.a)(xe),ze=Be.props;if(ze.selectable){var Ke=xe.store.getState().selectedKeys.concat(),Qe=je.key,ot=Ke.indexOf(Qe);ot!==-1&&Ke.splice(ot,1),"selectedKeys"in ze||xe.store.setState({selectedKeys:Ke}),ze.onDeselect(Object(k.a)(Object(k.a)({},je),{},{selectedKeys:Ke}))}},xe.onMouseEnter=function(je){xe.restoreModeVerticalFromInline();var Be=xe.props.onMouseEnter;Be&&Be(je)},xe.onTransitionEnd=function(je){var Be=je.propertyName==="width"&&je.target===je.currentTarget,ze=je.target.className,Ke=Object.prototype.toString.call(ze)==="[object SVGAnimatedString]"?ze.animVal:ze,Qe=je.propertyName==="font-size"&&Ke.indexOf("anticon")>=0;(Be||Qe)&&xe.restoreModeVerticalFromInline()},xe.setInnerMenu=function(je){xe.innerMenu=je},xe.isRootMenu=!0;var Le=Ne.defaultSelectedKeys,Se=Ne.defaultOpenKeys;return"selectedKeys"in Ne&&(Le=Ne.selectedKeys||[]),"openKeys"in Ne&&(Se=Ne.openKeys||[]),xe.store=Object(T.c)({selectedKeys:Le,openKeys:Se,activeKey:{"0-menu-":$n(Ne,Ne.activeKey)}}),xe.state={switchingModeFromInline:!1,prevProps:Ne,inlineOpenKeys:[],store:xe.store},xe}return Object(R.a)(Ve,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(xe){var Le=this.props,Se=Le.siderCollapsed,je=Le.inlineCollapsed,Be=Le.onOpenChange;(!xe.inlineCollapsed&&je||!xe.siderCollapsed&&Se)&&Be([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var xe=this.props.collapsedWidth,Le=this.store,Se=this.prevOpenKeys,je=this.getInlineCollapsed()&&(xe===0||xe==="0"||xe==="0px");je?(this.prevOpenKeys=Le.getState().openKeys.concat(),this.store.setState({openKeys:[]})):Se&&(this.store.setState({openKeys:Se}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var xe=this.props.mode,Le=this.state.switchingModeFromInline,Se=this.getInlineCollapsed();return Le&&Se?"inline":Se?"vertical":xe}},{key:"getInlineCollapsed",value:function(){var xe=this.props,Le=xe.inlineCollapsed,Se=xe.siderCollapsed;return Se!==void 0?Se:Le}},{key:"restoreModeVerticalFromInline",value:function(){var xe=this.state.switchingModeFromInline;xe&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var xe=Object(k.a)({},Object(F.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),Le=this.getRealMenuMode();return xe.className+=" ".concat(xe.prefixCls,"-root"),xe.direction==="rtl"&&(xe.className+=" ".concat(xe.prefixCls,"-rtl")),xe=Object(k.a)(Object(k.a)({},xe),{},{mode:Le,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ur(this.props,this.state,Le)}),delete xe.openAnimation,delete xe.openTransitionName,v.createElement(T.a,{store:this.store},v.createElement(Fi,Object(p.a)({},xe,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(xe,Le){var Se=Le.prevProps,je=Le.store,Be=je.getState(),ze={},Ke={prevProps:xe};return Se.mode==="inline"&&xe.mode!=="inline"&&(Ke.switchingModeFromInline=!0),"openKeys"in xe?ze.openKeys=xe.openKeys||[]:((xe.inlineCollapsed&&!Se.inlineCollapsed||xe.siderCollapsed&&!Se.siderCollapsed)&&(Ke.switchingModeFromInline=!0,Ke.inlineOpenKeys=Be.openKeys,ze.openKeys=[]),(!xe.inlineCollapsed&&Se.inlineCollapsed||!xe.siderCollapsed&&Se.siderCollapsed)&&(ze.openKeys=Le.inlineOpenKeys,Ke.inlineOpenKeys=[])),Object.keys(ze).length&&je.setState(ze),Ke}}]),Ve}(v.Component);Ut.defaultProps={selectable:!0,onClick:Q,onSelect:Q,onOpenChange:Q,onDeselect:Q,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:v.createElement("span",null,"\xB7\xB7\xB7")};var er=Ut,zt=function(ke){Object(x.a)(Ve,ke);var Ge=Object(w.a)(Ve);function Ve(){var Ne;return Object(D.a)(this,Ve),Ne=Ge.apply(this,arguments),Ne.onKeyDown=function(xe){var Le=xe.keyCode;return Le===f.a.ENTER?(Ne.onClick(xe),!0):void 0},Ne.onMouseLeave=function(xe){var Le=Ne.props,Se=Le.eventKey,je=Le.onItemHover,Be=Le.onMouseLeave;je({key:Se,hover:!1}),Be({key:Se,domEvent:xe})},Ne.onMouseEnter=function(xe){var Le=Ne.props,Se=Le.eventKey,je=Le.onItemHover,Be=Le.onMouseEnter;je({key:Se,hover:!0}),Be({key:Se,domEvent:xe})},Ne.onClick=function(xe){var Le=Ne.props,Se=Le.eventKey,je=Le.multiple,Be=Le.onClick,ze=Le.onSelect,Ke=Le.onDeselect,Qe=Le.isSelected,ot={key:Se,keyPath:[Se],item:Object(y.a)(Ne),domEvent:xe};Be(ot),je?Qe?Ke(ot):ze(ot):Qe||ze(ot)},Ne.saveNode=function(xe){Ne.node=xe},Ne}return Object(R.a)(Ve,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var xe=this.props;xe.onDestroy&&xe.onDestroy(xe.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var xe,Le=Object(k.a)({},this.props),Se=C()(this.getPrefixCls(),Le.className,(xe={},Object(N.a)(xe,this.getActiveClassName(),!Le.disabled&&Le.active),Object(N.a)(xe,this.getSelectedClassName(),Le.isSelected),Object(N.a)(xe,this.getDisabledClassName(),Le.disabled),xe)),je=Object(k.a)(Object(k.a)({},Le.attribute),{},{title:typeof Le.title=="string"?Le.title:void 0,className:Se,role:Le.role||"menuitem","aria-disabled":Le.disabled});Le.role==="option"?je=Object(k.a)(Object(k.a)({},je),{},{role:"option","aria-selected":Le.isSelected}):(Le.role===null||Le.role==="none")&&(je.role="none");var Be={onClick:Le.disabled?null:this.onClick,onMouseLeave:Le.disabled?null:this.onMouseLeave,onMouseEnter:Le.disabled?null:this.onMouseEnter},ze=Object(k.a)({},Le.style);Le.mode==="inline"&&(Le.direction==="rtl"?ze.paddingRight=Le.inlineIndent*Le.level:ze.paddingLeft=Le.inlineIndent*Le.level),$.forEach(function(Qe){return delete Le[Qe]}),delete Le.direction;var Ke=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Ke=v.createElement(this.props.itemIcon,this.props)),v.createElement("li",Object(p.a)({},Object(F.a)(Le,["onClick","onMouseEnter","onMouseLeave","onSelect"]),je,Be,{style:ze,ref:this.saveNode}),Le.children,Ke)}}]),Ve}(v.Component);zt.isMenuItem=!0,zt.defaultProps={onSelect:Q,onMouseEnter:Q,onMouseLeave:Q,manualRef:Q};var ar=Object(T.b)(function(ke,Ge){var Ve=ke.activeKey,Ne=ke.selectedKeys,xe=Ge.eventKey,Le=Ge.subMenuKey;return{active:Ve[Le]===xe,isSelected:Array.isArray(Ne)?Ne.indexOf(xe)!==-1:Ne===xe}})(zt),_r=ar,Lr=function(ke){Object(x.a)(Ve,ke);var Ge=Object(w.a)(Ve);function Ve(){var Ne;return Object(D.a)(this,Ve),Ne=Ge.apply(this,arguments),Ne.renderInnerMenuItem=function(xe){var Le=Ne.props,Se=Le.renderMenuItem,je=Le.index;return Se(xe,je,Ne.props.subMenuKey)},Ne}return Object(R.a)(Ve,[{key:"render",value:function(){var xe=Object(p.a)({},this.props),Le=xe.className,Se=Le===void 0?"":Le,je=xe.rootPrefixCls,Be="".concat(je,"-item-group-title"),ze="".concat(je,"-item-group-list"),Ke=xe.title,Qe=xe.children;return $.forEach(function(ot){return delete xe[ot]}),delete xe.direction,v.createElement("li",Object(p.a)({},xe,{onClick:function(vt){return vt.stopPropagation()},className:"".concat(Se," ").concat(je,"-item-group")}),v.createElement("div",{className:Be,title:typeof Ke=="string"?Ke:void 0},Ke),v.createElement("ul",{className:ze},v.Children.map(Qe,this.renderInnerMenuItem)))}}]),Ve}(v.Component);Lr.isMenuItemGroup=!0,Lr.defaultProps={disabled:!0};var mr=Lr,qr=function(Ge){var Ve=Ge.className,Ne=Ge.rootPrefixCls,xe=Ge.style;return v.createElement("li",{className:"".concat(Ve," ").concat(Ne,"-item-divider"),style:xe})};qr.defaultProps={disabled:!0,className:"",style:{}};var Un=qr,hr=er,vi=I("eDIo");function kr(ke,Ge){var Ve=ke.prefixCls,Ne=ke.editable,xe=ke.locale,Le=ke.style;return!Ne||Ne.showAdd===!1?null:v.createElement("button",{ref:Ge,type:"button",className:"".concat(Ve,"-nav-add"),style:Le,"aria-label":(xe==null?void 0:xe.addAriaLabel)||"Add tab",onClick:function(je){Ne.onEdit("add",{event:je})}},Ne.addIcon||"+")}var Sn=v.forwardRef(kr);function Rn(ke,Ge){var Ve=ke.prefixCls,Ne=ke.id,xe=ke.tabs,Le=ke.locale,Se=ke.mobile,je=ke.moreIcon,Be=je===void 0?"More":je,ze=ke.moreTransitionName,Ke=ke.style,Qe=ke.className,ot=ke.editable,vt=ke.tabBarGutter,gt=ke.rtl,Ot=ke.onTabClick,Xt=Object(v.useState)(!1),sr=Object(g.a)(Xt,2),cr=sr[0],fr=sr[1],Er=Object(v.useState)(null),yr=Object(g.a)(Er,2),pr=yr[0],Pr=yr[1],Sr="".concat(Ne,"-more-popup"),gn="".concat(Ve,"-dropdown"),Cr=pr!==null?"".concat(Sr,"-").concat(pr):null,rr=Le==null?void 0:Le.dropdownAriaLabel,Qt=v.createElement(hr,{onClick:function(en){var Jr=en.key,Dn=en.domEvent;Ot(Jr,Dn),fr(!1)},id:Sr,tabIndex:-1,role:"listbox","aria-activedescendant":Cr,selectedKeys:[pr],"aria-label":rr!==void 0?rr:"expanded dropdown"},xe.map(function(Gr){return v.createElement(_r,{key:Gr.key,id:"".concat(Sr,"-").concat(Gr.key),role:"option","aria-controls":Ne&&"".concat(Ne,"-panel-").concat(Gr.key),disabled:Gr.disabled},Gr.tab)}));function Or(Gr){for(var en=xe.filter(function(yi){return!yi.disabled}),Jr=en.findIndex(function(yi){return yi.key===pr})||0,Dn=en.length,Jn=0;Jn<Dn;Jn+=1){Jr=(Jr+Gr+Dn)%Dn;var En=en[Jr];if(!En.disabled){Pr(En.key);return}}}function Nr(Gr){var en=Gr.which;if(!cr){[f.a.DOWN,f.a.SPACE,f.a.ENTER].includes(en)&&(fr(!0),Gr.preventDefault());return}switch(en){case f.a.UP:Or(-1),Gr.preventDefault();break;case f.a.DOWN:Or(1),Gr.preventDefault();break;case f.a.ESC:fr(!1);break;case f.a.SPACE:case f.a.ENTER:pr!==null&&Ot(pr,Gr);break}}Object(v.useEffect)(function(){var Gr=document.getElementById(Cr);Gr&&Gr.scrollIntoView&&Gr.scrollIntoView(!1)},[pr]),Object(v.useEffect)(function(){cr||Pr(null)},[cr]);var Vt=Object(N.a)({},gt?"marginLeft":"marginRight",vt);xe.length||(Vt.visibility="hidden",Vt.order=1);var Br=C()(Object(N.a)({},"".concat(gn,"-rtl"),gt)),vn=Se?null:v.createElement(vi.a,{prefixCls:gn,overlay:Qt,trigger:["hover"],visible:cr,transitionName:ze,onVisibleChange:fr,overlayClassName:Br,mouseEnterDelay:.1,mouseLeaveDelay:.1},v.createElement("button",{type:"button",className:"".concat(Ve,"-nav-more"),style:Vt,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Sr,id:"".concat(Ne,"-more"),"aria-expanded":cr,onKeyDown:Nr},Be));return v.createElement("div",{className:C()("".concat(Ve,"-nav-operations"),Qe),style:Ke,ref:Ge},vn,v.createElement(Sn,{prefixCls:Ve,locale:Le,editable:ot}))}var li=v.forwardRef(Rn),ua=Object(v.createContext)(null),Mr=.1,wr=.01,gr=20,ai=Math.pow(.995,gr);function zi(){var ke=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ke)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(ke.substr(0,4)))}function Vi(ke,Ge){var Ve=Object(v.useState)(),Ne=Object(g.a)(Ve,2),xe=Ne[0],Le=Ne[1],Se=Object(v.useState)(0),je=Object(g.a)(Se,2),Be=je[0],ze=je[1],Ke=Object(v.useState)(0),Qe=Object(g.a)(Ke,2),ot=Qe[0],vt=Qe[1],gt=Object(v.useState)(),Ot=Object(g.a)(gt,2),Xt=Ot[0],sr=Ot[1],cr=Object(v.useRef)();function fr(rr){var Qt=rr.touches[0],Or=Qt.screenX,Nr=Qt.screenY;Le({x:Or,y:Nr}),window.clearInterval(cr.current)}function Er(rr){if(!xe)return;rr.preventDefault();var Qt=rr.touches[0],Or=Qt.screenX,Nr=Qt.screenY;Le({x:Or,y:Nr});var Vt=Or-xe.x,Br=Nr-xe.y;Ge(Vt,Br);var vn=Date.now();ze(vn),vt(vn-Be),sr({x:Vt,y:Br})}function yr(){if(!xe)return;if(Le(null),sr(null),Xt){var rr=Xt.x/ot,Qt=Xt.y/ot,Or=Math.abs(rr),Nr=Math.abs(Qt);if(Math.max(Or,Nr)<Mr)return;var Vt=rr,Br=Qt;cr.current=window.setInterval(function(){if(Math.abs(Vt)<wr&&Math.abs(Br)<wr){window.clearInterval(cr.current);return}Vt*=ai,Br*=ai,Ge(Vt*gr,Br*gr)},gr)}}var pr=Object(v.useRef)(0),Pr=Object(v.useRef)(!1),Sr=Object(v.useRef)();function gn(rr){var Qt=rr.deltaX,Or=rr.deltaY,Nr=0,Vt=Math.abs(Qt),Br=Math.abs(Or);Vt===Br?Nr=Sr.current==="x"?Qt:Or:Vt>Br?(Nr=Qt,Sr.current="x"):(Nr=Or,Sr.current="y");var vn=Date.now();vn-pr.current>100&&(Pr.current=!1),(Ge(-Nr,-Nr)||Pr.current)&&(rr.preventDefault(),Pr.current=!0),pr.current=vn}var Cr=Object(v.useRef)(null);Cr.current={onTouchStart:fr,onTouchMove:Er,onTouchEnd:yr,onWheel:gn},v.useEffect(function(){function rr(Vt){Cr.current.onTouchStart(Vt)}function Qt(Vt){Cr.current.onTouchMove(Vt)}function Or(Vt){Cr.current.onTouchEnd(Vt)}function Nr(Vt){Cr.current.onWheel(Vt)}return document.addEventListener("touchmove",Qt,{passive:!1}),document.addEventListener("touchend",Or,{passive:!1}),ke.current.addEventListener("touchstart",rr,{passive:!1}),ke.current.addEventListener("wheel",Nr),function(){document.removeEventListener("touchmove",Qt),document.removeEventListener("touchend",Or)}},[])}function tr(){var ke=Object(v.useRef)(new Map);function Ge(Ne){return ke.current.has(Ne)||ke.current.set(Ne,v.createRef()),ke.current.get(Ne)}function Ve(Ne){ke.current.delete(Ne)}return[Ge,Ve]}function It(ke,Ge){var Ve=v.useRef(ke),Ne=v.useState({}),xe=Object(g.a)(Ne,2),Le=xe[1];function Se(je){var Be=typeof je=="function"?je(Ve.current):je;Be!==Ve.current&&Ge(Be,Ve.current),Ve.current=Be,Le({})}return[Ve.current,Se]}var ir=function(Ge){var Ve=Ge.position,Ne=Ge.prefixCls,xe=Ge.extra;if(!xe)return null;var Le,Se=xe;return Ve==="right"&&(Le=Se.right||!Se.left&&Se||null),Ve==="left"&&(Le=Se.left||null),Le?v.createElement("div",{className:"".concat(Ne,"-extra-content")},Le):null};function or(ke,Ge){var Ve,Ne=v.useContext(ua),xe=Ne.prefixCls,Le=Ne.tabs,Se=ke.className,je=ke.style,Be=ke.id,ze=ke.animated,Ke=ke.activeKey,Qe=ke.rtl,ot=ke.extra,vt=ke.editable,gt=ke.locale,Ot=ke.tabPosition,Xt=ke.tabBarGutter,sr=ke.children,cr=ke.onTabClick,fr=ke.onTabScroll,Er=Object(v.useRef)(),yr=Object(v.useRef)(),pr=Object(v.useRef)(),Pr=Object(v.useRef)(),Sr=tr(),gn=Object(g.a)(Sr,2),Cr=gn[0],rr=gn[1],Qt=Ot==="top"||Ot==="bottom",Or=It(0,function(Xr,Ir){Qt&&fr&&fr({direction:Xr>Ir?"left":"right"})}),Nr=Object(g.a)(Or,2),Vt=Nr[0],Br=Nr[1],vn=It(0,function(Xr,Ir){!Qt&&fr&&fr({direction:Xr>Ir?"top":"bottom"})}),Gr=Object(g.a)(vn,2),en=Gr[0],Jr=Gr[1],Dn=Object(v.useState)(0),Jn=Object(g.a)(Dn,2),En=Jn[0],yi=Jn[1],Ui=Object(v.useState)(0),xi=Object(g.a)(Ui,2),Qn=xi[0],ln=xi[1],tn=Object(v.useState)(0),xn=Object(g.a)(tn,2),yn=xn[0],Bi=xn[1],ta=Object(v.useState)(0),ra=Object(g.a)(ta,2),Qr=ra[0],Yi=ra[1],na=Object(v.useState)(null),on=Object(g.a)(na,2),$r=on[0],Zn=on[1],So=Object(v.useState)(null),eo=Object(g.a)(So,2),ia=eo[0],va=eo[1],Ma=Object(v.useState)(0),to=Object(g.a)(Ma,2),Pa=to[0],Xo=to[1],Yo=Object(v.useState)(0),Co=Object(g.a)(Yo,2),ro=Co[0],no=Co[1],ya=l(new Map),ba=Object(g.a)(ya,2),$o=ba[0],Na=ba[1],Oa=s(Le,$o,En),_a="".concat(xe,"-nav-operations-hidden"),Ea=0,Hi=0;Qt?Qe?(Ea=0,Hi=Math.max(0,En-$r)):(Ea=Math.min(0,$r-En),Hi=0):(Ea=Math.min(0,ia-Qn),Hi=0);function ca(Xr){return Xr<Ea?[Ea,!1]:Xr>Hi?[Hi,!1]:[Xr,!0]}var aa=Object(v.useRef)(),Aa=Object(v.useState)(),da=Object(g.a)(Aa,2),ja=da[0],io=da[1];function Fa(){io(Date.now())}function ao(){window.clearTimeout(aa.current)}Vi(Er,function(Xr,Ir){var qn=!1;function Ti(xa,Qi){xa(function(Da){var sa=ca(Da+Qi),ei=Object(g.a)(sa,2),Ha=ei[0],so=ei[1];return qn=so,Ha})}if(Qt){if($r>=En)return qn;Ti(Br,Xr)}else{if(ia>=Qn)return qn;Ti(Jr,Ir)}return ao(),Fa(),qn}),Object(v.useEffect)(function(){return ao(),ja&&(aa.current=window.setTimeout(function(){io(0)},100)),ao},[ja]);function oa(){var Xr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ke,Ir=Oa.get(Xr);if(!Ir)return;if(Qt){var qn=Vt;Qe?Ir.right<Vt?qn=Ir.right:Ir.right+Ir.width>Vt+$r&&(qn=Ir.right+Ir.width-$r):Ir.left<-Vt?qn=-Ir.left:Ir.left+Ir.width>-Vt+$r&&(qn=-(Ir.left+Ir.width-$r)),Jr(0),Br(ca(qn)[0])}else{var Ti=en;Ir.top<-en?Ti=-Ir.top:Ir.top+Ir.height>-en+ia&&(Ti=-(Ir.top+Ir.height-ia)),Br(0),Jr(ca(Ti)[0])}}var ha=b(Oa,{width:$r,height:ia,left:Vt,top:en},{width:yn,height:Qr},{width:Pa,height:ro},Object(k.a)(Object(k.a)({},ke),{},{tabs:Le})),Oo=Object(g.a)(ha,2),Jo=Oo[0],Qo=Oo[1],Zo=Le.map(function(Xr){var Ir=Xr.key;return v.createElement(u,{id:Be,prefixCls:xe,key:Ir,rtl:Qe,tab:Xr,closable:Xr.closable,editable:vt,active:Ir===Ke,tabPosition:Ot,tabBarGutter:Xt,renderWrapper:sr,removeAriaLabel:gt==null?void 0:gt.removeAriaLabel,ref:Cr(Ir),onClick:function(Ti){cr(Ir,Ti)},onRemove:function(){rr(Ir)},onFocus:function(){oa(Ir),Fa(),Qe||(Er.current.scrollLeft=0),Er.current.scrollTop=0}})}),oo=n(function(){var Xr,Ir,qn,Ti,xa,Qi,Da,sa,ei,Ha=((Xr=Er.current)===null||Xr===void 0?void 0:Xr.offsetWidth)||0,so=((Ir=Er.current)===null||Ir===void 0?void 0:Ir.offsetHeight)||0,lo=((qn=Pr.current)===null||qn===void 0?void 0:qn.offsetWidth)||0,Si=((Ti=Pr.current)===null||Ti===void 0?void 0:Ti.offsetHeight)||0,Kr=((xa=pr.current)===null||xa===void 0?void 0:xa.offsetWidth)||0,Gi=((Qi=pr.current)===null||Qi===void 0?void 0:Qi.offsetHeight)||0;Zn(Ha),va(so),Xo(lo),no(Si);var Zi=(((Da=yr.current)===null||Da===void 0?void 0:Da.offsetWidth)||0)-lo,qi=(((sa=yr.current)===null||sa===void 0?void 0:sa.offsetHeight)||0)-Si;yi(Zi),ln(qi);var uo=(ei=pr.current)===null||ei===void 0?void 0:ei.className.includes(_a);Bi(Zi-(uo?0:Kr)),Yi(qi-(uo?0:Gi)),Na(function(){var Wa=new Map;return Le.forEach(function(Lo){var ko=Lo.key,pa=Cr(ko).current;pa&&Wa.set(ko,{width:pa.offsetWidth,height:pa.offsetHeight,left:pa.offsetLeft,top:pa.offsetTop})}),Wa})}),qo=Le.slice(0,Jo),wi=Le.slice(Qo+1),Pn=[].concat(Object(h.a)(qo),Object(h.a)(wi)),ui=Object(v.useState)(),Nn=Object(g.a)(ui,2),Ra=Nn[0],es=Nn[1],Wi=Oa.get(Ke),Ao=Object(v.useRef)();function Ro(){c.a.cancel(Ao.current)}Object(v.useEffect)(function(){var Xr={};return Wi&&(Qt?(Qe?Xr.right=Wi.right:Xr.left=Wi.left,Xr.width=Wi.width):(Xr.top=Wi.top,Xr.height=Wi.height)),Ro(),Ao.current=c()(function(){es(Xr)}),Ro},[Wi,Qt,Qe]),Object(v.useEffect)(function(){oa()},[Ke,Wi,Oa,Qt]),Object(v.useEffect)(function(){oo()},[Qe,Xt,Ke,Le.map(function(Xr){return Xr.key}).join("_")]);var Io=!!Pn.length,fa="".concat(xe,"-nav-wrap"),Ua,Ia,Do,Ba;return Qt?Qe?(Ia=Vt>0,Ua=Vt+$r<En):(Ua=Vt<0,Ia=-Vt+$r<En):(Do=en<0,Ba=-en+ia<Qn),v.createElement("div",{ref:Ge,role:"tablist",className:C()("".concat(xe,"-nav"),Se),style:je,onKeyDown:function(){Fa()}},v.createElement(ir,{position:"left",extra:ot,prefixCls:xe}),v.createElement(i.a,{onResize:oo},v.createElement("div",{className:C()(fa,(Ve={},Object(N.a)(Ve,"".concat(fa,"-ping-left"),Ua),Object(N.a)(Ve,"".concat(fa,"-ping-right"),Ia),Object(N.a)(Ve,"".concat(fa,"-ping-top"),Do),Object(N.a)(Ve,"".concat(fa,"-ping-bottom"),Ba),Ve)),ref:Er},v.createElement(i.a,{onResize:oo},v.createElement("div",{ref:yr,className:"".concat(xe,"-nav-list"),style:{transform:"translate(".concat(Vt,"px, ").concat(en,"px)"),transition:ja?"none":void 0}},Zo,v.createElement(Sn,{ref:Pr,prefixCls:xe,locale:gt,editable:vt,style:{visibility:Io?"hidden":null}}),v.createElement("div",{className:C()("".concat(xe,"-ink-bar"),Object(N.a)({},"".concat(xe,"-ink-bar-animated"),ze.inkBar)),style:Ra}))))),v.createElement(li,Object.assign({},ke,{ref:pr,prefixCls:xe,tabs:Pn,className:!Io&&_a})),v.createElement(ir,{position:"right",extra:ot,prefixCls:xe}))}var Wr=v.forwardRef(or);function vr(ke){var Ge=ke.id,Ve=ke.activeKey,Ne=ke.animated,xe=ke.tabPosition,Le=ke.rtl,Se=ke.destroyInactiveTabPane,je=v.useContext(ua),Be=je.prefixCls,ze=je.tabs,Ke=Ne.tabPane,Qe=ze.findIndex(function(ot){return ot.key===Ve});return v.createElement("div",{className:C()("".concat(Be,"-content-holder"))},v.createElement("div",{className:C()("".concat(Be,"-content"),"".concat(Be,"-content-").concat(xe),Object(N.a)({},"".concat(Be,"-content-animated"),Ke)),style:Qe&&Ke?Object(N.a)({},Le?"marginRight":"marginLeft","-".concat(Qe,"00%")):null},ze.map(function(ot){return v.cloneElement(ot.node,{key:ot.key,prefixCls:Be,tabKey:ot.key,id:Ge,animated:Ke,active:ot.key===Ve,destroyInactiveTabPane:Se})})))}function mn(ke){var Ge=ke.prefixCls,Ve=ke.forceRender,Ne=ke.className,xe=ke.style,Le=ke.id,Se=ke.active,je=ke.animated,Be=ke.destroyInactiveTabPane,ze=ke.tabKey,Ke=ke.children,Qe=v.useState(Ve),ot=Object(g.a)(Qe,2),vt=ot[0],gt=ot[1];v.useEffect(function(){Se?gt(!0):Be&>(!1)},[Se,Be]);var Ot={};return Se||(je?(Ot.visibility="hidden",Ot.height=0,Ot.overflowY="hidden"):Ot.display="none"),v.createElement("div",{id:Le&&"".concat(Le,"-panel-").concat(ze),role:"tabpanel",tabIndex:Se?0:-1,"aria-labelledby":Le&&"".concat(Le,"-tab-").concat(ze),"aria-hidden":!Se,style:Object(k.a)(Object(k.a)({},Ot),xe),className:C()("".concat(Ge,"-tabpane"),Se&&"".concat(Ge,"-tabpane-active"),Ne)},(Se||vt||Ve)&&Ke)}var an=0;function Ai(ke){return Object(_.a)(ke).map(function(Ge){if(v.isValidElement(Ge)){var Ve=Ge.key!==void 0?String(Ge.key):void 0;return Object(k.a)(Object(k.a)({key:Ve},Ge.props),{},{node:Ge})}return null}).filter(function(Ge){return Ge})}function In(ke,Ge){var Ve,Ne=ke.id,xe=ke.prefixCls,Le=xe===void 0?"rc-tabs":xe,Se=ke.className,je=ke.children,Be=ke.direction,ze=ke.activeKey,Ke=ke.defaultActiveKey,Qe=ke.editable,ot=ke.animated,vt=ke.tabPosition,gt=vt===void 0?"top":vt,Ot=ke.tabBarGutter,Xt=ke.tabBarStyle,sr=ke.tabBarExtraContent,cr=ke.locale,fr=ke.moreIcon,Er=ke.moreTransitionName,yr=ke.destroyInactiveTabPane,pr=ke.renderTabBar,Pr=ke.onChange,Sr=ke.onTabClick,gn=ke.onTabScroll,Cr=Object(S.a)(ke,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),rr=Ai(je),Qt=Be==="rtl",Or;ot===!1?Or={inkBar:!1,tabPane:!1}:Or=Object(k.a)({inkBar:!0,tabPane:!1},ot!==!0?ot:null);var Nr=Object(v.useState)(!1),Vt=Object(g.a)(Nr,2),Br=Vt[0],vn=Vt[1];Object(v.useEffect)(function(){vn(zi())},[]);var Gr=Object(e.a)(function(){var Qr;return(Qr=rr[0])===null||Qr===void 0?void 0:Qr.key},{value:ze,defaultValue:Ke}),en=Object(g.a)(Gr,2),Jr=en[0],Dn=en[1],Jn=Object(v.useState)(function(){return rr.findIndex(function(Qr){return Qr.key===Jr})}),En=Object(g.a)(Jn,2),yi=En[0],Ui=En[1];Object(v.useEffect)(function(){var Qr=rr.findIndex(function(na){return na.key===Jr});if(Qr===-1){var Yi;Qr=Math.max(0,Math.min(yi,rr.length-1)),Dn((Yi=rr[Qr])===null||Yi===void 0?void 0:Yi.key)}Ui(Qr)},[rr.map(function(Qr){return Qr.key}).join("_"),Jr,yi]);var xi=Object(e.a)(null,{value:Ne}),Qn=Object(g.a)(xi,2),ln=Qn[0],tn=Qn[1],xn=gt;Br&&!["left","right"].includes(gt)&&(xn="top"),Object(v.useEffect)(function(){Ne||(tn("rc-tabs-".concat(an)),an+=1)},[]);function yn(Qr,Yi){Sr==null||Sr(Qr,Yi),Dn(Qr),Pr==null||Pr(Qr)}var Bi={id:ln,activeKey:Jr,animated:Or,tabPosition:xn,rtl:Qt,mobile:Br},ta,ra=Object(k.a)(Object(k.a)({},Bi),{},{editable:Qe,locale:cr,moreIcon:fr,moreTransitionName:Er,tabBarGutter:Ot,onTabClick:yn,onTabScroll:gn,extra:sr,style:Xt,panes:je});return pr?ta=pr(ra,Wr):ta=v.createElement(Wr,Object.assign({},ra)),v.createElement(ua.Provider,{value:{tabs:rr,prefixCls:Le}},v.createElement("div",Object.assign({ref:Ge,id:Ne,className:C()(Le,"".concat(Le,"-").concat(xn),(Ve={},Object(N.a)(Ve,"".concat(Le,"-mobile"),Br),Object(N.a)(Ve,"".concat(Le,"-editable"),Qe),Object(N.a)(Ve,"".concat(Le,"-rtl"),Qt),Ve),Se)},Cr),ta,v.createElement(vr,Object.assign({destroyInactiveTabPane:yr},Bi,{animated:Or}))))}var Mn=v.forwardRef(In);Mn.TabPane=mn;var Bn=Mn,Xi=Z.b=Bn},kSUc:function(H,Z,I){},lOMy:function(H,Z,I){},lPiR:function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){return function(g){var S=N,k=S.lib,v=k.WordArray,m=k.Hasher,C=S.algo,_=[],e=[];(function(){function c(f){for(var d=g.sqrt(f),u=2;u<=d;u++)if(!(f%u))return!1;return!0}function i(f){return(f-(f|0))*4294967296|0}for(var n=2,l=0;l<64;)c(n)&&(l<8&&(_[l]=i(g.pow(n,1/2))),e[l]=i(g.pow(n,1/3)),l++),n++})();var h=[],r=C.SHA256=m.extend({_doReset:function(){this._hash=new v.init(_.slice(0))},_doProcessBlock:function(c,i){for(var n=this._hash.words,l=n[0],f=n[1],d=n[2],u=n[3],o=n[4],s=n[5],E=n[6],b=n[7],p=0;p<64;p++){if(p<16)h[p]=c[i+p]|0;else{var D=h[p-15],R=(D<<25|D>>>7)^(D<<14|D>>>18)^D>>>3,y=h[p-2],x=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;h[p]=R+h[p-7]+x+h[p-16]}var w=o&s^~o&E,T=l&f^l&d^f&d,F=(l<<30|l>>>2)^(l<<19|l>>>13)^(l<<10|l>>>22),P=(o<<26|o>>>6)^(o<<21|o>>>11)^(o<<7|o>>>25),A=b+P+w+e[p]+h[p],X=F+T;b=E,E=s,s=o,o=u+A|0,u=d,d=f,f=l,l=A+X|0}n[0]=n[0]+l|0,n[1]=n[1]+f|0,n[2]=n[2]+d|0,n[3]=n[3]+u|0,n[4]=n[4]+o|0,n[5]=n[5]+s|0,n[6]=n[6]+E|0,n[7]=n[7]+b|0},_doFinalize:function(){var c=this._data,i=c.words,n=this._nDataBytes*8,l=c.sigBytes*8;return i[l>>>5]|=128<<24-l%32,i[(l+64>>>9<<4)+14]=g.floor(n/4294967296),i[(l+64>>>9<<4)+15]=n,c.sigBytes=i.length*4,this._process(),this._hash},clone:function(){var c=m.clone.call(this);return c._hash=this._hash.clone(),c}});S.SHA256=m._createHelper(r),S.HmacSHA256=m._createHmacHelper(r)}(Math),N.SHA256})},lZu9:function(H,Z,I){(function(N){N(I("VrN/"),I("1eCo"),I("8EBN"))})(function(N){"use strict";N.defineMode("markdown",function(g,S){var k=N.getMode(g,"text/html"),v=k.name=="null";function m(U){if(N.findModeByName){var L=N.findModeByName(U);L&&(U=L.mime||L.mimes[0])}var G=N.getMode(g,U);return G.name=="null"?null:G}S.highlightFormatting===void 0&&(S.highlightFormatting=!1),S.maxBlockquoteDepth===void 0&&(S.maxBlockquoteDepth=0),S.taskLists===void 0&&(S.taskLists=!1),S.strikethrough===void 0&&(S.strikethrough=!1),S.emoji===void 0&&(S.emoji=!1),S.fencedCodeBlockHighlighting===void 0&&(S.fencedCodeBlockHighlighting=!0),S.fencedCodeBlockDefaultMode===void 0&&(S.fencedCodeBlockDefaultMode="text/plain"),S.xml===void 0&&(S.xml=!0),S.tokenTypeOverrides===void 0&&(S.tokenTypeOverrides={});var C={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 _ in C)C.hasOwnProperty(_)&&S.tokenTypeOverrides[_]&&(C[_]=S.tokenTypeOverrides[_]);var e=/^([*\-_])(?:\s*\1){2,}\s*$/,h=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,r=/^\[(x| )\](?=\s)/i,c=S.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,i=/^ {0,3}(?:\={1,}|-{2,})\s*$/,n=/^[^#!\[\]*_\\<>` "'(~:]+/,l=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,d=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,u=" ";function o(U,L,G){return L.f=L.inline=G,G(U,L)}function s(U,L,G){return L.f=L.block=G,G(U,L)}function E(U){return!U||!/\S/.test(U.string)}function b(U){if(U.linkTitle=!1,U.linkHref=!1,U.linkText=!1,U.em=!1,U.strong=!1,U.strikethrough=!1,U.quote=0,U.indentedCode=!1,U.f==D){var L=v;if(!L){var G=N.innerMode(k,U.htmlState);L=G.mode.name=="xml"&&G.state.tagStart===null&&!G.state.context&&G.state.tokenize.isInText}L&&(U.f=w,U.block=p,U.htmlState=null)}return U.trailingSpace=0,U.trailingSpaceNewLine=!1,U.prevLine=U.thisLine,U.thisLine={stream:null},null}function p(U,L){var G=U.column()===L.indentation,ee=E(L.prevLine.stream),oe=L.indentedCode,ae=L.prevLine.hr,be=L.list!==!1,_e=(L.listStack[L.listStack.length-1]||0)+3;L.indentedCode=!1;var fe=L.indentation;if(L.indentationDiff===null&&(L.indentationDiff=L.indentation,be)){for(L.list=null;fe<L.listStack[L.listStack.length-1];)L.listStack.pop(),L.listStack.length?L.indentation=L.listStack[L.listStack.length-1]:L.list=!1;L.list!==!1&&(L.indentationDiff=fe-L.listStack[L.listStack.length-1])}var Re=!ee&&!ae&&!L.prevLine.header&&(!be||!oe)&&!L.prevLine.fencedCodeEnd,Oe=(L.list===!1||ae||ee)&&L.indentation<=_e&&U.match(e),de=null;if(L.indentationDiff>=4&&(oe||L.prevLine.fencedCodeEnd||L.prevLine.header||ee))return U.skipToEnd(),L.indentedCode=!0,C.code;if(U.eatSpace())return null;if(G&&L.indentation<=_e&&(de=U.match(c))&&de[1].length<=6)return L.quote=0,L.header=de[1].length,L.thisLine.header=!0,S.highlightFormatting&&(L.formatting="header"),L.f=L.inline,y(L);if(L.indentation<=_e&&U.eat(">"))return L.quote=G?1:L.quote+1,S.highlightFormatting&&(L.formatting="quote"),U.eatSpace(),y(L);if(!Oe&&!L.setext&&G&&L.indentation<=_e&&(de=U.match(h))){var te=de[1]?"ol":"ul";return L.indentation=fe+U.current().length,L.list=!0,L.quote=0,L.listStack.push(L.indentation),L.em=!1,L.strong=!1,L.code=!1,L.strikethrough=!1,S.taskLists&&U.match(r,!1)&&(L.taskList=!0),L.f=L.inline,S.highlightFormatting&&(L.formatting=["list","list-"+te]),y(L)}else{if(G&&L.indentation<=_e&&(de=U.match(l,!0)))return L.quote=0,L.fencedEndRE=new RegExp(de[1]+"+ *$"),L.localMode=S.fencedCodeBlockHighlighting&&m(de[2]||S.fencedCodeBlockDefaultMode),L.localMode&&(L.localState=N.startState(L.localMode)),L.f=L.block=R,S.highlightFormatting&&(L.formatting="code-block"),L.code=-1,y(L);if(L.setext||(!Re||!be)&&!L.quote&&L.list===!1&&!L.code&&!Oe&&!f.test(U.string)&&(de=U.lookAhead(1))&&(de=de.match(i)))return L.setext?(L.header=L.setext,L.setext=0,U.skipToEnd(),S.highlightFormatting&&(L.formatting="header")):(L.header=de[0].charAt(0)=="="?1:2,L.setext=L.header),L.thisLine.header=!0,L.f=L.inline,y(L);if(Oe)return U.skipToEnd(),L.hr=!0,L.thisLine.hr=!0,C.hr;if(U.peek()==="[")return o(U,L,X)}return o(U,L,L.inline)}function D(U,L){var G=k.token(U,L.htmlState);if(!v){var ee=N.innerMode(k,L.htmlState);(ee.mode.name=="xml"&&ee.state.tagStart===null&&!ee.state.context&&ee.state.tokenize.isInText||L.md_inside&&U.current().indexOf(">")>-1)&&(L.f=w,L.block=p,L.htmlState=null)}return G}function R(U,L){var G=L.listStack[L.listStack.length-1]||0,ee=L.indentation<G,oe=G+3;if(L.fencedEndRE&&L.indentation<=oe&&(ee||U.match(L.fencedEndRE))){S.highlightFormatting&&(L.formatting="code-block");var ae;return ee||(ae=y(L)),L.localMode=L.localState=null,L.block=p,L.f=w,L.fencedEndRE=null,L.code=0,L.thisLine.fencedCodeEnd=!0,ee?s(U,L,L.block):ae}else return L.localMode?L.localMode.token(U,L.localState):(U.skipToEnd(),C.code)}function y(U){var L=[];if(U.formatting){L.push(C.formatting),typeof U.formatting=="string"&&(U.formatting=[U.formatting]);for(var G=0;G<U.formatting.length;G++)L.push(C.formatting+"-"+U.formatting[G]),U.formatting[G]==="header"&&L.push(C.formatting+"-"+U.formatting[G]+"-"+U.header),U.formatting[G]==="quote"&&(!S.maxBlockquoteDepth||S.maxBlockquoteDepth>=U.quote?L.push(C.formatting+"-"+U.formatting[G]+"-"+U.quote):L.push("error"))}if(U.taskOpen)return L.push("meta"),L.length?L.join(" "):null;if(U.taskClosed)return L.push("property"),L.length?L.join(" "):null;if(U.linkHref?L.push(C.linkHref,"url"):(U.strong&&L.push(C.strong),U.em&&L.push(C.em),U.strikethrough&&L.push(C.strikethrough),U.emoji&&L.push(C.emoji),U.linkText&&L.push(C.linkText),U.code&&L.push(C.code),U.image&&L.push(C.image),U.imageAltText&&L.push(C.imageAltText,"link"),U.imageMarker&&L.push(C.imageMarker)),U.header&&L.push(C.header,C.header+"-"+U.header),U.quote&&(L.push(C.quote),!S.maxBlockquoteDepth||S.maxBlockquoteDepth>=U.quote?L.push(C.quote+"-"+U.quote):L.push(C.quote+"-"+S.maxBlockquoteDepth)),U.list!==!1){var ee=(U.listStack.length-1)%3;ee?ee===1?L.push(C.list2):L.push(C.list3):L.push(C.list1)}return U.trailingSpaceNewLine?L.push("trailing-space-new-line"):U.trailingSpace&&L.push("trailing-space-"+(U.trailingSpace%2?"a":"b")),L.length?L.join(" "):null}function x(U,L){return U.match(n,!0)?y(L):void 0}function w(U,L){var G=L.text(U,L);if(typeof G!="undefined")return G;if(L.list)return L.list=null,y(L);if(L.taskList){var ee=U.match(r,!0)[1]===" ";return ee?L.taskOpen=!0:L.taskClosed=!0,S.highlightFormatting&&(L.formatting="task"),L.taskList=!1,y(L)}if(L.taskOpen=!1,L.taskClosed=!1,L.header&&U.match(/^#+$/,!0))return S.highlightFormatting&&(L.formatting="header"),y(L);var oe=U.next();if(L.linkTitle){L.linkTitle=!1;var ae=oe;oe==="("&&(ae=")"),ae=(ae+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var be="^\\s*(?:[^"+ae+"\\\\]+|\\\\\\\\|\\\\.)"+ae;if(U.match(new RegExp(be),!0))return C.linkHref}if(oe==="`"){var _e=L.formatting;S.highlightFormatting&&(L.formatting="code"),U.eatWhile("`");var fe=U.current().length;if(L.code==0&&(!L.quote||fe==1))return L.code=fe,y(L);if(fe==L.code){var Re=y(L);return L.code=0,Re}else return L.formatting=_e,y(L)}else if(L.code)return y(L);if(oe==="\\"&&(U.next(),S.highlightFormatting)){var Oe=y(L),de=C.formatting+"-escape";return Oe?Oe+" "+de:de}if(oe==="!"&&U.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return L.imageMarker=!0,L.image=!0,S.highlightFormatting&&(L.formatting="image"),y(L);if(oe==="["&&L.imageMarker&&U.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return L.imageMarker=!1,L.imageAltText=!0,S.highlightFormatting&&(L.formatting="image"),y(L);if(oe==="]"&&L.imageAltText){S.highlightFormatting&&(L.formatting="image");var Oe=y(L);return L.imageAltText=!1,L.image=!1,L.inline=L.f=F,Oe}if(oe==="["&&!L.image)return L.linkText&&U.match(/^.*?\]/)||(L.linkText=!0,S.highlightFormatting&&(L.formatting="link")),y(L);if(oe==="]"&&L.linkText){S.highlightFormatting&&(L.formatting="link");var Oe=y(L);return L.linkText=!1,L.inline=L.f=U.match(/\(.*?\)| ?\[.*?\]/,!1)?F:w,Oe}if(oe==="<"&&U.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=T,S.highlightFormatting&&(L.formatting="link");var Oe=y(L);return Oe?Oe+=" ":Oe="",Oe+C.linkInline}if(oe==="<"&&U.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=T,S.highlightFormatting&&(L.formatting="link");var Oe=y(L);return Oe?Oe+=" ":Oe="",Oe+C.linkEmail}if(S.xml&&oe==="<"&&U.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var te=U.string.indexOf(">",U.pos);if(te!=-1){var W=U.string.substring(U.start,te);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(W)&&(L.md_inside=!0)}return U.backUp(1),L.htmlState=N.startState(k),s(U,L,D)}if(S.xml&&oe==="<"&&U.match(/^\/\w*?>/))return L.md_inside=!1,"tag";if(oe==="*"||oe==="_"){for(var Y=1,V=U.pos==1?" ":U.string.charAt(U.pos-2);Y<3&&U.eat(oe);)Y++;var Q=U.peek()||" ",q=!/\s/.test(Q)&&(!d.test(Q)||/\s/.test(V)||d.test(V)),ie=!/\s/.test(V)&&(!d.test(V)||/\s/.test(Q)||d.test(Q)),ne=null,J=null;if(Y%2&&(!L.em&&q&&(oe==="*"||!ie||d.test(V))?ne=!0:L.em==oe&&ie&&(oe==="*"||!q||d.test(Q))&&(ne=!1)),Y>1&&(!L.strong&&q&&(oe==="*"||!ie||d.test(V))?J=!0:L.strong==oe&&ie&&(oe==="*"||!q||d.test(Q))&&(J=!1)),J!=null||ne!=null){S.highlightFormatting&&(L.formatting=ne==null?"strong":J==null?"em":"strong em"),ne===!0&&(L.em=oe),J===!0&&(L.strong=oe);var Re=y(L);return ne===!1&&(L.em=!1),J===!1&&(L.strong=!1),Re}}else if(oe===" "&&(U.eat("*")||U.eat("_"))){if(U.peek()===" ")return y(L);U.backUp(1)}if(S.strikethrough){if(oe==="~"&&U.eatWhile(oe)){if(L.strikethrough){S.highlightFormatting&&(L.formatting="strikethrough");var Re=y(L);return L.strikethrough=!1,Re}else if(U.match(/^[^\s]/,!1))return L.strikethrough=!0,S.highlightFormatting&&(L.formatting="strikethrough"),y(L)}else if(oe===" "&&U.match(/^~~/,!0)){if(U.peek()===" ")return y(L);U.backUp(2)}}if(S.emoji&&oe===":"&&U.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){L.emoji=!0,S.highlightFormatting&&(L.formatting="emoji");var $=y(L);return L.emoji=!1,$}return oe===" "&&(U.match(/^ +$/,!1)?L.trailingSpace++:L.trailingSpace&&(L.trailingSpaceNewLine=!0)),y(L)}function T(U,L){var G=U.next();if(G===">"){L.f=L.inline=w,S.highlightFormatting&&(L.formatting="link");var ee=y(L);return ee?ee+=" ":ee="",ee+C.linkInline}return U.match(/^[^>]+/,!0),C.linkInline}function F(U,L){if(U.eatSpace())return null;var G=U.next();return G==="("||G==="["?(L.f=L.inline=A(G==="("?")":"]"),S.highlightFormatting&&(L.formatting="link-string"),L.linkHref=!0,y(L)):"error"}var P={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function A(U){return function(L,G){var ee=L.next();if(ee===U){G.f=G.inline=w,S.highlightFormatting&&(G.formatting="link-string");var oe=y(G);return G.linkHref=!1,oe}return L.match(P[U]),G.linkHref=!0,y(G)}}function X(U,L){return U.match(/^([^\]\\]|\\.)*\]:/,!1)?(L.f=z,U.next(),S.highlightFormatting&&(L.formatting="link"),L.linkText=!0,y(L)):o(U,L,w)}function z(U,L){if(U.match(/^\]:/,!0)){L.f=L.inline=O,S.highlightFormatting&&(L.formatting="link");var G=y(L);return L.linkText=!1,G}return U.match(/^([^\]\\]|\\.)+/,!0),C.linkText}function O(U,L){return U.eatSpace()?null:(U.match(/^[^\s]+/,!0),U.peek()===void 0?L.linkTitle=!0:U.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),L.f=L.inline=w,C.linkHref+" url")}var B={startState:function(){return{f:p,prevLine:{stream:null},thisLine:{stream:null},block:p,htmlState:null,indentation:0,inline:w,text:x,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(U){return{f:U.f,prevLine:U.prevLine,thisLine:U.thisLine,block:U.block,htmlState:U.htmlState&&N.copyState(k,U.htmlState),indentation:U.indentation,localMode:U.localMode,localState:U.localMode?N.copyState(U.localMode,U.localState):null,inline:U.inline,text:U.text,formatting:!1,linkText:U.linkText,linkTitle:U.linkTitle,linkHref:U.linkHref,code:U.code,em:U.em,strong:U.strong,strikethrough:U.strikethrough,emoji:U.emoji,header:U.header,setext:U.setext,hr:U.hr,taskList:U.taskList,list:U.list,listStack:U.listStack.slice(0),quote:U.quote,indentedCode:U.indentedCode,trailingSpace:U.trailingSpace,trailingSpaceNewLine:U.trailingSpaceNewLine,md_inside:U.md_inside,fencedEndRE:U.fencedEndRE}},token:function(U,L){if(L.formatting=!1,U!=L.thisLine.stream){if(L.header=0,L.hr=!1,U.match(/^\s*$/,!0))return b(L),null;if(L.prevLine=L.thisLine,L.thisLine={stream:U},L.taskList=!1,L.trailingSpace=0,L.trailingSpaceNewLine=!1,!L.localState&&(L.f=L.block,L.f!=D)){var G=U.match(/^\s*/,!0)[0].replace(/\t/g,u).length;if(L.indentation=G,L.indentationDiff=null,G>0)return null}}return L.f(U,L)},innerMode:function(U){return U.block==D?{state:U.htmlState,mode:k}:U.localState?{state:U.localState,mode:U.localMode}:{state:U,mode:B}},indent:function(U,L,G){return U.block==D&&k.indent?k.indent(U.htmlState,L,G):U.localState&&U.localMode.indent?U.localMode.indent(U.localState,L,G):N.Pass},blankLine:b,getType:y,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return B},"xml"),N.defineMIME("text/markdown","markdown"),N.defineMIME("text/x-markdown","markdown")})},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(H){if(!0)module.exports=H();else var Z})(function(){var define,module,exports;return function(){function H(Z,I,N){function g(v,m){if(!I[v]){if(!Z[v]){var C=typeof require=="function"&&require;if(!m&&C)return require(v,!0);if(S)return S(v,!0);var _=new Error("Cannot find module '"+v+"'");throw _.code="MODULE_NOT_FOUND",_}var e=I[v]={exports:{}};Z[v][0].call(e.exports,function(h){var r=Z[v][1][h];return g(r||h)},e,e.exports,H,Z,I,N)}return I[v].exports}for(var S=typeof require=="function"&&require,k=0;k<N.length;k++)g(N[k]);return g}return H}()({1:[function(H,Z,I){"use strict";var N=H("./browser/client");N.Buffer=H("buffer").Buffer,N.urllib=H("../shims/xhr"),N.version=H("./browser/version").version,Z.exports=N},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(H,Z,I){(function(N,g){"use strict";var S=H("babel-runtime/core-js/promise"),k=e(S),v=H("babel-runtime/regenerator"),m=e(v),C=H("babel-runtime/core-js/object/assign"),_=e(C);function e(X){return X&&X.__esModule?X:{default:X}}var h=H("debug")("ali-oss"),r=H("copy-to"),c=H("xml2js"),i=H("agentkeepalive"),n=H("merge-descriptors"),l=H("url"),f=H("is-type-of"),d=H("platform"),u=H("utility"),o=H("urllib"),s=H("./version"),E=H("bowser"),b=H("../common/signUtils"),p=H("../common/utils/isIP"),D=p.isIP,R=H("../common/client/initOptions"),y=H("../common/utils/createRequest"),x=y.createRequest,w=new i;function T(){var X=d.name,z=d.version;X&&X.toLowerCase&&X.toLowerCase()==="ie"&&z.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function F(){return location&&location.protocol==="https:"}function P(X,z){if(T(),!(this instanceof P))return new P(X,z);X&&X.inited?this.options=X:this.options=P.initOptions(X),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=o,this.agent=this.options.agent||w),this.ctx=z,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}Z.exports=P,P.initOptions=function(z){z.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var O=(0,_.default)({secure:F(),useFetch:!1},z);return R(O)};var A=P.prototype;A.debug=h,n(A,H("./object")),n(A,H("../common/bucket/getBucketWebsite")),n(A,H("../common/bucket/putBucketWebsite")),n(A,H("../common/bucket/deleteBucketWebsite")),n(A,H("../common/bucket/getBucketLifecycle")),n(A,H("../common/bucket/putBucketLifecycle")),n(A,H("../common/bucket/deleteBucketLifecycle")),n(A,H("../common/bucket/putBucketVersioning")),n(A,H("../common/bucket/getBucketVersioning")),n(A,H("./managed-upload")),n(A,H("../common/multipart")),n(A,H("../common/parallel")),A.signature=function(z){return this.debug("authorization stringToSign: %s",z,"info"),b.computeSignature(this.options.accessKeySecret,z)},A.authorization=function(z,O,B,U){var L=b.buildCanonicalString(z.toUpperCase(),O,{headers:U,parameters:B});return b.authorization(this.options.accessKeyId,this.options.accessKeySecret,L)},A.request=function(z){var O,B,U,L,G,ee;return m.default.async(function(ae){for(;;)switch(ae.prev=ae.next){case 0:return O=x.call(this,z),this.options.useFetch||(O.params.mode="disable-fetch"),B=void 0,U=void 0,L=!!z.stream,ae.prev=5,ae.next=8,m.default.awrap(this.urllib.request(O.url,O.params));case 8:B=ae.sent,this.debug("response %s %s, got %s, headers: %j",z.method,O.url,B.status,B.headers,"info"),ae.next=15;break;case 12:ae.prev=12,ae.t0=ae.catch(5),U=ae.t0;case 15:if(G=void 0,!(B&&z.successStatuses&&z.successStatuses.indexOf(B.status)===-1)){ae.next=28;break}return ae.next=19,m.default.awrap(this.requestError(B));case 19:if(G=ae.sent,!(G.code==="RequestTimeTooSkewed"&&!L)){ae.next=25;break}return this.options.amendTimeSkewed=+new Date(G.serverTime)-new Date,ae.next=24,m.default.awrap(this.request(z));case 24:return ae.abrupt("return",ae.sent);case 25:G.params=z,ae.next=32;break;case 28:if(!U){ae.next=32;break}return ae.next=31,m.default.awrap(this.requestError(U));case 31:G=ae.sent;case 32:if(!G){ae.next=34;break}throw G;case 34:if(!z.xmlResponse){ae.next=39;break}return ae.next=37,m.default.awrap(this.parseXML(B.data));case 37:ee=ae.sent,B.data=ee;case 39:return ae.abrupt("return",B);case 40:case"end":return ae.stop()}},null,this,[[5,12]])},A._getResource=function(z){var O="/";return z.bucket&&(O+=z.bucket+"/"),z.object&&(O+=z.object),O},A._isIP=D,A._escape=function(z){return u.encodeURIComponent(z).replace(/%2F/g,"/")},A._getReqUrl=function(z){var O={};r(this.options.endpoint).to(O);var B=this._isIP(O.hostname),U=this.options.cname;z.bucket&&!U&&!B&&(O.host=z.bucket+"."+O.host);var L="/";z.bucket&&B&&(L+=z.bucket+"/"),z.object&&(L+=this._escape(z.object).replace(/\+/g,"%2B")),O.pathname=L;var G={};if(z.query&&n(G,z.query),z.subres){var ee={};f.string(z.subres)?ee[z.subres]="":f.array(z.subres)?z.subres.forEach(function(oe){ee[oe]=""}):ee=z.subres,n(G,ee)}return O.query=G,l.format(O)},A._getUserAgent=function(){var z=g&&g.browser?"js":"nodejs",O="aliyun-sdk-"+z+"/"+s.version,B=d.description;return!B&&g&&(B="Node.js "+g.version.slice(1)+" on "+g.platform+" "+g.arch),this._checkUserAgent(O+" "+B)},A._checkUserAgent=function(z){var O=z.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return O},A.checkBrowserAndVersion=function(z,O){return E.name===z&&E.version.split(".")[0]===O},A.parseXML=function(z){return new k.default(function(O,B){N.isBuffer(z)&&(z=z.toString()),c.parseString(z,{explicitRoot:!1,explicitArray:!1},function(U,L){U?B(U):O(L)})})},A.requestError=function(z){var O,B,U,L;return m.default.async(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(O=null,!(!z.data||!z.data.length)){ee.next=5;break}z.status===-1||z.status===-2?(O=new Error(z.message),O.name=z.name,O.status=z.status,O.code=z.name):(z.status===404?(O=new Error("Object not exists"),O.name="NoSuchKeyError",O.status=404,O.code="NoSuchKey"):z.status===412?(O=new Error("Pre condition failed"),O.name="PreconditionFailedError",O.status=412,O.code="PreconditionFailed"):(O=new Error("Unknow error, status: "+z.status),O.name="UnknowError",O.status=z.status),O.requestId=z.headers["x-oss-request-id"],O.host=""),ee.next=33;break;case 5:return B=String(z.data),this.debug("request response error data: %s",B,"error"),U=void 0,ee.prev=8,ee.next=11,m.default.awrap(this.parseXML(B));case 11:if(ee.t0=ee.sent,ee.t0){ee.next=14;break}ee.t0={};case 14:U=ee.t0,ee.next=24;break;case 17:return ee.prev=17,ee.t1=ee.catch(8),this.debug(B,"error"),ee.t1.message+=`
|
|
|
raw xml: `+B,ee.t1.status=z.status,ee.t1.requestId=z.headers["x-oss-request-id"],ee.abrupt("return",ee.t1);case 24:L=U.Message||"unknow request error, status: "+z.status,U.Condition&&(L+=" (condition: "+U.Condition+")"),O=new Error(L),O.name=U.Code?U.Code+"Error":"UnknowError",O.status=z.status,O.code=U.Code,O.requestId=U.RequestId,O.hostId=U.HostId,O.serverTime=U.ServerTime;case 33:return this.debug("generate error %j",O,"error"),ee.abrupt("return",O);case 35:case"end":return ee.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:H("../../node_modules/is-buffer/index.js")},H("_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(H,Z,I){(function(N){"use strict";var g=H("babel-runtime/core-js/array/from"),S=_(g),k=H("babel-runtime/core-js/promise"),v=_(k),m=H("babel-runtime/regenerator"),C=_(m);function _(b){return b&&b.__esModule?b:{default:b}}var e=H("is-type-of"),h=H("util"),r=H("path"),c=H("mime"),i=H("copy-to"),n=H("../common/utils/isBlob"),l=n.isBlob,f=H("../common/utils/isFile"),d=f.isFile,u=I;u.multipartUpload=function(p,D,R){var y,x,w,T,F,P,A,X,z;return C.default.async(function(B){for(;;)switch(B.prev=B.next){case 0:if(this.resetCancelFlag(),R=R||{},!(R.checkpoint&&R.checkpoint.uploadId)){B.next=6;break}return B.next=5,C.default.awrap(this._resumeMultipart(R.checkpoint,R));case 5:return B.abrupt("return",B.sent);case 6:return y=100*1024,R.mime||(d(D)?R.mime=c.getType(r.extname(D.name)):l(D)?R.mime=D.type:R.mime=c.getType(r.extname(D))),R.headers=R.headers||{},this._convertMetaToHeaders(R.meta,R.headers),B.next=12,C.default.awrap(this._getFileSize(D));case 12:if(x=B.sent,!(x<y)){B.next=25;break}return w=this._createStream(D,0,x),R.contentLength=x,B.next=18,C.default.awrap(this.putStream(p,w,R));case 18:if(T=B.sent,!(R&&R.progress)){B.next=22;break}return B.next=22,C.default.awrap(R.progress(1));case 22:return F={res:T.res,bucket:this.options.bucket,name:p,etag:T.res.headers.etag},(R.headers&&R.headers["x-oss-callback"]||R.callback)&&(F.data=T.data),B.abrupt("return",F);case 25:if(!(R.partSize&&!(parseInt(R.partSize,10)===R.partSize))){B.next=27;break}throw new Error("partSize must be int number");case 27:if(!(R.partSize&&R.partSize<y)){B.next=29;break}throw new Error("partSize must not be smaller than "+y);case 29:return B.next=31,C.default.awrap(this.initMultipartUpload(p,R));case 31:if(P=B.sent,A=P.uploadId,X=this._getPartSize(x,R.partSize),z={file:D,name:p,fileSize:x,partSize:X,uploadId:A,doneParts:[]},!(R&&R.progress)){B.next=38;break}return B.next=38,C.default.awrap(R.progress(0,z,P.res));case 38:return B.next=40,C.default.awrap(this._resumeMultipart(z,R));case 40:return B.abrupt("return",B.sent);case 41:case"end":return B.stop()}},null,this)},u._resumeMultipart=function(p,D){var R,y,x,w,T,F,P,A,X,z,O,B,U,L,G,ee,oe,ae;return C.default.async(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(R=this,!this.isCancel()){_e.next=3;break}throw this._makeCancelEvent();case 3:return y=p.file,x=p.fileSize,w=p.partSize,T=p.uploadId,F=p.doneParts,P=p.name,A=[],F.length>0&&i(F).to(A),X=this._divideParts(x,w),z=X.length,O=!1,B=function(Re,Oe){var de=this;return new v.default(function(W,Y){var V,Q,q,ie;return C.default.async(function(J){for(;;)switch(J.prev=J.next){case 0:if(J.prev=0,Re.isCancel()){J.next=18;break}return V=X[Oe-1],Q={stream:Re._createStream(y,V.start,V.end),size:V.end-V.start},J.next=6,C.default.awrap(Re._uploadPart(P,T,Oe,Q));case 6:if(q=J.sent,!(!Re.isCancel()&&!O)){J.next=15;break}if(p.doneParts.push({number:Oe,etag:q.res.headers.etag}),!D.progress){J.next=12;break}return J.next=12,C.default.awrap(D.progress(F.length/z,p,q.res));case 12:W({number:Oe,etag:q.res.headers.etag}),J.next=16;break;case 15:W();case 16:J.next=19;break;case 18:W();case 19:J.next=30;break;case 21:J.prev=21,J.t0=J.catch(0),ie=new Error,ie.name=J.t0.name,ie.message=J.t0.message,ie.stack=J.t0.stack,ie.partNum=Oe,i(J.t0).to(ie),Y(ie);case 30:case"end":return J.stop()}},null,de,[[0,21]])})},U=(0,S.default)(new Array(z),function(fe,Re){return Re+1}),L=A.map(function(fe){return fe.number}),G=U.filter(function(fe){return L.indexOf(fe)<0}),ee=5,oe=D.parallel||ee,_e.next=17,C.default.awrap(this._parallel(G,oe,function(fe){return new v.default(function(Re,Oe){B(R,fe).then(function(de){de&&A.push(de),Re()}).catch(function(de){Oe(de)})})}));case 17:if(ae=_e.sent,O=!0,!this.isCancel()){_e.next=22;break}throw B=null,this._makeCancelEvent();case 22:if(!(ae&&ae.length>0)){_e.next=25;break}throw ae[0].message="Failed to upload some parts with error: "+ae[0].toString()+" part_num: "+ae[0].partNum,ae[0];case 25:return _e.next=27,C.default.awrap(this.completeMultipartUpload(P,T,A,D));case 27:return _e.abrupt("return",_e.sent);case 28:case"end":return _e.stop()}},null,this)},u._getFileSize=function(p){return C.default.async(function(R){for(;;)switch(R.prev=R.next){case 0:if(!e.buffer(p)){R.next=4;break}return R.abrupt("return",p.length);case 4:if(!(l(p)||d(p))){R.next=6;break}return R.abrupt("return",p.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return R.stop()}},null,this)};var o=H("stream"),s=o.Readable;function E(b,p){if(!(this instanceof E))return new E(b,p);s.call(this,p),this.file=b,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}h.inherits(E,s),E.prototype.readFileAndPush=function(p){if(this.fileBuffer)for(var D=!0;D&&this.fileBuffer&&this.start<this.fileBuffer.length;){var R=this.start,y=R+p;y=y>this.fileBuffer.length?this.fileBuffer.length:y,this.start=y,D=this.push(this.fileBuffer.slice(R,y))}},E.prototype._read=function(p){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 D=16*1024;p=p||D;var R=this;this.reader.onload=function(x){R.fileBuffer=N.from(new Uint8Array(x.target.result)),R.file=null,R.readFileAndPush(p)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(p)},u._createStream=function(p,D,R){if(l(p)||d(p))return new E(p.slice(D,R));throw new Error("_createStream requires File/Blob.")},u._getPartSize=function(p,D){var R=10*1e3,y=1024*1024;return D?Math.max(Math.ceil(p/R),D):y},u._divideParts=function(p,D){for(var R=Math.ceil(p/D),y=[],x=0;x<R;x++){var w=D*x,T=Math.min(w+D,p);y.push({start:w,end:T})}return y}}).call(this,H("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(H,Z,I){"use strict";var N=H("babel-runtime/core-js/promise"),g=e(N),S=H("babel-runtime/core-js/object/keys"),k=e(S),v=H("babel-runtime/core-js/object/assign"),m=e(v),C=H("babel-runtime/regenerator"),_=e(C);function e(R){return R&&R.__esModule?R:{default:R}}var h=H("utility"),r=H("fs"),c=H("is-type-of"),i=H("url"),n=H("copy-to"),l=H("path"),f=H("mime"),d=H("../common/callback"),u=H("../common/signUtils"),o=H("merge-descriptors"),s=H("../common/utils/isBlob"),E=s.isBlob,b=H("../common/utils/isFile"),p=b.isFile,D=I;D.append=function(y,x,w){var T;return _.default.async(function(P){for(;;)switch(P.prev=P.next){case 0:return w=w||{},w.position===void 0&&(w.position="0"),w.subres={append:"",position:w.position},w.method="POST",P.next=6,_.default.awrap(this.put(y,x,w));case 6:return T=P.sent,T.nextAppendPosition=T.res.headers["x-oss-next-append-position"],P.abrupt("return",T);case 9:case"end":return P.stop()}},null,this)},D.put=function(y,x,w){var T,F,P,A,X,z,O;return _.default.async(function(U){for(;;)switch(U.prev=U.next){case 0:if(T=void 0,w=w||{},y=this._objectName(y),!c.buffer(x)){U.next=7;break}T=x,U.next=33;break;case 7:if(!(E(x)||p(x))){U.next=32;break}return w.mime||(p(x)?w.mime=f.getType(l.extname(x.name)):w.mime=x.type),F=this._createStream(x,0,x.size),U.next=12,_.default.awrap(this._getFileSize(x));case 12:return w.contentLength=U.sent,U.prev=13,U.next=16,_.default.awrap(this.putStream(y,F,w));case 16:return P=U.sent,U.abrupt("return",P);case 20:if(U.prev=20,U.t0=U.catch(13),!(U.t0.code==="RequestTimeTooSkewed")){U.next=29;break}return this.options.amendTimeSkewed=+new Date(U.t0.serverTime)-new Date,U.next=26,_.default.awrap(this.put(y,x,w));case 26:return U.abrupt("return",U.sent);case 29:throw U.t0;case 30:U.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return w.headers=w.headers||{},this._convertMetaToHeaders(w.meta,w.headers),A=w.method||"PUT",X=this._objectRequestParams(A,y,w),d.encodeCallback(X,w),X.mime=w.mime,X.content=T,X.successStatuses=[200],U.next=43,_.default.awrap(this.request(X));case 43:return z=U.sent,O={name:y,url:this._objectUrl(y),res:z.res},X.headers&&X.headers["x-oss-callback"]&&(O.data=JSON.parse(z.data.toString())),U.abrupt("return",O);case 47:case"end":return U.stop()}},null,this,[[13,20]])},D.putStream=function(y,x,w){var T,F,P,A;return _.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:return w=w||{},w.headers=w.headers||{},y=this._objectName(y),w.contentLength?w.headers["Content-Length"]=w.contentLength:w.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(w.meta,w.headers),T=w.method||"PUT",F=this._objectRequestParams(T,y,w),d.encodeCallback(F,w),F.mime=w.mime,F.stream=x,F.successStatuses=[200],z.next=13,_.default.awrap(this.request(F));case 13:return P=z.sent,A={name:y,url:this._objectUrl(y),res:P.res},F.headers&&F.headers["x-oss-callback"]&&(A.data=JSON.parse(P.data.toString())),z.abrupt("return",A);case 17:case"end":return z.stop()}},null,this)},o(D,H("../common/object/copyObject")),o(D,H("../common/object/getObjectTagging")),o(D,H("../common/object/putObjectTagging")),o(D,H("../common/object/deleteObjectTagging")),o(D,H("../common/image")),o(D,H("../common/object/getBucketVersions")),o(D,H("../common/object/getACL")),o(D,H("../common/object/putACL")),o(D,H("../common/object/head")),o(D,H("../common/object/delete")),o(D,H("../common/object/get")),o(D,H("../common/object/putSymlink")),o(D,H("../common/object/getSymlink")),o(D,H("../common/object/deleteMulti")),o(D,H("../common/object/getObjectMeta")),D.putMeta=function(y,x,w){var T;return _.default.async(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,_.default.awrap(this.copy(y,y,{meta:x||{},timeout:w&&w.timeout,ctx:w&&w.ctx}));case 2:return T=P.sent,P.abrupt("return",T);case 4:case"end":return P.stop()}},null,this)},D.list=function(y,x){var w,T,F,P,A;return _.default.async(function(z){for(;;)switch(z.prev=z.next){case 0:return w=this._objectRequestParams("GET","",x),w.query=y,w.xmlResponse=!0,w.successStatuses=[200],z.next=6,_.default.awrap(this.request(w));case 6:return T=z.sent,F=T.data.Contents,P=this,F&&(Array.isArray(F)||(F=[F]),F=F.map(function(O){return{name:O.Key,url:P._objectUrl(O.Key),lastModified:O.LastModified,etag:O.ETag,type:O.Type,size:Number(O.Size),storageClass:O.StorageClass,owner:{id:O.Owner.ID,displayName:O.Owner.DisplayName}}})),A=T.data.CommonPrefixes||null,A&&(Array.isArray(A)||(A=[A]),A=A.map(function(O){return O.Prefix})),z.abrupt("return",{res:T.res,objects:F,prefixes:A,nextMarker:T.data.NextMarker||null,isTruncated:T.data.IsTruncated==="true"});case 13:case"end":return z.stop()}},null,this)},D.restore=function(y,x){var w,T;return _.default.async(function(P){for(;;)switch(P.prev=P.next){case 0:return x=x||{},x.subres=(0,m.default)({restore:""},x.subres),x.versionId&&(x.subres.versionId=x.versionId),w=this._objectRequestParams("POST",y,x),w.successStatuses=[202],P.next=7,_.default.awrap(this.request(w));case 7:return T=P.sent,P.abrupt("return",{res:T.res});case 9:case"end":return P.stop()}},null,this)},D.signatureUrl=function(y,x){x=x||{},y=this._objectName(y),x.method=x.method||"GET";var w=h.timestamp()+(x.expires||1800),T={bucket:this.options.bucket,object:y},F=this._getResource(T);this.options.stsToken&&(x["security-token"]=this.options.stsToken);var P=u._signatureForURL(this.options.accessKeySecret,x,F,w),A=i.parse(this._getReqUrl(T));return A.query={OSSAccessKeyId:this.options.accessKeyId,Expires:w,Signature:P.Signature},n(P.subResource).to(A.query),A.format()},D.getObjectUrl=function(y,x){return x?x[x.length-1]!=="/"&&(x+="/"):x=this.options.endpoint.format(),x+this._escape(this._objectName(y))},D._objectUrl=function(y){return this._getReqUrl({bucket:this.options.bucket,object:y})},D.generateObjectUrl=function(R,y){if(y)y[y.length-1]!=="/"&&(y+="/");else{y=this.options.endpoint.format();var x=i.parse(y),w=this.options.bucket;x.hostname=w+"."+x.hostname,x.host=w+"."+x.host,y=x.format()}return y+this._escape(this._objectName(R))},D._objectRequestParams=function(y,x,w){if(!this.options.bucket)throw new Error("Please create a bucket first");w=w||{},x=this._objectName(x);var T={object:x,bucket:this.options.bucket,method:y,subres:w&&w.subres,timeout:w&&w.timeout,ctx:w&&w.ctx};return w.headers&&(T.headers={},n(w.headers).to(T.headers)),T},D._objectName=function(y){return y.replace(/^\/+/,"")},D._convertMetaToHeaders=function(y,x){if(!y)return;(0,k.default)(y).forEach(function(w){x["x-oss-meta-"+w]=y[w]})},D._deleteFileSafe=function(y){var x=this;return new g.default(function(w){r.exists(y,function(T){T?r.unlink(y,function(F){F&&x.debug("unlink %j error: %s",y,F,"error"),w()}):w()})})}},{"../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(H,Z,I){"use strict";I.version="6.10.0"},{}],6:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=S(N);function S(C){return C&&C.__esModule?C:{default:C}}var k=H("../utils/checkBucketName"),v=k.checkBucketName,m=I;m.deleteBucketLifecycle=function(_,e){var h,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return v(_),h=this._bucketRequestParams("DELETE",_,"lifecycle",e),h.successStatuses=[204],i.next=5,g.default.awrap(this.request(h));case 5:return r=i.sent,i.abrupt("return",{res:r.res});case 7:case"end":return i.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=S(N);function S(C){return C&&C.__esModule?C:{default:C}}var k=H("../utils/checkBucketName"),v=k.checkBucketName,m=I;m.deleteBucketWebsite=function(_,e){var h,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return v(_),h=this._bucketRequestParams("DELETE",_,"website",e),h.successStatuses=[204],i.next=5,g.default.awrap(this.request(h));case 5:return r=i.sent,i.abrupt("return",{res:r.res});case 7:case"end":return i.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=S(N);function S(r){return r&&r.__esModule?r:{default:r}}var k=H("../utils/checkBucketName"),v=k.checkBucketName,m=H("../utils/isArray"),C=m.isArray,_=H("../utils/formatObjKey"),e=_.formatObjKey,h=I;h.getBucketLifecycle=function(c,i){var n,l,f;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return v(c),n=this._bucketRequestParams("GET",c,"lifecycle",i),n.successStatuses=[200],n.xmlResponse=!0,u.next=6,g.default.awrap(this.request(n));case 6:return l=u.sent,f=l.data.Rule||null,f&&(C(f)||(f=[f]),f=f.map(function(o){return o.ID&&(o.id=o.ID,delete o.ID),o.Tag&&!C(o.Tag)&&(o.Tag=[o.Tag]),e(o,"firstLowerCase")})),u.abrupt("return",{rules:f,res:l.res});case 10:case"end":return u.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=S(N);function S(C){return C&&C.__esModule?C:{default:C}}var k=H("../utils/checkBucketName"),v=k.checkBucketName,m=I;m.getBucketVersioning=function(_,e){var h,r,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return v(_),h=this._bucketRequestParams("GET",_,"versioning",e),h.xmlResponse=!0,h.successStatuses=[200],n.next=6,g.default.awrap(this.request(h));case 6:return r=n.sent,c=r.data.Status,n.abrupt("return",{status:r.status,versionStatus:c,res:r.res});case 9:case"end":return n.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=S(N);function S(e){return e&&e.__esModule?e:{default:e}}var k=H("../utils/checkBucketName"),v=k.checkBucketName,m=H("../utils/isObject"),C=m.isObject,_=I;_.getBucketWebsite=function(h,r){var c,i,n;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return v(h),c=this._bucketRequestParams("GET",h,"website",r),c.successStatuses=[200],c.xmlResponse=!0,f.next=6,g.default.awrap(this.request(c));case 6:return i=f.sent,n=[],i.data.RoutingRules&&i.data.RoutingRules.RoutingRule&&(C(i.data.RoutingRules.RoutingRule)?n=[i.data.RoutingRules.RoutingRule]:n=i.data.RoutingRules.RoutingRule),f.abrupt("return",{index:i.data.IndexDocument&&i.data.IndexDocument.Suffix||"",supportSubDir:i.data.IndexDocument&&i.data.IndexDocument.SupportSubDir||"false",type:i.data.IndexDocument&&i.data.IndexDocument.Type,routingRules:n,error:i.data.ErrorDocument&&i.data.ErrorDocument.Key||null,res:i.res});case 10:case"end":return f.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=S(N);function S(p){return p&&p.__esModule?p:{default:p}}var k=H("../utils/checkBucketName"),v=k.checkBucketName,m=H("../utils/isArray"),C=m.isArray,_=H("../utils/deepCopy"),e=_.deepCopy,h=H("../utils/isObject"),r=h.isObject,c=H("../utils/obj2xml"),i=c.obj2xml,n=H("../utils/checkObjectTag"),l=n.checkObjectTag,f=H("../utils/getStrBytesCount"),d=f.getStrBytesCount,u=I;u.putBucketLifecycle=function(D,R,y){var x,w,T,F,P;return g.default.async(function(X){for(;;)switch(X.prev=X.next){case 0:if(v(D),C(R)){X.next=3;break}throw new Error("rules must be Array");case 3:return x=this._bucketRequestParams("PUT",D,"lifecycle",y),w=[],T={LifecycleConfiguration:{Rule:w}},R.forEach(function(z){o(z),b(z),z.id&&(z.ID=z.id,delete z.id),w.push(z)}),F=i(T,{headers:!0,firstUpperCase:!0}),x.content=F,x.mime="xml",x.successStatuses=[200],X.next=13,g.default.awrap(this.request(x));case 13:return P=X.sent,X.abrupt("return",{res:P.res});case 15:case"end":return X.stop()}},null,this)};function o(p){p.days&&(p.expiration={days:p.days}),p.date&&(p.expiration={createdBeforeDate:p.date})}function s(p,D){var R=p.days,y=p.createdBeforeDate;if(!R&&!y)throw new Error(D+" must includes days or createdBeforeDate");if(R&&!/^[1-9][0-9]*$/.test(R))throw new Error("days must be a positive integer");if(y&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(y))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function E(p){if(!C(p)&&!r(p))throw new Error("tag must be Object or Array");p=r(p)?[p]:p;var D={},R=e(p);R.forEach(function(y){D[y.key]=y.value}),l(D)}function b(p){if(p.id&&d(p.id)>255)throw new Error("ID is composed of 255 bytes at most");if(p.prefix===""||p.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(p.status))throw new Error("Status must be Enabled or Disabled");if(p.transition){if(!["IA","Archive"].includes(p.transition.storageClass))throw new Error("StorageClass must be IA or Archive");s(p.transition,"Transition")}if(p.expiration){if(!p.expiration.expiredObjectDeleteMarker)s(p.expiration,"Expiration");else if(p.expiration.days||p.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(p.abortMultipartUpload&&s(p.abortMultipartUpload,"AbortMultipartUpload"),!p.expiration&&!p.abortMultipartUpload&&!p.transition&&!p.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(p.tag){if(p.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");E(p.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(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=S(N);function S(e){return e&&e.__esModule?e:{default:e}}var k=H("../utils/checkBucketName"),v=k.checkBucketName,m=H("../utils/obj2xml"),C=m.obj2xml,_=I;_.putBucketVersioning=function(h,r){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,n,l;return g.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:if(v(h),["Enabled","Suspended"].includes(r)){d.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return i=this._bucketRequestParams("PUT",h,"versioning",c),n={VersioningConfiguration:{Status:r}},i.mime="xml",i.content=C(n,{headers:!0}),d.next=9,g.default.awrap(this.request(i));case 9:return l=d.sent,d.abrupt("return",{res:l.res,status:l.status});case 11:case"end":return d.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=S(N);function S(r){return r&&r.__esModule?r:{default:r}}var k=H("../utils/checkBucketName"),v=k.checkBucketName,m=H("../utils/obj2xml"),C=m.obj2xml,_=H("../utils/isArray"),e=_.isArray,h=I;h.putBucketWebsite=function(c){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments[2],l,f,d,u,o;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:if(v(c),l=this._bucketRequestParams("PUT",c,"website",n),f={Suffix:i.index||"index.html"},d={IndexDocument:f},u={WebsiteConfiguration:d},i.supportSubDir&&(f.SupportSubDir=i.supportSubDir),i.type&&(f.Type=i.type),i.error&&(d.ErrorDocument={Key:i.error}),!(i.routingRules!==void 0)){E.next=12;break}if(e(i.routingRules)){E.next=11;break}throw new Error("RoutingRules must be Array");case 11:d.RoutingRules={RoutingRule:i.routingRules};case 12:return u=C(u),l.content=u,l.mime="xml",l.successStatuses=[200],E.next=18,g.default.awrap(this.request(l));case 18:return o=E.sent,E.abrupt("return",{res:o.res});case 20:case"end":return E.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(H,Z,I){(function(N){"use strict";var g=H("babel-runtime/core-js/object/keys"),S=m(g),k=H("babel-runtime/core-js/json/stringify"),v=m(k);function m(C){return C&&C.__esModule?C:{default:C}}I.encodeCallback=function(_,e){if(_.headers=_.headers||{},!Object.prototype.hasOwnProperty.call(_.headers,"x-oss-callback")&&e.callback){var h={callbackUrl:encodeURI(e.callback.url),callbackBody:e.callback.body};e.callback.host&&(h.callbackHost=e.callback.host),e.callback.contentType&&(h.callbackBodyType=e.callback.contentType);var r=N.from((0,v.default)(h)).toString("base64");if(_.headers["x-oss-callback"]=r,e.callback.customValue){var c={};(0,S.default)(e.callback.customValue).forEach(function(i){c["x:"+i]=e.callback.customValue[i]}),_.headers["x-oss-callback-var"]=N.from((0,v.default)(c)).toString("base64")}}}}).call(this,H("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/assign"),g=S(N);function S(h){return h&&h.__esModule?h:{default:h}}var k=H("humanize-ms"),v=H("url"),m=H("../utils/checkBucketName"),C=m.checkBucketName;function _(h,r){var c=v.parse(h);if(c.protocol||(c=v.parse("http"+(r?"s":"")+"://"+h)),c.protocol!=="http:"&&c.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return c}function e(h,r,c){var i=c?"https://":"http://",n=r?"-internal.aliyuncs.com":".aliyuncs.com",l="vpc100-oss-cn-";return h.substr(0,l.length)===l&&(n=".aliyuncs.com"),v.parse(i+h+n)}Z.exports=function(h){if(!h||!h.accessKeyId||!h.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");h.bucket&&C(h.bucket);var r=(0,g.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},h);if(r.accessKeyId=r.accessKeyId.trim(),r.accessKeySecret=r.accessKeySecret.trim(),r.timeout&&(r.timeout=k(r.timeout)),r.endpoint)r.endpoint=_(r.endpoint,r.secure);else if(r.region)r.endpoint=e(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(H,Z,I){"use strict";var N=H("merge-descriptors"),g=I;N(g,H("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=S(N);function S(r){return r&&r.__esModule?r:{default:r}}var k=H("../utils/checkBucketName"),v=k.checkBucketName,m=H("querystring"),C=H("js-base64"),_=C.Base64.encode,e=I;e.processObjectSave=function(c,i,n,l){var f,d,u,o;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return h(c,"sourceObject"),h(i,"targetObject"),h(n,"process"),i=this._objectName(i),l&&v(l),f=this._objectRequestParams("POST",c,{subres:"x-oss-process"}),d=l?",b_"+_(l):"",i=_(i),u={"x-oss-process":n+"|sys/saveas,o_"+i+d},f.content=m.stringify(u),E.next=12,g.default.awrap(this.request(f));case 12:return o=E.sent,E.abrupt("return",{res:o.res,status:o.res.status});case 14:case"end":return E.stop()}},null,this)};function h(r,c){if(!r)throw new Error(c+" is required");if(typeof r!="string")throw new Error(c+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=S(N);function S(e){return e&&e.__esModule?e:{default:e}}var k=H("copy-to"),v=H("./callback"),m=H("./utils/deepCopy"),C=m.deepCopy,_=I;_.listUploads=function(h,r){var c,i,n,l;return g.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return r=r||{},c={},k(r).to(c),c.subres="uploads",i=this._objectRequestParams("GET","",c),i.query=h,i.xmlResponse=!0,i.successStatuses=[200],d.next=10,g.default.awrap(this.request(i));case 10:return n=d.sent,l=n.data.Upload||[],Array.isArray(l)||(l=[l]),l=l.map(function(u){return{name:u.Key,uploadId:u.UploadId,initiated:u.Initiated}}),d.abrupt("return",{res:n.res,uploads:l,bucket:n.data.Bucket,nextKeyMarker:n.data.NextKeyMarker,nextUploadIdMarker:n.data.NextUploadIdMarker,isTruncated:n.data.IsTruncated==="true"});case 15:case"end":return d.stop()}},null,this)},_.listParts=function(h,r,c,i){var n,l,f;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return i=i||{},n={},k(i).to(n),n.subres={uploadId:r},l=this._objectRequestParams("GET",h,n),l.query=c,l.xmlResponse=!0,l.successStatuses=[200],u.next=10,g.default.awrap(this.request(l));case 10:return f=u.sent,u.abrupt("return",{res:f.res,uploadId:f.data.UploadId,bucket:f.data.Bucket,name:f.data.Key,partNumberMarker:f.data.PartNumberMarker,nextPartNumberMarker:f.data.NextPartNumberMarker,maxParts:f.data.MaxParts,isTruncated:f.data.IsTruncated,parts:f.data.Part||[]});case 12:case"end":return u.stop()}},null,this)},_.abortMultipartUpload=function(h,r,c){var i,n,l;return g.default.async(function(d){for(;;)switch(d.prev=d.next){case 0:return this._stop(),c=c||{},i={},k(c).to(i),i.subres={uploadId:r},n=this._objectRequestParams("DELETE",h,i),n.successStatuses=[204],d.next=9,g.default.awrap(this.request(n));case 9:return l=d.sent,d.abrupt("return",{res:l.res});case 11:case"end":return d.stop()}},null,this)},_.initMultipartUpload=function(h,r){var c,i,n;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return r=r||{},c={},k(r).to(c),c.headers=c.headers||{},this._convertMetaToHeaders(r.meta,c.headers),c.subres="uploads",i=this._objectRequestParams("POST",h,c),i.mime=r.mime,i.xmlResponse=!0,i.successStatuses=[200],f.next=12,g.default.awrap(this.request(i));case 12:return n=f.sent,f.abrupt("return",{res:n.res,bucket:n.data.Bucket,name:n.data.Key,uploadId:n.data.UploadId});case 14:case"end":return f.stop()}},null,this)},_.uploadPart=function(h,r,c,i,n,l,f){var d;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return d={stream:this._createStream(i,n,l),size:l-n},o.next=3,g.default.awrap(this._uploadPart(h,r,c,d,f));case 3:return o.abrupt("return",o.sent);case 4:case"end":return o.stop()}},null,this)},_.completeMultipartUpload=function(h,r,c,i){var n,l,f,d,u,o,s,E;return g.default.async(function(p){for(;;)switch(p.prev=p.next){case 0:for(n=c.concat().sort(function(D,R){return D.number-R.number}).filter(function(D,R,y){return!R||D.number!==y[R-1].number}),l=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,f=0;f<n.length;f++)d=n[f],l+=`<Part>
|
|
|
`,l+="<PartNumber>"+d.number+`</PartNumber>
|
|
|
`,l+="<ETag>"+d.etag+`</ETag>
|
|
|
`,l+=`</Part>
|
|
|
`;return l+="</CompleteMultipartUpload>",i=i||{},u={},u=C(i),u.headers&&delete u.headers["x-oss-server-side-encryption"],u.subres={uploadId:r},o=this._objectRequestParams("POST",h,u),v.encodeCallback(o,u),o.mime="xml",o.content=l,o.headers&&o.headers["x-oss-callback"]||(o.xmlResponse=!0),o.successStatuses=[200],p.next=17,g.default.awrap(this.request(o));case 17:return s=p.sent,E={res:s.res,bucket:o.bucket,name:h,etag:s.res.headers.etag},o.headers&&o.headers["x-oss-callback"]&&(E.data=JSON.parse(s.data.toString())),p.abrupt("return",E);case 21:case"end":return p.stop()}},null,this)},_._uploadPart=function(h,r,c,i,n){var l,f,d;return g.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:return n=n||{},l={},k(n).to(l),l.headers={"Content-Length":i.size},l.subres={partNumber:c,uploadId:r},f=this._objectRequestParams("PUT",h,l),f.mime=l.mime,f.stream=i.stream,f.successStatuses=[200],o.next=11,g.default.awrap(this.request(f));case 11:if(d=o.sent,d.res.headers.etag){o.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 i.stream=null,f.stream=null,o.abrupt("return",{name:h,etag:d.res.headers.etag,res:d.res});case 17:case"end":return o.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=C(N),S=H("babel-runtime/core-js/object/keys"),k=C(S),v=H("babel-runtime/helpers/typeof"),m=C(v);function C(r){return r&&r.__esModule?r:{default:r}}var _=H("../utils/checkBucketName"),e=_.checkBucketName,h=I;h.copy=function(c,i,n,l){var f,d,u;return g.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return(typeof n=="undefined"?"undefined":(0,m.default)(n))==="object"&&(l=n),l=l||{},l.headers=l.headers||{},(0,k.default)(l.headers).forEach(function(E){l.headers["x-oss-copy-source-"+E.toLowerCase()]=l.headers[E]}),l.meta&&(l.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(l.meta,l.headers),i=this._getSourceName(i,n),l.versionId&&(i=i+"?versionId="+l.versionId),l.headers["x-oss-copy-source"]=i,f=this._objectRequestParams("PUT",c,l),f.xmlResponse=!0,f.successStatuses=[200,304],s.next=14,g.default.awrap(this.request(f));case 14:return d=s.sent,u=d.data,u&&(u={etag:u.ETag,lastModified:u.LastModified}),s.abrupt("return",{data:u,res:d.res});case 18:case"end":return s.stop()}},null,this)},h._getSourceName=function(c,i){return typeof i=="string"?c=this._objectName(c):c[0]!=="/"?i=this.options.bucket:(i=c.replace(/\/(.+?)(\/.*)/,"$1"),c=c.replace(/(\/.+?\/)(.*)/,"$2")),e(i),c=encodeURI(c),c="/"+i+"/"+c,c}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(C){return C&&C.__esModule?C:{default:C}}var m=I;m.delete=function(_){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return e.subres=(0,k.default)({},e.subres),e.versionId&&(e.subres.versionId=e.versionId),h=this._objectRequestParams("DELETE",_,e),h.successStatuses=[204],i.next=6,g.default.awrap(this.request(h));case 6:return r=i.sent,i.abrupt("return",{res:r.res});case 8:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(h){return h&&h.__esModule?h:{default:h}}var m=H("utility"),C=H("../utils/obj2xml"),_=C.obj2xml,e=I;e.deleteMulti=function(r){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,n,l,f,d,u,o,s,E,b,p,D;return g.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:if(i=[],!(!r||!r.length)){y.next=3;break}throw new Error("names is required");case 3:for(n=0;n<r.length;n++)l={},typeof r[n]=="string"?l.Key=m.escape(this._objectName(r[n])):(f=r[n],d=f.key,u=f.versionId,l.Key=m.escape(this._objectName(d)),l.VersionId=u),i.push(l);return o={Delete:{Quiet:!!c.quiet,Object:i}},s=_(o,{headers:!0}),c.subres=(0,k.default)({delete:""},c.subres),c.versionId&&(c.subres.versionId=c.versionId),E=this._objectRequestParams("POST","",c),E.mime="xml",E.content=s,E.xmlResponse=!0,E.successStatuses=[200],y.next=15,g.default.awrap(this.request(E));case 15:return b=y.sent,p=b.data,D=p&&p.Deleted||null,D&&(Array.isArray(D)||(D=[D])),y.abrupt("return",{res:b.res,deleted:D||[]});case 20:case"end":return y.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(C){return C&&C.__esModule?C:{default:C}}var m=I;m.deleteObjectTagging=function(_){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return e.subres=(0,k.default)({tagging:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),_=this._objectName(_),h=this._objectRequestParams("DELETE",_,e),h.successStatuses=[204],i.next=7,g.default.awrap(this.request(h));case 7:return r=i.sent,i.abrupt("return",{status:r.status,res:r.res});case 9:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(e){return e&&e.__esModule?e:{default:e}}var m=H("fs"),C=H("is-type-of"),_=I;_.get=function(h,r){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,n,l,f;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return i=null,n=!1,C.writableStream(r)?i=r:C.string(r)?(i=m.createWriteStream(r),n=!0):c=r,c=c||{},c.subres=(0,k.default)({},c.subres),c.versionId&&(c.subres.versionId=c.versionId),c.process&&(c.subres["x-oss-process"]=c.process),l=void 0,u.prev=8,f=this._objectRequestParams("GET",h,c),f.writeStream=i,f.successStatuses=[200,206,304],u.next=14,g.default.awrap(this.request(f));case 14:l=u.sent,n&&i.destroy(),u.next=25;break;case 18:if(u.prev=18,u.t0=u.catch(8),!n){u.next=24;break}return i.destroy(),u.next=24,g.default.awrap(this._deleteFileSafe(r));case 24:throw u.t0;case 25:return u.abrupt("return",{res:l.res,content:l.data});case 26:case"end":return u.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(C){return C&&C.__esModule?C:{default:C}}var m=I;m.getACL=function(_){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return e.subres=(0,k.default)({acl:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),_=this._objectName(_),h=this._objectRequestParams("GET",_,e),h.successStatuses=[200],h.xmlResponse=!0,i.next=8,g.default.awrap(this.request(h));case 8:return r=i.sent,i.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 i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/keys"),g=C(N),S=H("babel-runtime/regenerator"),k=C(S),v=H("babel-runtime/core-js/object/assign"),m=C(v);function C(f){return f&&f.__esModule?f:{default:f}}var _=I,e=H("../utils/isObject"),h=e.isObject,r=H("../utils/isArray"),c=r.isArray;_.getBucketVersions=i,_.listObjectVersions=i;function i(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,o,s,E,b,p;return k.default.async(function(R){for(;;)switch(R.prev=R.next){case 0:if(!(f.versionIdMarker&&f.keyMarker===void 0)){R.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return d.subres=(0,m.default)({versions:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),u=this._objectRequestParams("GET","",d),u.xmlResponse=!0,u.successStatuses=[200],u.query=l(f),R.next=10,k.default.awrap(this.request(u));case 10:return o=R.sent,s=o.data.Version||[],E=o.data.DeleteMarker||[],b=this,s&&(Array.isArray(s)||(s=[s]),s=s.map(function(y){return{name:y.Key,url:b._objectUrl(y.Key),lastModified:y.LastModified,isLatest:y.IsLatest==="true",versionId:y.VersionId,etag:y.ETag,type:y.Type,size:Number(y.Size),storageClass:y.StorageClass,owner:{id:y.Owner.ID,displayName:y.Owner.DisplayName}}})),E&&(c(E)||(E=[E]),E=E.map(function(y){return{name:y.Key,lastModified:y.LastModified,versionId:y.VersionId,owner:{id:y.Owner.ID,displayName:y.Owner.DisplayName}}})),p=o.data.CommonPrefixes||null,p&&(c(p)||(p=[p]),p=p.map(function(y){return y.Prefix})),R.abrupt("return",{res:o.res,objects:s,deleteMarker:E,prefixes:p,nextMarker:o.data.NextMarker||null,NextVersionIdMarker:o.data.NextVersionIdMarker||null,isTruncated:o.data.IsTruncated==="true"});case 19:case"end":return R.stop()}},null,this)}function n(f){return f.replace(/([A-Z])/g,"-$1").toLowerCase()}function l(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d={};return h(f)&&(0,g.default)(f).forEach(function(u){d[n(u)]=f[u]}),d}},{"../utils/isArray":42,"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],26:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(C){return C&&C.__esModule?C:{default:C}}var m=I;m.getObjectMeta=function(_,e){var h,r;return g.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return e=e||{},_=this._objectName(_),e.subres=(0,k.default)({objectMeta:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),h=this._objectRequestParams("HEAD",_,e),h.successStatuses=[200],i.next=8,g.default.awrap(this.request(h));case 8:return r=i.sent,i.abrupt("return",{status:r.status,res:r.res});case 10:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(e){return e&&e.__esModule?e:{default:e}}var m=I,C=H("../utils/isObject"),_=C.isObject;m.getObjectTagging=function(h){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,i,n,l,f;return g.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return r.subres=(0,k.default)({tagging:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),h=this._objectName(h),c=this._objectRequestParams("GET",h,r),c.successStatuses=[200],u.next=7,g.default.awrap(this.request(c));case 7:return i=u.sent,u.next=10,g.default.awrap(this.parseXML(i.data));case 10:return n=u.sent,l=n.TagSet.Tag,l=l&&_(l)?[l]:l||[],f={},l.forEach(function(o){f[o.Key]=o.Value}),u.abrupt("return",{status:i.status,res:i.res,tag:f});case 16:case"end":return u.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(C){return C&&C.__esModule?C:{default:C}}var m=I;m.getSymlink=function(_){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h,r,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return e.subres=(0,k.default)({symlink:""},e.subres),e.versionId&&(e.subres.versionId=e.versionId),_=this._objectName(_),h=this._objectRequestParams("GET",_,e),h.successStatuses=[200],n.next=7,g.default.awrap(this.request(h));case 7:return r=n.sent,c=r.res.headers["x-oss-symlink-target"],n.abrupt("return",{targetName:decodeURIComponent(c),res:r.res});case 10:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=C(N),S=H("babel-runtime/core-js/object/keys"),k=C(S),v=H("babel-runtime/core-js/object/assign"),m=C(v);function C(e){return e&&e.__esModule?e:{default:e}}var _=I;_.head=function(h){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,i,n;return g.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return r.subres=(0,m.default)({},r.subres),r.versionId&&(r.subres.versionId=r.versionId),c=this._objectRequestParams("HEAD",h,r),c.successStatuses=[200,304],f.next=6,g.default.awrap(this.request(c));case 6:return i=f.sent,n={meta:null,res:i.res,status:i.status},i.status===200&&(0,k.default)(i.headers).forEach(function(d){d.indexOf("x-oss-meta-")===0&&(n.meta||(n.meta={}),n.meta[d.substring(11)]=i.headers[d])}),f.abrupt("return",n);case 10:case"end":return f.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(C){return C&&C.__esModule?C:{default:C}}var m=I;m.putACL=function(_,e,h){var r,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return h=h||{},h.subres=(0,k.default)({acl:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),h.headers=h.headers||{},h.headers["x-oss-object-acl"]=e,_=this._objectName(_),r=this._objectRequestParams("PUT",_,h),r.successStatuses=[200],n.next=10,g.default.awrap(this.request(r));case 10:return c=n.sent,n.abrupt("return",{res:c.res});case 12:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=C(N),S=H("babel-runtime/core-js/object/keys"),k=C(S),v=H("babel-runtime/core-js/object/assign"),m=C(v);function C(i){return i&&i.__esModule?i:{default:i}}var _=H("../utils/obj2xml"),e=_.obj2xml,h=H("../utils/checkObjectTag"),r=h.checkObjectTag,c=I;c.putObjectTagging=function(n,l){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d,u,o;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:return r(l),f.subres=(0,m.default)({tagging:""},f.subres),f.versionId&&(f.subres.versionId=f.versionId),n=this._objectName(n),d=this._objectRequestParams("PUT",n,f),d.successStatuses=[200],l=(0,k.default)(l).map(function(b){return{Key:b,Value:l[b]}}),u={Tagging:{TagSet:{Tag:l}}},d.mime="xml",d.content=e(u),E.next=12,g.default.awrap(this.request(d));case 12:return o=E.sent,E.abrupt("return",{res:o.res,status:o.status});case 14:case"end":return E.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(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/object/assign"),k=v(S);function v(C){return C&&C.__esModule?C:{default:C}}var m=I;m.putSymlink=function(_,e,h){var r,c;return g.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return h=h||{},h.headers=h.headers||{},e=this._escape(this._objectName(e)),this._convertMetaToHeaders(h.meta,h.headers),h.headers["x-oss-symlink-target"]=e,h.subres=(0,k.default)({symlink:""},h.subres),h.versionId&&(h.subres.versionId=h.versionId),h.storageClass&&(h.headers["x-oss-storage-class"]=h.storageClass),_=this._objectName(_),r=this._objectRequestParams("PUT",_,h),r.successStatuses=[200],n.next=13,g.default.awrap(this.request(r));case 13:return c=n.sent,n.abrupt("return",{res:c.res});case 15:case"end":return n.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(H,Z,I){"use strict";var N=H("babel-runtime/regenerator"),g=v(N),S=H("babel-runtime/core-js/promise"),k=v(S);function v(C){return C&&C.__esModule?C:{default:C}}var m=I;m._parallelNode=function(_,e,h,r){var c,i,n,l,f,d,u,o;return g.default.async(function(E){for(;;)switch(E.prev=E.next){case 0:c=this,i=[],n=[],l=_.length/e,f=_.length%e,d=f===0?l:(_.length-f)/e+1,u=1,o=0;case 8:if(!(o<_.length)){E.next=26;break}if(!c.isCancel()){E.next=11;break}return E.abrupt("break",26);case 11:if(r?n.push(h(c,_[o],r)):n.push(h(c,_[o])),!(n.length===e||u===d&&o===_.length-1)){E.next=23;break}return E.prev=13,u+=1,E.next=17,g.default.awrap(k.default.all(n));case 17:E.next=22;break;case 19:E.prev=19,E.t0=E.catch(13),i.push(E.t0);case 22:n=[];case 23:o++,E.next=8;break;case 26:return E.abrupt("return",i);case 27:case"end":return E.stop()}},null,this,[[13,19]])},m._parallel=function(_,e,h){var r=this;return new k.default(function(c){var i=[];if(e<=0||!_){c(i);return}function n(p){return function(){if(p===null)throw new Error("Callback was already called.");var D=p;p=null;for(var R=arguments.length,y=Array(R),x=0;x<R;x++)y[x]=arguments[x];D.apply(this,y)}}function l(p){var D=-1,R=p.length;return function(){return++D<R&&!r.isCancel()?{value:p[D],key:D}:null}}var f=l(_),d=!1,u=0,o=!1;function s(p,D){u-=1,p?(d=!0,i.push(p),c(i)):D==={}||d&&u<=0?(d=!0,c(i)):o||(r.isCancel()?c(i):b())}function E(p,D){h(p).then(function(R){D(null,R)}).catch(function(R){D(R)})}function b(){for(o=!0;u<e&&!d&&!r.isCancel();){var p=f();if(p===null||i.length>0){d=!0,u<=0&&c(i);return}u+=1,E(p.value,n(s))}o=!1}b()})},m.cancel=function(_){this.options.cancelFlag=!0,_&&this.abortMultipartUpload(_.name,_.uploadId,_.options)},m.isCancel=function(){return this.options.cancelFlag},m.resetCancelFlag=function(){this.options.cancelFlag=!1},m._stop=function(){this.options.cancelFlag=!0},m._makeCancelEvent=function(){var _={status:0,name:"cancel"};return _}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(H,Z,I){(function(N){"use strict";var g=H("babel-runtime/core-js/json/stringify"),S=m(g),k=H("babel-runtime/core-js/object/keys"),v=m(k);function m(e){return e&&e.__esModule?e:{default:e}}var C=H("./../../shims/crypto/crypto.js"),_=H("is-type-of");I.buildCanonicalizedResource=function(h,r){var c=""+h,i="?";if(_.string(r)&&r.trim()!=="")c+=i+r;else if(_.array(r))r.sort(),c+=i+r.join("&");else if(r){var n=function(d,u){return d[0]>u[0]?1:d[0]<u[0]?-1:0},l=function(d){c+=i+d,r[d]&&(c+="="+r[d]),i="&"};(0,v.default)(r).sort(n).forEach(l)}return c},I.buildCanonicalString=function(h,r,c,i){c=c||{};var n=c.headers||{},l="x-oss-",f=[],d={},u=[h.toUpperCase(),n["Content-Md5"]||"",n["Content-Type"]||n["Content-Type".toLowerCase()],i||n["x-oss-date"]];return(0,v.default)(n).forEach(function(o){var s=o.toLowerCase();s.indexOf(l)===0&&(d[s]=String(n[o]).trim())}),(0,v.default)(d).sort().forEach(function(o){f.push(o+":"+d[o])}),u=u.concat(f),u.push(this.buildCanonicalizedResource(r,c.parameters)),u.join(`
|
|
|
`)},I.computeSignature=function(h,r){var c=C.createHmac("sha1",h);return c.update(N.from(r,"utf8")).digest("base64")},I.authorization=function(h,r,c){return"OSS "+h+":"+this.computeSignature(r,c)},I._signatureForURL=function(h){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments[2],i=arguments[3],n={},l=r.subResource,f=l===void 0?{}:l;if(r.process){var d="x-oss-process";f[d]=r.process}if(r.trafficLimit){var u="x-oss-traffic-limit";f[u]=r.trafficLimit}if(r.response&&(0,v.default)(r.response).forEach(function(b){var p="response-"+b.toLowerCase();f[p]=r.response[b]}),(0,v.default)(r).forEach(function(b){var p=b.toLowerCase(),D=r[b];p.indexOf("x-oss-")===0?n[p]=D:(p.indexOf("content-md5")===0||p.indexOf("content-type")===0)&&(n[b]=D)}),Object.prototype.hasOwnProperty.call(r,"security-token")&&(f["security-token"]=r["security-token"]),Object.prototype.hasOwnProperty.call(r,"callback")){var o={callbackUrl:encodeURI(r.callback.url),callbackBody:r.callback.body};if(r.callback.host&&(o.callbackHost=r.callback.host),r.callback.contentType&&(o.callbackBodyType=r.callback.contentType),f.callback=N.from((0,S.default)(o)).toString("base64"),r.callback.customValue){var s={};(0,v.default)(r.callback.customValue).forEach(function(b){s["x:"+b]=r.callback.customValue[b]}),f["callback-var"]=N.from((0,S.default)(s)).toString("base64")}}var E=this.buildCanonicalString(r.method,c,{headers:n,parameters:f},i.toString());return{Signature:this.computeSignature(h,E),subResource:f}}}).call(this,H("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(H,Z,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.checkBucketName=void 0,I.checkBucketName=function(N,g){var S=g?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!S.test(N))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/entries"),g=S(N);function S(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(I,"__esModule",{value:!0}),I.checkObjectTag=void 0;var k=H("./checkValid"),v=k.checkValid,m=H("./isObject"),C=m.isObject,_=[{validator:function(c){if(typeof c!="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 (/)"}],e={key:[].concat(_,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(_,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function h(r){if(!C(r))throw new Error("tag must be Object");var c=(0,g.default)(r);if(c.length>10)throw new Error("maximum of 10 tags for a object");var i=["key","value"];c.forEach(function(n){n.forEach(function(l,f){v(l,e[i[f]])})})}I.checkObjectTag=h},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(H,Z,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.checkValid=void 0;function N(g,S){S.forEach(function(k){if(k.validator)k.validator(g);else if(k.pattern&&!k.pattern.test(g))throw new Error(k.msg)})}I.checkValid=N},{}],38:[function(H,Z,I){(function(N){"use strict";var g=H("babel-runtime/core-js/object/assign"),S=k(g);function k(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(I,"__esModule",{value:!0}),I.createRequest=void 0;var v=H("./../../../shims/crypto/crypto.js"),m=H("debug")("ali-oss"),C=H("mime"),_=H("dateformat"),e=H("copy-to"),h=H("path");function r(n,l){return n[l]||n[l.toLowerCase()]}function c(n,l){delete n[l],delete n[l.toLowerCase()]}function i(n){var l=new Date;this.options.amendTimeSkewed&&(l=+new Date+this.options.amendTimeSkewed);var f={"x-oss-date":_(l,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(f["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,S.default)(f,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(f["x-oss-security-token"]=this.options.stsToken),e(n.headers).to(f),r(f,"Content-Type")||(n.mime&&n.mime.indexOf("/")>0?f["Content-Type"]=n.mime:f["Content-Type"]=C.getType(n.mime||h.extname(n.object||""))),r(f,"Content-Type")||c(f,"Content-Type"),n.content&&(f["Content-Md5"]=v.createHash("md5").update(N.from(n.content,"utf8")).digest("base64"),f["Content-Length"]||(f["Content-Length"]=n.content.length));var d=this._getResource(n);f.authorization=this.authorization(n.method,d,n.subres,f);var u=this._getReqUrl(n);m("request %s %s, with headers %j, !!stream: %s",n.method,u,f,!!n.stream);var o=n.timeout||this.options.timeout,s={method:n.method,content:n.content,stream:n.stream,headers:f,timeout:o,writeStream:n.writeStream,customResponse:n.customResponse,ctx:n.ctx||this.ctx};return this.agent&&(s.agent=this.agent),this.httpsAgent&&(s.httpsAgent=this.httpsAgent),{url:u,params:s}}I.createRequest=i}).call(this,H("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(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/keys"),g=v(N),S=H("babel-runtime/helpers/typeof"),k=v(S);function v(m){return m&&m.__esModule?m:{default:m}}Object.defineProperty(I,"__esModule",{value:!0}),I.deepCopy=void 0,I.deepCopy=function(m){if(m===null||(typeof m=="undefined"?"undefined":(0,k.default)(m))!=="object")return m;var C=Array.isArray(m)?[]:{};return(0,g.default)(m).forEach(function(_){C[_]=I.deepCopy(m[_])}),C}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/keys"),g=v(N),S=H("babel-runtime/helpers/typeof"),k=v(S);function v(_){return _&&_.__esModule?_:{default:_}}Object.defineProperty(I,"__esModule",{value:!0}),I.formatObjKey=void 0;function m(_,e){if(_===null||(typeof _=="undefined"?"undefined":(0,k.default)(_))!=="object")return _;var h=void 0;if(Array.isArray(_)){h=[];for(var r=0;r<_.length;r++)h.push(m(_[r],e))}else h={},(0,g.default)(_).forEach(function(c){h[C(c,e)]=m(_[c],e)});return h}I.formatObjKey=m;function C(_,e){return e==="firstUpperCase"?_=_.replace(/^./,function(h){return h.toUpperCase()}):e==="firstLowerCase"&&(_=_.replace(/^./,function(h){return h.toLowerCase()})),_}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(H,Z,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.getStrBytesCount=void 0;function N(g){for(var S=0,k=0;k<g.length;k++){var v=g.charAt(k);/^[\u00-\uff]$/.test(v)?S+=1:S+=2}return S}I.getStrBytesCount=N},{}],42:[function(H,Z,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isArray=void 0,I.isArray=function(N){return Object.prototype.toString.call(N)==="[object Array]"}},{}],43:[function(H,Z,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isBlob=void 0;function N(g){return typeof Blob!="undefined"&&g instanceof Blob}I.isBlob=N},{}],44:[function(H,Z,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isFile=void 0,I.isFile=function(N){return typeof File!="undefined"&&N instanceof File}},{}],45:[function(H,Z,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isIP=void 0,I.isIP=function(N){var g=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,S=/^\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 g.test(N)||S.test(N)}},{}],46:[function(H,Z,I){"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.isObject=void 0,I.isObject=function(N){return Object.prototype.toString.call(N)==="[object Object]"}},{}],47:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/keys"),g=S(N);function S(C){return C&&C.__esModule?C:{default:C}}Object.defineProperty(I,"__esModule",{value:!0}),I.obj2xml=void 0;var k=H("./formatObjKey");function v(C){return Object.prototype.toString.call(C).replace(/(.*? |])/g,"").toLowerCase()}function m(C,_){var e="";return _&&_.headers&&(e=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
`),_&&_.firstUpperCase&&(C=k.formatObjKey(C,"firstUpperCase")),v(C)==="object"?(0,g.default)(C).forEach(function(h){v(C[h])==="string"||v(C[h])==="number"?e+="<"+h+">"+C[h]+"</"+h+">":v(C[h])==="object"?e+="<"+h+">"+m(C[h])+"</"+h+">":v(C[h])==="array"?e+=C[h].map(function(r){return"<"+h+">"+m(r)+"</"+h+">"}).join(""):e+="<"+h+">"+C[h].toString()+"</"+h+">"}):e+=C.toString(),e}I.obj2xml=m},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(H,Z,I){Z.exports=N,Z.exports.HttpsAgent=N;function N(){}},{}],49:[function(H,Z,I){Z.exports=H("./register")().Promise},{"./register":51}],50:[function(H,Z,I){"use strict";var N="@@any-promise/REGISTRATION",g=null;Z.exports=function(S,k){return function(m,C){m=m||null,C=C||{};var _=C.global!==!1;if(g===null&&_&&(g=S[N]||null),g!==null&&m!==null&&g.implementation!==m)throw new Error('any-promise already defined as "'+g.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return g===null&&(m!==null&&typeof C.Promise!="undefined"?g={Promise:C.Promise,implementation:m}:g=k(m),_&&(S[N]=g)),g}}},{}],51:[function(H,Z,I){"use strict";Z.exports=H("./loader")(window,N);function N(){if(typeof window.Promise=="undefined")throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}},{"./loader":50}],52:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(H,Z,I){Z.exports={default:H("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(H,Z,I){"use strict";I.__esModule=!0;var N=H("../core-js/symbol/iterator"),g=m(N),S=H("../core-js/symbol"),k=m(S),v=typeof k.default=="function"&&typeof g.default=="symbol"?function(C){return typeof C}:function(C){return C&&typeof k.default=="function"&&C.constructor===k.default&&C!==k.default.prototype?"symbol":typeof C};function m(C){return C&&C.__esModule?C:{default:C}}I.default=typeof k.default=="function"&&v(g.default)==="symbol"?function(C){return typeof C=="undefined"?"undefined":v(C)}:function(C){return C&&typeof k.default=="function"&&C.constructor===k.default&&C!==k.default.prototype?"symbol":typeof C=="undefined"?"undefined":v(C)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(H,Z,I){Z.exports=H("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(H,Z,I){"use strict";I.byteLength=_,I.toByteArray=h,I.fromByteArray=i;for(var N=[],g=[],S=typeof Uint8Array!="undefined"?Uint8Array:Array,k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v=0,m=k.length;v<m;++v)N[v]=k[v],g[k.charCodeAt(v)]=v;g["-".charCodeAt(0)]=62,g["_".charCodeAt(0)]=63;function C(n){var l=n.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=n.indexOf("=");f===-1&&(f=l);var d=f===l?0:4-f%4;return[f,d]}function _(n){var l=C(n),f=l[0],d=l[1];return(f+d)*3/4-d}function e(n,l,f){return(l+f)*3/4-f}function h(n){var l,f=C(n),d=f[0],u=f[1],o=new S(e(n,d,u)),s=0,E=u>0?d-4:d,b;for(b=0;b<E;b+=4)l=g[n.charCodeAt(b)]<<18|g[n.charCodeAt(b+1)]<<12|g[n.charCodeAt(b+2)]<<6|g[n.charCodeAt(b+3)],o[s++]=l>>16&255,o[s++]=l>>8&255,o[s++]=l&255;return u===2&&(l=g[n.charCodeAt(b)]<<2|g[n.charCodeAt(b+1)]>>4,o[s++]=l&255),u===1&&(l=g[n.charCodeAt(b)]<<10|g[n.charCodeAt(b+1)]<<4|g[n.charCodeAt(b+2)]>>2,o[s++]=l>>8&255,o[s++]=l&255),o}function r(n){return N[n>>18&63]+N[n>>12&63]+N[n>>6&63]+N[n&63]}function c(n,l,f){for(var d,u=[],o=l;o<f;o+=3)d=(n[o]<<16&16711680)+(n[o+1]<<8&65280)+(n[o+2]&255),u.push(r(d));return u.join("")}function i(n){for(var l,f=n.length,d=f%3,u=[],o=16383,s=0,E=f-d;s<E;s+=o)u.push(c(n,s,s+o>E?E:s+o));return d===1?(l=n[f-1],u.push(N[l>>2]+N[l<<4&63]+"==")):d===2&&(l=(n[f-2]<<8)+n[f-1],u.push(N[l>>10]+N[l>>4&63]+N[l<<2&63]+"=")),u.join("")}},{}],70:[function(H,Z,I){/*!
|
|
|
* Bowser - a browser detector
|
|
|
* https://github.com/ded/bowser
|
|
|
* MIT License | (c) Dustin Diaz 2015
|
|
|
*/!function(N,g,S){typeof Z!="undefined"&&Z.exports?Z.exports=S():typeof define=="function"&&define.amd?define(g,S):N[g]=S()}(this,"bowser",function(){var N=!0;function g(e){function h(B){var U=e.match(B);return U&&U.length>1&&U[1]||""}function r(B){var U=e.match(B);return U&&U.length>1&&U[2]||""}var c=h(/(ipod|iphone|ipad)/i).toLowerCase(),i=/like android/i.test(e),n=!i&&/android/i.test(e),l=/nexus\s*[0-6]\s*/i.test(e),f=!l&&/nexus\s*[0-9]+/i.test(e),d=/CrOS/.test(e),u=/silk/i.test(e),o=/sailfish/i.test(e),s=/tizen/i.test(e),E=/(web|hpw)(o|0)s/i.test(e),b=/windows phone/i.test(e),p=/SamsungBrowser/i.test(e),D=!b&&/windows/i.test(e),R=!c&&!u&&/macintosh/i.test(e),y=!n&&!o&&!s&&!E&&/linux/i.test(e),x=r(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),w=h(/version\/(\d+(\.\d+)?)/i),T=/tablet/i.test(e)&&!/tablet pc/i.test(e),F=!T&&/[^-]mobi/i.test(e),P=/xbox/i.test(e),A;/opera/i.test(e)?A={name:"Opera",opera:N,version:w||h(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(e)?A={name:"Opera",opera:N,version:h(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||w}:/SamsungBrowser/i.test(e)?A={name:"Samsung Internet for Android",samsungBrowser:N,version:w||h(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(e)?A={name:"NAVER Whale browser",whale:N,version:h(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(e)?A={name:"MZ Browser",mzbrowser:N,version:h(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(e)?A={name:"Opera Coast",coast:N,version:w||h(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(e)?A={name:"Focus",focus:N,version:h(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(e)?A={name:"Yandex Browser",yandexbrowser:N,version:w||h(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(e)?A={name:"UC Browser",ucbrowser:N,version:h(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(e)?A={name:"Maxthon",maxthon:N,version:h(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(e)?A={name:"Epiphany",epiphany:N,version:h(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(e)?A={name:"Puffin",puffin:N,version:h(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(e)?A={name:"Sleipnir",sleipnir:N,version:h(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(e)?A={name:"K-Meleon",kMeleon:N,version:h(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:b?(A={name:"Windows Phone",osname:"Windows Phone",windowsphone:N},x?(A.msedge=N,A.version=x):(A.msie=N,A.version=h(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(e)?A={name:"Internet Explorer",msie:N,version:h(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:d?A={name:"Chrome",osname:"Chrome OS",chromeos:N,chromeBook:N,chrome:N,version:h(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(e)?A={name:"Microsoft Edge",msedge:N,version:x}:/vivaldi/i.test(e)?A={name:"Vivaldi",vivaldi:N,version:h(/vivaldi\/(\d+(\.\d+)?)/i)||w}:o?A={name:"Sailfish",osname:"Sailfish OS",sailfish:N,version:h(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(e)?A={name:"SeaMonkey",seamonkey:N,version:h(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(e)?(A={name:"Firefox",firefox:N,version:h(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(e)&&(A.firefoxos=N,A.osname="Firefox OS")):u?A={name:"Amazon Silk",silk:N,version:h(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(e)?A={name:"PhantomJS",phantom:N,version:h(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(e)?A={name:"SlimerJS",slimer:N,version:h(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(e)||/rim\stablet/i.test(e)?A={name:"BlackBerry",osname:"BlackBerry OS",blackberry:N,version:w||h(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:E?(A={name:"WebOS",osname:"WebOS",webos:N,version:w||h(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(e)&&(A.touchpad=N)):/bada/i.test(e)?A={name:"Bada",osname:"Bada",bada:N,version:h(/dolfin\/(\d+(\.\d+)?)/i)}:s?A={name:"Tizen",osname:"Tizen",tizen:N,version:h(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||w}:/qupzilla/i.test(e)?A={name:"QupZilla",qupzilla:N,version:h(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||w}:/chromium/i.test(e)?A={name:"Chromium",chromium:N,version:h(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||w}:/chrome|crios|crmo/i.test(e)?A={name:"Chrome",chrome:N,version:h(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:n?A={name:"Android",version:w}:/safari|applewebkit/i.test(e)?(A={name:"Safari",safari:N},w&&(A.version=w)):c?(A={name:c=="iphone"?"iPhone":c=="ipad"?"iPad":"iPod"},w&&(A.version=w)):/googlebot/i.test(e)?A={name:"Googlebot",googlebot:N,version:h(/googlebot\/(\d+(\.\d+))/i)||w}:A={name:h(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!A.msedge&&/(apple)?webkit/i.test(e)?(/(apple)?webkit\/537\.36/i.test(e)?(A.name=A.name||"Blink",A.blink=N):(A.name=A.name||"Webkit",A.webkit=N),!A.version&&w&&(A.version=w)):!A.opera&&/gecko\//i.test(e)&&(A.name=A.name||"Gecko",A.gecko=N,A.version=A.version||h(/gecko\/(\d+(\.\d+)?)/i)),!A.windowsphone&&(n||A.silk)?(A.android=N,A.osname="Android"):!A.windowsphone&&c?(A[c]=N,A.ios=N,A.osname="iOS"):R?(A.mac=N,A.osname="macOS"):P?(A.xbox=N,A.osname="Xbox"):D?(A.windows=N,A.osname="Windows"):y&&(A.linux=N,A.osname="Linux");function X(B){switch(B){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 z="";A.windows?z=X(h(/Windows ((NT|XP)( \d\d?.\d)?)/i)):A.windowsphone?z=h(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):A.mac?(z=h(/Mac OS X (\d+([_\.\s]\d+)*)/i),z=z.replace(/[_\s]/g,".")):c?(z=h(/os (\d+([_\s]\d+)*) like mac os x/i),z=z.replace(/[_\s]/g,".")):n?z=h(/android[ \/-](\d+(\.\d+)*)/i):A.webos?z=h(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):A.blackberry?z=h(/rim\stablet\sos\s(\d+(\.\d+)*)/i):A.bada?z=h(/bada\/(\d+(\.\d+)*)/i):A.tizen&&(z=h(/tizen[\/\s](\d+(\.\d+)*)/i)),z&&(A.osversion=z);var O=!A.windows&&z.split(".")[0];return T||f||c=="ipad"||n&&(O==3||O>=4&&!F)||A.silk?A.tablet=N:(F||c=="iphone"||c=="ipod"||n||l||A.blackberry||A.webos||A.bada)&&(A.mobile=N),A.msedge||A.msie&&A.version>=10||A.yandexbrowser&&A.version>=15||A.vivaldi&&A.version>=1||A.chrome&&A.version>=20||A.samsungBrowser&&A.version>=4||A.whale&&m([A.version,"1.0"])===1||A.mzbrowser&&m([A.version,"6.0"])===1||A.focus&&m([A.version,"1.0"])===1||A.firefox&&A.version>=20||A.safari&&A.version>=6||A.opera&&A.version>=10||A.ios&&A.osversion&&A.osversion.split(".")[0]>=6||A.blackberry&&A.version>=10.1||A.chromium&&A.version>=20?A.a=N:A.msie&&A.version<10||A.chrome&&A.version<20||A.firefox&&A.version<20||A.safari&&A.version<6||A.opera&&A.version<10||A.ios&&A.osversion&&A.osversion.split(".")[0]<6||A.chromium&&A.version<20?A.c=N:A.x=N,A}var S=g(typeof navigator!="undefined"&&navigator.userAgent||"");S.test=function(e){for(var h=0;h<e.length;++h){var r=e[h];if(typeof r=="string"&&r in S)return!0}return!1};function k(e){return e.split(".").length}function v(e,h){var r=[],c;if(Array.prototype.map)return Array.prototype.map.call(e,h);for(c=0;c<e.length;c++)r.push(h(e[c]));return r}function m(e){for(var h=Math.max(k(e[0]),k(e[1])),r=v(e,function(c){var i=h-k(c);return c=c+new Array(i+1).join(".0"),v(c.split("."),function(n){return new Array(20-n.length).join("0")+n}).reverse()});--h>=0;){if(r[0][h]>r[1][h])return 1;if(r[0][h]===r[1][h]){if(h===0)return 0}else return-1}}function C(e,h,r){var c=S;typeof h=="string"&&(r=h,h=void 0),h===void 0&&(h=!1),r&&(c=g(r));var i=""+c.version;for(var n in e)if(e.hasOwnProperty(n)&&c[n]){if(typeof e[n]!="string")throw new Error("Browser version in the minVersion map should be a string: "+n+": "+String(e));return m([i,e[n]])<0}return h}function _(e,h,r){return!C(e,h,r)}return S.isUnsupportedBrowser=C,S.compareVersions=m,S.check=_,S._detect=g,S.detect=g,S})},{}],71:[function(H,Z,I){},{}],72:[function(H,Z,I){var N=H("buffer").Buffer,g=N.isEncoding||function(_){switch(_&&_.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 S(_){if(_&&!g(_))throw new Error("Unknown encoding: "+_)}var k=I.StringDecoder=function(_){this.encoding=(_||"utf8").toLowerCase().replace(/[-_]/,""),S(_);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=m;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=C;break;default:this.write=v;return}this.charBuffer=new N(6),this.charReceived=0,this.charLength=0};k.prototype.write=function(_){for(var e="";this.charLength;){var h=_.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:_.length;if(_.copy(this.charBuffer,this.charReceived,0,h),this.charReceived+=h,this.charReceived<this.charLength)return"";_=_.slice(h,_.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var c=e.charCodeAt(e.length-1);if(c>=55296&&c<=56319){this.charLength+=this.surrogateSize,e="";continue}if(this.charReceived=this.charLength=0,_.length===0)return e;break}this.detectIncompleteChar(_);var r=_.length;this.charLength&&(_.copy(this.charBuffer,0,_.length-this.charReceived,r),r-=this.charReceived),e+=_.toString(this.encoding,0,r);var r=e.length-1,c=e.charCodeAt(r);if(c>=55296&&c<=56319){var i=this.surrogateSize;return this.charLength+=i,this.charReceived+=i,this.charBuffer.copy(this.charBuffer,i,0,i),_.copy(this.charBuffer,0,0,i),e.substring(0,r)}return e},k.prototype.detectIncompleteChar=function(_){for(var e=_.length>=3?3:_.length;e>0;e--){var h=_[_.length-e];if(e==1&&h>>5==6){this.charLength=2;break}if(e<=2&&h>>4==14){this.charLength=3;break}if(e<=3&&h>>3==30){this.charLength=4;break}}this.charReceived=e},k.prototype.end=function(_){var e="";if(_&&_.length&&(e=this.write(_)),this.charReceived){var h=this.charReceived,r=this.charBuffer,c=this.encoding;e+=r.slice(0,h).toString(c)}return e};function v(_){return _.toString(this.encoding)}function m(_){this.charReceived=_.length%2,this.charLength=this.charReceived?2:0}function C(_){this.charReceived=_.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(H,Z,I){(function(N,g){/*!
|
|
|
* The buffer module from node.js, for the browser.
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
|
* @license MIT
|
|
|
*/"use strict";var S=H("base64-js"),k=H("ieee754"),v=H("isarray");I.Buffer=g,I.SlowBuffer=u,I.INSPECT_MAX_BYTES=50,g.TYPED_ARRAY_SUPPORT=N.TYPED_ARRAY_SUPPORT!==void 0?N.TYPED_ARRAY_SUPPORT:m(),I.kMaxLength=C();function m(){try{var ie=new Uint8Array(1);return ie.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ie.foo()===42&&typeof ie.subarray=="function"&&ie.subarray(1,1).byteLength===0}catch(ne){return!1}}function C(){return g.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function _(ie,ne){if(C()<ne)throw new RangeError("Invalid typed array length");return g.TYPED_ARRAY_SUPPORT?(ie=new Uint8Array(ne),ie.__proto__=g.prototype):(ie===null&&(ie=new g(ne)),ie.length=ne),ie}function g(ie,ne,J){if(!g.TYPED_ARRAY_SUPPORT&&!(this instanceof g))return new g(ie,ne,J);if(typeof ie=="number"){if(typeof ne=="string")throw new Error("If encoding is specified then the first argument must be a string");return c(this,ie)}return e(this,ie,ne,J)}g.poolSize=8192,g._augment=function(ie){return ie.__proto__=g.prototype,ie};function e(ie,ne,J,$){if(typeof ne=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&ne instanceof ArrayBuffer?l(ie,ne,J,$):typeof ne=="string"?i(ie,ne,J):f(ie,ne)}g.from=function(ie,ne,J){return e(null,ie,ne,J)},g.TYPED_ARRAY_SUPPORT&&(g.prototype.__proto__=Uint8Array.prototype,g.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&g[Symbol.species]===g&&Object.defineProperty(g,Symbol.species,{value:null,configurable:!0}));function h(ie){if(typeof ie!="number")throw new TypeError('"size" argument must be a number');if(ie<0)throw new RangeError('"size" argument must not be negative')}function r(ie,ne,J,$){return h(ne),ne<=0?_(ie,ne):J!==void 0?typeof $=="string"?_(ie,ne).fill(J,$):_(ie,ne).fill(J):_(ie,ne)}g.alloc=function(ie,ne,J){return r(null,ie,ne,J)};function c(ie,ne){if(h(ne),ie=_(ie,ne<0?0:d(ne)|0),!g.TYPED_ARRAY_SUPPORT)for(var J=0;J<ne;++J)ie[J]=0;return ie}g.allocUnsafe=function(ie){return c(null,ie)},g.allocUnsafeSlow=function(ie){return c(null,ie)};function i(ie,ne,J){if((typeof J!="string"||J==="")&&(J="utf8"),!g.isEncoding(J))throw new TypeError('"encoding" must be a valid string encoding');var $=o(ne,J)|0;ie=_(ie,$);var le=ie.write(ne,J);return le!==$&&(ie=ie.slice(0,le)),ie}function n(ie,ne){var J=ne.length<0?0:d(ne.length)|0;ie=_(ie,J);for(var $=0;$<J;$+=1)ie[$]=ne[$]&255;return ie}function l(ie,ne,J,$){if(ne.byteLength,J<0||ne.byteLength<J)throw new RangeError("'offset' is out of bounds");if(ne.byteLength<J+($||0))throw new RangeError("'length' is out of bounds");return J===void 0&&$===void 0?ne=new Uint8Array(ne):$===void 0?ne=new Uint8Array(ne,J):ne=new Uint8Array(ne,J,$),g.TYPED_ARRAY_SUPPORT?(ie=ne,ie.__proto__=g.prototype):ie=n(ie,ne),ie}function f(ie,ne){if(g.isBuffer(ne)){var J=d(ne.length)|0;return ie=_(ie,J),ie.length===0||ne.copy(ie,0,0,J),ie}if(ne){if(typeof ArrayBuffer!="undefined"&&ne.buffer instanceof ArrayBuffer||"length"in ne)return typeof ne.length!="number"||q(ne.length)?_(ie,0):n(ie,ne);if(ne.type==="Buffer"&&v(ne.data))return n(ie,ne.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(ie){if(ie>=C())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C().toString(16)+" bytes");return ie|0}function u(ie){return+ie!=ie&&(ie=0),g.alloc(+ie)}g.isBuffer=function(ne){return!!(ne!=null&&ne._isBuffer)},g.compare=function(ne,J){if(!g.isBuffer(ne)||!g.isBuffer(J))throw new TypeError("Arguments must be Buffers");if(ne===J)return 0;for(var $=ne.length,le=J.length,ce=0,we=Math.min($,le);ce<we;++ce)if(ne[ce]!==J[ce]){$=ne[ce],le=J[ce];break}return $<le?-1:le<$?1:0},g.isEncoding=function(ne){switch(String(ne).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}},g.concat=function(ne,J){if(!v(ne))throw new TypeError('"list" argument must be an Array of Buffers');if(ne.length===0)return g.alloc(0);var $;if(J===void 0)for(J=0,$=0;$<ne.length;++$)J+=ne[$].length;var le=g.allocUnsafe(J),ce=0;for($=0;$<ne.length;++$){var we=ne[$];if(!g.isBuffer(we))throw new TypeError('"list" argument must be an Array of Buffers');we.copy(le,ce),ce+=we.length}return le};function o(ie,ne){if(g.isBuffer(ie))return ie.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ie)||ie instanceof ArrayBuffer))return ie.byteLength;typeof ie!="string"&&(ie=""+ie);var J=ie.length;if(J===0)return 0;for(var $=!1;;)switch(ne){case"ascii":case"latin1":case"binary":return J;case"utf8":case"utf-8":case void 0:return te(ie).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J*2;case"hex":return J>>>1;case"base64":return V(ie).length;default:if($)return te(ie).length;ne=(""+ne).toLowerCase(),$=!0}}g.byteLength=o;function s(ie,ne,J){var $=!1;if((ne===void 0||ne<0)&&(ne=0),ne>this.length)return"";if((J===void 0||J>this.length)&&(J=this.length),J<=0)return"";if(J>>>=0,ne>>>=0,J<=ne)return"";for(ie||(ie="utf8");;)switch(ie){case"hex":return B(this,ne,J);case"utf8":case"utf-8":return P(this,ne,J);case"ascii":return z(this,ne,J);case"latin1":case"binary":return O(this,ne,J);case"base64":return F(this,ne,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,ne,J);default:if($)throw new TypeError("Unknown encoding: "+ie);ie=(ie+"").toLowerCase(),$=!0}}g.prototype._isBuffer=!0;function E(ie,ne,J){var $=ie[ne];ie[ne]=ie[J],ie[J]=$}g.prototype.swap16=function(){var ne=this.length;if(ne%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var J=0;J<ne;J+=2)E(this,J,J+1);return this},g.prototype.swap32=function(){var ne=this.length;if(ne%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var J=0;J<ne;J+=4)E(this,J,J+3),E(this,J+1,J+2);return this},g.prototype.swap64=function(){var ne=this.length;if(ne%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var J=0;J<ne;J+=8)E(this,J,J+7),E(this,J+1,J+6),E(this,J+2,J+5),E(this,J+3,J+4);return this},g.prototype.toString=function(){var ne=this.length|0;return ne===0?"":arguments.length===0?P(this,0,ne):s.apply(this,arguments)},g.prototype.equals=function(ne){if(!g.isBuffer(ne))throw new TypeError("Argument must be a Buffer");return this===ne?!0:g.compare(this,ne)===0},g.prototype.inspect=function(){var ne="",J=I.INSPECT_MAX_BYTES;return this.length>0&&(ne=this.toString("hex",0,J).match(/.{2}/g).join(" "),this.length>J&&(ne+=" ... ")),"<Buffer "+ne+">"},g.prototype.compare=function(ne,J,$,le,ce){if(!g.isBuffer(ne))throw new TypeError("Argument must be a Buffer");if(J===void 0&&(J=0),$===void 0&&($=ne?ne.length:0),le===void 0&&(le=0),ce===void 0&&(ce=this.length),J<0||$>ne.length||le<0||ce>this.length)throw new RangeError("out of range index");if(le>=ce&&J>=$)return 0;if(le>=ce)return-1;if(J>=$)return 1;if(J>>>=0,$>>>=0,le>>>=0,ce>>>=0,this===ne)return 0;for(var we=ce-le,Fe=$-J,Xe=Math.min(we,Fe),$e=this.slice(le,ce),Ye=ne.slice(J,$),Ze=0;Ze<Xe;++Ze)if($e[Ze]!==Ye[Ze]){we=$e[Ze],Fe=Ye[Ze];break}return we<Fe?-1:Fe<we?1:0};function b(ie,ne,J,$,le){if(ie.length===0)return-1;if(typeof J=="string"?($=J,J=0):J>2147483647?J=2147483647:J<-2147483648&&(J=-2147483648),J=+J,isNaN(J)&&(J=le?0:ie.length-1),J<0&&(J=ie.length+J),J>=ie.length){if(le)return-1;J=ie.length-1}else if(J<0)if(le)J=0;else return-1;if(typeof ne=="string"&&(ne=g.from(ne,$)),g.isBuffer(ne))return ne.length===0?-1:p(ie,ne,J,$,le);if(typeof ne=="number")return ne=ne&255,g.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(ie,ne,J):Uint8Array.prototype.lastIndexOf.call(ie,ne,J):p(ie,[ne],J,$,le);throw new TypeError("val must be string, number or Buffer")}function p(ie,ne,J,$,le){var ce=1,we=ie.length,Fe=ne.length;if($!==void 0&&($=String($).toLowerCase(),$==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(ie.length<2||ne.length<2)return-1;ce=2,we/=2,Fe/=2,J/=2}function Xe(Pe,Ie){return ce===1?Pe[Ie]:Pe.readUInt16BE(Ie*ce)}var $e;if(le){var Ye=-1;for($e=J;$e<we;$e++)if(Xe(ie,$e)===Xe(ne,Ye===-1?0:$e-Ye)){if(Ye===-1&&(Ye=$e),$e-Ye+1===Fe)return Ye*ce}else Ye!==-1&&($e-=$e-Ye),Ye=-1}else for(J+Fe>we&&(J=we-Fe),$e=J;$e>=0;$e--){for(var Ze=!0,qe=0;qe<Fe;qe++)if(Xe(ie,$e+qe)!==Xe(ne,qe)){Ze=!1;break}if(Ze)return $e}return-1}g.prototype.includes=function(ne,J,$){return this.indexOf(ne,J,$)!==-1},g.prototype.indexOf=function(ne,J,$){return b(this,ne,J,$,!0)},g.prototype.lastIndexOf=function(ne,J,$){return b(this,ne,J,$,!1)};function D(ie,ne,J,$){J=Number(J)||0;var le=ie.length-J;$?($=Number($),$>le&&($=le)):$=le;var ce=ne.length;if(ce%2!==0)throw new TypeError("Invalid hex string");$>ce/2&&($=ce/2);for(var we=0;we<$;++we){var Fe=parseInt(ne.substr(we*2,2),16);if(isNaN(Fe))return we;ie[J+we]=Fe}return we}function R(ie,ne,J,$){return Q(te(ne,ie.length-J),ie,J,$)}function y(ie,ne,J,$){return Q(W(ne),ie,J,$)}function x(ie,ne,J,$){return y(ie,ne,J,$)}function w(ie,ne,J,$){return Q(V(ne),ie,J,$)}function T(ie,ne,J,$){return Q(Y(ne,ie.length-J),ie,J,$)}g.prototype.write=function(ne,J,$,le){if(J===void 0)le="utf8",$=this.length,J=0;else if($===void 0&&typeof J=="string")le=J,$=this.length,J=0;else if(isFinite(J))J=J|0,isFinite($)?($=$|0,le===void 0&&(le="utf8")):(le=$,$=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ce=this.length-J;if(($===void 0||$>ce)&&($=ce),ne.length>0&&($<0||J<0)||J>this.length)throw new RangeError("Attempt to write outside buffer bounds");le||(le="utf8");for(var we=!1;;)switch(le){case"hex":return D(this,ne,J,$);case"utf8":case"utf-8":return R(this,ne,J,$);case"ascii":return y(this,ne,J,$);case"latin1":case"binary":return x(this,ne,J,$);case"base64":return w(this,ne,J,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,ne,J,$);default:if(we)throw new TypeError("Unknown encoding: "+le);le=(""+le).toLowerCase(),we=!0}},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F(ie,ne,J){return ne===0&&J===ie.length?S.fromByteArray(ie):S.fromByteArray(ie.slice(ne,J))}function P(ie,ne,J){J=Math.min(ie.length,J);for(var $=[],le=ne;le<J;){var ce=ie[le],we=null,Fe=ce>239?4:ce>223?3:ce>191?2:1;if(le+Fe<=J){var Xe,$e,Ye,Ze;switch(Fe){case 1:ce<128&&(we=ce);break;case 2:Xe=ie[le+1],(Xe&192)===128&&(Ze=(ce&31)<<6|Xe&63,Ze>127&&(we=Ze));break;case 3:Xe=ie[le+1],$e=ie[le+2],(Xe&192)===128&&($e&192)===128&&(Ze=(ce&15)<<12|(Xe&63)<<6|$e&63,Ze>2047&&(Ze<55296||Ze>57343)&&(we=Ze));break;case 4:Xe=ie[le+1],$e=ie[le+2],Ye=ie[le+3],(Xe&192)===128&&($e&192)===128&&(Ye&192)===128&&(Ze=(ce&15)<<18|(Xe&63)<<12|($e&63)<<6|Ye&63,Ze>65535&&Ze<1114112&&(we=Ze))}}we===null?(we=65533,Fe=1):we>65535&&(we-=65536,$.push(we>>>10&1023|55296),we=56320|we&1023),$.push(we),le+=Fe}return X($)}var A=4096;function X(ie){var ne=ie.length;if(ne<=A)return String.fromCharCode.apply(String,ie);for(var J="",$=0;$<ne;)J+=String.fromCharCode.apply(String,ie.slice($,$+=A));return J}function z(ie,ne,J){var $="";J=Math.min(ie.length,J);for(var le=ne;le<J;++le)$+=String.fromCharCode(ie[le]&127);return $}function O(ie,ne,J){var $="";J=Math.min(ie.length,J);for(var le=ne;le<J;++le)$+=String.fromCharCode(ie[le]);return $}function B(ie,ne,J){var $=ie.length;(!ne||ne<0)&&(ne=0),(!J||J<0||J>$)&&(J=$);for(var le="",ce=ne;ce<J;++ce)le+=de(ie[ce]);return le}function U(ie,ne,J){for(var $=ie.slice(ne,J),le="",ce=0;ce<$.length;ce+=2)le+=String.fromCharCode($[ce]+$[ce+1]*256);return le}g.prototype.slice=function(ne,J){var $=this.length;ne=~~ne,J=J===void 0?$:~~J,ne<0?(ne+=$,ne<0&&(ne=0)):ne>$&&(ne=$),J<0?(J+=$,J<0&&(J=0)):J>$&&(J=$),J<ne&&(J=ne);var le;if(g.TYPED_ARRAY_SUPPORT)le=this.subarray(ne,J),le.__proto__=g.prototype;else{var ce=J-ne;le=new g(ce,void 0);for(var we=0;we<ce;++we)le[we]=this[we+ne]}return le};function L(ie,ne,J){if(ie%1!==0||ie<0)throw new RangeError("offset is not uint");if(ie+ne>J)throw new RangeError("Trying to access beyond buffer length")}g.prototype.readUIntLE=function(ne,J,$){ne=ne|0,J=J|0,$||L(ne,J,this.length);for(var le=this[ne],ce=1,we=0;++we<J&&(ce*=256);)le+=this[ne+we]*ce;return le},g.prototype.readUIntBE=function(ne,J,$){ne=ne|0,J=J|0,$||L(ne,J,this.length);for(var le=this[ne+--J],ce=1;J>0&&(ce*=256);)le+=this[ne+--J]*ce;return le},g.prototype.readUInt8=function(ne,J){return J||L(ne,1,this.length),this[ne]},g.prototype.readUInt16LE=function(ne,J){return J||L(ne,2,this.length),this[ne]|this[ne+1]<<8},g.prototype.readUInt16BE=function(ne,J){return J||L(ne,2,this.length),this[ne]<<8|this[ne+1]},g.prototype.readUInt32LE=function(ne,J){return J||L(ne,4,this.length),(this[ne]|this[ne+1]<<8|this[ne+2]<<16)+this[ne+3]*16777216},g.prototype.readUInt32BE=function(ne,J){return J||L(ne,4,this.length),this[ne]*16777216+(this[ne+1]<<16|this[ne+2]<<8|this[ne+3])},g.prototype.readIntLE=function(ne,J,$){ne=ne|0,J=J|0,$||L(ne,J,this.length);for(var le=this[ne],ce=1,we=0;++we<J&&(ce*=256);)le+=this[ne+we]*ce;return ce*=128,le>=ce&&(le-=Math.pow(2,8*J)),le},g.prototype.readIntBE=function(ne,J,$){ne=ne|0,J=J|0,$||L(ne,J,this.length);for(var le=J,ce=1,we=this[ne+--le];le>0&&(ce*=256);)we+=this[ne+--le]*ce;return ce*=128,we>=ce&&(we-=Math.pow(2,8*J)),we},g.prototype.readInt8=function(ne,J){return J||L(ne,1,this.length),this[ne]&128?(255-this[ne]+1)*-1:this[ne]},g.prototype.readInt16LE=function(ne,J){J||L(ne,2,this.length);var $=this[ne]|this[ne+1]<<8;return $&32768?$|4294901760:$},g.prototype.readInt16BE=function(ne,J){J||L(ne,2,this.length);var $=this[ne+1]|this[ne]<<8;return $&32768?$|4294901760:$},g.prototype.readInt32LE=function(ne,J){return J||L(ne,4,this.length),this[ne]|this[ne+1]<<8|this[ne+2]<<16|this[ne+3]<<24},g.prototype.readInt32BE=function(ne,J){return J||L(ne,4,this.length),this[ne]<<24|this[ne+1]<<16|this[ne+2]<<8|this[ne+3]},g.prototype.readFloatLE=function(ne,J){return J||L(ne,4,this.length),k.read(this,ne,!0,23,4)},g.prototype.readFloatBE=function(ne,J){return J||L(ne,4,this.length),k.read(this,ne,!1,23,4)},g.prototype.readDoubleLE=function(ne,J){return J||L(ne,8,this.length),k.read(this,ne,!0,52,8)},g.prototype.readDoubleBE=function(ne,J){return J||L(ne,8,this.length),k.read(this,ne,!1,52,8)};function G(ie,ne,J,$,le,ce){if(!g.isBuffer(ie))throw new TypeError('"buffer" argument must be a Buffer instance');if(ne>le||ne<ce)throw new RangeError('"value" argument is out of bounds');if(J+$>ie.length)throw new RangeError("Index out of range")}g.prototype.writeUIntLE=function(ne,J,$,le){if(ne=+ne,J=J|0,$=$|0,!le){var ce=Math.pow(2,8*$)-1;G(this,ne,J,$,ce,0)}var we=1,Fe=0;for(this[J]=ne&255;++Fe<$&&(we*=256);)this[J+Fe]=ne/we&255;return J+$},g.prototype.writeUIntBE=function(ne,J,$,le){if(ne=+ne,J=J|0,$=$|0,!le){var ce=Math.pow(2,8*$)-1;G(this,ne,J,$,ce,0)}var we=$-1,Fe=1;for(this[J+we]=ne&255;--we>=0&&(Fe*=256);)this[J+we]=ne/Fe&255;return J+$},g.prototype.writeUInt8=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,1,255,0),g.TYPED_ARRAY_SUPPORT||(ne=Math.floor(ne)),this[J]=ne&255,J+1};function ee(ie,ne,J,$){ne<0&&(ne=65535+ne+1);for(var le=0,ce=Math.min(ie.length-J,2);le<ce;++le)ie[J+le]=(ne&255<<8*($?le:1-le))>>>($?le:1-le)*8}g.prototype.writeUInt16LE=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[J]=ne&255,this[J+1]=ne>>>8):ee(this,ne,J,!0),J+2},g.prototype.writeUInt16BE=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,2,65535,0),g.TYPED_ARRAY_SUPPORT?(this[J]=ne>>>8,this[J+1]=ne&255):ee(this,ne,J,!1),J+2};function oe(ie,ne,J,$){ne<0&&(ne=4294967295+ne+1);for(var le=0,ce=Math.min(ie.length-J,4);le<ce;++le)ie[J+le]=ne>>>($?le:3-le)*8&255}g.prototype.writeUInt32LE=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[J+3]=ne>>>24,this[J+2]=ne>>>16,this[J+1]=ne>>>8,this[J]=ne&255):oe(this,ne,J,!0),J+4},g.prototype.writeUInt32BE=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,4,4294967295,0),g.TYPED_ARRAY_SUPPORT?(this[J]=ne>>>24,this[J+1]=ne>>>16,this[J+2]=ne>>>8,this[J+3]=ne&255):oe(this,ne,J,!1),J+4},g.prototype.writeIntLE=function(ne,J,$,le){if(ne=+ne,J=J|0,!le){var ce=Math.pow(2,8*$-1);G(this,ne,J,$,ce-1,-ce)}var we=0,Fe=1,Xe=0;for(this[J]=ne&255;++we<$&&(Fe*=256);)ne<0&&Xe===0&&this[J+we-1]!==0&&(Xe=1),this[J+we]=(ne/Fe>>0)-Xe&255;return J+$},g.prototype.writeIntBE=function(ne,J,$,le){if(ne=+ne,J=J|0,!le){var ce=Math.pow(2,8*$-1);G(this,ne,J,$,ce-1,-ce)}var we=$-1,Fe=1,Xe=0;for(this[J+we]=ne&255;--we>=0&&(Fe*=256);)ne<0&&Xe===0&&this[J+we+1]!==0&&(Xe=1),this[J+we]=(ne/Fe>>0)-Xe&255;return J+$},g.prototype.writeInt8=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,1,127,-128),g.TYPED_ARRAY_SUPPORT||(ne=Math.floor(ne)),ne<0&&(ne=255+ne+1),this[J]=ne&255,J+1},g.prototype.writeInt16LE=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[J]=ne&255,this[J+1]=ne>>>8):ee(this,ne,J,!0),J+2},g.prototype.writeInt16BE=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,2,32767,-32768),g.TYPED_ARRAY_SUPPORT?(this[J]=ne>>>8,this[J+1]=ne&255):ee(this,ne,J,!1),J+2},g.prototype.writeInt32LE=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,4,2147483647,-2147483648),g.TYPED_ARRAY_SUPPORT?(this[J]=ne&255,this[J+1]=ne>>>8,this[J+2]=ne>>>16,this[J+3]=ne>>>24):oe(this,ne,J,!0),J+4},g.prototype.writeInt32BE=function(ne,J,$){return ne=+ne,J=J|0,$||G(this,ne,J,4,2147483647,-2147483648),ne<0&&(ne=4294967295+ne+1),g.TYPED_ARRAY_SUPPORT?(this[J]=ne>>>24,this[J+1]=ne>>>16,this[J+2]=ne>>>8,this[J+3]=ne&255):oe(this,ne,J,!1),J+4};function ae(ie,ne,J,$,le,ce){if(J+$>ie.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("Index out of range")}function be(ie,ne,J,$,le){return le||ae(ie,ne,J,4,34028234663852886e22,-34028234663852886e22),k.write(ie,ne,J,$,23,4),J+4}g.prototype.writeFloatLE=function(ne,J,$){return be(this,ne,J,!0,$)},g.prototype.writeFloatBE=function(ne,J,$){return be(this,ne,J,!1,$)};function _e(ie,ne,J,$,le){return le||ae(ie,ne,J,8,17976931348623157e292,-17976931348623157e292),k.write(ie,ne,J,$,52,8),J+8}g.prototype.writeDoubleLE=function(ne,J,$){return _e(this,ne,J,!0,$)},g.prototype.writeDoubleBE=function(ne,J,$){return _e(this,ne,J,!1,$)},g.prototype.copy=function(ne,J,$,le){if($||($=0),!le&&le!==0&&(le=this.length),J>=ne.length&&(J=ne.length),J||(J=0),le>0&&le<$&&(le=$),le===$)return 0;if(ne.length===0||this.length===0)return 0;if(J<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("sourceStart out of bounds");if(le<0)throw new RangeError("sourceEnd out of bounds");le>this.length&&(le=this.length),ne.length-J<le-$&&(le=ne.length-J+$);var ce=le-$,we;if(this===ne&&$<J&&J<le)for(we=ce-1;we>=0;--we)ne[we+J]=this[we+$];else if(ce<1e3||!g.TYPED_ARRAY_SUPPORT)for(we=0;we<ce;++we)ne[we+J]=this[we+$];else Uint8Array.prototype.set.call(ne,this.subarray($,$+ce),J);return ce},g.prototype.fill=function(ne,J,$,le){if(typeof ne=="string"){if(typeof J=="string"?(le=J,J=0,$=this.length):typeof $=="string"&&(le=$,$=this.length),ne.length===1){var ce=ne.charCodeAt(0);ce<256&&(ne=ce)}if(le!==void 0&&typeof le!="string")throw new TypeError("encoding must be a string");if(typeof le=="string"&&!g.isEncoding(le))throw new TypeError("Unknown encoding: "+le)}else typeof ne=="number"&&(ne=ne&255);if(J<0||this.length<J||this.length<$)throw new RangeError("Out of range index");if($<=J)return this;J=J>>>0,$=$===void 0?this.length:$>>>0,ne||(ne=0);var we;if(typeof ne=="number")for(we=J;we<$;++we)this[we]=ne;else{var Fe=g.isBuffer(ne)?ne:te(new g(ne,le).toString()),Xe=Fe.length;for(we=0;we<$-J;++we)this[we+J]=Fe[we%Xe]}return this};var fe=/[^+\/0-9A-Za-z-_]/g;function Re(ie){if(ie=Oe(ie).replace(fe,""),ie.length<2)return"";for(;ie.length%4!==0;)ie=ie+"=";return ie}function Oe(ie){return ie.trim?ie.trim():ie.replace(/^\s+|\s+$/g,"")}function de(ie){return ie<16?"0"+ie.toString(16):ie.toString(16)}function te(ie,ne){ne=ne||Infinity;for(var J,$=ie.length,le=null,ce=[],we=0;we<$;++we){if(J=ie.charCodeAt(we),J>55295&&J<57344){if(!le){if(J>56319){(ne-=3)>-1&&ce.push(239,191,189);continue}else if(we+1===$){(ne-=3)>-1&&ce.push(239,191,189);continue}le=J;continue}if(J<56320){(ne-=3)>-1&&ce.push(239,191,189),le=J;continue}J=(le-55296<<10|J-56320)+65536}else le&&((ne-=3)>-1&&ce.push(239,191,189));if(le=null,J<128){if((ne-=1)<0)break;ce.push(J)}else if(J<2048){if((ne-=2)<0)break;ce.push(J>>6|192,J&63|128)}else if(J<65536){if((ne-=3)<0)break;ce.push(J>>12|224,J>>6&63|128,J&63|128)}else if(J<1114112){if((ne-=4)<0)break;ce.push(J>>18|240,J>>12&63|128,J>>6&63|128,J&63|128)}else throw new Error("Invalid code point")}return ce}function W(ie){for(var ne=[],J=0;J<ie.length;++J)ne.push(ie.charCodeAt(J)&255);return ne}function Y(ie,ne){for(var J,$,le,ce=[],we=0;we<ie.length&&!((ne-=2)<0);++we)J=ie.charCodeAt(we),$=J>>8,le=J%256,ce.push(le),ce.push($);return ce}function V(ie){return S.toByteArray(Re(ie))}function Q(ie,ne,J,$){for(var le=0;le<$&&!(le+J>=ne.length||le>=ie.length);++le)ne[le+J]=ie[le];return le}function q(ie){return ie!==ie}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},H("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(H,Z,I){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(H,Z,I){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(H,Z,I){/*!
|
|
|
* copy-to - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var N=Array.prototype.slice;Z.exports=g;function g(k,v){if(!(this instanceof g))return new g(k,v);this.src=k,this._withAccess=v}g.prototype.withAccess=function(k){return this._withAccess=k!==!1,this},g.prototype.pick=function(k){return Array.isArray(k)||(k=N.call(arguments)),k.length&&(this.keys=k),this},g.prototype.to=function(k){if(k=k||{},!this.src)return k;var v=this.keys||Object.keys(this.src);if(!this._withAccess){for(var m=0;m<v.length;m++){if(C=v[m],k[C]!==void 0)continue;k[C]=this.src[C]}return k}for(var m=0;m<v.length;m++){var C=v[m];if(!S(k,C))continue;var _=this.src.__lookupGetter__(C),e=this.src.__lookupSetter__(C);_&&k.__defineGetter__(C,_),e&&k.__defineSetter__(C,e),!_&&!e&&(k[C]=this.src[C])}return k},g.prototype.toCover=function(k){for(var v=this.keys||Object.keys(this.src),m=0;m<v.length;m++){var C=v[m];delete k[C];var _=this.src.__lookupGetter__(C),e=this.src.__lookupSetter__(C);_&&k.__defineGetter__(C,_),e&&k.__defineSetter__(C,e),!_&&!e&&(k[C]=this.src[C])}},g.prototype.override=g.prototype.toCover,g.prototype.and=function(k){var v={};return this.to(v),this.src=k,this.to(v),this.src=v,this};function S(k,v){return k[v]===void 0&&k.__lookupGetter__(v)===void 0&&k.__lookupSetter__(v)===void 0}},{}],77:[function(H,Z,I){H("../../modules/es6.string.iterator"),H("../../modules/es6.array.from"),Z.exports=H("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(H,Z,I){var N=H("../../modules/_core"),g=N.JSON||(N.JSON={stringify:JSON.stringify});Z.exports=function(k){return g.stringify.apply(g,arguments)}},{"../../modules/_core":99}],79:[function(H,Z,I){H("../../modules/es6.object.assign"),Z.exports=H("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(H,Z,I){H("../../modules/es6.object.create");var N=H("../../modules/_core").Object;Z.exports=function(S,k){return N.create(S,k)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(H,Z,I){H("../../modules/es6.object.define-property");var N=H("../../modules/_core").Object;Z.exports=function(S,k,v){return N.defineProperty(S,k,v)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(H,Z,I){H("../../modules/es7.object.entries"),Z.exports=H("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(H,Z,I){H("../../modules/es6.object.get-own-property-names");var N=H("../../modules/_core").Object;Z.exports=function(S){return N.getOwnPropertyNames(S)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(H,Z,I){H("../../modules/es6.object.get-prototype-of"),Z.exports=H("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(H,Z,I){H("../../modules/es6.object.keys"),Z.exports=H("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(H,Z,I){H("../modules/es6.object.to-string"),H("../modules/es6.string.iterator"),H("../modules/web.dom.iterable"),H("../modules/es6.promise"),H("../modules/es7.promise.finally"),H("../modules/es7.promise.try"),Z.exports=H("../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(H,Z,I){H("../modules/web.immediate"),Z.exports=H("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(H,Z,I){H("../../modules/es6.string.from-code-point"),Z.exports=H("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(H,Z,I){H("../../modules/es6.function.has-instance"),Z.exports=H("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(H,Z,I){H("../../modules/es6.symbol"),H("../../modules/es6.object.to-string"),H("../../modules/es7.symbol.async-iterator"),H("../../modules/es7.symbol.observable"),Z.exports=H("../../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(H,Z,I){H("../../modules/es6.string.iterator"),H("../../modules/web.dom.iterable"),Z.exports=H("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(H,Z,I){Z.exports=function(N){if(typeof N!="function")throw TypeError(N+" is not a function!");return N}},{}],93:[function(H,Z,I){Z.exports=function(){}},{}],94:[function(H,Z,I){Z.exports=function(N,g,S,k){if(!(N instanceof g)||k!==void 0&&k in N)throw TypeError(S+": incorrect invocation!");return N}},{}],95:[function(H,Z,I){var N=H("./_is-object");Z.exports=function(g){if(!N(g))throw TypeError(g+" is not an object!");return g}},{"./_is-object":119}],96:[function(H,Z,I){var N=H("./_to-iobject"),g=H("./_to-length"),S=H("./_to-absolute-index");Z.exports=function(k){return function(v,m,C){var _=N(v),e=g(_.length),h=S(C,e),r;if(k&&m!=m){for(;e>h;)if(r=_[h++],r!=r)return!0}else for(;e>h;h++)if((k||h in _)&&_[h]===m)return k||h||0;return!k&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(H,Z,I){var N=H("./_cof"),g=H("./_wks")("toStringTag"),S=N(function(){return arguments}())=="Arguments",k=function(v,m){try{return v[m]}catch(C){}};Z.exports=function(v){var m,C,_;return v===void 0?"Undefined":v===null?"Null":typeof(C=k(m=Object(v),g))=="string"?C:S?N(m):(_=N(m))=="Object"&&typeof m.callee=="function"?"Arguments":_}},{"./_cof":98,"./_wks":166}],98:[function(H,Z,I){var N={}.toString;Z.exports=function(g){return N.call(g).slice(8,-1)}},{}],99:[function(H,Z,I){var N=Z.exports={version:"2.6.11"};typeof __e=="number"&&(__e=N)},{}],100:[function(H,Z,I){"use strict";var N=H("./_object-dp"),g=H("./_property-desc");Z.exports=function(S,k,v){k in S?N.f(S,k,g(0,v)):S[k]=v}},{"./_object-dp":132,"./_property-desc":146}],101:[function(H,Z,I){var N=H("./_a-function");Z.exports=function(g,S,k){if(N(g),S===void 0)return g;switch(k){case 1:return function(v){return g.call(S,v)};case 2:return function(v,m){return g.call(S,v,m)};case 3:return function(v,m,C){return g.call(S,v,m,C)}}return function(){return g.apply(S,arguments)}}},{"./_a-function":92}],102:[function(H,Z,I){Z.exports=function(N){if(N==null)throw TypeError("Can't call method on "+N);return N}},{}],103:[function(H,Z,I){Z.exports=!H("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(H,Z,I){var N=H("./_is-object"),g=H("./_global").document,S=N(g)&&N(g.createElement);Z.exports=function(k){return S?g.createElement(k):{}}},{"./_global":110,"./_is-object":119}],105:[function(H,Z,I){Z.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(H,Z,I){var N=H("./_object-keys"),g=H("./_object-gops"),S=H("./_object-pie");Z.exports=function(k){var v=N(k),m=g.f;if(m)for(var C=m(k),_=S.f,e=0,h;C.length>e;)_.call(k,h=C[e++])&&v.push(h);return v}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(H,Z,I){var N=H("./_global"),g=H("./_core"),S=H("./_ctx"),k=H("./_hide"),v=H("./_has"),m="prototype",C=function(_,e,h){var r=_&C.F,c=_&C.G,i=_&C.S,n=_&C.P,l=_&C.B,f=_&C.W,d=c?g:g[e]||(g[e]={}),u=d[m],o=c?N:i?N[e]:(N[e]||{})[m],s,E,b;c&&(h=e);for(s in h){if(E=!r&&o&&o[s]!==void 0,E&&v(d,s))continue;b=E?o[s]:h[s],d[s]=c&&typeof o[s]!="function"?h[s]:l&&E?S(b,N):f&&o[s]==b?function(p){var D=function(R,y,x){if(this instanceof p){switch(arguments.length){case 0:return new p;case 1:return new p(R);case 2:return new p(R,y)}return new p(R,y,x)}return p.apply(this,arguments)};return D[m]=p[m],D}(b):n&&typeof b=="function"?S(Function.call,b):b,n&&((d.virtual||(d.virtual={}))[s]=b,_&C.R&&u&&!u[s]&&k(u,s,b))}};C.F=1,C.G=2,C.S=4,C.P=8,C.B=16,C.W=32,C.U=64,C.R=128,Z.exports=C},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(H,Z,I){Z.exports=function(N){try{return!!N()}catch(g){return!0}}},{}],109:[function(H,Z,I){var N=H("./_ctx"),g=H("./_iter-call"),S=H("./_is-array-iter"),k=H("./_an-object"),v=H("./_to-length"),m=H("./core.get-iterator-method"),C={},_={},I=Z.exports=function(e,h,r,c,i){var n=i?function(){return e}:m(e),l=N(r,c,h?2:1),f=0,d,u,o,s;if(typeof n!="function")throw TypeError(e+" is not iterable!");if(S(n)){for(d=v(e.length);d>f;f++)if(s=h?l(k(u=e[f])[0],u[1]):l(e[f]),s===C||s===_)return s}else for(o=n.call(e);!(u=o.next()).done;)if(s=g(o,l,u.value,h),s===C||s===_)return s};I.BREAK=C,I.RETURN=_},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(H,Z,I){var N=Z.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=N)},{}],111:[function(H,Z,I){var N={}.hasOwnProperty;Z.exports=function(g,S){return N.call(g,S)}},{}],112:[function(H,Z,I){var N=H("./_object-dp"),g=H("./_property-desc");Z.exports=H("./_descriptors")?function(S,k,v){return N.f(S,k,g(1,v))}:function(S,k,v){return S[k]=v,S}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(H,Z,I){var N=H("./_global").document;Z.exports=N&&N.documentElement},{"./_global":110}],114:[function(H,Z,I){Z.exports=!H("./_descriptors")&&!H("./_fails")(function(){return Object.defineProperty(H("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(H,Z,I){Z.exports=function(N,g,S){var k=S===void 0;switch(g.length){case 0:return k?N():N.call(S);case 1:return k?N(g[0]):N.call(S,g[0]);case 2:return k?N(g[0],g[1]):N.call(S,g[0],g[1]);case 3:return k?N(g[0],g[1],g[2]):N.call(S,g[0],g[1],g[2]);case 4:return k?N(g[0],g[1],g[2],g[3]):N.call(S,g[0],g[1],g[2],g[3])}return N.apply(S,g)}},{}],116:[function(H,Z,I){var N=H("./_cof");Z.exports=Object("z").propertyIsEnumerable(0)?Object:function(g){return N(g)=="String"?g.split(""):Object(g)}},{"./_cof":98}],117:[function(H,Z,I){var N=H("./_iterators"),g=H("./_wks")("iterator"),S=Array.prototype;Z.exports=function(k){return k!==void 0&&(N.Array===k||S[g]===k)}},{"./_iterators":125,"./_wks":166}],118:[function(H,Z,I){var N=H("./_cof");Z.exports=Array.isArray||function(S){return N(S)=="Array"}},{"./_cof":98}],119:[function(H,Z,I){Z.exports=function(N){return typeof N=="object"?N!==null:typeof N=="function"}},{}],120:[function(H,Z,I){var N=H("./_an-object");Z.exports=function(g,S,k,v){try{return v?S(N(k)[0],k[1]):S(k)}catch(C){var m=g.return;throw m!==void 0&&N(m.call(g)),C}}},{"./_an-object":95}],121:[function(H,Z,I){"use strict";var N=H("./_object-create"),g=H("./_property-desc"),S=H("./_set-to-string-tag"),k={};H("./_hide")(k,H("./_wks")("iterator"),function(){return this}),Z.exports=function(v,m,C){v.prototype=N(k,{next:g(1,C)}),S(v,m+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(H,Z,I){"use strict";var N=H("./_library"),g=H("./_export"),S=H("./_redefine"),k=H("./_hide"),v=H("./_iterators"),m=H("./_iter-create"),C=H("./_set-to-string-tag"),_=H("./_object-gpo"),e=H("./_wks")("iterator"),h=!([].keys&&"next"in[].keys()),r="@@iterator",c="keys",i="values",n=function(){return this};Z.exports=function(l,f,d,u,o,s,E){m(d,f,u);var b=function(z){if(!h&&z in y)return y[z];switch(z){case c:return function(){return new d(this,z)};case i:return function(){return new d(this,z)}}return function(){return new d(this,z)}},p=f+" Iterator",D=o==i,R=!1,y=l.prototype,x=y[e]||y[r]||o&&y[o],w=x||b(o),T=o?D?b("entries"):w:void 0,F=f=="Array"&&y.entries||x,P,A,X;if(F&&(X=_(F.call(new l)),X!==Object.prototype&&X.next&&(C(X,p,!0),!N&&typeof X[e]!="function"&&k(X,e,n))),D&&x&&x.name!==i&&(R=!0,w=function(){return x.call(this)}),(!N||E)&&(h||R||!y[e])&&k(y,e,w),v[f]=w,v[p]=n,o)if(P={values:D?w:b(i),keys:s?w:b(c),entries:T},E)for(A in P)A in y||S(y,A,P[A]);else g(g.P+g.F*(h||R),f,P);return P}},{"./_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(H,Z,I){var N=H("./_wks")("iterator"),g=!1;try{var S=[7][N]();S.return=function(){g=!0},Array.from(S,function(){throw 2})}catch(k){}Z.exports=function(k,v){if(!v&&!g)return!1;var m=!1;try{var C=[7],_=C[N]();_.next=function(){return{done:m=!0}},C[N]=function(){return _},k(C)}catch(e){}return m}},{"./_wks":166}],124:[function(H,Z,I){Z.exports=function(N,g){return{value:g,done:!!N}}},{}],125:[function(H,Z,I){Z.exports={}},{}],126:[function(H,Z,I){Z.exports=!0},{}],127:[function(H,Z,I){var N=H("./_uid")("meta"),g=H("./_is-object"),S=H("./_has"),k=H("./_object-dp").f,v=0,m=Object.isExtensible||function(){return!0},C=!H("./_fails")(function(){return m(Object.preventExtensions({}))}),_=function(i){k(i,N,{value:{i:"O"+ ++v,w:{}}})},e=function(i,n){if(!g(i))return typeof i=="symbol"?i:(typeof i=="string"?"S":"P")+i;if(!S(i,N)){if(!m(i))return"F";if(!n)return"E";_(i)}return i[N].i},h=function(i,n){if(!S(i,N)){if(!m(i))return!0;if(!n)return!1;_(i)}return i[N].w},r=function(i){return C&&c.NEED&&m(i)&&!S(i,N)&&_(i),i},c=Z.exports={KEY:N,NEED:!1,fastKey:e,getWeak:h,onFreeze:r}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(H,Z,I){var N=H("./_global"),g=H("./_task").set,S=N.MutationObserver||N.WebKitMutationObserver,k=N.process,v=N.Promise,m=H("./_cof")(k)=="process";Z.exports=function(){var C,_,e,h=function(){var n,l;for(m&&(n=k.domain)&&n.exit();C;){l=C.fn,C=C.next;try{l()}catch(f){throw C?e():_=void 0,f}}_=void 0,n&&n.enter()};if(m)e=function(){k.nextTick(h)};else if(S&&!(N.navigator&&N.navigator.standalone)){var r=!0,c=document.createTextNode("");new S(h).observe(c,{characterData:!0}),e=function(){c.data=r=!r}}else if(v&&v.resolve){var i=v.resolve(void 0);e=function(){i.then(h)}}else e=function(){g.call(N,h)};return function(n){var l={fn:n,next:void 0};_&&(_.next=l),C||(C=l,e()),_=l}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(H,Z,I){"use strict";var N=H("./_a-function");function g(S){var k,v;this.promise=new S(function(m,C){if(k!==void 0||v!==void 0)throw TypeError("Bad Promise constructor");k=m,v=C}),this.resolve=N(k),this.reject=N(v)}Z.exports.f=function(S){return new g(S)}},{"./_a-function":92}],130:[function(H,Z,I){"use strict";var N=H("./_descriptors"),g=H("./_object-keys"),S=H("./_object-gops"),k=H("./_object-pie"),v=H("./_to-object"),m=H("./_iobject"),C=Object.assign;Z.exports=!C||H("./_fails")(function(){var _={},e={},h=Symbol(),r="abcdefghijklmnopqrst";return _[h]=7,r.split("").forEach(function(c){e[c]=c}),C({},_)[h]!=7||Object.keys(C({},e)).join("")!=r})?function(e,h){for(var r=v(e),c=arguments.length,i=1,n=S.f,l=k.f;c>i;)for(var f=m(arguments[i++]),d=n?g(f).concat(n(f)):g(f),u=d.length,o=0,s;u>o;)s=d[o++],(!N||l.call(f,s))&&(r[s]=f[s]);return r}:C},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(H,Z,I){var N=H("./_an-object"),g=H("./_object-dps"),S=H("./_enum-bug-keys"),k=H("./_shared-key")("IE_PROTO"),v=function(){},m="prototype",C=function(){var _=H("./_dom-create")("iframe"),e=S.length,h="<",r=">",c;for(_.style.display="none",H("./_html").appendChild(_),_.src="javascript:",c=_.contentWindow.document,c.open(),c.write(h+"script"+r+"document.F=Object"+h+"/script"+r),c.close(),C=c.F;e--;)delete C[m][S[e]];return C()};Z.exports=Object.create||function(e,h){var r;return e!==null?(v[m]=N(e),r=new v,v[m]=null,r[k]=e):r=C(),h===void 0?r:g(r,h)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(H,Z,I){var N=H("./_an-object"),g=H("./_ie8-dom-define"),S=H("./_to-primitive"),k=Object.defineProperty;I.f=H("./_descriptors")?Object.defineProperty:function(m,C,_){if(N(m),C=S(C,!0),N(_),g)try{return k(m,C,_)}catch(e){}if("get"in _||"set"in _)throw TypeError("Accessors not supported!");return"value"in _&&(m[C]=_.value),m}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(H,Z,I){var N=H("./_object-dp"),g=H("./_an-object"),S=H("./_object-keys");Z.exports=H("./_descriptors")?Object.defineProperties:function(v,m){g(v);for(var C=S(m),_=C.length,e=0,h;_>e;)N.f(v,h=C[e++],m[h]);return v}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(H,Z,I){var N=H("./_object-pie"),g=H("./_property-desc"),S=H("./_to-iobject"),k=H("./_to-primitive"),v=H("./_has"),m=H("./_ie8-dom-define"),C=Object.getOwnPropertyDescriptor;I.f=H("./_descriptors")?C:function(e,h){if(e=S(e),h=k(h,!0),m)try{return C(e,h)}catch(r){}if(v(e,h))return g(!N.f.call(e,h),e[h])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(H,Z,I){var N=H("./_to-iobject"),g=H("./_object-gopn").f,S={}.toString,k=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],v=function(m){try{return g(m)}catch(C){return k.slice()}};Z.exports.f=function(C){return k&&S.call(C)=="[object Window]"?v(C):g(N(C))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(H,Z,I){var N=H("./_object-keys-internal"),g=H("./_enum-bug-keys").concat("length","prototype");I.f=Object.getOwnPropertyNames||function(k){return N(k,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(H,Z,I){I.f=Object.getOwnPropertySymbols},{}],138:[function(H,Z,I){var N=H("./_has"),g=H("./_to-object"),S=H("./_shared-key")("IE_PROTO"),k=Object.prototype;Z.exports=Object.getPrototypeOf||function(v){return v=g(v),N(v,S)?v[S]:typeof v.constructor=="function"&&v instanceof v.constructor?v.constructor.prototype:v instanceof Object?k:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(H,Z,I){var N=H("./_has"),g=H("./_to-iobject"),S=H("./_array-includes")(!1),k=H("./_shared-key")("IE_PROTO");Z.exports=function(v,m){var C=g(v),_=0,e=[],h;for(h in C)h!=k&&(N(C,h)&&e.push(h));for(;m.length>_;)N(C,h=m[_++])&&(~S(e,h)||e.push(h));return e}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(H,Z,I){var N=H("./_object-keys-internal"),g=H("./_enum-bug-keys");Z.exports=Object.keys||function(k){return N(k,g)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(H,Z,I){I.f={}.propertyIsEnumerable},{}],142:[function(H,Z,I){var N=H("./_export"),g=H("./_core"),S=H("./_fails");Z.exports=function(k,v){var m=(g.Object||{})[k]||Object[k],C={};C[k]=v(m),N(N.S+N.F*S(function(){m(1)}),"Object",C)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(H,Z,I){var N=H("./_descriptors"),g=H("./_object-keys"),S=H("./_to-iobject"),k=H("./_object-pie").f;Z.exports=function(v){return function(m){for(var C=S(m),_=g(C),e=_.length,h=0,r=[],c;e>h;)c=_[h++],(!N||k.call(C,c))&&r.push(v?[c,C[c]]:C[c]);return r}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(H,Z,I){Z.exports=function(N){try{return{e:!1,v:N()}}catch(g){return{e:!0,v:g}}}},{}],145:[function(H,Z,I){var N=H("./_an-object"),g=H("./_is-object"),S=H("./_new-promise-capability");Z.exports=function(k,v){if(N(k),g(v)&&v.constructor===k)return v;var m=S.f(k),C=m.resolve;return C(v),m.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(H,Z,I){Z.exports=function(N,g){return{enumerable:!(N&1),configurable:!(N&2),writable:!(N&4),value:g}}},{}],147:[function(H,Z,I){var N=H("./_hide");Z.exports=function(g,S,k){for(var v in S)k&&g[v]?g[v]=S[v]:N(g,v,S[v]);return g}},{"./_hide":112}],148:[function(H,Z,I){Z.exports=H("./_hide")},{"./_hide":112}],149:[function(H,Z,I){"use strict";var N=H("./_global"),g=H("./_core"),S=H("./_object-dp"),k=H("./_descriptors"),v=H("./_wks")("species");Z.exports=function(m){var C=typeof g[m]=="function"?g[m]:N[m];k&&C&&!C[v]&&S.f(C,v,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(H,Z,I){var N=H("./_object-dp").f,g=H("./_has"),S=H("./_wks")("toStringTag");Z.exports=function(k,v,m){k&&!g(k=m?k:k.prototype,S)&&N(k,S,{configurable:!0,value:v})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(H,Z,I){var N=H("./_shared")("keys"),g=H("./_uid");Z.exports=function(S){return N[S]||(N[S]=g(S))}},{"./_shared":152,"./_uid":162}],152:[function(H,Z,I){var N=H("./_core"),g=H("./_global"),S="__core-js_shared__",k=g[S]||(g[S]={});(Z.exports=function(v,m){return k[v]||(k[v]=m!==void 0?m:{})})("versions",[]).push({version:N.version,mode:H("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(H,Z,I){var N=H("./_an-object"),g=H("./_a-function"),S=H("./_wks")("species");Z.exports=function(k,v){var m=N(k).constructor,C;return m===void 0||(C=N(m)[S])==null?v:g(C)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(H,Z,I){var N=H("./_to-integer"),g=H("./_defined");Z.exports=function(S){return function(k,v){var m=String(g(k)),C=N(v),_=m.length,e,h;return C<0||C>=_?S?"":void 0:(e=m.charCodeAt(C),e<55296||e>56319||C+1===_||(h=m.charCodeAt(C+1))<56320||h>57343?S?m.charAt(C):e:S?m.slice(C,C+2):(e-55296<<10)+(h-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(H,Z,I){var N=H("./_ctx"),g=H("./_invoke"),S=H("./_html"),k=H("./_dom-create"),v=H("./_global"),m=v.process,C=v.setImmediate,_=v.clearImmediate,e=v.MessageChannel,h=v.Dispatch,r=0,c={},i="onreadystatechange",n,l,f,d=function(){var o=+this;if(c.hasOwnProperty(o)){var s=c[o];delete c[o],s()}},u=function(o){d.call(o.data)};(!C||!_)&&(C=function(s){for(var E=[],b=1;arguments.length>b;)E.push(arguments[b++]);return c[++r]=function(){g(typeof s=="function"?s:Function(s),E)},n(r),r},_=function(s){delete c[s]},H("./_cof")(m)=="process"?n=function(o){m.nextTick(N(d,o,1))}:h&&h.now?n=function(o){h.now(N(d,o,1))}:e?(l=new e,f=l.port2,l.port1.onmessage=u,n=N(f.postMessage,f,1)):v.addEventListener&&typeof postMessage=="function"&&!v.importScripts?(n=function(o){v.postMessage(o+"","*")},v.addEventListener("message",u,!1)):i in k("script")?n=function(o){S.appendChild(k("script"))[i]=function(){S.removeChild(this),d.call(o)}}:n=function(o){setTimeout(N(d,o,1),0)}),Z.exports={set:C,clear:_}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(H,Z,I){var N=H("./_to-integer"),g=Math.max,S=Math.min;Z.exports=function(k,v){return k=N(k),k<0?g(k+v,0):S(k,v)}},{"./_to-integer":157}],157:[function(H,Z,I){var N=Math.ceil,g=Math.floor;Z.exports=function(S){return isNaN(S=+S)?0:(S>0?g:N)(S)}},{}],158:[function(H,Z,I){var N=H("./_iobject"),g=H("./_defined");Z.exports=function(S){return N(g(S))}},{"./_defined":102,"./_iobject":116}],159:[function(H,Z,I){var N=H("./_to-integer"),g=Math.min;Z.exports=function(S){return S>0?g(N(S),9007199254740991):0}},{"./_to-integer":157}],160:[function(H,Z,I){var N=H("./_defined");Z.exports=function(g){return Object(N(g))}},{"./_defined":102}],161:[function(H,Z,I){var N=H("./_is-object");Z.exports=function(g,S){if(!N(g))return g;var k,v;if(S&&typeof(k=g.toString)=="function"&&!N(v=k.call(g)))return v;if(typeof(k=g.valueOf)=="function"&&!N(v=k.call(g)))return v;if(!S&&typeof(k=g.toString)=="function"&&!N(v=k.call(g)))return v;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(H,Z,I){var N=0,g=Math.random();Z.exports=function(S){return"Symbol(".concat(S===void 0?"":S,")_",(++N+g).toString(36))}},{}],163:[function(H,Z,I){var N=H("./_global"),g=N.navigator;Z.exports=g&&g.userAgent||""},{"./_global":110}],164:[function(H,Z,I){var N=H("./_global"),g=H("./_core"),S=H("./_library"),k=H("./_wks-ext"),v=H("./_object-dp").f;Z.exports=function(m){var C=g.Symbol||(g.Symbol=S?{}:N.Symbol||{});m.charAt(0)!="_"&&!(m in C)&&v(C,m,{value:k.f(m)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(H,Z,I){I.f=H("./_wks")},{"./_wks":166}],166:[function(H,Z,I){var N=H("./_shared")("wks"),g=H("./_uid"),S=H("./_global").Symbol,k=typeof S=="function",v=Z.exports=function(m){return N[m]||(N[m]=k&&S[m]||(k?S:g)("Symbol."+m))};v.store=N},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(H,Z,I){var N=H("./_classof"),g=H("./_wks")("iterator"),S=H("./_iterators");Z.exports=H("./_core").getIteratorMethod=function(k){if(k!=null)return k[g]||k["@@iterator"]||S[N(k)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(H,Z,I){"use strict";var N=H("./_ctx"),g=H("./_export"),S=H("./_to-object"),k=H("./_iter-call"),v=H("./_is-array-iter"),m=H("./_to-length"),C=H("./_create-property"),_=H("./core.get-iterator-method");g(g.S+g.F*!H("./_iter-detect")(function(e){Array.from(e)}),"Array",{from:function(h){var r=S(h),c=typeof this=="function"?this:Array,i=arguments.length,n=i>1?arguments[1]:void 0,l=n!==void 0,f=0,d=_(r),u,o,s,E;if(l&&(n=N(n,i>2?arguments[2]:void 0,2)),d!=null&&!(c==Array&&v(d)))for(E=d.call(r),o=new c;!(s=E.next()).done;f++)C(o,f,l?k(E,n,[s.value,f],!0):s.value);else for(u=m(r.length),o=new c(u);u>f;f++)C(o,f,l?n(r[f],f):r[f]);return o.length=f,o}})},{"./_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(H,Z,I){"use strict";var N=H("./_add-to-unscopables"),g=H("./_iter-step"),S=H("./_iterators"),k=H("./_to-iobject");Z.exports=H("./_iter-define")(Array,"Array",function(v,m){this._t=k(v),this._i=0,this._k=m},function(){var v=this._t,m=this._k,C=this._i++;return!v||C>=v.length?(this._t=void 0,g(1)):m=="keys"?g(0,C):m=="values"?g(0,v[C]):g(0,[C,v[C]])},"values"),S.Arguments=S.Array,N("keys"),N("values"),N("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(H,Z,I){"use strict";var N=H("./_is-object"),g=H("./_object-gpo"),S=H("./_wks")("hasInstance"),k=Function.prototype;S in k||H("./_object-dp").f(k,S,{value:function(v){if(typeof this!="function"||!N(v))return!1;if(!N(this.prototype))return v instanceof this;for(;v=g(v);)if(this.prototype===v)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(H,Z,I){var N=H("./_export");N(N.S+N.F,"Object",{assign:H("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(H,Z,I){var N=H("./_export");N(N.S,"Object",{create:H("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(H,Z,I){var N=H("./_export");N(N.S+N.F*!H("./_descriptors"),"Object",{defineProperty:H("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(H,Z,I){H("./_object-sap")("getOwnPropertyNames",function(){return H("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(H,Z,I){var N=H("./_to-object"),g=H("./_object-gpo");H("./_object-sap")("getPrototypeOf",function(){return function(k){return g(N(k))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(H,Z,I){var N=H("./_to-object"),g=H("./_object-keys");H("./_object-sap")("keys",function(){return function(k){return g(N(k))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(H,Z,I){arguments[4][71][0].apply(I,arguments)},{dup:71}],178:[function(H,Z,I){"use strict";var N=H("./_library"),g=H("./_global"),S=H("./_ctx"),k=H("./_classof"),v=H("./_export"),m=H("./_is-object"),C=H("./_a-function"),_=H("./_an-instance"),e=H("./_for-of"),h=H("./_species-constructor"),r=H("./_task").set,c=H("./_microtask")(),i=H("./_new-promise-capability"),n=H("./_perform"),l=H("./_user-agent"),f=H("./_promise-resolve"),d="Promise",u=g.TypeError,o=g.process,s=o&&o.versions,E=s&&s.v8||"",b=g[d],p=k(o)=="process",D=function(){},R,y,x,w,T=y=i.f,F=!!function(){try{var L=b.resolve(1),G=(L.constructor={})[H("./_wks")("species")]=function(ee){ee(D,D)};return(p||typeof PromiseRejectionEvent=="function")&&L.then(D)instanceof G&&E.indexOf("6.6")!==0&&l.indexOf("Chrome/66")===-1}catch(ee){}}(),P=function(L){var G;return m(L)&&typeof(G=L.then)=="function"?G:!1},A=function(L,G){if(L._n)return;L._n=!0;var ee=L._c;c(function(){for(var oe=L._v,ae=L._s==1,be=0,_e=function(fe){var Re=ae?fe.ok:fe.fail,Oe=fe.resolve,de=fe.reject,te=fe.domain,W,Y,V;try{Re?(ae||(L._h==2&&O(L),L._h=1),Re===!0?W=oe:(te&&te.enter(),W=Re(oe),te&&(te.exit(),V=!0)),W===fe.promise?de(u("Promise-chain cycle")):(Y=P(W))?Y.call(W,Oe,de):Oe(W)):de(oe)}catch(Q){te&&!V&&te.exit(),de(Q)}};ee.length>be;)_e(ee[be++]);L._c=[],L._n=!1,G&&!L._h&&X(L)})},X=function(L){r.call(g,function(){var G=L._v,ee=z(L),oe,ae,be;if(ee&&(oe=n(function(){p?o.emit("unhandledRejection",G,L):(ae=g.onunhandledrejection)?ae({promise:L,reason:G}):(be=g.console)&&be.error&&be.error("Unhandled promise rejection",G)}),L._h=p||z(L)?2:1),L._a=void 0,ee&&oe.e)throw oe.v})},z=function(L){return L._h!==1&&(L._a||L._c).length===0},O=function(L){r.call(g,function(){var G;p?o.emit("rejectionHandled",L):(G=g.onrejectionhandled)&&G({promise:L,reason:L._v})})},B=function(L){var G=this;if(G._d)return;G._d=!0,G=G._w||G,G._v=L,G._s=2,G._a||(G._a=G._c.slice()),A(G,!0)},U=function(L){var G=this,ee;if(G._d)return;G._d=!0,G=G._w||G;try{if(G===L)throw u("Promise can't be resolved itself");(ee=P(L))?c(function(){var oe={_w:G,_d:!1};try{ee.call(L,S(U,oe,1),S(B,oe,1))}catch(ae){B.call(oe,ae)}}):(G._v=L,G._s=1,A(G,!1))}catch(oe){B.call({_w:G,_d:!1},oe)}};F||(b=function(G){_(this,b,d,"_h"),C(G),R.call(this);try{G(S(U,this,1),S(B,this,1))}catch(ee){B.call(this,ee)}},R=function(G){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},R.prototype=H("./_redefine-all")(b.prototype,{then:function(G,ee){var oe=T(h(this,b));return oe.ok=typeof G=="function"?G:!0,oe.fail=typeof ee=="function"&&ee,oe.domain=p?o.domain:void 0,this._c.push(oe),this._a&&this._a.push(oe),this._s&&A(this,!1),oe.promise},catch:function(L){return this.then(void 0,L)}}),x=function(){var L=new R;this.promise=L,this.resolve=S(U,L,1),this.reject=S(B,L,1)},i.f=T=function(L){return L===b||L===w?new x(L):y(L)}),v(v.G+v.W+v.F*!F,{Promise:b}),H("./_set-to-string-tag")(b,d),H("./_set-species")(d),w=H("./_core")[d],v(v.S+v.F*!F,d,{reject:function(G){var ee=T(this),oe=ee.reject;return oe(G),ee.promise}}),v(v.S+v.F*(N||!F),d,{resolve:function(G){return f(N&&this===w?b:this,G)}}),v(v.S+v.F*!(F&&H("./_iter-detect")(function(L){b.all(L).catch(D)})),d,{all:function(G){var ee=this,oe=T(ee),ae=oe.resolve,be=oe.reject,_e=n(function(){var fe=[],Re=0,Oe=1;e(G,!1,function(de){var te=Re++,W=!1;fe.push(void 0),Oe++,ee.resolve(de).then(function(Y){if(W)return;W=!0,fe[te]=Y,--Oe||ae(fe)},be)}),--Oe||ae(fe)});return _e.e&&be(_e.v),oe.promise},race:function(G){var ee=this,oe=T(ee),ae=oe.reject,be=n(function(){e(G,!1,function(_e){ee.resolve(_e).then(oe.resolve,ae)})});return be.e&&ae(be.v),oe.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(H,Z,I){var N=H("./_export"),g=H("./_to-absolute-index"),S=String.fromCharCode,k=String.fromCodePoint;N(N.S+N.F*(!!k&&k.length!=1),"String",{fromCodePoint:function(m){for(var C=[],_=arguments.length,e=0,h;_>e;){if(h=+arguments[e++],g(h,1114111)!==h)throw RangeError(h+" is not a valid code point");C.push(h<65536?S(h):S(((h-=65536)>>10)+55296,h%1024+56320))}return C.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(H,Z,I){"use strict";var N=H("./_string-at")(!0);H("./_iter-define")(String,"String",function(g){this._t=String(g),this._i=0},function(){var g=this._t,S=this._i,k;return S>=g.length?{value:void 0,done:!0}:(k=N(g,S),this._i+=k.length,{value:k,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(H,Z,I){"use strict";var N=H("./_global"),g=H("./_has"),S=H("./_descriptors"),k=H("./_export"),v=H("./_redefine"),m=H("./_meta").KEY,C=H("./_fails"),_=H("./_shared"),e=H("./_set-to-string-tag"),h=H("./_uid"),r=H("./_wks"),c=H("./_wks-ext"),i=H("./_wks-define"),n=H("./_enum-keys"),l=H("./_is-array"),f=H("./_an-object"),d=H("./_is-object"),u=H("./_to-object"),o=H("./_to-iobject"),s=H("./_to-primitive"),E=H("./_property-desc"),b=H("./_object-create"),p=H("./_object-gopn-ext"),D=H("./_object-gopd"),R=H("./_object-gops"),y=H("./_object-dp"),x=H("./_object-keys"),w=D.f,T=y.f,F=p.f,P=N.Symbol,A=N.JSON,X=A&&A.stringify,z="prototype",O=r("_hidden"),B=r("toPrimitive"),U={}.propertyIsEnumerable,L=_("symbol-registry"),G=_("symbols"),ee=_("op-symbols"),oe=Object[z],ae=typeof P=="function"&&!!R.f,be=N.QObject,_e=!be||!be[z]||!be[z].findChild,fe=S&&C(function(){return b(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a!=7})?function(ce,we,Fe){var Xe=w(oe,we);Xe&&delete oe[we],T(ce,we,Fe),Xe&&ce!==oe&&T(oe,we,Xe)}:T,Re=function(ce){var we=G[ce]=b(P[z]);return we._k=ce,we},Oe=ae&&typeof P.iterator=="symbol"?function(ce){return typeof ce=="symbol"}:function(ce){return ce instanceof P},de=function(we,Fe,Xe){return we===oe&&de(ee,Fe,Xe),f(we),Fe=s(Fe,!0),f(Xe),g(G,Fe)?(Xe.enumerable?(g(we,O)&&we[O][Fe]&&(we[O][Fe]=!1),Xe=b(Xe,{enumerable:E(0,!1)})):(g(we,O)||T(we,O,E(1,{})),we[O][Fe]=!0),fe(we,Fe,Xe)):T(we,Fe,Xe)},te=function(we,Fe){f(we);for(var Xe=n(Fe=o(Fe)),$e=0,Ye=Xe.length,Ze;Ye>$e;)de(we,Ze=Xe[$e++],Fe[Ze]);return we},W=function(we,Fe){return Fe===void 0?b(we):te(b(we),Fe)},Y=function(we){var Fe=U.call(this,we=s(we,!0));return this===oe&&g(G,we)&&!g(ee,we)?!1:Fe||!g(this,we)||!g(G,we)||g(this,O)&&this[O][we]?Fe:!0},V=function(we,Fe){if(we=o(we),Fe=s(Fe,!0),we===oe&&g(G,Fe)&&!g(ee,Fe))return;var Xe=w(we,Fe);return Xe&&g(G,Fe)&&!(g(we,O)&&we[O][Fe])&&(Xe.enumerable=!0),Xe},Q=function(we){for(var Fe=F(o(we)),Xe=[],$e=0,Ye;Fe.length>$e;)!g(G,Ye=Fe[$e++])&&Ye!=O&&Ye!=m&&Xe.push(Ye);return Xe},q=function(we){for(var Fe=we===oe,Xe=F(Fe?ee:o(we)),$e=[],Ye=0,Ze;Xe.length>Ye;)g(G,Ze=Xe[Ye++])&&(Fe?g(oe,Ze):!0)&&$e.push(G[Ze]);return $e};ae||(P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var we=h(arguments.length>0?arguments[0]:void 0),Fe=function(Xe){this===oe&&Fe.call(ee,Xe),g(this,O)&&g(this[O],we)&&(this[O][we]=!1),fe(this,we,E(1,Xe))};return S&&_e&&fe(oe,we,{configurable:!0,set:Fe}),Re(we)},v(P[z],"toString",function(){return this._k}),D.f=V,y.f=de,H("./_object-gopn").f=p.f=Q,H("./_object-pie").f=Y,R.f=q,S&&!H("./_library")&&v(oe,"propertyIsEnumerable",Y,!0),c.f=function(ce){return Re(r(ce))}),k(k.G+k.W+k.F*!ae,{Symbol:P});for(var ie="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;ie.length>ne;)r(ie[ne++]);for(var J=x(r.store),$=0;J.length>$;)i(J[$++]);k(k.S+k.F*!ae,"Symbol",{for:function(ce){return g(L,ce+="")?L[ce]:L[ce]=P(ce)},keyFor:function(we){if(!Oe(we))throw TypeError(we+" is not a symbol!");for(var Fe in L)if(L[Fe]===we)return Fe},useSetter:function(){_e=!0},useSimple:function(){_e=!1}}),k(k.S+k.F*!ae,"Object",{create:W,defineProperty:de,defineProperties:te,getOwnPropertyDescriptor:V,getOwnPropertyNames:Q,getOwnPropertySymbols:q});var le=C(function(){R.f(1)});k(k.S+k.F*le,"Object",{getOwnPropertySymbols:function(we){return R.f(u(we))}}),A&&k(k.S+k.F*(!ae||C(function(){var ce=P();return X([ce])!="[null]"||X({a:ce})!="{}"||X(Object(ce))!="{}"})),"JSON",{stringify:function(we){for(var Fe=[we],Xe=1,$e,Ye;arguments.length>Xe;)Fe.push(arguments[Xe++]);return Ye=$e=Fe[1],!d($e)&&we===void 0||Oe(we)?void 0:(l($e)||($e=function(Ze,qe){if(typeof Ye=="function"&&(qe=Ye.call(this,Ze,qe)),!Oe(qe))return qe}),Fe[1]=$e,X.apply(A,Fe))}}),P[z][B]||H("./_hide")(P[z],B,P[z].valueOf),e(P,"Symbol"),e(Math,"Math",!0),e(N.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(H,Z,I){var N=H("./_export"),g=H("./_object-to-array")(!0);N(N.S,"Object",{entries:function(k){return g(k)}})},{"./_export":107,"./_object-to-array":143}],183:[function(H,Z,I){"use strict";var N=H("./_export"),g=H("./_core"),S=H("./_global"),k=H("./_species-constructor"),v=H("./_promise-resolve");N(N.P+N.R,"Promise",{finally:function(m){var C=k(this,g.Promise||S.Promise),_=typeof m=="function";return this.then(_?function(e){return v(C,m()).then(function(){return e})}:m,_?function(e){return v(C,m()).then(function(){throw e})}:m)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(H,Z,I){"use strict";var N=H("./_export"),g=H("./_new-promise-capability"),S=H("./_perform");N(N.S,"Promise",{try:function(k){var v=g.f(this),m=S(k);return(m.e?v.reject:v.resolve)(m.v),v.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(H,Z,I){H("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(H,Z,I){H("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(H,Z,I){H("./es6.array.iterator");for(var N=H("./_global"),g=H("./_hide"),S=H("./_iterators"),k=H("./_wks")("toStringTag"),v="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),m=0;m<v.length;m++){var C=v[m],_=N[C],e=_&&_.prototype;e&&!e[k]&&g(e,k,C),S[C]=S.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(H,Z,I){var N=H("./_export"),g=H("./_task");N(N.G+N.B,{setImmediate:g.set,clearImmediate:g.clear})},{"./_export":107,"./_task":155}],189:[function(H,Z,I){(function(N){"use strict";var g=H("babel-runtime/helpers/typeof"),S=k(g);function k(s){return s&&s.__esModule?s:{default:s}}function v(s){return Array.isArray?Array.isArray(s):o(s)==="[object Array]"}I.isArray=v;function m(s){return typeof s=="boolean"}I.isBoolean=m;function C(s){return s===null}I.isNull=C;function _(s){return s==null}I.isNullOrUndefined=_;function e(s){return typeof s=="number"}I.isNumber=e;function h(s){return typeof s=="string"}I.isString=h;function r(s){return(typeof s=="undefined"?"undefined":(0,S.default)(s))==="symbol"}I.isSymbol=r;function c(s){return s===void 0}I.isUndefined=c;function i(s){return o(s)==="[object RegExp]"}I.isRegExp=i;function n(s){return(typeof s=="undefined"?"undefined":(0,S.default)(s))==="object"&&s!==null}I.isObject=n;function l(s){return o(s)==="[object Date]"}I.isDate=l;function f(s){return o(s)==="[object Error]"||s instanceof Error}I.isError=f;function d(s){return typeof s=="function"}I.isFunction=d;function u(s){return s===null||typeof s=="boolean"||typeof s=="number"||typeof s=="string"||(typeof s=="undefined"?"undefined":(0,S.default)(s))==="symbol"||typeof s=="undefined"}I.isPrimitive=u,I.isBuffer=N.isBuffer;function o(s){return Object.prototype.toString.call(s)}}).call(this,{isBuffer:H("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(H,Z,I){"use strict";var N=H("babel-runtime/helpers/typeof"),g=S(N);function S(k){return k&&k.__esModule?k:{default:k}}(function(k){"use strict";var v=function(){var h=/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,c=/[^-+\dA-Z]/g;return function(i,n,l,f){if(arguments.length===1&&e(i)==="string"&&!/\d/.test(i)&&(n=i,i=void 0),i=i||new Date,i instanceof Date||(i=new Date(i)),isNaN(i))throw TypeError("Invalid date");n=String(v.masks[n]||n||v.masks.default);var d=n.slice(0,4);(d==="UTC:"||d==="GMT:")&&(n=n.slice(4),l=!0,d==="GMT:"&&(f=!0));var u=l?"getUTC":"get",o=i[u+"Date"](),s=i[u+"Day"](),E=i[u+"Month"](),b=i[u+"FullYear"](),p=i[u+"Hours"](),D=i[u+"Minutes"](),R=i[u+"Seconds"](),y=i[u+"Milliseconds"](),x=l?0:i.getTimezoneOffset(),w=C(i),T=_(i),F={d:o,dd:m(o),ddd:v.i18n.dayNames[s],dddd:v.i18n.dayNames[s+7],m:E+1,mm:m(E+1),mmm:v.i18n.monthNames[E],mmmm:v.i18n.monthNames[E+12],yy:String(b).slice(2),yyyy:b,h:p%12||12,hh:m(p%12||12),H:p,HH:m(p),M:D,MM:m(D),s:R,ss:m(R),l:m(y,3),L:m(Math.round(y/10)),t:p<12?"a":"p",tt:p<12?"am":"pm",T:p<12?"A":"P",TT:p<12?"AM":"PM",Z:f?"GMT":l?"UTC":(String(i).match(r)||[""]).pop().replace(c,""),o:(x>0?"-":"+")+m(Math.floor(Math.abs(x)/60)*100+Math.abs(x)%60,4),S:["th","st","nd","rd"][o%10>3?0:(o%100-o%10!=10)*o%10],W:w,N:T};return n.replace(h,function(P){return P in F?F[P]:P.slice(1,P.length-1)})}}();v.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"},v.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function m(h,r){for(h=String(h),r=r||2;h.length<r;)h="0"+h;return h}function C(h){var r=new Date(h.getFullYear(),h.getMonth(),h.getDate());r.setDate(r.getDate()-(r.getDay()+6)%7+3);var c=new Date(r.getFullYear(),0,4);c.setDate(c.getDate()-(c.getDay()+6)%7+3);var i=r.getTimezoneOffset()-c.getTimezoneOffset();r.setHours(r.getHours()-i);var n=(r-c)/(864e5*7);return 1+Math.floor(n)}function _(h){var r=h.getDay();return r===0&&(r=7),r}function e(h){return h===null?"null":h===void 0?"undefined":(typeof h=="undefined"?"undefined":(0,g.default)(h))!=="object"?typeof h=="undefined"?"undefined":(0,g.default)(h):Array.isArray(h)?"array":{}.toString.call(h).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return v}):(typeof I=="undefined"?"undefined":(0,g.default)(I))==="object"?Z.exports=v:k.dateFormat=v})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(H,Z,I){/*!
|
|
|
* escape-html
|
|
|
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
|
* Copyright(c) 2015 Andreas Lubbe
|
|
|
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var N=/["'&<>]/;Z.exports=g;function g(S){var k=""+S,v=N.exec(k);if(!v)return k;var m,C="",_=0,e=0;for(_=v.index;_<k.length;_++){switch(k.charCodeAt(_)){case 34:m=""";break;case 38:m="&";break;case 39:m="'";break;case 60:m="<";break;case 62:m=">";break;default:continue}e!==_&&(C+=k.substring(e,_)),e=_+1,C+=m}return e!==_?C+k.substring(e,_):C}},{}],192:[function(H,Z,I){function N(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}Z.exports=N,N.EventEmitter=N,N.prototype._events=void 0,N.prototype._maxListeners=void 0,N.defaultMaxListeners=10,N.prototype.setMaxListeners=function(m){if(!S(m)||m<0||isNaN(m))throw TypeError("n must be a positive number");return this._maxListeners=m,this},N.prototype.emit=function(m){var C,_,e,h,r,c;if(this._events||(this._events={}),m==="error"&&(!this._events.error||k(this._events.error)&&!this._events.error.length)){if(C=arguments[1],C instanceof Error)throw C;var i=new Error('Uncaught, unspecified "error" event. ('+C+")");throw i.context=C,i}if(_=this._events[m],v(_))return!1;if(g(_))switch(arguments.length){case 1:_.call(this);break;case 2:_.call(this,arguments[1]);break;case 3:_.call(this,arguments[1],arguments[2]);break;default:h=Array.prototype.slice.call(arguments,1),_.apply(this,h)}else if(k(_))for(h=Array.prototype.slice.call(arguments,1),c=_.slice(),e=c.length,r=0;r<e;r++)c[r].apply(this,h);return!0},N.prototype.addListener=function(m,C){var _;if(!g(C))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",m,g(C.listener)?C.listener:C),this._events[m]?k(this._events[m])?this._events[m].push(C):this._events[m]=[this._events[m],C]:this._events[m]=C,k(this._events[m])&&!this._events[m].warned&&(v(this._maxListeners)?_=N.defaultMaxListeners:_=this._maxListeners,_&&_>0&&this._events[m].length>_&&(this._events[m].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[m].length),typeof console.trace=="function"&&console.trace())),this},N.prototype.on=N.prototype.addListener,N.prototype.once=function(m,C){if(!g(C))throw TypeError("listener must be a function");var _=!1;function e(){this.removeListener(m,e),_||(_=!0,C.apply(this,arguments))}return e.listener=C,this.on(m,e),this},N.prototype.removeListener=function(m,C){var _,e,h,r;if(!g(C))throw TypeError("listener must be a function");if(!this._events||!this._events[m])return this;if(_=this._events[m],h=_.length,e=-1,_===C||g(_.listener)&&_.listener===C)delete this._events[m],this._events.removeListener&&this.emit("removeListener",m,C);else if(k(_)){for(r=h;r-- >0;)if(_[r]===C||_[r].listener&&_[r].listener===C){e=r;break}if(e<0)return this;_.length===1?(_.length=0,delete this._events[m]):_.splice(e,1),this._events.removeListener&&this.emit("removeListener",m,C)}return this},N.prototype.removeAllListeners=function(m){var C,_;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[m]&&delete this._events[m],this;if(arguments.length===0){for(C in this._events){if(C==="removeListener")continue;this.removeAllListeners(C)}return this.removeAllListeners("removeListener"),this._events={},this}if(_=this._events[m],g(_))this.removeListener(m,_);else if(_)for(;_.length;)this.removeListener(m,_[_.length-1]);return delete this._events[m],this},N.prototype.listeners=function(m){var C;return!this._events||!this._events[m]?C=[]:g(this._events[m])?C=[this._events[m]]:C=this._events[m].slice(),C},N.prototype.listenerCount=function(m){if(this._events){var C=this._events[m];if(g(C))return 1;if(C)return C.length}return 0},N.listenerCount=function(m,C){return m.listenerCount(C)};function g(m){return typeof m=="function"}function S(m){return typeof m=="number"}function k(m){return typeof m=="object"&&m!==null}function v(m){return m===void 0}},{}],193:[function(H,Z,I){var N=H("http"),g=Z.exports;for(var S in N)N.hasOwnProperty(S)&&(g[S]=N[S]);g.request=function(k,v){return k||(k={}),k.scheme="https",k.protocol="https:",N.request.call(this,k,v)}},{http:231}],194:[function(H,Z,I){/*!
|
|
|
* humanize-ms - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var N=H("util"),g=H("ms");Z.exports=function(S){if(typeof S=="number")return S;var k=g(S);if(k===void 0){var v=new Error(N.format("humanize-ms(%j) result undefined",S));console.warn(v.stack)}return k}},{ms:204,util:243}],195:[function(H,Z,I){I.read=function(N,g,S,k,v){var m,C,_=v*8-k-1,e=(1<<_)-1,h=e>>1,r=-7,c=S?v-1:0,i=S?-1:1,n=N[g+c];for(c+=i,m=n&(1<<-r)-1,n>>=-r,r+=_;r>0;m=m*256+N[g+c],c+=i,r-=8);for(C=m&(1<<-r)-1,m>>=-r,r+=k;r>0;C=C*256+N[g+c],c+=i,r-=8);if(m===0)m=1-h;else{if(m===e)return C?NaN:(n?-1:1)*Infinity;C=C+Math.pow(2,k),m=m-h}return(n?-1:1)*C*Math.pow(2,m-k)},I.write=function(N,g,S,k,v,m){var C,_,e,h=m*8-v-1,r=(1<<h)-1,c=r>>1,i=v===23?Math.pow(2,-24)-Math.pow(2,-77):0,n=k?0:m-1,l=k?1:-1,f=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===Infinity?(_=isNaN(g)?1:0,C=r):(C=Math.floor(Math.log(g)/Math.LN2),g*(e=Math.pow(2,-C))<1&&(C--,e*=2),C+c>=1?g+=i/e:g+=i*Math.pow(2,1-c),g*e>=2&&(C++,e/=2),C+c>=r?(_=0,C=r):C+c>=1?(_=(g*e-1)*Math.pow(2,v),C=C+c):(_=g*Math.pow(2,c-1)*Math.pow(2,v),C=0));v>=8;N[S+n]=_&255,n+=l,_/=256,v-=8);for(C=C<<v|_,h+=v;h>0;N[S+n]=C&255,n+=l,C/=256,h-=8);N[S+n-l]|=f*128}},{}],196:[function(H,Z,I){typeof Object.create=="function"?Z.exports=function(g,S){S&&(g.super_=S,g.prototype=Object.create(S.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}))}:Z.exports=function(g,S){if(S){g.super_=S;var k=function(){};k.prototype=S.prototype,g.prototype=new k,g.prototype.constructor=g}}},{}],197:[function(H,Z,I){/*!
|
|
|
* Determine if an object is a Buffer
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
|
* @license MIT
|
|
|
*/Z.exports=function(S){return S!=null&&(N(S)||g(S)||!!S._isBuffer)};function N(S){return!!S.constructor&&typeof S.constructor.isBuffer=="function"&&S.constructor.isBuffer(S)}function g(S){return typeof S.readFloatLE=="function"&&typeof S.slice=="function"&&N(S.slice(0,0))}},{}],198:[function(H,Z,I){var N={}.toString;Z.exports=Array.isArray||function(g){return N.call(g)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(H,Z){typeof exports=="object"&&typeof module!="undefined"?module.exports=Z(H):typeof define=="function"&&define.amd?define(Z):Z(H)})(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(H){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(H){for(var Z={},I=0,N=H.length;I<N;I++)Z[H.charAt(I)]=I;return Z}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(H){if(H.length<2){var Z=H.charCodeAt(0);return Z<128?H: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+(H.charCodeAt(0)-55296)*1024+(H.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(H){return H.replace(re_utob,cb_utob)},cb_encode=function(H){var Z=[0,2,1][H.length%3],I=H.charCodeAt(0)<<16|(H.length>1?H.charCodeAt(1):0)<<8|(H.length>2?H.charCodeAt(2):0),N=[b64chars.charAt(I>>>18),b64chars.charAt(I>>>12&63),Z>=2?"=":b64chars.charAt(I>>>6&63),Z>=1?"=":b64chars.charAt(I&63)];return N.join("")},btoa=global.btoa?function(H){return global.btoa(H)}:function(H){return H.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(H){var Z=Object.prototype.toString.call(H)==="[object Uint8Array]";return Z?H.toString("base64"):btoa(utob(String(H)))},encode=function(H,Z){return Z?_encode(String(H)).replace(/[+\/]/g,function(I){return I=="+"?"-":"_"}).replace(/=/g,""):_encode(H)},encodeURI=function(H){return encode(H,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(H){switch(H.length){case 4:var Z=(7&H.charCodeAt(0))<<18|(63&H.charCodeAt(1))<<12|(63&H.charCodeAt(2))<<6|63&H.charCodeAt(3),I=Z-65536;return fromCharCode((I>>>10)+55296)+fromCharCode((I&1023)+56320);case 3:return fromCharCode((15&H.charCodeAt(0))<<12|(63&H.charCodeAt(1))<<6|63&H.charCodeAt(2));default:return fromCharCode((31&H.charCodeAt(0))<<6|63&H.charCodeAt(1))}},btou=function(H){return H.replace(re_btou,cb_btou)},cb_decode=function(H){var Z=H.length,I=Z%4,N=(Z>0?b64tab[H.charAt(0)]<<18:0)|(Z>1?b64tab[H.charAt(1)]<<12:0)|(Z>2?b64tab[H.charAt(2)]<<6:0)|(Z>3?b64tab[H.charAt(3)]:0),g=[fromCharCode(N>>>16),fromCharCode(N>>>8&255),fromCharCode(N&255)];return g.length-=[0,0,2,1][I],g.join("")},_atob=global.atob?function(H){return global.atob(H)}:function(H){return H.replace(/\S{1,4}/g,cb_decode)},atob=function(H){return _atob(String(H).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(H){return(H.constructor===buffer.constructor?H:buffer.from(H,"base64")).toString()}:function(H){return(H.constructor===buffer.constructor?H:new buffer(H,"base64")).toString()}:function(H){return btou(_atob(H))},decode=function(H){return _decode(String(H).replace(/[-_]/g,function(Z){return Z=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var H=global.Base64;return global.Base64=_Base64,H};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(H){return{value:H,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(H){return encode(this,H)})),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(H,Z,I){/*!
|
|
|
* merge-descriptors
|
|
|
* Copyright(c) 2014 Jonathan Ong
|
|
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
|
* MIT Licensed
|
|
|
*/"use strict";Z.exports=g;var N=Object.prototype.hasOwnProperty;function g(S,k,v){if(!S)throw new TypeError("argument dest is required");if(!k)throw new TypeError("argument src is required");return v===void 0&&(v=!0),Object.getOwnPropertyNames(k).forEach(function(C){if(!v&&N.call(S,C))return;var _=Object.getOwnPropertyDescriptor(k,C);Object.defineProperty(S,C,_)}),S}},{}],201:[function(H,Z,I){"use strict";function N(){this._types=Object.create(null),this._extensions=Object.create(null);for(var g=0;g<arguments.length;g++)this.define(arguments[g]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}N.prototype.define=function(g,S){for(var k in g){var v=g[k].map(function(_){return _.toLowerCase()});k=k.toLowerCase();for(var m=0;m<v.length;m++){var C=v[m];if(C[0]=="*")continue;if(!S&&C in this._types)throw new Error('Attempt to change mapping for "'+C+'" extension from "'+this._types[C]+'" to "'+k+'". Pass `force=true` to allow this, otherwise remove "'+C+'" from the list of extensions for "'+k+'".');this._types[C]=k}if(S||!this._extensions[k]){var C=v[0];this._extensions[k]=C[0]!="*"?C:C.substr(1)}}},N.prototype.getType=function(g){g=String(g);var S=g.replace(/^.*[/\\]/,"").toLowerCase(),k=S.replace(/^.*\./,"").toLowerCase(),v=S.length<g.length,m=k.length<S.length-1;return(m||!v)&&this._types[k]||null},N.prototype.getExtension=function(g){return g=/^\s*([^;\s]*)/.test(g)&&RegExp.$1,g&&this._extensions[g.toLowerCase()]||null},Z.exports=N},{}],202:[function(H,Z,I){"use strict";var N=H("./Mime");Z.exports=new N(H("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(H,Z,I){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(H,Z,I){var N=1e3,g=N*60,S=g*60,k=S*24,v=k*7,m=k*365.25;Z.exports=function(r,c){c=c||{};var i=typeof r;if(i==="string"&&r.length>0)return C(r);if(i==="number"&&isFinite(r))return c.long?e(r):_(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function C(r){if(r=String(r),r.length>100)return;var c=/^(-?(?:\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(!c)return;var i=parseFloat(c[1]),n=(c[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return i*m;case"weeks":case"week":case"w":return i*v;case"days":case"day":case"d":return i*k;case"hours":case"hour":case"hrs":case"hr":case"h":return i*S;case"minutes":case"minute":case"mins":case"min":case"m":return i*g;case"seconds":case"second":case"secs":case"sec":case"s":return i*N;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}function _(r){var c=Math.abs(r);return c>=k?Math.round(r/k)+"d":c>=S?Math.round(r/S)+"h":c>=g?Math.round(r/g)+"m":c>=N?Math.round(r/N)+"s":r+"ms"}function e(r){var c=Math.abs(r);return c>=k?h(r,c,k,"day"):c>=S?h(r,c,S,"hour"):c>=g?h(r,c,g,"minute"):c>=N?h(r,c,N,"second"):r+" ms"}function h(r,c,i,n){var l=c>=i*1.5;return Math.round(r/i)+" "+n+(l?"s":"")}},{}],205:[function(H,Z,I){(function(N){function g(m,C){for(var _=0,e=m.length-1;e>=0;e--){var h=m[e];h==="."?m.splice(e,1):h===".."?(m.splice(e,1),_++):_&&(m.splice(e,1),_--)}if(C)for(;_--;_)m.unshift("..");return m}I.resolve=function(){for(var m="",C=!1,_=arguments.length-1;_>=-1&&!C;_--){var e=_>=0?arguments[_]:N.cwd();if(typeof e!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!e)continue;m=e+"/"+m,C=e.charAt(0)==="/"}return m=g(k(m.split("/"),function(h){return!!h}),!C).join("/"),(C?"/":"")+m||"."},I.normalize=function(m){var C=I.isAbsolute(m),_=v(m,-1)==="/";return m=g(k(m.split("/"),function(e){return!!e}),!C).join("/"),!m&&!C&&(m="."),m&&_&&(m+="/"),(C?"/":"")+m},I.isAbsolute=function(m){return m.charAt(0)==="/"},I.join=function(){var m=Array.prototype.slice.call(arguments,0);return I.normalize(k(m,function(C,_){if(typeof C!="string")throw new TypeError("Arguments to path.join must be strings");return C}).join("/"))},I.relative=function(m,C){m=I.resolve(m).substr(1),C=I.resolve(C).substr(1);function _(l){for(var f=0;f<l.length&&!(l[f]!=="");f++);for(var d=l.length-1;d>=0&&!(l[d]!=="");d--);return f>d?[]:l.slice(f,d-f+1)}for(var e=_(m.split("/")),h=_(C.split("/")),r=Math.min(e.length,h.length),c=r,i=0;i<r;i++)if(e[i]!==h[i]){c=i;break}for(var n=[],i=c;i<e.length;i++)n.push("..");return n=n.concat(h.slice(c)),n.join("/")},I.sep="/",I.delimiter=":",I.dirname=function(m){if(typeof m!="string"&&(m=m+""),m.length===0)return".";for(var C=m.charCodeAt(0),_=C===47,e=-1,h=!0,r=m.length-1;r>=1;--r)if(C=m.charCodeAt(r),C===47){if(!h){e=r;break}}else h=!1;return e===-1?_?"/":".":_&&e===1?"/":m.slice(0,e)};function S(m){typeof m!="string"&&(m=m+"");var C=0,_=-1,e=!0,h;for(h=m.length-1;h>=0;--h)if(m.charCodeAt(h)===47){if(!e){C=h+1;break}}else _===-1&&(e=!1,_=h+1);return _===-1?"":m.slice(C,_)}I.basename=function(m,C){var _=S(m);return C&&_.substr(-1*C.length)===C&&(_=_.substr(0,_.length-C.length)),_},I.extname=function(m){typeof m!="string"&&(m=m+"");for(var C=-1,_=0,e=-1,h=!0,r=0,c=m.length-1;c>=0;--c){var i=m.charCodeAt(c);if(i===47){if(!h){_=c+1;break}continue}e===-1&&(h=!1,e=c+1),i===46?C===-1?C=c:r!==1&&(r=1):C!==-1&&(r=-1)}return C===-1||e===-1||r===0||r===1&&C===e-1&&C===_+1?"":m.slice(C,e)};function k(m,C){if(m.filter)return m.filter(C);for(var _=[],e=0;e<m.length;e++)C(m[e],e,m)&&_.push(m[e]);return _}var v="ab".substr(-1)==="b"?function(m,C,_){return m.substr(C,_)}:function(m,C,_){return C<0&&(C=m.length+C),m.substr(C,_)}}).call(this,H("_process"))},{_process:208}],206:[function(H,Z,I){(function(N){/*!
|
|
|
* Platform.js <https://mths.be/platform>
|
|
|
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
|
|
|
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
|
|
|
* Available under MIT license <https://mths.be/mit>
|
|
|
*/(function(){"use strict";var g={function:!0,object:!0},S=g[typeof window]&&window||this,k=S,v=g[typeof I]&&I,m=g[typeof Z]&&Z&&!Z.nodeType&&Z,C=v&&m&&typeof N=="object"&&N;C&&(C.global===C||C.window===C||C.self===C)&&(S=C);var _=Math.pow(2,53)-1,e=/\bOpera/,h=this,r=Object.prototype,c=r.hasOwnProperty,i=r.toString;function n(y){return y=String(y),y.charAt(0).toUpperCase()+y.slice(1)}function l(y,x,w){var T={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return x&&w&&/^Win/i.test(y)&&!/^Windows Phone /i.test(y)&&(T=T[/[\d.]+$/.exec(y)])&&(y="Windows "+T),y=String(y),x&&w&&(y=y.replace(RegExp(x,"i"),w)),y=d(y.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),y}function f(y,x){var w=-1,T=y?y.length:0;if(typeof T=="number"&&T>-1&&T<=_)for(;++w<T;)x(y[w],w,y);else u(y,x)}function d(y){return y=p(y),/^(?:webOS|i(?:OS|P))/.test(y)?y:n(y)}function u(y,x){for(var w in y)c.call(y,w)&&x(y[w],w,y)}function o(y){return y==null?n(y):i.call(y).slice(8,-1)}function s(y,x){var w=y!=null?typeof y[x]:"number";return!/^(?:boolean|number|string|undefined)$/.test(w)&&(w=="object"?!!y[x]:!0)}function E(y){return String(y).replace(/([ -])(?!$)/g,"$1?")}function b(y,x){var w=null;return f(y,function(T,F){w=x(w,T,F,y)}),w}function p(y){return String(y).replace(/^ +| +$/g,"")}function D(y){var x=S,w=y&&typeof y=="object"&&o(y)!="String";w&&(x=y,y=null);var T=x.navigator||{},F=T.userAgent||"";y||(y=F);var P=w||h==k,A=w?!!T.likeChrome:/\bChrome\b/.test(y)&&!/internal|\n/i.test(i.toString()),X="Object",z=w?X:"ScriptBridgingProxyObject",O=w?X:"Environment",B=w&&x.java?"JavaPackage":o(x.java),U=w?X:"RuntimeObject",L=/\bJava/.test(B)&&x.java,G=L&&o(x.environment)==O,ee=L?"a":"\u03B1",oe=L?"b":"\u03B2",ae=x.document||{},be=x.operamini||x.opera,_e=e.test(_e=w&&be?be["[[Class]]"]:o(be))?_e:be=null,fe,Re=y,Oe=[],de=null,te=y==F,W=te&&be&&typeof be.version=="function"&&be.version(),Y,V=J([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Q=le(["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"]),q=we([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),ie=$({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}}),ne=ce(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function J(Ye){return b(Ye,function(Ze,qe){return Ze||RegExp("\\b"+(qe.pattern||E(qe))+"\\b","i").exec(y)&&(qe.label||qe)})}function $(Ye){return b(Ye,function(Ze,qe,Pe){return Ze||(qe[q]||qe[/^[a-z]+(?: +[a-z]+\b)*/i.exec(q)]||RegExp("\\b"+E(Pe)+"(?:\\b|\\w*\\d)","i").exec(y))&&Pe})}function le(Ye){return b(Ye,function(Ze,qe){return Ze||RegExp("\\b"+(qe.pattern||E(qe))+"\\b","i").exec(y)&&(qe.label||qe)})}function ce(Ye){return b(Ye,function(Ze,qe){var Pe=qe.pattern||E(qe);return!Ze&&(Ze=RegExp("\\b"+Pe+"(?:/[\\d.]+|[ \\w.]*)","i").exec(y))&&(Ze=l(Ze,Pe,qe.label||qe)),Ze})}function we(Ye){return b(Ye,function(Ze,qe){var Pe=qe.pattern||E(qe);return!Ze&&(Ze=RegExp("\\b"+Pe+" *\\d+[.\\w_]*","i").exec(y)||RegExp("\\b"+Pe+" *\\w+-[\\w]*","i").exec(y)||RegExp("\\b"+Pe+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(y))&&((Ze=String(qe.label&&!RegExp(Pe,"i").test(qe.label)?qe.label:Ze).split("/"))[1]&&!/[\d.]+/.test(Ze[0])&&(Ze[0]+=" "+Ze[1]),qe=qe.label||qe,Ze=d(Ze[0].replace(RegExp(Pe,"i"),qe).replace(RegExp("; *(?:"+qe+"[_-])?","i")," ").replace(RegExp("("+qe+")[-_.]?(\\w)","i"),"$1 $2"))),Ze})}function Fe(Ye){return b(Ye,function(Ze,qe){return Ze||(RegExp(qe+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(y)||0)[1]||null})}function Xe(){return this.description||""}if(V&&(V=[V]),ie&&!q&&(q=we([ie])),(fe=/\bGoogle TV\b/.exec(q))&&(q=fe[0]),/\bSimulator\b/i.test(y)&&(q=(q?q+" ":"")+"Simulator"),Q=="Opera Mini"&&/\bOPiOS\b/.test(y)&&Oe.push("running in Turbo/Uncompressed mode"),Q=="IE"&&/\blike iPhone OS\b/.test(y)?(fe=D(y.replace(/like iPhone OS/,"")),ie=fe.manufacturer,q=fe.product):/^iP/.test(q)?(Q||(Q="Safari"),ne="iOS"+((fe=/ OS ([\d_]+)/i.exec(y))?" "+fe[1].replace(/_/g,"."):"")):Q=="Konqueror"&&!/buntu/i.test(ne)?ne="Kubuntu":ie&&ie!="Google"&&(/Chrome/.test(Q)&&!/\bMobile Safari\b/i.test(y)||/\bVita\b/.test(q))||/\bAndroid\b/.test(ne)&&/^Chrome/.test(Q)&&/\bVersion\//i.test(y)?(Q="Android Browser",ne=/\bAndroid\b/.test(ne)?ne:"Android"):Q=="Silk"?(/\bMobi/i.test(y)||(ne="Android",Oe.unshift("desktop mode")),/Accelerated *= *true/i.test(y)&&Oe.unshift("accelerated")):Q=="PaleMoon"&&(fe=/\bFirefox\/([\d.]+)\b/.exec(y))?Oe.push("identifying as Firefox "+fe[1]):Q=="Firefox"&&(fe=/\b(Mobile|Tablet|TV)\b/i.exec(y))?(ne||(ne="Firefox OS"),q||(q=fe[1])):!Q||(fe=!/\bMinefield\b/i.test(y)&&/\b(?:Firefox|Safari)\b/.exec(Q))?(Q&&!q&&/[\/,]|^[^(]+?\)/.test(y.slice(y.indexOf(fe+"/")+8))&&(Q=null),(fe=q||ie||ne)&&(q||ie||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(ne))&&(Q=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(ne)?ne:fe)+" Browser")):Q=="Electron"&&(fe=(/\bChrome\/([\d.]+)\b/.exec(y)||0)[1])&&Oe.push("Chromium "+fe),W||(W=Fe(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",E(Q),"(?:Firefox|Minefield|NetFront)"])),(fe=V=="iCab"&&parseFloat(W)>3&&"WebKit"||/\bOpera\b/.test(Q)&&(/\bOPR\b/.test(y)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(y)&&!/^(?:Trident|EdgeHTML)$/.test(V)&&"WebKit"||!V&&/\bMSIE\b/i.test(y)&&(ne=="Mac OS"?"Tasman":"Trident")||V=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Q)&&"NetFront")&&(V=[fe]),Q=="IE"&&(fe=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(y)||0)[1])?(Q+=" Mobile",ne="Windows Phone "+(/\+$/.test(fe)?fe:fe+".x"),Oe.unshift("desktop mode")):/\bWPDesktop\b/i.test(y)?(Q="IE Mobile",ne="Windows Phone 8.x",Oe.unshift("desktop mode"),W||(W=(/\brv:([\d.]+)/.exec(y)||0)[1])):Q!="IE"&&V=="Trident"&&(fe=/\brv:([\d.]+)/.exec(y))&&(Q&&Oe.push("identifying as "+Q+(W?" "+W:"")),Q="IE",W=fe[1]),te){if(s(x,"global"))if(L&&(fe=L.lang.System,Re=fe.getProperty("os.arch"),ne=ne||fe.getProperty("os.name")+" "+fe.getProperty("os.version")),G){try{W=x.require("ringo/engine").version.join("."),Q="RingoJS"}catch(Ye){(fe=x.system)&&fe.global.system==x.system&&(Q="Narwhal",ne||(ne=fe[0].os||null))}Q||(Q="Rhino")}else typeof x.process=="object"&&!x.process.browser&&(fe=x.process)&&(typeof fe.versions=="object"&&(typeof fe.versions.electron=="string"?(Oe.push("Node "+fe.versions.node),Q="Electron",W=fe.versions.electron):typeof fe.versions.nw=="string"&&(Oe.push("Chromium "+W,"Node "+fe.versions.node),Q="NW.js",W=fe.versions.nw)),Q||(Q="Node.js",Re=fe.arch,ne=fe.platform,W=/[\d.]+/.exec(fe.version),W=W?W[0]:null));else o(fe=x.runtime)==z?(Q="Adobe AIR",ne=fe.flash.system.Capabilities.os):o(fe=x.phantom)==U?(Q="PhantomJS",W=(fe=fe.version||null)&&fe.major+"."+fe.minor+"."+fe.patch):typeof ae.documentMode=="number"&&(fe=/\bTrident\/(\d+)/i.exec(y))?(W=[W,ae.documentMode],(fe=+fe[1]+4)!=W[1]&&(Oe.push("IE "+W[1]+" mode"),V&&(V[1]=""),W[1]=fe),W=Q=="IE"?String(W[1].toFixed(1)):W[0]):typeof ae.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Q)&&(Oe.push("masking as "+Q+" "+W),Q="IE",W="11.0",V=["Trident"],ne="Windows");ne=ne&&d(ne)}if(W&&(fe=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(W)||/(?:alpha|beta)(?: ?\d)?/i.exec(y+";"+(te&&T.appMinorVersion))||/\bMinefield\b/i.test(y)&&"a")&&(de=/b/i.test(fe)?"beta":"alpha",W=W.replace(RegExp(fe+"\\+?$"),"")+(de=="beta"?oe:ee)+(/\d+\+?/.exec(fe)||"")),Q=="Fennec"||Q=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(ne))Q="Firefox Mobile";else if(Q=="Maxthon"&&W)W=W.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(q))q=="Xbox 360"&&(ne=null),q=="Xbox 360"&&/\bIEMobile\b/.test(y)&&Oe.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(Q)||Q&&!q&&!/Browser|Mobi/.test(Q))&&(ne=="Windows CE"||/Mobi/i.test(y)))Q+=" Mobile";else if(Q=="IE"&&te)try{x.external===null&&Oe.unshift("platform preview")}catch(Ye){Oe.unshift("embedded")}else(/\bBlackBerry\b/.test(q)||/\bBB10\b/.test(y))&&(fe=(RegExp(q.replace(/ +/g," *")+"/([.\\d]+)","i").exec(y)||0)[1]||W)?(fe=[fe,/BB10/.test(y)],ne=(fe[1]?(q=null,ie="BlackBerry"):"Device Software")+" "+fe[0],W=null):this!=u&&q!="Wii"&&(te&&be||/Opera/.test(Q)&&/\b(?:MSIE|Firefox)\b/i.test(y)||Q=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(ne)||Q=="IE"&&(ne&&!/^Win/.test(ne)&&W>5.5||/\bWindows XP\b/.test(ne)&&W>8||W==8&&!/\bTrident\b/.test(y)))&&!e.test(fe=D.call(u,y.replace(e,"")+";"))&&fe.name&&(fe="ing as "+fe.name+((fe=fe.version)?" "+fe:""),e.test(Q)?(/\bIE\b/.test(fe)&&ne=="Mac OS"&&(ne=null),fe="identify"+fe):(fe="mask"+fe,_e?Q=d(_e.replace(/([a-z])([A-Z])/g,"$1 $2")):Q="Opera",/\bIE\b/.test(fe)&&(ne=null),te||(W=null)),V=["Presto"],Oe.push(fe));(fe=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(y)||0)[1])&&(fe=[parseFloat(fe.replace(/\.(\d)$/,".0$1")),fe],Q=="Safari"&&fe[1].slice(-1)=="+"?(Q="WebKit Nightly",de="alpha",W=fe[1].slice(0,-1)):(W==fe[1]||W==(fe[2]=(/\bSafari\/([\d.]+\+?)/i.exec(y)||0)[1]))&&(W=null),fe[1]=(/\bChrome\/([\d.]+)/i.exec(y)||0)[1],fe[0]==537.36&&fe[2]==537.36&&parseFloat(fe[1])>=28&&V=="WebKit"&&(V=["Blink"]),!te||!A&&!fe[1]?(V&&(V[1]="like Safari"),fe=(fe=fe[0],fe<400?1:fe<500?2:fe<526?3:fe<533?4:fe<534?"4+":fe<535?5:fe<537?6:fe<538?7:fe<601?8:"8")):(V&&(V[1]="like Chrome"),fe=fe[1]||(fe=fe[0],fe<530?1:fe<532?2:fe<532.05?3:fe<533?4:fe<534.03?5:fe<534.07?6:fe<534.1?7:fe<534.13?8:fe<534.16?9:fe<534.24?10:fe<534.3?11:fe<535.01?12:fe<535.02?"13+":fe<535.07?15:fe<535.11?16:fe<535.19?17:fe<536.05?18:fe<536.1?19:fe<537.01?20:fe<537.11?"21+":fe<537.13?23:fe<537.18?24:fe<537.24?25:fe<537.36?26:V!="Blink"?"27":"28")),V&&(V[1]+=" "+(fe+=typeof fe=="number"?".x":/[.+]/.test(fe)?"":"+")),Q=="Safari"&&(!W||parseInt(W)>45)&&(W=fe)),Q=="Opera"&&(fe=/\bzbov|zvav$/.exec(ne))?(Q+=" ",Oe.unshift("desktop mode"),fe=="zvav"?(Q+="Mini",W=null):Q+="Mobile",ne=ne.replace(RegExp(" *"+fe+"$"),"")):Q=="Safari"&&/\bChrome\b/.exec(V&&V[1])&&(Oe.unshift("desktop mode"),Q="Chrome Mobile",W=null,/\bOS X\b/.test(ne)?(ie="Apple",ne="iOS 4.3+"):ne=null),W&&W.indexOf(fe=/[\d.]+$/.exec(ne))==0&&y.indexOf("/"+fe+"-")>-1&&(ne=p(ne.replace(fe,""))),V&&!/\b(?:Avant|Nook)\b/.test(Q)&&(/Browser|Lunascape|Maxthon/.test(Q)||Q!="Safari"&&/^iOS/.test(ne)&&/\bSafari\b/.test(V[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Q)&&V[1])&&((fe=V[V.length-1])&&Oe.push(fe)),Oe.length&&(Oe=["("+Oe.join("; ")+")"]),ie&&q&&q.indexOf(ie)<0&&Oe.push("on "+ie),q&&Oe.push((/^on /.test(Oe[Oe.length-1])?"":"on ")+q),ne&&(fe=/ ([\d.+]+)$/.exec(ne),Y=fe&&ne.charAt(ne.length-fe[0].length-1)=="/",ne={architecture:32,family:fe&&!Y?ne.replace(fe[0],""):ne,version:fe?fe[1]:null,toString:function(){var Ye=this.version;return this.family+(Ye&&!Y?" "+Ye:"")+(this.architecture==64?" 64-bit":"")}}),(fe=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Re))&&!/\bi686\b/i.test(Re)?(ne&&(ne.architecture=64,ne.family=ne.family.replace(RegExp(" *"+fe),"")),Q&&(/\bWOW64\b/i.test(y)||te&&/\w(?:86|32)$/.test(T.cpuClass||T.platform)&&!/\bWin64; x64\b/i.test(y))&&Oe.unshift("32-bit")):ne&&/^OS X/.test(ne.family)&&Q=="Chrome"&&parseFloat(W)>=39&&(ne.architecture=64),y||(y=null);var $e={};return $e.description=y,$e.layout=V&&V[0],$e.manufacturer=ie,$e.name=Q,$e.prerelease=de,$e.product=q,$e.ua=y,$e.version=Q&&W,$e.os=ne||{architecture:null,family:null,version:null,toString:function(){return"null"}},$e.parse=D,$e.toString=Xe,$e.version&&Oe.unshift(W),$e.name&&Oe.unshift(Q),ne&&Q&&!(ne==String(ne).split(" ")[0]&&(ne==Q.split(" ")[0]||q))&&Oe.push(q?"("+ne+")":"on "+ne),Oe.length&&($e.description=Oe.join(" ")),$e}var R=D();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(S.platform=R,define(function(){return R})):v&&m?u(R,function(y,x){v[x]=y}):S.platform=R}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(H,Z,I){(function(N){"use strict";typeof N=="undefined"||!N.version||N.version.indexOf("v0.")===0||N.version.indexOf("v1.")===0&&N.version.indexOf("v1.8.")!==0?Z.exports={nextTick:g}:Z.exports=N;function g(S,k,v,m){if(typeof S!="function")throw new TypeError('"callback" argument must be a function');var C=arguments.length,_,e;switch(C){case 0:case 1:return N.nextTick(S);case 2:return N.nextTick(function(){S.call(null,k)});case 3:return N.nextTick(function(){S.call(null,k,v)});case 4:return N.nextTick(function(){S.call(null,k,v,m)});default:for(_=new Array(C-1),e=0;e<_.length;)_[e++]=arguments[e];return N.nextTick(function(){S.apply(null,_)})}}}).call(this,H("_process"))},{_process:208}],208:[function(H,Z,I){var N=Z.exports={},g,S;function k(){throw new Error("setTimeout has not been defined")}function v(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?g=setTimeout:g=k}catch(f){g=k}try{typeof clearTimeout=="function"?S=clearTimeout:S=v}catch(f){S=v}})();function m(f){if(g===setTimeout)return setTimeout(f,0);if((g===k||!g)&&setTimeout)return g=setTimeout,setTimeout(f,0);try{return g(f,0)}catch(d){try{return g.call(null,f,0)}catch(u){return g.call(this,f,0)}}}function C(f){if(S===clearTimeout)return clearTimeout(f);if((S===v||!S)&&clearTimeout)return S=clearTimeout,clearTimeout(f);try{return S(f)}catch(d){try{return S.call(null,f)}catch(u){return S.call(this,f)}}}var _=[],e=!1,h,r=-1;function c(){if(!e||!h)return;e=!1,h.length?_=h.concat(_):r=-1,_.length&&i()}function i(){if(e)return;var f=m(c);e=!0;for(var d=_.length;d;){for(h=_,_=[];++r<d;)h&&h[r].run();r=-1,d=_.length}h=null,e=!1,C(f)}N.nextTick=function(f){var d=new Array(arguments.length-1);if(arguments.length>1)for(var u=1;u<arguments.length;u++)d[u-1]=arguments[u];_.push(new n(f,d)),_.length===1&&!e&&m(i)};function n(f,d){this.fun=f,this.array=d}n.prototype.run=function(){this.fun.apply(null,this.array)},N.title="browser",N.browser=!0,N.env={},N.argv=[],N.version="",N.versions={};function l(){}N.on=l,N.addListener=l,N.once=l,N.off=l,N.removeListener=l,N.removeAllListeners=l,N.emit=l,N.prependListener=l,N.prependOnceListener=l,N.listeners=function(f){return[]},N.binding=function(f){throw new Error("process.binding is not supported")},N.cwd=function(){return"/"},N.chdir=function(f){throw new Error("process.chdir is not supported")},N.umask=function(){return 0}},{}],209:[function(H,Z,I){(function(N){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(g){var S=typeof I=="object"&&I&&!I.nodeType&&I,k=typeof Z=="object"&&Z&&!Z.nodeType&&Z,v=typeof N=="object"&&N;(v.global===v||v.window===v||v.self===v)&&(g=v);var m,C=2147483647,_=36,e=1,h=26,r=38,c=700,i=72,n=128,l="-",f=/^xn--/,d=/[^\x20-\x7E]/,u=/[\x2E\u3002\uFF0E\uFF61]/g,o={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},s=_-e,E=Math.floor,b=String.fromCharCode,p;function D(B){throw new RangeError(o[B])}function R(B,U){for(var L=B.length,G=[];L--;)G[L]=U(B[L]);return G}function y(B,U){var L=B.split("@"),G="";L.length>1&&(G=L[0]+"@",B=L[1]),B=B.replace(u,".");var ee=B.split("."),oe=R(ee,U).join(".");return G+oe}function x(B){for(var U=[],L=0,G=B.length,ee,oe;L<G;)ee=B.charCodeAt(L++),ee>=55296&&ee<=56319&&L<G?(oe=B.charCodeAt(L++),(oe&64512)==56320?U.push(((ee&1023)<<10)+(oe&1023)+65536):(U.push(ee),L--)):U.push(ee);return U}function w(B){return R(B,function(U){var L="";return U>65535&&(U-=65536,L+=b(U>>>10&1023|55296),U=56320|U&1023),L+=b(U),L}).join("")}function T(B){return B-48<10?B-22:B-65<26?B-65:B-97<26?B-97:_}function F(B,U){return B+22+75*(B<26)-((U!=0)<<5)}function P(B,U,L){var G=0;for(B=L?E(B/c):B>>1,B+=E(B/U);B>s*h>>1;G+=_)B=E(B/s);return E(G+(s+1)*B/(B+r))}function A(B){var U=[],L=B.length,G,ee=0,oe=n,ae=i,be,_e,fe,Re,Oe,de,te,W,Y;for(be=B.lastIndexOf(l),be<0&&(be=0),_e=0;_e<be;++_e)B.charCodeAt(_e)>=128&&D("not-basic"),U.push(B.charCodeAt(_e));for(fe=be>0?be+1:0;fe<L;){for(Re=ee,Oe=1,de=_;!(fe>=L&&D("invalid-input"),te=T(B.charCodeAt(fe++)),(te>=_||te>E((C-ee)/Oe))&&D("overflow"),ee+=te*Oe,W=de<=ae?e:de>=ae+h?h:de-ae,te<W);de+=_)Y=_-W,Oe>E(C/Y)&&D("overflow"),Oe*=Y;G=U.length+1,ae=P(ee-Re,G,Re==0),E(ee/G)>C-oe&&D("overflow"),oe+=E(ee/G),ee%=G,U.splice(ee++,0,oe)}return w(U)}function X(B){var U,L,G,ee,oe,ae,be,_e,fe,Re,Oe,de=[],te,W,Y,V;for(B=x(B),te=B.length,U=n,L=0,oe=i,ae=0;ae<te;++ae)Oe=B[ae],Oe<128&&de.push(b(Oe));for(G=ee=de.length,ee&&de.push(l);G<te;){for(be=C,ae=0;ae<te;++ae)Oe=B[ae],Oe>=U&&Oe<be&&(be=Oe);for(W=G+1,be-U>E((C-L)/W)&&D("overflow"),L+=(be-U)*W,U=be,ae=0;ae<te;++ae)if(Oe=B[ae],Oe<U&&++L>C&&D("overflow"),Oe==U){for(_e=L,fe=_;!(Re=fe<=oe?e:fe>=oe+h?h:fe-oe,_e<Re);fe+=_)V=_e-Re,Y=_-Re,de.push(b(F(Re+V%Y,0))),_e=E(V/Y);de.push(b(F(_e,0))),oe=P(L,W,G==ee),L=0,++G}++L,++U}return de.join("")}function z(B){return y(B,function(U){return f.test(U)?A(U.slice(4).toLowerCase()):U})}function O(B){return y(B,function(U){return d.test(U)?"xn--"+X(U):U})}if(m={version:"1.4.1",ucs2:{decode:x,encode:w},decode:A,encode:X,toASCII:O,toUnicode:z},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return m});else if(S&&k)if(Z.exports==S)k.exports=m;else for(p in m)m.hasOwnProperty(p)&&(S[p]=m[p]);else g.punycode=m})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(H,Z,I){"use strict";function N(S,k){return Object.prototype.hasOwnProperty.call(S,k)}Z.exports=function(S,k,v,m){k=k||"&",v=v||"=";var C={};if(typeof S!="string"||S.length===0)return C;var _=/\+/g;S=S.split(k);var e=1e3;m&&typeof m.maxKeys=="number"&&(e=m.maxKeys);var h=S.length;e>0&&h>e&&(h=e);for(var r=0;r<h;++r){var c=S[r].replace(_,"%20"),i=c.indexOf(v),n,l,f,d;i>=0?(n=c.substr(0,i),l=c.substr(i+1)):(n=c,l=""),f=decodeURIComponent(n),d=decodeURIComponent(l),N(C,f)?g(C[f])?C[f].push(d):C[f]=[C[f],d]:C[f]=d}return C};var g=Array.isArray||function(S){return Object.prototype.toString.call(S)==="[object Array]"}},{}],211:[function(H,Z,I){"use strict";var N=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return""}};Z.exports=function(v,m,C,_){return m=m||"&",C=C||"=",v===null&&(v=void 0),typeof v=="object"?S(k(v),function(e){var h=encodeURIComponent(N(e))+C;return g(v[e])?S(v[e],function(r){return h+encodeURIComponent(N(r))}).join(m):h+encodeURIComponent(N(v[e]))}).join(m):_?encodeURIComponent(N(_))+C+encodeURIComponent(N(v)):""};var g=Array.isArray||function(v){return Object.prototype.toString.call(v)==="[object Array]"};function S(v,m){if(v.map)return v.map(m);for(var C=[],_=0;_<v.length;_++)C.push(m(v[_],_));return C}var k=Object.keys||function(v){var m=[];for(var C in v)Object.prototype.hasOwnProperty.call(v,C)&&m.push(C);return m}},{}],212:[function(H,Z,I){"use strict";I.decode=I.parse=H("./decode"),I.encode=I.stringify=H("./encode")},{"./decode":210,"./encode":211}],213:[function(H,Z,I){Z.exports=H("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=v(N),S=H("babel-runtime/core-js/object/keys"),k=v(S);function v(d){return d&&d.__esModule?d:{default:d}}var m=H("process-nextick-args"),C=k.default||function(d){var u=[];for(var o in d)u.push(o);return u};Z.exports=n;var _=(0,g.default)(H("core-util-is"));_.inherits=H("inherits");var e=H("./_stream_readable"),h=H("./_stream_writable");_.inherits(n,e);for(var r=C(h.prototype),c=0;c<r.length;c++){var i=r[c];n.prototype[i]||(n.prototype[i]=h.prototype[i])}function n(d){if(!(this instanceof n))return new n(d);e.call(this,d),h.call(this,d),d&&d.readable===!1&&(this.readable=!1),d&&d.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,d&&d.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",l)}Object.defineProperty(n.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function l(){if(this.allowHalfOpen||this._writableState.ended)return;m.nextTick(f,this)}function f(d){d.end()}Object.defineProperty(n.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(u){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=u,this._writableState.destroyed=u}}),n.prototype._destroy=function(d,u){this.push(null),this.end(),m.nextTick(u,d)}},{"./_stream_readable":216,"./_stream_writable":218,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60,"core-util-is":189,inherits:196,"process-nextick-args":207}],215:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=S(N);function S(C){return C&&C.__esModule?C:{default:C}}Z.exports=m;var k=H("./_stream_transform"),v=(0,g.default)(H("core-util-is"));v.inherits=H("inherits"),v.inherits(m,k);function m(C){if(!(this instanceof m))return new m(C);k.call(this,C)}m.prototype._transform=function(C,_,e){e(null,C)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(H,Z,I){(function(N,g){"use strict";var S=H("babel-runtime/core-js/object/get-prototype-of"),k=C(S),v=H("babel-runtime/core-js/object/create"),m=C(v);function C(V){return V&&V.__esModule?V:{default:V}}var _=H("process-nextick-args");Z.exports=x;var e=H("isarray"),h;x.ReadableState=y;var r=H("events").EventEmitter,c=function(Q,q){return Q.listeners(q).length},i=H("./internal/streams/stream"),n=H("safe-buffer").Buffer,l=g.Uint8Array||function(){};function f(V){return n.from(V)}function d(V){return n.isBuffer(V)||V instanceof l}var u=(0,m.default)(H("core-util-is"));u.inherits=H("inherits");var o=H("util"),s=void 0;o&&o.debuglog?s=o.debuglog("stream"):s=function(){};var E=H("./internal/streams/BufferList"),b=H("./internal/streams/destroy"),p;u.inherits(x,i);var D=["error","close","destroy","pause","resume"];function R(V,Q,q){if(typeof V.prependListener=="function")return V.prependListener(Q,q);!V._events||!V._events[Q]?V.on(Q,q):e(V._events[Q])?V._events[Q].unshift(q):V._events[Q]=[q,V._events[Q]]}function y(V,Q){h=h||H("./_stream_duplex"),V=V||{};var q=Q instanceof h;this.objectMode=!!V.objectMode,q&&(this.objectMode=this.objectMode||!!V.readableObjectMode);var ie=V.highWaterMark,ne=V.readableHighWaterMark,J=this.objectMode?16:16*1024;ie||ie===0?this.highWaterMark=ie:q&&(ne||ne===0)?this.highWaterMark=ne:this.highWaterMark=J,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new E,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=V.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,V.encoding&&(p||(p=H("string_decoder/").StringDecoder),this.decoder=new p(V.encoding),this.encoding=V.encoding)}function x(V){if(h=h||H("./_stream_duplex"),!(this instanceof x))return new x(V);this._readableState=new y(V,this),this.readable=!0,V&&(typeof V.read=="function"&&(this._read=V.read),typeof V.destroy=="function"&&(this._destroy=V.destroy)),i.call(this)}Object.defineProperty(x.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Q){if(!this._readableState)return;this._readableState.destroyed=Q}}),x.prototype.destroy=b.destroy,x.prototype._undestroy=b.undestroy,x.prototype._destroy=function(V,Q){this.push(null),Q(V)},x.prototype.push=function(V,Q){var q=this._readableState,ie;return q.objectMode?ie=!0:typeof V=="string"&&(Q=Q||q.defaultEncoding,Q!==q.encoding&&(V=n.from(V,Q),Q=""),ie=!0),w(this,V,Q,!1,ie)},x.prototype.unshift=function(V){return w(this,V,null,!0,!1)};function w(V,Q,q,ie,ne){var J=V._readableState;if(Q===null)J.reading=!1,O(V,J);else{var $;ne||($=F(J,Q)),$?V.emit("error",$):J.objectMode||Q&&Q.length>0?(typeof Q!="string"&&!J.objectMode&&(0,k.default)(Q)!==n.prototype&&(Q=f(Q)),ie?J.endEmitted?V.emit("error",new Error("stream.unshift() after end event")):T(V,J,Q,!0):J.ended?V.emit("error",new Error("stream.push() after EOF")):(J.reading=!1,J.decoder&&!q?(Q=J.decoder.write(Q),J.objectMode||Q.length!==0?T(V,J,Q,!1):L(V,J)):T(V,J,Q,!1))):ie||(J.reading=!1)}return P(J)}function T(V,Q,q,ie){Q.flowing&&Q.length===0&&!Q.sync?(V.emit("data",q),V.read(0)):(Q.length+=Q.objectMode?1:q.length,ie?Q.buffer.unshift(q):Q.buffer.push(q),Q.needReadable&&B(V)),L(V,Q)}function F(V,Q){var q;return!d(Q)&&typeof Q!="string"&&Q!==void 0&&!V.objectMode&&(q=new TypeError("Invalid non-string/buffer chunk")),q}function P(V){return!V.ended&&(V.needReadable||V.length<V.highWaterMark||V.length===0)}x.prototype.isPaused=function(){return this._readableState.flowing===!1},x.prototype.setEncoding=function(V){return p||(p=H("string_decoder/").StringDecoder),this._readableState.decoder=new p(V),this._readableState.encoding=V,this};var A=8388608;function X(V){return V>=A?V=A:(V--,V|=V>>>1,V|=V>>>2,V|=V>>>4,V|=V>>>8,V|=V>>>16,V++),V}function z(V,Q){return V<=0||Q.length===0&&Q.ended?0:Q.objectMode?1:V!==V?Q.flowing&&Q.length?Q.buffer.head.data.length:Q.length:(V>Q.highWaterMark&&(Q.highWaterMark=X(V)),V<=Q.length?V:Q.ended?Q.length:(Q.needReadable=!0,0))}x.prototype.read=function(V){s("read",V),V=parseInt(V,10);var Q=this._readableState,q=V;if(V!==0&&(Q.emittedReadable=!1),V===0&&Q.needReadable&&(Q.length>=Q.highWaterMark||Q.ended))return s("read: emitReadable",Q.length,Q.ended),Q.length===0&&Q.ended?te(this):B(this),null;if(V=z(V,Q),V===0&&Q.ended)return Q.length===0&&te(this),null;var ie=Q.needReadable;s("need readable",ie),(Q.length===0||Q.length-V<Q.highWaterMark)&&(ie=!0,s("length less than watermark",ie)),Q.ended||Q.reading?(ie=!1,s("reading or ended",ie)):ie&&(s("do read"),Q.reading=!0,Q.sync=!0,Q.length===0&&(Q.needReadable=!0),this._read(Q.highWaterMark),Q.sync=!1,Q.reading||(V=z(q,Q)));var ne;return V>0?ne=fe(V,Q):ne=null,ne===null?(Q.needReadable=!0,V=0):Q.length-=V,Q.length===0&&(Q.ended||(Q.needReadable=!0),q!==V&&Q.ended&&te(this)),ne!==null&&this.emit("data",ne),ne};function O(V,Q){if(Q.ended)return;if(Q.decoder){var q=Q.decoder.end();q&&q.length&&(Q.buffer.push(q),Q.length+=Q.objectMode?1:q.length)}Q.ended=!0,B(V)}function B(V){var Q=V._readableState;Q.needReadable=!1,Q.emittedReadable||(s("emitReadable",Q.flowing),Q.emittedReadable=!0,Q.sync?_.nextTick(U,V):U(V))}function U(V){s("emit readable"),V.emit("readable"),_e(V)}function L(V,Q){Q.readingMore||(Q.readingMore=!0,_.nextTick(G,V,Q))}function G(V,Q){for(var q=Q.length;!Q.reading&&!Q.flowing&&!Q.ended&&Q.length<Q.highWaterMark&&!(s("maybeReadMore read 0"),V.read(0),q===Q.length);)q=Q.length;Q.readingMore=!1}x.prototype._read=function(V){this.emit("error",new Error("_read() is not implemented"))},x.prototype.pipe=function(V,Q){var q=this,ie=this._readableState;switch(ie.pipesCount){case 0:ie.pipes=V;break;case 1:ie.pipes=[ie.pipes,V];break;default:ie.pipes.push(V);break}ie.pipesCount+=1,s("pipe count=%d opts=%j",ie.pipesCount,Q);var ne=(!Q||Q.end!==!1)&&V!==N.stdout&&V!==N.stderr,J=ne?le:Pe;ie.endEmitted?_.nextTick(J):q.once("end",J),V.on("unpipe",$);function $(Ie,Je){s("onunpipe"),Ie===q&&(Je&&Je.hasUnpiped===!1&&(Je.hasUnpiped=!0,Fe()))}function le(){s("onend"),V.end()}var ce=ee(q);V.on("drain",ce);var we=!1;function Fe(){s("cleanup"),V.removeListener("close",Ze),V.removeListener("finish",qe),V.removeListener("drain",ce),V.removeListener("error",Ye),V.removeListener("unpipe",$),q.removeListener("end",le),q.removeListener("end",Pe),q.removeListener("data",$e),we=!0,ie.awaitDrain&&(!V._writableState||V._writableState.needDrain)&&ce()}var Xe=!1;q.on("data",$e);function $e(Ie){s("ondata"),Xe=!1;var Je=V.write(Ie);Je===!1&&!Xe&&((ie.pipesCount===1&&ie.pipes===V||ie.pipesCount>1&&Y(ie.pipes,V)!==-1)&&!we&&(s("false write response, pause",q._readableState.awaitDrain),q._readableState.awaitDrain++,Xe=!0),q.pause())}function Ye(Ie){s("onerror",Ie),Pe(),V.removeListener("error",Ye),c(V,"error")===0&&V.emit("error",Ie)}R(V,"error",Ye);function Ze(){V.removeListener("finish",qe),Pe()}V.once("close",Ze);function qe(){s("onfinish"),V.removeListener("close",Ze),Pe()}V.once("finish",qe);function Pe(){s("unpipe"),q.unpipe(V)}return V.emit("pipe",q),ie.flowing||(s("pipe resume"),q.resume()),V};function ee(V){return function(){var Q=V._readableState;s("pipeOnDrain",Q.awaitDrain),Q.awaitDrain&&Q.awaitDrain--,Q.awaitDrain===0&&c(V,"data")&&(Q.flowing=!0,_e(V))}}x.prototype.unpipe=function(V){var Q=this._readableState,q={hasUnpiped:!1};if(Q.pipesCount===0)return this;if(Q.pipesCount===1)return V&&V!==Q.pipes?this:(V||(V=Q.pipes),Q.pipes=null,Q.pipesCount=0,Q.flowing=!1,V&&V.emit("unpipe",this,q),this);if(!V){var ie=Q.pipes,ne=Q.pipesCount;Q.pipes=null,Q.pipesCount=0,Q.flowing=!1;for(var J=0;J<ne;J++)ie[J].emit("unpipe",this,q);return this}var $=Y(Q.pipes,V);return $===-1?this:(Q.pipes.splice($,1),Q.pipesCount-=1,Q.pipesCount===1&&(Q.pipes=Q.pipes[0]),V.emit("unpipe",this,q),this)},x.prototype.on=function(V,Q){var q=i.prototype.on.call(this,V,Q);if(V==="data")this._readableState.flowing!==!1&&this.resume();else if(V==="readable"){var ie=this._readableState;!ie.endEmitted&&!ie.readableListening&&(ie.readableListening=ie.needReadable=!0,ie.emittedReadable=!1,ie.reading?ie.length&&B(this):_.nextTick(oe,this))}return q},x.prototype.addListener=x.prototype.on;function oe(V){s("readable nexttick read 0"),V.read(0)}x.prototype.resume=function(){var V=this._readableState;return V.flowing||(s("resume"),V.flowing=!0,ae(this,V)),this};function ae(V,Q){Q.resumeScheduled||(Q.resumeScheduled=!0,_.nextTick(be,V,Q))}function be(V,Q){Q.reading||(s("resume read 0"),V.read(0)),Q.resumeScheduled=!1,Q.awaitDrain=0,V.emit("resume"),_e(V),Q.flowing&&!Q.reading&&V.read(0)}x.prototype.pause=function(){return s("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(s("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function _e(V){var Q=V._readableState;for(s("flow",Q.flowing);Q.flowing&&V.read()!==null;);}x.prototype.wrap=function(V){var Q=this,q=this._readableState,ie=!1;V.on("end",function(){if(s("wrapped end"),q.decoder&&!q.ended){var $=q.decoder.end();$&&$.length&&Q.push($)}Q.push(null)}),V.on("data",function($){if(s("wrapped data"),q.decoder&&($=q.decoder.write($)),q.objectMode&&$==null)return;if(!q.objectMode&&(!$||!$.length))return;var le=Q.push($);le||(ie=!0,V.pause())});for(var ne in V)this[ne]===void 0&&typeof V[ne]=="function"&&(this[ne]=function($){return function(){return V[$].apply(V,arguments)}}(ne));for(var J=0;J<D.length;J++)V.on(D[J],this.emit.bind(this,D[J]));return this._read=function($){s("wrapped _read",$),ie&&(ie=!1,V.resume())},this},Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),x._fromList=fe;function fe(V,Q){if(Q.length===0)return null;var q;return Q.objectMode?q=Q.buffer.shift():!V||V>=Q.length?(Q.decoder?q=Q.buffer.join(""):Q.buffer.length===1?q=Q.buffer.head.data:q=Q.buffer.concat(Q.length),Q.buffer.clear()):q=Re(V,Q.buffer,Q.decoder),q}function Re(V,Q,q){var ie;return V<Q.head.data.length?(ie=Q.head.data.slice(0,V),Q.head.data=Q.head.data.slice(V)):V===Q.head.data.length?ie=Q.shift():ie=q?Oe(V,Q):de(V,Q),ie}function Oe(V,Q){var q=Q.head,ie=1,ne=q.data;for(V-=ne.length;q=q.next;){var J=q.data,$=V>J.length?J.length:V;if($===J.length?ne+=J:ne+=J.slice(0,V),V-=$,V===0){$===J.length?(++ie,q.next?Q.head=q.next:Q.head=Q.tail=null):(Q.head=q,q.data=J.slice($));break}++ie}return Q.length-=ie,ne}function de(V,Q){var q=n.allocUnsafe(V),ie=Q.head,ne=1;for(ie.data.copy(q),V-=ie.data.length;ie=ie.next;){var J=ie.data,$=V>J.length?J.length:V;if(J.copy(q,q.length-V,0,$),V-=$,V===0){$===J.length?(++ne,ie.next?Q.head=ie.next:Q.head=Q.tail=null):(Q.head=ie,ie.data=J.slice($));break}++ne}return Q.length-=ne,q}function te(V){var Q=V._readableState;if(Q.length>0)throw new Error('"endReadable()" called on non-empty stream');Q.endEmitted||(Q.ended=!0,_.nextTick(W,Q,V))}function W(V,Q){!V.endEmitted&&V.length===0&&(V.endEmitted=!0,Q.readable=!1,Q.emit("end"))}function Y(V,Q){for(var q=0,ie=V.length;q<ie;q++)if(V[q]===Q)return q;return-1}}).call(this,H("_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(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=S(N);function S(h){return h&&h.__esModule?h:{default:h}}Z.exports=C;var k=H("./_stream_duplex"),v=(0,g.default)(H("core-util-is"));v.inherits=H("inherits"),v.inherits(C,k);function m(h,r){var c=this._transformState;c.transforming=!1;var i=c.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));c.writechunk=null,c.writecb=null,r!=null&&this.push(r),i(h);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function C(h){if(!(this instanceof C))return new C(h);k.call(this,h),this._transformState={afterTransform:m.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,h&&(typeof h.transform=="function"&&(this._transform=h.transform),typeof h.flush=="function"&&(this._flush=h.flush)),this.on("prefinish",_)}function _(){var h=this;typeof this._flush=="function"?this._flush(function(r,c){e(h,r,c)}):e(this,null,null)}C.prototype.push=function(h,r){return this._transformState.needTransform=!1,k.prototype.push.call(this,h,r)},C.prototype._transform=function(h,r,c){throw new Error("_transform() is not implemented")},C.prototype._write=function(h,r,c){var i=this._transformState;if(i.writecb=c,i.writechunk=h,i.writeencoding=r,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},C.prototype._read=function(h){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},C.prototype._destroy=function(h,r){var c=this;k.prototype._destroy.call(this,h,function(i){r(i),c.emit("close")})};function e(h,r,c){if(r)return h.emit("error",r);if(c!=null&&h.push(c),h._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(h._transformState.transforming)throw new Error("Calling transform done when still transforming");return h.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(H,Z,I){(function(N,g){"use strict";var S=H("babel-runtime/core-js/object/define-property"),k=i(S),v=H("babel-runtime/core-js/symbol/has-instance"),m=i(v),C=H("babel-runtime/core-js/symbol"),_=i(C),e=H("babel-runtime/core-js/object/create"),h=i(e),r=H("babel-runtime/core-js/set-immediate"),c=i(r);function i(de){return de&&de.__esModule?de:{default:de}}var n=H("process-nextick-args");Z.exports=F;function l(de,te,W){this.chunk=de,this.encoding=te,this.callback=W,this.next=null}function f(de){var te=this;this.next=null,this.entry=null,this.finish=function(){Oe(te,de)}}var d=!N.browser&&["v0.10","v0.9."].indexOf(N.version.slice(0,5))>-1?c.default:n.nextTick,u;F.WritableState=w;var o=(0,h.default)(H("core-util-is"));o.inherits=H("inherits");var s={deprecate:H("util-deprecate")},E=H("./internal/streams/stream"),b=H("safe-buffer").Buffer,p=g.Uint8Array||function(){};function D(de){return b.from(de)}function R(de){return b.isBuffer(de)||de instanceof p}var y=H("./internal/streams/destroy");o.inherits(F,E);function x(){}function w(de,te){u=u||H("./_stream_duplex"),de=de||{};var W=te instanceof u;this.objectMode=!!de.objectMode,W&&(this.objectMode=this.objectMode||!!de.writableObjectMode);var Y=de.highWaterMark,V=de.writableHighWaterMark,Q=this.objectMode?16:16*1024;Y||Y===0?this.highWaterMark=Y:W&&(V||V===0)?this.highWaterMark=V:this.highWaterMark=Q,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 q=de.decodeStrings===!1;this.decodeStrings=!q,this.defaultEncoding=de.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ie){L(te,ie)},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 f(this)}w.prototype.getBuffer=function(){for(var te=this.bufferedRequest,W=[];te;)W.push(te),te=te.next;return W},function(){try{Object.defineProperty(w.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(de){}}();var T;typeof _.default=="function"&&m.default&&typeof Function.prototype[m.default]=="function"?(T=Function.prototype[m.default],(0,k.default)(F,m.default,{value:function(te){return T.call(this,te)?!0:this!==F?!1:te&&te._writableState instanceof w}})):T=function(te){return te instanceof this};function F(de){if(u=u||H("./_stream_duplex"),!T.call(F,this)&&!(this instanceof u))return new F(de);this._writableState=new w(de,this),this.writable=!0,de&&(typeof de.write=="function"&&(this._write=de.write),typeof de.writev=="function"&&(this._writev=de.writev),typeof de.destroy=="function"&&(this._destroy=de.destroy),typeof de.final=="function"&&(this._final=de.final)),E.call(this)}F.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function P(de,te){var W=new Error("write after end");de.emit("error",W),n.nextTick(te,W)}function A(de,te,W,Y){var V=!0,Q=!1;return W===null?Q=new TypeError("May not write null values to stream"):typeof W!="string"&&W!==void 0&&!te.objectMode&&(Q=new TypeError("Invalid non-string/buffer chunk")),Q&&(de.emit("error",Q),n.nextTick(Y,Q),V=!1),V}F.prototype.write=function(de,te,W){var Y=this._writableState,V=!1,Q=!Y.objectMode&&R(de);return Q&&!b.isBuffer(de)&&(de=D(de)),typeof te=="function"&&(W=te,te=null),Q?te="buffer":te||(te=Y.defaultEncoding),typeof W!="function"&&(W=x),Y.ended?P(this,W):(Q||A(this,Y,de,W))&&(Y.pendingcb++,V=z(this,Y,Q,de,te,W)),V},F.prototype.cork=function(){var de=this._writableState;de.corked++},F.prototype.uncork=function(){var de=this._writableState;de.corked&&(de.corked--,!de.writing&&!de.corked&&!de.finished&&!de.bufferProcessing&&de.bufferedRequest&&oe(this,de))},F.prototype.setDefaultEncoding=function(te){if(typeof te=="string"&&(te=te.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((te+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+te);return this._writableState.defaultEncoding=te,this};function X(de,te,W){return!de.objectMode&&de.decodeStrings!==!1&&typeof te=="string"&&(te=b.from(te,W)),te}Object.defineProperty(F.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(de,te,W,Y,V,Q){if(!W){var q=X(te,Y,V);Y!==q&&(W=!0,V="buffer",Y=q)}var ie=te.objectMode?1:Y.length;te.length+=ie;var ne=te.length<te.highWaterMark;if(ne||(te.needDrain=!0),te.writing||te.corked){var J=te.lastBufferedRequest;te.lastBufferedRequest={chunk:Y,encoding:V,isBuf:W,callback:Q,next:null},J?J.next=te.lastBufferedRequest:te.bufferedRequest=te.lastBufferedRequest,te.bufferedRequestCount+=1}else O(de,te,!1,ie,Y,V,Q);return ne}function O(de,te,W,Y,V,Q,q){te.writelen=Y,te.writecb=q,te.writing=!0,te.sync=!0,W?de._writev(V,te.onwrite):de._write(V,Q,te.onwrite),te.sync=!1}function B(de,te,W,Y,V){--te.pendingcb,W?(n.nextTick(V,Y),n.nextTick(fe,de,te),de._writableState.errorEmitted=!0,de.emit("error",Y)):(V(Y),de._writableState.errorEmitted=!0,de.emit("error",Y),fe(de,te))}function U(de){de.writing=!1,de.writecb=null,de.length-=de.writelen,de.writelen=0}function L(de,te){var W=de._writableState,Y=W.sync,V=W.writecb;if(U(W),te)B(de,W,Y,te,V);else{var Q=ae(W);!Q&&!W.corked&&!W.bufferProcessing&&W.bufferedRequest&&oe(de,W),Y?d(G,de,W,Q,V):G(de,W,Q,V)}}function G(de,te,W,Y){W||ee(de,te),te.pendingcb--,Y(),fe(de,te)}function ee(de,te){te.length===0&&te.needDrain&&(te.needDrain=!1,de.emit("drain"))}function oe(de,te){te.bufferProcessing=!0;var W=te.bufferedRequest;if(de._writev&&W&&W.next){var Y=te.bufferedRequestCount,V=new Array(Y),Q=te.corkedRequestsFree;Q.entry=W;for(var q=0,ie=!0;W;)V[q]=W,W.isBuf||(ie=!1),W=W.next,q+=1;V.allBuffers=ie,O(de,te,!0,te.length,V,"",Q.finish),te.pendingcb++,te.lastBufferedRequest=null,Q.next?(te.corkedRequestsFree=Q.next,Q.next=null):te.corkedRequestsFree=new f(te),te.bufferedRequestCount=0}else{for(;W;){var ne=W.chunk,J=W.encoding,$=W.callback,le=te.objectMode?1:ne.length;if(O(de,te,!1,le,ne,J,$),W=W.next,te.bufferedRequestCount--,te.writing)break}W===null&&(te.lastBufferedRequest=null)}te.bufferedRequest=W,te.bufferProcessing=!1}F.prototype._write=function(de,te,W){W(new Error("_write() is not implemented"))},F.prototype._writev=null,F.prototype.end=function(de,te,W){var Y=this._writableState;typeof de=="function"?(W=de,de=null,te=null):typeof te=="function"&&(W=te,te=null),de!=null&&this.write(de,te),Y.corked&&(Y.corked=1,this.uncork()),!Y.ending&&!Y.finished&&Re(this,Y,W)};function ae(de){return de.ending&&de.length===0&&de.bufferedRequest===null&&!de.finished&&!de.writing}function be(de,te){de._final(function(W){te.pendingcb--,W&&de.emit("error",W),te.prefinished=!0,de.emit("prefinish"),fe(de,te)})}function _e(de,te){!te.prefinished&&!te.finalCalled&&(typeof de._final=="function"?(te.pendingcb++,te.finalCalled=!0,n.nextTick(be,de,te)):(te.prefinished=!0,de.emit("prefinish")))}function fe(de,te){var W=ae(te);return W&&(_e(de,te),te.pendingcb===0&&(te.finished=!0,de.emit("finish"))),W}function Re(de,te,W){te.ending=!0,fe(de,te),W&&(te.finished?n.nextTick(W):de.once("finish",W)),te.ended=!0,de.writable=!1}function Oe(de,te,W){var Y=de.entry;for(de.entry=null;Y;){var V=Y.callback;te.pendingcb--,V(W),Y=Y.next}te.corkedRequestsFree?te.corkedRequestsFree.next=de:te.corkedRequestsFree=de}Object.defineProperty(F.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(te){if(!this._writableState)return;this._writableState.destroyed=te}}),F.prototype.destroy=y.destroy,F.prototype._undestroy=y.undestroy,F.prototype._destroy=function(de,te){this.end(),te(de)}}).call(this,H("_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(H,Z,I){"use strict";function N(v,m){if(!(v instanceof m))throw new TypeError("Cannot call a class as a function")}var g=H("safe-buffer").Buffer,S=H("util");function k(v,m,C){v.copy(m,C)}Z.exports=function(){function v(){N(this,v),this.head=null,this.tail=null,this.length=0}return v.prototype.push=function(C){var _={data:C,next:null};this.length>0?this.tail.next=_:this.head=_,this.tail=_,++this.length},v.prototype.unshift=function(C){var _={data:C,next:this.head};this.length===0&&(this.tail=_),this.head=_,++this.length},v.prototype.shift=function(){if(this.length===0)return;var C=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,C},v.prototype.clear=function(){this.head=this.tail=null,this.length=0},v.prototype.join=function(C){if(this.length===0)return"";for(var _=this.head,e=""+_.data;_=_.next;)e+=C+_.data;return e},v.prototype.concat=function(C){if(this.length===0)return g.alloc(0);if(this.length===1)return this.head.data;for(var _=g.allocUnsafe(C>>>0),e=this.head,h=0;e;)k(e.data,_,h),h+=e.data.length,e=e.next;return _},v}(),S&&S.inspect&&S.inspect.custom&&(Z.exports.prototype[S.inspect.custom]=function(){var v=S.inspect({length:this.length});return this.constructor.name+" "+v})},{"safe-buffer":228,util:71}],220:[function(H,Z,I){"use strict";var N=H("process-nextick-args");function g(v,m){var C=this,_=this._readableState&&this._readableState.destroyed,e=this._writableState&&this._writableState.destroyed;return _||e?(m?m(v):v&&(!this._writableState||!this._writableState.errorEmitted)&&N.nextTick(k,this,v),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(v||null,function(h){!m&&h?(N.nextTick(k,C,h),C._writableState&&(C._writableState.errorEmitted=!0)):m&&m(h)}),this)}function S(){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 k(v,m){v.emit("error",m)}Z.exports={destroy:g,undestroy:S}},{"process-nextick-args":207}],221:[function(H,Z,I){"use strict";Z.exports=H("events").EventEmitter},{events:192}],222:[function(H,Z,I){Z.exports=H("./readable").PassThrough},{"./readable":223}],223:[function(H,Z,I){I=Z.exports=H("./lib/_stream_readable.js"),I.Stream=I,I.Readable=I,I.Writable=H("./lib/_stream_writable.js"),I.Duplex=H("./lib/_stream_duplex.js"),I.Transform=H("./lib/_stream_transform.js"),I.PassThrough=H("./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(H,Z,I){Z.exports=H("./readable").Transform},{"./readable":223}],225:[function(H,Z,I){Z.exports=H("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(H,Z,I){var N=function(){return this}()||Function("return this")(),g=N.regeneratorRuntime&&Object.getOwnPropertyNames(N).indexOf("regeneratorRuntime")>=0,S=g&&N.regeneratorRuntime;if(N.regeneratorRuntime=void 0,Z.exports=H("./runtime"),g)N.regeneratorRuntime=S;else try{delete N.regeneratorRuntime}catch(k){N.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(H,Z,I){!function(N){"use strict";var g=Object.prototype,S=g.hasOwnProperty,k,v=typeof Symbol=="function"?Symbol:{},m=v.iterator||"@@iterator",C=v.asyncIterator||"@@asyncIterator",_=v.toStringTag||"@@toStringTag",e=typeof Z=="object",h=N.regeneratorRuntime;if(h){e&&(Z.exports=h);return}h=N.regeneratorRuntime=e?Z.exports:{};function r(z,O,B,U){var L=O&&O.prototype instanceof u?O:u,G=Object.create(L.prototype),ee=new P(U||[]);return G._invoke=x(z,B,ee),G}h.wrap=r;function c(z,O,B){try{return{type:"normal",arg:z.call(O,B)}}catch(U){return{type:"throw",arg:U}}}var i="suspendedStart",n="suspendedYield",l="executing",f="completed",d={};function u(){}function o(){}function s(){}var E={};E[m]=function(){return this};var b=Object.getPrototypeOf,p=b&&b(b(A([])));p&&p!==g&&S.call(p,m)&&(E=p);var D=s.prototype=u.prototype=Object.create(E);o.prototype=D.constructor=s,s.constructor=o,s[_]=o.displayName="GeneratorFunction";function R(z){["next","throw","return"].forEach(function(O){z[O]=function(B){return this._invoke(O,B)}})}h.isGeneratorFunction=function(z){var O=typeof z=="function"&&z.constructor;return O?O===o||(O.displayName||O.name)==="GeneratorFunction":!1},h.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,s):(z.__proto__=s,_ in z||(z[_]="GeneratorFunction")),z.prototype=Object.create(D),z},h.awrap=function(z){return{__await:z}};function y(z){function O(L,G,ee,oe){var ae=c(z[L],z,G);if(ae.type==="throw")oe(ae.arg);else{var be=ae.arg,_e=be.value;return _e&&typeof _e=="object"&&S.call(_e,"__await")?Promise.resolve(_e.__await).then(function(fe){O("next",fe,ee,oe)},function(fe){O("throw",fe,ee,oe)}):Promise.resolve(_e).then(function(fe){be.value=fe,ee(be)},oe)}}var B;function U(L,G){function ee(){return new Promise(function(oe,ae){O(L,G,oe,ae)})}return B=B?B.then(ee,ee):ee()}this._invoke=U}R(y.prototype),y.prototype[C]=function(){return this},h.AsyncIterator=y,h.async=function(z,O,B,U){var L=new y(r(z,O,B,U));return h.isGeneratorFunction(O)?L:L.next().then(function(G){return G.done?G.value:L.next()})};function x(z,O,B){var U=i;return function(G,ee){if(U===l)throw new Error("Generator is already running");if(U===f){if(G==="throw")throw ee;return X()}for(B.method=G,B.arg=ee;;){var oe=B.delegate;if(oe){var ae=w(oe,B);if(ae){if(ae===d)continue;return ae}}if(B.method==="next")B.sent=B._sent=B.arg;else if(B.method==="throw"){if(U===i)throw U=f,B.arg;B.dispatchException(B.arg)}else B.method==="return"&&B.abrupt("return",B.arg);U=l;var be=c(z,O,B);if(be.type==="normal"){if(U=B.done?f:n,be.arg===d)continue;return{value:be.arg,done:B.done}}else be.type==="throw"&&(U=f,B.method="throw",B.arg=be.arg)}}}function w(z,O){var B=z.iterator[O.method];if(B===k){if(O.delegate=null,O.method==="throw"){if(z.iterator.return&&(O.method="return",O.arg=k,w(z,O),O.method==="throw"))return d;O.method="throw",O.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var U=c(B,z.iterator,O.arg);if(U.type==="throw")return O.method="throw",O.arg=U.arg,O.delegate=null,d;var L=U.arg;if(!L)return O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,d;if(L.done)O[z.resultName]=L.value,O.next=z.nextLoc,O.method!=="return"&&(O.method="next",O.arg=k);else return L;return O.delegate=null,d}R(D),D[_]="Generator",D[m]=function(){return this},D.toString=function(){return"[object Generator]"};function T(z){var O={tryLoc:z[0]};1 in z&&(O.catchLoc=z[1]),2 in z&&(O.finallyLoc=z[2],O.afterLoc=z[3]),this.tryEntries.push(O)}function F(z){var O=z.completion||{};O.type="normal",delete O.arg,z.completion=O}function P(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(T,this),this.reset(!0)}h.keys=function(z){var O=[];for(var B in z)O.push(B);return O.reverse(),function U(){for(;O.length;){var L=O.pop();if(L in z)return U.value=L,U.done=!1,U}return U.done=!0,U}};function A(z){if(z){var O=z[m];if(O)return O.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var B=-1,U=function L(){for(;++B<z.length;)if(S.call(z,B))return L.value=z[B],L.done=!1,L;return L.value=k,L.done=!0,L};return U.next=U}}return{next:X}}h.values=A;function X(){return{value:k,done:!0}}P.prototype={constructor:P,reset:function(z){if(this.prev=0,this.next=0,this.sent=this._sent=k,this.done=!1,this.delegate=null,this.method="next",this.arg=k,this.tryEntries.forEach(F),!z)for(var O in this)O.charAt(0)==="t"&&S.call(this,O)&&!isNaN(+O.slice(1))&&(this[O]=k)},stop:function(){this.done=!0;var z=this.tryEntries[0],O=z.completion;if(O.type==="throw")throw O.arg;return this.rval},dispatchException:function(z){if(this.done)throw z;var O=this;function B(ae,be){return G.type="throw",G.arg=z,O.next=ae,be&&(O.method="next",O.arg=k),!!be}for(var U=this.tryEntries.length-1;U>=0;--U){var L=this.tryEntries[U],G=L.completion;if(L.tryLoc==="root")return B("end");if(L.tryLoc<=this.prev){var ee=S.call(L,"catchLoc"),oe=S.call(L,"finallyLoc");if(ee&&oe){if(this.prev<L.catchLoc)return B(L.catchLoc,!0);if(this.prev<L.finallyLoc)return B(L.finallyLoc)}else if(ee){if(this.prev<L.catchLoc)return B(L.catchLoc,!0)}else if(oe){if(this.prev<L.finallyLoc)return B(L.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(z,O){for(var B=this.tryEntries.length-1;B>=0;--B){var U=this.tryEntries[B];if(U.tryLoc<=this.prev&&S.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var L=U;break}}L&&(z==="break"||z==="continue")&&L.tryLoc<=O&&O<=L.finallyLoc&&(L=null);var G=L?L.completion:{};return G.type=z,G.arg=O,L?(this.method="next",this.next=L.finallyLoc,d):this.complete(G)},complete:function(z,O){if(z.type==="throw")throw z.arg;return z.type==="break"||z.type==="continue"?this.next=z.arg:z.type==="return"?(this.rval=this.arg=z.arg,this.method="return",this.next="end"):z.type==="normal"&&O&&(this.next=O),d},finish:function(z){for(var O=this.tryEntries.length-1;O>=0;--O){var B=this.tryEntries[O];if(B.finallyLoc===z)return this.complete(B.completion,B.afterLoc),F(B),d}},catch:function(z){for(var O=this.tryEntries.length-1;O>=0;--O){var B=this.tryEntries[O];if(B.tryLoc===z){var U=B.completion;if(U.type==="throw"){var L=U.arg;F(B)}return L}}throw new Error("illegal catch attempt")},delegateYield:function(z,O,B){return this.delegate={iterator:A(z),resultName:O,nextLoc:B},this.method==="next"&&(this.arg=k),d}}}(function(){return this}()||Function("return this")())},{}],228:[function(H,Z,I){var N=H("buffer"),g=N.Buffer;function S(v,m){for(var C in v)m[C]=v[C]}g.from&&g.alloc&&g.allocUnsafe&&g.allocUnsafeSlow?Z.exports=N:(S(N,I),I.Buffer=k);function k(v,m,C){return g(v,m,C)}S(g,k),k.from=function(v,m,C){if(typeof v=="number")throw new TypeError("Argument must not be a number");return g(v,m,C)},k.alloc=function(v,m,C){if(typeof v!="number")throw new TypeError("Argument must be a number");var _=g(v);return m!==void 0?typeof C=="string"?_.fill(m,C):_.fill(m):_.fill(0),_},k.allocUnsafe=function(v){if(typeof v!="number")throw new TypeError("Argument must be a number");return g(v)},k.allocUnsafeSlow=function(v){if(typeof v!="number")throw new TypeError("Argument must be a number");return N.SlowBuffer(v)}},{buffer:73}],229:[function(H,Z,I){(function(N){"use strict";var g=H("babel-runtime/core-js/string/from-code-point"),S=n(g),k=H("babel-runtime/core-js/json/stringify"),v=n(k),m=H("babel-runtime/helpers/typeof"),C=n(m),_=H("babel-runtime/core-js/object/define-property"),e=n(_),h=H("babel-runtime/core-js/object/keys"),r=n(h),c=H("babel-runtime/core-js/object/create"),i=n(c);function n(l){return l&&l.__esModule?l:{default:l}}(function(l){l.parser=function(J,$){return new d(J,$)},l.SAXParser=d,l.SAXStream=D,l.createStream=p,l.MAX_BUFFER_LENGTH=64*1024;var f=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];l.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function d(J,$){if(!(this instanceof d))return new d(J,$);var le=this;o(le),le.q=le.c="",le.bufferCheckPosition=l.MAX_BUFFER_LENGTH,le.opt=$||{},le.opt.lowercase=le.opt.lowercase||le.opt.lowercasetags,le.looseCase=le.opt.lowercase?"toLowerCase":"toUpperCase",le.tags=[],le.closed=le.closedRoot=le.sawRoot=!1,le.tag=le.error=null,le.strict=!!J,le.noscript=!!(J||le.opt.noscript),le.state=G.BEGIN,le.strictEntities=le.opt.strictEntities,le.ENTITIES=le.strictEntities?(0,i.default)(l.XML_ENTITIES):(0,i.default)(l.ENTITIES),le.attribList=[],le.opt.xmlns&&(le.ns=(0,i.default)(T)),le.trackPosition=le.opt.position!==!1,le.trackPosition&&(le.position=le.line=le.column=0),oe(le,"onready")}i.default||(Object.create=function(J){function $(){}$.prototype=J;var le=new $;return le}),r.default||(Object.keys=function(J){var $=[];for(var le in J)J.hasOwnProperty(le)&&$.push(le);return $});function u(J){for(var $=Math.max(l.MAX_BUFFER_LENGTH,10),le=0,ce=0,we=f.length;ce<we;ce++){var Fe=J[f[ce]].length;if(Fe>$)switch(f[ce]){case"textNode":be(J);break;case"cdata":ae(J,"oncdata",J.cdata),J.cdata="";break;case"script":ae(J,"onscript",J.script),J.script="";break;default:fe(J,"Max buffer length exceeded: "+f[ce])}le=Math.max(le,Fe)}var Xe=l.MAX_BUFFER_LENGTH-le;J.bufferCheckPosition=Xe+J.position}function o(J){for(var $=0,le=f.length;$<le;$++)J[f[$]]=""}function s(J){be(J),J.cdata!==""&&(ae(J,"oncdata",J.cdata),J.cdata=""),J.script!==""&&(ae(J,"onscript",J.script),J.script="")}d.prototype={end:function(){Re(this)},write:ne,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){s(this)}};var E;try{E=H("stream").Stream}catch(J){E=function(){}}var b=l.EVENTS.filter(function(J){return J!=="error"&&J!=="end"});function p(J,$){return new D(J,$)}function D(J,$){if(!(this instanceof D))return new D(J,$);E.apply(this),this._parser=new d(J,$),this.writable=!0,this.readable=!0;var le=this;this._parser.onend=function(){le.emit("end")},this._parser.onerror=function(ce){le.emit("error",ce),le._parser.error=null},this._decoder=null,b.forEach(function(ce){(0,e.default)(le,"on"+ce,{get:function(){return le._parser["on"+ce]},set:function(Fe){if(!Fe)return le.removeAllListeners(ce),le._parser["on"+ce]=Fe,Fe;le.on(ce,Fe)},enumerable:!0,configurable:!1})})}D.prototype=(0,i.default)(E.prototype,{constructor:{value:D}}),D.prototype.write=function(J){if(typeof N=="function"&&typeof N.isBuffer=="function"&&N.isBuffer(J)){if(!this._decoder){var $=H("string_decoder").StringDecoder;this._decoder=new $("utf8")}J=this._decoder.write(J)}return this._parser.write(J.toString()),this.emit("data",J),!0},D.prototype.end=function(J){return J&&J.length&&this.write(J),this._parser.end(),!0},D.prototype.on=function(J,$){var le=this;return!le._parser["on"+J]&&b.indexOf(J)!==-1&&(le._parser["on"+J]=function(){var ce=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);ce.splice(0,0,J),le.emit.apply(le,ce)}),E.prototype.on.call(le,J,$)};var R="[CDATA[",y="DOCTYPE",x="http://www.w3.org/XML/1998/namespace",w="http://www.w3.org/2000/xmlns/",T={xml:x,xmlns:w},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]/,P=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,A=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,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 z(J){return J===" "||J===`
|
|
|
`||J==="\r"||J===" "}function O(J){return J==='"'||J==="'"}function B(J){return J===">"||z(J)}function U(J,$){return J.test($)}function L(J,$){return!U(J,$)}var G=0;l.STATE={BEGIN:G++,BEGIN_WHITESPACE:G++,TEXT:G++,TEXT_ENTITY:G++,OPEN_WAKA:G++,SGML_DECL:G++,SGML_DECL_QUOTED:G++,DOCTYPE:G++,DOCTYPE_QUOTED:G++,DOCTYPE_DTD:G++,DOCTYPE_DTD_QUOTED:G++,COMMENT_STARTING:G++,COMMENT:G++,COMMENT_ENDING:G++,COMMENT_ENDED:G++,CDATA:G++,CDATA_ENDING:G++,CDATA_ENDING_2:G++,PROC_INST:G++,PROC_INST_BODY:G++,PROC_INST_ENDING:G++,OPEN_TAG:G++,OPEN_TAG_SLASH:G++,ATTRIB:G++,ATTRIB_NAME:G++,ATTRIB_NAME_SAW_WHITE:G++,ATTRIB_VALUE:G++,ATTRIB_VALUE_QUOTED:G++,ATTRIB_VALUE_CLOSED:G++,ATTRIB_VALUE_UNQUOTED:G++,ATTRIB_VALUE_ENTITY_Q:G++,ATTRIB_VALUE_ENTITY_U:G++,CLOSE_TAG:G++,CLOSE_TAG_SAW_WHITE:G++,SCRIPT:G++,SCRIPT_ENDING:G++},l.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},l.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)(l.ENTITIES).forEach(function(J){var $=l.ENTITIES[J],le=typeof $=="number"?String.fromCharCode($):$;l.ENTITIES[J]=le});for(var ee in l.STATE)l.STATE[l.STATE[ee]]=ee;G=l.STATE;function oe(J,$,le){J[$]&&J[$](le)}function ae(J,$,le){J.textNode&&be(J),oe(J,$,le)}function be(J){J.textNode=_e(J.opt,J.textNode),J.textNode&&oe(J,"ontext",J.textNode),J.textNode=""}function _e(J,$){return J.trim&&($=$.trim()),J.normalize&&($=$.replace(/\s+/g," ")),$}function fe(J,$){return be(J),J.trackPosition&&($+=`
|
|
|
Line: `+J.line+`
|
|
|
Column: `+J.column+`
|
|
|
Char: `+J.c),$=new Error($),J.error=$,oe(J,"onerror",$),J}function Re(J){return J.sawRoot&&!J.closedRoot&&Oe(J,"Unclosed root tag"),J.state!==G.BEGIN&&J.state!==G.BEGIN_WHITESPACE&&J.state!==G.TEXT&&fe(J,"Unexpected end"),be(J),J.c="",J.closed=!0,oe(J,"onend"),d.call(J,J.strict,J.opt),J}function Oe(J,$){if((typeof J=="undefined"?"undefined":(0,C.default)(J))!=="object"||!(J instanceof d))throw new Error("bad call to strictFail");J.strict&&fe(J,$)}function de(J){J.strict||(J.tagName=J.tagName[J.looseCase]());var $=J.tags[J.tags.length-1]||J,le=J.tag={name:J.tagName,attributes:{}};J.opt.xmlns&&(le.ns=$.ns),J.attribList.length=0,ae(J,"onopentagstart",le)}function te(J,$){var le=J.indexOf(":"),ce=le<0?["",J]:J.split(":"),we=ce[0],Fe=ce[1];return $&&J==="xmlns"&&(we="xmlns",Fe=""),{prefix:we,local:Fe}}function W(J){if(J.strict||(J.attribName=J.attribName[J.looseCase]()),J.attribList.indexOf(J.attribName)!==-1||J.tag.attributes.hasOwnProperty(J.attribName)){J.attribName=J.attribValue="";return}if(J.opt.xmlns){var $=te(J.attribName,!0),le=$.prefix,ce=$.local;if(le==="xmlns")if(ce==="xml"&&J.attribValue!==x)Oe(J,"xml: prefix must be bound to "+x+`
|
|
|
Actual: `+J.attribValue);else if(ce==="xmlns"&&J.attribValue!==w)Oe(J,"xmlns: prefix must be bound to "+w+`
|
|
|
Actual: `+J.attribValue);else{var we=J.tag,Fe=J.tags[J.tags.length-1]||J;we.ns===Fe.ns&&(we.ns=(0,i.default)(Fe.ns)),we.ns[ce]=J.attribValue}J.attribList.push([J.attribName,J.attribValue])}else J.tag.attributes[J.attribName]=J.attribValue,ae(J,"onattribute",{name:J.attribName,value:J.attribValue});J.attribName=J.attribValue=""}function Y(J,$){if(J.opt.xmlns){var le=J.tag,ce=te(J.tagName);le.prefix=ce.prefix,le.local=ce.local,le.uri=le.ns[ce.prefix]||"",le.prefix&&!le.uri&&(Oe(J,"Unbound namespace prefix: "+(0,v.default)(J.tagName)),le.uri=ce.prefix);var we=J.tags[J.tags.length-1]||J;le.ns&&we.ns!==le.ns&&(0,r.default)(le.ns).forEach(function(ye){ae(J,"onopennamespace",{prefix:ye,uri:le.ns[ye]})});for(var Fe=0,Xe=J.attribList.length;Fe<Xe;Fe++){var $e=J.attribList[Fe],Ye=$e[0],Ze=$e[1],qe=te(Ye,!0),Pe=qe.prefix,Ie=qe.local,Je=Pe===""?"":le.ns[Pe]||"",rt={name:Ye,value:Ze,prefix:Pe,local:Ie,uri:Je};Pe&&Pe!=="xmlns"&&!Je&&(Oe(J,"Unbound namespace prefix: "+(0,v.default)(Pe)),rt.uri=Pe),J.tag.attributes[Ye]=rt,ae(J,"onattribute",rt)}J.attribList.length=0}J.tag.isSelfClosing=!!$,J.sawRoot=!0,J.tags.push(J.tag),ae(J,"onopentag",J.tag),$||(!J.noscript&&J.tagName.toLowerCase()==="script"?J.state=G.SCRIPT:J.state=G.TEXT,J.tag=null,J.tagName=""),J.attribName=J.attribValue="",J.attribList.length=0}function V(J){if(!J.tagName){Oe(J,"Weird empty close tag."),J.textNode+="</>",J.state=G.TEXT;return}if(J.script){if(J.tagName!=="script"){J.script+="</"+J.tagName+">",J.tagName="",J.state=G.SCRIPT;return}ae(J,"onscript",J.script),J.script=""}var $=J.tags.length,le=J.tagName;J.strict||(le=le[J.looseCase]());for(var ce=le;$--;){var we=J.tags[$];if(we.name!==ce)Oe(J,"Unexpected close tag");else break}if($<0){Oe(J,"Unmatched closing tag: "+J.tagName),J.textNode+="</"+J.tagName+">",J.state=G.TEXT;return}J.tagName=le;for(var Fe=J.tags.length;Fe-- >$;){var Xe=J.tag=J.tags.pop();J.tagName=J.tag.name,ae(J,"onclosetag",J.tagName);var $e={};for(var Ye in Xe.ns)$e[Ye]=Xe.ns[Ye];var Ze=J.tags[J.tags.length-1]||J;J.opt.xmlns&&Xe.ns!==Ze.ns&&(0,r.default)(Xe.ns).forEach(function(qe){var Pe=Xe.ns[qe];ae(J,"onclosenamespace",{prefix:qe,uri:Pe})})}$===0&&(J.closedRoot=!0),J.tagName=J.attribValue=J.attribName="",J.attribList.length=0,J.state=G.TEXT}function Q(J){var $=J.entity,le=$.toLowerCase(),ce,we="";return J.ENTITIES[$]?J.ENTITIES[$]:J.ENTITIES[le]?J.ENTITIES[le]:($=le,$.charAt(0)==="#"&&($.charAt(1)==="x"?($=$.slice(2),ce=parseInt($,16),we=ce.toString(16)):($=$.slice(1),ce=parseInt($,10),we=ce.toString(10))),$=$.replace(/^0+/,""),isNaN(ce)||we.toLowerCase()!==$?(Oe(J,"Invalid character entity"),"&"+J.entity+";"):(0,S.default)(ce))}function q(J,$){$==="<"?(J.state=G.OPEN_WAKA,J.startTagPosition=J.position):z($)||(Oe(J,"Non-whitespace before first tag."),J.textNode=$,J.state=G.TEXT)}function ie(J,$){var le="";return $<J.length&&(le=J.charAt($)),le}function ne(J){var $=this;if(this.error)throw this.error;if($.closed)return fe($,"Cannot write after close. Assign an onready handler.");if(J===null)return Re($);(typeof J=="undefined"?"undefined":(0,C.default)(J))==="object"&&(J=J.toString());for(var le=0,ce="";!(ce=ie(J,le++),$.c=ce,!ce);){$.trackPosition&&($.position++,ce===`
|
|
|
`?($.line++,$.column=0):$.column++);switch($.state){case G.BEGIN:if($.state=G.BEGIN_WHITESPACE,ce==="\uFEFF")continue;q($,ce);continue;case G.BEGIN_WHITESPACE:q($,ce);continue;case G.TEXT:if($.sawRoot&&!$.closedRoot){for(var we=le-1;ce&&ce!=="<"&&ce!=="&";)ce=ie(J,le++),ce&&$.trackPosition&&($.position++,ce===`
|
|
|
`?($.line++,$.column=0):$.column++);$.textNode+=J.substring(we,le-1)}ce==="<"&&!($.sawRoot&&$.closedRoot&&!$.strict)?($.state=G.OPEN_WAKA,$.startTagPosition=$.position):(!z(ce)&&(!$.sawRoot||$.closedRoot)&&Oe($,"Text data outside of root node."),ce==="&"?$.state=G.TEXT_ENTITY:$.textNode+=ce);continue;case G.SCRIPT:ce==="<"?$.state=G.SCRIPT_ENDING:$.script+=ce;continue;case G.SCRIPT_ENDING:ce==="/"?$.state=G.CLOSE_TAG:($.script+="<"+ce,$.state=G.SCRIPT);continue;case G.OPEN_WAKA:if(ce==="!")$.state=G.SGML_DECL,$.sgmlDecl="";else if(!z(ce))if(U(F,ce))$.state=G.OPEN_TAG,$.tagName=ce;else if(ce==="/")$.state=G.CLOSE_TAG,$.tagName="";else if(ce==="?")$.state=G.PROC_INST,$.procInstName=$.procInstBody="";else{if(Oe($,"Unencoded <"),$.startTagPosition+1<$.position){var Fe=$.position-$.startTagPosition;ce=new Array(Fe).join(" ")+ce}$.textNode+="<"+ce,$.state=G.TEXT}continue;case G.SGML_DECL:($.sgmlDecl+ce).toUpperCase()===R?(ae($,"onopencdata"),$.state=G.CDATA,$.sgmlDecl="",$.cdata=""):$.sgmlDecl+ce==="--"?($.state=G.COMMENT,$.comment="",$.sgmlDecl=""):($.sgmlDecl+ce).toUpperCase()===y?($.state=G.DOCTYPE,($.doctype||$.sawRoot)&&Oe($,"Inappropriately located doctype declaration"),$.doctype="",$.sgmlDecl=""):ce===">"?(ae($,"onsgmldeclaration",$.sgmlDecl),$.sgmlDecl="",$.state=G.TEXT):(O(ce)&&($.state=G.SGML_DECL_QUOTED),$.sgmlDecl+=ce);continue;case G.SGML_DECL_QUOTED:ce===$.q&&($.state=G.SGML_DECL,$.q=""),$.sgmlDecl+=ce;continue;case G.DOCTYPE:ce===">"?($.state=G.TEXT,ae($,"ondoctype",$.doctype),$.doctype=!0):($.doctype+=ce,ce==="["?$.state=G.DOCTYPE_DTD:O(ce)&&($.state=G.DOCTYPE_QUOTED,$.q=ce));continue;case G.DOCTYPE_QUOTED:$.doctype+=ce,ce===$.q&&($.q="",$.state=G.DOCTYPE);continue;case G.DOCTYPE_DTD:$.doctype+=ce,ce==="]"?$.state=G.DOCTYPE:O(ce)&&($.state=G.DOCTYPE_DTD_QUOTED,$.q=ce);continue;case G.DOCTYPE_DTD_QUOTED:$.doctype+=ce,ce===$.q&&($.state=G.DOCTYPE_DTD,$.q="");continue;case G.COMMENT:ce==="-"?$.state=G.COMMENT_ENDING:$.comment+=ce;continue;case G.COMMENT_ENDING:ce==="-"?($.state=G.COMMENT_ENDED,$.comment=_e($.opt,$.comment),$.comment&&ae($,"oncomment",$.comment),$.comment=""):($.comment+="-"+ce,$.state=G.COMMENT);continue;case G.COMMENT_ENDED:ce!==">"?(Oe($,"Malformed comment"),$.comment+="--"+ce,$.state=G.COMMENT):$.state=G.TEXT;continue;case G.CDATA:ce==="]"?$.state=G.CDATA_ENDING:$.cdata+=ce;continue;case G.CDATA_ENDING:ce==="]"?$.state=G.CDATA_ENDING_2:($.cdata+="]"+ce,$.state=G.CDATA);continue;case G.CDATA_ENDING_2:ce===">"?($.cdata&&ae($,"oncdata",$.cdata),ae($,"onclosecdata"),$.cdata="",$.state=G.TEXT):ce==="]"?$.cdata+="]":($.cdata+="]]"+ce,$.state=G.CDATA);continue;case G.PROC_INST:ce==="?"?$.state=G.PROC_INST_ENDING:z(ce)?$.state=G.PROC_INST_BODY:$.procInstName+=ce;continue;case G.PROC_INST_BODY:if(!$.procInstBody&&z(ce))continue;ce==="?"?$.state=G.PROC_INST_ENDING:$.procInstBody+=ce;continue;case G.PROC_INST_ENDING:ce===">"?(ae($,"onprocessinginstruction",{name:$.procInstName,body:$.procInstBody}),$.procInstName=$.procInstBody="",$.state=G.TEXT):($.procInstBody+="?"+ce,$.state=G.PROC_INST_BODY);continue;case G.OPEN_TAG:U(P,ce)?$.tagName+=ce:(de($),ce===">"?Y($):ce==="/"?$.state=G.OPEN_TAG_SLASH:(z(ce)||Oe($,"Invalid character in tag name"),$.state=G.ATTRIB));continue;case G.OPEN_TAG_SLASH:ce===">"?(Y($,!0),V($)):(Oe($,"Forward-slash in opening tag not followed by >"),$.state=G.ATTRIB);continue;case G.ATTRIB:if(z(ce))continue;ce===">"?Y($):ce==="/"?$.state=G.OPEN_TAG_SLASH:U(F,ce)?($.attribName=ce,$.attribValue="",$.state=G.ATTRIB_NAME):Oe($,"Invalid attribute name");continue;case G.ATTRIB_NAME:ce==="="?$.state=G.ATTRIB_VALUE:ce===">"?(Oe($,"Attribute without value"),$.attribValue=$.attribName,W($),Y($)):z(ce)?$.state=G.ATTRIB_NAME_SAW_WHITE:U(P,ce)?$.attribName+=ce:Oe($,"Invalid attribute name");continue;case G.ATTRIB_NAME_SAW_WHITE:if(ce==="=")$.state=G.ATTRIB_VALUE;else{if(z(ce))continue;Oe($,"Attribute without value"),$.tag.attributes[$.attribName]="",$.attribValue="",ae($,"onattribute",{name:$.attribName,value:""}),$.attribName="",ce===">"?Y($):U(F,ce)?($.attribName=ce,$.state=G.ATTRIB_NAME):(Oe($,"Invalid attribute name"),$.state=G.ATTRIB)}continue;case G.ATTRIB_VALUE:if(z(ce))continue;O(ce)?($.q=ce,$.state=G.ATTRIB_VALUE_QUOTED):(Oe($,"Unquoted attribute value"),$.state=G.ATTRIB_VALUE_UNQUOTED,$.attribValue=ce);continue;case G.ATTRIB_VALUE_QUOTED:if(ce!==$.q){ce==="&"?$.state=G.ATTRIB_VALUE_ENTITY_Q:$.attribValue+=ce;continue}W($),$.q="",$.state=G.ATTRIB_VALUE_CLOSED;continue;case G.ATTRIB_VALUE_CLOSED:z(ce)?$.state=G.ATTRIB:ce===">"?Y($):ce==="/"?$.state=G.OPEN_TAG_SLASH:U(F,ce)?(Oe($,"No whitespace between attributes"),$.attribName=ce,$.attribValue="",$.state=G.ATTRIB_NAME):Oe($,"Invalid attribute name");continue;case G.ATTRIB_VALUE_UNQUOTED:if(!B(ce)){ce==="&"?$.state=G.ATTRIB_VALUE_ENTITY_U:$.attribValue+=ce;continue}W($),ce===">"?Y($):$.state=G.ATTRIB;continue;case G.CLOSE_TAG:if($.tagName)ce===">"?V($):U(P,ce)?$.tagName+=ce:$.script?($.script+="</"+$.tagName,$.tagName="",$.state=G.SCRIPT):(z(ce)||Oe($,"Invalid tagname in closing tag"),$.state=G.CLOSE_TAG_SAW_WHITE);else{if(z(ce))continue;L(F,ce)?$.script?($.script+="</"+ce,$.state=G.SCRIPT):Oe($,"Invalid tagname in closing tag."):$.tagName=ce}continue;case G.CLOSE_TAG_SAW_WHITE:if(z(ce))continue;ce===">"?V($):Oe($,"Invalid characters in closing tag");continue;case G.TEXT_ENTITY:case G.ATTRIB_VALUE_ENTITY_Q:case G.ATTRIB_VALUE_ENTITY_U:var Xe,$e;switch($.state){case G.TEXT_ENTITY:Xe=G.TEXT,$e="textNode";break;case G.ATTRIB_VALUE_ENTITY_Q:Xe=G.ATTRIB_VALUE_QUOTED,$e="attribValue";break;case G.ATTRIB_VALUE_ENTITY_U:Xe=G.ATTRIB_VALUE_UNQUOTED,$e="attribValue";break}ce===";"?($[$e]+=Q($),$.entity="",$.state=Xe):U($.entity.length?X:A,ce)?$.entity+=ce:(Oe($,"Invalid character in entity name"),$[$e]+="&"+$.entity+ce,$.entity="",$.state=Xe);continue;default:throw new Error($,"Unknown state: "+$.state)}}return $.position>=$.bufferCheckPosition&&u($),$}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */S.default||function(){var J=String.fromCharCode,$=Math.floor,le=function(){var we=16384,Fe=[],Xe,$e,Ye=-1,Ze=arguments.length;if(!Ze)return"";for(var qe="";++Ye<Ze;){var Pe=Number(arguments[Ye]);if(!isFinite(Pe)||Pe<0||Pe>1114111||$(Pe)!==Pe)throw RangeError("Invalid code point: "+Pe);Pe<=65535?Fe.push(Pe):(Pe-=65536,Xe=(Pe>>10)+55296,$e=Pe%1024+56320,Fe.push(Xe,$e)),(Ye+1===Ze||Fe.length>we)&&(qe+=J.apply(null,Fe),Fe.length=0)}return qe};e.default?Object.defineProperty(String,"fromCodePoint",{value:le,configurable:!0,writable:!0}):String.fromCodePoint=le}()})(typeof I=="undefined"?(void 0).sax={}:I)}).call(this,H("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(H,Z,I){Z.exports=S;var N=H("events").EventEmitter,g=H("inherits");g(S,N),S.Readable=H("readable-stream/readable.js"),S.Writable=H("readable-stream/writable.js"),S.Duplex=H("readable-stream/duplex.js"),S.Transform=H("readable-stream/transform.js"),S.PassThrough=H("readable-stream/passthrough.js"),S.Stream=S;function S(){N.call(this)}S.prototype.pipe=function(k,v){var m=this;function C(n){k.writable&&(k.write(n)===!1&&m.pause&&m.pause())}m.on("data",C);function _(){m.readable&&m.resume&&m.resume()}k.on("drain",_),!k._isStdio&&(!v||v.end!==!1)&&(m.on("end",h),m.on("close",r));var e=!1;function h(){if(e)return;e=!0,k.end()}function r(){if(e)return;e=!0,typeof k.destroy=="function"&&k.destroy()}function c(n){if(i(),N.listenerCount(this,"error")===0)throw n}m.on("error",c),k.on("error",c);function i(){m.removeListener("data",C),k.removeListener("drain",_),m.removeListener("end",h),m.removeListener("close",r),m.removeListener("error",c),k.removeListener("error",c),m.removeListener("end",i),m.removeListener("close",i),k.removeListener("close",i)}return m.on("end",i),m.on("close",i),k.on("close",i),k.emit("pipe",m),k}},{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(H,Z,I){(function(N){var g=H("./lib/request"),S=H("./lib/response"),k=H("xtend"),v=H("builtin-status-codes"),m=H("url"),C=I;C.request=function(_,e){typeof _=="string"?_=m.parse(_):_=k(_);var h=N.location.protocol.search(/^https?:$/)===-1?"http:":"",r=_.protocol||h,c=_.hostname||_.host,i=_.port,n=_.path||"/";c&&c.indexOf(":")!==-1&&(c="["+c+"]"),_.url=(c?r+"//"+c:"")+(i?":"+i:"")+n,_.method=(_.method||"GET").toUpperCase(),_.headers=_.headers||{};var l=new g(_);return e&&l.on("response",e),l},C.get=function(e,h){var r=C.request(e,h);return r.end(),r},C.ClientRequest=g,C.IncomingMessage=S.IncomingMessage,C.Agent=function(){},C.Agent.defaultMaxSockets=4,C.globalAgent=new C.Agent,C.STATUS_CODES=v,C.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(H,Z,I){(function(N){"use strict";I.fetch=C(N.fetch)&&C(N.ReadableStream),I.writableStream=C(N.WritableStream),I.abortController=C(N.AbortController),I.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),I.blobConstructor=!0}catch(_){}var g;function S(){if(g!==void 0)return g;if(N.XMLHttpRequest){g=new N.XMLHttpRequest;try{g.open("GET",N.XDomainRequest?"/":"https://example.com")}catch(_){g=null}}else g=null;return g}function k(_){var e=S();if(!e)return!1;try{return e.responseType=_,e.responseType===_}catch(h){}return!1}var v=typeof N.ArrayBuffer!="undefined",m=v&&C(N.ArrayBuffer.prototype.slice);I.arraybuffer=I.fetch||v&&k("arraybuffer"),I.msstream=!I.fetch&&m&&k("ms-stream"),I.mozchunkedarraybuffer=!I.fetch&&v&&k("moz-chunked-arraybuffer"),I.overrideMimeType=I.fetch||(S()?C(S().overrideMimeType):!1),I.vbArray=C(N.VBArray);function C(_){return typeof _=="function"}g=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(H,Z,I){(function(N,g,S){"use strict";var k=H("babel-runtime/core-js/object/keys"),v=m(k);function m(u){return u&&u.__esModule?u:{default:u}}var C=H("./capability"),_=H("inherits"),e=H("./response"),h=H("readable-stream"),r=H("to-arraybuffer"),c=e.IncomingMessage,i=e.readyStates;function n(u,o){return C.fetch&&o?"fetch":C.mozchunkedarraybuffer?"moz-chunked-arraybuffer":C.msstream?"ms-stream":C.arraybuffer&&u?"arraybuffer":C.vbArray&&u?"text:vbarray":"text"}var l=Z.exports=function(u){var o=this;h.Writable.call(o),o._opts=u,o._body=[],o._headers={},u.auth&&o.setHeader("Authorization","Basic "+new S(u.auth).toString("base64")),(0,v.default)(u.headers).forEach(function(b){o.setHeader(b,u.headers[b])});var s,E=!0;if(u.mode==="disable-fetch"||"requestTimeout"in u&&!C.abortController)E=!1,s=!0;else if(u.mode==="prefer-streaming")s=!1;else if(u.mode==="allow-wrong-content-type")s=!C.overrideMimeType;else if(!u.mode||u.mode==="default"||u.mode==="prefer-fast")s=!0;else throw new Error("Invalid value for opts.mode");o._mode=n(s,E),o._fetchTimer=null,o.on("finish",function(){o._onFinish()})};_(l,h.Writable),l.prototype.setHeader=function(u,o){var s=this,E=u.toLowerCase();if(d.indexOf(E)!==-1)return;s._headers[E]={name:u,value:o}},l.prototype.getHeader=function(u){var o=this._headers[u.toLowerCase()];return o?o.value:null},l.prototype.removeHeader=function(u){var o=this;delete o._headers[u.toLowerCase()]},l.prototype._onFinish=function(){var u=this;if(u._destroyed)return;var o=u._opts,s=u._headers,E=null;o.method!=="GET"&&o.method!=="HEAD"&&(C.arraybuffer?E=r(S.concat(u._body)):C.blobConstructor?E=new g.Blob(u._body.map(function(x){return r(x)}),{type:(s["content-type"]||{}).value||""}):E=S.concat(u._body).toString());var b=[];if((0,v.default)(s).forEach(function(x){var w=s[x].name,T=s[x].value;Array.isArray(T)?T.forEach(function(F){b.push([w,F])}):b.push([w,T])}),u._mode==="fetch"){var p=null,D=null;if(C.abortController){var R=new AbortController;p=R.signal,u._fetchAbortController=R,"requestTimeout"in o&&o.requestTimeout!==0&&(u._fetchTimer=g.setTimeout(function(){u.emit("requestTimeout"),u._fetchAbortController&&u._fetchAbortController.abort()},o.requestTimeout))}g.fetch(u._opts.url,{method:u._opts.method,headers:b,body:E||void 0,mode:"cors",credentials:o.withCredentials?"include":"same-origin",signal:p}).then(function(x){u._fetchResponse=x,u._connect()},function(x){g.clearTimeout(u._fetchTimer),u._destroyed||u.emit("error",x)})}else{var y=u._xhr=new g.XMLHttpRequest;try{y.open(u._opts.method,u._opts.url,!0)}catch(x){N.nextTick(function(){u.emit("error",x)});return}"responseType"in y&&(y.responseType=u._mode.split(":")[0]),"withCredentials"in y&&(y.withCredentials=!!o.withCredentials),u._mode==="text"&&"overrideMimeType"in y&&y.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in o&&(y.timeout=o.requestTimeout,y.ontimeout=function(){u.emit("requestTimeout")}),b.forEach(function(x){y.setRequestHeader(x[0],x[1])}),u._response=null,y.onreadystatechange=function(){switch(y.readyState){case i.LOADING:case i.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(y.onprogress=function(){u._onXHRProgress()}),y.onerror=function(){if(u._destroyed)return;u.emit("error",new Error("XHR error"))};try{y.send(E)}catch(x){N.nextTick(function(){u.emit("error",x)});return}}};function f(u){try{var o=u.status;return o!==null&&o!==0}catch(s){return!1}}l.prototype._onXHRProgress=function(){var u=this;if(!f(u._xhr)||u._destroyed)return;u._response||u._connect(),u._response._onXHRProgress()},l.prototype._connect=function(){var u=this;if(u._destroyed)return;u._response=new c(u._xhr,u._fetchResponse,u._mode,u._fetchTimer),u._response.on("error",function(o){u.emit("error",o)}),u.emit("response",u._response)},l.prototype._write=function(u,o,s){var E=this;E._body.push(u),s()},l.prototype.abort=l.prototype.destroy=function(){var u=this;u._destroyed=!0,g.clearTimeout(u._fetchTimer),u._response&&(u._response._destroyed=!0),u._xhr?u._xhr.abort():u._fetchAbortController&&u._fetchAbortController.abort()},l.prototype.end=function(u,o,s){var E=this;typeof u=="function"&&(s=u,u=void 0),h.Writable.prototype.end.call(E,u,o,s)},l.prototype.flushHeaders=function(){},l.prototype.setTimeout=function(){},l.prototype.setNoDelay=function(){},l.prototype.setSocketKeepAlive=function(){};var d=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,H("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},H("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(H,Z,I){(function(N,g,S){"use strict";var k=H("babel-runtime/core-js/promise"),v=m(k);function m(c){return c&&c.__esModule?c:{default:c}}var C=H("./capability"),_=H("inherits"),e=H("readable-stream"),h=I.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},r=I.IncomingMessage=function(c,i,n,l){var f=this;if(e.Readable.call(f),f._mode=n,f.headers={},f.rawHeaders=[],f.trailers={},f.rawTrailers=[],f.on("end",function(){N.nextTick(function(){f.emit("close")})}),n==="fetch"){var d=function p(){o.read().then(function(D){if(f._destroyed)return;if(D.done){g.clearTimeout(l),f.push(null);return}f.push(new S(D.value)),p()}).catch(function(D){g.clearTimeout(l),f._destroyed||f.emit("error",D)})};if(f._fetchResponse=i,f.url=i.url,f.statusCode=i.status,f.statusMessage=i.statusText,i.headers.forEach(function(p,D){f.headers[D.toLowerCase()]=p,f.rawHeaders.push(D,p)}),C.writableStream){var u=new WritableStream({write:function(D){return new v.default(function(R,y){f._destroyed?y():f.push(new S(D))?R():f._resumeFetch=R})},close:function(){g.clearTimeout(l),f._destroyed||f.push(null)},abort:function(D){f._destroyed||f.emit("error",D)}});try{i.body.pipeTo(u).catch(function(p){g.clearTimeout(l),f._destroyed||f.emit("error",p)});return}catch(p){}}var o=i.body.getReader();d()}else{f._xhr=c,f._pos=0,f.url=c.responseURL,f.statusCode=c.status,f.statusMessage=c.statusText;var s=c.getAllResponseHeaders().split(/\r?\n/);if(s.forEach(function(p){var D=p.match(/^([^:]+):\s*(.*)/);if(D){var R=D[1].toLowerCase();R==="set-cookie"?(f.headers[R]===void 0&&(f.headers[R]=[]),f.headers[R].push(D[2])):f.headers[R]!==void 0?f.headers[R]+=", "+D[2]:f.headers[R]=D[2],f.rawHeaders.push(D[1],D[2])}}),f._charset="x-user-defined",!C.overrideMimeType){var E=f.rawHeaders["mime-type"];if(E){var b=E.match(/;\s*charset=([^;])(;|$)/);b&&(f._charset=b[1].toLowerCase())}f._charset||(f._charset="utf-8")}}};_(r,e.Readable),r.prototype._read=function(){var c=this,i=c._resumeFetch;i&&(c._resumeFetch=null,i())},r.prototype._onXHRProgress=function(){var c=this,i=c._xhr,n=null;switch(c._mode){case"text:vbarray":if(i.readyState!==h.DONE)break;try{n=new g.VBArray(i.responseBody).toArray()}catch(o){}if(n!==null){c.push(new S(n));break}case"text":try{n=i.responseText}catch(o){c._mode="text:vbarray";break}if(n.length>c._pos){var l=n.substr(c._pos);if(c._charset==="x-user-defined"){for(var f=new S(l.length),d=0;d<l.length;d++)f[d]=l.charCodeAt(d)&255;c.push(f)}else c.push(l,c._charset);c._pos=n.length}break;case"arraybuffer":if(i.readyState!==h.DONE||!i.response)break;n=i.response,c.push(new S(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=i.response,i.readyState!==h.LOADING||!n)break;c.push(new S(new Uint8Array(n)));break;case"ms-stream":if(n=i.response,i.readyState!==h.LOADING)break;var u=new g.MSStreamReader;u.onprogress=function(){u.result.byteLength>c._pos&&(c.push(new S(new Uint8Array(u.result.slice(c._pos)))),c._pos=u.result.byteLength)},u.onload=function(){c.push(null)},u.readAsArrayBuffer(n);break}c._xhr.readyState===h.DONE&&c._mode!=="ms-stream"&&c.push(null)}}).call(this,H("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},H("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(H,Z,I){"use strict";var N=H("safe-buffer").Buffer,g=N.isEncoding||function(u){u=""+u;switch(u&&u.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 S(u){if(!u)return"utf8";for(var o;;)switch(u){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 u;default:if(o)return;u=(""+u).toLowerCase(),o=!0}}function k(u){var o=S(u);if(typeof o!="string"&&(N.isEncoding===g||!g(u)))throw new Error("Unknown encoding: "+u);return o||u}I.StringDecoder=v;function v(u){this.encoding=k(u);var o;switch(this.encoding){case"utf16le":this.text=c,this.end=i,o=4;break;case"utf8":this.fillLast=e,o=4;break;case"base64":this.text=n,this.end=l,o=3;break;default:this.write=f,this.end=d;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=N.allocUnsafe(o)}v.prototype.write=function(u){if(u.length===0)return"";var o,s;if(this.lastNeed){if(o=this.fillLast(u),o===void 0)return"";s=this.lastNeed,this.lastNeed=0}else s=0;return s<u.length?o?o+this.text(u,s):this.text(u,s):o||""},v.prototype.end=r,v.prototype.text=h,v.prototype.fillLast=function(u){if(this.lastNeed<=u.length)return u.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,this.lastTotal-this.lastNeed,0,u.length),this.lastNeed-=u.length};function m(u){return u<=127?0:u>>5===6?2:u>>4===14?3:u>>3===30?4:u>>6===2?-1:-2}function C(u,o,s){var E=o.length-1;if(E<s)return 0;var b=m(o[E]);return b>=0?(b>0&&(u.lastNeed=b-1),b):--E<s||b===-2?0:(b=m(o[E]),b>=0?(b>0&&(u.lastNeed=b-2),b):--E<s||b===-2?0:(b=m(o[E]),b>=0?(b>0&&(b===2?b=0:u.lastNeed=b-3),b):0))}function _(u,o,s){if((o[0]&192)!==128)return u.lastNeed=0,"\uFFFD";if(u.lastNeed>1&&o.length>1){if((o[1]&192)!==128)return u.lastNeed=1,"\uFFFD";if(u.lastNeed>2&&o.length>2&&(o[2]&192)!==128)return u.lastNeed=2,"\uFFFD"}}function e(u){var o=this.lastTotal-this.lastNeed,s=_(this,u,o);if(s!==void 0)return s;if(this.lastNeed<=u.length)return u.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,o,0,u.length),this.lastNeed-=u.length}function h(u,o){var s=C(this,u,o);if(!this.lastNeed)return u.toString("utf8",o);this.lastTotal=s;var E=u.length-(s-this.lastNeed);return u.copy(this.lastChar,0,E),u.toString("utf8",o,E)}function r(u){var o=u&&u.length?this.write(u):"";return this.lastNeed?o+"\uFFFD":o}function c(u,o){if((u.length-o)%2===0){var s=u.toString("utf16le",o);if(s){var E=s.charCodeAt(s.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1],s.slice(0,-1)}return s}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=u[u.length-1],u.toString("utf16le",o,u.length-1)}function i(u){var o=u&&u.length?this.write(u):"";if(this.lastNeed){var s=this.lastTotal-this.lastNeed;return o+this.lastChar.toString("utf16le",0,s)}return o}function n(u,o){var s=(u.length-o)%3;return s===0?u.toString("base64",o):(this.lastNeed=3-s,this.lastTotal=3,s===1?this.lastChar[0]=u[u.length-1]:(this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1]),u.toString("base64",o,u.length-s))}function l(u){var o=u&&u.length?this.write(u):"";return this.lastNeed?o+this.lastChar.toString("base64",0,3-this.lastNeed):o}function f(u){return u.toString(this.encoding)}function d(u){return u&&u.length?this.write(u):""}},{"safe-buffer":228}],236:[function(H,Z,I){(function(N,g){var S=H("process/browser.js").nextTick,k=Function.prototype.apply,v=Array.prototype.slice,m={},C=0;I.setTimeout=function(){return new _(k.call(setTimeout,window,arguments),clearTimeout)},I.setInterval=function(){return new _(k.call(setInterval,window,arguments),clearInterval)},I.clearTimeout=I.clearInterval=function(e){e.close()};function _(e,h){this._id=e,this._clearFn=h}_.prototype.unref=_.prototype.ref=function(){},_.prototype.close=function(){this._clearFn.call(window,this._id)},I.enroll=function(e,h){clearTimeout(e._idleTimeoutId),e._idleTimeout=h},I.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},I._unrefActive=I.active=function(e){clearTimeout(e._idleTimeoutId);var h=e._idleTimeout;h>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},h))},I.setImmediate=typeof N=="function"?N:function(e){var h=C++,r=arguments.length<2?!1:v.call(arguments,1);return m[h]=!0,S(function(){m[h]&&(r?e.apply(null,r):e.call(null),I.clearImmediate(h))}),h},I.clearImmediate=typeof g=="function"?g:function(e){delete m[e]}}).call(this,H("timers").setImmediate,H("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(H,Z,I){var N=H("buffer").Buffer;Z.exports=function(g){if(g instanceof Uint8Array){if(g.byteOffset===0&&g.byteLength===g.buffer.byteLength)return g.buffer;if(typeof g.buffer.slice=="function")return g.buffer.slice(g.byteOffset,g.byteOffset+g.byteLength)}if(N.isBuffer(g)){for(var S=new Uint8Array(g.length),k=g.length,v=0;v<k;v++)S[v]=g[v];return S.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(H,Z,I){"use strict";var N=H("punycode"),g=H("./util");I.parse=o,I.resolve=E,I.resolveObject=b,I.format=s,I.Url=S;function S(){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 k=/^([a-z0-9.+-]+:)/i,v=/:[0-9]*$/,m=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,C=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],_=["{","}","|","\\","^","`"].concat(C),e=["'"].concat(_),h=["%","/","?",";","#"].concat(e),r=["/","?","#"],c=255,i=/^[+a-z0-9A-Z_-]{0,63}$/,n=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,l={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},d={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},u=H("querystring");function o(p,D,R){if(p&&g.isObject(p)&&p instanceof S)return p;var y=new S;return y.parse(p,D,R),y}S.prototype.parse=function(p,D,R){if(!g.isString(p))throw new TypeError("Parameter 'url' must be a string, not "+typeof p);var y=p.indexOf("?"),x=y!==-1&&y<p.indexOf("#")?"?":"#",w=p.split(x),T=/\\/g;w[0]=w[0].replace(T,"/"),p=w.join(x);var F=p;if(F=F.trim(),!R&&p.split("#").length===1){var P=m.exec(F);if(P)return this.path=F,this.href=F,this.pathname=P[1],P[2]?(this.search=P[2],D?this.query=u.parse(this.search.substr(1)):this.query=this.search.substr(1)):D&&(this.search="",this.query={}),this}var A=k.exec(F);if(A){A=A[0];var X=A.toLowerCase();this.protocol=X,F=F.substr(A.length)}if(R||A||F.match(/^\/\/[^@\/]+@[^@\/]+/)){var z=F.substr(0,2)==="//";z&&!(A&&f[A])&&(F=F.substr(2),this.slashes=!0)}if(!f[A]&&(z||A&&!d[A])){for(var O=-1,B=0;B<r.length;B++){var U=F.indexOf(r[B]);U!==-1&&(O===-1||U<O)&&(O=U)}var L,G;O===-1?G=F.lastIndexOf("@"):G=F.lastIndexOf("@",O),G!==-1&&(L=F.slice(0,G),F=F.slice(G+1),this.auth=decodeURIComponent(L)),O=-1;for(var B=0;B<h.length;B++){var U=F.indexOf(h[B]);U!==-1&&(O===-1||U<O)&&(O=U)}O===-1&&(O=F.length),this.host=F.slice(0,O),F=F.slice(O),this.parseHost(),this.hostname=this.hostname||"";var ee=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ee)for(var oe=this.hostname.split(/\./),B=0,ae=oe.length;B<ae;B++){var be=oe[B];if(!be)continue;if(!be.match(i)){for(var _e="",fe=0,Re=be.length;fe<Re;fe++)be.charCodeAt(fe)>127?_e+="x":_e+=be[fe];if(!_e.match(i)){var Oe=oe.slice(0,B),de=oe.slice(B+1),te=be.match(n);te&&(Oe.push(te[1]),de.unshift(te[2])),de.length&&(F="/"+de.join(".")+F),this.hostname=Oe.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),ee||(this.hostname=N.toASCII(this.hostname));var W=this.port?":"+this.port:"",Y=this.hostname||"";this.host=Y+W,this.href+=this.host,ee&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),F[0]!=="/"&&(F="/"+F))}if(!l[X])for(var B=0,ae=e.length;B<ae;B++){var V=e[B];if(F.indexOf(V)===-1)continue;var Q=encodeURIComponent(V);Q===V&&(Q=escape(V)),F=F.split(V).join(Q)}var q=F.indexOf("#");q!==-1&&(this.hash=F.substr(q),F=F.slice(0,q));var ie=F.indexOf("?");if(ie!==-1?(this.search=F.substr(ie),this.query=F.substr(ie+1),D&&(this.query=u.parse(this.query)),F=F.slice(0,ie)):D&&(this.search="",this.query={}),F&&(this.pathname=F),d[X]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var W=this.pathname||"",ne=this.search||"";this.path=W+ne}return this.href=this.format(),this};function s(p){return g.isString(p)&&(p=o(p)),p instanceof S?p.format():S.prototype.format.call(p)}S.prototype.format=function(){var p=this.auth||"";p&&(p=encodeURIComponent(p),p=p.replace(/%3A/i,":"),p+="@");var D=this.protocol||"",R=this.pathname||"",y=this.hash||"",x=!1,w="";this.host?x=p+this.host:this.hostname&&(x=p+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(x+=":"+this.port)),this.query&&g.isObject(this.query)&&Object.keys(this.query).length&&(w=u.stringify(this.query));var T=this.search||w&&"?"+w||"";return D&&D.substr(-1)!==":"&&(D+=":"),this.slashes||(!D||d[D])&&x!==!1?(x="//"+(x||""),R&&R.charAt(0)!=="/"&&(R="/"+R)):x||(x=""),y&&y.charAt(0)!=="#"&&(y="#"+y),T&&T.charAt(0)!=="?"&&(T="?"+T),R=R.replace(/[?#]/g,function(F){return encodeURIComponent(F)}),T=T.replace("#","%23"),D+x+R+T+y};function E(p,D){return o(p,!1,!0).resolve(D)}S.prototype.resolve=function(p){return this.resolveObject(o(p,!1,!0)).format()};function b(p,D){return p?o(p,!1,!0).resolveObject(D):D}S.prototype.resolveObject=function(p){if(g.isString(p)){var D=new S;D.parse(p,!1,!0),p=D}for(var R=new S,y=Object.keys(this),x=0;x<y.length;x++){var w=y[x];R[w]=this[w]}if(R.hash=p.hash,p.href==="")return R.href=R.format(),R;if(p.slashes&&!p.protocol){for(var T=Object.keys(p),F=0;F<T.length;F++){var P=T[F];P!=="protocol"&&(R[P]=p[P])}return d[R.protocol]&&R.hostname&&!R.pathname&&(R.path=R.pathname="/"),R.href=R.format(),R}if(p.protocol&&p.protocol!==R.protocol){if(!d[p.protocol]){for(var A=Object.keys(p),X=0;X<A.length;X++){var z=A[X];R[z]=p[z]}return R.href=R.format(),R}if(R.protocol=p.protocol,!p.host&&!f[p.protocol]){for(var ae=(p.pathname||"").split("/");ae.length&&!(p.host=ae.shift()););p.host||(p.host=""),p.hostname||(p.hostname=""),ae[0]!==""&&ae.unshift(""),ae.length<2&&ae.unshift(""),R.pathname=ae.join("/")}else R.pathname=p.pathname;if(R.search=p.search,R.query=p.query,R.host=p.host||"",R.auth=p.auth,R.hostname=p.hostname||p.host,R.port=p.port,R.pathname||R.search){var O=R.pathname||"",B=R.search||"";R.path=O+B}return R.slashes=R.slashes||p.slashes,R.href=R.format(),R}var U=R.pathname&&R.pathname.charAt(0)==="/",L=p.host||p.pathname&&p.pathname.charAt(0)==="/",G=L||U||R.host&&p.pathname,ee=G,oe=R.pathname&&R.pathname.split("/")||[],ae=p.pathname&&p.pathname.split("/")||[],be=R.protocol&&!d[R.protocol];if(be&&(R.hostname="",R.port=null,R.host&&(oe[0]===""?oe[0]=R.host:oe.unshift(R.host)),R.host="",p.protocol&&(p.hostname=null,p.port=null,p.host&&(ae[0]===""?ae[0]=p.host:ae.unshift(p.host)),p.host=null),G=G&&(ae[0]===""||oe[0]==="")),L)R.host=p.host||p.host===""?p.host:R.host,R.hostname=p.hostname||p.hostname===""?p.hostname:R.hostname,R.search=p.search,R.query=p.query,oe=ae;else if(ae.length)oe||(oe=[]),oe.pop(),oe=oe.concat(ae),R.search=p.search,R.query=p.query;else if(!g.isNullOrUndefined(p.search)){if(be){R.hostname=R.host=oe.shift();var _e=R.host&&R.host.indexOf("@")>0?R.host.split("@"):!1;_e&&(R.auth=_e.shift(),R.host=R.hostname=_e.shift())}return R.search=p.search,R.query=p.query,(!g.isNull(R.pathname)||!g.isNull(R.search))&&(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.href=R.format(),R}if(!oe.length)return R.pathname=null,R.search?R.path="/"+R.search:R.path=null,R.href=R.format(),R;for(var fe=oe.slice(-1)[0],Re=(R.host||p.host||oe.length>1)&&(fe==="."||fe==="..")||fe==="",Oe=0,de=oe.length;de>=0;de--)fe=oe[de],fe==="."?oe.splice(de,1):fe===".."?(oe.splice(de,1),Oe++):Oe&&(oe.splice(de,1),Oe--);if(!G&&!ee)for(;Oe--;Oe)oe.unshift("..");G&&oe[0]!==""&&(!oe[0]||oe[0].charAt(0)!=="/")&&oe.unshift(""),Re&&oe.join("/").substr(-1)!=="/"&&oe.push("");var te=oe[0]===""||oe[0]&&oe[0].charAt(0)==="/";if(be){R.hostname=R.host=te?"":oe.length?oe.shift():"";var _e=R.host&&R.host.indexOf("@")>0?R.host.split("@"):!1;_e&&(R.auth=_e.shift(),R.host=R.hostname=_e.shift())}return G=G||R.host&&oe.length,G&&!te&&oe.unshift(""),oe.length?R.pathname=oe.join("/"):(R.pathname=null,R.path=null),(!g.isNull(R.pathname)||!g.isNull(R.search))&&(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.auth=p.auth||R.auth,R.slashes=R.slashes||p.slashes,R.href=R.format(),R},S.prototype.parseHost=function(){var p=this.host,D=v.exec(p);D&&(D=D[0],D!==":"&&(this.port=D.substr(1)),p=p.substr(0,p.length-D.length)),p&&(this.hostname=p)}},{"./util":239,punycode:209,querystring:212}],239:[function(H,Z,I){"use strict";Z.exports={isString:function(N){return typeof N=="string"},isObject:function(N){return typeof N=="object"&&N!==null},isNull:function(N){return N===null},isNullOrUndefined:function(N){return N==null}}},{}],240:[function(H,Z,I){(function(N){Z.exports=g;function g(k,v){if(S("noDeprecation"))return k;var m=!1;function C(){if(!m){if(S("throwDeprecation"))throw new Error(v);S("traceDeprecation")?console.trace(v):console.warn(v),m=!0}return k.apply(this,arguments)}return C}function S(k){try{if(!N.localStorage)return!1}catch(m){return!1}var v=N.localStorage[k];return v==null?!1:String(v).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(H,Z,I){typeof Object.create=="function"?Z.exports=function(g,S){g.super_=S,g.prototype=Object.create(S.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})}:Z.exports=function(g,S){g.super_=S;var k=function(){};k.prototype=S.prototype,g.prototype=new k,g.prototype.constructor=g}},{}],242:[function(H,Z,I){Z.exports=function(g){return g&&typeof g=="object"&&typeof g.copy=="function"&&typeof g.fill=="function"&&typeof g.readUInt8=="function"}},{}],243:[function(H,Z,I){(function(N,g){var S=/%[sdj%]/g;I.format=function(O){if(!E(O)){for(var B=[],U=0;U<arguments.length;U++)B.push(m(arguments[U]));return B.join(" ")}for(var U=1,L=arguments,G=L.length,ee=String(O).replace(S,function(ae){if(ae==="%%")return"%";if(U>=G)return ae;switch(ae){case"%s":return String(L[U++]);case"%d":return Number(L[U++]);case"%j":try{return JSON.stringify(L[U++])}catch(be){return"[Circular]"}default:return ae}}),oe=L[U];U<G;oe=L[++U])u(oe)||!R(oe)?ee+=" "+oe:ee+=" "+m(oe);return ee},I.deprecate=function(O,B){if(p(g.process))return function(){return I.deprecate(O,B).apply(this,arguments)};if(N.noDeprecation===!0)return O;var U=!1;function L(){if(!U){if(N.throwDeprecation)throw new Error(B);N.traceDeprecation?console.trace(B):console.error(B),U=!0}return O.apply(this,arguments)}return L};var k={},v;I.debuglog=function(O){if(p(v)&&(v=N.env.NODE_DEBUG||""),O=O.toUpperCase(),!k[O])if(new RegExp("\\b"+O+"\\b","i").test(v)){var B=N.pid;k[O]=function(){var U=I.format.apply(I,arguments);console.error("%s %d: %s",O,B,U)}}else k[O]=function(){};return k[O]};function m(O,B){var U={seen:[],stylize:_};return arguments.length>=3&&(U.depth=arguments[2]),arguments.length>=4&&(U.colors=arguments[3]),d(B)?U.showHidden=B:B&&I._extend(U,B),p(U.showHidden)&&(U.showHidden=!1),p(U.depth)&&(U.depth=2),p(U.colors)&&(U.colors=!1),p(U.customInspect)&&(U.customInspect=!0),U.colors&&(U.stylize=C),h(U,O,U.depth)}I.inspect=m,m.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},m.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function C(O,B){var U=m.styles[B];return U?"["+m.colors[U][0]+"m"+O+"["+m.colors[U][1]+"m":O}function _(O,B){return O}function e(O){var B={};return O.forEach(function(U,L){B[U]=!0}),B}function h(O,B,U){if(O.customInspect&&B&&w(B.inspect)&&B.inspect!==I.inspect&&!(B.constructor&&B.constructor.prototype===B)){var L=B.inspect(U,O);return E(L)||(L=h(O,L,U)),L}var G=r(O,B);if(G)return G;var ee=Object.keys(B),oe=e(ee);if(O.showHidden&&(ee=Object.getOwnPropertyNames(B)),x(B)&&(ee.indexOf("message")>=0||ee.indexOf("description")>=0))return c(B);if(ee.length===0){if(w(B)){var ae=B.name?": "+B.name:"";return O.stylize("[Function"+ae+"]","special")}if(D(B))return O.stylize(RegExp.prototype.toString.call(B),"regexp");if(y(B))return O.stylize(Date.prototype.toString.call(B),"date");if(x(B))return c(B)}var be="",_e=!1,fe=["{","}"];if(f(B)&&(_e=!0,fe=["[","]"]),w(B)){var Re=B.name?": "+B.name:"";be=" [Function"+Re+"]"}if(D(B)&&(be=" "+RegExp.prototype.toString.call(B)),y(B)&&(be=" "+Date.prototype.toUTCString.call(B)),x(B)&&(be=" "+c(B)),ee.length===0&&(!_e||B.length==0))return fe[0]+be+fe[1];if(U<0)return D(B)?O.stylize(RegExp.prototype.toString.call(B),"regexp"):O.stylize("[Object]","special");O.seen.push(B);var Oe;return _e?Oe=i(O,B,U,oe,ee):Oe=ee.map(function(de){return n(O,B,U,oe,de,_e)}),O.seen.pop(),l(Oe,be,fe)}function r(O,B){if(p(B))return O.stylize("undefined","undefined");if(E(B)){var U="'"+JSON.stringify(B).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return O.stylize(U,"string")}if(s(B))return O.stylize(""+B,"number");if(d(B))return O.stylize(""+B,"boolean");if(u(B))return O.stylize("null","null")}function c(O){return"["+Error.prototype.toString.call(O)+"]"}function i(O,B,U,L,G){for(var ee=[],oe=0,ae=B.length;oe<ae;++oe)z(B,String(oe))?ee.push(n(O,B,U,L,String(oe),!0)):ee.push("");return G.forEach(function(be){be.match(/^\d+$/)||ee.push(n(O,B,U,L,be,!0))}),ee}function n(O,B,U,L,G,ee){var oe,ae,be;if(be=Object.getOwnPropertyDescriptor(B,G)||{value:B[G]},be.get?be.set?ae=O.stylize("[Getter/Setter]","special"):ae=O.stylize("[Getter]","special"):be.set&&(ae=O.stylize("[Setter]","special")),z(L,G)||(oe="["+G+"]"),ae||(O.seen.indexOf(be.value)<0?(u(U)?ae=h(O,be.value,null):ae=h(O,be.value,U-1),ae.indexOf(`
|
|
|
`)>-1&&(ee?ae=ae.split(`
|
|
|
`).map(function(_e){return" "+_e}).join(`
|
|
|
`).substr(2):ae=`
|
|
|
`+ae.split(`
|
|
|
`).map(function(_e){return" "+_e}).join(`
|
|
|
`))):ae=O.stylize("[Circular]","special")),p(oe)){if(ee&&G.match(/^\d+$/))return ae;oe=JSON.stringify(""+G),oe.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(oe=oe.substr(1,oe.length-2),oe=O.stylize(oe,"name")):(oe=oe.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),oe=O.stylize(oe,"string"))}return oe+": "+ae}function l(O,B,U){var L=0,G=O.reduce(function(ee,oe){return L++,oe.indexOf(`
|
|
|
`)>=0&&L++,ee+oe.replace(/\u001b\[\d\d?m/g,"").length+1},0);return G>60?U[0]+(B===""?"":B+`
|
|
|
`)+" "+O.join(`,
|
|
|
`)+" "+U[1]:U[0]+B+" "+O.join(", ")+" "+U[1]}function f(O){return Array.isArray(O)}I.isArray=f;function d(O){return typeof O=="boolean"}I.isBoolean=d;function u(O){return O===null}I.isNull=u;function o(O){return O==null}I.isNullOrUndefined=o;function s(O){return typeof O=="number"}I.isNumber=s;function E(O){return typeof O=="string"}I.isString=E;function b(O){return typeof O=="symbol"}I.isSymbol=b;function p(O){return O===void 0}I.isUndefined=p;function D(O){return R(O)&&F(O)==="[object RegExp]"}I.isRegExp=D;function R(O){return typeof O=="object"&&O!==null}I.isObject=R;function y(O){return R(O)&&F(O)==="[object Date]"}I.isDate=y;function x(O){return R(O)&&(F(O)==="[object Error]"||O instanceof Error)}I.isError=x;function w(O){return typeof O=="function"}I.isFunction=w;function T(O){return O===null||typeof O=="boolean"||typeof O=="number"||typeof O=="string"||typeof O=="symbol"||typeof O=="undefined"}I.isPrimitive=T,I.isBuffer=H("./support/isBuffer");function F(O){return Object.prototype.toString.call(O)}function P(O){return O<10?"0"+O.toString(10):O.toString(10)}var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function X(){var O=new Date,B=[P(O.getHours()),P(O.getMinutes()),P(O.getSeconds())].join(":");return[O.getDate(),A[O.getMonth()],B].join(" ")}I.log=function(){console.log("%s - %s",X(),I.format.apply(I,arguments))},I.inherits=H("inherits"),I._extend=function(O,B){if(!B||!R(B))return O;for(var U=Object.keys(B),L=U.length;L--;)O[U[L]]=B[U[L]];return O};function z(O,B){return Object.prototype.hasOwnProperty.call(O,B)}}).call(this,H("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(H,Z,I){"use strict";(function(){"use strict";I.stripBOM=function(N){return N[0]==="\uFEFF"?N.substring(1):N}}).call(void 0)},{}],245:[function(H,Z,I){"use strict";var N=H("babel-runtime/helpers/typeof"),g=v(N),S=H("babel-runtime/core-js/object/keys"),k=v(S);function v(m){return m&&m.__esModule?m:{default:m}}(function(){"use strict";var m,C,_,e,h,r={}.hasOwnProperty;m=H("xmlbuilder"),C=H("./defaults").defaults,e=function(i){return typeof i=="string"&&(i.indexOf("&")>=0||i.indexOf(">")>=0||i.indexOf("<")>=0)},h=function(i){return"<![CDATA["+_(i)+"]]>"},_=function(i){return i.replace("]]>","]]]]><![CDATA[>")},I.Builder=function(){function c(i){var n,l,f;this.options={},l=C["0.2"];for(n in l){if(!r.call(l,n))continue;f=l[n],this.options[n]=f}for(n in i){if(!r.call(i,n))continue;f=i[n],this.options[n]=f}}return c.prototype.buildObject=function(i){var n,l,f,d,u;return n=this.options.attrkey,l=this.options.charkey,(0,k.default)(i).length===1&&this.options.rootName===C["0.2"].rootName?(u=(0,k.default)(i)[0],i=i[u]):u=this.options.rootName,f=function(o){return function(s,E){var b,p,D,R,y,x;if((typeof E=="undefined"?"undefined":(0,g.default)(E))!=="object")o.options.cdata&&e(E)?s.raw(h(E)):s.txt(E);else if(Array.isArray(E))for(R in E){if(!r.call(E,R))continue;p=E[R];for(y in p)D=p[y],s=f(s.ele(y),D).up()}else for(y in E){if(!r.call(E,y))continue;if(p=E[y],y===n){if((typeof p=="undefined"?"undefined":(0,g.default)(p))==="object")for(b in p)x=p[b],s=s.att(b,x)}else if(y===l)o.options.cdata&&e(p)?s=s.raw(h(p)):s=s.txt(p);else if(Array.isArray(p))for(R in p){if(!r.call(p,R))continue;D=p[R],typeof D=="string"?o.options.cdata&&e(D)?s=s.ele(y).raw(h(D)).up():s=s.ele(y,D).up():s=f(s.ele(y),D).up()}else(typeof p=="undefined"?"undefined":(0,g.default)(p))==="object"?s=f(s.ele(y),p).up():typeof p=="string"&&o.options.cdata&&e(p)?s=s.ele(y).raw(h(p)).up():(p==null&&(p=""),s=s.ele(y,p.toString()).up())}return s}}(this),d=m.create(u,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),f(d,i).end(this.options.renderOpts)},c}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(H,Z,I){"use strict";(function(){I.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(H,Z,I){"use strict";var N=H("babel-runtime/core-js/promise"),g=e(N),S=H("babel-runtime/core-js/object/get-own-property-names"),k=e(S),v=H("babel-runtime/core-js/object/keys"),m=e(v),C=H("babel-runtime/helpers/typeof"),_=e(C);function e(h){return h&&h.__esModule?h:{default:h}}(function(){"use strict";var h,r,c,i,n,l,f,d,u=function(b,p){return function(){return b.apply(p,arguments)}},o=function(b,p){for(var D in p)s.call(p,D)&&(b[D]=p[D]);function R(){this.constructor=b}return R.prototype=p.prototype,b.prototype=new R,b.__super__=p.prototype,b},s={}.hasOwnProperty;f=H("sax"),c=H("events"),h=H("./bom"),l=H("./processors"),d=H("timers").setImmediate,r=H("./defaults").defaults,i=function(b){return(typeof b=="undefined"?"undefined":(0,_.default)(b))==="object"&&b!=null&&(0,m.default)(b).length===0},n=function(b,p,D){var R,y,x;for(R=0,y=b.length;R<y;R++)x=b[R],p=x(p,D);return p},I.Parser=function(E){o(b,E);function b(p){this.parseStringPromise=u(this.parseStringPromise,this),this.parseString=u(this.parseString,this),this.reset=u(this.reset,this),this.assignOrPush=u(this.assignOrPush,this),this.processAsync=u(this.processAsync,this);var D,R,y;if(!(this instanceof I.Parser))return new I.Parser(p);this.options={},R=r["0.2"];for(D in R){if(!s.call(R,D))continue;y=R[D],this.options[D]=y}for(D in p){if(!s.call(p,D))continue;y=p[D],this.options[D]=y}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(l.normalize)),this.reset()}return b.prototype.processAsync=function(){var p,D;try{return this.remaining.length<=this.options.chunkSize?(p=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(p),this.saxParser.close()):(p=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(p),d(this.processAsync))}catch(R){if(D=R,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(D)}},b.prototype.assignOrPush=function(p,D,R){return D in p?(p[D]instanceof Array||(p[D]=[p[D]]),p[D].push(R)):this.options.explicitArray?p[D]=[R]:p[D]=R},b.prototype.reset=function(){var p,D,R,y;return this.removeAllListeners(),this.saxParser=f.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(x){return function(w){if(x.saxParser.resume(),!x.saxParser.errThrown)return x.saxParser.errThrown=!0,x.emit("error",w)}}(this),this.saxParser.onend=function(x){return function(){if(!x.saxParser.ended)return x.saxParser.ended=!0,x.emit("end",x.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,y=[],p=this.options.attrkey,D=this.options.charkey,this.saxParser.onopentag=function(x){return function(w){var T,F,P,A,X;if(P={},P[D]="",!x.options.ignoreAttrs){X=w.attributes;for(T in X){if(!s.call(X,T))continue;!(p in P)&&!x.options.mergeAttrs&&(P[p]={}),F=x.options.attrValueProcessors?n(x.options.attrValueProcessors,w.attributes[T],T):w.attributes[T],A=x.options.attrNameProcessors?n(x.options.attrNameProcessors,T):T,x.options.mergeAttrs?x.assignOrPush(P,A,F):P[p][A]=F}}return P["#name"]=x.options.tagNameProcessors?n(x.options.tagNameProcessors,w.name):w.name,x.options.xmlns&&(P[x.options.xmlnskey]={uri:w.uri,local:w.local}),y.push(P)}}(this),this.saxParser.onclosetag=function(x){return function(){var w,T,F,P,A,X,z,O,B,U;if(X=y.pop(),A=X["#name"],(!x.options.explicitChildren||!x.options.preserveChildrenOrder)&&delete X["#name"],X.cdata===!0&&(w=X.cdata,delete X.cdata),B=y[y.length-1],X[D].match(/^\s*$/)&&!w?(T=X[D],delete X[D]):(x.options.trim&&(X[D]=X[D].trim()),x.options.normalize&&(X[D]=X[D].replace(/\s{2,}/g," ").trim()),X[D]=x.options.valueProcessors?n(x.options.valueProcessors,X[D],A):X[D],(0,m.default)(X).length===1&&D in X&&!x.EXPLICIT_CHARKEY&&(X=X[D])),i(X)&&(X=x.options.emptyTag!==""?x.options.emptyTag:T),x.options.validator!=null&&(U="/"+function(){var L,G,ee;for(ee=[],L=0,G=y.length;L<G;L++)P=y[L],ee.push(P["#name"]);return ee}().concat(A).join("/"),function(){var L;try{return X=x.options.validator(U,B&&B[A],X)}catch(G){return L=G,x.emit("error",L)}}()),x.options.explicitChildren&&!x.options.mergeAttrs&&(typeof X=="undefined"?"undefined":(0,_.default)(X))==="object"){if(!x.options.preserveChildrenOrder)P={},x.options.attrkey in X&&(P[x.options.attrkey]=X[x.options.attrkey],delete X[x.options.attrkey]),!x.options.charsAsChildren&&x.options.charkey in X&&(P[x.options.charkey]=X[x.options.charkey],delete X[x.options.charkey]),(0,k.default)(X).length>0&&(P[x.options.childkey]=X),X=P;else if(B){B[x.options.childkey]=B[x.options.childkey]||[],z={};for(F in X){if(!s.call(X,F))continue;z[F]=X[F]}B[x.options.childkey].push(z),delete X["#name"],(0,m.default)(X).length===1&&D in X&&!x.EXPLICIT_CHARKEY&&(X=X[D])}}return y.length>0?x.assignOrPush(B,A,X):(x.options.explicitRoot&&(O=X,X={},X[A]=O),x.resultObject=X,x.saxParser.ended=!0,x.emit("end",x.resultObject))}}(this),R=function(x){return function(w){var T,F;if(F=y[y.length-1],F)return F[D]+=w,x.options.explicitChildren&&x.options.preserveChildrenOrder&&x.options.charsAsChildren&&(x.options.includeWhiteChars||w.replace(/\\n/g,"").trim()!=="")&&(F[x.options.childkey]=F[x.options.childkey]||[],T={"#name":"__text__"},T[D]=w,x.options.normalize&&(T[D]=T[D].replace(/\s{2,}/g," ").trim()),F[x.options.childkey].push(T)),F}}(this),this.saxParser.ontext=R,this.saxParser.oncdata=function(x){return function(w){var T;if(T=R(w),T)return T.cdata=!0}}(this)},b.prototype.parseString=function(p,D){var R;D!=null&&typeof D=="function"&&(this.on("end",function(y){return this.reset(),D(null,y)}),this.on("error",function(y){return this.reset(),D(y)}));try{return p=p.toString(),p.trim()===""?(this.emit("end",null),!0):(p=h.stripBOM(p),this.options.async?(this.remaining=p,d(this.processAsync),this.saxParser):this.saxParser.write(p).close())}catch(y){if(R=y,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw R}else return this.emit("error",R),this.saxParser.errThrown=!0}},b.prototype.parseStringPromise=function(p){return new g.default(function(D){return function(R,y){return D.parseString(p,function(x,w){return x?y(x):R(w)})}}(this))},b}(c),I.parseString=function(E,b,p){var D,R,y;return p!=null?(typeof p=="function"&&(D=p),(typeof b=="undefined"?"undefined":(0,_.default)(b))==="object"&&(R=b)):(typeof b=="function"&&(D=b),R={}),y=new I.Parser(R),y.parseString(E,D)},I.parseStringPromise=function(E,b){var p,D;return(typeof b=="undefined"?"undefined":(0,_.default)(b))==="object"&&(p=b),D=new I.Parser(p),D.parseStringPromise(E)}}).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(H,Z,I){"use strict";(function(){"use strict";var N;N=new RegExp(/(?!xmlns)^.*:/),I.normalize=function(g){return g.toLowerCase()},I.firstCharLowerCase=function(g){return g.charAt(0).toLowerCase()+g.slice(1)},I.stripPrefix=function(g){return g.replace(N,"")},I.parseNumbers=function(g){return isNaN(g)||(g=g%1===0?parseInt(g,10):parseFloat(g)),g},I.parseBooleans=function(g){return/^(?:true|false)$/i.test(g)&&(g=g.toLowerCase()==="true"),g}}).call(void 0)},{}],249:[function(H,Z,I){"use strict";(function(){"use strict";var N,g,S,k,v=function(_,e){for(var h in e)m.call(e,h)&&(_[h]=e[h]);function r(){this.constructor=_}return r.prototype=e.prototype,_.prototype=new r,_.__super__=e.prototype,_},m={}.hasOwnProperty;g=H("./defaults"),N=H("./builder"),S=H("./parser"),k=H("./processors"),I.defaults=g.defaults,I.processors=k,I.ValidationError=function(C){v(_,C);function _(e){this.message=e}return _}(Error),I.Builder=N.Builder,I.Parser=S.Parser,I.parseString=S.parseString,I.parseStringPromise=S.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(H,Z,I){"use strict";(function(){Z.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(H,Z,I){"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(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/get-prototype-of"),g=C(N),S=H("babel-runtime/helpers/typeof"),k=C(S),v=H("babel-runtime/core-js/object/assign"),m=C(v);function C(_){return _&&_.__esModule?_:{default:_}}(function(){var _,e,h,r,c,i,n,l=[].slice,f={}.hasOwnProperty;_=function(){var u,o,s,E,b,p;if(p=arguments[0],b=2<=arguments.length?l.call(arguments,1):[],c(m.default))m.default.apply(null,arguments);else for(u=0,s=b.length;u<s;u++)if(E=b[u],E!=null)for(o in E){if(!f.call(E,o))continue;p[o]=E[o]}return p},c=function(u){return!!u&&Object.prototype.toString.call(u)==="[object Function]"},i=function(u){var o;return!!u&&((o=typeof u=="undefined"?"undefined":(0,k.default)(u))==="function"||o==="object")},h=function(u){return c(Array.isArray)?Array.isArray(u):Object.prototype.toString.call(u)==="[object Array]"},r=function(u){var o;if(h(u))return!u.length;for(o in u){if(!f.call(u,o))continue;return!1}return!0},n=function(u){var o,s;return i(u)&&(s=(0,g.default)(u))&&(o=s.constructor)&&typeof o=="function"&&o instanceof o&&Function.prototype.toString.call(o)===Function.prototype.toString.call(Object)},e=function(u){return c(u.valueOf)?u.valueOf():u},Z.exports.assign=_,Z.exports.isFunction=c,Z.exports.isObject=i,Z.exports.isArray=h,Z.exports.isEmpty=r,Z.exports.isPlainObject=n,Z.exports.getValue=e}).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(H,Z,I){"use strict";(function(){Z.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=S(N);function S(k){return k&&k.__esModule?k:{default:k}}(function(){var k,v,m;k=H("./NodeType"),m=H("./XMLNode"),Z.exports=v=function(){function C(_,e,h){if(this.parent=_,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),e==null)throw new Error("Missing attribute name. "+this.debugInfo(e));this.name=this.stringify.name(e),this.value=this.stringify.attValue(h),this.type=k.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(C.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(C.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(C.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}}),Object.defineProperty(C.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(C.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(C.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(C.prototype,"specified",{get:function(){return!0}}),C.prototype.clone=function(){return(0,g.default)(this)},C.prototype.toString=function(_){return this.options.writer.attribute(this,this.options.writer.filterOptions(_))},C.prototype.debugInfo=function(_){return _=_||this.name,_==null?"parent: <"+this.parent.name+">":"attribute: {"+_+"}, parent: <"+this.parent.name+">"},C.prototype.isEqualNode=function(_){return _.namespaceURI!==this.namespaceURI||(_.prefix!==this.prefix||_.localName!==this.localName)?!1:!(_.value!==this.value)},C}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=S(N);function S(k){return k&&k.__esModule?k:{default:k}}(function(){var k,v,m,C=function(h,r){for(var c in r)_.call(r,c)&&(h[c]=r[c]);function i(){this.constructor=h}return i.prototype=r.prototype,h.prototype=new i,h.__super__=r.prototype,h},_={}.hasOwnProperty;k=H("./NodeType"),m=H("./XMLCharacterData"),Z.exports=v=function(e){C(h,e);function h(r,c){if(h.__super__.constructor.call(this,r),c==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=k.CData,this.value=this.stringify.cdata(c)}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(r){return this.options.writer.cdata(this,this.options.writer.filterOptions(r))},h}(m)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=S(N);function S(k){return k&&k.__esModule?k:{default:k}}(function(){var k,v,m=function(e,h){for(var r in h)C.call(h,r)&&(e[r]=h[r]);function c(){this.constructor=e}return c.prototype=h.prototype,e.prototype=new c,e.__super__=h.prototype,e},C={}.hasOwnProperty;v=H("./XMLNode"),Z.exports=k=function(_){m(e,_);function e(h){e.__super__.constructor.call(this,h),this.value=""}return Object.defineProperty(e.prototype,"data",{get:function(){return this.value},set:function(r){return this.value=r||""}}),Object.defineProperty(e.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(e.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}}),e.prototype.clone=function(){return(0,g.default)(this)},e.prototype.substringData=function(h,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.appendData=function(h){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.insertData=function(h,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.deleteData=function(h,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.replaceData=function(h,r,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(h){return e.__super__.isEqualNode.apply(this,arguments).isEqualNode(h)?!(h.data!==this.data):!1},e}(v)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=S(N);function S(k){return k&&k.__esModule?k:{default:k}}(function(){var k,v,m,C=function(h,r){for(var c in r)_.call(r,c)&&(h[c]=r[c]);function i(){this.constructor=h}return i.prototype=r.prototype,h.prototype=new i,h.__super__=r.prototype,h},_={}.hasOwnProperty;k=H("./NodeType"),v=H("./XMLCharacterData"),Z.exports=m=function(e){C(h,e);function h(r,c){if(h.__super__.constructor.call(this,r),c==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=k.Comment,this.value=this.stringify.comment(c)}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(r){return this.options.writer.comment(this,this.options.writer.filterOptions(r))},h}(v)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/keys"),g=v(N),S=H("babel-runtime/core-js/object/create"),k=v(S);function v(m){return m&&m.__esModule?m:{default:m}}(function(){var m,C,_;C=H("./XMLDOMErrorHandler"),_=H("./XMLDOMStringList"),Z.exports=m=function(){function e(){var h;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new C,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=h=(0,k.default)(this.defaultParams)}return Object.defineProperty(e.prototype,"parameterNames",{get:function(){return new _((0,g.default)(this.defaultParams))}}),e.prototype.getParameter=function(h){return this.params.hasOwnProperty(h)?this.params[h]:null},e.prototype.canSetParameter=function(h,r){return!0},e.prototype.setParameter=function(h,r){return r!=null?this.params[h]=r:delete this.params[h]},e}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(H,Z,I){"use strict";(function(){var N;Z.exports=N=function(){function g(){}return g.prototype.handleError=function(S){throw new Error(S)},g}()}).call(void 0)},{}],260:[function(H,Z,I){"use strict";(function(){var N;Z.exports=N=function(){function g(){}return g.prototype.hasFeature=function(S,k){return!0},g.prototype.createDocumentType=function(S,k,v){throw new Error("This DOM method is not implemented.")},g.prototype.createDocument=function(S,k,v){throw new Error("This DOM method is not implemented.")},g.prototype.createHTMLDocument=function(S){throw new Error("This DOM method is not implemented.")},g.prototype.getFeature=function(S,k){throw new Error("This DOM method is not implemented.")},g}()}).call(void 0)},{}],261:[function(H,Z,I){"use strict";(function(){var N;Z.exports=N=function(){function g(S){this.arr=S||[]}return Object.defineProperty(g.prototype,"length",{get:function(){return this.arr.length}}),g.prototype.item=function(S){return this.arr[S]||null},g.prototype.contains=function(S){return this.arr.indexOf(S)!==-1},g}()}).call(void 0)},{}],262:[function(H,Z,I){"use strict";(function(){var N,g,S,k=function(C,_){for(var e in _)v.call(_,e)&&(C[e]=_[e]);function h(){this.constructor=C}return h.prototype=_.prototype,C.prototype=new h,C.__super__=_.prototype,C},v={}.hasOwnProperty;S=H("./XMLNode"),N=H("./NodeType"),Z.exports=g=function(m){k(C,m);function C(_,e,h,r,c,i){if(C.__super__.constructor.call(this,_),e==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(h==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(e));if(!r)throw new Error("Missing DTD attribute type. "+this.debugInfo(e));if(!c)throw new Error("Missing DTD attribute default. "+this.debugInfo(e));if(c.indexOf("#")!==0&&(c="#"+c),!c.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(e));if(i&&!c.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(e));this.elementName=this.stringify.name(e),this.type=N.AttributeDeclaration,this.attributeName=this.stringify.name(h),this.attributeType=this.stringify.dtdAttType(r),i&&(this.defaultValue=this.stringify.dtdAttDefault(i)),this.defaultValueType=c}return C.prototype.toString=function(_){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(_))},C}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(H,Z,I){"use strict";(function(){var N,g,S,k=function(C,_){for(var e in _)v.call(_,e)&&(C[e]=_[e]);function h(){this.constructor=C}return h.prototype=_.prototype,C.prototype=new h,C.__super__=_.prototype,C},v={}.hasOwnProperty;S=H("./XMLNode"),N=H("./NodeType"),Z.exports=g=function(m){k(C,m);function C(_,e,h){if(C.__super__.constructor.call(this,_),e==null)throw new Error("Missing DTD element name. "+this.debugInfo());h||(h="(#PCDATA)"),Array.isArray(h)&&(h="("+h.join(",")+")"),this.name=this.stringify.name(e),this.type=N.ElementDeclaration,this.value=this.stringify.dtdElementValue(h)}return C.prototype.toString=function(_){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(_))},C}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(H,Z,I){"use strict";(function(){var N,g,S,k,v=function(_,e){for(var h in e)m.call(e,h)&&(_[h]=e[h]);function r(){this.constructor=_}return r.prototype=e.prototype,_.prototype=new r,_.__super__=e.prototype,_},m={}.hasOwnProperty;k=H("./Utility").isObject,S=H("./XMLNode"),N=H("./NodeType"),Z.exports=g=function(C){v(_,C);function _(e,h,r,c){if(_.__super__.constructor.call(this,e),r==null)throw new Error("Missing DTD entity name. "+this.debugInfo(r));if(c==null)throw new Error("Missing DTD entity value. "+this.debugInfo(r));if(this.pe=!!h,this.name=this.stringify.name(r),this.type=N.EntityDeclaration,!k(c))this.value=this.stringify.dtdEntityValue(c),this.internal=!0;else{if(!c.pubID&&!c.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(r));if(c.pubID&&!c.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(r));if(this.internal=!1,c.pubID!=null&&(this.pubID=this.stringify.dtdPubID(c.pubID)),c.sysID!=null&&(this.sysID=this.stringify.dtdSysID(c.sysID)),c.nData!=null&&(this.nData=this.stringify.dtdNData(c.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(r))}}return Object.defineProperty(_.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(_.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(_.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(_.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(_.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(_.prototype,"xmlVersion",{get:function(){return null}}),_.prototype.toString=function(e){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(e))},_}(S)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(H,Z,I){"use strict";(function(){var N,g,S,k=function(C,_){for(var e in _)v.call(_,e)&&(C[e]=_[e]);function h(){this.constructor=C}return h.prototype=_.prototype,C.prototype=new h,C.__super__=_.prototype,C},v={}.hasOwnProperty;S=H("./XMLNode"),N=H("./NodeType"),Z.exports=g=function(m){k(C,m);function C(_,e,h){if(C.__super__.constructor.call(this,_),e==null)throw new Error("Missing DTD notation name. "+this.debugInfo(e));if(!h.pubID&&!h.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(e));this.name=this.stringify.name(e),this.type=N.NotationDeclaration,h.pubID!=null&&(this.pubID=this.stringify.dtdPubID(h.pubID)),h.sysID!=null&&(this.sysID=this.stringify.dtdSysID(h.sysID))}return Object.defineProperty(C.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(C.prototype,"systemId",{get:function(){return this.sysID}}),C.prototype.toString=function(_){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(_))},C}(S)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(H,Z,I){"use strict";(function(){var N,g,S,k,v=function(_,e){for(var h in e)m.call(e,h)&&(_[h]=e[h]);function r(){this.constructor=_}return r.prototype=e.prototype,_.prototype=new r,_.__super__=e.prototype,_},m={}.hasOwnProperty;k=H("./Utility").isObject,S=H("./XMLNode"),N=H("./NodeType"),Z.exports=g=function(C){v(_,C);function _(e,h,r,c){var i;_.__super__.constructor.call(this,e),k(h)&&(i=h,h=i.version,r=i.encoding,c=i.standalone),h||(h="1.0"),this.type=N.Declaration,this.version=this.stringify.xmlVersion(h),r!=null&&(this.encoding=this.stringify.xmlEncoding(r)),c!=null&&(this.standalone=this.stringify.xmlStandalone(c))}return _.prototype.toString=function(e){return this.options.writer.declaration(this,this.options.writer.filterOptions(e))},_}(S)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(H,Z,I){"use strict";(function(){var N,g,S,k,v,m,C,_,e,h=function(i,n){for(var l in n)r.call(n,l)&&(i[l]=n[l]);function f(){this.constructor=i}return f.prototype=n.prototype,i.prototype=new f,i.__super__=n.prototype,i},r={}.hasOwnProperty;e=H("./Utility").isObject,_=H("./XMLNode"),N=H("./NodeType"),g=H("./XMLDTDAttList"),k=H("./XMLDTDEntity"),S=H("./XMLDTDElement"),v=H("./XMLDTDNotation"),C=H("./XMLNamedNodeMap"),Z.exports=m=function(c){h(i,c);function i(n,l,f){var d,u,o,s,E,b;if(i.__super__.constructor.call(this,n),this.type=N.DocType,n.children){for(s=n.children,u=0,o=s.length;u<o;u++)if(d=s[u],d.type===N.Element){this.name=d.name;break}}this.documentObject=n,e(l)&&(E=l,l=E.pubID,f=E.sysID),f==null&&(b=[l,f],f=b[0],l=b[1]),l!=null&&(this.pubID=this.stringify.dtdPubID(l)),f!=null&&(this.sysID=this.stringify.dtdSysID(f))}return Object.defineProperty(i.prototype,"entities",{get:function(){var l,f,d,u,o;for(u={},o=this.children,f=0,d=o.length;f<d;f++)l=o[f],l.type===N.EntityDeclaration&&!l.pe&&(u[l.name]=l);return new C(u)}}),Object.defineProperty(i.prototype,"notations",{get:function(){var l,f,d,u,o;for(u={},o=this.children,f=0,d=o.length;f<d;f++)l=o[f],l.type===N.NotationDeclaration&&(u[l.name]=l);return new C(u)}}),Object.defineProperty(i.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(i.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(i.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),i.prototype.element=function(n,l){var f;return f=new S(this,n,l),this.children.push(f),this},i.prototype.attList=function(n,l,f,d,u){var o;return o=new g(this,n,l,f,d,u),this.children.push(o),this},i.prototype.entity=function(n,l){var f;return f=new k(this,!1,n,l),this.children.push(f),this},i.prototype.pEntity=function(n,l){var f;return f=new k(this,!0,n,l),this.children.push(f),this},i.prototype.notation=function(n,l){var f;return f=new v(this,n,l),this.children.push(f),this},i.prototype.toString=function(n){return this.options.writer.docType(this,this.options.writer.filterOptions(n))},i.prototype.ele=function(n,l){return this.element(n,l)},i.prototype.att=function(n,l,f,d,u){return this.attList(n,l,f,d,u)},i.prototype.ent=function(n,l){return this.entity(n,l)},i.prototype.pent=function(n,l){return this.pEntity(n,l)},i.prototype.not=function(n,l){return this.notation(n,l)},i.prototype.up=function(){return this.root()||this.documentObject},i.prototype.isEqualNode=function(n){return i.__super__.isEqualNode.apply(this,arguments).isEqualNode(n)?n.name!==this.name||n.publicId!==this.publicId?!1:!(n.systemId!==this.systemId):!1},i}(_)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(H,Z,I){"use strict";(function(){var N,g,S,k,v,m,C,_,e=function(c,i){for(var n in i)h.call(i,n)&&(c[n]=i[n]);function l(){this.constructor=c}return l.prototype=i.prototype,c.prototype=new l,c.__super__=i.prototype,c},h={}.hasOwnProperty;_=H("./Utility").isPlainObject,S=H("./XMLDOMImplementation"),g=H("./XMLDOMConfiguration"),v=H("./XMLNode"),N=H("./NodeType"),C=H("./XMLStringifier"),m=H("./XMLStringWriter"),Z.exports=k=function(r){e(c,r);function c(i){c.__super__.constructor.call(this,null),this.name="#document",this.type=N.Document,this.documentURI=null,this.domConfig=new g,i||(i={}),i.writer||(i.writer=new m),this.options=i,this.stringify=new C(i)}return Object.defineProperty(c.prototype,"implementation",{value:new S}),Object.defineProperty(c.prototype,"doctype",{get:function(){var n,l,f,d;for(d=this.children,l=0,f=d.length;l<f;l++)if(n=d[l],n.type===N.DocType)return n;return null}}),Object.defineProperty(c.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(c.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(c.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(c.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===N.Declaration?this.children[0].encoding:null}}),Object.defineProperty(c.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===N.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(c.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===N.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(c.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(c.prototype,"origin",{get:function(){return null}}),Object.defineProperty(c.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(c.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(c.prototype,"contentType",{get:function(){return null}}),c.prototype.end=function(i){var n;return n={},i?_(i)&&(n=i,i=this.options.writer):i=this.options.writer,i.document(this,i.filterOptions(n))},c.prototype.toString=function(i){return this.options.writer.document(this,this.options.writer.filterOptions(i))},c.prototype.createElement=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createTextNode=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createComment=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createCDATASection=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createProcessingInstruction=function(i,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createAttribute=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createEntityReference=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagName=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.importNode=function(i,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createElementNS=function(i,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createAttributeNS=function(i,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByTagNameNS=function(i,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementById=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.adoptNode=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.renameNode=function(i,n,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.getElementsByClassName=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createEvent=function(i){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createNodeIterator=function(i,n,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.createTreeWalker=function(i,n,l){throw new Error("This DOM method is not implemented."+this.debugInfo())},c}(v)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(H,Z,I){"use strict";(function(){var N,g,S,k,v,m,C,_,e,h,r,c,i,n,l,f,d,u,o,s,E,b,p,D,R={}.hasOwnProperty;D=H("./Utility"),b=D.isObject,E=D.isFunction,p=D.isPlainObject,s=D.getValue,N=H("./NodeType"),c=H("./XMLDocument"),n=H("./XMLElement"),k=H("./XMLCData"),v=H("./XMLComment"),f=H("./XMLRaw"),o=H("./XMLText"),l=H("./XMLProcessingInstruction"),h=H("./XMLDeclaration"),r=H("./XMLDocType"),m=H("./XMLDTDAttList"),_=H("./XMLDTDEntity"),C=H("./XMLDTDElement"),e=H("./XMLDTDNotation"),S=H("./XMLAttribute"),u=H("./XMLStringifier"),d=H("./XMLStringWriter"),g=H("./WriterState"),Z.exports=i=function(){function y(x,w,T){var F;this.name="?xml",this.type=N.Document,x||(x={}),F={},x.writer?p(x.writer)&&(F=x.writer,x.writer=new d):x.writer=new d,this.options=x,this.writer=x.writer,this.writerOptions=this.writer.filterOptions(F),this.stringify=new u(x),this.onDataCallback=w||function(){},this.onEndCallback=T||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return y.prototype.createChildNode=function(x){var w,T,F,P,A,X,z,O;switch(x.type){case N.CData:this.cdata(x.value);break;case N.Comment:this.comment(x.value);break;case N.Element:F={},z=x.attribs;for(T in z){if(!R.call(z,T))continue;w=z[T],F[T]=w.value}this.node(x.name,F);break;case N.Dummy:this.dummy();break;case N.Raw:this.raw(x.value);break;case N.Text:this.text(x.value);break;case N.ProcessingInstruction:this.instruction(x.target,x.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+x.constructor.name)}for(O=x.children,A=0,X=O.length;A<X;A++)P=O[A],this.createChildNode(P),P.type===N.Element&&this.up();return this},y.prototype.dummy=function(){return this},y.prototype.node=function(x,w,T){var F;if(x==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(x));return this.openCurrent(),x=s(x),w==null&&(w={}),w=s(w),b(w)||(F=[w,T],T=F[0],w=F[1]),this.currentNode=new n(this,x,w),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,T!=null&&this.text(T),this},y.prototype.element=function(x,w,T){var F,P,A,X,z,O;if(this.currentNode&&this.currentNode.type===N.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(x)||b(x)||E(x))for(X=this.options.noValidation,this.options.noValidation=!0,O=new c(this.options).element("TEMP_ROOT"),O.element(x),this.options.noValidation=X,z=O.children,P=0,A=z.length;P<A;P++)F=z[P],this.createChildNode(F),F.type===N.Element&&this.up();else this.node(x,w,T);return this},y.prototype.attribute=function(x,w){var T,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(x));if(x!=null&&(x=s(x)),b(x))for(T in x){if(!R.call(x,T))continue;F=x[T],this.attribute(T,F)}else E(w)&&(w=w.apply()),this.options.keepNullAttributes&&w==null?this.currentNode.attribs[x]=new S(this,x,""):w!=null&&(this.currentNode.attribs[x]=new S(this,x,w));return this},y.prototype.text=function(x){var w;return this.openCurrent(),w=new o(this,x),this.onData(this.writer.text(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.cdata=function(x){var w;return this.openCurrent(),w=new k(this,x),this.onData(this.writer.cdata(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.comment=function(x){var w;return this.openCurrent(),w=new v(this,x),this.onData(this.writer.comment(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.raw=function(x){var w;return this.openCurrent(),w=new f(this,x),this.onData(this.writer.raw(w,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.instruction=function(x,w){var T,F,P,A,X;if(this.openCurrent(),x!=null&&(x=s(x)),w!=null&&(w=s(w)),Array.isArray(x))for(T=0,A=x.length;T<A;T++)F=x[T],this.instruction(F);else if(b(x))for(F in x){if(!R.call(x,F))continue;P=x[F],this.instruction(F,P)}else E(w)&&(w=w.apply()),X=new l(this,x,w),this.onData(this.writer.processingInstruction(X,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},y.prototype.declaration=function(x,w,T){var F;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return F=new h(this,x,w,T),this.onData(this.writer.declaration(F,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.doctype=function(x,w,T){if(this.openCurrent(),x==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new r(this,w,T),this.currentNode.rootNodeName=x,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},y.prototype.dtdElement=function(x,w){var T;return this.openCurrent(),T=new C(this,x,w),this.onData(this.writer.dtdElement(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.attList=function(x,w,T,F,P){var A;return this.openCurrent(),A=new m(this,x,w,T,F,P),this.onData(this.writer.dtdAttList(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.entity=function(x,w){var T;return this.openCurrent(),T=new _(this,!1,x,w),this.onData(this.writer.dtdEntity(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.pEntity=function(x,w){var T;return this.openCurrent(),T=new _(this,!0,x,w),this.onData(this.writer.dtdEntity(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.prototype.notation=function(x,w){var T;return this.openCurrent(),T=new e(this,x,w),this.onData(this.writer.dtdNotation(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},y.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},y.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},y.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},y.prototype.openNode=function(x){var w,T,F,P;if(!x.isOpen){if(!this.root&&this.currentLevel===0&&x.type===N.Element&&(this.root=x),T="",x.type===N.Element){this.writerOptions.state=g.OpenTag,T=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<"+x.name,P=x.attribs;for(F in P){if(!R.call(P,F))continue;w=P[F],T+=this.writer.attribute(w,this.writerOptions,this.currentLevel)}T+=(x.children?">":"/>")+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=g.InsideTag}else this.writerOptions.state=g.OpenTag,T=this.writer.indent(x,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+x.rootNodeName,x.pubID&&x.sysID?T+=' PUBLIC "'+x.pubID+'" "'+x.sysID+'"':x.sysID&&(T+=' SYSTEM "'+x.sysID+'"'),x.children?(T+=" [",this.writerOptions.state=g.InsideTag):(this.writerOptions.state=g.CloseTag,T+=">"),T+=this.writer.endline(x,this.writerOptions,this.currentLevel);return this.onData(T,this.currentLevel),x.isOpen=!0}},y.prototype.closeNode=function(x){var w;if(!x.isClosed)return w="",this.writerOptions.state=g.CloseTag,x.type===N.Element?w=this.writer.indent(x,this.writerOptions,this.currentLevel)+"</"+x.name+">"+this.writer.endline(x,this.writerOptions,this.currentLevel):w=this.writer.indent(x,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(x,this.writerOptions,this.currentLevel),this.writerOptions.state=g.None,this.onData(w,this.currentLevel),x.isClosed=!0},y.prototype.onData=function(x,w){return this.documentStarted=!0,this.onDataCallback(x,w+1)},y.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},y.prototype.debugInfo=function(x){return x==null?"":"node: <"+x+">"},y.prototype.ele=function(){return this.element.apply(this,arguments)},y.prototype.nod=function(x,w,T){return this.node(x,w,T)},y.prototype.txt=function(x){return this.text(x)},y.prototype.dat=function(x){return this.cdata(x)},y.prototype.com=function(x){return this.comment(x)},y.prototype.ins=function(x,w){return this.instruction(x,w)},y.prototype.dec=function(x,w,T){return this.declaration(x,w,T)},y.prototype.dtd=function(x,w,T){return this.doctype(x,w,T)},y.prototype.e=function(x,w,T){return this.element(x,w,T)},y.prototype.n=function(x,w,T){return this.node(x,w,T)},y.prototype.t=function(x){return this.text(x)},y.prototype.d=function(x){return this.cdata(x)},y.prototype.c=function(x){return this.comment(x)},y.prototype.r=function(x){return this.raw(x)},y.prototype.i=function(x,w){return this.instruction(x,w)},y.prototype.att=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},y.prototype.a=function(){return this.currentNode&&this.currentNode.type===N.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},y.prototype.ent=function(x,w){return this.entity(x,w)},y.prototype.pent=function(x,w){return this.pEntity(x,w)},y.prototype.not=function(x,w){return this.notation(x,w)},y}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=S(N);function S(k){return k&&k.__esModule?k:{default:k}}(function(){var k,v,m,C=function(h,r){for(var c in r)_.call(r,c)&&(h[c]=r[c]);function i(){this.constructor=h}return i.prototype=r.prototype,h.prototype=new i,h.__super__=r.prototype,h},_={}.hasOwnProperty;m=H("./XMLNode"),k=H("./NodeType"),Z.exports=v=function(e){C(h,e);function h(r){h.__super__.constructor.call(this,r),this.type=k.Dummy}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(r){return""},h}(m)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=S(N);function S(k){return k&&k.__esModule?k:{default:k}}(function(){var k,v,m,C,_,e,h,r,c,i=function(f,d){for(var u in d)n.call(d,u)&&(f[u]=d[u]);function o(){this.constructor=f}return o.prototype=d.prototype,f.prototype=new o,f.__super__=d.prototype,f},n={}.hasOwnProperty;c=H("./Utility"),r=c.isObject,h=c.isFunction,e=c.getValue,_=H("./XMLNode"),k=H("./NodeType"),v=H("./XMLAttribute"),C=H("./XMLNamedNodeMap"),Z.exports=m=function(l){i(f,l);function f(d,u,o){var s,E,b,p;if(f.__super__.constructor.call(this,d),u==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(u),this.type=k.Element,this.attribs={},this.schemaTypeInfo=null,o!=null&&this.attribute(o),d.type===k.Document&&(this.isRoot=!0,this.documentObject=d,d.rootObject=this,d.children)){for(p=d.children,E=0,b=p.length;E<b;E++)if(s=p[E],s.type===k.DocType){s.name=this.name;break}}}return Object.defineProperty(f.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(f.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(f.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(f.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(f.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(f.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(f.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(f.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new C(this.attribs)),this.attributeMap}}),f.prototype.clone=function(){var d,u,o,s;o=(0,g.default)(this),o.isRoot&&(o.documentObject=null),o.attribs={},s=this.attribs;for(u in s){if(!n.call(s,u))continue;d=s[u],o.attribs[u]=d.clone()}return o.children=[],this.children.forEach(function(E){var b;return b=E.clone(),b.parent=o,o.children.push(b)}),o},f.prototype.attribute=function(d,u){var o,s;if(d!=null&&(d=e(d)),r(d))for(o in d){if(!n.call(d,o))continue;s=d[o],this.attribute(o,s)}else h(u)&&(u=u.apply()),this.options.keepNullAttributes&&u==null?this.attribs[d]=new v(this,d,""):u!=null&&(this.attribs[d]=new v(this,d,u));return this},f.prototype.removeAttribute=function(d){var u,o,s;if(d==null)throw new Error("Missing attribute name. "+this.debugInfo());if(d=e(d),Array.isArray(d))for(o=0,s=d.length;o<s;o++)u=d[o],delete this.attribs[u];else delete this.attribs[d];return this},f.prototype.toString=function(d){return this.options.writer.element(this,this.options.writer.filterOptions(d))},f.prototype.att=function(d,u){return this.attribute(d,u)},f.prototype.a=function(d,u){return this.attribute(d,u)},f.prototype.getAttribute=function(d){return this.attribs.hasOwnProperty(d)?this.attribs[d].value:null},f.prototype.setAttribute=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.getAttributeNode=function(d){return this.attribs.hasOwnProperty(d)?this.attribs[d]:null},f.prototype.setAttributeNode=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.removeAttributeNode=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.getElementsByTagName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.getAttributeNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.setAttributeNS=function(d,u,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.removeAttributeNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.getAttributeNodeNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.setAttributeNodeNS=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.getElementsByTagNameNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.hasAttribute=function(d){return this.attribs.hasOwnProperty(d)},f.prototype.hasAttributeNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.setIdAttribute=function(d,u){return this.attribs.hasOwnProperty(d)?this.attribs[d].isId:u},f.prototype.setIdAttributeNS=function(d,u,o){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.setIdAttributeNode=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.getElementsByTagName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.getElementsByTagNameNS=function(d,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.getElementsByClassName=function(d){throw new Error("This DOM method is not implemented."+this.debugInfo())},f.prototype.isEqualNode=function(d){var u,o,s;if(!f.__super__.isEqualNode.apply(this,arguments).isEqualNode(d))return!1;if(d.namespaceURI!==this.namespaceURI)return!1;if(d.prefix!==this.prefix)return!1;if(d.localName!==this.localName)return!1;if(d.attribs.length!==this.attribs.length)return!1;for(u=o=0,s=this.attribs.length-1;0<=s?o<=s:o>=s;u=0<=s?++o:--o)if(!this.attribs[u].isEqualNode(d.attribs[u]))return!1;return!0},f}(_)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/keys"),g=S(N);function S(k){return k&&k.__esModule?k:{default:k}}(function(){var k;Z.exports=k=function(){function v(m){this.nodes=m}return Object.defineProperty(v.prototype,"length",{get:function(){return(0,g.default)(this.nodes).length||0}}),v.prototype.clone=function(){return this.nodes=null},v.prototype.getNamedItem=function(m){return this.nodes[m]},v.prototype.setNamedItem=function(m){var C;return C=this.nodes[m.nodeName],this.nodes[m.nodeName]=m,C||null},v.prototype.removeNamedItem=function(m){var C;return C=this.nodes[m],delete this.nodes[m],C||null},v.prototype.item=function(m){return this.nodes[(0,g.default)(this.nodes)[m]]||null},v.prototype.getNamedItemNS=function(m,C){throw new Error("This DOM method is not implemented.")},v.prototype.setNamedItemNS=function(m){throw new Error("This DOM method is not implemented.")},v.prototype.removeNamedItemNS=function(m,C){throw new Error("This DOM method is not implemented.")},v}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(H,Z,I){"use strict";(function(){var N,g,S,k,v,m,C,_,e,h,r,c,i,n,l,f,d,u,o,s={}.hasOwnProperty;o=H("./Utility"),u=o.isObject,d=o.isFunction,f=o.isEmpty,l=o.getValue,_=null,S=null,k=null,v=null,m=null,i=null,n=null,c=null,C=null,g=null,r=null,e=null,N=null,Z.exports=h=function(){function E(b){this.parent=b,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,_||(_=H("./XMLElement"),S=H("./XMLCData"),k=H("./XMLComment"),v=H("./XMLDeclaration"),m=H("./XMLDocType"),i=H("./XMLRaw"),n=H("./XMLText"),c=H("./XMLProcessingInstruction"),C=H("./XMLDummy"),g=H("./NodeType"),r=H("./XMLNodeList"),e=H("./XMLNamedNodeMap"),N=H("./DocumentPosition"))}return Object.defineProperty(E.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(E.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(E.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(E.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(E.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new r(this.children)),this.childNodeList}}),Object.defineProperty(E.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(E.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(E.prototype,"previousSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p-1]||null}}),Object.defineProperty(E.prototype,"nextSibling",{get:function(){var p;return p=this.parent.children.indexOf(this),this.parent.children[p+1]||null}}),Object.defineProperty(E.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(E.prototype,"textContent",{get:function(){var p,D,R,y,x;if(this.nodeType===g.Element||this.nodeType===g.DocumentFragment){for(x="",y=this.children,D=0,R=y.length;D<R;D++)p=y[D],p.textContent&&(x+=p.textContent);return x}else return null},set:function(p){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),E.prototype.setParent=function(b){var p,D,R,y,x;for(this.parent=b,b&&(this.options=b.options,this.stringify=b.stringify),y=this.children,x=[],D=0,R=y.length;D<R;D++)p=y[D],x.push(p.setParent(this));return x},E.prototype.element=function(b,p,D){var R,y,x,w,T,F,P,A,X,z,O;if(F=null,p===null&&D==null&&(X=[{},null],p=X[0],D=X[1]),p==null&&(p={}),p=l(p),u(p)||(z=[p,D],D=z[0],p=z[1]),b!=null&&(b=l(b)),Array.isArray(b))for(x=0,P=b.length;x<P;x++)y=b[x],F=this.element(y);else if(d(b))F=this.element(b.apply());else if(u(b))for(T in b){if(!s.call(b,T))continue;if(O=b[T],d(O)&&(O=O.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&T.indexOf(this.stringify.convertAttKey)===0)F=this.attribute(T.substr(this.stringify.convertAttKey.length),O);else if(!this.options.separateArrayItems&&Array.isArray(O)&&f(O))F=this.dummy();else if(u(O)&&f(O))F=this.element(T);else if(!this.options.keepNullNodes&&O==null)F=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(O))for(w=0,A=O.length;w<A;w++)y=O[w],R={},R[T]=y,F=this.element(R);else u(O)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&T.indexOf(this.stringify.convertTextKey)===0?F=this.element(O):(F=this.element(T),F.element(O)):F=this.element(T,O)}else!this.options.keepNullNodes&&D===null?F=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&b.indexOf(this.stringify.convertTextKey)===0?F=this.text(D):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&b.indexOf(this.stringify.convertCDataKey)===0?F=this.cdata(D):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&b.indexOf(this.stringify.convertCommentKey)===0?F=this.comment(D):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&b.indexOf(this.stringify.convertRawKey)===0?F=this.raw(D):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&b.indexOf(this.stringify.convertPIKey)===0?F=this.instruction(b.substr(this.stringify.convertPIKey.length),D):F=this.node(b,p,D);if(F==null)throw new Error("Could not create any elements with: "+b+". "+this.debugInfo());return F},E.prototype.insertBefore=function(b,p,D){var R,y,x,w,T;if(b!=null?b.type:void 0)return x=b,w=p,x.setParent(this),w?(y=children.indexOf(w),T=children.splice(y),children.push(x),Array.prototype.push.apply(children,T)):children.push(x),x;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(b));return y=this.parent.children.indexOf(this),T=this.parent.children.splice(y),R=this.parent.element(b,p,D),Array.prototype.push.apply(this.parent.children,T),R},E.prototype.insertAfter=function(b,p,D){var R,y,x;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(b));return y=this.parent.children.indexOf(this),x=this.parent.children.splice(y+1),R=this.parent.element(b,p,D),Array.prototype.push.apply(this.parent.children,x),R},E.prototype.remove=function(){var b,p;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return b=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[b,b-b+1].concat(p=[])),this.parent},E.prototype.node=function(b,p,D){var R,y;return b!=null&&(b=l(b)),p||(p={}),p=l(p),u(p)||(y=[p,D],D=y[0],p=y[1]),R=new _(this,b,p),D!=null&&R.text(D),this.children.push(R),R},E.prototype.text=function(b){var p;return u(b)&&this.element(b),p=new n(this,b),this.children.push(p),this},E.prototype.cdata=function(b){var p;return p=new S(this,b),this.children.push(p),this},E.prototype.comment=function(b){var p;return p=new k(this,b),this.children.push(p),this},E.prototype.commentBefore=function(b){var p,D,R;return D=this.parent.children.indexOf(this),R=this.parent.children.splice(D),p=this.parent.comment(b),Array.prototype.push.apply(this.parent.children,R),this},E.prototype.commentAfter=function(b){var p,D,R;return D=this.parent.children.indexOf(this),R=this.parent.children.splice(D+1),p=this.parent.comment(b),Array.prototype.push.apply(this.parent.children,R),this},E.prototype.raw=function(b){var p;return p=new i(this,b),this.children.push(p),this},E.prototype.dummy=function(){var b;return b=new C(this),b},E.prototype.instruction=function(b,p){var D,R,y,x,w;if(b!=null&&(b=l(b)),p!=null&&(p=l(p)),Array.isArray(b))for(x=0,w=b.length;x<w;x++)D=b[x],this.instruction(D);else if(u(b))for(D in b){if(!s.call(b,D))continue;R=b[D],this.instruction(D,R)}else d(p)&&(p=p.apply()),y=new c(this,b,p),this.children.push(y);return this},E.prototype.instructionBefore=function(b,p){var D,R,y;return R=this.parent.children.indexOf(this),y=this.parent.children.splice(R),D=this.parent.instruction(b,p),Array.prototype.push.apply(this.parent.children,y),this},E.prototype.instructionAfter=function(b,p){var D,R,y;return R=this.parent.children.indexOf(this),y=this.parent.children.splice(R+1),D=this.parent.instruction(b,p),Array.prototype.push.apply(this.parent.children,y),this},E.prototype.declaration=function(b,p,D){var R,y;return R=this.document(),y=new v(R,b,p,D),R.children.length===0?R.children.unshift(y):R.children[0].type===g.Declaration?R.children[0]=y:R.children.unshift(y),R.root()||R},E.prototype.dtd=function(b,p){var D,R,y,x,w,T,F,P,A,X;for(R=this.document(),y=new m(R,b,p),A=R.children,x=w=0,F=A.length;w<F;x=++w)if(D=A[x],D.type===g.DocType)return R.children[x]=y,y;for(X=R.children,x=T=0,P=X.length;T<P;x=++T)if(D=X[x],D.isRoot)return R.children.splice(x,0,y),y;return R.children.push(y),y},E.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},E.prototype.root=function(){var b;for(b=this;b;){if(b.type===g.Document)return b.rootObject;if(b.isRoot)return b;b=b.parent}},E.prototype.document=function(){var b;for(b=this;b;){if(b.type===g.Document)return b;b=b.parent}},E.prototype.end=function(b){return this.document().end(b)},E.prototype.prev=function(){var b;if(b=this.parent.children.indexOf(this),b<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[b-1]},E.prototype.next=function(){var b;if(b=this.parent.children.indexOf(this),b===-1||b===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[b+1]},E.prototype.importDocument=function(b){var p;return p=b.root().clone(),p.parent=this,p.isRoot=!1,this.children.push(p),this},E.prototype.debugInfo=function(b){var p,D;return b=b||this.name,b==null&&!((p=this.parent)!=null?p.name:void 0)?"":b==null?"parent: <"+this.parent.name+">":((D=this.parent)!=null?D.name:void 0)?"node: <"+b+">, parent: <"+this.parent.name+">":"node: <"+b+">"},E.prototype.ele=function(b,p,D){return this.element(b,p,D)},E.prototype.nod=function(b,p,D){return this.node(b,p,D)},E.prototype.txt=function(b){return this.text(b)},E.prototype.dat=function(b){return this.cdata(b)},E.prototype.com=function(b){return this.comment(b)},E.prototype.ins=function(b,p){return this.instruction(b,p)},E.prototype.doc=function(){return this.document()},E.prototype.dec=function(b,p,D){return this.declaration(b,p,D)},E.prototype.e=function(b,p,D){return this.element(b,p,D)},E.prototype.n=function(b,p,D){return this.node(b,p,D)},E.prototype.t=function(b){return this.text(b)},E.prototype.d=function(b){return this.cdata(b)},E.prototype.c=function(b){return this.comment(b)},E.prototype.r=function(b){return this.raw(b)},E.prototype.i=function(b,p){return this.instruction(b,p)},E.prototype.u=function(){return this.up()},E.prototype.importXMLBuilder=function(b){return this.importDocument(b)},E.prototype.replaceChild=function(b,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.removeChild=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.appendChild=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.hasChildNodes=function(){return this.children.length!==0},E.prototype.cloneNode=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isSupported=function(b,p){return!0},E.prototype.hasAttributes=function(){return this.attribs.length!==0},E.prototype.compareDocumentPosition=function(b){var p,D;return p=this,p===b?0:this.document()!==b.document()?(D=N.Disconnected|N.ImplementationSpecific,Math.random()<.5?D|=N.Preceding:D|=N.Following,D):p.isAncestor(b)?N.Contains|N.Preceding:p.isDescendant(b)?N.Contains|N.Following:p.isPreceding(b)?N.Preceding:N.Following},E.prototype.isSameNode=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.lookupPrefix=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isDefaultNamespace=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.lookupNamespaceURI=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isEqualNode=function(b){var p,D,R;if(b.nodeType!==this.nodeType)return!1;if(b.children.length!==this.children.length)return!1;for(p=D=0,R=this.children.length-1;0<=R?D<=R:D>=R;p=0<=R?++D:--D)if(!this.children[p].isEqualNode(b.children[p]))return!1;return!0},E.prototype.getFeature=function(b,p){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setUserData=function(b,p,D){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getUserData=function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.contains=function(b){return b?b===this||this.isDescendant(b):!1},E.prototype.isDescendant=function(b){var p,D,R,y,x;for(x=this.children,R=0,y=x.length;R<y;R++){if(p=x[R],b===p)return!0;if(D=p.isDescendant(b),D)return!0}return!1},E.prototype.isAncestor=function(b){return b.isDescendant(this)},E.prototype.isPreceding=function(b){var p,D;return p=this.treePosition(b),D=this.treePosition(this),p===-1||D===-1?!1:p<D},E.prototype.isFollowing=function(b){var p,D;return p=this.treePosition(b),D=this.treePosition(this),p===-1||D===-1?!1:p>D},E.prototype.treePosition=function(b){var p,D;return D=0,p=!1,this.foreachTreeNode(this.document(),function(R){if(D++,!p&&R===b)return p=!0}),p?D:-1},E.prototype.foreachTreeNode=function(b,p){var D,R,y,x,w;for(b||(b=this.document()),x=b.children,R=0,y=x.length;R<y;R++){if(D=x[R],w=p(D))return w;if(w=this.foreachTreeNode(D,p),w)return w}},E}()}).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(H,Z,I){"use strict";(function(){var N;Z.exports=N=function(){function g(S){this.nodes=S}return Object.defineProperty(g.prototype,"length",{get:function(){return this.nodes.length||0}}),g.prototype.clone=function(){return this.nodes=null},g.prototype.item=function(S){return this.nodes[S]||null},g}()}).call(void 0)},{}],275:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=S(N);function S(k){return k&&k.__esModule?k:{default:k}}(function(){var k,v,m,C=function(h,r){for(var c in r)_.call(r,c)&&(h[c]=r[c]);function i(){this.constructor=h}return i.prototype=r.prototype,h.prototype=new i,h.__super__=r.prototype,h},_={}.hasOwnProperty;k=H("./NodeType"),v=H("./XMLCharacterData"),Z.exports=m=function(e){C(h,e);function h(r,c,i){if(h.__super__.constructor.call(this,r),c==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=k.ProcessingInstruction,this.target=this.stringify.insTarget(c),this.name=this.target,i&&(this.value=this.stringify.insValue(i))}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(r){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(r))},h.prototype.isEqualNode=function(r){return h.__super__.isEqualNode.apply(this,arguments).isEqualNode(r)?!(r.target!==this.target):!1},h}(v)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=S(N);function S(k){return k&&k.__esModule?k:{default:k}}(function(){var k,v,m,C=function(h,r){for(var c in r)_.call(r,c)&&(h[c]=r[c]);function i(){this.constructor=h}return i.prototype=r.prototype,h.prototype=new i,h.__super__=r.prototype,h},_={}.hasOwnProperty;k=H("./NodeType"),v=H("./XMLNode"),Z.exports=m=function(e){C(h,e);function h(r,c){if(h.__super__.constructor.call(this,r),c==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=k.Raw,this.value=this.stringify.raw(c)}return h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(r){return this.options.writer.raw(this,this.options.writer.filterOptions(r))},h}(v)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(H,Z,I){"use strict";(function(){var N,g,S,k,v=function(_,e){for(var h in e)m.call(e,h)&&(_[h]=e[h]);function r(){this.constructor=_}return r.prototype=e.prototype,_.prototype=new r,_.__super__=e.prototype,_},m={}.hasOwnProperty;N=H("./NodeType"),k=H("./XMLWriterBase"),g=H("./WriterState"),Z.exports=S=function(C){v(_,C);function _(e,h){this.stream=e,_.__super__.constructor.call(this,h)}return _.prototype.endline=function(e,h,r){return e.isLastRootNode&&h.state===g.CloseTag?"":_.__super__.endline.call(this,e,h,r)},_.prototype.document=function(e,h){var r,c,i,n,l,f,d,u,o;for(d=e.children,c=i=0,l=d.length;i<l;c=++i)r=d[c],r.isLastRootNode=c===e.children.length-1;for(h=this.filterOptions(h),u=e.children,o=[],n=0,f=u.length;n<f;n++)r=u[n],o.push(this.writeChildNode(r,h,0));return o},_.prototype.attribute=function(e,h,r){return this.stream.write(_.__super__.attribute.call(this,e,h,r))},_.prototype.cdata=function(e,h,r){return this.stream.write(_.__super__.cdata.call(this,e,h,r))},_.prototype.comment=function(e,h,r){return this.stream.write(_.__super__.comment.call(this,e,h,r))},_.prototype.declaration=function(e,h,r){return this.stream.write(_.__super__.declaration.call(this,e,h,r))},_.prototype.docType=function(e,h,r){var c,i,n,l;if(r||(r=0),this.openNode(e,h,r),h.state=g.OpenTag,this.stream.write(this.indent(e,h,r)),this.stream.write("<!DOCTYPE "+e.root().name),e.pubID&&e.sysID?this.stream.write(' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'):e.sysID&&this.stream.write(' SYSTEM "'+e.sysID+'"'),e.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(e,h,r)),h.state=g.InsideTag,l=e.children,i=0,n=l.length;i<n;i++)c=l[i],this.writeChildNode(c,h,r+1);h.state=g.CloseTag,this.stream.write("]")}return h.state=g.CloseTag,this.stream.write(h.spaceBeforeSlash+">"),this.stream.write(this.endline(e,h,r)),h.state=g.None,this.closeNode(e,h,r)},_.prototype.element=function(e,h,r){var c,i,n,l,f,d,u,o,s,E;r||(r=0),this.openNode(e,h,r),h.state=g.OpenTag,this.stream.write(this.indent(e,h,r)+"<"+e.name),s=e.attribs;for(u in s){if(!m.call(s,u))continue;c=s[u],this.attribute(c,h,r)}if(n=e.children.length,l=n===0?null:e.children[0],n===0||e.children.every(function(b){return(b.type===N.Text||b.type===N.Raw)&&b.value===""}))h.allowEmpty?(this.stream.write(">"),h.state=g.CloseTag,this.stream.write("</"+e.name+">")):(h.state=g.CloseTag,this.stream.write(h.spaceBeforeSlash+"/>"));else if(h.pretty&&n===1&&(l.type===N.Text||l.type===N.Raw)&&l.value!=null)this.stream.write(">"),h.state=g.InsideTag,h.suppressPrettyCount++,o=!0,this.writeChildNode(l,h,r+1),h.suppressPrettyCount--,o=!1,h.state=g.CloseTag,this.stream.write("</"+e.name+">");else{for(this.stream.write(">"+this.endline(e,h,r)),h.state=g.InsideTag,E=e.children,f=0,d=E.length;f<d;f++)i=E[f],this.writeChildNode(i,h,r+1);h.state=g.CloseTag,this.stream.write(this.indent(e,h,r)+"</"+e.name+">")}return this.stream.write(this.endline(e,h,r)),h.state=g.None,this.closeNode(e,h,r)},_.prototype.processingInstruction=function(e,h,r){return this.stream.write(_.__super__.processingInstruction.call(this,e,h,r))},_.prototype.raw=function(e,h,r){return this.stream.write(_.__super__.raw.call(this,e,h,r))},_.prototype.text=function(e,h,r){return this.stream.write(_.__super__.text.call(this,e,h,r))},_.prototype.dtdAttList=function(e,h,r){return this.stream.write(_.__super__.dtdAttList.call(this,e,h,r))},_.prototype.dtdElement=function(e,h,r){return this.stream.write(_.__super__.dtdElement.call(this,e,h,r))},_.prototype.dtdEntity=function(e,h,r){return this.stream.write(_.__super__.dtdEntity.call(this,e,h,r))},_.prototype.dtdNotation=function(e,h,r){return this.stream.write(_.__super__.dtdNotation.call(this,e,h,r))},_}(k)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(H,Z,I){"use strict";(function(){var N,g,S=function(m,C){for(var _ in C)k.call(C,_)&&(m[_]=C[_]);function e(){this.constructor=m}return e.prototype=C.prototype,m.prototype=new e,m.__super__=C.prototype,m},k={}.hasOwnProperty;g=H("./XMLWriterBase"),Z.exports=N=function(v){S(m,v);function m(C){m.__super__.constructor.call(this,C)}return m.prototype.document=function(C,_){var e,h,r,c,i;for(_=this.filterOptions(_),c="",i=C.children,h=0,r=i.length;h<r;h++)e=i[h],c+=this.writeChildNode(e,_,0);return _.pretty&&c.slice(-_.newline.length)===_.newline&&(c=c.slice(0,-_.newline.length)),c},m}(g)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(H,Z,I){"use strict";(function(){var N,g=function(v,m){return function(){return v.apply(m,arguments)}},S={}.hasOwnProperty;Z.exports=N=function(){function k(v){this.assertLegalName=g(this.assertLegalName,this),this.assertLegalChar=g(this.assertLegalChar,this);var m,C,_;v||(v={}),this.options=v,this.options.version||(this.options.version="1.0"),C=v.stringify||{};for(m in C){if(!S.call(C,m))continue;_=C[m],this[m]=_}}return k.prototype.name=function(v){return this.options.noValidation?v:this.assertLegalName(""+v||"")},k.prototype.text=function(v){return this.options.noValidation?v:this.assertLegalChar(this.textEscape(""+v||""))},k.prototype.cdata=function(v){return this.options.noValidation?v:(v=""+v||"",v=v.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(v))},k.prototype.comment=function(v){if(this.options.noValidation)return v;if(v=""+v||"",v.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+v);return this.assertLegalChar(v)},k.prototype.raw=function(v){return this.options.noValidation?v:""+v||""},k.prototype.attValue=function(v){return this.options.noValidation?v:this.assertLegalChar(this.attEscape(v=""+v||""))},k.prototype.insTarget=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},k.prototype.insValue=function(v){if(this.options.noValidation)return v;if(v=""+v||"",v.match(/\?>/))throw new Error("Invalid processing instruction value: "+v);return this.assertLegalChar(v)},k.prototype.xmlVersion=function(v){if(this.options.noValidation)return v;if(v=""+v||"",!v.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+v);return v},k.prototype.xmlEncoding=function(v){if(this.options.noValidation)return v;if(v=""+v||"",!v.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+v);return this.assertLegalChar(v)},k.prototype.xmlStandalone=function(v){return this.options.noValidation?v:v?"yes":"no"},k.prototype.dtdPubID=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},k.prototype.dtdSysID=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},k.prototype.dtdElementValue=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},k.prototype.dtdAttType=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},k.prototype.dtdAttDefault=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},k.prototype.dtdEntityValue=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},k.prototype.dtdNData=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},k.prototype.convertAttKey="@",k.prototype.convertPIKey="?",k.prototype.convertTextKey="#text",k.prototype.convertCDataKey="#cdata",k.prototype.convertCommentKey="#comment",k.prototype.convertRawKey="#raw",k.prototype.assertLegalChar=function(v){var m,C;if(this.options.noValidation)return v;if(m="",this.options.version==="1.0"){if(m=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C=v.match(m))throw new Error("Invalid character in string: "+v+" at index "+C.index)}else if(this.options.version==="1.1"&&(m=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,C=v.match(m)))throw new Error("Invalid character in string: "+v+" at index "+C.index);return v},k.prototype.assertLegalName=function(v){var m;if(this.options.noValidation)return v;if(this.assertLegalChar(v),m=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!v.match(m))throw new Error("Invalid character in name");return v},k.prototype.textEscape=function(v){var m;return this.options.noValidation?v:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,v.replace(m,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},k.prototype.attEscape=function(v){var m;return this.options.noValidation?v:(m=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,v.replace(m,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},k}()}).call(void 0)},{}],280:[function(H,Z,I){"use strict";var N=H("babel-runtime/core-js/object/create"),g=S(N);function S(k){return k&&k.__esModule?k:{default:k}}(function(){var k,v,m,C=function(h,r){for(var c in r)_.call(r,c)&&(h[c]=r[c]);function i(){this.constructor=h}return i.prototype=r.prototype,h.prototype=new i,h.__super__=r.prototype,h},_={}.hasOwnProperty;k=H("./NodeType"),v=H("./XMLCharacterData"),Z.exports=m=function(e){C(h,e);function h(r,c){if(h.__super__.constructor.call(this,r),c==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=k.Text,this.value=this.stringify.text(c)}return Object.defineProperty(h.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(h.prototype,"wholeText",{get:function(){var c,i,n;for(n="",i=this.previousSibling;i;)n=i.data+n,i=i.previousSibling;for(n+=this.data,c=this.nextSibling;c;)n=n+c.data,c=c.nextSibling;return n}}),h.prototype.clone=function(){return(0,g.default)(this)},h.prototype.toString=function(r){return this.options.writer.text(this,this.options.writer.filterOptions(r))},h.prototype.splitText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},h.prototype.replaceWholeText=function(r){throw new Error("This DOM method is not implemented."+this.debugInfo())},h}(v)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(H,Z,I){"use strict";(function(){var N,g,S,k,v,m,C,_,e,h,r,c,i,n,l,f,d,u={}.hasOwnProperty;d=H("./Utility").assign,N=H("./NodeType"),e=H("./XMLDeclaration"),h=H("./XMLDocType"),S=H("./XMLCData"),k=H("./XMLComment"),c=H("./XMLElement"),n=H("./XMLRaw"),l=H("./XMLText"),i=H("./XMLProcessingInstruction"),r=H("./XMLDummy"),v=H("./XMLDTDAttList"),m=H("./XMLDTDElement"),C=H("./XMLDTDEntity"),_=H("./XMLDTDNotation"),g=H("./WriterState"),Z.exports=f=function(){function o(s){var E,b,p;s||(s={}),this.options=s,b=s.writer||{};for(E in b){if(!u.call(b,E))continue;p=b[E],this["_"+E]=this[E],this[E]=p}}return o.prototype.filterOptions=function(s){var E,b,p,D,R,y,x,w;return s||(s={}),s=d({},this.options,s),E={writer:this},E.pretty=s.pretty||!1,E.allowEmpty=s.allowEmpty||!1,E.indent=(b=s.indent)!=null?b:" ",E.newline=(p=s.newline)!=null?p:`
|
|
|
`,E.offset=(D=s.offset)!=null?D:0,E.dontPrettyTextNodes=(R=(y=s.dontPrettyTextNodes)!=null?y:s.dontprettytextnodes)!=null?R:0,E.spaceBeforeSlash=(x=(w=s.spaceBeforeSlash)!=null?w:s.spacebeforeslash)!=null?x:"",E.spaceBeforeSlash===!0&&(E.spaceBeforeSlash=" "),E.suppressPrettyCount=0,E.user={},E.state=g.None,E},o.prototype.indent=function(s,E,b){var p;return!E.pretty||E.suppressPrettyCount?"":E.pretty&&(p=(b||0)+E.offset+1,p>0)?new Array(p).join(E.indent):""},o.prototype.endline=function(s,E,b){return!E.pretty||E.suppressPrettyCount?"":E.newline},o.prototype.attribute=function(s,E,b){var p;return this.openAttribute(s,E,b),p=" "+s.name+'="'+s.value+'"',this.closeAttribute(s,E,b),p},o.prototype.cdata=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b)+"<![CDATA[",E.state=g.InsideTag,p+=s.value,E.state=g.CloseTag,p+="]]>"+this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.comment=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b)+"<!-- ",E.state=g.InsideTag,p+=s.value,E.state=g.CloseTag,p+=" -->"+this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.declaration=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b)+"<?xml",E.state=g.InsideTag,p+=' version="'+s.version+'"',s.encoding!=null&&(p+=' encoding="'+s.encoding+'"'),s.standalone!=null&&(p+=' standalone="'+s.standalone+'"'),E.state=g.CloseTag,p+=E.spaceBeforeSlash+"?>",p+=this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.docType=function(s,E,b){var p,D,R,y,x;if(b||(b=0),this.openNode(s,E,b),E.state=g.OpenTag,y=this.indent(s,E,b),y+="<!DOCTYPE "+s.root().name,s.pubID&&s.sysID?y+=' PUBLIC "'+s.pubID+'" "'+s.sysID+'"':s.sysID&&(y+=' SYSTEM "'+s.sysID+'"'),s.children.length>0){for(y+=" [",y+=this.endline(s,E,b),E.state=g.InsideTag,x=s.children,D=0,R=x.length;D<R;D++)p=x[D],y+=this.writeChildNode(p,E,b+1);E.state=g.CloseTag,y+="]"}return E.state=g.CloseTag,y+=E.spaceBeforeSlash+">",y+=this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),y},o.prototype.element=function(s,E,b){var p,D,R,y,x,w,T,F,P,A,X,z,O,B;b||(b=0),A=!1,X="",this.openNode(s,E,b),E.state=g.OpenTag,X+=this.indent(s,E,b)+"<"+s.name,z=s.attribs;for(P in z){if(!u.call(z,P))continue;p=z[P],X+=this.attribute(p,E,b)}if(R=s.children.length,y=R===0?null:s.children[0],R===0||s.children.every(function(U){return(U.type===N.Text||U.type===N.Raw)&&U.value===""}))E.allowEmpty?(X+=">",E.state=g.CloseTag,X+="</"+s.name+">"+this.endline(s,E,b)):(E.state=g.CloseTag,X+=E.spaceBeforeSlash+"/>"+this.endline(s,E,b));else if(E.pretty&&R===1&&(y.type===N.Text||y.type===N.Raw)&&y.value!=null)X+=">",E.state=g.InsideTag,E.suppressPrettyCount++,A=!0,X+=this.writeChildNode(y,E,b+1),E.suppressPrettyCount--,A=!1,E.state=g.CloseTag,X+="</"+s.name+">"+this.endline(s,E,b);else{if(E.dontPrettyTextNodes){for(O=s.children,x=0,T=O.length;x<T;x++)if(D=O[x],(D.type===N.Text||D.type===N.Raw)&&D.value!=null){E.suppressPrettyCount++,A=!0;break}}for(X+=">"+this.endline(s,E,b),E.state=g.InsideTag,B=s.children,w=0,F=B.length;w<F;w++)D=B[w],X+=this.writeChildNode(D,E,b+1);E.state=g.CloseTag,X+=this.indent(s,E,b)+"</"+s.name+">",A&&E.suppressPrettyCount--,X+=this.endline(s,E,b),E.state=g.None}return this.closeNode(s,E,b),X},o.prototype.writeChildNode=function(s,E,b){switch(s.type){case N.CData:return this.cdata(s,E,b);case N.Comment:return this.comment(s,E,b);case N.Element:return this.element(s,E,b);case N.Raw:return this.raw(s,E,b);case N.Text:return this.text(s,E,b);case N.ProcessingInstruction:return this.processingInstruction(s,E,b);case N.Dummy:return"";case N.Declaration:return this.declaration(s,E,b);case N.DocType:return this.docType(s,E,b);case N.AttributeDeclaration:return this.dtdAttList(s,E,b);case N.ElementDeclaration:return this.dtdElement(s,E,b);case N.EntityDeclaration:return this.dtdEntity(s,E,b);case N.NotationDeclaration:return this.dtdNotation(s,E,b);default:throw new Error("Unknown XML node type: "+s.constructor.name)}},o.prototype.processingInstruction=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b)+"<?",E.state=g.InsideTag,p+=s.target,s.value&&(p+=" "+s.value),E.state=g.CloseTag,p+=E.spaceBeforeSlash+"?>",p+=this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.raw=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b),E.state=g.InsideTag,p+=s.value,E.state=g.CloseTag,p+=this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.text=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b),E.state=g.InsideTag,p+=s.value,E.state=g.CloseTag,p+=this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.dtdAttList=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b)+"<!ATTLIST",E.state=g.InsideTag,p+=" "+s.elementName+" "+s.attributeName+" "+s.attributeType,s.defaultValueType!=="#DEFAULT"&&(p+=" "+s.defaultValueType),s.defaultValue&&(p+=' "'+s.defaultValue+'"'),E.state=g.CloseTag,p+=E.spaceBeforeSlash+">"+this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.dtdElement=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b)+"<!ELEMENT",E.state=g.InsideTag,p+=" "+s.name+" "+s.value,E.state=g.CloseTag,p+=E.spaceBeforeSlash+">"+this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.dtdEntity=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b)+"<!ENTITY",E.state=g.InsideTag,s.pe&&(p+=" %"),p+=" "+s.name,s.value?p+=' "'+s.value+'"':(s.pubID&&s.sysID?p+=' PUBLIC "'+s.pubID+'" "'+s.sysID+'"':s.sysID&&(p+=' SYSTEM "'+s.sysID+'"'),s.nData&&(p+=" NDATA "+s.nData)),E.state=g.CloseTag,p+=E.spaceBeforeSlash+">"+this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.dtdNotation=function(s,E,b){var p;return this.openNode(s,E,b),E.state=g.OpenTag,p=this.indent(s,E,b)+"<!NOTATION",E.state=g.InsideTag,p+=" "+s.name,s.pubID&&s.sysID?p+=' PUBLIC "'+s.pubID+'" "'+s.sysID+'"':s.pubID?p+=' PUBLIC "'+s.pubID+'"':s.sysID&&(p+=' SYSTEM "'+s.sysID+'"'),E.state=g.CloseTag,p+=E.spaceBeforeSlash+">"+this.endline(s,E,b),E.state=g.None,this.closeNode(s,E,b),p},o.prototype.openNode=function(s,E,b){},o.prototype.closeNode=function(s,E,b){},o.prototype.openAttribute=function(s,E,b){},o.prototype.closeAttribute=function(s,E,b){},o}()}).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(H,Z,I){"use strict";(function(){var N,g,S,k,v,m,C,_,e,h;h=H("./Utility"),_=h.assign,e=h.isFunction,S=H("./XMLDOMImplementation"),k=H("./XMLDocument"),v=H("./XMLDocumentCB"),C=H("./XMLStringWriter"),m=H("./XMLStreamWriter"),N=H("./NodeType"),g=H("./WriterState"),Z.exports.create=function(r,c,i,n){var l,f;if(r==null)throw new Error("Root element needs a name.");return n=_({},c,i,n),l=new k(n),f=l.element(r),n.headless||(l.declaration(n),(n.pubID!=null||n.sysID!=null)&&l.dtd(n)),f},Z.exports.begin=function(r,c,i){var n;return e(r)&&(n=[r,c],c=n[0],i=n[1],r={}),c?new v(r,c,i):new k(r)},Z.exports.stringWriter=function(r){return new C(r)},Z.exports.streamWriter=function(r,c){return new m(r,c)},Z.exports.implementation=new S,Z.exports.nodeType=N,Z.exports.writerState=g}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(H,Z,I){Z.exports=g;var N=Object.prototype.hasOwnProperty;function g(){for(var S={},k=0;k<arguments.length;k++){var v=arguments[k];for(var m in v)N.call(v,m)&&(S[m]=v[m])}return S}},{}],284:[function(H,Z,I){"use strict";var N=H("buffer").Buffer,g=H("./sha"),S=H("./md5"),k={sha1:g,md5:S},v=64,m=N.alloc(v);m.fill(0);function C(h,r,c){N.isBuffer(r)||(r=N.from(r)),N.isBuffer(c)||(c=N.from(c)),r.length>v?r=h(r):r.length<v&&(r=N.concat([r,m],v));for(var i=N.alloc(v),n=N.alloc(v),l=0;l<v;l++)i[l]=r[l]^54,n[l]=r[l]^92;var f=h(N.concat([i,c]));return h(N.concat([n,f]))}function _(h,r){h=h||"sha1";var c=k[h],i=[],n=0;return c||e("algorithm:",h,"is not yet supported"),{update:function(f){return N.isBuffer(f)||(f=N.from(f)),i.push(f),n+=f.length,this},digest:function(f){var d=N.concat(i),u=r?C(c,r,d):c(d);return i=null,f?u.toString(f):u}}}function e(){var h=[].slice.call(arguments).join(" ");throw new Error([h,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}I.createHash=function(h){return _(h)},I.createHmac=function(h,r){return _(h,r)},I.createCredentials=function(){e("sorry,createCredentials is not implemented yet")},I.createCipher=function(){e("sorry,createCipher is not implemented yet")},I.createCipheriv=function(){e("sorry,createCipheriv is not implemented yet")},I.createDecipher=function(){e("sorry,createDecipher is not implemented yet")},I.createDecipheriv=function(){e("sorry,createDecipheriv is not implemented yet")},I.createSign=function(){e("sorry,createSign is not implemented yet")},I.createVerify=function(){e("sorry,createVerify is not implemented yet")},I.createDiffieHellman=function(){e("sorry,createDiffieHellman is not implemented yet")},I.pbkdf2=function(){e("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(H,Z,I){"use strict";var N=H("buffer").Buffer,g=4,S=N.alloc(g);S.fill(0);var k=8;function v(_,e){if(_.length%g!==0){var h=_.length+(g-_.length%g);_=N.concat([_,S],h)}for(var r=[],c=e?_.readInt32BE:_.readInt32LE,i=0;i<_.length;i+=g)r.push(c.call(_,i));return r}function m(_,e,h){for(var r=N.alloc(e),c=h?r.writeInt32BE:r.writeInt32LE,i=0;i<_.length;i++)c.call(r,_[i],i*4,!0);return r}function C(_,e,h,r){N.isBuffer(_)||(_=N.from(_));var c=e(v(_,r),_.length*k);return m(c,h,r)}Z.exports={hash:C}},{buffer:73}],286:[function(H,Z,I){"use strict";var N=H("./helpers");function g(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function S(r,c){r[c>>5]|=128<<c%32,r[(c+64>>>9<<4)+14]=c;for(var i=1732584193,n=-271733879,l=-1732584194,f=271733878,d=0;d<r.length;d+=16){var u=i,o=n,s=l,E=f;i=v(i,n,l,f,r[d+0],7,-680876936),f=v(f,i,n,l,r[d+1],12,-389564586),l=v(l,f,i,n,r[d+2],17,606105819),n=v(n,l,f,i,r[d+3],22,-1044525330),i=v(i,n,l,f,r[d+4],7,-176418897),f=v(f,i,n,l,r[d+5],12,1200080426),l=v(l,f,i,n,r[d+6],17,-1473231341),n=v(n,l,f,i,r[d+7],22,-45705983),i=v(i,n,l,f,r[d+8],7,1770035416),f=v(f,i,n,l,r[d+9],12,-1958414417),l=v(l,f,i,n,r[d+10],17,-42063),n=v(n,l,f,i,r[d+11],22,-1990404162),i=v(i,n,l,f,r[d+12],7,1804603682),f=v(f,i,n,l,r[d+13],12,-40341101),l=v(l,f,i,n,r[d+14],17,-1502002290),n=v(n,l,f,i,r[d+15],22,1236535329),i=m(i,n,l,f,r[d+1],5,-165796510),f=m(f,i,n,l,r[d+6],9,-1069501632),l=m(l,f,i,n,r[d+11],14,643717713),n=m(n,l,f,i,r[d+0],20,-373897302),i=m(i,n,l,f,r[d+5],5,-701558691),f=m(f,i,n,l,r[d+10],9,38016083),l=m(l,f,i,n,r[d+15],14,-660478335),n=m(n,l,f,i,r[d+4],20,-405537848),i=m(i,n,l,f,r[d+9],5,568446438),f=m(f,i,n,l,r[d+14],9,-1019803690),l=m(l,f,i,n,r[d+3],14,-187363961),n=m(n,l,f,i,r[d+8],20,1163531501),i=m(i,n,l,f,r[d+13],5,-1444681467),f=m(f,i,n,l,r[d+2],9,-51403784),l=m(l,f,i,n,r[d+7],14,1735328473),n=m(n,l,f,i,r[d+12],20,-1926607734),i=C(i,n,l,f,r[d+5],4,-378558),f=C(f,i,n,l,r[d+8],11,-2022574463),l=C(l,f,i,n,r[d+11],16,1839030562),n=C(n,l,f,i,r[d+14],23,-35309556),i=C(i,n,l,f,r[d+1],4,-1530992060),f=C(f,i,n,l,r[d+4],11,1272893353),l=C(l,f,i,n,r[d+7],16,-155497632),n=C(n,l,f,i,r[d+10],23,-1094730640),i=C(i,n,l,f,r[d+13],4,681279174),f=C(f,i,n,l,r[d+0],11,-358537222),l=C(l,f,i,n,r[d+3],16,-722521979),n=C(n,l,f,i,r[d+6],23,76029189),i=C(i,n,l,f,r[d+9],4,-640364487),f=C(f,i,n,l,r[d+12],11,-421815835),l=C(l,f,i,n,r[d+15],16,530742520),n=C(n,l,f,i,r[d+2],23,-995338651),i=_(i,n,l,f,r[d+0],6,-198630844),f=_(f,i,n,l,r[d+7],10,1126891415),l=_(l,f,i,n,r[d+14],15,-1416354905),n=_(n,l,f,i,r[d+5],21,-57434055),i=_(i,n,l,f,r[d+12],6,1700485571),f=_(f,i,n,l,r[d+3],10,-1894986606),l=_(l,f,i,n,r[d+10],15,-1051523),n=_(n,l,f,i,r[d+1],21,-2054922799),i=_(i,n,l,f,r[d+8],6,1873313359),f=_(f,i,n,l,r[d+15],10,-30611744),l=_(l,f,i,n,r[d+6],15,-1560198380),n=_(n,l,f,i,r[d+13],21,1309151649),i=_(i,n,l,f,r[d+4],6,-145523070),f=_(f,i,n,l,r[d+11],10,-1120210379),l=_(l,f,i,n,r[d+2],15,718787259),n=_(n,l,f,i,r[d+9],21,-343485551),i=e(i,u),n=e(n,o),l=e(l,s),f=e(f,E)}return Array(i,n,l,f)}function k(r,c,i,n,l,f){return e(h(e(e(c,r),e(n,f)),l),i)}function v(r,c,i,n,l,f,d){return k(c&i|~c&n,r,c,l,f,d)}function m(r,c,i,n,l,f,d){return k(c&n|i&~n,r,c,l,f,d)}function C(r,c,i,n,l,f,d){return k(c^i^n,r,c,l,f,d)}function _(r,c,i,n,l,f,d){return k(i^(c|~n),r,c,l,f,d)}function e(r,c){var i=(r&65535)+(c&65535),n=(r>>16)+(c>>16)+(i>>16);return n<<16|i&65535}function h(r,c){return r<<c|r>>>32-c}Z.exports=function(c){return N.hash(c,S,16)}},{"./helpers":285}],287:[function(H,Z,I){"use strict";var N=H("./helpers");function g(C,_){C[_>>5]|=128<<24-_%32,C[(_+64>>9<<4)+15]=_;for(var e=Array(80),h=1732584193,r=-271733879,c=-1732584194,i=271733878,n=-1009589776,l=0;l<C.length;l+=16){for(var f=h,d=r,u=c,o=i,s=n,E=0;E<80;E++){E<16?e[E]=C[l+E]:e[E]=m(e[E-3]^e[E-8]^e[E-14]^e[E-16],1);var b=v(v(m(h,5),S(E,r,c,i)),v(v(n,e[E]),k(E)));n=i,i=c,c=m(r,30),r=h,h=b}h=v(h,f),r=v(r,d),c=v(c,u),i=v(i,o),n=v(n,s)}return Array(h,r,c,i,n)}function S(C,_,e,h){return C<20?_&e|~_&h:C<40?_^e^h:C<60?_&e|_&h|e&h:_^e^h}function k(C){return C<20?1518500249:C<40?1859775393:C<60?-1894007588:-899497514}function v(C,_){var e=(C&65535)+(_&65535),h=(C>>16)+(_>>16)+(e>>16);return h<<16|e&65535}function m(C,_){return C<<_|C>>>32-_}Z.exports=function(_){return N.hash(_,g,20,!0)}},{"./helpers":285}],288:[function(H,Z,I){"use strict";Z.exports=function(){return function(){}}},{}],289:[function(H,Z,I){(function(N){"use strict";var g=H("babel-runtime/helpers/typeof"),S=k(g);function k(h){return h&&h.__esModule?h:{default:h}}var v=H("stream"),m=v.Stream,C=H("../lib/common/utils/isArray"),_=C.isArray;Z.exports.string=function(r){return typeof r=="string"},Z.exports.array=_,Z.exports.buffer=N.isBuffer;function e(h){return h instanceof m}Z.exports.writableStream=function(r){return e(r)&&typeof r._write=="function"&&(0,S.default)(r._writableState)==="object"}}).call(this,{isBuffer:H("../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(H,Z,I){"use strict";I.encodeURIComponent=function(N){try{return encodeURIComponent(N)}catch(g){return N}},I.escape=H("escape-html"),I.timestamp=function(g){if(g){var S=g;return typeof S=="string"&&(S=Number(S)),String(g).length===10&&(S*=1e3),new Date(S)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(H,Z,I){(function(N,g){"use strict";var S=H("babel-runtime/core-js/json/stringify"),k=C(S),v=H("babel-runtime/helpers/typeof"),m=C(v);function C(E){return E&&E.__esModule?E:{default:E}}var _=H("util"),e=H("url"),h=H("http"),r=H("https"),c=H("debug")("urllib"),i=H("humanize-ms"),n,l=0,f=Math.pow(2,31)-10,d=/^https?:\/\//i;function u(E,b){return E===void 0?b:E}function o(E,b){return function(p,D,R){if(p)return b(p);E({data:D,status:R.statusCode,headers:R.headers,res:R})}}I.TIMEOUTS=[i("300s"),i("300s")];var s=["json","text"];I.request=function(b,p,D){return arguments.length===2&&typeof p=="function"&&(D=p,p=null),typeof D=="function"?I.requestWithCallback(b,p,D):(n||(n=H("any-promise")),new n(function(R,y){I.requestWithCallback(b,p,o(R,y))}))},I.requestWithCallback=function(b,p,D){if(!b||typeof b!="string"&&(typeof b=="undefined"?"undefined":(0,m.default)(b))!=="object"){var R=_.format("expect request url to be a string or a http request options, but got %j",b);throw new Error(R)}arguments.length===2&&typeof p=="function"&&(D=p,p=null),p=p||{},l>=f&&(l=0);var y=++l;p.requestUrls=p.requestUrls||[];var x={requestId:y,url:b,args:p,ctx:p.ctx};p.emitter&&p.emitter.emit("request",x),p.timeout=p.timeout||I.TIMEOUTS,p.maxRedirects=p.maxRedirects||10,p.streaming=p.streaming||p.customResponse;var w=Date.now(),T;typeof b=="string"?(d.test(b)||(b="http://"+b),T=e.parse(b)):T=b;var F=(p.type||p.method||T.method||"GET").toUpperCase(),P=T.port||80,A=h,X=u(p.agent,I.agent),z=p.fixJSONCtlChars;T.protocol==="https:"&&(A=r,X=u(p.httpsAgent,I.httpsAgent),T.port||(P=443));var O={host:T.hostname||T.host||"localhost",path:T.path||"/",method:F,port:P,agent:X,headers:p.headers||{},lookup:p.lookup};Array.isArray(p.timeout)?O.requestTimeout=p.timeout[p.timeout.length-1]:typeof p.timeout!="undefined"&&(O.requestTimeout=p.timeout);for(var B=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],U=0;U<B.length;U++){var L=B[U];p.hasOwnProperty(L)&&(O[L]=p[L])}O.rejectUnauthorized===!1&&!O.hasOwnProperty("secureOptions")&&(O.secureOptions=H("constants").SSL_OP_NO_TLSv1_2);var G=p.auth||T.auth;G&&(O.auth=G);var ee=p.content||p.data,oe=F==="GET"||F==="HEAD"||p.dataAsQueryString;if(!p.content&&(ee&&!(typeof ee=="string"||g.isBuffer(ee))))if(oe)ee=p.nestedQuerystring?qs.stringify(ee):querystring.stringify(ee);else{var ae=O.headers["Content-Type"]||O.headers["content-type"];ae||(p.contentType==="json"?ae="application/json":ae="application/x-www-form-urlencoded",O.headers["Content-Type"]=ae),parseContentType(ae).type==="application/json"?ee=(0,k.default)(ee):ee=p.nestedQuerystring?qs.stringify(ee):querystring.stringify(ee)}oe&&ee&&(O.path+=(T.query?"&":"?")+ee,ee=null);var be=0;if(ee){var _e=ee.length;g.isBuffer(ee)||(_e=g.byteLength(ee)),be=O.headers["Content-Length"]=_e}p.dataType==="json"&&(O.headers.Accept="application/json"),typeof p.beforeRequest=="function"&&p.beforeRequest(O);var fe=null,Re=null,Oe=null,de=!1,te=!1,W=0,Y=-1,V=!1,Q="",q="",ie=null;p.timing&&(ie={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function ne(){fe&&(clearTimeout(fe),fe=null)}function J(){Re&&(clearTimeout(Re),Re=null)}function $(Ie,Je,rt){if(J(),!D){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),y,N.pid,O.method,b),Ie&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),y,N.pid,Ie.name,Ie.message,Ie.stack);return}var ye=D;D=null;var ue={};if(rt&&(Y=rt.statusCode,ue=rt.headers),Y===401&&ue["www-authenticate"]&&(!p.headers||!p.headers.Authorization)&&p.digestAuth){var he=ue["www-authenticate"];if(he.indexOf("Digest ")>=0)return c("Request#%d %s: got digest auth header WWW-Authenticate: %s",y,b,he),p.headers=p.headers||{},p.headers.Authorization=digestAuthHeader(O.method,O.path,he,p.digestAuth),c("Request#%d %s: auth with digest header: %s",y,b,p.headers.Authorization),rt.headers["set-cookie"]&&(p.headers.Cookie=rt.headers["set-cookie"].join(";")),I.requestWithCallback(b,p,ye)}var me=Date.now()-w;ie&&(ie.contentDownload=me),c("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",me,W,Y,O.method,O.host,O.path,te,ie);var Ce={status:Y,statusCode:Y,headers:ue,size:W,aborted:V,rt:me,keepAliveSocket:te,data:Je,requestUrls:p.requestUrls,timing:ie,remoteAddress:Q,remotePort:q};if(Ie){var ge="";X&&typeof X.getCurrentStatus=="function"&&(ge=", agent status: "+(0,k.default)(X.getCurrentStatus())),Ie.message+=", "+O.method+" "+b+" "+Y+" (connected: "+de+", keepalive socket: "+te+ge+`)
|
|
|
headers: `+(0,k.default)(ue),Ie.data=Je,Ie.path=O.path,Ie.status=Y,Ie.headers=ue,Ie.res=Ce}ye(Ie,Je,p.streaming?rt:Ce),p.emitter&&(x.url=b,x.socket=qe&&qe.connection,x.options=O,x.size=be,p.emitter.emit("response",{requestId:y,error:Ie,ctx:p.ctx,req:x,res:Ce}))}function le(Ie){var Je=null;if(p.followRedirect&&statuses.redirect[Ie.statusCode]){p._followRedirectCount=(p._followRedirectCount||0)+1;var rt=Ie.headers.location;if(!rt)Je=new Error("Got statusCode "+Ie.statusCode+" but cannot resolve next location from headers"),Je.name="FollowRedirectError";else if(p._followRedirectCount>p.maxRedirects)Je=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+b),Je.name="MaxRedirectError";else{var ye=p.formatRedirectUrl?p.formatRedirectUrl(b,rt):e.resolve(b,rt);c("Request#%d %s: `redirected` from %s to %s",y,O.path,b,ye),J(),p.headers&&p.headers.Host&&d.test(rt)&&(p.headers.Host=null);var ue=D;return D=null,I.requestWithCallback(ye,p,ue),{redirect:!0,error:null}}}return{redirect:!1,error:Je}}!O.headers["User-Agent"]&&!O.headers["user-agent"]&&(O.headers["User-Agent"]=navigator.userAgent),p.gzip&&(!O.headers["Accept-Encoding"]&&!O.headers["accept-encoding"]&&(O.headers["Accept-Encoding"]="gzip"));function ce(Ie,Je,rt){var ye=Ie.headers["content-encoding"];return rt(null,Je,ye)}var we=p.writeStream;c("Request#%d %s %s with headers %j, options.path: %s",y,F,b,O.headers,O.path),p.requestUrls.push(b);function Fe(Ie){if(ie&&(ie.waiting=Date.now()-w),c("Request#%d %s `req response` event emit: status %d, headers: %j",y,b,Ie.statusCode,Ie.headers),p.streaming){var Je=le(Ie);if(Je.redirect){Ie.resume();return}return Je.error?(Ie.resume(),$(Je.error,null,Ie)):$(null,null,Ie)}if(Ie.on("close",function(){c("Request#%d %s: `res close` event emit, total size %d",y,b,W)}),Ie.on("error",function(){c("Request#%d %s: `res error` event emit, total size %d",y,b,W)}),Ie.on("aborted",function(){V=!0,c("Request#%d %s: `res aborted` event emit, total size %d",y,b,W)}),we){var Je=le(Ie);if(Je.redirect){Ie.resume();return}return Je.error?(Ie.resume(),we.end(),$(Je.error,null,Ie)):(p.consumeWriteStream===!1?Ie.on("end",$.bind(null,null,null,Ie)):isNode010||isNode012?first([[we,"close"],[Ie,"aborted"]],function(ue,he,me){c("Request#%d %s: writeStream or res %s event emitted",y,b,me),$(Oe||null,null,Ie)}):we.on("close",function(){c("Request#%d %s: writeStream close event emitted",y,b),$(Oe||null,null,Ie)}),Ie.pipe(we))}var rt=[];Ie.on("data",function(ye){c("Request#%d %s: `res data` event emit, size %d",y,b,ye.length),W+=ye.length,rt.push(ye)}),Ie.on("end",function(){var ye=g.concat(rt,W);if(c("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",y,b,W,Ie._dumped),Oe)return $(Oe,ye,Ie);var ue=le(Ie);if(ue.error)return $(ue.error,ye,Ie);if(ue.redirect)return;ce(Ie,ye,function(he,me,Ce){if(he)return $(he,ye,Ie);if(!Ce&&s.indexOf(p.dataType)>=0){try{me=decodeBodyByCharset(me,Ie)}catch(Ee){return c("decodeBodyByCharset error: %s",Ee),$(null,me,Ie)}if(p.dataType==="json")if(W===0)me=null;else{var ge=parseJSON(me,z);ge.error?he=ge.error:me=ge.data}}V&&c("Request#%d %s: Remote socket was terminated before `response.end()` was called",y,b),$(he,me,Ie)})})}var Xe,$e;Array.isArray(p.timeout)?(Xe=i(p.timeout[0]),$e=i(p.timeout[1])):Xe=$e=i(p.timeout),c("ConnectTimeout: %d, ResponseTimeout: %d",Xe,$e);function Ye(){c("Connect timer ticking, timeout: %d",Xe),fe=setTimeout(function(){fe=null,Y===-1&&(Y=-2);var Ie="Connect timeout for "+Xe+"ms",Je="ConnectionTimeoutError";qe.socket||(Je="SocketAssignTimeoutError",Ie+=", working sockets is full"),Oe=new Error(Ie),Oe.name=Je,Oe.requestId=y,c("ConnectTimeout: Request#%d %s %s: %s, connected: %s",y,b,Oe.name,Ie,de),Pe()},Xe)}function Ze(){c("Response timer ticking, timeout: %d",$e),Re=setTimeout(function(){Re=null;var Ie="Response timeout for "+$e+"ms",Je="ResponseTimeoutError";Oe=new Error(Ie),Oe.name=Je,Oe.requestId=y,c("ResponseTimeout: Request#%d %s %s: %s, connected: %s",y,b,Oe.name,Ie,de),Pe()},$e)}var qe;O.mode=p.mode?p.mode:"";try{qe=A.request(O,Fe)}catch(Ie){return $(Ie)}typeof window=="undefined"?Ye():qe.on("requestTimeout",function(){Y===-1&&(Y=-2);var Ie="Connect timeout for "+Xe+"ms",Je="ConnectionTimeoutError";Oe=new Error(Ie),Oe.name=Je,Oe.requestId=y,Pe()});function Pe(){c("Request#%d %s abort, connected: %s",y,b,de),qe.socket||(Oe.noSocket=!0,$(Oe)),qe.abort()}return ie&&qe.on("finish",function(){ie.requestSent=Date.now()-w}),qe.once("socket",function(Ie){ie&&(ie.queuing=Date.now()-w),isNode010&&Ie.socket&&(Ie=Ie.socket);var Je=Ie.readyState;if(Je==="opening"){Ie.once("lookup",function(rt,ye,ue){c("Request#%d %s lookup: %s, %s, %s",y,b,rt,ye,ue),ie&&(ie.dnslookup=Date.now()-w),ye&&(Q=ye)}),Ie.once("connect",function(){ie&&(ie.connected=Date.now()-w),ne(),Ze(),c("Request#%d %s new socket connected",y,b),de=!0,Q||(Q=Ie.remoteAddress),q=Ie.remotePort});return}c("Request#%d %s reuse socket connected, readyState: %s",y,b,Je),de=!0,te=!0,Q||(Q=Ie.remoteAddress),q=Ie.remotePort,ne(),Ze()}),qe.on("error",function(Ie){(Ie.name==="Error"||Ie.name==="TypeError")&&(Ie.name=de?"ResponseError":"RequestError"),Ie.message+=' (req "error")',c("Request#%d %s `req error` event emit, %s: %s",y,b,Ie.name,Ie.message),$(Oe||Ie)}),we&&we.once("error",function(Ie){Ie.message+=' (writeStream "error")',Oe=Ie,c("Request#%d %s `writeStream error` event emit, %s: %s",y,b,Ie.name,Ie.message),Pe()}),p.stream?(p.stream.pipe(qe),p.stream.once("error",function(Ie){Ie.message+=' (stream "error")',Oe=Ie,c("Request#%d %s `readStream error` event emit, %s: %s",y,b,Ie.name,Ie.message),Pe()})):qe.end(ee),qe.requestId=y,qe}}).call(this,H("_process"),H("buffer").Buffer)},{_process:208,"any-promise":49,"babel-runtime/core-js/json/stringify":53,"babel-runtime/helpers/typeof":67,buffer:73,constants:75,debug:288,http:231,https:193,"humanize-ms":194,url:238,util:243}]},{},[1])(1)})}).call(this,__webpack_require__("IyRk"))},n6Qo:function(H,Z,I){"use strict";I.d(Z,"a",function(){return _});var N=I("q1tI"),g=I("biw7"),S=I("fyJ8");function k(e){var h=e.className,r=e.index,c=e.children,i=e.colSpan,n=e.rowSpan,l=N.useContext(g.a),f=l.prefixCls,d=l.fixedInfoList,u=d[r];return N.createElement(S.a,Object.assign({className:h,index:r,component:"td",prefixCls:f,record:null,dataIndex:null,render:function(){return{children:c,props:{colSpan:i,rowSpan:n}}}},u))}function v(e){return N.createElement("tr",Object.assign({},e))}function m(e){var h=e.children,r=N.useContext(g.a),c=r.prefixCls;return N.createElement("tfoot",{className:"".concat(c,"-summary")},h)}var C=Z.b=m,_={Cell:k,Row:v}},nEHx:function(H,Z,I){"use strict";I.d(Z,"a",function(){return N});var N;(function(g){g.DARK="dark",g.LIGHT="light",g.HIGH_CONTRAST="hc"})(N||(N={}))},nj2k:function(H,Z,I){H.exports=I.p+"static/nodata.c3b0b86c.svg"},nnTU:function(H,Z,I){"use strict";I.d(Z,"b",function(){return C}),I.d(Z,"a",function(){return _});var N=I("MI8n"),g=I("JYp7"),S=I("pmY6"),k=I("24hK"),v=I("746U"),m=I("Cg/j");const C=Object(m.c)("commandService"),_=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new N.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,h){if(!e)throw new Error("invalid command");if(typeof e=="string"){if(!h)throw new Error("invalid command");return this.registerCommand({id:e,handler:h})}if(e.description){const l=[];for(let d of e.description.args)l.push(d.constraint);const f=e.handler;e.handler=function(d,...u){return Object(v.o)(u,l),f(d,...u)}}const{id:r}=e;let c=this._commands.get(r);c||(c=new k.a,this._commands.set(r,c));let i=c.unshift(e),n=Object(S.i)(()=>{i();const l=this._commands.get(r);(l==null?void 0:l.isEmpty())&&this._commands.delete(r)});return this._onDidRegisterCommand.fire(r),n}registerCommandAlias(e,h){return _.registerCommand(e,(r,...c)=>r.get(C).executeCommand(h,...c))}getCommand(e){const h=this._commands.get(e);return!h||h.isEmpty()?void 0:g.a.first(h)}getCommands(){const e=new Map;for(const h of this._commands.keys()){const r=this.getCommand(h);r&&e.set(h,r)}return e}};_.registerCommand("noop",()=>{})},oRuE:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.pad.Iso10126={pad:function(g,S){var k=S*4,v=k-g.sigBytes%k;g.concat(N.lib.WordArray.random(v-1)).concat(N.lib.WordArray.create([v<<24],1))},unpad:function(g){var S=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=S}},N.pad.Iso10126})},osHv:function(H,Z,I){(function(N){N(I("VrN/"))})(function(N){"use strict";var g=N.Pos;function S(d,u){return d.line-u.line||d.ch-u.ch}var k="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",v=k+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",m=new RegExp("<(/?)(["+k+"]["+v+"]*)","g");function C(d,u,o,s){this.line=u,this.ch=o,this.cm=d,this.text=d.getLine(u),this.min=s?Math.max(s.from,d.firstLine()):d.firstLine(),this.max=s?Math.min(s.to-1,d.lastLine()):d.lastLine()}function _(d,u){var o=d.cm.getTokenTypeAt(g(d.line,u));return o&&/\btag\b/.test(o)}function e(d){return d.line>=d.max?void 0:(d.ch=0,d.text=d.cm.getLine(++d.line),!0)}function h(d){return d.line<=d.min?void 0:(d.text=d.cm.getLine(--d.line),d.ch=d.text.length,!0)}function r(d){for(;;){var u=d.text.indexOf(">",d.ch);if(u==-1){if(e(d))continue;return}if(!_(d,u+1)){d.ch=u+1;continue}var o=d.text.lastIndexOf("/",u),s=o>-1&&!/\S/.test(d.text.slice(o+1,u));return d.ch=u+1,s?"selfClose":"regular"}}function c(d){for(;;){var u=d.ch?d.text.lastIndexOf("<",d.ch-1):-1;if(u==-1){if(h(d))continue;return}if(!_(d,u+1)){d.ch=u;continue}m.lastIndex=u,d.ch=u;var o=m.exec(d.text);if(o&&o.index==u)return o}}function i(d){for(;;){m.lastIndex=d.ch;var u=m.exec(d.text);if(!u){if(e(d))continue;return}if(!_(d,u.index+1)){d.ch=u.index+1;continue}return d.ch=u.index+u[0].length,u}}function n(d){for(;;){var u=d.ch?d.text.lastIndexOf(">",d.ch-1):-1;if(u==-1){if(h(d))continue;return}if(!_(d,u+1)){d.ch=u;continue}var o=d.text.lastIndexOf("/",u),s=o>-1&&!/\S/.test(d.text.slice(o+1,u));return d.ch=u+1,s?"selfClose":"regular"}}function l(d,u){for(var o=[];;){var s=i(d),E,b=d.line,p=d.ch-(s?s[0].length:0);if(!s||!(E=r(d)))return;if(E=="selfClose")continue;if(s[1]){for(var D=o.length-1;D>=0;--D)if(o[D]==s[2]){o.length=D;break}if(D<0&&(!u||u==s[2]))return{tag:s[2],from:g(b,p),to:g(d.line,d.ch)}}else o.push(s[2])}}function f(d,u){for(var o=[];;){var s=n(d);if(!s)return;if(s=="selfClose"){c(d);continue}var E=d.line,b=d.ch,p=c(d);if(!p)return;if(p[1])o.push(p[2]);else{for(var D=o.length-1;D>=0;--D)if(o[D]==p[2]){o.length=D;break}if(D<0&&(!u||u==p[2]))return{tag:p[2],from:g(d.line,d.ch),to:g(E,b)}}}}N.registerHelper("fold","xml",function(d,u){for(var o=new C(d,u.line,0);;){var s=i(o);if(!s||o.line!=u.line)return;var E=r(o);if(!E)return;if(!s[1]&&E!="selfClose"){var b=g(o.line,o.ch),p=l(o,s[2]);return p&&S(p.from,b)>0?{from:b,to:p.from}:null}}}),N.findMatchingTag=function(d,u,o){var s=new C(d,u.line,u.ch,o);if(s.text.indexOf(">")==-1&&s.text.indexOf("<")==-1)return;var E=r(s),b=E&&g(s.line,s.ch),p=E&&c(s);if(!E||!p||S(s,u)>0)return;var D={from:g(s.line,s.ch),to:b,tag:p[2]};return E=="selfClose"?{open:D,close:null,at:"open"}:p[1]?{open:f(s,p[2]),close:D,at:"close"}:(s=new C(d,b.line,b.ch,o),{open:D,close:l(s,p[2]),at:"open"})},N.findEnclosingTag=function(d,u,o,s){for(var E=new C(d,u.line,u.ch,o);;){var b=f(E,s);if(!b)break;var p=new C(d,u.line,u.ch,o),D=l(p,b.tag);if(D)return{open:b,close:D}}},N.scanForClosingTag=function(d,u,o,s){var E=new C(d,u.line,u.ch,s?{from:0,to:s}:null);return l(E,o)}})},p5ED:function(H,Z,I){"use strict";var N=I("+L6B"),g=I("2/Rp"),S=I("5Dmo"),k=I("3S7+"),v=I("k1fw"),m=I("9og8"),C=I("tJVT"),_=I("WmNS"),e=I.n(_),h=I("q1tI"),r=I.n(h),c=I("vHTk"),i=I.n(c),n=I("yEEn"),l=I("ZW9T"),f=I("1vsH"),d=I("V0Rq"),u=I("m3rI");Z.a=function(o){var s,E,b,p,D,R,y,x=o.editOffice,w=x===void 0?"view":x,T=o.data,F=o.theme,P=o.type,A=o.filename,X=o.monacoEditor,z=o.className,O=o.style,B=o.close,U=o.onClose,L=o.hasMask,G=o.disabledDownload,ee=Object(h.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),oe=Object(C.a)(ee,2),ae=oe[0],be=oe[1],_e=Object(h.useState)(""),fe=Object(C.a)(_e,2),Re=fe[0],Oe=fe[1],de=Object(h.useState)(),te=Object(C.a)(de,2),W=te[0],Y=te[1],V=window.ENV==="build"?"/react/build":"",Q=u.a.PROXY_SERVER||location.origin,q,ie=1024*1024,ne=10*ie,J=Object(h.useRef)();(s=T)!==null&&s!==void 0&&s.startsWith("/api")&&P!=="txt"&&(T=(u.a.API_SERVER||location.origin)+T),P==="office"&&(q=Object(f.T)(T).filesize,q>ne&&(P="other")),A&&X&&(X.filename=A),Object(h.useEffect)(function(){var we,Fe,Xe=(we=document.cookie)===null||we===void 0||((Fe=we.replace(/\s/g,""))===null||Fe===void 0)?void 0:Fe.split(";");Xe==null||Xe.map(function($e){var Ye=$e.split("=");Ye[0]==="_educoder_session"&&Oe(Ye[1])})},[]),Object(h.useEffect)(function(){P==="office"&&$()},[P,T]);var $=function(){var we=Object(m.a)(e.a.mark(function Fe(){var Xe,$e,Ye;return e.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return console.log("data:",T),Xe=T,T.startsWith("http")||(Xe=location.origin+Xe),$e=new URL(Xe).pathname.split("/").pop(),qe.next=6,Object(d.V)({attachment_id:$e});case 6:Ye=qe.sent,Y(Ye);case 8:case"end":return qe.stop()}},Fe)}));return function(){return we.apply(this,arguments)}}(),le=function(){if(T.startsWith("http")||T.startsWith("blob:")){ce();return}Object(f.z)(A||"educoder",T,A)},ce=function(){Object(f.x)(A||"educoder",decodeURIComponent(T))};return r.a.createElement("div",{style:Object(v.a)({},O||{}),className:"".concat(L&&i.a.bgBlack," ").concat(P?i.a.wrp:"hide")},B&&r.a.createElement("div",{className:i.a.close,ref:J},!G&&r.a.createElement(k.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return J.current}},r.a.createElement("span",{onClick:ce},r.a.createElement("i",{className:"icon-quxiaozhiding"}))),r.a.createElement(k.a,{title:"\u5173\u95ED",getPopupContainer:function(){return J.current}},r.a.createElement("span",{className:"",onClick:U},r.a.createElement("i",{className:"icon-guanbi1"})))),r.a.createElement("div",{className:"".concat(i.a[z]," ").concat(z," ").concat(i.a.monaco," ").concat(P==="txt"?"show":"hide")},P==="txt"&&r.a.createElement(l.b,X)),P==="audio"&&r.a.createElement("audio",{src:"".concat(((E=T)===null||E===void 0?void 0:E.indexOf("http://"))>-1||((b=T)===null||b===void 0?void 0:b.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(T),autoPlay:!0}),P==="video"&&r.a.createElement(r.a.Fragment,null,((p=T)===null||p===void 0?void 0:p.indexOf("http"))>-1?r.a.createElement("video",{controls:!0,src:"".concat(T),autoPlay:!0}):r.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(T),autoPlay:!0})),P==="office"&&W&&r.a.createElement("iframe",{src:"".concat(V,"/office.html?key=").concat(W.key,"&url=").concat(Q+W.url,"&callbackUrl=").concat(Q+W.callbackUrl,"&fileType=").concat(W.fileType,"&title=").concat(W.title,"&model=").concat(w,"&officeServer=").concat(u.a.OFFICE_SERVER,"&disabledDownload=").concat(!!G)}),P==="html"&&r.a.createElement("iframe",{src:T+"&disposition=inline"}),P==="pdf"&&r.a.createElement("iframe",{src:"".concat(V,"/js/pdfview/index.html?url=").concat(T,"&disabledDownload=").concat(!!G)}),P==="image"&&r.a.createElement("img",{src:"".concat(((D=T)===null||D===void 0?void 0:D.indexOf("http://"))>-1||((R=T)===null||R===void 0?void 0:R.indexOf("https://"))>-1||(y=T)!==null&&y!==void 0&&y.startsWith("/api")?"":"data:image/png;base64,").concat(T)}),P==="other"&&r.a.createElement("div",null,r.a.createElement(g.a,{type:"primary",size:"large",onClick:le},r.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),P==="download"&&r.a.createElement(g.a,{type:"primary",size:"large",onClick:le},r.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(H,Z,I){},pA7S:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("ETIr"),I("cv67"),I("K3mO"),I("OLod"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,v=S.BlockCipher,m=g.algo,C=[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],_=[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],e=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],h=[{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],c=m.DES=v.extend({_doReset:function(){for(var f=this._key,d=f.words,u=[],o=0;o<56;o++){var s=C[o]-1;u[o]=d[s>>>5]>>>31-s%32&1}for(var E=this._subKeys=[],b=0;b<16;b++){for(var p=E[b]=[],D=e[b],o=0;o<24;o++)p[o/6|0]|=u[(_[o]-1+D)%28]<<31-o%6,p[4+(o/6|0)]|=u[28+(_[o+24]-1+D)%28]<<31-o%6;p[0]=p[0]<<1|p[0]>>>31;for(var o=1;o<7;o++)p[o]=p[o]>>>(o-1)*4+3;p[7]=p[7]<<5|p[7]>>>27}for(var R=this._invSubKeys=[],o=0;o<16;o++)R[o]=E[15-o]},encryptBlock:function(f,d){this._doCryptBlock(f,d,this._subKeys)},decryptBlock:function(f,d){this._doCryptBlock(f,d,this._invSubKeys)},_doCryptBlock:function(f,d,u){this._lBlock=f[d],this._rBlock=f[d+1],i.call(this,4,252645135),i.call(this,16,65535),n.call(this,2,858993459),n.call(this,8,16711935),i.call(this,1,1431655765);for(var o=0;o<16;o++){for(var s=u[o],E=this._lBlock,b=this._rBlock,p=0,D=0;D<8;D++)p|=h[D][((b^s[D])&r[D])>>>0];this._lBlock=b,this._rBlock=E^p}var R=this._lBlock;this._lBlock=this._rBlock,this._rBlock=R,i.call(this,1,1431655765),n.call(this,8,16711935),n.call(this,2,858993459),i.call(this,16,65535),i.call(this,4,252645135),f[d]=this._lBlock,f[d+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function i(f,d){var u=(this._lBlock>>>f^this._rBlock)&d;this._rBlock^=u,this._lBlock^=u<<f}function n(f,d){var u=(this._rBlock>>>f^this._lBlock)&d;this._lBlock^=u,this._rBlock^=u<<f}g.DES=v._createHelper(c);var l=m.TripleDES=v.extend({_doReset:function(){var f=this._key,d=f.words;if(d.length!==2&&d.length!==4&&d.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var u=d.slice(0,2),o=d.length<4?d.slice(0,2):d.slice(2,4),s=d.length<6?d.slice(0,2):d.slice(4,6);this._des1=c.createEncryptor(k.create(u)),this._des2=c.createEncryptor(k.create(o)),this._des3=c.createEncryptor(k.create(s))},encryptBlock:function(f,d){this._des1.encryptBlock(f,d),this._des2.decryptBlock(f,d),this._des3.encryptBlock(f,d)},decryptBlock:function(f,d){this._des3.decryptBlock(f,d),this._des2.encryptBlock(f,d),this._des1.decryptBlock(f,d)},keySize:192/32,ivSize:64/32,blockSize:64/32});g.TripleDES=v._createHelper(l)}(),N.TripleDES})},pmY6:function(H,Z,I){"use strict";I.d(Z,"h",function(){return h}),I.d(Z,"g",function(){return c}),I.d(Z,"f",function(){return i}),I.d(Z,"e",function(){return n}),I.d(Z,"i",function(){return l}),I.d(Z,"b",function(){return f}),I.d(Z,"a",function(){return d}),I.d(Z,"d",function(){return u}),I.d(Z,"c",function(){return o});var N=I("C/vA"),g=I("JYp7");const S=!1;let k=null;function v(s){k=s}if(S){const s="__is_disposable_tracked__";v(new class{trackDisposable(E){const b=new Error("Potentially leaked disposable").stack;setTimeout(()=>{E[s]||console.log(b)},3e3)}setParent(E,b){if(E&&E!==d.None)try{E[s]=!0}catch(p){}}markAsDisposed(E){if(E&&E!==d.None)try{E[s]=!0}catch(b){}}markAsSingleton(E){}})}function m(s){return k==null||k.trackDisposable(s),s}function C(s){k==null||k.markAsDisposed(s)}function _(s,E){k==null||k.setParent(s,E)}function e(s,E){if(!k)return;for(const b of s)k.setParent(b,E)}function h(s){return k==null||k.markAsSingleton(s),s}class r extends Error{constructor(s){super(`Encountered errors while disposing of store. Errors: [${s.join(", ")}]`);this.errors=s}}function c(s){return typeof s.dispose=="function"&&s.dispose.length===0}function i(s){if(g.a.is(s)){let E=[];for(const b of s)if(b)try{b.dispose()}catch(p){E.push(p)}if(E.length===1)throw E[0];if(E.length>1)throw new r(E);return Array.isArray(s)?[]:s}else if(s)return s.dispose(),s}function n(...s){const E=l(()=>i(s));return e(s,E),E}function l(s){const E=m({dispose:Object(N.a)(()=>{C(E),s()})});return E}class f{constructor(){this._toDispose=new Set,this._isDisposed=!1,m(this)}dispose(){if(this._isDisposed)return;C(this),this._isDisposed=!0,this.clear()}clear(){try{i(this._toDispose.values())}finally{this._toDispose.clear()}}add(s){if(!s)return s;if(s===this)throw new Error("Cannot register a disposable on itself!");return _(s,this),this._isDisposed?f.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(s),s}}f.DISABLE_DISPOSED_WARNING=!1;class d{constructor(){this._store=new f,m(this),_(this._store,this)}dispose(){C(this),this._store.dispose()}_register(s){if(s===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(s)}}d.None=Object.freeze({dispose(){}});class u{constructor(){this._isDisposed=!1,m(this)}get value(){return this._isDisposed?void 0:this._value}set value(s){var E;if(this._isDisposed||s===this._value)return;(E=this._value)===null||E===void 0||E.dispose(),s&&_(s,this),this._value=s}clear(){this.value=void 0}dispose(){var s;this._isDisposed=!0,C(this),(s=this._value)===null||s===void 0||s.dispose(),this._value=void 0}clearAndLeak(){const s=this._value;return this._value=void 0,s&&_(s,null),s}}class o{constructor(s){this.object=s}dispose(){}}},psGv:function(H,Z,I){var N,g;(function(){var S;(function(){"use strict";var C=[,,function(r){function c(l){this.__parent=l,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}c.prototype.clone_empty=function(){var l=new c(this.__parent);return l.set_indent(this.__indent_count,this.__alignment_count),l},c.prototype.item=function(l){return l<0?this.__items[this.__items.length+l]:this.__items[l]},c.prototype.has_match=function(l){for(var f=this.__items.length-1;f>=0;f--)if(this.__items[f].match(l))return!0;return!1},c.prototype.set_indent=function(l,f){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=f||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},c.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},c.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},c.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__character_count-=1),!0}return!1},c.prototype.is_empty=function(){return this.__items.length===0},c.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},c.prototype.push=function(l){this.__items.push(l);var f=l.lastIndexOf(`
|
|
|
`);f!==-1?this.__character_count=l.length-f:this.__character_count+=l.length},c.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},c.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},c.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},c.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},c.prototype.toString=function(){var l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function i(l,f){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),f=f||"",l.indent_level>0&&(f=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=f,this.__base_string_length=f.length}i.prototype.get_indent_size=function(l,f){var d=this.__base_string_length;return f=f||0,l<0&&(d=0),d+=l*this.__indent_size,d+=f,d},i.prototype.get_indent_string=function(l,f){var d=this.__base_string;return f=f||0,l<0&&(l=0,d=""),f+=l*this.__indent_size,this.__ensure_cache(f),d+=this.__cache[f],d},i.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var l=this.__cache.length,f=0,d="";this.__indent_size&&l>=this.__indent_size&&(f=Math.floor(l/this.__indent_size),l-=f*this.__indent_size,d=new Array(f+1).join(this.__indent_string)),l&&(d+=new Array(l+1).join(" ")),this.__cache.push(d)};function n(l,f){this.__indent_cache=new i(l,f),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new c(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}n.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},n.prototype.get_line_number=function(){return this.__lines.length},n.prototype.get_indent_string=function(l,f){return this.__indent_cache.get_indent_string(l,f)},n.prototype.get_indent_size=function(l,f){return this.__indent_cache.get_indent_size(l,f)},n.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},n.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},n.prototype.get_code=function(l){this.trim(!0);var f=this.current_line.pop();f&&(f[f.length-1]===`
|
|
|
`&&(f=f.replace(/\n+$/g,"")),this.current_line.push(f)),this._end_with_newline&&this.__add_outputline();var d=this.__lines.join(`
|
|
|
`);return l!==`
|
|
|
`&&(d=d.replace(/[\n]/g,l)),d},n.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},n.prototype.set_indent=function(l,f){return l=l||0,f=f||0,this.next_line.set_indent(l,f),this.__lines.length>1?(this.current_line.set_indent(l,f),!0):(this.current_line.set_indent(),!1)},n.prototype.add_raw_token=function(l){for(var f=0;f<l.newlines;f++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(l.whitespace_before),this.current_line.push(l.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},n.prototype.add_token=function(l){this.__add_space_before_token(),this.current_line.push(l),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},n.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},n.prototype.remove_indent=function(l){for(var f=this.__lines.length;l<f;)this.__lines[l]._remove_indent(),l++;this.current_line._remove_wrap_indent()},n.prototype.trim=function(l){for(l=l===void 0?!1:l,this.current_line.trim();l&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},n.prototype.just_added_newline=function(){return this.current_line.is_empty()},n.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},n.prototype.ensure_empty_line_above=function(l,f){for(var d=this.__lines.length-2;d>=0;){var u=this.__lines[d];if(u.is_empty())break;if(u.item(0).indexOf(l)!==0&&u.item(-1)!==f){this.__lines.splice(d+1,0,new c(this)),this.previous_line=this.__lines[this.__lines.length-2];break}d--}},r.exports.Output=n},function(r){function c(i,n,l,f){this.type=i,this.text=n,this.comments_before=null,this.newlines=l||0,this.whitespace_before=f||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}r.exports.Token=c},,,function(r){function c(l,f){this.raw_options=i(l,f),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}c.prototype._get_array=function(l,f){var d=this.raw_options[l],u=f||[];return typeof d=="object"?d!==null&&typeof d.concat=="function"&&(u=d.concat()):typeof d=="string"&&(u=d.split(/[^a-zA-Z0-9_\/\-]+/)),u},c.prototype._get_boolean=function(l,f){var d=this.raw_options[l],u=d===void 0?!!f:!!d;return u},c.prototype._get_characters=function(l,f){var d=this.raw_options[l],u=f||"";return typeof d=="string"&&(u=d.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),u},c.prototype._get_number=function(l,f){var d=this.raw_options[l];f=parseInt(f,10),isNaN(f)&&(f=0);var u=parseInt(d,10);return isNaN(u)&&(u=f),u},c.prototype._get_selection=function(l,f,d){var u=this._get_selection_list(l,f,d);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+l+`' can only be one of the following values:
|
|
|
`+f+`
|
|
|
You passed in: '`+this.raw_options[l]+"'");return u[0]},c.prototype._get_selection_list=function(l,f,d){if(!f||f.length===0)throw new Error("Selection list cannot be empty.");if(d=d||[f[0]],!this._is_valid_selection(d,f))throw new Error("Invalid Default Value!");var u=this._get_array(l,d);if(!this._is_valid_selection(u,f))throw new Error("Invalid Option Value: The option '"+l+`' can contain only the following values:
|
|
|
`+f+`
|
|
|
You passed in: '`+this.raw_options[l]+"'");return u},c.prototype._is_valid_selection=function(l,f){return l.length&&f.length&&!l.some(function(d){return f.indexOf(d)===-1})};function i(l,f){var d={};l=n(l);var u;for(u in l)u!==f&&(d[u]=l[u]);if(f&&l[f])for(u in l[f])d[u]=l[f][u];return d}function n(l){var f={},d;for(d in l){var u=d.replace(/-/g,"_");f[u]=l[d]}return f}r.exports.Options=c,r.exports.normalizeOpts=n,r.exports.mergeOpts=i},,function(r){var c=RegExp.prototype.hasOwnProperty("sticky");function i(n){this.__input=n||"",this.__input_length=this.__input.length,this.__position=0}i.prototype.restart=function(){this.__position=0},i.prototype.back=function(){this.__position>0&&(this.__position-=1)},i.prototype.hasNext=function(){return this.__position<this.__input_length},i.prototype.next=function(){var n=null;return this.hasNext()&&(n=this.__input.charAt(this.__position),this.__position+=1),n},i.prototype.peek=function(n){var l=null;return n=n||0,n+=this.__position,n>=0&&n<this.__input_length&&(l=this.__input.charAt(n)),l},i.prototype.__match=function(n,l){n.lastIndex=l;var f=n.exec(this.__input);return f&&!(c&&n.sticky)&&(f.index!==l&&(f=null)),f},i.prototype.test=function(n,l){return l=l||0,l+=this.__position,l>=0&&l<this.__input_length?!!this.__match(n,l):!1},i.prototype.testChar=function(n,l){var f=this.peek(l);return n.lastIndex=0,f!==null&&n.test(f)},i.prototype.match=function(n){var l=this.__match(n,this.__position);return l?this.__position+=l[0].length:l=null,l},i.prototype.read=function(n,l,f){var d="",u;return n&&(u=this.match(n),u&&(d+=u[0])),l&&(u||!n)&&(d+=this.readUntil(l,f)),d},i.prototype.readUntil=function(n,l){var f="",d=this.__position;n.lastIndex=this.__position;var u=n.exec(this.__input);return u?(d=u.index,l&&(d+=u[0].length)):d=this.__input_length,f=this.__input.substring(this.__position,d),this.__position=d,f},i.prototype.readUntilAfter=function(n){return this.readUntil(n,!0)},i.prototype.get_regexp=function(n,l){var f=null,d="g";return l&&c&&(d="y"),typeof n=="string"&&n!==""?f=new RegExp(n,d):n&&(f=new RegExp(n.source,d)),f},i.prototype.get_literal_regexp=function(n){return RegExp(n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},i.prototype.peekUntilAfter=function(n){var l=this.__position,f=this.readUntilAfter(n);return this.__position=l,f},i.prototype.lookBack=function(n){var l=this.__position-1;return l>=n.length&&this.__input.substring(l-n.length,l).toLowerCase()===n},r.exports.InputScanner=i},function(r,c,i){var n=i(8).InputScanner,l=i(3).Token,f=i(10).TokenStream,d=i(11).WhitespacePattern,u={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(s,E){this._input=new n(s),this._options=E||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new d(this._input)};o.prototype.tokenize=function(){this._input.restart(),this.__tokens=new f,this._reset();for(var s,E=new l(u.START,""),b=null,p=[],D=new f;E.type!==u.EOF;){for(s=this._get_next_token(E,b);this._is_comment(s);)D.add(s),s=this._get_next_token(E,b);D.isEmpty()||(s.comments_before=D,D=new f),s.parent=b,this._is_opening(s)?(p.push(b),b=s):b&&this._is_closing(s,b)&&(s.opened=b,b.closed=s,b=p.pop(),s.parent=b),s.previous=E,E.next=s,this.__tokens.add(s),E=s}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(s,E){this._readWhitespace();var b=this._input.read(/.+/g);return b?this._create_token(u.RAW,b):this._create_token(u.EOF,"")},o.prototype._is_comment=function(s){return!1},o.prototype._is_opening=function(s){return!1},o.prototype._is_closing=function(s,E){return!1},o.prototype._create_token=function(s,E){var b=new l(s,E,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return b},o.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},r.exports.Tokenizer=o,r.exports.TOKEN=u},function(r){function c(i){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=i}c.prototype.restart=function(){this.__position=0},c.prototype.isEmpty=function(){return this.__tokens_length===0},c.prototype.hasNext=function(){return this.__position<this.__tokens_length},c.prototype.next=function(){var i=null;return this.hasNext()&&(i=this.__tokens[this.__position],this.__position+=1),i},c.prototype.peek=function(i){var n=null;return i=i||0,i+=this.__position,i>=0&&i<this.__tokens_length&&(n=this.__tokens[i]),n},c.prototype.add=function(i){this.__parent_token&&(i.parent=this.__parent_token),this.__tokens.push(i),this.__tokens_length+=1},r.exports.TokenStream=c},function(r,c,i){var n=i(12).Pattern;function l(f,d){n.call(this,f,d),d?this._line_regexp=this._input.get_regexp(d._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}l.prototype=new n,l.prototype.__set_whitespace_patterns=function(f,d){f+="\\t ",d+="\\n\\r",this._match_pattern=this._input.get_regexp("["+f+d+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+d+"]")},l.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var f=this._input.read(this._match_pattern);if(f===" ")this.whitespace_before_token=" ";else if(f){var d=this.__split(this._newline_regexp,f);this.newline_count=d.length-1,this.whitespace_before_token=d[this.newline_count]}return f},l.prototype.matching=function(f,d){var u=this._create();return u.__set_whitespace_patterns(f,d),u._update(),u},l.prototype._create=function(){return new l(this._input,this)},l.prototype.__split=function(f,d){f.lastIndex=0;for(var u=0,o=[],s=f.exec(d);s;)o.push(d.substring(u,s.index)),u=s.index+s[0].length,s=f.exec(d);return u<d.length?o.push(d.substring(u,d.length)):o.push(""),o},r.exports.WhitespacePattern=l},function(r){function c(i,n){this._input=i,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,n&&(this._starting_pattern=this._input.get_regexp(n._starting_pattern,!0),this._match_pattern=this._input.get_regexp(n._match_pattern,!0),this._until_pattern=this._input.get_regexp(n._until_pattern),this._until_after=n._until_after)}c.prototype.read=function(){var i=this._input.read(this._starting_pattern);return(!this._starting_pattern||i)&&(i+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),i},c.prototype.read_match=function(){return this._input.match(this._match_pattern)},c.prototype.until_after=function(i){var n=this._create();return n._until_after=!0,n._until_pattern=this._input.get_regexp(i),n._update(),n},c.prototype.until=function(i){var n=this._create();return n._until_after=!1,n._until_pattern=this._input.get_regexp(i),n._update(),n},c.prototype.starting_with=function(i){var n=this._create();return n._starting_pattern=this._input.get_regexp(i,!0),n._update(),n},c.prototype.matching=function(i){var n=this._create();return n._match_pattern=this._input.get_regexp(i,!0),n._update(),n},c.prototype._create=function(){return new c(this._input,this)},c.prototype._update=function(){},r.exports.Pattern=c},function(r){function c(i,n){i=typeof i=="string"?i:i.source,n=typeof n=="string"?n:n.source,this.__directives_block_pattern=new RegExp(i+/ beautify( \w+[:]\w+)+ /.source+n,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(i+/\sbeautify\signore:end\s/.source+n,"g")}c.prototype.get_directives=function(i){if(!i.match(this.__directives_block_pattern))return null;var n={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(i);l;)n[l[1]]=l[2],l=this.__directive_pattern.exec(i);return n},c.prototype.readIgnored=function(i){return i.readUntilAfter(this.__directives_end_ignore_pattern)},r.exports.Directives=c},function(r,c,i){var n=i(12).Pattern,l={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function f(d,u){n.call(this,d,u),this.__template_pattern=null,this._disabled=Object.assign({},l),this._excluded=Object.assign({},l),u&&(this.__template_pattern=this._input.get_regexp(u.__template_pattern),this._excluded=Object.assign(this._excluded,u._excluded),this._disabled=Object.assign(this._disabled,u._disabled));var o=new n(d);this.__patterns={handlebars_comment:o.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:o.starting_with(/{{{/).until_after(/}}}/),handlebars:o.starting_with(/{{/).until_after(/}}/),php:o.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:o.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:o.starting_with(/{%/).until_after(/%}/),django_value:o.starting_with(/{{/).until_after(/}}/),django_comment:o.starting_with(/{#/).until_after(/#}/),smarty:o.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:o.starting_with(/{\*/).until_after(/\*}/),smarty_literal:o.starting_with(/{literal}/).until_after(/{\/literal}/)}}f.prototype=new n,f.prototype._create=function(){return new f(this._input,this)},f.prototype._update=function(){this.__set_templated_pattern()},f.prototype.disable=function(d){var u=this._create();return u._disabled[d]=!0,u._update(),u},f.prototype.read_options=function(d){var u=this._create();for(var o in l)u._disabled[o]=d.templating.indexOf(o)===-1;return u._update(),u},f.prototype.exclude=function(d){var u=this._create();return u._excluded[d]=!0,u._update(),u},f.prototype.read=function(){var d="";this._match_pattern?d=this._input.read(this._starting_pattern):d=this._input.read(this._starting_pattern,this.__template_pattern);for(var u=this._read_template();u;)this._match_pattern?u+=this._input.read(this._match_pattern):u+=this._input.readUntil(this.__template_pattern),d+=u,u=this._read_template();return this._until_after&&(d+=this._input.readUntilAfter(this._until_pattern)),d},f.prototype.__set_templated_pattern=function(){var d=[];this._disabled.php||d.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||d.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||d.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(d.push(this.__patterns.django._starting_pattern.source),d.push(this.__patterns.django_value._starting_pattern.source),d.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||d.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&d.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+d.join("|")+")")},f.prototype._read_template=function(){var d="",u=this._input.peek();if(u==="<"){var o=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&o==="?"&&(d=d||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&o==="%"&&(d=d||this.__patterns.erb.read())}else u==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(d=d||this.__patterns.handlebars_comment.read(),d=d||this.__patterns.handlebars_unescaped.read(),d=d||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(d=d||this.__patterns.django_value.read()),this._excluded.django||(d=d||this.__patterns.django_comment.read(),d=d||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(d=d||this.__patterns.smarty_comment.read(),d=d||this.__patterns.smarty_literal.read(),d=d||this.__patterns.smarty.read()));return d},r.exports.TemplatablePattern=f},,,,function(r,c,i){var n=i(19).Beautifier,l=i(20).Options;function f(d,u,o,s){var E=new n(d,u,o,s);return E.beautify()}r.exports=f,r.exports.defaultOptions=function(){return new l}},function(r,c,i){var n=i(20).Options,l=i(2).Output,f=i(21).Tokenizer,d=i(21).TOKEN,u=/\r\n|[\r\n]/,o=/\r\n|[\r\n]/g,s=function(F,P){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=F.max_preserve_newlines,this.preserve_newlines=F.preserve_newlines,this._output=new l(F,P)};s.prototype.current_line_has_match=function(F){return this._output.current_line.has_match(F)},s.prototype.set_space_before_token=function(F,P){this._output.space_before_token=F,this._output.non_breaking_space=P},s.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},s.prototype.add_raw_token=function(F){this._output.add_raw_token(F)},s.prototype.print_preserved_newlines=function(F){var P=0;F.type!==d.TEXT&&F.previous.type!==d.TEXT&&(P=F.newlines?1:0),this.preserve_newlines&&(P=F.newlines<this.max_preserve_newlines+1?F.newlines:this.max_preserve_newlines+1);for(var A=0;A<P;A++)this.print_newline(A>0);return P!==0},s.prototype.traverse_whitespace=function(F){return F.whitespace_before||F.newlines?(this.print_preserved_newlines(F)||(this._output.space_before_token=!0),!0):!1},s.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},s.prototype.print_newline=function(F){this._output.add_new_line(F)},s.prototype.print_token=function(F){F.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(F.text))},s.prototype.indent=function(){this.indent_level++},s.prototype.get_full_indent=function(F){return F=this.indent_level+(F||0),F<1?"":this._output.get_indent_string(F)};var E=function(F){for(var P=null,A=F.next;A.type!==d.EOF&&F.closed!==A;){if(A.type===d.ATTRIBUTE&&A.text==="type"){A.next&&A.next.type===d.EQUALS&&A.next.next&&A.next.next.type===d.VALUE&&(P=A.next.next.text);break}A=A.next}return P},b=function(F,P){var A=null,X=null;return P.closed?(F==="script"?A="text/javascript":F==="style"&&(A="text/css"),A=E(P)||A,A.search("text/css")>-1?X="css":A.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?X="javascript":A.search(/(text|application|dojo)\/(x-)?(html)/)>-1?X="html":A.search(/test\/null/)>-1&&(X="null"),X):null};function p(F,P){return P.indexOf(F)!==-1}function D(F,P,A){this.parent=F||null,this.tag=P?P.tag_name:"",this.indent_level=A||0,this.parser_token=P||null}function R(F){this._printer=F,this._current_frame=null}R.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},R.prototype.record_tag=function(F){var P=new D(this._current_frame,F,this._printer.indent_level);this._current_frame=P},R.prototype._try_pop_frame=function(F){var P=null;return F&&(P=F.parser_token,this._printer.indent_level=F.indent_level,this._current_frame=F.parent),P},R.prototype._get_frame=function(F,P){for(var A=this._current_frame;A&&!(F.indexOf(A.tag)!==-1);){if(P&&P.indexOf(A.tag)!==-1){A=null;break}A=A.parent}return A},R.prototype.try_pop=function(F,P){var A=this._get_frame([F],P);return this._try_pop_frame(A)},R.prototype.indent_to_tag=function(F){var P=this._get_frame(F);P&&(this._printer.indent_level=P.indent_level)};function y(F,P,A,X){this._source_text=F||"",P=P||{},this._js_beautify=A,this._css_beautify=X,this._tag_stack=null;var z=new n(P,"html");this._options=z,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}y.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var F=this._source_text,P=this._options.eol;this._options.eol==="auto"&&(P=`
|
|
|
`,F&&u.test(F)&&(P=F.match(u)[0])),F=F.replace(o,`
|
|
|
`);var A=F.match(/^[\t ]*/)[0],X={text:"",type:""},z=new x,O=new s(this._options,A),B=new f(F,this._options).tokenize();this._tag_stack=new R(O);for(var U=null,L=B.next();L.type!==d.EOF;)L.type===d.TAG_OPEN||L.type===d.COMMENT?(U=this._handle_tag_open(O,L,z,X),z=U):L.type===d.ATTRIBUTE||L.type===d.EQUALS||L.type===d.VALUE||L.type===d.TEXT&&!z.tag_complete?U=this._handle_inside_tag(O,L,z,B):L.type===d.TAG_CLOSE?U=this._handle_tag_close(O,L,z):L.type===d.TEXT?U=this._handle_text(O,L,z):O.add_raw_token(L),X=U,L=B.next();var G=O._output.get_code(P);return G},y.prototype._handle_tag_close=function(F,P,A){var X={text:P.text,type:P.type};return F.alignment_size=0,A.tag_complete=!0,F.set_space_before_token(P.newlines||P.whitespace_before!=="",!0),A.is_unformatted?F.add_raw_token(P):(A.tag_start_char==="<"&&(F.set_space_before_token(P.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&A.has_wrapped_attrs&&F.print_newline(!1)),F.print_token(P)),A.indent_content&&!(A.is_unformatted||A.is_content_unformatted)&&(F.indent(),A.indent_content=!1),!A.is_inline_element&&!(A.is_unformatted||A.is_content_unformatted)&&F.set_wrap_point(),X},y.prototype._handle_inside_tag=function(F,P,A,X){var z=A.has_wrapped_attrs,O={text:P.text,type:P.type};if(F.set_space_before_token(P.newlines||P.whitespace_before!=="",!0),A.is_unformatted)F.add_raw_token(P);else if(A.tag_start_char==="{"&&P.type===d.TEXT)F.print_preserved_newlines(P)?(P.newlines=0,F.add_raw_token(P)):F.print_token(P);else{if(P.type===d.ATTRIBUTE?(F.set_space_before_token(!0),A.attr_count+=1):(P.type===d.EQUALS||P.type===d.VALUE&&P.previous.type===d.EQUALS)&&F.set_space_before_token(!1),P.type===d.ATTRIBUTE&&A.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(F.traverse_whitespace(P),z=z||P.newlines!==0),this._is_wrap_attributes_force)){var B=A.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&A.attr_count===1){var U=!0,L=0,G;do{if(G=X.peek(L),G.type===d.ATTRIBUTE){U=!1;break}L+=1}while(L<4&&G.type!==d.EOF&&G.type!==d.TAG_CLOSE);B=!U}B&&(F.print_newline(!1),z=!0)}F.print_token(P),z=z||F.previous_token_wrapped(),A.has_wrapped_attrs=z}return O},y.prototype._handle_text=function(F,P,A){var X={text:P.text,type:"TK_CONTENT"};return A.custom_beautifier_name?this._print_custom_beatifier_text(F,P,A):A.is_unformatted||A.is_content_unformatted?F.add_raw_token(P):(F.traverse_whitespace(P),F.print_token(P)),X},y.prototype._print_custom_beatifier_text=function(F,P,A){var X=this;if(P.text!==""){var z=P.text,O,B=1,U="",L="";A.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?O=this._js_beautify:A.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?O=this._css_beautify:A.custom_beautifier_name==="html"&&(O=function(_e,fe){var Re=new y(_e,fe,X._js_beautify,X._css_beautify);return Re.beautify()}),this._options.indent_scripts==="keep"?B=0:this._options.indent_scripts==="separate"&&(B=-F.indent_level);var G=F.get_full_indent(B);if(z=z.replace(/\n[ \t]*$/,""),A.custom_beautifier_name!=="html"&&z[0]==="<"&&z.match(/^(<!--|<!\[CDATA\[)/)){var ee=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(z);if(!ee){F.add_raw_token(P);return}U=G+ee[1]+`
|
|
|
`,z=ee[4],ee[5]&&(L=G+ee[5]),z=z.replace(/\n[ \t]*$/,""),(ee[2]||ee[3].indexOf(`
|
|
|
`)!==-1)&&(ee=ee[3].match(/[ \t]+$/),ee&&(P.whitespace_before=ee[0]))}if(z)if(O){var oe=function(){this.eol=`
|
|
|
`};oe.prototype=this._options.raw_options;var ae=new oe;z=O(G+z,ae)}else{var be=P.whitespace_before;be&&(z=z.replace(new RegExp(`
|
|
|
(`+be+")?","g"),`
|
|
|
`)),z=G+z.replace(/\n/g,`
|
|
|
`+G)}U&&(z?z=U+z+`
|
|
|
`+L:z=U+L),F.print_newline(!1),z&&(P.text=z,P.whitespace_before="",P.newlines=0,F.add_raw_token(P),F.print_newline(!0))}},y.prototype._handle_tag_open=function(F,P,A,X){var z=this._get_tag_open_token(P);return(A.is_unformatted||A.is_content_unformatted)&&!A.is_empty_element&&P.type===d.TAG_OPEN&&P.text.indexOf("</")===0?(F.add_raw_token(P),z.start_tag_token=this._tag_stack.try_pop(z.tag_name)):(F.traverse_whitespace(P),this._set_tag_position(F,P,z,A,X),z.is_inline_element||F.set_wrap_point(),F.print_token(P)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(z.alignment_size=P.text.length+1),!z.tag_complete&&!z.is_unformatted&&(F.alignment_size=z.alignment_size),z};var x=function(F,P){if(this.parent=F||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!P)this.tag_complete=!0;else{var A;this.tag_start_char=P.text[0],this.text=P.text,this.tag_start_char==="<"?(A=P.text.match(/^<([^\s>]*)/),this.tag_check=A?A[1]:""):(A=P.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=A?A[1]:"",(P.text.startsWith("{{#>")||P.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&P.next!==null?this.tag_check=P.next.text.split(" ")[0]:this.tag_check=P.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),P.type===d.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||P.closed&&P.closed.text==="/>";var X=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(X=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(X)))}};y.prototype._get_tag_open_token=function(F){var P=new x(this._tag_stack.get_parser_token(),F);return P.alignment_size=this._options.wrap_attributes_indent_size,P.is_end_tag=P.is_end_tag||p(P.tag_check,this._options.void_elements),P.is_empty_element=P.tag_complete||P.is_start_tag&&P.is_end_tag,P.is_unformatted=!P.tag_complete&&p(P.tag_check,this._options.unformatted),P.is_content_unformatted=!P.is_empty_element&&p(P.tag_check,this._options.content_unformatted),P.is_inline_element=p(P.tag_name,this._options.inline)||P.tag_name.includes("-")||P.tag_start_char==="{",P},y.prototype._set_tag_position=function(F,P,A,X,z){if(A.is_empty_element||(A.is_end_tag?A.start_tag_token=this._tag_stack.try_pop(A.tag_name):(this._do_optional_end_element(A)&&(A.is_inline_element||F.print_newline(!1)),this._tag_stack.record_tag(A),(A.tag_name==="script"||A.tag_name==="style")&&!(A.is_unformatted||A.is_content_unformatted)&&(A.custom_beautifier_name=b(A.tag_check,P)))),p(A.tag_check,this._options.extra_liners)&&(F.print_newline(!1),F._output.just_added_blankline()||F.print_newline(!0)),A.is_empty_element){if(A.tag_start_char==="{"&&A.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),A.indent_content=!0;var O=F.current_line_has_match(/{{#if/);O||F.print_newline(!1)}A.tag_name==="!--"&&z.type===d.TAG_CLOSE&&X.is_end_tag&&A.text.indexOf(`
|
|
|
`)===-1||(A.is_inline_element||A.is_unformatted||F.print_newline(!1),this._calcluate_parent_multiline(F,A))}else if(A.is_end_tag){var B=!1;B=A.start_tag_token&&A.start_tag_token.multiline_content,B=B||!A.is_inline_element&&!(X.is_inline_element||X.is_unformatted)&&!(z.type===d.TAG_CLOSE&&A.start_tag_token===X)&&z.type!=="TK_CONTENT",(A.is_content_unformatted||A.is_unformatted)&&(B=!1),B&&F.print_newline(!1)}else A.indent_content=!A.custom_beautifier_name,A.tag_start_char==="<"&&(A.tag_name==="html"?A.indent_content=this._options.indent_inner_html:A.tag_name==="head"?A.indent_content=this._options.indent_head_inner_html:A.tag_name==="body"&&(A.indent_content=this._options.indent_body_inner_html)),!(A.is_inline_element||A.is_unformatted)&&(z.type!=="TK_CONTENT"||A.is_content_unformatted)&&F.print_newline(!1),this._calcluate_parent_multiline(F,A)},y.prototype._calcluate_parent_multiline=function(F,P){P.parent&&F._output.just_added_newline()&&!((P.is_inline_element||P.is_unformatted)&&P.parent.is_inline_element)&&(P.parent.multiline_content=!0)};var w=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],T=["a","audio","del","ins","map","noscript","video"];y.prototype._do_optional_end_element=function(F){var P=null;if(F.is_empty_element||!F.is_start_tag||!F.parent)return;if(F.tag_name==="body")P=P||this._tag_stack.try_pop("head");else if(F.tag_name==="li")P=P||this._tag_stack.try_pop("li",["ol","ul"]);else if(F.tag_name==="dd"||F.tag_name==="dt")P=P||this._tag_stack.try_pop("dt",["dl"]),P=P||this._tag_stack.try_pop("dd",["dl"]);else if(F.parent.tag_name==="p"&&w.indexOf(F.tag_name)!==-1){var A=F.parent.parent;(!A||T.indexOf(A.tag_name)===-1)&&(P=P||this._tag_stack.try_pop("p"))}else F.tag_name==="rp"||F.tag_name==="rt"?(P=P||this._tag_stack.try_pop("rt",["ruby","rtc"]),P=P||this._tag_stack.try_pop("rp",["ruby","rtc"])):F.tag_name==="optgroup"?P=P||this._tag_stack.try_pop("optgroup",["select"]):F.tag_name==="option"?P=P||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):F.tag_name==="colgroup"?P=P||this._tag_stack.try_pop("caption",["table"]):F.tag_name==="thead"?(P=P||this._tag_stack.try_pop("caption",["table"]),P=P||this._tag_stack.try_pop("colgroup",["table"])):F.tag_name==="tbody"||F.tag_name==="tfoot"?(P=P||this._tag_stack.try_pop("caption",["table"]),P=P||this._tag_stack.try_pop("colgroup",["table"]),P=P||this._tag_stack.try_pop("thead",["table"]),P=P||this._tag_stack.try_pop("tbody",["table"])):F.tag_name==="tr"?(P=P||this._tag_stack.try_pop("caption",["table"]),P=P||this._tag_stack.try_pop("colgroup",["table"]),P=P||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(F.tag_name==="th"||F.tag_name==="td")&&(P=P||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),P=P||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return F.parent=this._tag_stack.get_parser_token(),P},r.exports.Beautifier=y},function(r,c,i){var n=i(6).Options;function l(f){n.call(this,f,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}l.prototype=new n,r.exports.Options=l},function(r,c,i){var n=i(9).Tokenizer,l=i(9).TOKEN,f=i(13).Directives,d=i(14).TemplatablePattern,u=i(12).Pattern,o={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:l.START,RAW:l.RAW,EOF:l.EOF},s=new f(/<\!--/,/-->/),E=function(b,p){n.call(this,b,p),this._current_tag_name="";var D=new d(this._input).read_options(this._options),R=new u(this._input);if(this.__patterns={word:D.until(/[\n\r\t <]/),single_quote:D.until_after(/'/),double_quote:D.until_after(/"/),attribute:D.until(/[\n\r\t =>]|\/>/),element_name:D.until(/[\n\r\t >\/]/),handlebars_comment:R.starting_with(/{{!--/).until_after(/--}}/),handlebars:R.starting_with(/{{/).until_after(/}}/),handlebars_open:R.until(/[\n\r\t }]/),handlebars_raw_close:R.until(/}}/),comment:R.starting_with(/<!--/).until_after(/-->/),cdata:R.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:R.starting_with(/<!\[/).until_after(/]>/),processing:R.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var y=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=R.matching(y).until_after(y)}};E.prototype=new n,E.prototype._is_comment=function(b){return!1},E.prototype._is_opening=function(b){return b.type===o.TAG_OPEN},E.prototype._is_closing=function(b,p){return b.type===o.TAG_CLOSE&&p&&((b.text===">"||b.text==="/>")&&p.text[0]==="<"||b.text==="}}"&&p.text[0]==="{"&&p.text[1]==="{")},E.prototype._reset=function(){this._current_tag_name=""},E.prototype._get_next_token=function(b,p){var D=null;this._readWhitespace();var R=this._input.peek();return R===null?this._create_token(o.EOF,""):(D=D||this._read_open_handlebars(R,p),D=D||this._read_attribute(R,b,p),D=D||this._read_close(R,p),D=D||this._read_raw_content(R,b,p),D=D||this._read_content_word(R),D=D||this._read_comment_or_cdata(R),D=D||this._read_processing(R),D=D||this._read_open(R,p),D=D||this._create_token(o.UNKNOWN,this._input.next()),D)},E.prototype._read_comment_or_cdata=function(b){var p=null,D=null,R=null;if(b==="<"){var y=this._input.peek(1);y==="!"&&(D=this.__patterns.comment.read(),D?(R=s.get_directives(D),R&&R.ignore==="start"&&(D+=s.readIgnored(this._input))):D=this.__patterns.cdata.read()),D&&(p=this._create_token(o.COMMENT,D),p.directives=R)}return p},E.prototype._read_processing=function(b){var p=null,D=null,R=null;if(b==="<"){var y=this._input.peek(1);(y==="!"||y==="?")&&(D=this.__patterns.conditional_comment.read(),D=D||this.__patterns.processing.read()),D&&(p=this._create_token(o.COMMENT,D),p.directives=R)}return p},E.prototype._read_open=function(b,p){var D=null,R=null;return p||b==="<"&&(D=this._input.next(),this._input.peek()==="/"&&(D+=this._input.next()),D+=this.__patterns.element_name.read(),R=this._create_token(o.TAG_OPEN,D)),R},E.prototype._read_open_handlebars=function(b,p){var D=null,R=null;return p||this._options.indent_handlebars&&b==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(D=this.__patterns.handlebars_comment.read(),D=D||this.__patterns.handlebars.read(),R=this._create_token(o.COMMENT,D)):(D=this.__patterns.handlebars_open.read(),R=this._create_token(o.TAG_OPEN,D))),R},E.prototype._read_close=function(b,p){var D=null,R=null;return p&&(p.text[0]==="<"&&(b===">"||b==="/"&&this._input.peek(1)===">")?(D=this._input.next(),b==="/"&&(D+=this._input.next()),R=this._create_token(o.TAG_CLOSE,D)):p.text[0]==="{"&&b==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),R=this._create_token(o.TAG_CLOSE,"}}"))),R},E.prototype._read_attribute=function(b,p,D){var R=null,y="";if(D&&D.text[0]==="<")if(b==="=")R=this._create_token(o.EQUALS,this._input.next());else if(b==='"'||b==="'"){var x=this._input.next();b==='"'?x+=this.__patterns.double_quote.read():x+=this.__patterns.single_quote.read(),R=this._create_token(o.VALUE,x)}else y=this.__patterns.attribute.read(),y&&(p.type===o.EQUALS?R=this._create_token(o.VALUE,y):R=this._create_token(o.ATTRIBUTE,y));return R},E.prototype._is_content_unformatted=function(b){return this._options.void_elements.indexOf(b)===-1&&(this._options.content_unformatted.indexOf(b)!==-1||this._options.unformatted.indexOf(b)!==-1)},E.prototype._read_raw_content=function(b,p,D){var R="";if(D&&D.text[0]==="{")R=this.__patterns.handlebars_raw_close.read();else if(p.type===o.TAG_CLOSE&&p.opened.text[0]==="<"&&p.text[0]!=="/"){var y=p.opened.text.substr(1).toLowerCase();if(y==="script"||y==="style"){var x=this._read_comment_or_cdata(b);if(x)return x.type=o.TEXT,x;R=this._input.readUntil(new RegExp("</"+y+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(y)&&(R=this._input.readUntil(new RegExp("</"+y+"[\\n\\r\\t ]*?>","ig")))}return R?this._create_token(o.TEXT,R):null},E.prototype._read_content_word=function(b){var p="";if(this._options.unformatted_content_delimiter&&(b===this._options.unformatted_content_delimiter[0]&&(p=this.__patterns.unformatted_content_delimiter.read())),p||(p=this.__patterns.word.read()),p)return this._create_token(o.TEXT,p)},r.exports.Tokenizer=E,r.exports.TOKEN=o}],_={};function e(r){var c=_[r];if(c!==void 0)return c.exports;var i=_[r]={exports:{}};return C[r](i,i.exports,e),i.exports}var h=e(18);S=h})();var k=S;if(!0)!(N=[I,I("6UM0"),I("TXwP")],g=function(C){var _=I("6UM0"),e=I("TXwP");return{html_beautify:function(h,r){return k(h,r,_.js_beautify,e.css_beautify)}}}.apply(Z,N),g!==void 0&&(H.exports=g));else var v,m})()},qBft:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.pad.AnsiX923={pad:function(g,S){var k=g.sigBytes,v=S*4,m=v-k%v,C=k+m-1;g.clamp(),g.words[C>>>2]|=m<<24-C%4*8,g.sigBytes+=m},unpad:function(g){var S=g.words[g.sigBytes-1>>>2]&255;g.sigBytes-=S}},N.pad.Ansix923})},qM6L:function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,v=g.enc,m=v.Utf16=v.Utf16BE={stringify:function(_){for(var e=_.words,h=_.sigBytes,r=[],c=0;c<h;c+=2){var i=e[c>>>2]>>>16-c%4*8&65535;r.push(String.fromCharCode(i))}return r.join("")},parse:function(_){for(var e=_.length,h=[],r=0;r<e;r++)h[r>>>1]|=_.charCodeAt(r)<<16-r%2*16;return k.create(h,e*2)}};v.Utf16LE={stringify:function(_){for(var e=_.words,h=_.sigBytes,r=[],c=0;c<h;c+=2){var i=C(e[c>>>2]>>>16-c%4*8&65535);r.push(String.fromCharCode(i))}return r.join("")},parse:function(_){for(var e=_.length,h=[],r=0;r<e;r++)h[r>>>1]|=C(_.charCodeAt(r)<<16-r%2*16);return k.create(h,e*2)}};function C(_){return _<<8&4278255360|_>>>8&16711935}}(),N.enc.Utf16})},qu8F:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){/** @preserve
|
|
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
|
* derived from CryptoJS.mode.CTR
|
|
|
* Jan Hruby jhruby.web@gmail.com
|
|
|
*/return N.mode.CTRGladman=function(){var g=N.lib.BlockCipherMode.extend();function S(m){if((m>>24&255)===255){var C=m>>16&255,_=m>>8&255,e=m&255;C===255?(C=0,_===255?(_=0,e===255?e=0:++e):++_):++C,m=0,m+=C<<16,m+=_<<8,m+=e}else m+=1<<24;return m}function k(m){return(m[0]=S(m[0]))===0&&(m[1]=S(m[1])),m}var v=g.Encryptor=g.extend({processBlock:function(m,C){var _=this._cipher,e=_.blockSize,h=this._iv,r=this._counter;h&&(r=this._counter=h.slice(0),this._iv=void 0),k(r);var c=r.slice(0);_.encryptBlock(c,0);for(var i=0;i<e;i++)m[C+i]^=c[i]}});return g.Decryptor=v,g}(),N.mode.CTRGladman})},"rAM+":function(H,Z,I){"use strict";I.d(Z,"a",function(){return g});var N=I("Qw5x");function g(S,k){var v;if(typeof Symbol=="undefined"||S[Symbol.iterator]==null){if(Array.isArray(S)||(v=Object(N.a)(S))||k&&S&&typeof S.length=="number"){v&&(S=v);var m=0,C=function(){};return{s:C,n:function(){return m>=S.length?{done:!0}:{done:!1,value:S[m++]}},e:function(c){throw c},f:C}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var _=!0,e=!1,h;return{s:function(){v=S[Symbol.iterator]()},n:function(){var c=v.next();return _=c.done,c},e:function(c){e=!0,h=c},f:function(){try{!_&&v.return!=null&&v.return()}finally{if(e)throw h}}}}},rUJ1:function(H,Z){const I=/[&<>"']/,N=/[&<>"']/g,g=/[<>"']|&(?!#?\w+;)/,S=/[<>"']|&(?!#?\w+;)/g,k={"&":"&","<":"<",">":">",'"':""","'":"'"},v=R=>k[R];function m(R,y){if(y){if(I.test(R))return R.replace(N,v)}else if(g.test(R))return R.replace(S,v);return R}const C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function _(R){return R.replace(C,(y,x)=>(x=x.toLowerCase(),x==="colon"?":":x.charAt(0)==="#"?x.charAt(1)==="x"?String.fromCharCode(parseInt(x.substring(2),16)):String.fromCharCode(+x.substring(1)):""))}const e=/(^|[^\[])\^/g;function h(R,y){R=R.source||R,y=y||"";const x={replace:(w,T)=>(T=T.source||T,T=T.replace(e,"$1"),R=R.replace(w,T),x),getRegex:()=>new RegExp(R,y)};return x}const r=/[^\w:]/g,c=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function i(R,y,x){if(R){let w;try{w=decodeURIComponent(_(x)).replace(r,"").toLowerCase()}catch(T){return null}if(w.indexOf("javascript:")===0||w.indexOf("vbscript:")===0||w.indexOf("data:")===0)return null}y&&!c.test(x)&&(x=u(y,x));try{x=encodeURI(x).replace(/%25/g,"%")}catch(w){return null}return x}const n={},l=/^[^:]+:\/*[^/]*$/,f=/^([^:]+:)[\s\S]*$/,d=/^([^:]+:\/*[^/]*)[\s\S]*$/;function u(R,y){n[" "+R]||(l.test(R)?n[" "+R]=R+"/":n[" "+R]=b(R,"/",!0)),R=n[" "+R];const x=R.indexOf(":")===-1;return y.substring(0,2)==="//"?x?y:R.replace(f,"$1")+y:y.charAt(0)==="/"?x?y:R.replace(d,"$1")+y:R+y}const o={exec:function(){}};function s(R){let y=1,x,w;for(;y<arguments.length;y++){x=arguments[y];for(w in x)Object.prototype.hasOwnProperty.call(x,w)&&(R[w]=x[w])}return R}function E(R,y){const x=R.replace(/\|/g,(F,P,A)=>{let X=!1,z=P;for(;--z>=0&&A[z]==="\\";)X=!X;return X?"|":" |"}),w=x.split(/ \|/);let T=0;if(w.length>y)w.splice(y);else for(;w.length<y;)w.push("");for(;T<w.length;T++)w[T]=w[T].trim().replace(/\\\|/g,"|");return w}function b(R,y,x){const w=R.length;if(w===0)return"";let T=0;for(;T<w;){const F=R.charAt(w-T-1);if(F===y&&!x)T++;else if(F!==y&&x)T++;else break}return R.substr(0,w-T)}function p(R,y){if(R.indexOf(y[1])===-1)return-1;const x=R.length;let w=0,T=0;for(;T<x;T++)if(R[T]==="\\")T++;else if(R[T]===y[0])w++;else if(R[T]===y[1]&&(w--,w<0))return T;return-1}function D(R){R&&R.sanitize&&!R.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")}H.exports={escape:m,unescape:_,edit:h,cleanUrl:i,resolveUrl:u,noopTest:o,merge:s,splitCells:E,rtrim:b,findClosingBracket:p,checkSanitizeDeprecation:D}},rWjI:function(H,Z,I){"use strict";I.r(Z),I.d(Z,"Types",function(){return St});var N=I("P2fV"),g=I("NJEC"),S=I("CiB2"),k=I("DYRE"),v=I("zeV3"),m=I("sRBo"),C=I("kaz8"),_=I("7Kak"),e=I("9yH6"),h=I("giR+"),r=I("fyUT"),c=I("OaEy"),i=I("2fM7"),n=I("oBTY"),l=I("rAM+"),f=I("T2oS"),d=I("W9HT"),u=I("g9YV"),o=I("wCAj"),s=I("+L6B"),E=I("2/Rp"),b=I("14J3"),p=I("BMrR"),D=I("jCWc"),R=I("kPKH"),y=I("miYZ"),x=I("tsqr"),w=I("9og8"),T=I("y8nQ"),F=I("Vl3Y"),P=I("tJVT"),A=I("k1fw"),X=I("fu2T"),z=I("gK9i"),O=I("2qtc"),B=I("kLXV"),U=I("5NDa"),L=I("5rEg"),G=I("WmNS"),ee=I.n(G),oe=I("q1tI"),ae=I.n(oe),be=I("eRFJ"),_e=I.n(be),fe=I("jrin"),Re,Oe=i.a.Option,de;(function(mt){mt[mt.language=0]="language",mt[mt.difficulty=1]="difficulty",mt[mt.category=2]="category",mt[mt.openOrNot=3]="openOrNot"})(de||(de={}));var te=(Re={},Object(fe.a)(Re,de.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(fe.a)(Re,de.difficulty,[{title:"\u7B80\u5355",key:1},{title:"\u9002\u4E2D",key:2},{title:"\u56F0\u96BE",key:3}]),Object(fe.a)(Re,de.category,[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}]),Object(fe.a)(Re,de.openOrNot,[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]),Re);function W(mt){return te[mt].map(function(Ct){return ae.a.createElement(Oe,{key:Ct.title,value:Ct.key}," ",Ct.title," ")})}function Y(mt,Ct){mt.map(function(dt){var Ht=dt.id,Gt=dt.name,yt=dt.sub_disciplines,xt={value:Ht,label:Gt};Ct.push(xt),yt&&yt.length>0&&(xt.children=[],Y(yt,xt.children))})}function V(mt,Ct){for(var dt=[],Ht=0;Ht<mt.length;Ht++){var Gt,yt=mt[Ht];if(((Gt=yt.sub_disciplines)===null||Gt===void 0?void 0:Gt.length)>0){dt[0]=yt.id;for(var xt=0;xt<yt.sub_disciplines.length;xt++){var Kt=yt.sub_disciplines[xt];if(Kt.id===Ct)return dt[1]=Kt.id,[dt,Kt.tag_disciplines||Kt.sub_disciplines||[]]}}}return[dt,[]]}var Q=I("Ty5D"),q=I("9kvl"),ie=I("J66h"),ne=I("GIiI"),J=I("2BaD"),$=I("Ot1p"),le=I("ErOA");function ce(mt){return Object(le.f)("practices.json",mt)}function we(){return Object(le.c)("problems/new.json")}function Fe(mt){return Object(le.c)("practices/".concat(mt,"/edit.json"))}function Xe(mt,Ct){return Object(le.g)("practices/".concat(mt),Ct)}function $e(mt,Ct){return Object(le.f)("exercises/".concat(mt,"/exercise_questions.json"),Ct)}function Ye(mt,Ct){return Object(le.g)("exercise_questions/".concat(mt,".json"),Ct)}var Ze=I("cDPC"),qe=I("bbsP"),Pe=I("/wGt"),Ie=I("0Owb"),Je=I("ZW9T"),rt=I("ZD9Y"),ye=I("M8RZ"),ue=I("bCnd"),he=I("1T2W"),me=I.n(he),Ce={theme:Object(ue.a)("cmCodeMode","vs-dark"),fontSize:Object(ue.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(ue.a)("cmTabToSpace",!0)},ge;(function(mt){mt[mt.set_font_size=0]="set_font_size",mt[mt.set_theme=1]="set_theme",mt[mt.on_tab_to_space=2]="on_tab_to_space",mt[mt.set_show_editor_setting=3]="set_show_editor_setting"})(ge||(ge={}));function Ee(mt,Ct){switch(Ct.type){case ge.set_show_editor_setting:return Object(A.a)(Object(A.a)({},mt),{},{showEditorSetting:Ct.payload});case ge.set_theme:return Object(A.a)(Object(A.a)({},mt),{},{theme:Ct.payload});case ge.set_font_size:return Object(A.a)(Object(A.a)({},mt),{},{fontSize:Ct.payload});case ge.on_tab_to_space:return Object(A.a)(Object(A.a)({},mt),{},{tabToSpace:Ct.payload});default:throw new Error}}var Ae=function(mt){var Ct=mt.value,dt=mt.onChange,Ht=mt.language,Gt=mt.onLanguage,yt=mt.languageItems,xt=mt.ActionBarRender,Kt=xt===void 0?function(jr){return ae.a.createElement(De,{languageItems:yt,onLanguage:Gt,language:Ht,onShowCodeSetting:jr})}:xt,Ar=Object(oe.useReducer)(Ee,Ce),qt=Object(P.a)(Ar,2),ut=qt[0],kt=qt[1],Hr=ut.theme,Yr=ut.fontSize,On=ut.showEditorSetting,cn=ut.tabToSpace;console.log(Ct,Ht,"value");var zr={onFontSizeChange:function(xr){kt({type:ge.set_font_size,payload:xr}),Object(ue.b)("cmFontSize",xr)},tabToSpace:cn,cmFontSize:Yr,className:"oj",cmCodeMode:Hr,onTabToSpace:function(xr){kt({type:ge.on_tab_to_space,payload:xr}),Object(ue.b)("cmTabToSpace",xr)},onCodeModeChange:function(xr){kt({type:ge.set_theme,payload:xr}),Object(ue.b)("cmCodeMode",xr)}};function Pt(){kt({type:ge.set_show_editor_setting,payload:!1})}function dn(){kt({type:ge.set_show_editor_setting,payload:!0})}var ct={value:Ct,language:Ht,onChange:dt,theme:Hr,height:"calc(100% - 56px)",options:{fontSize:Yr,insertSpaces:cn}};return ae.a.createElement(oe.Fragment,null,ae.a.createElement("div",{className:me.a["code-panel-container"]},Kt(dn),ae.a.createElement(Je.b,Object(Ie.a)({key:Ht},ct))),ae.a.createElement(ye.a,null,ae.a.createElement(Pe.a,{className:"oj",title:null,placement:"right",closable:!1,visible:On,onClose:Pt},ae.a.createElement(rt.a,zr))))};function De(mt){var Ct=mt.languageItems,dt=mt.language,Ht=mt.onShowCodeSetting,Gt=mt.onLanguage;return ae.a.createElement("div",{className:me.a["action-oj-bar"]},Ct==null?void 0:Ct.map(function(yt){return ae.a.createElement("div",{className:dt===(yt==null?void 0:yt.language)?me.a.active:"",onClick:function(){return Gt(yt==null?void 0:yt.language)},key:yt==null?void 0:yt.language},yt==null?void 0:yt.language)}),ae.a.createElement("a",{onClick:Ht},ae.a.createElement("i",{className:"iconfont icon-shezhi"})))}var Me=I("Znn+"),He=I("ZTPi"),nt=I("L9qf"),at=I.n(nt),it=function(Ct){var dt=Ct.visible,Ht=Ct.onOK,Gt=Ct.onCancel,yt=Object(oe.useState)(!1),xt=Object(P.a)(yt,2),Kt=xt[0],Ar=xt[1],qt=Object(oe.useState)(!1),ut=Object(P.a)(qt,2),kt=ut[0],Hr=ut[1],Yr=Object(oe.useState)("1"),On=Object(P.a)(Yr,2),cn=On[0],zr=On[1],Pt=Object(oe.useState)(""),dn=Object(P.a)(Pt,2),ct=dn[0],jr=dn[1],xr=Object(oe.useState)([]),Gn=Object(P.a)(xr,2),An=Gn[0],hn=Gn[1],Ei=function(){var Vr=Object(w.a)(ee.a.mark(function dr(){var nn;return ee.a.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:if(ct){jt.next=3;break}return x.b.warn("\u9898\u76EE".concat(fn,"\u4E0D\u80FD\u4E3A\u7A7A")),jt.abrupt("return");case 3:return Hr(!0),jt.next=6,Object(le.a)("/api/tag_disciplines.json",{method:"post",body:{target:dt,name:ct}});case 6:if(nn=jt.sent,!((nn==null?void 0:nn.status)===0)){jt.next=10;break}return Ht(),jt.abrupt("return");case 10:Hr(!1);case 11:case"end":return jt.stop()}},dr)}));return function(){return Vr.apply(this,arguments)}}(),Kn=function(){var Vr=Object(w.a)(ee.a.mark(function dr(){var nn,_n,jt=arguments;return ee.a.wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:return nn=jt.length>0&&jt[0]!==void 0?jt[0]:"",Ar(!0),ur.next=4,Object(le.a)("/api/tag_disciplines.json",{method:"get",params:{target:dt,search:nn}});case 4:_n=ur.sent,hn(_n.tag_disciplines||[]),Ar(!1);case 7:case"end":return ur.stop()}},dr)}));return function(){return Vr.apply(this,arguments)}}(),bn=function(dr){var nn=dr.name;B.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:ae.a.createElement("div",null,ae.a.createElement(L.a,{defaultValue:nn,placeholder:"\u8BF7\u8F93\u5165".concat(fn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20,onChange:function(jt){nn=jt.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var _n=Object(w.a)(ee.a.mark(function lr(){var ur;return ee.a.wrap(function(br){for(;;)switch(br.prev=br.next){case 0:if(nn){br.next=3;break}return x.b.warn("\u9898\u76EE".concat(fn,"\u4E0D\u80FD\u4E3A\u7A7A")),br.abrupt("return",Promise.reject());case 3:return br.next=5,Object(le.a)("/api/tag_disciplines/".concat(dr.id,"/rename.json"),{method:"post",body:{id:dr.id,name:nn}});case 5:ur=br.sent,(ur==null?void 0:ur.status)===0&&Kn();case 7:case"end":return br.stop()}},lr)}));function jt(){return _n.apply(this,arguments)}return jt}()})},Fr=function(dr){B.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:dt==="practice"?ae.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",ae.a.createElement("span",{className:"c-light-primary"},dr.name),"\u201D\u5220\u9664\u5417\uFF1F",ae.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):ae.a.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",ae.a.createElement("span",{className:"c-light-primary"},dr.name),"\u201D\u5220\u9664\u5417\uFF1F",ae.a.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u77E5\u8BC6\u70B9\u8FDB\u884C\u6E05\u9664\u3002"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var nn=Object(w.a)(ee.a.mark(function jt(){var lr;return ee.a.wrap(function(Rr){for(;;)switch(Rr.prev=Rr.next){case 0:return Rr.next=2,Object(le.a)("/api/tag_disciplines/".concat(dr.id,".json"),{method:"delete",body:{id:dr.id}});case 2:lr=Rr.sent,(lr==null?void 0:lr.status)===0&&Kn();case 4:case"end":return Rr.stop()}},jt)}));function _n(){return nn.apply(this,arguments)}return _n}()})},di=function(dr){Kn(dr)},fn=dt==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return ae.a.createElement(B.a,{afterClose:function(){Hr(!1),Ar(!1),jr(""),zr("1"),hn([])},centered:!0,keyboard:!1,width:600,title:"".concat(fn,"\u7BA1\u7406"),visible:!!dt,className:at.a.customModal,footer:null,onCancel:Gt},ae.a.createElement("section",{className:at.a.wrap},ae.a.createElement(He.a,{activeKey:cn,onChange:function(dr){jr(""),zr(dr),Kn()}},ae.a.createElement(He.a.TabPane,{tab:"\u65B0\u589E".concat(fn),key:"1"},ae.a.createElement(L.a,{value:ct,onChange:function(dr){return jr(dr.target.value)},className:at.a.in,placeholder:"\u8F93\u5165".concat(fn,"\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57"),maxLength:20}),ae.a.createElement("div",{className:at.a.btns},ae.a.createElement(E.a,{onClick:Gt,className:"mr20"},"\u53D6\u6D88"," "),ae.a.createElement(E.a,{loading:kt,onClick:Ei,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),ae.a.createElement(He.a.TabPane,{tab:"\u5DF2\u6709".concat(fn),key:"2"},ae.a.createElement(L.a.Search,{allowClear:!0,onSearch:di,value:ct,onChange:function(dr){return jr(dr.target.value)},className:at.a.in,placeholder:"\u8F93\u5165".concat(fn,"\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2")}),ae.a.createElement(o.a,{dataSource:An,bordered:!1,loading:Kt,scroll:An.length>7?{y:300}:{},style:{padding:"0 40px 20px 40px"},columns:[{title:"".concat(fn,"\u540D\u79F0"),dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:function(dr,nn){return ae.a.createElement("span",null,ae.a.createElement("span",{onClick:function(){return bn(nn)},className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),ae.a.createElement("span",{onClick:function(){return Fr(nn)},className:"current c-grey-666"},"\u5220\u9664"))}}],pagination:!1})))))},st=it,Tt=I("m3rI"),pt=I("B7Ph"),ht=I("wd/R"),Ft=I.n(ht),Lt=I("1vsH"),Yt=I("9Bee"),$t=I("xKgJ"),Mt=L.a.TextArea,wt=B.a.confirm,Jt=z.a.Panel,Dt={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0},St;(function(mt){mt[mt.SET_INITAL_DATA=0]="SET_INITAL_DATA",mt[mt.SET_LOADING=1]="SET_LOADING",mt[mt.SET_STATUS=2]="SET_STATUS"})(St||(St={}));var _t="#### \u9898\u76EE\u63CF\u8FF0\n\u73B0\u6709\u4E00\u4E2A\u6574\u578B\u6570\u7EC4 `nums`\uFF0C\u8BF7\u7F16\u5199\u7A0B\u5E8F\u5C06\u6570\u7EC4 `nums` \u4E2D\u7684\u6240\u6709 `$$0$$` \u79FB\u52A8\u5230\u6570\u7EC4\u7684\u672B\u5C3E\uFF0C\u4F46\u4E0D\u6539\u53D8\u975E\u96F6\u5143\u7D20\u5728\u6570\u7EC4\u4E2D\u7684\u76F8\u5BF9\u4F4D\u7F6E\u3002\u8BF7\u5728\u539F\u6570\u7EC4 `nums` \u4E0A\u8FDB\u884C\u64CD\u4F5C\u3002\n#### \u8F93\u5165\u8F93\u51FA\u683C\u5F0F\n**\u8F93\u5165\u683C\u5F0F**\n\u7B2C\u4E00\u884C\u6709\u4E00\u4E2A\u6574\u6570 `numsSize`\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u5927\u5C0F\uFF1B\n\u7B2C\u4E8C\u884C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n**\u8F93\u51FA\u683C\u5F0F**\n\u4E00\u884C\u8F93\u51FA\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B1\n**\u8F93\u5165**\n`4`\n`0 1 2 3`\n**\u8F93\u51FA**\n`1 2 3 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B2\n**\u8F93\u5165**\n`5`\n`1 1 0 1 0`\n**\u8F93\u51FA**\n`1 1 1 0 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8BF4\u660E\u63D0\u793A\n-`1\u2264n\u2264100`";function Et(mt,Ct){switch(Ct.type){case St.SET_INITAL_DATA:return Object(A.a)(Object(A.a)({},mt),Ct.payload);case St.SET_LOADING:return Object(A.a)(Object(A.a)({},mt),{},{loading:Ct.payload});case St.SET_STATUS:return Object(A.a)(Object(A.a)({},mt),{},{status:Ct.payload});default:throw new Error}}var Bt=Z.default=function(){var mt,Ct,dt,Ht=Object(Q.h)(),Gt=Object(Q.g)(),yt=Object(Q.i)(),xt=yt.id,Kt=F.a.useForm(),Ar=Object(P.a)(Kt,1),qt=Ar[0],ut=Object(oe.useState)(),kt=Object(P.a)(ut,2),Hr=kt[0],Yr=kt[1],On=Object(oe.useState)(!1),cn=Object(P.a)(On,2),zr=cn[0],Pt=cn[1],dn=Object(oe.useState)([]),ct=Object(P.a)(dn,2),jr=ct[0],xr=ct[1],Gn=Object(oe.useState)([]),An=Object(P.a)(Gn,2),hn=An[0],Ei=An[1],Kn=Object(oe.useState)([]),bn=Object(P.a)(Kn,2),Fr=bn[0],di=bn[1],fn=Object(oe.useState)([]),Vr=Object(P.a)(fn,2),dr=Vr[0],nn=Vr[1],_n=Object(oe.useState)([]),jt=Object(P.a)(_n,2),lr=jt[0],ur=jt[1],Rr=Object(oe.useState)("C"),br=Object(P.a)(Rr,2),hi=br[0],Fn=br[1],$i=Object(oe.useReducer)(Et,Dt),Ji=Object(P.a)($i,2),Oi=Ji[0],pn=Ji[1],Ki=Oi.loading,Zr=Oi.data,ri=Oi.user,kn=Oi.status,sn=Zr==null?void 0:Zr.hack_sets,Tn=Zr==null||((mt=Zr.hack)===null||mt===void 0)?void 0:mt.test_set_average,fi=Object(oe.useState)(!1),zn=Object(P.a)(fi,2),Vn=zn[0],ki=zn[1],Mi=Object(oe.useRef)([]),Xn=Object(oe.useState)(!1),ji=Object(P.a)(Xn,2),pi=ji[0],mi=ji[1],Yn=Object(oe.useState)(!1),$n=Object(P.a)(Yn,2),Pi=$n[0],ni=$n[1],gi=Object(oe.useRef)(!0),Fi=Object(oe.useState)({}),ii=Object(P.a)(Fi,2),Ur=ii[0],Ut=ii[1];Object(oe.useEffect)(function(){return Object(q.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(q.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(q.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(q.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}},[]),Object(oe.useEffect)(function(){setTimeout(function(){document.title="\u5728\u7EBF\u5237\u9898"},400)});var er=function(){var tr=Object(w.a)(ee.a.mark(function It(){var ir,or;return ee.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,Object(le.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}});case 2:return ir=vr.sent,vr.next=5,Object(le.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});case 5:or=vr.sent,Ei(ir.tag_disciplines||[]),di(or.tag_disciplines||[]);case 8:case"end":return vr.stop()}},It)}));return function(){return tr.apply(this,arguments)}}(),zt=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}],ar=Object(oe.useCallback)(Object(w.a)(ee.a.mark(function tr(){var It,ir,or,Wr,vr,mn,an,Ai,In,Mn,Bn,Xi,ke,Ge,Ve,Ne,xe,Le,Se,je,Be,ze,Ke,Qe,ot,vt,gt;return ee.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:if(pn({type:St.SET_LOADING,payload:!0}),!xt){Xt.next=19;break}return Xt.next=4,Fe(xt);case 4:It=Xt.sent,ir=It.user,or=It.language,Wr=It.practice_sets,vr=It.practice_codes,mn=It.description,an=It.difficulty,Ai=It.name,In=It.open_or_not,Mn=It.time_limit,Bn=It.test_set_average,Xi=It.test_set_score,ke=It.status,Ge=It.tag_discipline_ids,Ve=It.source_discipline_ids,Ne=It.item_banks_group_id,xe=It.is_file,Le=xe===void 0?!1:xe,Se=It.hide_actual_output,je=It.review_privilege,Be=It.review_description,ze={review_privilege:je,status:ke,review_description:Be,name:Ai},Ut(ze),ki(Se),Ke=Le?[{input:"",output:"",score:100,position:1}]:Wr,Le?(xr(Wr),qt.setFieldsValue({hack_sets:Ke})):xr([]),Qe={loading:!0,user:ir,status:ke,data:{hack:{difficulty:an,name:Ai,description:mn,open_or_not:In,time_limit:Mn,test_set_average:Bn,test_set_score:Xi,tag_discipline_ids:Ge,source_discipline_ids:Ve,is_file:Le},hack_sets:Ke}},pn({type:St.SET_INITAL_DATA,payload:Qe}),Yr({hack:{difficulty:an,name:Ai,description:mn,open_or_not:In,time_limit:Mn,test_set_average:Bn,test_set_score:Xi,tag_discipline_ids:Ge,source_discipline_ids:Ve,is_file:Le}}),ot=vr==null?void 0:vr.map(function(sr){return Object(A.a)(Object(A.a)({},sr),{},{code:ie.Base64.decode(sr==null?void 0:sr.code)})}),ur(ot),Mi.current=ot,Xt.next=27;break;case 19:return Xt.next=21,we();case 21:vt=Xt.sent,gt=vt.user,pn({type:St.SET_INITAL_DATA,payload:{loading:!0,status:0,user:gt,data:{hack:{difficulty:"",time_limit:3,description:_t,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),Yr({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),ur(zt),Mi.current=zt;case 27:pn({type:St.SET_LOADING,payload:!1});case 28:case"end":return Xt.stop()}},tr)})),[xt]);Object(oe.useEffect)(function(){try{ar(),er()}catch(tr){console.log(tr,"----")}},[]);function _r(tr,It){return Lr.apply(this,arguments)}function Lr(){return Lr=Object(w.a)(ee.a.mark(function tr(It,ir){var or,Wr,vr,mn,an,Ai,In,Mn,Bn,Xi,ke,Ge,Ve,Ne,xe,Le,Se,je;return ee.a.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:Wr=Object(A.a)({},It),vr=Wr.hack_sets,mn=Wr.hack,mn.hide_actual_output=Vn,an=[],Ai=[],In=0,Mn=mn!=null&&mn.is_file?jr.map(function(Ke,Qe){return Object(A.a)(Object(A.a)({},Ke),{},{position:Qe+1})}):vr.map(function(Ke){return Object(A.a)(Object(A.a)({},Ke),{},{is_file:!1})}),Bn=Object(l.a)(Mn);try{for(Bn.s();!(Xi=Bn.n()).done;)ke=Xi.value,In+=ke.score,ke.id&&ke.id>=0?an.push(ke):Ai.push(ke)}catch(Ke){Bn.e(Ke)}finally{Bn.f()}if(Mn!=null&&Mn.length){ze.next=11;break}return x.b.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A"),ze.abrupt("return");case 11:if(!(In!==100&&!mn.test_set_score)){ze.next=14;break}return x.b.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100"),ze.abrupt("return");case 14:if(!(Mn!=null&&Mn.some(function(Ke){return!Ke.output}))){ze.next=17;break}return x.b.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A"),ze.abrupt("return");case 17:if(gi.current?mi(!0):ni(!0),Ve=lr==null?void 0:lr.map(function(Ke){return Object(A.a)(Object(A.a)({},Ke),{},{code:ie.Base64.encode(Ke==null?void 0:Ke.code)})}),!xt){ze.next=25;break}return ze.next=22,Xe(xt,{practice:mn,practice_codes:Ve,practice_sets:Ai,update_practice_sets:an});case 22:Ge=ze.sent,ze.next=28;break;case 25:return ze.next=27,ce({practice:mn,practice_codes:Ve,practice_sets:Mn,publish:!gi.current});case 27:Ge=ze.sent;case 28:if(mi(!1),ni(!1),!(((or=Ge)===null||or===void 0?void 0:or.status)===0)){ze.next=46;break}if(!((Ne=Ge)!==null&&Ne!==void 0&&(xe=Ne.similar_practice)!==null&&xe!==void 0&&xe.length)){ze.next=35;break}return Pt(!0),nn((Le=Ge)===null||Le===void 0?void 0:Le.similar_practice),ze.abrupt("return");case 35:if(!xt){ze.next=44;break}if(x.b.success("\u4FDD\u5B58\u6210\u529F"),gi.current){ze.next=42;break}return ze.next=40,Object(le.a)("/api/practices/".concat(xt,"/start"),{method:"get"});case 40:Se=ze.sent,(Se==null?void 0:Se.status)===0&&Gt.push("/problems/".concat(Se==null?void 0:Se.identifier,"/oj/").concat(xt));case 42:ze.next=46;break;case 44:x.b.success("\u65B0\u5EFA\u6210\u529F"),Gt.replace("/problems/".concat((je=Ge)===null||je===void 0?void 0:je.identifier,"/ojedit"));case 46:case"end":return ze.stop()}},tr)})),Lr.apply(this,arguments)}function mr(){Gt.replace("/problems")}var qr=function(It){var ir=Math.floor(100/It.length),or=ir+100%It.length;It=It.map(function(Wr,vr){return vr===It.length-1?Object(A.a)(Object(A.a)({},Wr),{},{score:or}):Object(A.a)(Object(A.a)({},Wr),{},{score:ir})}),xr(It)};function Un(tr){tr.target.value||qr(jr),pn({type:St.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack:Object(A.a)(Object(A.a)({},Zr.hack),{},{test_set_score:tr.target.value})})}})}function hr(tr){pn({type:St.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack:Object(A.a)(Object(A.a)({},Zr.hack),{},{is_file:tr.target.value})})}})}function vi(tr){ki(tr.target.checked)}function kr(tr){var It=tr.target.value;It&&qr(jr),pn({type:St.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack:Object(A.a)(Object(A.a)({},Zr.hack),{},{test_set_average:It})})}})}function Sn(){var tr=qt.getFieldValue("hack_sets"),It=tr.length+1,ir=Math.floor(100/It),or=100%It;tr.map(function(Wr,vr){return Tn&&(Wr.score=ir),Wr.position=vr+1,Wr}),tr.push({input:"",output:"",position:It,score:Tn?ir+or:0}),qt.setFieldsValue({hack_sets:tr}),pn({type:St.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack_sets:tr})}})}Object(oe.useEffect)(function(){if(Tn){var tr=sn==null?void 0:sn.length,It=Math.floor(100/tr),ir=100%tr;sn==null||sn.map(function(or,Wr){return or.score=It,or.position=Wr+1,Wr===tr-1&&(or.score=It+ir),or}),pn({type:St.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack_sets:sn})}}),qt.setFieldsValue({hack_sets:sn})}},[Tn]);function Rn(tr){var It=qt.getFieldValue("hack_sets"),ir=(It==null?void 0:It.length)-1,or=Math.ceil(100/ir),Wr=100%ir;It.splice(tr,1),It==null||It.map(function(vr,mn){return Tn&&(vr.score=or,mn===ir-1&&(vr.score=or+Wr)),vr.position=mn+1,vr}),pn({type:St.SET_INITAL_DATA,payload:{data:Object(A.a)(Object(A.a)({},Zr),{},{hack_sets:It})}}),qt.setFieldsValue({hack_sets:It})}function li(tr){Fn(tr)}var ua=function(It){var ir,or=(ir=Mi.current)===null||ir===void 0?void 0:ir.findIndex(function(Wr){return Wr.language===hi});Mi.current[or].code=It,ur(Mi.current)},Mr=function(It){Yr(Object(A.a)({},qt.getFieldsValue()))},wr=function(){var tr=Object(w.a)(ee.a.mark(function It(ir){var or;return ee.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,Object(le.a)("/api/practices/".concat(ir,"/start"),{method:"get"});case 2:or=vr.sent,(or==null?void 0:or.status)===0&&Object(Lt.S)("/problems/".concat(or==null?void 0:or.identifier,"/oj/").concat(ir));case 4:case"end":return vr.stop()}},It)}));return function(ir){return tr.apply(this,arguments)}}(),gr=function(){var tr=Object(w.a)(ee.a.mark(function It(){var ir,or,Wr,vr,mn,an;return ee.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,Fe(xt);case 2:ir=In.sent,or=ir.name,Wr=ir.status,vr=ir.review_privilege,mn=ir.review_description,an={review_privilege:vr,status:Wr,review_description:mn,name:or},Ut(an);case 6:case"end":return In.stop()}},It)}));return function(){return tr.apply(this,arguments)}}(),ai=function(){var It="";B.a.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:ae.a.createElement("div",{className:"mt20"},ae.a.createElement($.a,{className:_e.a.MdEditor,defaultValue:It,onChange:function(or){It=or}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var ir=Object(w.a)(ee.a.mark(function Wr(){var vr;return ee.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:if(It){an.next=3;break}return x.b.warn("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),an.abrupt("return",Promise.reject());case 3:return an.next=5,Object(le.a)("/api/practices/".concat(xt,"/review.json"),{method:"post",body:{op:"fail",description:It}});case 5:vr=an.sent,(vr==null?void 0:vr.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),gr());case 7:case"end":return an.stop()}},Wr)}));function or(){return ir.apply(this,arguments)}return or}()})},zi=function(){var tr=Object(w.a)(ee.a.mark(function It(){return ee.a.wrap(function(or){for(;;)switch(or.prev=or.next){case 0:B.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u63D0\u793A",content:"\u786E\u8BA4\u5C06\u9898\u76EE\u300A".concat(Ur==null?void 0:Ur.name,"\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var Wr=Object(w.a)(ee.a.mark(function mn(){var an;return ee.a.wrap(function(In){for(;;)switch(In.prev=In.next){case 0:return In.next=2,Object(le.a)("/api/practices/".concat(xt,"/review.json"),{method:"post",body:{op:"pass"}});case 2:an=In.sent,(an==null?void 0:an.status)===0&&(x.b.success("\u63D0\u4EA4\u6210\u529F"),gr());case 4:case"end":return In.stop()}},mn)}));function vr(){return Wr.apply(this,arguments)}return vr}()});case 1:case"end":return or.stop()}},It)}));return function(){return tr.apply(this,arguments)}}(),Vi=function(){var It=B.a.confirm({icon:null,width:700,className:"".concat(_e.a.cusModal," custom-modal-divider"),centered:!0,title:ae.a.createElement(p.a,null,ae.a.createElement(R.a,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),ae.a.createElement(R.a,null,ae.a.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:function(){return It.destroy()}}))),content:ae.a.createElement("div",null,ae.a.createElement(Yt.a,{className:"mt20",value:(Ur==null?void 0:Ur.review_description)||""}))})};return ae.a.createElement(d.a,{spinning:Ki,size:"large",className:_e.a["oj-custom-large-spin"]},Zr?ae.a.createElement(oe.Fragment,null,ae.a.createElement("header",{className:_e.a.header},ae.a.createElement("div",null,ae.a.createElement("img",{src:"".concat(Tt.a.IMG_SERVER,"/images/").concat(ri==null?void 0:ri.image_url),alt:"user",width:30}),ae.a.createElement("span",null,ri==null?void 0:ri.name)),ae.a.createElement("h2",null," ",Zr==null||((Ct=Zr.hack)===null||Ct===void 0)?void 0:Ct.name," "),xt?ae.a.createElement("a",{className:_e.a.btn_back,onClick:mr}," ",ae.a.createElement(ne.a,null),"\u9000\u51FA"):null),ae.a.createElement(F.a,{form:qt,initialValues:Zr,layout:"vertical",className:_e.a["oj-form-container"],onValuesChange:Mr,onFinish:_r},ae.a.createElement(Ze.a,{hideResize:!0,className:_e.a["oj-problems"],leftChild:ae.a.createElement(Dr,{formValue:Hr,onRemoveTestCase:Rn,onAddTestCase:Sn,hack:Zr.hack,onChangeScore:Un,onChangehide:vi,onChangeAverage:kr,onChangeFile:hr,uploadData:jr,setUploadData:xr,handleUploadRatio:qr,ischecked:Vn,pointData:hn,sourceData:Fr,getPointData:er,id:xt}),rightChild:ae.a.createElement(Ae,{value:lr==null||((dt=lr.find(function(tr){return tr.language===hi}))===null||dt===void 0)?void 0:dt.code,onChange:ua,onLanguage:li,languageItems:lr,language:hi})}),ae.a.createElement("div",{className:_e.a.footer},!!xt&&ae.a.createElement("div",{className:_e.a.result},ae.a.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),Ur!=null&&Ur.review_privilege?ae.a.createElement(ae.a.Fragment,null,ae.a.createElement("div",{onClick:zi,className:_e.a.pass},"\u901A\u8FC7"),ae.a.createElement("div",{onClick:ai,className:_e.a.noPass},"\u4E0D\u901A\u8FC7")):ae.a.createElement(ae.a.Fragment,null,(Ur==null?void 0:Ur.status)===0&&ae.a.createElement("div",{className:_e.a.passText},ae.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(Ur==null?void 0:Ur.status)===1&&ae.a.createElement("div",{className:_e.a.passText},ae.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(Ur==null?void 0:Ur.status)===2&&ae.a.createElement("div",{className:_e.a.passText},ae.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(Ur==null?void 0:Ur.status)===3&&ae.a.createElement("div",{className:_e.a.passText},ae.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(Ur==null?void 0:Ur.status)===4&&ae.a.createElement("div",{className:_e.a.passText},ae.a.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(Ur==null?void 0:Ur.status)===5&&ae.a.createElement("div",{className:_e.a.noPassText},ae.a.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",ae.a.createElement("span",{onClick:Vi},"\u67E5\u770B\u539F\u56E0")))),ae.a.createElement(E.a,{type:"primary",ghost:!0,onClick:mr},"\u9000\u51FA\u7F16\u8F91"),ae.a.createElement(E.a,{disabled:Pi,loading:pi,type:"primary",onClick:function(){gi.current=!0,qt.submit()}},"\u4FDD\u5B58"," "),xt?ae.a.createElement(E.a,{disabled:pi,loading:Pi,style:{background:"#2FC25B",border:0},type:"primary",onClick:function(){gi.current=!1,qt.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):ae.a.createElement(E.a,{disabled:pi,loading:Pi,type:"primary",onClick:function(){gi.current=!1,qt.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,ae.a.createElement(B.a,{centered:!0,destroyOnClose:!0,footer:null,visible:zr,onCancel:function(){return Pt(!1)},title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},ae.a.createElement("div",null,ae.a.createElement("p",{className:"font14"},"\u7ECF\u7CFB\u7EDF\u68C0\u6D4B\u53D1\u73B0\uFF0C\u672C\u9898\u76EE\u4E0E\u7CFB\u7EDF\u4E2D\u5DF2\u521B\u5EFA\u7684\u9898\u76EE\u9AD8\u5EA6\u96F7\u540C\uFF0C\u8BF7\u8C03\u6574\u9898\u76EE\u540E\u518D\u8FDB\u884C\u4FDD\u5B58"),ae.a.createElement(o.a,{dataSource:dr,bordered:!1,scroll:dr.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:function(It,ir){return ae.a.createElement("span",{onClick:function(){return wr(ir==null?void 0:ir.identifier)},style:{textDecorationLine:"underline"},className:"current c-light-primary"},It)}},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:function(It){var ir;return(ir=Ft()(It))===null||ir===void 0?void 0:ir.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function Dr(mt){var Ct,dt,Ht=mt.ischecked,Gt=mt.formValue,yt=mt.hack,xt=mt.onChangeAverage,Kt=mt.onChangeScore,Ar=mt.onChangehide,qt=mt.onChangeFile,ut=mt.onAddTestCase,kt=mt.onRemoveTestCase,Hr=mt.uploadData,Yr=mt.setUploadData,On=mt.handleUploadRatio,cn=mt.pointData,zr=mt.sourceData,Pt=mt.getPointData,dn=mt.id,ct=yt.test_set_average,jr=yt.test_set_score,xr=Object(oe.useState)(!1),Gn=Object(P.a)(xr,2),An=Gn[0],hn=Gn[1],Ei=Object(oe.useState)(!1),Kn=Object(P.a)(Ei,2),bn=Kn[0],Fr=Kn[1],di=function(lr,ur){var Rr=Object(n.a)(Hr);Rr.splice(ur,1),ct?On(Rr):Yr(Rr)},fn=function(lr,ur){console.log(lr,ur);var Rr=Hr.map(function(br,hi){return hi===ur?Object(A.a)(Object(A.a)({},br),{},{score:lr.target.value?Number(lr.target.value):0}):br});Yr(Rr)},Vr=function(lr){var ur=Hr.concat(lr);yt.test_set_average?On(ur):Yr(ur)};function dr(jt){jt.stopPropagation()}function nn(){if(Object($t.w)()){Fr("practice");return}var jt="";B.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:ae.a.createElement("div",null,ae.a.createElement(L.a,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(ur){jt=ur.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var lr=Object(w.a)(ee.a.mark(function Rr(){var br;return ee.a.wrap(function(Fn){for(;;)switch(Fn.prev=Fn.next){case 0:return Fn.next=2,Object(le.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:jt}});case 2:br=Fn.sent,(br==null?void 0:br.status)===0&&Pt();case 4:case"end":return Fn.stop()}},Rr)}));function ur(){return lr.apply(this,arguments)}return ur}()})}function _n(){if(Object($t.w)()){Fr("practice_source");return}var jt="";B.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:ae.a.createElement("div",null,ae.a.createElement(L.a,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:function(ur){jt=ur.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:function(){var lr=Object(w.a)(ee.a.mark(function Rr(){var br;return ee.a.wrap(function(Fn){for(;;)switch(Fn.prev=Fn.next){case 0:return Fn.next=2,Object(le.a)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:jt}});case 2:br=Fn.sent,(br==null?void 0:br.status)===0&&Pt();case 4:case"end":return Fn.stop()}},Rr)}));function ur(){return lr.apply(this,arguments)}return ur}()})}return ae.a.createElement("div",{className:_e.a["oj-left-panel"]},ae.a.createElement("div",{className:_e.a["oj-form-info"]},ae.a.createElement(F.a.Item,{label:"\u9898\u76EE\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0"}],className:_e.a.inputOne},ae.a.createElement(L.a,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:ae.a.createElement("span",null,(Gt==null||((Ct=Gt.hack)===null||Ct===void 0||((dt=Ct.name)===null||dt===void 0))?void 0:dt.length)||0,"/",ae.a.createElement("span",{className:"c-grey-999"},"60"))})),ae.a.createElement(F.a.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},ae.a.createElement($.a,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),ae.a.createElement("div",{className:_e.a.row},ae.a.createElement("div",{className:_e.a.a},ae.a.createElement(F.a.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},ae.a.createElement(i.a,null,W(de.difficulty)))),ae.a.createElement("div",{className:_e.a.b},ae.a.createElement(F.a.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},ae.a.createElement(i.a,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(lr){return lr.parentNode}},zr.map(function(jt){return ae.a.createElement(i.a.Option,{key:jt.id,value:jt.id},jt.name)}))),ae.a.createElement(E.a,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:function(){return _n()}},Object($t.w)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),ae.a.createElement("div",{className:_e.a.row},ae.a.createElement("div",{className:_e.a.b,style:{width:"100%",marginLeft:0}},ae.a.createElement(F.a.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},ae.a.createElement(i.a,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:function(lr){return lr.parentNode}},cn.map(function(jt){return ae.a.createElement(i.a.Option,{key:jt.id,value:jt.id},jt.name)}))),ae.a.createElement(E.a,{type:"primary",ghost:!0,onClick:function(){return nn()}},Object($t.w)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),ae.a.createElement("div",{className:_e.a.field},ae.a.createElement(F.a.Item,{label:"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236",name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],className:_e.a.inputTwo,extra:ae.a.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",ae.a.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},ae.a.createElement(r.a,{style:{width:185},min:3}))),ae.a.createElement("div",{className:"tst-case-info"},ae.a.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!yt.is_file&&ae.a.createElement(E.a,{style:{height:40},type:"primary",ghost:!0,onClick:ut},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),ae.a.createElement(F.a.Item,{name:["hack","test_set_score"]},ae.a.createElement(e.a.Group,{onChange:Kt},ae.a.createElement(e.a,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",ae.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")),ae.a.createElement(e.a,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",ae.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")))),ae.a.createElement(C.a,{style:{marginBottom:"5px"},checked:Ht,onChange:Ar},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u505A\u9898\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),ae.a.createElement(F.a.Item,{className:_e.a.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},ae.a.createElement(e.a.Group,{onChange:qt},ae.a.createElement(v.a,{direction:"horizontal"},ae.a.createElement(e.a,{value:!1},"\u6587\u672C"),ae.a.createElement(e.a,{value:!0},"\u6587\u4EF6")))),!yt.test_set_score&&ae.a.createElement(F.a.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},ae.a.createElement(e.a.Group,{onChange:xt},ae.a.createElement(e.a,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),ae.a.createElement(e.a,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),yt.is_file&&ae.a.createElement("div",{className:_e.a.upBtn},ae.a.createElement(E.a,{ghost:!0,type:"primary",className:"mb20",onClick:function(){return hn(!0)}},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),ae.a.createElement(pt.a,{disabled:yt==null?void 0:yt.test_set_average,inputChange:fn,showScore:!yt.test_set_score,data:Hr,onRemove:di})),!yt.is_file&&ae.a.createElement(F.a.List,{name:"hack_sets"},function(jt,lr){return Object(S.a)(lr),ae.a.createElement(z.a,{accordion:!0},jt.map(function(ur,Rr){return ae.a.createElement(Jt,{key:"".concat(ur.key,"--").concat(Rr),header:ae.a.createElement("a",{className:_e.a["test-case-name"]},ae.a.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",Rr+1),jr?null:ae.a.createElement(ae.a.Fragment,null,ae.a.createElement(F.a.Item,{name:[ur.name,"score"],fieldKey:[ur.fieldKey,"score"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6".concat(Rr+1,"\u8BC4\u5206")}]},ae.a.createElement(r.a,{onClick:dr,min:0,max:100,disabled:ct})),ae.a.createElement("span",null,"%"))),extra:Rr>0?ae.a.createElement("div",{onClick:dr},ae.a.createElement(g.a,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(Rr+1),onConfirm:function(){kt(Rr)}},ae.a.createElement(J.a,{className:_e.a["btn-remove-case"]}))):null},ae.a.createElement(F.a.Item,{label:"\u8F93\u5165",name:[ur.name,"input"],fieldKey:[ur.fieldKey,"input"]},ae.a.createElement(Mt,null)),ae.a.createElement(F.a.Item,{label:"\u8F93\u51FA",name:[ur.name,"output"],fieldKey:[ur.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},ae.a.createElement(Mt,null)))}))}))),ae.a.createElement(pt.b,{rootIdentifier:dn,visible:An,onClose:function(){return hn(!1)},onOK:Vr}),ae.a.createElement(st,{visible:bn,onCancel:function(){Fr(!1),Pt()},onOK:function(){Fr(!1),Pt()}}))}},rdUC:function(H,Z,I){var N=I("MFOe"),g=N.Global;H.exports={name:"localStorage",read:k,write:v,each:m,remove:C,clearAll:_};function S(){return g.localStorage}function k(e){return S().getItem(e)}function v(e,h){return S().setItem(e,h)}function m(e){for(var h=S().length-1;h>=0;h--){var r=S().key(h);e(k(r),r)}}function C(e){return S().removeItem(e)}function _(){return S().clear()}},sR1s:function(H,Z,I){"use strict";I.d(Z,"b",function(){return k}),I.d(Z,"a",function(){return v}),I.d(Z,"c",function(){return m}),I.d(Z,"d",function(){return C});var N=I("U8pU"),g="RC_TABLE_KEY";function S(_){return _==null?[]:Array.isArray(_)?_:[_]}function k(_,e){if(!e&&typeof e!="number")return _;for(var h=S(e),r=_,c=0;c<h.length;c+=1){if(!r)return null;var i=h[c];r=r[i]}return r}function v(_){var e=[],h={};return _.forEach(function(r){for(var c=r||{},i=c.key,n=c.dataIndex,l=i||S(n).join("-")||g;h[l];)l="".concat(l,"_next");h[l]=!0,e.push(l)}),e}function m(){var _={};function e(i,n){n&&Object.keys(n).forEach(function(l){var f=n[l];f&&Object(N.a)(f)==="object"?(i[l]=i[l]||{},e(i[l],f)):i[l]=f})}for(var h=arguments.length,r=new Array(h),c=0;c<h;c++)r[c]=arguments[c];return r.forEach(function(i){e(_,i)}),_}function C(_){return _!=null}},sboe:function(H,Z,I){"use strict";I.d(Z,"a",function(){return S});var N=I("q1tI"),g=I.n(N),S=N.createContext(null)},t23M:function(H,Z,I){"use strict";var N=I("VTBJ"),g=I("1OyB"),S=I("vuIU"),k=I("Ji7U"),v=I("LK+K"),m=I("q1tI"),C=I.n(m),_=I("m+aA"),e=I("Zm9Q"),h=I("Kwbf"),r=I("c+Xe"),c=I("bdgK"),i="rc-observer-key",n=function(l){Object(k.a)(d,l);var f=Object(v.a)(d);function d(){var u;return Object(g.a)(this,d),u=f.apply(this,arguments),u.resizeObserver=null,u.childNode=null,u.currentElement=null,u.state={width:0,height:0,offsetHeight:0,offsetWidth:0},u.onResize=function(o){var s=u.props.onResize,E=o[0].target,b=E.getBoundingClientRect(),p=b.width,D=b.height,R=E.offsetWidth,y=E.offsetHeight,x=Math.floor(p),w=Math.floor(D);if(u.state.width!==x||u.state.height!==w||u.state.offsetWidth!==R||u.state.offsetHeight!==y){var T={width:x,height:w,offsetWidth:R,offsetHeight:y};u.setState(T),s&&Promise.resolve().then(function(){s(Object(N.a)(Object(N.a)({},T),{},{offsetWidth:R,offsetHeight:y}))})}},u.setChildNode=function(o){u.childNode=o},u}return Object(S.a)(d,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var o=this.props.disabled;if(o){this.destroyObserver();return}var s=Object(_.a)(this.childNode||this),E=s!==this.currentElement;E&&(this.destroyObserver(),this.currentElement=s),!this.resizeObserver&&s&&(this.resizeObserver=new c.default(this.onResize),this.resizeObserver.observe(s))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var o=this.props.children,s=Object(e.a)(o);if(s.length>1)Object(h.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(s.length===0)return Object(h.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var E=s[0];if(m.isValidElement(E)&&Object(r.c)(E)){var b=E.ref;s[0]=m.cloneElement(E,{ref:Object(r.a)(b,this.setChildNode)})}return s.length===1?s[0]:s.map(function(p,D){return!m.isValidElement(p)||"key"in p&&p.key!==null?p:m.cloneElement(p,{key:"".concat(i,"-").concat(D)})})}}]),d}(m.Component);n.displayName="ResizeObserver",Z.a=n},t9D7:function(H,Z,I){"use strict";I.d(Z,"b",function(){return C}),I.d(Z,"g",function(){return e}),I.d(Z,"d",function(){return h}),I.d(Z,"e",function(){return r}),I.d(Z,"a",function(){return c}),I.d(Z,"f",function(){return l}),I.d(Z,"c",function(){return f});var N=I("Vhoy"),g=I("MI8n"),S=I("pmY6"),k=I("Cg/j"),v=I("ic2d"),m=I("nEHx");const C=Object(k.c)("themeService");var _;(function(d){function u(o){return o&&typeof o=="object"&&typeof o.id=="string"}d.isThemeColor=u})(_||(_={}));function e(d){return{id:d}}var h;(function(d){function u(D){return D&&typeof D=="object"&&typeof D.id=="string"&&(typeof D.color=="undefined"||_.isThemeColor(D.color))}d.isThemeIcon=u;const o=new RegExp(`^\\$\\((${N.a.iconNameExpression}(?:${N.a.iconModifierExpression})?)\\)$`);function s(D){const R=o.exec(D);if(!R)return;let[,y]=R;return{id:y}}d.fromString=s;function E(D,R){let y=D.id;const x=y.lastIndexOf("~");return x!==-1&&(y=y.substring(0,x)),R&&(y=`${y}~${R}`),{id:y}}d.modify=E;function b(D,R){var y,x;return D.id===R.id&&((y=D.color)===null||y===void 0?void 0:y.id)===((x=R.color)===null||x===void 0?void 0:x.id)}d.isEqual=b;function p(D,R){return{id:D.id,color:R?e(R):void 0}}d.asThemeIcon=p,d.asClassNameArray=N.a.asClassNameArray,d.asClassName=N.a.asClassName,d.asCSSSelector=N.a.asCSSSelector})(h||(h={}));function r(d){switch(d){case m.a.DARK:return"vs-dark";case m.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const c={ThemingContribution:"base.contributions.theming"};class i{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new g.b}onColorThemeChange(d){return this.themingParticipants.push(d),this.onThemingParticipantAddedEmitter.fire(d),Object(S.i)(()=>{const u=this.themingParticipants.indexOf(d);this.themingParticipants.splice(u,1)})}getThemingParticipants(){return this.themingParticipants}}let n=new i;v.a.add(c.ThemingContribution,n);function l(d){return n.onColorThemeChange(d)}class f extends S.a{constructor(d){super();this.themeService=d,this.theme=d.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(u=>this.onThemeChange(u)))}onThemeChange(d){this.theme=d,this.updateStyles()}updateStyles(){}}},uGsb:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("MlIO"),I("1uat"))})(this,function(N){return function(){var g=N,S=g.x64,k=S.Word,v=S.WordArray,m=g.algo,C=m.SHA512,_=m.SHA384=C.extend({_doReset:function(){this._hash=new v.init([new k.init(3418070365,3238371032),new k.init(1654270250,914150663),new k.init(2438529370,812702999),new k.init(355462360,4144912697),new k.init(1731405415,4290775857),new k.init(2394180231,1750603025),new k.init(3675008525,1694076839),new k.init(1203062813,3204075428)])},_doFinalize:function(){var e=C._doFinalize.call(this);return e.sigBytes-=16,e}});g.SHA384=C._createHelper(_),g.HmacSHA384=C._createHmacHelper(_)}(),N.SHA384})},uGxW:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("OLod"))})(this,function(N){return N.pad.NoPadding={pad:function(){},unpad:function(){}},N.pad.NoPadding})},uQRt:function(H,Z,I){H.exports=N;function N(){return I("gaXo"),{}}},ulZh:function(H,Z,I){typeof window!="undefined"&&function(g,S){H.exports=S()}(this,function(){return function(N){var g={};function S(k){if(g[k])return g[k].exports;var v=g[k]={i:k,l:!1,exports:{}};return N[k].call(v.exports,v,v.exports,S),v.l=!0,v.exports}return S.m=N,S.c=g,S.d=function(k,v,m){S.o(k,v)||Object.defineProperty(k,v,{enumerable:!0,get:m})},S.r=function(k){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(k,"__esModule",{value:!0})},S.t=function(k,v){if(v&1&&(k=S(k)),v&8)return k;if(v&4&&typeof k=="object"&&k&&k.__esModule)return k;var m=Object.create(null);if(S.r(m),Object.defineProperty(m,"default",{enumerable:!0,value:k}),v&2&&typeof k!="string")for(var C in k)S.d(m,C,function(_){return k[_]}.bind(null,C));return m},S.n=function(k){var v=k&&k.__esModule?function(){return k.default}:function(){return k};return S.d(v,"a",v),v},S.o=function(k,v){return Object.prototype.hasOwnProperty.call(k,v)},S.p="/dist/",S(S.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(N,g,S){"use strict";var k=Object.prototype.hasOwnProperty,v="~";function m(){}Object.create&&(m.prototype=Object.create(null),new m().__proto__||(v=!1));function C(r,c,i){this.fn=r,this.context=c,this.once=i||!1}function _(r,c,i,n,l){if(typeof i!="function")throw new TypeError("The listener must be a function");var f=new C(i,n||r,l),d=v?v+c:c;return r._events[d]?r._events[d].fn?r._events[d]=[r._events[d],f]:r._events[d].push(f):(r._events[d]=f,r._eventsCount++),r}function e(r,c){--r._eventsCount===0?r._events=new m:delete r._events[c]}function h(){this._events=new m,this._eventsCount=0}h.prototype.eventNames=function(){var c=[],i,n;if(this._eventsCount===0)return c;for(n in i=this._events)k.call(i,n)&&c.push(v?n.slice(1):n);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(i)):c},h.prototype.listeners=function(c){var i=v?v+c:c,n=this._events[i];if(!n)return[];if(n.fn)return[n.fn];for(var l=0,f=n.length,d=new Array(f);l<f;l++)d[l]=n[l].fn;return d},h.prototype.listenerCount=function(c){var i=v?v+c:c,n=this._events[i];return n?n.fn?1:n.length:0},h.prototype.emit=function(c,i,n,l,f,d){var u=v?v+c:c;if(!this._events[u])return!1;var o=this._events[u],s=arguments.length,E,b;if(o.fn){o.once&&this.removeListener(c,o.fn,void 0,!0);switch(s){case 1:return o.fn.call(o.context),!0;case 2:return o.fn.call(o.context,i),!0;case 3:return o.fn.call(o.context,i,n),!0;case 4:return o.fn.call(o.context,i,n,l),!0;case 5:return o.fn.call(o.context,i,n,l,f),!0;case 6:return o.fn.call(o.context,i,n,l,f,d),!0}for(b=1,E=new Array(s-1);b<s;b++)E[b-1]=arguments[b];o.fn.apply(o.context,E)}else{var p=o.length,D;for(b=0;b<p;b++){o[b].once&&this.removeListener(c,o[b].fn,void 0,!0);switch(s){case 1:o[b].fn.call(o[b].context);break;case 2:o[b].fn.call(o[b].context,i);break;case 3:o[b].fn.call(o[b].context,i,n);break;case 4:o[b].fn.call(o[b].context,i,n,l);break;default:if(!E)for(D=1,E=new Array(s-1);D<s;D++)E[D-1]=arguments[D];o[b].fn.apply(o[b].context,E)}}}return!0},h.prototype.on=function(c,i,n){return _(this,c,i,n,!1)},h.prototype.once=function(c,i,n){return _(this,c,i,n,!0)},h.prototype.removeListener=function(c,i,n,l){var f=v?v+c:c;if(!this._events[f])return this;if(!i)return e(this,f),this;var d=this._events[f];if(d.fn)d.fn===i&&(!l||d.once)&&(!n||d.context===n)&&e(this,f);else{for(var u=0,o=[],s=d.length;u<s;u++)(d[u].fn!==i||l&&!d[u].once||n&&d[u].context!==n)&&o.push(d[u]);o.length?this._events[f]=o.length===1?o[0]:o:e(this,f)}return this},h.prototype.removeAllListeners=function(c){var i;return c?(i=v?v+c:c,this._events[i]&&e(this,i)):(this._events=new m,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prefixed=v,h.EventEmitter=h,N.exports=h},"./node_modules/url-toolkit/src/url-toolkit.js":function(N,g,S){(function(k){var v=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,m=/^([^\/?#]*)([^]*)$/,C=/(?:\/|^)\.(?=\/)/g,_=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,e={buildAbsoluteURL:function(h,r,c){if(c=c||{},h=h.trim(),r=r.trim(),!r){if(!c.alwaysNormalize)return h;var i=e.parseURL(h);if(!i)throw new Error("Error trying to parse base URL.");return i.path=e.normalizePath(i.path),e.buildURLFromParts(i)}var n=e.parseURL(r);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return c.alwaysNormalize?(n.path=e.normalizePath(n.path),e.buildURLFromParts(n)):r;var l=e.parseURL(h);if(!l)throw new Error("Error trying to parse base URL.");if(!l.netLoc&&l.path&&l.path[0]!=="/"){var f=m.exec(l.path);l.netLoc=f[1],l.path=f[2]}l.netLoc&&!l.path&&(l.path="/");var d={scheme:l.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(d.netLoc=l.netLoc,n.path[0]!=="/"))if(!n.path)d.path=l.path,n.params||(d.params=l.params,n.query||(d.query=l.query));else{var u=l.path,o=u.substring(0,u.lastIndexOf("/")+1)+n.path;d.path=e.normalizePath(o)}return d.path===null&&(d.path=c.alwaysNormalize?e.normalizePath(n.path):n.path),e.buildURLFromParts(d)},parseURL:function(h){var r=v.exec(h);return r?{scheme:r[1]||"",netLoc:r[2]||"",path:r[3]||"",params:r[4]||"",query:r[5]||"",fragment:r[6]||""}:null},normalizePath:function(h){for(h=h.split("").reverse().join("").replace(C,"");h.length!==(h=h.replace(_,"")).length;);return h.split("").reverse().join("")},buildURLFromParts:function(h){return h.scheme+h.netLoc+h.path+h.params+h.query+h.fragment}};N.exports=e})(this)},"./node_modules/webworkify-webpack/index.js":function(N,g,S){function k(c){var i={};function n(f){if(i[f])return i[f].exports;var d=i[f]={i:f,l:!1,exports:{}};return c[f].call(d.exports,d,d.exports,n),d.l=!0,d.exports}n.m=c,n.c=i,n.i=function(f){return f},n.d=function(f,d,u){n.o(f,d)||Object.defineProperty(f,d,{configurable:!1,enumerable:!0,get:u})},n.r=function(f){Object.defineProperty(f,"__esModule",{value:!0})},n.n=function(f){var d=f&&f.__esModule?function(){return f.default}:function(){return f};return n.d(d,"a",d),d},n.o=function(f,d){return Object.prototype.hasOwnProperty.call(f,d)},n.p="/",n.oe=function(f){throw console.error(f),f};var l=n(n.s=ENTRY_MODULE);return l.default||l}var v="[\\.|\\-|\\+|\\w|/|@]+",m="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+v+").*?\\)";function C(c){return(c+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function _(c){return!isNaN(1*c)}function e(c,i,n){var l={};l[n]=[];var f=i.toString(),d=f.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!d)return l;for(var u=d[1],o=new RegExp("(\\\\n|\\W)"+C(u)+m,"g"),s;s=o.exec(f);){if(s[3]==="dll-reference")continue;l[n].push(s[3])}for(o=new RegExp("\\("+C(u)+'\\("(dll-reference\\s('+v+'))"\\)\\)'+m,"g");s=o.exec(f);)c[s[2]]||(l[n].push(s[1]),c[s[2]]=S(s[1]).m),l[s[2]]=l[s[2]]||[],l[s[2]].push(s[4]);for(var E=Object.keys(l),b=0;b<E.length;b++)for(var p=0;p<l[E[b]].length;p++)_(l[E[b]][p])&&(l[E[b]][p]=1*l[E[b]][p]);return l}function h(c){var i=Object.keys(c);return i.reduce(function(n,l){return n||c[l].length>0},!1)}function r(c,i){for(var n={main:[i]},l={main:[]},f={main:{}};h(n);)for(var d=Object.keys(n),u=0;u<d.length;u++){var o=d[u],s=n[o],E=s.pop();if(f[o]=f[o]||{},f[o][E]||!c[o][E])continue;f[o][E]=!0,l[o]=l[o]||[],l[o].push(E);for(var b=e(c,c[o][E],o),p=Object.keys(b),D=0;D<p.length;D++)n[p[D]]=n[p[D]]||[],n[p[D]]=n[p[D]].concat(b[p[D]])}return l}N.exports=function(c,i){i=i||{};var n={main:S.m},l=i.all?{main:Object.keys(n.main)}:r(n,c),f="";Object.keys(l).filter(function(E){return E!=="main"}).forEach(function(E){for(var b=0;l[E][b];)b++;l[E].push(b),n[E][b]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",f=f+"var "+E+" = ("+k.toString().replace("ENTRY_MODULE",JSON.stringify(b))+")({"+l[E].map(function(p){return""+JSON.stringify(p)+": "+n[E][p].toString()}).join(",")+`});
|
|
|
`}),f=f+"new (("+k.toString().replace("ENTRY_MODULE",JSON.stringify(c))+")({"+l.main.map(function(E){return""+JSON.stringify(E)+": "+n.main[E].toString()}).join(",")+"}))(self);";var d=new window.Blob([f],{type:"text/javascript"});if(i.bare)return d;var u=window.URL||window.webkitURL||window.mozURL||window.msURL,o=u.createObjectURL(d),s=new window.Worker(o);return s.objectURL=o,s}},"./src/config.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"hlsDefaultConfig",function(){return D}),S.d(g,"mergeConfig",function(){return y}),S.d(g,"enableStreamingMode",function(){return x});var k=S("./src/controller/abr-controller.ts"),v=S("./src/controller/audio-stream-controller.ts"),m=S("./src/controller/audio-track-controller.ts"),C=S("./src/controller/subtitle-stream-controller.ts"),_=S("./src/controller/subtitle-track-controller.ts"),e=S("./src/controller/buffer-controller.ts"),h=S("./src/controller/timeline-controller.ts"),r=S("./src/controller/cap-level-controller.ts"),c=S("./src/controller/fps-controller.ts"),i=S("./src/controller/eme-controller.ts"),n=S("./src/controller/cmcd-controller.ts"),l=S("./src/utils/xhr-loader.ts"),f=S("./src/utils/fetch-loader.ts"),d=S("./src/utils/cues.ts"),u=S("./src/utils/mediakeys-helper.ts"),o=S("./src/utils/logger.ts");function s(){return s=Object.assign||function(w){for(var T=1;T<arguments.length;T++){var F=arguments[T];for(var P in F)Object.prototype.hasOwnProperty.call(F,P)&&(w[P]=F[P])}return w},s.apply(this,arguments)}function E(w,T){var F=Object.keys(w);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(w);T&&(P=P.filter(function(A){return Object.getOwnPropertyDescriptor(w,A).enumerable})),F.push.apply(F,P)}return F}function b(w){for(var T=1;T<arguments.length;T++){var F=arguments[T]!=null?arguments[T]:{};T%2?E(Object(F),!0).forEach(function(P){p(w,P,F[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(F)):E(Object(F)).forEach(function(P){Object.defineProperty(w,P,Object.getOwnPropertyDescriptor(F,P))})}return w}function p(w,T,F){return T in w?Object.defineProperty(w,T,{value:F,enumerable:!0,configurable:!0,writable:!0}):w[T]=F,w}var D=b(b({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:l.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:k.default,bufferController:e.default,capLevelController:r.default,fpsController:c.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:u.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},R()),{},{subtitleStreamController:C.SubtitleStreamController,subtitleTrackController:_.default,timelineController:h.TimelineController,audioStreamController:v.default,audioTrackController:m.default,emeController:i.default,cmcdController:n.default});function R(){return{cueHandler:d.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function y(w,T){if((T.liveSyncDurationCount||T.liveMaxLatencyDurationCount)&&(T.liveSyncDuration||T.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(T.liveMaxLatencyDurationCount!==void 0&&(T.liveSyncDurationCount===void 0||T.liveMaxLatencyDurationCount<=T.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(T.liveMaxLatencyDuration!==void 0&&(T.liveSyncDuration===void 0||T.liveMaxLatencyDuration<=T.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return s({},w,T)}function x(w){var T=w.loader;if(T!==f.default&&T!==l.default)o.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),w.progressive=!1;else{var F=Object(f.fetchSupported)();F&&(w.loader=f.default,w.progressive=!0,w.enableSoftwareAES=!0,o.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/polyfills/number.ts"),v=S("./src/utils/ewma-bandwidth-estimator.ts"),m=S("./src/events.ts"),C=S("./src/utils/buffer-helper.ts"),_=S("./src/errors.ts"),e=S("./src/types/loader.ts"),h=S("./src/utils/logger.ts");function r(n,l){for(var f=0;f<l.length;f++){var d=l[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(n,d.key,d)}}function c(n,l,f){return l&&r(n.prototype,l),f&&r(n,f),n}var i=function(){function n(f){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=f;var d=f.config;this.bwEstimator=new v.default(d.abrEwmaSlowVoD,d.abrEwmaFastVoD,d.abrEwmaDefaultEstimate),this.registerListeners()}var l=n.prototype;return l.registerListeners=function(){var d=this.hls;d.on(m.Events.FRAG_LOADING,this.onFragLoading,this),d.on(m.Events.FRAG_LOADED,this.onFragLoaded,this),d.on(m.Events.FRAG_BUFFERED,this.onFragBuffered,this),d.on(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.on(m.Events.ERROR,this.onError,this)},l.unregisterListeners=function(){var d=this.hls;d.off(m.Events.FRAG_LOADING,this.onFragLoading,this),d.off(m.Events.FRAG_LOADED,this.onFragLoaded,this),d.off(m.Events.FRAG_BUFFERED,this.onFragBuffered,this),d.off(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.off(m.Events.ERROR,this.onError,this)},l.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},l.onFragLoading=function(d,u){var o=u.frag;if(o.type===e.PlaylistLevelType.MAIN&&!this.timer){var s;this.fragCurrent=o,this.partCurrent=(s=u.part)!=null?s:null,this.timer=self.setInterval(this.onCheck,100)}},l.onLevelLoaded=function(d,u){var o=this.hls.config;u.details.live?this.bwEstimator.update(o.abrEwmaSlowLive,o.abrEwmaFastLive):this.bwEstimator.update(o.abrEwmaSlowVoD,o.abrEwmaFastVoD)},l._abandonRulesCheck=function(){var d=this.fragCurrent,u=this.partCurrent,o=this.hls,s=o.autoLevelEnabled,E=o.config,b=o.media;if(!d||!b)return;var p=u?u.stats:d.stats,D=u?u.duration:d.duration;if(p.aborted){h.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!s||b.paused||!b.playbackRate||!b.readyState)return;var R=performance.now()-p.loading.start,y=Math.abs(b.playbackRate);if(R<=500*D/y)return;var x=o.levels,w=o.minAutoLevel,T=x[d.level],F=p.total||Math.max(p.loaded,Math.round(D*T.maxBitrate/8)),P=Math.max(1,p.bwEstimate?p.bwEstimate/8:p.loaded*1e3/R),A=(F-p.loaded)/P,X=b.currentTime,z=(C.BufferHelper.bufferInfo(b,X,E.maxBufferHole).end-X)/y;if(z>=2*D/y||A<=z)return;var O=Number.POSITIVE_INFINITY,B;for(B=d.level-1;B>w;B--){var U=x[B].maxBitrate;if(O=D*U/(8*.8*P),O<z)break}if(O>=A)return;var L=this.bwEstimator.getEstimate();h.logger.warn("Fragment "+d.sn+(u?" part "+u.index:"")+" of level "+d.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+B+`
|
|
|
Current BW estimate: `+(Object(k.isFiniteNumber)(L)?(L/1024).toFixed(3):"Unknown")+` Kb/s
|
|
|
Estimated load time for current fragment: `+A.toFixed(3)+` s
|
|
|
Estimated load time for the next fragment: `+O.toFixed(3)+` s
|
|
|
Time to underbuffer: `+z.toFixed(3)+" s"),o.nextLoadLevel=B,this.bwEstimator.sample(R,p.loaded),this.clearTimer(),d.loader&&(this.fragCurrent=this.partCurrent=null,d.loader.abort()),o.trigger(m.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:d,part:u,stats:p})},l.onFragLoaded=function(d,u){var o=u.frag,s=u.part;if(o.type===e.PlaylistLevelType.MAIN&&Object(k.isFiniteNumber)(o.sn)){var E=s?s.stats:o.stats,b=s?s.duration:o.duration;if(this.clearTimer(),this.lastLoadedFragLevel=o.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var p=this.hls.levels[o.level],D=(p.loaded?p.loaded.bytes:0)+E.loaded,R=(p.loaded?p.loaded.duration:0)+b;p.loaded={bytes:D,duration:R},p.realBitrate=Math.round(8*D/R)}if(o.bitrateTest){var y={stats:E,frag:o,part:s,id:o.type};this.onFragBuffered(m.Events.FRAG_BUFFERED,y),o.bitrateTest=!1}}},l.onFragBuffered=function(d,u){var o=u.frag,s=u.part,E=s?s.stats:o.stats;if(E.aborted)return;if(o.type!==e.PlaylistLevelType.MAIN||o.sn==="initSegment")return;var b=E.parsing.end-E.loading.start;this.bwEstimator.sample(b,E.loaded),E.bwEstimate=this.bwEstimator.getEstimate(),o.bitrateTest?this.bitrateTestDelay=b/1e3:this.bitrateTestDelay=0},l.onError=function(d,u){switch(u.details){case _.ErrorDetails.FRAG_LOAD_ERROR:case _.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},l.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},l.getNextABRAutoLevel=function(){var d=this.fragCurrent,u=this.partCurrent,o=this.hls,s=o.maxAutoLevel,E=o.config,b=o.minAutoLevel,p=o.media,D=u?u.duration:d?d.duration:0,R=p?p.currentTime:0,y=p&&p.playbackRate!==0?Math.abs(p.playbackRate):1,x=this.bwEstimator?this.bwEstimator.getEstimate():E.abrEwmaDefaultEstimate,w=(C.BufferHelper.bufferInfo(p,R,E.maxBufferHole).end-R)/y,T=this.findBestLevel(x,b,s,w,E.abrBandWidthFactor,E.abrBandWidthUpFactor);if(T>=0)return T;h.logger.trace((w?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var F=D?Math.min(D,E.maxStarvationDelay):E.maxStarvationDelay,P=E.abrBandWidthFactor,A=E.abrBandWidthUpFactor;if(!w){var X=this.bitrateTestDelay;if(X){var z=D?Math.min(D,E.maxLoadingDelay):E.maxLoadingDelay;F=z-X,h.logger.trace("bitrate test took "+Math.round(1e3*X)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*F)+" ms"),P=A=1}}return T=this.findBestLevel(x,b,s,w+F,P,A),Math.max(T,0)},l.findBestLevel=function(d,u,o,s,E,b){for(var p,D=this.fragCurrent,R=this.partCurrent,y=this.lastLoadedFragLevel,x=this.hls.levels,w=x[y],T=!!(w!=null&&(p=w.details)!==null&&p!==void 0&&p.live),F=w==null?void 0:w.codecSet,P=R?R.duration:D?D.duration:0,A=o;A>=u;A--){var X=x[A];if(!X||F&&X.codecSet!==F)continue;var z=X.details,O=(R?z==null?void 0:z.partTarget:z==null?void 0:z.averagetargetduration)||P,B=void 0;A<=y?B=E*d:B=b*d;var U=x[A].maxBitrate,L=U*O/B;if(h.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+A+"/"+Math.round(B)+"/"+U+"/"+O+"/"+s+"/"+L),B>U&&(!L||T&&!this.bitrateTestDelay||L<s))return A}return-1},c(n,[{key:"nextAutoLevel",get:function(){var d=this._nextAutoLevel,u=this.bwEstimator;if(d!==-1&&(!u||!u.canEstimate()))return d;var o=this.getNextABRAutoLevel();return d!==-1&&(o=Math.min(d,o)),o},set:function(d){this._nextAutoLevel=d}}]),n}();g.default=i},"./src/controller/audio-stream-controller.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/polyfills/number.ts"),v=S("./src/controller/base-stream-controller.ts"),m=S("./src/events.ts"),C=S("./src/utils/buffer-helper.ts"),_=S("./src/controller/fragment-tracker.ts"),e=S("./src/types/level.ts"),h=S("./src/types/loader.ts"),r=S("./src/loader/fragment.ts"),c=S("./src/demux/chunk-cache.ts"),i=S("./src/demux/transmuxer-interface.ts"),n=S("./src/types/transmuxer.ts"),l=S("./src/controller/fragment-finders.ts"),f=S("./src/utils/discontinuities.ts"),d=S("./src/errors.ts"),u=S("./src/utils/logger.ts");function o(){return o=Object.assign||function(D){for(var R=1;R<arguments.length;R++){var y=arguments[R];for(var x in y)Object.prototype.hasOwnProperty.call(y,x)&&(D[x]=y[x])}return D},o.apply(this,arguments)}function s(D,R){D.prototype=Object.create(R.prototype),D.prototype.constructor=D,E(D,R)}function E(D,R){return E=Object.setPrototypeOf||function(x,w){return x.__proto__=w,x},E(D,R)}var b=100,p=function(D){s(R,D);function R(x,w){var T;return T=D.call(this,x,w,"[audio-stream-controller]")||this,T.videoBuffer=null,T.videoTrackCC=-1,T.waitingVideoCC=-1,T.audioSwitch=!1,T.trackId=-1,T.waitingData=null,T.mainDetails=null,T.bufferFlushed=!1,T._registerListeners(),T}var y=R.prototype;return y.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},y._registerListeners=function(){var w=this.hls;w.on(m.Events.MEDIA_ATTACHED,this.onMediaAttached,this),w.on(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),w.on(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),w.on(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.on(m.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),w.on(m.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),w.on(m.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),w.on(m.Events.ERROR,this.onError,this),w.on(m.Events.BUFFER_RESET,this.onBufferReset,this),w.on(m.Events.BUFFER_CREATED,this.onBufferCreated,this),w.on(m.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),w.on(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),w.on(m.Events.FRAG_BUFFERED,this.onFragBuffered,this)},y._unregisterListeners=function(){var w=this.hls;w.off(m.Events.MEDIA_ATTACHED,this.onMediaAttached,this),w.off(m.Events.MEDIA_DETACHING,this.onMediaDetaching,this),w.off(m.Events.MANIFEST_LOADING,this.onManifestLoading,this),w.off(m.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.off(m.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),w.off(m.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),w.off(m.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),w.off(m.Events.ERROR,this.onError,this),w.off(m.Events.BUFFER_RESET,this.onBufferReset,this),w.off(m.Events.BUFFER_CREATED,this.onBufferCreated,this),w.off(m.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),w.off(m.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),w.off(m.Events.FRAG_BUFFERED,this.onFragBuffered,this)},y.onInitPtsFound=function(w,T){var F=T.frag,P=T.id,A=T.initPTS;if(P==="main"){var X=F.cc;this.initPTS[F.cc]=A,this.log("InitPTS for cc: "+X+" found from main: "+A),this.videoTrackCC=X,this.state===v.State.WAITING_INIT_PTS&&this.tick()}},y.startLoad=function(w){if(!this.levels){this.startPosition=w,this.state=v.State.STOPPED;return}var T=this.lastCurrentTime;this.stopLoad(),this.setInterval(b),this.fragLoadError=0,T>0&&w===-1?(this.log("Override startPosition with lastCurrentTime @"+T.toFixed(3)),this.state=v.State.IDLE):(this.loadedmetadata=!1,this.state=v.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=w,this.tick()},y.doTick=function(){switch(this.state){case v.State.IDLE:this.doTickIdle();break;case v.State.WAITING_TRACK:{var w,T=this.levels,F=this.trackId,P=T==null||((w=T[F])===null||w===void 0)?void 0:w.details;if(P){if(this.waitForCdnTuneIn(P))break;this.state=v.State.WAITING_INIT_PTS}break}case v.State.FRAG_LOADING_WAITING_RETRY:{var A,X=performance.now(),z=this.retryDate;(!z||X>=z||(A=this.media)!==null&&A!==void 0&&A.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=v.State.IDLE);break}case v.State.WAITING_INIT_PTS:{var O=this.waitingData;if(O){var B=O.frag,U=O.part,L=O.cache,G=O.complete;if(this.initPTS[B.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=v.State.FRAG_LOADING;var ee=L.flush(),oe={frag:B,part:U,payload:ee,networkDetails:null};this._handleFragmentLoadProgress(oe),G&&D.prototype._handleFragmentLoadComplete.call(this,oe)}else if(this.videoTrackCC!==this.waitingVideoCC)u.logger.log("Waiting fragment cc ("+B.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var ae=this.getLoadPosition(),be=C.BufferHelper.bufferInfo(this.mediaBuffer,ae,this.config.maxBufferHole),_e=Object(l.fragmentWithinToleranceTest)(be.end,this.config.maxFragLookUpTolerance,B);_e<0&&(u.logger.log("Waiting fragment cc ("+B.cc+") @ "+B.start+" cancelled because another fragment at "+be.end+" is needed"),this.clearWaitingFragment())}}else this.state=v.State.IDLE}}this.onTickEnd()},y.clearWaitingFragment=function(){var w=this.waitingData;w&&(this.fragmentTracker.removeFragment(w.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=v.State.IDLE)},y.onTickEnd=function(){var w=this.media;if(!w||!w.readyState)return;var T=this.mediaBuffer?this.mediaBuffer:w,F=T.buffered;!this.loadedmetadata&&F.length&&(this.loadedmetadata=!0),this.lastCurrentTime=w.currentTime},y.doTickIdle=function(){var w,T,F=this.hls,P=this.levels,A=this.media,X=this.trackId,z=F.config;if(!P||!P[X])return;if(!A&&(this.startFragRequested||!z.startFragPrefetch))return;var O=P[X],B=O.details;if(!B||B.live&&this.levelLastLoaded!==X||this.waitForCdnTuneIn(B)){this.state=v.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,r.ElementaryStreamTypes.AUDIO,h.PlaylistLevelType.AUDIO));var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,h.PlaylistLevelType.AUDIO);if(U===null)return;var L=U.len,G=this.getMaxBufferLength(),ee=this.audioSwitch;if(L>=G&&!ee)return;if(!ee&&this._streamEnded(U,B)){F.trigger(m.Events.BUFFER_EOS,{type:"audio"}),this.state=v.State.ENDED;return}var oe=B.fragments,ae=oe[0].start,be=U.end;if(ee){var _e=this.getLoadPosition();be=_e,B.PTSKnown&&_e<ae&&((U.end>ae||U.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),A.currentTime=ae+.05))}var fe=this.getNextFragment(be,B);if(!fe){this.bufferFlushed=!0;return}((w=fe.decryptdata)===null||w===void 0?void 0:w.keyFormat)==="identity"&&!((T=fe.decryptdata)!==null&&T!==void 0&&T.key)?this.loadKey(fe,B):this.loadFragment(fe,B,be)},y.getMaxBufferLength=function(){var w=D.prototype.getMaxBufferLength.call(this),T=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,h.PlaylistLevelType.MAIN);return T===null?w:Math.max(w,T.len)},y.onMediaDetaching=function(){this.videoBuffer=null,D.prototype.onMediaDetaching.call(this)},y.onAudioTracksUpdated=function(w,T){var F=T.audioTracks;this.resetTransmuxer(),this.levels=F.map(function(P){return new e.Level(P)})},y.onAudioTrackSwitching=function(w,T){var F=!!T.url;this.trackId=T.id;var P=this.fragCurrent;P!=null&&P.loader&&P.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),F?this.setInterval(b):this.resetTransmuxer(),F?(this.audioSwitch=!0,this.state=v.State.IDLE):this.state=v.State.STOPPED,this.tick()},y.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},y.onLevelLoaded=function(w,T){this.mainDetails=T.details},y.onAudioTrackLoaded=function(w,T){var F,P=this.levels,A=T.details,X=T.id;if(!P){this.warn("Audio tracks were reset while loading level "+X);return}this.log("Track "+X+" loaded ["+A.startSN+","+A.endSN+"],duration:"+A.totalduration);var z=P[X],O=0;if(A.live||(F=z.details)!==null&&F!==void 0&&F.live){var B=this.mainDetails;if(A.fragments[0]||(A.deltaUpdateFailed=!0),A.deltaUpdateFailed||!B)return;!z.details&&A.hasProgramDateTime&&B.hasProgramDateTime?(Object(f.alignMediaPlaylistByPDT)(A,B),O=A.fragments[0].start):O=this.alignPlaylists(A,z.details)}z.details=A,this.levelLastLoaded=X,!this.startFragRequested&&(this.mainDetails||!A.live)&&this.setStartPosition(z.details,O),this.state===v.State.WAITING_TRACK&&!this.waitForCdnTuneIn(A)&&(this.state=v.State.IDLE),this.tick()},y._handleFragmentLoadProgress=function(w){var T,F=w.frag,P=w.part,A=w.payload,X=this.config,z=this.trackId,O=this.levels;if(!O){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 B=O[z];console.assert(B,"Audio track is defined on fragment load progress");var U=B.details;console.assert(U,"Audio track details are defined on fragment load progress");var L=X.defaultAudioCodec||B.audioCodec||"mp4a.40.2",G=this.transmuxer;G||(G=this.transmuxer=new i.default(this.hls,h.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ee=this.initPTS[F.cc],oe=(T=F.initSegment)===null||T===void 0?void 0:T.data;if(ee!==void 0){var ae=!1,be=P?P.index:-1,_e=be!==-1,fe=new n.ChunkMetadata(F.level,F.sn,F.stats.chunkCount,A.byteLength,be,_e);G.push(A,oe,L,"",F,P,U.totalduration,ae,fe,ee)}else{u.logger.log("Unknown video PTS for cc "+F.cc+", waiting for video PTS before demuxing audio frag "+F.sn+" of ["+U.startSN+" ,"+U.endSN+"],track "+z);var Re=this.waitingData=this.waitingData||{frag:F,part:P,cache:new c.default,complete:!1},Oe=Re.cache;Oe.push(new Uint8Array(A)),this.waitingVideoCC=this.videoTrackCC,this.state=v.State.WAITING_INIT_PTS}},y._handleFragmentLoadComplete=function(w){if(this.waitingData){this.waitingData.complete=!0;return}D.prototype._handleFragmentLoadComplete.call(this,w)},y.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},y.onBufferCreated=function(w,T){var F=T.tracks.audio;F&&(this.mediaBuffer=F.buffer),T.tracks.video&&(this.videoBuffer=T.tracks.video.buffer)},y.onFragBuffered=function(w,T){var F=T.frag,P=T.part;if(F.type!==h.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(F)){this.warn("Fragment "+F.sn+(P?" p: "+P.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(m.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(F,P)},y.onError=function(w,T){switch(T.details){case d.ErrorDetails.FRAG_LOAD_ERROR:case d.ErrorDetails.FRAG_LOAD_TIMEOUT:case d.ErrorDetails.KEY_LOAD_ERROR:case d.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(h.PlaylistLevelType.AUDIO,T);break;case d.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case d.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==v.State.ERROR&&this.state!==v.State.STOPPED&&(this.state=T.fatal?v.State.ERROR:v.State.IDLE,this.warn(T.details+" while loading frag, switching to "+this.state+" state"));break;case d.ErrorDetails.BUFFER_FULL_ERROR:if(T.parent==="audio"&&(this.state===v.State.PARSING||this.state===v.State.PARSED)){var F=!0,P=this.getFwdBufferInfo(this.mediaBuffer,h.PlaylistLevelType.AUDIO);P&&P.len>.5&&(F=!this.reduceMaxBufferLength(P.len)),F&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},y.onBufferFlushed=function(w,T){var F=T.type;F===r.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},y._handleTransmuxComplete=function(w){var T,F="audio",P=this.hls,A=w.remuxResult,X=w.chunkMeta,z=this.getCurrentContext(X);if(!z){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 O=z.frag,B=z.part,U=A.audio,L=A.text,G=A.id3,ee=A.initSegment;if(this.fragContextChanged(O))return;if(this.state=v.State.PARSING,this.audioSwitch&&U&&this.completeAudioSwitch(),ee!=null&&ee.tracks&&(this._bufferInitSegment(ee.tracks,O,X),P.trigger(m.Events.FRAG_PARSING_INIT_SEGMENT,{frag:O,id:F,tracks:ee.tracks})),U){var oe=U.startPTS,ae=U.endPTS,be=U.startDTS,_e=U.endDTS;B&&(B.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:oe,endPTS:ae,startDTS:be,endDTS:_e}),O.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,oe,ae,be,_e),this.bufferFragmentData(U,O,B,X)}if(G!=null&&(T=G.samples)!==null&&T!==void 0&&T.length){var fe=o({frag:O,id:F},G);P.trigger(m.Events.FRAG_PARSING_METADATA,fe)}if(L){var Re=o({frag:O,id:F},L);P.trigger(m.Events.FRAG_PARSING_USERDATA,Re)}},y._bufferInitSegment=function(w,T,F){if(this.state!==v.State.PARSING)return;w.video&&delete w.video;var P=w.audio;if(!P)return;P.levelCodec=P.codec,P.id="audio",this.log("Init audio buffer, container:"+P.container+", codecs[parsed]=["+P.codec+"]"),this.hls.trigger(m.Events.BUFFER_CODECS,w);var A=P.initSegment;if(A!=null&&A.byteLength){var X={type:"audio",frag:T,part:null,chunkMeta:F,parent:T.type,data:A};this.hls.trigger(m.Events.BUFFER_APPENDING,X)}this.tick()},y.loadFragment=function(w,T,F){var P=this.fragmentTracker.getState(w);this.fragCurrent=w,(this.audioSwitch||P===_.FragmentState.NOT_LOADED||P===_.FragmentState.PARTIAL)&&(w.sn==="initSegment"?this._loadInitSegment(w):T.live&&!Object(k.isFiniteNumber)(this.initPTS[w.cc])?(this.log("Waiting for video PTS in continuity counter "+w.cc+" of live stream before loading audio fragment "+w.sn+" of level "+this.trackId),this.state=v.State.WAITING_INIT_PTS):(this.startFragRequested=!0,D.prototype.loadFragment.call(this,w,T,F)))},y.completeAudioSwitch=function(){var w=this.hls,T=this.media,F=this.trackId;T&&(this.log("Switching audio track : flushing all audio"),D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,w.trigger(m.Events.AUDIO_TRACK_SWITCHED,{id:F})},R}(v.default);g.default=p},"./src/controller/audio-track-controller.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/events.ts"),v=S("./src/errors.ts"),m=S("./src/controller/base-playlist-controller.ts"),C=S("./src/types/loader.ts");function _(i,n){for(var l=0;l<n.length;l++){var f=n[l];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(i,f.key,f)}}function e(i,n,l){return n&&_(i.prototype,n),l&&_(i,l),i}function h(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,r(i,n)}function r(i,n){return r=Object.setPrototypeOf||function(f,d){return f.__proto__=d,f},r(i,n)}var c=function(i){h(n,i);function n(f){var d;return d=i.call(this,f,"[audio-track-controller]")||this,d.tracks=[],d.groupId=null,d.tracksInGroup=[],d.trackId=-1,d.trackName="",d.selectDefaultTrack=!0,d.registerListeners(),d}var l=n.prototype;return l.registerListeners=function(){var d=this.hls;d.on(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.on(k.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.on(k.Events.LEVEL_LOADING,this.onLevelLoading,this),d.on(k.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),d.on(k.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),d.on(k.Events.ERROR,this.onError,this)},l.unregisterListeners=function(){var d=this.hls;d.off(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off(k.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.off(k.Events.LEVEL_LOADING,this.onLevelLoading,this),d.off(k.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),d.off(k.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),d.off(k.Events.ERROR,this.onError,this)},l.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,i.prototype.destroy.call(this)},l.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},l.onManifestParsed=function(d,u){this.tracks=u.audioTracks||[]},l.onAudioTrackLoaded=function(d,u){var o=u.id,s=u.details,E=this.tracksInGroup[o];if(!E){this.warn("Invalid audio track id "+o);return}var b=E.details;E.details=u.details,this.log("audioTrack "+o+" loaded ["+s.startSN+"-"+s.endSN+"]"),o===this.trackId&&(this.retryCount=0,this.playlistLoaded(o,u,b))},l.onLevelLoading=function(d,u){this.switchLevel(u.level)},l.onLevelSwitching=function(d,u){this.switchLevel(u.level)},l.switchLevel=function(d){var u=this.hls.levels[d];if(!(u!=null&&u.audioGroupIds))return;var o=u.audioGroupIds[u.urlId];if(this.groupId!==o){this.groupId=o;var s=this.tracks.filter(function(b){return!o||b.groupId===o});this.selectDefaultTrack&&!s.some(function(b){return b.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=s;var E={audioTracks:s};this.log("Updating audio tracks, "+s.length+' track(s) found in "'+o+'" group-id'),this.hls.trigger(k.Events.AUDIO_TRACKS_UPDATED,E),this.selectInitialTrack()}},l.onError=function(d,u){if(i.prototype.onError.call(this,d,u),u.fatal||!u.context)return;u.context.type===C.PlaylistContextType.AUDIO_TRACK&&u.context.id===this.trackId&&u.context.groupId===this.groupId&&this.retryLoadingOrFail(u)},l.setAudioTrack=function(d){var u=this.tracksInGroup;if(d<0||d>=u.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var o=u[this.trackId];this.log("Now switching to audio-track index "+d);var s=u[d],E=s.id,b=s.groupId,p=b===void 0?"":b,D=s.name,R=s.type,y=s.url;if(this.trackId=d,this.trackName=D,this.selectDefaultTrack=!1,this.hls.trigger(k.Events.AUDIO_TRACK_SWITCHING,{id:E,groupId:p,name:D,type:R,url:y}),s.details&&!s.details.live)return;var x=this.switchParams(s.url,o==null?void 0:o.details);this.loadPlaylist(x)},l.selectInitialTrack=function(){var d=this.tracksInGroup;console.assert(d.length,"Initial audio track should be selected when tracks are known");var u=this.trackName,o=this.findTrackId(u)||this.findTrackId();o!==-1?this.setAudioTrack(o):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},l.findTrackId=function(d){for(var u=this.tracksInGroup,o=0;o<u.length;o++){var s=u[o];if((!this.selectDefaultTrack||s.default)&&(!d||d===s.name))return s.id}return-1},l.loadPlaylist=function(d){var u=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(u)){var o=u.id,s=u.groupId,E=u.url;if(d)try{E=d.addDirectives(E)}catch(b){this.warn("Could not construct new URL with HLS Delivery Directives: "+b)}this.log("loading audio-track playlist for id: "+o),this.clearTimer(),this.hls.trigger(k.Events.AUDIO_TRACK_LOADING,{url:E,id:o,groupId:s,deliveryDirectives:d||null})}},e(n,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(d){this.selectDefaultTrack=!1,this.setAudioTrack(d)}}]),n}(m.default);g.default=c},"./src/controller/base-playlist-controller.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return e});var k=S("./src/polyfills/number.ts"),v=S("./src/types/level.ts"),m=S("./src/controller/level-helper.ts"),C=S("./src/utils/logger.ts"),_=S("./src/errors.ts"),e=function(){function h(c,i){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=C.logger.log.bind(C.logger,i+":"),this.warn=C.logger.warn.bind(C.logger,i+":"),this.hls=c}var r=h.prototype;return r.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},r.onError=function(i,n){n.fatal&&n.type===_.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(i,n){var l=n==null?void 0:n.renditionReports;if(l)for(var f=0;f<l.length;f++){var d=l[f],u=""+d.URI;if(u===i.substr(-u.length)){var o=parseInt(d["LAST-MSN"]),s=parseInt(d["LAST-PART"]);if(n&&this.hls.config.lowLatencyMode){var E=Math.min(n.age-n.partTarget,n.targetduration);s!==void 0&&E>n.partTarget&&(s+=1)}if(Object(k.isFiniteNumber)(o))return new v.HlsUrlParameters(o,Object(k.isFiniteNumber)(s)?s:void 0,v.HlsSkip.No)}}},r.loadPlaylist=function(i){},r.shouldLoadTrack=function(i){return this.canLoad&&i&&!!i.url&&(!i.details||i.details.live)},r.playlistLoaded=function(i,n,l){var f=this,d=n.details,u=n.stats,o=u.loading.end?Math.max(0,self.performance.now()-u.loading.end):0;if(d.advancedDateTime=Date.now()-o,d.live||l!=null&&l.live){if(d.reloaded(l),l&&this.log("live playlist "+i+" "+(d.advanced?"REFRESHED "+d.lastPartSn+"-"+d.lastPartIndex:"MISSED")),l&&d.fragments.length>0&&Object(m.mergeDetails)(l,d),!this.canLoad||!d.live)return;var s,E=void 0,b=void 0;if(d.canBlockReload&&d.endSN&&d.advanced){var p=this.hls.config.lowLatencyMode,D=d.lastPartSn,R=d.endSN,y=d.lastPartIndex,x=y!==-1,w=D===R,T=p?0:y;x?(E=w?R+1:D,b=w?T:y+1):E=R+1;var F=d.age,P=F+d.ageHeader,A=Math.min(P-d.partTarget,d.targetduration*1.5);if(A>0){if(l&&A>l.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+l.tuneInGoal+" to: "+A+" with playlist age: "+d.age),A=0;else{var X=Math.floor(A/d.targetduration);if(E+=X,b!==void 0){var z=Math.round(A%d.targetduration/d.partTarget);b+=z}this.log("CDN Tune-in age: "+d.ageHeader+"s last advanced "+F.toFixed(2)+"s goal: "+A+" skip sn "+X+" to part "+b)}d.tuneInGoal=A}if(s=this.getDeliveryDirectives(d,n.deliveryDirectives,E,b),p||!w){this.loadPlaylist(s);return}}else s=this.getDeliveryDirectives(d,n.deliveryDirectives,E,b);var O=Object(m.computeReloadInterval)(d,u);E!==void 0&&d.canBlockReload&&(O-=d.partTarget||1),this.log("reload live playlist "+i+" in "+Math.round(O)+" ms"),this.timer=self.setTimeout(function(){return f.loadPlaylist(s)},O)}else this.clearTimer()},r.getDeliveryDirectives=function(i,n,l,f){var d=Object(v.getSkipValue)(i,l);return n!=null&&n.skip&&i.deltaUpdateFailed&&(l=n.msn,f=n.part,d=v.HlsSkip.No),new v.HlsUrlParameters(l,f,d)},r.retryLoadingOrFail=function(i){var n=this,l=this.hls.config,f=this.retryCount<l.levelLoadingMaxRetry;if(f){var d;if(this.retryCount++,i.details.indexOf("LoadTimeOut")>-1&&(d=i.context)!==null&&d!==void 0&&d.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+i.details+'"'),this.loadPlaylist();else{var u=Math.min(Math.pow(2,this.retryCount)*l.levelLoadingRetryDelay,l.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return n.loadPlaylist()},u),this.warn("retry playlist loading #"+this.retryCount+" in "+u+' ms after "'+i.details+'"')}}else this.warn('cannot recover from error "'+i.details+'"'),this.clearTimer(),i.fatal=!0;return f},h}()},"./src/controller/base-stream-controller.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"State",function(){return R}),S.d(g,"default",function(){return y});var k=S("./src/polyfills/number.ts"),v=S("./src/task-loop.ts"),m=S("./src/controller/fragment-tracker.ts"),C=S("./src/utils/buffer-helper.ts"),_=S("./src/utils/logger.ts"),e=S("./src/events.ts"),h=S("./src/errors.ts"),r=S("./src/types/transmuxer.ts"),c=S("./src/utils/mp4-tools.ts"),i=S("./src/utils/discontinuities.ts"),n=S("./src/controller/fragment-finders.ts"),l=S("./src/controller/level-helper.ts"),f=S("./src/loader/fragment-loader.ts"),d=S("./src/crypt/decrypter.ts"),u=S("./src/utils/time-ranges.ts"),o=S("./src/types/loader.ts");function s(x,w){for(var T=0;T<w.length;T++){var F=w[T];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(x,F.key,F)}}function E(x,w,T){return w&&s(x.prototype,w),T&&s(x,T),x}function b(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function p(x,w){x.prototype=Object.create(w.prototype),x.prototype.constructor=x,D(x,w)}function D(x,w){return D=Object.setPrototypeOf||function(F,P){return F.__proto__=P,F},D(x,w)}var R={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"},y=function(x){p(w,x);function w(F,P,A){var X;return X=x.call(this)||this,X.hls=void 0,X.fragPrevious=null,X.fragCurrent=null,X.fragmentTracker=void 0,X.transmuxer=null,X._state=R.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=A,X.log=_.logger.log.bind(_.logger,A+":"),X.warn=_.logger.warn.bind(_.logger,A+":"),X.hls=F,X.fragmentLoader=new f.default(F.config),X.fragmentTracker=P,X.config=F.config,X.decrypter=new d.default(F,F.config),F.on(e.Events.KEY_LOADED,X.onKeyLoaded,b(X)),X}var T=w.prototype;return T.doTick=function(){this.onTickEnd()},T.onTickEnd=function(){},T.startLoad=function(P){},T.stopLoad=function(){this.fragmentLoader.abort();var P=this.fragCurrent;P&&this.fragmentTracker.removeFragment(P),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=R.STOPPED},T._streamEnded=function(P,A){var X=this.fragCurrent,z=this.fragmentTracker;if(!A.live&&X&&X.sn===A.endSN&&!P.nextStart){var O=z.getState(X);return O===m.FragmentState.PARTIAL||O===m.FragmentState.OK}return!1},T.onMediaAttached=function(P,A){var X=this.media=this.mediaBuffer=A.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),X.addEventListener("seeking",this.onvseeking),X.addEventListener("ended",this.onvended);var z=this.config;this.levels&&z.autoStartLoad&&this.state===R.STOPPED&&this.startLoad(z.startPosition)},T.onMediaDetaching=function(){var P=this.media;P!=null&&P.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),P&&(P.removeEventListener("seeking",this.onvseeking),P.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},T.onMediaSeeking=function(){var P=this.config,A=this.fragCurrent,X=this.media,z=this.mediaBuffer,O=this.state,B=X?X.currentTime:0,U=C.BufferHelper.bufferInfo(z||X,B,P.maxBufferHole);if(this.log("media seeking to "+(Object(k.isFiniteNumber)(B)?B.toFixed(3):B)+", state: "+O),O===R.ENDED)this.resetLoadingState();else if(A&&!U.len){var L=P.maxFragLookUpTolerance,G=A.start-L,ee=A.start+A.duration+L,oe=B>ee;(B<G||oe)&&(oe&&A.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),A.loader.abort()),this.resetLoadingState())}X&&(this.lastCurrentTime=B),!this.loadedmetadata&&!U.len&&(this.nextLoadPosition=this.startPosition=B),this.tickImmediate()},T.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},T.onKeyLoaded=function(P,A){if(this.state!==R.KEY_LOADING||A.frag!==this.fragCurrent||!this.levels)return;this.state=R.IDLE;var X=this.levels[A.frag.level].details;X&&this.loadFragment(A.frag,X,A.frag.start)},T.onHandlerDestroying=function(){this.stopLoad(),x.prototype.onHandlerDestroying.call(this)},T.onHandlerDestroyed=function(){this.state=R.STOPPED,this.hls.off(e.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,x.prototype.onHandlerDestroyed.call(this)},T.loadKey=function(P,A){this.log("Loading key for "+P.sn+" of ["+A.startSN+"-"+A.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+P.level),this.state=R.KEY_LOADING,this.fragCurrent=P,this.hls.trigger(e.Events.KEY_LOADING,{frag:P})},T.loadFragment=function(P,A,X){this._loadFragForPlayback(P,A,X)},T._loadFragForPlayback=function(P,A,X){var z=this,O=function(U){if(z.fragContextChanged(P)){z.warn("Fragment "+P.sn+(U.part?" p: "+U.part.index:"")+" of level "+P.level+" was dropped during download."),z.fragmentTracker.removeFragment(P);return}P.stats.chunkCount++,z._handleFragmentLoadProgress(U)};this._doFragLoad(P,A,X,O).then(function(B){if(!B)return;z.fragLoadError=0;var U=z.state;if(z.fragContextChanged(P)){(U===R.FRAG_LOADING||U===R.BACKTRACKING||!z.fragCurrent&&U===R.PARSING)&&(z.fragmentTracker.removeFragment(P),z.state=R.IDLE);return}if("payload"in B&&(z.log("Loaded fragment "+P.sn+" of level "+P.level),z.hls.trigger(e.Events.FRAG_LOADED,B),z.state===R.BACKTRACKING)){z.fragmentTracker.backtrack(P,B),z.resetFragmentLoading(P);return}z._handleFragmentLoadComplete(B)}).catch(function(B){z.warn(B),z.resetFragmentLoading(P)})},T.flushMainBuffer=function(P,A,X){if(X===void 0&&(X=null),!(P-A))return;var z={startOffset:P,endOffset:A,type:X};this.fragLoadError=0,this.hls.trigger(e.Events.BUFFER_FLUSHING,z)},T._loadInitSegment=function(P){var A=this;this._doFragLoad(P).then(function(X){if(!X||A.fragContextChanged(P)||!A.levels)throw new Error("init load aborted");return X}).then(function(X){var z=A.hls,O=X.payload,B=P.decryptdata;if(O&&O.byteLength>0&&B&&B.key&&B.iv&&B.method==="AES-128"){var U=self.performance.now();return A.decrypter.webCryptoDecrypt(new Uint8Array(O),B.key.buffer,B.iv.buffer).then(function(L){var G=self.performance.now();return z.trigger(e.Events.FRAG_DECRYPTED,{frag:P,payload:L,stats:{tstart:U,tdecrypt:G}}),X.payload=L,X})}return X}).then(function(X){var z=A.fragCurrent,O=A.hls,B=A.levels;if(!B)throw new Error("init load aborted, missing levels");var U=B[P.level].details;console.assert(U,"Level details are defined when init segment is loaded");var L=P.stats;A.state=R.IDLE,A.fragLoadError=0,P.data=new Uint8Array(X.payload),L.parsing.start=L.buffering.start=self.performance.now(),L.parsing.end=L.buffering.end=self.performance.now(),X.frag===z&&O.trigger(e.Events.FRAG_BUFFERED,{stats:L,frag:z,part:null,id:P.type}),A.tick()}).catch(function(X){A.warn(X),A.resetFragmentLoading(P)})},T.fragContextChanged=function(P){var A=this.fragCurrent;return!P||!A||P.level!==A.level||P.sn!==A.sn||P.urlId!==A.urlId},T.fragBufferedComplete=function(P,A){var X=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+P.type+" sn: "+P.sn+(A?" part: "+A.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+P.level+" "+u.default.toString(C.BufferHelper.getBuffered(X))),this.state=R.IDLE,this.tick()},T._handleFragmentLoadComplete=function(P){var A=this.transmuxer;if(!A)return;var X=P.frag,z=P.part,O=P.partsLoaded,B=!O||O.length===0||O.some(function(L){return!L}),U=new r.ChunkMetadata(X.level,X.sn,X.stats.chunkCount+1,0,z?z.index:-1,!B);A.flush(U)},T._handleFragmentLoadProgress=function(P){},T._doFragLoad=function(P,A,X,z){var O=this;if(X===void 0&&(X=null),!this.levels)throw new Error("frag load aborted, missing levels");if(X=Math.max(P.start,X||0),this.config.lowLatencyMode&&A){var B=A.partList;if(B&&z){X>P.end&&A.fragmentHint&&(P=A.fragmentHint);var U=this.getNextPart(B,P,X);if(U>-1){var L=B[U];return this.log("Loading part sn: "+P.sn+" p: "+L.index+" cc: "+P.cc+" of playlist ["+A.startSN+"-"+A.endSN+"] parts [0-"+U+"-"+(B.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+P.level+", target: "+parseFloat(X.toFixed(3))),this.nextLoadPosition=L.start+L.duration,this.state=R.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:P,part:B[U],targetBufferTime:X}),this.doFragPartsLoad(P,B,U,z).catch(function(G){return O.handleFragLoadError(G)})}else if(!P.url||this.loadedEndOfParts(B,X))return Promise.resolve(null)}}return this.log("Loading fragment "+P.sn+" cc: "+P.cc+" "+(A?"of ["+A.startSN+"-"+A.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+P.level+", target: "+parseFloat(X.toFixed(3))),Object(k.isFiniteNumber)(P.sn)&&!this.bitrateTest&&(this.nextLoadPosition=P.start+P.duration),this.state=R.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:P,targetBufferTime:X}),this.fragmentLoader.load(P,z).catch(function(G){return O.handleFragLoadError(G)})},T.doFragPartsLoad=function(P,A,X,z){var O=this;return new Promise(function(B,U){var L=[],G=function ee(oe){var ae=A[oe];O.fragmentLoader.loadPart(P,ae,z).then(function(be){L[ae.index]=be;var _e=be.part;O.hls.trigger(e.Events.FRAG_LOADED,be);var fe=A[oe+1];if(fe&&fe.fragment===P)ee(oe+1);else return B({frag:P,part:_e,partsLoaded:L})}).catch(U)};G(X)})},T.handleFragLoadError=function(P){var A=P.data;return A&&A.details===h.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(A.frag,A.part):this.hls.trigger(e.Events.ERROR,A),null},T._handleTransmuxerFlush=function(P){var A=this.getCurrentContext(P);if(!A||this.state!==R.PARSING){this.fragCurrent||(this.state=R.IDLE);return}var X=A.frag,z=A.part,O=A.level,B=self.performance.now();X.stats.parsing.end=B,z&&(z.stats.parsing.end=B),this.updateLevelTiming(X,z,O,P.partial)},T.getCurrentContext=function(P){var A=this.levels,X=P.level,z=P.sn,O=P.part;if(!A||!A[X])return this.warn("Levels object was unset while buffering fragment "+z+" of level "+X+". The current chunk will not be buffered."),null;var B=A[X],U=O>-1?Object(l.getPartWith)(B,z,O):null,L=U?U.fragment:Object(l.getFragmentWithSN)(B,z,this.fragCurrent);return L?{frag:L,part:U,level:B}:null},T.bufferFragmentData=function(P,A,X,z){if(!P||this.state!==R.PARSING)return;var O=P.data1,B=P.data2,U=O;if(O&&B&&(U=Object(c.appendUint8Array)(O,B)),!U||!U.length)return;var L={type:P.type,frag:A,part:X,chunkMeta:z,parent:A.type,data:U};this.hls.trigger(e.Events.BUFFER_APPENDING,L),P.dropped&&P.independent&&!X&&this.flushBufferGap(A)},T.flushBufferGap=function(P){var A=this.media;if(!A)return;if(!C.BufferHelper.isBuffered(A,A.currentTime)){this.flushMainBuffer(0,P.start);return}var X=A.currentTime,z=C.BufferHelper.bufferInfo(A,X,0),O=P.duration,B=Math.min(this.config.maxFragLookUpTolerance*2,O*.25),U=Math.max(Math.min(P.start-B,z.end-B),X+B);P.start-U>B&&this.flushMainBuffer(U,P.start)},T.getFwdBufferInfo=function(P,A){var X=this.config,z=this.getLoadPosition();if(!Object(k.isFiniteNumber)(z))return null;var O=C.BufferHelper.bufferInfo(P,z,X.maxBufferHole);if(O.len===0&&O.nextStart!==void 0){var B=this.fragmentTracker.getBufferedFrag(z,A);if(B&&O.nextStart<B.end)return C.BufferHelper.bufferInfo(P,z,Math.max(O.nextStart,X.maxBufferHole))}return O},T.getMaxBufferLength=function(P){var A=this.config,X;return P?X=Math.max(8*A.maxBufferSize/P,A.maxBufferLength):X=A.maxBufferLength,Math.min(X,A.maxMaxBufferLength)},T.reduceMaxBufferLength=function(P){var A=this.config,X=P||A.maxBufferLength;return A.maxMaxBufferLength>=X?(A.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+A.maxMaxBufferLength+"s"),!0):!1},T.getNextFragment=function(P,A){var X,z,O=A.fragments,B=O.length;if(!B)return null;var U=this.config,L=O[0].start,G;if(A.live){var ee=U.initialLiveManifestSize;if(B<ee)return this.warn("Not enough fragments to start playback (have: "+B+", need: "+ee+")"),null;!A.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(G=this.getInitialLiveFragment(A,O),this.startPosition=G?this.hls.liveSyncPosition||G.start:P)}else P<=L&&(G=O[0]);if(!G){var oe=U.lowLatencyMode?A.partEnd:A.fragmentEnd;G=this.getFragmentAtPosition(P,oe,A)}return(X=G)!==null&&X!==void 0&&X.initSegment&&!((z=G)!==null&&z!==void 0&&z.initSegment.data)&&!this.bitrateTest&&(G=G.initSegment),G},T.getNextPart=function(P,A,X){for(var z=-1,O=!1,B=!0,U=0,L=P.length;U<L;U++){var G=P[U];if(B=B&&!G.independent,z>-1&&X<G.start)break;var ee=G.loaded;!ee&&(O||G.independent||B)&&G.fragment===A&&(z=U),O=ee}return z},T.loadedEndOfParts=function(P,A){var X=P[P.length-1];return X&&A>X.start&&X.loaded},T.getInitialLiveFragment=function(P,A){var X=this.fragPrevious,z=null;if(X){if(P.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+X.programDateTime),z=Object(n.findFragmentByPDT)(A,X.endProgramDateTime,this.config.maxFragLookUpTolerance)),!z){var O=X.sn+1;if(O>=P.startSN&&O<=P.endSN){var B=A[O-P.startSN];X.cc===B.cc&&(z=B,this.log("Live playlist, switching playlist, load frag with next SN: "+z.sn))}z||(z=Object(n.findFragWithCC)(A,X.cc),z&&this.log("Live playlist, switching playlist, load frag with same CC: "+z.sn))}}else{var U=this.hls.liveSyncPosition;U!==null&&(z=this.getFragmentAtPosition(U,this.bitrateTest?P.fragmentEnd:P.edge,P))}return z},T.getFragmentAtPosition=function(P,A,X){var z=this.config,O=this.fragPrevious,B=X.fragments,U=X.endSN,L=X.fragmentHint,G=z.maxFragLookUpTolerance,ee=!!(z.lowLatencyMode&&X.partList&&L);ee&&L&&!this.bitrateTest&&(B=B.concat(L),U=L.sn);var oe;if(P<A){var ae=P>A-G?0:G;oe=Object(n.findFragmentByPTS)(O,B,P,ae)}else oe=B[B.length-1];if(oe){var be=oe.sn-X.startSN,_e=O&&oe.level===O.level,fe=B[be+1],Re=this.fragmentTracker.getState(oe);if(Re===m.FragmentState.BACKTRACKED){oe=null;for(var Oe=be;B[Oe]&&this.fragmentTracker.getState(B[Oe])===m.FragmentState.BACKTRACKED;)O?oe=B[Oe--]:oe=B[--Oe];oe||(oe=fe)}else O&&oe.sn===O.sn&&!ee&&(_e&&(oe.sn<U&&this.fragmentTracker.getState(fe)!==m.FragmentState.OK?(this.log("SN "+oe.sn+" just loaded, load next one: "+fe.sn),oe=fe):oe=null))}return oe},T.synchronizeToLiveEdge=function(P){var A=this.config,X=this.media;if(!X)return;var z=this.hls.liveSyncPosition,O=X.currentTime,B=P.fragments[0].start,U=P.edge,L=O>=B-A.maxFragLookUpTolerance&&O<=U;if(z!==null&&X.duration>z&&(O<z||!L)){var G=A.liveMaxLatencyDuration!==void 0?A.liveMaxLatencyDuration:A.liveMaxLatencyDurationCount*P.targetduration;(!L&&X.readyState<4||O<U-G)&&(this.loadedmetadata||(this.nextLoadPosition=z),X.readyState&&(this.warn("Playback: "+O.toFixed(3)+" is located too far from the end of live sliding playlist: "+U+", reset currentTime to : "+z.toFixed(3)),X.currentTime=z))}},T.alignPlaylists=function(P,A){var X=this.levels,z=this.levelLastLoaded,O=this.fragPrevious,B=z!==null?X[z]:null,U=P.fragments.length;if(!U)return this.warn("No fragments in live playlist"),0;var L=P.fragments[0].start,G=!A,ee=P.alignedSliding&&Object(k.isFiniteNumber)(L);if(G||!ee&&!L){Object(i.alignStream)(O,B,P);var oe=P.fragments[0].start;return this.log("Live playlist sliding: "+oe.toFixed(2)+" start-sn: "+(A?A.startSN:"na")+"->"+P.startSN+" prev-sn: "+(O?O.sn:"na")+" fragments: "+U),oe}return L},T.waitForCdnTuneIn=function(P){var A=3;return P.live&&P.canBlockReload&&P.tuneInGoal>Math.max(P.partHoldBack,P.partTarget*A)},T.setStartPosition=function(P,A){var X=this.startPosition;if(X<A&&(X=-1),X===-1||this.lastCurrentTime===-1){var z=P.startTimeOffset;Object(k.isFiniteNumber)(z)?(X=A+z,z<0&&(X+=P.totalduration),X=Math.min(Math.max(A,X),A+P.totalduration),this.log("Start time offset "+z+" found in playlist, adjust startPosition to "+X),this.startPosition=X):P.live?X=this.hls.liveSyncPosition||A:this.startPosition=X=0,this.lastCurrentTime=X}this.nextLoadPosition=X},T.getLoadPosition=function(){var P=this.media,A=0;return this.loadedmetadata&&P?A=P.currentTime:this.nextLoadPosition&&(A=this.nextLoadPosition),A},T.handleFragLoadAborted=function(P,A){this.transmuxer&&P.sn!=="initSegment"&&P.stats.aborted&&(this.warn("Fragment "+P.sn+(A?" part"+A.index:"")+" of level "+P.level+" was aborted"),this.resetFragmentLoading(P))},T.resetFragmentLoading=function(P){(!this.fragCurrent||!this.fragContextChanged(P))&&(this.state=R.IDLE)},T.onFragmentOrKeyLoadError=function(P,A){if(A.fatal)return;var X=A.frag;if(!X||X.type!==P)return;var z=this.fragCurrent;console.assert(z&&X.sn===z.sn&&X.level===z.level&&X.urlId===z.urlId,"Frag load error must match current frag to retry");var O=this.config;if(this.fragLoadError+1<=O.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(X.level))return;var B=Math.min(Math.pow(2,this.fragLoadError)*O.fragLoadingRetryDelay,O.fragLoadingMaxRetryTimeout);this.warn("Fragment "+X.sn+" of "+P+" "+X.level+" failed to load, retrying in "+B+"ms"),this.retryDate=self.performance.now()+B,this.fragLoadError++,this.state=R.FRAG_LOADING_WAITING_RETRY}else A.levelRetry?(P===o.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=R.IDLE):(_.logger.error(A.details+" reaches max retry, redispatch as fatal ..."),A.fatal=!0,this.hls.stopLoad(),this.state=R.ERROR)},T.afterBufferFlushed=function(P,A,X){if(!P)return;var z=C.BufferHelper.getBuffered(P);this.fragmentTracker.detectEvictedFragments(A,z,X),this.state===R.ENDED&&this.resetLoadingState()},T.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=R.IDLE},T.resetLiveStartWhenNotLoaded=function(P){if(!this.loadedmetadata){this.startFragRequested=!1;var A=this.levels?this.levels[P].details:null;if(A!=null&&A.live)return this.startPosition=-1,this.setStartPosition(A,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},T.updateLevelTiming=function(P,A,X,z){var O=this,B=X.details;console.assert(!!B,"level.details must be defined");var U=Object.keys(P.elementaryStreams).reduce(function(L,G){var ee=P.elementaryStreams[G];if(ee){var oe=ee.endPTS-ee.startPTS;if(oe<=0)return O.warn("Could not parse fragment "+P.sn+" "+G+" duration reliably ("+oe+") resetting transmuxer to fallback to playlist timing"),O.resetTransmuxer(),L||!1;var ae=z?0:Object(l.updateFragPTSDTS)(B,P,ee.startPTS,ee.endPTS,ee.startDTS,ee.endDTS);return O.hls.trigger(e.Events.LEVEL_PTS_UPDATED,{details:B,level:X,drift:ae,type:G,frag:P,start:ee.startPTS,end:ee.endPTS}),!0}return L},!1);U?(this.state=R.PARSED,this.hls.trigger(e.Events.FRAG_PARSED,{frag:P,part:A})):this.resetLoadingState()},T.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},E(w,[{key:"state",get:function(){return this._state},set:function(P){var A=this._state;A!==P&&(this._state=P,this.log(A+"->"+P))}}]),w}(v.default)},"./src/controller/buffer-controller.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return n});var k=S("./src/polyfills/number.ts"),v=S("./src/events.ts"),m=S("./src/utils/logger.ts"),C=S("./src/errors.ts"),_=S("./src/utils/buffer-helper.ts"),e=S("./src/utils/mediasource-helper.ts"),h=S("./src/loader/fragment.ts"),r=S("./src/controller/buffer-operation-queue.ts"),c=Object(e.getMediaSource)(),i=/([ha]vc.)(?:\.[^.,]+)+/,n=function(){function l(d){var u=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 o=u.hls,s=u.media,E=u.mediaSource;m.logger.log("[buffer-controller]: Media source opened"),s&&(u.updateMediaElementDuration(),o.trigger(v.Events.MEDIA_ATTACHED,{media:s})),E&&E.removeEventListener("sourceopen",u._onMediaSourceOpen),u.checkPendingTracks()},this._onMediaSourceClose=function(){m.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){m.logger.log("[buffer-controller]: Media source ended")},this.hls=d,this._initSourceBuffer(),this.registerListeners()}var f=l.prototype;return f.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},f.destroy=function(){this.unregisterListeners(),this.details=null},f.registerListeners=function(){var u=this.hls;u.on(v.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.on(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(v.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(v.Events.BUFFER_RESET,this.onBufferReset,this),u.on(v.Events.BUFFER_APPENDING,this.onBufferAppending,this),u.on(v.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.on(v.Events.BUFFER_EOS,this.onBufferEos,this),u.on(v.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),u.on(v.Events.LEVEL_UPDATED,this.onLevelUpdated,this),u.on(v.Events.FRAG_PARSED,this.onFragParsed,this),u.on(v.Events.FRAG_CHANGED,this.onFragChanged,this)},f.unregisterListeners=function(){var u=this.hls;u.off(v.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.off(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(v.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(v.Events.BUFFER_RESET,this.onBufferReset,this),u.off(v.Events.BUFFER_APPENDING,this.onBufferAppending,this),u.off(v.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.off(v.Events.BUFFER_EOS,this.onBufferEos,this),u.off(v.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),u.off(v.Events.LEVEL_UPDATED,this.onLevelUpdated,this),u.off(v.Events.FRAG_PARSED,this.onFragParsed,this),u.off(v.Events.FRAG_CHANGED,this.onFragChanged,this)},f._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new r.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},f.onManifestParsed=function(u,o){var s=2;(o.audio&&!o.video||!o.altAudio)&&(s=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=s,this.details=null,m.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},f.onMediaAttaching=function(u,o){var s=this.media=o.media;if(s&&c){var E=this.mediaSource=new c;E.addEventListener("sourceopen",this._onMediaSourceOpen),E.addEventListener("sourceended",this._onMediaSourceEnded),E.addEventListener("sourceclose",this._onMediaSourceClose),s.src=self.URL.createObjectURL(E),this._objectUrl=s.src}},f.onMediaDetaching=function(){var u=this.media,o=this.mediaSource,s=this._objectUrl;if(o){if(m.logger.log("[buffer-controller]: media source detaching"),o.readyState==="open")try{o.endOfStream()}catch(E){m.logger.warn("[buffer-controller]: onMediaDetaching: "+E.message+" while calling endOfStream")}this.onBufferReset(),o.removeEventListener("sourceopen",this._onMediaSourceOpen),o.removeEventListener("sourceended",this._onMediaSourceEnded),o.removeEventListener("sourceclose",this._onMediaSourceClose),u&&(s&&self.URL.revokeObjectURL(s),u.src===s?(u.removeAttribute("src"),u.load()):m.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(v.Events.MEDIA_DETACHED,void 0)},f.onBufferReset=function(){var u=this;this.getSourceBufferTypes().forEach(function(o){var s=u.sourceBuffer[o];try{s&&(u.removeBufferListeners(o),u.mediaSource&&u.mediaSource.removeSourceBuffer(s),u.sourceBuffer[o]=void 0)}catch(E){m.logger.warn("[buffer-controller]: Failed to reset the "+o+" buffer",E)}}),this._initSourceBuffer()},f.onBufferCodecs=function(u,o){var s=this,E=this.getSourceBufferTypes().length;if(Object.keys(o).forEach(function(b){if(E){var p=s.tracks[b];if(p&&typeof p.buffer.changeType=="function"){var D=o[b],R=D.codec,y=D.levelCodec,x=D.container,w=(p.levelCodec||p.codec).replace(i,"$1"),T=(y||R).replace(i,"$1");if(w!==T){var F=x+";codecs="+(y||R);s.appendChangeType(b,F)}}}else s.pendingTracks[b]=o[b]}),E)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},f.appendChangeType=function(u,o){var s=this,E=this.operationQueue,b={execute:function(){var D=s.sourceBuffer[u];D&&(m.logger.log("[buffer-controller]: changing "+u+" sourceBuffer type to "+o),D.changeType(o)),E.shiftAndExecuteNext(u)},onStart:function(){},onComplete:function(){},onError:function(D){m.logger.warn("[buffer-controller]: Failed to change "+u+" SourceBuffer type",D)}};E.append(b,u)},f.onBufferAppending=function(u,o){var s=this,E=this.hls,b=this.operationQueue,p=this.tracks,D=o.data,R=o.type,y=o.frag,x=o.part,w=o.chunkMeta,T=w.buffering[R],F=self.performance.now();T.start=F;var P=y.stats.buffering,A=x?x.stats.buffering:null;P.start===0&&(P.start=F),A&&A.start===0&&(A.start=F);var X=p.audio,z=R==="audio"&&w.id===1&&(X==null?void 0:X.container)==="audio/mpeg",O={execute:function(){if(T.executeStart=self.performance.now(),z){var U=s.sourceBuffer[R];if(U){var L=y.start-U.timestampOffset;Math.abs(L)>=.1&&(m.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+y.start+" (delta: "+L+") sn: "+y.sn+")"),U.timestampOffset=y.start)}}s.appendExecutor(D,R)},onStart:function(){},onComplete:function(){var U=self.performance.now();T.executeEnd=T.end=U,P.first===0&&(P.first=U),A&&A.first===0&&(A.first=U);var L=s.sourceBuffer,G={};for(var ee in L)G[ee]=_.BufferHelper.getBuffered(L[ee]);s.appendError=0,s.hls.trigger(v.Events.BUFFER_APPENDED,{type:R,frag:y,part:x,chunkMeta:w,parent:y.type,timeRanges:G})},onError:function(U){m.logger.error("[buffer-controller]: Error encountered while trying to append to the "+R+" SourceBuffer",U);var L={type:C.ErrorTypes.MEDIA_ERROR,parent:y.type,details:C.ErrorDetails.BUFFER_APPEND_ERROR,err:U,fatal:!1};U.code===DOMException.QUOTA_EXCEEDED_ERR?L.details=C.ErrorDetails.BUFFER_FULL_ERROR:(s.appendError++,L.details=C.ErrorDetails.BUFFER_APPEND_ERROR,s.appendError>E.config.appendErrorMaxRetry&&(m.logger.error("[buffer-controller]: Failed "+E.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),L.fatal=!0)),E.trigger(v.Events.ERROR,L)}};b.append(O,R)},f.onBufferFlushing=function(u,o){var s=this,E=this.operationQueue,b=function(D){return{execute:s.removeExecutor.bind(s,D,o.startOffset,o.endOffset),onStart:function(){},onComplete:function(){s.hls.trigger(v.Events.BUFFER_FLUSHED,{type:D})},onError:function(y){m.logger.warn("[buffer-controller]: Failed to remove from "+D+" SourceBuffer",y)}}};o.type?E.append(b(o.type),o.type):this.getSourceBufferTypes().forEach(function(p){E.append(b(p),p)})},f.onFragParsed=function(u,o){var s=this,E=o.frag,b=o.part,p=[],D=b?b.elementaryStreams:E.elementaryStreams;D[h.ElementaryStreamTypes.AUDIOVIDEO]?p.push("audiovideo"):(D[h.ElementaryStreamTypes.AUDIO]&&p.push("audio"),D[h.ElementaryStreamTypes.VIDEO]&&p.push("video"));var R=function(){var x=self.performance.now();E.stats.buffering.end=x,b&&(b.stats.buffering.end=x);var w=b?b.stats:E.stats;s.hls.trigger(v.Events.FRAG_BUFFERED,{frag:E,part:b,stats:w,id:E.type})};p.length===0&&m.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+E.type+" level: "+E.level+" sn: "+E.sn),this.blockBuffers(R,p)},f.onFragChanged=function(u,o){this.flushBackBuffer()},f.onBufferEos=function(u,o){var s=this,E=this.getSourceBufferTypes().reduce(function(b,p){var D=s.sourceBuffer[p];return(!o.type||o.type===p)&&(D&&!D.ended&&(D.ended=!0,m.logger.log("[buffer-controller]: "+p+" sourceBuffer now EOS"))),b&&!!(!D||D.ended)},!0);E&&this.blockBuffers(function(){var b=s.mediaSource;if(!b||b.readyState!=="open")return;b.endOfStream()})},f.onLevelUpdated=function(u,o){var s=o.details;if(!s.fragments.length)return;this.details=s,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},f.flushBackBuffer=function(){var u=this.hls,o=this.details,s=this.media,E=this.sourceBuffer;if(!s||o===null)return;var b=this.getSourceBufferTypes();if(!b.length)return;var p=o.live&&u.config.liveBackBufferLength!==null?u.config.liveBackBufferLength:u.config.backBufferLength;if(!Object(k.isFiniteNumber)(p)||p<0)return;var D=s.currentTime,R=o.levelTargetDuration,y=Math.max(p,R),x=Math.floor(D/R)*R-y;b.forEach(function(w){var T=E[w];if(T){var F=_.BufferHelper.getBuffered(T);F.length>0&&x>F.start(0)&&(u.trigger(v.Events.BACK_BUFFER_REACHED,{bufferEnd:x}),o.live&&u.trigger(v.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:x}),u.trigger(v.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:x,type:w}))}})},f.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var u=this.details,o=this.hls,s=this.media,E=this.mediaSource,b=u.fragments[0].start+u.totalduration,p=s.duration,D=Object(k.isFiniteNumber)(E.duration)?E.duration:0;u.live&&o.config.liveDurationInfinity?(m.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),E.duration=Infinity,this.updateSeekableRange(u)):(b>D&&b>p||!Object(k.isFiniteNumber)(p))&&(m.logger.log("[buffer-controller]: Updating Media Source duration to "+b.toFixed(3)),E.duration=b)},f.updateSeekableRange=function(u){var o=this.mediaSource,s=u.fragments,E=s.length;if(E&&u.live&&o!==null&&o!==void 0&&o.setLiveSeekableRange){var b=Math.max(0,s[0].start),p=Math.max(b,b+u.totalduration);o.setLiveSeekableRange(b,p)}},f.checkPendingTracks=function(){var u=this.bufferCodecEventsExpected,o=this.operationQueue,s=this.pendingTracks,E=Object.keys(s).length;if(E&&!u||E===2){this.createSourceBuffers(s),this.pendingTracks={};var b=this.getSourceBufferTypes();if(b.length===0){this.hls.trigger(v.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}b.forEach(function(p){o.executeNext(p)})}},f.createSourceBuffers=function(u){var o=this.sourceBuffer,s=this.mediaSource;if(!s)throw Error("createSourceBuffers called when mediaSource was null");var E=0;for(var b in u)if(!o[b]){var p=u[b];if(!p)throw Error("source buffer exists for track "+b+", however track does not");var D=p.levelCodec||p.codec,R=p.container+";codecs="+D;m.logger.log("[buffer-controller]: creating sourceBuffer("+R+")");try{var y=o[b]=s.addSourceBuffer(R),x=b;this.addBufferListener(x,"updatestart",this._onSBUpdateStart),this.addBufferListener(x,"updateend",this._onSBUpdateEnd),this.addBufferListener(x,"error",this._onSBUpdateError),this.tracks[b]={buffer:y,codec:D,container:p.container,levelCodec:p.levelCodec,id:p.id},E++}catch(w){m.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+w.message),this.hls.trigger(v.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:w,mimeType:R})}}E&&this.hls.trigger(v.Events.BUFFER_CREATED,{tracks:this.tracks})},f._onSBUpdateStart=function(u){var o=this.operationQueue,s=o.current(u);s.onStart()},f._onSBUpdateEnd=function(u){var o=this.operationQueue,s=o.current(u);s.onComplete(),o.shiftAndExecuteNext(u)},f._onSBUpdateError=function(u,o){m.logger.error("[buffer-controller]: "+u+" SourceBuffer error",o),this.hls.trigger(v.Events.ERROR,{type:C.ErrorTypes.MEDIA_ERROR,details:C.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var s=this.operationQueue.current(u);s&&s.onError(o)},f.removeExecutor=function(u,o,s){var E=this.media,b=this.mediaSource,p=this.operationQueue,D=this.sourceBuffer,R=D[u];if(!E||!b||!R){m.logger.warn("[buffer-controller]: Attempting to remove from the "+u+" SourceBuffer, but it does not exist"),p.shiftAndExecuteNext(u);return}var y=Object(k.isFiniteNumber)(E.duration)?E.duration:Infinity,x=Object(k.isFiniteNumber)(b.duration)?b.duration:Infinity,w=Math.max(0,o),T=Math.min(s,y,x);T>w?(m.logger.log("[buffer-controller]: Removing ["+w+","+T+"] from the "+u+" SourceBuffer"),console.assert(!R.updating,u+" sourceBuffer must not be updating"),R.remove(w,T)):p.shiftAndExecuteNext(u)},f.appendExecutor=function(u,o){var s=this.operationQueue,E=this.sourceBuffer,b=E[o];if(!b){m.logger.warn("[buffer-controller]: Attempting to append to the "+o+" SourceBuffer, but it does not exist"),s.shiftAndExecuteNext(o);return}b.ended=!1,console.assert(!b.updating,o+" sourceBuffer must not be updating"),b.appendBuffer(u)},f.blockBuffers=function(u,o){var s=this;if(o===void 0&&(o=this.getSourceBufferTypes()),!o.length){m.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(u);return}var E=this.operationQueue,b=o.map(function(p){return E.appendBlocker(p)});Promise.all(b).then(function(){u(),o.forEach(function(p){var D=s.sourceBuffer[p];(!D||!D.updating)&&E.shiftAndExecuteNext(p)})})},f.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},f.addBufferListener=function(u,o,s){var E=this.sourceBuffer[u];if(!E)return;var b=s.bind(this,u);this.listeners[u].push({event:o,listener:b}),E.addEventListener(o,b)},f.removeBufferListeners=function(u){var o=this.sourceBuffer[u];if(!o)return;this.listeners[u].forEach(function(s){o.removeEventListener(s.event,s.listener)})},l}()},"./src/controller/buffer-operation-queue.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return v});var k=S("./src/utils/logger.ts"),v=function(){function m(_){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=_}var C=m.prototype;return C.append=function(e,h){var r=this.queues[h];r.push(e),r.length===1&&this.buffers[h]&&this.executeNext(h)},C.insertAbort=function(e,h){var r=this.queues[h];r.unshift(e),this.executeNext(h)},C.appendBlocker=function(e){var h,r=new Promise(function(i){h=i}),c={execute:h,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(c,e),r},C.executeNext=function(e){var h=this.buffers,r=this.queues,c=h[e],i=r[e];if(i.length){var n=i[0];try{n.execute()}catch(l){k.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),n.onError(l),(!c||!c.updating)&&(i.shift(),this.executeNext(e))}}},C.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},C.current=function(e){return this.queues[e][0]},m}()},"./src/controller/cap-level-controller.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/events.ts");function v(_,e){for(var h=0;h<e.length;h++){var r=e[h];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(_,r.key,r)}}function m(_,e,h){return e&&v(_.prototype,e),h&&v(_,h),_}var C=function(){function _(h){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=h,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var e=_.prototype;return e.setStreamController=function(r){this.streamController=r},e.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},e.registerListeners=function(){var r=this.hls;r.on(k.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.on(k.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(k.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(k.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.on(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.unregisterListener=function(){var r=this.hls;r.off(k.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.off(k.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(k.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(k.Events.BUFFER_CODECS,this.onBufferCodecs,this),r.off(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.onFpsDropLevelCapping=function(r,c){_.isLevelAllowed(c.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(c.droppedLevel)},e.onMediaAttaching=function(r,c){this.media=c.media instanceof HTMLVideoElement?c.media:null},e.onManifestParsed=function(r,c){var i=this.hls;this.restrictedLevels=[],this.firstLevel=c.firstLevel,i.config.capLevelToPlayerSize&&c.video&&this.startCapping()},e.onBufferCodecs=function(r,c){var i=this.hls;i.config.capLevelToPlayerSize&&c.video&&this.startCapping()},e.onMediaDetaching=function(){this.stopCapping()},e.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var r=this.hls.levels;if(r.length){var c=this.hls;c.autoLevelCapping=this.getMaxLevel(r.length-1),c.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=c.autoLevelCapping}}},e.getMaxLevel=function(r){var c=this,i=this.hls.levels;if(!i.length)return-1;var n=i.filter(function(l,f){return _.isLevelAllowed(f,c.restrictedLevels)&&f<=r});return this.clientRect=null,_.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)},e.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()},e.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},e.getDimensions=function(){if(this.clientRect)return this.clientRect;var r=this.media,c={width:0,height:0};if(r){var i=r.getBoundingClientRect();c.width=i.width,c.height=i.height,!c.width&&!c.height&&(c.width=i.right-i.left||r.width||0,c.height=i.bottom-i.top||r.height||0)}return this.clientRect=c,c},_.isLevelAllowed=function(r,c){return c===void 0&&(c=[]),c.indexOf(r)===-1},_.getMaxLevelByMediaSize=function(r,c,i){if(!r||!r.length)return-1;for(var n=function(o,s){return s?o.width!==s.width||o.height!==s.height:!0},l=r.length-1,f=0;f<r.length;f+=1){var d=r[f];if((d.width>=c||d.height>=i)&&n(d,r[f+1])){l=f;break}}return l},m(_,[{key:"mediaWidth",get:function(){return this.getDimensions().width*_.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*_.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var r=1;try{r=self.devicePixelRatio}catch(c){}return r}}]),_}();g.default=C},"./src/controller/cmcd-controller.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return n});var k=S("./src/events.ts"),v=S("./src/types/cmcd.ts"),m=S("./src/utils/buffer-helper.ts"),C=S("./src/utils/logger.ts");function _(l,f){for(var d=0;d<f.length;d++){var u=f[d];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(l,u.key,u)}}function e(l,f,d){return f&&_(l.prototype,f),d&&_(l,d),l}function h(l,f){var d=typeof Symbol!="undefined"&&l[Symbol.iterator]||l["@@iterator"];if(d)return(d=d.call(l)).next.bind(d);if(Array.isArray(l)||(d=r(l))||f&&l&&typeof l.length=="number"){d&&(l=d);var u=0;return function(){return u>=l.length?{done:!0}:{done:!1,value:l[u++]}}}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(l,f){if(!l)return;if(typeof l=="string")return c(l,f);var d=Object.prototype.toString.call(l).slice(8,-1);if(d==="Object"&&l.constructor&&(d=l.constructor.name),d==="Map"||d==="Set")return Array.from(l);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return c(l,f)}function c(l,f){(f==null||f>l.length)&&(f=l.length);for(var d=0,u=new Array(f);d<f;d++)u[d]=l[d];return u}function i(){return i=Object.assign||function(l){for(var f=1;f<arguments.length;f++){var d=arguments[f];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(l[u]=d[u])}return l},i.apply(this,arguments)}var n=function(){function l(d){var u=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(){u.initialized&&(u.starved=!0),u.buffering=!0},this.onPlaying=function(){u.initialized||(u.initialized=!0),u.buffering=!1},this.applyPlaylistData=function(E){try{u.apply(E,{ot:v.CMCDObjectType.MANIFEST,su:!u.initialized})}catch(b){C.logger.warn("Could not generate manifest CMCD data.",b)}},this.applyFragmentData=function(E){try{var b=E.frag,p=u.hls.levels[b.level],D=u.getObjectType(b),R={d:b.duration*1e3,ot:D};(D===v.CMCDObjectType.VIDEO||D===v.CMCDObjectType.AUDIO||D==v.CMCDObjectType.MUXED)&&(R.br=p.bitrate/1e3,R.tb=u.getTopBandwidth(D),R.bl=u.getBufferLength(D)),u.apply(E,R)}catch(y){C.logger.warn("Could not generate segment CMCD data.",y)}},this.hls=d;var o=this.config=d.config,s=o.cmcd;s!=null&&(o.pLoader=this.createPlaylistLoader(),o.fLoader=this.createFragmentLoader(),this.sid=s.sessionId||l.uuid(),this.cid=s.contentId,this.useHeaders=s.useHeaders===!0,this.registerListeners())}var f=l.prototype;return f.registerListeners=function(){var u=this.hls;u.on(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(k.Events.MEDIA_DETACHED,this.onMediaDetached,this),u.on(k.Events.BUFFER_CREATED,this.onBufferCreated,this)},f.unregisterListeners=function(){var u=this.hls;u.off(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(k.Events.MEDIA_DETACHED,this.onMediaDetached,this),u.off(k.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},f.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},f.onMediaAttached=function(u,o){this.media=o.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},f.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},f.onBufferCreated=function(u,o){var s,E;this.audioBuffer=(s=o.tracks.audio)===null||s===void 0?void 0:s.buffer,this.videoBuffer=(E=o.tracks.video)===null||E===void 0?void 0:E.buffer},f.createData=function(){var u;return{v:v.CMCDVersion,sf:v.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(u=this.media)===null||u===void 0?void 0:u.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},f.apply=function(u,o){o===void 0&&(o={}),i(o,this.createData());var s=o.ot===v.CMCDObjectType.INIT||o.ot===v.CMCDObjectType.VIDEO||o.ot===v.CMCDObjectType.MUXED;if(this.starved&&s&&(o.bs=!0,o.su=!0,this.starved=!1),o.su==null&&(o.su=this.buffering),this.useHeaders){var E=l.toHeaders(o);if(!Object.keys(E).length)return;u.headers||(u.headers={}),i(u.headers,E)}else{var b=l.toQuery(o);if(!b)return;u.url=l.appendQueryToUri(u.url,b)}},f.getObjectType=function(u){var o=u.type;return o==="subtitle"?v.CMCDObjectType.TIMED_TEXT:u.sn==="initSegment"?v.CMCDObjectType.INIT:o==="audio"?v.CMCDObjectType.AUDIO:o==="main"?this.hls.audioTracks.length?v.CMCDObjectType.VIDEO:v.CMCDObjectType.MUXED:void 0},f.getTopBandwidth=function(u){for(var o=0,s=u===v.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,E=h(s),b;!(b=E()).done;){var p=b.value;p.bitrate>o&&(o=p.bitrate)}return o>0?o:NaN},f.getBufferLength=function(u){var o=this.hls.media,s=u===v.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!s||!o)return NaN;var E=m.BufferHelper.bufferInfo(s,o.currentTime,this.config.maxBufferHole);return E.len*1e3},f.createPlaylistLoader=function(){var u=this.config.pLoader,o=this.applyPlaylistData,s=u||this.config.loader;return function(){function E(p){this.loader=void 0,this.loader=new s(p)}var b=E.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(D,R,y){o(D),this.loader.load(D,R,y)},e(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},f.createFragmentLoader=function(){var u=this.config.fLoader,o=this.applyFragmentData,s=u||this.config.loader;return function(){function E(p){this.loader=void 0,this.loader=new s(p)}var b=E.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(D,R,y){o(D),this.loader.load(D,R,y)},e(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},l.uuid=function(){var u=URL.createObjectURL(new Blob),o=u.toString();return URL.revokeObjectURL(u),o.substr(o.lastIndexOf("/")+1)},l.serialize=function(u){for(var o=[],s=function(z){return!Number.isNaN(z)&&z!=null&&z!==""&&z!==!1},E=function(z){return Math.round(z)},b=function(z){return E(z/100)*100},p=function(z){return encodeURIComponent(z)},D={br:E,d:E,bl:b,dl:b,mtp:b,nor:p,rtp:b,tb:E},R=Object.keys(u||{}).sort(),y=h(R),x;!(x=y()).done;){var w=x.value,T=u[w];if(!s(T))continue;if(w==="v"&&T===1)continue;if(w=="pr"&&T===1)continue;var F=D[w];F&&(T=F(T));var P=typeof T,A=void 0;w==="ot"||w==="sf"||w==="st"?A=w+"="+T:P==="boolean"?A=w:P==="number"?A=w+"="+T:A=w+"="+JSON.stringify(T),o.push(A)}return o.join(",")},l.toHeaders=function(u){for(var o=Object.keys(u),s={},E=["Object","Request","Session","Status"],b=[{},{},{},{}],p={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},D=0,R=o;D<R.length;D++){var y=R[D],x=p[y]!=null?p[y]:1;b[x][y]=u[y]}for(var w=0;w<b.length;w++){var T=l.serialize(b[w]);T&&(s["CMCD-"+E[w]]=T)}return s},l.toQuery=function(u){return"CMCD="+encodeURIComponent(l.serialize(u))},l.appendQueryToUri=function(u,o){if(!o)return u;var s=u.includes("?")?"&":"?";return""+u+s+o},l}()},"./src/controller/eme-controller.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/events.ts"),v=S("./src/errors.ts"),m=S("./src/utils/logger.ts"),C=S("./src/utils/mediakeys-helper.ts");function _(n,l){for(var f=0;f<l.length;f++){var d=l[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(n,d.key,d)}}function e(n,l,f){return l&&_(n.prototype,l),f&&_(n,f),n}var h=3,r=function(l,f,d){var u={audioCapabilities:[],videoCapabilities:[]};return l.forEach(function(o){u.audioCapabilities.push({contentType:'audio/mp4; codecs="'+o+'"',robustness:d.audioRobustness||""})}),f.forEach(function(o){u.videoCapabilities.push({contentType:'video/mp4; codecs="'+o+'"',robustness:d.videoRobustness||""})}),[u]},c=function(l,f,d,u){switch(l){case C.KeySystems.WIDEVINE:return r(f,d,u);default:throw new Error("Unknown key-system: "+l)}},i=function(){function n(f){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=f,this._config=f.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 l=n.prototype;return l.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},l._registerListeners=function(){this.hls.on(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(k.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(k.Events.MANIFEST_PARSED,this.onManifestParsed,this)},l._unregisterListeners=function(){this.hls.off(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(k.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(k.Events.MANIFEST_PARSED,this.onManifestParsed,this)},l.getLicenseServerUrl=function(d){switch(d){case C.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+d+'"')},l._attemptKeySystemAccess=function(d,u,o){var s=this,E=c(d,u,o,this._drmSystemOptions);m.logger.log("Requesting encrypted media key-system access");var b=this.requestMediaKeySystemAccess(d,E);this.mediaKeysPromise=b.then(function(p){return s._onMediaKeySystemAccessObtained(d,p)}),b.catch(function(p){m.logger.error('Failed to obtain key-system "'+d+'" access:',p)})},l._onMediaKeySystemAccessObtained=function(d,u){var o=this;m.logger.log('Access for key-system "'+d+'" obtained');var s={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:u,mediaKeySystemDomain:d};this._mediaKeysList.push(s);var E=Promise.resolve().then(function(){return u.createMediaKeys()}).then(function(b){return s.mediaKeys=b,m.logger.log('Media-keys created for key-system "'+d+'"'),o._onMediaKeysCreated(),b});return E.catch(function(b){m.logger.error("Failed to create media-keys:",b)}),E},l._onMediaKeysCreated=function(){var d=this;this._mediaKeysList.forEach(function(u){u.mediaKeysSession||(u.mediaKeysSession=u.mediaKeys.createSession(),d._onNewMediaKeySession(u.mediaKeysSession))})},l._onNewMediaKeySession=function(d){var u=this;m.logger.log("New key-system session "+d.sessionId),d.addEventListener("message",function(o){u._onKeySessionMessage(d,o.message)},!1)},l._onKeySessionMessage=function(d,u){m.logger.log("Got EME message event, creating license request"),this._requestLicense(u,function(o){m.logger.log("Received license data (length: "+(o&&o.byteLength)+"), updating key-session"),d.update(o)})},l.onMediaEncrypted=function(d){var u=this;if(m.logger.log('Media is encrypted using "'+d.initDataType+'" init data type'),!this.mediaKeysPromise){m.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var o=function(E){if(!u._media)return;u._attemptSetMediaKeys(E),u._generateRequestWithPreferredKeySession(d.initDataType,d.initData)};this.mediaKeysPromise.then(o).catch(o)},l._attemptSetMediaKeys=function(d){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var u=this._mediaKeysList[0];if(!u||!u.mediaKeys){m.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}m.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(u.mediaKeys),this._hasSetMediaKeys=!0}},l._generateRequestWithPreferredKeySession=function(d,u){var o=this,s=this._mediaKeysList[0];if(!s){m.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(s.mediaKeysSessionInitialized){m.logger.warn("Key-Session already initialized but requested again");return}var E=s.mediaKeysSession;if(!E){m.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!u){m.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}m.logger.log('Generating key-session request for "'+d+'" init data type'),s.mediaKeysSessionInitialized=!0,E.generateRequest(d,u).then(function(){m.logger.debug("Key-session generation succeeded")}).catch(function(b){m.logger.error("Error generating key-session request:",b),o.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},l._createLicenseXhr=function(d,u,o){var s=new XMLHttpRequest;s.responseType="arraybuffer",s.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,s,d,u,o);var E=this._licenseXhrSetup;if(E)try{E.call(this.hls,s,d),E=void 0}catch(b){m.logger.error(b)}try{s.readyState||s.open("POST",d,!0),E&&E.call(this.hls,s,d)}catch(b){throw new Error("issue setting up KeySystem license XHR "+b)}return s},l._onLicenseRequestReadyStageChange=function(d,u,o,s){switch(d.readyState){case 4:if(d.status===200){this._requestLicenseFailureCount=0,m.logger.log("License request succeeded");var E=d.response,b=this._licenseResponseCallback;if(b)try{E=b.call(this.hls,d,u)}catch(D){m.logger.error(D)}s(E)}else{if(m.logger.error("License Request XHR failed ("+u+"). Status: "+d.status+" ("+d.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>h){this.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var p=h-this._requestLicenseFailureCount+1;m.logger.warn("Retrying license request, "+p+" attempts left"),this._requestLicense(o,s)}break}},l._generateLicenseRequestChallenge=function(d,u){switch(d.mediaKeySystemDomain){case C.KeySystems.WIDEVINE:return u}throw new Error("unsupported key-system: "+d.mediaKeySystemDomain)},l._requestLicense=function(d,u){m.logger.log("Requesting content license for key-system");var o=this._mediaKeysList[0];if(!o){m.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var s=this.getLicenseServerUrl(o.mediaKeySystemDomain),E=this._createLicenseXhr(s,d,u);m.logger.log("Sending license request to URL: "+s);var b=this._generateLicenseRequestChallenge(o,d);E.send(b)}catch(p){m.logger.error("Failure requesting DRM license: "+p),this.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},l.onMediaAttached=function(d,u){if(!this._emeEnabled)return;var o=u.media;this._media=o,o.addEventListener("encrypted",this._onMediaEncrypted)},l.onMediaDetached=function(){var d=this._media,u=this._mediaKeysList;if(!d)return;d.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(u.map(function(o){if(o.mediaKeysSession)return o.mediaKeysSession.close().catch(function(){})})).then(function(){return d.setMediaKeys(null)}).catch(function(){})},l.onManifestParsed=function(d,u){if(!this._emeEnabled)return;var o=u.levels.map(function(E){return E.audioCodec}).filter(function(E){return!!E}),s=u.levels.map(function(E){return E.videoCodec}).filter(function(E){return!!E});this._attemptKeySystemAccess(C.KeySystems.WIDEVINE,o,s)},e(n,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),n}();g.default=i},"./src/controller/fps-controller.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/events.ts"),v=S("./src/utils/logger.ts"),m=function(){function C(e){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=e,this.registerListeners()}var _=C.prototype;return _.setStreamController=function(h){this.streamController=h},_.registerListeners=function(){this.hls.on(k.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},_.unregisterListeners=function(){this.hls.off(k.Events.MEDIA_ATTACHING,this.onMediaAttaching)},_.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},_.onMediaAttaching=function(h,r){var c=this.hls.config;if(c.capLevelOnFPSDrop){var i=r.media instanceof self.HTMLVideoElement?r.media:null;this.media=i,i&&typeof i.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),c.fpsDroppedMonitoringPeriod)}},_.checkFPS=function(h,r,c){var i=performance.now();if(r){if(this.lastTime){var n=i-this.lastTime,l=c-this.lastDroppedFrames,f=r-this.lastDecodedFrames,d=1e3*l/n,u=this.hls;if(u.trigger(k.Events.FPS_DROP,{currentDropped:l,currentDecoded:f,totalDroppedFrames:c}),d>0&&l>u.config.fpsDroppedMonitoringThreshold*f){var o=u.currentLevel;v.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+o),o>0&&(u.autoLevelCapping===-1||u.autoLevelCapping>=o)&&(o=o-1,u.trigger(k.Events.FPS_DROP_LEVEL_CAPPING,{level:o,droppedLevel:u.currentLevel}),u.autoLevelCapping=o,this.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=c,this.lastDecodedFrames=r}},_.checkFPSInterval=function(){var h=this.media;if(h)if(this.isVideoPlaybackQualityAvailable){var r=h.getVideoPlaybackQuality();this.checkFPS(h,r.totalVideoFrames,r.droppedVideoFrames)}else this.checkFPS(h,h.webkitDecodedFrameCount,h.webkitDroppedFrameCount)},C}();g.default=m},"./src/controller/fragment-finders.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"findFragmentByPDT",function(){return m}),S.d(g,"findFragmentByPTS",function(){return C}),S.d(g,"fragmentWithinToleranceTest",function(){return _}),S.d(g,"pdtWithinToleranceTest",function(){return e}),S.d(g,"findFragWithCC",function(){return h});var k=S("./src/polyfills/number.ts"),v=S("./src/utils/binary-search.ts");function m(r,c,i){if(c===null||!Array.isArray(r)||!r.length||!Object(k.isFiniteNumber)(c))return null;var n=r[0].programDateTime;if(c<(n||0))return null;var l=r[r.length-1].endProgramDateTime;if(c>=(l||0))return null;i=i||0;for(var f=0;f<r.length;++f){var d=r[f];if(e(c,i,d))return d}return null}function C(r,c,i,n){i===void 0&&(i=0),n===void 0&&(n=0);var l=null;if(r?l=c[r.sn-c[0].sn+1]||null:i===0&&c[0].start===0&&(l=c[0]),l&&_(i,n,l)===0)return l;var f=v.default.search(c,_.bind(null,i,n));return f||l}function _(r,c,i){r===void 0&&(r=0),c===void 0&&(c=0);var n=Math.min(c,i.duration+(i.deltaPTS?i.deltaPTS:0));return i.start+i.duration-n<=r?1:i.start-n>r&&i.start?-1:0}function e(r,c,i){var n=Math.min(c,i.duration+(i.deltaPTS?i.deltaPTS:0))*1e3,l=i.endProgramDateTime||0;return l-n>r}function h(r,c){return v.default.search(r,function(i){return i.cc<c?1:i.cc>c?-1:0})}},"./src/controller/fragment-tracker.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"FragmentState",function(){return m}),S.d(g,"FragmentTracker",function(){return C});var k=S("./src/events.ts"),v=S("./src/types/loader.ts"),m;(function(h){h.NOT_LOADED="NOT_LOADED",h.BACKTRACKED="BACKTRACKED",h.APPENDING="APPENDING",h.PARTIAL="PARTIAL",h.OK="OK"})(m||(m={}));var C=function(){function h(c){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=c,this._registerListeners()}var r=h.prototype;return r._registerListeners=function(){var i=this.hls;i.on(k.Events.BUFFER_APPENDED,this.onBufferAppended,this),i.on(k.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.on(k.Events.FRAG_LOADED,this.onFragLoaded,this)},r._unregisterListeners=function(){var i=this.hls;i.off(k.Events.BUFFER_APPENDED,this.onBufferAppended,this),i.off(k.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.off(k.Events.FRAG_LOADED,this.onFragLoaded,this)},r.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},r.getAppendedFrag=function(i,n){if(n===v.PlaylistLevelType.MAIN){var l=this.activeFragment,f=this.activeParts;if(!l)return null;if(f)for(var d=f.length;d--;){var u=f[d],o=u?u.end:l.appendedPTS;if(u.start<=i&&o!==void 0&&i<=o)return d>9&&(this.activeParts=f.slice(d-9)),u}else if(l.start<=i&&l.appendedPTS!==void 0&&i<=l.appendedPTS)return l}return this.getBufferedFrag(i,n)},r.getBufferedFrag=function(i,n){for(var l=this.fragments,f=Object.keys(l),d=f.length;d--;){var u=l[f[d]];if((u==null?void 0:u.body.type)===n&&u.buffered){var o=u.body;if(o.start<=i&&i<=o.end)return o}}return null},r.detectEvictedFragments=function(i,n,l){var f=this;Object.keys(this.fragments).forEach(function(d){var u=f.fragments[d];if(!u)return;if(!u.buffered){u.body.type===l&&f.removeFragment(u.body);return}var o=u.range[i];if(!o)return;o.time.some(function(s){var E=!f.isTimeBuffered(s.startPTS,s.endPTS,n);return E&&f.removeFragment(u.body),E})})},r.detectPartialFragments=function(i){var n=this,l=this.timeRanges,f=i.frag,d=i.part;if(!l||f.sn==="initSegment")return;var u=e(f),o=this.fragments[u];if(!o)return;Object.keys(l).forEach(function(s){var E=f.elementaryStreams[s];if(!E)return;var b=l[s],p=d!==null||E.partial===!0;o.range[s]=n.getBufferedTimes(f,d,p,b)}),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body)},r.fragBuffered=function(i){var n=e(i),l=this.fragments[n];l&&(l.backtrack=l.loaded=null,l.buffered=!0)},r.getBufferedTimes=function(i,n,l,f){for(var d={time:[],partial:l},u=n?n.start:i.start,o=n?n.end:i.end,s=i.minEndPTS||o,E=i.maxStartPTS||u,b=0;b<f.length;b++){var p=f.start(b)-this.bufferPadding,D=f.end(b)+this.bufferPadding;if(E>=p&&s<=D){d.time.push({startPTS:Math.max(u,f.start(b)),endPTS:Math.min(o,f.end(b))});break}else if(u<D&&o>p)d.partial=!0,d.time.push({startPTS:Math.max(u,f.start(b)),endPTS:Math.min(o,f.end(b))});else if(o<=p)break}return d},r.getPartialFragment=function(i){var n=null,l,f,d,u=0,o=this.bufferPadding,s=this.fragments;return Object.keys(s).forEach(function(E){var b=s[E];if(!b)return;_(b)&&(f=b.body.start-o,d=b.body.end+o,i>=f&&i<=d&&(l=Math.min(i-f,d-i),u<=l&&(n=b.body,u=l)))}),n},r.getState=function(i){var n=e(i),l=this.fragments[n];return l?l.buffered?_(l)?m.PARTIAL:m.OK:l.backtrack?m.BACKTRACKED:m.APPENDING:m.NOT_LOADED},r.backtrack=function(i,n){var l=e(i),f=this.fragments[l];if(!f||f.backtrack)return null;var d=f.backtrack=n||f.loaded;return f.loaded=null,d},r.getBacktrackData=function(i){var n=e(i),l=this.fragments[n];if(l){var f,d=l.backtrack;if(d!=null&&(f=d.payload)!==null&&f!==void 0&&f.byteLength)return d;this.removeFragment(i)}return null},r.isTimeBuffered=function(i,n,l){for(var f,d,u=0;u<l.length;u++){if(f=l.start(u)-this.bufferPadding,d=l.end(u)+this.bufferPadding,i>=f&&n<=d)return!0;if(n<=f)return!1}return!1},r.onFragLoaded=function(i,n){var l=n.frag,f=n.part;if(l.sn==="initSegment"||l.bitrateTest||f)return;var d=e(l);this.fragments[d]={body:l,loaded:n,backtrack:null,buffered:!1,range:Object.create(null)}},r.onBufferAppended=function(i,n){var l=this,f=n.frag,d=n.part,u=n.timeRanges;if(f.type===v.PlaylistLevelType.MAIN)if(this.activeFragment=f,d){var o=this.activeParts;o||(this.activeParts=o=[]),o.push(d)}else this.activeParts=null;this.timeRanges=u,Object.keys(u).forEach(function(s){var E=u[s];if(l.detectEvictedFragments(s,E),!d)for(var b=0;b<E.length;b++)f.appendedPTS=Math.max(E.end(b),f.appendedPTS||0)})},r.onFragBuffered=function(i,n){this.detectPartialFragments(n)},r.hasFragment=function(i){var n=e(i);return!!this.fragments[n]},r.removeFragmentsInRange=function(i,n,l){var f=this;Object.keys(this.fragments).forEach(function(d){var u=f.fragments[d];if(!u)return;if(u.buffered){var o=u.body;o.type===l&&o.start<n&&o.end>i&&f.removeFragment(o)}})},r.removeFragment=function(i){var n=e(i);i.stats.loaded=0,i.clearElementaryStreamInfo(),delete this.fragments[n]},r.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},h}();function _(h){var r,c;return h.buffered&&(((r=h.range.video)===null||r===void 0?void 0:r.partial)||((c=h.range.audio)===null||c===void 0?void 0:c.partial))}function e(h){return h.type+"_"+h.level+"_"+h.urlId+"_"+h.sn}},"./src/controller/gap-controller.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"STALL_MINIMUM_DURATION_MS",function(){return _}),S.d(g,"MAX_START_GAP_JUMP",function(){return e}),S.d(g,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return h}),S.d(g,"SKIP_BUFFER_RANGE_START",function(){return r}),S.d(g,"default",function(){return c});var k=S("./src/utils/buffer-helper.ts"),v=S("./src/errors.ts"),m=S("./src/events.ts"),C=S("./src/utils/logger.ts"),_=250,e=2,h=.1,r=.05,c=function(){function i(l,f,d,u){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=l,this.media=f,this.fragmentTracker=d,this.hls=u}var n=i.prototype;return n.destroy=function(){this.hls=this.fragmentTracker=this.media=null},n.poll=function(f){var d=this.config,u=this.media,o=this.stalled,s=u.currentTime,E=u.seeking,b=this.seeking&&!E,p=!this.seeking&&E;if(this.seeking=E,s!==f){if(this.moved=!0,o!==null){if(this.stallReported){var D=self.performance.now()-o;C.logger.warn("playback not stuck anymore @"+s+", after "+Math.round(D)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((p||b)&&(this.stalled=null),u.paused||u.ended||u.playbackRate===0||!k.BufferHelper.getBuffered(u).length)return;var R=k.BufferHelper.bufferInfo(u,s,0),y=R.len>0,x=R.nextStart||0;if(!y&&!x)return;if(E){var w=R.len>e,T=!x||x-s>e&&!this.fragmentTracker.getPartialFragment(s);if(w||T)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var F,P=Math.max(x,R.start||0)-s,A=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,X=A==null||((F=A.details)===null||F===void 0)?void 0:F.live,z=X?A.details.targetduration*2:e;if(P>0&&P<=z){this._trySkipBufferHole(null);return}}var O=self.performance.now();if(o===null){this.stalled=O;return}var B=O-o;!E&&B>=_&&this._reportStall(R.len);var U=k.BufferHelper.bufferInfo(u,s,d.maxBufferHole);this._tryFixBufferStall(U,B)},n._tryFixBufferStall=function(f,d){var u=this.config,o=this.fragmentTracker,s=this.media,E=s.currentTime,b=o.getPartialFragment(E);if(b){var p=this._trySkipBufferHole(b);if(p)return}f.len>u.maxBufferHole&&d>u.highBufferWatchdogPeriod*1e3&&(C.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},n._reportStall=function(f){var d=this.hls,u=this.media,o=this.stallReported;o||(this.stallReported=!0,C.logger.warn("Playback stalling at @"+u.currentTime+" due to low buffer (buffer="+f+")"),d.trigger(m.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:f}))},n._trySkipBufferHole=function(f){for(var d=this.config,u=this.hls,o=this.media,s=o.currentTime,E=0,b=k.BufferHelper.getBuffered(o),p=0;p<b.length;p++){var D=b.start(p);if(s+d.maxBufferHole>=E&&s<D){var R=Math.max(D+r,o.currentTime+h);return C.logger.warn("skipping hole, adjusting currentTime from "+s+" to "+R),this.moved=!0,this.stalled=null,o.currentTime=R,f&&u.trigger(m.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+s+" to "+R,frag:f}),R}E=b.end(p)}return 0},n._tryNudgeBuffer=function(){var f=this.config,d=this.hls,u=this.media,o=u.currentTime,s=(this.nudgeRetry||0)+1;if(this.nudgeRetry=s,s<f.nudgeMaxRetry){var E=o+s*f.nudgeOffset;C.logger.warn("Nudging 'currentTime' from "+o+" to "+E),u.currentTime=E,d.trigger(m.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else C.logger.error("Playhead still not moving while enough data buffered @"+o+" after "+f.nudgeMaxRetry+" nudges"),d.trigger(m.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},i}()},"./src/controller/id3-track-controller.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/events.ts"),v=S("./src/utils/texttrack-utils.ts"),m=S("./src/demux/id3.ts"),C=.25,_=function(){function e(r){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=r,this._registerListeners()}var h=e.prototype;return h.destroy=function(){this._unregisterListeners()},h._registerListeners=function(){var c=this.hls;c.on(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.on(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(k.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),c.on(k.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},h._unregisterListeners=function(){var c=this.hls;c.off(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.off(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(k.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),c.off(k.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},h.onMediaAttached=function(c,i){this.media=i.media},h.onMediaDetaching=function(){if(!this.id3Track)return;Object(v.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},h.getID3Track=function(c){if(!this.media)return;for(var i=0;i<c.length;i++){var n=c[i];if(n.kind==="metadata"&&n.label==="id3")return Object(v.sendAddTrackEvent)(n,this.media),n}return this.media.addTextTrack("metadata","id3")},h.onFragParsingMetadata=function(c,i){if(!this.media)return;var n=i.frag,l=i.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var f=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,d=0;d<l.length;d++){var u=m.getID3Frames(l[d].data);if(u){var o=l[d].pts,s=d<l.length-1?l[d+1].pts:n.end,E=s-o;E<=0&&(s=o+C);for(var b=0;b<u.length;b++){var p=u[b];if(!m.isTimeStampFrame(p)){var D=new f(o,s,"");D.value=p,this.id3Track.addCue(D)}}}}},h.onBufferFlushing=function(c,i){var n=i.startOffset,l=i.endOffset,f=i.type;if(!f||f==="audio"){var d=this.id3Track;d&&Object(v.removeCuesInRange)(d,n,l)}},e}();g.default=_},"./src/controller/latency-controller.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return e});var k=S("./src/errors.ts"),v=S("./src/events.ts"),m=S("./src/utils/logger.ts");function C(h,r){for(var c=0;c<r.length;c++){var i=r[c];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(h,i.key,i)}}function _(h,r,c){return r&&C(h.prototype,r),c&&C(h,c),h}var e=function(){function h(c){var i=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 i.timeupdate()},this.hls=c,this.config=c.config,this.registerListeners()}var r=h.prototype;return r.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},r.registerListeners=function(){this.hls.on(v.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(v.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(v.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){this.hls.off(v.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(v.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(v.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(v.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(v.Events.ERROR,this.onError)},r.onMediaAttached=function(i,n){this.media=n.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(i,n){var l=n.details;this.levelDetails=l,l.advanced&&this.timeupdate(),!l.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},r.onError=function(i,n){if(n.details!==k.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,m.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},r.timeupdate=function(){var i=this.media,n=this.levelDetails;if(!i||!n)return;this.currentTime=i.currentTime;var l=this.computeLatency();if(l===null)return;this._latency=l;var f=this.config,d=f.lowLatencyMode,u=f.maxLiveSyncPlaybackRate;if(!d||u===1)return;var o=this.targetLatency;if(o===null)return;var s=l-o,E=Math.min(this.maxLatency,o+n.targetduration),b=s<E;if(n.live&&b&&s>.05&&this.forwardBufferLength>1){var p=Math.min(2,Math.max(1,u)),D=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;i.playbackRate=Math.min(p,Math.max(1,D))}else i.playbackRate!==1&&i.playbackRate!==0&&(i.playbackRate=1)},r.estimateLiveEdge=function(){var i=this.levelDetails;return i===null?null:i.edge+i.age},r.computeLatency=function(){var i=this.estimateLiveEdge();return i===null?null:i-this.currentTime},_(h,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var i=this.config,n=this.levelDetails;return i.liveMaxLatencyDuration!==void 0?i.liveMaxLatencyDuration:n?i.liveMaxLatencyDurationCount*n.targetduration:0}},{key:"targetLatency",get:function(){var i=this.levelDetails;if(i===null)return null;var n=i.holdBack,l=i.partHoldBack,f=i.targetduration,d=this.config,u=d.liveSyncDuration,o=d.liveSyncDurationCount,s=d.lowLatencyMode,E=this.hls.userConfig,b=s&&l||n;(E.liveSyncDuration||E.liveSyncDurationCount||b===0)&&(b=u!==void 0?u:o*f);var p=f,D=1;return b+Math.min(this.stallCount*D,p)}},{key:"liveSyncPosition",get:function(){var i=this.estimateLiveEdge(),n=this.targetLatency,l=this.levelDetails;if(i===null||n===null||l===null)return null;var f=l.edge,d=i-n-this.edgeStalled,u=f-l.totalduration,o=f-(this.config.lowLatencyMode&&l.partTarget||l.targetduration);return Math.min(Math.max(u,d),o)}},{key:"drift",get:function(){var i=this.levelDetails;return i===null?1:i.drift}},{key:"edgeStalled",get:function(){var i=this.levelDetails;if(i===null)return 0;var n=(this.config.lowLatencyMode&&i.partTarget||i.targetduration)*3;return Math.max(i.age-n,0)}},{key:"forwardBufferLength",get:function(){var i=this.media,n=this.levelDetails;if(!i||!n)return 0;var l=i.buffered.length;return l?i.buffered.end(l-1):n.edge-this.currentTime}}]),h}()},"./src/controller/level-controller.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return d});var k=S("./src/types/level.ts"),v=S("./src/events.ts"),m=S("./src/errors.ts"),C=S("./src/utils/codecs.ts"),_=S("./src/controller/level-helper.ts"),e=S("./src/controller/base-playlist-controller.ts"),h=S("./src/types/loader.ts");function r(){return r=Object.assign||function(u){for(var o=1;o<arguments.length;o++){var s=arguments[o];for(var E in s)Object.prototype.hasOwnProperty.call(s,E)&&(u[E]=s[E])}return u},r.apply(this,arguments)}function c(u,o){for(var s=0;s<o.length;s++){var E=o[s];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(u,E.key,E)}}function i(u,o,s){return o&&c(u.prototype,o),s&&c(u,s),u}function n(u,o){u.prototype=Object.create(o.prototype),u.prototype.constructor=u,l(u,o)}function l(u,o){return l=Object.setPrototypeOf||function(E,b){return E.__proto__=b,E},l(u,o)}var f=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),d=function(u){n(o,u);function o(E){var b;return b=u.call(this,E,"[level-controller]")||this,b._levels=[],b._firstLevel=-1,b._startLevel=void 0,b.currentLevelIndex=-1,b.manualLevelIndex=-1,b.onParsedComplete=void 0,b._registerListeners(),b}var s=o.prototype;return s._registerListeners=function(){var b=this.hls;b.on(v.Events.MANIFEST_LOADED,this.onManifestLoaded,this),b.on(v.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.on(v.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.on(v.Events.FRAG_LOADED,this.onFragLoaded,this),b.on(v.Events.ERROR,this.onError,this)},s._unregisterListeners=function(){var b=this.hls;b.off(v.Events.MANIFEST_LOADED,this.onManifestLoaded,this),b.off(v.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.off(v.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.off(v.Events.FRAG_LOADED,this.onFragLoaded,this),b.off(v.Events.ERROR,this.onError,this)},s.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,u.prototype.destroy.call(this)},s.startLoad=function(){var b=this._levels;b.forEach(function(p){p.loadError=0}),u.prototype.startLoad.call(this)},s.onManifestLoaded=function(b,p){var D=[],R=[],y=[],x,w={},T,F=!1,P=!1,A=!1;if(p.levels.forEach(function(B){var U=B.attrs;F=F||!!(B.width&&B.height),P=P||!!B.videoCodec,A=A||!!B.audioCodec,f&&B.audioCodec&&B.audioCodec.indexOf("mp4a.40.34")!==-1&&(B.audioCodec=void 0);var L=B.bitrate+"-"+B.attrs.RESOLUTION+"-"+B.attrs.CODECS;T=w[L],T?T.url.push(B.url):(T=new k.Level(B),w[L]=T,D.push(T)),U&&(U.AUDIO&&Object(_.addGroupId)(T,"audio",U.AUDIO),U.SUBTITLES&&Object(_.addGroupId)(T,"text",U.SUBTITLES))}),(F||P)&&A&&(D=D.filter(function(B){var U=B.videoCodec,L=B.width,G=B.height;return!!U||!!(L&&G)})),D=D.filter(function(B){var U=B.audioCodec,L=B.videoCodec;return(!U||Object(C.isCodecSupportedInMp4)(U,"audio"))&&(!L||Object(C.isCodecSupportedInMp4)(L,"video"))}),p.audioTracks&&(R=p.audioTracks.filter(function(B){return!B.audioCodec||Object(C.isCodecSupportedInMp4)(B.audioCodec,"audio")}),Object(_.assignTrackIdsByGroup)(R)),p.subtitles&&(y=p.subtitles,Object(_.assignTrackIdsByGroup)(y)),D.length>0){x=D[0].bitrate,D.sort(function(B,U){return B.bitrate-U.bitrate}),this._levels=D;for(var X=0;X<D.length;X++)if(D[X].bitrate===x){this._firstLevel=X,this.log("manifest loaded, "+D.length+" level(s) found, first bitrate: "+x);break}var z=A&&!P,O={levels:D,audioTracks:R,subtitleTracks:y,firstLevel:this._firstLevel,stats:p.stats,audio:A,video:P,altAudio:!z&&R.some(function(B){return!!B.url})};this.hls.trigger(v.Events.MANIFEST_PARSED,O),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(v.Events.ERROR,{type:m.ErrorTypes.MEDIA_ERROR,details:m.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:p.url,reason:"no level with compatible codecs found in manifest"})},s.onError=function(b,p){if(u.prototype.onError.call(this,b,p),p.fatal)return;var D=p.context,R=this._levels[this.currentLevelIndex];if(D&&(D.type===h.PlaylistContextType.AUDIO_TRACK&&R.audioGroupIds&&D.groupId===R.audioGroupIds[R.urlId]||D.type===h.PlaylistContextType.SUBTITLE_TRACK&&R.textGroupIds&&D.groupId===R.textGroupIds[R.urlId])){this.redundantFailover(this.currentLevelIndex);return}var y=!1,x=!0,w;switch(p.details){case m.ErrorDetails.FRAG_LOAD_ERROR:case m.ErrorDetails.FRAG_LOAD_TIMEOUT:case m.ErrorDetails.KEY_LOAD_ERROR:case m.ErrorDetails.KEY_LOAD_TIMEOUT:if(p.frag){var T=this._levels[p.frag.level];T?(T.fragmentError++,T.fragmentError>this.hls.config.fragLoadingMaxRetry&&(w=p.frag.level)):w=p.frag.level}break;case m.ErrorDetails.LEVEL_LOAD_ERROR:case m.ErrorDetails.LEVEL_LOAD_TIMEOUT:D&&(D.deliveryDirectives&&(x=!1),w=D.level),y=!0;break;case m.ErrorDetails.REMUX_ALLOC_ERROR:w=p.level,y=!0;break}w!==void 0&&this.recoverLevel(p,w,y,x)},s.recoverLevel=function(b,p,D,R){var y=b.details,x=this._levels[p];if(x.loadError++,D){var w=this.retryLoadingOrFail(b);if(w)b.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(R){var T=x.url.length;if(T>1&&x.loadError<T)b.levelRetry=!0,this.redundantFailover(p);else if(this.manualLevelIndex===-1){var F=p===0?this._levels.length-1:p-1;this.currentLevelIndex!==F&&this._levels[F].loadError===0&&(this.warn(y+": switch to "+F),b.levelRetry=!0,this.hls.nextAutoLevel=F)}}},s.redundantFailover=function(b){var p=this._levels[b],D=p.url.length;if(D>1){var R=(p.urlId+1)%D;this.warn("Switching to redundant URL-id "+R),this._levels.forEach(function(y){y.urlId=R}),this.level=b}},s.onFragLoaded=function(b,p){var D=p.frag;if(D!==void 0&&D.type===h.PlaylistLevelType.MAIN){var R=this._levels[D.level];R!==void 0&&(R.fragmentError=0,R.loadError=0)}},s.onLevelLoaded=function(b,p){var D,R=p.level,y=p.details,x=this._levels[R];if(!x){var w;this.warn("Invalid level index "+R),(w=p.deliveryDirectives)!==null&&w!==void 0&&w.skip&&(y.deltaUpdateFailed=!0);return}R===this.currentLevelIndex?(x.fragmentError===0&&(x.loadError=0,this.retryCount=0),this.playlistLoaded(R,p,x.details)):(D=p.deliveryDirectives)!==null&&D!==void 0&&D.skip&&(y.deltaUpdateFailed=!0)},s.onAudioTrackSwitched=function(b,p){var D=this.hls.levels[this.currentLevelIndex];if(!D)return;if(D.audioGroupIds){for(var R=-1,y=this.hls.audioTracks[p.id].groupId,x=0;x<D.audioGroupIds.length;x++)if(D.audioGroupIds[x]===y){R=x;break}R!==D.urlId&&(D.urlId=R,this.startLoad())}},s.loadPlaylist=function(b){var p=this.currentLevelIndex,D=this._levels[p];if(this.canLoad&&D&&D.url.length>0){var R=D.urlId,y=D.url[R];if(b)try{y=b.addDirectives(y)}catch(x){this.warn("Could not construct new URL with HLS Delivery Directives: "+x)}this.log("Attempt loading level index "+p+(b?" at sn "+b.msn+" part "+b.part:"")+" with URL-id "+R+" "+y),this.clearTimer(),this.hls.trigger(v.Events.LEVEL_LOADING,{url:y,level:p,id:R,deliveryDirectives:b||null})}},s.removeLevel=function(b,p){var D=function(x,w){return w!==p},R=this._levels.filter(function(y,x){return x!==b?!0:y.url.length>1&&p!==void 0?(y.url=y.url.filter(D),y.audioGroupIds&&(y.audioGroupIds=y.audioGroupIds.filter(D)),y.textGroupIds&&(y.textGroupIds=y.textGroupIds.filter(D)),y.urlId=0,!0):!1}).map(function(y,x){var w=y.details;return w!=null&&w.fragments&&w.fragments.forEach(function(T){T.level=x}),y});this._levels=R,this.hls.trigger(v.Events.LEVELS_UPDATED,{levels:R})},i(o,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(b){var p,D=this._levels;if(D.length===0)return;if(this.currentLevelIndex===b&&(p=D[b])!==null&&p!==void 0&&p.details)return;if(b<0||b>=D.length){var R=b<0;if(this.hls.trigger(v.Events.ERROR,{type:m.ErrorTypes.OTHER_ERROR,details:m.ErrorDetails.LEVEL_SWITCH_ERROR,level:b,fatal:R,reason:"invalid level idx"}),R)return;b=Math.min(b,D.length-1)}this.clearTimer();var y=this.currentLevelIndex,x=D[y],w=D[b];this.log("switching to level "+b+" from "+y),this.currentLevelIndex=b;var T=r({},w,{level:b,maxBitrate:w.maxBitrate,uri:w.uri,urlId:w.urlId});delete T._urlId,this.hls.trigger(v.Events.LEVEL_SWITCHING,T);var F=w.details;if(!F||F.live){var P=this.switchParams(w.uri,x==null?void 0:x.details);this.loadPlaylist(P)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(b){this.manualLevelIndex=b,this._startLevel===void 0&&(this._startLevel=b),b!==-1&&(this.level=b)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(b){this._firstLevel=b}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var b=this.hls.config.startLevel;return b!==void 0?b:this._firstLevel}else return this._startLevel},set:function(b){this._startLevel=b}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(b){this.level=b,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=b)}}]),o}(e.default)},"./src/controller/level-helper.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"addGroupId",function(){return m}),S.d(g,"assignTrackIdsByGroup",function(){return C}),S.d(g,"updatePTS",function(){return _}),S.d(g,"updateFragPTSDTS",function(){return h}),S.d(g,"mergeDetails",function(){return r}),S.d(g,"mapPartIntersection",function(){return c}),S.d(g,"mapFragmentIntersection",function(){return i}),S.d(g,"adjustSliding",function(){return n}),S.d(g,"addSliding",function(){return l}),S.d(g,"computeReloadInterval",function(){return f}),S.d(g,"getFragmentWithSN",function(){return d}),S.d(g,"getPartWith",function(){return u});var k=S("./src/polyfills/number.ts"),v=S("./src/utils/logger.ts");function m(o,s,E){switch(s){case"audio":o.audioGroupIds||(o.audioGroupIds=[]),o.audioGroupIds.push(E);break;case"text":o.textGroupIds||(o.textGroupIds=[]),o.textGroupIds.push(E);break}}function C(o){var s={};o.forEach(function(E){var b=E.groupId||"";E.id=s[b]=s[b]||0,s[b]++})}function _(o,s,E){var b=o[s],p=o[E];e(b,p)}function e(o,s){var E=s.startPTS;if(Object(k.isFiniteNumber)(E)){var b=0,p;s.sn>o.sn?(b=E-o.start,p=o):(b=o.start-E,p=s),p.duration!==b&&(p.duration=b)}else if(s.sn>o.sn){var D=o.cc===s.cc;D&&o.minEndPTS?s.start=o.start+(o.minEndPTS-o.start):s.start=o.start+o.duration}else s.start=Math.max(o.start-s.duration,0)}function h(o,s,E,b,p,D){var R=b-E;R<=0&&(v.logger.warn("Fragment should have a positive duration",s),b=E+s.duration,D=p+s.duration);var y=E,x=b,w=s.startPTS,T=s.endPTS;if(Object(k.isFiniteNumber)(w)){var F=Math.abs(w-E);Object(k.isFiniteNumber)(s.deltaPTS)?s.deltaPTS=Math.max(F,s.deltaPTS):s.deltaPTS=F,y=Math.max(E,w),E=Math.min(E,w),p=Math.min(p,s.startDTS),x=Math.min(b,T),b=Math.max(b,T),D=Math.max(D,s.endDTS)}s.duration=b-E;var P=E-s.start;s.appendedPTS=b,s.start=s.startPTS=E,s.maxStartPTS=y,s.startDTS=p,s.endPTS=b,s.minEndPTS=x,s.endDTS=D;var A=s.sn;if(!o||A<o.startSN||A>o.endSN)return 0;var X,z=A-o.startSN,O=o.fragments;for(O[z]=s,X=z;X>0;X--)e(O[X],O[X-1]);for(X=z;X<O.length-1;X++)e(O[X],O[X+1]);return o.fragmentHint&&e(O[O.length-1],o.fragmentHint),o.PTSKnown=o.alignedSliding=!0,P}function r(o,s){for(var E=null,b=o.fragments,p=b.length-1;p>=0;p--){var D=b[p].initSegment;if(D){E=D;break}}o.fragmentHint&&delete o.fragmentHint.endPTS;var R=0,y;if(i(o,s,function(X,z){X.relurl&&(R=X.cc-z.cc),Object(k.isFiniteNumber)(X.startPTS)&&Object(k.isFiniteNumber)(X.endPTS)&&(z.start=z.startPTS=X.startPTS,z.startDTS=X.startDTS,z.appendedPTS=X.appendedPTS,z.maxStartPTS=X.maxStartPTS,z.endPTS=X.endPTS,z.endDTS=X.endDTS,z.minEndPTS=X.minEndPTS,z.duration=X.endPTS-X.startPTS,z.duration&&(y=z),s.PTSKnown=s.alignedSliding=!0),z.elementaryStreams=X.elementaryStreams,z.loader=X.loader,z.stats=X.stats,z.urlId=X.urlId,X.initSegment&&(z.initSegment=X.initSegment,E=X.initSegment)}),E){var x=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments;x.forEach(function(X){var z;(!X.initSegment||X.initSegment.relurl===((z=E)===null||z===void 0?void 0:z.relurl))&&(X.initSegment=E)})}if(s.skippedSegments&&(s.deltaUpdateFailed=s.fragments.some(function(X){return!X}),s.deltaUpdateFailed)){v.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var w=s.skippedSegments;w--;)s.fragments.shift();s.startSN=s.fragments[0].sn,s.startCC=s.fragments[0].cc}var T=s.fragments;if(R){v.logger.warn("discontinuity sliding from playlist, take drift into account");for(var F=0;F<T.length;F++)T[F].cc+=R}s.skippedSegments&&(s.startCC=s.fragments[0].cc),c(o.partList,s.partList,function(X,z){z.elementaryStreams=X.elementaryStreams,z.stats=X.stats}),y?h(s,y,y.startPTS,y.endPTS,y.startDTS,y.endDTS):n(o,s),T.length&&(s.totalduration=s.edge-T[0].start),s.driftStartTime=o.driftStartTime,s.driftStart=o.driftStart;var P=s.advancedDateTime;if(s.advanced&&P){var A=s.edge;s.driftStart||(s.driftStartTime=P,s.driftStart=A),s.driftEndTime=P,s.driftEnd=A}else s.driftEndTime=o.driftEndTime,s.driftEnd=o.driftEnd,s.advancedDateTime=o.advancedDateTime}function c(o,s,E){if(o&&s)for(var b=0,p=0,D=o.length;p<=D;p++){var R=o[p],y=s[p+b];R&&y&&R.index===y.index&&R.fragment.sn===y.fragment.sn?E(R,y):b--}}function i(o,s,E){for(var b=s.skippedSegments,p=Math.max(o.startSN,s.startSN)-s.startSN,D=(o.fragmentHint?1:0)+(b?s.endSN:Math.min(o.endSN,s.endSN))-s.startSN,R=s.startSN-o.startSN,y=s.fragmentHint?s.fragments.concat(s.fragmentHint):s.fragments,x=o.fragmentHint?o.fragments.concat(o.fragmentHint):o.fragments,w=p;w<=D;w++){var T=x[R+w],F=y[w];b&&!F&&w<b&&(F=s.fragments[w]=T),T&&F&&E(T,F)}}function n(o,s){var E=s.startSN+s.skippedSegments-o.startSN,b=o.fragments;if(E<0||E>=b.length)return;l(s,b[E].start)}function l(o,s){if(s){for(var E=o.fragments,b=o.skippedSegments;b<E.length;b++)E[b].start+=s;o.fragmentHint&&(o.fragmentHint.start+=s)}}function f(o,s){var E=1e3*o.levelTargetDuration,b=E/2,p=o.age,D=p>0&&p<E*3,R=s.loading.end-s.loading.start,y,x=o.availabilityDelay;if(o.updated===!1)if(D){var w=333*o.misses;y=Math.max(Math.min(b,R*2),w),o.availabilityDelay=(o.availabilityDelay||0)+y}else y=b;else D?(x=Math.min(x||E/2,p),o.availabilityDelay=x,y=x+E-p):y=E-R;return Math.round(y)}function d(o,s,E){if(!o||!o.details)return null;var b=o.details,p=b.fragments[s-b.startSN];return p||(p=b.fragmentHint,p&&p.sn===s?p:s<b.startSN&&E&&E.sn===s?E:null)}function u(o,s,E){if(!o||!o.details)return null;var b=o.details.partList;if(b)for(var p=b.length;p--;){var D=b[p];if(D.index===E&&D.fragment.sn===s)return D}return null}},"./src/controller/stream-controller.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return b});var k=S("./src/polyfills/number.ts"),v=S("./src/controller/base-stream-controller.ts"),m=S("./src/is-supported.ts"),C=S("./src/events.ts"),_=S("./src/utils/buffer-helper.ts"),e=S("./src/controller/fragment-tracker.ts"),h=S("./src/types/loader.ts"),r=S("./src/loader/fragment.ts"),c=S("./src/demux/transmuxer-interface.ts"),i=S("./src/types/transmuxer.ts"),n=S("./src/controller/gap-controller.ts"),l=S("./src/errors.ts"),f=S("./src/utils/logger.ts");function d(p,D){for(var R=0;R<D.length;R++){var y=D[R];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,y.key,y)}}function u(p,D,R){return D&&d(p.prototype,D),R&&d(p,R),p}function o(p,D){p.prototype=Object.create(D.prototype),p.prototype.constructor=p,s(p,D)}function s(p,D){return s=Object.setPrototypeOf||function(y,x){return y.__proto__=x,y},s(p,D)}var E=100,b=function(p){o(D,p);function D(y,x){var w;return w=p.call(this,y,x,"[stream-controller]")||this,w.audioCodecSwap=!1,w.gapController=null,w.level=-1,w._forceStartLoad=!1,w.altAudio=!1,w.audioOnly=!1,w.fragPlaying=null,w.onvplaying=null,w.onvseeked=null,w.fragLastKbps=0,w.stalled=!1,w.couldBacktrack=!1,w.audioCodecSwitch=!1,w.videoBuffer=null,w._registerListeners(),w}var R=D.prototype;return R._registerListeners=function(){var x=this.hls;x.on(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.on(C.Events.LEVEL_LOADING,this.onLevelLoading,this),x.on(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(C.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.on(C.Events.ERROR,this.onError,this),x.on(C.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.on(C.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.on(C.Events.BUFFER_CREATED,this.onBufferCreated,this),x.on(C.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.on(C.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.on(C.Events.FRAG_BUFFERED,this.onFragBuffered,this)},R._unregisterListeners=function(){var x=this.hls;x.off(C.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(C.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(C.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(C.Events.MANIFEST_PARSED,this.onManifestParsed,this),x.off(C.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(C.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),x.off(C.Events.ERROR,this.onError,this),x.off(C.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),x.off(C.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),x.off(C.Events.BUFFER_CREATED,this.onBufferCreated,this),x.off(C.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),x.off(C.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),x.off(C.Events.FRAG_BUFFERED,this.onFragBuffered,this)},R.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},R.startLoad=function(x){if(this.levels){var w=this.lastCurrentTime,T=this.hls;if(this.stopLoad(),this.setInterval(E),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var F=T.startLevel;F===-1&&(T.config.testBandwidth?(F=0,this.bitrateTest=!0):F=T.nextAutoLevel),this.level=T.nextLoadLevel=F,this.loadedmetadata=!1}w>0&&x===-1&&(this.log("Override startPosition with lastCurrentTime @"+w.toFixed(3)),x=w),this.state=v.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=x,this.tick()}else this._forceStartLoad=!0,this.state=v.State.STOPPED},R.stopLoad=function(){this._forceStartLoad=!1,p.prototype.stopLoad.call(this)},R.doTick=function(){switch(this.state){case v.State.IDLE:this.doTickIdle();break;case v.State.WAITING_LEVEL:{var x,w=this.levels,T=this.level,F=w==null||((x=w[T])===null||x===void 0)?void 0:x.details;if(F&&(!F.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(F))break;this.state=v.State.IDLE;break}break}case v.State.FRAG_LOADING_WAITING_RETRY:{var P,A=self.performance.now(),X=this.retryDate;(!X||A>=X||(P=this.media)!==null&&P!==void 0&&P.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=v.State.IDLE)}break;default:break}this.onTickEnd()},R.onTickEnd=function(){p.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},R.doTickIdle=function(){var x,w,T=this.hls,F=this.levelLastLoaded,P=this.levels,A=this.media,X=T.config,z=T.nextLoadLevel;if(F===null||!A&&(this.startFragRequested||!X.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!P||!P[z])return;var O=P[z];this.level=T.nextLoadLevel=z;var B=O.details;if(!B||this.state===v.State.WAITING_LEVEL||B.live&&this.levelLastLoaded!==z){this.state=v.State.WAITING_LEVEL;return}var U=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:A,h.PlaylistLevelType.MAIN);if(U===null)return;var L=U.len,G=this.getMaxBufferLength(O.maxBitrate);if(L>=G)return;if(this._streamEnded(U,B)){var ee={};this.altAudio&&(ee.type="video"),this.hls.trigger(C.Events.BUFFER_EOS,ee),this.state=v.State.ENDED;return}var oe=U.end,ae=this.getNextFragment(oe,B);if(this.couldBacktrack&&!this.fragPrevious&&ae&&ae.sn!=="initSegment"){var be=ae.sn-B.startSN;be>1&&(ae=B.fragments[be-1],this.fragmentTracker.removeFragment(ae))}if(ae&&this.fragmentTracker.getState(ae)===e.FragmentState.OK&&this.nextLoadPosition>oe){var _e=this.audioOnly&&!this.altAudio?r.ElementaryStreamTypes.AUDIO:r.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(A,_e,h.PlaylistLevelType.MAIN),ae=this.getNextFragment(this.nextLoadPosition,B)}if(!ae)return;ae.initSegment&&!ae.initSegment.data&&!this.bitrateTest&&(ae=ae.initSegment),((x=ae.decryptdata)===null||x===void 0?void 0:x.keyFormat)==="identity"&&!((w=ae.decryptdata)!==null&&w!==void 0&&w.key)?this.loadKey(ae,B):this.loadFragment(ae,B,oe)},R.loadFragment=function(x,w,T){var F,P=this.fragmentTracker.getState(x);if(this.fragCurrent=x,P===e.FragmentState.BACKTRACKED){var A=this.fragmentTracker.getBacktrackData(x);if(A){this._handleFragmentLoadProgress(A),this._handleFragmentLoadComplete(A);return}else P=e.FragmentState.NOT_LOADED}P===e.FragmentState.NOT_LOADED||P===e.FragmentState.PARTIAL?x.sn==="initSegment"?this._loadInitSegment(x):this.bitrateTest?(x.bitrateTest=!0,this.log("Fragment "+x.sn+" of level "+x.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(x)):(this.startFragRequested=!0,p.prototype.loadFragment.call(this,x,w,T)):P===e.FragmentState.APPENDING?this.reduceMaxBufferLength(x.duration)&&this.fragmentTracker.removeFragment(x):((F=this.media)===null||F===void 0?void 0:F.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},R.getAppendedFrag=function(x){var w=this.fragmentTracker.getAppendedFrag(x,h.PlaylistLevelType.MAIN);return w&&"fragment"in w?w.fragment:w},R.getBufferedFrag=function(x){return this.fragmentTracker.getBufferedFrag(x,h.PlaylistLevelType.MAIN)},R.followingBufferedFrag=function(x){return x?this.getBufferedFrag(x.end+.5):null},R.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},R.nextLevelSwitch=function(){var x=this.levels,w=this.media;if(w!=null&&w.readyState){var T,F=this.getAppendedFrag(w.currentTime);if(F&&F.start>1&&this.flushMainBuffer(0,F.start-1),!w.paused&&x){var P=this.hls.nextLoadLevel,A=x[P],X=this.fragLastKbps;X&&this.fragCurrent?T=this.fragCurrent.duration*A.maxBitrate/(1e3*X)+1:T=0}else T=0;var z=this.getBufferedFrag(w.currentTime+T);if(z){var O=this.followingBufferedFrag(z);if(O){this.abortCurrentFrag();var B=O.maxStartPTS?O.maxStartPTS:O.start,U=O.duration,L=Math.max(z.end,B+Math.min(Math.max(U-this.config.maxFragLookUpTolerance,U*.5),U*.75));this.flushMainBuffer(L,Number.POSITIVE_INFINITY)}}}},R.abortCurrentFrag=function(){var x=this.fragCurrent;this.fragCurrent=null,x!=null&&x.loader&&x.loader.abort(),this.state===v.State.KEY_LOADING&&(this.state=v.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},R.flushMainBuffer=function(x,w){p.prototype.flushMainBuffer.call(this,x,w,this.altAudio?"video":null)},R.onMediaAttached=function(x,w){p.prototype.onMediaAttached.call(this,x,w);var T=w.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),T.addEventListener("playing",this.onvplaying),T.addEventListener("seeked",this.onvseeked),this.gapController=new n.default(this.config,T,this.fragmentTracker,this.hls)},R.onMediaDetaching=function(){var x=this.media;x&&(x.removeEventListener("playing",this.onvplaying),x.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),p.prototype.onMediaDetaching.call(this)},R.onMediaPlaying=function(){this.tick()},R.onMediaSeeked=function(){var x=this.media,w=x?x.currentTime:null;Object(k.isFiniteNumber)(w)&&this.log("Media seeked to "+w.toFixed(3)),this.tick()},R.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(C.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},R.onManifestParsed=function(x,w){var T=!1,F=!1,P;w.levels.forEach(function(A){P=A.audioCodec,P&&(P.indexOf("mp4a.40.2")!==-1&&(T=!0),P.indexOf("mp4a.40.5")!==-1&&(F=!0))}),this.audioCodecSwitch=T&&F&&!Object(m.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=w.levels,this.startFragRequested=!1},R.onLevelLoading=function(x,w){var T=this.levels;if(!T||this.state!==v.State.IDLE)return;var F=T[w.level];(!F.details||F.details.live&&this.levelLastLoaded!==w.level||this.waitForCdnTuneIn(F.details))&&(this.state=v.State.WAITING_LEVEL)},R.onLevelLoaded=function(x,w){var T,F=this.levels,P=w.level,A=w.details,X=A.totalduration;if(!F){this.warn("Levels were reset while loading level "+P);return}this.log("Level "+P+" loaded ["+A.startSN+","+A.endSN+"], cc ["+A.startCC+", "+A.endCC+"] duration:"+X);var z=this.fragCurrent;z&&(this.state===v.State.FRAG_LOADING||this.state===v.State.FRAG_LOADING_WAITING_RETRY)&&(z.level!==w.level&&z.loader&&(this.state=v.State.IDLE,z.loader.abort()));var O=F[P],B=0;if(A.live||(T=O.details)!==null&&T!==void 0&&T.live){if(A.fragments[0]||(A.deltaUpdateFailed=!0),A.deltaUpdateFailed)return;B=this.alignPlaylists(A,O.details)}if(O.details=A,this.levelLastLoaded=P,this.hls.trigger(C.Events.LEVEL_UPDATED,{details:A,level:P}),this.state===v.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(A))return;this.state=v.State.IDLE}this.startFragRequested?A.live&&this.synchronizeToLiveEdge(A):this.setStartPosition(A,B),this.tick()},R._handleFragmentLoadProgress=function(x){var w,T=x.frag,F=x.part,P=x.payload,A=this.levels;if(!A){this.warn("Levels were reset while fragment load was in progress. Fragment "+T.sn+" of level "+T.level+" will not be buffered");return}var X=A[T.level],z=X.details;if(!z){this.warn("Dropping fragment "+T.sn+" of level "+T.level+" after level details were reset");return}var O=X.videoCodec,B=z.PTSKnown||!z.live,U=(w=T.initSegment)===null||w===void 0?void 0:w.data,L=this._getAudioCodec(X),G=this.transmuxer=this.transmuxer||new c.default(this.hls,h.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ee=F?F.index:-1,oe=ee!==-1,ae=new i.ChunkMetadata(T.level,T.sn,T.stats.chunkCount,P.byteLength,ee,oe),be=this.initPTS[T.cc];G.push(P,U,L,O,T,F,z.totalduration,B,ae,be)},R.onAudioTrackSwitching=function(x,w){var T=this.altAudio,F=!!w.url,P=w.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 A=this.fragCurrent;A!=null&&A.loader&&(this.log("Switching to main audio track, cancel main fragment load"),A.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var X=this.hls;T&&X.trigger(C.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),X.trigger(C.Events.AUDIO_TRACK_SWITCHED,{id:P})}},R.onAudioTrackSwitched=function(x,w){var T=w.id,F=!!this.hls.audioTracks[T].url;if(F){var P=this.videoBuffer;P&&this.mediaBuffer!==P&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=P)}this.altAudio=F,this.tick()},R.onBufferCreated=function(x,w){var T=w.tracks,F,P,A=!1;for(var X in T){var z=T[X];if(z.id==="main"){if(P=X,F=z,X==="video"){var O=T[X];O&&(this.videoBuffer=O.buffer)}}else A=!0}A&&F?(this.log("Alternate track found, use "+P+".buffered to schedule main fragment loading"),this.mediaBuffer=F.buffer):this.mediaBuffer=this.media},R.onFragBuffered=function(x,w){var T=w.frag,F=w.part;if(T&&T.type!==h.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(T)){this.warn("Fragment "+T.sn+(F?" p: "+F.index:"")+" of level "+T.level+" finished buffering, but was aborted. state: "+this.state),this.state===v.State.PARSED&&(this.state=v.State.IDLE);return}var P=F?F.stats:T.stats;this.fragLastKbps=Math.round(8*P.total/(P.buffering.end-P.loading.first)),T.sn!=="initSegment"&&(this.fragPrevious=T),this.fragBufferedComplete(T,F)},R.onError=function(x,w){switch(w.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(h.PlaylistLevelType.MAIN,w);break;case l.ErrorDetails.LEVEL_LOAD_ERROR:case l.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==v.State.ERROR&&(w.fatal?(this.warn(""+w.details),this.state=v.State.ERROR):!w.levelRetry&&this.state===v.State.WAITING_LEVEL&&(this.state=v.State.IDLE));break;case l.ErrorDetails.BUFFER_FULL_ERROR:if(w.parent==="main"&&(this.state===v.State.PARSING||this.state===v.State.PARSED)){var T=!0,F=this.getFwdBufferInfo(this.media,h.PlaylistLevelType.MAIN);F&&F.len>.5&&(T=!this.reduceMaxBufferLength(F.len)),T&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},R.checkBuffer=function(){var x=this.media,w=this.gapController;if(!x||!w||!x.readyState)return;var T=_.BufferHelper.getBuffered(x);!this.loadedmetadata&&T.length?(this.loadedmetadata=!0,this.seekToStartPos()):w.poll(this.lastCurrentTime),this.lastCurrentTime=x.currentTime},R.onFragLoadEmergencyAborted=function(){this.state=v.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},R.onBufferFlushed=function(x,w){var T=w.type;if(T!==r.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var F=(T===r.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(F,T,h.PlaylistLevelType.MAIN)}},R.onLevelsUpdated=function(x,w){this.levels=w.levels},R.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},R.seekToStartPos=function(){var x=this.media,w=x.currentTime,T=this.startPosition;if(T>=0&&w<T){if(x.seeking){f.logger.log("could not seek to "+T+", already seeking at "+w);return}var F=_.BufferHelper.getBuffered(x),P=F.length?F.start(0):0,A=P-T;A>0&&(A<this.config.maxBufferHole||A<this.config.maxFragLookUpTolerance)&&(f.logger.log("adjusting start position by "+A+" to match buffer start"),T+=A,this.startPosition=T),this.log("seek to target start position "+T+" from current time "+w),x.currentTime=T}},R._getAudioCodec=function(x){var w=this.config.defaultAudioCodec||x.audioCodec;return this.audioCodecSwap&&w&&(this.log("Swapping audio codec"),w.indexOf("mp4a.40.5")!==-1?w="mp4a.40.2":w="mp4a.40.5"),w},R._loadBitrateTestFrag=function(x){var w=this;this._doFragLoad(x).then(function(T){var F=w.hls;if(!T||F.nextLoadLevel||w.fragContextChanged(x))return;w.fragLoadError=0,w.state=v.State.IDLE,w.startFragRequested=!1,w.bitrateTest=!1;var P=x.stats;P.parsing.start=P.parsing.end=P.buffering.start=P.buffering.end=self.performance.now(),F.trigger(C.Events.FRAG_LOADED,T)})},R._handleTransmuxComplete=function(x){var w,T="main",F=this.hls,P=x.remuxResult,A=x.chunkMeta,X=this.getCurrentContext(A);if(!X){this.warn("The loading context changed while buffering fragment "+A.sn+" of level "+A.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(A.level);return}var z=X.frag,O=X.part,B=X.level,U=P.video,L=P.text,G=P.id3,ee=P.initSegment,oe=this.altAudio?void 0:P.audio;if(this.fragContextChanged(z))return;if(this.state=v.State.PARSING,ee){ee.tracks&&(this._bufferInitSegment(B,ee.tracks,z,A),F.trigger(C.Events.FRAG_PARSING_INIT_SEGMENT,{frag:z,id:T,tracks:ee.tracks}));var ae=ee.initPTS,be=ee.timescale;Object(k.isFiniteNumber)(ae)&&(this.initPTS[z.cc]=ae,F.trigger(C.Events.INIT_PTS_FOUND,{frag:z,id:T,initPTS:ae,timescale:be}))}if(U&&P.independent!==!1){if(B.details){var _e=U.startPTS,fe=U.endPTS,Re=U.startDTS,Oe=U.endDTS;if(O)O.elementaryStreams[U.type]={startPTS:_e,endPTS:fe,startDTS:Re,endDTS:Oe};else if(U.firstKeyFrame&&U.independent&&(this.couldBacktrack=!0),U.dropped&&U.independent){var de=this.getLoadPosition()+this.config.maxBufferHole;if(de<_e){this.backtrack(z);return}z.setElementaryStreamInfo(U.type,z.start,fe,z.start,Oe,!0)}z.setElementaryStreamInfo(U.type,_e,fe,Re,Oe),this.bufferFragmentData(U,z,O,A)}}else if(P.independent===!1){this.backtrack(z);return}if(oe){var te=oe.startPTS,W=oe.endPTS,Y=oe.startDTS,V=oe.endDTS;O&&(O.elementaryStreams[r.ElementaryStreamTypes.AUDIO]={startPTS:te,endPTS:W,startDTS:Y,endDTS:V}),z.setElementaryStreamInfo(r.ElementaryStreamTypes.AUDIO,te,W,Y,V),this.bufferFragmentData(oe,z,O,A)}if(G!=null&&(w=G.samples)!==null&&w!==void 0&&w.length){var Q={frag:z,id:T,samples:G.samples};F.trigger(C.Events.FRAG_PARSING_METADATA,Q)}if(L){var q={frag:z,id:T,samples:L.samples};F.trigger(C.Events.FRAG_PARSING_USERDATA,q)}},R._bufferInitSegment=function(x,w,T,F){var P=this;if(this.state!==v.State.PARSING)return;this.audioOnly=!!w.audio&&!w.video,this.altAudio&&!this.audioOnly&&delete w.audio;var A=w.audio,X=w.video,z=w.audiovideo;if(A){var O=x.audioCodec,B=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(O&&(O.indexOf("mp4a.40.5")!==-1?O="mp4a.40.2":O="mp4a.40.5"),A.metadata.channelCount!==1&&B.indexOf("firefox")===-1&&(O="mp4a.40.5")),B.indexOf("android")!==-1&&A.container!=="audio/mpeg"&&(O="mp4a.40.2",this.log("Android: force audio codec to "+O)),x.audioCodec&&x.audioCodec!==O&&this.log('Swapping manifest audio codec "'+x.audioCodec+'" for "'+O+'"'),A.levelCodec=O,A.id="main",this.log("Init audio buffer, container:"+A.container+", codecs[selected/level/parsed]=["+(O||"")+"/"+(x.audioCodec||"")+"/"+A.codec+"]")}X&&(X.levelCodec=x.videoCodec,X.id="main",this.log("Init video buffer, container:"+X.container+", codecs[level/parsed]=["+(x.videoCodec||"")+"/"+X.codec+"]")),z&&this.log("Init audiovideo buffer, container:"+z.container+", codecs[level/parsed]=["+(x.attrs.CODECS||"")+"/"+z.codec+"]"),this.hls.trigger(C.Events.BUFFER_CODECS,w),Object.keys(w).forEach(function(U){var L=w[U],G=L.initSegment;G!=null&&G.byteLength&&P.hls.trigger(C.Events.BUFFER_APPENDING,{type:U,data:G,frag:T,part:null,chunkMeta:F,parent:T.type})}),this.tick()},R.backtrack=function(x){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(x);var w=this.fragmentTracker.backtrack(x);this.fragPrevious=null,this.nextLoadPosition=x.start,w?this.resetFragmentLoading(x):this.state=v.State.BACKTRACKING},R.checkFragmentChanged=function(){var x=this.media,w=null;if(x&&x.readyState>1&&x.seeking===!1){var T=x.currentTime;if(_.BufferHelper.isBuffered(x,T)?w=this.getAppendedFrag(T):_.BufferHelper.isBuffered(x,T+.1)&&(w=this.getAppendedFrag(T+.1)),w){var F=this.fragPlaying,P=w.level;(!F||w.sn!==F.sn||F.level!==P||w.urlId!==F.urlId)&&(this.hls.trigger(C.Events.FRAG_CHANGED,{frag:w}),(!F||F.level!==P)&&this.hls.trigger(C.Events.LEVEL_SWITCHED,{level:P}),this.fragPlaying=w)}}},u(D,[{key:"nextLevel",get:function(){var x=this.nextBufferedFrag;return x?x.level:-1}},{key:"currentLevel",get:function(){var x=this.media;if(x){var w=this.getAppendedFrag(x.currentTime);if(w)return w.level}return-1}},{key:"nextBufferedFrag",get:function(){var x=this.media;if(x){var w=this.getAppendedFrag(x.currentTime);return this.followingBufferedFrag(w)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),D}(v.default)},"./src/controller/subtitle-stream-controller.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"SubtitleStreamController",function(){return o});var k=S("./src/events.ts"),v=S("./src/utils/logger.ts"),m=S("./src/utils/buffer-helper.ts"),C=S("./src/controller/fragment-finders.ts"),_=S("./src/utils/discontinuities.ts"),e=S("./src/controller/level-helper.ts"),h=S("./src/controller/fragment-tracker.ts"),r=S("./src/controller/base-stream-controller.ts"),c=S("./src/types/loader.ts"),i=S("./src/types/level.ts");function n(s,E){for(var b=0;b<E.length;b++){var p=E[b];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(s,p.key,p)}}function l(s,E,b){return E&&n(s.prototype,E),b&&n(s,b),s}function f(s,E){s.prototype=Object.create(E.prototype),s.prototype.constructor=s,d(s,E)}function d(s,E){return d=Object.setPrototypeOf||function(p,D){return p.__proto__=D,p},d(s,E)}var u=500,o=function(s){f(E,s);function E(p,D){var R;return R=s.call(this,p,D,"[subtitle-stream-controller]")||this,R.levels=[],R.currentTrackId=-1,R.tracksBuffered=[],R.mainDetails=null,R._registerListeners(),R}var b=E.prototype;return b.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},b._registerListeners=function(){var D=this.hls;D.on(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),D.on(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),D.on(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),D.on(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),D.on(k.Events.ERROR,this.onError,this),D.on(k.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),D.on(k.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),D.on(k.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),D.on(k.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),D.on(k.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b._unregisterListeners=function(){var D=this.hls;D.off(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),D.off(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),D.off(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),D.off(k.Events.LEVEL_LOADED,this.onLevelLoaded,this),D.off(k.Events.ERROR,this.onError,this),D.off(k.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),D.off(k.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),D.off(k.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),D.off(k.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),D.off(k.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b.startLoad=function(){this.stopLoad(),this.state=r.State.IDLE,this.setInterval(u),this.tick()},b.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},b.onLevelLoaded=function(D,R){this.mainDetails=R.details},b.onSubtitleFragProcessed=function(D,R){var y=R.frag,x=R.success;if(this.fragPrevious=y,this.state=r.State.IDLE,!x)return;var w=this.tracksBuffered[this.currentTrackId];if(!w)return;for(var T,F=y.start,P=0;P<w.length;P++)if(F>=w[P].start&&F<=w[P].end){T=w[P];break}var A=y.start+y.duration;T?T.end=A:(T={start:F,end:A},w.push(T)),this.fragmentTracker.fragBuffered(y)},b.onBufferFlushing=function(D,R){var y=R.startOffset,x=R.endOffset;if(y===0&&x!==Number.POSITIVE_INFINITY){var w=this.currentTrackId,T=this.levels;if(!T.length||!T[w]||!T[w].details)return;var F=T[w].details,P=F.targetduration,A=x-P;if(A<=0)return;R.endOffsetSubtitles=Math.max(0,A),this.tracksBuffered.forEach(function(X){for(var z=0;z<X.length;){if(X[z].end<=A){X.shift();continue}else if(X[z].start<A)X[z].start=A;else break;z++}}),this.fragmentTracker.removeFragmentsInRange(y,A,c.PlaylistLevelType.SUBTITLE)}},b.onError=function(D,R){var y,x=R.frag;if(!x||x.type!==c.PlaylistLevelType.SUBTITLE)return;(y=this.fragCurrent)!==null&&y!==void 0&&y.loader&&this.fragCurrent.loader.abort(),this.state=r.State.IDLE},b.onSubtitleTracksUpdated=function(D,R){var y=this,x=R.subtitleTracks;this.tracksBuffered=[],this.levels=x.map(function(w){return new i.Level(w)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(w){y.tracksBuffered[w.id]=[]}),this.mediaBuffer=null},b.onSubtitleTrackSwitch=function(D,R){if(this.currentTrackId=R.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var y=this.levels[this.currentTrackId];y!=null&&y.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,y&&this.setInterval(u)},b.onSubtitleTrackLoaded=function(D,R){var y,x=R.details,w=R.id,T=this.currentTrackId,F=this.levels;if(!F.length)return;var P=F[T];if(w>=F.length||w!==T||!P)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,x.live||(y=P.details)!==null&&y!==void 0&&y.live){var A=this.mainDetails;if(x.deltaUpdateFailed||!A)return;var X=A.fragments[0];if(!P.details)x.hasProgramDateTime&&A.hasProgramDateTime?Object(_.alignMediaPlaylistByPDT)(x,A):X&&Object(e.addSliding)(x,X.start);else{var z=this.alignPlaylists(x,P.details);z===0&&X&&Object(e.addSliding)(x,X.start)}}if(P.details=x,this.levelLastLoaded=w,this.tick(),x.live&&!this.fragCurrent&&this.media&&this.state===r.State.IDLE){var O=Object(C.findFragmentByPTS)(null,x.fragments,this.media.currentTime,0);O||(this.warn("Subtitle playlist not aligned with playback"),P.details=void 0)}},b._handleFragmentLoadComplete=function(D){var R=D.frag,y=D.payload,x=R.decryptdata,w=this.hls;if(this.fragContextChanged(R))return;if(y&&y.byteLength>0&&x&&x.key&&x.iv&&x.method==="AES-128"){var T=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(y),x.key.buffer,x.iv.buffer).then(function(F){var P=performance.now();w.trigger(k.Events.FRAG_DECRYPTED,{frag:R,payload:F,stats:{tstart:T,tdecrypt:P}})})}},b.doTick=function(){if(!this.media){this.state=r.State.IDLE;return}if(this.state===r.State.IDLE){var D,R=this.currentTrackId,y=this.levels;if(!y.length||!y[R]||!y[R].details)return;var x=y[R].details,w=x.targetduration,T=this.config,F=this.media,P=m.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,F.currentTime-w,T.maxBufferHole),A=P.end,X=P.len,z=this.getMaxBufferLength()+w;if(X>z)return;console.assert(x,"Subtitle track details are defined on idle subtitle stream controller tick");var O=x.fragments,B=O.length,U=x.edge,L,G=this.fragPrevious;if(A<U){var ee=T.maxFragLookUpTolerance;G&&x.hasProgramDateTime&&(L=Object(C.findFragmentByPDT)(O,G.endProgramDateTime,ee)),L||(L=Object(C.findFragmentByPTS)(G,O,A,ee),!L&&G&&G.start<O[0].start&&(L=O[0]))}else L=O[B-1];(D=L)!==null&&D!==void 0&&D.encrypted?(v.logger.log("Loading key for "+L.sn),this.state=r.State.KEY_LOADING,this.hls.trigger(k.Events.KEY_LOADING,{frag:L})):L&&this.fragmentTracker.getState(L)===h.FragmentState.NOT_LOADED&&this.loadFragment(L,x,A)}},b.loadFragment=function(D,R,y){this.fragCurrent=D,s.prototype.loadFragment.call(this,D,R,y)},l(E,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),E}(r.default)},"./src/controller/subtitle-track-controller.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/events.ts"),v=S("./src/utils/texttrack-utils.ts"),m=S("./src/controller/base-playlist-controller.ts"),C=S("./src/types/loader.ts");function _(n,l){for(var f=0;f<l.length;f++){var d=l[f];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(n,d.key,d)}}function e(n,l,f){return l&&_(n.prototype,l),f&&_(n,f),n}function h(n,l){n.prototype=Object.create(l.prototype),n.prototype.constructor=n,r(n,l)}function r(n,l){return r=Object.setPrototypeOf||function(d,u){return d.__proto__=u,d},r(n,l)}var c=function(n){h(l,n);function l(d){var u;return u=n.call(this,d,"[subtitle-track-controller]")||this,u.media=null,u.tracks=[],u.groupId=null,u.tracksInGroup=[],u.trackId=-1,u.selectDefaultTrack=!0,u.queuedDefaultTrack=-1,u.trackChangeListener=function(){return u.onTextTracksChanged()},u.asyncPollTrackChange=function(){return u.pollTrackChange(0)},u.useTextTrackPolling=!1,u.subtitlePollingInterval=-1,u.subtitleDisplay=!0,u.registerListeners(),u}var f=l.prototype;return f.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,n.prototype.destroy.call(this)},f.registerListeners=function(){var u=this.hls;u.on(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(k.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(k.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(k.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.on(k.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),u.on(k.Events.ERROR,this.onError,this)},f.unregisterListeners=function(){var u=this.hls;u.off(k.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(k.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(k.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(k.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(k.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(k.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.off(k.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),u.off(k.Events.ERROR,this.onError,this)},f.onMediaAttached=function(u,o){if(this.media=o.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)},f.pollTrackChange=function(u){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,u)},f.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 u=i(this.media.textTracks);u.forEach(function(o){Object(v.clearCurrentCues)(o)}),this.subtitleTrack=-1,this.media=null},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(u,o){this.tracks=o.subtitleTracks},f.onSubtitleTrackLoaded=function(u,o){var s=o.id,E=o.details,b=this.trackId,p=this.tracksInGroup[b];if(!p){this.warn("Invalid subtitle track id "+s);return}var D=p.details;p.details=o.details,this.log("subtitle track "+s+" loaded ["+E.startSN+"-"+E.endSN+"]"),s===this.trackId&&(this.retryCount=0,this.playlistLoaded(s,o,D))},f.onLevelLoading=function(u,o){this.switchLevel(o.level)},f.onLevelSwitching=function(u,o){this.switchLevel(o.level)},f.switchLevel=function(u){var o=this.hls.levels[u];if(!(o!=null&&o.textGroupIds))return;var s=o.textGroupIds[o.urlId];if(this.groupId!==s){var E=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,b=this.tracks.filter(function(R){return!s||R.groupId===s});this.tracksInGroup=b;var p=this.findTrackId(E==null?void 0:E.name)||this.findTrackId();this.groupId=s;var D={subtitleTracks:b};this.log("Updating subtitle tracks, "+b.length+' track(s) found in "'+s+'" group-id'),this.hls.trigger(k.Events.SUBTITLE_TRACKS_UPDATED,D),p!==-1&&this.setSubtitleTrack(p,E)}},f.findTrackId=function(u){for(var o=this.tracksInGroup,s=0;s<o.length;s++){var E=o[s];if((!this.selectDefaultTrack||E.default)&&(!u||u===E.name))return E.id}return-1},f.onError=function(u,o){if(n.prototype.onError.call(this,u,o),o.fatal||!o.context)return;o.context.type===C.PlaylistContextType.SUBTITLE_TRACK&&o.context.id===this.trackId&&o.context.groupId===this.groupId&&this.retryLoadingOrFail(o)},f.loadPlaylist=function(u){var o=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(o)){var s=o.id,E=o.groupId,b=o.url;if(u)try{b=u.addDirectives(b)}catch(p){this.warn("Could not construct new URL with HLS Delivery Directives: "+p)}this.log("Loading subtitle playlist for id "+s),this.hls.trigger(k.Events.SUBTITLE_TRACK_LOADING,{url:b,id:s,groupId:E,deliveryDirectives:u||null})}},f.toggleTrackModes=function(u){var o=this,s=this.media,E=this.subtitleDisplay,b=this.trackId;if(!s)return;var p=i(s.textTracks),D=p.filter(function(x){return x.groupId===o.groupId});if(u===-1)[].slice.call(p).forEach(function(x){x.mode="disabled"});else{var R=D[b];R&&(R.mode="disabled")}var y=D[u];y&&(y.mode=E?"showing":"hidden")},f.setSubtitleTrack=function(u,o){var s,E=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=u;return}if(this.trackId!==u&&this.toggleTrackModes(u),this.trackId===u&&(u===-1||(s=E[u])!==null&&s!==void 0&&s.details)||u<-1||u>=E.length)return;this.clearTimer();var b=E[u];if(this.log("Switching to subtitle track "+u),this.trackId=u,b){var p=b.id,D=b.groupId,R=D===void 0?"":D,y=b.name,x=b.type,w=b.url;this.hls.trigger(k.Events.SUBTITLE_TRACK_SWITCH,{id:p,groupId:R,name:y,type:x,url:w});var T=this.switchParams(b.url,o==null?void 0:o.details);this.loadPlaylist(T)}else this.hls.trigger(k.Events.SUBTITLE_TRACK_SWITCH,{id:u})},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var u=-1,o=i(this.media.textTracks),s=0;s<o.length;s++)if(o[s].mode==="hidden")u=s;else if(o[s].mode==="showing"){u=s;break}this.subtitleTrack!==u&&(this.subtitleTrack=u)},e(l,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(u){this.selectDefaultTrack=!1;var o=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(u,o)}}]),l}(m.default);function i(n){for(var l=[],f=0;f<n.length;f++){var d=n[f];d.kind==="subtitles"&&d.label&&l.push(n[f])}return l}g.default=c},"./src/controller/timeline-controller.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"TimelineController",function(){return i});var k=S("./src/polyfills/number.ts"),v=S("./src/events.ts"),m=S("./src/utils/cea-608-parser.ts"),C=S("./src/utils/output-filter.ts"),_=S("./src/utils/webvtt-parser.ts"),e=S("./src/utils/texttrack-utils.ts"),h=S("./src/utils/imsc1-ttml-parser.ts"),r=S("./src/types/loader.ts"),c=S("./src/utils/logger.ts"),i=function(){function d(o){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=f(),this.captionsProperties=void 0,this.hls=o,this.config=o.config,this.Cues=o.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 s=new C.default(this,"textTrack1"),E=new C.default(this,"textTrack2"),b=new C.default(this,"textTrack3"),p=new C.default(this,"textTrack4");this.cea608Parser1=new m.default(1,s,E),this.cea608Parser2=new m.default(3,b,p)}o.on(v.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),o.on(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(v.Events.MANIFEST_LOADED,this.onManifestLoaded,this),o.on(v.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),o.on(v.Events.FRAG_LOADING,this.onFragLoading,this),o.on(v.Events.FRAG_LOADED,this.onFragLoaded,this),o.on(v.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),o.on(v.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),o.on(v.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),o.on(v.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),o.on(v.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var u=d.prototype;return u.destroy=function(){var s=this.hls;s.off(v.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),s.off(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.off(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),s.off(v.Events.MANIFEST_LOADED,this.onManifestLoaded,this),s.off(v.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),s.off(v.Events.FRAG_LOADING,this.onFragLoading,this),s.off(v.Events.FRAG_LOADED,this.onFragLoaded,this),s.off(v.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),s.off(v.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),s.off(v.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),s.off(v.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),s.off(v.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},u.addCues=function(s,E,b,p,D){for(var R=!1,y=D.length;y--;){var x=D[y],w=l(x[0],x[1],E,b);if(w>=0&&(x[0]=Math.min(x[0],E),x[1]=Math.max(x[1],b),R=!0,w/(b-E)>.5))return}if(R||D.push([E,b]),this.config.renderTextTracksNatively){var T=this.captionsTracks[s];this.Cues.newCue(T,E,b,p)}else{var F=this.Cues.newCue(null,E,b,p);this.hls.trigger(v.Events.CUES_PARSED,{type:"captions",cues:F,track:s})}},u.onInitPtsFound=function(s,E){var b=this,p=E.frag,D=E.id,R=E.initPTS,y=E.timescale,x=this.unparsedVttFrags;D==="main"&&(this.initPTS[p.cc]=R,this.timescale[p.cc]=y),x.length&&(this.unparsedVttFrags=[],x.forEach(function(w){b.onFragLoaded(v.Events.FRAG_LOADED,w)}))},u.getExistingTrack=function(s){var E=this.media;if(E)for(var b=0;b<E.textTracks.length;b++){var p=E.textTracks[b];if(p[s])return p}return null},u.createCaptionsTrack=function(s){this.config.renderTextTracksNatively?this.createNativeTrack(s):this.createNonNativeTrack(s)},u.createNativeTrack=function(s){if(this.captionsTracks[s])return;var E=this.captionsProperties,b=this.captionsTracks,p=this.media,D=E[s],R=D.label,y=D.languageCode,x=this.getExistingTrack(s);if(x)b[s]=x,Object(e.clearCurrentCues)(b[s]),Object(e.sendAddTrackEvent)(b[s],p);else{var w=this.createTextTrack("captions",R,y);w&&(w[s]=!0,b[s]=w)}},u.createNonNativeTrack=function(s){if(this.nonNativeCaptionsTracks[s])return;var E=this.captionsProperties[s];if(!E)return;var b=E.label,p={_id:s,label:b,kind:"captions",default:E.media?!!E.media.default:!1,closedCaptions:E.media};this.nonNativeCaptionsTracks[s]=p,this.hls.trigger(v.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[p]})},u.createTextTrack=function(s,E,b){var p=this.media;return p?p.addTextTrack(s,E,b):void 0},u.onMediaAttaching=function(s,E){this.media=E.media,this._cleanTracks()},u.onMediaDetaching=function(){var s=this.captionsTracks;Object.keys(s).forEach(function(E){Object(e.clearCurrentCues)(s[E]),delete s[E]}),this.nonNativeCaptionsTracks={}},u.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=f(),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())},u._cleanTracks=function(){var s=this.media;if(!s)return;var E=s.textTracks;if(E)for(var b=0;b<E.length;b++)Object(e.clearCurrentCues)(E[b])},u.onSubtitleTracksUpdated=function(s,E){var b=this;this.textTracks=[];var p=E.subtitleTracks||[],D=p.some(function(w){return w.textCodec===h.IMSC1_CODEC});if(this.config.enableWebVTT||D&&this.config.enableIMSC1){var R=this.tracks&&p&&this.tracks.length===p.length;if(this.tracks=p||[],this.config.renderTextTracksNatively){var y=this.media?this.media.textTracks:[];this.tracks.forEach(function(w,T){var F;if(T<y.length){for(var P=null,A=0;A<y.length;A++)if(n(y[A],w)){P=y[A];break}P&&(F=P)}F?Object(e.clearCurrentCues)(F):(F=b.createTextTrack("subtitles",w.name,w.lang),F&&(F.mode="disabled")),F&&(F.groupId=w.groupId,b.textTracks.push(F))})}else if(!R&&this.tracks&&this.tracks.length){var x=this.tracks.map(function(w){return{label:w.name,kind:w.type.toLowerCase(),default:w.default,subtitleTrack:w}});this.hls.trigger(v.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:x})}}},u.onManifestLoaded=function(s,E){var b=this;this.config.enableCEA708Captions&&E.captions&&E.captions.forEach(function(p){var D=/(?:CC|SERVICE)([1-4])/.exec(p.instreamId);if(!D)return;var R="textTrack"+D[1],y=b.captionsProperties[R];if(!y)return;y.label=p.name,p.lang&&(y.languageCode=p.lang),y.media=p})},u.onFragLoading=function(s,E){var b=this.cea608Parser1,p=this.cea608Parser2,D=this.lastSn,R=this.lastPartIndex;if(!this.enabled||!(b&&p))return;if(E.frag.type===r.PlaylistLevelType.MAIN){var y,x,w=E.frag.sn,T=(y=E==null||((x=E.part)===null||x===void 0)?void 0:x.index)!=null?y:-1;w===D+1||w===D&&T===R+1||(b.reset(),p.reset()),this.lastSn=w,this.lastPartIndex=T}},u.onFragLoaded=function(s,E){var b=E.frag,p=E.payload,D=this.initPTS,R=this.unparsedVttFrags;if(b.type===r.PlaylistLevelType.SUBTITLE)if(p.byteLength){if(!Object(k.isFiniteNumber)(D[b.cc])){R.push(E),D.length&&this.hls.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:b,error:new Error("Missing initial subtitle PTS")});return}var y=b.decryptdata;if(y==null||y.key==null||y.method!=="AES-128"){var x=this.tracks[b.level],w=this.vttCCs;w[b.cc]||(w[b.cc]={start:b.start,prevCC:this.prevCC,new:!0},this.prevCC=b.cc),x&&x.textCodec===h.IMSC1_CODEC?this._parseIMSC1(b,p):this._parseVTTs(b,p,w)}}else this.hls.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:b,error:new Error("Empty subtitle payload")})},u._parseIMSC1=function(s,E){var b=this,p=this.hls;Object(h.parseIMSC1)(E,this.initPTS[s.cc],this.timescale[s.cc],function(D){b._appendCues(D,s.level),p.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:s})},function(D){c.logger.log("Failed to parse IMSC1: "+D),p.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:D})})},u._parseVTTs=function(s,E,b){var p=this,D=this.hls;Object(_.parseWebVTT)(E,this.initPTS[s.cc],this.timescale[s.cc],b,s.cc,s.start,function(R){p._appendCues(R,s.level),D.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:s})},function(R){p._fallbackToIMSC1(s,E),c.logger.log("Failed to parse VTT cue: "+R),D.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:R})})},u._fallbackToIMSC1=function(s,E){var b=this,p=this.tracks[s.level];p.textCodec||Object(h.parseIMSC1)(E,this.initPTS[s.cc],this.timescale[s.cc],function(){p.textCodec=h.IMSC1_CODEC,b._parseIMSC1(s,E)},function(){p.textCodec="wvtt"})},u._appendCues=function(s,E){var b=this.hls;if(this.config.renderTextTracksNatively){var p=this.textTracks[E];if(p.mode==="disabled")return;s.forEach(function(y){return Object(e.addCueToTrack)(p,y)})}else{var D=this.tracks[E],R=D.default?"default":"subtitles"+E;b.trigger(v.Events.CUES_PARSED,{type:"subtitles",cues:s,track:R})}},u.onFragDecrypted=function(s,E){var b=E.frag;if(b.type===r.PlaylistLevelType.SUBTITLE){if(!Object(k.isFiniteNumber)(this.initPTS[b.cc])){this.unparsedVttFrags.push(E);return}this.onFragLoaded(v.Events.FRAG_LOADED,E)}},u.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},u.onFragParsingUserdata=function(s,E){var b=this.cea608Parser1,p=this.cea608Parser2;if(!this.enabled||!(b&&p))return;for(var D=0;D<E.samples.length;D++){var R=E.samples[D].bytes;if(R){var y=this.extractCea608Data(R);b.addData(E.samples[D].pts,y[0]),p.addData(E.samples[D].pts,y[1])}}},u.onBufferFlushing=function(s,E){var b=E.startOffset,p=E.endOffset,D=E.endOffsetSubtitles,R=E.type,y=this.media;if(!y||y.currentTime<p)return;if(!R||R==="video"){var x=this.captionsTracks;Object.keys(x).forEach(function(T){return Object(e.removeCuesInRange)(x[T],b,p)})}if(this.config.renderTextTracksNatively&&(b===0&&D!==void 0)){var w=this.textTracks;Object.keys(w).forEach(function(T){return Object(e.removeCuesInRange)(w[T],b,D)})}},u.extractCea608Data=function(s){for(var E=s[0]&31,b=2,p=[[],[]],D=0;D<E;D++){var R=s[b++],y=127&s[b++],x=127&s[b++],w=(4&R)!==0,T=3&R;if(y===0&&x===0)continue;w&&((T===0||T===1)&&(p[T].push(y),p[T].push(x)))}return p},d}();function n(d,u){return d&&d.label===u.name&&!(d.textTrack1||d.textTrack2)}function l(d,u,o,s){return Math.min(u,s)-Math.max(d,o)}function f(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return k});var k=function(){function v(C,_){this.subtle=void 0,this.aesIV=void 0,this.subtle=C,this.aesIV=_}var m=v.prototype;return m.decrypt=function(_,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,_)},v}()},"./src/crypt/aes-decryptor.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"removePadding",function(){return v}),S.d(g,"default",function(){return m});var k=S("./src/utils/typed-array.ts");function v(C){var _=C.byteLength,e=_&&new DataView(C.buffer).getUint8(_-1);return e?Object(k.sliceUint8)(C,0,_-e):C}var m=function(){function C(){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 _=C.prototype;return _.uint8ArrayToUint32Array_=function(h){for(var r=new DataView(h),c=new Uint32Array(4),i=0;i<4;i++)c[i]=r.getUint32(i*4);return c},_.initTable=function(){var h=this.sBox,r=this.invSBox,c=this.subMix,i=c[0],n=c[1],l=c[2],f=c[3],d=this.invSubMix,u=d[0],o=d[1],s=d[2],E=d[3],b=new Uint32Array(256),p=0,D=0,R=0;for(R=0;R<256;R++)R<128?b[R]=R<<1:b[R]=R<<1^283;for(R=0;R<256;R++){var y=D^D<<1^D<<2^D<<3^D<<4;y=y>>>8^y&255^99,h[p]=y,r[y]=p;var x=b[p],w=b[x],T=b[w],F=b[y]*257^y*16843008;i[p]=F<<24|F>>>8,n[p]=F<<16|F>>>16,l[p]=F<<8|F>>>24,f[p]=F,F=T*16843009^w*65537^x*257^p*16843008,u[y]=F<<24|F>>>8,o[y]=F<<16|F>>>16,s[y]=F<<8|F>>>24,E[y]=F,p?(p=x^b[b[b[T^x]]],D^=b[b[D]]):p=D=1}},_.expandKey=function(h){for(var r=this.uint8ArrayToUint32Array_(h),c=!0,i=0;i<r.length&&c;)c=r[i]===this.key[i],i++;if(c)return;this.key=r;var n=this.keySize=r.length;if(n!==4&&n!==6&&n!==8)throw new Error("Invalid aes key size="+n);var l=this.ksRows=(n+6+1)*4,f,d,u=this.keySchedule=new Uint32Array(l),o=this.invKeySchedule=new Uint32Array(l),s=this.sBox,E=this.rcon,b=this.invSubMix,p=b[0],D=b[1],R=b[2],y=b[3],x,w;for(f=0;f<l;f++){if(f<n){x=u[f]=r[f];continue}w=x,f%n===0?(w=w<<8|w>>>24,w=s[w>>>24]<<24|s[w>>>16&255]<<16|s[w>>>8&255]<<8|s[w&255],w^=E[f/n|0]<<24):n>6&&f%n===4&&(w=s[w>>>24]<<24|s[w>>>16&255]<<16|s[w>>>8&255]<<8|s[w&255]),u[f]=x=(u[f-n]^w)>>>0}for(d=0;d<l;d++)f=l-d,d&3?w=u[f]:w=u[f-4],d<4||f<=4?o[d]=w:o[d]=p[s[w>>>24]]^D[s[w>>>16&255]]^R[s[w>>>8&255]]^y[s[w&255]],o[d]=o[d]>>>0},_.networkToHostOrderSwap=function(h){return h<<24|(h&65280)<<8|(h&16711680)>>8|h>>>24},_.decrypt=function(h,r,c){for(var i=this.keySize+6,n=this.invKeySchedule,l=this.invSBox,f=this.invSubMix,d=f[0],u=f[1],o=f[2],s=f[3],E=this.uint8ArrayToUint32Array_(c),b=E[0],p=E[1],D=E[2],R=E[3],y=new Int32Array(h),x=new Int32Array(y.length),w,T,F,P,A,X,z,O,B,U,L,G,ee,oe,ae=this.networkToHostOrderSwap;r<y.length;){for(B=ae(y[r]),U=ae(y[r+1]),L=ae(y[r+2]),G=ae(y[r+3]),A=B^n[0],X=G^n[1],z=L^n[2],O=U^n[3],ee=4,oe=1;oe<i;oe++)w=d[A>>>24]^u[X>>16&255]^o[z>>8&255]^s[O&255]^n[ee],T=d[X>>>24]^u[z>>16&255]^o[O>>8&255]^s[A&255]^n[ee+1],F=d[z>>>24]^u[O>>16&255]^o[A>>8&255]^s[X&255]^n[ee+2],P=d[O>>>24]^u[A>>16&255]^o[X>>8&255]^s[z&255]^n[ee+3],A=w,X=T,z=F,O=P,ee=ee+4;w=l[A>>>24]<<24^l[X>>16&255]<<16^l[z>>8&255]<<8^l[O&255]^n[ee],T=l[X>>>24]<<24^l[z>>16&255]<<16^l[O>>8&255]<<8^l[A&255]^n[ee+1],F=l[z>>>24]<<24^l[O>>16&255]<<16^l[A>>8&255]<<8^l[X&255]^n[ee+2],P=l[O>>>24]<<24^l[A>>16&255]<<16^l[X>>8&255]<<8^l[z&255]^n[ee+3],x[r]=ae(w^b),x[r+1]=ae(P^p),x[r+2]=ae(F^D),x[r+3]=ae(T^R),b=B,p=U,D=L,R=G,r=r+4}return x.buffer},C}()},"./src/crypt/decrypter.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return r});var k=S("./src/crypt/aes-crypto.ts"),v=S("./src/crypt/fast-aes-key.ts"),m=S("./src/crypt/aes-decryptor.ts"),C=S("./src/utils/logger.ts"),_=S("./src/utils/mp4-tools.ts"),e=S("./src/utils/typed-array.ts"),h=16,r=function(){function c(n,l,f){var d=f===void 0?{}:f,u=d.removePKCS7Padding,o=u===void 0?!0:u;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=n,this.config=l,this.removePKCS7Padding=o,o)try{var s=self.crypto;s&&(this.subtle=s.subtle||s.webkitSubtle)}catch(E){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var i=c.prototype;return i.destroy=function(){this.observer=null},i.isSync=function(){return this.config.enableSoftwareAES},i.flush=function(){var l=this.currentResult;if(!l){this.reset();return}var f=new Uint8Array(l);return this.reset(),this.removePKCS7Padding?Object(m.removePadding)(f):f},i.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},i.decrypt=function(l,f,d,u){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(l),f,d);var o=this.flush();o&&u(o.buffer)}else this.webCryptoDecrypt(new Uint8Array(l),f,d).then(u)},i.softwareDecrypt=function(l,f,d){var u=this.currentIV,o=this.currentResult,s=this.remainderData;this.logOnce("JS AES decrypt"),s&&(l=Object(_.appendUint8Array)(s,l),this.remainderData=null);var E=this.getValidChunk(l);if(!E.length)return null;u&&(d=u);var b=this.softwareDecrypter;b||(b=this.softwareDecrypter=new m.default),b.expandKey(f);var p=o;return this.currentResult=b.decrypt(E.buffer,0,d),this.currentIV=Object(e.sliceUint8)(E,-16).buffer,p||null},i.webCryptoDecrypt=function(l,f,d){var u=this,o=this.subtle;return(this.key!==f||!this.fastAesKey)&&(this.key=f,this.fastAesKey=new v.default(o,f)),this.fastAesKey.expandKey().then(function(s){if(!o)return Promise.reject(new Error("web crypto not initialized"));var E=new k.default(o,d);return E.decrypt(l.buffer,s)}).catch(function(s){return u.onWebCryptoError(s,l,f,d)})},i.onWebCryptoError=function(l,f,d,u){return C.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",l),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(f,d,u)},i.getValidChunk=function(l){var f=l,d=l.length-l.length%h;return d!==l.length&&(f=Object(e.sliceUint8)(l,0,d),this.remainderData=Object(e.sliceUint8)(l,d)),f},i.logOnce=function(l){if(!this.logEnabled)return;C.logger.log("[decrypter.ts]: "+l),this.logEnabled=!1},c}()},"./src/crypt/fast-aes-key.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return k});var k=function(){function v(C,_){this.subtle=void 0,this.key=void 0,this.subtle=C,this.key=_}var m=v.prototype;return m.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},v}()},"./src/demux/aacdemuxer.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/demux/base-audio-demuxer.ts"),v=S("./src/demux/adts.ts"),m=S("./src/utils/logger.ts"),C=S("./src/demux/id3.ts");function _(r,c){r.prototype=Object.create(c.prototype),r.prototype.constructor=r,e(r,c)}function e(r,c){return e=Object.setPrototypeOf||function(n,l){return n.__proto__=l,n},e(r,c)}var h=function(r){_(c,r);function c(n,l){var f;return f=r.call(this)||this,f.observer=void 0,f.config=void 0,f.observer=n,f.config=l,f}var i=c.prototype;return i.resetInitSegment=function(l,f,d){r.prototype.resetInitSegment.call(this,l,f,d),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:l,duration:d,inputTimeScale:9e4,dropped:0}},c.probe=function(l){if(!l)return!1;for(var f=C.getID3Data(l,0)||[],d=f.length,u=l.length;d<u;d++)if(v.probe(l,d))return m.logger.log("ADTS sync word found !"),!0;return!1},i.canParse=function(l,f){return v.canParse(l,f)},i.appendFrame=function(l,f,d){v.initTrackConfig(l,this.observer,f,d,l.manifestCodec);var u=v.appendFrame(l,f,d,this.initPTS,this.frameIndex);if(u&&u.missing===0)return u},c}(k.default);h.minProbeByteLength=9,g.default=h},"./src/demux/adts.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"getAudioConfig",function(){return C}),S.d(g,"isHeaderPattern",function(){return _}),S.d(g,"getHeaderLength",function(){return e}),S.d(g,"getFullFrameLength",function(){return h}),S.d(g,"canGetFrameLength",function(){return r}),S.d(g,"isHeader",function(){return c}),S.d(g,"canParse",function(){return i}),S.d(g,"probe",function(){return n}),S.d(g,"initTrackConfig",function(){return l}),S.d(g,"getFrameDuration",function(){return f}),S.d(g,"parseFrameHeader",function(){return d}),S.d(g,"appendFrame",function(){return u});var k=S("./src/utils/logger.ts"),v=S("./src/errors.ts"),m=S("./src/events.ts");function C(o,s,E,b){var p,D,R,y,x=navigator.userAgent.toLowerCase(),w=b,T=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];p=((s[E+2]&192)>>>6)+1;var F=(s[E+2]&60)>>>2;if(F>T.length-1){o.trigger(m.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+F});return}return R=(s[E+2]&1)<<2,R|=(s[E+3]&192)>>>6,k.logger.log("manifest codec:"+b+", ADTS type:"+p+", samplingIndex:"+F),/firefox/i.test(x)?F>=6?(p=5,y=new Array(4),D=F-3):(p=2,y=new Array(2),D=F):x.indexOf("android")!==-1?(p=2,y=new Array(2),D=F):(p=5,y=new Array(4),b&&(b.indexOf("mp4a.40.29")!==-1||b.indexOf("mp4a.40.5")!==-1)||!b&&F>=6?D=F-3:((b&&b.indexOf("mp4a.40.2")!==-1&&(F>=6&&R===1||/vivaldi/i.test(x))||!b&&R===1)&&(p=2,y=new Array(2)),D=F)),y[0]=p<<3,y[0]|=(F&14)>>1,y[1]|=(F&1)<<7,y[1]|=R<<3,p===5&&(y[1]|=(D&14)>>1,y[2]=(D&1)<<7,y[2]|=2<<2,y[3]=0),{config:y,samplerate:T[F],channelCount:R,codec:"mp4a.40."+p,manifestCodec:w}}function _(o,s){return o[s]===255&&(o[s+1]&246)===240}function e(o,s){return o[s+1]&1?7:9}function h(o,s){return(o[s+3]&3)<<11|o[s+4]<<3|(o[s+5]&224)>>>5}function r(o,s){return s+5<o.length}function c(o,s){return s+1<o.length&&_(o,s)}function i(o,s){return r(o,s)&&_(o,s)&&h(o,s)<=o.length-s}function n(o,s){if(c(o,s)){var E=e(o,s);if(s+E>=o.length)return!1;var b=h(o,s);if(b<=E)return!1;var p=s+b;return p===o.length||c(o,p)}return!1}function l(o,s,E,b,p){if(!o.samplerate){var D=C(s,E,b,p);if(!D)return;o.config=D.config,o.samplerate=D.samplerate,o.channelCount=D.channelCount,o.codec=D.codec,o.manifestCodec=D.manifestCodec,k.logger.log("parsed codec:"+o.codec+", rate:"+D.samplerate+", channels:"+D.channelCount)}}function f(o){return 1024*9e4/o}function d(o,s,E,b,p){var D=e(o,s),R=h(o,s);if(R-=D,R>0){var y=E+b*p;return{headerLength:D,frameLength:R,stamp:y}}}function u(o,s,E,b,p){var D=f(o.samplerate),R=d(s,E,b,p,D);if(R){var y=R.frameLength,x=R.headerLength,w=R.stamp,T=x+y,F=Math.max(0,E+T-s.length),P;F?(P=new Uint8Array(T-x),P.set(s.subarray(E+x,s.length),0)):P=s.subarray(E+x,E+T);var A={unit:P,pts:w};return F||o.samples.push(A),{sample:A,length:T,missing:F}}}},"./src/demux/base-audio-demuxer.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"initPTSFn",function(){return h});var k=S("./src/polyfills/number.ts"),v=S("./src/demux/id3.ts"),m=S("./src/demux/dummy-demuxed-track.ts"),C=S("./src/utils/mp4-tools.ts"),_=S("./src/utils/typed-array.ts"),e=function(){function r(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var c=r.prototype;return c.resetInitSegment=function(n,l,f){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},c.resetTimeStamp=function(){},c.resetContiguity=function(){},c.canParse=function(n,l){return!1},c.appendFrame=function(n,l,f){},c.demux=function(n,l){this.cachedData&&(n=Object(C.appendUint8Array)(this.cachedData,n),this.cachedData=null);var f=v.getID3Data(n,0),d=f?f.length:0,u,o,s=this._audioTrack,E=this._id3Track,b=f?v.getTimeStamp(f):void 0,p=n.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=h(b,l)),f&&f.length>0&&E.samples.push({pts:this.initPTS,dts:this.initPTS,data:f}),o=this.initPTS;d<p;){if(this.canParse(n,d)){var D=this.appendFrame(s,n,d);D?(this.frameIndex++,o=D.sample.pts,d+=D.length,u=d):d=p}else v.canParse(n,d)?(f=v.getID3Data(n,d),E.samples.push({pts:o,dts:o,data:f}),d+=f.length,u=d):d++;if(d===p&&u!==p){var R=Object(_.sliceUint8)(n,u);this.cachedData?this.cachedData=Object(C.appendUint8Array)(this.cachedData,R):this.cachedData=R}}return{audioTrack:s,avcTrack:Object(m.dummyTrack)(),id3Track:E,textTrack:Object(m.dummyTrack)()}},c.demuxSampleAes=function(n,l,f){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},c.flush=function(n){var l=this.cachedData;return l&&(this.cachedData=null,this.demux(l,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(m.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(m.dummyTrack)()}},c.destroy=function(){},r}(),h=function(c,i){return Object(k.isFiniteNumber)(c)?c*90:i*9e4};g.default=e},"./src/demux/chunk-cache.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return k});var k=function(){function m(){this.chunks=[],this.dataLength=0}var C=m.prototype;return C.push=function(e){this.chunks.push(e),this.dataLength+=e.length},C.flush=function(){var e=this.chunks,h=this.dataLength,r;if(e.length)e.length===1?r=e[0]:r=v(e,h);else return new Uint8Array(0);return this.reset(),r},C.reset=function(){this.chunks.length=0,this.dataLength=0},m}();function v(m,C){for(var _=new Uint8Array(C),e=0,h=0;h<m.length;h++){var r=m[h];_.set(r,e),e+=r.length}return _}},"./src/demux/dummy-demuxed-track.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"dummyTrack",function(){return k});function k(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/utils/logger.ts"),v=function(){function m(_){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=_,this.bytesAvailable=_.byteLength,this.word=0,this.bitsAvailable=0}var C=m.prototype;return C.loadWord=function(){var e=this.data,h=this.bytesAvailable,r=e.byteLength-h,c=new Uint8Array(4),i=Math.min(4,h);if(i===0)throw new Error("no bytes available");c.set(e.subarray(r,r+i)),this.word=new DataView(c.buffer).getUint32(0),this.bitsAvailable=i*8,this.bytesAvailable-=i},C.skipBits=function(e){var h;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,h=e>>3,e-=h>>3,this.bytesAvailable-=h,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},C.readBits=function(e){var h=Math.min(this.bitsAvailable,e),r=this.word>>>32-h;return e>32&&k.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=h,this.bitsAvailable>0?this.word<<=h:this.bytesAvailable>0&&this.loadWord(),h=e-h,h>0&&this.bitsAvailable?r<<h|this.readBits(h):r},C.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if((this.word&2147483648>>>e)!==0)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},C.skipUEG=function(){this.skipBits(1+this.skipLZ())},C.skipEG=function(){this.skipBits(1+this.skipLZ())},C.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},C.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},C.readBoolean=function(){return this.readBits(1)===1},C.readUByte=function(){return this.readBits(8)},C.readUShort=function(){return this.readBits(16)},C.readUInt=function(){return this.readBits(32)},C.skipScalingList=function(e){for(var h=8,r=8,c,i=0;i<e;i++)r!==0&&(c=this.readEG(),r=(h+c+256)%256),h=r===0?h:r},C.readSPS=function(){var e=0,h=0,r=0,c=0,i,n,l,f=this.readUByte.bind(this),d=this.readBits.bind(this),u=this.readUEG.bind(this),o=this.readBoolean.bind(this),s=this.skipBits.bind(this),E=this.skipEG.bind(this),b=this.skipUEG.bind(this),p=this.skipScalingList.bind(this);f();var D=f();if(d(5),s(3),f(),b(),D===100||D===110||D===122||D===244||D===44||D===83||D===86||D===118||D===128){var R=u();if(R===3&&s(1),b(),b(),s(1),o())for(n=R!==3?8:12,l=0;l<n;l++)o()&&(l<6?p(16):p(64))}b();var y=u();if(y===0)u();else if(y===1)for(s(1),E(),E(),i=u(),l=0;l<i;l++)E();b(),s(1);var x=u(),w=u(),T=d(1);T===0&&s(1),s(1),o()&&(e=u(),h=u(),r=u(),c=u());var F=[1,1];if(o()&&o()){var P=f();switch(P){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=[f()<<8|f(),f()<<8|f()];break}}}return{width:Math.ceil((x+1)*16-e*2-h*2),height:(2-T)*(w+1)*16-(T?2:4)*(r+c),pixelRatio:F}},C.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},m}();g.default=v},"./src/demux/id3.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"isHeader",function(){return k}),S.d(g,"isFooter",function(){return v}),S.d(g,"getID3Data",function(){return m}),S.d(g,"canParse",function(){return _}),S.d(g,"getTimeStamp",function(){return e}),S.d(g,"isTimeStampFrame",function(){return h}),S.d(g,"getID3Frames",function(){return c}),S.d(g,"decodeFrame",function(){return i}),S.d(g,"utf8ArrayToStr",function(){return u}),S.d(g,"testables",function(){return o});var k=function(p,D){return D+10<=p.length&&(p[D]===73&&p[D+1]===68&&p[D+2]===51&&(p[D+3]<255&&p[D+4]<255&&(p[D+6]<128&&p[D+7]<128&&p[D+8]<128&&p[D+9]<128)))},v=function(p,D){return D+10<=p.length&&(p[D]===51&&p[D+1]===68&&p[D+2]===73&&(p[D+3]<255&&p[D+4]<255&&(p[D+6]<128&&p[D+7]<128&&p[D+8]<128&&p[D+9]<128)))},m=function(p,D){for(var R=D,y=0;k(p,D);){y+=10;var x=C(p,D+6);y+=x,v(p,D+10)&&(y+=10),D+=y}return y>0?p.subarray(R,R+y):void 0},C=function(p,D){var R=0;return R=(p[D]&127)<<21,R|=(p[D+1]&127)<<14,R|=(p[D+2]&127)<<7,R|=p[D+3]&127,R},_=function(p,D){return k(p,D)&&C(p,D+6)+10<=p.length-D},e=function(p){for(var D=c(p),R=0;R<D.length;R++){var y=D[R];if(h(y))return d(y)}return},h=function(p){return p&&p.key==="PRIV"&&p.info==="com.apple.streaming.transportStreamTimestamp"},r=function(p){var D=String.fromCharCode(p[0],p[1],p[2],p[3]),R=C(p,4),y=10;return{type:D,size:R,data:p.subarray(y,y+R)}},c=function(p){for(var D=0,R=[];k(p,D);){var y=C(p,D+6);D+=10;for(var x=D+y;D+8<x;){var w=r(p.subarray(D)),T=i(w);T&&R.push(T),D+=w.size+10}v(p,D)&&(D+=10)}return R},i=function(p){return p.type==="PRIV"?n(p):p.type[0]==="W"?f(p):l(p)},n=function(p){if(p.size<2)return;var D=u(p.data,!0),R=new Uint8Array(p.data.subarray(D.length+1));return{key:p.type,info:D,data:R.buffer}},l=function(p){if(p.size<2)return;if(p.type==="TXXX"){var D=1,R=u(p.data.subarray(D),!0);D+=R.length+1;var y=u(p.data.subarray(D));return{key:p.type,info:R,data:y}}var x=u(p.data.subarray(1));return{key:p.type,data:x}},f=function(p){if(p.type==="WXXX"){if(p.size<2)return;var D=1,R=u(p.data.subarray(D),!0);D+=R.length+1;var y=u(p.data.subarray(D));return{key:p.type,info:R,data:y}}var x=u(p.data);return{key:p.type,data:x}},d=function(p){if(p.data.byteLength===8){var D=new Uint8Array(p.data),R=D[3]&1,y=(D[4]<<23)+(D[5]<<15)+(D[6]<<7)+D[7];return y/=45,R&&(y+=4772185884e-2),Math.round(y)}return},u=function(p,D){D===void 0&&(D=!1);var R=E();if(R){var y=R.decode(p);if(D){var x=y.indexOf("\0");return x!==-1?y.substring(0,x):y}return y.replace(/\0/g,"")}for(var w=p.length,T,F,P,A="",X=0;X<w;){if(T=p[X++],T===0&&D)return A;if(T===0||T===3)continue;switch(T>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:A+=String.fromCharCode(T);break;case 12:case 13:F=p[X++],A+=String.fromCharCode((T&31)<<6|F&63);break;case 14:F=p[X++],P=p[X++],A+=String.fromCharCode((T&15)<<12|(F&63)<<6|(P&63)<<0);break;default:}}return A},o={decodeTextFrame:l},s;function E(){return!s&&typeof self.TextDecoder!="undefined"&&(s=new self.TextDecoder("utf-8")),s}},"./src/demux/mp3demuxer.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/demux/base-audio-demuxer.ts"),v=S("./src/demux/id3.ts"),m=S("./src/utils/logger.ts"),C=S("./src/demux/mpegaudio.ts");function _(r,c){r.prototype=Object.create(c.prototype),r.prototype.constructor=r,e(r,c)}function e(r,c){return e=Object.setPrototypeOf||function(n,l){return n.__proto__=l,n},e(r,c)}var h=function(r){_(c,r);function c(){return r.apply(this,arguments)||this}var i=c.prototype;return i.resetInitSegment=function(l,f,d){r.prototype.resetInitSegment.call(this,l,f,d),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:l,duration:d,inputTimeScale:9e4,dropped:0}},c.probe=function(l){if(!l)return!1;for(var f=v.getID3Data(l,0)||[],d=f.length,u=l.length;d<u;d++)if(C.probe(l,d))return m.logger.log("MPEG Audio sync word found !"),!0;return!1},i.canParse=function(l,f){return C.canParse(l,f)},i.appendFrame=function(l,f,d){return this.initPTS===null?void 0:C.appendFrame(l,f,d,this.initPTS,this.frameIndex)},c}(k.default);h.minProbeByteLength=4,g.default=h},"./src/demux/mp4demuxer.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/utils/mp4-tools.ts"),v=S("./src/demux/dummy-demuxed-track.ts"),m=function(){function C(e,h){this.remainderData=null,this.config=void 0,this.config=h}var _=C.prototype;return _.resetTimeStamp=function(){},_.resetInitSegment=function(){},_.resetContiguity=function(){},C.probe=function(h){return Object(k.findBox)({data:h,start:0,end:Math.min(h.length,16384)},["moof"]).length>0},_.demux=function(h){var r=h,c=Object(v.dummyTrack)();if(this.config.progressive){this.remainderData&&(r=Object(k.appendUint8Array)(this.remainderData,h));var i=Object(k.segmentValidRange)(r);this.remainderData=i.remainder,c.samples=i.valid||new Uint8Array}else c.samples=r;return{audioTrack:Object(v.dummyTrack)(),avcTrack:c,id3Track:Object(v.dummyTrack)(),textTrack:Object(v.dummyTrack)()}},_.flush=function(){var h=Object(v.dummyTrack)();return h.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(v.dummyTrack)(),avcTrack:h,id3Track:Object(v.dummyTrack)(),textTrack:Object(v.dummyTrack)()}},_.demuxSampleAes=function(h,r,c){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},_.destroy=function(){},C}();m.minProbeByteLength=1024,g.default=m},"./src/demux/mpegaudio.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"appendFrame",function(){return e}),S.d(g,"parseHeader",function(){return h}),S.d(g,"isHeaderPattern",function(){return r}),S.d(g,"isHeader",function(){return c}),S.d(g,"canParse",function(){return i}),S.d(g,"probe",function(){return n});var k=null,v=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],m=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],C=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],_=[0,1,1,4];function e(l,f,d,u,o){if(d+24>f.length)return;var s=h(f,d);if(s&&d+s.frameLength<=f.length){var E=s.samplesPerFrame*9e4/s.sampleRate,b=u+o*E,p={unit:f.subarray(d,d+s.frameLength),pts:b,dts:b};return l.config=[],l.channelCount=s.channelCount,l.samplerate=s.sampleRate,l.samples.push(p),{sample:p,length:s.frameLength,missing:0}}}function h(l,f){var d=l[f+1]>>3&3,u=l[f+1]>>1&3,o=l[f+2]>>4&15,s=l[f+2]>>2&3;if(d!==1&&o!==0&&o!==15&&s!==3){var E=l[f+2]>>1&1,b=l[f+3]>>6,p=d===3?3-u:u===3?3:4,D=v[p*14+o-1]*1e3,R=d===3?0:d===2?1:2,y=m[R*3+s],x=b===3?1:2,w=C[d][u],T=_[u],F=w*8*T,P=Math.floor(w*D/y+E)*T;if(k===null){var A=navigator.userAgent||"",X=A.match(/Chrome\/(\d+)/i);k=X?parseInt(X[1]):0}var z=!!k&&k<=87;return z&&u===2&&D>=224e3&&b===0&&(l[f+3]=l[f+3]|128),{sampleRate:y,channelCount:x,frameLength:P,samplesPerFrame:F}}}function r(l,f){return l[f]===255&&(l[f+1]&224)===224&&(l[f+1]&6)!==0}function c(l,f){return f+1<l.length&&r(l,f)}function i(l,f){var d=4;return r(l,f)&&d<=l.length-f}function n(l,f){if(f+1<l.length&&r(l,f)){var d=4,u=h(l,f),o=d;u!=null&&u.frameLength&&(o=u.frameLength);var s=f+o;return s===l.length||c(l,s)}return!1}},"./src/demux/sample-aes.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/crypt/decrypter.ts"),v=S("./src/demux/tsdemuxer.ts"),m=function(){function C(e,h,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new k.default(e,h,{removePKCS7Padding:!1})}var _=C.prototype;return _.decryptBuffer=function(h,r){this.decrypter.decrypt(h,this.keyData.key.buffer,this.keyData.iv.buffer,r)},_.decryptAacSample=function(h,r,c,i){var n=h[r].unit,l=n.subarray(16,n.length-n.length%16),f=l.buffer.slice(l.byteOffset,l.byteOffset+l.length),d=this;this.decryptBuffer(f,function(u){var o=new Uint8Array(u);n.set(o,16),i||d.decryptAacSamples(h,r+1,c)})},_.decryptAacSamples=function(h,r,c){for(;;r++){if(r>=h.length){c();return}if(h[r].unit.length<32)continue;var i=this.decrypter.isSync();if(this.decryptAacSample(h,r,c,i),!i)return}},_.getAvcEncryptedData=function(h){for(var r=Math.floor((h.length-48)/160)*16+16,c=new Int8Array(r),i=0,n=32;n<=h.length-16;n+=160,i+=16)c.set(h.subarray(n,n+16),i);return c},_.getAvcDecryptedUnit=function(h,r){for(var c=new Uint8Array(r),i=0,n=32;n<=h.length-16;n+=160,i+=16)h.set(c.subarray(i,i+16),n);return h},_.decryptAvcSample=function(h,r,c,i,n,l){var f=Object(v.discardEPB)(n.data),d=this.getAvcEncryptedData(f),u=this;this.decryptBuffer(d.buffer,function(o){n.data=u.getAvcDecryptedUnit(f,o),l||u.decryptAvcSamples(h,r,c+1,i)})},_.decryptAvcSamples=function(h,r,c,i){if(h instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;r++,c=0){if(r>=h.length){i();return}for(var n=h[r].units;!(c>=n.length);c++){var l=n[c];if(l.data.length<=48||l.type!==1&&l.type!==5)continue;var f=this.decrypter.isSync();if(this.decryptAvcSample(h,r,c,i,l,f),!f)return}}},C}();g.default=m},"./src/demux/transmuxer-interface.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return n});var k=S("./node_modules/webworkify-webpack/index.js"),v=S.n(k),m=S("./src/events.ts"),C=S("./src/demux/transmuxer.ts"),_=S("./src/utils/logger.ts"),e=S("./src/errors.ts"),h=S("./src/utils/mediasource-helper.ts"),r=S("./node_modules/eventemitter3/index.js"),c=S.n(r),i=Object(h.getMediaSource)()||{isTypeSupported:function(){return!1}},n=function(){function l(d,u,o,s){var E=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=d,this.id=u,this.onTransmuxComplete=o,this.onFlush=s;var b=d.config,p=function(w,T){T=T||{},T.frag=E.frag,T.id=E.id,d.trigger(w,T)};this.observer=new r.EventEmitter,this.observer.on(m.Events.FRAG_DECRYPTED,p),this.observer.on(m.Events.ERROR,p);var D={mp4:i.isTypeSupported("video/mp4"),mpeg:i.isTypeSupported("audio/mpeg"),mp3:i.isTypeSupported('audio/mp4; codecs="mp3"')},R=navigator.vendor;if(b.enableWorker&&typeof Worker!="undefined"){_.logger.log("demuxing in webworker");var y;try{y=this.worker=k("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),y.addEventListener("message",this.onwmsg),y.onerror=function(x){d.trigger(m.Events.ERROR,{type:e.ErrorTypes.OTHER_ERROR,details:e.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(x.message+" ("+x.filename+":"+x.lineno+")")})},y.postMessage({cmd:"init",typeSupported:D,vendor:R,id:u,config:JSON.stringify(b)})}catch(x){_.logger.warn("Error in worker:",x),_.logger.error("Error while initializing DemuxerWorker, fallback to inline"),y&&self.URL.revokeObjectURL(y.objectURL),this.transmuxer=new C.default(this.observer,D,b,R,u),this.worker=null}}else this.transmuxer=new C.default(this.observer,D,b,R,u)}var f=l.prototype;return f.destroy=function(){var u=this.worker;if(u)u.removeEventListener("message",this.onwmsg),u.terminate(),this.worker=null;else{var o=this.transmuxer;o&&(o.destroy(),this.transmuxer=null)}var s=this.observer;s&&s.removeAllListeners(),this.observer=null},f.push=function(u,o,s,E,b,p,D,R,y,x){var w=this;y.transmuxing.start=self.performance.now();var T=this.transmuxer,F=this.worker,P=p?p.start:b.start,A=b.decryptdata,X=this.frag,z=!(X&&b.cc===X.cc),O=!(X&&y.level===X.level),B=X?y.sn-X.sn:-1,U=this.part?y.part-this.part.index:1,L=!O&&(B===1||B===0&&U===1),G=self.performance.now();(O||B||b.stats.parsing.start===0)&&(b.stats.parsing.start=G),p&&(U||!L)&&(p.stats.parsing.start=G);var ee=new C.TransmuxState(z,L,R,O,P);if(!L||z){_.logger.log("[transmuxer-interface, "+b.type+"]: Starting new transmux session for sn: "+y.sn+" p: "+y.part+" level: "+y.level+" id: "+y.id+`
|
|
|
discontinuity: `+z+`
|
|
|
trackSwitch: `+O+`
|
|
|
contiguous: `+L+`
|
|
|
accurateTimeOffset: `+R+`
|
|
|
timeOffset: `+P);var oe=new C.TransmuxConfig(s,E,o,D,x);this.configureTransmuxer(oe)}if(this.frag=b,this.part=p,F)F.postMessage({cmd:"demux",data:u,decryptdata:A,chunkMeta:y,state:ee},u instanceof ArrayBuffer?[u]:[]);else if(T){var ae=T.push(u,A,y,ee);Object(C.isPromise)(ae)?ae.then(function(be){w.handleTransmuxComplete(be)}):this.handleTransmuxComplete(ae)}},f.flush=function(u){var o=this;u.transmuxing.start=self.performance.now();var s=this.transmuxer,E=this.worker;if(E)E.postMessage({cmd:"flush",chunkMeta:u});else if(s){var b=s.flush(u);Object(C.isPromise)(b)?b.then(function(p){o.handleFlushResult(p,u)}):this.handleFlushResult(b,u)}},f.handleFlushResult=function(u,o){var s=this;u.forEach(function(E){s.handleTransmuxComplete(E)}),this.onFlush(o)},f.onWorkerMessage=function(u){var o=u.data,s=this.hls;switch(o.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(o.data);break}case"flush":{this.onFlush(o.data);break}default:{o.data=o.data||{},o.data.frag=this.frag,o.data.id=this.id,s.trigger(o.event,o.data);break}}},f.configureTransmuxer=function(u){var o=this.worker,s=this.transmuxer;o?o.postMessage({cmd:"configure",config:u}):s&&s.configure(u)},f.handleTransmuxComplete=function(u){u.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(u)},l}()},"./src/demux/transmuxer-worker.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return e});var k=S("./src/demux/transmuxer.ts"),v=S("./src/events.ts"),m=S("./src/utils/logger.ts"),C=S("./node_modules/eventemitter3/index.js"),_=S.n(C);function e(n){var l=new C.EventEmitter,f=function(u,o){n.postMessage({event:u,data:o})};l.on(v.Events.FRAG_DECRYPTED,f),l.on(v.Events.ERROR,f),n.addEventListener("message",function(d){var u=d.data;switch(u.cmd){case"init":{var o=JSON.parse(u.config);n.transmuxer=new k.default(l,u.typeSupported,o,u.vendor,u.id),Object(m.enableLogs)(o.debug),f("init",null);break}case"configure":{n.transmuxer.configure(u.config);break}case"demux":{var s=n.transmuxer.push(u.data,u.decryptdata,u.chunkMeta,u.state);Object(k.isPromise)(s)?s.then(function(p){h(n,p)}):h(n,s);break}case"flush":{var E=u.chunkMeta,b=n.transmuxer.flush(E);Object(k.isPromise)(b)?b.then(function(p){c(n,p,E)}):c(n,b,E);break}default:break}})}function h(n,l){if(i(l.remuxResult))return;var f=[],d=l.remuxResult,u=d.audio,o=d.video;u&&r(f,u),o&&r(f,o),n.postMessage({event:"transmuxComplete",data:l},f)}function r(n,l){l.data1&&n.push(l.data1.buffer),l.data2&&n.push(l.data2.buffer)}function c(n,l,f){l.forEach(function(d){h(n,d)}),n.postMessage({event:"flush",data:f})}function i(n){return!n.audio&&!n.video&&!n.text&&!n.id3&&!n.initSegment}},"./src/demux/transmuxer.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return o}),S.d(g,"isPromise",function(){return b}),S.d(g,"TransmuxConfig",function(){return p}),S.d(g,"TransmuxState",function(){return D});var k=S("./src/events.ts"),v=S("./src/errors.ts"),m=S("./src/crypt/decrypter.ts"),C=S("./src/demux/aacdemuxer.ts"),_=S("./src/demux/mp4demuxer.ts"),e=S("./src/demux/tsdemuxer.ts"),h=S("./src/demux/mp3demuxer.ts"),r=S("./src/remux/mp4-remuxer.ts"),c=S("./src/remux/passthrough-remuxer.ts"),i=S("./src/demux/chunk-cache.ts"),n=S("./src/utils/mp4-tools.ts"),l=S("./src/utils/logger.ts"),f;try{f=self.performance.now.bind(self.performance)}catch(R){l.logger.debug("Unable to use Performance API on this environment"),f=self.Date.now}var d=[{demux:e.default,remux:r.default},{demux:_.default,remux:c.default},{demux:C.default,remux:r.default},{demux:h.default,remux:r.default}],u=1024;d.forEach(function(R){var y=R.demux;u=Math.max(u,y.minProbeByteLength)});var o=function(){function R(x,w,T,F,P){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 i.default,this.observer=x,this.typeSupported=w,this.config=T,this.vendor=F,this.id=P}var y=R.prototype;return y.configure=function(w){this.transmuxConfig=w,this.decrypter&&this.decrypter.reset()},y.push=function(w,T,F,P){var A=this,X=F.transmuxing;X.executeStart=f();var z=new Uint8Array(w),O=this.cache,B=this.config,U=this.currentTransmuxState,L=this.transmuxConfig;P&&(this.currentTransmuxState=P);var G=s(z,T);if(G&&G.method==="AES-128"){var ee=this.getDecrypter();if(B.enableSoftwareAES){var oe=ee.softwareDecrypt(z,G.key.buffer,G.iv.buffer);if(!oe)return X.executeEnd=f(),E(F);z=new Uint8Array(oe)}else return this.decryptionPromise=ee.webCryptoDecrypt(z,G.key.buffer,G.iv.buffer).then(function(ne){var J=A.push(ne,null,F);return A.decryptionPromise=null,J}),this.decryptionPromise}var ae=P||U,be=ae.contiguous,_e=ae.discontinuity,fe=ae.trackSwitch,Re=ae.accurateTimeOffset,Oe=ae.timeOffset,de=L.audioCodec,te=L.videoCodec,W=L.defaultInitPts,Y=L.duration,V=L.initSegmentData;if((_e||fe)&&this.resetInitSegment(V,de,te,Y),_e&&this.resetInitialTimestamp(W),be||this.resetContiguity(),this.needsProbing(z,_e,fe)){if(O.dataLength){var Q=O.flush();z=Object(n.appendUint8Array)(Q,z)}this.configureTransmuxer(z,L)}var q=this.transmux(z,G,Oe,Re,F),ie=this.currentTransmuxState;return ie.contiguous=!0,ie.discontinuity=!1,ie.trackSwitch=!1,X.executeEnd=f(),q},y.flush=function(w){var T=this,F=w.transmuxing;F.executeStart=f();var P=this.decrypter,A=this.cache,X=this.currentTransmuxState,z=this.decryptionPromise;if(z)return z.then(function(){return T.flush(w)});var O=[],B=X.timeOffset;if(P){var U=P.flush();U&&O.push(this.push(U,null,w))}var L=A.dataLength;A.reset();var G=this.demuxer,ee=this.remuxer;if(!G||!ee)return L>=u&&this.observer.emit(k.Events.ERROR,k.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),F.executeEnd=f(),[E(w)];var oe=G.flush(B);return b(oe)?oe.then(function(ae){return T.flushRemux(O,ae,w),O}):(this.flushRemux(O,oe,w),O)},y.flushRemux=function(w,T,F){var P=T.audioTrack,A=T.avcTrack,X=T.id3Track,z=T.textTrack,O=this.currentTransmuxState,B=O.accurateTimeOffset,U=O.timeOffset;l.logger.log("[transmuxer.ts]: Flushed fragment "+F.sn+(F.part>-1?" p: "+F.part:"")+" of level "+F.level);var L=this.remuxer.remux(P,A,X,z,U,B,!0,this.id);w.push({remuxResult:L,chunkMeta:F}),F.transmuxing.executeEnd=f()},y.resetInitialTimestamp=function(w){var T=this.demuxer,F=this.remuxer;if(!T||!F)return;T.resetTimeStamp(w),F.resetTimeStamp(w)},y.resetContiguity=function(){var w=this.demuxer,T=this.remuxer;if(!w||!T)return;w.resetContiguity(),T.resetNextTimestamp()},y.resetInitSegment=function(w,T,F,P){var A=this.demuxer,X=this.remuxer;if(!A||!X)return;A.resetInitSegment(T,F,P),X.resetInitSegment(w,T,F)},y.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},y.transmux=function(w,T,F,P,A){var X;return T&&T.method==="SAMPLE-AES"?X=this.transmuxSampleAes(w,T,F,P,A):X=this.transmuxUnencrypted(w,F,P,A),X},y.transmuxUnencrypted=function(w,T,F,P){var A=this.demuxer.demux(w,T,!1,!this.config.progressive),X=A.audioTrack,z=A.avcTrack,O=A.id3Track,B=A.textTrack,U=this.remuxer.remux(X,z,O,B,T,F,!1,this.id);return{remuxResult:U,chunkMeta:P}},y.transmuxSampleAes=function(w,T,F,P,A){var X=this;return this.demuxer.demuxSampleAes(w,T,F).then(function(z){var O=X.remuxer.remux(z.audioTrack,z.avcTrack,z.id3Track,z.textTrack,F,P,!1,X.id);return{remuxResult:O,chunkMeta:A}})},y.configureTransmuxer=function(w,T){for(var F=this.config,P=this.observer,A=this.typeSupported,X=this.vendor,z=T.audioCodec,O=T.defaultInitPts,B=T.duration,U=T.initSegmentData,L=T.videoCodec,G,ee=0,oe=d.length;ee<oe;ee++)if(d[ee].demux.probe(w)){G=d[ee];break}G||(l.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),G={demux:_.default,remux:c.default});var ae=this.demuxer,be=this.remuxer,_e=G.remux,fe=G.demux;(!be||!(be instanceof _e))&&(this.remuxer=new _e(P,F,A,X)),(!ae||!(ae instanceof fe))&&(this.demuxer=new fe(P,F,A),this.probe=fe.probe),this.resetInitSegment(U,z,L,B),this.resetInitialTimestamp(O)},y.needsProbing=function(w,T,F){return!this.demuxer||!this.remuxer||T||F},y.getDecrypter=function(){var w=this.decrypter;return w||(w=this.decrypter=new m.default(this.observer,this.config)),w},R}();function s(R,y){var x=null;return R.byteLength>0&&y!=null&&y.key!=null&&y.iv!==null&&y.method!=null&&(x=y),x}var E=function(y){return{remuxResult:{},chunkMeta:y}};function b(R){return"then"in R&&R.then instanceof Function}var p=function(y,x,w,T,F){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=y,this.videoCodec=x,this.initSegmentData=w,this.duration=T,this.defaultInitPts=F},D=function(y,x,w,T,F){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=y,this.contiguous=x,this.accurateTimeOffset=w,this.trackSwitch=T,this.timeOffset=F}},"./src/demux/tsdemuxer.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"discardEPB",function(){return E});var k=S("./src/demux/adts.ts"),v=S("./src/demux/mpegaudio.ts"),m=S("./src/demux/exp-golomb.ts"),C=S("./src/demux/id3.ts"),_=S("./src/demux/sample-aes.ts"),e=S("./src/events.ts"),h=S("./src/utils/mp4-tools.ts"),r=S("./src/utils/logger.ts"),c=S("./src/errors.ts"),i={video:1,audio:2,id3:3,text:4},n=function(){function b(D,R,y){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=D,this.config=R,this.typeSupported=y}b.probe=function(R){var y=b.syncOffset(R);return y<0?!1:(y&&r.logger.warn("MPEG2-TS detected but first sync word found @ offset "+y+", junk ahead ?"),!0)},b.syncOffset=function(R){for(var y=Math.min(1e3,R.length-3*188),x=0;x<y;){if(R[x]===71&&R[x+188]===71&&R[x+2*188]===71)return x;x++}return-1},b.createTrack=function(R,y){return{container:R==="video"||R==="audio"?"video/mp2t":void 0,type:R,id:i[R],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:R==="audio"?y:void 0}};var p=b.prototype;return p.resetInitSegment=function(R,y,x){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=b.createTrack("video",x),this._audioTrack=b.createTrack("audio",x),this._id3Track=b.createTrack("id3",x),this._txtTrack=b.createTrack("text",x),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=R,this.videoCodec=y,this._duration=x},p.resetTimeStamp=function(){},p.resetContiguity=function(){var R=this._audioTrack,y=this._avcTrack,x=this._id3Track;R&&(R.pesData=null),y&&(y.pesData=null),x&&(x.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},p.demux=function(R,y,x,w){x===void 0&&(x=!1),w===void 0&&(w=!1),x||(this.sampleAes=null);var T,F=this._avcTrack,P=this._audioTrack,A=this._id3Track,X=F.pid,z=F.pesData,O=P.pid,B=A.pid,U=P.pesData,L=A.pesData,G=!1,ee=this.pmtParsed,oe=this._pmtId,ae=R.length;if(this.remainderData&&(R=Object(h.appendUint8Array)(this.remainderData,R),ae=R.length,this.remainderData=null),ae<188&&!w)return this.remainderData=R,{audioTrack:P,avcTrack:F,id3Track:A,textTrack:this._txtTrack};var be=Math.max(0,b.syncOffset(R));ae-=(ae+be)%188,ae<R.byteLength&&!w&&(this.remainderData=new Uint8Array(R.buffer,ae,R.buffer.byteLength-ae));for(var _e=be;_e<ae;_e+=188)if(R[_e]===71){var fe=!!(R[_e+1]&64),Re=((R[_e+1]&31)<<8)+R[_e+2],Oe=(R[_e+3]&48)>>4,de=void 0;if(Oe>1){if(de=_e+5+R[_e+4],de===_e+188)continue}else de=_e+4;switch(Re){case X:fe&&(z&&(T=u(z))&&this.parseAVCPES(T,!1),z={data:[],size:0}),z&&(z.data.push(R.subarray(de,_e+188)),z.size+=_e+188-de);break;case O:fe&&(U&&(T=u(U))&&(P.isAAC?this.parseAACPES(T):this.parseMPEGPES(T)),U={data:[],size:0}),U&&(U.data.push(R.subarray(de,_e+188)),U.size+=_e+188-de);break;case B:fe&&(L&&(T=u(L))&&this.parseID3PES(T),L={data:[],size:0}),L&&(L.data.push(R.subarray(de,_e+188)),L.size+=_e+188-de);break;case 0:fe&&(de+=R[de]+1),oe=this._pmtId=f(R,de);break;case oe:{fe&&(de+=R[de]+1);var te=d(R,de,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,x);X=te.avc,X>0&&(F.pid=X),O=te.audio,O>0&&(P.pid=O,P.isAAC=te.isAAC),B=te.id3,B>0&&(A.pid=B),G&&!ee&&(r.logger.log("reparse from beginning"),G=!1,_e=be-188),ee=this.pmtParsed=!0;break}case 17:case 8191:break;default:G=!0;break}}else this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});F.pesData=z,P.pesData=U,A.pesData=L;var W={audioTrack:P,avcTrack:F,id3Track:A,textTrack:this._txtTrack};return w&&this.extractRemainingSamples(W),W},p.flush=function(){var R=this.remainderData;this.remainderData=null;var y;return R?y=this.demux(R,-1,!1,!0):y={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(y),this.sampleAes?this.decrypt(y,this.sampleAes):y},p.extractRemainingSamples=function(R){var y=R.audioTrack,x=R.avcTrack,w=R.id3Track,T=x.pesData,F=y.pesData,P=w.pesData,A;T&&(A=u(T))?(this.parseAVCPES(A,!0),x.pesData=null):x.pesData=T,F&&(A=u(F))?(y.isAAC?this.parseAACPES(A):this.parseMPEGPES(A),y.pesData=null):(F!=null&&F.size&&r.logger.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=F),P&&(A=u(P))?(this.parseID3PES(A),w.pesData=null):w.pesData=P},p.demuxSampleAes=function(R,y,x){var w=this.demux(R,x,!0,!this.config.progressive),T=this.sampleAes=new _.default(this.observer,this.config,y);return this.decrypt(w,T)},p.decrypt=function(R,y){return new Promise(function(x){var w=R.audioTrack,T=R.avcTrack;w.samples&&w.isAAC?y.decryptAacSamples(w.samples,0,function(){T.samples?y.decryptAvcSamples(T.samples,0,0,function(){x(R)}):x(R)}):T.samples&&y.decryptAvcSamples(T.samples,0,0,function(){x(R)})})},p.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},p.parseAVCPES=function(R,y){var x=this,w=this._avcTrack,T=this.parseAVCNALu(R.data),F=!1,P=this.avcSample,A,X=!1;R.data=null,P&&T.length&&!w.audFound&&(o(P,w),P=this.avcSample=l(!1,R.pts,R.dts,"")),T.forEach(function(z){switch(z.type){case 1:{A=!0,P||(P=x.avcSample=l(!0,R.pts,R.dts,"")),F&&(P.debug+="NDR "),P.frame=!0;var O=z.data;if(X&&O.length>4){var B=new m.default(O).readSliceType();(B===2||B===4||B===7||B===9)&&(P.key=!0)}break}case 5:A=!0,P||(P=x.avcSample=l(!0,R.pts,R.dts,"")),F&&(P.debug+="IDR "),P.key=!0,P.frame=!0;break;case 6:{A=!0,F&&P&&(P.debug+="SEI ");var U=new m.default(E(z.data));U.readUByte();for(var L=0,G=0,ee=!1,oe=0;!ee&&U.bytesAvailable>1;){L=0;do oe=U.readUByte(),L+=oe;while(oe===255);G=0;do oe=U.readUByte(),G+=oe;while(oe===255);if(L===4&&U.bytesAvailable!==0){ee=!0;var ae=U.readUByte();if(ae===181){var be=U.readUShort();if(be===49){var _e=U.readUInt();if(_e===1195456820){var fe=U.readUByte();if(fe===3){for(var Re=U.readUByte(),Oe=U.readUByte(),de=31&Re,te=[Re,Oe],W=0;W<de;W++)te.push(U.readUByte()),te.push(U.readUByte()),te.push(U.readUByte());s(x._txtTrack.samples,{type:3,pts:R.pts,bytes:te})}}}}}else if(L===5&&U.bytesAvailable!==0){if(ee=!0,G>16){for(var Y=[],V=0;V<16;V++)Y.push(U.readUByte().toString(16)),(V===3||V===5||V===7||V===9)&&Y.push("-");for(var Q=G-16,q=new Uint8Array(Q),ie=0;ie<Q;ie++)q[ie]=U.readUByte();s(x._txtTrack.samples,{pts:R.pts,payloadType:L,uuid:Y.join(""),userData:Object(C.utf8ArrayToStr)(q),userDataBytes:q})}}else if(G<U.bytesAvailable)for(var ne=0;ne<G;ne++)U.readUByte()}break}case 7:if(A=!0,X=!0,F&&P&&(P.debug+="SPS "),!w.sps){var J=new m.default(z.data),$=J.readSPS();w.width=$.width,w.height=$.height,w.pixelRatio=$.pixelRatio,w.sps=[z.data],w.duration=x._duration;for(var le=z.data.subarray(1,4),ce="avc1.",we=0;we<3;we++){var Fe=le[we].toString(16);Fe.length<2&&(Fe="0"+Fe),ce+=Fe}w.codec=ce}break;case 8:A=!0,F&&P&&(P.debug+="PPS "),w.pps||(w.pps=[z.data]);break;case 9:A=!1,w.audFound=!0,P&&o(P,w),P=x.avcSample=l(!1,R.pts,R.dts,F?"AUD ":"");break;case 12:A=!1;break;default:A=!1,P&&(P.debug+="unknown NAL "+z.type+" ");break}if(P&&A){var Xe=P.units;Xe.push(z)}}),y&&P&&(o(P,w),this.avcSample=null)},p.getLastNalUnit=function(){var R,y=this.avcSample,x;if(!y||y.units.length===0){var w=this._avcTrack.samples;y=w[w.length-1]}if((R=y)!==null&&R!==void 0&&R.units){var T=y.units;x=T[T.length-1]}return x},p.parseAVCNALu=function(R){var y=R.byteLength,x=this._avcTrack,w=x.naluState||0,T=w,F=[],P=0,A,X,z,O=-1,B=0;for(w===-1&&(O=0,B=R[0]&31,w=0,P=1);P<y;){if(A=R[P++],!w){w=A?0:1;continue}if(w===1){w=A?0:2;continue}if(!A)w=3;else if(A===1){if(O>=0){var U={data:R.subarray(O,P-w-1),type:B};F.push(U)}else{var L=this.getLastNalUnit();if(L&&(T&&P<=4-T&&(L.state&&(L.data=L.data.subarray(0,L.data.byteLength-T))),X=P-w-1,X>0)){var G=new Uint8Array(L.data.byteLength+X);G.set(L.data,0),G.set(R.subarray(0,X),L.data.byteLength),L.data=G,L.state=0}}P<y?(z=R[P]&31,O=P,B=z,w=0):w=-1}else w=0}if(O>=0&&w>=0){var ee={data:R.subarray(O,y),type:B,state:w};F.push(ee)}if(F.length===0){var oe=this.getLastNalUnit();if(oe){var ae=new Uint8Array(oe.data.byteLength+R.byteLength);ae.set(oe.data,0),ae.set(R,oe.data.byteLength),oe.data=ae}}return x.naluState=w,F},p.parseAACPES=function(R){var y=0,x=this._audioTrack,w=this.aacOverFlow,T=R.data;if(w){this.aacOverFlow=null;var F=w.sample.unit.byteLength,P=Math.min(w.missing,F),A=F-P;w.sample.unit.set(T.subarray(0,P),A),x.samples.push(w.sample),y=w.missing}var X,z;for(X=y,z=T.length;X<z-1&&!k.isHeader(T,X);X++);if(X!==y){var O,B;if(X<z-1?(O="AAC PES did not start with ADTS header,offset:"+X,B=!1):(O="no ADTS header found in AAC PES",B=!0),r.logger.warn("parsing error:"+O),this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:c.ErrorTypes.MEDIA_ERROR,details:c.ErrorDetails.FRAG_PARSING_ERROR,fatal:B,reason:O}),B)return}k.initTrackConfig(x,this.observer,T,X,this.audioCodec);var U;if(R.pts!==void 0)U=R.pts;else if(w){var L=k.getFrameDuration(x.samplerate);U=w.sample.pts+L}else{r.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var G=0;X<z;)if(k.isHeader(T,X)){if(X+5<z){var ee=k.appendFrame(x,T,X,U,G);if(ee)if(ee.missing)this.aacOverFlow=ee;else{X+=ee.length,G++;continue}}break}else X++},p.parseMPEGPES=function(R){var y=R.data,x=y.length,w=0,T=0,F=R.pts;if(F===void 0){r.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;T<x;)if(v.isHeader(y,T)){var P=v.appendFrame(this._audioTrack,y,T,F,w);if(P)T+=P.length,w++;else break}else T++},p.parseID3PES=function(R){if(R.pts===void 0){r.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(R)},b}();n.minProbeByteLength=188;function l(b,p,D,R){return{key:b,frame:!1,pts:p,dts:D,units:[],debug:R,length:0}}function f(b,p){return(b[p+10]&31)<<8|b[p+11]}function d(b,p,D,R){var y={audio:-1,avc:-1,id3:-1,isAAC:!0},x=(b[p+1]&15)<<8|b[p+2],w=p+3+x-4,T=(b[p+10]&15)<<8|b[p+11];for(p+=12+T;p<w;){var F=(b[p+1]&31)<<8|b[p+2];switch(b[p]){case 207:if(!R){r.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:y.audio===-1&&(y.audio=F);break;case 21:y.id3===-1&&(y.id3=F);break;case 219:if(!R){r.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:y.avc===-1&&(y.avc=F);break;case 3:case 4:D?y.audio===-1&&(y.audio=F,y.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}p+=((b[p+3]&15)<<8|b[p+4])+5}return y}function u(b){var p=0,D,R,y,x,w,T=b.data;if(!b||b.size===0)return null;for(;T[0].length<19&&T.length>1;){var F=new Uint8Array(T[0].length+T[1].length);F.set(T[0]),F.set(T[1],T[0].length),T[0]=F,T.splice(1,1)}D=T[0];var P=(D[0]<<16)+(D[1]<<8)+D[2];if(P===1){if(R=(D[4]<<8)+D[5],R&&R>b.size-6)return null;var A=D[7];A&192&&(x=(D[9]&14)*536870912+(D[10]&255)*4194304+(D[11]&254)*16384+(D[12]&255)*128+(D[13]&254)/2,A&64?(w=(D[14]&14)*536870912+(D[15]&255)*4194304+(D[16]&254)*16384+(D[17]&255)*128+(D[18]&254)/2,x-w>60*9e4&&(r.logger.warn(Math.round((x-w)/9e4)+"s delta between PTS and DTS, align them"),x=w)):w=x),y=D[8];var X=y+9;if(b.size<=X)return null;b.size-=X;for(var z=new Uint8Array(b.size),O=0,B=T.length;O<B;O++){D=T[O];var U=D.byteLength;if(X)if(X>U){X-=U;continue}else D=D.subarray(X),U-=X,X=0;z.set(D,p),p+=U}return R&&(R-=y+3),{data:z,pts:x,dts:w,len:R}}return null}function o(b,p){if(b.units.length&&b.frame){if(b.pts===void 0){var D=p.samples,R=D.length;if(R){var y=D[R-1];b.pts=y.pts,b.dts=y.dts}else{p.dropped++;return}}p.samples.push(b)}b.debug.length&&r.logger.log(b.pts+"/"+b.dts+":"+b.debug)}function s(b,p){var D=b.length;if(D>0){if(p.pts>=b[D-1].pts)b.push(p);else for(var R=D-1;R>=0;R--)if(p.pts<b[R].pts){b.splice(R,0,p);break}}else b.push(p)}function E(b){for(var p=b.byteLength,D=[],R=1;R<p-2;)b[R]===0&&b[R+1]===0&&b[R+2]===3?(D.push(R+2),R+=2):R++;if(D.length===0)return b;var y=p-D.length,x=new Uint8Array(y),w=0;for(R=0;R<y;w++,R++)w===D[0]&&(w++,D.shift()),x[R]=b[w];return x}g.default=n},"./src/errors.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"ErrorTypes",function(){return k}),S.d(g,"ErrorDetails",function(){return v});var k;(function(m){m.NETWORK_ERROR="networkError",m.MEDIA_ERROR="mediaError",m.KEY_SYSTEM_ERROR="keySystemError",m.MUX_ERROR="muxError",m.OTHER_ERROR="otherError"})(k||(k={}));var v;(function(m){m.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",m.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",m.KEY_SYSTEM_NO_SESSION="keySystemNoSession",m.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",m.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",m.MANIFEST_LOAD_ERROR="manifestLoadError",m.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",m.MANIFEST_PARSING_ERROR="manifestParsingError",m.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",m.LEVEL_EMPTY_ERROR="levelEmptyError",m.LEVEL_LOAD_ERROR="levelLoadError",m.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",m.LEVEL_SWITCH_ERROR="levelSwitchError",m.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",m.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",m.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",m.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",m.FRAG_LOAD_ERROR="fragLoadError",m.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",m.FRAG_DECRYPT_ERROR="fragDecryptError",m.FRAG_PARSING_ERROR="fragParsingError",m.REMUX_ALLOC_ERROR="remuxAllocError",m.KEY_LOAD_ERROR="keyLoadError",m.KEY_LOAD_TIMEOUT="keyLoadTimeOut",m.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",m.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",m.BUFFER_APPEND_ERROR="bufferAppendError",m.BUFFER_APPENDING_ERROR="bufferAppendingError",m.BUFFER_STALLED_ERROR="bufferStalledError",m.BUFFER_FULL_ERROR="bufferFullError",m.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",m.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",m.INTERNAL_EXCEPTION="internalException",m.INTERNAL_ABORTED="aborted",m.UNKNOWN="unknown"})(v||(v={}))},"./src/events.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"Events",function(){return k});var k;(function(v){v.MEDIA_ATTACHING="hlsMediaAttaching",v.MEDIA_ATTACHED="hlsMediaAttached",v.MEDIA_DETACHING="hlsMediaDetaching",v.MEDIA_DETACHED="hlsMediaDetached",v.BUFFER_RESET="hlsBufferReset",v.BUFFER_CODECS="hlsBufferCodecs",v.BUFFER_CREATED="hlsBufferCreated",v.BUFFER_APPENDING="hlsBufferAppending",v.BUFFER_APPENDED="hlsBufferAppended",v.BUFFER_EOS="hlsBufferEos",v.BUFFER_FLUSHING="hlsBufferFlushing",v.BUFFER_FLUSHED="hlsBufferFlushed",v.MANIFEST_LOADING="hlsManifestLoading",v.MANIFEST_LOADED="hlsManifestLoaded",v.MANIFEST_PARSED="hlsManifestParsed",v.LEVEL_SWITCHING="hlsLevelSwitching",v.LEVEL_SWITCHED="hlsLevelSwitched",v.LEVEL_LOADING="hlsLevelLoading",v.LEVEL_LOADED="hlsLevelLoaded",v.LEVEL_UPDATED="hlsLevelUpdated",v.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",v.LEVELS_UPDATED="hlsLevelsUpdated",v.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",v.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",v.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",v.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",v.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",v.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",v.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",v.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",v.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",v.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",v.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",v.CUES_PARSED="hlsCuesParsed",v.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",v.INIT_PTS_FOUND="hlsInitPtsFound",v.FRAG_LOADING="hlsFragLoading",v.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",v.FRAG_LOADED="hlsFragLoaded",v.FRAG_DECRYPTED="hlsFragDecrypted",v.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",v.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",v.FRAG_PARSING_METADATA="hlsFragParsingMetadata",v.FRAG_PARSED="hlsFragParsed",v.FRAG_BUFFERED="hlsFragBuffered",v.FRAG_CHANGED="hlsFragChanged",v.FPS_DROP="hlsFpsDrop",v.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",v.ERROR="hlsError",v.DESTROYING="hlsDestroying",v.KEY_LOADING="hlsKeyLoading",v.KEY_LOADED="hlsKeyLoaded",v.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",v.BACK_BUFFER_REACHED="hlsBackBufferReached"})(k||(k={}))},"./src/hls.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return b});var k=S("./node_modules/url-toolkit/src/url-toolkit.js"),v=S.n(k),m=S("./src/loader/playlist-loader.ts"),C=S("./src/loader/key-loader.ts"),_=S("./src/controller/id3-track-controller.ts"),e=S("./src/controller/latency-controller.ts"),h=S("./src/controller/level-controller.ts"),r=S("./src/controller/fragment-tracker.ts"),c=S("./src/controller/stream-controller.ts"),i=S("./src/is-supported.ts"),n=S("./src/utils/logger.ts"),l=S("./src/config.ts"),f=S("./node_modules/eventemitter3/index.js"),d=S.n(f),u=S("./src/events.ts"),o=S("./src/errors.ts");function s(p,D){for(var R=0;R<D.length;R++){var y=D[R];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,y.key,y)}}function E(p,D,R){return D&&s(p.prototype,D),R&&s(p,R),p}var b=function(){p.isSupported=function(){return Object(i.isSupported)()};function p(R){R===void 0&&(R={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new f.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 y=this.config=Object(l.mergeConfig)(p.DefaultConfig,R);this.userConfig=R,Object(n.enableLogs)(y.debug),this._autoLevelCapping=-1,y.progressive&&Object(l.enableStreamingMode)(y);var x=y.abrController,w=y.bufferController,T=y.capLevelController,F=y.fpsController,P=this.abrController=new x(this),A=this.bufferController=new w(this),X=this.capLevelController=new T(this),z=new F(this),O=new m.default(this),B=new C.default(this),U=new _.default(this),L=this.levelController=new h.default(this),G=new r.FragmentTracker(this),ee=this.streamController=new c.default(this,G);X.setStreamController(ee),z.setStreamController(ee);var oe=[L,ee];this.networkControllers=oe;var ae=[O,B,P,A,X,z,U,G];this.audioTrackController=this.createController(y.audioTrackController,null,oe),this.createController(y.audioStreamController,G,oe),this.subtitleTrackController=this.createController(y.subtitleTrackController,null,oe),this.createController(y.subtitleStreamController,G,oe),this.createController(y.timelineController,null,ae),this.emeController=this.createController(y.emeController,null,ae),this.cmcdController=this.createController(y.cmcdController,null,ae),this.latencyController=this.createController(e.default,null,ae),this.coreComponents=ae}var D=p.prototype;return D.createController=function(y,x,w){if(y){var T=x?new y(this,x):new y(this);return w&&w.push(T),T}return null},D.on=function(y,x,w){w===void 0&&(w=this),this._emitter.on(y,x,w)},D.once=function(y,x,w){w===void 0&&(w=this),this._emitter.once(y,x,w)},D.removeAllListeners=function(y){this._emitter.removeAllListeners(y)},D.off=function(y,x,w,T){w===void 0&&(w=this),this._emitter.off(y,x,w,T)},D.listeners=function(y){return this._emitter.listeners(y)},D.emit=function(y,x,w){return this._emitter.emit(y,x,w)},D.trigger=function(y,x){if(this.config.debug)return this.emit(y,y,x);try{return this.emit(y,y,x)}catch(w){n.logger.error("An internal error happened while handling event "+y+'. Error message: "'+w.message+'". Here is a stacktrace:',w),this.trigger(u.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:y,error:w})}return!1},D.listenerCount=function(y){return this._emitter.listenerCount(y)},D.destroy=function(){n.logger.log("destroy"),this.trigger(u.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(y){return y.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(y){return y.destroy()}),this.coreComponents.length=0},D.attachMedia=function(y){n.logger.log("attachMedia"),this._media=y,this.trigger(u.Events.MEDIA_ATTACHING,{media:y})},D.detachMedia=function(){n.logger.log("detachMedia"),this.trigger(u.Events.MEDIA_DETACHING,void 0),this._media=null},D.loadSource=function(y){this.stopLoad();var x=this.media,w=this.url,T=this.url=k.buildAbsoluteURL(self.location.href,y,{alwaysNormalize:!0});n.logger.log("loadSource:"+T),x&&w&&w!==T&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(x)),this.trigger(u.Events.MANIFEST_LOADING,{url:y})},D.startLoad=function(y){y===void 0&&(y=-1),n.logger.log("startLoad("+y+")"),this.networkControllers.forEach(function(x){x.startLoad(y)})},D.stopLoad=function(){n.logger.log("stopLoad"),this.networkControllers.forEach(function(y){y.stopLoad()})},D.swapAudioCodec=function(){n.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},D.recoverMediaError=function(){n.logger.log("recoverMediaError");var y=this._media;this.detachMedia(),y&&this.attachMedia(y)},D.removeLevel=function(y,x){x===void 0&&(x=0),this.levelController.removeLevel(y,x)},E(p,[{key:"levels",get:function(){var y=this.levelController.levels;return y||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(y){n.logger.log("set currentLevel:"+y),this.loadLevel=y,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(y){n.logger.log("set nextLevel:"+y),this.levelController.manualLevel=y,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(y){n.logger.log("set loadLevel:"+y),this.levelController.manualLevel=y}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(y){this.levelController.nextLoadLevel=y}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(y){n.logger.log("set firstLevel:"+y),this.levelController.firstLevel=y}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(y){n.logger.log("set startLevel:"+y),y!==-1&&(y=Math.max(y,this.minAutoLevel)),this.levelController.startLevel=y}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(y){var x=!!y;x!==this.config.capLevelToPlayerSize&&(x?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=x)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(y){this._autoLevelCapping!==y&&(n.logger.log("set autoLevelCapping:"+y),this._autoLevelCapping=y)}},{key:"bandwidthEstimate",get:function(){var y=this.abrController.bwEstimator;return y?y.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var y=this.levels,x=this.config.minAutoBitrate;if(!y)return 0;for(var w=y.length,T=0;T<w;T++)if(y[T].maxBitrate>x)return T;return 0}},{key:"maxAutoLevel",get:function(){var y=this.levels,x=this.autoLevelCapping,w;return x===-1&&y&&y.length?w=y.length-1:w=x,w}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(y){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,y)}},{key:"audioTracks",get:function(){var y=this.audioTrackController;return y?y.audioTracks:[]}},{key:"audioTrack",get:function(){var y=this.audioTrackController;return y?y.audioTrack:-1},set:function(y){var x=this.audioTrackController;x&&(x.audioTrack=y)}},{key:"subtitleTracks",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var y=this.subtitleTrackController;return y?y.subtitleTrack:-1},set:function(y){var x=this.subtitleTrackController;x&&(x.subtitleTrack=y)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var y=this.subtitleTrackController;return y?y.subtitleDisplay:!1},set:function(y){var x=this.subtitleTrackController;x&&(x.subtitleDisplay=y)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(y){this.config.lowLatencyMode=y}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return u.Events}},{key:"ErrorTypes",get:function(){return o.ErrorTypes}},{key:"ErrorDetails",get:function(){return o.ErrorDetails}},{key:"DefaultConfig",get:function(){return p.defaultConfig?p.defaultConfig:l.hlsDefaultConfig},set:function(y){p.defaultConfig=y}}]),p}();b.defaultConfig=void 0},"./src/is-supported.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"isSupported",function(){return m}),S.d(g,"changeTypeSupported",function(){return C});var k=S("./src/utils/mediasource-helper.ts");function v(){return self.SourceBuffer||self.WebKitSourceBuffer}function m(){var _=Object(k.getMediaSource)();if(!_)return!1;var e=v(),h=_&&typeof _.isTypeSupported=="function"&&_.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function";return!!h&&!!r}function C(){var _,e=v();return typeof(e==null||((_=e.prototype)===null||_===void 0)?void 0:_.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return n}),S.d(g,"LoadError",function(){return f});var k=S("./src/polyfills/number.ts"),v=S("./src/errors.ts");function m(d,u){d.prototype=Object.create(u.prototype),d.prototype.constructor=d,r(d,u)}function C(d){var u=typeof Map=="function"?new Map:void 0;return C=function(s){if(s===null||!h(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof u!="undefined"){if(u.has(s))return u.get(s);u.set(s,E)}function E(){return _(s,arguments,c(this).constructor)}return E.prototype=Object.create(s.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),r(E,s)},C(d)}function _(d,u,o){return e()?_=Reflect.construct:_=function(E,b,p){var D=[null];D.push.apply(D,b);var R=Function.bind.apply(E,D),y=new R;return p&&r(y,p.prototype),y},_.apply(null,arguments)}function e(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(d){return!1}}function h(d){return Function.toString.call(d).indexOf("[native code]")!==-1}function r(d,u){return r=Object.setPrototypeOf||function(s,E){return s.__proto__=E,s},r(d,u)}function c(d){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},c(d)}var i=Math.pow(2,17),n=function(){function d(o){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=o}var u=d.prototype;return u.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},u.abort=function(){this.loader&&this.loader.abort()},u.load=function(s,E){var b=this,p=s.url;if(!p)return Promise.reject(new f({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,networkDetails:null},"Fragment does not have a "+(p?"part list":"url")));this.abort();var D=this.config,R=D.fLoader,y=D.loader;return new Promise(function(x,w){b.loader&&b.loader.destroy();var T=b.loader=s.loader=R?new R(D):new y(D),F=l(s),P={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:i};s.stats=T.stats,T.load(F,P,{onSuccess:function(X,z,O,B){b.resetLoader(s,T),x({frag:s,part:null,payload:X.data,networkDetails:B})},onError:function(X,z,O){b.resetLoader(s,T),w(new f({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,response:X,networkDetails:O}))},onAbort:function(X,z,O){b.resetLoader(s,T),w(new f({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:s,networkDetails:O}))},onTimeout:function(X,z,O){b.resetLoader(s,T),w(new f({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:s,networkDetails:O}))},onProgress:function(X,z,O,B){E&&E({frag:s,part:null,payload:O,networkDetails:B})}})})},u.loadPart=function(s,E,b){var p=this;this.abort();var D=this.config,R=D.fLoader,y=D.loader;return new Promise(function(x,w){p.loader&&p.loader.destroy();var T=p.loader=s.loader=R?new R(D):new y(D),F=l(s,E),P={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:i};E.stats=T.stats,T.load(F,P,{onSuccess:function(X,z,O,B){p.resetLoader(s,T),p.updateStatsFromPart(s,E);var U={frag:s,part:E,payload:X.data,networkDetails:B};b(U),x(U)},onError:function(X,z,O){p.resetLoader(s,T),w(new f({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:s,part:E,response:X,networkDetails:O}))},onAbort:function(X,z,O){s.stats.aborted=E.stats.aborted,p.resetLoader(s,T),w(new f({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:s,part:E,networkDetails:O}))},onTimeout:function(X,z,O){p.resetLoader(s,T),w(new f({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:s,part:E,networkDetails:O}))}})})},u.updateStatsFromPart=function(s,E){var b=s.stats,p=E.stats,D=p.total;if(b.loaded+=p.loaded,D){var R=Math.round(s.duration/E.duration),y=Math.min(Math.round(b.loaded/D),R),x=R-y,w=x*Math.round(b.loaded/y);b.total=b.loaded+w}else b.total=Math.max(b.loaded,b.total);var T=b.loading,F=p.loading;T.start?T.first+=F.first-F.start:(T.start=F.start,T.first=F.first),T.end=F.end},u.resetLoader=function(s,E){s.loader=null,this.loader===E&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),E.destroy()},d}();function l(d,u){u===void 0&&(u=null);var o=u||d,s={frag:d,part:u,responseType:"arraybuffer",url:o.url,headers:{},rangeStart:0,rangeEnd:0},E=o.byteRangeStartOffset,b=o.byteRangeEndOffset;return Object(k.isFiniteNumber)(E)&&Object(k.isFiniteNumber)(b)&&(s.rangeStart=E,s.rangeEnd=b),s}var f=function(d){m(u,d);function u(o){for(var s,E=arguments.length,b=new Array(E>1?E-1:0),p=1;p<E;p++)b[p-1]=arguments[p];return s=d.call.apply(d,[this].concat(b))||this,s.data=void 0,s.data=o,s}return u}(C(Error))},"./src/loader/fragment.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"ElementaryStreamTypes",function(){return n}),S.d(g,"BaseSegment",function(){return l}),S.d(g,"Fragment",function(){return f}),S.d(g,"Part",function(){return d});var k=S("./src/polyfills/number.ts"),v=S("./node_modules/url-toolkit/src/url-toolkit.js"),m=S.n(v),C=S("./src/utils/logger.ts"),_=S("./src/loader/level-key.ts"),e=S("./src/loader/load-stats.ts");function h(u,o){u.prototype=Object.create(o.prototype),u.prototype.constructor=u,r(u,o)}function r(u,o){return r=Object.setPrototypeOf||function(E,b){return E.__proto__=b,E},r(u,o)}function c(u,o){for(var s=0;s<o.length;s++){var E=o[s];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(u,E.key,E)}}function i(u,o,s){return o&&c(u.prototype,o),s&&c(u,s),u}var n;(function(u){u.AUDIO="audio",u.VIDEO="video",u.AUDIOVIDEO="audiovideo"})(n||(n={}));var l=function(){function u(s){var E;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(E={},E[n.AUDIO]=null,E[n.VIDEO]=null,E[n.AUDIOVIDEO]=null,E),this.baseurl=s}var o=u.prototype;return o.setByteRange=function(E,b){var p=E.split("@",2),D=[];p.length===1?D[0]=b?b.byteRangeEndOffset:0:D[0]=parseInt(p[1]),D[1]=parseInt(p[0])+D[0],this._byteRange=D},i(u,[{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(v.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(E){this._url=E}}]),u}(),f=function(u){h(o,u);function o(E,b){var p;return p=u.call(this,b)||this,p._decryptdata=null,p.rawProgramDateTime=null,p.programDateTime=null,p.tagList=[],p.duration=0,p.sn=0,p.levelkey=void 0,p.type=void 0,p.loader=null,p.level=-1,p.cc=0,p.startPTS=void 0,p.endPTS=void 0,p.appendedPTS=void 0,p.startDTS=void 0,p.endDTS=void 0,p.start=0,p.deltaPTS=void 0,p.maxStartPTS=void 0,p.minEndPTS=void 0,p.stats=new e.LoadStats,p.urlId=0,p.data=void 0,p.bitrateTest=!1,p.title=null,p.initSegment=null,p.type=E,p}var s=o.prototype;return s.createInitializationVector=function(b){for(var p=new Uint8Array(16),D=12;D<16;D++)p[D]=b>>8*(15-D)&255;return p},s.setDecryptDataFromLevelKey=function(b,p){var D=b;return(b==null?void 0:b.method)==="AES-128"&&b.uri&&!b.iv&&(D=_.LevelKey.fromURI(b.uri),D.method=b.method,D.iv=this.createInitializationVector(p),D.keyFormat="identity"),D},s.setElementaryStreamInfo=function(b,p,D,R,y,x){x===void 0&&(x=!1);var w=this.elementaryStreams,T=w[b];if(!T){w[b]={startPTS:p,endPTS:D,startDTS:R,endDTS:y,partial:x};return}T.startPTS=Math.min(T.startPTS,p),T.endPTS=Math.max(T.endPTS,D),T.startDTS=Math.min(T.startDTS,R),T.endDTS=Math.max(T.endDTS,y)},s.clearElementaryStreamInfo=function(){var b=this.elementaryStreams;b[n.AUDIO]=null,b[n.VIDEO]=null,b[n.AUDIOVIDEO]=null},i(o,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var b=this.sn;typeof b!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&C.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),b=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,b)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(k.isFiniteNumber)(this.programDateTime))return null;var b=Object(k.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+b*1e3}},{key:"encrypted",get:function(){var b;return!!((b=this.decryptdata)!==null&&b!==void 0&&b.keyFormat&&this.decryptdata.uri)}}]),o}(l),d=function(u){h(o,u);function o(s,E,b,p,D){var R;R=u.call(this,b)||this,R.fragOffset=0,R.duration=0,R.gap=!1,R.independent=!1,R.relurl=void 0,R.fragment=void 0,R.index=void 0,R.stats=new e.LoadStats,R.duration=s.decimalFloatingPoint("DURATION"),R.gap=s.bool("GAP"),R.independent=s.bool("INDEPENDENT"),R.relurl=s.enumeratedString("URI"),R.fragment=E,R.index=p;var y=s.enumeratedString("BYTERANGE");return y&&R.setByteRange(y,D),D&&(R.fragOffset=D.fragOffset+D.duration),R}return i(o,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var E=this.elementaryStreams;return!!(E.audio||E.video||E.audiovideo)}}]),o}(l)},"./src/loader/key-loader.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return C});var k=S("./src/events.ts"),v=S("./src/errors.ts"),m=S("./src/utils/logger.ts"),C=function(){function _(h){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=h,this._registerListeners()}var e=_.prototype;return e._registerListeners=function(){this.hls.on(k.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(k.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){this._unregisterListeners();for(var r in this.loaders){var c=this.loaders[r];c&&c.destroy()}this.loaders={}},e.onKeyLoading=function(r,c){var i=c.frag,n=i.type,l=this.loaders[n];if(!i.decryptdata){m.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var f=i.decryptdata.uri;if(f!==this.decrypturl||this.decryptkey===null){var d=this.hls.config;if(l&&(m.logger.warn("abort previous key loader for type:"+n),l.abort()),!f){m.logger.warn("key uri is falsy");return}var u=d.loader,o=i.loader=this.loaders[n]=new u(d);this.decrypturl=f,this.decryptkey=null;var s={url:f,frag:i,responseType:"arraybuffer"},E={timeout:d.fragLoadingTimeOut,maxRetry:0,retryDelay:d.fragLoadingRetryDelay,maxRetryDelay:d.fragLoadingMaxRetryTimeout,highWaterMark:0},b={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};o.load(s,E,b)}else this.decryptkey&&(i.decryptdata.key=this.decryptkey,this.hls.trigger(k.Events.KEY_LOADED,{frag:i}))},e.loadsuccess=function(r,c,i){var n=i.frag;if(!n.decryptdata){m.logger.error("after key load, decryptdata unset");return}this.decryptkey=n.decryptdata.key=new Uint8Array(r.data),n.loader=null,delete this.loaders[n.type],this.hls.trigger(k.Events.KEY_LOADED,{frag:n})},e.loaderror=function(r,c){var i=c.frag,n=i.loader;n&&n.abort(),delete this.loaders[i.type],this.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:i,response:r})},e.loadtimeout=function(r,c){var i=c.frag,n=i.loader;n&&n.abort(),delete this.loaders[i.type],this.hls.trigger(k.Events.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:i})},_}()},"./src/loader/level-details.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"LevelDetails",function(){return _});var k=S("./src/polyfills/number.ts");function v(e,h){for(var r=0;r<h.length;r++){var c=h[r];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}function m(e,h,r){return h&&v(e.prototype,h),r&&v(e,r),e}var C=10,_=function(){function e(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 h=e.prototype;return h.reloaded=function(c){if(!c){this.advanced=!0,this.updated=!0;return}var i=this.lastPartSn-c.lastPartSn,n=this.lastPartIndex-c.lastPartIndex;this.updated=this.endSN!==c.endSN||!!n||!!i,this.advanced=this.endSN>c.endSN||i>0||i===0&&n>0,this.updated||this.advanced?this.misses=Math.floor(c.misses*.6):this.misses=c.misses+1,this.availabilityDelay=c.availabilityDelay},m(e,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(k.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||C}},{key:"drift",get:function(){var c=this.driftEndTime-this.driftStartTime;if(c>0){var i=this.driftEnd-this.driftStart;return i*1e3/c}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var c;return(c=this.partList)!==null&&c!==void 0&&c.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var c;return(c=this.fragments)!==null&&c!==void 0&&c.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 c;return(c=this.partList)!==null&&c!==void 0&&c.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var c;return(c=this.partList)!==null&&c!==void 0&&c.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),e}()},"./src/loader/level-key.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"LevelKey",function(){return _});var k=S("./node_modules/url-toolkit/src/url-toolkit.js"),v=S.n(k);function m(e,h){for(var r=0;r<h.length;r++){var c=h[r];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}function C(e,h,r){return h&&m(e.prototype,h),r&&m(e,r),e}var _=function(){e.fromURL=function(r,c){return new e(r,c)},e.fromURI=function(r){return new e(r)};function e(h,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(k.buildAbsoluteURL)(h,r,{alwaysNormalize:!0}):this._uri=h}return C(e,[{key:"uri",get:function(){return this._uri}}]),e}()},"./src/loader/load-stats.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"LoadStats",function(){return k});var k=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return o});var k=S("./src/polyfills/number.ts"),v=S("./node_modules/url-toolkit/src/url-toolkit.js"),m=S.n(v),C=S("./src/loader/fragment.ts"),_=S("./src/loader/level-details.ts"),e=S("./src/loader/level-key.ts"),h=S("./src/utils/attr-list.ts"),r=S("./src/utils/logger.ts"),c=S("./src/utils/codecs.ts"),i=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,n=/#EXT-X-MEDIA:(.*)/g,l=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),f=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),d=/\.(mp4|m4s|m4v|m4a)$/i;function u(D){var R,y;return d.test((R=(y=v.parseURL(D))===null||y===void 0?void 0:y.path)!=null?R:"")}var o=function(){function D(){}return D.findGroup=function(y,x){for(var w=0;w<y.length;w++){var T=y[w];if(T.id===x)return T}},D.convertAVC1ToAVCOTI=function(y){var x=y.split(".");if(x.length>2){var w=x.shift()+".";return w+=parseInt(x.shift()).toString(16),w+=("000"+parseInt(x.shift()).toString(16)).substr(-4),w}return y},D.resolve=function(y,x){return v.buildAbsoluteURL(x,y,{alwaysNormalize:!0})},D.parseMasterPlaylist=function(y,x){var w=[],T={},F=!1;i.lastIndex=0;for(var P;(P=i.exec(y))!=null;)if(P[1]){var A=new h.AttrList(P[1]),X={attrs:A,bitrate:A.decimalInteger("AVERAGE-BANDWIDTH")||A.decimalInteger("BANDWIDTH"),name:A.NAME,url:D.resolve(P[2],x)},z=A.decimalResolution("RESOLUTION");z&&(X.width=z.width,X.height=z.height),s((A.CODECS||"").split(/[ ,]+/).filter(function(B){return B}),X),X.videoCodec&&X.videoCodec.indexOf("avc1")!==-1&&(X.videoCodec=D.convertAVC1ToAVCOTI(X.videoCodec)),w.push(X)}else if(P[3]){var O=new h.AttrList(P[3]);O["DATA-ID"]&&(F=!0,T[O["DATA-ID"]]=O)}return{levels:w,sessionData:F?T:null}},D.parseMasterPlaylistMedia=function(y,x,w,T){T===void 0&&(T=[]);var F,P=[],A=0;for(n.lastIndex=0;(F=n.exec(y))!==null;){var X=new h.AttrList(F[1]);if(X.TYPE===w){var z={attrs:X,bitrate:0,id:A++,groupId:X["GROUP-ID"],instreamId:X["INSTREAM-ID"],name:X.NAME||X.LANGUAGE||"",type:w,default:X.bool("DEFAULT"),autoselect:X.bool("AUTOSELECT"),forced:X.bool("FORCED"),lang:X.LANGUAGE,url:X.URI?D.resolve(X.URI,x):""};if(T.length){var O=D.findGroup(T,z.groupId)||T[0];E(z,O,"audioCodec"),E(z,O,"textCodec")}P.push(z)}}return P},D.parseLevelPlaylist=function(y,x,w,T,F){var P=new _.LevelDetails(x),A=P.fragments,X=null,z=0,O=0,B=0,U=0,L=null,G=new C.Fragment(T,x),ee,oe,ae,be=-1,_e=!1;for(l.lastIndex=0,P.m3u8=y;(ee=l.exec(y))!==null;){_e&&(_e=!1,G=new C.Fragment(T,x),G.start=B,G.sn=z,G.cc=U,G.level=w,X&&(G.initSegment=X,G.rawProgramDateTime=X.rawProgramDateTime));var fe=ee[1];if(fe){G.duration=parseFloat(fe);var Re=(" "+ee[2]).slice(1);G.title=Re||null,G.tagList.push(Re?["INF",fe,Re]:["INF",fe])}else if(ee[3])Object(k.isFiniteNumber)(G.duration)&&(G.start=B,ae&&(G.levelkey=ae),G.sn=z,G.level=w,G.cc=U,G.urlId=F,A.push(G),G.relurl=(" "+ee[3]).slice(1),p(G,L),L=G,B+=G.duration,z++,O=0,_e=!0);else if(ee[4]){var Oe=(" "+ee[4]).slice(1);L?G.setByteRange(Oe,L):G.setByteRange(Oe)}else if(ee[5])G.rawProgramDateTime=(" "+ee[5]).slice(1),G.tagList.push(["PROGRAM-DATE-TIME",G.rawProgramDateTime]),be===-1&&(be=A.length);else{if(ee=ee[0].match(f),!ee){r.logger.warn("No matches on slow regex match for level playlist!");continue}for(oe=1;oe<ee.length&&!(typeof ee[oe]!="undefined");oe++);var de=(" "+ee[oe]).slice(1),te=(" "+ee[oe+1]).slice(1),W=ee[oe+2]?(" "+ee[oe+2]).slice(1):"";switch(de){case"PLAYLIST-TYPE":P.type=te.toUpperCase();break;case"MEDIA-SEQUENCE":z=P.startSN=parseInt(te);break;case"SKIP":{var Y=new h.AttrList(te),V=Y.decimalInteger("SKIPPED-SEGMENTS");if(Object(k.isFiniteNumber)(V)){P.skippedSegments=V;for(var Q=V;Q--;)A.unshift(null);z+=V}var q=Y.enumeratedString("RECENTLY-REMOVED-DATERANGES");q&&(P.recentlyRemovedDateranges=q.split(" "));break}case"TARGETDURATION":P.targetduration=parseFloat(te);break;case"VERSION":P.version=parseInt(te);break;case"EXTM3U":break;case"ENDLIST":P.live=!1;break;case"#":(te||W)&&G.tagList.push(W?[te,W]:[te]);break;case"DIS":U++;case"GAP":G.tagList.push([de]);break;case"BITRATE":G.tagList.push([de,te]);break;case"DISCONTINUITY-SEQ":U=parseInt(te);break;case"KEY":{var ie,ne=new h.AttrList(te),J=ne.enumeratedString("METHOD"),$=ne.URI,le=ne.hexadecimalInteger("IV"),ce=ne.enumeratedString("KEYFORMATVERSIONS"),we=ne.enumeratedString("KEYID"),Fe=(ie=ne.enumeratedString("KEYFORMAT"))!=null?ie:"identity",Xe=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Xe.indexOf(Fe)>-1){r.logger.warn("Keyformat "+Fe+" is not supported from the manifest");continue}else if(Fe!=="identity")continue;J&&(ae=e.LevelKey.fromURL(x,$),$&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(J)>=0&&(ae.method=J,ae.keyFormat=Fe,we&&(ae.keyID=we),ce&&(ae.keyFormatVersions=ce),ae.iv=le));break}case"START":{var $e=new h.AttrList(te),Ye=$e.decimalFloatingPoint("TIME-OFFSET");Object(k.isFiniteNumber)(Ye)&&(P.startTimeOffset=Ye);break}case"MAP":{var Ze=new h.AttrList(te);G.relurl=Ze.URI,Ze.BYTERANGE&&G.setByteRange(Ze.BYTERANGE),G.level=w,G.sn="initSegment",ae&&(G.levelkey=ae),G.initSegment=null,X=G,_e=!0;break}case"SERVER-CONTROL":{var qe=new h.AttrList(te);P.canBlockReload=qe.bool("CAN-BLOCK-RELOAD"),P.canSkipUntil=qe.optionalFloat("CAN-SKIP-UNTIL",0),P.canSkipDateRanges=P.canSkipUntil>0&&qe.bool("CAN-SKIP-DATERANGES"),P.partHoldBack=qe.optionalFloat("PART-HOLD-BACK",0),P.holdBack=qe.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Pe=new h.AttrList(te);P.partTarget=Pe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ie=P.partList;Ie||(Ie=P.partList=[]);var Je=O>0?Ie[Ie.length-1]:void 0,rt=O++,ye=new C.Part(new h.AttrList(te),G,x,rt,Je);Ie.push(ye),G.duration+=ye.duration;break}case"PRELOAD-HINT":{var ue=new h.AttrList(te);P.preloadHint=ue;break}case"RENDITION-REPORT":{var he=new h.AttrList(te);P.renditionReports=P.renditionReports||[],P.renditionReports.push(he);break}default:r.logger.warn("line parsed but not handled: "+ee);break}}}L&&!L.relurl?(A.pop(),B-=L.duration,P.partList&&(P.fragmentHint=L)):P.partList&&(p(G,L),G.cc=U,P.fragmentHint=G);var me=A.length,Ce=A[0],ge=A[me-1];if(B+=P.skippedSegments*P.targetduration,B>0&&me&&ge){P.averagetargetduration=B/me;var Ee=ge.sn;P.endSN=Ee!=="initSegment"?Ee:0,Ce&&(P.startCC=Ce.cc,Ce.initSegment||P.fragments.every(function(Ae){return Ae.relurl&&u(Ae.relurl)})&&(r.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),G=new C.Fragment(T,x),G.relurl=ge.relurl,G.level=w,G.sn="initSegment",Ce.initSegment=G,P.needSidxRanges=!0))}else P.endSN=0,P.startCC=0;return P.fragmentHint&&(B+=P.fragmentHint.duration),P.totalduration=B,P.endCC=U,be>0&&b(A,be),P},D}();function s(D,R){["video","audio","text"].forEach(function(y){var x=D.filter(function(T){return Object(c.isCodecType)(T,y)});if(x.length){var w=x.filter(function(T){return T.lastIndexOf("avc1",0)===0||T.lastIndexOf("mp4a",0)===0});R[y+"Codec"]=w.length>0?w[0]:x[0],D=D.filter(function(T){return x.indexOf(T)===-1})}}),R.unknownCodecs=D}function E(D,R,y){var x=R[y];x&&(D[y]=x)}function b(D,R){for(var y=D[R],x=R;x--;){var w=D[x];if(!w)return;w.programDateTime=y.programDateTime-w.duration*1e3,y=w}}function p(D,R){D.rawProgramDateTime?D.programDateTime=Date.parse(D.rawProgramDateTime):R!=null&&R.programDateTime&&(D.programDateTime=R.endProgramDateTime),Object(k.isFiniteNumber)(D.programDateTime)||(D.programDateTime=null,D.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/polyfills/number.ts"),v=S("./src/events.ts"),m=S("./src/errors.ts"),C=S("./src/utils/logger.ts"),_=S("./src/utils/mp4-tools.ts"),e=S("./src/loader/m3u8-parser.ts"),h=S("./src/types/loader.ts"),r=S("./src/utils/attr-list.ts");function c(l){var f=l.type;switch(f){case h.PlaylistContextType.AUDIO_TRACK:return h.PlaylistLevelType.AUDIO;case h.PlaylistContextType.SUBTITLE_TRACK:return h.PlaylistLevelType.SUBTITLE;default:return h.PlaylistLevelType.MAIN}}function i(l,f){var d=l.url;return(d===void 0||d.indexOf("data:")===0)&&(d=f.url),d}var n=function(){function l(d){this.hls=void 0,this.loaders=Object.create(null),this.hls=d,this.registerListeners()}var f=l.prototype;return f.registerListeners=function(){var u=this.hls;u.on(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(v.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(v.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),u.on(v.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.unregisterListeners=function(){var u=this.hls;u.off(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(v.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(v.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),u.off(v.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.createInternalLoader=function(u){var o=this.hls.config,s=o.pLoader,E=o.loader,b=s||E,p=new b(o);return u.loader=p,this.loaders[u.type]=p,p},f.getInternalLoader=function(u){return this.loaders[u.type]},f.resetInternalLoader=function(u){this.loaders[u]&&delete this.loaders[u]},f.destroyInternalLoaders=function(){for(var u in this.loaders){var o=this.loaders[u];o&&o.destroy(),this.resetInternalLoader(u)}},f.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},f.onManifestLoading=function(u,o){var s=o.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:h.PlaylistContextType.MANIFEST,url:s,deliveryDirectives:null})},f.onLevelLoading=function(u,o){var s=o.id,E=o.level,b=o.url,p=o.deliveryDirectives;this.load({id:s,groupId:null,level:E,responseType:"text",type:h.PlaylistContextType.LEVEL,url:b,deliveryDirectives:p})},f.onAudioTrackLoading=function(u,o){var s=o.id,E=o.groupId,b=o.url,p=o.deliveryDirectives;this.load({id:s,groupId:E,level:null,responseType:"text",type:h.PlaylistContextType.AUDIO_TRACK,url:b,deliveryDirectives:p})},f.onSubtitleTrackLoading=function(u,o){var s=o.id,E=o.groupId,b=o.url,p=o.deliveryDirectives;this.load({id:s,groupId:E,level:null,responseType:"text",type:h.PlaylistContextType.SUBTITLE_TRACK,url:b,deliveryDirectives:p})},f.load=function(u){var o,s=this.hls.config,E=this.getInternalLoader(u);if(E){var b=E.context;if(b&&b.url===u.url){C.logger.trace("[playlist-loader]: playlist request ongoing");return}C.logger.log("[playlist-loader]: aborting previous loader for type: "+u.type),E.abort()}var p,D,R,y;switch(u.type){case h.PlaylistContextType.MANIFEST:p=s.manifestLoadingMaxRetry,D=s.manifestLoadingTimeOut,R=s.manifestLoadingRetryDelay,y=s.manifestLoadingMaxRetryTimeout;break;case h.PlaylistContextType.LEVEL:case h.PlaylistContextType.AUDIO_TRACK:case h.PlaylistContextType.SUBTITLE_TRACK:p=0,D=s.levelLoadingTimeOut;break;default:p=s.levelLoadingMaxRetry,D=s.levelLoadingTimeOut,R=s.levelLoadingRetryDelay,y=s.levelLoadingMaxRetryTimeout;break}if(E=this.createInternalLoader(u),(o=u.deliveryDirectives)!==null&&o!==void 0&&o.part){var x;if(u.type===h.PlaylistContextType.LEVEL&&u.level!==null?x=this.hls.levels[u.level].details:u.type===h.PlaylistContextType.AUDIO_TRACK&&u.id!==null?x=this.hls.audioTracks[u.id].details:u.type===h.PlaylistContextType.SUBTITLE_TRACK&&u.id!==null&&(x=this.hls.subtitleTracks[u.id].details),x){var w=x.partTarget,T=x.targetduration;w&&T&&(D=Math.min(Math.max(w*3,T*.8)*1e3,D))}}var F={timeout:D,maxRetry:p,retryDelay:R,maxRetryDelay:y,highWaterMark:0},P={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};E.load(u,F,P)},f.loadsuccess=function(u,o,s,E){if(E===void 0&&(E=null),s.isSidxRequest){this.handleSidxRequest(u,s),this.handlePlaylistLoaded(u,o,s,E);return}this.resetInternalLoader(s.type);var b=u.data;if(b.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(u,s,"no EXTM3U delimiter",E);return}o.parsing.start=performance.now(),b.indexOf("#EXTINF:")>0||b.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(u,o,s,E):this.handleMasterPlaylist(u,o,s,E)},f.loaderror=function(u,o,s){s===void 0&&(s=null),this.handleNetworkError(o,s,!1,u)},f.loadtimeout=function(u,o,s){s===void 0&&(s=null),this.handleNetworkError(o,s,!0)},f.handleMasterPlaylist=function(u,o,s,E){var b=this.hls,p=u.data,D=i(u,s),R=e.default.parseMasterPlaylist(p,D),y=R.levels,x=R.sessionData;if(!y.length){this.handleManifestParsingError(u,s,"no level found in manifest",E);return}var w=y.map(function(z){return{id:z.attrs.AUDIO,audioCodec:z.audioCodec}}),T=y.map(function(z){return{id:z.attrs.SUBTITLES,textCodec:z.textCodec}}),F=e.default.parseMasterPlaylistMedia(p,D,"AUDIO",w),P=e.default.parseMasterPlaylistMedia(p,D,"SUBTITLES",T),A=e.default.parseMasterPlaylistMedia(p,D,"CLOSED-CAPTIONS");if(F.length){var X=F.some(function(z){return!z.url});!X&&y[0].audioCodec&&!y[0].attrs.AUDIO&&(C.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:""}))}b.trigger(v.Events.MANIFEST_LOADED,{levels:y,audioTracks:F,subtitles:P,captions:A,url:D,stats:o,networkDetails:E,sessionData:x})},f.handleTrackOrLevelPlaylist=function(u,o,s,E){var b=this.hls,p=s.id,D=s.level,R=s.type,y=i(u,s),x=Object(k.isFiniteNumber)(p)?p:0,w=Object(k.isFiniteNumber)(D)?D:x,T=c(s),F=e.default.parseLevelPlaylist(u.data,y,w,T,x);if(!F.fragments.length){b.trigger(v.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:y,reason:"no fragments found in level",level:typeof s.level=="number"?s.level:void 0});return}if(R===h.PlaylistContextType.MANIFEST){var P={attrs:new r.AttrList({}),bitrate:0,details:F,name:"",url:y};b.trigger(v.Events.MANIFEST_LOADED,{levels:[P],audioTracks:[],url:y,stats:o,networkDetails:E,sessionData:null})}if(o.parsing.end=performance.now(),F.needSidxRanges){var A,X=(A=F.fragments[0].initSegment)===null||A===void 0?void 0:A.url;this.load({url:X,isSidxRequest:!0,type:R,level:D,levelDetails:F,id:p,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}s.levelDetails=F,this.handlePlaylistLoaded(u,o,s,E)},f.handleSidxRequest=function(u,o){var s=Object(_.parseSegmentIndex)(new Uint8Array(u.data));if(!s)return;var E=s.references,b=o.levelDetails;E.forEach(function(p,D){var R=p.info,y=b.fragments[D];y.byteRange.length===0&&y.setByteRange(String(1+R.end-R.start)+"@"+String(R.start)),y.initSegment&&y.initSegment.setByteRange(String(s.moovEndOffset)+"@0")})},f.handleManifestParsingError=function(u,o,s,E){this.hls.trigger(v.Events.ERROR,{type:m.ErrorTypes.NETWORK_ERROR,details:m.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:o.type===h.PlaylistContextType.MANIFEST,url:u.url,reason:s,response:u,context:o,networkDetails:E})},f.handleNetworkError=function(u,o,s,E){s===void 0&&(s=!1),C.logger.warn("[playlist-loader]: A network "+(s?"timeout":"error")+" occurred while loading "+u.type+" level: "+u.level+" id: "+u.id+' group-id: "'+u.groupId+'"');var b=m.ErrorDetails.UNKNOWN,p=!1,D=this.getInternalLoader(u);switch(u.type){case h.PlaylistContextType.MANIFEST:b=s?m.ErrorDetails.MANIFEST_LOAD_TIMEOUT:m.ErrorDetails.MANIFEST_LOAD_ERROR,p=!0;break;case h.PlaylistContextType.LEVEL:b=s?m.ErrorDetails.LEVEL_LOAD_TIMEOUT:m.ErrorDetails.LEVEL_LOAD_ERROR,p=!1;break;case h.PlaylistContextType.AUDIO_TRACK:b=s?m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,p=!1;break;case h.PlaylistContextType.SUBTITLE_TRACK:b=s?m.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:m.ErrorDetails.SUBTITLE_LOAD_ERROR,p=!1;break}D&&this.resetInternalLoader(u.type);var R={type:m.ErrorTypes.NETWORK_ERROR,details:b,fatal:p,url:u.url,loader:D,context:u,networkDetails:o};E&&(R.response=E),this.hls.trigger(v.Events.ERROR,R)},f.handlePlaylistLoaded=function(u,o,s,E){var b=s.type,p=s.level,D=s.id,R=s.groupId,y=s.loader,x=s.levelDetails,w=s.deliveryDirectives;if(!(x!=null&&x.targetduration)){this.handleManifestParsingError(u,s,"invalid target duration",E);return}if(!y)return;x.live&&(y.getCacheAge&&(x.ageHeader=y.getCacheAge()||0),(!y.getCacheAge||isNaN(x.ageHeader))&&(x.ageHeader=0));switch(b){case h.PlaylistContextType.MANIFEST:case h.PlaylistContextType.LEVEL:this.hls.trigger(v.Events.LEVEL_LOADED,{details:x,level:p||0,id:D||0,stats:o,networkDetails:E,deliveryDirectives:w});break;case h.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(v.Events.AUDIO_TRACK_LOADED,{details:x,id:D||0,groupId:R||"",stats:o,networkDetails:E,deliveryDirectives:w});break;case h.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(v.Events.SUBTITLE_TRACK_LOADED,{details:x,id:D||0,groupId:R||"",stats:o,networkDetails:E,deliveryDirectives:w});break}},l}();g.default=n},"./src/polyfills/number.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"isFiniteNumber",function(){return k}),S.d(g,"MAX_SAFE_INTEGER",function(){return v});var k=Number.isFinite||function(m){return typeof m=="number"&&isFinite(m)},v=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(N,g,S){"use strict";S.r(g);var k=function(){function v(){}return v.getSilentFrame=function(C,_){switch(C){case"mp4a.40.2":if(_===1)return new Uint8Array([0,200,0,128,35,128]);if(_===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(_===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(_===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(_===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(_===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(_===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(_===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(_===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},v}();g.default=k},"./src/remux/mp4-generator.ts":function(N,g,S){"use strict";S.r(g);var k=Math.pow(2,32)-1,v=function(){function m(){}return m.init=function(){m.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var _;for(_ in m.types)m.types.hasOwnProperty(_)&&(m.types[_]=[_.charCodeAt(0),_.charCodeAt(1),_.charCodeAt(2),_.charCodeAt(3)]);var e=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]),h=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);m.HDLR_TYPES={video:e,audio:h};var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),c=new Uint8Array([0,0,0,0,0,0,0,0]);m.STTS=m.STSC=m.STCO=c,m.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),m.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),m.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),m.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var i=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);m.FTYP=m.box(m.types.ftyp,i,l,i,n),m.DINF=m.box(m.types.dinf,m.box(m.types.dref,r))},m.box=function(_){for(var e=8,h=arguments.length,r=new Array(h>1?h-1:0),c=1;c<h;c++)r[c-1]=arguments[c];for(var i=r.length,n=i;i--;)e+=r[i].byteLength;var l=new Uint8Array(e);for(l[0]=e>>24&255,l[1]=e>>16&255,l[2]=e>>8&255,l[3]=e&255,l.set(_,4),i=0,e=8;i<n;i++)l.set(r[i],e),e+=r[i].byteLength;return l},m.hdlr=function(_){return m.box(m.types.hdlr,m.HDLR_TYPES[_])},m.mdat=function(_){return m.box(m.types.mdat,_)},m.mdhd=function(_,e){e*=_;var h=Math.floor(e/(k+1)),r=Math.floor(e%(k+1));return m.box(m.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,_>>24&255,_>>16&255,_>>8&255,_&255,h>>24,h>>16&255,h>>8&255,h&255,r>>24,r>>16&255,r>>8&255,r&255,85,196,0,0]))},m.mdia=function(_){return m.box(m.types.mdia,m.mdhd(_.timescale,_.duration),m.hdlr(_.type),m.minf(_))},m.mfhd=function(_){return m.box(m.types.mfhd,new Uint8Array([0,0,0,0,_>>24,_>>16&255,_>>8&255,_&255]))},m.minf=function(_){return _.type==="audio"?m.box(m.types.minf,m.box(m.types.smhd,m.SMHD),m.DINF,m.stbl(_)):m.box(m.types.minf,m.box(m.types.vmhd,m.VMHD),m.DINF,m.stbl(_))},m.moof=function(_,e,h){return m.box(m.types.moof,m.mfhd(_),m.traf(h,e))},m.moov=function(_){for(var e=_.length,h=[];e--;)h[e]=m.trak(_[e]);return m.box.apply(null,[m.types.moov,m.mvhd(_[0].timescale,_[0].duration)].concat(h).concat(m.mvex(_)))},m.mvex=function(_){for(var e=_.length,h=[];e--;)h[e]=m.trex(_[e]);return m.box.apply(null,[m.types.mvex].concat(h))},m.mvhd=function(_,e){e*=_;var h=Math.floor(e/(k+1)),r=Math.floor(e%(k+1)),c=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,_>>24&255,_>>16&255,_>>8&255,_&255,h>>24,h>>16&255,h>>8&255,h&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 m.box(m.types.mvhd,c)},m.sdtp=function(_){var e=_.samples||[],h=new Uint8Array(4+e.length),r,c;for(r=0;r<e.length;r++)c=e[r].flags,h[r+4]=c.dependsOn<<4|c.isDependedOn<<2|c.hasRedundancy;return m.box(m.types.sdtp,h)},m.stbl=function(_){return m.box(m.types.stbl,m.stsd(_),m.box(m.types.stts,m.STTS),m.box(m.types.stsc,m.STSC),m.box(m.types.stsz,m.STSZ),m.box(m.types.stco,m.STCO))},m.avc1=function(_){var e=[],h=[],r,c,i;for(r=0;r<_.sps.length;r++)c=_.sps[r],i=c.byteLength,e.push(i>>>8&255),e.push(i&255),e=e.concat(Array.prototype.slice.call(c));for(r=0;r<_.pps.length;r++)c=_.pps[r],i=c.byteLength,h.push(i>>>8&255),h.push(i&255),h=h.concat(Array.prototype.slice.call(c));var n=m.box(m.types.avcC,new Uint8Array([1,e[3],e[4],e[5],252|3,224|_.sps.length].concat(e).concat([_.pps.length]).concat(h))),l=_.width,f=_.height,d=_.pixelRatio[0],u=_.pixelRatio[1];return m.box(m.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,l&255,f>>8&255,f&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]),n,m.box(m.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),m.box(m.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,d&255,u>>24,u>>16&255,u>>8&255,u&255])))},m.esds=function(_){var e=_.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(_.config).concat([6,1,2]))},m.mp4a=function(_){var e=_.samplerate;return m.box(m.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,_.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]),m.box(m.types.esds,m.esds(_)))},m.mp3=function(_){var e=_.samplerate;return m.box(m.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,_.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]))},m.stsd=function(_){return _.type==="audio"?!_.isAAC&&_.codec==="mp3"?m.box(m.types.stsd,m.STSD,m.mp3(_)):m.box(m.types.stsd,m.STSD,m.mp4a(_)):m.box(m.types.stsd,m.STSD,m.avc1(_))},m.tkhd=function(_){var e=_.id,h=_.duration*_.timescale,r=_.width,c=_.height,i=Math.floor(h/(k+1)),n=Math.floor(h%(k+1));return m.box(m.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,0,0,0,0,i>>24,i>>16&255,i>>8&255,i&255,n>>24,n>>16&255,n>>8&255,n&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,c>>8&255,c&255,0,0]))},m.traf=function(_,e){var h=m.sdtp(_),r=_.id,c=Math.floor(e/(k+1)),i=Math.floor(e%(k+1));return m.box(m.types.traf,m.box(m.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),m.box(m.types.tfdt,new Uint8Array([1,0,0,0,c>>24,c>>16&255,c>>8&255,c&255,i>>24,i>>16&255,i>>8&255,i&255])),m.trun(_,h.length+16+20+8+16+8+8),h)},m.trak=function(_){return _.duration=_.duration||4294967295,m.box(m.types.trak,m.tkhd(_),m.mdia(_))},m.trex=function(_){var e=_.id;return m.box(m.types.trex,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},m.trun=function(_,e){var h=_.samples||[],r=h.length,c=12+16*r,i=new Uint8Array(c),n,l,f,d,u,o;for(e+=8+c,i.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255],0),n=0;n<r;n++)l=h[n],f=l.duration,d=l.size,u=l.flags,o=l.cts,i.set([f>>>24&255,f>>>16&255,f>>>8&255,f&255,d>>>24&255,d>>>16&255,d>>>8&255,d&255,u.isLeading<<2|u.dependsOn,u.isDependedOn<<6|u.hasRedundancy<<4|u.paddingValue<<1|u.isNonSync,u.degradPrio&240<<8,u.degradPrio&15,o>>>24&255,o>>>16&255,o>>>8&255,o&255],12+16*n);return m.box(m.types.trun,i)},m.initSegment=function(_){m.types||m.init();var e=m.moov(_),h=new Uint8Array(m.FTYP.byteLength+e.byteLength);return h.set(m.FTYP),h.set(e,m.FTYP.byteLength),h},m}();v.types=void 0,v.HDLR_TYPES=void 0,v.STTS=void 0,v.STSC=void 0,v.STCO=void 0,v.STSZ=void 0,v.VMHD=void 0,v.SMHD=void 0,v.STSD=void 0,v.FTYP=void 0,v.DINF=void 0,g.default=v},"./src/remux/mp4-remuxer.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return o}),S.d(g,"normalizePts",function(){return s});var k=S("./src/polyfills/number.ts"),v=S("./src/remux/aac-helper.ts"),m=S("./src/remux/mp4-generator.ts"),C=S("./src/events.ts"),_=S("./src/errors.ts"),e=S("./src/utils/logger.ts"),h=S("./src/types/loader.ts"),r=S("./src/utils/timescale-conversion.ts");function c(){return c=Object.assign||function(D){for(var R=1;R<arguments.length;R++){var y=arguments[R];for(var x in y)Object.prototype.hasOwnProperty.call(y,x)&&(D[x]=y[x])}return D},c.apply(this,arguments)}var i=10*1e3,n=1024,l=1152,f=null,d=null,u=!1,o=function(){function D(y,x,w,T){if(T===void 0&&(T=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=y,this.config=x,this.typeSupported=w,this.ISGenerated=!1,f===null){var F=navigator.userAgent||"",P=F.match(/Chrome\/(\d+)/i);f=P?parseInt(P[1]):0}if(d===null){var A=navigator.userAgent.match(/Safari\/(\d+)/i);d=A?parseInt(A[1]):0}u=!!f&&f<75||!!d&&d<600}var R=D.prototype;return R.destroy=function(){},R.resetTimeStamp=function(x){e.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=x},R.resetNextTimestamp=function(){e.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},R.resetInitSegment=function(){e.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},R.getVideoStartPts=function(x){var w=!1,T=x.reduce(function(F,P){var A=P.pts-F;return A<-4294967296?(w=!0,s(F,P.pts)):A>0?F:P.pts},x[0].pts);return w&&e.logger.debug("PTS rollover detected"),T},R.remux=function(x,w,T,F,P,A,X,z){var O,B,U,L,G,ee,oe=P,ae=P,be=x.pid>-1,_e=w.pid>-1,fe=w.samples.length,Re=x.samples.length>0,Oe=fe>1,de=(!be||Re)&&(!_e||Oe)||this.ISGenerated||X;if(de){this.ISGenerated||(U=this.generateIS(x,w,P));var te=this.isVideoContiguous,W=-1;if(Oe&&(W=E(w.samples),!te&&this.config.forceKeyFrameOnDiscontinuity))if(ee=!0,W>0){e.logger.warn("[mp4-remuxer]: Dropped "+W+" out of "+fe+" video samples due to a missing keyframe");var Y=this.getVideoStartPts(w.samples);w.samples=w.samples.slice(W),w.dropped+=W,ae+=(w.samples[0].pts-Y)/(w.timescale||9e4)}else W===-1&&(e.logger.warn("[mp4-remuxer]: No keyframe found out of "+fe+" video samples"),ee=!1);if(this.ISGenerated){if(Re&&Oe){var V=this.getVideoStartPts(w.samples),Q=s(x.samples[0].pts,V)-V,q=Q/w.inputTimeScale;oe+=Math.max(0,q),ae+=Math.max(0,-q)}if(Re){if(x.samplerate||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),U=this.generateIS(x,w,P)),B=this.remuxAudio(x,oe,this.isAudioContiguous,A,_e||Oe||z===h.PlaylistLevelType.AUDIO?ae:void 0),Oe){var ie=B?B.endPTS-B.startPTS:0;w.inputTimeScale||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),U=this.generateIS(x,w,P)),O=this.remuxVideo(w,ae,te,ie)}}else Oe&&(O=this.remuxVideo(w,ae,te,0));O&&(O.firstKeyFrame=W,O.independent=W!==-1)}}return this.ISGenerated&&(T.samples.length&&(G=this.remuxID3(T,P)),F.samples.length&&(L=this.remuxText(F,P))),{audio:B,video:O,initSegment:U,independent:ee,text:L,id3:G}},R.generateIS=function(x,w,T){var F=x.samples,P=w.samples,A=this.typeSupported,X={},z=!Object(k.isFiniteNumber)(this._initPTS),O="audio/mp4",B,U,L;if(z&&(B=U=Infinity),x.config&&F.length&&(x.timescale=x.samplerate,x.isAAC||(A.mpeg?(O="audio/mpeg",x.codec=""):A.mp3&&(x.codec="mp3")),X.audio={id:"audio",container:O,codec:x.codec,initSegment:!x.isAAC&&A.mpeg?new Uint8Array(0):m.default.initSegment([x]),metadata:{channelCount:x.channelCount}},z&&(L=x.inputTimeScale,B=U=F[0].pts-Math.round(L*T))),w.sps&&w.pps&&P.length&&(w.timescale=w.inputTimeScale,X.video={id:"main",container:"video/mp4",codec:w.codec,initSegment:m.default.initSegment([w]),metadata:{width:w.width,height:w.height}},z)){L=w.inputTimeScale;var G=this.getVideoStartPts(P),ee=Math.round(L*T);U=Math.min(U,s(P[0].dts,G)-ee),B=Math.min(B,G-ee)}if(Object.keys(X).length)return this.ISGenerated=!0,z&&(this._initPTS=B,this._initDTS=U),{tracks:X,initPTS:B,timescale:L}},R.remuxVideo=function(x,w,T,F){var P=x.inputTimeScale,A=x.samples,X=[],z=A.length,O=this._initPTS,B=this.nextAvcDts,U=8,L,G,ee,oe=Number.POSITIVE_INFINITY,ae=Number.NEGATIVE_INFINITY,be=0,_e=!1;if(!T||B===null){var fe=w*P,Re=A[0].pts-s(A[0].dts,A[0].pts);B=fe-Re}for(var Oe=0;Oe<z;Oe++){var de=A[Oe];if(de.pts=s(de.pts-O,B),de.dts=s(de.dts-O,B),de.dts>de.pts){var te=9e4*.2;be=Math.max(Math.min(be,de.pts-de.dts),-1*te)}de.dts<A[Oe>0?Oe-1:Oe].dts&&(_e=!0)}_e&&A.sort(function(Tt,pt){var ht=Tt.dts-pt.dts,Ft=Tt.pts-pt.pts;return ht||Ft}),G=A[0].dts,ee=A[A.length-1].dts;var W=Math.round((ee-G)/(z-1));if(be<0){if(be<W*-2){e.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(r.toMsFromMpegTsClock)(-W,!0)+" ms");for(var Y=be,V=0;V<z;V++)A[V].dts=Y=Math.max(Y,A[V].pts-W),A[V].pts=Math.max(Y,A[V].pts)}else{e.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(r.toMsFromMpegTsClock)(be,!0)+" ms to overcome this issue");for(var Q=0;Q<z;Q++)A[Q].dts=A[Q].dts+be}G=A[0].dts}if(T){var q=G-B,ie=q>W,ne=q<-1;if(ie||ne){ie?e.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(q,!0)+" ms ("+q+"dts) hole between fragments detected, filling it"):e.logger.warn("AVC: "+Object(r.toMsFromMpegTsClock)(-q,!0)+" ms ("+q+"dts) overlapping between fragments detected"),G=B;var J=A[0].pts-q;A[0].dts=G,A[0].pts=J,e.logger.log("Video: First PTS/DTS adjusted: "+Object(r.toMsFromMpegTsClock)(J,!0)+"/"+Object(r.toMsFromMpegTsClock)(G,!0)+", delta: "+Object(r.toMsFromMpegTsClock)(q,!0)+" ms")}}u&&(G=Math.max(0,G));for(var $=0,le=0,ce=0;ce<z;ce++){for(var we=A[ce],Fe=we.units,Xe=Fe.length,$e=0,Ye=0;Ye<Xe;Ye++)$e+=Fe[Ye].data.length;le+=$e,$+=Xe,we.length=$e,we.dts=Math.max(we.dts,G),we.pts=Math.max(we.pts,we.dts,0),oe=Math.min(we.pts,oe),ae=Math.max(we.pts,ae)}ee=A[z-1].dts;var Ze=le+4*$+8,qe;try{qe=new Uint8Array(Ze)}catch(Tt){this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:_.ErrorTypes.MUX_ERROR,details:_.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Ze,reason:"fail allocating video mdat "+Ze});return}var Pe=new DataView(qe.buffer);Pe.setUint32(0,Ze),qe.set(m.default.types.mdat,4);for(var Ie=0;Ie<z;Ie++){for(var Je=A[Ie],rt=Je.units,ye=0,ue=0,he=rt.length;ue<he;ue++){var me=rt[ue],Ce=me.data,ge=me.data.byteLength;Pe.setUint32(U,ge),U+=4,qe.set(Ce,U),U+=ge,ye+=4+ge}if(Ie<z-1)L=A[Ie+1].dts-Je.dts;else{var Ee=this.config,Ae=Je.dts-A[Ie>0?Ie-1:Ie].dts;if(Ee.stretchShortVideoTrack&&this.nextAudioPts!==null){var De=Math.floor(Ee.maxBufferHole*P),Me=(F?oe+F*P:this.nextAudioPts)-Je.pts;Me>De?(L=Me-Ae,L<0&&(L=Ae),e.logger.log("[mp4-remuxer]: It is approximately "+Me/90+" ms to the next segment; using duration "+L/90+" ms for the last video frame.")):L=Ae}else L=Ae}var He=Math.round(Je.pts-Je.dts);X.push(new b(Je.key,L,ye,He))}if(X.length&&f&&f<70){var nt=X[0].flags;nt.dependsOn=2,nt.isNonSync=0}console.assert(L!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=B=ee+L,this.isVideoContiguous=!0;var at=m.default.moof(x.sequenceNumber++,G,c({},x,{samples:X})),it="video",st={data1:at,data2:qe,startPTS:oe/P,endPTS:(ae+L)/P,startDTS:G/P,endDTS:B/P,type:it,hasAudio:!1,hasVideo:!0,nb:X.length,dropped:x.dropped};return x.samples=[],x.dropped=0,console.assert(qe.length,"MDAT length must not be zero"),st},R.remuxAudio=function(x,w,T,F,P){var A=x.inputTimeScale,X=x.samplerate?x.samplerate:A,z=A/X,O=x.isAAC?n:l,B=O*z,U=this._initPTS,L=!x.isAAC&&this.typeSupported.mpeg,G=[],ee=x.samples,oe=L?0:8,ae=this.nextAudioPts||-1,be=w*A;if(this.isAudioContiguous=T=T||ee.length&&ae>0&&(F&&Math.abs(be-ae)<9e3||Math.abs(s(ee[0].pts-U,be)-ae)<20*B),ee.forEach(function(Ce){Ce.pts=s(Ce.pts-U,be)}),!T||ae<0){if(ee=ee.filter(function(Ce){return Ce.pts>=0}),!ee.length)return;P===0?ae=0:F?ae=Math.max(0,be):ae=ee[0].pts}if(x.isAAC)for(var _e=P!==void 0,fe=this.config.maxAudioFramesDrift,Re=0,Oe=ae;Re<ee.length;Re++){var de=ee[Re],te=de.pts,W=te-Oe,Y=Math.abs(1e3*W/A);if(W<=-fe*B&&_e)Re===0&&(e.logger.warn("Audio frame @ "+(te/A).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*W/A)+" ms."),this.nextAudioPts=ae=Oe=te);else if(W>=fe*B&&Y<i&&_e){var V=Math.round(W/B);Oe=te-V*B,Oe<0&&(V--,Oe+=B),Re===0&&(this.nextAudioPts=ae=Oe),e.logger.warn("[mp4-remuxer]: Injecting "+V+" audio frame @ "+(Oe/A).toFixed(3)+"s due to "+Math.round(1e3*W/A)+" ms gap.");for(var Q=0;Q<V;Q++){var q=Math.max(Oe,0),ie=v.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);ie||(e.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ie=de.unit.subarray()),ee.splice(Re,0,{unit:ie,pts:q}),Oe+=B,Re++}}de.pts=Oe,Oe+=B}for(var ne=null,J=null,$,le=0,ce=ee.length;ce--;)le+=ee[ce].unit.byteLength;for(var we=0,Fe=ee.length;we<Fe;we++){var Xe=ee[we],$e=Xe.unit,Ye=Xe.pts;if(J!==null){var Ze=G[we-1];Ze.duration=Math.round((Ye-J)/z)}else if(T&&x.isAAC&&(Ye=ae),ne=Ye,le>0){le+=oe;try{$=new Uint8Array(le)}catch(Ce){this.observer.emit(C.Events.ERROR,C.Events.ERROR,{type:_.ErrorTypes.MUX_ERROR,details:_.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:le,reason:"fail allocating audio mdat "+le});return}if(!L){var qe=new DataView($.buffer);qe.setUint32(0,le),$.set(m.default.types.mdat,4)}}else return;$.set($e,oe);var Pe=$e.byteLength;oe+=Pe,G.push(new b(!0,O,Pe,0)),J=Ye}var Ie=G.length;if(!Ie)return;var Je=G[G.length-1];this.nextAudioPts=ae=J+z*Je.duration;var rt=L?new Uint8Array(0):m.default.moof(x.sequenceNumber++,ne/z,c({},x,{samples:G}));x.samples=[];var ye=ne/A,ue=ae/A,he="audio",me={data1:rt,data2:$,startPTS:ye,endPTS:ue,startDTS:ye,endDTS:ue,type:he,hasAudio:!0,hasVideo:!1,nb:Ie};return this.isAudioContiguous=!0,console.assert($.length,"MDAT length must not be zero"),me},R.remuxEmptyAudio=function(x,w,T,F){var P=x.inputTimeScale,A=x.samplerate?x.samplerate:P,X=P/A,z=this.nextAudioPts,O=(z!==null?z:F.startDTS*P)+this._initDTS,B=F.endDTS*P+this._initDTS,U=X*n,L=Math.ceil((B-O)/U),G=v.default.getSilentFrame(x.manifestCodec||x.codec,x.channelCount);if(e.logger.warn("[mp4-remuxer]: remux empty Audio"),!G){e.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ee=[],oe=0;oe<L;oe++){var ae=O+oe*U;ee.push({unit:G,pts:ae,dts:ae})}return x.samples=ee,this.remuxAudio(x,w,T,!1)},R.remuxID3=function(x,w){var T=x.samples.length;if(!T)return;for(var F=x.inputTimeScale,P=this._initPTS,A=this._initDTS,X=0;X<T;X++){var z=x.samples[X];z.pts=s(z.pts-P,w*F)/F,z.dts=s(z.dts-A,w*F)/F}var O=x.samples;return x.samples=[],{samples:O}},R.remuxText=function(x,w){var T=x.samples.length;if(!T)return;for(var F=x.inputTimeScale,P=this._initPTS,A=0;A<T;A++){var X=x.samples[A];X.pts=s(X.pts-P,w*F)/F}x.samples.sort(function(O,B){return O.pts-B.pts});var z=x.samples;return x.samples=[],{samples:z}},D}();function s(D,R){var y;if(R===null)return D;for(R<D?y=-8589934592:y=8589934592;Math.abs(D-R)>4294967296;)D+=y;return D}function E(D){for(var R=0;R<D.length;R++)if(D[R].key)return R;return-1}var b=function(R,y,x,w){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=y,this.size=x,this.cts=w,this.flags=new p(R)},p=function(R){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=R?2:1,this.isNonSync=R?0:1}},"./src/remux/passthrough-remuxer.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/polyfills/number.ts"),v=S("./src/utils/mp4-tools.ts"),m=S("./src/loader/fragment.ts"),C=S("./src/utils/logger.ts"),_=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 c=r.prototype;return c.destroy=function(){},c.resetTimeStamp=function(n){this.initPTS=n,this.lastEndDTS=null},c.resetNextTimestamp=function(){this.lastEndDTS=null},c.resetInitSegment=function(n,l,f){this.audioCodec=l,this.videoCodec=f,this.generateInitSegment(n),this.emitInitSegment=!0},c.generateInitSegment=function(n){var l=this.audioCodec,f=this.videoCodec;if(!n||!n.byteLength){this.initTracks=void 0,this.initData=void 0;return}var d=this.initData=Object(v.parseInitSegment)(n);l||(l=h(d.audio,m.ElementaryStreamTypes.AUDIO)),f||(f=h(d.video,m.ElementaryStreamTypes.VIDEO));var u={};d.audio&&d.video?u.audiovideo={container:"video/mp4",codec:l+","+f,initSegment:n,id:"main"}:d.audio?u.audio={container:"audio/mp4",codec:l,initSegment:n,id:"audio"}:d.video?u.video={container:"video/mp4",codec:f,initSegment:n,id:"main"}:C.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=u},c.remux=function(n,l,f,d,u){var o=this.initPTS,s=this.lastEndDTS,E={audio:void 0,video:void 0,text:d,id3:f,initSegment:void 0};Object(k.isFiniteNumber)(s)||(s=this.lastEndDTS=u||0);var b=l.samples;if(!b||!b.length)return E;var p={initPTS:void 0,timescale:1},D=this.initData;if((!D||!D.length)&&(this.generateInitSegment(b),D=this.initData),!D||!D.length)return C.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),E;this.emitInitSegment&&(p.tracks=this.initTracks,this.emitInitSegment=!1),Object(k.isFiniteNumber)(o)||(this.initPTS=p.initPTS=o=e(D,b,s));var R=Object(v.getDuration)(b,D),y=s,x=R+y;Object(v.offsetStartDTS)(D,b,o),R>0?this.lastEndDTS=x:(C.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var w=!!D.audio,T=!!D.video,F="";w&&(F+="audio"),T&&(F+="video");var P={data1:b,startPTS:y,startDTS:y,endPTS:x,endDTS:x,type:F,hasAudio:w,hasVideo:T,nb:1,dropped:0};return E.audio=P.type==="audio"?P:void 0,E.video=P.type!=="audio"?P:void 0,E.text=d,E.id3=f,E.initSegment=p,E},r}(),e=function(c,i,n){return Object(v.getStartDTS)(c,i)-n};function h(r,c){var i=r==null?void 0:r.codec;return i&&i.length>4?i:i==="hvc1"?"hvc1.1.c.L120.90":i==="av01"?"av01.0.04M.08":i==="avc1"||c===m.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}g.default=_},"./src/task-loop.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return k});var k=function(){function v(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var m=v.prototype;return m.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},m.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},m.onHandlerDestroyed=function(){},m.hasInterval=function(){return!!this._tickInterval},m.hasNextTick=function(){return!!this._tickTimer},m.setInterval=function(_){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,_),!0)},m.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},m.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},m.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},m.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},m.doTick=function(){},v}()},"./src/types/cmcd.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"CMCDVersion",function(){return k}),S.d(g,"CMCDObjectType",function(){return v}),S.d(g,"CMCDStreamingFormat",function(){return m}),S.d(g,"CMCDStreamType",function(){return C});var k=1,v;(function(_){_.MANIFEST="m",_.AUDIO="a",_.VIDEO="v",_.MUXED="av",_.INIT="i",_.CAPTION="c",_.TIMED_TEXT="tt",_.KEY="k",_.OTHER="o"})(v||(v={}));var m;(function(_){_.DASH="d",_.HLS="h",_.SMOOTH="s",_.OTHER="o"})(m||(m={}));var C;(function(_){_.VOD="v",_.LIVE="l"})(C||(C={}))},"./src/types/level.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"HlsSkip",function(){return m}),S.d(g,"getSkipValue",function(){return C}),S.d(g,"HlsUrlParameters",function(){return _}),S.d(g,"Level",function(){return e});function k(h,r){for(var c=0;c<r.length;c++){var i=r[c];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(h,i.key,i)}}function v(h,r,c){return r&&k(h.prototype,r),c&&k(h,c),h}var m;(function(h){h.No="",h.Yes="YES",h.v2="v2"})(m||(m={}));function C(h,r){var c=h.canSkipUntil,i=h.canSkipDateRanges,n=h.endSN,l=r!==void 0?r-n:0;return c&&l<c?i?m.v2:m.Yes:m.No}var _=function(){function h(c,i,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=c,this.part=i,this.skip=n}var r=h.prototype;return r.addDirectives=function(i){var n=new self.URL(i);return this.msn!==void 0&&n.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&n.searchParams.set("_HLS_part",this.part.toString()),this.skip&&n.searchParams.set("_HLS_skip",this.skip),n.toString()},h}(),e=function(){function h(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(c){return c}).join(",").replace(/\.[^.,]+/g,"")}return v(h,[{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(c){var i=c%this.url.length;this._urlId!==i&&(this.details=void 0,this._urlId=i)}}]),h}()},"./src/types/loader.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"PlaylistContextType",function(){return k}),S.d(g,"PlaylistLevelType",function(){return v});var k;(function(m){m.MANIFEST="manifest",m.LEVEL="level",m.AUDIO_TRACK="audioTrack",m.SUBTITLE_TRACK="subtitleTrack"})(k||(k={}));var v;(function(m){m.MAIN="main",m.AUDIO="audio",m.SUBTITLE="subtitle"})(v||(v={}))},"./src/types/transmuxer.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"ChunkMetadata",function(){return k});var k=function(C,_,e,h,r,c){h===void 0&&(h=0),r===void 0&&(r=-1),c===void 0&&(c=!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=v(),this.buffering={audio:v(),video:v(),audiovideo:v()},this.level=C,this.sn=_,this.id=e,this.size=h,this.part=r,this.partial=c};function v(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"AttrList",function(){return m});var k=/^(\d+)x(\d+)$/,v=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,m=function(){function C(e){typeof e=="string"&&(e=C.parseAttrList(e));for(var h in e)e.hasOwnProperty(h)&&(this[h]=e[h])}var _=C.prototype;return _.decimalInteger=function(h){var r=parseInt(this[h],10);return r>Number.MAX_SAFE_INTEGER?Infinity:r},_.hexadecimalInteger=function(h){if(this[h]){var r=(this[h]||"0x").slice(2);r=(r.length&1?"0":"")+r;for(var c=new Uint8Array(r.length/2),i=0;i<r.length/2;i++)c[i]=parseInt(r.slice(i*2,i*2+2),16);return c}else return null},_.hexadecimalIntegerAsNumber=function(h){var r=parseInt(this[h],16);return r>Number.MAX_SAFE_INTEGER?Infinity:r},_.decimalFloatingPoint=function(h){return parseFloat(this[h])},_.optionalFloat=function(h,r){var c=this[h];return c?parseFloat(c):r},_.enumeratedString=function(h){return this[h]},_.bool=function(h){return this[h]==="YES"},_.decimalResolution=function(h){var r=k.exec(this[h]);return r===null?void 0:{width:parseInt(r[1],10),height:parseInt(r[2],10)}},C.parseAttrList=function(h){var r,c={},i='"';for(v.lastIndex=0;(r=v.exec(h))!==null;){var n=r[2];n.indexOf(i)===0&&n.lastIndexOf(i)===n.length-1&&(n=n.slice(1,-1)),c[r[1]]=n}return c},C}()},"./src/utils/binary-search.ts":function(N,g,S){"use strict";S.r(g);var k={search:function(m,C){for(var _=0,e=m.length-1,h=null,r=null;_<=e;){h=(_+e)/2|0,r=m[h];var c=C(r);if(c>0)_=h+1;else if(c<0)e=h-1;else return r}return null}};g.default=k},"./src/utils/buffer-helper.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"BufferHelper",function(){return m});var k=S("./src/utils/logger.ts"),v={length:0,start:function(){return 0},end:function(){return 0}},m=function(){function C(){}return C.isBuffered=function(e,h){try{if(e){for(var r=C.getBuffered(e),c=0;c<r.length;c++)if(h>=r.start(c)&&h<=r.end(c))return!0}}catch(i){}return!1},C.bufferInfo=function(e,h,r){try{if(e){var c=C.getBuffered(e),i=[],n;for(n=0;n<c.length;n++)i.push({start:c.start(n),end:c.end(n)});return this.bufferedInfo(i,h,r)}}catch(l){}return{len:0,start:h,end:h,nextStart:void 0}},C.bufferedInfo=function(e,h,r){h=Math.max(0,h),e.sort(function(p,D){var R=p.start-D.start;return R||D.end-p.end});var c=[];if(r)for(var i=0;i<e.length;i++){var n=c.length;if(n){var l=c[n-1].end;e[i].start-l<r?e[i].end>l&&(c[n-1].end=e[i].end):c.push(e[i])}else c.push(e[i])}else c=e;for(var f=0,d,u=h,o=h,s=0;s<c.length;s++){var E=c[s].start,b=c[s].end;if(h+r>=E&&h<b)u=E,o=b,f=o-h;else if(h+r<E){d=E;break}}return{len:f,start:u||0,end:o||0,nextStart:d}},C.getBuffered=function(e){try{return e.buffered}catch(h){return k.logger.log("failed to get media.buffered",h),v}},C}()},"./src/utils/cea-608-parser.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"Row",function(){return o}),S.d(g,"CaptionScreen",function(){return s});var k=S("./src/utils/logger.ts"),v={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},m=function(x){var w=x;return v.hasOwnProperty(x)&&(w=v[x]),String.fromCharCode(w)},C=15,_=100,e={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},h={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},c={25:2,26:4,29:6,30:8,31:10,27:13,28:15},i=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],n;(function(y){y[y.ERROR=0]="ERROR",y[y.TEXT=1]="TEXT",y[y.WARNING=2]="WARNING",y[y.INFO=2]="INFO",y[y.DEBUG=3]="DEBUG",y[y.DATA=3]="DATA"})(n||(n={}));var l=function(){function y(){this.time=null,this.verboseLevel=n.ERROR}var x=y.prototype;return x.log=function(T,F){this.verboseLevel>=T&&k.logger.log(this.time+" ["+T+"] "+F)},y}(),f=function(x){for(var w=[],T=0;T<x.length;T++)w.push(x[T].toString(16));return w},d=function(){function y(w,T,F,P,A){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=w||"white",this.underline=T||!1,this.italics=F||!1,this.background=P||"black",this.flash=A||!1}var x=y.prototype;return x.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},x.setStyles=function(T){for(var F=["foreground","underline","italics","background","flash"],P=0;P<F.length;P++){var A=F[P];T.hasOwnProperty(A)&&(this[A]=T[A])}},x.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},x.equals=function(T){return this.foreground===T.foreground&&this.underline===T.underline&&this.italics===T.italics&&this.background===T.background&&this.flash===T.flash},x.copy=function(T){this.foreground=T.foreground,this.underline=T.underline,this.italics=T.italics,this.background=T.background,this.flash=T.flash},x.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},y}(),u=function(){function y(w,T,F,P,A,X){this.uchar=void 0,this.penState=void 0,this.uchar=w||" ",this.penState=new d(T,F,P,A,X)}var x=y.prototype;return x.reset=function(){this.uchar=" ",this.penState.reset()},x.setChar=function(T,F){this.uchar=T,this.penState.copy(F)},x.setPenState=function(T){this.penState.copy(T)},x.equals=function(T){return this.uchar===T.uchar&&this.penState.equals(T.penState)},x.copy=function(T){this.uchar=T.uchar,this.penState.copy(T.penState)},x.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},y}(),o=function(){function y(w){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var T=0;T<_;T++)this.chars.push(new u);this.logger=w,this.pos=0,this.currPenState=new d}var x=y.prototype;return x.equals=function(T){for(var F=!0,P=0;P<_;P++)if(!this.chars[P].equals(T.chars[P])){F=!1;break}return F},x.copy=function(T){for(var F=0;F<_;F++)this.chars[F].copy(T.chars[F])},x.isEmpty=function(){for(var T=!0,F=0;F<_;F++)if(!this.chars[F].isEmpty()){T=!1;break}return T},x.setCursor=function(T){this.pos!==T&&(this.pos=T),this.pos<0?(this.logger.log(n.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>_&&(this.logger.log(n.DEBUG,"Too large cursor position "+this.pos),this.pos=_)},x.moveCursor=function(T){var F=this.pos+T;if(T>1)for(var P=this.pos+1;P<F+1;P++)this.chars[P].setPenState(this.currPenState);this.setCursor(F)},x.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},x.insertChar=function(T){T>=144&&this.backSpace();var F=m(T);if(this.pos>=_){this.logger.log(n.ERROR,"Cannot insert "+T.toString(16)+" ("+F+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(F,this.currPenState),this.moveCursor(1)},x.clearFromPos=function(T){var F;for(F=T;F<_;F++)this.chars[F].reset()},x.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},x.clearToEndOfRow=function(){this.clearFromPos(this.pos)},x.getTextString=function(){for(var T=[],F=!0,P=0;P<_;P++){var A=this.chars[P].uchar;A!==" "&&(F=!1),T.push(A)}return F?"":T.join("")},x.setPenStyles=function(T){this.currPenState.setStyles(T);var F=this.chars[this.pos];F.setPenState(this.currPenState)},y}(),s=function(){function y(w){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var T=0;T<C;T++)this.rows.push(new o(w));this.logger=w,this.currRow=C-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var x=y.prototype;return x.reset=function(){for(var T=0;T<C;T++)this.rows[T].clear();this.currRow=C-1},x.equals=function(T){for(var F=!0,P=0;P<C;P++)if(!this.rows[P].equals(T.rows[P])){F=!1;break}return F},x.copy=function(T){for(var F=0;F<C;F++)this.rows[F].copy(T.rows[F])},x.isEmpty=function(){for(var T=!0,F=0;F<C;F++)if(!this.rows[F].isEmpty()){T=!1;break}return T},x.backSpace=function(){var T=this.rows[this.currRow];T.backSpace()},x.clearToEndOfRow=function(){var T=this.rows[this.currRow];T.clearToEndOfRow()},x.insertChar=function(T){var F=this.rows[this.currRow];F.insertChar(T)},x.setPen=function(T){var F=this.rows[this.currRow];F.setPenStyles(T)},x.moveCursor=function(T){var F=this.rows[this.currRow];F.moveCursor(T)},x.setCursor=function(T){this.logger.log(n.INFO,"setCursor: "+T);var F=this.rows[this.currRow];F.setCursor(T)},x.setPAC=function(T){this.logger.log(n.INFO,"pacData = "+JSON.stringify(T));var F=T.row-1;if(this.nrRollUpRows&&F<this.nrRollUpRows-1&&(F=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==F){for(var P=0;P<C;P++)this.rows[P].clear();var A=this.currRow+1-this.nrRollUpRows,X=this.lastOutputScreen;if(X){var z=X.rows[A].cueStartTime,O=this.logger.time;if(z&&O!==null&&z<O)for(var B=0;B<this.nrRollUpRows;B++)this.rows[F-this.nrRollUpRows+B+1].copy(X.rows[A+B])}}this.currRow=F;var U=this.rows[this.currRow];if(T.indent!==null){var L=T.indent,G=Math.max(L-1,0);U.setCursor(T.indent),T.color=U.chars[G].penState.foreground}var ee={foreground:T.color,underline:T.underline,italics:T.italics,background:"black",flash:!1};this.setPen(ee)},x.setBkgData=function(T){this.logger.log(n.INFO,"bkgData = "+JSON.stringify(T)),this.backSpace(),this.setPen(T),this.insertChar(32)},x.setRollUpRows=function(T){this.nrRollUpRows=T},x.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(n.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(n.TEXT,this.getDisplayText());var T=this.currRow+1-this.nrRollUpRows,F=this.rows.splice(T,1)[0];F.clear(),this.rows.splice(this.currRow,0,F),this.logger.log(n.INFO,"Rolling up")},x.getDisplayText=function(T){T=T||!1;for(var F=[],P="",A=-1,X=0;X<C;X++){var z=this.rows[X].getTextString();z&&(A=X+1,T?F.push("Row "+A+": '"+z+"'"):F.push(z.trim()))}return F.length>0&&(T?P="["+F.join(" | ")+"]":P=F.join(`
|
|
|
`)),P},x.getTextAndFormat=function(){return this.rows},y}(),E=function(){function y(w,T,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=w,this.outputFilter=T,this.mode=null,this.verbose=0,this.displayedMemory=new s(F),this.nonDisplayedMemory=new s(F),this.lastOutputScreen=new s(F),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=F}var x=y.prototype;return x.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[C-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},x.getHandler=function(){return this.outputFilter},x.setHandler=function(T){this.outputFilter=T},x.setPAC=function(T){this.writeScreen.setPAC(T)},x.setBkgData=function(T){this.writeScreen.setBkgData(T)},x.setMode=function(T){if(T===this.mode)return;this.mode=T,this.logger.log(n.INFO,"MODE="+T),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=T},x.insertChars=function(T){for(var F=0;F<T.length;F++)this.writeScreen.insertChar(T[F]);var P=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(n.INFO,P+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(n.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},x.ccRCL=function(){this.logger.log(n.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},x.ccBS=function(){if(this.logger.log(n.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},x.ccAOF=function(){},x.ccAON=function(){},x.ccDER=function(){this.logger.log(n.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},x.ccRU=function(T){this.logger.log(n.INFO,"RU("+T+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(T)},x.ccFON=function(){this.logger.log(n.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},x.ccRDC=function(){this.logger.log(n.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},x.ccTR=function(){this.logger.log(n.INFO,"TR"),this.setMode("MODE_TEXT")},x.ccRTD=function(){this.logger.log(n.INFO,"RTD"),this.setMode("MODE_TEXT")},x.ccEDM=function(){this.logger.log(n.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},x.ccCR=function(){this.logger.log(n.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},x.ccENM=function(){this.logger.log(n.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},x.ccEOC=function(){if(this.logger.log(n.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var T=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=T,this.writeScreen=this.nonDisplayedMemory,this.logger.log(n.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},x.ccTO=function(T){this.logger.log(n.INFO,"TO("+T+") - Tab Offset"),this.writeScreen.moveCursor(T)},x.ccMIDROW=function(T){var F={flash:!1};if(F.underline=T%2===1,F.italics=T>=46,F.italics)F.foreground="white";else{var P=Math.floor(T/2)-16,A=["white","green","blue","cyan","red","yellow","magenta"];F.foreground=A[P]}this.logger.log(n.INFO,"MIDROW: "+JSON.stringify(F)),this.writeScreen.setPen(F)},x.outputDataUpdate=function(T){T===void 0&&(T=!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),T&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:F),this.lastOutputScreen.copy(this.displayedMemory))},x.cueSplitAtTime=function(T){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,T,this.displayedMemory),this.cueStartTime=T))},y}(),b=function(){function y(w,T,F){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var P=new l;this.channels=[null,new E(w,T,P),new E(w+1,F,P)],this.cmdHistory=R(),this.logger=P}var x=y.prototype;return x.getHandler=function(T){return this.channels[T].getHandler()},x.setHandler=function(T,F){this.channels[T].setHandler(F)},x.addData=function(T,F){var P,A,X,z=!1;this.logger.time=T;for(var O=0;O<F.length;O+=2){if(A=F[O]&127,X=F[O+1]&127,A===0&&X===0)continue;if(this.logger.log(n.DATA,"["+f([F[O],F[O+1]])+"] -> ("+f([A,X])+")"),P=this.parseCmd(A,X),P||(P=this.parseMidrow(A,X)),P||(P=this.parsePAC(A,X)),P||(P=this.parseBackgroundAttributes(A,X)),!P&&(z=this.parseChars(A,X),z)){var B=this.currentChannel;if(B&&B>0){var U=this.channels[B];U.insertChars(z)}else this.logger.log(n.WARNING,"No channel found yet. TEXT-MODE?")}!P&&!z&&this.logger.log(n.WARNING,"Couldn't parse cleaned data "+f([A,X])+" orig: "+f([F[O],F[O+1]]))}},x.parseCmd=function(T,F){var P=this.cmdHistory,A=(T===20||T===28||T===21||T===29)&&F>=32&&F<=47,X=(T===23||T===31)&&F>=33&&F<=35;if(!(A||X))return!1;if(D(T,F,P))return p(null,null,P),this.logger.log(n.DEBUG,"Repeated command ("+f([T,F])+") is dropped"),!0;var z=T===20||T===21||T===23?1:2,O=this.channels[z];return T===20||T===21||T===28||T===29?F===32?O.ccRCL():F===33?O.ccBS():F===34?O.ccAOF():F===35?O.ccAON():F===36?O.ccDER():F===37?O.ccRU(2):F===38?O.ccRU(3):F===39?O.ccRU(4):F===40?O.ccFON():F===41?O.ccRDC():F===42?O.ccTR():F===43?O.ccRTD():F===44?O.ccEDM():F===45?O.ccCR():F===46?O.ccENM():F===47&&O.ccEOC():O.ccTO(F-32),p(T,F,P),this.currentChannel=z,!0},x.parseMidrow=function(T,F){var P=0;if((T===17||T===25)&&F>=32&&F<=47){if(T===17?P=1:P=2,P!==this.currentChannel)return this.logger.log(n.ERROR,"Mismatch channel in midrow parsing"),!1;var A=this.channels[P];return A?(A.ccMIDROW(F),this.logger.log(n.DEBUG,"MIDROW ("+f([T,F])+")"),!0):!1}return!1},x.parsePAC=function(T,F){var P,A=this.cmdHistory,X=(T>=17&&T<=23||T>=25&&T<=31)&&F>=64&&F<=127,z=(T===16||T===24)&&F>=64&&F<=95;if(!(X||z))return!1;if(D(T,F,A))return p(null,null,A),!0;var O=T<=23?1:2;F>=64&&F<=95?P=O===1?e[T]:r[T]:P=O===1?h[T]:c[T];var B=this.channels[O];return B?(B.setPAC(this.interpretPAC(P,F)),p(T,F,A),this.currentChannel=O,!0):!1},x.interpretPAC=function(T,F){var P,A={color:null,italics:!1,indent:null,underline:!1,row:T};return F>95?P=F-96:P=F-64,A.underline=(P&1)===1,P<=13?A.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(P/2)]:P<=15?(A.italics=!0,A.color="white"):A.indent=Math.floor((P-16)/2)*4,A},x.parseChars=function(T,F){var P,A=null,X=null;if(T>=25?(P=2,X=T-8):(P=1,X=T),X>=17&&X<=19){var z;X===17?z=F+80:X===18?z=F+112:z=F+144,this.logger.log(n.INFO,"Special char '"+m(z)+"' in channel "+P),A=[z]}else T>=32&&T<=127&&(A=F===0?[T]:[T,F]);if(A){var O=f(A);this.logger.log(n.DEBUG,"Char codes = "+O.join(",")),p(T,F,this.cmdHistory)}return A},x.parseBackgroundAttributes=function(T,F){var P=(T===16||T===24)&&F>=32&&F<=47,A=(T===23||T===31)&&F>=45&&F<=47;if(!(P||A))return!1;var X,z={};T===16||T===24?(X=Math.floor((F-32)/2),z.background=i[X],F%2===1&&(z.background=z.background+"_semi")):F===45?z.background="transparent":(z.foreground="black",F===47&&(z.underline=!0));var O=T<=23?1:2,B=this.channels[O];return B.setBkgData(z),p(T,F,this.cmdHistory),!0},x.reset=function(){for(var T=0;T<Object.keys(this.channels).length;T++){var F=this.channels[T];F&&F.reset()}this.cmdHistory=R()},x.cueSplitAtTime=function(T){for(var F=0;F<this.channels.length;F++){var P=this.channels[F];P&&P.cueSplitAtTime(T)}},y}();function p(y,x,w){w.a=y,w.b=x}function D(y,x,w){return w.a===y&&w.b===x}function R(){return{a:null,b:null}}g.default=b},"./src/utils/codecs.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"isCodecType",function(){return v}),S.d(g,"isCodecSupportedInMp4",function(){return m});var k={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 v(C,_){var e=k[_];return!!e&&e[C.slice(0,4)]===!0}function m(C,_){return MediaSource.isTypeSupported((_||"video")+'/mp4;codecs="'+C+'"')}},"./src/utils/cues.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/utils/vttparser.ts"),v=S("./src/utils/webvtt-parser.ts"),m=S("./src/utils/texttrack-utils.ts"),C=/\s/,_={newCue:function(h,r,c,i){for(var n=[],l,f,d,u,o,s=self.VTTCue||self.TextTrackCue,E=0;E<i.rows.length;E++)if(l=i.rows[E],d=!0,u=0,o="",!l.isEmpty()){for(var b=0;b<l.chars.length;b++)C.test(l.chars[b].uchar)&&d?u++:(o+=l.chars[b].uchar,d=!1);l.cueStartTime=r,r===c&&(c+=1e-4),u>=16?u--:u++;var p=Object(k.fixLineBreaks)(o.trim()),D=Object(v.generateCueId)(r,c,p);(!h||!h.cues||!h.cues.getCueById(D))&&(f=new s(r,c,p),f.id=D,f.line=E+1,f.align="left",f.position=10+Math.min(80,Math.floor(u*8/32)*10),n.push(f))}return h&&n.length&&(n.sort(function(R,y){return R.line==="auto"||y.line==="auto"?0:R.line>8&&y.line>8?y.line-R.line:R.line-y.line}),n.forEach(function(R){return Object(m.addCueToTrack)(h,R)})),n}};g.default=_},"./src/utils/discontinuities.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"findFirstFragWithCC",function(){return C}),S.d(g,"shouldAlignOnDiscontinuities",function(){return _}),S.d(g,"findDiscontinuousReferenceFrag",function(){return e}),S.d(g,"adjustSlidingStart",function(){return r}),S.d(g,"alignStream",function(){return c}),S.d(g,"alignPDT",function(){return n}),S.d(g,"alignFragmentByPDTDelta",function(){return l}),S.d(g,"alignMediaPlaylistByPDT",function(){return f});var k=S("./src/polyfills/number.ts"),v=S("./src/utils/logger.ts"),m=S("./src/controller/level-helper.ts");function C(d,u){for(var o=null,s=0,E=d.length;s<E;s++){var b=d[s];if(b&&b.cc===u){o=b;break}}return o}function _(d,u,o){return!!(u.details&&(o.endCC>o.startCC||d&&d.cc<o.startCC))}function e(d,u){var o=d.fragments,s=u.fragments;if(!s.length||!o.length){v.logger.log("No fragments to align");return}var E=C(o,s[0].cc);if(!E||E&&!E.startPTS){v.logger.log("No frag in previous level to align on");return}return E}function h(d,u){if(d){var o=d.start+u;d.start=d.startPTS=o,d.endPTS=o+d.duration}}function r(d,u){for(var o=u.fragments,s=0,E=o.length;s<E;s++)h(o[s],d);u.fragmentHint&&h(u.fragmentHint,d),u.alignedSliding=!0}function c(d,u,o){if(!u)return;i(d,o,u),!o.alignedSliding&&u.details&&n(o,u.details),!o.alignedSliding&&u.details&&!o.skippedSegments&&Object(m.adjustSliding)(u.details,o)}function i(d,u,o){if(_(d,o,u)){var s=e(o.details,u);s&&Object(k.isFiniteNumber)(s.start)&&(v.logger.log("Adjusting PTS using last level due to CC increase within current level "+u.url),r(s.start,u))}}function n(d,u){if(!u.fragments.length||!d.hasProgramDateTime||!u.hasProgramDateTime)return;var o=u.fragments[0].programDateTime,s=d.fragments[0].programDateTime,E=(s-o)/1e3+u.fragments[0].start;E&&Object(k.isFiniteNumber)(E)&&(v.logger.log("Adjusting PTS using programDateTime delta "+(s-o)+"ms, sliding:"+E.toFixed(3)+" "+d.url+" "),r(E,d))}function l(d,u){var o=d.programDateTime;if(!o)return;var s=(o-u)/1e3;d.start=d.startPTS=s,d.endPTS=s+d.duration}function f(d,u){if(!u.fragments.length||!d.hasProgramDateTime||!u.hasProgramDateTime)return;var o=u.fragments[0].programDateTime,s=u.fragments[0].start,E=o-s*1e3;d.fragments.forEach(function(b){l(b,E)}),d.fragmentHint&&l(d.fragmentHint,E),d.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/utils/ewma.ts"),v=function(){function m(_,e,h){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=h,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new k.default(_),this.fast_=new k.default(e)}var C=m.prototype;return C.update=function(e,h){var r=this.slow_,c=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new k.default(e,r.getEstimate(),r.getTotalWeight())),this.fast_.halfLife!==h&&(this.fast_=new k.default(h,c.getEstimate(),c.getTotalWeight()))},C.sample=function(e,h){e=Math.max(e,this.minDelayMs_);var r=8*h,c=e/1e3,i=r/c;this.fast_.sample(c,i),this.slow_.sample(c,i)},C.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},C.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},C.destroy=function(){},m}();g.default=v},"./src/utils/ewma.ts":function(N,g,S){"use strict";S.r(g);var k=function(){function v(C,_,e){_===void 0&&(_=0),e===void 0&&(e=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=C,this.alpha_=C?Math.exp(Math.log(.5)/C):0,this.estimate_=_,this.totalWeight_=e}var m=v.prototype;return m.sample=function(_,e){var h=Math.pow(this.alpha_,_);this.estimate_=e*(1-h)+h*this.estimate_,this.totalWeight_+=_},m.getTotalWeight=function(){return this.totalWeight_},m.getEstimate=function(){if(this.alpha_){var _=1-Math.pow(this.alpha_,this.totalWeight_);if(_)return this.estimate_/_}return this.estimate_},v}();g.default=k},"./src/utils/fetch-loader.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"fetchSupported",function(){return l});var k=S("./src/polyfills/number.ts"),v=S("./src/loader/load-stats.ts"),m=S("./src/demux/chunk-cache.ts");function C(s,E){s.prototype=Object.create(E.prototype),s.prototype.constructor=s,c(s,E)}function _(s){var E=typeof Map=="function"?new Map:void 0;return _=function(p){if(p===null||!r(p))return p;if(typeof p!="function")throw new TypeError("Super expression must either be null or a function");if(typeof E!="undefined"){if(E.has(p))return E.get(p);E.set(p,D)}function D(){return e(p,arguments,i(this).constructor)}return D.prototype=Object.create(p.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),c(D,p)},_(s)}function e(s,E,b){return h()?e=Reflect.construct:e=function(D,R,y){var x=[null];x.push.apply(x,R);var w=Function.bind.apply(D,x),T=new w;return y&&c(T,y.prototype),T},e.apply(null,arguments)}function h(){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(s){return!1}}function r(s){return Function.toString.call(s).indexOf("[native code]")!==-1}function c(s,E){return c=Object.setPrototypeOf||function(p,D){return p.__proto__=D,p},c(s,E)}function i(s){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},i(s)}function n(){return n=Object.assign||function(s){for(var E=1;E<arguments.length;E++){var b=arguments[E];for(var p in b)Object.prototype.hasOwnProperty.call(b,p)&&(s[p]=b[p])}return s},n.apply(this,arguments)}function l(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(s){}return!1}var f=function(){function s(b){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=b.fetchSetup||u,this.controller=new self.AbortController,this.stats=new v.LoadStats}var E=s.prototype;return E.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},E.abortInternal=function(){var p=this.response;(!p||!p.ok)&&(this.stats.aborted=!0,this.controller.abort())},E.abort=function(){var p;this.abortInternal(),(p=this.callbacks)!==null&&p!==void 0&&p.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},E.load=function(p,D,R){var y=this,x=this.stats;if(x.loading.start)throw new Error("Loader can only be used once.");x.loading.start=self.performance.now();var w=d(p,this.controller.signal),T=R.onProgress,F=p.responseType==="arraybuffer",P=F?"byteLength":"length";this.context=p,this.config=D,this.callbacks=R,this.request=this.fetchSetup(p,w),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){y.abortInternal(),R.onTimeout(x,p,y.response)},D.timeout),self.fetch(this.request).then(function(A){if(y.response=y.loader=A,!A.ok){var X=A.status,z=A.statusText;throw new o(z||"fetch, bad network response",X,A)}return x.loading.first=Math.max(self.performance.now(),x.loading.start),x.total=parseInt(A.headers.get("Content-Length")||"0"),T&&Object(k.isFiniteNumber)(D.highWaterMark)?y.loadProgressively(A,x,p,D.highWaterMark,T):F?A.arrayBuffer():A.text()}).then(function(A){var X=y.response;self.clearTimeout(y.requestTimeout),x.loading.end=Math.max(self.performance.now(),x.loading.first),x.loaded=x.total=A[P];var z={url:X.url,data:A};T&&!Object(k.isFiniteNumber)(D.highWaterMark)&&T(x,p,A,X),R.onSuccess(z,x,p,X)}).catch(function(A){if(self.clearTimeout(y.requestTimeout),x.aborted)return;var X=A.code||0;R.onError({code:X,text:A.message},p,A.details)})},E.getCacheAge=function(){var p=null;if(this.response){var D=this.response.headers.get("age");p=D?parseFloat(D):null}return p},E.loadProgressively=function(p,D,R,y,x){y===void 0&&(y=0);var w=new m.default,T=p.body.getReader(),F=function P(){return T.read().then(function(A){if(A.done)return w.dataLength&&x(D,R,w.flush(),p),Promise.resolve(new ArrayBuffer(0));var X=A.value,z=X.length;return D.loaded+=z,z<y||w.dataLength?(w.push(X),w.dataLength>=y&&x(D,R,w.flush(),p)):x(D,R,X,p),P()}).catch(function(){return Promise.reject()})};return F()},s}();function d(s,E){var b={method:"GET",mode:"cors",credentials:"same-origin",signal:E,headers:new self.Headers(n({},s.headers))};return s.rangeEnd&&b.headers.set("Range","bytes="+s.rangeStart+"-"+String(s.rangeEnd-1)),b}function u(s,E){return new self.Request(s.url,E)}var o=function(s){C(E,s);function E(b,p,D){var R;return R=s.call(this,b)||this,R.code=void 0,R.details=void 0,R.code=p,R.details=D,R}return E}(_(Error));g.default=f},"./src/utils/imsc1-ttml-parser.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"IMSC1_CODEC",function(){return r}),S.d(g,"parseIMSC1",function(){return l});var k=S("./src/utils/mp4-tools.ts"),v=S("./src/utils/vttparser.ts"),m=S("./src/utils/vttcue.ts"),C=S("./src/demux/id3.ts"),_=S("./src/utils/timescale-conversion.ts"),e=S("./src/utils/webvtt-parser.ts");function h(){return h=Object.assign||function(y){for(var x=1;x<arguments.length;x++){var w=arguments[x];for(var T in w)Object.prototype.hasOwnProperty.call(w,T)&&(y[T]=w[T])}return y},h.apply(this,arguments)}var r="stpp.ttml.im1t",c=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,i=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,n={left:"start",center:"center",right:"end",start:"start",end:"end"};function l(y,x,w,T,F){var P=Object(k.findBox)(new Uint8Array(y),["mdat"]);if(P.length===0){F(new Error("Could not parse IMSC1 mdat"));return}var A=P[0],X=Object(C.utf8ArrayToStr)(new Uint8Array(y,A.start,A.end-A.start)),z=Object(_.toTimescaleFromScale)(x,1,w);try{T(f(X,z))}catch(O){F(O)}}function f(y,x){var w=new DOMParser,T=w.parseFromString(y,"text/xml"),F=T.getElementsByTagName("tt")[0];if(!F)throw new Error("Invalid ttml");var P={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},A=Object.keys(P).reduce(function(U,L){return U[L]=F.getAttribute("ttp:"+L)||P[L],U},{}),X=F.getAttribute("xml:space")!=="preserve",z=u(d(F,"styling","style")),O=u(d(F,"layout","region")),B=d(F,"body","[begin]");return[].map.call(B,function(U){var L=o(U,X);if(!L||!U.hasAttribute("begin"))return null;var G=p(U.getAttribute("begin"),A),ee=p(U.getAttribute("dur"),A),oe=p(U.getAttribute("end"),A);if(G===null)throw b(U);if(oe===null){if(ee===null)throw b(U);oe=G+ee}var ae=new m.default(G-x,oe-x,L);ae.id=Object(e.generateCueId)(ae.startTime,ae.endTime,ae.text);var be=O[U.getAttribute("region")],_e=z[U.getAttribute("style")];ae.position=10,ae.size=80;var fe=s(be,_e),Re=fe.textAlign;if(Re){var Oe=n[Re];Oe&&(ae.lineAlign=Oe),ae.align=Re}return h(ae,fe),ae}).filter(function(U){return U!==null})}function d(y,x,w){var T=y.getElementsByTagName(x)[0];return T?[].slice.call(T.querySelectorAll(w)):[]}function u(y){return y.reduce(function(x,w){var T=w.getAttribute("xml:id");return T&&(x[T]=w),x},{})}function o(y,x){return[].slice.call(y.childNodes).reduce(function(w,T,F){var P;return T.nodeName==="br"&&F?w+`
|
|
|
`:(P=T.childNodes)!==null&&P!==void 0&&P.length?o(T,x):x?w+T.textContent.trim().replace(/\s+/g," "):w+T.textContent},"")}function s(y,x){var w="http://www.w3.org/ns/ttml#styling",T=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return T.reduce(function(F,P){var A=E(x,w,P)||E(y,w,P);return A&&(F[P]=A),F},{})}function E(y,x,w){return y.hasAttributeNS(x,w)?y.getAttributeNS(x,w):null}function b(y){return new Error("Could not parse ttml timestamp "+y)}function p(y,x){if(!y)return null;var w=Object(v.parseTimeStamp)(y);return w===null&&(c.test(y)?w=D(y,x):i.test(y)&&(w=R(y,x))),w}function D(y,x){var w=c.exec(y),T=(w[4]|0)+(w[5]|0)/x.subFrameRate;return(w[1]|0)*3600+(w[2]|0)*60+(w[3]|0)+T/x.frameRate}function R(y,x){var w=i.exec(y),T=Number(w[1]),F=w[2];switch(F){case"h":return T*3600;case"m":return T*60;case"ms":return T*1e3;case"f":return T/x.frameRate;case"t":return T/x.tickRate}return T}},"./src/utils/logger.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"enableLogs",function(){return e}),S.d(g,"logger",function(){return h});var k=function(){},v={trace:k,debug:k,log:k,warn:k,info:k,error:k},m=v;function C(r){var c=self.console[r];return c?c.bind(self.console,"["+r+"] >"):k}function _(r){for(var c=arguments.length,i=new Array(c>1?c-1:0),n=1;n<c;n++)i[n-1]=arguments[n];i.forEach(function(l){m[l]=r[l]?r[l].bind(r):C(l)})}function e(r){if(self.console&&r===!0||typeof r=="object"){_(r,"debug","log","info","warn","error");try{m.log()}catch(c){m=v}}else m=v}var h=m},"./src/utils/mediakeys-helper.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"KeySystems",function(){return k}),S.d(g,"requestMediaKeySystemAccess",function(){return v});var k;(function(m){m.WIDEVINE="com.widevine.alpha",m.PLAYREADY="com.microsoft.playready"})(k||(k={}));var v=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"getMediaSource",function(){return k});function k(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"bin2str",function(){return _}),S.d(g,"readUint16",function(){return e}),S.d(g,"readUint32",function(){return h}),S.d(g,"writeUint32",function(){return r}),S.d(g,"findBox",function(){return c}),S.d(g,"parseSegmentIndex",function(){return i}),S.d(g,"parseInitSegment",function(){return n}),S.d(g,"getStartDTS",function(){return l}),S.d(g,"getDuration",function(){return f}),S.d(g,"computeRawDurationFromSamples",function(){return d}),S.d(g,"offsetStartDTS",function(){return u}),S.d(g,"segmentValidRange",function(){return o}),S.d(g,"appendUint8Array",function(){return s});var k=S("./src/utils/typed-array.ts"),v=S("./src/loader/fragment.ts"),m=Math.pow(2,32)-1,C=[].push;function _(E){return String.fromCharCode.apply(null,E)}function e(E,b){"data"in E&&(b+=E.start,E=E.data);var p=E[b]<<8|E[b+1];return p<0?65536+p:p}function h(E,b){"data"in E&&(b+=E.start,E=E.data);var p=E[b]<<24|E[b+1]<<16|E[b+2]<<8|E[b+3];return p<0?4294967296+p:p}function r(E,b,p){"data"in E&&(b+=E.start,E=E.data),E[b]=p>>24,E[b+1]=p>>16&255,E[b+2]=p>>8&255,E[b+3]=p&255}function c(E,b){var p=[];if(!b.length)return p;var D,R,y;"data"in E?(D=E.data,R=E.start,y=E.end):(D=E,R=0,y=D.byteLength);for(var x=R;x<y;){var w=h(D,x),T=_(D.subarray(x+4,x+8)),F=w>1?x+w:y;if(T===b[0])if(b.length===1)p.push({data:D,start:x+8,end:F});else{var P=c({data:D,start:x+8,end:F},b.slice(1));P.length&&C.apply(p,P)}x=F}return p}function i(E){var b=c(E,["moov"]),p=b[0],D=p?p.end:null,R=c(E,["sidx"]);if(!R||!R[0])return null;var y=[],x=R[0],w=x.data[0],T=w===0?8:16,F=h(x,T);T+=4;var P=0,A=0;w===0?T+=8:T+=16,T+=2;var X=x.end+A,z=e(x,T);T+=2;for(var O=0;O<z;O++){var B=T,U=h(x,B);B+=4;var L=U&2147483647,G=(U&2147483648)>>>31;if(G===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ee=h(x,B);B+=4,y.push({referenceSize:L,subsegmentDuration:ee,info:{duration:ee/F,start:X,end:X+L-1}}),X+=L,B+=4,T=B}return{earliestPresentationTime:P,timescale:F,version:w,referencesCount:z,references:y,moovEndOffset:D}}function n(E){for(var b=[],p=c(E,["moov","trak"]),D=0;D<p.length;D++){var R=p[D],y=c(R,["tkhd"])[0];if(y){var x=y.data[y.start],w=x===0?12:20,T=h(y,w),F=c(R,["mdia","mdhd"])[0];if(F){x=F.data[F.start],w=x===0?12:20;var P=h(F,w),A=c(R,["mdia","hdlr"])[0];if(A){var X=_(A.data.subarray(A.start+8,A.start+12)),z={soun:v.ElementaryStreamTypes.AUDIO,vide:v.ElementaryStreamTypes.VIDEO}[X];if(z){var O=c(R,["mdia","minf","stbl","stsd"])[0],B=void 0;O&&(B=_(O.data.subarray(O.start+12,O.start+16))),b[T]={timescale:P,type:z},b[z]={timescale:P,id:T,codec:B}}}}}}var U=c(E,["moov","mvex","trex"]);return U.forEach(function(L){var G=h(L,4),ee=b[G];ee&&(ee.default={duration:h(L,12),flags:h(L,20)})}),b}function l(E,b){return c(b,["moof","traf"]).reduce(function(p,D){var R=c(D,["tfdt"])[0],y=R.data[R.start],x=c(D,["tfhd"]).reduce(function(w,T){var F=h(T,4),P=E[F];if(P){var A=h(R,4);y===1&&(A*=Math.pow(2,32),A+=h(R,8));var X=P.timescale||9e4,z=A/X;if(isFinite(z)&&(w===null||z<w))return z}return w},null);return x!==null&&isFinite(x)&&(p===null||x<p)?x:p},null)||0}function f(E,b){for(var p=0,D=0,R=0,y=c(E,["moof","traf"]),x=0;x<y.length;x++){var w=y[x],T=c(w,["tfhd"])[0],F=h(T,4),P=b[F];if(!P)continue;var A=P.default,X=h(T,0)|(A==null?void 0:A.flags),z=A==null?void 0:A.duration;X&8&&(X&2?z=h(T,12):z=h(T,8));for(var O=P.timescale||9e4,B=c(w,["trun"]),U=0;U<B.length;U++){if(z){var L=h(B[U],4);p=z*L}else p=d(B[U]);P.type===v.ElementaryStreamTypes.VIDEO?D+=p/O:P.type===v.ElementaryStreamTypes.AUDIO&&(R+=p/O)}}if(D===0&&R===0){var G=i(E);if(G!=null&&G.references)return G.references.reduce(function(ee,oe){return ee+oe.info.duration||0},0)}return D||R}function d(E){var b=h(E,0),p=8;b&1&&(p+=4),b&4&&(p+=4);for(var D=0,R=h(E,4),y=0;y<R;y++){if(b&256){var x=h(E,p);D+=x,p+=4}b&512&&(p+=4),b&1024&&(p+=4),b&2048&&(p+=4)}return D}function u(E,b,p){c(b,["moof","traf"]).forEach(function(D){c(D,["tfhd"]).forEach(function(R){var y=h(R,4),x=E[y];if(!x)return;var w=x.timescale||9e4;c(D,["tfdt"]).forEach(function(T){var F=T.data[T.start],P=h(T,4);if(F===0)r(T,4,P-p*w);else{P*=Math.pow(2,32),P+=h(T,8),P-=p*w,P=Math.max(P,0);var A=Math.floor(P/(m+1)),X=Math.floor(P%(m+1));r(T,4,A),r(T,8,X)}})})})}function o(E){var b={valid:null,remainder:null},p=c(E,["moof"]);if(p){if(p.length<2)return b.remainder=E,b}else return b;var D=p[p.length-1];return b.valid=Object(k.sliceUint8)(E,0,D.start-8),b.remainder=Object(k.sliceUint8)(E,D.start-8),b}function s(E,b){var p=new Uint8Array(E.length+b.length);return p.set(E),p.set(b,E.length),p}},"./src/utils/output-filter.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"default",function(){return k});var k=function(){function v(C,_){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=C,this.trackName=_}var m=v.prototype;return m.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},m.newCue=function(_,e,h){(this.startTime===null||this.startTime>_)&&(this.startTime=_),this.endTime=e,this.screen=h,this.timelineController.createCaptionsTrack(this.trackName)},m.reset=function(){this.cueRanges=[]},v}()},"./src/utils/texttrack-utils.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"sendAddTrackEvent",function(){return v}),S.d(g,"addCueToTrack",function(){return m}),S.d(g,"clearCurrentCues",function(){return C}),S.d(g,"removeCuesInRange",function(){return _}),S.d(g,"getCuesInRange",function(){return h});var k=S("./src/utils/logger.ts");function v(r,c){var i;try{i=new Event("addtrack")}catch(n){i=document.createEvent("Event"),i.initEvent("addtrack",!1,!1)}i.track=r,c.dispatchEvent(i)}function m(r,c){var i=r.mode;if(i==="disabled"&&(r.mode="hidden"),r.cues&&!r.cues.getCueById(c.id))try{if(r.addCue(c),!r.cues.getCueById(c.id))throw new Error("addCue is failed for: "+c)}catch(l){k.logger.debug("[texttrack-utils]: "+l);var n=new self.TextTrackCue(c.startTime,c.endTime,c.text);n.id=c.id,r.addCue(n)}i==="disabled"&&(r.mode=i)}function C(r){var c=r.mode;if(c==="disabled"&&(r.mode="hidden"),r.cues)for(var i=r.cues.length;i--;)r.removeCue(r.cues[i]);c==="disabled"&&(r.mode=c)}function _(r,c,i){var n=r.mode;if(n==="disabled"&&(r.mode="hidden"),r.cues&&r.cues.length>0)for(var l=h(r.cues,c,i),f=0;f<l.length;f++)r.removeCue(l[f]);n==="disabled"&&(r.mode=n)}function e(r,c){if(c<r[0].startTime)return 0;var i=r.length-1;if(c>r[i].endTime)return-1;for(var n=0,l=i;n<=l;){var f=Math.floor((l+n)/2);if(c<r[f].startTime)l=f-1;else if(c>r[f].startTime&&n<i)n=f+1;else return f}return r[n].startTime-c<c-r[l].startTime?n:l}function h(r,c,i){var n=[],l=e(r,c);if(l>-1)for(var f=l,d=r.length;f<d;f++){var u=r[f];if(u.startTime>=c&&u.endTime<=i)n.push(u);else if(u.startTime>i)return n}return n}},"./src/utils/time-ranges.ts":function(N,g,S){"use strict";S.r(g);var k={toString:function(m){for(var C="",_=m.length,e=0;e<_;e++)C+="["+m.start(e).toFixed(3)+","+m.end(e).toFixed(3)+"]";return C}};g.default=k},"./src/utils/timescale-conversion.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"toTimescaleFromBase",function(){return v}),S.d(g,"toTimescaleFromScale",function(){return m}),S.d(g,"toMsFromMpegTsClock",function(){return C}),S.d(g,"toMpegTsClockFromTimescale",function(){return _});var k=9e4;function v(e,h,r,c){r===void 0&&(r=1),c===void 0&&(c=!1);var i=e*h*r;return c?Math.round(i):i}function m(e,h,r,c){return r===void 0&&(r=1),c===void 0&&(c=!1),v(e,h,1/r,c)}function C(e,h){return h===void 0&&(h=!1),v(e,1e3,1/k,h)}function _(e,h){return h===void 0&&(h=1),v(e,k,1/h)}},"./src/utils/typed-array.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"sliceUint8",function(){return k});function k(v,m,C){return Uint8Array.prototype.slice?v.slice(m,C):new Uint8Array(Array.prototype.slice.call(v,m,C))}},"./src/utils/vttcue.ts":function(N,g,S){"use strict";S.r(g),g.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var k=["","lr","rl"],v=["start","middle","end","left","right"];function m(r,c){if(typeof c!="string")return!1;if(!Array.isArray(r))return!1;var i=c.toLowerCase();return~r.indexOf(i)?i:!1}function C(r){return m(k,r)}function _(r){return m(v,r)}function e(r){for(var c=arguments.length,i=new Array(c>1?c-1:0),n=1;n<c;n++)i[n-1]=arguments[n];for(var l=1;l<arguments.length;l++){var f=arguments[l];for(var d in f)r[d]=f[d]}return r}function h(r,c,i){var n=this,l={enumerable:!0};n.hasBeenReset=!1;var f="",d=!1,u=r,o=c,s=i,E=null,b="",p=!0,D="auto",R="start",y=50,x="middle",w=50,T="middle";Object.defineProperty(n,"id",e({},l,{get:function(){return f},set:function(P){f=""+P}})),Object.defineProperty(n,"pauseOnExit",e({},l,{get:function(){return d},set:function(P){d=!!P}})),Object.defineProperty(n,"startTime",e({},l,{get:function(){return u},set:function(P){if(typeof P!="number")throw new TypeError("Start time must be set to a number.");u=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"endTime",e({},l,{get:function(){return o},set:function(P){if(typeof P!="number")throw new TypeError("End time must be set to a number.");o=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"text",e({},l,{get:function(){return s},set:function(P){s=""+P,this.hasBeenReset=!0}})),Object.defineProperty(n,"region",e({},l,{get:function(){return E},set:function(P){E=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"vertical",e({},l,{get:function(){return b},set:function(P){var A=C(P);if(A===!1)throw new SyntaxError("An invalid or illegal string was specified.");b=A,this.hasBeenReset=!0}})),Object.defineProperty(n,"snapToLines",e({},l,{get:function(){return p},set:function(P){p=!!P,this.hasBeenReset=!0}})),Object.defineProperty(n,"line",e({},l,{get:function(){return D},set:function(P){if(typeof P!="number"&&P!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");D=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"lineAlign",e({},l,{get:function(){return R},set:function(P){var A=_(P);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");R=A,this.hasBeenReset=!0}})),Object.defineProperty(n,"position",e({},l,{get:function(){return y},set:function(P){if(P<0||P>100)throw new Error("Position must be between 0 and 100.");y=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"positionAlign",e({},l,{get:function(){return x},set:function(P){var A=_(P);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");x=A,this.hasBeenReset=!0}})),Object.defineProperty(n,"size",e({},l,{get:function(){return w},set:function(P){if(P<0||P>100)throw new Error("Size must be between 0 and 100.");w=P,this.hasBeenReset=!0}})),Object.defineProperty(n,"align",e({},l,{get:function(){return T},set:function(P){var A=_(P);if(!A)throw new SyntaxError("An invalid or illegal string was specified.");T=A,this.hasBeenReset=!0}})),n.displayState=void 0}return h.prototype.getCueAsHTML=function(){var r=self.WebVTT;return r.convertCueToDOMTree(self,this.text)},h}()},"./src/utils/vttparser.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"parseTimeStamp",function(){return m}),S.d(g,"fixLineBreaks",function(){return c}),S.d(g,"VTTParser",function(){return i});var k=S("./src/utils/vttcue.ts"),v=function(){function n(){}var l=n.prototype;return l.decode=function(d,u){if(!d)return"";if(typeof d!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(d))},n}();function m(n){function l(d,u,o,s){return(d|0)*3600+(u|0)*60+(o|0)+parseFloat(s||0)}var f=n.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return f?parseFloat(f[2])>59?l(f[2],f[3],0,f[4]):l(f[1],f[2],f[3],f[4]):null}var C=function(){function n(){this.values=Object.create(null)}var l=n.prototype;return l.set=function(d,u){!this.get(d)&&u!==""&&(this.values[d]=u)},l.get=function(d,u,o){return o?this.has(d)?this.values[d]:u[o]:this.has(d)?this.values[d]:u},l.has=function(d){return d in this.values},l.alt=function(d,u,o){for(var s=0;s<o.length;++s)if(u===o[s]){this.set(d,u);break}},l.integer=function(d,u){/^-?\d+$/.test(u)&&this.set(d,parseInt(u,10))},l.percent=function(d,u){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(u)){var o=parseFloat(u);if(o>=0&&o<=100)return this.set(d,o),!0}return!1},n}();function _(n,l,f,d){var u=d?n.split(d):[n];for(var o in u){if(typeof u[o]!="string")continue;var s=u[o].split(f);if(s.length!==2)continue;var E=s[0],b=s[1];l(E,b)}}var e=new k.default(0,0,""),h=e.align==="middle"?"middle":"center";function r(n,l,f){var d=n;function u(){var E=m(n);if(E===null)throw new Error("Malformed timestamp: "+d);return n=n.replace(/^[^\sa-zA-Z-]+/,""),E}function o(E,b){var p=new C;_(E,function(y,x){var w;switch(y){case"region":for(var T=f.length-1;T>=0;T--)if(f[T].id===x){p.set(y,f[T].region);break}break;case"vertical":p.alt(y,x,["rl","lr"]);break;case"line":w=x.split(","),p.integer(y,w[0]),p.percent(y,w[0])&&p.set("snapToLines",!1),p.alt(y,w[0],["auto"]),w.length===2&&p.alt("lineAlign",w[1],["start",h,"end"]);break;case"position":w=x.split(","),p.percent(y,w[0]),w.length===2&&p.alt("positionAlign",w[1],["start",h,"end","line-left","line-right","auto"]);break;case"size":p.percent(y,x);break;case"align":p.alt(y,x,["start",h,"end","left","right"]);break}},/:/,/\s/),b.region=p.get("region",null),b.vertical=p.get("vertical","");var D=p.get("line","auto");D==="auto"&&e.line===-1&&(D=-1),b.line=D,b.lineAlign=p.get("lineAlign","start"),b.snapToLines=p.get("snapToLines",!0),b.size=p.get("size",100),b.align=p.get("align",h);var R=p.get("position","auto");R==="auto"&&e.position===50&&(R=b.align==="start"||b.align==="left"?0:b.align==="end"||b.align==="right"?100:50),b.position=R}function s(){n=n.replace(/^\s+/,"")}if(s(),l.startTime=u(),s(),n.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+d);n=n.substr(3),s(),l.endTime=u(),s(),o(n,l)}function c(n){return n.replace(/<br(?: \/)?>/gi,`
|
|
|
`)}var i=function(){function n(){this.state="INITIAL",this.buffer="",this.decoder=new v,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var l=n.prototype;return l.parse=function(d){var u=this;d&&(u.buffer+=u.decoder.decode(d,{stream:!0}));function o(){var R=u.buffer,y=0;for(R=c(R);y<R.length&&R[y]!=="\r"&&R[y]!==`
|
|
|
`;)++y;var x=R.substr(0,y);return R[y]==="\r"&&++y,R[y]===`
|
|
|
`&&++y,u.buffer=R.substr(y),x}function s(R){_(R,function(y,x){},/:/)}try{var E="";if(u.state==="INITIAL"){if(!/\r\n|\n/.test(u.buffer))return this;E=o();var b=E.match(/^()?WEBVTT([ \t].*)?$/);if(!b||!b[0])throw new Error("Malformed WebVTT signature.");u.state="HEADER"}for(var p=!1;u.buffer;){if(!/\r\n|\n/.test(u.buffer))return this;p?p=!1:E=o();switch(u.state){case"HEADER":/:/.test(E)?s(E):E||(u.state="ID");continue;case"NOTE":E||(u.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(E)){u.state="NOTE";break}if(!E)continue;if(u.cue=new k.default(0,0,""),u.state="CUE",E.indexOf("-->")===-1){u.cue.id=E;continue}case"CUE":if(!u.cue){u.state="BADCUE";continue}try{r(E,u.cue,u.regionList)}catch(R){u.cue=null,u.state="BADCUE";continue}u.state="CUETEXT";continue;case"CUETEXT":{var D=E.indexOf("-->")!==-1;if(!E||D&&(p=!0)){u.oncue&&u.cue&&u.oncue(u.cue),u.cue=null,u.state="ID";continue}if(u.cue===null)continue;u.cue.text&&(u.cue.text+=`
|
|
|
`),u.cue.text+=E}continue;case"BADCUE":E||(u.state="ID")}}}catch(R){u.state==="CUETEXT"&&u.cue&&u.oncue&&u.oncue(u.cue),u.cue=null,u.state=u.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},l.flush=function(){var d=this;try{if((d.cue||d.state==="HEADER")&&(d.buffer+=`
|
|
|
|
|
|
`,d.parse()),d.state==="INITIAL"||d.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(u){d.onparsingerror&&d.onparsingerror(u)}return d.onflush&&d.onflush(),this},n}()},"./src/utils/webvtt-parser.ts":function(N,g,S){"use strict";S.r(g),S.d(g,"generateCueId",function(){return i}),S.d(g,"parseWebVTT",function(){return l});var k=S("./src/polyfills/number.ts"),v=S("./src/utils/vttparser.ts"),m=S("./src/demux/id3.ts"),C=S("./src/utils/timescale-conversion.ts"),_=S("./src/remux/mp4-remuxer.ts"),e=/\r\n|\n\r|\n|\r/g,h=function(d,u,o){return o===void 0&&(o=0),d.substr(o,u.length)===u},r=function(d){var u=parseInt(d.substr(-3)),o=parseInt(d.substr(-6,2)),s=parseInt(d.substr(-9,2)),E=d.length>9?parseInt(d.substr(0,d.indexOf(":"))):0;if(!Object(k.isFiniteNumber)(u)||!Object(k.isFiniteNumber)(o)||!Object(k.isFiniteNumber)(s)||!Object(k.isFiniteNumber)(E))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+d);return u+=1e3*o,u+=60*1e3*s,u+=60*60*1e3*E,u},c=function(d){for(var u=5381,o=d.length;o;)u=u*33^d.charCodeAt(--o);return(u>>>0).toString()};function i(f,d,u){return c(f.toString())+c(d.toString())+c(u)}var n=function(d,u,o){var s=d[u],E=d[s.prevCC];if(!E||!E.new&&s.new){d.ccOffset=d.presentationOffset=s.start,s.new=!1;return}for(;(b=E)!==null&&b!==void 0&&b.new;){var b;d.ccOffset+=s.start-E.start,s.new=!1,s=E,E=d[s.prevCC]}d.presentationOffset=o};function l(f,d,u,o,s,E,b,p){var D=new v.VTTParser,R=Object(m.utf8ArrayToStr)(new Uint8Array(f)).trim().replace(e,`
|
|
|
`).split(`
|
|
|
`),y=[],x=Object(C.toMpegTsClockFromTimescale)(d,u),w="00:00.000",T=0,F=0,P,A=!0,X=!1;D.oncue=function(z){var O=o[s],B=o.ccOffset,U=(T-x)/9e4;if(O!=null&&O.new&&(F!==void 0?B=o.ccOffset=O.start:n(o,s,U)),U&&(B=U-o.presentationOffset),X){var L=z.endTime-z.startTime,G=Object(_.normalizePts)((z.startTime+B-F)*9e4,E*9e4)/9e4;z.startTime=G,z.endTime=G+L}var ee=z.text.trim();z.text=decodeURIComponent(encodeURIComponent(ee)),z.id||(z.id=i(z.startTime,z.endTime,ee)),z.endTime>0&&y.push(z)},D.onparsingerror=function(z){P=z},D.onflush=function(){if(P){p(P);return}b(y)},R.forEach(function(z){if(A)if(h(z,"X-TIMESTAMP-MAP=")){A=!1,X=!0,z.substr(16).split(",").forEach(function(O){h(O,"LOCAL:")?w=O.substr(6):h(O,"MPEGTS:")&&(T=parseInt(O.substr(7)))});try{F=r(w)/1e3}catch(O){X=!1,P=O}return}else z===""&&(A=!1);D.parse(z+`
|
|
|
`)}),D.flush()}},"./src/utils/xhr-loader.ts":function(N,g,S){"use strict";S.r(g);var k=S("./src/utils/logger.ts"),v=S("./src/loader/load-stats.ts"),m=/^age:\s*[\d.]+\s*$/m,C=function(){function _(h){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=h?h.xhrSetup:null,this.stats=new v.LoadStats,this.retryDelay=0}var e=_.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.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()))},e.abort=function(){var r;this.abortInternal(),(r=this.callbacks)!==null&&r!==void 0&&r.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(r,c,i){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=c,this.callbacks=i,this.retryDelay=c.retryDelay,this.loadInternal()},e.loadInternal=function(){var r=this.config,c=this.context;if(!r)return;var i=this.loader=new self.XMLHttpRequest,n=this.stats;n.loading.first=0,n.loaded=0;var l=this.xhrSetup;try{if(l)try{l(i,c.url)}catch(u){i.open("GET",c.url,!0),l(i,c.url)}i.readyState||i.open("GET",c.url,!0);var f=this.context.headers;if(f)for(var d in f)i.setRequestHeader(d,f[d])}catch(u){this.callbacks.onError({code:i.status,text:u.message},c,i);return}c.rangeEnd&&i.setRequestHeader("Range","bytes="+c.rangeStart+"-"+(c.rangeEnd-1)),i.onreadystatechange=this.readystatechange.bind(this),i.onprogress=this.loadprogress.bind(this),i.responseType=c.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),i.send()},e.readystatechange=function(){var r=this.context,c=this.loader,i=this.stats;if(!r||!c)return;var n=c.readyState,l=this.config;if(i.aborted)return;if(n>=2)if(self.clearTimeout(this.requestTimeout),i.loading.first===0&&(i.loading.first=Math.max(self.performance.now(),i.loading.start)),n===4){c.onreadystatechange=null,c.onprogress=null;var f=c.status;if(f>=200&&f<300){i.loading.end=Math.max(self.performance.now(),i.loading.first);var d,u;if(r.responseType==="arraybuffer"?(d=c.response,u=d.byteLength):(d=c.responseText,u=d.length),i.loaded=i.total=u,!this.callbacks)return;var o=this.callbacks.onProgress;if(o&&o(i,r,d,c),!this.callbacks)return;var s={url:c.responseURL,data:d};this.callbacks.onSuccess(s,i,r,c)}else i.retry>=l.maxRetry||f>=400&&f<499?(k.logger.error(f+" while loading "+r.url),this.callbacks.onError({code:f,text:c.statusText},r,c)):(k.logger.warn(f+" 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,l.maxRetryDelay),i.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),l.timeout)},e.loadtimeout=function(){k.logger.warn("timeout while loading "+this.context.url);var r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(r){var c=this.stats;c.loaded=r.loaded,r.lengthComputable&&(c.total=r.total)},e.getCacheAge=function(){var r=null;if(this.loader&&m.test(this.loader.getAllResponseHeaders())){var c=this.loader.getResponseHeader("age");r=c?parseFloat(c):null}return r},_}();g.default=C}}).default})},vHTk:function(H,Z,I){H.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},w7YG:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("ETIr"),I("cv67"),I("K3mO"),I("OLod"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.StreamCipher,v=g.algo,m=v.RC4=k.extend({_doReset:function(){for(var e=this._key,h=e.words,r=e.sigBytes,c=this._S=[],i=0;i<256;i++)c[i]=i;for(var i=0,n=0;i<256;i++){var l=i%r,f=h[l>>>2]>>>24-l%4*8&255;n=(n+c[i]+f)%256;var d=c[i];c[i]=c[n],c[n]=d}this._i=this._j=0},_doProcessBlock:function(e,h){e[h]^=C.call(this)},keySize:256/32,ivSize:0});function C(){for(var e=this._S,h=this._i,r=this._j,c=0,i=0;i<4;i++){h=(h+1)%256,r=(r+e[h])%256;var n=e[h];e[h]=e[r],e[r]=n,c|=e[(e[h]+e[r])%256]<<24-i*8}return this._i=h,this._j=r,c}g.RC4=k._createHelper(m);var _=v.RC4Drop=m.extend({cfg:m.cfg.extend({drop:192}),_doReset:function(){m._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)C.call(this)}});g.RC4Drop=k._createHelper(_)}(),N.RC4})},wCXF:function(H,Z,I){"use strict";I.d(Z,"a",function(){return $e});var N=I("rePB"),g=I("VTBJ"),S=I("KQm4"),k=I("U8pU"),v=I("ODXe"),m=I("q1tI"),C=I("TSYQ"),_=I.n(C),e=I("Gytx"),h=I.n(e),r=I("Kwbf"),c=I("t23M"),i=I("qx4F"),n=I("6eGT"),l=I("IBYe"),f=I("Ff2n"),d=I("c+Xe"),u=I("fyJ8"),o=I("biw7");function s(Pe,Ie,Je,rt,ye){var ue=Je[Pe]||{},he=Je[Ie]||{},me,Ce;ue.fixed==="left"?me=rt.left[Pe]:he.fixed==="right"&&(Ce=rt.right[Ie]);var ge=!1,Ee=!1,Ae=!1,De=!1,Me=Je[Ie+1],He=Je[Pe-1];if(ye==="rtl"){if(me!==void 0){var nt=He&&He.fixed==="left";De=!nt}else if(Ce!==void 0){var at=Me&&Me.fixed==="right";Ae=!at}}else if(me!==void 0){var it=Me&&Me.fixed==="left";ge=!it}else if(Ce!==void 0){var st=He&&He.fixed==="right";Ee=!st}return{fixLeft:me,fixRight:Ce,lastFixLeft:ge,firstFixRight:Ee,lastFixRight:Ae,firstFixLeft:De,isSticky:rt.isSticky}}var E=I("sR1s");function b(Pe){var Ie=Pe.cells,Je=Pe.stickyOffsets,rt=Pe.flattenColumns,ye=Pe.rowComponent,ue=Pe.cellComponent,he=Pe.onHeaderRow,me=Pe.index,Ce=m.useContext(o.a),ge=Ce.prefixCls,Ee=Ce.direction,Ae;he&&(Ae=he(Ie.map(function(Me){return Me.column}),me));var De=Object(E.a)(Ie.map(function(Me){return Me.column}));return m.createElement(ye,Object.assign({},Ae),Ie.map(function(Me,He){var nt=Me.column,at=s(Me.colStart,Me.colEnd,rt,Je,Ee),it;return nt&&nt.onHeaderCell&&(it=Me.column.onHeaderCell(nt)),m.createElement(u.a,Object.assign({},Me,{ellipsis:nt.ellipsis,align:nt.align,component:ue,prefixCls:ge,key:De[He]},at,{additionalProps:it,rowType:"header"}))}))}b.displayName="HeaderRow";var p=b;function D(Pe){var Ie=[];function Je(he,me){var Ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ie[Ce]=Ie[Ce]||[];var ge=me,Ee=he.filter(Boolean).map(function(Ae){var De={key:Ae.key,className:Ae.className||"",children:Ae.title,column:Ae,colStart:ge},Me=1,He=Ae.children;return He&&He.length>0&&(Me=Je(He,ge,Ce+1).reduce(function(nt,at){return nt+at},0),De.hasSubColumns=!0),"colSpan"in Ae&&(Me=Ae.colSpan),"rowSpan"in Ae&&(De.rowSpan=Ae.rowSpan),De.colSpan=Me,De.colEnd=De.colStart+Me-1,Ie[Ce].push(De),ge+=Me,Me});return Ee}Je(Pe,0);for(var rt=Ie.length,ye=function(me){Ie[me].forEach(function(Ce){!("rowSpan"in Ce)&&!Ce.hasSubColumns&&(Ce.rowSpan=rt-me)})},ue=0;ue<rt;ue+=1)ye(ue);return Ie}function R(Pe){var Ie=Pe.stickyOffsets,Je=Pe.columns,rt=Pe.flattenColumns,ye=Pe.onHeaderRow,ue=m.useContext(o.a),he=ue.prefixCls,me=ue.getComponent,Ce=m.useMemo(function(){return D(Je)},[Je]),ge=me(["header","wrapper"],"thead"),Ee=me(["header","row"],"tr"),Ae=me(["header","cell"],"th");return m.createElement(ge,{className:"".concat(he,"-thead")},Ce.map(function(De,Me){var He=m.createElement(p,{key:Me,flattenColumns:rt,cells:De,stickyOffsets:Ie,rowComponent:Ee,cellComponent:Ae,onHeaderRow:ye,index:Me});return He}))}var y=R,x=I("hW8S");function w(Pe){for(var Ie=Pe.colWidths,Je=Pe.columns,rt=Pe.columCount,ye=[],ue=rt||Je.length,he=!1,me=ue-1;me>=0;me-=1){var Ce=Ie[me],ge=Je&&Je[me],Ee=ge&&ge[x.a];(Ce||Ee||he)&&(ye.unshift(m.createElement("col",Object.assign({key:me,style:{width:Ce,minWidth:Ce}},Ee))),he=!0)}return m.createElement("colgroup",null,ye)}var T=w;function F(Pe,Ie){return Object(m.useMemo)(function(){for(var Je=[],rt=0;rt<Ie;rt+=1){var ye=Pe[rt];if(ye!==void 0)Je[rt]=ye;else return null}return Je},[Pe.join("_"),Ie])}var P=m.forwardRef(function(Pe,Ie){var Je=Pe.noData,rt=Pe.columns,ye=Pe.flattenColumns,ue=Pe.colWidths,he=Pe.columCount,me=Pe.stickyOffsets,Ce=Pe.direction,ge=Pe.fixHeader,Ee=Pe.offsetHeader,Ae=Pe.stickyClassName,De=Pe.onScroll,Me=Object(f.a)(Pe,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),He=m.useContext(o.a),nt=He.prefixCls,at=He.scrollbarSize,it=He.isSticky,st=it&&!ge?0:at,Tt=m.useRef(null),pt=m.useCallback(function(wt){Object(d.b)(Ie,wt),Object(d.b)(Tt,wt)},[]);m.useEffect(function(){var wt;function Jt(Dt){var St=Dt.currentTarget,_t=Dt.deltaX;_t&&(De({currentTarget:St,scrollLeft:St.scrollLeft+_t}),Dt.preventDefault())}return(wt=Tt.current)===null||wt===void 0||wt.addEventListener("wheel",Jt),function(){var Dt;(Dt=Tt.current)===null||Dt===void 0||Dt.removeEventListener("wheel",Jt)}},[]);var ht=ye[ye.length-1],Ft={fixed:ht?ht.fixed:null,onHeaderCell:function(){return{className:"".concat(nt,"-cell-scrollbar")}}},Lt=Object(m.useMemo)(function(){return st?[].concat(Object(S.a)(rt),[Ft]):rt},[st,rt]),Yt=Object(m.useMemo)(function(){return st?[].concat(Object(S.a)(ye),[Ft]):ye},[st,ye]),$t=Object(m.useMemo)(function(){var wt=me.right,Jt=me.left;return Object(g.a)(Object(g.a)({},me),{},{left:Ce==="rtl"?[].concat(Object(S.a)(Jt.map(function(Dt){return Dt+st})),[0]):Jt,right:Ce==="rtl"?wt:[].concat(Object(S.a)(wt.map(function(Dt){return Dt+st})),[0]),isSticky:it})},[st,me,it]),Mt=F(ue,he);return m.createElement("div",{style:Object(g.a)({overflow:"hidden"},it?{top:Ee}:{}),ref:pt,className:_()("".concat(nt,"-header"),Object(N.a)({},Ae,!!Ae))},m.createElement("table",{style:{tableLayout:"fixed",visibility:Je||Mt?null:"hidden"}},m.createElement(T,{colWidths:Mt?[].concat(Object(S.a)(Mt),[st]):[],columCount:he+1,columns:Yt}),m.createElement(y,Object.assign({},Me,{stickyOffsets:$t,columns:Lt,flattenColumns:Yt}))))});P.displayName="FixedHeader";var A=P,X=m.createContext(null),z=X;function O(Pe){var Ie=Pe.prefixCls,Je=Pe.children,rt=Pe.component,ye=Pe.cellComponent,ue=Pe.fixHeader,he=Pe.fixColumn,me=Pe.horizonScroll,Ce=Pe.className,ge=Pe.expanded,Ee=Pe.componentWidth,Ae=Pe.colSpan,De=m.useContext(o.a),Me=De.scrollbarSize;return m.useMemo(function(){var He=Je;return he&&(He=m.createElement("div",{style:{width:Ee-(ue?Me:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ie,"-expanded-row-fixed")},He)),m.createElement(rt,{className:Ce,style:{display:ge?null:"none"}},m.createElement(u.a,{component:ye,prefixCls:Ie,colSpan:Ae},He))},[Je,rt,ue,me,Ce,ge,Ee,Ae,Me])}var B=O;function U(Pe){var Ie=Pe.className,Je=Pe.style,rt=Pe.record,ye=Pe.index,ue=Pe.rowKey,he=Pe.getRowKey,me=Pe.rowExpandable,Ce=Pe.expandedKeys,ge=Pe.onRow,Ee=Pe.indent,Ae=Ee===void 0?0:Ee,De=Pe.rowComponent,Me=Pe.cellComponent,He=Pe.childrenColumnName,nt=m.useContext(o.a),at=nt.prefixCls,it=nt.fixedInfoList,st=m.useContext(z),Tt=st.fixHeader,pt=st.fixColumn,ht=st.horizonScroll,Ft=st.componentWidth,Lt=st.flattenColumns,Yt=st.expandableType,$t=st.expandRowByClick,Mt=st.onTriggerExpand,wt=st.rowClassName,Jt=st.expandedRowClassName,Dt=st.indentSize,St=st.expandIcon,_t=st.expandedRowRender,Et=st.expandIconColumnIndex,Bt=m.useState(!1),Dr=Object(v.a)(Bt,2),mt=Dr[0],Ct=Dr[1],dt=Ce&&Ce.has(Pe.recordKey);m.useEffect(function(){dt&&Ct(!0)},[dt]);var Ht=Yt==="row"&&(!me||me(rt)),Gt=Yt==="nest",yt=He&&rt&&rt[He],xt=Ht||Gt,Kt;ge&&(Kt=ge(rt,ye));var Ar=function(Pt){if($t&&xt&&Mt(rt,Pt),Kt&&Kt.onClick){for(var dn,ct=arguments.length,jr=new Array(ct>1?ct-1:0),xr=1;xr<ct;xr++)jr[xr-1]=arguments[xr];(dn=Kt).onClick.apply(dn,[Pt].concat(jr))}},qt;typeof wt=="string"?qt=wt:typeof wt=="function"&&(qt=wt(rt,ye,Ae));var ut=Object(E.a)(Lt),kt=m.createElement(De,Object.assign({},Kt,{"data-row-key":ue,className:_()(Ie,"".concat(at,"-row"),"".concat(at,"-row-level-").concat(Ae),qt,Kt&&Kt.className),style:Object(g.a)(Object(g.a)({},Je),Kt?Kt.style:null),onClick:Ar}),Lt.map(function(zr,Pt){var dn=zr.render,ct=zr.dataIndex,jr=zr.className,xr=ut[Pt],Gn=it[Pt],An;Pt===(Et||0)&&Gt&&(An=m.createElement(m.Fragment,null,m.createElement("span",{style:{paddingLeft:"".concat(Dt*Ae,"px")},className:"".concat(at,"-row-indent indent-level-").concat(Ae)}),St({prefixCls:at,expanded:dt,expandable:yt,record:rt,onExpand:Mt})));var hn;return zr.onCell&&(hn=zr.onCell(rt,ye)),m.createElement(u.a,Object.assign({className:jr,ellipsis:zr.ellipsis,align:zr.align,component:Me,prefixCls:at,key:xr,record:rt,index:ye,dataIndex:ct,render:dn,shouldCellUpdate:zr.shouldCellUpdate},Gn,{appendNode:An,additionalProps:hn}))})),Hr;if(Ht&&(mt||dt)){var Yr=_t(rt,ye,Ae+1,dt),On=Jt&&Jt(rt,ye,Ae);Hr=m.createElement(B,{expanded:dt,className:_()("".concat(at,"-expanded-row"),"".concat(at,"-expanded-row-level-").concat(Ae+1),On),prefixCls:at,fixHeader:Tt,fixColumn:pt,horizonScroll:ht,component:De,componentWidth:Ft,cellComponent:Me,colSpan:Lt.length},Yr)}var cn;return yt&&dt&&(cn=(rt[He]||[]).map(function(zr,Pt){var dn=he(zr,Pt);return m.createElement(U,Object.assign({},Pe,{key:dn,rowKey:dn,record:zr,recordKey:dn,index:Pt,indent:Ae+1}))})),m.createElement(m.Fragment,null,kt,Hr,cn)}U.displayName="BodyRow";var L=U,G=m.createContext(null),ee=G;function oe(Pe){var Ie=Pe.columnKey,Je=Pe.onColumnResize,rt=m.useRef();return m.useEffect(function(){rt.current&&Je(Ie,rt.current.offsetWidth)},[]),m.createElement(c.a,{onResize:function(ue){var he=ue.offsetWidth;Je(Ie,he)}},m.createElement("td",{ref:rt,style:{padding:0,border:0,height:0}},m.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function ae(Pe){var Ie=Pe.data,Je=Pe.getRowKey,rt=Pe.measureColumnWidth,ye=Pe.expandedKeys,ue=Pe.onRow,he=Pe.rowExpandable,me=Pe.emptyNode,Ce=Pe.childrenColumnName,ge=m.useContext(ee),Ee=ge.onColumnResize,Ae=m.useContext(o.a),De=Ae.prefixCls,Me=Ae.getComponent,He=m.useContext(z),nt=He.fixHeader,at=He.horizonScroll,it=He.flattenColumns,st=He.componentWidth;return m.useMemo(function(){var Tt=Me(["body","wrapper"],"tbody"),pt=Me(["body","row"],"tr"),ht=Me(["body","cell"],"td"),Ft;Ie.length?Ft=Ie.map(function(Yt,$t){var Mt=Je(Yt,$t);return m.createElement(L,{key:Mt,rowKey:Mt,record:Yt,recordKey:Mt,index:$t,rowComponent:pt,cellComponent:ht,expandedKeys:ye,onRow:ue,getRowKey:Je,rowExpandable:he,childrenColumnName:Ce})}):Ft=m.createElement(B,{expanded:!0,className:"".concat(De,"-placeholder"),prefixCls:De,fixHeader:nt,fixColumn:at,horizonScroll:at,component:pt,componentWidth:st,cellComponent:ht,colSpan:it.length},me);var Lt=Object(E.a)(it);return m.createElement(Tt,{className:"".concat(De,"-tbody")},rt&&m.createElement("tr",{"aria-hidden":"true",className:"".concat(De,"-measure-row"),style:{height:0}},Lt.map(function(Yt){return m.createElement(oe,{key:Yt,columnKey:Yt,onColumnResize:Ee})})),Ft)},[Ie,De,ue,rt,ye,Je,Me,st,me,it])}var be=m.memo(ae);be.displayName="Body";var _e=be,fe=I("wRmb"),Re=I("xEkU"),Oe=I.n(Re);function de(Pe){var Ie=Object(m.useRef)(Pe),Je=Object(m.useState)({}),rt=Object(v.a)(Je,2),ye=rt[1],ue=Object(m.useRef)(null),he=Object(m.useRef)([]);function me(Ce){ue.current===null&&(he.current=[],ue.current=Oe()(function(){he.current.forEach(function(ge){Ie.current=ge(Ie.current)}),ue.current=null,ye({})})),he.current.push(Ce)}return Object(m.useEffect)(function(){return function(){Oe.a.cancel(ue.current)}},[]),[Ie.current,me]}function te(Pe){var Ie=Object(m.useRef)(Pe),Je=Object(m.useRef)(null);function rt(){window.clearTimeout(Je.current)}function ye(he){Ie.current=he,rt(),Je.current=window.setTimeout(function(){Ie.current=null,Je.current=null},100)}function ue(){return Ie.current}return Object(m.useEffect)(function(){return rt},[]),[ye,ue]}function W(Pe,Ie,Je){var rt=Object(m.useMemo)(function(){for(var ye=[],ue=[],he=0,me=0,Ce=0;Ce<Ie;Ce+=1)if(Je==="rtl"){ue[Ce]=me,me+=Pe[Ce]||0;var ge=Ie-Ce-1;ye[ge]=he,he+=Pe[ge]||0}else{ye[Ce]=he,he+=Pe[Ce]||0;var Ee=Ie-Ce-1;ue[Ee]=me,me+=Pe[Ee]||0}return{left:ye,right:ue}},[Pe,Ie,Je]);return rt}var Y=W;function V(Pe){var Ie=Pe.className,Je=Pe.children;return m.createElement("div",{className:Ie},Je)}var Q=V,q=I("n6Qo");function ie(Pe){var Ie,Je=Pe.prefixCls,rt=Pe.record,ye=Pe.onExpand,ue=Pe.expanded,he=Pe.expandable,me="".concat(Je,"-row-expand-icon");if(!he)return m.createElement("span",{className:_()(me,"".concat(Je,"-row-spaced"))});var Ce=function(Ee){ye(rt,Ee),Ee.stopPropagation()};return m.createElement("span",{className:_()(me,(Ie={},Object(N.a)(Ie,"".concat(Je,"-row-expanded"),ue),Object(N.a)(Ie,"".concat(Je,"-row-collapsed"),!ue),Ie)),onClick:Ce})}function ne(Pe,Ie,Je){var rt=[];function ye(ue){(ue||[]).forEach(function(he,me){rt.push(Ie(he,me)),ye(he[Je])})}return ye(Pe),rt}var J=I("zT1h"),$=I("y0+3"),le=function(Ie,Je){var rt,ye,ue=Ie.scrollBodyRef,he=Ie.onScroll,me=Ie.offsetScroll,Ce=m.useContext(o.a),ge=Ce.prefixCls,Ee=((rt=ue.current)===null||rt===void 0?void 0:rt.scrollWidth)||0,Ae=((ye=ue.current)===null||ye===void 0?void 0:ye.clientWidth)||0,De=Ee&&Ae*(Ae/Ee),Me=m.useRef(),He=de({scrollLeft:0,isHiddenScrollBar:!1}),nt=Object(v.a)(He,2),at=nt[0],it=nt[1],st=m.useRef({delta:0,x:0}),Tt=m.useState(!1),pt=Object(v.a)(Tt,2),ht=pt[0],Ft=pt[1],Lt=function(){Ft(!1)},Yt=function(Dt){Dt.persist(),st.current.delta=Dt.pageX-at.scrollLeft,st.current.x=0,Ft(!0),Dt.preventDefault()},$t=function(Dt){var St,_t=Dt||((St=window)===null||St===void 0?void 0:St.event),Et=_t.buttons;if(!ht||Et===0){ht&&Ft(!1);return}var Bt=st.current.x+Dt.pageX-st.current.x-st.current.delta;Bt<=0&&(Bt=0),Bt+De>=Ae&&(Bt=Ae-De),he({scrollLeft:Bt/Ae*(Ee+2)}),st.current.x=Dt.pageX},Mt=function(){var Dt=Object($.b)(ue.current).top,St=Dt+ue.current.offsetHeight,_t=document.documentElement.scrollTop+window.innerHeight;St-Object(i.a)()<=_t||Dt>=_t-me?it(function(Et){return Object(g.a)(Object(g.a)({},Et),{},{isHiddenScrollBar:!0})}):it(function(Et){return Object(g.a)(Object(g.a)({},Et),{},{isHiddenScrollBar:!1})})},wt=function(Dt){it(function(St){return Object(g.a)(Object(g.a)({},St),{},{scrollLeft:Dt/Ee*Ae||0})})};return m.useImperativeHandle(Je,function(){return{setScrollLeft:wt}}),m.useEffect(function(){var Jt=Object(J.a)(document.body,"mouseup",Lt,!1),Dt=Object(J.a)(document.body,"mousemove",$t,!1);return Mt(),function(){Jt.remove(),Dt.remove()}},[De,ht]),m.useEffect(function(){var Jt=Object(J.a)(window,"scroll",Mt,!1),Dt=Object(J.a)(window,"resize",Mt,!1);return function(){Jt.remove(),Dt.remove()}},[]),m.useEffect(function(){at.isHiddenScrollBar||it(function(Jt){var Dt,St;return Object(g.a)(Object(g.a)({},Jt),{},{scrollLeft:ue.current.scrollLeft/((Dt=ue.current)===null||Dt===void 0?void 0:Dt.scrollWidth)*((St=ue.current)===null||St===void 0?void 0:St.clientWidth)})})},[at.isHiddenScrollBar]),Ee<=Ae||!De||at.isHiddenScrollBar?null:m.createElement("div",{style:{height:Object(i.a)(),width:Ae,bottom:me},className:"".concat(ge,"-sticky-scroll")},m.createElement("div",{onMouseDown:Yt,ref:Me,className:_()("".concat(ge,"-sticky-scroll-bar"),Object(N.a)({},"".concat(ge,"-sticky-scroll-bar-active"),ht)),style:{width:"".concat(De,"px"),transform:"translate3d(".concat(at.scrollLeft,"px, 0, 0)")}}))},ce=m.forwardRef(le);function we(Pe,Ie){return m.useMemo(function(){var Je=!!Pe;return{isSticky:Je,stickyClassName:Je?"".concat(Ie,"-sticky-header"):"",offsetHeader:Object(k.a)(Pe)==="object"&&Pe.offsetHeader||0,offsetScroll:Object(k.a)(Pe)==="object"&&Pe.offsetScroll||0}},[Pe,Ie])}var Fe=[],Xe={},$e="rc-table-internal-hook",Ye=m.memo(function(Pe){var Ie=Pe.children;return Ie},function(Pe,Ie){return h()(Pe.props,Ie.props)?Pe.pingLeft!==Ie.pingLeft||Pe.pingRight!==Ie.pingRight:!1});function Ze(Pe){var Ie,Je=Pe.prefixCls,rt=Pe.className,ye=Pe.rowClassName,ue=Pe.style,he=Pe.data,me=Pe.rowKey,Ce=Pe.scroll,ge=Pe.tableLayout,Ee=Pe.direction,Ae=Pe.title,De=Pe.footer,Me=Pe.summary,He=Pe.id,nt=Pe.showHeader,at=Pe.components,it=Pe.emptyText,st=Pe.onRow,Tt=Pe.onHeaderRow,pt=Pe.internalHooks,ht=Pe.transformColumns,Ft=Pe.internalRefs,Lt=Pe.sticky,Yt=he||Fe,$t=!!Yt.length,Mt=m.useState(0),wt=Object(v.a)(Mt,2),Jt=wt[0],Dt=wt[1];m.useEffect(function(){Dt(Object(i.a)())});var St=m.useMemo(function(){return Object(E.c)(at,{})},[at]),_t=m.useCallback(function(Mr,wr){return Object(E.b)(St,Mr)||wr},[St]),Et=m.useMemo(function(){return typeof me=="function"?me:function(Mr){var wr=Mr&&Mr[me];return wr}},[me]),Bt=Object(x.c)(Pe),Dr=Bt.expandIcon,mt=Bt.expandedRowKeys,Ct=Bt.defaultExpandedRowKeys,dt=Bt.defaultExpandAllRows,Ht=Bt.expandedRowRender,Gt=Bt.onExpand,yt=Bt.onExpandedRowsChange,xt=Bt.expandRowByClick,Kt=Bt.rowExpandable,Ar=Bt.expandIconColumnIndex,qt=Bt.expandedRowClassName,ut=Bt.childrenColumnName,kt=Bt.indentSize,Hr=Dr||ie,Yr=ut||"children",On=m.useMemo(function(){return Ht?"row":Pe.expandable&&pt===$e&&Pe.expandable.__PARENT_RENDER_ICON__||Yt.some(function(Mr){return Mr&&Object(k.a)(Mr)==="object"&&Mr[Yr]})?"nest":!1},[!!Ht,Yt]),cn=m.useState(function(){return Ct||(dt?ne(Yt,Et,Yr):[])}),zr=Object(v.a)(cn,2),Pt=zr[0],dn=zr[1],ct=m.useMemo(function(){return new Set(mt||Pt||[])},[mt,Pt]),jr=m.useCallback(function(Mr){var wr=Et(Mr,Yt.indexOf(Mr)),gr,ai=ct.has(wr);ai?(ct.delete(wr),gr=Object(S.a)(ct)):gr=[].concat(Object(S.a)(ct),[wr]),dn(gr),Gt&&Gt(!ai,Mr),yt&&yt(gr)},[Et,ct,Yt,Gt,yt]),xr=m.useState(0),Gn=Object(v.a)(xr,2),An=Gn[0],hn=Gn[1],Ei=Object(fe.b)(Object(g.a)(Object(g.a)(Object(g.a)({},Pe),Bt),{},{expandable:!!Ht,expandedKeys:ct,getRowKey:Et,onTriggerExpand:jr,expandIcon:Hr,expandIconColumnIndex:Ar,direction:Ee}),pt===$e?ht:null),Kn=Object(v.a)(Ei,2),bn=Kn[0],Fr=Kn[1],di=m.useMemo(function(){return{columns:bn,flattenColumns:Fr}},[bn,Fr]),fn=m.useRef(),Vr=m.useRef(),dr=m.useRef(),nn=m.useState(!1),_n=Object(v.a)(nn,2),jt=_n[0],lr=_n[1],ur=m.useState(!1),Rr=Object(v.a)(ur,2),br=Rr[0],hi=Rr[1],Fn=de(new Map),$i=Object(v.a)(Fn,2),Ji=$i[0],Oi=$i[1],pn=Object(E.a)(Fr),Ki=pn.map(function(Mr){return Ji.get(Mr)}),Zr=m.useMemo(function(){return Ki},[Ki.join("_")]),ri=Y(Zr,Fr.length,Ee),kn=Ce&&Object(E.d)(Ce.y),sn=Ce&&Object(E.d)(Ce.x),Tn=sn&&Fr.some(function(Mr){var wr=Mr.fixed;return wr}),fi=m.useRef(),zn=we(Lt,Je),Vn=zn.isSticky,ki=zn.offsetHeader,Mi=zn.offsetScroll,Xn=zn.stickyClassName,ji,pi,mi;kn&&(pi={overflowY:"scroll",maxHeight:Ce.y}),sn&&(ji={overflowX:"auto"},kn||(pi={overflowY:"hidden"}),mi={width:Ce.x===!0?"auto":Ce.x,minWidth:"100%"});var Yn=m.useCallback(function(Mr,wr){Oi(function(gr){var ai=new Map(gr);return ai.set(Mr,wr),ai})},[]),$n=te(null),Pi=Object(v.a)($n,2),ni=Pi[0],gi=Pi[1];function Fi(Mr,wr){if(!wr)return;typeof wr=="function"?wr(Mr):wr.scrollLeft!==Mr&&(wr.scrollLeft=Mr)}var ii=function(wr){var gr=wr.currentTarget,ai=wr.scrollLeft,zi=typeof ai=="number"?ai:gr.scrollLeft,Vi=gr||Xe;if(!gi()||gi()===Vi){var tr;ni(Vi),Fi(zi,Vr.current),Fi(zi,dr.current),Fi(zi,(tr=fi.current)===null||tr===void 0?void 0:tr.setScrollLeft)}if(gr){var It=gr.scrollWidth,ir=gr.clientWidth;lr(zi>0),hi(zi<It-ir)}},Ur=function(){dr.current&&ii({currentTarget:dr.current})},Ut=function(wr){var gr=wr.width;Ur(),hn(fn.current?fn.current.offsetWidth:gr)};m.useEffect(function(){return Ur},[]),m.useEffect(function(){sn&&Ur()},[sn]),m.useEffect(function(){pt===$e&&Ft&&(Ft.body.current=dr.current)});var er=_t(["table"],"table"),zt=m.useMemo(function(){return ge||(Tn?Ce.x==="max-content"?"auto":"fixed":kn||Fr.some(function(Mr){var wr=Mr.ellipsis;return wr})?"fixed":"auto")},[kn,Tn,Fr,ge]),ar,_r={colWidths:Zr,columCount:Fr.length,stickyOffsets:ri,onHeaderRow:Tt,fixHeader:kn},Lr=m.useMemo(function(){return $t?null:typeof it=="function"?it():it},[$t,it]),mr=m.createElement(_e,{data:Yt,measureColumnWidth:kn||sn||Vn,expandedKeys:ct,rowExpandable:Kt,getRowKey:Et,onRow:st,emptyNode:Lr,childrenColumnName:Yr}),qr=m.createElement(T,{colWidths:Fr.map(function(Mr){var wr=Mr.width;return wr}),columns:Fr}),Un=Me&&m.createElement(q.b,null,Me(Yt)),hr=_t(["body"]);if(kn||Vn){var vi;typeof hr=="function"?(vi=hr(Yt,{scrollbarSize:Jt,ref:dr,onScroll:ii}),_r.colWidths=Fr.map(function(Mr,wr){var gr=Mr.width,ai=wr===bn.length-1?gr-Jt:gr;return typeof ai=="number"&&!Number.isNaN(ai)?ai:(Object(r.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):vi=m.createElement("div",{style:Object(g.a)(Object(g.a)({},ji),pi),onScroll:ii,ref:dr,className:_()("".concat(Je,"-body"))},m.createElement(er,{style:Object(g.a)(Object(g.a)({},mi),{},{tableLayout:zt})},qr,mr,Un),Vn&&m.createElement(ce,{ref:fi,offsetScroll:Mi,scrollBodyRef:dr,onScroll:ii})),ar=m.createElement(m.Fragment,null,nt!==!1&&m.createElement(A,Object.assign({noData:!Yt.length},_r,di,{direction:Ee,offsetHeader:ki,stickyClassName:Xn,ref:Vr,onScroll:ii})),vi)}else ar=m.createElement("div",{style:Object(g.a)(Object(g.a)({},ji),pi),className:_()("".concat(Je,"-content")),onScroll:ii,ref:dr},m.createElement(er,{style:Object(g.a)(Object(g.a)({},mi),{},{tableLayout:zt})},qr,nt!==!1&&m.createElement(y,Object.assign({},_r,di)),mr,Un));var kr=Object(x.b)(Pe),Sn=m.createElement("div",Object.assign({className:_()(Je,rt,(Ie={},Object(N.a)(Ie,"".concat(Je,"-rtl"),Ee==="rtl"),Object(N.a)(Ie,"".concat(Je,"-ping-left"),jt),Object(N.a)(Ie,"".concat(Je,"-ping-right"),br),Object(N.a)(Ie,"".concat(Je,"-layout-fixed"),ge==="fixed"),Object(N.a)(Ie,"".concat(Je,"-fixed-header"),kn),Object(N.a)(Ie,"".concat(Je,"-fixed-column"),Tn),Object(N.a)(Ie,"".concat(Je,"-scroll-horizontal"),sn),Object(N.a)(Ie,"".concat(Je,"-has-fix-left"),Fr[0]&&Fr[0].fixed),Object(N.a)(Ie,"".concat(Je,"-has-fix-right"),Fr[Fr.length-1]&&Fr[Fr.length-1].fixed==="right"),Ie)),style:ue,id:He,ref:fn},kr),m.createElement(Ye,{pingLeft:jt,pingRight:br,props:Object(g.a)(Object(g.a)({},Pe),{},{stickyOffsets:ri,mergedExpandedKeys:ct})},Ae&&m.createElement(Q,{className:"".concat(Je,"-title")},Ae(Yt)),m.createElement("div",{className:"".concat(Je,"-container")},ar),De&&m.createElement(Q,{className:"".concat(Je,"-footer")},De(Yt))));sn&&(Sn=m.createElement(c.a,{onResize:Ut},Sn));var Rn=m.useMemo(function(){return{prefixCls:Je,getComponent:_t,scrollbarSize:Jt,direction:Ee,fixedInfoList:Fr.map(function(Mr,wr){return s(wr,wr,Fr,ri,Ee)}),isSticky:Vn}},[Je,_t,Jt,Ee,Fr,ri,Ee,Vn]),li=m.useMemo(function(){return Object(g.a)(Object(g.a)({},di),{},{tableLayout:zt,rowClassName:ye,expandedRowClassName:qt,componentWidth:An,fixHeader:kn,fixColumn:Tn,horizonScroll:sn,expandIcon:Hr,expandableType:On,expandRowByClick:xt,expandedRowRender:Ht,onTriggerExpand:jr,expandIconColumnIndex:Ar,indentSize:kt})},[di,zt,ye,qt,An,kn,Tn,sn,Hr,On,xt,Ht,jr,Ar,kt]),ua=m.useMemo(function(){return{onColumnResize:Yn}},[Yn]);return m.createElement(o.a.Provider,{value:Rn},m.createElement(z.Provider,{value:li},m.createElement(ee.Provider,{value:ua},Sn)))}Ze.Column=l.a,Ze.ColumnGroup=n.a,Ze.Summary=q.a,Ze.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var qe=Z.b=Ze},wRmb:function(H,Z,I){"use strict";I.d(Z,"a",function(){return h});var N=I("rePB"),g=I("KQm4"),S=I("VTBJ"),k=I("Ff2n"),v=I("q1tI"),m=I.n(v),C=I("Kwbf"),_=I("Zm9Q"),e=I("hW8S");function h(l){return Object(_.a)(l).filter(function(f){return v.isValidElement(f)}).map(function(f){var d=f.key,u=f.props,o=u.children,s=Object(k.a)(u,["children"]),E=Object(S.a)({key:d},s);return o&&(E.children=h(o)),E})}function r(l){return l.reduce(function(f,d){var u=d.fixed,o=u===!0?"left":u,s=d.children;return s&&s.length>0?[].concat(Object(g.a)(f),Object(g.a)(r(s).map(function(E){return Object(S.a)({fixed:o},E)}))):[].concat(Object(g.a)(f),[Object(S.a)(Object(S.a)({},d),{},{fixed:o})])},[])}function c(l){for(var f=!0,d=0;d<l.length;d+=1){var u=l[d];if(f&&u.fixed!=="left")f=!1;else if(!f&&u.fixed==="left"){Object(C.a)(!1,"Index ".concat(d-1," of `columns` missing `fixed='left'` prop."));break}}for(var o=!0,s=l.length-1;s>=0;s-=1){var E=l[s];if(o&&E.fixed!=="right")o=!1;else if(!o&&E.fixed==="right"){Object(C.a)(!1,"Index ".concat(s+1," of `columns` missing `fixed='right'` prop."));break}}}function i(l){return l.map(function(f){var d=f.fixed,u=Object(k.a)(f,["fixed"]),o=d;return d==="left"?o="right":d==="right"&&(o="left"),Object(S.a)({fixed:o},u)})}function n(l,f){var d=l.prefixCls,u=l.columns,o=l.children,s=l.expandable,E=l.expandedKeys,b=l.getRowKey,p=l.onTriggerExpand,D=l.expandIcon,R=l.rowExpandable,y=l.expandIconColumnIndex,x=l.direction,w=l.expandRowByClick,T=v.useMemo(function(){return u||h(o)},[u,o]),F=v.useMemo(function(){if(s){var X,z=y||0,O=T[z],B=(X={},Object(N.a)(X,e.a,{className:"".concat(d,"-expand-icon-col")}),Object(N.a)(X,"title",""),Object(N.a)(X,"fixed",O?O.fixed:null),Object(N.a)(X,"className","".concat(d,"-row-expand-icon-cell")),Object(N.a)(X,"render",function(G,ee,oe){var ae=b(ee,oe),be=E.has(ae),_e=R?R(ee):!0,fe=D({prefixCls:d,expanded:be,expandable:_e,record:ee,onExpand:p});return w?v.createElement("span",{onClick:function(Oe){return Oe.stopPropagation()}},fe):fe}),X),U=T.slice();return z>=0&&U.splice(z,0,B),U}return T},[s,T,b,E,D,x]),P=v.useMemo(function(){var X=F;return f&&(X=f(X)),X.length||(X=[{render:function(){return null}}]),X},[f,F,x]),A=v.useMemo(function(){return x==="rtl"?i(r(P)):r(P)},[P,x]);return[P,A]}Z.b=n},wZgz:function(H,Z,I){(function(N,g,S){H.exports=Z=g(I("Ib8C"),I("ETIr"),I("cv67"),I("K3mO"),I("OLod"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.BlockCipher,v=g.algo,m=[],C=[],_=[],e=[],h=[],r=[],c=[],i=[],n=[],l=[];(function(){for(var u=[],o=0;o<256;o++)o<128?u[o]=o<<1:u[o]=o<<1^283;for(var s=0,E=0,o=0;o<256;o++){var b=E^E<<1^E<<2^E<<3^E<<4;b=b>>>8^b&255^99,m[s]=b,C[b]=s;var p=u[s],D=u[p],R=u[D],y=u[b]*257^b*16843008;_[s]=y<<24|y>>>8,e[s]=y<<16|y>>>16,h[s]=y<<8|y>>>24,r[s]=y;var y=R*16843009^D*65537^p*257^s*16843008;c[b]=y<<24|y>>>8,i[b]=y<<16|y>>>16,n[b]=y<<8|y>>>24,l[b]=y,s?(s=p^u[u[u[R^p]]],E^=u[u[E]]):s=E=1}})();var f=[0,1,2,4,8,16,32,64,128,27,54],d=v.AES=k.extend({_doReset:function(){var u;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var o=this._keyPriorReset=this._key,s=o.words,E=o.sigBytes/4,b=this._nRounds=E+6,p=(b+1)*4,D=this._keySchedule=[],R=0;R<p;R++)R<E?D[R]=s[R]:(u=D[R-1],R%E?E>6&&R%E==4&&(u=m[u>>>24]<<24|m[u>>>16&255]<<16|m[u>>>8&255]<<8|m[u&255]):(u=u<<8|u>>>24,u=m[u>>>24]<<24|m[u>>>16&255]<<16|m[u>>>8&255]<<8|m[u&255],u^=f[R/E|0]<<24),D[R]=D[R-E]^u);for(var y=this._invKeySchedule=[],x=0;x<p;x++){var R=p-x;if(x%4)var u=D[R];else var u=D[R-4];x<4||R<=4?y[x]=u:y[x]=c[m[u>>>24]]^i[m[u>>>16&255]]^n[m[u>>>8&255]]^l[m[u&255]]}},encryptBlock:function(u,o){this._doCryptBlock(u,o,this._keySchedule,_,e,h,r,m)},decryptBlock:function(u,o){var s=u[o+1];u[o+1]=u[o+3],u[o+3]=s,this._doCryptBlock(u,o,this._invKeySchedule,c,i,n,l,C);var s=u[o+1];u[o+1]=u[o+3],u[o+3]=s},_doCryptBlock:function(u,o,s,E,b,p,D,R){for(var y=this._nRounds,x=u[o]^s[0],w=u[o+1]^s[1],T=u[o+2]^s[2],F=u[o+3]^s[3],P=4,A=1;A<y;A++){var X=E[x>>>24]^b[w>>>16&255]^p[T>>>8&255]^D[F&255]^s[P++],z=E[w>>>24]^b[T>>>16&255]^p[F>>>8&255]^D[x&255]^s[P++],O=E[T>>>24]^b[F>>>16&255]^p[x>>>8&255]^D[w&255]^s[P++],B=E[F>>>24]^b[x>>>16&255]^p[w>>>8&255]^D[T&255]^s[P++];x=X,w=z,T=O,F=B}var X=(R[x>>>24]<<24|R[w>>>16&255]<<16|R[T>>>8&255]<<8|R[F&255])^s[P++],z=(R[w>>>24]<<24|R[T>>>16&255]<<16|R[F>>>8&255]<<8|R[x&255])^s[P++],O=(R[T>>>24]<<24|R[F>>>16&255]<<16|R[x>>>8&255]<<8|R[w&255])^s[P++],B=(R[F>>>24]<<24|R[x>>>16&255]<<16|R[w>>>8&255]<<8|R[T&255])^s[P++];u[o]=X,u[o+1]=z,u[o+2]=O,u[o+3]=B},keySize:256/32});g.AES=k._createHelper(d)}(),N.AES})},wbyO:function(H,Z,I){(function(N,g){H.exports=Z=g(I("Ib8C"))})(this,function(N){return function(){var g=N,S=g.lib,k=S.WordArray,v=g.enc,m=v.Base64url={stringify:function(_,e=!0){var h=_.words,r=_.sigBytes,c=e?this._safe_map:this._map;_.clamp();for(var i=[],n=0;n<r;n+=3)for(var l=h[n>>>2]>>>24-n%4*8&255,f=h[n+1>>>2]>>>24-(n+1)%4*8&255,d=h[n+2>>>2]>>>24-(n+2)%4*8&255,u=l<<16|f<<8|d,o=0;o<4&&n+o*.75<r;o++)i.push(c.charAt(u>>>6*(3-o)&63));var s=c.charAt(64);if(s)for(;i.length%4;)i.push(s);return i.join("")},parse:function(_,e=!0){var h=_.length,r=e?this._safe_map:this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var i=0;i<r.length;i++)c[r.charCodeAt(i)]=i}var n=r.charAt(64);if(n){var l=_.indexOf(n);l!==-1&&(h=l)}return C(_,h,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function C(_,e,h){for(var r=[],c=0,i=0;i<e;i++)if(i%4){var n=h[_.charCodeAt(i-1)]<<i%4*2,l=h[_.charCodeAt(i)]>>>6-i%4*2,f=n|l;r[c>>>2]|=f<<24-c%4*8,c++}return k.create(r,c)}}(),N.enc.Base64url})},"y0+3":function(H,Z,I){"use strict";I.d(Z,"a",function(){return r}),I.d(Z,"b",function(){return i});var N=/margin|padding|width|height|max|min|offset/,g={left:!0,top:!0},S={cssFloat:1,styleFloat:1,float:1};function k(n){return n.nodeType===1?n.ownerDocument.defaultView.getComputedStyle(n,null):{}}function v(n,l,f){if(l=l.toLowerCase(),f==="auto"){if(l==="height")return n.offsetHeight;if(l==="width")return n.offsetWidth}return l in g||(g[l]=N.test(l)),g[l]?parseFloat(f)||0:f}function m(n,l){var f=arguments.length,d=k(n);return l=S[l]?"cssFloat"in n.style?"cssFloat":"styleFloat":l,f===1?d:v(n,l,d[l]||n.style[l])}function C(n,l,f){var d=arguments.length;if(l=S[l]?"cssFloat"in n.style?"cssFloat":"styleFloat":l,d===3)return typeof f=="number"&&N.test(l)&&(f="".concat(f,"px")),n.style[l]=f,f;for(var u in l)l.hasOwnProperty(u)&&C(n,u,l[u]);return k(n)}function _(n){return n===document.body?document.documentElement.clientWidth:n.offsetWidth}function e(n){return n===document.body?window.innerHeight||document.documentElement.clientHeight:n.offsetHeight}function h(){var n=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),l=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:n,height:l}}function r(){var n=document.documentElement.clientWidth,l=window.innerHeight||document.documentElement.clientHeight;return{width:n,height:l}}function c(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function i(n){var l=n.getBoundingClientRect(),f=document.documentElement;return{left:l.left+(window.pageXOffset||f.scrollLeft)-(f.clientLeft||document.body.clientLeft||0),top:l.top+(window.pageYOffset||f.scrollTop)-(f.clientTop||document.body.clientTop||0)}}},ynwM:function(H,Z,I){var N=I("MFOe"),g=N.Global;H.exports={name:"oldFF-globalStorage",read:k,write:v,each:m,remove:C,clearAll:_};var S=g.globalStorage;function k(e){return S[e]}function v(e,h){S[e]=h}function m(e){for(var h=S.length-1;h>=0;h--){var r=S.key(h);e(S[r],r)}}function C(e){return S.removeItem(e)}function _(){m(function(e,h){delete S[e]})}}}]);
|